diff --git a/vendor/github.com/Azure/go-autorest/LICENSE b/vendor/github.com/Azure/go-autorest/LICENSE new file mode 100644 index 000000000..b9d6a27ea --- /dev/null +++ b/vendor/github.com/Azure/go-autorest/LICENSE @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2015 Microsoft Corporation + + 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. diff --git a/vendor/github.com/google/go-querystring/LICENSE b/vendor/github.com/google/go-querystring/LICENSE new file mode 100644 index 000000000..ae121a1e4 --- /dev/null +++ b/vendor/github.com/google/go-querystring/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2013 Google. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/hashicorp/go-discover/LICENSE b/vendor/github.com/hashicorp/go-discover/LICENSE deleted file mode 100644 index c33dcc7c9..000000000 --- a/vendor/github.com/hashicorp/go-discover/LICENSE +++ /dev/null @@ -1,354 +0,0 @@ -Mozilla Public License, version 2.0 - -1. Definitions - -1.1. “Contributor” - - means each individual or legal entity that creates, contributes to the - creation of, or owns Covered Software. - -1.2. “Contributor Version” - - means the combination of the Contributions of others (if any) used by a - Contributor and that particular Contributor’s Contribution. - -1.3. “Contribution” - - means Covered Software of a particular Contributor. - -1.4. “Covered Software” - - means Source Code Form to which the initial Contributor has attached the - notice in Exhibit A, the Executable Form of such Source Code Form, and - Modifications of such Source Code Form, in each case including portions - thereof. - -1.5. “Incompatible With Secondary Licenses” - means - - a. that the initial Contributor has attached the notice described in - Exhibit B to the Covered Software; or - - b. that the Covered Software was made available under the terms of version - 1.1 or earlier of the License, but not also under the terms of a - Secondary License. - -1.6. “Executable Form” - - means any form of the work other than Source Code Form. - -1.7. “Larger Work” - - means a work that combines Covered Software with other material, in a separate - file or files, that is not Covered Software. - -1.8. “License” - - means this document. - -1.9. “Licensable” - - means having the right to grant, to the maximum extent possible, whether at the - time of the initial grant or subsequently, any and all of the rights conveyed by - this License. - -1.10. “Modifications” - - means any of the following: - - a. any file in Source Code Form that results from an addition to, deletion - from, or modification of the contents of Covered Software; or - - b. any new file in Source Code Form that contains any Covered Software. - -1.11. “Patent Claims” of a Contributor - - means any patent claim(s), including without limitation, method, process, - and apparatus claims, in any patent Licensable by such Contributor that - would be infringed, but for the grant of the License, by the making, - using, selling, offering for sale, having made, import, or transfer of - either its Contributions or its Contributor Version. - -1.12. “Secondary License” - - means either the GNU General Public License, Version 2.0, the GNU Lesser - General Public License, Version 2.1, the GNU Affero General Public - License, Version 3.0, or any later versions of those licenses. - -1.13. “Source Code Form” - - means the form of the work preferred for making modifications. - -1.14. “You” (or “Your”) - - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that controls, is - controlled by, or is under common control with You. For purposes of this - definition, “control” means (a) the power, direct or indirect, to cause - the direction or management of such entity, whether by contract or - otherwise, or (b) ownership of more than fifty percent (50%) of the - outstanding shares or beneficial ownership of such entity. - - -2. License Grants and Conditions - -2.1. Grants - - Each Contributor hereby grants You a world-wide, royalty-free, - non-exclusive license: - - a. under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or as - part of a Larger Work; and - - b. under Patent Claims of such Contributor to make, use, sell, offer for - sale, have made, import, and otherwise transfer either its Contributions - or its Contributor Version. - -2.2. Effective Date - - The licenses granted in Section 2.1 with respect to any Contribution become - effective for each Contribution on the date the Contributor first distributes - such Contribution. - -2.3. Limitations on Grant Scope - - The licenses granted in this Section 2 are the only rights granted under this - License. No additional rights or licenses will be implied from the distribution - or licensing of Covered Software under this License. Notwithstanding Section - 2.1(b) above, no patent license is granted by a Contributor: - - a. for any code that a Contributor has removed from Covered Software; or - - b. for infringements caused by: (i) Your and any other third party’s - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - - c. under Patent Claims infringed by Covered Software in the absence of its - Contributions. - - This License does not grant any rights in the trademarks, service marks, or - logos of any Contributor (except as may be necessary to comply with the - notice requirements in Section 3.4). - -2.4. Subsequent Licenses - - No Contributor makes additional grants as a result of Your choice to - distribute the Covered Software under a subsequent version of this License - (see Section 10.2) or under the terms of a Secondary License (if permitted - under the terms of Section 3.3). - -2.5. Representation - - Each Contributor represents that the Contributor believes its Contributions - are its original creation(s) or it has sufficient rights to grant the - rights to its Contributions conveyed by this License. - -2.6. Fair Use - - This License is not intended to limit any rights You have under applicable - copyright doctrines of fair use, fair dealing, or other equivalents. - -2.7. Conditions - - Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in - Section 2.1. - - -3. Responsibilities - -3.1. Distribution of Source Form - - All distribution of Covered Software in Source Code Form, including any - Modifications that You create or to which You contribute, must be under the - terms of this License. You must inform recipients that the Source Code Form - of the Covered Software is governed by the terms of this License, and how - they can obtain a copy of this License. You may not attempt to alter or - restrict the recipients’ rights in the Source Code Form. - -3.2. Distribution of Executable Form - - If You distribute Covered Software in Executable Form then: - - a. such Covered Software must also be made available in Source Code Form, - as described in Section 3.1, and You must inform recipients of the - Executable Form how they can obtain a copy of such Source Code Form by - reasonable means in a timely manner, at a charge no more than the cost - of distribution to the recipient; and - - b. You may distribute such Executable Form under the terms of this License, - or sublicense it under different terms, provided that the license for - the Executable Form does not attempt to limit or alter the recipients’ - rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - - You may create and distribute a Larger Work under terms of Your choice, - provided that You also comply with the requirements of this License for the - Covered Software. If the Larger Work is a combination of Covered Software - with a work governed by one or more Secondary Licenses, and the Covered - Software is not Incompatible With Secondary Licenses, this License permits - You to additionally distribute such Covered Software under the terms of - such Secondary License(s), so that the recipient of the Larger Work may, at - their option, further distribute the Covered Software under the terms of - either this License or such Secondary License(s). - -3.4. Notices - - You may not remove or alter the substance of any license notices (including - copyright notices, patent notices, disclaimers of warranty, or limitations - of liability) contained within the Source Code Form of the Covered - Software, except that You may alter any license notices to the extent - required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - - You may choose to offer, and to charge a fee for, warranty, support, - indemnity or liability obligations to one or more recipients of Covered - Software. However, You may do so only on Your own behalf, and not on behalf - of any Contributor. You must make it absolutely clear that any such - warranty, support, indemnity, or liability obligation is offered by You - alone, and You hereby agree to indemnify every Contributor for any - liability incurred by such Contributor as a result of warranty, support, - indemnity or liability terms You offer. You may include additional - disclaimers of warranty and limitations of liability specific to any - jurisdiction. - -4. Inability to Comply Due to Statute or Regulation - - If it is impossible for You to comply with any of the terms of this License - with respect to some or all of the Covered Software due to statute, judicial - order, or regulation then You must: (a) comply with the terms of this License - to the maximum extent possible; and (b) describe the limitations and the code - they affect. Such description must be placed in a text file included with all - distributions of the Covered Software under this License. Except to the - extent prohibited by statute or regulation, such description must be - sufficiently detailed for a recipient of ordinary skill to be able to - understand it. - -5. Termination - -5.1. The rights granted under this License will terminate automatically if You - fail to comply with any of its terms. However, if You become compliant, - then the rights granted under this License from a particular Contributor - are reinstated (a) provisionally, unless and until such Contributor - explicitly and finally terminates Your grants, and (b) on an ongoing basis, - if such Contributor fails to notify You of the non-compliance by some - reasonable means prior to 60 days after You have come back into compliance. - Moreover, Your grants from a particular Contributor are reinstated on an - ongoing basis if such Contributor notifies You of the non-compliance by - some reasonable means, this is the first time You have received notice of - non-compliance with this License from such Contributor, and You become - compliant prior to 30 days after Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent - infringement claim (excluding declaratory judgment actions, counter-claims, - and cross-claims) alleging that a Contributor Version directly or - indirectly infringes any patent, then the rights granted to You by any and - all Contributors for the Covered Software under Section 2.1 of this License - shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user - license agreements (excluding distributors and resellers) which have been - validly granted by You or Your distributors under this License prior to - termination shall survive termination. - -6. Disclaimer of Warranty - - Covered Software is provided under this License on an “as is” basis, without - warranty of any kind, either expressed, implied, or statutory, including, - without limitation, warranties that the Covered Software is free of defects, - merchantable, fit for a particular purpose or non-infringing. The entire - risk as to the quality and performance of the Covered Software is with You. - Should any Covered Software prove defective in any respect, You (not any - Contributor) assume the cost of any necessary servicing, repair, or - correction. This disclaimer of warranty constitutes an essential part of this - License. No use of any Covered Software is authorized under this License - except under this disclaimer. - -7. Limitation of Liability - - Under no circumstances and under no legal theory, whether tort (including - negligence), contract, or otherwise, shall any Contributor, or anyone who - distributes Covered Software as permitted above, be liable to You for any - direct, indirect, special, incidental, or consequential damages of any - character including, without limitation, damages for lost profits, loss of - goodwill, work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses, even if such party shall have been - informed of the possibility of such damages. This limitation of liability - shall not apply to liability for death or personal injury resulting from such - party’s negligence to the extent applicable law prohibits such limitation. - Some jurisdictions do not allow the exclusion or limitation of incidental or - consequential damages, so this exclusion and limitation may not apply to You. - -8. Litigation - - Any litigation relating to this License may be brought only in the courts of - a jurisdiction where the defendant maintains its principal place of business - and such litigation shall be governed by laws of that jurisdiction, without - reference to its conflict-of-law provisions. Nothing in this Section shall - prevent a party’s ability to bring cross-claims or counter-claims. - -9. Miscellaneous - - This License represents the complete agreement concerning the subject matter - hereof. If any provision of this License is held to be unenforceable, such - provision shall be reformed only to the extent necessary to make it - enforceable. Any law or regulation which provides that the language of a - contract shall be construed against the drafter shall not be used to construe - this License against a Contributor. - - -10. Versions of the License - -10.1. New Versions - - Mozilla Foundation is the license steward. Except as provided in Section - 10.3, no one other than the license steward has the right to modify or - publish new versions of this License. Each version will be given a - distinguishing version number. - -10.2. Effect of New Versions - - You may distribute the Covered Software under the terms of the version of - the License under which You originally received the Covered Software, or - under the terms of any subsequent version published by the license - steward. - -10.3. Modified Versions - - If you create software not governed by this License, and you want to - create a new license for such software, you may create and use a modified - version of this License if you rename the license and remove any - references to the name of the license steward (except to note that such - modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - If You choose to distribute Source Code Form that is Incompatible With - Secondary Licenses under the terms of this version of the License, the - notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the - terms of the Mozilla Public License, v. - 2.0. If a copy of the MPL was not - distributed with this file, You can - obtain one at - http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular file, then -You may include the notice in a location (such as a LICENSE file in a relevant -directory) where a recipient would be likely to look for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is “Incompatible - With Secondary Licenses”, as defined by - the Mozilla Public License, v. 2.0. - diff --git a/vendor/github.com/hashicorp/go-discover/go.mod b/vendor/github.com/hashicorp/go-discover/go.mod index e612d66f5..e4449fc13 100644 --- a/vendor/github.com/hashicorp/go-discover/go.mod +++ b/vendor/github.com/hashicorp/go-discover/go.mod @@ -73,3 +73,5 @@ require ( k8s.io/client-go v8.0.0+incompatible launchpad.net/gocheck v0.0.0-20140225173054-000000000087 // indirect ) + +go 1.13 diff --git a/vendor/github.com/hashicorp/go-discover/go.sum b/vendor/github.com/hashicorp/go-discover/go.sum index 6d0642a9a..53c211b34 100644 --- a/vendor/github.com/hashicorp/go-discover/go.sum +++ b/vendor/github.com/hashicorp/go-discover/go.sum @@ -66,6 +66,8 @@ github.com/jarcoal/httpmock v0.0.0-20180424175123-9c70cfe4a1da h1:FjHUJJ7oBW4G/9 github.com/jarcoal/httpmock v0.0.0-20180424175123-9c70cfe4a1da/go.mod h1:ks+b9deReOc7jgqp+e7LuFiCBH6Rm5hL32cLcEAArb4= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8 h1:12VvqtR6Aowv3l/EQUlocDHW2Cp4G9WJVH7uyH8QFJE= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/joyent/triton-go v0.0.0-20180628001255-830d2b111e62 h1:JHCT6xuyPUrbbgAPE/3dqlvUKzRHMNuTBKKUb6OeR/k= github.com/joyent/triton-go v0.0.0-20180628001255-830d2b111e62/go.mod h1:U+RSyWxWd04xTqnuOQxnai7XGS2PrPY2cfGoDKtMHjA= github.com/json-iterator/go v1.1.5 h1:gL2yXlmiIo4+t+y32d4WGwOjKGYcGOuyrg46vadswDE= diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/applicationgateways.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/applicationgateways.go index dd4757ae8..f02c887e6 100644 --- a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/applicationgateways.go +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/applicationgateways.go @@ -21,6 +21,7 @@ import ( "context" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" "net/http" ) @@ -45,6 +46,16 @@ func NewApplicationGatewaysClientWithBaseURI(baseURI string, subscriptionID stri // applicationGatewayName - the name of the application gateway. // parameters - parameters supplied to the create or update application gateway operation. func (client ApplicationGatewaysClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, applicationGatewayName string, parameters ApplicationGateway) (result ApplicationGatewaysCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, applicationGatewayName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "CreateOrUpdate", nil, "Failure preparing request") @@ -86,15 +97,13 @@ func (client ApplicationGatewaysClient) CreateOrUpdatePreparer(ctx context.Conte // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client ApplicationGatewaysClient) CreateOrUpdateSender(req *http.Request) (future ApplicationGatewaysCreateOrUpdateFuture, err error) { - sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client)) - future.Future = azure.NewFuture(req) - future.req = req - _, err = future.Done(sender) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } - err = autorest.Respond(future.Response(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated)) + future.Future, err = azure.NewFutureFromResponse(resp) return } @@ -116,6 +125,16 @@ func (client ApplicationGatewaysClient) CreateOrUpdateResponder(resp *http.Respo // resourceGroupName - the name of the resource group. // applicationGatewayName - the name of the application gateway. func (client ApplicationGatewaysClient) Delete(ctx context.Context, resourceGroupName string, applicationGatewayName string) (result ApplicationGatewaysDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.DeletePreparer(ctx, resourceGroupName, applicationGatewayName) if err != nil { err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Delete", nil, "Failure preparing request") @@ -155,15 +174,13 @@ func (client ApplicationGatewaysClient) DeletePreparer(ctx context.Context, reso // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client ApplicationGatewaysClient) DeleteSender(req *http.Request) (future ApplicationGatewaysDeleteFuture, err error) { - sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client)) - future.Future = azure.NewFuture(req) - future.req = req - _, err = future.Done(sender) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } - err = autorest.Respond(future.Response(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent)) + future.Future, err = azure.NewFutureFromResponse(resp) return } @@ -184,6 +201,16 @@ func (client ApplicationGatewaysClient) DeleteResponder(resp *http.Response) (re // resourceGroupName - the name of the resource group. // applicationGatewayName - the name of the application gateway. func (client ApplicationGatewaysClient) Get(ctx context.Context, resourceGroupName string, applicationGatewayName string) (result ApplicationGateway, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.GetPreparer(ctx, resourceGroupName, applicationGatewayName) if err != nil { err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Get", nil, "Failure preparing request") @@ -229,8 +256,8 @@ func (client ApplicationGatewaysClient) GetPreparer(ctx context.Context, resourc // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client ApplicationGatewaysClient) GetSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // GetResponder handles the response to the Get request. The method always @@ -250,6 +277,16 @@ func (client ApplicationGatewaysClient) GetResponder(resp *http.Response) (resul // Parameters: // resourceGroupName - the name of the resource group. func (client ApplicationGatewaysClient) List(ctx context.Context, resourceGroupName string) (result ApplicationGatewayListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.List") + defer func() { + sc := -1 + if result.aglr.Response.Response != nil { + sc = result.aglr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.fn = client.listNextResults req, err := client.ListPreparer(ctx, resourceGroupName) if err != nil { @@ -295,8 +332,8 @@ func (client ApplicationGatewaysClient) ListPreparer(ctx context.Context, resour // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client ApplicationGatewaysClient) ListSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListResponder handles the response to the List request. The method always @@ -313,8 +350,8 @@ func (client ApplicationGatewaysClient) ListResponder(resp *http.Response) (resu } // listNextResults retrieves the next set of results, if any. -func (client ApplicationGatewaysClient) listNextResults(lastResults ApplicationGatewayListResult) (result ApplicationGatewayListResult, err error) { - req, err := lastResults.applicationGatewayListResultPreparer() +func (client ApplicationGatewaysClient) listNextResults(ctx context.Context, lastResults ApplicationGatewayListResult) (result ApplicationGatewayListResult, err error) { + req, err := lastResults.applicationGatewayListResultPreparer(ctx) if err != nil { return result, autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "listNextResults", nil, "Failure preparing next results request") } @@ -335,12 +372,32 @@ func (client ApplicationGatewaysClient) listNextResults(lastResults ApplicationG // ListComplete enumerates all values, automatically crossing page boundaries as required. func (client ApplicationGatewaysClient) ListComplete(ctx context.Context, resourceGroupName string) (result ApplicationGatewayListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.page, err = client.List(ctx, resourceGroupName) return } // ListAll gets all the application gateways in a subscription. func (client ApplicationGatewaysClient) ListAll(ctx context.Context) (result ApplicationGatewayListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.ListAll") + defer func() { + sc := -1 + if result.aglr.Response.Response != nil { + sc = result.aglr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.fn = client.listAllNextResults req, err := client.ListAllPreparer(ctx) if err != nil { @@ -385,8 +442,8 @@ func (client ApplicationGatewaysClient) ListAllPreparer(ctx context.Context) (*h // ListAllSender sends the ListAll request. The method will close the // http.Response Body if it receives an error. func (client ApplicationGatewaysClient) ListAllSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListAllResponder handles the response to the ListAll request. The method always @@ -403,8 +460,8 @@ func (client ApplicationGatewaysClient) ListAllResponder(resp *http.Response) (r } // listAllNextResults retrieves the next set of results, if any. -func (client ApplicationGatewaysClient) listAllNextResults(lastResults ApplicationGatewayListResult) (result ApplicationGatewayListResult, err error) { - req, err := lastResults.applicationGatewayListResultPreparer() +func (client ApplicationGatewaysClient) listAllNextResults(ctx context.Context, lastResults ApplicationGatewayListResult) (result ApplicationGatewayListResult, err error) { + req, err := lastResults.applicationGatewayListResultPreparer(ctx) if err != nil { return result, autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "listAllNextResults", nil, "Failure preparing next results request") } @@ -425,6 +482,16 @@ func (client ApplicationGatewaysClient) listAllNextResults(lastResults Applicati // ListAllComplete enumerates all values, automatically crossing page boundaries as required. func (client ApplicationGatewaysClient) ListAllComplete(ctx context.Context) (result ApplicationGatewayListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.ListAll") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.page, err = client.ListAll(ctx) return } @@ -434,6 +501,16 @@ func (client ApplicationGatewaysClient) ListAllComplete(ctx context.Context) (re // resourceGroupName - the name of the resource group. // applicationGatewayName - the name of the application gateway. func (client ApplicationGatewaysClient) Start(ctx context.Context, resourceGroupName string, applicationGatewayName string) (result ApplicationGatewaysStartFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.Start") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.StartPreparer(ctx, resourceGroupName, applicationGatewayName) if err != nil { err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Start", nil, "Failure preparing request") @@ -473,15 +550,13 @@ func (client ApplicationGatewaysClient) StartPreparer(ctx context.Context, resou // StartSender sends the Start request. The method will close the // http.Response Body if it receives an error. func (client ApplicationGatewaysClient) StartSender(req *http.Request) (future ApplicationGatewaysStartFuture, err error) { - sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client)) - future.Future = azure.NewFuture(req) - future.req = req - _, err = future.Done(sender) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } - err = autorest.Respond(future.Response(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted)) + future.Future, err = azure.NewFutureFromResponse(resp) return } @@ -502,6 +577,16 @@ func (client ApplicationGatewaysClient) StartResponder(resp *http.Response) (res // resourceGroupName - the name of the resource group. // applicationGatewayName - the name of the application gateway. func (client ApplicationGatewaysClient) Stop(ctx context.Context, resourceGroupName string, applicationGatewayName string) (result ApplicationGatewaysStopFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.Stop") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.StopPreparer(ctx, resourceGroupName, applicationGatewayName) if err != nil { err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Stop", nil, "Failure preparing request") @@ -541,15 +626,13 @@ func (client ApplicationGatewaysClient) StopPreparer(ctx context.Context, resour // StopSender sends the Stop request. The method will close the // http.Response Body if it receives an error. func (client ApplicationGatewaysClient) StopSender(req *http.Request) (future ApplicationGatewaysStopFuture, err error) { - sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client)) - future.Future = azure.NewFuture(req) - future.req = req - _, err = future.Done(sender) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } - err = autorest.Respond(future.Response(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted)) + future.Future, err = azure.NewFutureFromResponse(resp) return } diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/client.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/client.go index f487b26a8..8a4187006 100644 --- a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/client.go +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/client.go @@ -24,6 +24,7 @@ import ( "context" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" "net/http" ) @@ -59,6 +60,16 @@ func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { // domainNameLabel - the domain name to be verified. It must conform to the following regular expression: // ^[a-z][a-z0-9-]{1,61}[a-z0-9]$. func (client BaseClient) CheckDNSNameAvailability(ctx context.Context, location string, domainNameLabel string) (result DNSNameAvailabilityResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.CheckDNSNameAvailability") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.CheckDNSNameAvailabilityPreparer(ctx, location, domainNameLabel) if err != nil { err = autorest.NewErrorWithError(err, "network.BaseClient", "CheckDNSNameAvailability", nil, "Failure preparing request") @@ -106,8 +117,8 @@ func (client BaseClient) CheckDNSNameAvailabilityPreparer(ctx context.Context, l // CheckDNSNameAvailabilitySender sends the CheckDNSNameAvailability request. The method will close the // http.Response Body if it receives an error. func (client BaseClient) CheckDNSNameAvailabilitySender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // CheckDNSNameAvailabilityResponder handles the response to the CheckDNSNameAvailability request. The method always diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/expressroutecircuitauthorizations.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/expressroutecircuitauthorizations.go index e9b3f1027..52155a321 100644 --- a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/expressroutecircuitauthorizations.go +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/expressroutecircuitauthorizations.go @@ -21,6 +21,7 @@ import ( "context" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" "net/http" ) @@ -49,6 +50,16 @@ func NewExpressRouteCircuitAuthorizationsClientWithBaseURI(baseURI string, subsc // authorizationParameters - parameters supplied to the create or update express route circuit authorization // operation. func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string, authorizationParameters ExpressRouteCircuitAuthorization) (result ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitAuthorizationsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, circuitName, authorizationName, authorizationParameters) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "CreateOrUpdate", nil, "Failure preparing request") @@ -91,15 +102,13 @@ func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdatePreparer(ctx // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture, err error) { - sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client)) - future.Future = azure.NewFuture(req) - future.req = req - _, err = future.Done(sender) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } - err = autorest.Respond(future.Response(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated)) + future.Future, err = azure.NewFutureFromResponse(resp) return } @@ -122,6 +131,16 @@ func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdateResponder(re // circuitName - the name of the express route circuit. // authorizationName - the name of the authorization. func (client ExpressRouteCircuitAuthorizationsClient) Delete(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string) (result ExpressRouteCircuitAuthorizationsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitAuthorizationsClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.DeletePreparer(ctx, resourceGroupName, circuitName, authorizationName) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "Delete", nil, "Failure preparing request") @@ -162,15 +181,13 @@ func (client ExpressRouteCircuitAuthorizationsClient) DeletePreparer(ctx context // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCircuitAuthorizationsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsDeleteFuture, err error) { - sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client)) - future.Future = azure.NewFuture(req) - future.req = req - _, err = future.Done(sender) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } - err = autorest.Respond(future.Response(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent)) + future.Future, err = azure.NewFutureFromResponse(resp) return } @@ -192,6 +209,16 @@ func (client ExpressRouteCircuitAuthorizationsClient) DeleteResponder(resp *http // circuitName - the name of the express route circuit. // authorizationName - the name of the authorization. func (client ExpressRouteCircuitAuthorizationsClient) Get(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string) (result ExpressRouteCircuitAuthorization, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitAuthorizationsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.GetPreparer(ctx, resourceGroupName, circuitName, authorizationName) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "Get", nil, "Failure preparing request") @@ -238,8 +265,8 @@ func (client ExpressRouteCircuitAuthorizationsClient) GetPreparer(ctx context.Co // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCircuitAuthorizationsClient) GetSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // GetResponder handles the response to the Get request. The method always @@ -260,6 +287,16 @@ func (client ExpressRouteCircuitAuthorizationsClient) GetResponder(resp *http.Re // resourceGroupName - the name of the resource group. // circuitName - the name of the circuit. func (client ExpressRouteCircuitAuthorizationsClient) List(ctx context.Context, resourceGroupName string, circuitName string) (result AuthorizationListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitAuthorizationsClient.List") + defer func() { + sc := -1 + if result.alr.Response.Response != nil { + sc = result.alr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.fn = client.listNextResults req, err := client.ListPreparer(ctx, resourceGroupName, circuitName) if err != nil { @@ -306,8 +343,8 @@ func (client ExpressRouteCircuitAuthorizationsClient) ListPreparer(ctx context.C // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCircuitAuthorizationsClient) ListSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListResponder handles the response to the List request. The method always @@ -324,8 +361,8 @@ func (client ExpressRouteCircuitAuthorizationsClient) ListResponder(resp *http.R } // listNextResults retrieves the next set of results, if any. -func (client ExpressRouteCircuitAuthorizationsClient) listNextResults(lastResults AuthorizationListResult) (result AuthorizationListResult, err error) { - req, err := lastResults.authorizationListResultPreparer() +func (client ExpressRouteCircuitAuthorizationsClient) listNextResults(ctx context.Context, lastResults AuthorizationListResult) (result AuthorizationListResult, err error) { + req, err := lastResults.authorizationListResultPreparer(ctx) if err != nil { return result, autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "listNextResults", nil, "Failure preparing next results request") } @@ -346,6 +383,16 @@ func (client ExpressRouteCircuitAuthorizationsClient) listNextResults(lastResult // ListComplete enumerates all values, automatically crossing page boundaries as required. func (client ExpressRouteCircuitAuthorizationsClient) ListComplete(ctx context.Context, resourceGroupName string, circuitName string) (result AuthorizationListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitAuthorizationsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.page, err = client.List(ctx, resourceGroupName, circuitName) return } diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/expressroutecircuitpeerings.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/expressroutecircuitpeerings.go index 84e7d0b2c..81252fe0c 100644 --- a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/expressroutecircuitpeerings.go +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/expressroutecircuitpeerings.go @@ -21,6 +21,7 @@ import ( "context" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" "net/http" ) @@ -46,6 +47,16 @@ func NewExpressRouteCircuitPeeringsClientWithBaseURI(baseURI string, subscriptio // peeringName - the name of the peering. // peeringParameters - parameters supplied to the create or update express route circuit peering operation. func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, peeringParameters ExpressRouteCircuitPeering) (result ExpressRouteCircuitPeeringsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, circuitName, peeringName, peeringParameters) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "CreateOrUpdate", nil, "Failure preparing request") @@ -88,15 +99,13 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdatePreparer(ctx conte // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture, err error) { - sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client)) - future.Future = azure.NewFuture(req) - future.req = req - _, err = future.Done(sender) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } - err = autorest.Respond(future.Response(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated)) + future.Future, err = azure.NewFutureFromResponse(resp) return } @@ -119,6 +128,16 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdateResponder(resp *ht // circuitName - the name of the express route circuit. // peeringName - the name of the peering. func (client ExpressRouteCircuitPeeringsClient) Delete(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (result ExpressRouteCircuitPeeringsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringsClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.DeletePreparer(ctx, resourceGroupName, circuitName, peeringName) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "Delete", nil, "Failure preparing request") @@ -159,15 +178,13 @@ func (client ExpressRouteCircuitPeeringsClient) DeletePreparer(ctx context.Conte // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCircuitPeeringsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitPeeringsDeleteFuture, err error) { - sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client)) - future.Future = azure.NewFuture(req) - future.req = req - _, err = future.Done(sender) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } - err = autorest.Respond(future.Response(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent)) + future.Future, err = azure.NewFutureFromResponse(resp) return } @@ -189,6 +206,16 @@ func (client ExpressRouteCircuitPeeringsClient) DeleteResponder(resp *http.Respo // circuitName - the name of the express route circuit. // peeringName - the name of the peering. func (client ExpressRouteCircuitPeeringsClient) Get(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (result ExpressRouteCircuitPeering, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.GetPreparer(ctx, resourceGroupName, circuitName, peeringName) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "Get", nil, "Failure preparing request") @@ -235,8 +262,8 @@ func (client ExpressRouteCircuitPeeringsClient) GetPreparer(ctx context.Context, // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCircuitPeeringsClient) GetSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // GetResponder handles the response to the Get request. The method always @@ -257,6 +284,16 @@ func (client ExpressRouteCircuitPeeringsClient) GetResponder(resp *http.Response // resourceGroupName - the name of the resource group. // circuitName - the name of the express route circuit. func (client ExpressRouteCircuitPeeringsClient) List(ctx context.Context, resourceGroupName string, circuitName string) (result ExpressRouteCircuitPeeringListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringsClient.List") + defer func() { + sc := -1 + if result.ercplr.Response.Response != nil { + sc = result.ercplr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.fn = client.listNextResults req, err := client.ListPreparer(ctx, resourceGroupName, circuitName) if err != nil { @@ -303,8 +340,8 @@ func (client ExpressRouteCircuitPeeringsClient) ListPreparer(ctx context.Context // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCircuitPeeringsClient) ListSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListResponder handles the response to the List request. The method always @@ -321,8 +358,8 @@ func (client ExpressRouteCircuitPeeringsClient) ListResponder(resp *http.Respons } // listNextResults retrieves the next set of results, if any. -func (client ExpressRouteCircuitPeeringsClient) listNextResults(lastResults ExpressRouteCircuitPeeringListResult) (result ExpressRouteCircuitPeeringListResult, err error) { - req, err := lastResults.expressRouteCircuitPeeringListResultPreparer() +func (client ExpressRouteCircuitPeeringsClient) listNextResults(ctx context.Context, lastResults ExpressRouteCircuitPeeringListResult) (result ExpressRouteCircuitPeeringListResult, err error) { + req, err := lastResults.expressRouteCircuitPeeringListResultPreparer(ctx) if err != nil { return result, autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "listNextResults", nil, "Failure preparing next results request") } @@ -343,6 +380,16 @@ func (client ExpressRouteCircuitPeeringsClient) listNextResults(lastResults Expr // ListComplete enumerates all values, automatically crossing page boundaries as required. func (client ExpressRouteCircuitPeeringsClient) ListComplete(ctx context.Context, resourceGroupName string, circuitName string) (result ExpressRouteCircuitPeeringListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.page, err = client.List(ctx, resourceGroupName, circuitName) return } diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/expressroutecircuits.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/expressroutecircuits.go index 1b6246cad..893e8e468 100644 --- a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/expressroutecircuits.go +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/expressroutecircuits.go @@ -21,6 +21,7 @@ import ( "context" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" "net/http" ) @@ -45,6 +46,16 @@ func NewExpressRouteCircuitsClientWithBaseURI(baseURI string, subscriptionID str // circuitName - the name of the circuit. // parameters - parameters supplied to the create or update express route circuit operation. func (client ExpressRouteCircuitsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, parameters ExpressRouteCircuit) (result ExpressRouteCircuitsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, circuitName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "CreateOrUpdate", nil, "Failure preparing request") @@ -86,15 +97,13 @@ func (client ExpressRouteCircuitsClient) CreateOrUpdatePreparer(ctx context.Cont // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCircuitsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitsCreateOrUpdateFuture, err error) { - sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client)) - future.Future = azure.NewFuture(req) - future.req = req - _, err = future.Done(sender) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } - err = autorest.Respond(future.Response(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated)) + future.Future, err = azure.NewFutureFromResponse(resp) return } @@ -116,6 +125,16 @@ func (client ExpressRouteCircuitsClient) CreateOrUpdateResponder(resp *http.Resp // resourceGroupName - the name of the resource group. // circuitName - the name of the express route circuit. func (client ExpressRouteCircuitsClient) Delete(ctx context.Context, resourceGroupName string, circuitName string) (result ExpressRouteCircuitsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.DeletePreparer(ctx, resourceGroupName, circuitName) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "Delete", nil, "Failure preparing request") @@ -155,15 +174,13 @@ func (client ExpressRouteCircuitsClient) DeletePreparer(ctx context.Context, res // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCircuitsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitsDeleteFuture, err error) { - sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client)) - future.Future = azure.NewFuture(req) - future.req = req - _, err = future.Done(sender) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } - err = autorest.Respond(future.Response(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent)) + future.Future, err = azure.NewFutureFromResponse(resp) return } @@ -184,6 +201,16 @@ func (client ExpressRouteCircuitsClient) DeleteResponder(resp *http.Response) (r // resourceGroupName - the name of the resource group. // circuitName - the name of express route circuit. func (client ExpressRouteCircuitsClient) Get(ctx context.Context, resourceGroupName string, circuitName string) (result ExpressRouteCircuit, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.GetPreparer(ctx, resourceGroupName, circuitName) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "Get", nil, "Failure preparing request") @@ -229,8 +256,8 @@ func (client ExpressRouteCircuitsClient) GetPreparer(ctx context.Context, resour // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCircuitsClient) GetSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // GetResponder handles the response to the Get request. The method always @@ -250,6 +277,16 @@ func (client ExpressRouteCircuitsClient) GetResponder(resp *http.Response) (resu // Parameters: // resourceGroupName - the name of the resource group. func (client ExpressRouteCircuitsClient) List(ctx context.Context, resourceGroupName string) (result ExpressRouteCircuitListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.List") + defer func() { + sc := -1 + if result.erclr.Response.Response != nil { + sc = result.erclr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.fn = client.listNextResults req, err := client.ListPreparer(ctx, resourceGroupName) if err != nil { @@ -295,8 +332,8 @@ func (client ExpressRouteCircuitsClient) ListPreparer(ctx context.Context, resou // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCircuitsClient) ListSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListResponder handles the response to the List request. The method always @@ -313,8 +350,8 @@ func (client ExpressRouteCircuitsClient) ListResponder(resp *http.Response) (res } // listNextResults retrieves the next set of results, if any. -func (client ExpressRouteCircuitsClient) listNextResults(lastResults ExpressRouteCircuitListResult) (result ExpressRouteCircuitListResult, err error) { - req, err := lastResults.expressRouteCircuitListResultPreparer() +func (client ExpressRouteCircuitsClient) listNextResults(ctx context.Context, lastResults ExpressRouteCircuitListResult) (result ExpressRouteCircuitListResult, err error) { + req, err := lastResults.expressRouteCircuitListResultPreparer(ctx) if err != nil { return result, autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "listNextResults", nil, "Failure preparing next results request") } @@ -335,12 +372,32 @@ func (client ExpressRouteCircuitsClient) listNextResults(lastResults ExpressRout // ListComplete enumerates all values, automatically crossing page boundaries as required. func (client ExpressRouteCircuitsClient) ListComplete(ctx context.Context, resourceGroupName string) (result ExpressRouteCircuitListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.page, err = client.List(ctx, resourceGroupName) return } // ListAll gets all the express route circuits in a subscription. func (client ExpressRouteCircuitsClient) ListAll(ctx context.Context) (result ExpressRouteCircuitListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.ListAll") + defer func() { + sc := -1 + if result.erclr.Response.Response != nil { + sc = result.erclr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.fn = client.listAllNextResults req, err := client.ListAllPreparer(ctx) if err != nil { @@ -385,8 +442,8 @@ func (client ExpressRouteCircuitsClient) ListAllPreparer(ctx context.Context) (* // ListAllSender sends the ListAll request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCircuitsClient) ListAllSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListAllResponder handles the response to the ListAll request. The method always @@ -403,8 +460,8 @@ func (client ExpressRouteCircuitsClient) ListAllResponder(resp *http.Response) ( } // listAllNextResults retrieves the next set of results, if any. -func (client ExpressRouteCircuitsClient) listAllNextResults(lastResults ExpressRouteCircuitListResult) (result ExpressRouteCircuitListResult, err error) { - req, err := lastResults.expressRouteCircuitListResultPreparer() +func (client ExpressRouteCircuitsClient) listAllNextResults(ctx context.Context, lastResults ExpressRouteCircuitListResult) (result ExpressRouteCircuitListResult, err error) { + req, err := lastResults.expressRouteCircuitListResultPreparer(ctx) if err != nil { return result, autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "listAllNextResults", nil, "Failure preparing next results request") } @@ -425,16 +482,36 @@ func (client ExpressRouteCircuitsClient) listAllNextResults(lastResults ExpressR // ListAllComplete enumerates all values, automatically crossing page boundaries as required. func (client ExpressRouteCircuitsClient) ListAllComplete(ctx context.Context) (result ExpressRouteCircuitListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.ListAll") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.page, err = client.ListAll(ctx) return } -// ListArpTable the ListArpTable from ExpressRouteCircuit opertion retrieves the currently advertised arp table +// ListArpTable the ListArpTable from ExpressRouteCircuit operation retrieves the currently advertised arp table // associated with the ExpressRouteCircuits in a resource group. // Parameters: // resourceGroupName - the name of the resource group. // circuitName - the name of the circuit. func (client ExpressRouteCircuitsClient) ListArpTable(ctx context.Context, resourceGroupName string, circuitName string) (result ExpressRouteCircuitsArpTableListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.ListArpTable") + defer func() { + sc := -1 + if result.ercatlr.Response.Response != nil { + sc = result.ercatlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.fn = client.listArpTableNextResults req, err := client.ListArpTablePreparer(ctx, resourceGroupName, circuitName) if err != nil { @@ -481,8 +558,8 @@ func (client ExpressRouteCircuitsClient) ListArpTablePreparer(ctx context.Contex // ListArpTableSender sends the ListArpTable request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCircuitsClient) ListArpTableSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListArpTableResponder handles the response to the ListArpTable request. The method always @@ -499,8 +576,8 @@ func (client ExpressRouteCircuitsClient) ListArpTableResponder(resp *http.Respon } // listArpTableNextResults retrieves the next set of results, if any. -func (client ExpressRouteCircuitsClient) listArpTableNextResults(lastResults ExpressRouteCircuitsArpTableListResult) (result ExpressRouteCircuitsArpTableListResult, err error) { - req, err := lastResults.expressRouteCircuitsArpTableListResultPreparer() +func (client ExpressRouteCircuitsClient) listArpTableNextResults(ctx context.Context, lastResults ExpressRouteCircuitsArpTableListResult) (result ExpressRouteCircuitsArpTableListResult, err error) { + req, err := lastResults.expressRouteCircuitsArpTableListResultPreparer(ctx) if err != nil { return result, autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "listArpTableNextResults", nil, "Failure preparing next results request") } @@ -521,16 +598,36 @@ func (client ExpressRouteCircuitsClient) listArpTableNextResults(lastResults Exp // ListArpTableComplete enumerates all values, automatically crossing page boundaries as required. func (client ExpressRouteCircuitsClient) ListArpTableComplete(ctx context.Context, resourceGroupName string, circuitName string) (result ExpressRouteCircuitsArpTableListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.ListArpTable") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.page, err = client.ListArpTable(ctx, resourceGroupName, circuitName) return } -// ListRoutesTable the ListRoutesTable from ExpressRouteCircuit opertion retrieves the currently advertised routes +// ListRoutesTable the ListRoutesTable from ExpressRouteCircuit operation retrieves the currently advertised routes // table associated with the ExpressRouteCircuits in a resource group. // Parameters: // resourceGroupName - the name of the resource group. // circuitName - the name of the circuit. func (client ExpressRouteCircuitsClient) ListRoutesTable(ctx context.Context, resourceGroupName string, circuitName string) (result ExpressRouteCircuitsRoutesTableListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.ListRoutesTable") + defer func() { + sc := -1 + if result.ercrtlr.Response.Response != nil { + sc = result.ercrtlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.fn = client.listRoutesTableNextResults req, err := client.ListRoutesTablePreparer(ctx, resourceGroupName, circuitName) if err != nil { @@ -577,8 +674,8 @@ func (client ExpressRouteCircuitsClient) ListRoutesTablePreparer(ctx context.Con // ListRoutesTableSender sends the ListRoutesTable request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCircuitsClient) ListRoutesTableSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListRoutesTableResponder handles the response to the ListRoutesTable request. The method always @@ -595,8 +692,8 @@ func (client ExpressRouteCircuitsClient) ListRoutesTableResponder(resp *http.Res } // listRoutesTableNextResults retrieves the next set of results, if any. -func (client ExpressRouteCircuitsClient) listRoutesTableNextResults(lastResults ExpressRouteCircuitsRoutesTableListResult) (result ExpressRouteCircuitsRoutesTableListResult, err error) { - req, err := lastResults.expressRouteCircuitsRoutesTableListResultPreparer() +func (client ExpressRouteCircuitsClient) listRoutesTableNextResults(ctx context.Context, lastResults ExpressRouteCircuitsRoutesTableListResult) (result ExpressRouteCircuitsRoutesTableListResult, err error) { + req, err := lastResults.expressRouteCircuitsRoutesTableListResultPreparer(ctx) if err != nil { return result, autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "listRoutesTableNextResults", nil, "Failure preparing next results request") } @@ -617,16 +714,36 @@ func (client ExpressRouteCircuitsClient) listRoutesTableNextResults(lastResults // ListRoutesTableComplete enumerates all values, automatically crossing page boundaries as required. func (client ExpressRouteCircuitsClient) ListRoutesTableComplete(ctx context.Context, resourceGroupName string, circuitName string) (result ExpressRouteCircuitsRoutesTableListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.ListRoutesTable") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.page, err = client.ListRoutesTable(ctx, resourceGroupName, circuitName) return } -// ListStats the Liststats ExpressRouteCircuit opertion retrieves all the stats from a ExpressRouteCircuits in a +// ListStats the ListStats ExpressRouteCircuit operation retrieves all the stats from a ExpressRouteCircuits in a // resource group. // Parameters: // resourceGroupName - the name of the resource group. // circuitName - the name of the loadBalancer. func (client ExpressRouteCircuitsClient) ListStats(ctx context.Context, resourceGroupName string, circuitName string) (result ExpressRouteCircuitsStatsListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.ListStats") + defer func() { + sc := -1 + if result.ercslr.Response.Response != nil { + sc = result.ercslr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.fn = client.listStatsNextResults req, err := client.ListStatsPreparer(ctx, resourceGroupName, circuitName) if err != nil { @@ -673,8 +790,8 @@ func (client ExpressRouteCircuitsClient) ListStatsPreparer(ctx context.Context, // ListStatsSender sends the ListStats request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCircuitsClient) ListStatsSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListStatsResponder handles the response to the ListStats request. The method always @@ -691,8 +808,8 @@ func (client ExpressRouteCircuitsClient) ListStatsResponder(resp *http.Response) } // listStatsNextResults retrieves the next set of results, if any. -func (client ExpressRouteCircuitsClient) listStatsNextResults(lastResults ExpressRouteCircuitsStatsListResult) (result ExpressRouteCircuitsStatsListResult, err error) { - req, err := lastResults.expressRouteCircuitsStatsListResultPreparer() +func (client ExpressRouteCircuitsClient) listStatsNextResults(ctx context.Context, lastResults ExpressRouteCircuitsStatsListResult) (result ExpressRouteCircuitsStatsListResult, err error) { + req, err := lastResults.expressRouteCircuitsStatsListResultPreparer(ctx) if err != nil { return result, autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "listStatsNextResults", nil, "Failure preparing next results request") } @@ -713,6 +830,16 @@ func (client ExpressRouteCircuitsClient) listStatsNextResults(lastResults Expres // ListStatsComplete enumerates all values, automatically crossing page boundaries as required. func (client ExpressRouteCircuitsClient) ListStatsComplete(ctx context.Context, resourceGroupName string, circuitName string) (result ExpressRouteCircuitsStatsListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.ListStats") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.page, err = client.ListStats(ctx, resourceGroupName, circuitName) return } diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/expressrouteserviceproviders.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/expressrouteserviceproviders.go index 612452ba3..680b36c91 100644 --- a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/expressrouteserviceproviders.go +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/expressrouteserviceproviders.go @@ -21,6 +21,7 @@ import ( "context" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" "net/http" ) @@ -42,6 +43,16 @@ func NewExpressRouteServiceProvidersClientWithBaseURI(baseURI string, subscripti // List gets all the available express route service providers. func (client ExpressRouteServiceProvidersClient) List(ctx context.Context) (result ExpressRouteServiceProviderListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProvidersClient.List") + defer func() { + sc := -1 + if result.ersplr.Response.Response != nil { + sc = result.ersplr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.fn = client.listNextResults req, err := client.ListPreparer(ctx) if err != nil { @@ -86,8 +97,8 @@ func (client ExpressRouteServiceProvidersClient) ListPreparer(ctx context.Contex // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteServiceProvidersClient) ListSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListResponder handles the response to the List request. The method always @@ -104,8 +115,8 @@ func (client ExpressRouteServiceProvidersClient) ListResponder(resp *http.Respon } // listNextResults retrieves the next set of results, if any. -func (client ExpressRouteServiceProvidersClient) listNextResults(lastResults ExpressRouteServiceProviderListResult) (result ExpressRouteServiceProviderListResult, err error) { - req, err := lastResults.expressRouteServiceProviderListResultPreparer() +func (client ExpressRouteServiceProvidersClient) listNextResults(ctx context.Context, lastResults ExpressRouteServiceProviderListResult) (result ExpressRouteServiceProviderListResult, err error) { + req, err := lastResults.expressRouteServiceProviderListResultPreparer(ctx) if err != nil { return result, autorest.NewErrorWithError(err, "network.ExpressRouteServiceProvidersClient", "listNextResults", nil, "Failure preparing next results request") } @@ -126,6 +137,16 @@ func (client ExpressRouteServiceProvidersClient) listNextResults(lastResults Exp // ListComplete enumerates all values, automatically crossing page boundaries as required. func (client ExpressRouteServiceProvidersClient) ListComplete(ctx context.Context) (result ExpressRouteServiceProviderListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProvidersClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.page, err = client.List(ctx) return } diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/interfaces.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/interfacesgroup.go similarity index 84% rename from vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/interfaces.go rename to vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/interfacesgroup.go index f989d7bc7..cef9933f5 100644 --- a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/interfaces.go +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/interfacesgroup.go @@ -21,6 +21,7 @@ import ( "context" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" "net/http" ) @@ -45,6 +46,16 @@ func NewInterfacesClientWithBaseURI(baseURI string, subscriptionID string) Inter // networkInterfaceName - the name of the network interface. // parameters - parameters supplied to the create or update network interface operation. func (client InterfacesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkInterfaceName string, parameters Interface) (result InterfacesCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, networkInterfaceName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "network.InterfacesClient", "CreateOrUpdate", nil, "Failure preparing request") @@ -86,15 +97,13 @@ func (client InterfacesClient) CreateOrUpdatePreparer(ctx context.Context, resou // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client InterfacesClient) CreateOrUpdateSender(req *http.Request) (future InterfacesCreateOrUpdateFuture, err error) { - sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client)) - future.Future = azure.NewFuture(req) - future.req = req - _, err = future.Done(sender) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } - err = autorest.Respond(future.Response(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated)) + future.Future, err = azure.NewFutureFromResponse(resp) return } @@ -116,6 +125,16 @@ func (client InterfacesClient) CreateOrUpdateResponder(resp *http.Response) (res // resourceGroupName - the name of the resource group. // networkInterfaceName - the name of the network interface. func (client InterfacesClient) Delete(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result InterfacesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.DeletePreparer(ctx, resourceGroupName, networkInterfaceName) if err != nil { err = autorest.NewErrorWithError(err, "network.InterfacesClient", "Delete", nil, "Failure preparing request") @@ -155,15 +174,13 @@ func (client InterfacesClient) DeletePreparer(ctx context.Context, resourceGroup // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client InterfacesClient) DeleteSender(req *http.Request) (future InterfacesDeleteFuture, err error) { - sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client)) - future.Future = azure.NewFuture(req) - future.req = req - _, err = future.Done(sender) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } - err = autorest.Respond(future.Response(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent)) + future.Future, err = azure.NewFutureFromResponse(resp) return } @@ -185,6 +202,16 @@ func (client InterfacesClient) DeleteResponder(resp *http.Response) (result auto // networkInterfaceName - the name of the network interface. // expand - expands referenced resources. func (client InterfacesClient) Get(ctx context.Context, resourceGroupName string, networkInterfaceName string, expand string) (result Interface, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.GetPreparer(ctx, resourceGroupName, networkInterfaceName, expand) if err != nil { err = autorest.NewErrorWithError(err, "network.InterfacesClient", "Get", nil, "Failure preparing request") @@ -233,8 +260,8 @@ func (client InterfacesClient) GetPreparer(ctx context.Context, resourceGroupNam // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client InterfacesClient) GetSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // GetResponder handles the response to the Get request. The method always @@ -258,6 +285,16 @@ func (client InterfacesClient) GetResponder(resp *http.Response) (result Interfa // networkInterfaceName - the name of the network interface. // expand - expands referenced resources. func (client InterfacesClient) GetVirtualMachineScaleSetNetworkInterface(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, expand string) (result Interface, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.GetVirtualMachineScaleSetNetworkInterface") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.GetVirtualMachineScaleSetNetworkInterfacePreparer(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand) if err != nil { err = autorest.NewErrorWithError(err, "network.InterfacesClient", "GetVirtualMachineScaleSetNetworkInterface", nil, "Failure preparing request") @@ -308,8 +345,8 @@ func (client InterfacesClient) GetVirtualMachineScaleSetNetworkInterfacePreparer // GetVirtualMachineScaleSetNetworkInterfaceSender sends the GetVirtualMachineScaleSetNetworkInterface request. The method will close the // http.Response Body if it receives an error. func (client InterfacesClient) GetVirtualMachineScaleSetNetworkInterfaceSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // GetVirtualMachineScaleSetNetworkInterfaceResponder handles the response to the GetVirtualMachineScaleSetNetworkInterface request. The method always @@ -329,6 +366,16 @@ func (client InterfacesClient) GetVirtualMachineScaleSetNetworkInterfaceResponde // Parameters: // resourceGroupName - the name of the resource group. func (client InterfacesClient) List(ctx context.Context, resourceGroupName string) (result InterfaceListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.List") + defer func() { + sc := -1 + if result.ilr.Response.Response != nil { + sc = result.ilr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.fn = client.listNextResults req, err := client.ListPreparer(ctx, resourceGroupName) if err != nil { @@ -374,8 +421,8 @@ func (client InterfacesClient) ListPreparer(ctx context.Context, resourceGroupNa // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client InterfacesClient) ListSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListResponder handles the response to the List request. The method always @@ -392,8 +439,8 @@ func (client InterfacesClient) ListResponder(resp *http.Response) (result Interf } // listNextResults retrieves the next set of results, if any. -func (client InterfacesClient) listNextResults(lastResults InterfaceListResult) (result InterfaceListResult, err error) { - req, err := lastResults.interfaceListResultPreparer() +func (client InterfacesClient) listNextResults(ctx context.Context, lastResults InterfaceListResult) (result InterfaceListResult, err error) { + req, err := lastResults.interfaceListResultPreparer(ctx) if err != nil { return result, autorest.NewErrorWithError(err, "network.InterfacesClient", "listNextResults", nil, "Failure preparing next results request") } @@ -414,12 +461,32 @@ func (client InterfacesClient) listNextResults(lastResults InterfaceListResult) // ListComplete enumerates all values, automatically crossing page boundaries as required. func (client InterfacesClient) ListComplete(ctx context.Context, resourceGroupName string) (result InterfaceListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.page, err = client.List(ctx, resourceGroupName) return } // ListAll gets all network interfaces in a subscription. func (client InterfacesClient) ListAll(ctx context.Context) (result InterfaceListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.ListAll") + defer func() { + sc := -1 + if result.ilr.Response.Response != nil { + sc = result.ilr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.fn = client.listAllNextResults req, err := client.ListAllPreparer(ctx) if err != nil { @@ -464,8 +531,8 @@ func (client InterfacesClient) ListAllPreparer(ctx context.Context) (*http.Reque // ListAllSender sends the ListAll request. The method will close the // http.Response Body if it receives an error. func (client InterfacesClient) ListAllSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListAllResponder handles the response to the ListAll request. The method always @@ -482,8 +549,8 @@ func (client InterfacesClient) ListAllResponder(resp *http.Response) (result Int } // listAllNextResults retrieves the next set of results, if any. -func (client InterfacesClient) listAllNextResults(lastResults InterfaceListResult) (result InterfaceListResult, err error) { - req, err := lastResults.interfaceListResultPreparer() +func (client InterfacesClient) listAllNextResults(ctx context.Context, lastResults InterfaceListResult) (result InterfaceListResult, err error) { + req, err := lastResults.interfaceListResultPreparer(ctx) if err != nil { return result, autorest.NewErrorWithError(err, "network.InterfacesClient", "listAllNextResults", nil, "Failure preparing next results request") } @@ -504,6 +571,16 @@ func (client InterfacesClient) listAllNextResults(lastResults InterfaceListResul // ListAllComplete enumerates all values, automatically crossing page boundaries as required. func (client InterfacesClient) ListAllComplete(ctx context.Context) (result InterfaceListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.ListAll") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.page, err = client.ListAll(ctx) return } @@ -513,6 +590,16 @@ func (client InterfacesClient) ListAllComplete(ctx context.Context) (result Inte // resourceGroupName - the name of the resource group. // virtualMachineScaleSetName - the name of the virtual machine scale set. func (client InterfacesClient) ListVirtualMachineScaleSetNetworkInterfaces(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string) (result InterfaceListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.ListVirtualMachineScaleSetNetworkInterfaces") + defer func() { + sc := -1 + if result.ilr.Response.Response != nil { + sc = result.ilr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.fn = client.listVirtualMachineScaleSetNetworkInterfacesNextResults req, err := client.ListVirtualMachineScaleSetNetworkInterfacesPreparer(ctx, resourceGroupName, virtualMachineScaleSetName) if err != nil { @@ -559,8 +646,8 @@ func (client InterfacesClient) ListVirtualMachineScaleSetNetworkInterfacesPrepar // ListVirtualMachineScaleSetNetworkInterfacesSender sends the ListVirtualMachineScaleSetNetworkInterfaces request. The method will close the // http.Response Body if it receives an error. func (client InterfacesClient) ListVirtualMachineScaleSetNetworkInterfacesSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListVirtualMachineScaleSetNetworkInterfacesResponder handles the response to the ListVirtualMachineScaleSetNetworkInterfaces request. The method always @@ -577,8 +664,8 @@ func (client InterfacesClient) ListVirtualMachineScaleSetNetworkInterfacesRespon } // listVirtualMachineScaleSetNetworkInterfacesNextResults retrieves the next set of results, if any. -func (client InterfacesClient) listVirtualMachineScaleSetNetworkInterfacesNextResults(lastResults InterfaceListResult) (result InterfaceListResult, err error) { - req, err := lastResults.interfaceListResultPreparer() +func (client InterfacesClient) listVirtualMachineScaleSetNetworkInterfacesNextResults(ctx context.Context, lastResults InterfaceListResult) (result InterfaceListResult, err error) { + req, err := lastResults.interfaceListResultPreparer(ctx) if err != nil { return result, autorest.NewErrorWithError(err, "network.InterfacesClient", "listVirtualMachineScaleSetNetworkInterfacesNextResults", nil, "Failure preparing next results request") } @@ -599,6 +686,16 @@ func (client InterfacesClient) listVirtualMachineScaleSetNetworkInterfacesNextRe // ListVirtualMachineScaleSetNetworkInterfacesComplete enumerates all values, automatically crossing page boundaries as required. func (client InterfacesClient) ListVirtualMachineScaleSetNetworkInterfacesComplete(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string) (result InterfaceListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.ListVirtualMachineScaleSetNetworkInterfaces") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.page, err = client.ListVirtualMachineScaleSetNetworkInterfaces(ctx, resourceGroupName, virtualMachineScaleSetName) return } @@ -610,6 +707,16 @@ func (client InterfacesClient) ListVirtualMachineScaleSetNetworkInterfacesComple // virtualMachineScaleSetName - the name of the virtual machine scale set. // virtualmachineIndex - the virtual machine index. func (client InterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfaces(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string) (result InterfaceListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.ListVirtualMachineScaleSetVMNetworkInterfaces") + defer func() { + sc := -1 + if result.ilr.Response.Response != nil { + sc = result.ilr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.fn = client.listVirtualMachineScaleSetVMNetworkInterfacesNextResults req, err := client.ListVirtualMachineScaleSetVMNetworkInterfacesPreparer(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex) if err != nil { @@ -657,8 +764,8 @@ func (client InterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfacesPrep // ListVirtualMachineScaleSetVMNetworkInterfacesSender sends the ListVirtualMachineScaleSetVMNetworkInterfaces request. The method will close the // http.Response Body if it receives an error. func (client InterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfacesSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListVirtualMachineScaleSetVMNetworkInterfacesResponder handles the response to the ListVirtualMachineScaleSetVMNetworkInterfaces request. The method always @@ -675,8 +782,8 @@ func (client InterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfacesResp } // listVirtualMachineScaleSetVMNetworkInterfacesNextResults retrieves the next set of results, if any. -func (client InterfacesClient) listVirtualMachineScaleSetVMNetworkInterfacesNextResults(lastResults InterfaceListResult) (result InterfaceListResult, err error) { - req, err := lastResults.interfaceListResultPreparer() +func (client InterfacesClient) listVirtualMachineScaleSetVMNetworkInterfacesNextResults(ctx context.Context, lastResults InterfaceListResult) (result InterfaceListResult, err error) { + req, err := lastResults.interfaceListResultPreparer(ctx) if err != nil { return result, autorest.NewErrorWithError(err, "network.InterfacesClient", "listVirtualMachineScaleSetVMNetworkInterfacesNextResults", nil, "Failure preparing next results request") } @@ -697,6 +804,16 @@ func (client InterfacesClient) listVirtualMachineScaleSetVMNetworkInterfacesNext // ListVirtualMachineScaleSetVMNetworkInterfacesComplete enumerates all values, automatically crossing page boundaries as required. func (client InterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfacesComplete(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string) (result InterfaceListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.ListVirtualMachineScaleSetVMNetworkInterfaces") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.page, err = client.ListVirtualMachineScaleSetVMNetworkInterfaces(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex) return } diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/loadbalancers.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/loadbalancers.go index c2f0b9768..200eeea9c 100644 --- a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/loadbalancers.go +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/loadbalancers.go @@ -21,6 +21,7 @@ import ( "context" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" "net/http" ) @@ -45,6 +46,16 @@ func NewLoadBalancersClientWithBaseURI(baseURI string, subscriptionID string) Lo // loadBalancerName - the name of the load balancer. // parameters - parameters supplied to the create or update load balancer operation. func (client LoadBalancersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters LoadBalancer) (result LoadBalancersCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancersClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, loadBalancerName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "CreateOrUpdate", nil, "Failure preparing request") @@ -86,15 +97,13 @@ func (client LoadBalancersClient) CreateOrUpdatePreparer(ctx context.Context, re // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client LoadBalancersClient) CreateOrUpdateSender(req *http.Request) (future LoadBalancersCreateOrUpdateFuture, err error) { - sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client)) - future.Future = azure.NewFuture(req) - future.req = req - _, err = future.Done(sender) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } - err = autorest.Respond(future.Response(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated)) + future.Future, err = azure.NewFutureFromResponse(resp) return } @@ -116,6 +125,16 @@ func (client LoadBalancersClient) CreateOrUpdateResponder(resp *http.Response) ( // resourceGroupName - the name of the resource group. // loadBalancerName - the name of the load balancer. func (client LoadBalancersClient) Delete(ctx context.Context, resourceGroupName string, loadBalancerName string) (result LoadBalancersDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancersClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.DeletePreparer(ctx, resourceGroupName, loadBalancerName) if err != nil { err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "Delete", nil, "Failure preparing request") @@ -155,15 +174,13 @@ func (client LoadBalancersClient) DeletePreparer(ctx context.Context, resourceGr // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client LoadBalancersClient) DeleteSender(req *http.Request) (future LoadBalancersDeleteFuture, err error) { - sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client)) - future.Future = azure.NewFuture(req) - future.req = req - _, err = future.Done(sender) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } - err = autorest.Respond(future.Response(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent)) + future.Future, err = azure.NewFutureFromResponse(resp) return } @@ -185,6 +202,16 @@ func (client LoadBalancersClient) DeleteResponder(resp *http.Response) (result a // loadBalancerName - the name of the load balancer. // expand - expands referenced resources. func (client LoadBalancersClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, expand string) (result LoadBalancer, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancersClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.GetPreparer(ctx, resourceGroupName, loadBalancerName, expand) if err != nil { err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "Get", nil, "Failure preparing request") @@ -233,8 +260,8 @@ func (client LoadBalancersClient) GetPreparer(ctx context.Context, resourceGroup // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client LoadBalancersClient) GetSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // GetResponder handles the response to the Get request. The method always @@ -254,6 +281,16 @@ func (client LoadBalancersClient) GetResponder(resp *http.Response) (result Load // Parameters: // resourceGroupName - the name of the resource group. func (client LoadBalancersClient) List(ctx context.Context, resourceGroupName string) (result LoadBalancerListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancersClient.List") + defer func() { + sc := -1 + if result.lblr.Response.Response != nil { + sc = result.lblr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.fn = client.listNextResults req, err := client.ListPreparer(ctx, resourceGroupName) if err != nil { @@ -299,8 +336,8 @@ func (client LoadBalancersClient) ListPreparer(ctx context.Context, resourceGrou // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client LoadBalancersClient) ListSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListResponder handles the response to the List request. The method always @@ -317,8 +354,8 @@ func (client LoadBalancersClient) ListResponder(resp *http.Response) (result Loa } // listNextResults retrieves the next set of results, if any. -func (client LoadBalancersClient) listNextResults(lastResults LoadBalancerListResult) (result LoadBalancerListResult, err error) { - req, err := lastResults.loadBalancerListResultPreparer() +func (client LoadBalancersClient) listNextResults(ctx context.Context, lastResults LoadBalancerListResult) (result LoadBalancerListResult, err error) { + req, err := lastResults.loadBalancerListResultPreparer(ctx) if err != nil { return result, autorest.NewErrorWithError(err, "network.LoadBalancersClient", "listNextResults", nil, "Failure preparing next results request") } @@ -339,12 +376,32 @@ func (client LoadBalancersClient) listNextResults(lastResults LoadBalancerListRe // ListComplete enumerates all values, automatically crossing page boundaries as required. func (client LoadBalancersClient) ListComplete(ctx context.Context, resourceGroupName string) (result LoadBalancerListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancersClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.page, err = client.List(ctx, resourceGroupName) return } // ListAll gets all the load balancers in a subscription. func (client LoadBalancersClient) ListAll(ctx context.Context) (result LoadBalancerListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancersClient.ListAll") + defer func() { + sc := -1 + if result.lblr.Response.Response != nil { + sc = result.lblr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.fn = client.listAllNextResults req, err := client.ListAllPreparer(ctx) if err != nil { @@ -389,8 +446,8 @@ func (client LoadBalancersClient) ListAllPreparer(ctx context.Context) (*http.Re // ListAllSender sends the ListAll request. The method will close the // http.Response Body if it receives an error. func (client LoadBalancersClient) ListAllSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListAllResponder handles the response to the ListAll request. The method always @@ -407,8 +464,8 @@ func (client LoadBalancersClient) ListAllResponder(resp *http.Response) (result } // listAllNextResults retrieves the next set of results, if any. -func (client LoadBalancersClient) listAllNextResults(lastResults LoadBalancerListResult) (result LoadBalancerListResult, err error) { - req, err := lastResults.loadBalancerListResultPreparer() +func (client LoadBalancersClient) listAllNextResults(ctx context.Context, lastResults LoadBalancerListResult) (result LoadBalancerListResult, err error) { + req, err := lastResults.loadBalancerListResultPreparer(ctx) if err != nil { return result, autorest.NewErrorWithError(err, "network.LoadBalancersClient", "listAllNextResults", nil, "Failure preparing next results request") } @@ -429,6 +486,16 @@ func (client LoadBalancersClient) listAllNextResults(lastResults LoadBalancerLis // ListAllComplete enumerates all values, automatically crossing page boundaries as required. func (client LoadBalancersClient) ListAllComplete(ctx context.Context) (result LoadBalancerListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancersClient.ListAll") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.page, err = client.ListAll(ctx) return } diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/localnetworkgateways.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/localnetworkgateways.go index 4e7d86fcc..7806579d1 100644 --- a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/localnetworkgateways.go +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/localnetworkgateways.go @@ -21,6 +21,7 @@ import ( "context" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" "net/http" ) @@ -45,6 +46,16 @@ func NewLocalNetworkGatewaysClientWithBaseURI(baseURI string, subscriptionID str // localNetworkGatewayName - the name of the local network gateway. // parameters - parameters supplied to the create or update local network gateway operation. func (client LocalNetworkGatewaysClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, parameters LocalNetworkGateway) (result LocalNetworkGatewaysCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewaysClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, localNetworkGatewayName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "CreateOrUpdate", nil, "Failure preparing request") @@ -86,15 +97,13 @@ func (client LocalNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Cont // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client LocalNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future LocalNetworkGatewaysCreateOrUpdateFuture, err error) { - sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client)) - future.Future = azure.NewFuture(req) - future.req = req - _, err = future.Done(sender) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } - err = autorest.Respond(future.Response(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated)) + future.Future, err = azure.NewFutureFromResponse(resp) return } @@ -116,6 +125,16 @@ func (client LocalNetworkGatewaysClient) CreateOrUpdateResponder(resp *http.Resp // resourceGroupName - the name of the resource group. // localNetworkGatewayName - the name of the local network gateway. func (client LocalNetworkGatewaysClient) Delete(ctx context.Context, resourceGroupName string, localNetworkGatewayName string) (result LocalNetworkGatewaysDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewaysClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.DeletePreparer(ctx, resourceGroupName, localNetworkGatewayName) if err != nil { err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "Delete", nil, "Failure preparing request") @@ -155,15 +174,13 @@ func (client LocalNetworkGatewaysClient) DeletePreparer(ctx context.Context, res // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client LocalNetworkGatewaysClient) DeleteSender(req *http.Request) (future LocalNetworkGatewaysDeleteFuture, err error) { - sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client)) - future.Future = azure.NewFuture(req) - future.req = req - _, err = future.Done(sender) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } - err = autorest.Respond(future.Response(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent)) + future.Future, err = azure.NewFutureFromResponse(resp) return } @@ -184,6 +201,16 @@ func (client LocalNetworkGatewaysClient) DeleteResponder(resp *http.Response) (r // resourceGroupName - the name of the resource group. // localNetworkGatewayName - the name of the local network gateway. func (client LocalNetworkGatewaysClient) Get(ctx context.Context, resourceGroupName string, localNetworkGatewayName string) (result LocalNetworkGateway, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewaysClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.GetPreparer(ctx, resourceGroupName, localNetworkGatewayName) if err != nil { err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "Get", nil, "Failure preparing request") @@ -229,8 +256,8 @@ func (client LocalNetworkGatewaysClient) GetPreparer(ctx context.Context, resour // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client LocalNetworkGatewaysClient) GetSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // GetResponder handles the response to the Get request. The method always @@ -250,6 +277,16 @@ func (client LocalNetworkGatewaysClient) GetResponder(resp *http.Response) (resu // Parameters: // resourceGroupName - the name of the resource group. func (client LocalNetworkGatewaysClient) List(ctx context.Context, resourceGroupName string) (result LocalNetworkGatewayListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewaysClient.List") + defer func() { + sc := -1 + if result.lnglr.Response.Response != nil { + sc = result.lnglr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.fn = client.listNextResults req, err := client.ListPreparer(ctx, resourceGroupName) if err != nil { @@ -295,8 +332,8 @@ func (client LocalNetworkGatewaysClient) ListPreparer(ctx context.Context, resou // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client LocalNetworkGatewaysClient) ListSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListResponder handles the response to the List request. The method always @@ -313,8 +350,8 @@ func (client LocalNetworkGatewaysClient) ListResponder(resp *http.Response) (res } // listNextResults retrieves the next set of results, if any. -func (client LocalNetworkGatewaysClient) listNextResults(lastResults LocalNetworkGatewayListResult) (result LocalNetworkGatewayListResult, err error) { - req, err := lastResults.localNetworkGatewayListResultPreparer() +func (client LocalNetworkGatewaysClient) listNextResults(ctx context.Context, lastResults LocalNetworkGatewayListResult) (result LocalNetworkGatewayListResult, err error) { + req, err := lastResults.localNetworkGatewayListResultPreparer(ctx) if err != nil { return result, autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "listNextResults", nil, "Failure preparing next results request") } @@ -335,6 +372,16 @@ func (client LocalNetworkGatewaysClient) listNextResults(lastResults LocalNetwor // ListComplete enumerates all values, automatically crossing page boundaries as required. func (client LocalNetworkGatewaysClient) ListComplete(ctx context.Context, resourceGroupName string) (result LocalNetworkGatewayListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewaysClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.page, err = client.List(ctx, resourceGroupName) return } diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/models.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/models.go index 4efbedb85..71e378c5d 100644 --- a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/models.go +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/models.go @@ -18,13 +18,18 @@ package network // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( + "context" "encoding/json" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/autorest/to" + "github.com/Azure/go-autorest/tracing" "net/http" ) +// The package's fully qualified name. +const fqdn = "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network" + // ApplicationGatewayCookieBasedAffinity enumerates the values for application gateway cookie based affinity. type ApplicationGatewayCookieBasedAffinity string @@ -500,8 +505,8 @@ func PossibleVpnTypeValues() []VpnType { return []VpnType{PolicyBased, RouteBased} } -// AddressSpace addressSpace contains an array of IP address ranges that can be used by subnets of the virtual -// network. +// AddressSpace addressSpace contains an array of IP address ranges that can be used by subnets of the +// virtual network. type AddressSpace struct { // AddressPrefixes - A list of address blocks reserved for this virtual network in CIDR notation. AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` @@ -515,9 +520,9 @@ type ApplicationGateway struct { Etag *string `json:"etag,omitempty"` // ID - Resource Identifier. ID *string `json:"id,omitempty"` - // Name - Resource name. + // Name - READ-ONLY; Resource name. Name *string `json:"name,omitempty"` - // Type - Resource type. + // Type - READ-ONLY; Resource type. Type *string `json:"type,omitempty"` // Location - Resource location. Location *string `json:"location,omitempty"` @@ -537,12 +542,6 @@ func (ag ApplicationGateway) MarshalJSON() ([]byte, error) { if ag.ID != nil { objectMap["id"] = ag.ID } - if ag.Name != nil { - objectMap["name"] = ag.Name - } - if ag.Type != nil { - objectMap["type"] = ag.Type - } if ag.Location != nil { objectMap["location"] = ag.Location } @@ -718,8 +717,8 @@ func (agbap *ApplicationGatewayBackendAddressPool) UnmarshalJSON(body []byte) er return nil } -// ApplicationGatewayBackendAddressPoolPropertiesFormat properties of Backend Address Pool of an application -// gateway. +// ApplicationGatewayBackendAddressPoolPropertiesFormat properties of Backend Address Pool of an +// application gateway. type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { // BackendIPConfigurations - Collection of references to IPs defined in network interfaces. BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` @@ -1107,8 +1106,8 @@ type ApplicationGatewayHTTPListenerPropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// ApplicationGatewayIPConfiguration IP configuration of an application gateway. Currently 1 public and 1 private -// IP configuration is allowed. +// ApplicationGatewayIPConfiguration IP configuration of an application gateway. Currently 1 public and 1 +// private IP configuration is allowed. type ApplicationGatewayIPConfiguration struct { *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource. @@ -1188,7 +1187,8 @@ func (agic *ApplicationGatewayIPConfiguration) UnmarshalJSON(body []byte) error return nil } -// ApplicationGatewayIPConfigurationPropertiesFormat properties of IP configuration of an application gateway. +// ApplicationGatewayIPConfigurationPropertiesFormat properties of IP configuration of an application +// gateway. type ApplicationGatewayIPConfigurationPropertiesFormat struct { // Subnet - Reference of the subnet resource. A subnet from where application gateway gets its private address. Subnet *SubResource `json:"subnet,omitempty"` @@ -1211,14 +1211,24 @@ type ApplicationGatewayListResultIterator struct { page ApplicationGatewayListResultPage } -// Next advances to the next value. If there was an error making +// NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *ApplicationGatewayListResultIterator) Next() error { +func (iter *ApplicationGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } iter.i++ if iter.i < len(iter.page.Values()) { return nil } - err := iter.page.Next() + err = iter.page.NextWithContext(ctx) if err != nil { iter.i-- return err @@ -1227,6 +1237,13 @@ func (iter *ApplicationGatewayListResultIterator) Next() error { return nil } +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ApplicationGatewayListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + // NotDone returns true if the enumeration should be started or is not yet complete. func (iter ApplicationGatewayListResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) @@ -1246,6 +1263,11 @@ func (iter ApplicationGatewayListResultIterator) Value() ApplicationGateway { return iter.page.Values()[iter.i] } +// Creates a new instance of the ApplicationGatewayListResultIterator type. +func NewApplicationGatewayListResultIterator(page ApplicationGatewayListResultPage) ApplicationGatewayListResultIterator { + return ApplicationGatewayListResultIterator{page: page} +} + // IsEmpty returns true if the ListResult contains no values. func (aglr ApplicationGatewayListResult) IsEmpty() bool { return aglr.Value == nil || len(*aglr.Value) == 0 @@ -1253,11 +1275,11 @@ func (aglr ApplicationGatewayListResult) IsEmpty() bool { // applicationGatewayListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (aglr ApplicationGatewayListResult) applicationGatewayListResultPreparer() (*http.Request, error) { +func (aglr ApplicationGatewayListResult) applicationGatewayListResultPreparer(ctx context.Context) (*http.Request, error) { if aglr.NextLink == nil || len(to.String(aglr.NextLink)) < 1 { return nil, nil } - return autorest.Prepare(&http.Request{}, + return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), autorest.WithBaseURL(to.String(aglr.NextLink))) @@ -1265,14 +1287,24 @@ func (aglr ApplicationGatewayListResult) applicationGatewayListResultPreparer() // ApplicationGatewayListResultPage contains a page of ApplicationGateway values. type ApplicationGatewayListResultPage struct { - fn func(ApplicationGatewayListResult) (ApplicationGatewayListResult, error) + fn func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error) aglr ApplicationGatewayListResult } -// Next advances to the next page of values. If there was an error making +// NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *ApplicationGatewayListResultPage) Next() error { - next, err := page.fn(page.aglr) +func (page *ApplicationGatewayListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.aglr) if err != nil { return err } @@ -1280,6 +1312,13 @@ func (page *ApplicationGatewayListResultPage) Next() error { return nil } +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ApplicationGatewayListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + // NotDone returns true if the page enumeration should be started or is not yet complete. func (page ApplicationGatewayListResultPage) NotDone() bool { return !page.aglr.IsEmpty() @@ -1298,6 +1337,11 @@ func (page ApplicationGatewayListResultPage) Values() []ApplicationGateway { return *page.aglr.Value } +// Creates a new instance of the ApplicationGatewayListResultPage type. +func NewApplicationGatewayListResultPage(getNextPage func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)) ApplicationGatewayListResultPage { + return ApplicationGatewayListResultPage{fn: getNextPage} +} + // ApplicationGatewayPathRule path rule of URL path map of an application gateway. type ApplicationGatewayPathRule struct { *ApplicationGatewayPathRulePropertiesFormat `json:"properties,omitempty"` @@ -1492,7 +1536,7 @@ type ApplicationGatewayProbePropertiesFormat struct { type ApplicationGatewayPropertiesFormat struct { // Sku - SKU of the application gateway resource. Sku *ApplicationGatewaySku `json:"sku,omitempty"` - // OperationalState - Operational state of the application gateway resource. Possible values are: 'Stopped', 'Started', 'Running', and 'Stopping'. Possible values include: 'Stopped', 'Starting', 'Running', 'Stopping' + // OperationalState - READ-ONLY; Operational state of the application gateway resource. Possible values are: 'Stopped', 'Started', 'Running', and 'Stopping'. Possible values include: 'Stopped', 'Starting', 'Running', 'Stopping' OperationalState ApplicationGatewayOperationalState `json:"operationalState,omitempty"` // GatewayIPConfigurations - Gets or sets subnets of application gateway resource GatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"gatewayIPConfigurations,omitempty"` @@ -1600,8 +1644,8 @@ func (agrrr *ApplicationGatewayRequestRoutingRule) UnmarshalJSON(body []byte) er return nil } -// ApplicationGatewayRequestRoutingRulePropertiesFormat properties of request routing rule of the application -// gateway. +// ApplicationGatewayRequestRoutingRulePropertiesFormat properties of request routing rule of the +// application gateway. type ApplicationGatewayRequestRoutingRulePropertiesFormat struct { // RuleType - Rule type. Possible values are: 'Basic' and 'PathBasedRouting'. Possible values include: 'Basic', 'PathBasedRouting' RuleType ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"` @@ -1621,97 +1665,51 @@ type ApplicationGatewayRequestRoutingRulePropertiesFormat struct { // long-running operation. type ApplicationGatewaysCreateOrUpdateFuture struct { azure.Future - req *http.Request } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) { +func (future *ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") return } if !done { - return ag, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture") - } - if future.PollingMethod() == azure.PollingLocation { - ag, err = client.CreateOrUpdateResponder(future.Response()) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request") - } + err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture") return } - var req *http.Request - var resp *http.Response - if future.PollingURL() != "" { - req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent { + ag, err = client.CreateOrUpdateResponder(ag.Response.Response) if err != nil { - return + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", ag.Response.Response, "Failure responding to request") } - } else { - req = autorest.ChangeToGet(future.req) - } - resp, err = autorest.SendWithSender(client, req, - autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request") - return - } - ag, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request") } return } -// ApplicationGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// ApplicationGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. type ApplicationGatewaysDeleteFuture struct { azure.Future - req *http.Request } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) { +func (future *ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", future.Response(), "Polling failure") return } if !done { - return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture") - } - if future.PollingMethod() == azure.PollingLocation { - ar, err = client.DeleteResponder(future.Response()) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request") - } + err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture") return } - var req *http.Request - var resp *http.Response - if future.PollingURL() != "" { - req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) - if err != nil { - return - } - } else { - req = autorest.ChangeToGet(future.req) - } - resp, err = autorest.SendWithSender(client, req, - autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", resp, "Failure sending request") - return - } - ar, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", resp, "Failure responding to request") - } + ar.Response = future.Response() return } @@ -1805,7 +1803,8 @@ func (agsc *ApplicationGatewaySslCertificate) UnmarshalJSON(body []byte) error { return nil } -// ApplicationGatewaySslCertificatePropertiesFormat properties of SSL certificates of an application gateway. +// ApplicationGatewaySslCertificatePropertiesFormat properties of SSL certificates of an application +// gateway. type ApplicationGatewaySslCertificatePropertiesFormat struct { // Data - Base-64 encoded pfx certificate. Only applicable in PUT Request. Data *string `json:"data,omitempty"` @@ -1817,52 +1816,26 @@ type ApplicationGatewaySslCertificatePropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// ApplicationGatewaysStartFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// ApplicationGatewaysStartFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. type ApplicationGatewaysStartFuture struct { azure.Future - req *http.Request } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) { +func (future *ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", future.Response(), "Polling failure") return } if !done { - return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture") - } - if future.PollingMethod() == azure.PollingLocation { - ar, err = client.StartResponder(future.Response()) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", future.Response(), "Failure responding to request") - } + err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture") return } - var req *http.Request - var resp *http.Response - if future.PollingURL() != "" { - req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) - if err != nil { - return - } - } else { - req = autorest.ChangeToGet(future.req) - } - resp, err = autorest.SendWithSender(client, req, - autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", resp, "Failure sending request") - return - } - ar, err = client.StartResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", resp, "Failure responding to request") - } + ar.Response = future.Response() return } @@ -1870,48 +1843,22 @@ func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysCl // operation. type ApplicationGatewaysStopFuture struct { azure.Future - req *http.Request } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) { +func (future *ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", future.Response(), "Polling failure") return } if !done { - return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture") - } - if future.PollingMethod() == azure.PollingLocation { - ar, err = client.StopResponder(future.Response()) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", future.Response(), "Failure responding to request") - } + err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture") return } - var req *http.Request - var resp *http.Response - if future.PollingURL() != "" { - req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) - if err != nil { - return - } - } else { - req = autorest.ChangeToGet(future.req) - } - resp, err = autorest.SendWithSender(client, req, - autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", resp, "Failure sending request") - return - } - ar, err = client.StopResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", resp, "Failure responding to request") - } + ar.Response = future.Response() return } @@ -2008,8 +1955,8 @@ type ApplicationGatewayURLPathMapPropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// AuthorizationListResult response for ListAuthorizations API service call retrieves all authorizations that -// belongs to an ExpressRouteCircuit. +// AuthorizationListResult response for ListAuthorizations API service call retrieves all authorizations +// that belongs to an ExpressRouteCircuit. type AuthorizationListResult struct { autorest.Response `json:"-"` // Value - The authorizations in an ExpressRoute Circuit. @@ -2018,21 +1965,31 @@ type AuthorizationListResult struct { NextLink *string `json:"nextLink,omitempty"` } -// AuthorizationListResultIterator provides access to a complete listing of ExpressRouteCircuitAuthorization -// values. +// AuthorizationListResultIterator provides access to a complete listing of +// ExpressRouteCircuitAuthorization values. type AuthorizationListResultIterator struct { i int page AuthorizationListResultPage } -// Next advances to the next value. If there was an error making +// NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *AuthorizationListResultIterator) Next() error { +func (iter *AuthorizationListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } iter.i++ if iter.i < len(iter.page.Values()) { return nil } - err := iter.page.Next() + err = iter.page.NextWithContext(ctx) if err != nil { iter.i-- return err @@ -2041,6 +1998,13 @@ func (iter *AuthorizationListResultIterator) Next() error { return nil } +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *AuthorizationListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + // NotDone returns true if the enumeration should be started or is not yet complete. func (iter AuthorizationListResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) @@ -2060,6 +2024,11 @@ func (iter AuthorizationListResultIterator) Value() ExpressRouteCircuitAuthoriza return iter.page.Values()[iter.i] } +// Creates a new instance of the AuthorizationListResultIterator type. +func NewAuthorizationListResultIterator(page AuthorizationListResultPage) AuthorizationListResultIterator { + return AuthorizationListResultIterator{page: page} +} + // IsEmpty returns true if the ListResult contains no values. func (alr AuthorizationListResult) IsEmpty() bool { return alr.Value == nil || len(*alr.Value) == 0 @@ -2067,11 +2036,11 @@ func (alr AuthorizationListResult) IsEmpty() bool { // authorizationListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (alr AuthorizationListResult) authorizationListResultPreparer() (*http.Request, error) { +func (alr AuthorizationListResult) authorizationListResultPreparer(ctx context.Context) (*http.Request, error) { if alr.NextLink == nil || len(to.String(alr.NextLink)) < 1 { return nil, nil } - return autorest.Prepare(&http.Request{}, + return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), autorest.WithBaseURL(to.String(alr.NextLink))) @@ -2079,14 +2048,24 @@ func (alr AuthorizationListResult) authorizationListResultPreparer() (*http.Requ // AuthorizationListResultPage contains a page of ExpressRouteCircuitAuthorization values. type AuthorizationListResultPage struct { - fn func(AuthorizationListResult) (AuthorizationListResult, error) + fn func(context.Context, AuthorizationListResult) (AuthorizationListResult, error) alr AuthorizationListResult } -// Next advances to the next page of values. If there was an error making +// NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *AuthorizationListResultPage) Next() error { - next, err := page.fn(page.alr) +func (page *AuthorizationListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.alr) if err != nil { return err } @@ -2094,6 +2073,13 @@ func (page *AuthorizationListResultPage) Next() error { return nil } +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *AuthorizationListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + // NotDone returns true if the page enumeration should be started or is not yet complete. func (page AuthorizationListResultPage) NotDone() bool { return !page.alr.IsEmpty() @@ -2112,6 +2098,11 @@ func (page AuthorizationListResultPage) Values() []ExpressRouteCircuitAuthorizat return *page.alr.Value } +// Creates a new instance of the AuthorizationListResultPage type. +func NewAuthorizationListResultPage(getNextPage func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)) AuthorizationListResultPage { + return AuthorizationListResultPage{fn: getNextPage} +} + // AuthorizationPropertiesFormat ... type AuthorizationPropertiesFormat struct { // AuthorizationKey - The authorization key. @@ -2123,11 +2114,11 @@ type AuthorizationPropertiesFormat struct { } // AzureAsyncOperationResult the response body contains the status of the specified asynchronous operation, -// indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct from the -// HTTP status code returned for the Get Operation Status operation itself. If the asynchronous operation -// succeeded, the response body includes the HTTP status code for the successful request. If the asynchronous -// operation failed, the response body includes the HTTP status code for the failed request and error information -// regarding the failure. +// indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct +// from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous +// operation succeeded, the response body includes the HTTP status code for the successful request. If the +// asynchronous operation failed, the response body includes the HTTP status code for the failed request +// and error information regarding the failure. type AzureAsyncOperationResult struct { // Status - Status of the Azure async operation. Possible values are: 'InProgress', 'Succeeded', and 'Failed'. Possible values include: 'InProgress', 'Succeeded', 'Failed' Status OperationStatus `json:"status,omitempty"` @@ -2218,7 +2209,7 @@ func (bap *BackendAddressPool) UnmarshalJSON(body []byte) error { type BackendAddressPoolPropertiesFormat struct { // BackendIPConfigurations - Gets collection of references to IP addresses defined in network interfaces. BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - // LoadBalancingRules - Gets load balancing rules that use this backend address pool. + // LoadBalancingRules - READ-ONLY; Gets load balancing rules that use this backend address pool. LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` // OutboundNatRule - Gets outbound rules that use this backend address pool. OutboundNatRule *SubResource `json:"outboundNatRule,omitempty"` @@ -2243,22 +2234,22 @@ type ConnectionResetSharedKey struct { KeyLength *int64 `json:"keyLength,omitempty"` } -// ConnectionSharedKey response for GetConnectionSharedKey Api servive call +// ConnectionSharedKey response for GetConnectionSharedKey API service call type ConnectionSharedKey struct { autorest.Response `json:"-"` // Value - The virtual network connection shared key value Value *string `json:"value,omitempty"` } -// ConnectionSharedKeyResult response for CheckConnectionSharedKey Api servive call +// ConnectionSharedKeyResult response for CheckConnectionSharedKey API service call type ConnectionSharedKeyResult struct { autorest.Response `json:"-"` // Value - The virtual network connection shared key value Value *string `json:"value,omitempty"` } -// DhcpOptions dhcpOptions contains an array of DNS servers available to VMs deployed in the virtual network. -// Standard DHCP option for a subnet overrides VNET DHCP options. +// DhcpOptions dhcpOptions contains an array of DNS servers available to VMs deployed in the virtual +// network. Standard DHCP option for a subnet overrides VNET DHCP options. type DhcpOptions struct { // DNSServers - The list of DNS servers IP addresses. DNSServers *[]string `json:"dnsServers,omitempty"` @@ -2297,9 +2288,9 @@ type ExpressRouteCircuit struct { Etag *string `json:"etag,omitempty"` // ID - Resource Identifier. ID *string `json:"id,omitempty"` - // Name - Resource name. + // Name - READ-ONLY; Resource name. Name *string `json:"name,omitempty"` - // Type - Resource type. + // Type - READ-ONLY; Resource type. Type *string `json:"type,omitempty"` // Location - Resource location. Location *string `json:"location,omitempty"` @@ -2322,12 +2313,6 @@ func (erc ExpressRouteCircuit) MarshalJSON() ([]byte, error) { if erc.ID != nil { objectMap["id"] = erc.ID } - if erc.Name != nil { - objectMap["name"] = erc.Name - } - if erc.Type != nil { - objectMap["type"] = erc.Type - } if erc.Location != nil { objectMap["location"] = erc.Location } @@ -2513,101 +2498,55 @@ func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error { return nil } -// ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. +// ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct { azure.Future - req *http.Request } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) { +func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") return } if !done { - return erca, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture") - } - if future.PollingMethod() == azure.PollingLocation { - erca, err = client.CreateOrUpdateResponder(future.Response()) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request") - } + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture") return } - var req *http.Request - var resp *http.Response - if future.PollingURL() != "" { - req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if erca.Response.Response, err = future.GetResult(sender); err == nil && erca.Response.Response.StatusCode != http.StatusNoContent { + erca, err = client.CreateOrUpdateResponder(erca.Response.Response) if err != nil { - return + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", erca.Response.Response, "Failure responding to request") } - } else { - req = autorest.ChangeToGet(future.req) - } - resp, err = autorest.SendWithSender(client, req, - autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", resp, "Failure sending request") - return - } - erca, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", resp, "Failure responding to request") } return } -// ExpressRouteCircuitAuthorizationsDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. +// ExpressRouteCircuitAuthorizationsDeleteFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. type ExpressRouteCircuitAuthorizationsDeleteFuture struct { azure.Future - req *http.Request } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) { +func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Polling failure") return } if !done { - return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture") - } - if future.PollingMethod() == azure.PollingLocation { - ar, err = client.DeleteResponder(future.Response()) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Failure responding to request") - } + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture") return } - var req *http.Request - var resp *http.Response - if future.PollingURL() != "" { - req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) - if err != nil { - return - } - } else { - req = autorest.ChangeToGet(future.req) - } - resp, err = autorest.SendWithSender(client, req, - autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", resp, "Failure sending request") - return - } - ar, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", resp, "Failure responding to request") - } + ar.Response = future.Response() return } @@ -2620,20 +2559,31 @@ type ExpressRouteCircuitListResult struct { NextLink *string `json:"nextLink,omitempty"` } -// ExpressRouteCircuitListResultIterator provides access to a complete listing of ExpressRouteCircuit values. +// ExpressRouteCircuitListResultIterator provides access to a complete listing of ExpressRouteCircuit +// values. type ExpressRouteCircuitListResultIterator struct { i int page ExpressRouteCircuitListResultPage } -// Next advances to the next value. If there was an error making +// NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *ExpressRouteCircuitListResultIterator) Next() error { +func (iter *ExpressRouteCircuitListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } iter.i++ if iter.i < len(iter.page.Values()) { return nil } - err := iter.page.Next() + err = iter.page.NextWithContext(ctx) if err != nil { iter.i-- return err @@ -2642,6 +2592,13 @@ func (iter *ExpressRouteCircuitListResultIterator) Next() error { return nil } +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ExpressRouteCircuitListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + // NotDone returns true if the enumeration should be started or is not yet complete. func (iter ExpressRouteCircuitListResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) @@ -2661,6 +2618,11 @@ func (iter ExpressRouteCircuitListResultIterator) Value() ExpressRouteCircuit { return iter.page.Values()[iter.i] } +// Creates a new instance of the ExpressRouteCircuitListResultIterator type. +func NewExpressRouteCircuitListResultIterator(page ExpressRouteCircuitListResultPage) ExpressRouteCircuitListResultIterator { + return ExpressRouteCircuitListResultIterator{page: page} +} + // IsEmpty returns true if the ListResult contains no values. func (erclr ExpressRouteCircuitListResult) IsEmpty() bool { return erclr.Value == nil || len(*erclr.Value) == 0 @@ -2668,11 +2630,11 @@ func (erclr ExpressRouteCircuitListResult) IsEmpty() bool { // expressRouteCircuitListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (erclr ExpressRouteCircuitListResult) expressRouteCircuitListResultPreparer() (*http.Request, error) { +func (erclr ExpressRouteCircuitListResult) expressRouteCircuitListResultPreparer(ctx context.Context) (*http.Request, error) { if erclr.NextLink == nil || len(to.String(erclr.NextLink)) < 1 { return nil, nil } - return autorest.Prepare(&http.Request{}, + return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), autorest.WithBaseURL(to.String(erclr.NextLink))) @@ -2680,14 +2642,24 @@ func (erclr ExpressRouteCircuitListResult) expressRouteCircuitListResultPreparer // ExpressRouteCircuitListResultPage contains a page of ExpressRouteCircuit values. type ExpressRouteCircuitListResultPage struct { - fn func(ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error) + fn func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error) erclr ExpressRouteCircuitListResult } -// Next advances to the next page of values. If there was an error making +// NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *ExpressRouteCircuitListResultPage) Next() error { - next, err := page.fn(page.erclr) +func (page *ExpressRouteCircuitListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.erclr) if err != nil { return err } @@ -2695,6 +2667,13 @@ func (page *ExpressRouteCircuitListResultPage) Next() error { return nil } +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ExpressRouteCircuitListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + // NotDone returns true if the page enumeration should be started or is not yet complete. func (page ExpressRouteCircuitListResultPage) NotDone() bool { return !page.erclr.IsEmpty() @@ -2713,6 +2692,11 @@ func (page ExpressRouteCircuitListResultPage) Values() []ExpressRouteCircuit { return *page.erclr.Value } +// Creates a new instance of the ExpressRouteCircuitListResultPage type. +func NewExpressRouteCircuitListResultPage(getNextPage func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)) ExpressRouteCircuitListResultPage { + return ExpressRouteCircuitListResultPage{fn: getNextPage} +} + // ExpressRouteCircuitPeering peering in an ExpressRouteCircuit resource. type ExpressRouteCircuitPeering struct { autorest.Response `json:"-"` @@ -2806,8 +2790,8 @@ type ExpressRouteCircuitPeeringConfig struct { RoutingRegistryName *string `json:"routingRegistryName,omitempty"` } -// ExpressRouteCircuitPeeringListResult response for ListPeering API service call retrieves all peerings that -// belong to an ExpressRouteCircuit. +// ExpressRouteCircuitPeeringListResult response for ListPeering API service call retrieves all peerings +// that belong to an ExpressRouteCircuit. type ExpressRouteCircuitPeeringListResult struct { autorest.Response `json:"-"` // Value - The peerings in an express route circuit. @@ -2816,21 +2800,31 @@ type ExpressRouteCircuitPeeringListResult struct { NextLink *string `json:"nextLink,omitempty"` } -// ExpressRouteCircuitPeeringListResultIterator provides access to a complete listing of ExpressRouteCircuitPeering -// values. +// ExpressRouteCircuitPeeringListResultIterator provides access to a complete listing of +// ExpressRouteCircuitPeering values. type ExpressRouteCircuitPeeringListResultIterator struct { i int page ExpressRouteCircuitPeeringListResultPage } -// Next advances to the next value. If there was an error making +// NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *ExpressRouteCircuitPeeringListResultIterator) Next() error { +func (iter *ExpressRouteCircuitPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } iter.i++ if iter.i < len(iter.page.Values()) { return nil } - err := iter.page.Next() + err = iter.page.NextWithContext(ctx) if err != nil { iter.i-- return err @@ -2839,6 +2833,13 @@ func (iter *ExpressRouteCircuitPeeringListResultIterator) Next() error { return nil } +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ExpressRouteCircuitPeeringListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + // NotDone returns true if the enumeration should be started or is not yet complete. func (iter ExpressRouteCircuitPeeringListResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) @@ -2858,6 +2859,11 @@ func (iter ExpressRouteCircuitPeeringListResultIterator) Value() ExpressRouteCir return iter.page.Values()[iter.i] } +// Creates a new instance of the ExpressRouteCircuitPeeringListResultIterator type. +func NewExpressRouteCircuitPeeringListResultIterator(page ExpressRouteCircuitPeeringListResultPage) ExpressRouteCircuitPeeringListResultIterator { + return ExpressRouteCircuitPeeringListResultIterator{page: page} +} + // IsEmpty returns true if the ListResult contains no values. func (ercplr ExpressRouteCircuitPeeringListResult) IsEmpty() bool { return ercplr.Value == nil || len(*ercplr.Value) == 0 @@ -2865,11 +2871,11 @@ func (ercplr ExpressRouteCircuitPeeringListResult) IsEmpty() bool { // expressRouteCircuitPeeringListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (ercplr ExpressRouteCircuitPeeringListResult) expressRouteCircuitPeeringListResultPreparer() (*http.Request, error) { +func (ercplr ExpressRouteCircuitPeeringListResult) expressRouteCircuitPeeringListResultPreparer(ctx context.Context) (*http.Request, error) { if ercplr.NextLink == nil || len(to.String(ercplr.NextLink)) < 1 { return nil, nil } - return autorest.Prepare(&http.Request{}, + return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), autorest.WithBaseURL(to.String(ercplr.NextLink))) @@ -2877,14 +2883,24 @@ func (ercplr ExpressRouteCircuitPeeringListResult) expressRouteCircuitPeeringLis // ExpressRouteCircuitPeeringListResultPage contains a page of ExpressRouteCircuitPeering values. type ExpressRouteCircuitPeeringListResultPage struct { - fn func(ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error) + fn func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error) ercplr ExpressRouteCircuitPeeringListResult } -// Next advances to the next page of values. If there was an error making +// NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *ExpressRouteCircuitPeeringListResultPage) Next() error { - next, err := page.fn(page.ercplr) +func (page *ExpressRouteCircuitPeeringListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.ercplr) if err != nil { return err } @@ -2892,6 +2908,13 @@ func (page *ExpressRouteCircuitPeeringListResultPage) Next() error { return nil } +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ExpressRouteCircuitPeeringListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + // NotDone returns true if the page enumeration should be started or is not yet complete. func (page ExpressRouteCircuitPeeringListResultPage) NotDone() bool { return !page.ercplr.IsEmpty() @@ -2910,6 +2933,11 @@ func (page ExpressRouteCircuitPeeringListResultPage) Values() []ExpressRouteCirc return *page.ercplr.Value } +// Creates a new instance of the ExpressRouteCircuitPeeringListResultPage type. +func NewExpressRouteCircuitPeeringListResultPage(getNextPage func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)) ExpressRouteCircuitPeeringListResultPage { + return ExpressRouteCircuitPeeringListResultPage{fn: getNextPage} +} + // ExpressRouteCircuitPeeringPropertiesFormat ... type ExpressRouteCircuitPeeringPropertiesFormat struct { // PeeringType - The PeeringType. Possible values are: 'AzurePublicPeering', 'AzurePrivatePeering', and 'MicrosoftPeering'. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering' @@ -2940,51 +2968,31 @@ type ExpressRouteCircuitPeeringPropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// ExpressRouteCircuitPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. +// ExpressRouteCircuitPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct { azure.Future - req *http.Request } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) { +func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") return } if !done { - return ercp, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture") - } - if future.PollingMethod() == azure.PollingLocation { - ercp, err = client.CreateOrUpdateResponder(future.Response()) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request") - } + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture") return } - var req *http.Request - var resp *http.Response - if future.PollingURL() != "" { - req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ercp.Response.Response, err = future.GetResult(sender); err == nil && ercp.Response.Response.StatusCode != http.StatusNoContent { + ercp, err = client.CreateOrUpdateResponder(ercp.Response.Response) if err != nil { - return + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", ercp.Response.Response, "Failure responding to request") } - } else { - req = autorest.ChangeToGet(future.req) - } - resp, err = autorest.SendWithSender(client, req, - autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", resp, "Failure sending request") - return - } - ercp, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", resp, "Failure responding to request") } return } @@ -2993,48 +3001,22 @@ func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client Expr // long-running operation. type ExpressRouteCircuitPeeringsDeleteFuture struct { azure.Future - req *http.Request } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) { +func (future *ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Polling failure") return } if !done { - return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture") - } - if future.PollingMethod() == azure.PollingLocation { - ar, err = client.DeleteResponder(future.Response()) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Failure responding to request") - } + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture") return } - var req *http.Request - var resp *http.Response - if future.PollingURL() != "" { - req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) - if err != nil { - return - } - } else { - req = autorest.ChangeToGet(future.req) - } - resp, err = autorest.SendWithSender(client, req, - autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", resp, "Failure sending request") - return - } - ar, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", resp, "Failure responding to request") - } + ar.Response = future.Response() return } @@ -3070,7 +3052,8 @@ type ExpressRouteCircuitRoutesTable struct { AsPath *string `json:"asPath,omitempty"` } -// ExpressRouteCircuitsArpTableListResult response for ListArpTable associated with the Express Route Circuits API. +// ExpressRouteCircuitsArpTableListResult response for ListArpTable associated with the Express Route +// Circuits API. type ExpressRouteCircuitsArpTableListResult struct { autorest.Response `json:"-"` // Value - Gets list of the ARP table. @@ -3086,14 +3069,24 @@ type ExpressRouteCircuitsArpTableListResultIterator struct { page ExpressRouteCircuitsArpTableListResultPage } -// Next advances to the next value. If there was an error making +// NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *ExpressRouteCircuitsArpTableListResultIterator) Next() error { +func (iter *ExpressRouteCircuitsArpTableListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsArpTableListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } iter.i++ if iter.i < len(iter.page.Values()) { return nil } - err := iter.page.Next() + err = iter.page.NextWithContext(ctx) if err != nil { iter.i-- return err @@ -3102,6 +3095,13 @@ func (iter *ExpressRouteCircuitsArpTableListResultIterator) Next() error { return nil } +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ExpressRouteCircuitsArpTableListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + // NotDone returns true if the enumeration should be started or is not yet complete. func (iter ExpressRouteCircuitsArpTableListResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) @@ -3121,6 +3121,11 @@ func (iter ExpressRouteCircuitsArpTableListResultIterator) Value() ExpressRouteC return iter.page.Values()[iter.i] } +// Creates a new instance of the ExpressRouteCircuitsArpTableListResultIterator type. +func NewExpressRouteCircuitsArpTableListResultIterator(page ExpressRouteCircuitsArpTableListResultPage) ExpressRouteCircuitsArpTableListResultIterator { + return ExpressRouteCircuitsArpTableListResultIterator{page: page} +} + // IsEmpty returns true if the ListResult contains no values. func (ercatlr ExpressRouteCircuitsArpTableListResult) IsEmpty() bool { return ercatlr.Value == nil || len(*ercatlr.Value) == 0 @@ -3128,11 +3133,11 @@ func (ercatlr ExpressRouteCircuitsArpTableListResult) IsEmpty() bool { // expressRouteCircuitsArpTableListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (ercatlr ExpressRouteCircuitsArpTableListResult) expressRouteCircuitsArpTableListResultPreparer() (*http.Request, error) { +func (ercatlr ExpressRouteCircuitsArpTableListResult) expressRouteCircuitsArpTableListResultPreparer(ctx context.Context) (*http.Request, error) { if ercatlr.NextLink == nil || len(to.String(ercatlr.NextLink)) < 1 { return nil, nil } - return autorest.Prepare(&http.Request{}, + return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), autorest.WithBaseURL(to.String(ercatlr.NextLink))) @@ -3140,14 +3145,24 @@ func (ercatlr ExpressRouteCircuitsArpTableListResult) expressRouteCircuitsArpTab // ExpressRouteCircuitsArpTableListResultPage contains a page of ExpressRouteCircuitArpTable values. type ExpressRouteCircuitsArpTableListResultPage struct { - fn func(ExpressRouteCircuitsArpTableListResult) (ExpressRouteCircuitsArpTableListResult, error) + fn func(context.Context, ExpressRouteCircuitsArpTableListResult) (ExpressRouteCircuitsArpTableListResult, error) ercatlr ExpressRouteCircuitsArpTableListResult } -// Next advances to the next page of values. If there was an error making +// NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *ExpressRouteCircuitsArpTableListResultPage) Next() error { - next, err := page.fn(page.ercatlr) +func (page *ExpressRouteCircuitsArpTableListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsArpTableListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.ercatlr) if err != nil { return err } @@ -3155,6 +3170,13 @@ func (page *ExpressRouteCircuitsArpTableListResultPage) Next() error { return nil } +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ExpressRouteCircuitsArpTableListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + // NotDone returns true if the page enumeration should be started or is not yet complete. func (page ExpressRouteCircuitsArpTableListResultPage) NotDone() bool { return !page.ercatlr.IsEmpty() @@ -3173,105 +3195,65 @@ func (page ExpressRouteCircuitsArpTableListResultPage) Values() []ExpressRouteCi return *page.ercatlr.Value } +// Creates a new instance of the ExpressRouteCircuitsArpTableListResultPage type. +func NewExpressRouteCircuitsArpTableListResultPage(getNextPage func(context.Context, ExpressRouteCircuitsArpTableListResult) (ExpressRouteCircuitsArpTableListResult, error)) ExpressRouteCircuitsArpTableListResultPage { + return ExpressRouteCircuitsArpTableListResultPage{fn: getNextPage} +} + // ExpressRouteCircuitsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type ExpressRouteCircuitsCreateOrUpdateFuture struct { azure.Future - req *http.Request } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) { +func (future *ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") return } if !done { - return erc, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture") - } - if future.PollingMethod() == azure.PollingLocation { - erc, err = client.CreateOrUpdateResponder(future.Response()) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request") - } + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture") return } - var req *http.Request - var resp *http.Response - if future.PollingURL() != "" { - req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent { + erc, err = client.CreateOrUpdateResponder(erc.Response.Response) if err != nil { - return + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request") } - } else { - req = autorest.ChangeToGet(future.req) - } - resp, err = autorest.SendWithSender(client, req, - autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", resp, "Failure sending request") - return - } - erc, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", resp, "Failure responding to request") } return } -// ExpressRouteCircuitsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// ExpressRouteCircuitsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. type ExpressRouteCircuitsDeleteFuture struct { azure.Future - req *http.Request } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) { +func (future *ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Polling failure") return } if !done { - return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture") - } - if future.PollingMethod() == azure.PollingLocation { - ar, err = client.DeleteResponder(future.Response()) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Failure responding to request") - } + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture") return } - var req *http.Request - var resp *http.Response - if future.PollingURL() != "" { - req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) - if err != nil { - return - } - } else { - req = autorest.ChangeToGet(future.req) - } - resp, err = autorest.SendWithSender(client, req, - autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", resp, "Failure sending request") - return - } - ar, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", resp, "Failure responding to request") - } + ar.Response = future.Response() return } -// ExpressRouteCircuitServiceProviderProperties contains ServiceProviderProperties in an ExpressRouteCircuit. +// ExpressRouteCircuitServiceProviderProperties contains ServiceProviderProperties in an +// ExpressRouteCircuit. type ExpressRouteCircuitServiceProviderProperties struct { // ServiceProviderName - The serviceProviderName. ServiceProviderName *string `json:"serviceProviderName,omitempty"` @@ -3308,14 +3290,24 @@ type ExpressRouteCircuitsRoutesTableListResultIterator struct { page ExpressRouteCircuitsRoutesTableListResultPage } -// Next advances to the next value. If there was an error making +// NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *ExpressRouteCircuitsRoutesTableListResultIterator) Next() error { +func (iter *ExpressRouteCircuitsRoutesTableListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsRoutesTableListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } iter.i++ if iter.i < len(iter.page.Values()) { return nil } - err := iter.page.Next() + err = iter.page.NextWithContext(ctx) if err != nil { iter.i-- return err @@ -3324,6 +3316,13 @@ func (iter *ExpressRouteCircuitsRoutesTableListResultIterator) Next() error { return nil } +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ExpressRouteCircuitsRoutesTableListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + // NotDone returns true if the enumeration should be started or is not yet complete. func (iter ExpressRouteCircuitsRoutesTableListResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) @@ -3343,6 +3342,11 @@ func (iter ExpressRouteCircuitsRoutesTableListResultIterator) Value() ExpressRou return iter.page.Values()[iter.i] } +// Creates a new instance of the ExpressRouteCircuitsRoutesTableListResultIterator type. +func NewExpressRouteCircuitsRoutesTableListResultIterator(page ExpressRouteCircuitsRoutesTableListResultPage) ExpressRouteCircuitsRoutesTableListResultIterator { + return ExpressRouteCircuitsRoutesTableListResultIterator{page: page} +} + // IsEmpty returns true if the ListResult contains no values. func (ercrtlr ExpressRouteCircuitsRoutesTableListResult) IsEmpty() bool { return ercrtlr.Value == nil || len(*ercrtlr.Value) == 0 @@ -3350,11 +3354,11 @@ func (ercrtlr ExpressRouteCircuitsRoutesTableListResult) IsEmpty() bool { // expressRouteCircuitsRoutesTableListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (ercrtlr ExpressRouteCircuitsRoutesTableListResult) expressRouteCircuitsRoutesTableListResultPreparer() (*http.Request, error) { +func (ercrtlr ExpressRouteCircuitsRoutesTableListResult) expressRouteCircuitsRoutesTableListResultPreparer(ctx context.Context) (*http.Request, error) { if ercrtlr.NextLink == nil || len(to.String(ercrtlr.NextLink)) < 1 { return nil, nil } - return autorest.Prepare(&http.Request{}, + return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), autorest.WithBaseURL(to.String(ercrtlr.NextLink))) @@ -3362,14 +3366,24 @@ func (ercrtlr ExpressRouteCircuitsRoutesTableListResult) expressRouteCircuitsRou // ExpressRouteCircuitsRoutesTableListResultPage contains a page of ExpressRouteCircuitRoutesTable values. type ExpressRouteCircuitsRoutesTableListResultPage struct { - fn func(ExpressRouteCircuitsRoutesTableListResult) (ExpressRouteCircuitsRoutesTableListResult, error) + fn func(context.Context, ExpressRouteCircuitsRoutesTableListResult) (ExpressRouteCircuitsRoutesTableListResult, error) ercrtlr ExpressRouteCircuitsRoutesTableListResult } -// Next advances to the next page of values. If there was an error making +// NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *ExpressRouteCircuitsRoutesTableListResultPage) Next() error { - next, err := page.fn(page.ercrtlr) +func (page *ExpressRouteCircuitsRoutesTableListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsRoutesTableListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.ercrtlr) if err != nil { return err } @@ -3377,6 +3391,13 @@ func (page *ExpressRouteCircuitsRoutesTableListResultPage) Next() error { return nil } +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ExpressRouteCircuitsRoutesTableListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + // NotDone returns true if the page enumeration should be started or is not yet complete. func (page ExpressRouteCircuitsRoutesTableListResultPage) NotDone() bool { return !page.ercrtlr.IsEmpty() @@ -3395,6 +3416,11 @@ func (page ExpressRouteCircuitsRoutesTableListResultPage) Values() []ExpressRout return *page.ercrtlr.Value } +// Creates a new instance of the ExpressRouteCircuitsRoutesTableListResultPage type. +func NewExpressRouteCircuitsRoutesTableListResultPage(getNextPage func(context.Context, ExpressRouteCircuitsRoutesTableListResult) (ExpressRouteCircuitsRoutesTableListResult, error)) ExpressRouteCircuitsRoutesTableListResultPage { + return ExpressRouteCircuitsRoutesTableListResultPage{fn: getNextPage} +} + // ExpressRouteCircuitsStatsListResult response for ListStats from Express Route Circuits Api service call type ExpressRouteCircuitsStatsListResult struct { autorest.Response `json:"-"` @@ -3404,21 +3430,31 @@ type ExpressRouteCircuitsStatsListResult struct { NextLink *string `json:"nextLink,omitempty"` } -// ExpressRouteCircuitsStatsListResultIterator provides access to a complete listing of ExpressRouteCircuitStats -// values. +// ExpressRouteCircuitsStatsListResultIterator provides access to a complete listing of +// ExpressRouteCircuitStats values. type ExpressRouteCircuitsStatsListResultIterator struct { i int page ExpressRouteCircuitsStatsListResultPage } -// Next advances to the next value. If there was an error making +// NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *ExpressRouteCircuitsStatsListResultIterator) Next() error { +func (iter *ExpressRouteCircuitsStatsListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsStatsListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } iter.i++ if iter.i < len(iter.page.Values()) { return nil } - err := iter.page.Next() + err = iter.page.NextWithContext(ctx) if err != nil { iter.i-- return err @@ -3427,6 +3463,13 @@ func (iter *ExpressRouteCircuitsStatsListResultIterator) Next() error { return nil } +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ExpressRouteCircuitsStatsListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + // NotDone returns true if the enumeration should be started or is not yet complete. func (iter ExpressRouteCircuitsStatsListResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) @@ -3446,6 +3489,11 @@ func (iter ExpressRouteCircuitsStatsListResultIterator) Value() ExpressRouteCirc return iter.page.Values()[iter.i] } +// Creates a new instance of the ExpressRouteCircuitsStatsListResultIterator type. +func NewExpressRouteCircuitsStatsListResultIterator(page ExpressRouteCircuitsStatsListResultPage) ExpressRouteCircuitsStatsListResultIterator { + return ExpressRouteCircuitsStatsListResultIterator{page: page} +} + // IsEmpty returns true if the ListResult contains no values. func (ercslr ExpressRouteCircuitsStatsListResult) IsEmpty() bool { return ercslr.Value == nil || len(*ercslr.Value) == 0 @@ -3453,11 +3501,11 @@ func (ercslr ExpressRouteCircuitsStatsListResult) IsEmpty() bool { // expressRouteCircuitsStatsListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (ercslr ExpressRouteCircuitsStatsListResult) expressRouteCircuitsStatsListResultPreparer() (*http.Request, error) { +func (ercslr ExpressRouteCircuitsStatsListResult) expressRouteCircuitsStatsListResultPreparer(ctx context.Context) (*http.Request, error) { if ercslr.NextLink == nil || len(to.String(ercslr.NextLink)) < 1 { return nil, nil } - return autorest.Prepare(&http.Request{}, + return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), autorest.WithBaseURL(to.String(ercslr.NextLink))) @@ -3465,14 +3513,24 @@ func (ercslr ExpressRouteCircuitsStatsListResult) expressRouteCircuitsStatsListR // ExpressRouteCircuitsStatsListResultPage contains a page of ExpressRouteCircuitStats values. type ExpressRouteCircuitsStatsListResultPage struct { - fn func(ExpressRouteCircuitsStatsListResult) (ExpressRouteCircuitsStatsListResult, error) + fn func(context.Context, ExpressRouteCircuitsStatsListResult) (ExpressRouteCircuitsStatsListResult, error) ercslr ExpressRouteCircuitsStatsListResult } -// Next advances to the next page of values. If there was an error making +// NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *ExpressRouteCircuitsStatsListResultPage) Next() error { - next, err := page.fn(page.ercslr) +func (page *ExpressRouteCircuitsStatsListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsStatsListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.ercslr) if err != nil { return err } @@ -3480,6 +3538,13 @@ func (page *ExpressRouteCircuitsStatsListResultPage) Next() error { return nil } +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ExpressRouteCircuitsStatsListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + // NotDone returns true if the page enumeration should be started or is not yet complete. func (page ExpressRouteCircuitsStatsListResultPage) NotDone() bool { return !page.ercslr.IsEmpty() @@ -3498,6 +3563,11 @@ func (page ExpressRouteCircuitsStatsListResultPage) Values() []ExpressRouteCircu return *page.ercslr.Value } +// Creates a new instance of the ExpressRouteCircuitsStatsListResultPage type. +func NewExpressRouteCircuitsStatsListResultPage(getNextPage func(context.Context, ExpressRouteCircuitsStatsListResult) (ExpressRouteCircuitsStatsListResult, error)) ExpressRouteCircuitsStatsListResultPage { + return ExpressRouteCircuitsStatsListResultPage{fn: getNextPage} +} + // ExpressRouteCircuitStats contains stats associated with the peering. type ExpressRouteCircuitStats struct { // BytesIn - Gets BytesIn of the peering. @@ -3511,9 +3581,9 @@ type ExpressRouteServiceProvider struct { *ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"` // ID - Resource Identifier. ID *string `json:"id,omitempty"` - // Name - Resource name. + // Name - READ-ONLY; Resource name. Name *string `json:"name,omitempty"` - // Type - Resource type. + // Type - READ-ONLY; Resource type. Type *string `json:"type,omitempty"` // Location - Resource location. Location *string `json:"location,omitempty"` @@ -3530,12 +3600,6 @@ func (ersp ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) { if ersp.ID != nil { objectMap["id"] = ersp.ID } - if ersp.Name != nil { - objectMap["name"] = ersp.Name - } - if ersp.Type != nil { - objectMap["type"] = ersp.Type - } if ersp.Location != nil { objectMap["location"] = ersp.Location } @@ -3639,14 +3703,24 @@ type ExpressRouteServiceProviderListResultIterator struct { page ExpressRouteServiceProviderListResultPage } -// Next advances to the next value. If there was an error making +// NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *ExpressRouteServiceProviderListResultIterator) Next() error { +func (iter *ExpressRouteServiceProviderListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } iter.i++ if iter.i < len(iter.page.Values()) { return nil } - err := iter.page.Next() + err = iter.page.NextWithContext(ctx) if err != nil { iter.i-- return err @@ -3655,6 +3729,13 @@ func (iter *ExpressRouteServiceProviderListResultIterator) Next() error { return nil } +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ExpressRouteServiceProviderListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + // NotDone returns true if the enumeration should be started or is not yet complete. func (iter ExpressRouteServiceProviderListResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) @@ -3674,6 +3755,11 @@ func (iter ExpressRouteServiceProviderListResultIterator) Value() ExpressRouteSe return iter.page.Values()[iter.i] } +// Creates a new instance of the ExpressRouteServiceProviderListResultIterator type. +func NewExpressRouteServiceProviderListResultIterator(page ExpressRouteServiceProviderListResultPage) ExpressRouteServiceProviderListResultIterator { + return ExpressRouteServiceProviderListResultIterator{page: page} +} + // IsEmpty returns true if the ListResult contains no values. func (ersplr ExpressRouteServiceProviderListResult) IsEmpty() bool { return ersplr.Value == nil || len(*ersplr.Value) == 0 @@ -3681,11 +3767,11 @@ func (ersplr ExpressRouteServiceProviderListResult) IsEmpty() bool { // expressRouteServiceProviderListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (ersplr ExpressRouteServiceProviderListResult) expressRouteServiceProviderListResultPreparer() (*http.Request, error) { +func (ersplr ExpressRouteServiceProviderListResult) expressRouteServiceProviderListResultPreparer(ctx context.Context) (*http.Request, error) { if ersplr.NextLink == nil || len(to.String(ersplr.NextLink)) < 1 { return nil, nil } - return autorest.Prepare(&http.Request{}, + return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), autorest.WithBaseURL(to.String(ersplr.NextLink))) @@ -3693,14 +3779,24 @@ func (ersplr ExpressRouteServiceProviderListResult) expressRouteServiceProviderL // ExpressRouteServiceProviderListResultPage contains a page of ExpressRouteServiceProvider values. type ExpressRouteServiceProviderListResultPage struct { - fn func(ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error) + fn func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error) ersplr ExpressRouteServiceProviderListResult } -// Next advances to the next page of values. If there was an error making +// NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *ExpressRouteServiceProviderListResultPage) Next() error { - next, err := page.fn(page.ersplr) +func (page *ExpressRouteServiceProviderListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.ersplr) if err != nil { return err } @@ -3708,6 +3804,13 @@ func (page *ExpressRouteServiceProviderListResultPage) Next() error { return nil } +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ExpressRouteServiceProviderListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + // NotDone returns true if the page enumeration should be started or is not yet complete. func (page ExpressRouteServiceProviderListResultPage) NotDone() bool { return !page.ersplr.IsEmpty() @@ -3726,6 +3829,11 @@ func (page ExpressRouteServiceProviderListResultPage) Values() []ExpressRouteSer return *page.ersplr.Value } +// Creates a new instance of the ExpressRouteServiceProviderListResultPage type. +func NewExpressRouteServiceProviderListResultPage(getNextPage func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)) ExpressRouteServiceProviderListResultPage { + return ExpressRouteServiceProviderListResultPage{fn: getNextPage} +} + // ExpressRouteServiceProviderPropertiesFormat properties of ExpressRouteServiceProvider. type ExpressRouteServiceProviderPropertiesFormat struct { // PeeringLocations - Get a list of peering locations. @@ -4042,9 +4150,9 @@ type Interface struct { Etag *string `json:"etag,omitempty"` // ID - Resource Identifier. ID *string `json:"id,omitempty"` - // Name - Resource name. + // Name - READ-ONLY; Resource name. Name *string `json:"name,omitempty"` - // Type - Resource type. + // Type - READ-ONLY; Resource type. Type *string `json:"type,omitempty"` // Location - Resource location. Location *string `json:"location,omitempty"` @@ -4064,12 +4172,6 @@ func (i Interface) MarshalJSON() ([]byte, error) { if i.ID != nil { objectMap["id"] = i.ID } - if i.Name != nil { - objectMap["name"] = i.Name - } - if i.Type != nil { - objectMap["type"] = i.Type - } if i.Location != nil { objectMap["location"] = i.Location } @@ -4259,8 +4361,10 @@ type InterfaceIPConfigurationPropertiesFormat struct { // PrivateIPAllocationMethod - Defines how a private IP address is assigned. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic' PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` Subnet *Subnet `json:"subnet,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - ProvisioningState *string `json:"provisioningState,omitempty"` + // Primary - Gets whether this is a primary customer address on the network interface. + Primary *bool `json:"primary,omitempty"` + PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` } // InterfaceListResult response for the ListNetworkInterface API service call. @@ -4278,14 +4382,24 @@ type InterfaceListResultIterator struct { page InterfaceListResultPage } -// Next advances to the next value. If there was an error making +// NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *InterfaceListResultIterator) Next() error { +func (iter *InterfaceListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } iter.i++ if iter.i < len(iter.page.Values()) { return nil } - err := iter.page.Next() + err = iter.page.NextWithContext(ctx) if err != nil { iter.i-- return err @@ -4294,6 +4408,13 @@ func (iter *InterfaceListResultIterator) Next() error { return nil } +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *InterfaceListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + // NotDone returns true if the enumeration should be started or is not yet complete. func (iter InterfaceListResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) @@ -4313,6 +4434,11 @@ func (iter InterfaceListResultIterator) Value() Interface { return iter.page.Values()[iter.i] } +// Creates a new instance of the InterfaceListResultIterator type. +func NewInterfaceListResultIterator(page InterfaceListResultPage) InterfaceListResultIterator { + return InterfaceListResultIterator{page: page} +} + // IsEmpty returns true if the ListResult contains no values. func (ilr InterfaceListResult) IsEmpty() bool { return ilr.Value == nil || len(*ilr.Value) == 0 @@ -4320,11 +4446,11 @@ func (ilr InterfaceListResult) IsEmpty() bool { // interfaceListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (ilr InterfaceListResult) interfaceListResultPreparer() (*http.Request, error) { +func (ilr InterfaceListResult) interfaceListResultPreparer(ctx context.Context) (*http.Request, error) { if ilr.NextLink == nil || len(to.String(ilr.NextLink)) < 1 { return nil, nil } - return autorest.Prepare(&http.Request{}, + return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), autorest.WithBaseURL(to.String(ilr.NextLink))) @@ -4332,14 +4458,24 @@ func (ilr InterfaceListResult) interfaceListResultPreparer() (*http.Request, err // InterfaceListResultPage contains a page of Interface values. type InterfaceListResultPage struct { - fn func(InterfaceListResult) (InterfaceListResult, error) + fn func(context.Context, InterfaceListResult) (InterfaceListResult, error) ilr InterfaceListResult } -// Next advances to the next page of values. If there was an error making +// NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *InterfaceListResultPage) Next() error { - next, err := page.fn(page.ilr) +func (page *InterfaceListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.ilr) if err != nil { return err } @@ -4347,6 +4483,13 @@ func (page *InterfaceListResultPage) Next() error { return nil } +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *InterfaceListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + // NotDone returns true if the page enumeration should be started or is not yet complete. func (page InterfaceListResultPage) NotDone() bool { return !page.ilr.IsEmpty() @@ -4365,6 +4508,11 @@ func (page InterfaceListResultPage) Values() []Interface { return *page.ilr.Value } +// Creates a new instance of the InterfaceListResultPage type. +func NewInterfaceListResultPage(getNextPage func(context.Context, InterfaceListResult) (InterfaceListResult, error)) InterfaceListResultPage { + return InterfaceListResultPage{fn: getNextPage} +} + // InterfacePropertiesFormat networkInterface properties. type InterfacePropertiesFormat struct { // VirtualMachine - The reference of a virtual machine. @@ -4387,100 +4535,55 @@ type InterfacePropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// InterfacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// InterfacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. type InterfacesCreateOrUpdateFuture struct { azure.Future - req *http.Request } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i Interface, err error) { +func (future *InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i Interface, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") return } if !done { - return i, azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture") - } - if future.PollingMethod() == azure.PollingLocation { - i, err = client.CreateOrUpdateResponder(future.Response()) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request") - } + err = azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture") return } - var req *http.Request - var resp *http.Response - if future.PollingURL() != "" { - req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent { + i, err = client.CreateOrUpdateResponder(i.Response.Response) if err != nil { - return + err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request") } - } else { - req = autorest.ChangeToGet(future.req) - } - resp, err = autorest.SendWithSender(client, req, - autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", resp, "Failure sending request") - return - } - i, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", resp, "Failure responding to request") } return } -// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. +// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. type InterfacesDeleteFuture struct { azure.Future - req *http.Request } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future InterfacesDeleteFuture) Result(client InterfacesClient) (ar autorest.Response, err error) { +func (future *InterfacesDeleteFuture) Result(client InterfacesClient) (ar autorest.Response, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Polling failure") return } if !done { - return ar, azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture") - } - if future.PollingMethod() == azure.PollingLocation { - ar, err = client.DeleteResponder(future.Response()) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Failure responding to request") - } + err = azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture") return } - var req *http.Request - var resp *http.Response - if future.PollingURL() != "" { - req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) - if err != nil { - return - } - } else { - req = autorest.ChangeToGet(future.req) - } - resp, err = autorest.SendWithSender(client, req, - autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", resp, "Failure sending request") - return - } - ar, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", resp, "Failure responding to request") - } + ar.Response = future.Response() return } @@ -4586,9 +4689,9 @@ type LoadBalancer struct { Etag *string `json:"etag,omitempty"` // ID - Resource Identifier. ID *string `json:"id,omitempty"` - // Name - Resource name. + // Name - READ-ONLY; Resource name. Name *string `json:"name,omitempty"` - // Type - Resource type. + // Type - READ-ONLY; Resource type. Type *string `json:"type,omitempty"` // Location - Resource location. Location *string `json:"location,omitempty"` @@ -4608,12 +4711,6 @@ func (lb LoadBalancer) MarshalJSON() ([]byte, error) { if lb.ID != nil { objectMap["id"] = lb.ID } - if lb.Name != nil { - objectMap["name"] = lb.Name - } - if lb.Type != nil { - objectMap["type"] = lb.Type - } if lb.Location != nil { objectMap["location"] = lb.Location } @@ -4716,14 +4813,24 @@ type LoadBalancerListResultIterator struct { page LoadBalancerListResultPage } -// Next advances to the next value. If there was an error making +// NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *LoadBalancerListResultIterator) Next() error { +func (iter *LoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } iter.i++ if iter.i < len(iter.page.Values()) { return nil } - err := iter.page.Next() + err = iter.page.NextWithContext(ctx) if err != nil { iter.i-- return err @@ -4732,6 +4839,13 @@ func (iter *LoadBalancerListResultIterator) Next() error { return nil } +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *LoadBalancerListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + // NotDone returns true if the enumeration should be started or is not yet complete. func (iter LoadBalancerListResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) @@ -4751,6 +4865,11 @@ func (iter LoadBalancerListResultIterator) Value() LoadBalancer { return iter.page.Values()[iter.i] } +// Creates a new instance of the LoadBalancerListResultIterator type. +func NewLoadBalancerListResultIterator(page LoadBalancerListResultPage) LoadBalancerListResultIterator { + return LoadBalancerListResultIterator{page: page} +} + // IsEmpty returns true if the ListResult contains no values. func (lblr LoadBalancerListResult) IsEmpty() bool { return lblr.Value == nil || len(*lblr.Value) == 0 @@ -4758,11 +4877,11 @@ func (lblr LoadBalancerListResult) IsEmpty() bool { // loadBalancerListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (lblr LoadBalancerListResult) loadBalancerListResultPreparer() (*http.Request, error) { +func (lblr LoadBalancerListResult) loadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) { if lblr.NextLink == nil || len(to.String(lblr.NextLink)) < 1 { return nil, nil } - return autorest.Prepare(&http.Request{}, + return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), autorest.WithBaseURL(to.String(lblr.NextLink))) @@ -4770,14 +4889,24 @@ func (lblr LoadBalancerListResult) loadBalancerListResultPreparer() (*http.Reque // LoadBalancerListResultPage contains a page of LoadBalancer values. type LoadBalancerListResultPage struct { - fn func(LoadBalancerListResult) (LoadBalancerListResult, error) + fn func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error) lblr LoadBalancerListResult } -// Next advances to the next page of values. If there was an error making +// NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *LoadBalancerListResultPage) Next() error { - next, err := page.fn(page.lblr) +func (page *LoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.lblr) if err != nil { return err } @@ -4785,6 +4914,13 @@ func (page *LoadBalancerListResultPage) Next() error { return nil } +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *LoadBalancerListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + // NotDone returns true if the page enumeration should be started or is not yet complete. func (page LoadBalancerListResultPage) NotDone() bool { return !page.lblr.IsEmpty() @@ -4803,6 +4939,11 @@ func (page LoadBalancerListResultPage) Values() []LoadBalancer { return *page.lblr.Value } +// Creates a new instance of the LoadBalancerListResultPage type. +func NewLoadBalancerListResultPage(getNextPage func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)) LoadBalancerListResultPage { + return LoadBalancerListResultPage{fn: getNextPage} +} + // LoadBalancerPropertiesFormat properties of the load balancer. type LoadBalancerPropertiesFormat struct { // FrontendIPConfigurations - Object representing the frontend IPs to be used for the load balancer @@ -4825,104 +4966,59 @@ type LoadBalancerPropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// LoadBalancersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// LoadBalancersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. type LoadBalancersCreateOrUpdateFuture struct { azure.Future - req *http.Request } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) { +func (future *LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") return } if !done { - return lb, azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture") - } - if future.PollingMethod() == azure.PollingLocation { - lb, err = client.CreateOrUpdateResponder(future.Response()) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request") - } + err = azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture") return } - var req *http.Request - var resp *http.Response - if future.PollingURL() != "" { - req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent { + lb, err = client.CreateOrUpdateResponder(lb.Response.Response) if err != nil { - return + err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", lb.Response.Response, "Failure responding to request") } - } else { - req = autorest.ChangeToGet(future.req) - } - resp, err = autorest.SendWithSender(client, req, - autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", resp, "Failure sending request") - return - } - lb, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", resp, "Failure responding to request") } return } -// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. +// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. type LoadBalancersDeleteFuture struct { azure.Future - req *http.Request } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar autorest.Response, err error) { +func (future *LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar autorest.Response, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Polling failure") return } if !done { - return ar, azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture") - } - if future.PollingMethod() == azure.PollingLocation { - ar, err = client.DeleteResponder(future.Response()) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Failure responding to request") - } + err = azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture") return } - var req *http.Request - var resp *http.Response - if future.PollingURL() != "" { - req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) - if err != nil { - return - } - } else { - req = autorest.ChangeToGet(future.req) - } - resp, err = autorest.SendWithSender(client, req, - autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", resp, "Failure sending request") - return - } - ar, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", resp, "Failure responding to request") - } + ar.Response = future.Response() return } -// LoadBalancingRule a loag balancing rule for a load balancer. +// LoadBalancingRule a load balancing rule for a load balancer. type LoadBalancingRule struct { *LoadBalancingRulePropertiesFormat `json:"properties,omitempty"` // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. @@ -5034,9 +5130,9 @@ type LocalNetworkGateway struct { Etag *string `json:"etag,omitempty"` // ID - Resource Identifier. ID *string `json:"id,omitempty"` - // Name - Resource name. + // Name - READ-ONLY; Resource name. Name *string `json:"name,omitempty"` - // Type - Resource type. + // Type - READ-ONLY; Resource type. Type *string `json:"type,omitempty"` // Location - Resource location. Location *string `json:"location,omitempty"` @@ -5056,12 +5152,6 @@ func (lng LocalNetworkGateway) MarshalJSON() ([]byte, error) { if lng.ID != nil { objectMap["id"] = lng.ID } - if lng.Name != nil { - objectMap["name"] = lng.Name - } - if lng.Type != nil { - objectMap["type"] = lng.Type - } if lng.Location != nil { objectMap["location"] = lng.Location } @@ -5158,20 +5248,31 @@ type LocalNetworkGatewayListResult struct { NextLink *string `json:"nextLink,omitempty"` } -// LocalNetworkGatewayListResultIterator provides access to a complete listing of LocalNetworkGateway values. +// LocalNetworkGatewayListResultIterator provides access to a complete listing of LocalNetworkGateway +// values. type LocalNetworkGatewayListResultIterator struct { i int page LocalNetworkGatewayListResultPage } -// Next advances to the next value. If there was an error making +// NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *LocalNetworkGatewayListResultIterator) Next() error { +func (iter *LocalNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } iter.i++ if iter.i < len(iter.page.Values()) { return nil } - err := iter.page.Next() + err = iter.page.NextWithContext(ctx) if err != nil { iter.i-- return err @@ -5180,6 +5281,13 @@ func (iter *LocalNetworkGatewayListResultIterator) Next() error { return nil } +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *LocalNetworkGatewayListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + // NotDone returns true if the enumeration should be started or is not yet complete. func (iter LocalNetworkGatewayListResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) @@ -5199,6 +5307,11 @@ func (iter LocalNetworkGatewayListResultIterator) Value() LocalNetworkGateway { return iter.page.Values()[iter.i] } +// Creates a new instance of the LocalNetworkGatewayListResultIterator type. +func NewLocalNetworkGatewayListResultIterator(page LocalNetworkGatewayListResultPage) LocalNetworkGatewayListResultIterator { + return LocalNetworkGatewayListResultIterator{page: page} +} + // IsEmpty returns true if the ListResult contains no values. func (lnglr LocalNetworkGatewayListResult) IsEmpty() bool { return lnglr.Value == nil || len(*lnglr.Value) == 0 @@ -5206,11 +5319,11 @@ func (lnglr LocalNetworkGatewayListResult) IsEmpty() bool { // localNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (lnglr LocalNetworkGatewayListResult) localNetworkGatewayListResultPreparer() (*http.Request, error) { +func (lnglr LocalNetworkGatewayListResult) localNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) { if lnglr.NextLink == nil || len(to.String(lnglr.NextLink)) < 1 { return nil, nil } - return autorest.Prepare(&http.Request{}, + return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), autorest.WithBaseURL(to.String(lnglr.NextLink))) @@ -5218,14 +5331,24 @@ func (lnglr LocalNetworkGatewayListResult) localNetworkGatewayListResultPreparer // LocalNetworkGatewayListResultPage contains a page of LocalNetworkGateway values. type LocalNetworkGatewayListResultPage struct { - fn func(LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error) + fn func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error) lnglr LocalNetworkGatewayListResult } -// Next advances to the next page of values. If there was an error making +// NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *LocalNetworkGatewayListResultPage) Next() error { - next, err := page.fn(page.lnglr) +func (page *LocalNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.lnglr) if err != nil { return err } @@ -5233,6 +5356,13 @@ func (page *LocalNetworkGatewayListResultPage) Next() error { return nil } +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *LocalNetworkGatewayListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + // NotDone returns true if the page enumeration should be started or is not yet complete. func (page LocalNetworkGatewayListResultPage) NotDone() bool { return !page.lnglr.IsEmpty() @@ -5251,6 +5381,11 @@ func (page LocalNetworkGatewayListResultPage) Values() []LocalNetworkGateway { return *page.lnglr.Value } +// Creates a new instance of the LocalNetworkGatewayListResultPage type. +func NewLocalNetworkGatewayListResultPage(getNextPage func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)) LocalNetworkGatewayListResultPage { + return LocalNetworkGatewayListResultPage{fn: getNextPage} +} + // LocalNetworkGatewayPropertiesFormat localNetworkGateway properties type LocalNetworkGatewayPropertiesFormat struct { // LocalNetworkAddressSpace - Local network site address space. @@ -5269,97 +5404,51 @@ type LocalNetworkGatewayPropertiesFormat struct { // long-running operation. type LocalNetworkGatewaysCreateOrUpdateFuture struct { azure.Future - req *http.Request } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) { +func (future *LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") return } if !done { - return lng, azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture") - } - if future.PollingMethod() == azure.PollingLocation { - lng, err = client.CreateOrUpdateResponder(future.Response()) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request") - } + err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture") return } - var req *http.Request - var resp *http.Response - if future.PollingURL() != "" { - req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent { + lng, err = client.CreateOrUpdateResponder(lng.Response.Response) if err != nil { - return + err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", lng.Response.Response, "Failure responding to request") } - } else { - req = autorest.ChangeToGet(future.req) - } - resp, err = autorest.SendWithSender(client, req, - autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request") - return - } - lng, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request") } return } -// LocalNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// LocalNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. type LocalNetworkGatewaysDeleteFuture struct { azure.Future - req *http.Request } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) { +func (future *LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure") return } if !done { - return ar, azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture") - } - if future.PollingMethod() == azure.PollingLocation { - ar, err = client.DeleteResponder(future.Response()) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request") - } + err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture") return } - var req *http.Request - var resp *http.Response - if future.PollingURL() != "" { - req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) - if err != nil { - return - } - } else { - req = autorest.ChangeToGet(future.req) - } - resp, err = autorest.SendWithSender(client, req, - autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", resp, "Failure sending request") - return - } - ar, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", resp, "Failure responding to request") - } + ar.Response = future.Response() return } @@ -5561,9 +5650,9 @@ type PublicIPAddress struct { Etag *string `json:"etag,omitempty"` // ID - Resource Identifier. ID *string `json:"id,omitempty"` - // Name - Resource name. + // Name - READ-ONLY; Resource name. Name *string `json:"name,omitempty"` - // Type - Resource type. + // Type - READ-ONLY; Resource type. Type *string `json:"type,omitempty"` // Location - Resource location. Location *string `json:"location,omitempty"` @@ -5583,12 +5672,6 @@ func (pia PublicIPAddress) MarshalJSON() ([]byte, error) { if pia.ID != nil { objectMap["id"] = pia.ID } - if pia.Name != nil { - objectMap["name"] = pia.Name - } - if pia.Type != nil { - objectMap["type"] = pia.Type - } if pia.Location != nil { objectMap["location"] = pia.Location } @@ -5686,51 +5769,31 @@ type PublicIPAddressDNSSettings struct { ReverseFqdn *string `json:"reverseFqdn,omitempty"` } -// PublicIPAddressesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// PublicIPAddressesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. type PublicIPAddressesCreateOrUpdateFuture struct { azure.Future - req *http.Request } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) { +func (future *PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") return } if !done { - return pia, azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture") - } - if future.PollingMethod() == azure.PollingLocation { - pia, err = client.CreateOrUpdateResponder(future.Response()) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request") - } + err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture") return } - var req *http.Request - var resp *http.Response - if future.PollingURL() != "" { - req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent { + pia, err = client.CreateOrUpdateResponder(pia.Response.Response) if err != nil { - return + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", pia.Response.Response, "Failure responding to request") } - } else { - req = autorest.ChangeToGet(future.req) - } - resp, err = autorest.SendWithSender(client, req, - autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", resp, "Failure sending request") - return - } - pia, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", resp, "Failure responding to request") } return } @@ -5739,48 +5802,22 @@ func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddres // operation. type PublicIPAddressesDeleteFuture struct { azure.Future - req *http.Request } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClient) (ar autorest.Response, err error) { +func (future *PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClient) (ar autorest.Response, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Polling failure") return } if !done { - return ar, azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture") - } - if future.PollingMethod() == azure.PollingLocation { - ar, err = client.DeleteResponder(future.Response()) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Failure responding to request") - } + err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture") return } - var req *http.Request - var resp *http.Response - if future.PollingURL() != "" { - req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) - if err != nil { - return - } - } else { - req = autorest.ChangeToGet(future.req) - } - resp, err = autorest.SendWithSender(client, req, - autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", resp, "Failure sending request") - return - } - ar, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", resp, "Failure responding to request") - } + ar.Response = future.Response() return } @@ -5799,14 +5836,24 @@ type PublicIPAddressListResultIterator struct { page PublicIPAddressListResultPage } -// Next advances to the next value. If there was an error making +// NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *PublicIPAddressListResultIterator) Next() error { +func (iter *PublicIPAddressListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } iter.i++ if iter.i < len(iter.page.Values()) { return nil } - err := iter.page.Next() + err = iter.page.NextWithContext(ctx) if err != nil { iter.i-- return err @@ -5815,6 +5862,13 @@ func (iter *PublicIPAddressListResultIterator) Next() error { return nil } +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *PublicIPAddressListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + // NotDone returns true if the enumeration should be started or is not yet complete. func (iter PublicIPAddressListResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) @@ -5834,6 +5888,11 @@ func (iter PublicIPAddressListResultIterator) Value() PublicIPAddress { return iter.page.Values()[iter.i] } +// Creates a new instance of the PublicIPAddressListResultIterator type. +func NewPublicIPAddressListResultIterator(page PublicIPAddressListResultPage) PublicIPAddressListResultIterator { + return PublicIPAddressListResultIterator{page: page} +} + // IsEmpty returns true if the ListResult contains no values. func (pialr PublicIPAddressListResult) IsEmpty() bool { return pialr.Value == nil || len(*pialr.Value) == 0 @@ -5841,11 +5900,11 @@ func (pialr PublicIPAddressListResult) IsEmpty() bool { // publicIPAddressListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (pialr PublicIPAddressListResult) publicIPAddressListResultPreparer() (*http.Request, error) { +func (pialr PublicIPAddressListResult) publicIPAddressListResultPreparer(ctx context.Context) (*http.Request, error) { if pialr.NextLink == nil || len(to.String(pialr.NextLink)) < 1 { return nil, nil } - return autorest.Prepare(&http.Request{}, + return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), autorest.WithBaseURL(to.String(pialr.NextLink))) @@ -5853,14 +5912,24 @@ func (pialr PublicIPAddressListResult) publicIPAddressListResultPreparer() (*htt // PublicIPAddressListResultPage contains a page of PublicIPAddress values. type PublicIPAddressListResultPage struct { - fn func(PublicIPAddressListResult) (PublicIPAddressListResult, error) + fn func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error) pialr PublicIPAddressListResult } -// Next advances to the next page of values. If there was an error making +// NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *PublicIPAddressListResultPage) Next() error { - next, err := page.fn(page.pialr) +func (page *PublicIPAddressListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.pialr) if err != nil { return err } @@ -5868,6 +5937,13 @@ func (page *PublicIPAddressListResultPage) Next() error { return nil } +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *PublicIPAddressListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + // NotDone returns true if the page enumeration should be started or is not yet complete. func (page PublicIPAddressListResultPage) NotDone() bool { return !page.pialr.IsEmpty() @@ -5886,6 +5962,11 @@ func (page PublicIPAddressListResultPage) Values() []PublicIPAddress { return *page.pialr.Value } +// Creates a new instance of the PublicIPAddressListResultPage type. +func NewPublicIPAddressListResultPage(getNextPage func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)) PublicIPAddressListResultPage { + return PublicIPAddressListResultPage{fn: getNextPage} +} + // PublicIPAddressPropertiesFormat public IP address properties. type PublicIPAddressPropertiesFormat struct { // PublicIPAllocationMethod - The public IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic' @@ -5906,9 +5987,9 @@ type PublicIPAddressPropertiesFormat struct { type Resource struct { // ID - Resource Identifier. ID *string `json:"id,omitempty"` - // Name - Resource name. + // Name - READ-ONLY; Resource name. Name *string `json:"name,omitempty"` - // Type - Resource type. + // Type - READ-ONLY; Resource type. Type *string `json:"type,omitempty"` // Location - Resource location. Location *string `json:"location,omitempty"` @@ -5922,12 +6003,6 @@ func (r Resource) MarshalJSON() ([]byte, error) { if r.ID != nil { objectMap["id"] = r.ID } - if r.Name != nil { - objectMap["name"] = r.Name - } - if r.Type != nil { - objectMap["type"] = r.Type - } if r.Location != nil { objectMap["location"] = r.Location } @@ -6033,14 +6108,24 @@ type RouteListResultIterator struct { page RouteListResultPage } -// Next advances to the next value. If there was an error making +// NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *RouteListResultIterator) Next() error { +func (iter *RouteListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } iter.i++ if iter.i < len(iter.page.Values()) { return nil } - err := iter.page.Next() + err = iter.page.NextWithContext(ctx) if err != nil { iter.i-- return err @@ -6049,6 +6134,13 @@ func (iter *RouteListResultIterator) Next() error { return nil } +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *RouteListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + // NotDone returns true if the enumeration should be started or is not yet complete. func (iter RouteListResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) @@ -6068,6 +6160,11 @@ func (iter RouteListResultIterator) Value() Route { return iter.page.Values()[iter.i] } +// Creates a new instance of the RouteListResultIterator type. +func NewRouteListResultIterator(page RouteListResultPage) RouteListResultIterator { + return RouteListResultIterator{page: page} +} + // IsEmpty returns true if the ListResult contains no values. func (rlr RouteListResult) IsEmpty() bool { return rlr.Value == nil || len(*rlr.Value) == 0 @@ -6075,11 +6172,11 @@ func (rlr RouteListResult) IsEmpty() bool { // routeListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (rlr RouteListResult) routeListResultPreparer() (*http.Request, error) { +func (rlr RouteListResult) routeListResultPreparer(ctx context.Context) (*http.Request, error) { if rlr.NextLink == nil || len(to.String(rlr.NextLink)) < 1 { return nil, nil } - return autorest.Prepare(&http.Request{}, + return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), autorest.WithBaseURL(to.String(rlr.NextLink))) @@ -6087,14 +6184,24 @@ func (rlr RouteListResult) routeListResultPreparer() (*http.Request, error) { // RouteListResultPage contains a page of Route values. type RouteListResultPage struct { - fn func(RouteListResult) (RouteListResult, error) + fn func(context.Context, RouteListResult) (RouteListResult, error) rlr RouteListResult } -// Next advances to the next page of values. If there was an error making +// NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *RouteListResultPage) Next() error { - next, err := page.fn(page.rlr) +func (page *RouteListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.rlr) if err != nil { return err } @@ -6102,6 +6209,13 @@ func (page *RouteListResultPage) Next() error { return nil } +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *RouteListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + // NotDone returns true if the page enumeration should be started or is not yet complete. func (page RouteListResultPage) NotDone() bool { return !page.rlr.IsEmpty() @@ -6120,6 +6234,11 @@ func (page RouteListResultPage) Values() []Route { return *page.rlr.Value } +// Creates a new instance of the RouteListResultPage type. +func NewRouteListResultPage(getNextPage func(context.Context, RouteListResult) (RouteListResult, error)) RouteListResultPage { + return RouteListResultPage{fn: getNextPage} +} + // RoutePropertiesFormat route resource type RoutePropertiesFormat struct { // AddressPrefix - The destination CIDR to which the route applies. @@ -6132,50 +6251,31 @@ type RoutePropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation. +// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. type RoutesCreateOrUpdateFuture struct { azure.Future - req *http.Request } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, err error) { +func (future *RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") return } if !done { - return r, azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture") - } - if future.PollingMethod() == azure.PollingLocation { - r, err = client.CreateOrUpdateResponder(future.Response()) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request") - } + err = azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture") return } - var req *http.Request - var resp *http.Response - if future.PollingURL() != "" { - req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent { + r, err = client.CreateOrUpdateResponder(r.Response.Response) if err != nil { - return + err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", r.Response.Response, "Failure responding to request") } - } else { - req = autorest.ChangeToGet(future.req) - } - resp, err = autorest.SendWithSender(client, req, - autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", resp, "Failure sending request") - return - } - r, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", resp, "Failure responding to request") } return } @@ -6183,48 +6283,22 @@ func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, e // RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. type RoutesDeleteFuture struct { azure.Future - req *http.Request } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Response, err error) { +func (future *RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Response, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Polling failure") return } if !done { - return ar, azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture") - } - if future.PollingMethod() == azure.PollingLocation { - ar, err = client.DeleteResponder(future.Response()) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Failure responding to request") - } + err = azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture") return } - var req *http.Request - var resp *http.Response - if future.PollingURL() != "" { - req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) - if err != nil { - return - } - } else { - req = autorest.ChangeToGet(future.req) - } - resp, err = autorest.SendWithSender(client, req, - autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", resp, "Failure sending request") - return - } - ar, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", resp, "Failure responding to request") - } + ar.Response = future.Response() return } @@ -6236,9 +6310,9 @@ type RouteTable struct { Etag *string `json:"etag,omitempty"` // ID - Resource Identifier. ID *string `json:"id,omitempty"` - // Name - Resource name. + // Name - READ-ONLY; Resource name. Name *string `json:"name,omitempty"` - // Type - Resource type. + // Type - READ-ONLY; Resource type. Type *string `json:"type,omitempty"` // Location - Resource location. Location *string `json:"location,omitempty"` @@ -6258,12 +6332,6 @@ func (rt RouteTable) MarshalJSON() ([]byte, error) { if rt.ID != nil { objectMap["id"] = rt.ID } - if rt.Name != nil { - objectMap["name"] = rt.Name - } - if rt.Type != nil { - objectMap["type"] = rt.Type - } if rt.Location != nil { objectMap["location"] = rt.Location } @@ -6366,14 +6434,24 @@ type RouteTableListResultIterator struct { page RouteTableListResultPage } -// Next advances to the next value. If there was an error making +// NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *RouteTableListResultIterator) Next() error { +func (iter *RouteTableListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } iter.i++ if iter.i < len(iter.page.Values()) { return nil } - err := iter.page.Next() + err = iter.page.NextWithContext(ctx) if err != nil { iter.i-- return err @@ -6382,6 +6460,13 @@ func (iter *RouteTableListResultIterator) Next() error { return nil } +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *RouteTableListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + // NotDone returns true if the enumeration should be started or is not yet complete. func (iter RouteTableListResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) @@ -6401,6 +6486,11 @@ func (iter RouteTableListResultIterator) Value() RouteTable { return iter.page.Values()[iter.i] } +// Creates a new instance of the RouteTableListResultIterator type. +func NewRouteTableListResultIterator(page RouteTableListResultPage) RouteTableListResultIterator { + return RouteTableListResultIterator{page: page} +} + // IsEmpty returns true if the ListResult contains no values. func (rtlr RouteTableListResult) IsEmpty() bool { return rtlr.Value == nil || len(*rtlr.Value) == 0 @@ -6408,11 +6498,11 @@ func (rtlr RouteTableListResult) IsEmpty() bool { // routeTableListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (rtlr RouteTableListResult) routeTableListResultPreparer() (*http.Request, error) { +func (rtlr RouteTableListResult) routeTableListResultPreparer(ctx context.Context) (*http.Request, error) { if rtlr.NextLink == nil || len(to.String(rtlr.NextLink)) < 1 { return nil, nil } - return autorest.Prepare(&http.Request{}, + return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), autorest.WithBaseURL(to.String(rtlr.NextLink))) @@ -6420,14 +6510,24 @@ func (rtlr RouteTableListResult) routeTableListResultPreparer() (*http.Request, // RouteTableListResultPage contains a page of RouteTable values. type RouteTableListResultPage struct { - fn func(RouteTableListResult) (RouteTableListResult, error) + fn func(context.Context, RouteTableListResult) (RouteTableListResult, error) rtlr RouteTableListResult } -// Next advances to the next page of values. If there was an error making +// NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *RouteTableListResultPage) Next() error { - next, err := page.fn(page.rtlr) +func (page *RouteTableListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.rtlr) if err != nil { return err } @@ -6435,6 +6535,13 @@ func (page *RouteTableListResultPage) Next() error { return nil } +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *RouteTableListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + // NotDone returns true if the page enumeration should be started or is not yet complete. func (page RouteTableListResultPage) NotDone() bool { return !page.rtlr.IsEmpty() @@ -6453,6 +6560,11 @@ func (page RouteTableListResultPage) Values() []RouteTable { return *page.rtlr.Value } +// Creates a new instance of the RouteTableListResultPage type. +func NewRouteTableListResultPage(getNextPage func(context.Context, RouteTableListResult) (RouteTableListResult, error)) RouteTableListResultPage { + return RouteTableListResultPage{fn: getNextPage} +} + // RouteTablePropertiesFormat route Table resource type RouteTablePropertiesFormat struct { // Routes - Collection of routes contained within a route table. @@ -6463,100 +6575,55 @@ type RouteTablePropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// RouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// RouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. type RouteTablesCreateOrUpdateFuture struct { azure.Future - req *http.Request } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (rt RouteTable, err error) { +func (future *RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (rt RouteTable, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") return } if !done { - return rt, azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture") - } - if future.PollingMethod() == azure.PollingLocation { - rt, err = client.CreateOrUpdateResponder(future.Response()) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request") - } + err = azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture") return } - var req *http.Request - var resp *http.Response - if future.PollingURL() != "" { - req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent { + rt, err = client.CreateOrUpdateResponder(rt.Response.Response) if err != nil { - return + err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", rt.Response.Response, "Failure responding to request") } - } else { - req = autorest.ChangeToGet(future.req) - } - resp, err = autorest.SendWithSender(client, req, - autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", resp, "Failure sending request") - return - } - rt, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", resp, "Failure responding to request") } return } -// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. +// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. type RouteTablesDeleteFuture struct { azure.Future - req *http.Request } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autorest.Response, err error) { +func (future *RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autorest.Response, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Polling failure") return } if !done { - return ar, azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture") - } - if future.PollingMethod() == azure.PollingLocation { - ar, err = client.DeleteResponder(future.Response()) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Failure responding to request") - } + err = azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture") return } - var req *http.Request - var resp *http.Response - if future.PollingURL() != "" { - req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) - if err != nil { - return - } - } else { - req = autorest.ChangeToGet(future.req) - } - resp, err = autorest.SendWithSender(client, req, - autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", resp, "Failure sending request") - return - } - ar, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", resp, "Failure responding to request") - } + ar.Response = future.Response() return } @@ -6568,9 +6635,9 @@ type SecurityGroup struct { Etag *string `json:"etag,omitempty"` // ID - Resource Identifier. ID *string `json:"id,omitempty"` - // Name - Resource name. + // Name - READ-ONLY; Resource name. Name *string `json:"name,omitempty"` - // Type - Resource type. + // Type - READ-ONLY; Resource type. Type *string `json:"type,omitempty"` // Location - Resource location. Location *string `json:"location,omitempty"` @@ -6590,12 +6657,6 @@ func (sg SecurityGroup) MarshalJSON() ([]byte, error) { if sg.ID != nil { objectMap["id"] = sg.ID } - if sg.Name != nil { - objectMap["name"] = sg.Name - } - if sg.Type != nil { - objectMap["type"] = sg.Type - } if sg.Location != nil { objectMap["location"] = sg.Location } @@ -6698,14 +6759,24 @@ type SecurityGroupListResultIterator struct { page SecurityGroupListResultPage } -// Next advances to the next value. If there was an error making +// NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *SecurityGroupListResultIterator) Next() error { +func (iter *SecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } iter.i++ if iter.i < len(iter.page.Values()) { return nil } - err := iter.page.Next() + err = iter.page.NextWithContext(ctx) if err != nil { iter.i-- return err @@ -6714,6 +6785,13 @@ func (iter *SecurityGroupListResultIterator) Next() error { return nil } +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *SecurityGroupListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + // NotDone returns true if the enumeration should be started or is not yet complete. func (iter SecurityGroupListResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) @@ -6733,6 +6811,11 @@ func (iter SecurityGroupListResultIterator) Value() SecurityGroup { return iter.page.Values()[iter.i] } +// Creates a new instance of the SecurityGroupListResultIterator type. +func NewSecurityGroupListResultIterator(page SecurityGroupListResultPage) SecurityGroupListResultIterator { + return SecurityGroupListResultIterator{page: page} +} + // IsEmpty returns true if the ListResult contains no values. func (sglr SecurityGroupListResult) IsEmpty() bool { return sglr.Value == nil || len(*sglr.Value) == 0 @@ -6740,11 +6823,11 @@ func (sglr SecurityGroupListResult) IsEmpty() bool { // securityGroupListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (sglr SecurityGroupListResult) securityGroupListResultPreparer() (*http.Request, error) { +func (sglr SecurityGroupListResult) securityGroupListResultPreparer(ctx context.Context) (*http.Request, error) { if sglr.NextLink == nil || len(to.String(sglr.NextLink)) < 1 { return nil, nil } - return autorest.Prepare(&http.Request{}, + return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), autorest.WithBaseURL(to.String(sglr.NextLink))) @@ -6752,14 +6835,24 @@ func (sglr SecurityGroupListResult) securityGroupListResultPreparer() (*http.Req // SecurityGroupListResultPage contains a page of SecurityGroup values. type SecurityGroupListResultPage struct { - fn func(SecurityGroupListResult) (SecurityGroupListResult, error) + fn func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error) sglr SecurityGroupListResult } -// Next advances to the next page of values. If there was an error making +// NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *SecurityGroupListResultPage) Next() error { - next, err := page.fn(page.sglr) +func (page *SecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.sglr) if err != nil { return err } @@ -6767,6 +6860,13 @@ func (page *SecurityGroupListResultPage) Next() error { return nil } +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *SecurityGroupListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + // NotDone returns true if the page enumeration should be started or is not yet complete. func (page SecurityGroupListResultPage) NotDone() bool { return !page.sglr.IsEmpty() @@ -6785,6 +6885,11 @@ func (page SecurityGroupListResultPage) Values() []SecurityGroup { return *page.sglr.Value } +// Creates a new instance of the SecurityGroupListResultPage type. +func NewSecurityGroupListResultPage(getNextPage func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)) SecurityGroupListResultPage { + return SecurityGroupListResultPage{fn: getNextPage} +} + // SecurityGroupPropertiesFormat network Security Group resource. type SecurityGroupPropertiesFormat struct { // SecurityRules - A collection of security rules of the network security group. @@ -6801,100 +6906,55 @@ type SecurityGroupPropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// SecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// SecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. type SecurityGroupsCreateOrUpdateFuture struct { azure.Future - req *http.Request } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) { +func (future *SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") return } if !done { - return sg, azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture") - } - if future.PollingMethod() == azure.PollingLocation { - sg, err = client.CreateOrUpdateResponder(future.Response()) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request") - } + err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture") return } - var req *http.Request - var resp *http.Response - if future.PollingURL() != "" { - req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent { + sg, err = client.CreateOrUpdateResponder(sg.Response.Response) if err != nil { - return + err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request") } - } else { - req = autorest.ChangeToGet(future.req) - } - resp, err = autorest.SendWithSender(client, req, - autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure sending request") - return - } - sg, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure responding to request") } return } -// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. +// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. type SecurityGroupsDeleteFuture struct { azure.Future - req *http.Request } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar autorest.Response, err error) { +func (future *SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar autorest.Response, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure") return } if !done { - return ar, azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture") - } - if future.PollingMethod() == azure.PollingLocation { - ar, err = client.DeleteResponder(future.Response()) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Failure responding to request") - } + err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture") return } - var req *http.Request - var resp *http.Response - if future.PollingURL() != "" { - req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) - if err != nil { - return - } - } else { - req = autorest.ChangeToGet(future.req) - } - resp, err = autorest.SendWithSender(client, req, - autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", resp, "Failure sending request") - return - } - ar, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", resp, "Failure responding to request") - } + ar.Response = future.Response() return } @@ -6979,8 +7039,8 @@ func (sr *SecurityRule) UnmarshalJSON(body []byte) error { return nil } -// SecurityRuleListResult response for ListSecurityRule API service call. Retrieves all security rules that belongs -// to a network security group. +// SecurityRuleListResult response for ListSecurityRule API service call. Retrieves all security rules that +// belongs to a network security group. type SecurityRuleListResult struct { autorest.Response `json:"-"` // Value - The security rules in a network security group. @@ -6995,14 +7055,24 @@ type SecurityRuleListResultIterator struct { page SecurityRuleListResultPage } -// Next advances to the next value. If there was an error making +// NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *SecurityRuleListResultIterator) Next() error { +func (iter *SecurityRuleListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } iter.i++ if iter.i < len(iter.page.Values()) { return nil } - err := iter.page.Next() + err = iter.page.NextWithContext(ctx) if err != nil { iter.i-- return err @@ -7011,6 +7081,13 @@ func (iter *SecurityRuleListResultIterator) Next() error { return nil } +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *SecurityRuleListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + // NotDone returns true if the enumeration should be started or is not yet complete. func (iter SecurityRuleListResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) @@ -7030,6 +7107,11 @@ func (iter SecurityRuleListResultIterator) Value() SecurityRule { return iter.page.Values()[iter.i] } +// Creates a new instance of the SecurityRuleListResultIterator type. +func NewSecurityRuleListResultIterator(page SecurityRuleListResultPage) SecurityRuleListResultIterator { + return SecurityRuleListResultIterator{page: page} +} + // IsEmpty returns true if the ListResult contains no values. func (srlr SecurityRuleListResult) IsEmpty() bool { return srlr.Value == nil || len(*srlr.Value) == 0 @@ -7037,11 +7119,11 @@ func (srlr SecurityRuleListResult) IsEmpty() bool { // securityRuleListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (srlr SecurityRuleListResult) securityRuleListResultPreparer() (*http.Request, error) { +func (srlr SecurityRuleListResult) securityRuleListResultPreparer(ctx context.Context) (*http.Request, error) { if srlr.NextLink == nil || len(to.String(srlr.NextLink)) < 1 { return nil, nil } - return autorest.Prepare(&http.Request{}, + return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), autorest.WithBaseURL(to.String(srlr.NextLink))) @@ -7049,14 +7131,24 @@ func (srlr SecurityRuleListResult) securityRuleListResultPreparer() (*http.Reque // SecurityRuleListResultPage contains a page of SecurityRule values. type SecurityRuleListResultPage struct { - fn func(SecurityRuleListResult) (SecurityRuleListResult, error) + fn func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error) srlr SecurityRuleListResult } -// Next advances to the next page of values. If there was an error making +// NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *SecurityRuleListResultPage) Next() error { - next, err := page.fn(page.srlr) +func (page *SecurityRuleListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.srlr) if err != nil { return err } @@ -7064,6 +7156,13 @@ func (page *SecurityRuleListResultPage) Next() error { return nil } +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *SecurityRuleListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + // NotDone returns true if the page enumeration should be started or is not yet complete. func (page SecurityRuleListResultPage) NotDone() bool { return !page.srlr.IsEmpty() @@ -7082,124 +7181,84 @@ func (page SecurityRuleListResultPage) Values() []SecurityRule { return *page.srlr.Value } +// Creates a new instance of the SecurityRuleListResultPage type. +func NewSecurityRuleListResultPage(getNextPage func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)) SecurityRuleListResultPage { + return SecurityRuleListResultPage{fn: getNextPage} +} + // SecurityRulePropertiesFormat ... type SecurityRulePropertiesFormat struct { // Description - A description for this rule. Restricted to 140 chars. Description *string `json:"description,omitempty"` // Protocol - Network protocol this rule applies to. Possible values are 'Tcp', 'Udp', and '*'. Possible values include: 'TCP', 'UDP', 'Asterisk' Protocol SecurityRuleProtocol `json:"protocol,omitempty"` - // SourcePortRange - The source port or range. Integer or range between 0 and 65535. Asterix '*' can also be used to match all ports. + // SourcePortRange - The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports. SourcePortRange *string `json:"sourcePortRange,omitempty"` - // DestinationPortRange - The destination port or range. Integer or range between 0 and 65535. Asterix '*' can also be used to match all ports. + // DestinationPortRange - The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports. DestinationPortRange *string `json:"destinationPortRange,omitempty"` - // SourceAddressPrefix - The CIDR or source IP range. Asterix '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from. + // SourceAddressPrefix - The CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from. SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - // DestinationAddressPrefix - The destination address prefix. CIDR or source IP range. Asterix '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. + // DestinationAddressPrefix - The destination address prefix. CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` // Access - The network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'Allow', 'Deny' Access SecurityRuleAccess `json:"access,omitempty"` // Priority - The priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. Priority *int32 `json:"priority,omitempty"` - // Direction - The direction of the rule. The direction specifies if rule will be evaluated on incoming or outcoming traffic. Possible values are: 'Inbound' and 'Outbound'. Possible values include: 'Inbound', 'Outbound' + // Direction - The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values are: 'Inbound' and 'Outbound'. Possible values include: 'Inbound', 'Outbound' Direction SecurityRuleDirection `json:"direction,omitempty"` // ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. ProvisioningState *string `json:"provisioningState,omitempty"` } -// SecurityRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// SecurityRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. type SecurityRulesCreateOrUpdateFuture struct { azure.Future - req *http.Request } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClient) (sr SecurityRule, err error) { +func (future *SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClient) (sr SecurityRule, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") return } if !done { - return sr, azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture") - } - if future.PollingMethod() == azure.PollingLocation { - sr, err = client.CreateOrUpdateResponder(future.Response()) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request") - } + err = azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture") return } - var req *http.Request - var resp *http.Response - if future.PollingURL() != "" { - req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent { + sr, err = client.CreateOrUpdateResponder(sr.Response.Response) if err != nil { - return + err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request") } - } else { - req = autorest.ChangeToGet(future.req) - } - resp, err = autorest.SendWithSender(client, req, - autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", resp, "Failure sending request") - return - } - sr, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", resp, "Failure responding to request") } return } -// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. +// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. type SecurityRulesDeleteFuture struct { azure.Future - req *http.Request } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar autorest.Response, err error) { +func (future *SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar autorest.Response, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Polling failure") return } if !done { - return ar, azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture") - } - if future.PollingMethod() == azure.PollingLocation { - ar, err = client.DeleteResponder(future.Response()) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Failure responding to request") - } + err = azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture") return } - var req *http.Request - var resp *http.Response - if future.PollingURL() != "" { - req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) - if err != nil { - return - } - } else { - req = autorest.ChangeToGet(future.req) - } - resp, err = autorest.SendWithSender(client, req, - autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", resp, "Failure sending request") - return - } - ar, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", resp, "Failure responding to request") - } + ar.Response = future.Response() return } @@ -7290,7 +7349,8 @@ func (s *Subnet) UnmarshalJSON(body []byte) error { return nil } -// SubnetListResult response for ListSubnets API service callRetrieves all subnet that belongs to a virtual network +// SubnetListResult response for ListSubnets API service callRetrieves all subnet that belongs to a virtual +// network type SubnetListResult struct { autorest.Response `json:"-"` // Value - The subnets in a virtual network. @@ -7305,14 +7365,24 @@ type SubnetListResultIterator struct { page SubnetListResultPage } -// Next advances to the next value. If there was an error making +// NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *SubnetListResultIterator) Next() error { +func (iter *SubnetListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } iter.i++ if iter.i < len(iter.page.Values()) { return nil } - err := iter.page.Next() + err = iter.page.NextWithContext(ctx) if err != nil { iter.i-- return err @@ -7321,6 +7391,13 @@ func (iter *SubnetListResultIterator) Next() error { return nil } +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *SubnetListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + // NotDone returns true if the enumeration should be started or is not yet complete. func (iter SubnetListResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) @@ -7340,6 +7417,11 @@ func (iter SubnetListResultIterator) Value() Subnet { return iter.page.Values()[iter.i] } +// Creates a new instance of the SubnetListResultIterator type. +func NewSubnetListResultIterator(page SubnetListResultPage) SubnetListResultIterator { + return SubnetListResultIterator{page: page} +} + // IsEmpty returns true if the ListResult contains no values. func (slr SubnetListResult) IsEmpty() bool { return slr.Value == nil || len(*slr.Value) == 0 @@ -7347,11 +7429,11 @@ func (slr SubnetListResult) IsEmpty() bool { // subnetListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (slr SubnetListResult) subnetListResultPreparer() (*http.Request, error) { +func (slr SubnetListResult) subnetListResultPreparer(ctx context.Context) (*http.Request, error) { if slr.NextLink == nil || len(to.String(slr.NextLink)) < 1 { return nil, nil } - return autorest.Prepare(&http.Request{}, + return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), autorest.WithBaseURL(to.String(slr.NextLink))) @@ -7359,14 +7441,24 @@ func (slr SubnetListResult) subnetListResultPreparer() (*http.Request, error) { // SubnetListResultPage contains a page of Subnet values. type SubnetListResultPage struct { - fn func(SubnetListResult) (SubnetListResult, error) + fn func(context.Context, SubnetListResult) (SubnetListResult, error) slr SubnetListResult } -// Next advances to the next page of values. If there was an error making +// NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *SubnetListResultPage) Next() error { - next, err := page.fn(page.slr) +func (page *SubnetListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.slr) if err != nil { return err } @@ -7374,6 +7466,13 @@ func (page *SubnetListResultPage) Next() error { return nil } +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *SubnetListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + // NotDone returns true if the page enumeration should be started or is not yet complete. func (page SubnetListResultPage) NotDone() bool { return !page.slr.IsEmpty() @@ -7392,6 +7491,11 @@ func (page SubnetListResultPage) Values() []Subnet { return *page.slr.Value } +// Creates a new instance of the SubnetListResultPage type. +func NewSubnetListResultPage(getNextPage func(context.Context, SubnetListResult) (SubnetListResult, error)) SubnetListResultPage { + return SubnetListResultPage{fn: getNextPage} +} + // SubnetPropertiesFormat ... type SubnetPropertiesFormat struct { // AddressPrefix - The address prefix for the subnet. @@ -7410,96 +7514,51 @@ type SubnetPropertiesFormat struct { // operation. type SubnetsCreateOrUpdateFuture struct { azure.Future - req *http.Request } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet, err error) { +func (future *SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") return } if !done { - return s, azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture") - } - if future.PollingMethod() == azure.PollingLocation { - s, err = client.CreateOrUpdateResponder(future.Response()) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request") - } + err = azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture") return } - var req *http.Request - var resp *http.Response - if future.PollingURL() != "" { - req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { + s, err = client.CreateOrUpdateResponder(s.Response.Response) if err != nil { - return + err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request") } - } else { - req = autorest.ChangeToGet(future.req) - } - resp, err = autorest.SendWithSender(client, req, - autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", resp, "Failure sending request") - return - } - s, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", resp, "Failure responding to request") } return } -// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. +// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. type SubnetsDeleteFuture struct { azure.Future - req *http.Request } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Response, err error) { +func (future *SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Response, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Polling failure") return } if !done { - return ar, azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture") - } - if future.PollingMethod() == azure.PollingLocation { - ar, err = client.DeleteResponder(future.Response()) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Failure responding to request") - } + err = azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture") return } - var req *http.Request - var resp *http.Response - if future.PollingURL() != "" { - req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) - if err != nil { - return - } - } else { - req = autorest.ChangeToGet(future.req) - } - resp, err = autorest.SendWithSender(client, req, - autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", resp, "Failure sending request") - return - } - ar, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", resp, "Failure responding to request") - } + ar.Response = future.Response() return } @@ -7544,14 +7603,24 @@ type UsagesListResultIterator struct { page UsagesListResultPage } -// Next advances to the next value. If there was an error making +// NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *UsagesListResultIterator) Next() error { +func (iter *UsagesListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } iter.i++ if iter.i < len(iter.page.Values()) { return nil } - err := iter.page.Next() + err = iter.page.NextWithContext(ctx) if err != nil { iter.i-- return err @@ -7560,6 +7629,13 @@ func (iter *UsagesListResultIterator) Next() error { return nil } +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *UsagesListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + // NotDone returns true if the enumeration should be started or is not yet complete. func (iter UsagesListResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) @@ -7579,6 +7655,11 @@ func (iter UsagesListResultIterator) Value() Usage { return iter.page.Values()[iter.i] } +// Creates a new instance of the UsagesListResultIterator type. +func NewUsagesListResultIterator(page UsagesListResultPage) UsagesListResultIterator { + return UsagesListResultIterator{page: page} +} + // IsEmpty returns true if the ListResult contains no values. func (ulr UsagesListResult) IsEmpty() bool { return ulr.Value == nil || len(*ulr.Value) == 0 @@ -7586,11 +7667,11 @@ func (ulr UsagesListResult) IsEmpty() bool { // usagesListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (ulr UsagesListResult) usagesListResultPreparer() (*http.Request, error) { +func (ulr UsagesListResult) usagesListResultPreparer(ctx context.Context) (*http.Request, error) { if ulr.NextLink == nil || len(to.String(ulr.NextLink)) < 1 { return nil, nil } - return autorest.Prepare(&http.Request{}, + return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), autorest.WithBaseURL(to.String(ulr.NextLink))) @@ -7598,14 +7679,24 @@ func (ulr UsagesListResult) usagesListResultPreparer() (*http.Request, error) { // UsagesListResultPage contains a page of Usage values. type UsagesListResultPage struct { - fn func(UsagesListResult) (UsagesListResult, error) + fn func(context.Context, UsagesListResult) (UsagesListResult, error) ulr UsagesListResult } -// Next advances to the next page of values. If there was an error making +// NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *UsagesListResultPage) Next() error { - next, err := page.fn(page.ulr) +func (page *UsagesListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.ulr) if err != nil { return err } @@ -7613,6 +7704,13 @@ func (page *UsagesListResultPage) Next() error { return nil } +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *UsagesListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + // NotDone returns true if the page enumeration should be started or is not yet complete. func (page UsagesListResultPage) NotDone() bool { return !page.ulr.IsEmpty() @@ -7631,6 +7729,11 @@ func (page UsagesListResultPage) Values() []Usage { return *page.ulr.Value } +// Creates a new instance of the UsagesListResultPage type. +func NewUsagesListResultPage(getNextPage func(context.Context, UsagesListResult) (UsagesListResult, error)) UsagesListResultPage { + return UsagesListResultPage{fn: getNextPage} +} + // VirtualNetwork virtual Network resource. type VirtualNetwork struct { autorest.Response `json:"-"` @@ -7639,9 +7742,9 @@ type VirtualNetwork struct { Etag *string `json:"etag,omitempty"` // ID - Resource Identifier. ID *string `json:"id,omitempty"` - // Name - Resource name. + // Name - READ-ONLY; Resource name. Name *string `json:"name,omitempty"` - // Type - Resource type. + // Type - READ-ONLY; Resource type. Type *string `json:"type,omitempty"` // Location - Resource location. Location *string `json:"location,omitempty"` @@ -7661,12 +7764,6 @@ func (vn VirtualNetwork) MarshalJSON() ([]byte, error) { if vn.ID != nil { objectMap["id"] = vn.ID } - if vn.Name != nil { - objectMap["name"] = vn.Name - } - if vn.Type != nil { - objectMap["type"] = vn.Type - } if vn.Location != nil { objectMap["location"] = vn.Location } @@ -7762,9 +7859,9 @@ type VirtualNetworkGateway struct { Etag *string `json:"etag,omitempty"` // ID - Resource Identifier. ID *string `json:"id,omitempty"` - // Name - Resource name. + // Name - READ-ONLY; Resource name. Name *string `json:"name,omitempty"` - // Type - Resource type. + // Type - READ-ONLY; Resource type. Type *string `json:"type,omitempty"` // Location - Resource location. Location *string `json:"location,omitempty"` @@ -7784,12 +7881,6 @@ func (vng VirtualNetworkGateway) MarshalJSON() ([]byte, error) { if vng.ID != nil { objectMap["id"] = vng.ID } - if vng.Name != nil { - objectMap["name"] = vng.Name - } - if vng.Type != nil { - objectMap["type"] = vng.Type - } if vng.Location != nil { objectMap["location"] = vng.Location } @@ -7885,9 +7976,9 @@ type VirtualNetworkGatewayConnection struct { Etag *string `json:"etag,omitempty"` // ID - Resource Identifier. ID *string `json:"id,omitempty"` - // Name - Resource name. + // Name - READ-ONLY; Resource name. Name *string `json:"name,omitempty"` - // Type - Resource type. + // Type - READ-ONLY; Resource type. Type *string `json:"type,omitempty"` // Location - Resource location. Location *string `json:"location,omitempty"` @@ -7907,12 +7998,6 @@ func (vngc VirtualNetworkGatewayConnection) MarshalJSON() ([]byte, error) { if vngc.ID != nil { objectMap["id"] = vngc.ID } - if vngc.Name != nil { - objectMap["name"] = vngc.Name - } - if vngc.Type != nil { - objectMap["type"] = vngc.Type - } if vngc.Location != nil { objectMap["location"] = vngc.Location } @@ -8000,7 +8085,8 @@ func (vngc *VirtualNetworkGatewayConnection) UnmarshalJSON(body []byte) error { return nil } -// VirtualNetworkGatewayConnectionListResult response for the ListVirtualNetworkGatewayConnections API service call +// VirtualNetworkGatewayConnectionListResult response for the ListVirtualNetworkGatewayConnections API +// service call type VirtualNetworkGatewayConnectionListResult struct { autorest.Response `json:"-"` // Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group. @@ -8016,14 +8102,24 @@ type VirtualNetworkGatewayConnectionListResultIterator struct { page VirtualNetworkGatewayConnectionListResultPage } -// Next advances to the next value. If there was an error making +// NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *VirtualNetworkGatewayConnectionListResultIterator) Next() error { +func (iter *VirtualNetworkGatewayConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } iter.i++ if iter.i < len(iter.page.Values()) { return nil } - err := iter.page.Next() + err = iter.page.NextWithContext(ctx) if err != nil { iter.i-- return err @@ -8032,6 +8128,13 @@ func (iter *VirtualNetworkGatewayConnectionListResultIterator) Next() error { return nil } +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *VirtualNetworkGatewayConnectionListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + // NotDone returns true if the enumeration should be started or is not yet complete. func (iter VirtualNetworkGatewayConnectionListResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) @@ -8051,6 +8154,11 @@ func (iter VirtualNetworkGatewayConnectionListResultIterator) Value() VirtualNet return iter.page.Values()[iter.i] } +// Creates a new instance of the VirtualNetworkGatewayConnectionListResultIterator type. +func NewVirtualNetworkGatewayConnectionListResultIterator(page VirtualNetworkGatewayConnectionListResultPage) VirtualNetworkGatewayConnectionListResultIterator { + return VirtualNetworkGatewayConnectionListResultIterator{page: page} +} + // IsEmpty returns true if the ListResult contains no values. func (vngclr VirtualNetworkGatewayConnectionListResult) IsEmpty() bool { return vngclr.Value == nil || len(*vngclr.Value) == 0 @@ -8058,11 +8166,11 @@ func (vngclr VirtualNetworkGatewayConnectionListResult) IsEmpty() bool { // virtualNetworkGatewayConnectionListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (vngclr VirtualNetworkGatewayConnectionListResult) virtualNetworkGatewayConnectionListResultPreparer() (*http.Request, error) { +func (vngclr VirtualNetworkGatewayConnectionListResult) virtualNetworkGatewayConnectionListResultPreparer(ctx context.Context) (*http.Request, error) { if vngclr.NextLink == nil || len(to.String(vngclr.NextLink)) < 1 { return nil, nil } - return autorest.Prepare(&http.Request{}, + return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), autorest.WithBaseURL(to.String(vngclr.NextLink))) @@ -8070,14 +8178,24 @@ func (vngclr VirtualNetworkGatewayConnectionListResult) virtualNetworkGatewayCon // VirtualNetworkGatewayConnectionListResultPage contains a page of VirtualNetworkGatewayConnection values. type VirtualNetworkGatewayConnectionListResultPage struct { - fn func(VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error) + fn func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error) vngclr VirtualNetworkGatewayConnectionListResult } -// Next advances to the next page of values. If there was an error making +// NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *VirtualNetworkGatewayConnectionListResultPage) Next() error { - next, err := page.fn(page.vngclr) +func (page *VirtualNetworkGatewayConnectionListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.vngclr) if err != nil { return err } @@ -8085,6 +8203,13 @@ func (page *VirtualNetworkGatewayConnectionListResultPage) Next() error { return nil } +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *VirtualNetworkGatewayConnectionListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + // NotDone returns true if the page enumeration should be started or is not yet complete. func (page VirtualNetworkGatewayConnectionListResultPage) NotDone() bool { return !page.vngclr.IsEmpty() @@ -8103,6 +8228,11 @@ func (page VirtualNetworkGatewayConnectionListResultPage) Values() []VirtualNetw return *page.vngclr.Value } +// Creates a new instance of the VirtualNetworkGatewayConnectionListResultPage type. +func NewVirtualNetworkGatewayConnectionListResultPage(getNextPage func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)) VirtualNetworkGatewayConnectionListResultPage { + return VirtualNetworkGatewayConnectionListResultPage{fn: getNextPage} +} + // VirtualNetworkGatewayConnectionPropertiesFormat virtualNetworkGatewayConnection properties type VirtualNetworkGatewayConnectionPropertiesFormat struct { // AuthorizationKey - The authorizationKey. @@ -8110,7 +8240,7 @@ type VirtualNetworkGatewayConnectionPropertiesFormat struct { VirtualNetworkGateway1 *VirtualNetworkGateway `json:"virtualNetworkGateway1,omitempty"` VirtualNetworkGateway2 *VirtualNetworkGateway `json:"virtualNetworkGateway2,omitempty"` LocalNetworkGateway2 *LocalNetworkGateway `json:"localNetworkGateway2,omitempty"` - // ConnectionType - Gateway connection type. Possible values are: 'Ipsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient' + // ConnectionType - Gateway connection type. Possible values are: 'IPsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient' ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"` // RoutingWeight - The routing weight. RoutingWeight *int32 `json:"routingWeight,omitempty"` @@ -8132,198 +8262,112 @@ type VirtualNetworkGatewayConnectionPropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// VirtualNetworkGatewayConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of -// a long-running operation. +// VirtualNetworkGatewayConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct { azure.Future - req *http.Request } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) { +func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") return } if !done { - return vngc, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture") - } - if future.PollingMethod() == azure.PollingLocation { - vngc, err = client.CreateOrUpdateResponder(future.Response()) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request") - } + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture") return } - var req *http.Request - var resp *http.Response - if future.PollingURL() != "" { - req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent { + vngc, err = client.CreateOrUpdateResponder(vngc.Response.Response) if err != nil { - return + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", vngc.Response.Response, "Failure responding to request") } - } else { - req = autorest.ChangeToGet(future.req) - } - resp, err = autorest.SendWithSender(client, req, - autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", resp, "Failure sending request") - return - } - vngc, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", resp, "Failure responding to request") } return } -// VirtualNetworkGatewayConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. +// VirtualNetworkGatewayConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. type VirtualNetworkGatewayConnectionsDeleteFuture struct { azure.Future - req *http.Request } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) { +func (future *VirtualNetworkGatewayConnectionsDeleteFuture) Result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Polling failure") return } if !done { - return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture") - } - if future.PollingMethod() == azure.PollingLocation { - ar, err = client.DeleteResponder(future.Response()) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Failure responding to request") - } + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture") return } - var req *http.Request - var resp *http.Response - if future.PollingURL() != "" { - req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) - if err != nil { - return - } - } else { - req = autorest.ChangeToGet(future.req) - } - resp, err = autorest.SendWithSender(client, req, - autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", resp, "Failure sending request") - return - } - ar, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", resp, "Failure responding to request") - } + ar.Response = future.Response() return } -// VirtualNetworkGatewayConnectionsResetSharedKeyFuture an abstraction for monitoring and retrieving the results of -// a long-running operation. +// VirtualNetworkGatewayConnectionsResetSharedKeyFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct { azure.Future - req *http.Request } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) { +func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Polling failure") return } if !done { - return crsk, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture") - } - if future.PollingMethod() == azure.PollingLocation { - crsk, err = client.ResetSharedKeyResponder(future.Response()) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Failure responding to request") - } + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture") return } - var req *http.Request - var resp *http.Response - if future.PollingURL() != "" { - req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if crsk.Response.Response, err = future.GetResult(sender); err == nil && crsk.Response.Response.StatusCode != http.StatusNoContent { + crsk, err = client.ResetSharedKeyResponder(crsk.Response.Response) if err != nil { - return + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", crsk.Response.Response, "Failure responding to request") } - } else { - req = autorest.ChangeToGet(future.req) - } - resp, err = autorest.SendWithSender(client, req, - autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", resp, "Failure sending request") - return - } - crsk, err = client.ResetSharedKeyResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", resp, "Failure responding to request") } return } -// VirtualNetworkGatewayConnectionsSetSharedKeyFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. +// VirtualNetworkGatewayConnectionsSetSharedKeyFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct { azure.Future - req *http.Request } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) { +func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Polling failure") return } if !done { - return csk, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture") - } - if future.PollingMethod() == azure.PollingLocation { - csk, err = client.SetSharedKeyResponder(future.Response()) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Failure responding to request") - } + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture") return } - var req *http.Request - var resp *http.Response - if future.PollingURL() != "" { - req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if csk.Response.Response, err = future.GetResult(sender); err == nil && csk.Response.Response.StatusCode != http.StatusNoContent { + csk, err = client.SetSharedKeyResponder(csk.Response.Response) if err != nil { - return + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", csk.Response.Response, "Failure responding to request") } - } else { - req = autorest.ChangeToGet(future.req) - } - resp, err = autorest.SendWithSender(client, req, - autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", resp, "Failure sending request") - return - } - csk, err = client.SetSharedKeyResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", resp, "Failure responding to request") } return } @@ -8431,20 +8475,31 @@ type VirtualNetworkGatewayListResult struct { NextLink *string `json:"nextLink,omitempty"` } -// VirtualNetworkGatewayListResultIterator provides access to a complete listing of VirtualNetworkGateway values. +// VirtualNetworkGatewayListResultIterator provides access to a complete listing of VirtualNetworkGateway +// values. type VirtualNetworkGatewayListResultIterator struct { i int page VirtualNetworkGatewayListResultPage } -// Next advances to the next value. If there was an error making +// NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *VirtualNetworkGatewayListResultIterator) Next() error { +func (iter *VirtualNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } iter.i++ if iter.i < len(iter.page.Values()) { return nil } - err := iter.page.Next() + err = iter.page.NextWithContext(ctx) if err != nil { iter.i-- return err @@ -8453,6 +8508,13 @@ func (iter *VirtualNetworkGatewayListResultIterator) Next() error { return nil } +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *VirtualNetworkGatewayListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + // NotDone returns true if the enumeration should be started or is not yet complete. func (iter VirtualNetworkGatewayListResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) @@ -8472,6 +8534,11 @@ func (iter VirtualNetworkGatewayListResultIterator) Value() VirtualNetworkGatewa return iter.page.Values()[iter.i] } +// Creates a new instance of the VirtualNetworkGatewayListResultIterator type. +func NewVirtualNetworkGatewayListResultIterator(page VirtualNetworkGatewayListResultPage) VirtualNetworkGatewayListResultIterator { + return VirtualNetworkGatewayListResultIterator{page: page} +} + // IsEmpty returns true if the ListResult contains no values. func (vnglr VirtualNetworkGatewayListResult) IsEmpty() bool { return vnglr.Value == nil || len(*vnglr.Value) == 0 @@ -8479,11 +8546,11 @@ func (vnglr VirtualNetworkGatewayListResult) IsEmpty() bool { // virtualNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (vnglr VirtualNetworkGatewayListResult) virtualNetworkGatewayListResultPreparer() (*http.Request, error) { +func (vnglr VirtualNetworkGatewayListResult) virtualNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) { if vnglr.NextLink == nil || len(to.String(vnglr.NextLink)) < 1 { return nil, nil } - return autorest.Prepare(&http.Request{}, + return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), autorest.WithBaseURL(to.String(vnglr.NextLink))) @@ -8491,14 +8558,24 @@ func (vnglr VirtualNetworkGatewayListResult) virtualNetworkGatewayListResultPrep // VirtualNetworkGatewayListResultPage contains a page of VirtualNetworkGateway values. type VirtualNetworkGatewayListResultPage struct { - fn func(VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error) + fn func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error) vnglr VirtualNetworkGatewayListResult } -// Next advances to the next page of values. If there was an error making +// NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *VirtualNetworkGatewayListResultPage) Next() error { - next, err := page.fn(page.vnglr) +func (page *VirtualNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.vnglr) if err != nil { return err } @@ -8506,6 +8583,13 @@ func (page *VirtualNetworkGatewayListResultPage) Next() error { return nil } +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *VirtualNetworkGatewayListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + // NotDone returns true if the page enumeration should be started or is not yet complete. func (page VirtualNetworkGatewayListResultPage) NotDone() bool { return !page.vnglr.IsEmpty() @@ -8524,6 +8608,11 @@ func (page VirtualNetworkGatewayListResultPage) Values() []VirtualNetworkGateway return *page.vnglr.Value } +// Creates a new instance of the VirtualNetworkGatewayListResultPage type. +func NewVirtualNetworkGatewayListResultPage(getNextPage func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)) VirtualNetworkGatewayListResultPage { + return VirtualNetworkGatewayListResultPage{fn: getNextPage} +} + // VirtualNetworkGatewayPropertiesFormat virtualNetworkGateway properties type VirtualNetworkGatewayPropertiesFormat struct { // IPConfigurations - IP configurations for virtual network gateway. @@ -8552,96 +8641,79 @@ type VirtualNetworkGatewayPropertiesFormat struct { // long-running operation. type VirtualNetworkGatewaysCreateOrUpdateFuture struct { azure.Future - req *http.Request } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) { +func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") return } if !done { - return vng, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture") - } - if future.PollingMethod() == azure.PollingLocation { - vng, err = client.CreateOrUpdateResponder(future.Response()) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request") - } + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture") return } - var req *http.Request - var resp *http.Response - if future.PollingURL() != "" { - req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent { + vng, err = client.CreateOrUpdateResponder(vng.Response.Response) if err != nil { - return + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", vng.Response.Response, "Failure responding to request") } - } else { - req = autorest.ChangeToGet(future.req) - } - resp, err = autorest.SendWithSender(client, req, - autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request") - return - } - vng, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request") } return } -// VirtualNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// VirtualNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. type VirtualNetworkGatewaysDeleteFuture struct { azure.Future - req *http.Request } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) { +func (future *VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure") return } if !done { - return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture") - } - if future.PollingMethod() == azure.PollingLocation { - ar, err = client.DeleteResponder(future.Response()) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request") - } + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture") return } - var req *http.Request - var resp *http.Response - if future.PollingURL() != "" { - req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) - if err != nil { - return - } - } else { - req = autorest.ChangeToGet(future.req) - } - resp, err = autorest.SendWithSender(client, req, - autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + ar.Response = future.Response() + return +} + +// VirtualNetworkGatewaysGeneratevpnclientpackageFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", future.Response(), "Polling failure") return } - ar, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", resp, "Failure responding to request") + if !done { + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { + s, err = client.GeneratevpnclientpackageResponder(s.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", s.Response.Response, "Failure responding to request") + } } return } @@ -8656,51 +8728,31 @@ type VirtualNetworkGatewaySku struct { Capacity *int32 `json:"capacity,omitempty"` } -// VirtualNetworkGatewaysResetFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// VirtualNetworkGatewaysResetFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. type VirtualNetworkGatewaysResetFuture struct { azure.Future - req *http.Request } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) { +func (future *VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Polling failure") return } if !done { - return vng, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture") - } - if future.PollingMethod() == azure.PollingLocation { - vng, err = client.ResetResponder(future.Response()) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Failure responding to request") - } + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture") return } - var req *http.Request - var resp *http.Response - if future.PollingURL() != "" { - req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent { + vng, err = client.ResetResponder(vng.Response.Response) if err != nil { - return + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", vng.Response.Response, "Failure responding to request") } - } else { - req = autorest.ChangeToGet(future.req) - } - resp, err = autorest.SendWithSender(client, req, - autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", resp, "Failure sending request") - return - } - vng, err = client.ResetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", resp, "Failure responding to request") } return } @@ -8720,14 +8772,24 @@ type VirtualNetworkListResultIterator struct { page VirtualNetworkListResultPage } -// Next advances to the next value. If there was an error making +// NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *VirtualNetworkListResultIterator) Next() error { +func (iter *VirtualNetworkListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } iter.i++ if iter.i < len(iter.page.Values()) { return nil } - err := iter.page.Next() + err = iter.page.NextWithContext(ctx) if err != nil { iter.i-- return err @@ -8736,6 +8798,13 @@ func (iter *VirtualNetworkListResultIterator) Next() error { return nil } +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *VirtualNetworkListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + // NotDone returns true if the enumeration should be started or is not yet complete. func (iter VirtualNetworkListResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) @@ -8755,6 +8824,11 @@ func (iter VirtualNetworkListResultIterator) Value() VirtualNetwork { return iter.page.Values()[iter.i] } +// Creates a new instance of the VirtualNetworkListResultIterator type. +func NewVirtualNetworkListResultIterator(page VirtualNetworkListResultPage) VirtualNetworkListResultIterator { + return VirtualNetworkListResultIterator{page: page} +} + // IsEmpty returns true if the ListResult contains no values. func (vnlr VirtualNetworkListResult) IsEmpty() bool { return vnlr.Value == nil || len(*vnlr.Value) == 0 @@ -8762,11 +8836,11 @@ func (vnlr VirtualNetworkListResult) IsEmpty() bool { // virtualNetworkListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (vnlr VirtualNetworkListResult) virtualNetworkListResultPreparer() (*http.Request, error) { +func (vnlr VirtualNetworkListResult) virtualNetworkListResultPreparer(ctx context.Context) (*http.Request, error) { if vnlr.NextLink == nil || len(to.String(vnlr.NextLink)) < 1 { return nil, nil } - return autorest.Prepare(&http.Request{}, + return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), autorest.WithBaseURL(to.String(vnlr.NextLink))) @@ -8774,14 +8848,24 @@ func (vnlr VirtualNetworkListResult) virtualNetworkListResultPreparer() (*http.R // VirtualNetworkListResultPage contains a page of VirtualNetwork values. type VirtualNetworkListResultPage struct { - fn func(VirtualNetworkListResult) (VirtualNetworkListResult, error) + fn func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error) vnlr VirtualNetworkListResult } -// Next advances to the next page of values. If there was an error making +// NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *VirtualNetworkListResultPage) Next() error { - next, err := page.fn(page.vnlr) +func (page *VirtualNetworkListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.vnlr) if err != nil { return err } @@ -8789,6 +8873,13 @@ func (page *VirtualNetworkListResultPage) Next() error { return nil } +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *VirtualNetworkListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + // NotDone returns true if the page enumeration should be started or is not yet complete. func (page VirtualNetworkListResultPage) NotDone() bool { return !page.vnlr.IsEmpty() @@ -8807,6 +8898,11 @@ func (page VirtualNetworkListResultPage) Values() []VirtualNetwork { return *page.vnlr.Value } +// Creates a new instance of the VirtualNetworkListResultPage type. +func NewVirtualNetworkListResultPage(getNextPage func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)) VirtualNetworkListResultPage { + return VirtualNetworkListResultPage{fn: getNextPage} +} + // VirtualNetworkPropertiesFormat ... type VirtualNetworkPropertiesFormat struct { // AddressSpace - The AddressSpace that contains an array of IP address ranges that can be used by subnets. @@ -8821,51 +8917,31 @@ type VirtualNetworkPropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. type VirtualNetworksCreateOrUpdateFuture struct { azure.Future - req *http.Request } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) { +func (future *VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") return } if !done { - return vn, azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture") - } - if future.PollingMethod() == azure.PollingLocation { - vn, err = client.CreateOrUpdateResponder(future.Response()) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request") - } + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture") return } - var req *http.Request - var resp *http.Response - if future.PollingURL() != "" { - req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent { + vn, err = client.CreateOrUpdateResponder(vn.Response.Response) if err != nil { - return + err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request") } - } else { - req = autorest.ChangeToGet(future.req) - } - resp, err = autorest.SendWithSender(client, req, - autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", resp, "Failure sending request") - return - } - vn, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", resp, "Failure responding to request") } return } @@ -8874,48 +8950,22 @@ func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksC // operation. type VirtualNetworksDeleteFuture struct { azure.Future - req *http.Request } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (ar autorest.Response, err error) { +func (future *VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (ar autorest.Response, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Polling failure") return } if !done { - return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture") - } - if future.PollingMethod() == azure.PollingLocation { - ar, err = client.DeleteResponder(future.Response()) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Failure responding to request") - } + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture") return } - var req *http.Request - var resp *http.Response - if future.PollingURL() != "" { - req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) - if err != nil { - return - } - } else { - req = autorest.ChangeToGet(future.req) - } - resp, err = autorest.SendWithSender(client, req, - autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", resp, "Failure sending request") - return - } - ar, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", resp, "Failure responding to request") - } + ar.Response = future.Response() return } @@ -9015,8 +9065,8 @@ func (vcrc *VpnClientRevokedCertificate) UnmarshalJSON(body []byte) error { return nil } -// VpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client certificate of virtual network -// gateway. +// VpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client certificate of virtual +// network gateway. type VpnClientRevokedCertificatePropertiesFormat struct { // Thumbprint - The revoked VPN client certificate thumbprint. Thumbprint *string `json:"thumbprint,omitempty"` diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/publicipaddresses.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/publicipaddresses.go index f733de4f0..2eb805666 100644 --- a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/publicipaddresses.go +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/publicipaddresses.go @@ -22,6 +22,7 @@ import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" "net/http" ) @@ -46,6 +47,16 @@ func NewPublicIPAddressesClientWithBaseURI(baseURI string, subscriptionID string // publicIPAddressName - the name of the public IP address. // parameters - parameters supplied to the create or update public IP address operation. func (client PublicIPAddressesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, publicIPAddressName string, parameters PublicIPAddress) (result PublicIPAddressesCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.PublicIPAddressPropertiesFormat", Name: validation.Null, Rule: false, @@ -98,15 +109,13 @@ func (client PublicIPAddressesClient) CreateOrUpdatePreparer(ctx context.Context // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client PublicIPAddressesClient) CreateOrUpdateSender(req *http.Request) (future PublicIPAddressesCreateOrUpdateFuture, err error) { - sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client)) - future.Future = azure.NewFuture(req) - future.req = req - _, err = future.Done(sender) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } - err = autorest.Respond(future.Response(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated)) + future.Future, err = azure.NewFutureFromResponse(resp) return } @@ -128,6 +137,16 @@ func (client PublicIPAddressesClient) CreateOrUpdateResponder(resp *http.Respons // resourceGroupName - the name of the resource group. // publicIPAddressName - the name of the subnet. func (client PublicIPAddressesClient) Delete(ctx context.Context, resourceGroupName string, publicIPAddressName string) (result PublicIPAddressesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.DeletePreparer(ctx, resourceGroupName, publicIPAddressName) if err != nil { err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "Delete", nil, "Failure preparing request") @@ -167,15 +186,13 @@ func (client PublicIPAddressesClient) DeletePreparer(ctx context.Context, resour // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client PublicIPAddressesClient) DeleteSender(req *http.Request) (future PublicIPAddressesDeleteFuture, err error) { - sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client)) - future.Future = azure.NewFuture(req) - future.req = req - _, err = future.Done(sender) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } - err = autorest.Respond(future.Response(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent)) + future.Future, err = azure.NewFutureFromResponse(resp) return } @@ -197,6 +214,16 @@ func (client PublicIPAddressesClient) DeleteResponder(resp *http.Response) (resu // publicIPAddressName - the name of the subnet. // expand - expands referenced resources. func (client PublicIPAddressesClient) Get(ctx context.Context, resourceGroupName string, publicIPAddressName string, expand string) (result PublicIPAddress, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.GetPreparer(ctx, resourceGroupName, publicIPAddressName, expand) if err != nil { err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "Get", nil, "Failure preparing request") @@ -245,8 +272,8 @@ func (client PublicIPAddressesClient) GetPreparer(ctx context.Context, resourceG // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client PublicIPAddressesClient) GetSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // GetResponder handles the response to the Get request. The method always @@ -266,6 +293,16 @@ func (client PublicIPAddressesClient) GetResponder(resp *http.Response) (result // Parameters: // resourceGroupName - the name of the resource group. func (client PublicIPAddressesClient) List(ctx context.Context, resourceGroupName string) (result PublicIPAddressListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.List") + defer func() { + sc := -1 + if result.pialr.Response.Response != nil { + sc = result.pialr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.fn = client.listNextResults req, err := client.ListPreparer(ctx, resourceGroupName) if err != nil { @@ -311,8 +348,8 @@ func (client PublicIPAddressesClient) ListPreparer(ctx context.Context, resource // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client PublicIPAddressesClient) ListSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListResponder handles the response to the List request. The method always @@ -329,8 +366,8 @@ func (client PublicIPAddressesClient) ListResponder(resp *http.Response) (result } // listNextResults retrieves the next set of results, if any. -func (client PublicIPAddressesClient) listNextResults(lastResults PublicIPAddressListResult) (result PublicIPAddressListResult, err error) { - req, err := lastResults.publicIPAddressListResultPreparer() +func (client PublicIPAddressesClient) listNextResults(ctx context.Context, lastResults PublicIPAddressListResult) (result PublicIPAddressListResult, err error) { + req, err := lastResults.publicIPAddressListResultPreparer(ctx) if err != nil { return result, autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "listNextResults", nil, "Failure preparing next results request") } @@ -351,12 +388,32 @@ func (client PublicIPAddressesClient) listNextResults(lastResults PublicIPAddres // ListComplete enumerates all values, automatically crossing page boundaries as required. func (client PublicIPAddressesClient) ListComplete(ctx context.Context, resourceGroupName string) (result PublicIPAddressListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.page, err = client.List(ctx, resourceGroupName) return } // ListAll gets all the public IP addresses in a subscription. func (client PublicIPAddressesClient) ListAll(ctx context.Context) (result PublicIPAddressListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.ListAll") + defer func() { + sc := -1 + if result.pialr.Response.Response != nil { + sc = result.pialr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.fn = client.listAllNextResults req, err := client.ListAllPreparer(ctx) if err != nil { @@ -401,8 +458,8 @@ func (client PublicIPAddressesClient) ListAllPreparer(ctx context.Context) (*htt // ListAllSender sends the ListAll request. The method will close the // http.Response Body if it receives an error. func (client PublicIPAddressesClient) ListAllSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListAllResponder handles the response to the ListAll request. The method always @@ -419,8 +476,8 @@ func (client PublicIPAddressesClient) ListAllResponder(resp *http.Response) (res } // listAllNextResults retrieves the next set of results, if any. -func (client PublicIPAddressesClient) listAllNextResults(lastResults PublicIPAddressListResult) (result PublicIPAddressListResult, err error) { - req, err := lastResults.publicIPAddressListResultPreparer() +func (client PublicIPAddressesClient) listAllNextResults(ctx context.Context, lastResults PublicIPAddressListResult) (result PublicIPAddressListResult, err error) { + req, err := lastResults.publicIPAddressListResultPreparer(ctx) if err != nil { return result, autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "listAllNextResults", nil, "Failure preparing next results request") } @@ -441,6 +498,16 @@ func (client PublicIPAddressesClient) listAllNextResults(lastResults PublicIPAdd // ListAllComplete enumerates all values, automatically crossing page boundaries as required. func (client PublicIPAddressesClient) ListAllComplete(ctx context.Context) (result PublicIPAddressListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.ListAll") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.page, err = client.ListAll(ctx) return } diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/routes.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/routes.go index c8c41ea1f..d25923ad0 100644 --- a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/routes.go +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/routes.go @@ -21,6 +21,7 @@ import ( "context" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" "net/http" ) @@ -46,6 +47,16 @@ func NewRoutesClientWithBaseURI(baseURI string, subscriptionID string) RoutesCli // routeName - the name of the route. // routeParameters - parameters supplied to the create or update route operation. func (client RoutesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, routeTableName string, routeName string, routeParameters Route) (result RoutesCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RoutesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, routeTableName, routeName, routeParameters) if err != nil { err = autorest.NewErrorWithError(err, "network.RoutesClient", "CreateOrUpdate", nil, "Failure preparing request") @@ -88,15 +99,13 @@ func (client RoutesClient) CreateOrUpdatePreparer(ctx context.Context, resourceG // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client RoutesClient) CreateOrUpdateSender(req *http.Request) (future RoutesCreateOrUpdateFuture, err error) { - sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client)) - future.Future = azure.NewFuture(req) - future.req = req - _, err = future.Done(sender) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } - err = autorest.Respond(future.Response(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated)) + future.Future, err = azure.NewFutureFromResponse(resp) return } @@ -119,6 +128,16 @@ func (client RoutesClient) CreateOrUpdateResponder(resp *http.Response) (result // routeTableName - the name of the route table. // routeName - the name of the route. func (client RoutesClient) Delete(ctx context.Context, resourceGroupName string, routeTableName string, routeName string) (result RoutesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RoutesClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.DeletePreparer(ctx, resourceGroupName, routeTableName, routeName) if err != nil { err = autorest.NewErrorWithError(err, "network.RoutesClient", "Delete", nil, "Failure preparing request") @@ -159,15 +178,13 @@ func (client RoutesClient) DeletePreparer(ctx context.Context, resourceGroupName // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client RoutesClient) DeleteSender(req *http.Request) (future RoutesDeleteFuture, err error) { - sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client)) - future.Future = azure.NewFuture(req) - future.req = req - _, err = future.Done(sender) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } - err = autorest.Respond(future.Response(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent)) + future.Future, err = azure.NewFutureFromResponse(resp) return } @@ -189,6 +206,16 @@ func (client RoutesClient) DeleteResponder(resp *http.Response) (result autorest // routeTableName - the name of the route table. // routeName - the name of the route. func (client RoutesClient) Get(ctx context.Context, resourceGroupName string, routeTableName string, routeName string) (result Route, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RoutesClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.GetPreparer(ctx, resourceGroupName, routeTableName, routeName) if err != nil { err = autorest.NewErrorWithError(err, "network.RoutesClient", "Get", nil, "Failure preparing request") @@ -235,8 +262,8 @@ func (client RoutesClient) GetPreparer(ctx context.Context, resourceGroupName st // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client RoutesClient) GetSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // GetResponder handles the response to the Get request. The method always @@ -257,6 +284,16 @@ func (client RoutesClient) GetResponder(resp *http.Response) (result Route, err // resourceGroupName - the name of the resource group. // routeTableName - the name of the route table. func (client RoutesClient) List(ctx context.Context, resourceGroupName string, routeTableName string) (result RouteListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RoutesClient.List") + defer func() { + sc := -1 + if result.rlr.Response.Response != nil { + sc = result.rlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.fn = client.listNextResults req, err := client.ListPreparer(ctx, resourceGroupName, routeTableName) if err != nil { @@ -303,8 +340,8 @@ func (client RoutesClient) ListPreparer(ctx context.Context, resourceGroupName s // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client RoutesClient) ListSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListResponder handles the response to the List request. The method always @@ -321,8 +358,8 @@ func (client RoutesClient) ListResponder(resp *http.Response) (result RouteListR } // listNextResults retrieves the next set of results, if any. -func (client RoutesClient) listNextResults(lastResults RouteListResult) (result RouteListResult, err error) { - req, err := lastResults.routeListResultPreparer() +func (client RoutesClient) listNextResults(ctx context.Context, lastResults RouteListResult) (result RouteListResult, err error) { + req, err := lastResults.routeListResultPreparer(ctx) if err != nil { return result, autorest.NewErrorWithError(err, "network.RoutesClient", "listNextResults", nil, "Failure preparing next results request") } @@ -343,6 +380,16 @@ func (client RoutesClient) listNextResults(lastResults RouteListResult) (result // ListComplete enumerates all values, automatically crossing page boundaries as required. func (client RoutesClient) ListComplete(ctx context.Context, resourceGroupName string, routeTableName string) (result RouteListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RoutesClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.page, err = client.List(ctx, resourceGroupName, routeTableName) return } diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/routetables.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/routetables.go index 74097ca5b..e4dbd6bbe 100644 --- a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/routetables.go +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/routetables.go @@ -21,6 +21,7 @@ import ( "context" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" "net/http" ) @@ -45,6 +46,16 @@ func NewRouteTablesClientWithBaseURI(baseURI string, subscriptionID string) Rout // routeTableName - the name of the route table. // parameters - parameters supplied to the create or update route table operation. func (client RouteTablesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, routeTableName string, parameters RouteTable) (result RouteTablesCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RouteTablesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, routeTableName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "CreateOrUpdate", nil, "Failure preparing request") @@ -86,15 +97,13 @@ func (client RouteTablesClient) CreateOrUpdatePreparer(ctx context.Context, reso // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client RouteTablesClient) CreateOrUpdateSender(req *http.Request) (future RouteTablesCreateOrUpdateFuture, err error) { - sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client)) - future.Future = azure.NewFuture(req) - future.req = req - _, err = future.Done(sender) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } - err = autorest.Respond(future.Response(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated)) + future.Future, err = azure.NewFutureFromResponse(resp) return } @@ -116,6 +125,16 @@ func (client RouteTablesClient) CreateOrUpdateResponder(resp *http.Response) (re // resourceGroupName - the name of the resource group. // routeTableName - the name of the route table. func (client RouteTablesClient) Delete(ctx context.Context, resourceGroupName string, routeTableName string) (result RouteTablesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RouteTablesClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.DeletePreparer(ctx, resourceGroupName, routeTableName) if err != nil { err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "Delete", nil, "Failure preparing request") @@ -155,15 +174,13 @@ func (client RouteTablesClient) DeletePreparer(ctx context.Context, resourceGrou // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client RouteTablesClient) DeleteSender(req *http.Request) (future RouteTablesDeleteFuture, err error) { - sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client)) - future.Future = azure.NewFuture(req) - future.req = req - _, err = future.Done(sender) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } - err = autorest.Respond(future.Response(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent)) + future.Future, err = azure.NewFutureFromResponse(resp) return } @@ -185,6 +202,16 @@ func (client RouteTablesClient) DeleteResponder(resp *http.Response) (result aut // routeTableName - the name of the route table. // expand - expands referenced resources. func (client RouteTablesClient) Get(ctx context.Context, resourceGroupName string, routeTableName string, expand string) (result RouteTable, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RouteTablesClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.GetPreparer(ctx, resourceGroupName, routeTableName, expand) if err != nil { err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "Get", nil, "Failure preparing request") @@ -233,8 +260,8 @@ func (client RouteTablesClient) GetPreparer(ctx context.Context, resourceGroupNa // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client RouteTablesClient) GetSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // GetResponder handles the response to the Get request. The method always @@ -254,6 +281,16 @@ func (client RouteTablesClient) GetResponder(resp *http.Response) (result RouteT // Parameters: // resourceGroupName - the name of the resource group. func (client RouteTablesClient) List(ctx context.Context, resourceGroupName string) (result RouteTableListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RouteTablesClient.List") + defer func() { + sc := -1 + if result.rtlr.Response.Response != nil { + sc = result.rtlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.fn = client.listNextResults req, err := client.ListPreparer(ctx, resourceGroupName) if err != nil { @@ -299,8 +336,8 @@ func (client RouteTablesClient) ListPreparer(ctx context.Context, resourceGroupN // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client RouteTablesClient) ListSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListResponder handles the response to the List request. The method always @@ -317,8 +354,8 @@ func (client RouteTablesClient) ListResponder(resp *http.Response) (result Route } // listNextResults retrieves the next set of results, if any. -func (client RouteTablesClient) listNextResults(lastResults RouteTableListResult) (result RouteTableListResult, err error) { - req, err := lastResults.routeTableListResultPreparer() +func (client RouteTablesClient) listNextResults(ctx context.Context, lastResults RouteTableListResult) (result RouteTableListResult, err error) { + req, err := lastResults.routeTableListResultPreparer(ctx) if err != nil { return result, autorest.NewErrorWithError(err, "network.RouteTablesClient", "listNextResults", nil, "Failure preparing next results request") } @@ -339,12 +376,32 @@ func (client RouteTablesClient) listNextResults(lastResults RouteTableListResult // ListComplete enumerates all values, automatically crossing page boundaries as required. func (client RouteTablesClient) ListComplete(ctx context.Context, resourceGroupName string) (result RouteTableListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RouteTablesClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.page, err = client.List(ctx, resourceGroupName) return } // ListAll gets all route tables in a subscription. func (client RouteTablesClient) ListAll(ctx context.Context) (result RouteTableListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RouteTablesClient.ListAll") + defer func() { + sc := -1 + if result.rtlr.Response.Response != nil { + sc = result.rtlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.fn = client.listAllNextResults req, err := client.ListAllPreparer(ctx) if err != nil { @@ -389,8 +446,8 @@ func (client RouteTablesClient) ListAllPreparer(ctx context.Context) (*http.Requ // ListAllSender sends the ListAll request. The method will close the // http.Response Body if it receives an error. func (client RouteTablesClient) ListAllSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListAllResponder handles the response to the ListAll request. The method always @@ -407,8 +464,8 @@ func (client RouteTablesClient) ListAllResponder(resp *http.Response) (result Ro } // listAllNextResults retrieves the next set of results, if any. -func (client RouteTablesClient) listAllNextResults(lastResults RouteTableListResult) (result RouteTableListResult, err error) { - req, err := lastResults.routeTableListResultPreparer() +func (client RouteTablesClient) listAllNextResults(ctx context.Context, lastResults RouteTableListResult) (result RouteTableListResult, err error) { + req, err := lastResults.routeTableListResultPreparer(ctx) if err != nil { return result, autorest.NewErrorWithError(err, "network.RouteTablesClient", "listAllNextResults", nil, "Failure preparing next results request") } @@ -429,6 +486,16 @@ func (client RouteTablesClient) listAllNextResults(lastResults RouteTableListRes // ListAllComplete enumerates all values, automatically crossing page boundaries as required. func (client RouteTablesClient) ListAllComplete(ctx context.Context) (result RouteTableListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RouteTablesClient.ListAll") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.page, err = client.ListAll(ctx) return } diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/securitygroups.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/securitygroups.go index 42dd80275..3cd8cb5a0 100644 --- a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/securitygroups.go +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/securitygroups.go @@ -21,6 +21,7 @@ import ( "context" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" "net/http" ) @@ -45,6 +46,16 @@ func NewSecurityGroupsClientWithBaseURI(baseURI string, subscriptionID string) S // networkSecurityGroupName - the name of the network security group. // parameters - parameters supplied to the create or update network security group operation. func (client SecurityGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, parameters SecurityGroup) (result SecurityGroupsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, networkSecurityGroupName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "CreateOrUpdate", nil, "Failure preparing request") @@ -86,15 +97,13 @@ func (client SecurityGroupsClient) CreateOrUpdatePreparer(ctx context.Context, r // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client SecurityGroupsClient) CreateOrUpdateSender(req *http.Request) (future SecurityGroupsCreateOrUpdateFuture, err error) { - sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client)) - future.Future = azure.NewFuture(req) - future.req = req - _, err = future.Done(sender) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } - err = autorest.Respond(future.Response(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated)) + future.Future, err = azure.NewFutureFromResponse(resp) return } @@ -116,6 +125,16 @@ func (client SecurityGroupsClient) CreateOrUpdateResponder(resp *http.Response) // resourceGroupName - the name of the resource group. // networkSecurityGroupName - the name of the network security group. func (client SecurityGroupsClient) Delete(ctx context.Context, resourceGroupName string, networkSecurityGroupName string) (result SecurityGroupsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupsClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.DeletePreparer(ctx, resourceGroupName, networkSecurityGroupName) if err != nil { err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "Delete", nil, "Failure preparing request") @@ -155,15 +174,13 @@ func (client SecurityGroupsClient) DeletePreparer(ctx context.Context, resourceG // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client SecurityGroupsClient) DeleteSender(req *http.Request) (future SecurityGroupsDeleteFuture, err error) { - sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client)) - future.Future = azure.NewFuture(req) - future.req = req - _, err = future.Done(sender) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } - err = autorest.Respond(future.Response(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent)) + future.Future, err = azure.NewFutureFromResponse(resp) return } @@ -185,6 +202,16 @@ func (client SecurityGroupsClient) DeleteResponder(resp *http.Response) (result // networkSecurityGroupName - the name of the network security group. // expand - expands referenced resources. func (client SecurityGroupsClient) Get(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, expand string) (result SecurityGroup, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.GetPreparer(ctx, resourceGroupName, networkSecurityGroupName, expand) if err != nil { err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "Get", nil, "Failure preparing request") @@ -233,8 +260,8 @@ func (client SecurityGroupsClient) GetPreparer(ctx context.Context, resourceGrou // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client SecurityGroupsClient) GetSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // GetResponder handles the response to the Get request. The method always @@ -254,6 +281,16 @@ func (client SecurityGroupsClient) GetResponder(resp *http.Response) (result Sec // Parameters: // resourceGroupName - the name of the resource group. func (client SecurityGroupsClient) List(ctx context.Context, resourceGroupName string) (result SecurityGroupListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupsClient.List") + defer func() { + sc := -1 + if result.sglr.Response.Response != nil { + sc = result.sglr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.fn = client.listNextResults req, err := client.ListPreparer(ctx, resourceGroupName) if err != nil { @@ -299,8 +336,8 @@ func (client SecurityGroupsClient) ListPreparer(ctx context.Context, resourceGro // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client SecurityGroupsClient) ListSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListResponder handles the response to the List request. The method always @@ -317,8 +354,8 @@ func (client SecurityGroupsClient) ListResponder(resp *http.Response) (result Se } // listNextResults retrieves the next set of results, if any. -func (client SecurityGroupsClient) listNextResults(lastResults SecurityGroupListResult) (result SecurityGroupListResult, err error) { - req, err := lastResults.securityGroupListResultPreparer() +func (client SecurityGroupsClient) listNextResults(ctx context.Context, lastResults SecurityGroupListResult) (result SecurityGroupListResult, err error) { + req, err := lastResults.securityGroupListResultPreparer(ctx) if err != nil { return result, autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "listNextResults", nil, "Failure preparing next results request") } @@ -339,12 +376,32 @@ func (client SecurityGroupsClient) listNextResults(lastResults SecurityGroupList // ListComplete enumerates all values, automatically crossing page boundaries as required. func (client SecurityGroupsClient) ListComplete(ctx context.Context, resourceGroupName string) (result SecurityGroupListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.page, err = client.List(ctx, resourceGroupName) return } // ListAll gets all network security groups in a subscription. func (client SecurityGroupsClient) ListAll(ctx context.Context) (result SecurityGroupListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupsClient.ListAll") + defer func() { + sc := -1 + if result.sglr.Response.Response != nil { + sc = result.sglr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.fn = client.listAllNextResults req, err := client.ListAllPreparer(ctx) if err != nil { @@ -389,8 +446,8 @@ func (client SecurityGroupsClient) ListAllPreparer(ctx context.Context) (*http.R // ListAllSender sends the ListAll request. The method will close the // http.Response Body if it receives an error. func (client SecurityGroupsClient) ListAllSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListAllResponder handles the response to the ListAll request. The method always @@ -407,8 +464,8 @@ func (client SecurityGroupsClient) ListAllResponder(resp *http.Response) (result } // listAllNextResults retrieves the next set of results, if any. -func (client SecurityGroupsClient) listAllNextResults(lastResults SecurityGroupListResult) (result SecurityGroupListResult, err error) { - req, err := lastResults.securityGroupListResultPreparer() +func (client SecurityGroupsClient) listAllNextResults(ctx context.Context, lastResults SecurityGroupListResult) (result SecurityGroupListResult, err error) { + req, err := lastResults.securityGroupListResultPreparer(ctx) if err != nil { return result, autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "listAllNextResults", nil, "Failure preparing next results request") } @@ -429,6 +486,16 @@ func (client SecurityGroupsClient) listAllNextResults(lastResults SecurityGroupL // ListAllComplete enumerates all values, automatically crossing page boundaries as required. func (client SecurityGroupsClient) ListAllComplete(ctx context.Context) (result SecurityGroupListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupsClient.ListAll") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.page, err = client.ListAll(ctx) return } diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/securityrules.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/securityrules.go index 1040fe1a3..a22009594 100644 --- a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/securityrules.go +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/securityrules.go @@ -22,6 +22,7 @@ import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" "net/http" ) @@ -47,6 +48,16 @@ func NewSecurityRulesClientWithBaseURI(baseURI string, subscriptionID string) Se // securityRuleName - the name of the security rule. // securityRuleParameters - parameters supplied to the create or update network security rule operation. func (client SecurityRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string, securityRuleParameters SecurityRule) (result SecurityRulesCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRulesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } if err := validation.Validate([]validation.Validation{ {TargetValue: securityRuleParameters, Constraints: []validation.Constraint{{Target: "securityRuleParameters.SecurityRulePropertiesFormat", Name: validation.Null, Rule: false, @@ -98,15 +109,13 @@ func (client SecurityRulesClient) CreateOrUpdatePreparer(ctx context.Context, re // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client SecurityRulesClient) CreateOrUpdateSender(req *http.Request) (future SecurityRulesCreateOrUpdateFuture, err error) { - sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client)) - future.Future = azure.NewFuture(req) - future.req = req - _, err = future.Done(sender) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } - err = autorest.Respond(future.Response(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated)) + future.Future, err = azure.NewFutureFromResponse(resp) return } @@ -129,6 +138,16 @@ func (client SecurityRulesClient) CreateOrUpdateResponder(resp *http.Response) ( // networkSecurityGroupName - the name of the network security group. // securityRuleName - the name of the security rule. func (client SecurityRulesClient) Delete(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string) (result SecurityRulesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRulesClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.DeletePreparer(ctx, resourceGroupName, networkSecurityGroupName, securityRuleName) if err != nil { err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "Delete", nil, "Failure preparing request") @@ -169,15 +188,13 @@ func (client SecurityRulesClient) DeletePreparer(ctx context.Context, resourceGr // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client SecurityRulesClient) DeleteSender(req *http.Request) (future SecurityRulesDeleteFuture, err error) { - sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client)) - future.Future = azure.NewFuture(req) - future.req = req - _, err = future.Done(sender) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } - err = autorest.Respond(future.Response(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent)) + future.Future, err = azure.NewFutureFromResponse(resp) return } @@ -199,6 +216,16 @@ func (client SecurityRulesClient) DeleteResponder(resp *http.Response) (result a // networkSecurityGroupName - the name of the network security group. // securityRuleName - the name of the security rule. func (client SecurityRulesClient) Get(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string) (result SecurityRule, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRulesClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.GetPreparer(ctx, resourceGroupName, networkSecurityGroupName, securityRuleName) if err != nil { err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "Get", nil, "Failure preparing request") @@ -245,8 +272,8 @@ func (client SecurityRulesClient) GetPreparer(ctx context.Context, resourceGroup // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client SecurityRulesClient) GetSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // GetResponder handles the response to the Get request. The method always @@ -267,6 +294,16 @@ func (client SecurityRulesClient) GetResponder(resp *http.Response) (result Secu // resourceGroupName - the name of the resource group. // networkSecurityGroupName - the name of the network security group. func (client SecurityRulesClient) List(ctx context.Context, resourceGroupName string, networkSecurityGroupName string) (result SecurityRuleListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRulesClient.List") + defer func() { + sc := -1 + if result.srlr.Response.Response != nil { + sc = result.srlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.fn = client.listNextResults req, err := client.ListPreparer(ctx, resourceGroupName, networkSecurityGroupName) if err != nil { @@ -313,8 +350,8 @@ func (client SecurityRulesClient) ListPreparer(ctx context.Context, resourceGrou // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client SecurityRulesClient) ListSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListResponder handles the response to the List request. The method always @@ -331,8 +368,8 @@ func (client SecurityRulesClient) ListResponder(resp *http.Response) (result Sec } // listNextResults retrieves the next set of results, if any. -func (client SecurityRulesClient) listNextResults(lastResults SecurityRuleListResult) (result SecurityRuleListResult, err error) { - req, err := lastResults.securityRuleListResultPreparer() +func (client SecurityRulesClient) listNextResults(ctx context.Context, lastResults SecurityRuleListResult) (result SecurityRuleListResult, err error) { + req, err := lastResults.securityRuleListResultPreparer(ctx) if err != nil { return result, autorest.NewErrorWithError(err, "network.SecurityRulesClient", "listNextResults", nil, "Failure preparing next results request") } @@ -353,6 +390,16 @@ func (client SecurityRulesClient) listNextResults(lastResults SecurityRuleListRe // ListComplete enumerates all values, automatically crossing page boundaries as required. func (client SecurityRulesClient) ListComplete(ctx context.Context, resourceGroupName string, networkSecurityGroupName string) (result SecurityRuleListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRulesClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.page, err = client.List(ctx, resourceGroupName, networkSecurityGroupName) return } diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/subnets.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/subnets.go index 886a65126..c389547c9 100644 --- a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/subnets.go +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/subnets.go @@ -21,6 +21,7 @@ import ( "context" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" "net/http" ) @@ -46,6 +47,16 @@ func NewSubnetsClientWithBaseURI(baseURI string, subscriptionID string) SubnetsC // subnetName - the name of the subnet. // subnetParameters - parameters supplied to the create or update subnet operation. func (client SubnetsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, subnetParameters Subnet) (result SubnetsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SubnetsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualNetworkName, subnetName, subnetParameters) if err != nil { err = autorest.NewErrorWithError(err, "network.SubnetsClient", "CreateOrUpdate", nil, "Failure preparing request") @@ -88,15 +99,13 @@ func (client SubnetsClient) CreateOrUpdatePreparer(ctx context.Context, resource // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client SubnetsClient) CreateOrUpdateSender(req *http.Request) (future SubnetsCreateOrUpdateFuture, err error) { - sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client)) - future.Future = azure.NewFuture(req) - future.req = req - _, err = future.Done(sender) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } - err = autorest.Respond(future.Response(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated)) + future.Future, err = azure.NewFutureFromResponse(resp) return } @@ -119,6 +128,16 @@ func (client SubnetsClient) CreateOrUpdateResponder(resp *http.Response) (result // virtualNetworkName - the name of the virtual network. // subnetName - the name of the subnet. func (client SubnetsClient) Delete(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string) (result SubnetsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SubnetsClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.DeletePreparer(ctx, resourceGroupName, virtualNetworkName, subnetName) if err != nil { err = autorest.NewErrorWithError(err, "network.SubnetsClient", "Delete", nil, "Failure preparing request") @@ -159,15 +178,13 @@ func (client SubnetsClient) DeletePreparer(ctx context.Context, resourceGroupNam // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client SubnetsClient) DeleteSender(req *http.Request) (future SubnetsDeleteFuture, err error) { - sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client)) - future.Future = azure.NewFuture(req) - future.req = req - _, err = future.Done(sender) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } - err = autorest.Respond(future.Response(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent)) + future.Future, err = azure.NewFutureFromResponse(resp) return } @@ -190,6 +207,16 @@ func (client SubnetsClient) DeleteResponder(resp *http.Response) (result autores // subnetName - the name of the subnet. // expand - expands referenced resources. func (client SubnetsClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, expand string) (result Subnet, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SubnetsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.GetPreparer(ctx, resourceGroupName, virtualNetworkName, subnetName, expand) if err != nil { err = autorest.NewErrorWithError(err, "network.SubnetsClient", "Get", nil, "Failure preparing request") @@ -239,8 +266,8 @@ func (client SubnetsClient) GetPreparer(ctx context.Context, resourceGroupName s // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client SubnetsClient) GetSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // GetResponder handles the response to the Get request. The method always @@ -261,6 +288,16 @@ func (client SubnetsClient) GetResponder(resp *http.Response) (result Subnet, er // resourceGroupName - the name of the resource group. // virtualNetworkName - the name of the virtual network. func (client SubnetsClient) List(ctx context.Context, resourceGroupName string, virtualNetworkName string) (result SubnetListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SubnetsClient.List") + defer func() { + sc := -1 + if result.slr.Response.Response != nil { + sc = result.slr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.fn = client.listNextResults req, err := client.ListPreparer(ctx, resourceGroupName, virtualNetworkName) if err != nil { @@ -307,8 +344,8 @@ func (client SubnetsClient) ListPreparer(ctx context.Context, resourceGroupName // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client SubnetsClient) ListSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListResponder handles the response to the List request. The method always @@ -325,8 +362,8 @@ func (client SubnetsClient) ListResponder(resp *http.Response) (result SubnetLis } // listNextResults retrieves the next set of results, if any. -func (client SubnetsClient) listNextResults(lastResults SubnetListResult) (result SubnetListResult, err error) { - req, err := lastResults.subnetListResultPreparer() +func (client SubnetsClient) listNextResults(ctx context.Context, lastResults SubnetListResult) (result SubnetListResult, err error) { + req, err := lastResults.subnetListResultPreparer(ctx) if err != nil { return result, autorest.NewErrorWithError(err, "network.SubnetsClient", "listNextResults", nil, "Failure preparing next results request") } @@ -347,6 +384,16 @@ func (client SubnetsClient) listNextResults(lastResults SubnetListResult) (resul // ListComplete enumerates all values, automatically crossing page boundaries as required. func (client SubnetsClient) ListComplete(ctx context.Context, resourceGroupName string, virtualNetworkName string) (result SubnetListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SubnetsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.page, err = client.List(ctx, resourceGroupName, virtualNetworkName) return } diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/usages.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/usages.go index 0bbb27bbc..f3de0561d 100644 --- a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/usages.go +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/usages.go @@ -22,6 +22,7 @@ import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" "net/http" ) @@ -44,6 +45,16 @@ func NewUsagesClientWithBaseURI(baseURI string, subscriptionID string) UsagesCli // Parameters: // location - the location where resource usage is queried. func (client UsagesClient) List(ctx context.Context, location string) (result UsagesListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/UsagesClient.List") + defer func() { + sc := -1 + if result.ulr.Response.Response != nil { + sc = result.ulr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } if err := validation.Validate([]validation.Validation{ {TargetValue: location, Constraints: []validation.Constraint{{Target: "location", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { @@ -95,8 +106,8 @@ func (client UsagesClient) ListPreparer(ctx context.Context, location string) (* // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client UsagesClient) ListSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListResponder handles the response to the List request. The method always @@ -113,8 +124,8 @@ func (client UsagesClient) ListResponder(resp *http.Response) (result UsagesList } // listNextResults retrieves the next set of results, if any. -func (client UsagesClient) listNextResults(lastResults UsagesListResult) (result UsagesListResult, err error) { - req, err := lastResults.usagesListResultPreparer() +func (client UsagesClient) listNextResults(ctx context.Context, lastResults UsagesListResult) (result UsagesListResult, err error) { + req, err := lastResults.usagesListResultPreparer(ctx) if err != nil { return result, autorest.NewErrorWithError(err, "network.UsagesClient", "listNextResults", nil, "Failure preparing next results request") } @@ -135,6 +146,16 @@ func (client UsagesClient) listNextResults(lastResults UsagesListResult) (result // ListComplete enumerates all values, automatically crossing page boundaries as required. func (client UsagesClient) ListComplete(ctx context.Context, location string) (result UsagesListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/UsagesClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.page, err = client.List(ctx, location) return } diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/virtualnetworkgatewayconnections.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/virtualnetworkgatewayconnections.go index 67456bf52..1c7f86a58 100644 --- a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/virtualnetworkgatewayconnections.go +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/virtualnetworkgatewayconnections.go @@ -21,6 +21,7 @@ import ( "context" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" "net/http" ) @@ -46,6 +47,16 @@ func NewVirtualNetworkGatewayConnectionsClientWithBaseURI(baseURI string, subscr // virtualNetworkGatewayConnectionName - the name of the virtual network gateway connection. // parameters - parameters supplied to the create or update virtual network gateway connection operation. func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters VirtualNetworkGatewayConnection) (result VirtualNetworkGatewayConnectionsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "CreateOrUpdate", nil, "Failure preparing request") @@ -87,15 +98,13 @@ func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdatePreparer(ctx // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture, err error) { - sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client)) - future.Future = azure.NewFuture(req) - future.req = req - _, err = future.Done(sender) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } - err = autorest.Respond(future.Response(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated)) + future.Future, err = azure.NewFutureFromResponse(resp) return } @@ -117,6 +126,16 @@ func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdateResponder(res // resourceGroupName - the name of the resource group. // virtualNetworkGatewayConnectionName - the name of the virtual network gateway connection. func (client VirtualNetworkGatewayConnectionsClient) Delete(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result VirtualNetworkGatewayConnectionsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionsClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.DeletePreparer(ctx, resourceGroupName, virtualNetworkGatewayConnectionName) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "Delete", nil, "Failure preparing request") @@ -156,15 +175,13 @@ func (client VirtualNetworkGatewayConnectionsClient) DeletePreparer(ctx context. // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkGatewayConnectionsClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewayConnectionsDeleteFuture, err error) { - sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client)) - future.Future = azure.NewFuture(req) - future.req = req - _, err = future.Done(sender) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } - err = autorest.Respond(future.Response(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent)) + future.Future, err = azure.NewFutureFromResponse(resp) return } @@ -185,6 +202,16 @@ func (client VirtualNetworkGatewayConnectionsClient) DeleteResponder(resp *http. // resourceGroupName - the name of the resource group. // virtualNetworkGatewayConnectionName - the name of the virtual network gateway connection. func (client VirtualNetworkGatewayConnectionsClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result VirtualNetworkGatewayConnection, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.GetPreparer(ctx, resourceGroupName, virtualNetworkGatewayConnectionName) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "Get", nil, "Failure preparing request") @@ -230,8 +257,8 @@ func (client VirtualNetworkGatewayConnectionsClient) GetPreparer(ctx context.Con // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkGatewayConnectionsClient) GetSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // GetResponder handles the response to the Get request. The method always @@ -251,9 +278,19 @@ func (client VirtualNetworkGatewayConnectionsClient) GetResponder(resp *http.Res // virtual network gateway connection shared key through Network resource provider. // Parameters: // resourceGroupName - the name of the resource group. -// connectionSharedKeyName - the virtual network gateway connection shared key name. -func (client VirtualNetworkGatewayConnectionsClient) GetSharedKey(ctx context.Context, resourceGroupName string, connectionSharedKeyName string) (result ConnectionSharedKeyResult, err error) { - req, err := client.GetSharedKeyPreparer(ctx, resourceGroupName, connectionSharedKeyName) +// virtualNetworkGatewayConnectionName - the virtual network gateway connection shared key name. +func (client VirtualNetworkGatewayConnectionsClient) GetSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result ConnectionSharedKeyResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionsClient.GetSharedKey") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetSharedKeyPreparer(ctx, resourceGroupName, virtualNetworkGatewayConnectionName) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "GetSharedKey", nil, "Failure preparing request") return @@ -275,11 +312,11 @@ func (client VirtualNetworkGatewayConnectionsClient) GetSharedKey(ctx context.Co } // GetSharedKeyPreparer prepares the GetSharedKey request. -func (client VirtualNetworkGatewayConnectionsClient) GetSharedKeyPreparer(ctx context.Context, resourceGroupName string, connectionSharedKeyName string) (*http.Request, error) { +func (client VirtualNetworkGatewayConnectionsClient) GetSharedKeyPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "connectionSharedKeyName": autorest.Encode("path", connectionSharedKeyName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), } const APIVersion = "2015-06-15" @@ -290,7 +327,7 @@ func (client VirtualNetworkGatewayConnectionsClient) GetSharedKeyPreparer(ctx co preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{connectionSharedKeyName}/sharedkey", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -298,8 +335,8 @@ func (client VirtualNetworkGatewayConnectionsClient) GetSharedKeyPreparer(ctx co // GetSharedKeySender sends the GetSharedKey request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkGatewayConnectionsClient) GetSharedKeySender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // GetSharedKeyResponder handles the response to the GetSharedKey request. The method always @@ -320,6 +357,16 @@ func (client VirtualNetworkGatewayConnectionsClient) GetSharedKeyResponder(resp // Parameters: // resourceGroupName - the name of the resource group. func (client VirtualNetworkGatewayConnectionsClient) List(ctx context.Context, resourceGroupName string) (result VirtualNetworkGatewayConnectionListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionsClient.List") + defer func() { + sc := -1 + if result.vngclr.Response.Response != nil { + sc = result.vngclr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.fn = client.listNextResults req, err := client.ListPreparer(ctx, resourceGroupName) if err != nil { @@ -365,8 +412,8 @@ func (client VirtualNetworkGatewayConnectionsClient) ListPreparer(ctx context.Co // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkGatewayConnectionsClient) ListSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListResponder handles the response to the List request. The method always @@ -383,8 +430,8 @@ func (client VirtualNetworkGatewayConnectionsClient) ListResponder(resp *http.Re } // listNextResults retrieves the next set of results, if any. -func (client VirtualNetworkGatewayConnectionsClient) listNextResults(lastResults VirtualNetworkGatewayConnectionListResult) (result VirtualNetworkGatewayConnectionListResult, err error) { - req, err := lastResults.virtualNetworkGatewayConnectionListResultPreparer() +func (client VirtualNetworkGatewayConnectionsClient) listNextResults(ctx context.Context, lastResults VirtualNetworkGatewayConnectionListResult) (result VirtualNetworkGatewayConnectionListResult, err error) { + req, err := lastResults.virtualNetworkGatewayConnectionListResultPreparer(ctx) if err != nil { return result, autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "listNextResults", nil, "Failure preparing next results request") } @@ -405,6 +452,16 @@ func (client VirtualNetworkGatewayConnectionsClient) listNextResults(lastResults // ListComplete enumerates all values, automatically crossing page boundaries as required. func (client VirtualNetworkGatewayConnectionsClient) ListComplete(ctx context.Context, resourceGroupName string) (result VirtualNetworkGatewayConnectionListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.page, err = client.List(ctx, resourceGroupName) return } @@ -418,6 +475,16 @@ func (client VirtualNetworkGatewayConnectionsClient) ListComplete(ctx context.Co // parameters - parameters supplied to the begin reset virtual network gateway connection shared key operation // through network resource provider. func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters ConnectionResetSharedKey) (result VirtualNetworkGatewayConnectionsResetSharedKeyFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionsClient.ResetSharedKey") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.ResetSharedKeyPreparer(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "ResetSharedKey", nil, "Failure preparing request") @@ -459,15 +526,13 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeyPreparer(ctx // ResetSharedKeySender sends the ResetSharedKey request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture, err error) { - sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client)) - future.Future = azure.NewFuture(req) - future.req = req - _, err = future.Done(sender) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } - err = autorest.Respond(future.Response(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted)) + future.Future, err = azure.NewFutureFromResponse(resp) return } @@ -490,9 +555,19 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeyResponder(res // Parameters: // resourceGroupName - the name of the resource group. // virtualNetworkGatewayConnectionName - the virtual network gateway connection name. -// parameters - parameters supplied to the Begin Set Virtual Network Gateway conection Shared key operation +// parameters - parameters supplied to the Begin Set Virtual Network Gateway connection Shared key operation // throughNetwork resource provider. func (client VirtualNetworkGatewayConnectionsClient) SetSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters ConnectionSharedKey) (result VirtualNetworkGatewayConnectionsSetSharedKeyFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionsClient.SetSharedKey") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.SetSharedKeyPreparer(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "SetSharedKey", nil, "Failure preparing request") @@ -534,15 +609,13 @@ func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeyPreparer(ctx co // SetSharedKeySender sends the SetSharedKey request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture, err error) { - sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client)) - future.Future = azure.NewFuture(req) - future.req = req - _, err = future.Done(sender) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } - err = autorest.Respond(future.Response(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated)) + future.Future, err = azure.NewFutureFromResponse(resp) return } diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/virtualnetworkgateways.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/virtualnetworkgateways.go index 191c7e675..5498c9bf8 100644 --- a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/virtualnetworkgateways.go +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/virtualnetworkgateways.go @@ -21,6 +21,7 @@ import ( "context" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" "net/http" ) @@ -45,6 +46,16 @@ func NewVirtualNetworkGatewaysClientWithBaseURI(baseURI string, subscriptionID s // virtualNetworkGatewayName - the name of the virtual network gateway. // parameters - parameters supplied to create or update virtual network gateway operation. func (client VirtualNetworkGatewaysClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VirtualNetworkGateway) (result VirtualNetworkGatewaysCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualNetworkGatewayName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "CreateOrUpdate", nil, "Failure preparing request") @@ -86,15 +97,13 @@ func (client VirtualNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Co // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewaysCreateOrUpdateFuture, err error) { - sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client)) - future.Future = azure.NewFuture(req) - future.req = req - _, err = future.Done(sender) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } - err = autorest.Respond(future.Response(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated)) + future.Future, err = azure.NewFutureFromResponse(resp) return } @@ -116,6 +125,16 @@ func (client VirtualNetworkGatewaysClient) CreateOrUpdateResponder(resp *http.Re // resourceGroupName - the name of the resource group. // virtualNetworkGatewayName - the name of the virtual network gateway. func (client VirtualNetworkGatewaysClient) Delete(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result VirtualNetworkGatewaysDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.DeletePreparer(ctx, resourceGroupName, virtualNetworkGatewayName) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Delete", nil, "Failure preparing request") @@ -155,15 +174,13 @@ func (client VirtualNetworkGatewaysClient) DeletePreparer(ctx context.Context, r // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkGatewaysClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewaysDeleteFuture, err error) { - sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client)) - future.Future = azure.NewFuture(req) - future.req = req - _, err = future.Done(sender) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } - err = autorest.Respond(future.Response(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent)) + future.Future, err = azure.NewFutureFromResponse(resp) return } @@ -185,25 +202,29 @@ func (client VirtualNetworkGatewaysClient) DeleteResponder(resp *http.Response) // resourceGroupName - the name of the resource group. // virtualNetworkGatewayName - the name of the virtual network gateway. // parameters - parameters supplied to the generate virtual network gateway VPN client package operation. -func (client VirtualNetworkGatewaysClient) Generatevpnclientpackage(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VpnClientParameters) (result String, err error) { +func (client VirtualNetworkGatewaysClient) Generatevpnclientpackage(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VpnClientParameters) (result VirtualNetworkGatewaysGeneratevpnclientpackageFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.Generatevpnclientpackage") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.GeneratevpnclientpackagePreparer(ctx, resourceGroupName, virtualNetworkGatewayName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Generatevpnclientpackage", nil, "Failure preparing request") return } - resp, err := client.GeneratevpnclientpackageSender(req) + result, err = client.GeneratevpnclientpackageSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Generatevpnclientpackage", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Generatevpnclientpackage", result.Response(), "Failure sending request") return } - result, err = client.GeneratevpnclientpackageResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Generatevpnclientpackage", resp, "Failure responding to request") - } - return } @@ -232,9 +253,15 @@ func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackagePreparer(ctx // GeneratevpnclientpackageSender sends the Generatevpnclientpackage request. The method will close the // http.Response Body if it receives an error. -func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackageSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) +func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackageSender(req *http.Request) (future VirtualNetworkGatewaysGeneratevpnclientpackageFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return } // GeneratevpnclientpackageResponder handles the response to the Generatevpnclientpackage request. The method always @@ -244,7 +271,7 @@ func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackageResponder(res resp, client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return @@ -255,6 +282,16 @@ func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackageResponder(res // resourceGroupName - the name of the resource group. // virtualNetworkGatewayName - the name of the virtual network gateway. func (client VirtualNetworkGatewaysClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result VirtualNetworkGateway, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.GetPreparer(ctx, resourceGroupName, virtualNetworkGatewayName) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Get", nil, "Failure preparing request") @@ -300,8 +337,8 @@ func (client VirtualNetworkGatewaysClient) GetPreparer(ctx context.Context, reso // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkGatewaysClient) GetSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // GetResponder handles the response to the Get request. The method always @@ -321,6 +358,16 @@ func (client VirtualNetworkGatewaysClient) GetResponder(resp *http.Response) (re // Parameters: // resourceGroupName - the name of the resource group. func (client VirtualNetworkGatewaysClient) List(ctx context.Context, resourceGroupName string) (result VirtualNetworkGatewayListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.List") + defer func() { + sc := -1 + if result.vnglr.Response.Response != nil { + sc = result.vnglr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.fn = client.listNextResults req, err := client.ListPreparer(ctx, resourceGroupName) if err != nil { @@ -366,8 +413,8 @@ func (client VirtualNetworkGatewaysClient) ListPreparer(ctx context.Context, res // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkGatewaysClient) ListSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListResponder handles the response to the List request. The method always @@ -384,8 +431,8 @@ func (client VirtualNetworkGatewaysClient) ListResponder(resp *http.Response) (r } // listNextResults retrieves the next set of results, if any. -func (client VirtualNetworkGatewaysClient) listNextResults(lastResults VirtualNetworkGatewayListResult) (result VirtualNetworkGatewayListResult, err error) { - req, err := lastResults.virtualNetworkGatewayListResultPreparer() +func (client VirtualNetworkGatewaysClient) listNextResults(ctx context.Context, lastResults VirtualNetworkGatewayListResult) (result VirtualNetworkGatewayListResult, err error) { + req, err := lastResults.virtualNetworkGatewayListResultPreparer(ctx) if err != nil { return result, autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "listNextResults", nil, "Failure preparing next results request") } @@ -406,6 +453,16 @@ func (client VirtualNetworkGatewaysClient) listNextResults(lastResults VirtualNe // ListComplete enumerates all values, automatically crossing page boundaries as required. func (client VirtualNetworkGatewaysClient) ListComplete(ctx context.Context, resourceGroupName string) (result VirtualNetworkGatewayListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.page, err = client.List(ctx, resourceGroupName) return } @@ -417,6 +474,16 @@ func (client VirtualNetworkGatewaysClient) ListComplete(ctx context.Context, res // parameters - virtual network gateway vip address supplied to the begin reset of the active-active feature // enabled gateway. func (client VirtualNetworkGatewaysClient) Reset(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VirtualNetworkGateway) (result VirtualNetworkGatewaysResetFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.Reset") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.ResetPreparer(ctx, resourceGroupName, virtualNetworkGatewayName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Reset", nil, "Failure preparing request") @@ -458,15 +525,13 @@ func (client VirtualNetworkGatewaysClient) ResetPreparer(ctx context.Context, re // ResetSender sends the Reset request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkGatewaysClient) ResetSender(req *http.Request) (future VirtualNetworkGatewaysResetFuture, err error) { - sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client)) - future.Future = azure.NewFuture(req) - future.req = req - _, err = future.Done(sender) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } - err = autorest.Respond(future.Response(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted)) + future.Future, err = azure.NewFutureFromResponse(resp) return } diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/virtualnetworks.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/virtualnetworks.go index 0ad02f2a0..b5e5b0206 100644 --- a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/virtualnetworks.go +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/virtualnetworks.go @@ -21,6 +21,7 @@ import ( "context" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" "net/http" ) @@ -45,6 +46,16 @@ func NewVirtualNetworksClientWithBaseURI(baseURI string, subscriptionID string) // virtualNetworkName - the name of the virtual network. // parameters - parameters supplied to the create or update virtual network operation func (client VirtualNetworksClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters VirtualNetwork) (result VirtualNetworksCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualNetworkName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "CreateOrUpdate", nil, "Failure preparing request") @@ -86,15 +97,13 @@ func (client VirtualNetworksClient) CreateOrUpdatePreparer(ctx context.Context, // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworksClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworksCreateOrUpdateFuture, err error) { - sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client)) - future.Future = azure.NewFuture(req) - future.req = req - _, err = future.Done(sender) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } - err = autorest.Respond(future.Response(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated)) + future.Future, err = azure.NewFutureFromResponse(resp) return } @@ -116,6 +125,16 @@ func (client VirtualNetworksClient) CreateOrUpdateResponder(resp *http.Response) // resourceGroupName - the name of the resource group. // virtualNetworkName - the name of the virtual network. func (client VirtualNetworksClient) Delete(ctx context.Context, resourceGroupName string, virtualNetworkName string) (result VirtualNetworksDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.DeletePreparer(ctx, resourceGroupName, virtualNetworkName) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "Delete", nil, "Failure preparing request") @@ -155,15 +174,13 @@ func (client VirtualNetworksClient) DeletePreparer(ctx context.Context, resource // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworksClient) DeleteSender(req *http.Request) (future VirtualNetworksDeleteFuture, err error) { - sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client)) - future.Future = azure.NewFuture(req) - future.req = req - _, err = future.Done(sender) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } - err = autorest.Respond(future.Response(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent)) + future.Future, err = azure.NewFutureFromResponse(resp) return } @@ -185,6 +202,16 @@ func (client VirtualNetworksClient) DeleteResponder(resp *http.Response) (result // virtualNetworkName - the name of the virtual network. // expand - expands referenced resources. func (client VirtualNetworksClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkName string, expand string) (result VirtualNetwork, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } req, err := client.GetPreparer(ctx, resourceGroupName, virtualNetworkName, expand) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "Get", nil, "Failure preparing request") @@ -233,8 +260,8 @@ func (client VirtualNetworksClient) GetPreparer(ctx context.Context, resourceGro // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworksClient) GetSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // GetResponder handles the response to the Get request. The method always @@ -254,6 +281,16 @@ func (client VirtualNetworksClient) GetResponder(resp *http.Response) (result Vi // Parameters: // resourceGroupName - the name of the resource group. func (client VirtualNetworksClient) List(ctx context.Context, resourceGroupName string) (result VirtualNetworkListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.List") + defer func() { + sc := -1 + if result.vnlr.Response.Response != nil { + sc = result.vnlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.fn = client.listNextResults req, err := client.ListPreparer(ctx, resourceGroupName) if err != nil { @@ -299,8 +336,8 @@ func (client VirtualNetworksClient) ListPreparer(ctx context.Context, resourceGr // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworksClient) ListSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListResponder handles the response to the List request. The method always @@ -317,8 +354,8 @@ func (client VirtualNetworksClient) ListResponder(resp *http.Response) (result V } // listNextResults retrieves the next set of results, if any. -func (client VirtualNetworksClient) listNextResults(lastResults VirtualNetworkListResult) (result VirtualNetworkListResult, err error) { - req, err := lastResults.virtualNetworkListResultPreparer() +func (client VirtualNetworksClient) listNextResults(ctx context.Context, lastResults VirtualNetworkListResult) (result VirtualNetworkListResult, err error) { + req, err := lastResults.virtualNetworkListResultPreparer(ctx) if err != nil { return result, autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "listNextResults", nil, "Failure preparing next results request") } @@ -339,12 +376,32 @@ func (client VirtualNetworksClient) listNextResults(lastResults VirtualNetworkLi // ListComplete enumerates all values, automatically crossing page boundaries as required. func (client VirtualNetworksClient) ListComplete(ctx context.Context, resourceGroupName string) (result VirtualNetworkListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.page, err = client.List(ctx, resourceGroupName) return } // ListAll gets all virtual networks in a subscription. func (client VirtualNetworksClient) ListAll(ctx context.Context) (result VirtualNetworkListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.ListAll") + defer func() { + sc := -1 + if result.vnlr.Response.Response != nil { + sc = result.vnlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.fn = client.listAllNextResults req, err := client.ListAllPreparer(ctx) if err != nil { @@ -389,8 +446,8 @@ func (client VirtualNetworksClient) ListAllPreparer(ctx context.Context) (*http. // ListAllSender sends the ListAll request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworksClient) ListAllSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListAllResponder handles the response to the ListAll request. The method always @@ -407,8 +464,8 @@ func (client VirtualNetworksClient) ListAllResponder(resp *http.Response) (resul } // listAllNextResults retrieves the next set of results, if any. -func (client VirtualNetworksClient) listAllNextResults(lastResults VirtualNetworkListResult) (result VirtualNetworkListResult, err error) { - req, err := lastResults.virtualNetworkListResultPreparer() +func (client VirtualNetworksClient) listAllNextResults(ctx context.Context, lastResults VirtualNetworkListResult) (result VirtualNetworkListResult, err error) { + req, err := lastResults.virtualNetworkListResultPreparer(ctx) if err != nil { return result, autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "listAllNextResults", nil, "Failure preparing next results request") } @@ -429,6 +486,16 @@ func (client VirtualNetworksClient) listAllNextResults(lastResults VirtualNetwor // ListAllComplete enumerates all values, automatically crossing page boundaries as required. func (client VirtualNetworksClient) ListAllComplete(ctx context.Context) (result VirtualNetworkListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.ListAll") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } result.page, err = client.ListAll(ctx) return } diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/version/version.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/version/version.go index 505f6982b..073281bb8 100644 --- a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/version/version.go +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/version/version.go @@ -18,4 +18,4 @@ package version // Changes may cause incorrect behavior and will be lost if the code is regenerated. // Number contains the semantic version of this SDK. -const Number = "v16.0.0" +const Number = "v36.2.0" diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/adal/README.md b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/adal/README.md index 7b0c4bc4d..fec416a9c 100644 --- a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/adal/README.md +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/adal/README.md @@ -135,7 +135,7 @@ resource := "https://management.core.windows.net/" applicationSecret := "APPLICATION_SECRET" spt, err := adal.NewServicePrincipalToken( - oauthConfig, + *oauthConfig, appliationID, applicationSecret, resource, @@ -170,7 +170,7 @@ if err != nil { } spt, err := adal.NewServicePrincipalTokenFromCertificate( - oauthConfig, + *oauthConfig, applicationID, certificate, rsaPrivateKey, @@ -195,7 +195,7 @@ oauthClient := &http.Client{} // Acquire the device code deviceCode, err := adal.InitiateDeviceAuth( oauthClient, - oauthConfig, + *oauthConfig, applicationID, resource) if err != nil { @@ -212,7 +212,7 @@ if err != nil { } spt, err := adal.NewServicePrincipalTokenFromManualToken( - oauthConfig, + *oauthConfig, applicationID, resource, *token, @@ -227,7 +227,7 @@ if (err == nil) { ```Go spt, err := adal.NewServicePrincipalTokenFromUsernamePassword( - oauthConfig, + *oauthConfig, applicationID, username, password, @@ -243,11 +243,11 @@ if (err == nil) { ``` Go spt, err := adal.NewServicePrincipalTokenFromAuthorizationCode( - oauthConfig, + *oauthConfig, applicationID, clientSecret, - authorizationCode, - redirectURI, + authorizationCode, + redirectURI, resource, callbacks...) diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/adal/config.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/adal/config.go index f570d540a..fa5964742 100644 --- a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/adal/config.go +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/adal/config.go @@ -15,21 +15,22 @@ package adal // limitations under the License. import ( + "errors" "fmt" "net/url" ) const ( - activeDirectoryAPIVersion = "1.0" + activeDirectoryEndpointTemplate = "%s/oauth2/%s%s" ) // OAuthConfig represents the endpoints needed // in OAuth operations type OAuthConfig struct { - AuthorityEndpoint url.URL - AuthorizeEndpoint url.URL - TokenEndpoint url.URL - DeviceCodeEndpoint url.URL + AuthorityEndpoint url.URL `json:"authorityEndpoint"` + AuthorizeEndpoint url.URL `json:"authorizeEndpoint"` + TokenEndpoint url.URL `json:"tokenEndpoint"` + DeviceCodeEndpoint url.URL `json:"deviceCodeEndpoint"` } // IsZero returns true if the OAuthConfig object is zero-initialized. @@ -46,11 +47,24 @@ func validateStringParam(param, name string) error { // NewOAuthConfig returns an OAuthConfig with tenant specific urls func NewOAuthConfig(activeDirectoryEndpoint, tenantID string) (*OAuthConfig, error) { + apiVer := "1.0" + return NewOAuthConfigWithAPIVersion(activeDirectoryEndpoint, tenantID, &apiVer) +} + +// NewOAuthConfigWithAPIVersion returns an OAuthConfig with tenant specific urls. +// If apiVersion is not nil the "api-version" query parameter will be appended to the endpoint URLs with the specified value. +func NewOAuthConfigWithAPIVersion(activeDirectoryEndpoint, tenantID string, apiVersion *string) (*OAuthConfig, error) { if err := validateStringParam(activeDirectoryEndpoint, "activeDirectoryEndpoint"); err != nil { return nil, err } + api := "" // it's legal for tenantID to be empty so don't validate it - const activeDirectoryEndpointTemplate = "%s/oauth2/%s?api-version=%s" + if apiVersion != nil { + if err := validateStringParam(*apiVersion, "apiVersion"); err != nil { + return nil, err + } + api = fmt.Sprintf("?api-version=%s", *apiVersion) + } u, err := url.Parse(activeDirectoryEndpoint) if err != nil { return nil, err @@ -59,15 +73,15 @@ func NewOAuthConfig(activeDirectoryEndpoint, tenantID string) (*OAuthConfig, err if err != nil { return nil, err } - authorizeURL, err := u.Parse(fmt.Sprintf(activeDirectoryEndpointTemplate, tenantID, "authorize", activeDirectoryAPIVersion)) + authorizeURL, err := u.Parse(fmt.Sprintf(activeDirectoryEndpointTemplate, tenantID, "authorize", api)) if err != nil { return nil, err } - tokenURL, err := u.Parse(fmt.Sprintf(activeDirectoryEndpointTemplate, tenantID, "token", activeDirectoryAPIVersion)) + tokenURL, err := u.Parse(fmt.Sprintf(activeDirectoryEndpointTemplate, tenantID, "token", api)) if err != nil { return nil, err } - deviceCodeURL, err := u.Parse(fmt.Sprintf(activeDirectoryEndpointTemplate, tenantID, "devicecode", activeDirectoryAPIVersion)) + deviceCodeURL, err := u.Parse(fmt.Sprintf(activeDirectoryEndpointTemplate, tenantID, "devicecode", api)) if err != nil { return nil, err } @@ -79,3 +93,59 @@ func NewOAuthConfig(activeDirectoryEndpoint, tenantID string) (*OAuthConfig, err DeviceCodeEndpoint: *deviceCodeURL, }, nil } + +// MultiTenantOAuthConfig provides endpoints for primary and aulixiary tenant IDs. +type MultiTenantOAuthConfig interface { + PrimaryTenant() *OAuthConfig + AuxiliaryTenants() []*OAuthConfig +} + +// OAuthOptions contains optional OAuthConfig creation arguments. +type OAuthOptions struct { + APIVersion string +} + +func (c OAuthOptions) apiVersion() string { + if c.APIVersion != "" { + return fmt.Sprintf("?api-version=%s", c.APIVersion) + } + return "1.0" +} + +// NewMultiTenantOAuthConfig creates an object that support multitenant OAuth configuration. +// See https://docs.microsoft.com/en-us/azure/azure-resource-manager/authenticate-multi-tenant for more information. +func NewMultiTenantOAuthConfig(activeDirectoryEndpoint, primaryTenantID string, auxiliaryTenantIDs []string, options OAuthOptions) (MultiTenantOAuthConfig, error) { + if len(auxiliaryTenantIDs) == 0 || len(auxiliaryTenantIDs) > 3 { + return nil, errors.New("must specify one to three auxiliary tenants") + } + mtCfg := multiTenantOAuthConfig{ + cfgs: make([]*OAuthConfig, len(auxiliaryTenantIDs)+1), + } + apiVer := options.apiVersion() + pri, err := NewOAuthConfigWithAPIVersion(activeDirectoryEndpoint, primaryTenantID, &apiVer) + if err != nil { + return nil, fmt.Errorf("failed to create OAuthConfig for primary tenant: %v", err) + } + mtCfg.cfgs[0] = pri + for i := range auxiliaryTenantIDs { + aux, err := NewOAuthConfig(activeDirectoryEndpoint, auxiliaryTenantIDs[i]) + if err != nil { + return nil, fmt.Errorf("failed to create OAuthConfig for tenant '%s': %v", auxiliaryTenantIDs[i], err) + } + mtCfg.cfgs[i+1] = aux + } + return mtCfg, nil +} + +type multiTenantOAuthConfig struct { + // first config in the slice is the primary tenant + cfgs []*OAuthConfig +} + +func (m multiTenantOAuthConfig) PrimaryTenant() *OAuthConfig { + return m.cfgs[0] +} + +func (m multiTenantOAuthConfig) AuxiliaryTenants() []*OAuthConfig { + return m.cfgs[1:] +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/adal/devicetoken.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/adal/devicetoken.go index b38f4c245..914f8af5e 100644 --- a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/adal/devicetoken.go +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/adal/devicetoken.go @@ -24,6 +24,7 @@ package adal */ import ( + "context" "encoding/json" "fmt" "io/ioutil" @@ -101,7 +102,14 @@ type deviceToken struct { // InitiateDeviceAuth initiates a device auth flow. It returns a DeviceCode // that can be used with CheckForUserCompletion or WaitForUserCompletion. +// Deprecated: use InitiateDeviceAuthWithContext() instead. func InitiateDeviceAuth(sender Sender, oauthConfig OAuthConfig, clientID, resource string) (*DeviceCode, error) { + return InitiateDeviceAuthWithContext(context.Background(), sender, oauthConfig, clientID, resource) +} + +// InitiateDeviceAuthWithContext initiates a device auth flow. It returns a DeviceCode +// that can be used with CheckForUserCompletion or WaitForUserCompletion. +func InitiateDeviceAuthWithContext(ctx context.Context, sender Sender, oauthConfig OAuthConfig, clientID, resource string) (*DeviceCode, error) { v := url.Values{ "client_id": []string{clientID}, "resource": []string{resource}, @@ -117,7 +125,7 @@ func InitiateDeviceAuth(sender Sender, oauthConfig OAuthConfig, clientID, resour req.ContentLength = int64(len(s)) req.Header.Set(contentType, mimeTypeFormPost) - resp, err := sender.Do(req) + resp, err := sender.Do(req.WithContext(ctx)) if err != nil { return nil, fmt.Errorf("%s %s: %s", logPrefix, errCodeSendingFails, err.Error()) } @@ -151,7 +159,14 @@ func InitiateDeviceAuth(sender Sender, oauthConfig OAuthConfig, clientID, resour // CheckForUserCompletion takes a DeviceCode and checks with the Azure AD OAuth endpoint // to see if the device flow has: been completed, timed out, or otherwise failed +// Deprecated: use CheckForUserCompletionWithContext() instead. func CheckForUserCompletion(sender Sender, code *DeviceCode) (*Token, error) { + return CheckForUserCompletionWithContext(context.Background(), sender, code) +} + +// CheckForUserCompletionWithContext takes a DeviceCode and checks with the Azure AD OAuth endpoint +// to see if the device flow has: been completed, timed out, or otherwise failed +func CheckForUserCompletionWithContext(ctx context.Context, sender Sender, code *DeviceCode) (*Token, error) { v := url.Values{ "client_id": []string{code.ClientID}, "code": []string{*code.DeviceCode}, @@ -169,7 +184,7 @@ func CheckForUserCompletion(sender Sender, code *DeviceCode) (*Token, error) { req.ContentLength = int64(len(s)) req.Header.Set(contentType, mimeTypeFormPost) - resp, err := sender.Do(req) + resp, err := sender.Do(req.WithContext(ctx)) if err != nil { return nil, fmt.Errorf("%s %s: %s", logPrefix, errTokenSendingFails, err.Error()) } @@ -213,12 +228,19 @@ func CheckForUserCompletion(sender Sender, code *DeviceCode) (*Token, error) { // WaitForUserCompletion calls CheckForUserCompletion repeatedly until a token is granted or an error state occurs. // This prevents the user from looping and checking against 'ErrDeviceAuthorizationPending'. +// Deprecated: use WaitForUserCompletionWithContext() instead. func WaitForUserCompletion(sender Sender, code *DeviceCode) (*Token, error) { + return WaitForUserCompletionWithContext(context.Background(), sender, code) +} + +// WaitForUserCompletionWithContext calls CheckForUserCompletion repeatedly until a token is granted or an error +// state occurs. This prevents the user from looping and checking against 'ErrDeviceAuthorizationPending'. +func WaitForUserCompletionWithContext(ctx context.Context, sender Sender, code *DeviceCode) (*Token, error) { intervalDuration := time.Duration(*code.Interval) * time.Second waitDuration := intervalDuration for { - token, err := CheckForUserCompletion(sender, code) + token, err := CheckForUserCompletionWithContext(ctx, sender, code) if err == nil { return token, nil @@ -237,6 +259,11 @@ func WaitForUserCompletion(sender Sender, code *DeviceCode) (*Token, error) { return nil, fmt.Errorf("%s Error waiting for user to complete device flow. Server told us to slow_down too much", logPrefix) } - time.Sleep(waitDuration) + select { + case <-time.After(waitDuration): + // noop + case <-ctx.Done(): + return nil, ctx.Err() + } } } diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/adal/go.mod b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/adal/go.mod new file mode 100644 index 000000000..fdc5b90ca --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/adal/go.mod @@ -0,0 +1,12 @@ +module github.com/Azure/go-autorest/autorest/adal + +go 1.12 + +require ( + github.com/Azure/go-autorest/autorest v0.9.0 + github.com/Azure/go-autorest/autorest/date v0.2.0 + github.com/Azure/go-autorest/autorest/mocks v0.3.0 + github.com/Azure/go-autorest/tracing v0.5.0 + github.com/dgrijalva/jwt-go v3.2.0+incompatible + golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/adal/go.sum b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/adal/go.sum new file mode 100644 index 000000000..f0a018563 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/adal/go.sum @@ -0,0 +1,23 @@ +github.com/Azure/go-autorest/autorest v0.9.0 h1:MRvx8gncNaXJqOoLmhNjUAKh33JJF8LyxPhomEtOsjs= +github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/date v0.1.0 h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM= +github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/date v0.2.0 h1:yW+Zlqf26583pE43KhfnhFcdmSWlm5Ew6bxipnr/tbM= +github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= +github.com/Azure/go-autorest/autorest/mocks v0.1.0 h1:Kx+AUU2Te+A3JIyYn6Dfs+cFgx5XorQKuIXrZGoq/SI= +github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0 h1:Ww5g4zThfD/6cLb4z6xxgeyDa7QDkizMkJKe0ysZXp0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.3.0 h1:qJumjCaCudz+OcqE9/XtEPfvtOjOmKaui4EOpFI6zZc= +github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= +github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k= +github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/adal/go_mod_tidy_hack.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/adal/go_mod_tidy_hack.go new file mode 100644 index 000000000..28a4bfc4c --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/adal/go_mod_tidy_hack.go @@ -0,0 +1,24 @@ +// +build modhack + +package adal + +// Copyright 2017 Microsoft Corporation +// +// 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. + +// This file, and the github.com/Azure/go-autorest/autorest import, won't actually become part of +// the resultant binary. + +// Necessary for safely adding multi-module repo. +// See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository +import _ "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/adal/sender.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/adal/sender.go index 0e5ad14d3..d7e4372bb 100644 --- a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/adal/sender.go +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/adal/sender.go @@ -15,7 +15,12 @@ package adal // limitations under the License. import ( + "crypto/tls" "net/http" + "net/http/cookiejar" + "sync" + + "github.com/Azure/go-autorest/tracing" ) const ( @@ -23,6 +28,9 @@ const ( mimeTypeFormPost = "application/x-www-form-urlencoded" ) +var defaultSender Sender +var defaultSenderInit = &sync.Once{} + // Sender is the interface that wraps the Do method to send HTTP requests. // // The standard http.Client conforms to this interface. @@ -38,14 +46,14 @@ func (sf SenderFunc) Do(r *http.Request) (*http.Response, error) { return sf(r) } -// SendDecorator takes and possibily decorates, by wrapping, a Sender. Decorators may affect the +// SendDecorator takes and possibly decorates, by wrapping, a Sender. Decorators may affect the // http.Request and pass it along or, first, pass the http.Request along then react to the // http.Response result. type SendDecorator func(Sender) Sender // CreateSender creates, decorates, and returns, as a Sender, the default http.Client. func CreateSender(decorators ...SendDecorator) Sender { - return DecorateSender(&http.Client{}, decorators...) + return DecorateSender(sender(), decorators...) } // DecorateSender accepts a Sender and a, possibly empty, set of SendDecorators, which is applies to @@ -58,3 +66,30 @@ func DecorateSender(s Sender, decorators ...SendDecorator) Sender { } return s } + +func sender() Sender { + // note that we can't init defaultSender in init() since it will + // execute before calling code has had a chance to enable tracing + defaultSenderInit.Do(func() { + // Use behaviour compatible with DefaultTransport, but require TLS minimum version. + defaultTransport := http.DefaultTransport.(*http.Transport) + transport := &http.Transport{ + Proxy: defaultTransport.Proxy, + DialContext: defaultTransport.DialContext, + MaxIdleConns: defaultTransport.MaxIdleConns, + IdleConnTimeout: defaultTransport.IdleConnTimeout, + TLSHandshakeTimeout: defaultTransport.TLSHandshakeTimeout, + ExpectContinueTimeout: defaultTransport.ExpectContinueTimeout, + TLSClientConfig: &tls.Config{ + MinVersion: tls.VersionTLS12, + }, + } + var roundTripper http.RoundTripper = transport + if tracing.IsEnabled() { + roundTripper = tracing.NewTransport(transport) + } + j, _ := cookiejar.New(nil) + defaultSender = &http.Client{Jar: j, Transport: roundTripper} + }) + return defaultSender +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/adal/token.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/adal/token.go index b7d5c6071..33bbd6ea1 100644 --- a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/adal/token.go +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/adal/token.go @@ -22,11 +22,13 @@ import ( "crypto/x509" "encoding/base64" "encoding/json" + "errors" "fmt" "io/ioutil" + "math" "net/http" "net/url" - "strconv" + "os" "strings" "sync" "time" @@ -58,6 +60,15 @@ const ( // msiEndpoint is the well known endpoint for getting MSI authentications tokens msiEndpoint = "http://169.254.169.254/metadata/identity/oauth2/token" + + // the default number of attempts to refresh an MSI authentication token + defaultMaxMSIRefreshAttempts = 5 + + // asMSIEndpointEnv is the environment variable used to store the endpoint on App Service and Functions + asMSIEndpointEnv = "MSI_ENDPOINT" + + // asMSISecretEnv is the environment variable used to store the request secret on App Service and Functions + asMSISecretEnv = "MSI_SECRET" ) // OAuthTokenProvider is an interface which should be implemented by an access token retriever @@ -65,6 +76,12 @@ type OAuthTokenProvider interface { OAuthToken() string } +// MultitenantOAuthTokenProvider provides tokens used for multi-tenant authorization. +type MultitenantOAuthTokenProvider interface { + PrimaryOAuthToken() string + AuxiliaryOAuthTokens() []string +} + // TokenRefreshError is an interface used by errors returned during token refresh. type TokenRefreshError interface { error @@ -89,19 +106,31 @@ type RefresherWithContext interface { // a successful token refresh type TokenRefreshCallback func(Token) error +// TokenRefresh is a type representing a custom callback to refresh a token +type TokenRefresh func(ctx context.Context, resource string) (*Token, error) + // Token encapsulates the access token used to authorize Azure requests. +// https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-oauth2-client-creds-grant-flow#service-to-service-access-token-response type Token struct { AccessToken string `json:"access_token"` RefreshToken string `json:"refresh_token"` - ExpiresIn string `json:"expires_in"` - ExpiresOn string `json:"expires_on"` - NotBefore string `json:"not_before"` + ExpiresIn json.Number `json:"expires_in"` + ExpiresOn json.Number `json:"expires_on"` + NotBefore json.Number `json:"not_before"` Resource string `json:"resource"` Type string `json:"token_type"` } +func newToken() Token { + return Token{ + ExpiresIn: "0", + ExpiresOn: "0", + NotBefore: "0", + } +} + // IsZero returns true if the token object is zero-initialized. func (t Token) IsZero() bool { return t == Token{} @@ -109,12 +138,12 @@ func (t Token) IsZero() bool { // Expires returns the time.Time when the Token expires. func (t Token) Expires() time.Time { - s, err := strconv.Atoi(t.ExpiresOn) + s, err := t.ExpiresOn.Float64() if err != nil { s = -3600 } - expiration := date.NewUnixTimeFromSeconds(float64(s)) + expiration := date.NewUnixTimeFromSeconds(s) return time.Time(expiration).UTC() } @@ -135,6 +164,12 @@ func (t *Token) OAuthToken() string { return t.AccessToken } +// ServicePrincipalSecret is an interface that allows various secret mechanism to fill the form +// that is submitted when acquiring an oAuth token. +type ServicePrincipalSecret interface { + SetAuthenticationValues(spt *ServicePrincipalToken, values *url.Values) error +} + // ServicePrincipalNoSecret represents a secret type that contains no secret // meaning it is not valid for fetching a fresh token. This is used by Manual type ServicePrincipalNoSecret struct { @@ -146,15 +181,19 @@ func (noSecret *ServicePrincipalNoSecret) SetAuthenticationValues(spt *ServicePr return fmt.Errorf("Manually created ServicePrincipalToken does not contain secret material to retrieve a new access token") } -// ServicePrincipalSecret is an interface that allows various secret mechanism to fill the form -// that is submitted when acquiring an oAuth token. -type ServicePrincipalSecret interface { - SetAuthenticationValues(spt *ServicePrincipalToken, values *url.Values) error +// MarshalJSON implements the json.Marshaler interface. +func (noSecret ServicePrincipalNoSecret) MarshalJSON() ([]byte, error) { + type tokenType struct { + Type string `json:"type"` + } + return json.Marshal(tokenType{ + Type: "ServicePrincipalNoSecret", + }) } // ServicePrincipalTokenSecret implements ServicePrincipalSecret for client_secret type authorization. type ServicePrincipalTokenSecret struct { - ClientSecret string + ClientSecret string `json:"value"` } // SetAuthenticationValues is a method of the interface ServicePrincipalSecret. @@ -164,49 +203,24 @@ func (tokenSecret *ServicePrincipalTokenSecret) SetAuthenticationValues(spt *Ser return nil } +// MarshalJSON implements the json.Marshaler interface. +func (tokenSecret ServicePrincipalTokenSecret) MarshalJSON() ([]byte, error) { + type tokenType struct { + Type string `json:"type"` + Value string `json:"value"` + } + return json.Marshal(tokenType{ + Type: "ServicePrincipalTokenSecret", + Value: tokenSecret.ClientSecret, + }) +} + // ServicePrincipalCertificateSecret implements ServicePrincipalSecret for generic RSA cert auth with signed JWTs. type ServicePrincipalCertificateSecret struct { Certificate *x509.Certificate PrivateKey *rsa.PrivateKey } -// ServicePrincipalMSISecret implements ServicePrincipalSecret for machines running the MSI Extension. -type ServicePrincipalMSISecret struct { -} - -// ServicePrincipalUsernamePasswordSecret implements ServicePrincipalSecret for username and password auth. -type ServicePrincipalUsernamePasswordSecret struct { - Username string - Password string -} - -// ServicePrincipalAuthorizationCodeSecret implements ServicePrincipalSecret for authorization code auth. -type ServicePrincipalAuthorizationCodeSecret struct { - ClientSecret string - AuthorizationCode string - RedirectURI string -} - -// SetAuthenticationValues is a method of the interface ServicePrincipalSecret. -func (secret *ServicePrincipalAuthorizationCodeSecret) SetAuthenticationValues(spt *ServicePrincipalToken, v *url.Values) error { - v.Set("code", secret.AuthorizationCode) - v.Set("client_secret", secret.ClientSecret) - v.Set("redirect_uri", secret.RedirectURI) - return nil -} - -// SetAuthenticationValues is a method of the interface ServicePrincipalSecret. -func (secret *ServicePrincipalUsernamePasswordSecret) SetAuthenticationValues(spt *ServicePrincipalToken, v *url.Values) error { - v.Set("username", secret.Username) - v.Set("password", secret.Password) - return nil -} - -// SetAuthenticationValues is a method of the interface ServicePrincipalSecret. -func (msiSecret *ServicePrincipalMSISecret) SetAuthenticationValues(spt *ServicePrincipalToken, v *url.Values) error { - return nil -} - // SignJwt returns the JWT signed with the certificate's private key. func (secret *ServicePrincipalCertificateSecret) SignJwt(spt *ServicePrincipalToken) (string, error) { hasher := sha1.New() @@ -226,10 +240,12 @@ func (secret *ServicePrincipalCertificateSecret) SignJwt(spt *ServicePrincipalTo token := jwt.New(jwt.SigningMethodRS256) token.Header["x5t"] = thumbprint + x5c := []string{base64.StdEncoding.EncodeToString(secret.Certificate.Raw)} + token.Header["x5c"] = x5c token.Claims = jwt.MapClaims{ - "aud": spt.oauthConfig.TokenEndpoint.String(), - "iss": spt.clientID, - "sub": spt.clientID, + "aud": spt.inner.OauthConfig.TokenEndpoint.String(), + "iss": spt.inner.ClientID, + "sub": spt.inner.ClientID, "jti": base64.URLEncoding.EncodeToString(jti), "nbf": time.Now().Unix(), "exp": time.Now().Add(time.Hour * 24).Unix(), @@ -252,19 +268,162 @@ func (secret *ServicePrincipalCertificateSecret) SetAuthenticationValues(spt *Se return nil } +// MarshalJSON implements the json.Marshaler interface. +func (secret ServicePrincipalCertificateSecret) MarshalJSON() ([]byte, error) { + return nil, errors.New("marshalling ServicePrincipalCertificateSecret is not supported") +} + +// ServicePrincipalMSISecret implements ServicePrincipalSecret for machines running the MSI Extension. +type ServicePrincipalMSISecret struct { +} + +// SetAuthenticationValues is a method of the interface ServicePrincipalSecret. +func (msiSecret *ServicePrincipalMSISecret) SetAuthenticationValues(spt *ServicePrincipalToken, v *url.Values) error { + return nil +} + +// MarshalJSON implements the json.Marshaler interface. +func (msiSecret ServicePrincipalMSISecret) MarshalJSON() ([]byte, error) { + return nil, errors.New("marshalling ServicePrincipalMSISecret is not supported") +} + +// ServicePrincipalUsernamePasswordSecret implements ServicePrincipalSecret for username and password auth. +type ServicePrincipalUsernamePasswordSecret struct { + Username string `json:"username"` + Password string `json:"password"` +} + +// SetAuthenticationValues is a method of the interface ServicePrincipalSecret. +func (secret *ServicePrincipalUsernamePasswordSecret) SetAuthenticationValues(spt *ServicePrincipalToken, v *url.Values) error { + v.Set("username", secret.Username) + v.Set("password", secret.Password) + return nil +} + +// MarshalJSON implements the json.Marshaler interface. +func (secret ServicePrincipalUsernamePasswordSecret) MarshalJSON() ([]byte, error) { + type tokenType struct { + Type string `json:"type"` + Username string `json:"username"` + Password string `json:"password"` + } + return json.Marshal(tokenType{ + Type: "ServicePrincipalUsernamePasswordSecret", + Username: secret.Username, + Password: secret.Password, + }) +} + +// ServicePrincipalAuthorizationCodeSecret implements ServicePrincipalSecret for authorization code auth. +type ServicePrincipalAuthorizationCodeSecret struct { + ClientSecret string `json:"value"` + AuthorizationCode string `json:"authCode"` + RedirectURI string `json:"redirect"` +} + +// SetAuthenticationValues is a method of the interface ServicePrincipalSecret. +func (secret *ServicePrincipalAuthorizationCodeSecret) SetAuthenticationValues(spt *ServicePrincipalToken, v *url.Values) error { + v.Set("code", secret.AuthorizationCode) + v.Set("client_secret", secret.ClientSecret) + v.Set("redirect_uri", secret.RedirectURI) + return nil +} + +// MarshalJSON implements the json.Marshaler interface. +func (secret ServicePrincipalAuthorizationCodeSecret) MarshalJSON() ([]byte, error) { + type tokenType struct { + Type string `json:"type"` + Value string `json:"value"` + AuthCode string `json:"authCode"` + Redirect string `json:"redirect"` + } + return json.Marshal(tokenType{ + Type: "ServicePrincipalAuthorizationCodeSecret", + Value: secret.ClientSecret, + AuthCode: secret.AuthorizationCode, + Redirect: secret.RedirectURI, + }) +} + // ServicePrincipalToken encapsulates a Token created for a Service Principal. type ServicePrincipalToken struct { - token Token - secret ServicePrincipalSecret - oauthConfig OAuthConfig - clientID string - resource string - autoRefresh bool - refreshLock *sync.RWMutex - refreshWithin time.Duration - sender Sender + inner servicePrincipalToken + refreshLock *sync.RWMutex + sender Sender + customRefreshFunc TokenRefresh + refreshCallbacks []TokenRefreshCallback + // MaxMSIRefreshAttempts is the maximum number of attempts to refresh an MSI token. + MaxMSIRefreshAttempts int +} - refreshCallbacks []TokenRefreshCallback +// MarshalTokenJSON returns the marshalled inner token. +func (spt ServicePrincipalToken) MarshalTokenJSON() ([]byte, error) { + return json.Marshal(spt.inner.Token) +} + +// SetRefreshCallbacks replaces any existing refresh callbacks with the specified callbacks. +func (spt *ServicePrincipalToken) SetRefreshCallbacks(callbacks []TokenRefreshCallback) { + spt.refreshCallbacks = callbacks +} + +// SetCustomRefreshFunc sets a custom refresh function used to refresh the token. +func (spt *ServicePrincipalToken) SetCustomRefreshFunc(customRefreshFunc TokenRefresh) { + spt.customRefreshFunc = customRefreshFunc +} + +// MarshalJSON implements the json.Marshaler interface. +func (spt ServicePrincipalToken) MarshalJSON() ([]byte, error) { + return json.Marshal(spt.inner) +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (spt *ServicePrincipalToken) UnmarshalJSON(data []byte) error { + // need to determine the token type + raw := map[string]interface{}{} + err := json.Unmarshal(data, &raw) + if err != nil { + return err + } + secret := raw["secret"].(map[string]interface{}) + switch secret["type"] { + case "ServicePrincipalNoSecret": + spt.inner.Secret = &ServicePrincipalNoSecret{} + case "ServicePrincipalTokenSecret": + spt.inner.Secret = &ServicePrincipalTokenSecret{} + case "ServicePrincipalCertificateSecret": + return errors.New("unmarshalling ServicePrincipalCertificateSecret is not supported") + case "ServicePrincipalMSISecret": + return errors.New("unmarshalling ServicePrincipalMSISecret is not supported") + case "ServicePrincipalUsernamePasswordSecret": + spt.inner.Secret = &ServicePrincipalUsernamePasswordSecret{} + case "ServicePrincipalAuthorizationCodeSecret": + spt.inner.Secret = &ServicePrincipalAuthorizationCodeSecret{} + default: + return fmt.Errorf("unrecognized token type '%s'", secret["type"]) + } + err = json.Unmarshal(data, &spt.inner) + if err != nil { + return err + } + // Don't override the refreshLock or the sender if those have been already set. + if spt.refreshLock == nil { + spt.refreshLock = &sync.RWMutex{} + } + if spt.sender == nil { + spt.sender = sender() + } + return nil +} + +// internal type used for marshalling/unmarshalling +type servicePrincipalToken struct { + Token Token `json:"token"` + Secret ServicePrincipalSecret `json:"secret"` + OauthConfig OAuthConfig `json:"oauth"` + ClientID string `json:"clientID"` + Resource string `json:"resource"` + AutoRefresh bool `json:"autoRefresh"` + RefreshWithin time.Duration `json:"refreshWithin"` } func validateOAuthConfig(oac OAuthConfig) error { @@ -289,14 +448,17 @@ func NewServicePrincipalTokenWithSecret(oauthConfig OAuthConfig, id string, reso return nil, fmt.Errorf("parameter 'secret' cannot be nil") } spt := &ServicePrincipalToken{ - oauthConfig: oauthConfig, - secret: secret, - clientID: id, - resource: resource, - autoRefresh: true, + inner: servicePrincipalToken{ + Token: newToken(), + OauthConfig: oauthConfig, + Secret: secret, + ClientID: id, + Resource: resource, + AutoRefresh: true, + RefreshWithin: defaultRefresh, + }, refreshLock: &sync.RWMutex{}, - refreshWithin: defaultRefresh, - sender: &http.Client{}, + sender: sender(), refreshCallbacks: callbacks, } return spt, nil @@ -326,7 +488,39 @@ func NewServicePrincipalTokenFromManualToken(oauthConfig OAuthConfig, clientID s return nil, err } - spt.token = token + spt.inner.Token = token + + return spt, nil +} + +// NewServicePrincipalTokenFromManualTokenSecret creates a ServicePrincipalToken using the supplied token and secret +func NewServicePrincipalTokenFromManualTokenSecret(oauthConfig OAuthConfig, clientID string, resource string, token Token, secret ServicePrincipalSecret, callbacks ...TokenRefreshCallback) (*ServicePrincipalToken, error) { + if err := validateOAuthConfig(oauthConfig); err != nil { + return nil, err + } + if err := validateStringParam(clientID, "clientID"); err != nil { + return nil, err + } + if err := validateStringParam(resource, "resource"); err != nil { + return nil, err + } + if secret == nil { + return nil, fmt.Errorf("parameter 'secret' cannot be nil") + } + if token.IsZero() { + return nil, fmt.Errorf("parameter 'token' cannot be zero-initialized") + } + spt, err := NewServicePrincipalTokenWithSecret( + oauthConfig, + clientID, + resource, + secret, + callbacks...) + if err != nil { + return nil, err + } + + spt.inner.Token = token return spt, nil } @@ -455,6 +649,31 @@ func GetMSIVMEndpoint() (string, error) { return msiEndpoint, nil } +func isAppService() bool { + _, asMSIEndpointEnvExists := os.LookupEnv(asMSIEndpointEnv) + _, asMSISecretEnvExists := os.LookupEnv(asMSISecretEnv) + + return asMSIEndpointEnvExists && asMSISecretEnvExists +} + +// GetMSIAppServiceEndpoint get the MSI endpoint for App Service and Functions +func GetMSIAppServiceEndpoint() (string, error) { + asMSIEndpoint, asMSIEndpointEnvExists := os.LookupEnv(asMSIEndpointEnv) + + if asMSIEndpointEnvExists { + return asMSIEndpoint, nil + } + return "", errors.New("MSI endpoint not found") +} + +// GetMSIEndpoint get the appropriate MSI endpoint depending on the runtime environment +func GetMSIEndpoint() (string, error) { + if isAppService() { + return GetMSIAppServiceEndpoint() + } + return GetMSIVMEndpoint() +} + // NewServicePrincipalTokenFromMSI creates a ServicePrincipalToken via the MSI VM Extension. // It will use the system assigned identity when creating the token. func NewServicePrincipalTokenFromMSI(msiEndpoint, resource string, callbacks ...TokenRefreshCallback) (*ServicePrincipalToken, error) { @@ -487,27 +706,36 @@ func newServicePrincipalTokenFromMSI(msiEndpoint, resource string, userAssignedI v := url.Values{} v.Set("resource", resource) - v.Set("api-version", "2018-02-01") + // App Service MSI currently only supports token API version 2017-09-01 + if isAppService() { + v.Set("api-version", "2017-09-01") + } else { + v.Set("api-version", "2018-02-01") + } if userAssignedID != nil { v.Set("client_id", *userAssignedID) } msiEndpointURL.RawQuery = v.Encode() spt := &ServicePrincipalToken{ - oauthConfig: OAuthConfig{ - TokenEndpoint: *msiEndpointURL, + inner: servicePrincipalToken{ + Token: newToken(), + OauthConfig: OAuthConfig{ + TokenEndpoint: *msiEndpointURL, + }, + Secret: &ServicePrincipalMSISecret{}, + Resource: resource, + AutoRefresh: true, + RefreshWithin: defaultRefresh, }, - secret: &ServicePrincipalMSISecret{}, - resource: resource, - autoRefresh: true, - refreshLock: &sync.RWMutex{}, - refreshWithin: defaultRefresh, - sender: &http.Client{}, - refreshCallbacks: callbacks, + refreshLock: &sync.RWMutex{}, + sender: sender(), + refreshCallbacks: callbacks, + MaxMSIRefreshAttempts: defaultMaxMSIRefreshAttempts, } if userAssignedID != nil { - spt.clientID = *userAssignedID + spt.inner.ClientID = *userAssignedID } return spt, nil @@ -542,12 +770,12 @@ func (spt *ServicePrincipalToken) EnsureFresh() error { // EnsureFreshWithContext will refresh the token if it will expire within the refresh window (as set by // RefreshWithin) and autoRefresh flag is on. This method is safe for concurrent use. func (spt *ServicePrincipalToken) EnsureFreshWithContext(ctx context.Context) error { - if spt.autoRefresh && spt.token.WillExpireIn(spt.refreshWithin) { + if spt.inner.AutoRefresh && spt.inner.Token.WillExpireIn(spt.inner.RefreshWithin) { // take the write lock then check to see if the token was already refreshed spt.refreshLock.Lock() defer spt.refreshLock.Unlock() - if spt.token.WillExpireIn(spt.refreshWithin) { - return spt.refreshInternal(ctx, spt.resource) + if spt.inner.Token.WillExpireIn(spt.inner.RefreshWithin) { + return spt.refreshInternal(ctx, spt.inner.Resource) } } return nil @@ -557,7 +785,7 @@ func (spt *ServicePrincipalToken) EnsureFreshWithContext(ctx context.Context) er func (spt *ServicePrincipalToken) InvokeRefreshCallbacks(token Token) error { if spt.refreshCallbacks != nil { for _, callback := range spt.refreshCallbacks { - err := callback(spt.token) + err := callback(spt.inner.Token) if err != nil { return fmt.Errorf("adal: TokenRefreshCallback handler failed. Error = '%v'", err) } @@ -567,27 +795,27 @@ func (spt *ServicePrincipalToken) InvokeRefreshCallbacks(token Token) error { } // Refresh obtains a fresh token for the Service Principal. -// This method is not safe for concurrent use and should be syncrhonized. +// This method is safe for concurrent use. func (spt *ServicePrincipalToken) Refresh() error { return spt.RefreshWithContext(context.Background()) } // RefreshWithContext obtains a fresh token for the Service Principal. -// This method is not safe for concurrent use and should be syncrhonized. +// This method is safe for concurrent use. func (spt *ServicePrincipalToken) RefreshWithContext(ctx context.Context) error { spt.refreshLock.Lock() defer spt.refreshLock.Unlock() - return spt.refreshInternal(ctx, spt.resource) + return spt.refreshInternal(ctx, spt.inner.Resource) } // RefreshExchange refreshes the token, but for a different resource. -// This method is not safe for concurrent use and should be syncrhonized. +// This method is safe for concurrent use. func (spt *ServicePrincipalToken) RefreshExchange(resource string) error { return spt.RefreshExchangeWithContext(context.Background(), resource) } // RefreshExchangeWithContext refreshes the token, but for a different resource. -// This method is not safe for concurrent use and should be syncrhonized. +// This method is safe for concurrent use. func (spt *ServicePrincipalToken) RefreshExchangeWithContext(ctx context.Context, resource string) error { spt.refreshLock.Lock() defer spt.refreshLock.Unlock() @@ -595,7 +823,7 @@ func (spt *ServicePrincipalToken) RefreshExchangeWithContext(ctx context.Context } func (spt *ServicePrincipalToken) getGrantType() string { - switch spt.secret.(type) { + switch spt.inner.Secret.(type) { case *ServicePrincipalUsernamePasswordSecret: return OAuthGrantTypeUserPass case *ServicePrincipalAuthorizationCodeSecret: @@ -610,26 +838,49 @@ func isIMDS(u url.URL) bool { if err != nil { return false } - return u.Host == imds.Host && u.Path == imds.Path + return (u.Host == imds.Host && u.Path == imds.Path) || isAppService() } func (spt *ServicePrincipalToken) refreshInternal(ctx context.Context, resource string) error { - req, err := http.NewRequest(http.MethodPost, spt.oauthConfig.TokenEndpoint.String(), nil) + if spt.customRefreshFunc != nil { + token, err := spt.customRefreshFunc(ctx, resource) + if err != nil { + return err + } + spt.inner.Token = *token + return spt.InvokeRefreshCallbacks(spt.inner.Token) + } + + req, err := http.NewRequest(http.MethodPost, spt.inner.OauthConfig.TokenEndpoint.String(), nil) if err != nil { return fmt.Errorf("adal: Failed to build the refresh request. Error = '%v'", err) } + req.Header.Add("User-Agent", UserAgent()) + // Add header when runtime is on App Service or Functions + if isAppService() { + asMSISecret, _ := os.LookupEnv(asMSISecretEnv) + req.Header.Add("Secret", asMSISecret) + } req = req.WithContext(ctx) - if !isIMDS(spt.oauthConfig.TokenEndpoint) { + if !isIMDS(spt.inner.OauthConfig.TokenEndpoint) { v := url.Values{} - v.Set("client_id", spt.clientID) + v.Set("client_id", spt.inner.ClientID) v.Set("resource", resource) - if spt.token.RefreshToken != "" { + if spt.inner.Token.RefreshToken != "" { v.Set("grant_type", OAuthGrantTypeRefreshToken) - v.Set("refresh_token", spt.token.RefreshToken) + v.Set("refresh_token", spt.inner.Token.RefreshToken) + // web apps must specify client_secret when refreshing tokens + // see https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-protocols-oauth-code#refreshing-the-access-tokens + if spt.getGrantType() == OAuthGrantTypeAuthorizationCode { + err := spt.inner.Secret.SetAuthenticationValues(spt, &v) + if err != nil { + return err + } + } } else { v.Set("grant_type", spt.getGrantType()) - err := spt.secret.SetAuthenticationValues(spt, &v) + err := spt.inner.Secret.SetAuthenticationValues(spt, &v) if err != nil { return err } @@ -642,18 +893,19 @@ func (spt *ServicePrincipalToken) refreshInternal(ctx context.Context, resource req.Body = body } - if _, ok := spt.secret.(*ServicePrincipalMSISecret); ok { + if _, ok := spt.inner.Secret.(*ServicePrincipalMSISecret); ok { req.Method = http.MethodGet req.Header.Set(metadataHeader, "true") } var resp *http.Response - if isIMDS(spt.oauthConfig.TokenEndpoint) { - resp, err = retry(spt.sender, req) + if isIMDS(spt.inner.OauthConfig.TokenEndpoint) { + resp, err = retryForIMDS(spt.sender, req, spt.MaxMSIRefreshAttempts) } else { resp, err = spt.sender.Do(req) } if err != nil { + // don't return a TokenRefreshError here; this will allow retry logic to apply return fmt.Errorf("adal: Failed to execute the refresh request. Error = '%v'", err) } @@ -662,11 +914,15 @@ func (spt *ServicePrincipalToken) refreshInternal(ctx context.Context, resource if resp.StatusCode != http.StatusOK { if err != nil { - return newTokenRefreshError(fmt.Sprintf("adal: Refresh request failed. Status Code = '%d'. Failed reading response body", resp.StatusCode), resp) + return newTokenRefreshError(fmt.Sprintf("adal: Refresh request failed. Status Code = '%d'. Failed reading response body: %v", resp.StatusCode, err), resp) } return newTokenRefreshError(fmt.Sprintf("adal: Refresh request failed. Status Code = '%d'. Response body: %s", resp.StatusCode, string(rb)), resp) } + // for the following error cases don't return a TokenRefreshError. the operation succeeded + // but some transient failure happened during deserialization. by returning a generic error + // the retry logic will kick in (we don't retry on TokenRefreshError). + if err != nil { return fmt.Errorf("adal: Failed to read a new service principal token during refresh. Error = '%v'", err) } @@ -679,12 +935,14 @@ func (spt *ServicePrincipalToken) refreshInternal(ctx context.Context, resource return fmt.Errorf("adal: Failed to unmarshal the service principal token during refresh. Error = '%v' JSON = '%s'", err, string(rb)) } - spt.token = token + spt.inner.Token = token return spt.InvokeRefreshCallbacks(token) } -func retry(sender Sender, req *http.Request) (resp *http.Response, err error) { +// retry logic specific to retrieving a token from the IMDS endpoint +func retryForIMDS(sender Sender, req *http.Request, maxAttempts int) (resp *http.Response, err error) { + // copied from client.go due to circular dependency retries := []int{ http.StatusRequestTimeout, // 408 http.StatusTooManyRequests, // 429 @@ -693,8 +951,10 @@ func retry(sender Sender, req *http.Request) (resp *http.Response, err error) { http.StatusServiceUnavailable, // 503 http.StatusGatewayTimeout, // 504 } - // Extra retry status codes requered - retries = append(retries, http.StatusNotFound, + // extra retry status codes specific to IMDS + retries = append(retries, + http.StatusNotFound, + http.StatusGone, // all remaining 5xx http.StatusNotImplemented, http.StatusHTTPVersionNotSupported, @@ -704,48 +964,46 @@ func retry(sender Sender, req *http.Request) (resp *http.Response, err error) { http.StatusNotExtended, http.StatusNetworkAuthenticationRequired) + // see https://docs.microsoft.com/en-us/azure/active-directory/managed-service-identity/how-to-use-vm-token#retry-guidance + + const maxDelay time.Duration = 60 * time.Second + attempt := 0 - maxAttempts := 5 + delay := time.Duration(0) for attempt < maxAttempts { resp, err = sender.Do(req) - if err != nil || resp.StatusCode == http.StatusOK || !containsInt(retries, resp.StatusCode) { + // we want to retry if err is not nil or the status code is in the list of retry codes + if err == nil && !responseHasStatusCode(resp, retries...) { return } - if !delay(resp, req.Context().Done()) { - select { - case <-time.After(time.Second): - attempt++ - case <-req.Context().Done(): - err = req.Context().Err() - return - } + // perform exponential backoff with a cap. + // must increment attempt before calculating delay. + attempt++ + // the base value of 2 is the "delta backoff" as specified in the guidance doc + delay += (time.Duration(math.Pow(2, float64(attempt))) * time.Second) + if delay > maxDelay { + delay = maxDelay + } + + select { + case <-time.After(delay): + // intentionally left blank + case <-req.Context().Done(): + err = req.Context().Err() + return } } return } -func containsInt(ints []int, n int) bool { - for _, i := range ints { - if i == n { - return true - } - } - return false -} - -func delay(resp *http.Response, cancel <-chan struct{}) bool { - if resp == nil { - return false - } - retryAfter, _ := strconv.Atoi(resp.Header.Get("Retry-After")) - if resp.StatusCode == http.StatusTooManyRequests && retryAfter > 0 { - select { - case <-time.After(time.Duration(retryAfter) * time.Second): - return true - case <-cancel: - return false +func responseHasStatusCode(resp *http.Response, codes ...int) bool { + if resp != nil { + for _, i := range codes { + if i == resp.StatusCode { + return true + } } } return false @@ -753,13 +1011,13 @@ func delay(resp *http.Response, cancel <-chan struct{}) bool { // SetAutoRefresh enables or disables automatic refreshing of stale tokens. func (spt *ServicePrincipalToken) SetAutoRefresh(autoRefresh bool) { - spt.autoRefresh = autoRefresh + spt.inner.AutoRefresh = autoRefresh } // SetRefreshWithin sets the interval within which if the token will expire, EnsureFresh will // refresh the token. func (spt *ServicePrincipalToken) SetRefreshWithin(d time.Duration) { - spt.refreshWithin = d + spt.inner.RefreshWithin = d return } @@ -771,12 +1029,102 @@ func (spt *ServicePrincipalToken) SetSender(s Sender) { spt.sender = s } func (spt *ServicePrincipalToken) OAuthToken() string { spt.refreshLock.RLock() defer spt.refreshLock.RUnlock() - return spt.token.OAuthToken() + return spt.inner.Token.OAuthToken() } // Token returns a copy of the current token. func (spt *ServicePrincipalToken) Token() Token { spt.refreshLock.RLock() defer spt.refreshLock.RUnlock() - return spt.token + return spt.inner.Token +} + +// MultiTenantServicePrincipalToken contains tokens for multi-tenant authorization. +type MultiTenantServicePrincipalToken struct { + PrimaryToken *ServicePrincipalToken + AuxiliaryTokens []*ServicePrincipalToken +} + +// PrimaryOAuthToken returns the primary authorization token. +func (mt *MultiTenantServicePrincipalToken) PrimaryOAuthToken() string { + return mt.PrimaryToken.OAuthToken() +} + +// AuxiliaryOAuthTokens returns one to three auxiliary authorization tokens. +func (mt *MultiTenantServicePrincipalToken) AuxiliaryOAuthTokens() []string { + tokens := make([]string, len(mt.AuxiliaryTokens)) + for i := range mt.AuxiliaryTokens { + tokens[i] = mt.AuxiliaryTokens[i].OAuthToken() + } + return tokens +} + +// EnsureFreshWithContext will refresh the token if it will expire within the refresh window (as set by +// RefreshWithin) and autoRefresh flag is on. This method is safe for concurrent use. +func (mt *MultiTenantServicePrincipalToken) EnsureFreshWithContext(ctx context.Context) error { + if err := mt.PrimaryToken.EnsureFreshWithContext(ctx); err != nil { + return fmt.Errorf("failed to refresh primary token: %v", err) + } + for _, aux := range mt.AuxiliaryTokens { + if err := aux.EnsureFreshWithContext(ctx); err != nil { + return fmt.Errorf("failed to refresh auxiliary token: %v", err) + } + } + return nil +} + +// RefreshWithContext obtains a fresh token for the Service Principal. +func (mt *MultiTenantServicePrincipalToken) RefreshWithContext(ctx context.Context) error { + if err := mt.PrimaryToken.RefreshWithContext(ctx); err != nil { + return fmt.Errorf("failed to refresh primary token: %v", err) + } + for _, aux := range mt.AuxiliaryTokens { + if err := aux.RefreshWithContext(ctx); err != nil { + return fmt.Errorf("failed to refresh auxiliary token: %v", err) + } + } + return nil +} + +// RefreshExchangeWithContext refreshes the token, but for a different resource. +func (mt *MultiTenantServicePrincipalToken) RefreshExchangeWithContext(ctx context.Context, resource string) error { + if err := mt.PrimaryToken.RefreshExchangeWithContext(ctx, resource); err != nil { + return fmt.Errorf("failed to refresh primary token: %v", err) + } + for _, aux := range mt.AuxiliaryTokens { + if err := aux.RefreshExchangeWithContext(ctx, resource); err != nil { + return fmt.Errorf("failed to refresh auxiliary token: %v", err) + } + } + return nil +} + +// NewMultiTenantServicePrincipalToken creates a new MultiTenantServicePrincipalToken with the specified credentials and resource. +func NewMultiTenantServicePrincipalToken(multiTenantCfg MultiTenantOAuthConfig, clientID string, secret string, resource string) (*MultiTenantServicePrincipalToken, error) { + if err := validateStringParam(clientID, "clientID"); err != nil { + return nil, err + } + if err := validateStringParam(secret, "secret"); err != nil { + return nil, err + } + if err := validateStringParam(resource, "resource"); err != nil { + return nil, err + } + auxTenants := multiTenantCfg.AuxiliaryTenants() + m := MultiTenantServicePrincipalToken{ + AuxiliaryTokens: make([]*ServicePrincipalToken, len(auxTenants)), + } + primary, err := NewServicePrincipalToken(*multiTenantCfg.PrimaryTenant(), clientID, secret, resource) + if err != nil { + return nil, fmt.Errorf("failed to create SPT for primary tenant: %v", err) + } + m.PrimaryToken = primary + for i := range auxTenants { + aux, err := NewServicePrincipalToken(*auxTenants[i], clientID, secret, resource) + if err != nil { + return nil, fmt.Errorf("failed to create SPT for auxiliary tenant: %v", err) + } + m.AuxiliaryTokens[i] = aux + } + return &m, nil } diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/adal/version.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/adal/version.go new file mode 100644 index 000000000..c867b3484 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/adal/version.go @@ -0,0 +1,45 @@ +package adal + +import ( + "fmt" + "runtime" +) + +// Copyright 2017 Microsoft Corporation +// +// 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. + +const number = "v1.0.0" + +var ( + ua = fmt.Sprintf("Go/%s (%s-%s) go-autorest/adal/%s", + runtime.Version(), + runtime.GOARCH, + runtime.GOOS, + number, + ) +) + +// UserAgent returns a string containing the Go version, system architecture and OS, and the adal version. +func UserAgent() string { + return ua +} + +// AddToUserAgent adds an extension to the current user agent +func AddToUserAgent(extension string) error { + if extension != "" { + ua = fmt.Sprintf("%s %s", ua, extension) + return nil + } + return fmt.Errorf("Extension was empty, User Agent remained as '%s'", ua) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/authorization.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/authorization.go index 77eff45bd..54e87b5b6 100644 --- a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/authorization.go +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/authorization.go @@ -15,6 +15,8 @@ package autorest // limitations under the License. import ( + "crypto/tls" + "encoding/base64" "fmt" "net/http" "net/url" @@ -30,6 +32,8 @@ const ( apiKeyAuthorizerHeader = "Ocp-Apim-Subscription-Key" bingAPISdkHeader = "X-BingApis-SDK-Client" golangBingAPISdkHeaderValue = "Go-SDK" + authorization = "Authorization" + basic = "Basic" ) // Authorizer is the interface that provides a PrepareDecorator used to supply request @@ -68,7 +72,7 @@ func NewAPIKeyAuthorizer(headers map[string]interface{}, queryParameters map[str return &APIKeyAuthorizer{headers: headers, queryParameters: queryParameters} } -// WithAuthorization returns a PrepareDecorator that adds an HTTP headers and Query Paramaters +// WithAuthorization returns a PrepareDecorator that adds an HTTP headers and Query Parameters. func (aka *APIKeyAuthorizer) WithAuthorization() PrepareDecorator { return func(p Preparer) Preparer { return DecoratePreparer(p, WithHeaders(aka.headers), WithQueryParameters(aka.queryParameters)) @@ -145,11 +149,11 @@ type BearerAuthorizerCallback struct { // NewBearerAuthorizerCallback creates a bearer authorization callback. The callback // is invoked when the HTTP request is submitted. -func NewBearerAuthorizerCallback(sender Sender, callback BearerAuthorizerCallbackFunc) *BearerAuthorizerCallback { - if sender == nil { - sender = &http.Client{} +func NewBearerAuthorizerCallback(s Sender, callback BearerAuthorizerCallbackFunc) *BearerAuthorizerCallback { + if s == nil { + s = sender(tls.RenegotiateNever) } - return &BearerAuthorizerCallback{sender: sender, callback: callback} + return &BearerAuthorizerCallback{sender: s, callback: callback} } // WithAuthorization returns a PrepareDecorator that adds an HTTP Authorization header whose value @@ -257,3 +261,76 @@ func (egta EventGridKeyAuthorizer) WithAuthorization() PrepareDecorator { } return NewAPIKeyAuthorizerWithHeaders(headers).WithAuthorization() } + +// BasicAuthorizer implements basic HTTP authorization by adding the Authorization HTTP header +// with the value "Basic " where is a base64-encoded username:password tuple. +type BasicAuthorizer struct { + userName string + password string +} + +// NewBasicAuthorizer creates a new BasicAuthorizer with the specified username and password. +func NewBasicAuthorizer(userName, password string) *BasicAuthorizer { + return &BasicAuthorizer{ + userName: userName, + password: password, + } +} + +// WithAuthorization returns a PrepareDecorator that adds an HTTP Authorization header whose +// value is "Basic " followed by the base64-encoded username:password tuple. +func (ba *BasicAuthorizer) WithAuthorization() PrepareDecorator { + headers := make(map[string]interface{}) + headers[authorization] = basic + " " + base64.StdEncoding.EncodeToString([]byte(fmt.Sprintf("%s:%s", ba.userName, ba.password))) + + return NewAPIKeyAuthorizerWithHeaders(headers).WithAuthorization() +} + +// MultiTenantServicePrincipalTokenAuthorizer provides authentication across tenants. +type MultiTenantServicePrincipalTokenAuthorizer interface { + WithAuthorization() PrepareDecorator +} + +// NewMultiTenantServicePrincipalTokenAuthorizer crates a BearerAuthorizer using the given token provider +func NewMultiTenantServicePrincipalTokenAuthorizer(tp adal.MultitenantOAuthTokenProvider) MultiTenantServicePrincipalTokenAuthorizer { + return &multiTenantSPTAuthorizer{tp: tp} +} + +type multiTenantSPTAuthorizer struct { + tp adal.MultitenantOAuthTokenProvider +} + +// WithAuthorization returns a PrepareDecorator that adds an HTTP Authorization header using the +// primary token along with the auxiliary authorization header using the auxiliary tokens. +// +// By default, the token will be automatically refreshed through the Refresher interface. +func (mt multiTenantSPTAuthorizer) WithAuthorization() PrepareDecorator { + return func(p Preparer) Preparer { + return PreparerFunc(func(r *http.Request) (*http.Request, error) { + r, err := p.Prepare(r) + if err != nil { + return r, err + } + if refresher, ok := mt.tp.(adal.RefresherWithContext); ok { + err = refresher.EnsureFreshWithContext(r.Context()) + if err != nil { + var resp *http.Response + if tokError, ok := err.(adal.TokenRefreshError); ok { + resp = tokError.Response() + } + return r, NewErrorWithError(err, "azure.multiTenantSPTAuthorizer", "WithAuthorization", resp, + "Failed to refresh one or more Tokens for request to %s", r.URL) + } + } + r, err = Prepare(r, WithHeader(headerAuthorization, fmt.Sprintf("Bearer %s", mt.tp.PrimaryOAuthToken()))) + if err != nil { + return r, err + } + auxTokens := mt.tp.AuxiliaryOAuthTokens() + for i := range auxTokens { + auxTokens[i] = fmt.Sprintf("Bearer %s", auxTokens[i]) + } + return Prepare(r, WithHeader(headerAuxAuthorization, strings.Join(auxTokens, "; "))) + }) + } +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/authorization_sas.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/authorization_sas.go new file mode 100644 index 000000000..89a659cb6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/authorization_sas.go @@ -0,0 +1,67 @@ +package autorest + +// Copyright 2017 Microsoft Corporation +// +// 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. + +import ( + "fmt" + "net/http" + "strings" +) + +// SASTokenAuthorizer implements an authorization for SAS Token Authentication +// this can be used for interaction with Blob Storage Endpoints +type SASTokenAuthorizer struct { + sasToken string +} + +// NewSASTokenAuthorizer creates a SASTokenAuthorizer using the given credentials +func NewSASTokenAuthorizer(sasToken string) (*SASTokenAuthorizer, error) { + if strings.TrimSpace(sasToken) == "" { + return nil, fmt.Errorf("sasToken cannot be empty") + } + + token := sasToken + if strings.HasPrefix(sasToken, "?") { + token = strings.TrimPrefix(sasToken, "?") + } + + return &SASTokenAuthorizer{ + sasToken: token, + }, nil +} + +// WithAuthorization returns a PrepareDecorator that adds a shared access signature token to the +// URI's query parameters. This can be used for the Blob, Queue, and File Services. +// +// See https://docs.microsoft.com/en-us/rest/api/storageservices/delegate-access-with-shared-access-signature +func (sas *SASTokenAuthorizer) WithAuthorization() PrepareDecorator { + return func(p Preparer) Preparer { + return PreparerFunc(func(r *http.Request) (*http.Request, error) { + r, err := p.Prepare(r) + if err != nil { + return r, err + } + + if r.URL.RawQuery != "" { + r.URL.RawQuery = fmt.Sprintf("%s&%s", r.URL.RawQuery, sas.sasToken) + } else { + r.URL.RawQuery = sas.sasToken + } + + r.RequestURI = r.URL.String() + return Prepare(r) + }) + } +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/authorization_storage.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/authorization_storage.go new file mode 100644 index 000000000..33e5f1270 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/authorization_storage.go @@ -0,0 +1,301 @@ +package autorest + +// Copyright 2017 Microsoft Corporation +// +// 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. + +import ( + "bytes" + "crypto/hmac" + "crypto/sha256" + "encoding/base64" + "fmt" + "net/http" + "net/url" + "sort" + "strings" + "time" +) + +// SharedKeyType defines the enumeration for the various shared key types. +// See https://docs.microsoft.com/en-us/rest/api/storageservices/authorize-with-shared-key for details on the shared key types. +type SharedKeyType string + +const ( + // SharedKey is used to authorize against blobs, files and queues services. + SharedKey SharedKeyType = "sharedKey" + + // SharedKeyForTable is used to authorize against the table service. + SharedKeyForTable SharedKeyType = "sharedKeyTable" + + // SharedKeyLite is used to authorize against blobs, files and queues services. It's provided for + // backwards compatibility with API versions before 2009-09-19. Prefer SharedKey instead. + SharedKeyLite SharedKeyType = "sharedKeyLite" + + // SharedKeyLiteForTable is used to authorize against the table service. It's provided for + // backwards compatibility with older table API versions. Prefer SharedKeyForTable instead. + SharedKeyLiteForTable SharedKeyType = "sharedKeyLiteTable" +) + +const ( + headerAccept = "Accept" + headerAcceptCharset = "Accept-Charset" + headerContentEncoding = "Content-Encoding" + headerContentLength = "Content-Length" + headerContentMD5 = "Content-MD5" + headerContentLanguage = "Content-Language" + headerIfModifiedSince = "If-Modified-Since" + headerIfMatch = "If-Match" + headerIfNoneMatch = "If-None-Match" + headerIfUnmodifiedSince = "If-Unmodified-Since" + headerDate = "Date" + headerXMSDate = "X-Ms-Date" + headerXMSVersion = "x-ms-version" + headerRange = "Range" +) + +const storageEmulatorAccountName = "devstoreaccount1" + +// SharedKeyAuthorizer implements an authorization for Shared Key +// this can be used for interaction with Blob, File and Queue Storage Endpoints +type SharedKeyAuthorizer struct { + accountName string + accountKey []byte + keyType SharedKeyType +} + +// NewSharedKeyAuthorizer creates a SharedKeyAuthorizer using the provided credentials and shared key type. +func NewSharedKeyAuthorizer(accountName, accountKey string, keyType SharedKeyType) (*SharedKeyAuthorizer, error) { + key, err := base64.StdEncoding.DecodeString(accountKey) + if err != nil { + return nil, fmt.Errorf("malformed storage account key: %v", err) + } + return &SharedKeyAuthorizer{ + accountName: accountName, + accountKey: key, + keyType: keyType, + }, nil +} + +// WithAuthorization returns a PrepareDecorator that adds an HTTP Authorization header whose +// value is " " followed by the computed key. +// This can be used for the Blob, Queue, and File Services +// +// from: https://docs.microsoft.com/en-us/rest/api/storageservices/authorize-with-shared-key +// You may use Shared Key authorization to authorize a request made against the +// 2009-09-19 version and later of the Blob and Queue services, +// and version 2014-02-14 and later of the File services. +func (sk *SharedKeyAuthorizer) WithAuthorization() PrepareDecorator { + return func(p Preparer) Preparer { + return PreparerFunc(func(r *http.Request) (*http.Request, error) { + r, err := p.Prepare(r) + if err != nil { + return r, err + } + + sk, err := buildSharedKey(sk.accountName, sk.accountKey, r, sk.keyType) + return Prepare(r, WithHeader(headerAuthorization, sk)) + }) + } +} + +func buildSharedKey(accName string, accKey []byte, req *http.Request, keyType SharedKeyType) (string, error) { + canRes, err := buildCanonicalizedResource(accName, req.URL.String(), keyType) + if err != nil { + return "", err + } + + if req.Header == nil { + req.Header = http.Header{} + } + + // ensure date is set + if req.Header.Get(headerDate) == "" && req.Header.Get(headerXMSDate) == "" { + date := time.Now().UTC().Format(http.TimeFormat) + req.Header.Set(headerXMSDate, date) + } + canString, err := buildCanonicalizedString(req.Method, req.Header, canRes, keyType) + if err != nil { + return "", err + } + return createAuthorizationHeader(accName, accKey, canString, keyType), nil +} + +func buildCanonicalizedResource(accountName, uri string, keyType SharedKeyType) (string, error) { + errMsg := "buildCanonicalizedResource error: %s" + u, err := url.Parse(uri) + if err != nil { + return "", fmt.Errorf(errMsg, err.Error()) + } + + cr := bytes.NewBufferString("") + if accountName != storageEmulatorAccountName { + cr.WriteString("/") + cr.WriteString(getCanonicalizedAccountName(accountName)) + } + + if len(u.Path) > 0 { + // Any portion of the CanonicalizedResource string that is derived from + // the resource's URI should be encoded exactly as it is in the URI. + // -- https://msdn.microsoft.com/en-gb/library/azure/dd179428.aspx + cr.WriteString(u.EscapedPath()) + } + + params, err := url.ParseQuery(u.RawQuery) + if err != nil { + return "", fmt.Errorf(errMsg, err.Error()) + } + + // See https://github.com/Azure/azure-storage-net/blob/master/Lib/Common/Core/Util/AuthenticationUtility.cs#L277 + if keyType == SharedKey { + if len(params) > 0 { + cr.WriteString("\n") + + keys := []string{} + for key := range params { + keys = append(keys, key) + } + sort.Strings(keys) + + completeParams := []string{} + for _, key := range keys { + if len(params[key]) > 1 { + sort.Strings(params[key]) + } + + completeParams = append(completeParams, fmt.Sprintf("%s:%s", key, strings.Join(params[key], ","))) + } + cr.WriteString(strings.Join(completeParams, "\n")) + } + } else { + // search for "comp" parameter, if exists then add it to canonicalizedresource + if v, ok := params["comp"]; ok { + cr.WriteString("?comp=" + v[0]) + } + } + + return string(cr.Bytes()), nil +} + +func getCanonicalizedAccountName(accountName string) string { + // since we may be trying to access a secondary storage account, we need to + // remove the -secondary part of the storage name + return strings.TrimSuffix(accountName, "-secondary") +} + +func buildCanonicalizedString(verb string, headers http.Header, canonicalizedResource string, keyType SharedKeyType) (string, error) { + contentLength := headers.Get(headerContentLength) + if contentLength == "0" { + contentLength = "" + } + date := headers.Get(headerDate) + if v := headers.Get(headerXMSDate); v != "" { + if keyType == SharedKey || keyType == SharedKeyLite { + date = "" + } else { + date = v + } + } + var canString string + switch keyType { + case SharedKey: + canString = strings.Join([]string{ + verb, + headers.Get(headerContentEncoding), + headers.Get(headerContentLanguage), + contentLength, + headers.Get(headerContentMD5), + headers.Get(headerContentType), + date, + headers.Get(headerIfModifiedSince), + headers.Get(headerIfMatch), + headers.Get(headerIfNoneMatch), + headers.Get(headerIfUnmodifiedSince), + headers.Get(headerRange), + buildCanonicalizedHeader(headers), + canonicalizedResource, + }, "\n") + case SharedKeyForTable: + canString = strings.Join([]string{ + verb, + headers.Get(headerContentMD5), + headers.Get(headerContentType), + date, + canonicalizedResource, + }, "\n") + case SharedKeyLite: + canString = strings.Join([]string{ + verb, + headers.Get(headerContentMD5), + headers.Get(headerContentType), + date, + buildCanonicalizedHeader(headers), + canonicalizedResource, + }, "\n") + case SharedKeyLiteForTable: + canString = strings.Join([]string{ + date, + canonicalizedResource, + }, "\n") + default: + return "", fmt.Errorf("key type '%s' is not supported", keyType) + } + return canString, nil +} + +func buildCanonicalizedHeader(headers http.Header) string { + cm := make(map[string]string) + + for k := range headers { + headerName := strings.TrimSpace(strings.ToLower(k)) + if strings.HasPrefix(headerName, "x-ms-") { + cm[headerName] = headers.Get(k) + } + } + + if len(cm) == 0 { + return "" + } + + keys := []string{} + for key := range cm { + keys = append(keys, key) + } + + sort.Strings(keys) + + ch := bytes.NewBufferString("") + + for _, key := range keys { + ch.WriteString(key) + ch.WriteRune(':') + ch.WriteString(cm[key]) + ch.WriteRune('\n') + } + + return strings.TrimSuffix(string(ch.Bytes()), "\n") +} + +func createAuthorizationHeader(accountName string, accountKey []byte, canonicalizedString string, keyType SharedKeyType) string { + h := hmac.New(sha256.New, accountKey) + h.Write([]byte(canonicalizedString)) + signature := base64.StdEncoding.EncodeToString(h.Sum(nil)) + var key string + switch keyType { + case SharedKey, SharedKeyForTable: + key = "SharedKey" + case SharedKeyLite, SharedKeyLiteForTable: + key = "SharedKeyLite" + } + return fmt.Sprintf("%s %s:%s", key, getCanonicalizedAccountName(accountName), signature) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/azure/async.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/azure/async.go index a58e5ef3f..1cb41cbeb 100644 --- a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/azure/async.go +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/azure/async.go @@ -21,11 +21,12 @@ import ( "fmt" "io/ioutil" "net/http" + "net/url" "strings" "time" "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/date" + "github.com/Azure/go-autorest/tracing" ) const ( @@ -44,84 +45,74 @@ var pollingCodes = [...]int{http.StatusNoContent, http.StatusAccepted, http.Stat // Future provides a mechanism to access the status and results of an asynchronous request. // Since futures are stateful they should be passed by value to avoid race conditions. type Future struct { - req *http.Request - resp *http.Response - ps pollingState + pt pollingTracker } -// NewFuture returns a new Future object initialized with the specified request. -func NewFuture(req *http.Request) Future { - return Future{req: req} +// NewFutureFromResponse returns a new Future object initialized +// with the initial response from an asynchronous operation. +func NewFutureFromResponse(resp *http.Response) (Future, error) { + pt, err := createPollingTracker(resp) + return Future{pt: pt}, err } -// Response returns the last HTTP response or nil if there isn't one. +// Response returns the last HTTP response. func (f Future) Response() *http.Response { - return f.resp + if f.pt == nil { + return nil + } + return f.pt.latestResponse() } // Status returns the last status message of the operation. func (f Future) Status() string { - if f.ps.State == "" { - return "Unknown" + if f.pt == nil { + return "" } - return f.ps.State + return f.pt.pollingStatus() } // PollingMethod returns the method used to monitor the status of the asynchronous operation. func (f Future) PollingMethod() PollingMethodType { - return f.ps.PollingMethod + if f.pt == nil { + return PollingUnknown + } + return f.pt.pollingMethod() } -// Done queries the service to see if the operation has completed. -func (f *Future) Done(sender autorest.Sender) (bool, error) { - // exit early if this future has terminated - if f.ps.hasTerminated() { - return true, f.errorInfo() +// DoneWithContext queries the service to see if the operation has completed. +func (f *Future) DoneWithContext(ctx context.Context, sender autorest.Sender) (done bool, err error) { + ctx = tracing.StartSpan(ctx, "github.com/Azure/go-autorest/autorest/azure/async.DoneWithContext") + defer func() { + sc := -1 + resp := f.Response() + if resp != nil { + sc = resp.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + + if f.pt == nil { + return false, autorest.NewError("Future", "Done", "future is not initialized") } - resp, err := sender.Do(f.req) - f.resp = resp - if err != nil { + if f.pt.hasTerminated() { + return true, f.pt.pollingError() + } + if err := f.pt.pollForStatus(ctx, sender); err != nil { return false, err } - - if !autorest.ResponseHasStatusCode(resp, pollingCodes[:]...) { - // check response body for error content - if resp.Body != nil { - type respErr struct { - ServiceError ServiceError `json:"error"` - } - re := respErr{} - - defer resp.Body.Close() - b, err := ioutil.ReadAll(resp.Body) - if err != nil { - return false, err - } - err = json.Unmarshal(b, &re) - if err != nil { - return false, err - } - return false, re.ServiceError - } - - // try to return something meaningful - return false, ServiceError{ - Code: fmt.Sprintf("%v", resp.StatusCode), - Message: resp.Status, - } + if err := f.pt.checkForErrors(); err != nil { + return f.pt.hasTerminated(), err } - - err = updatePollingState(resp, &f.ps) - if err != nil { + if err := f.pt.updatePollingState(f.pt.provisioningStateApplicable()); err != nil { return false, err } - - if f.ps.hasTerminated() { - return true, f.errorInfo() + if err := f.pt.initPollingMethod(); err != nil { + return false, err } - - f.req, err = newPollingRequest(f.ps) - return false, err + if err := f.pt.updatePollingMethod(); err != nil { + return false, err + } + return f.pt.hasTerminated(), f.pt.pollingError() } // GetPollingDelay returns a duration the application should wait before checking @@ -129,11 +120,15 @@ func (f *Future) Done(sender autorest.Sender) (bool, error) { // the service via the Retry-After response header. If the header wasn't returned // then the function returns the zero-value time.Duration and false. func (f Future) GetPollingDelay() (time.Duration, bool) { - if f.resp == nil { + if f.pt == nil { + return 0, false + } + resp := f.pt.latestResponse() + if resp == nil { return 0, false } - retry := f.resp.Header.Get(autorest.HeaderRetryAfter) + retry := resp.Header.Get(autorest.HeaderRetryAfter) if retry == "" { return 0, false } @@ -146,18 +141,37 @@ func (f Future) GetPollingDelay() (time.Duration, bool) { return d, true } -// WaitForCompletion will return when one of the following conditions is met: the long +// WaitForCompletionRef will return when one of the following conditions is met: the long // running operation has completed, the provided context is cancelled, or the client's // polling duration has been exceeded. It will retry failed polling attempts based on // the retry value defined in the client up to the maximum retry attempts. -func (f Future) WaitForCompletion(ctx context.Context, client autorest.Client) error { - ctx, cancel := context.WithTimeout(ctx, client.PollingDuration) - defer cancel() +// If no deadline is specified in the context then the client.PollingDuration will be +// used to determine if a default deadline should be used. +// If PollingDuration is greater than zero the value will be used as the context's timeout. +// If PollingDuration is zero then no default deadline will be used. +func (f *Future) WaitForCompletionRef(ctx context.Context, client autorest.Client) (err error) { + ctx = tracing.StartSpan(ctx, "github.com/Azure/go-autorest/autorest/azure/async.WaitForCompletionRef") + defer func() { + sc := -1 + resp := f.Response() + if resp != nil { + sc = resp.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + cancelCtx := ctx + // if the provided context already has a deadline don't override it + _, hasDeadline := ctx.Deadline() + if d := client.PollingDuration; !hasDeadline && d != 0 { + var cancel context.CancelFunc + cancelCtx, cancel = context.WithTimeout(ctx, d) + defer cancel() + } - done, err := f.Done(client) - for attempts := 0; !done; done, err = f.Done(client) { + done, err := f.DoneWithContext(ctx, client) + for attempts := 0; !done; done, err = f.DoneWithContext(ctx, client) { if attempts >= client.RetryAttempts { - return autorest.NewErrorWithError(err, "azure", "WaitForCompletion", f.resp, "the number of retries has been exceeded") + return autorest.NewErrorWithError(err, "Future", "WaitForCompletion", f.pt.latestResponse(), "the number of retries has been exceeded") } // we want delayAttempt to be zero in the non-error case so // that DelayForBackoff doesn't perform exponential back-off @@ -179,162 +193,699 @@ func (f Future) WaitForCompletion(ctx context.Context, client autorest.Client) e attempts++ } // wait until the delay elapses or the context is cancelled - delayElapsed := autorest.DelayForBackoff(delay, delayAttempt, ctx.Done()) + delayElapsed := autorest.DelayForBackoff(delay, delayAttempt, cancelCtx.Done()) if !delayElapsed { - return autorest.NewErrorWithError(ctx.Err(), "azure", "WaitForCompletion", f.resp, "context has been cancelled") + return autorest.NewErrorWithError(cancelCtx.Err(), "Future", "WaitForCompletion", f.pt.latestResponse(), "context has been cancelled") } } - return err -} - -// if the operation failed the polling state will contain -// error information and implements the error interface -func (f *Future) errorInfo() error { - if !f.ps.hasSucceeded() { - return f.ps - } - return nil + return } // MarshalJSON implements the json.Marshaler interface. func (f Future) MarshalJSON() ([]byte, error) { - return json.Marshal(&f.ps) + return json.Marshal(f.pt) } // UnmarshalJSON implements the json.Unmarshaler interface. func (f *Future) UnmarshalJSON(data []byte) error { - err := json.Unmarshal(data, &f.ps) + // unmarshal into JSON object to determine the tracker type + obj := map[string]interface{}{} + err := json.Unmarshal(data, &obj) if err != nil { return err } - f.req, err = newPollingRequest(f.ps) - return err + if obj["method"] == nil { + return autorest.NewError("Future", "UnmarshalJSON", "missing 'method' property") + } + method := obj["method"].(string) + switch strings.ToUpper(method) { + case http.MethodDelete: + f.pt = &pollingTrackerDelete{} + case http.MethodPatch: + f.pt = &pollingTrackerPatch{} + case http.MethodPost: + f.pt = &pollingTrackerPost{} + case http.MethodPut: + f.pt = &pollingTrackerPut{} + default: + return autorest.NewError("Future", "UnmarshalJSON", "unsupoorted method '%s'", method) + } + // now unmarshal into the tracker + return json.Unmarshal(data, &f.pt) } // PollingURL returns the URL used for retrieving the status of the long-running operation. -// For LROs that use the Location header the final URL value is used to retrieve the result. func (f Future) PollingURL() string { - return f.ps.URI -} - -// DoPollForAsynchronous returns a SendDecorator that polls if the http.Response is for an Azure -// long-running operation. It will delay between requests for the duration specified in the -// RetryAfter header or, if the header is absent, the passed delay. Polling may be canceled by -// closing the optional channel on the http.Request. -func DoPollForAsynchronous(delay time.Duration) autorest.SendDecorator { - return func(s autorest.Sender) autorest.Sender { - return autorest.SenderFunc(func(r *http.Request) (resp *http.Response, err error) { - resp, err = s.Do(r) - if err != nil { - return resp, err - } - if !autorest.ResponseHasStatusCode(resp, pollingCodes[:]...) { - return resp, nil - } - - ps := pollingState{} - for err == nil { - err = updatePollingState(resp, &ps) - if err != nil { - break - } - if ps.hasTerminated() { - if !ps.hasSucceeded() { - err = ps - } - break - } - - r, err = newPollingRequest(ps) - if err != nil { - return resp, err - } - r = r.WithContext(resp.Request.Context()) - - delay = autorest.GetRetryAfter(resp, delay) - resp, err = autorest.SendWithSender(s, r, - autorest.AfterDelay(delay)) - } - - return resp, err - }) + if f.pt == nil { + return "" } + return f.pt.pollingURL() } -func getAsyncOperation(resp *http.Response) string { - return resp.Header.Get(http.CanonicalHeaderKey(headerAsyncOperation)) +// GetResult should be called once polling has completed successfully. +// It makes the final GET call to retrieve the resultant payload. +func (f Future) GetResult(sender autorest.Sender) (*http.Response, error) { + if f.pt.finalGetURL() == "" { + // we can end up in this situation if the async operation returns a 200 + // with no polling URLs. in that case return the response which should + // contain the JSON payload (only do this for successful terminal cases). + if lr := f.pt.latestResponse(); lr != nil && f.pt.hasSucceeded() { + return lr, nil + } + return nil, autorest.NewError("Future", "GetResult", "missing URL for retrieving result") + } + req, err := http.NewRequest(http.MethodGet, f.pt.finalGetURL(), nil) + if err != nil { + return nil, err + } + return sender.Do(req) } -func hasSucceeded(state string) bool { - return strings.EqualFold(state, operationSucceeded) -} +type pollingTracker interface { + // these methods can differ per tracker -func hasTerminated(state string) bool { - return strings.EqualFold(state, operationCanceled) || strings.EqualFold(state, operationFailed) || strings.EqualFold(state, operationSucceeded) -} + // checks the response headers and status code to determine the polling mechanism + updatePollingMethod() error -func hasFailed(state string) bool { - return strings.EqualFold(state, operationFailed) -} + // checks the response for tracker-specific error conditions + checkForErrors() error -type provisioningTracker interface { - state() string - hasSucceeded() bool + // returns true if provisioning state should be checked + provisioningStateApplicable() bool + + // methods common to all trackers + + // initializes a tracker's polling URL and method, called for each iteration. + // these values can be overridden by each polling tracker as required. + initPollingMethod() error + + // initializes the tracker's internal state, call this when the tracker is created + initializeState() error + + // makes an HTTP request to check the status of the LRO + pollForStatus(ctx context.Context, sender autorest.Sender) error + + // updates internal tracker state, call this after each call to pollForStatus + updatePollingState(provStateApl bool) error + + // returns the error response from the service, can be nil + pollingError() error + + // returns the polling method being used + pollingMethod() PollingMethodType + + // returns the state of the LRO as returned from the service + pollingStatus() string + + // returns the URL used for polling status + pollingURL() string + + // returns the URL used for the final GET to retrieve the resource + finalGetURL() string + + // returns true if the LRO is in a terminal state hasTerminated() bool + + // returns true if the LRO is in a failed terminal state + hasFailed() bool + + // returns true if the LRO is in a successful terminal state + hasSucceeded() bool + + // returns the cached HTTP response after a call to pollForStatus(), can be nil + latestResponse() *http.Response } -type operationResource struct { - // Note: - // The specification states services should return the "id" field. However some return it as - // "operationId". - ID string `json:"id"` - OperationID string `json:"operationId"` - Name string `json:"name"` - Status string `json:"status"` - Properties map[string]interface{} `json:"properties"` - OperationError ServiceError `json:"error"` - StartTime date.Time `json:"startTime"` - EndTime date.Time `json:"endTime"` - PercentComplete float64 `json:"percentComplete"` +type pollingTrackerBase struct { + // resp is the last response, either from the submission of the LRO or from polling + resp *http.Response + + // method is the HTTP verb, this is needed for deserialization + Method string `json:"method"` + + // rawBody is the raw JSON response body + rawBody map[string]interface{} + + // denotes if polling is using async-operation or location header + Pm PollingMethodType `json:"pollingMethod"` + + // the URL to poll for status + URI string `json:"pollingURI"` + + // the state of the LRO as returned from the service + State string `json:"lroState"` + + // the URL to GET for the final result + FinalGetURI string `json:"resultURI"` + + // used to hold an error object returned from the service + Err *ServiceError `json:"error,omitempty"` } -func (or operationResource) state() string { - return or.Status +func (pt *pollingTrackerBase) initializeState() error { + // determine the initial polling state based on response body and/or HTTP status + // code. this is applicable to the initial LRO response, not polling responses! + pt.Method = pt.resp.Request.Method + if err := pt.updateRawBody(); err != nil { + return err + } + switch pt.resp.StatusCode { + case http.StatusOK: + if ps := pt.getProvisioningState(); ps != nil { + pt.State = *ps + if pt.hasFailed() { + pt.updateErrorFromResponse() + return pt.pollingError() + } + } else { + pt.State = operationSucceeded + } + case http.StatusCreated: + if ps := pt.getProvisioningState(); ps != nil { + pt.State = *ps + } else { + pt.State = operationInProgress + } + case http.StatusAccepted: + pt.State = operationInProgress + case http.StatusNoContent: + pt.State = operationSucceeded + default: + pt.State = operationFailed + pt.updateErrorFromResponse() + return pt.pollingError() + } + return pt.initPollingMethod() } -func (or operationResource) hasSucceeded() bool { - return hasSucceeded(or.state()) +func (pt pollingTrackerBase) getProvisioningState() *string { + if pt.rawBody != nil && pt.rawBody["properties"] != nil { + p := pt.rawBody["properties"].(map[string]interface{}) + if ps := p["provisioningState"]; ps != nil { + s := ps.(string) + return &s + } + } + return nil } -func (or operationResource) hasTerminated() bool { - return hasTerminated(or.state()) +func (pt *pollingTrackerBase) updateRawBody() error { + pt.rawBody = map[string]interface{}{} + if pt.resp.ContentLength != 0 { + defer pt.resp.Body.Close() + b, err := ioutil.ReadAll(pt.resp.Body) + if err != nil { + return autorest.NewErrorWithError(err, "pollingTrackerBase", "updateRawBody", nil, "failed to read response body") + } + // observed in 204 responses over HTTP/2.0; the content length is -1 but body is empty + if len(b) == 0 { + return nil + } + // put the body back so it's available to other callers + pt.resp.Body = ioutil.NopCloser(bytes.NewReader(b)) + if err = json.Unmarshal(b, &pt.rawBody); err != nil { + return autorest.NewErrorWithError(err, "pollingTrackerBase", "updateRawBody", nil, "failed to unmarshal response body") + } + } + return nil } -type provisioningProperties struct { - ProvisioningState string `json:"provisioningState"` +func (pt *pollingTrackerBase) pollForStatus(ctx context.Context, sender autorest.Sender) error { + req, err := http.NewRequest(http.MethodGet, pt.URI, nil) + if err != nil { + return autorest.NewErrorWithError(err, "pollingTrackerBase", "pollForStatus", nil, "failed to create HTTP request") + } + + req = req.WithContext(ctx) + preparer := autorest.CreatePreparer(autorest.GetPrepareDecorators(ctx)...) + req, err = preparer.Prepare(req) + if err != nil { + return autorest.NewErrorWithError(err, "pollingTrackerBase", "pollForStatus", nil, "failed preparing HTTP request") + } + pt.resp, err = sender.Do(req) + if err != nil { + return autorest.NewErrorWithError(err, "pollingTrackerBase", "pollForStatus", nil, "failed to send HTTP request") + } + if autorest.ResponseHasStatusCode(pt.resp, pollingCodes[:]...) { + // reset the service error on success case + pt.Err = nil + err = pt.updateRawBody() + } else { + // check response body for error content + pt.updateErrorFromResponse() + err = pt.pollingError() + } + return err } -type provisioningStatus struct { - Properties provisioningProperties `json:"properties,omitempty"` - ProvisioningError ServiceError `json:"error,omitempty"` +// attempts to unmarshal a ServiceError type from the response body. +// if that fails then make a best attempt at creating something meaningful. +// NOTE: this assumes that the async operation has failed. +func (pt *pollingTrackerBase) updateErrorFromResponse() { + var err error + if pt.resp.ContentLength != 0 { + type respErr struct { + ServiceError *ServiceError `json:"error"` + } + re := respErr{} + defer pt.resp.Body.Close() + var b []byte + if b, err = ioutil.ReadAll(pt.resp.Body); err != nil || len(b) == 0 { + goto Default + } + if err = json.Unmarshal(b, &re); err != nil { + goto Default + } + // unmarshalling the error didn't yield anything, try unwrapped error + if re.ServiceError == nil { + err = json.Unmarshal(b, &re.ServiceError) + if err != nil { + goto Default + } + } + // the unmarshaller will ensure re.ServiceError is non-nil + // even if there was no content unmarshalled so check the code. + if re.ServiceError.Code != "" { + pt.Err = re.ServiceError + return + } + } +Default: + se := &ServiceError{ + Code: pt.pollingStatus(), + Message: "The async operation failed.", + } + if err != nil { + se.InnerError = make(map[string]interface{}) + se.InnerError["unmarshalError"] = err.Error() + } + // stick the response body into the error object in hopes + // it contains something useful to help diagnose the failure. + if len(pt.rawBody) > 0 { + se.AdditionalInfo = []map[string]interface{}{ + pt.rawBody, + } + } + pt.Err = se } -func (ps provisioningStatus) state() string { - return ps.Properties.ProvisioningState +func (pt *pollingTrackerBase) updatePollingState(provStateApl bool) error { + if pt.Pm == PollingAsyncOperation && pt.rawBody["status"] != nil { + pt.State = pt.rawBody["status"].(string) + } else { + if pt.resp.StatusCode == http.StatusAccepted { + pt.State = operationInProgress + } else if provStateApl { + if ps := pt.getProvisioningState(); ps != nil { + pt.State = *ps + } else { + pt.State = operationSucceeded + } + } else { + return autorest.NewError("pollingTrackerBase", "updatePollingState", "the response from the async operation has an invalid status code") + } + } + // if the operation has failed update the error state + if pt.hasFailed() { + pt.updateErrorFromResponse() + } + return nil } -func (ps provisioningStatus) hasSucceeded() bool { - return hasSucceeded(ps.state()) +func (pt pollingTrackerBase) pollingError() error { + if pt.Err == nil { + return nil + } + return pt.Err } -func (ps provisioningStatus) hasTerminated() bool { - return hasTerminated(ps.state()) +func (pt pollingTrackerBase) pollingMethod() PollingMethodType { + return pt.Pm } -func (ps provisioningStatus) hasProvisioningError() bool { - // code and message are required fields so only check them - return len(ps.ProvisioningError.Code) > 0 || - len(ps.ProvisioningError.Message) > 0 +func (pt pollingTrackerBase) pollingStatus() string { + return pt.State +} + +func (pt pollingTrackerBase) pollingURL() string { + return pt.URI +} + +func (pt pollingTrackerBase) finalGetURL() string { + return pt.FinalGetURI +} + +func (pt pollingTrackerBase) hasTerminated() bool { + return strings.EqualFold(pt.State, operationCanceled) || strings.EqualFold(pt.State, operationFailed) || strings.EqualFold(pt.State, operationSucceeded) +} + +func (pt pollingTrackerBase) hasFailed() bool { + return strings.EqualFold(pt.State, operationCanceled) || strings.EqualFold(pt.State, operationFailed) +} + +func (pt pollingTrackerBase) hasSucceeded() bool { + return strings.EqualFold(pt.State, operationSucceeded) +} + +func (pt pollingTrackerBase) latestResponse() *http.Response { + return pt.resp +} + +// error checking common to all trackers +func (pt pollingTrackerBase) baseCheckForErrors() error { + // for Azure-AsyncOperations the response body cannot be nil or empty + if pt.Pm == PollingAsyncOperation { + if pt.resp.Body == nil || pt.resp.ContentLength == 0 { + return autorest.NewError("pollingTrackerBase", "baseCheckForErrors", "for Azure-AsyncOperation response body cannot be nil") + } + if pt.rawBody["status"] == nil { + return autorest.NewError("pollingTrackerBase", "baseCheckForErrors", "missing status property in Azure-AsyncOperation response body") + } + } + return nil +} + +// default initialization of polling URL/method. each verb tracker will update this as required. +func (pt *pollingTrackerBase) initPollingMethod() error { + if ao, err := getURLFromAsyncOpHeader(pt.resp); err != nil { + return err + } else if ao != "" { + pt.URI = ao + pt.Pm = PollingAsyncOperation + return nil + } + if lh, err := getURLFromLocationHeader(pt.resp); err != nil { + return err + } else if lh != "" { + pt.URI = lh + pt.Pm = PollingLocation + return nil + } + // it's ok if we didn't find a polling header, this will be handled elsewhere + return nil +} + +// DELETE + +type pollingTrackerDelete struct { + pollingTrackerBase +} + +func (pt *pollingTrackerDelete) updatePollingMethod() error { + // for 201 the Location header is required + if pt.resp.StatusCode == http.StatusCreated { + if lh, err := getURLFromLocationHeader(pt.resp); err != nil { + return err + } else if lh == "" { + return autorest.NewError("pollingTrackerDelete", "updateHeaders", "missing Location header in 201 response") + } else { + pt.URI = lh + } + pt.Pm = PollingLocation + pt.FinalGetURI = pt.URI + } + // for 202 prefer the Azure-AsyncOperation header but fall back to Location if necessary + if pt.resp.StatusCode == http.StatusAccepted { + ao, err := getURLFromAsyncOpHeader(pt.resp) + if err != nil { + return err + } else if ao != "" { + pt.URI = ao + pt.Pm = PollingAsyncOperation + } + // if the Location header is invalid and we already have a polling URL + // then we don't care if the Location header URL is malformed. + if lh, err := getURLFromLocationHeader(pt.resp); err != nil && pt.URI == "" { + return err + } else if lh != "" { + if ao == "" { + pt.URI = lh + pt.Pm = PollingLocation + } + // when both headers are returned we use the value in the Location header for the final GET + pt.FinalGetURI = lh + } + // make sure a polling URL was found + if pt.URI == "" { + return autorest.NewError("pollingTrackerPost", "updateHeaders", "didn't get any suitable polling URLs in 202 response") + } + } + return nil +} + +func (pt pollingTrackerDelete) checkForErrors() error { + return pt.baseCheckForErrors() +} + +func (pt pollingTrackerDelete) provisioningStateApplicable() bool { + return pt.resp.StatusCode == http.StatusOK || pt.resp.StatusCode == http.StatusNoContent +} + +// PATCH + +type pollingTrackerPatch struct { + pollingTrackerBase +} + +func (pt *pollingTrackerPatch) updatePollingMethod() error { + // by default we can use the original URL for polling and final GET + if pt.URI == "" { + pt.URI = pt.resp.Request.URL.String() + } + if pt.FinalGetURI == "" { + pt.FinalGetURI = pt.resp.Request.URL.String() + } + if pt.Pm == PollingUnknown { + pt.Pm = PollingRequestURI + } + // for 201 it's permissible for no headers to be returned + if pt.resp.StatusCode == http.StatusCreated { + if ao, err := getURLFromAsyncOpHeader(pt.resp); err != nil { + return err + } else if ao != "" { + pt.URI = ao + pt.Pm = PollingAsyncOperation + } + } + // for 202 prefer the Azure-AsyncOperation header but fall back to Location if necessary + // note the absence of the "final GET" mechanism for PATCH + if pt.resp.StatusCode == http.StatusAccepted { + ao, err := getURLFromAsyncOpHeader(pt.resp) + if err != nil { + return err + } else if ao != "" { + pt.URI = ao + pt.Pm = PollingAsyncOperation + } + if ao == "" { + if lh, err := getURLFromLocationHeader(pt.resp); err != nil { + return err + } else if lh == "" { + return autorest.NewError("pollingTrackerPatch", "updateHeaders", "didn't get any suitable polling URLs in 202 response") + } else { + pt.URI = lh + pt.Pm = PollingLocation + } + } + } + return nil +} + +func (pt pollingTrackerPatch) checkForErrors() error { + return pt.baseCheckForErrors() +} + +func (pt pollingTrackerPatch) provisioningStateApplicable() bool { + return pt.resp.StatusCode == http.StatusOK || pt.resp.StatusCode == http.StatusCreated +} + +// POST + +type pollingTrackerPost struct { + pollingTrackerBase +} + +func (pt *pollingTrackerPost) updatePollingMethod() error { + // 201 requires Location header + if pt.resp.StatusCode == http.StatusCreated { + if lh, err := getURLFromLocationHeader(pt.resp); err != nil { + return err + } else if lh == "" { + return autorest.NewError("pollingTrackerPost", "updateHeaders", "missing Location header in 201 response") + } else { + pt.URI = lh + pt.FinalGetURI = lh + pt.Pm = PollingLocation + } + } + // for 202 prefer the Azure-AsyncOperation header but fall back to Location if necessary + if pt.resp.StatusCode == http.StatusAccepted { + ao, err := getURLFromAsyncOpHeader(pt.resp) + if err != nil { + return err + } else if ao != "" { + pt.URI = ao + pt.Pm = PollingAsyncOperation + } + // if the Location header is invalid and we already have a polling URL + // then we don't care if the Location header URL is malformed. + if lh, err := getURLFromLocationHeader(pt.resp); err != nil && pt.URI == "" { + return err + } else if lh != "" { + if ao == "" { + pt.URI = lh + pt.Pm = PollingLocation + } + // when both headers are returned we use the value in the Location header for the final GET + pt.FinalGetURI = lh + } + // make sure a polling URL was found + if pt.URI == "" { + return autorest.NewError("pollingTrackerPost", "updateHeaders", "didn't get any suitable polling URLs in 202 response") + } + } + return nil +} + +func (pt pollingTrackerPost) checkForErrors() error { + return pt.baseCheckForErrors() +} + +func (pt pollingTrackerPost) provisioningStateApplicable() bool { + return pt.resp.StatusCode == http.StatusOK || pt.resp.StatusCode == http.StatusNoContent +} + +// PUT + +type pollingTrackerPut struct { + pollingTrackerBase +} + +func (pt *pollingTrackerPut) updatePollingMethod() error { + // by default we can use the original URL for polling and final GET + if pt.URI == "" { + pt.URI = pt.resp.Request.URL.String() + } + if pt.FinalGetURI == "" { + pt.FinalGetURI = pt.resp.Request.URL.String() + } + if pt.Pm == PollingUnknown { + pt.Pm = PollingRequestURI + } + // for 201 it's permissible for no headers to be returned + if pt.resp.StatusCode == http.StatusCreated { + if ao, err := getURLFromAsyncOpHeader(pt.resp); err != nil { + return err + } else if ao != "" { + pt.URI = ao + pt.Pm = PollingAsyncOperation + } + } + // for 202 prefer the Azure-AsyncOperation header but fall back to Location if necessary + if pt.resp.StatusCode == http.StatusAccepted { + ao, err := getURLFromAsyncOpHeader(pt.resp) + if err != nil { + return err + } else if ao != "" { + pt.URI = ao + pt.Pm = PollingAsyncOperation + } + // if the Location header is invalid and we already have a polling URL + // then we don't care if the Location header URL is malformed. + if lh, err := getURLFromLocationHeader(pt.resp); err != nil && pt.URI == "" { + return err + } else if lh != "" { + if ao == "" { + pt.URI = lh + pt.Pm = PollingLocation + } + } + // make sure a polling URL was found + if pt.URI == "" { + return autorest.NewError("pollingTrackerPut", "updateHeaders", "didn't get any suitable polling URLs in 202 response") + } + } + return nil +} + +func (pt pollingTrackerPut) checkForErrors() error { + err := pt.baseCheckForErrors() + if err != nil { + return err + } + // if there are no LRO headers then the body cannot be empty + ao, err := getURLFromAsyncOpHeader(pt.resp) + if err != nil { + return err + } + lh, err := getURLFromLocationHeader(pt.resp) + if err != nil { + return err + } + if ao == "" && lh == "" && len(pt.rawBody) == 0 { + return autorest.NewError("pollingTrackerPut", "checkForErrors", "the response did not contain a body") + } + return nil +} + +func (pt pollingTrackerPut) provisioningStateApplicable() bool { + return pt.resp.StatusCode == http.StatusOK || pt.resp.StatusCode == http.StatusCreated +} + +// creates a polling tracker based on the verb of the original request +func createPollingTracker(resp *http.Response) (pollingTracker, error) { + var pt pollingTracker + switch strings.ToUpper(resp.Request.Method) { + case http.MethodDelete: + pt = &pollingTrackerDelete{pollingTrackerBase: pollingTrackerBase{resp: resp}} + case http.MethodPatch: + pt = &pollingTrackerPatch{pollingTrackerBase: pollingTrackerBase{resp: resp}} + case http.MethodPost: + pt = &pollingTrackerPost{pollingTrackerBase: pollingTrackerBase{resp: resp}} + case http.MethodPut: + pt = &pollingTrackerPut{pollingTrackerBase: pollingTrackerBase{resp: resp}} + default: + return nil, autorest.NewError("azure", "createPollingTracker", "unsupported HTTP method %s", resp.Request.Method) + } + if err := pt.initializeState(); err != nil { + return pt, err + } + // this initializes the polling header values, we do this during creation in case the + // initial response send us invalid values; this way the API call will return a non-nil + // error (not doing this means the error shows up in Future.Done) + return pt, pt.updatePollingMethod() +} + +// gets the polling URL from the Azure-AsyncOperation header. +// ensures the URL is well-formed and absolute. +func getURLFromAsyncOpHeader(resp *http.Response) (string, error) { + s := resp.Header.Get(http.CanonicalHeaderKey(headerAsyncOperation)) + if s == "" { + return "", nil + } + if !isValidURL(s) { + return "", autorest.NewError("azure", "getURLFromAsyncOpHeader", "invalid polling URL '%s'", s) + } + return s, nil +} + +// gets the polling URL from the Location header. +// ensures the URL is well-formed and absolute. +func getURLFromLocationHeader(resp *http.Response) (string, error) { + s := resp.Header.Get(http.CanonicalHeaderKey(autorest.HeaderLocation)) + if s == "" { + return "", nil + } + if !isValidURL(s) { + return "", autorest.NewError("azure", "getURLFromLocationHeader", "invalid polling URL '%s'", s) + } + return s, nil +} + +// verify that the URL is valid and absolute +func isValidURL(s string) bool { + u, err := url.Parse(s) + return err == nil && u.IsAbs() } // PollingMethodType defines a type used for enumerating polling mechanisms. @@ -347,151 +898,13 @@ const ( // PollingLocation indicates the polling method uses the Location header. PollingLocation PollingMethodType = "Location" + // PollingRequestURI indicates the polling method uses the original request URI. + PollingRequestURI PollingMethodType = "RequestURI" + // PollingUnknown indicates an unknown polling method and is the default value. PollingUnknown PollingMethodType = "" ) -type pollingState struct { - PollingMethod PollingMethodType `json:"pollingMethod"` - URI string `json:"uri"` - State string `json:"state"` - ServiceError *ServiceError `json:"error,omitempty"` -} - -func (ps pollingState) hasSucceeded() bool { - return hasSucceeded(ps.State) -} - -func (ps pollingState) hasTerminated() bool { - return hasTerminated(ps.State) -} - -func (ps pollingState) hasFailed() bool { - return hasFailed(ps.State) -} - -func (ps pollingState) Error() string { - s := fmt.Sprintf("Long running operation terminated with status '%s'", ps.State) - if ps.ServiceError != nil { - s = fmt.Sprintf("%s: %+v", s, *ps.ServiceError) - } - return s -} - -// updatePollingState maps the operation status -- retrieved from either a provisioningState -// field, the status field of an OperationResource, or inferred from the HTTP status code -- -// into a well-known states. Since the process begins from the initial request, the state -// always comes from either a the provisioningState returned or is inferred from the HTTP -// status code. Subsequent requests will read an Azure OperationResource object if the -// service initially returned the Azure-AsyncOperation header. The responseFormat field notes -// the expected response format. -func updatePollingState(resp *http.Response, ps *pollingState) error { - // Determine the response shape - // -- The first response will always be a provisioningStatus response; only the polling requests, - // depending on the header returned, may be something otherwise. - var pt provisioningTracker - if ps.PollingMethod == PollingAsyncOperation { - pt = &operationResource{} - } else { - pt = &provisioningStatus{} - } - - // If this is the first request (that is, the polling response shape is unknown), determine how - // to poll and what to expect - if ps.PollingMethod == PollingUnknown { - req := resp.Request - if req == nil { - return autorest.NewError("azure", "updatePollingState", "Azure Polling Error - Original HTTP request is missing") - } - - // Prefer the Azure-AsyncOperation header - ps.URI = getAsyncOperation(resp) - if ps.URI != "" { - ps.PollingMethod = PollingAsyncOperation - } else { - ps.PollingMethod = PollingLocation - } - - // Else, use the Location header - if ps.URI == "" { - ps.URI = autorest.GetLocation(resp) - } - - // Lastly, requests against an existing resource, use the last request URI - if ps.URI == "" { - m := strings.ToUpper(req.Method) - if m == http.MethodPatch || m == http.MethodPut || m == http.MethodGet { - ps.URI = req.URL.String() - } - } - } - - // Read and interpret the response (saving the Body in case no polling is necessary) - b := &bytes.Buffer{} - err := autorest.Respond(resp, - autorest.ByCopying(b), - autorest.ByUnmarshallingJSON(pt), - autorest.ByClosing()) - resp.Body = ioutil.NopCloser(b) - if err != nil { - return err - } - - // Interpret the results - // -- Terminal states apply regardless - // -- Unknown states are per-service inprogress states - // -- Otherwise, infer state from HTTP status code - if pt.hasTerminated() { - ps.State = pt.state() - } else if pt.state() != "" { - ps.State = operationInProgress - } else { - switch resp.StatusCode { - case http.StatusAccepted: - ps.State = operationInProgress - - case http.StatusNoContent, http.StatusCreated, http.StatusOK: - ps.State = operationSucceeded - - default: - ps.State = operationFailed - } - } - - if strings.EqualFold(ps.State, operationInProgress) && ps.URI == "" { - return autorest.NewError("azure", "updatePollingState", "Azure Polling Error - Unable to obtain polling URI for %s %s", resp.Request.Method, resp.Request.URL) - } - - // For failed operation, check for error code and message in - // -- Operation resource - // -- Response - // -- Otherwise, Unknown - if ps.hasFailed() { - if or, ok := pt.(*operationResource); ok { - ps.ServiceError = &or.OperationError - } else if p, ok := pt.(*provisioningStatus); ok && p.hasProvisioningError() { - ps.ServiceError = &p.ProvisioningError - } else { - ps.ServiceError = &ServiceError{ - Code: "Unknown", - Message: "None", - } - } - } - return nil -} - -func newPollingRequest(ps pollingState) (*http.Request, error) { - reqPoll, err := autorest.Prepare(&http.Request{}, - autorest.AsGet(), - autorest.WithBaseURL(ps.URI)) - if err != nil { - return nil, autorest.NewErrorWithError(err, "azure", "newPollingRequest", nil, "Failure creating poll request to %s", ps.URI) - } - - return reqPoll, nil -} - // AsyncOpIncompleteError is the type that's returned from a future that has not completed. type AsyncOpIncompleteError struct { // FutureType is the name of the type composed of a azure.Future. diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/azure/auth/auth.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/azure/auth/auth.go new file mode 100644 index 000000000..5f02026b3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/azure/auth/auth.go @@ -0,0 +1,737 @@ +package auth + +// Copyright 2017 Microsoft Corporation +// +// 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. + +import ( + "bytes" + "crypto/rsa" + "crypto/x509" + "encoding/binary" + "encoding/json" + "errors" + "fmt" + "io/ioutil" + "log" + "os" + "strings" + "unicode/utf16" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/adal" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/azure/cli" + "github.com/dimchansky/utfbom" + "golang.org/x/crypto/pkcs12" +) + +// The possible keys in the Values map. +const ( + SubscriptionID = "AZURE_SUBSCRIPTION_ID" + TenantID = "AZURE_TENANT_ID" + AuxiliaryTenantIDs = "AZURE_AUXILIARY_TENANT_IDS" + ClientID = "AZURE_CLIENT_ID" + ClientSecret = "AZURE_CLIENT_SECRET" + CertificatePath = "AZURE_CERTIFICATE_PATH" + CertificatePassword = "AZURE_CERTIFICATE_PASSWORD" + Username = "AZURE_USERNAME" + Password = "AZURE_PASSWORD" + EnvironmentName = "AZURE_ENVIRONMENT" + Resource = "AZURE_AD_RESOURCE" + ActiveDirectoryEndpoint = "ActiveDirectoryEndpoint" + ResourceManagerEndpoint = "ResourceManagerEndpoint" + GraphResourceID = "GraphResourceID" + SQLManagementEndpoint = "SQLManagementEndpoint" + GalleryEndpoint = "GalleryEndpoint" + ManagementEndpoint = "ManagementEndpoint" +) + +// NewAuthorizerFromEnvironment creates an Authorizer configured from environment variables in the order: +// 1. Client credentials +// 2. Client certificate +// 3. Username password +// 4. MSI +func NewAuthorizerFromEnvironment() (autorest.Authorizer, error) { + settings, err := GetSettingsFromEnvironment() + if err != nil { + return nil, err + } + return settings.GetAuthorizer() +} + +// NewAuthorizerFromEnvironmentWithResource creates an Authorizer configured from environment variables in the order: +// 1. Client credentials +// 2. Client certificate +// 3. Username password +// 4. MSI +func NewAuthorizerFromEnvironmentWithResource(resource string) (autorest.Authorizer, error) { + settings, err := GetSettingsFromEnvironment() + if err != nil { + return nil, err + } + settings.Values[Resource] = resource + return settings.GetAuthorizer() +} + +// EnvironmentSettings contains the available authentication settings. +type EnvironmentSettings struct { + Values map[string]string + Environment azure.Environment +} + +// GetSettingsFromEnvironment returns the available authentication settings from the environment. +func GetSettingsFromEnvironment() (s EnvironmentSettings, err error) { + s = EnvironmentSettings{ + Values: map[string]string{}, + } + s.setValue(SubscriptionID) + s.setValue(TenantID) + s.setValue(AuxiliaryTenantIDs) + s.setValue(ClientID) + s.setValue(ClientSecret) + s.setValue(CertificatePath) + s.setValue(CertificatePassword) + s.setValue(Username) + s.setValue(Password) + s.setValue(EnvironmentName) + s.setValue(Resource) + if v := s.Values[EnvironmentName]; v == "" { + s.Environment = azure.PublicCloud + } else { + s.Environment, err = azure.EnvironmentFromName(v) + } + if s.Values[Resource] == "" { + s.Values[Resource] = s.Environment.ResourceManagerEndpoint + } + return +} + +// GetSubscriptionID returns the available subscription ID or an empty string. +func (settings EnvironmentSettings) GetSubscriptionID() string { + return settings.Values[SubscriptionID] +} + +// adds the specified environment variable value to the Values map if it exists +func (settings EnvironmentSettings) setValue(key string) { + if v := os.Getenv(key); v != "" { + settings.Values[key] = v + } +} + +// helper to return client and tenant IDs +func (settings EnvironmentSettings) getClientAndTenant() (string, string) { + clientID := settings.Values[ClientID] + tenantID := settings.Values[TenantID] + return clientID, tenantID +} + +// GetClientCredentials creates a config object from the available client credentials. +// An error is returned if no client credentials are available. +func (settings EnvironmentSettings) GetClientCredentials() (ClientCredentialsConfig, error) { + secret := settings.Values[ClientSecret] + if secret == "" { + return ClientCredentialsConfig{}, errors.New("missing client secret") + } + clientID, tenantID := settings.getClientAndTenant() + config := NewClientCredentialsConfig(clientID, secret, tenantID) + config.AADEndpoint = settings.Environment.ActiveDirectoryEndpoint + config.Resource = settings.Values[Resource] + if auxTenants, ok := settings.Values[AuxiliaryTenantIDs]; ok { + config.AuxTenants = strings.Split(auxTenants, ";") + for i := range config.AuxTenants { + config.AuxTenants[i] = strings.TrimSpace(config.AuxTenants[i]) + } + } + return config, nil +} + +// GetClientCertificate creates a config object from the available certificate credentials. +// An error is returned if no certificate credentials are available. +func (settings EnvironmentSettings) GetClientCertificate() (ClientCertificateConfig, error) { + certPath := settings.Values[CertificatePath] + if certPath == "" { + return ClientCertificateConfig{}, errors.New("missing certificate path") + } + certPwd := settings.Values[CertificatePassword] + clientID, tenantID := settings.getClientAndTenant() + config := NewClientCertificateConfig(certPath, certPwd, clientID, tenantID) + config.AADEndpoint = settings.Environment.ActiveDirectoryEndpoint + config.Resource = settings.Values[Resource] + return config, nil +} + +// GetUsernamePassword creates a config object from the available username/password credentials. +// An error is returned if no username/password credentials are available. +func (settings EnvironmentSettings) GetUsernamePassword() (UsernamePasswordConfig, error) { + username := settings.Values[Username] + password := settings.Values[Password] + if username == "" || password == "" { + return UsernamePasswordConfig{}, errors.New("missing username/password") + } + clientID, tenantID := settings.getClientAndTenant() + config := NewUsernamePasswordConfig(username, password, clientID, tenantID) + config.AADEndpoint = settings.Environment.ActiveDirectoryEndpoint + config.Resource = settings.Values[Resource] + return config, nil +} + +// GetMSI creates a MSI config object from the available client ID. +func (settings EnvironmentSettings) GetMSI() MSIConfig { + config := NewMSIConfig() + config.Resource = settings.Values[Resource] + config.ClientID = settings.Values[ClientID] + return config +} + +// GetDeviceFlow creates a device-flow config object from the available client and tenant IDs. +func (settings EnvironmentSettings) GetDeviceFlow() DeviceFlowConfig { + clientID, tenantID := settings.getClientAndTenant() + config := NewDeviceFlowConfig(clientID, tenantID) + config.AADEndpoint = settings.Environment.ActiveDirectoryEndpoint + config.Resource = settings.Values[Resource] + return config +} + +// GetAuthorizer creates an Authorizer configured from environment variables in the order: +// 1. Client credentials +// 2. Client certificate +// 3. Username password +// 4. MSI +func (settings EnvironmentSettings) GetAuthorizer() (autorest.Authorizer, error) { + //1.Client Credentials + if c, e := settings.GetClientCredentials(); e == nil { + return c.Authorizer() + } + + //2. Client Certificate + if c, e := settings.GetClientCertificate(); e == nil { + return c.Authorizer() + } + + //3. Username Password + if c, e := settings.GetUsernamePassword(); e == nil { + return c.Authorizer() + } + + // 4. MSI + return settings.GetMSI().Authorizer() +} + +// NewAuthorizerFromFile creates an Authorizer configured from a configuration file in the following order. +// 1. Client credentials +// 2. Client certificate +func NewAuthorizerFromFile(baseURI string) (autorest.Authorizer, error) { + settings, err := GetSettingsFromFile() + if err != nil { + return nil, err + } + if a, err := settings.ClientCredentialsAuthorizer(baseURI); err == nil { + return a, err + } + if a, err := settings.ClientCertificateAuthorizer(baseURI); err == nil { + return a, err + } + return nil, errors.New("auth file missing client and certificate credentials") +} + +// NewAuthorizerFromFileWithResource creates an Authorizer configured from a configuration file in the following order. +// 1. Client credentials +// 2. Client certificate +func NewAuthorizerFromFileWithResource(resource string) (autorest.Authorizer, error) { + s, err := GetSettingsFromFile() + if err != nil { + return nil, err + } + if a, err := s.ClientCredentialsAuthorizerWithResource(resource); err == nil { + return a, err + } + if a, err := s.ClientCertificateAuthorizerWithResource(resource); err == nil { + return a, err + } + return nil, errors.New("auth file missing client and certificate credentials") +} + +// NewAuthorizerFromCLI creates an Authorizer configured from Azure CLI 2.0 for local development scenarios. +func NewAuthorizerFromCLI() (autorest.Authorizer, error) { + settings, err := GetSettingsFromEnvironment() + if err != nil { + return nil, err + } + + if settings.Values[Resource] == "" { + settings.Values[Resource] = settings.Environment.ResourceManagerEndpoint + } + + return NewAuthorizerFromCLIWithResource(settings.Values[Resource]) +} + +// NewAuthorizerFromCLIWithResource creates an Authorizer configured from Azure CLI 2.0 for local development scenarios. +func NewAuthorizerFromCLIWithResource(resource string) (autorest.Authorizer, error) { + token, err := cli.GetTokenFromCLI(resource) + if err != nil { + return nil, err + } + + adalToken, err := token.ToADALToken() + if err != nil { + return nil, err + } + + return autorest.NewBearerAuthorizer(&adalToken), nil +} + +// GetSettingsFromFile returns the available authentication settings from an Azure CLI authentication file. +func GetSettingsFromFile() (FileSettings, error) { + s := FileSettings{} + fileLocation := os.Getenv("AZURE_AUTH_LOCATION") + if fileLocation == "" { + return s, errors.New("environment variable AZURE_AUTH_LOCATION is not set") + } + + contents, err := ioutil.ReadFile(fileLocation) + if err != nil { + return s, err + } + + // Auth file might be encoded + decoded, err := decode(contents) + if err != nil { + return s, err + } + + authFile := map[string]interface{}{} + err = json.Unmarshal(decoded, &authFile) + if err != nil { + return s, err + } + + s.Values = map[string]string{} + s.setKeyValue(ClientID, authFile["clientId"]) + s.setKeyValue(ClientSecret, authFile["clientSecret"]) + s.setKeyValue(CertificatePath, authFile["clientCertificate"]) + s.setKeyValue(CertificatePassword, authFile["clientCertificatePassword"]) + s.setKeyValue(SubscriptionID, authFile["subscriptionId"]) + s.setKeyValue(TenantID, authFile["tenantId"]) + s.setKeyValue(ActiveDirectoryEndpoint, authFile["activeDirectoryEndpointUrl"]) + s.setKeyValue(ResourceManagerEndpoint, authFile["resourceManagerEndpointUrl"]) + s.setKeyValue(GraphResourceID, authFile["activeDirectoryGraphResourceId"]) + s.setKeyValue(SQLManagementEndpoint, authFile["sqlManagementEndpointUrl"]) + s.setKeyValue(GalleryEndpoint, authFile["galleryEndpointUrl"]) + s.setKeyValue(ManagementEndpoint, authFile["managementEndpointUrl"]) + return s, nil +} + +// FileSettings contains the available authentication settings. +type FileSettings struct { + Values map[string]string +} + +// GetSubscriptionID returns the available subscription ID or an empty string. +func (settings FileSettings) GetSubscriptionID() string { + return settings.Values[SubscriptionID] +} + +// adds the specified value to the Values map if it isn't nil +func (settings FileSettings) setKeyValue(key string, val interface{}) { + if val != nil { + settings.Values[key] = val.(string) + } +} + +// returns the specified AAD endpoint or the public cloud endpoint if unspecified +func (settings FileSettings) getAADEndpoint() string { + if v, ok := settings.Values[ActiveDirectoryEndpoint]; ok { + return v + } + return azure.PublicCloud.ActiveDirectoryEndpoint +} + +// ServicePrincipalTokenFromClientCredentials creates a ServicePrincipalToken from the available client credentials. +func (settings FileSettings) ServicePrincipalTokenFromClientCredentials(baseURI string) (*adal.ServicePrincipalToken, error) { + resource, err := settings.getResourceForToken(baseURI) + if err != nil { + return nil, err + } + return settings.ServicePrincipalTokenFromClientCredentialsWithResource(resource) +} + +// ClientCredentialsAuthorizer creates an authorizer from the available client credentials. +func (settings FileSettings) ClientCredentialsAuthorizer(baseURI string) (autorest.Authorizer, error) { + resource, err := settings.getResourceForToken(baseURI) + if err != nil { + return nil, err + } + return settings.ClientCredentialsAuthorizerWithResource(resource) +} + +// ServicePrincipalTokenFromClientCredentialsWithResource creates a ServicePrincipalToken +// from the available client credentials and the specified resource. +func (settings FileSettings) ServicePrincipalTokenFromClientCredentialsWithResource(resource string) (*adal.ServicePrincipalToken, error) { + if _, ok := settings.Values[ClientSecret]; !ok { + return nil, errors.New("missing client secret") + } + config, err := adal.NewOAuthConfig(settings.getAADEndpoint(), settings.Values[TenantID]) + if err != nil { + return nil, err + } + return adal.NewServicePrincipalToken(*config, settings.Values[ClientID], settings.Values[ClientSecret], resource) +} + +func (settings FileSettings) clientCertificateConfigWithResource(resource string) (ClientCertificateConfig, error) { + if _, ok := settings.Values[CertificatePath]; !ok { + return ClientCertificateConfig{}, errors.New("missing certificate path") + } + cfg := NewClientCertificateConfig(settings.Values[CertificatePath], settings.Values[CertificatePassword], settings.Values[ClientID], settings.Values[TenantID]) + cfg.AADEndpoint = settings.getAADEndpoint() + cfg.Resource = resource + return cfg, nil +} + +// ClientCredentialsAuthorizerWithResource creates an authorizer from the available client credentials and the specified resource. +func (settings FileSettings) ClientCredentialsAuthorizerWithResource(resource string) (autorest.Authorizer, error) { + spToken, err := settings.ServicePrincipalTokenFromClientCredentialsWithResource(resource) + if err != nil { + return nil, err + } + return autorest.NewBearerAuthorizer(spToken), nil +} + +// ServicePrincipalTokenFromClientCertificate creates a ServicePrincipalToken from the available certificate credentials. +func (settings FileSettings) ServicePrincipalTokenFromClientCertificate(baseURI string) (*adal.ServicePrincipalToken, error) { + resource, err := settings.getResourceForToken(baseURI) + if err != nil { + return nil, err + } + return settings.ServicePrincipalTokenFromClientCertificateWithResource(resource) +} + +// ClientCertificateAuthorizer creates an authorizer from the available certificate credentials. +func (settings FileSettings) ClientCertificateAuthorizer(baseURI string) (autorest.Authorizer, error) { + resource, err := settings.getResourceForToken(baseURI) + if err != nil { + return nil, err + } + return settings.ClientCertificateAuthorizerWithResource(resource) +} + +// ServicePrincipalTokenFromClientCertificateWithResource creates a ServicePrincipalToken from the available certificate credentials. +func (settings FileSettings) ServicePrincipalTokenFromClientCertificateWithResource(resource string) (*adal.ServicePrincipalToken, error) { + cfg, err := settings.clientCertificateConfigWithResource(resource) + if err != nil { + return nil, err + } + return cfg.ServicePrincipalToken() +} + +// ClientCertificateAuthorizerWithResource creates an authorizer from the available certificate credentials and the specified resource. +func (settings FileSettings) ClientCertificateAuthorizerWithResource(resource string) (autorest.Authorizer, error) { + cfg, err := settings.clientCertificateConfigWithResource(resource) + if err != nil { + return nil, err + } + return cfg.Authorizer() +} + +func decode(b []byte) ([]byte, error) { + reader, enc := utfbom.Skip(bytes.NewReader(b)) + + switch enc { + case utfbom.UTF16LittleEndian: + u16 := make([]uint16, (len(b)/2)-1) + err := binary.Read(reader, binary.LittleEndian, &u16) + if err != nil { + return nil, err + } + return []byte(string(utf16.Decode(u16))), nil + case utfbom.UTF16BigEndian: + u16 := make([]uint16, (len(b)/2)-1) + err := binary.Read(reader, binary.BigEndian, &u16) + if err != nil { + return nil, err + } + return []byte(string(utf16.Decode(u16))), nil + } + return ioutil.ReadAll(reader) +} + +func (settings FileSettings) getResourceForToken(baseURI string) (string, error) { + // Compare dafault base URI from the SDK to the endpoints from the public cloud + // Base URI and token resource are the same string. This func finds the authentication + // file field that matches the SDK base URI. The SDK defines the public cloud + // endpoint as its default base URI + if !strings.HasSuffix(baseURI, "/") { + baseURI += "/" + } + switch baseURI { + case azure.PublicCloud.ServiceManagementEndpoint: + return settings.Values[ManagementEndpoint], nil + case azure.PublicCloud.ResourceManagerEndpoint: + return settings.Values[ResourceManagerEndpoint], nil + case azure.PublicCloud.ActiveDirectoryEndpoint: + return settings.Values[ActiveDirectoryEndpoint], nil + case azure.PublicCloud.GalleryEndpoint: + return settings.Values[GalleryEndpoint], nil + case azure.PublicCloud.GraphEndpoint: + return settings.Values[GraphResourceID], nil + } + return "", fmt.Errorf("auth: base URI not found in endpoints") +} + +// NewClientCredentialsConfig creates an AuthorizerConfig object configured to obtain an Authorizer through Client Credentials. +// Defaults to Public Cloud and Resource Manager Endpoint. +func NewClientCredentialsConfig(clientID string, clientSecret string, tenantID string) ClientCredentialsConfig { + return ClientCredentialsConfig{ + ClientID: clientID, + ClientSecret: clientSecret, + TenantID: tenantID, + Resource: azure.PublicCloud.ResourceManagerEndpoint, + AADEndpoint: azure.PublicCloud.ActiveDirectoryEndpoint, + } +} + +// NewClientCertificateConfig creates a ClientCertificateConfig object configured to obtain an Authorizer through client certificate. +// Defaults to Public Cloud and Resource Manager Endpoint. +func NewClientCertificateConfig(certificatePath string, certificatePassword string, clientID string, tenantID string) ClientCertificateConfig { + return ClientCertificateConfig{ + CertificatePath: certificatePath, + CertificatePassword: certificatePassword, + ClientID: clientID, + TenantID: tenantID, + Resource: azure.PublicCloud.ResourceManagerEndpoint, + AADEndpoint: azure.PublicCloud.ActiveDirectoryEndpoint, + } +} + +// NewUsernamePasswordConfig creates an UsernamePasswordConfig object configured to obtain an Authorizer through username and password. +// Defaults to Public Cloud and Resource Manager Endpoint. +func NewUsernamePasswordConfig(username string, password string, clientID string, tenantID string) UsernamePasswordConfig { + return UsernamePasswordConfig{ + Username: username, + Password: password, + ClientID: clientID, + TenantID: tenantID, + Resource: azure.PublicCloud.ResourceManagerEndpoint, + AADEndpoint: azure.PublicCloud.ActiveDirectoryEndpoint, + } +} + +// NewMSIConfig creates an MSIConfig object configured to obtain an Authorizer through MSI. +func NewMSIConfig() MSIConfig { + return MSIConfig{ + Resource: azure.PublicCloud.ResourceManagerEndpoint, + } +} + +// NewDeviceFlowConfig creates a DeviceFlowConfig object configured to obtain an Authorizer through device flow. +// Defaults to Public Cloud and Resource Manager Endpoint. +func NewDeviceFlowConfig(clientID string, tenantID string) DeviceFlowConfig { + return DeviceFlowConfig{ + ClientID: clientID, + TenantID: tenantID, + Resource: azure.PublicCloud.ResourceManagerEndpoint, + AADEndpoint: azure.PublicCloud.ActiveDirectoryEndpoint, + } +} + +//AuthorizerConfig provides an authorizer from the configuration provided. +type AuthorizerConfig interface { + Authorizer() (autorest.Authorizer, error) +} + +// ClientCredentialsConfig provides the options to get a bearer authorizer from client credentials. +type ClientCredentialsConfig struct { + ClientID string + ClientSecret string + TenantID string + AuxTenants []string + AADEndpoint string + Resource string +} + +// ServicePrincipalToken creates a ServicePrincipalToken from client credentials. +func (ccc ClientCredentialsConfig) ServicePrincipalToken() (*adal.ServicePrincipalToken, error) { + oauthConfig, err := adal.NewOAuthConfig(ccc.AADEndpoint, ccc.TenantID) + if err != nil { + return nil, err + } + return adal.NewServicePrincipalToken(*oauthConfig, ccc.ClientID, ccc.ClientSecret, ccc.Resource) +} + +// MultiTenantServicePrincipalToken creates a MultiTenantServicePrincipalToken from client credentials. +func (ccc ClientCredentialsConfig) MultiTenantServicePrincipalToken() (*adal.MultiTenantServicePrincipalToken, error) { + oauthConfig, err := adal.NewMultiTenantOAuthConfig(ccc.AADEndpoint, ccc.TenantID, ccc.AuxTenants, adal.OAuthOptions{}) + if err != nil { + return nil, err + } + return adal.NewMultiTenantServicePrincipalToken(oauthConfig, ccc.ClientID, ccc.ClientSecret, ccc.Resource) +} + +// Authorizer gets the authorizer from client credentials. +func (ccc ClientCredentialsConfig) Authorizer() (autorest.Authorizer, error) { + if len(ccc.AuxTenants) == 0 { + spToken, err := ccc.ServicePrincipalToken() + if err != nil { + return nil, fmt.Errorf("failed to get SPT from client credentials: %v", err) + } + return autorest.NewBearerAuthorizer(spToken), nil + } + mtSPT, err := ccc.MultiTenantServicePrincipalToken() + if err != nil { + return nil, fmt.Errorf("failed to get multitenant SPT from client credentials: %v", err) + } + return autorest.NewMultiTenantServicePrincipalTokenAuthorizer(mtSPT), nil +} + +// ClientCertificateConfig provides the options to get a bearer authorizer from a client certificate. +type ClientCertificateConfig struct { + ClientID string + CertificatePath string + CertificatePassword string + TenantID string + AADEndpoint string + Resource string +} + +// ServicePrincipalToken creates a ServicePrincipalToken from client certificate. +func (ccc ClientCertificateConfig) ServicePrincipalToken() (*adal.ServicePrincipalToken, error) { + oauthConfig, err := adal.NewOAuthConfig(ccc.AADEndpoint, ccc.TenantID) + if err != nil { + return nil, err + } + certData, err := ioutil.ReadFile(ccc.CertificatePath) + if err != nil { + return nil, fmt.Errorf("failed to read the certificate file (%s): %v", ccc.CertificatePath, err) + } + certificate, rsaPrivateKey, err := decodePkcs12(certData, ccc.CertificatePassword) + if err != nil { + return nil, fmt.Errorf("failed to decode pkcs12 certificate while creating spt: %v", err) + } + return adal.NewServicePrincipalTokenFromCertificate(*oauthConfig, ccc.ClientID, certificate, rsaPrivateKey, ccc.Resource) +} + +// Authorizer gets an authorizer object from client certificate. +func (ccc ClientCertificateConfig) Authorizer() (autorest.Authorizer, error) { + spToken, err := ccc.ServicePrincipalToken() + if err != nil { + return nil, fmt.Errorf("failed to get oauth token from certificate auth: %v", err) + } + return autorest.NewBearerAuthorizer(spToken), nil +} + +// DeviceFlowConfig provides the options to get a bearer authorizer using device flow authentication. +type DeviceFlowConfig struct { + ClientID string + TenantID string + AADEndpoint string + Resource string +} + +// Authorizer gets the authorizer from device flow. +func (dfc DeviceFlowConfig) Authorizer() (autorest.Authorizer, error) { + spToken, err := dfc.ServicePrincipalToken() + if err != nil { + return nil, fmt.Errorf("failed to get oauth token from device flow: %v", err) + } + return autorest.NewBearerAuthorizer(spToken), nil +} + +// ServicePrincipalToken gets the service principal token from device flow. +func (dfc DeviceFlowConfig) ServicePrincipalToken() (*adal.ServicePrincipalToken, error) { + oauthConfig, err := adal.NewOAuthConfig(dfc.AADEndpoint, dfc.TenantID) + if err != nil { + return nil, err + } + oauthClient := &autorest.Client{} + deviceCode, err := adal.InitiateDeviceAuth(oauthClient, *oauthConfig, dfc.ClientID, dfc.Resource) + if err != nil { + return nil, fmt.Errorf("failed to start device auth flow: %s", err) + } + log.Println(*deviceCode.Message) + token, err := adal.WaitForUserCompletion(oauthClient, deviceCode) + if err != nil { + return nil, fmt.Errorf("failed to finish device auth flow: %s", err) + } + return adal.NewServicePrincipalTokenFromManualToken(*oauthConfig, dfc.ClientID, dfc.Resource, *token) +} + +func decodePkcs12(pkcs []byte, password string) (*x509.Certificate, *rsa.PrivateKey, error) { + privateKey, certificate, err := pkcs12.Decode(pkcs, password) + if err != nil { + return nil, nil, err + } + + rsaPrivateKey, isRsaKey := privateKey.(*rsa.PrivateKey) + if !isRsaKey { + return nil, nil, fmt.Errorf("PKCS#12 certificate must contain an RSA private key") + } + + return certificate, rsaPrivateKey, nil +} + +// UsernamePasswordConfig provides the options to get a bearer authorizer from a username and a password. +type UsernamePasswordConfig struct { + ClientID string + Username string + Password string + TenantID string + AADEndpoint string + Resource string +} + +// ServicePrincipalToken creates a ServicePrincipalToken from username and password. +func (ups UsernamePasswordConfig) ServicePrincipalToken() (*adal.ServicePrincipalToken, error) { + oauthConfig, err := adal.NewOAuthConfig(ups.AADEndpoint, ups.TenantID) + if err != nil { + return nil, err + } + return adal.NewServicePrincipalTokenFromUsernamePassword(*oauthConfig, ups.ClientID, ups.Username, ups.Password, ups.Resource) +} + +// Authorizer gets the authorizer from a username and a password. +func (ups UsernamePasswordConfig) Authorizer() (autorest.Authorizer, error) { + spToken, err := ups.ServicePrincipalToken() + if err != nil { + return nil, fmt.Errorf("failed to get oauth token from username and password auth: %v", err) + } + return autorest.NewBearerAuthorizer(spToken), nil +} + +// MSIConfig provides the options to get a bearer authorizer through MSI. +type MSIConfig struct { + Resource string + ClientID string +} + +// Authorizer gets the authorizer from MSI. +func (mc MSIConfig) Authorizer() (autorest.Authorizer, error) { + msiEndpoint, err := adal.GetMSIEndpoint() + if err != nil { + return nil, err + } + + var spToken *adal.ServicePrincipalToken + if mc.ClientID == "" { + spToken, err = adal.NewServicePrincipalTokenFromMSI(msiEndpoint, mc.Resource) + if err != nil { + return nil, fmt.Errorf("failed to get oauth token from MSI: %v", err) + } + } else { + spToken, err = adal.NewServicePrincipalTokenFromMSIWithUserAssignedID(msiEndpoint, mc.Resource, mc.ClientID) + if err != nil { + return nil, fmt.Errorf("failed to get oauth token from MSI for user assigned identity: %v", err) + } + } + + return autorest.NewBearerAuthorizer(spToken), nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/azure/auth/go.mod b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/azure/auth/go.mod new file mode 100644 index 000000000..43fa1b792 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/azure/auth/go.mod @@ -0,0 +1,11 @@ +module github.com/Azure/go-autorest/autorest/azure/auth + +go 1.12 + +require ( + github.com/Azure/go-autorest/autorest v0.9.2 + github.com/Azure/go-autorest/autorest/adal v0.7.0 + github.com/Azure/go-autorest/autorest/azure/cli v0.3.0 + github.com/dimchansky/utfbom v1.1.0 + golang.org/x/crypto v0.0.0-20190418165655-df01cb2cc480 +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/azure/auth/go.sum b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/azure/auth/go.sum new file mode 100644 index 000000000..c462a7d4d --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/azure/auth/go.sum @@ -0,0 +1,38 @@ +github.com/Azure/go-autorest/autorest v0.9.0 h1:MRvx8gncNaXJqOoLmhNjUAKh33JJF8LyxPhomEtOsjs= +github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest v0.9.2 h1:6AWuh3uWrsZJcNoCHrCF/+g4aKPCU39kaMO6/qrnK/4= +github.com/Azure/go-autorest/autorest v0.9.2/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest/adal v0.5.0 h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/adal v0.6.0 h1:UCTq22yE3RPgbU/8u4scfnnzuCW6pwQ9n+uBtV78ouo= +github.com/Azure/go-autorest/autorest/adal v0.6.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= +github.com/Azure/go-autorest/autorest/adal v0.7.0 h1:PUMxSVw3tEImG0JTRqbxjXLKCSoPk7DartDELqlOuiI= +github.com/Azure/go-autorest/autorest/adal v0.7.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= +github.com/Azure/go-autorest/autorest/azure/cli v0.3.0 h1:5PAqnv+CSTwW9mlZWZAizmzrazFWEgZykEZXpr2hDtY= +github.com/Azure/go-autorest/autorest/azure/cli v0.3.0/go.mod h1:rNYMNAefZMRowqCV0cVhr/YDW5dD7afFq9nXAXL4ykE= +github.com/Azure/go-autorest/autorest/date v0.1.0 h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM= +github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/date v0.2.0 h1:yW+Zlqf26583pE43KhfnhFcdmSWlm5Ew6bxipnr/tbM= +github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= +github.com/Azure/go-autorest/autorest/mocks v0.1.0 h1:Kx+AUU2Te+A3JIyYn6Dfs+cFgx5XorQKuIXrZGoq/SI= +github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0 h1:Ww5g4zThfD/6cLb4z6xxgeyDa7QDkizMkJKe0ysZXp0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.3.0 h1:qJumjCaCudz+OcqE9/XtEPfvtOjOmKaui4EOpFI6zZc= +github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= +github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k= +github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dimchansky/utfbom v1.1.0 h1:FcM3g+nofKgUteL8dm/UpdRXNC9KmADgTpLKsu0TRo4= +github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190418165655-df01cb2cc480 h1:O5YqonU5IWby+w98jVUG9h7zlCWCcH4RHyPVReBmhzk= +golang.org/x/crypto v0.0.0-20190418165655-df01cb2cc480/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e h1:nFYrTHrdrAOpShe27kaFHjsqYSEQ0KWqdWLu3xuZJts= +golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/azure/auth/go_mod_tidy_hack.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/azure/auth/go_mod_tidy_hack.go new file mode 100644 index 000000000..2f09cd177 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/azure/auth/go_mod_tidy_hack.go @@ -0,0 +1,24 @@ +// +build modhack + +package auth + +// Copyright 2017 Microsoft Corporation +// +// 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. + +// This file, and the github.com/Azure/go-autorest/autorest import, won't actually become part of +// the resultant binary. + +// Necessary for safely adding multi-module repo. +// See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository +import _ "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/azure/azure.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/azure/azure.go index 18d029526..26be936b7 100644 --- a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/azure/azure.go +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/azure/azure.go @@ -17,6 +17,7 @@ package azure // limitations under the License. import ( + "bytes" "encoding/json" "fmt" "io/ioutil" @@ -44,11 +45,12 @@ const ( // ServiceError encapsulates the error response from an Azure service. // It adhears to the OData v4 specification for error responses. type ServiceError struct { - Code string `json:"code"` - Message string `json:"message"` - Target *string `json:"target"` - Details []map[string]interface{} `json:"details"` - InnerError map[string]interface{} `json:"innererror"` + Code string `json:"code"` + Message string `json:"message"` + Target *string `json:"target"` + Details []map[string]interface{} `json:"details"` + InnerError map[string]interface{} `json:"innererror"` + AdditionalInfo []map[string]interface{} `json:"additionalInfo"` } func (se ServiceError) Error() string { @@ -74,6 +76,14 @@ func (se ServiceError) Error() string { result += fmt.Sprintf(" InnerError=%v", string(d)) } + if se.AdditionalInfo != nil { + d, err := json.Marshal(se.AdditionalInfo) + if err != nil { + result += fmt.Sprintf(" AdditionalInfo=%v", se.AdditionalInfo) + } + result += fmt.Sprintf(" AdditionalInfo=%v", string(d)) + } + return result } @@ -86,44 +96,47 @@ func (se *ServiceError) UnmarshalJSON(b []byte) error { // http://docs.oasis-open.org/odata/odata-json-format/v4.0/os/odata-json-format-v4.0-os.html#_Toc372793091 type serviceError1 struct { - Code string `json:"code"` - Message string `json:"message"` - Target *string `json:"target"` - Details []map[string]interface{} `json:"details"` - InnerError map[string]interface{} `json:"innererror"` + Code string `json:"code"` + Message string `json:"message"` + Target *string `json:"target"` + Details []map[string]interface{} `json:"details"` + InnerError map[string]interface{} `json:"innererror"` + AdditionalInfo []map[string]interface{} `json:"additionalInfo"` } type serviceError2 struct { - Code string `json:"code"` - Message string `json:"message"` - Target *string `json:"target"` - Details map[string]interface{} `json:"details"` - InnerError map[string]interface{} `json:"innererror"` + Code string `json:"code"` + Message string `json:"message"` + Target *string `json:"target"` + Details map[string]interface{} `json:"details"` + InnerError map[string]interface{} `json:"innererror"` + AdditionalInfo []map[string]interface{} `json:"additionalInfo"` } se1 := serviceError1{} err := json.Unmarshal(b, &se1) if err == nil { - se.populate(se1.Code, se1.Message, se1.Target, se1.Details, se1.InnerError) + se.populate(se1.Code, se1.Message, se1.Target, se1.Details, se1.InnerError, se1.AdditionalInfo) return nil } se2 := serviceError2{} err = json.Unmarshal(b, &se2) if err == nil { - se.populate(se2.Code, se2.Message, se2.Target, nil, se2.InnerError) + se.populate(se2.Code, se2.Message, se2.Target, nil, se2.InnerError, se2.AdditionalInfo) se.Details = append(se.Details, se2.Details) return nil } return err } -func (se *ServiceError) populate(code, message string, target *string, details []map[string]interface{}, inner map[string]interface{}) { +func (se *ServiceError) populate(code, message string, target *string, details []map[string]interface{}, inner map[string]interface{}, additional []map[string]interface{}) { se.Code = code se.Message = message se.Target = target se.Details = details se.InnerError = inner + se.AdditionalInfo = additional } // RequestError describes an error response returned by Azure service. @@ -131,7 +144,7 @@ type RequestError struct { autorest.DetailedError // The error returned by the Azure service. - ServiceError *ServiceError `json:"error"` + ServiceError *ServiceError `json:"error" xml:"Error"` // The request id (from the x-ms-request-id-header) of the request. RequestID string @@ -273,22 +286,43 @@ func WithErrorUnlessStatusCode(codes ...int) autorest.RespondDecorator { var e RequestError defer resp.Body.Close() + encodedAs := autorest.EncodedAsJSON + if strings.Contains(resp.Header.Get("Content-Type"), "xml") { + encodedAs = autorest.EncodedAsXML + } + // Copy and replace the Body in case it does not contain an error object. // This will leave the Body available to the caller. - b, decodeErr := autorest.CopyAndDecode(autorest.EncodedAsJSON, resp.Body, &e) + b, decodeErr := autorest.CopyAndDecode(encodedAs, resp.Body, &e) resp.Body = ioutil.NopCloser(&b) if decodeErr != nil { return fmt.Errorf("autorest/azure: error response cannot be parsed: %q error: %v", b.String(), decodeErr) - } else if e.ServiceError == nil { + } + if e.ServiceError == nil { // Check if error is unwrapped ServiceError - if err := json.Unmarshal(b.Bytes(), &e.ServiceError); err != nil || e.ServiceError.Message == "" { - e.ServiceError = &ServiceError{ - Code: "Unknown", - Message: "Unknown service error", - } + decoder := autorest.NewDecoder(encodedAs, bytes.NewReader(b.Bytes())) + if err := decoder.Decode(&e.ServiceError); err != nil { + return err } } + if e.ServiceError.Message == "" { + // if we're here it means the returned error wasn't OData v4 compliant. + // try to unmarshal the body in hopes of getting something. + rawBody := map[string]interface{}{} + decoder := autorest.NewDecoder(encodedAs, bytes.NewReader(b.Bytes())) + if err := decoder.Decode(&rawBody); err != nil { + return err + } + e.ServiceError = &ServiceError{ + Code: "Unknown", + Message: "Unknown service error", + } + if len(rawBody) > 0 { + e.ServiceError.Details = []map[string]interface{}{rawBody} + } + } + e.Response = resp e.RequestID = ExtractRequestID(resp) if e.StatusCode == nil { e.StatusCode = resp.StatusCode diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/azure/cli/go.mod b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/azure/cli/go.mod new file mode 100644 index 000000000..03ad580d6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/azure/cli/go.mod @@ -0,0 +1,11 @@ +module github.com/Azure/go-autorest/autorest/azure/cli + +go 1.12 + +require ( + github.com/Azure/go-autorest/autorest v0.9.0 + github.com/Azure/go-autorest/autorest/adal v0.6.0 + github.com/Azure/go-autorest/autorest/date v0.2.0 + github.com/dimchansky/utfbom v1.1.0 + github.com/mitchellh/go-homedir v1.1.0 +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/azure/cli/go.sum b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/azure/cli/go.sum new file mode 100644 index 000000000..7a8b1f23f --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/azure/cli/go.sum @@ -0,0 +1,29 @@ +github.com/Azure/go-autorest/autorest v0.9.0 h1:MRvx8gncNaXJqOoLmhNjUAKh33JJF8LyxPhomEtOsjs= +github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest/adal v0.5.0 h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/adal v0.6.0 h1:UCTq22yE3RPgbU/8u4scfnnzuCW6pwQ9n+uBtV78ouo= +github.com/Azure/go-autorest/autorest/adal v0.6.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= +github.com/Azure/go-autorest/autorest/date v0.1.0 h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM= +github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/date v0.2.0 h1:yW+Zlqf26583pE43KhfnhFcdmSWlm5Ew6bxipnr/tbM= +github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= +github.com/Azure/go-autorest/autorest/mocks v0.1.0 h1:Kx+AUU2Te+A3JIyYn6Dfs+cFgx5XorQKuIXrZGoq/SI= +github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0 h1:Ww5g4zThfD/6cLb4z6xxgeyDa7QDkizMkJKe0ysZXp0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.3.0 h1:qJumjCaCudz+OcqE9/XtEPfvtOjOmKaui4EOpFI6zZc= +github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= +github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k= +github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dimchansky/utfbom v1.1.0 h1:FcM3g+nofKgUteL8dm/UpdRXNC9KmADgTpLKsu0TRo4= +github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/azure/cli/go_mod_tidy_hack.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/azure/cli/go_mod_tidy_hack.go new file mode 100644 index 000000000..618bed392 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/azure/cli/go_mod_tidy_hack.go @@ -0,0 +1,24 @@ +// +build modhack + +package cli + +// Copyright 2017 Microsoft Corporation +// +// 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. + +// This file, and the github.com/Azure/go-autorest/autorest import, won't actually become part of +// the resultant binary. + +// Necessary for safely adding multi-module repo. +// See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository +import _ "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/azure/cli/profile.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/azure/cli/profile.go new file mode 100644 index 000000000..f45c3a516 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/azure/cli/profile.go @@ -0,0 +1,83 @@ +package cli + +// Copyright 2017 Microsoft Corporation +// +// 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. + +import ( + "bytes" + "encoding/json" + "fmt" + "io/ioutil" + "os" + "path/filepath" + + "github.com/dimchansky/utfbom" + "github.com/mitchellh/go-homedir" +) + +// Profile represents a Profile from the Azure CLI +type Profile struct { + InstallationID string `json:"installationId"` + Subscriptions []Subscription `json:"subscriptions"` +} + +// Subscription represents a Subscription from the Azure CLI +type Subscription struct { + EnvironmentName string `json:"environmentName"` + ID string `json:"id"` + IsDefault bool `json:"isDefault"` + Name string `json:"name"` + State string `json:"state"` + TenantID string `json:"tenantId"` + User *User `json:"user"` +} + +// User represents a User from the Azure CLI +type User struct { + Name string `json:"name"` + Type string `json:"type"` +} + +const azureProfileJSON = "azureProfile.json" + +func configDir() string { + return os.Getenv("AZURE_CONFIG_DIR") +} + +// ProfilePath returns the path where the Azure Profile is stored from the Azure CLI +func ProfilePath() (string, error) { + if cfgDir := configDir(); cfgDir != "" { + return filepath.Join(cfgDir, azureProfileJSON), nil + } + return homedir.Expand("~/.azure/" + azureProfileJSON) +} + +// LoadProfile restores a Profile object from a file located at 'path'. +func LoadProfile(path string) (result Profile, err error) { + var contents []byte + contents, err = ioutil.ReadFile(path) + if err != nil { + err = fmt.Errorf("failed to open file (%s) while loading token: %v", path, err) + return + } + reader := utfbom.SkipOnly(bytes.NewReader(contents)) + + dec := json.NewDecoder(reader) + if err = dec.Decode(&result); err != nil { + err = fmt.Errorf("failed to decode contents of file (%s) into a Profile representation: %v", path, err) + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/azure/cli/token.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/azure/cli/token.go new file mode 100644 index 000000000..44ff446f6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/azure/cli/token.go @@ -0,0 +1,175 @@ +package cli + +// Copyright 2017 Microsoft Corporation +// +// 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. + +import ( + "bytes" + "encoding/json" + "fmt" + "os" + "os/exec" + "path/filepath" + "regexp" + "runtime" + "strconv" + "time" + + "github.com/Azure/go-autorest/autorest/adal" + "github.com/Azure/go-autorest/autorest/date" + "github.com/mitchellh/go-homedir" +) + +// Token represents an AccessToken from the Azure CLI +type Token struct { + AccessToken string `json:"accessToken"` + Authority string `json:"_authority"` + ClientID string `json:"_clientId"` + ExpiresOn string `json:"expiresOn"` + IdentityProvider string `json:"identityProvider"` + IsMRRT bool `json:"isMRRT"` + RefreshToken string `json:"refreshToken"` + Resource string `json:"resource"` + TokenType string `json:"tokenType"` + UserID string `json:"userId"` +} + +const accessTokensJSON = "accessTokens.json" + +// ToADALToken converts an Azure CLI `Token`` to an `adal.Token`` +func (t Token) ToADALToken() (converted adal.Token, err error) { + tokenExpirationDate, err := ParseExpirationDate(t.ExpiresOn) + if err != nil { + err = fmt.Errorf("Error parsing Token Expiration Date %q: %+v", t.ExpiresOn, err) + return + } + + difference := tokenExpirationDate.Sub(date.UnixEpoch()) + + converted = adal.Token{ + AccessToken: t.AccessToken, + Type: t.TokenType, + ExpiresIn: "3600", + ExpiresOn: json.Number(strconv.Itoa(int(difference.Seconds()))), + RefreshToken: t.RefreshToken, + Resource: t.Resource, + } + return +} + +// AccessTokensPath returns the path where access tokens are stored from the Azure CLI +// TODO(#199): add unit test. +func AccessTokensPath() (string, error) { + // Azure-CLI allows user to customize the path of access tokens through environment variable. + if accessTokenPath := os.Getenv("AZURE_ACCESS_TOKEN_FILE"); accessTokenPath != "" { + return accessTokenPath, nil + } + + // Azure-CLI allows user to customize the path to Azure config directory through environment variable. + if cfgDir := configDir(); cfgDir != "" { + return filepath.Join(cfgDir, accessTokensJSON), nil + } + + // Fallback logic to default path on non-cloud-shell environment. + // TODO(#200): remove the dependency on hard-coding path. + return homedir.Expand("~/.azure/" + accessTokensJSON) +} + +// ParseExpirationDate parses either a Azure CLI or CloudShell date into a time object +func ParseExpirationDate(input string) (*time.Time, error) { + // CloudShell (and potentially the Azure CLI in future) + expirationDate, cloudShellErr := time.Parse(time.RFC3339, input) + if cloudShellErr != nil { + // Azure CLI (Python) e.g. 2017-08-31 19:48:57.998857 (plus the local timezone) + const cliFormat = "2006-01-02 15:04:05.999999" + expirationDate, cliErr := time.ParseInLocation(cliFormat, input, time.Local) + if cliErr == nil { + return &expirationDate, nil + } + + return nil, fmt.Errorf("Error parsing expiration date %q.\n\nCloudShell Error: \n%+v\n\nCLI Error:\n%+v", input, cloudShellErr, cliErr) + } + + return &expirationDate, nil +} + +// LoadTokens restores a set of Token objects from a file located at 'path'. +func LoadTokens(path string) ([]Token, error) { + file, err := os.Open(path) + if err != nil { + return nil, fmt.Errorf("failed to open file (%s) while loading token: %v", path, err) + } + defer file.Close() + + var tokens []Token + + dec := json.NewDecoder(file) + if err = dec.Decode(&tokens); err != nil { + return nil, fmt.Errorf("failed to decode contents of file (%s) into a `cli.Token` representation: %v", path, err) + } + + return tokens, nil +} + +// GetTokenFromCLI gets a token using Azure CLI 2.0 for local development scenarios. +func GetTokenFromCLI(resource string) (*Token, error) { + // This is the path that a developer can set to tell this class what the install path for Azure CLI is. + const azureCLIPath = "AzureCLIPath" + + // The default install paths are used to find Azure CLI. This is for security, so that any path in the calling program's Path environment is not used to execute Azure CLI. + azureCLIDefaultPathWindows := fmt.Sprintf("%s\\Microsoft SDKs\\Azure\\CLI2\\wbin; %s\\Microsoft SDKs\\Azure\\CLI2\\wbin", os.Getenv("ProgramFiles(x86)"), os.Getenv("ProgramFiles")) + + // Default path for non-Windows. + const azureCLIDefaultPath = "/bin:/sbin:/usr/bin:/usr/local/bin" + + // Validate resource, since it gets sent as a command line argument to Azure CLI + const invalidResourceErrorTemplate = "Resource %s is not in expected format. Only alphanumeric characters, [dot], [colon], [hyphen], and [forward slash] are allowed." + match, err := regexp.MatchString("^[0-9a-zA-Z-.:/]+$", resource) + if err != nil { + return nil, err + } + if !match { + return nil, fmt.Errorf(invalidResourceErrorTemplate, resource) + } + + // Execute Azure CLI to get token + var cliCmd *exec.Cmd + if runtime.GOOS == "windows" { + cliCmd = exec.Command(fmt.Sprintf("%s\\system32\\cmd.exe", os.Getenv("windir"))) + cliCmd.Env = os.Environ() + cliCmd.Env = append(cliCmd.Env, fmt.Sprintf("PATH=%s;%s", os.Getenv(azureCLIPath), azureCLIDefaultPathWindows)) + cliCmd.Args = append(cliCmd.Args, "/c", "az") + } else { + cliCmd = exec.Command("az") + cliCmd.Env = os.Environ() + cliCmd.Env = append(cliCmd.Env, fmt.Sprintf("PATH=%s:%s", os.Getenv(azureCLIPath), azureCLIDefaultPath)) + } + cliCmd.Args = append(cliCmd.Args, "account", "get-access-token", "-o", "json", "--resource", resource) + + var stderr bytes.Buffer + cliCmd.Stderr = &stderr + + output, err := cliCmd.Output() + if err != nil { + return nil, fmt.Errorf("Invoking Azure CLI failed with the following error: %s", stderr.String()) + } + + tokenResponse := Token{} + err = json.Unmarshal(output, &tokenResponse) + if err != nil { + return nil, err + } + + return &tokenResponse, err +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/azure/environments.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/azure/environments.go index 7e41f7fd9..6c20b8179 100644 --- a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/azure/environments.go +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/azure/environments.go @@ -22,9 +22,14 @@ import ( "strings" ) -// EnvironmentFilepathName captures the name of the environment variable containing the path to the file -// to be used while populating the Azure Environment. -const EnvironmentFilepathName = "AZURE_ENVIRONMENT_FILEPATH" +const ( + // EnvironmentFilepathName captures the name of the environment variable containing the path to the file + // to be used while populating the Azure Environment. + EnvironmentFilepathName = "AZURE_ENVIRONMENT_FILEPATH" + + // NotAvailable is used for endpoints and resource IDs that are not available for a given cloud. + NotAvailable = "N/A" +) var environments = map[string]Environment{ "AZURECHINACLOUD": ChinaCloud, @@ -33,28 +38,40 @@ var environments = map[string]Environment{ "AZUREUSGOVERNMENTCLOUD": USGovernmentCloud, } +// ResourceIdentifier contains a set of Azure resource IDs. +type ResourceIdentifier struct { + Graph string `json:"graph"` + KeyVault string `json:"keyVault"` + Datalake string `json:"datalake"` + Batch string `json:"batch"` + OperationalInsights string `json:"operationalInsights"` + Storage string `json:"storage"` +} + // Environment represents a set of endpoints for each of Azure's Clouds. type Environment struct { - Name string `json:"name"` - ManagementPortalURL string `json:"managementPortalURL"` - PublishSettingsURL string `json:"publishSettingsURL"` - ServiceManagementEndpoint string `json:"serviceManagementEndpoint"` - ResourceManagerEndpoint string `json:"resourceManagerEndpoint"` - ActiveDirectoryEndpoint string `json:"activeDirectoryEndpoint"` - GalleryEndpoint string `json:"galleryEndpoint"` - KeyVaultEndpoint string `json:"keyVaultEndpoint"` - GraphEndpoint string `json:"graphEndpoint"` - ServiceBusEndpoint string `json:"serviceBusEndpoint"` - BatchManagementEndpoint string `json:"batchManagementEndpoint"` - StorageEndpointSuffix string `json:"storageEndpointSuffix"` - SQLDatabaseDNSSuffix string `json:"sqlDatabaseDNSSuffix"` - TrafficManagerDNSSuffix string `json:"trafficManagerDNSSuffix"` - KeyVaultDNSSuffix string `json:"keyVaultDNSSuffix"` - ServiceBusEndpointSuffix string `json:"serviceBusEndpointSuffix"` - ServiceManagementVMDNSSuffix string `json:"serviceManagementVMDNSSuffix"` - ResourceManagerVMDNSSuffix string `json:"resourceManagerVMDNSSuffix"` - ContainerRegistryDNSSuffix string `json:"containerRegistryDNSSuffix"` - TokenAudience string `json:"tokenAudience"` + Name string `json:"name"` + ManagementPortalURL string `json:"managementPortalURL"` + PublishSettingsURL string `json:"publishSettingsURL"` + ServiceManagementEndpoint string `json:"serviceManagementEndpoint"` + ResourceManagerEndpoint string `json:"resourceManagerEndpoint"` + ActiveDirectoryEndpoint string `json:"activeDirectoryEndpoint"` + GalleryEndpoint string `json:"galleryEndpoint"` + KeyVaultEndpoint string `json:"keyVaultEndpoint"` + GraphEndpoint string `json:"graphEndpoint"` + ServiceBusEndpoint string `json:"serviceBusEndpoint"` + BatchManagementEndpoint string `json:"batchManagementEndpoint"` + StorageEndpointSuffix string `json:"storageEndpointSuffix"` + SQLDatabaseDNSSuffix string `json:"sqlDatabaseDNSSuffix"` + TrafficManagerDNSSuffix string `json:"trafficManagerDNSSuffix"` + KeyVaultDNSSuffix string `json:"keyVaultDNSSuffix"` + ServiceBusEndpointSuffix string `json:"serviceBusEndpointSuffix"` + ServiceManagementVMDNSSuffix string `json:"serviceManagementVMDNSSuffix"` + ResourceManagerVMDNSSuffix string `json:"resourceManagerVMDNSSuffix"` + ContainerRegistryDNSSuffix string `json:"containerRegistryDNSSuffix"` + CosmosDBDNSSuffix string `json:"cosmosDBDNSSuffix"` + TokenAudience string `json:"tokenAudience"` + ResourceIdentifiers ResourceIdentifier `json:"resourceIdentifiers"` } var ( @@ -79,7 +96,16 @@ var ( ServiceManagementVMDNSSuffix: "cloudapp.net", ResourceManagerVMDNSSuffix: "cloudapp.azure.com", ContainerRegistryDNSSuffix: "azurecr.io", + CosmosDBDNSSuffix: "documents.azure.com", TokenAudience: "https://management.azure.com/", + ResourceIdentifiers: ResourceIdentifier{ + Graph: "https://graph.windows.net/", + KeyVault: "https://vault.azure.net", + Datalake: "https://datalake.azure.net/", + Batch: "https://batch.core.windows.net/", + OperationalInsights: "https://api.loganalytics.io", + Storage: "https://storage.azure.com/", + }, } // USGovernmentCloud is the cloud environment for the US Government @@ -102,8 +128,17 @@ var ( ServiceBusEndpointSuffix: "servicebus.usgovcloudapi.net", ServiceManagementVMDNSSuffix: "usgovcloudapp.net", ResourceManagerVMDNSSuffix: "cloudapp.windowsazure.us", - ContainerRegistryDNSSuffix: "azurecr.io", + ContainerRegistryDNSSuffix: "azurecr.us", + CosmosDBDNSSuffix: "documents.azure.us", TokenAudience: "https://management.usgovcloudapi.net/", + ResourceIdentifiers: ResourceIdentifier{ + Graph: "https://graph.windows.net/", + KeyVault: "https://vault.usgovcloudapi.net", + Datalake: NotAvailable, + Batch: "https://batch.core.usgovcloudapi.net/", + OperationalInsights: "https://api.loganalytics.us", + Storage: "https://storage.azure.com/", + }, } // ChinaCloud is the cloud environment operated in China @@ -126,8 +161,17 @@ var ( ServiceBusEndpointSuffix: "servicebus.chinacloudapi.cn", ServiceManagementVMDNSSuffix: "chinacloudapp.cn", ResourceManagerVMDNSSuffix: "cloudapp.azure.cn", - ContainerRegistryDNSSuffix: "azurecr.io", + ContainerRegistryDNSSuffix: "azurecr.cn", + CosmosDBDNSSuffix: "documents.azure.cn", TokenAudience: "https://management.chinacloudapi.cn/", + ResourceIdentifiers: ResourceIdentifier{ + Graph: "https://graph.chinacloudapi.cn/", + KeyVault: "https://vault.azure.cn", + Datalake: NotAvailable, + Batch: "https://batch.chinacloudapi.cn/", + OperationalInsights: NotAvailable, + Storage: "https://storage.azure.com/", + }, } // GermanCloud is the cloud environment operated in Germany @@ -150,8 +194,17 @@ var ( ServiceBusEndpointSuffix: "servicebus.cloudapi.de", ServiceManagementVMDNSSuffix: "azurecloudapp.de", ResourceManagerVMDNSSuffix: "cloudapp.microsoftazure.de", - ContainerRegistryDNSSuffix: "azurecr.io", + ContainerRegistryDNSSuffix: NotAvailable, + CosmosDBDNSSuffix: "documents.microsoftazure.de", TokenAudience: "https://management.microsoftazure.de/", + ResourceIdentifiers: ResourceIdentifier{ + Graph: "https://graph.cloudapi.de/", + KeyVault: "https://vault.microsoftazure.de", + Datalake: NotAvailable, + Batch: "https://batch.cloudapi.de/", + OperationalInsights: NotAvailable, + Storage: "https://storage.azure.com/", + }, } ) diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/azure/rp.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/azure/rp.go index 65ad0afc8..c6d39f686 100644 --- a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/azure/rp.go +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/azure/rp.go @@ -47,11 +47,15 @@ func DoRetryWithRegistration(client autorest.Client) autorest.SendDecorator { if resp.StatusCode != http.StatusConflict || client.SkipResourceProviderRegistration { return resp, err } + var re RequestError - err = autorest.Respond( - resp, - autorest.ByUnmarshallingJSON(&re), - ) + if strings.Contains(r.Header.Get("Content-Type"), "xml") { + // XML errors (e.g. Storage Data Plane) only return the inner object + err = autorest.Respond(resp, autorest.ByUnmarshallingXML(&re.ServiceError)) + } else { + err = autorest.Respond(resp, autorest.ByUnmarshallingJSON(&re)) + } + if err != nil { return resp, err } @@ -64,7 +68,7 @@ func DoRetryWithRegistration(client autorest.Client) autorest.SendDecorator { } } } - return resp, fmt.Errorf("failed request: %s", err) + return resp, err }) } } @@ -140,8 +144,8 @@ func register(client autorest.Client, originalReq *http.Request, re RequestError } // poll for registered provisioning state - now := time.Now() - for err == nil && time.Since(now) < client.PollingDuration { + registrationStartTime := time.Now() + for err == nil && (client.PollingDuration == 0 || (client.PollingDuration != 0 && time.Since(registrationStartTime) < client.PollingDuration)) { // taken from the resources SDK // https://github.com/Azure/azure-sdk-for-go/blob/9f366792afa3e0ddaecdc860e793ba9d75e76c27/arm/resources/resources/providers.go#L45 preparer := autorest.CreatePreparer( @@ -183,7 +187,7 @@ func register(client autorest.Client, originalReq *http.Request, re RequestError return originalReq.Context().Err() } } - if !(time.Since(now) < client.PollingDuration) { + if client.PollingDuration != 0 && !(time.Since(registrationStartTime) < client.PollingDuration) { return errors.New("polling for resource provider registration has exceeded the polling duration") } return err diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/client.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/client.go index 4e92dcad0..1c6a0617a 100644 --- a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/client.go +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/client.go @@ -16,14 +16,16 @@ package autorest import ( "bytes" + "crypto/tls" "fmt" "io" "io/ioutil" "log" "net/http" - "net/http/cookiejar" - "runtime" + "strings" "time" + + "github.com/Azure/go-autorest/logger" ) const ( @@ -41,15 +43,6 @@ const ( ) var ( - // defaultUserAgent builds a string containing the Go version, system archityecture and OS, - // and the go-autorest version. - defaultUserAgent = fmt.Sprintf("Go/%s (%s-%s) go-autorest/%s", - runtime.Version(), - runtime.GOARCH, - runtime.GOOS, - Version(), - ) - // StatusCodesForRetry are a defined group of status code for which the client will retry StatusCodesForRetry = []int{ http.StatusRequestTimeout, // 408 @@ -78,6 +71,22 @@ type Response struct { *http.Response `json:"-"` } +// IsHTTPStatus returns true if the returned HTTP status code matches the provided status code. +// If there was no response (i.e. the underlying http.Response is nil) the return value is false. +func (r Response) IsHTTPStatus(statusCode int) bool { + if r.Response == nil { + return false + } + return r.Response.StatusCode == statusCode +} + +// HasHTTPStatus returns true if the returned HTTP status code matches one of the provided status codes. +// If there was no response (i.e. the underlying http.Response is nil) or not status codes are provided +// the return value is false. +func (r Response) HasHTTPStatus(statusCodes ...int) bool { + return ResponseHasStatusCode(r.Response, statusCodes...) +} + // LoggingInspector implements request and response inspectors that log the full request and // response to a supplied log. type LoggingInspector struct { @@ -153,6 +162,7 @@ type Client struct { PollingDelay time.Duration // PollingDuration sets the maximum polling time after which an error is returned. + // Setting this to zero will use the provided context to control the duration. PollingDuration time.Duration // RetryAttempts sets the default number of retry attempts for client. @@ -174,14 +184,32 @@ type Client struct { // NewClientWithUserAgent returns an instance of a Client with the UserAgent set to the passed // string. func NewClientWithUserAgent(ua string) Client { + return newClient(ua, tls.RenegotiateNever) +} + +// ClientOptions contains various Client configuration options. +type ClientOptions struct { + // UserAgent is an optional user-agent string to append to the default user agent. + UserAgent string + + // Renegotiation is an optional setting to control client-side TLS renegotiation. + Renegotiation tls.RenegotiationSupport +} + +// NewClientWithOptions returns an instance of a Client with the specified values. +func NewClientWithOptions(options ClientOptions) Client { + return newClient(options.UserAgent, options.Renegotiation) +} + +func newClient(ua string, renegotiation tls.RenegotiationSupport) Client { c := Client{ PollingDelay: DefaultPollingDelay, PollingDuration: DefaultPollingDuration, RetryAttempts: DefaultRetryAttempts, RetryDuration: DefaultRetryDuration, - UserAgent: defaultUserAgent, + UserAgent: UserAgent(), } - c.Sender = c.sender() + c.Sender = c.sender(renegotiation) c.AddToUserAgent(ua) return c } @@ -216,17 +244,25 @@ func (c Client) Do(r *http.Request) (*http.Response, error) { } return resp, NewErrorWithError(err, "autorest/Client", "Do", nil, "Preparing request failed") } - - resp, err := SendWithSender(c.sender(), r) + logger.Instance.WriteRequest(r, logger.Filter{ + Header: func(k string, v []string) (bool, []string) { + // remove the auth token from the log + if strings.EqualFold(k, "Authorization") || strings.EqualFold(k, "Ocp-Apim-Subscription-Key") { + v = []string{"**REDACTED**"} + } + return true, v + }, + }) + resp, err := SendWithSender(c.sender(tls.RenegotiateNever), r) + logger.Instance.WriteResponse(resp, logger.Filter{}) Respond(resp, c.ByInspecting()) return resp, err } // sender returns the Sender to which to send requests. -func (c Client) sender() Sender { +func (c Client) sender(renengotiation tls.RenegotiationSupport) Sender { if c.Sender == nil { - j, _ := cookiejar.New(nil) - return &http.Client{Jar: j} + return sender(renengotiation) } return c.Sender } diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/date/go.mod b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/date/go.mod new file mode 100644 index 000000000..3adc4804c --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/date/go.mod @@ -0,0 +1,5 @@ +module github.com/Azure/go-autorest/autorest/date + +go 1.12 + +require github.com/Azure/go-autorest/autorest v0.9.0 diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/date/go.sum b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/date/go.sum new file mode 100644 index 000000000..9e2ee7a94 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/date/go.sum @@ -0,0 +1,16 @@ +github.com/Azure/go-autorest/autorest v0.9.0 h1:MRvx8gncNaXJqOoLmhNjUAKh33JJF8LyxPhomEtOsjs= +github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest/adal v0.5.0 h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0 h1:Ww5g4zThfD/6cLb4z6xxgeyDa7QDkizMkJKe0ysZXp0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k= +github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/date/go_mod_tidy_hack.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/date/go_mod_tidy_hack.go new file mode 100644 index 000000000..55adf930f --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/date/go_mod_tidy_hack.go @@ -0,0 +1,24 @@ +// +build modhack + +package date + +// Copyright 2017 Microsoft Corporation +// +// 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. + +// This file, and the github.com/Azure/go-autorest/autorest import, won't actually become part of +// the resultant binary. + +// Necessary for safely adding multi-module repo. +// See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository +import _ "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/go.mod b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/go.mod new file mode 100644 index 000000000..ab2ae66ac --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/go.mod @@ -0,0 +1,11 @@ +module github.com/Azure/go-autorest/autorest + +go 1.12 + +require ( + github.com/Azure/go-autorest/autorest/adal v0.5.0 + github.com/Azure/go-autorest/autorest/mocks v0.2.0 + github.com/Azure/go-autorest/logger v0.1.0 + github.com/Azure/go-autorest/tracing v0.5.0 + golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/go.sum b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/go.sum new file mode 100644 index 000000000..729b99cd0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/go.sum @@ -0,0 +1,18 @@ +github.com/Azure/go-autorest/autorest/adal v0.5.0 h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/date v0.1.0 h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM= +github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/mocks v0.1.0 h1:Kx+AUU2Te+A3JIyYn6Dfs+cFgx5XorQKuIXrZGoq/SI= +github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0 h1:Ww5g4zThfD/6cLb4z6xxgeyDa7QDkizMkJKe0ysZXp0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k= +github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/preparer.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/preparer.go index 6d67bd733..6e8ed64eb 100644 --- a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/preparer.go +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/preparer.go @@ -16,7 +16,9 @@ package autorest import ( "bytes" + "context" "encoding/json" + "encoding/xml" "fmt" "io" "io/ioutil" @@ -31,11 +33,33 @@ const ( mimeTypeOctetStream = "application/octet-stream" mimeTypeFormPost = "application/x-www-form-urlencoded" - headerAuthorization = "Authorization" - headerContentType = "Content-Type" - headerUserAgent = "User-Agent" + headerAuthorization = "Authorization" + headerAuxAuthorization = "x-ms-authorization-auxiliary" + headerContentType = "Content-Type" + headerUserAgent = "User-Agent" ) +// used as a key type in context.WithValue() +type ctxPrepareDecorators struct{} + +// WithPrepareDecorators adds the specified PrepareDecorators to the provided context. +// If no PrepareDecorators are provided the context is unchanged. +func WithPrepareDecorators(ctx context.Context, prepareDecorator []PrepareDecorator) context.Context { + if len(prepareDecorator) == 0 { + return ctx + } + return context.WithValue(ctx, ctxPrepareDecorators{}, prepareDecorator) +} + +// GetPrepareDecorators returns the PrepareDecorators in the provided context or the provided default PrepareDecorators. +func GetPrepareDecorators(ctx context.Context, defaultPrepareDecorators ...PrepareDecorator) []PrepareDecorator { + inCtx := ctx.Value(ctxPrepareDecorators{}) + if pd, ok := inCtx.([]PrepareDecorator); ok { + return pd + } + return defaultPrepareDecorators +} + // Preparer is the interface that wraps the Prepare method. // // Prepare accepts and possibly modifies an http.Request (e.g., adding Headers). Implementations @@ -190,6 +214,9 @@ func AsGet() PrepareDecorator { return WithMethod("GET") } // AsHead returns a PrepareDecorator that sets the HTTP method to HEAD. func AsHead() PrepareDecorator { return WithMethod("HEAD") } +// AsMerge returns a PrepareDecorator that sets the HTTP method to MERGE. +func AsMerge() PrepareDecorator { return WithMethod("MERGE") } + // AsOptions returns a PrepareDecorator that sets the HTTP method to OPTIONS. func AsOptions() PrepareDecorator { return WithMethod("OPTIONS") } @@ -225,6 +252,25 @@ func WithBaseURL(baseURL string) PrepareDecorator { } } +// WithBytes returns a PrepareDecorator that takes a list of bytes +// which passes the bytes directly to the body +func WithBytes(input *[]byte) PrepareDecorator { + return func(p Preparer) Preparer { + return PreparerFunc(func(r *http.Request) (*http.Request, error) { + r, err := p.Prepare(r) + if err == nil { + if input == nil { + return r, fmt.Errorf("Input Bytes was nil") + } + + r.ContentLength = int64(len(*input)) + r.Body = ioutil.NopCloser(bytes.NewReader(*input)) + } + return r, err + }) + } +} + // WithCustomBaseURL returns a PrepareDecorator that replaces brace-enclosed keys within the // request base URL (i.e., http.Request.URL) with the corresponding values from the passed map. func WithCustomBaseURL(baseURL string, urlParameters map[string]interface{}) PrepareDecorator { @@ -377,6 +423,28 @@ func WithJSON(v interface{}) PrepareDecorator { } } +// WithXML returns a PrepareDecorator that encodes the data passed as XML into the body of the +// request and sets the Content-Length header. +func WithXML(v interface{}) PrepareDecorator { + return func(p Preparer) Preparer { + return PreparerFunc(func(r *http.Request) (*http.Request, error) { + r, err := p.Prepare(r) + if err == nil { + b, err := xml.Marshal(v) + if err == nil { + // we have to tack on an XML header + withHeader := xml.Header + string(b) + bytesWithHeader := []byte(withHeader) + + r.ContentLength = int64(len(bytesWithHeader)) + r.Body = ioutil.NopCloser(bytes.NewReader(bytesWithHeader)) + } + } + return r, err + }) + } +} + // WithPath returns a PrepareDecorator that adds the supplied path to the request URL. If the path // is absolute (that is, it begins with a "/"), it replaces the existing path. func WithPath(path string) PrepareDecorator { @@ -455,7 +523,7 @@ func parseURL(u *url.URL, path string) (*url.URL, error) { // WithQueryParameters returns a PrepareDecorators that encodes and applies the query parameters // given in the supplied map (i.e., key=value). func WithQueryParameters(queryParameters map[string]interface{}) PrepareDecorator { - parameters := ensureValueStrings(queryParameters) + parameters := MapToValues(queryParameters) return func(p Preparer) Preparer { return PreparerFunc(func(r *http.Request) (*http.Request, error) { r, err := p.Prepare(r) @@ -463,14 +531,16 @@ func WithQueryParameters(queryParameters map[string]interface{}) PrepareDecorato if r.URL == nil { return r, NewError("autorest", "WithQueryParameters", "Invoked with a nil URL") } - v := r.URL.Query() for key, value := range parameters { - d, err := url.QueryUnescape(value) - if err != nil { - return r, err + for i := range value { + d, err := url.QueryUnescape(value[i]) + if err != nil { + return r, err + } + value[i] = d } - v.Add(key, d) + v[key] = value } r.URL.RawQuery = v.Encode() } diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/responder.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/responder.go index a908a0adb..349e1963a 100644 --- a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/responder.go +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/responder.go @@ -153,6 +153,25 @@ func ByClosingIfError() RespondDecorator { } } +// ByUnmarshallingBytes returns a RespondDecorator that copies the Bytes returned in the +// response Body into the value pointed to by v. +func ByUnmarshallingBytes(v *[]byte) RespondDecorator { + return func(r Responder) Responder { + return ResponderFunc(func(resp *http.Response) error { + err := r.Respond(resp) + if err == nil { + bytes, errInner := ioutil.ReadAll(resp.Body) + if errInner != nil { + err = fmt.Errorf("Error occurred reading http.Response#Body - Error = '%v'", errInner) + } else { + *v = bytes + } + } + return err + }) + } +} + // ByUnmarshallingJSON returns a RespondDecorator that decodes a JSON document returned in the // response Body into the value pointed to by v. func ByUnmarshallingJSON(v interface{}) RespondDecorator { diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/sender.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/sender.go index b4f762325..5e595d7b1 100644 --- a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/sender.go +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/sender.go @@ -15,14 +15,40 @@ package autorest // limitations under the License. import ( + "context" + "crypto/tls" "fmt" "log" "math" "net/http" + "net/http/cookiejar" "strconv" "time" + + "github.com/Azure/go-autorest/tracing" ) +// used as a key type in context.WithValue() +type ctxSendDecorators struct{} + +// WithSendDecorators adds the specified SendDecorators to the provided context. +// If no SendDecorators are provided the context is unchanged. +func WithSendDecorators(ctx context.Context, sendDecorator []SendDecorator) context.Context { + if len(sendDecorator) == 0 { + return ctx + } + return context.WithValue(ctx, ctxSendDecorators{}, sendDecorator) +} + +// GetSendDecorators returns the SendDecorators in the provided context or the provided default SendDecorators. +func GetSendDecorators(ctx context.Context, defaultSendDecorators ...SendDecorator) []SendDecorator { + inCtx := ctx.Value(ctxSendDecorators{}) + if sd, ok := inCtx.([]SendDecorator); ok { + return sd + } + return defaultSendDecorators +} + // Sender is the interface that wraps the Do method to send HTTP requests. // // The standard http.Client conforms to this interface. @@ -38,14 +64,14 @@ func (sf SenderFunc) Do(r *http.Request) (*http.Response, error) { return sf(r) } -// SendDecorator takes and possibily decorates, by wrapping, a Sender. Decorators may affect the +// SendDecorator takes and possibly decorates, by wrapping, a Sender. Decorators may affect the // http.Request and pass it along or, first, pass the http.Request along then react to the // http.Response result. type SendDecorator func(Sender) Sender // CreateSender creates, decorates, and returns, as a Sender, the default http.Client. func CreateSender(decorators ...SendDecorator) Sender { - return DecorateSender(&http.Client{}, decorators...) + return DecorateSender(sender(tls.RenegotiateNever), decorators...) } // DecorateSender accepts a Sender and a, possibly empty, set of SendDecorators, which is applies to @@ -68,7 +94,7 @@ func DecorateSender(s Sender, decorators ...SendDecorator) Sender { // // Send will not poll or retry requests. func Send(r *http.Request, decorators ...SendDecorator) (*http.Response, error) { - return SendWithSender(&http.Client{}, r, decorators...) + return SendWithSender(sender(tls.RenegotiateNever), r, decorators...) } // SendWithSender sends the passed http.Request, through the provided Sender, returning the @@ -80,6 +106,29 @@ func SendWithSender(s Sender, r *http.Request, decorators ...SendDecorator) (*ht return DecorateSender(s, decorators...).Do(r) } +func sender(renengotiation tls.RenegotiationSupport) Sender { + // Use behaviour compatible with DefaultTransport, but require TLS minimum version. + defaultTransport := http.DefaultTransport.(*http.Transport) + transport := &http.Transport{ + Proxy: defaultTransport.Proxy, + DialContext: defaultTransport.DialContext, + MaxIdleConns: defaultTransport.MaxIdleConns, + IdleConnTimeout: defaultTransport.IdleConnTimeout, + TLSHandshakeTimeout: defaultTransport.TLSHandshakeTimeout, + ExpectContinueTimeout: defaultTransport.ExpectContinueTimeout, + TLSClientConfig: &tls.Config{ + MinVersion: tls.VersionTLS12, + Renegotiation: renengotiation, + }, + } + var roundTripper http.RoundTripper = transport + if tracing.IsEnabled() { + roundTripper = tracing.NewTransport(transport) + } + j, _ := cookiejar.New(nil) + return &http.Client{Jar: j, Transport: roundTripper} +} + // AfterDelay returns a SendDecorator that delays for the passed time.Duration before // invoking the Sender. The delay may be terminated by closing the optional channel on the // http.Request. If canceled, no further Senders are invoked. @@ -209,50 +258,73 @@ func DoRetryForAttempts(attempts int, backoff time.Duration) SendDecorator { // DoRetryForStatusCodes returns a SendDecorator that retries for specified statusCodes for up to the specified // number of attempts, exponentially backing off between requests using the supplied backoff -// time.Duration (which may be zero). Retrying may be canceled by closing the optional channel on -// the http.Request. +// time.Duration (which may be zero). Retrying may be canceled by cancelling the context on the http.Request. +// NOTE: Code http.StatusTooManyRequests (429) will *not* be counted against the number of attempts. func DoRetryForStatusCodes(attempts int, backoff time.Duration, codes ...int) SendDecorator { return func(s Sender) Sender { - return SenderFunc(func(r *http.Request) (resp *http.Response, err error) { - rr := NewRetriableRequest(r) - // Increment to add the first call (attempts denotes number of retries) - attempts++ - for attempt := 0; attempt < attempts; { - err = rr.Prepare() - if err != nil { - return resp, err - } - resp, err = s.Do(rr.Request()) - // we want to retry if err is not nil (e.g. transient network failure). note that for failed authentication - // resp and err will both have a value, so in this case we don't want to retry as it will never succeed. - if err == nil && !ResponseHasStatusCode(resp, codes...) || IsTokenRefreshError(err) { - return resp, err - } - delayed := DelayWithRetryAfter(resp, r.Context().Done()) - if !delayed && !DelayForBackoff(backoff, attempt, r.Context().Done()) { - return nil, r.Context().Err() - } - // don't count a 429 against the number of attempts - // so that we continue to retry until it succeeds - if resp == nil || resp.StatusCode != http.StatusTooManyRequests { - attempt++ - } - } - return resp, err + return SenderFunc(func(r *http.Request) (*http.Response, error) { + return doRetryForStatusCodesImpl(s, r, false, attempts, backoff, 0, codes...) }) } } -// DelayWithRetryAfter invokes time.After for the duration specified in the "Retry-After" header in -// responses with status code 429 +// DoRetryForStatusCodesWithCap returns a SendDecorator that retries for specified statusCodes for up to the +// specified number of attempts, exponentially backing off between requests using the supplied backoff +// time.Duration (which may be zero). To cap the maximum possible delay between iterations specify a value greater +// than zero for cap. Retrying may be canceled by cancelling the context on the http.Request. +func DoRetryForStatusCodesWithCap(attempts int, backoff, cap time.Duration, codes ...int) SendDecorator { + return func(s Sender) Sender { + return SenderFunc(func(r *http.Request) (*http.Response, error) { + return doRetryForStatusCodesImpl(s, r, true, attempts, backoff, cap, codes...) + }) + } +} + +func doRetryForStatusCodesImpl(s Sender, r *http.Request, count429 bool, attempts int, backoff, cap time.Duration, codes ...int) (resp *http.Response, err error) { + rr := NewRetriableRequest(r) + // Increment to add the first call (attempts denotes number of retries) + for attempt := 0; attempt < attempts+1; { + err = rr.Prepare() + if err != nil { + return + } + resp, err = s.Do(rr.Request()) + // we want to retry if err is not nil (e.g. transient network failure). note that for failed authentication + // resp and err will both have a value, so in this case we don't want to retry as it will never succeed. + if err == nil && !ResponseHasStatusCode(resp, codes...) || IsTokenRefreshError(err) { + return resp, err + } + delayed := DelayWithRetryAfter(resp, r.Context().Done()) + if !delayed && !DelayForBackoffWithCap(backoff, cap, attempt, r.Context().Done()) { + return resp, r.Context().Err() + } + // when count429 == false don't count a 429 against the number + // of attempts so that we continue to retry until it succeeds + if count429 || (resp == nil || resp.StatusCode != http.StatusTooManyRequests) { + attempt++ + } + } + return resp, err +} + +// DelayWithRetryAfter invokes time.After for the duration specified in the "Retry-After" header. +// The value of Retry-After can be either the number of seconds or a date in RFC1123 format. +// The function returns true after successfully waiting for the specified duration. If there is +// no Retry-After header or the wait is cancelled the return value is false. func DelayWithRetryAfter(resp *http.Response, cancel <-chan struct{}) bool { if resp == nil { return false } - retryAfter, _ := strconv.Atoi(resp.Header.Get("Retry-After")) - if resp.StatusCode == http.StatusTooManyRequests && retryAfter > 0 { + var dur time.Duration + ra := resp.Header.Get("Retry-After") + if retryAfter, _ := strconv.Atoi(ra); retryAfter > 0 { + dur = time.Duration(retryAfter) * time.Second + } else if t, err := time.Parse(time.RFC1123, ra); err == nil { + dur = t.Sub(time.Now()) + } + if dur > 0 { select { - case <-time.After(time.Duration(retryAfter) * time.Second): + case <-time.After(dur): return true case <-cancel: return false @@ -312,8 +384,22 @@ func WithLogging(logger *log.Logger) SendDecorator { // Note: Passing attempt 1 will result in doubling "backoff" duration. Treat this as a zero-based attempt // count. func DelayForBackoff(backoff time.Duration, attempt int, cancel <-chan struct{}) bool { + return DelayForBackoffWithCap(backoff, 0, attempt, cancel) +} + +// DelayForBackoffWithCap invokes time.After for the supplied backoff duration raised to the power of +// passed attempt (i.e., an exponential backoff delay). Backoff duration is in seconds and can set +// to zero for no delay. To cap the maximum possible delay specify a value greater than zero for cap. +// The delay may be canceled by closing the passed channel. If terminated early, returns false. +// Note: Passing attempt 1 will result in doubling "backoff" duration. Treat this as a zero-based attempt +// count. +func DelayForBackoffWithCap(backoff, cap time.Duration, attempt int, cancel <-chan struct{}) bool { + d := time.Duration(backoff.Seconds()*math.Pow(2, float64(attempt))) * time.Second + if cap > 0 && d > cap { + d = cap + } select { - case <-time.After(time.Duration(backoff.Seconds()*math.Pow(2, float64(attempt))) * time.Second): + case <-time.After(d): return true case <-cancel: return false diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/to/convert.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/to/convert.go index fdda2ce1a..86694bd25 100644 --- a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/to/convert.go +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/to/convert.go @@ -145,3 +145,8 @@ func Float64(i *float64) float64 { func Float64Ptr(i float64) *float64 { return &i } + +// ByteSlicePtr returns a pointer to the passed byte slice. +func ByteSlicePtr(b []byte) *[]byte { + return &b +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/to/go.mod b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/to/go.mod new file mode 100644 index 000000000..48fd8c6e5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/to/go.mod @@ -0,0 +1,5 @@ +module github.com/Azure/go-autorest/autorest/to + +go 1.12 + +require github.com/Azure/go-autorest/autorest v0.9.0 diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/to/go.sum b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/to/go.sum new file mode 100644 index 000000000..d7ee6b462 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/to/go.sum @@ -0,0 +1,17 @@ +github.com/Azure/go-autorest/autorest v0.9.0 h1:MRvx8gncNaXJqOoLmhNjUAKh33JJF8LyxPhomEtOsjs= +github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest/adal v0.5.0 h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/date v0.1.0 h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM= +github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0 h1:Ww5g4zThfD/6cLb4z6xxgeyDa7QDkizMkJKe0ysZXp0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k= +github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/to/go_mod_tidy_hack.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/to/go_mod_tidy_hack.go new file mode 100644 index 000000000..8e8292107 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/to/go_mod_tidy_hack.go @@ -0,0 +1,24 @@ +// +build modhack + +package to + +// Copyright 2017 Microsoft Corporation +// +// 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. + +// This file, and the github.com/Azure/go-autorest/autorest import, won't actually become part of +// the resultant binary. + +// Necessary for safely adding multi-module repo. +// See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository +import _ "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/utility.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/utility.go index afb3e4e16..08cf11c11 100644 --- a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/utility.go +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/utility.go @@ -20,6 +20,7 @@ import ( "encoding/xml" "fmt" "io" + "net" "net/http" "net/url" "reflect" @@ -156,7 +157,7 @@ func AsStringSlice(s interface{}) ([]string, error) { } // String method converts interface v to string. If interface is a list, it -// joins list elements using the seperator. Note that only sep[0] will be used for +// joins list elements using the separator. Note that only sep[0] will be used for // joining if any separator is specified. func String(v interface{}, sep ...string) string { if len(sep) == 0 { @@ -216,3 +217,12 @@ func IsTokenRefreshError(err error) bool { } return false } + +// IsTemporaryNetworkError returns true if the specified error is a temporary network error or false +// if it's not. If the error doesn't implement the net.Error interface the return value is true. +func IsTemporaryNetworkError(err error) bool { + if netErr, ok := err.(net.Error); !ok || (ok && netErr.Temporary()) { + return true + } + return false +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/validation/go.mod b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/validation/go.mod new file mode 100644 index 000000000..b3f9b6a09 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/validation/go.mod @@ -0,0 +1,8 @@ +module github.com/Azure/go-autorest/autorest/validation + +go 1.12 + +require ( + github.com/Azure/go-autorest/autorest v0.9.0 + github.com/stretchr/testify v1.3.0 +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/validation/go.sum b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/validation/go.sum new file mode 100644 index 000000000..6b9010a73 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/validation/go.sum @@ -0,0 +1,24 @@ +github.com/Azure/go-autorest/autorest v0.9.0 h1:MRvx8gncNaXJqOoLmhNjUAKh33JJF8LyxPhomEtOsjs= +github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest/adal v0.5.0 h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/date v0.1.0 h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM= +github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0 h1:Ww5g4zThfD/6cLb4z6xxgeyDa7QDkizMkJKe0ysZXp0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k= +github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/validation/go_mod_tidy_hack.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/validation/go_mod_tidy_hack.go new file mode 100644 index 000000000..2b2668581 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/validation/go_mod_tidy_hack.go @@ -0,0 +1,24 @@ +// +build modhack + +package validation + +// Copyright 2017 Microsoft Corporation +// +// 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. + +// This file, and the github.com/Azure/go-autorest/autorest import, won't actually become part of +// the resultant binary. + +// Necessary for safely adding multi-module repo. +// See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository +import _ "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/validation/validation.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/validation/validation.go index d886e0b3f..65899b69b 100644 --- a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/validation/validation.go +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/validation/validation.go @@ -136,29 +136,29 @@ func validatePtr(x reflect.Value, v Constraint) error { func validateInt(x reflect.Value, v Constraint) error { i := x.Int() - r, ok := v.Rule.(int) + r, ok := toInt64(v.Rule) if !ok { return createError(x, v, fmt.Sprintf("rule must be integer value for %v constraint; got: %v", v.Name, v.Rule)) } switch v.Name { case MultipleOf: - if i%int64(r) != 0 { + if i%r != 0 { return createError(x, v, fmt.Sprintf("value must be a multiple of %v", r)) } case ExclusiveMinimum: - if i <= int64(r) { + if i <= r { return createError(x, v, fmt.Sprintf("value must be greater than %v", r)) } case ExclusiveMaximum: - if i >= int64(r) { + if i >= r { return createError(x, v, fmt.Sprintf("value must be less than %v", r)) } case InclusiveMinimum: - if i < int64(r) { + if i < r { return createError(x, v, fmt.Sprintf("value must be greater than or equal to %v", r)) } case InclusiveMaximum: - if i > int64(r) { + if i > r { return createError(x, v, fmt.Sprintf("value must be less than or equal to %v", r)) } default: @@ -388,10 +388,13 @@ func createError(x reflect.Value, v Constraint, err string) error { v.Target, v.Name, getInterfaceValue(x), err) } -// NewErrorWithValidationError appends package type and method name in -// validation error. -// -// Deprecated: Please use validation.NewError() instead. -func NewErrorWithValidationError(err error, packageType, method string) error { - return NewError(packageType, method, err.Error()) +func toInt64(v interface{}) (int64, bool) { + if i64, ok := v.(int64); ok { + return i64, true + } + // older generators emit max constants as int, so if int64 fails fall back to int + if i32, ok := v.(int); ok { + return int64(i32), true + } + return 0, false } diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/version.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/version.go index efa7d8e12..56a29b2c5 100644 --- a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/version.go +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/autorest/version.go @@ -14,7 +14,28 @@ package autorest // See the License for the specific language governing permissions and // limitations under the License. +import ( + "fmt" + "runtime" +) + +const number = "v13.3.0" + +var ( + userAgent = fmt.Sprintf("Go/%s (%s-%s) go-autorest/%s", + runtime.Version(), + runtime.GOARCH, + runtime.GOOS, + number, + ) +) + +// UserAgent returns a string containing the Go version, system architecture and OS, and the go-autorest version. +func UserAgent() string { + return userAgent +} + // Version returns the semantic version (see http://semver.org). func Version() string { - return "v10.7.0" + return number } diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/logger/go.mod b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/logger/go.mod new file mode 100644 index 000000000..f22ed56bc --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/logger/go.mod @@ -0,0 +1,3 @@ +module github.com/Azure/go-autorest/logger + +go 1.12 diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/logger/logger.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/logger/logger.go new file mode 100644 index 000000000..da09f394c --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/logger/logger.go @@ -0,0 +1,328 @@ +package logger + +// Copyright 2017 Microsoft Corporation +// +// 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. + +import ( + "bytes" + "fmt" + "io" + "io/ioutil" + "net/http" + "net/url" + "os" + "strings" + "sync" + "time" +) + +// LevelType tells a logger the minimum level to log. When code reports a log entry, +// the LogLevel indicates the level of the log entry. The logger only records entries +// whose level is at least the level it was told to log. See the Log* constants. +// For example, if a logger is configured with LogError, then LogError, LogPanic, +// and LogFatal entries will be logged; lower level entries are ignored. +type LevelType uint32 + +const ( + // LogNone tells a logger not to log any entries passed to it. + LogNone LevelType = iota + + // LogFatal tells a logger to log all LogFatal entries passed to it. + LogFatal + + // LogPanic tells a logger to log all LogPanic and LogFatal entries passed to it. + LogPanic + + // LogError tells a logger to log all LogError, LogPanic and LogFatal entries passed to it. + LogError + + // LogWarning tells a logger to log all LogWarning, LogError, LogPanic and LogFatal entries passed to it. + LogWarning + + // LogInfo tells a logger to log all LogInfo, LogWarning, LogError, LogPanic and LogFatal entries passed to it. + LogInfo + + // LogDebug tells a logger to log all LogDebug, LogInfo, LogWarning, LogError, LogPanic and LogFatal entries passed to it. + LogDebug +) + +const ( + logNone = "NONE" + logFatal = "FATAL" + logPanic = "PANIC" + logError = "ERROR" + logWarning = "WARNING" + logInfo = "INFO" + logDebug = "DEBUG" + logUnknown = "UNKNOWN" +) + +// ParseLevel converts the specified string into the corresponding LevelType. +func ParseLevel(s string) (lt LevelType, err error) { + switch strings.ToUpper(s) { + case logFatal: + lt = LogFatal + case logPanic: + lt = LogPanic + case logError: + lt = LogError + case logWarning: + lt = LogWarning + case logInfo: + lt = LogInfo + case logDebug: + lt = LogDebug + default: + err = fmt.Errorf("bad log level '%s'", s) + } + return +} + +// String implements the stringer interface for LevelType. +func (lt LevelType) String() string { + switch lt { + case LogNone: + return logNone + case LogFatal: + return logFatal + case LogPanic: + return logPanic + case LogError: + return logError + case LogWarning: + return logWarning + case LogInfo: + return logInfo + case LogDebug: + return logDebug + default: + return logUnknown + } +} + +// Filter defines functions for filtering HTTP request/response content. +type Filter struct { + // URL returns a potentially modified string representation of a request URL. + URL func(u *url.URL) string + + // Header returns a potentially modified set of values for the specified key. + // To completely exclude the header key/values return false. + Header func(key string, val []string) (bool, []string) + + // Body returns a potentially modified request/response body. + Body func(b []byte) []byte +} + +func (f Filter) processURL(u *url.URL) string { + if f.URL == nil { + return u.String() + } + return f.URL(u) +} + +func (f Filter) processHeader(k string, val []string) (bool, []string) { + if f.Header == nil { + return true, val + } + return f.Header(k, val) +} + +func (f Filter) processBody(b []byte) []byte { + if f.Body == nil { + return b + } + return f.Body(b) +} + +// Writer defines methods for writing to a logging facility. +type Writer interface { + // Writeln writes the specified message with the standard log entry header and new-line character. + Writeln(level LevelType, message string) + + // Writef writes the specified format specifier with the standard log entry header and no new-line character. + Writef(level LevelType, format string, a ...interface{}) + + // WriteRequest writes the specified HTTP request to the logger if the log level is greater than + // or equal to LogInfo. The request body, if set, is logged at level LogDebug or higher. + // Custom filters can be specified to exclude URL, header, and/or body content from the log. + // By default no request content is excluded. + WriteRequest(req *http.Request, filter Filter) + + // WriteResponse writes the specified HTTP response to the logger if the log level is greater than + // or equal to LogInfo. The response body, if set, is logged at level LogDebug or higher. + // Custom filters can be specified to exclude URL, header, and/or body content from the log. + // By default no response content is excluded. + WriteResponse(resp *http.Response, filter Filter) +} + +// Instance is the default log writer initialized during package init. +// This can be replaced with a custom implementation as required. +var Instance Writer + +// default log level +var logLevel = LogNone + +// Level returns the value specified in AZURE_GO_AUTOREST_LOG_LEVEL. +// If no value was specified the default value is LogNone. +// Custom loggers can call this to retrieve the configured log level. +func Level() LevelType { + return logLevel +} + +func init() { + // separated for testing purposes + initDefaultLogger() +} + +func initDefaultLogger() { + // init with nilLogger so callers don't have to do a nil check on Default + Instance = nilLogger{} + llStr := strings.ToLower(os.Getenv("AZURE_GO_SDK_LOG_LEVEL")) + if llStr == "" { + return + } + var err error + logLevel, err = ParseLevel(llStr) + if err != nil { + fmt.Fprintf(os.Stderr, "go-autorest: failed to parse log level: %s\n", err.Error()) + return + } + if logLevel == LogNone { + return + } + // default to stderr + dest := os.Stderr + lfStr := os.Getenv("AZURE_GO_SDK_LOG_FILE") + if strings.EqualFold(lfStr, "stdout") { + dest = os.Stdout + } else if lfStr != "" { + lf, err := os.Create(lfStr) + if err == nil { + dest = lf + } else { + fmt.Fprintf(os.Stderr, "go-autorest: failed to create log file, using stderr: %s\n", err.Error()) + } + } + Instance = fileLogger{ + logLevel: logLevel, + mu: &sync.Mutex{}, + logFile: dest, + } +} + +// the nil logger does nothing +type nilLogger struct{} + +func (nilLogger) Writeln(LevelType, string) {} + +func (nilLogger) Writef(LevelType, string, ...interface{}) {} + +func (nilLogger) WriteRequest(*http.Request, Filter) {} + +func (nilLogger) WriteResponse(*http.Response, Filter) {} + +// A File is used instead of a Logger so the stream can be flushed after every write. +type fileLogger struct { + logLevel LevelType + mu *sync.Mutex // for synchronizing writes to logFile + logFile *os.File +} + +func (fl fileLogger) Writeln(level LevelType, message string) { + fl.Writef(level, "%s\n", message) +} + +func (fl fileLogger) Writef(level LevelType, format string, a ...interface{}) { + if fl.logLevel >= level { + fl.mu.Lock() + defer fl.mu.Unlock() + fmt.Fprintf(fl.logFile, "%s %s", entryHeader(level), fmt.Sprintf(format, a...)) + fl.logFile.Sync() + } +} + +func (fl fileLogger) WriteRequest(req *http.Request, filter Filter) { + if req == nil || fl.logLevel < LogInfo { + return + } + b := &bytes.Buffer{} + fmt.Fprintf(b, "%s REQUEST: %s %s\n", entryHeader(LogInfo), req.Method, filter.processURL(req.URL)) + // dump headers + for k, v := range req.Header { + if ok, mv := filter.processHeader(k, v); ok { + fmt.Fprintf(b, "%s: %s\n", k, strings.Join(mv, ",")) + } + } + if fl.shouldLogBody(req.Header, req.Body) { + // dump body + body, err := ioutil.ReadAll(req.Body) + if err == nil { + fmt.Fprintln(b, string(filter.processBody(body))) + if nc, ok := req.Body.(io.Seeker); ok { + // rewind to the beginning + nc.Seek(0, io.SeekStart) + } else { + // recreate the body + req.Body = ioutil.NopCloser(bytes.NewReader(body)) + } + } else { + fmt.Fprintf(b, "failed to read body: %v\n", err) + } + } + fl.mu.Lock() + defer fl.mu.Unlock() + fmt.Fprint(fl.logFile, b.String()) + fl.logFile.Sync() +} + +func (fl fileLogger) WriteResponse(resp *http.Response, filter Filter) { + if resp == nil || fl.logLevel < LogInfo { + return + } + b := &bytes.Buffer{} + fmt.Fprintf(b, "%s RESPONSE: %d %s\n", entryHeader(LogInfo), resp.StatusCode, filter.processURL(resp.Request.URL)) + // dump headers + for k, v := range resp.Header { + if ok, mv := filter.processHeader(k, v); ok { + fmt.Fprintf(b, "%s: %s\n", k, strings.Join(mv, ",")) + } + } + if fl.shouldLogBody(resp.Header, resp.Body) { + // dump body + defer resp.Body.Close() + body, err := ioutil.ReadAll(resp.Body) + if err == nil { + fmt.Fprintln(b, string(filter.processBody(body))) + resp.Body = ioutil.NopCloser(bytes.NewReader(body)) + } else { + fmt.Fprintf(b, "failed to read body: %v\n", err) + } + } + fl.mu.Lock() + defer fl.mu.Unlock() + fmt.Fprint(fl.logFile, b.String()) + fl.logFile.Sync() +} + +// returns true if the provided body should be included in the log +func (fl fileLogger) shouldLogBody(header http.Header, body io.ReadCloser) bool { + ct := header.Get("Content-Type") + return fl.logLevel >= LogDebug && body != nil && !strings.Contains(ct, "application/octet-stream") +} + +// creates standard header for log entries, it contains a timestamp and the log level +func entryHeader(level LevelType) string { + // this format provides a fixed number of digits so the size of the timestamp is constant + return fmt.Sprintf("(%s) %s:", time.Now().Format("2006-01-02T15:04:05.0000000Z07:00"), level.String()) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/tracing/go.mod b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/tracing/go.mod new file mode 100644 index 000000000..25c34c108 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/tracing/go.mod @@ -0,0 +1,3 @@ +module github.com/Azure/go-autorest/tracing + +go 1.12 diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/tracing/tracing.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/tracing/tracing.go new file mode 100644 index 000000000..0e7a6e962 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/go-autorest/tracing/tracing.go @@ -0,0 +1,67 @@ +package tracing + +// Copyright 2018 Microsoft Corporation +// +// 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. + +import ( + "context" + "net/http" +) + +// Tracer represents an HTTP tracing facility. +type Tracer interface { + NewTransport(base *http.Transport) http.RoundTripper + StartSpan(ctx context.Context, name string) context.Context + EndSpan(ctx context.Context, httpStatusCode int, err error) +} + +var ( + tracer Tracer +) + +// Register will register the provided Tracer. Pass nil to unregister a Tracer. +func Register(t Tracer) { + tracer = t +} + +// IsEnabled returns true if a Tracer has been registered. +func IsEnabled() bool { + return tracer != nil +} + +// NewTransport creates a new instrumenting http.RoundTripper for the +// registered Tracer. If no Tracer has been registered it returns nil. +func NewTransport(base *http.Transport) http.RoundTripper { + if tracer != nil { + return tracer.NewTransport(base) + } + return nil +} + +// StartSpan starts a trace span with the specified name, associating it with the +// provided context. Has no effect if a Tracer has not been registered. +func StartSpan(ctx context.Context, name string) context.Context { + if tracer != nil { + return tracer.StartSpan(ctx, name) + } + return ctx +} + +// EndSpan ends a previously started span stored in the context. +// Has no effect if a Tracer has not been registered. +func EndSpan(ctx context.Context, httpStatusCode int, err error) { + if tracer != nil { + tracer.EndSpan(ctx, httpStatusCode, err) + } +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/dimchansky/utfbom/LICENSE b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/dimchansky/utfbom/LICENSE new file mode 100644 index 000000000..8dada3eda --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/dimchansky/utfbom/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + 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. diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/dimchansky/utfbom/README.md b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/dimchansky/utfbom/README.md new file mode 100644 index 000000000..8ece28008 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/dimchansky/utfbom/README.md @@ -0,0 +1,66 @@ +# utfbom [![Godoc](https://godoc.org/github.com/dimchansky/utfbom?status.png)](https://godoc.org/github.com/dimchansky/utfbom) [![License](https://img.shields.io/:license-apache-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Build Status](https://travis-ci.org/dimchansky/utfbom.svg?branch=master)](https://travis-ci.org/dimchansky/utfbom) [![Go Report Card](https://goreportcard.com/badge/github.com/dimchansky/utfbom)](https://goreportcard.com/report/github.com/dimchansky/utfbom) [![Coverage Status](https://coveralls.io/repos/github/dimchansky/utfbom/badge.svg?branch=master)](https://coveralls.io/github/dimchansky/utfbom?branch=master) + +The package utfbom implements the detection of the BOM (Unicode Byte Order Mark) and removing as necessary. It can also return the encoding detected by the BOM. + +## Installation + + go get -u github.com/dimchansky/utfbom + +## Example + +```go +package main + +import ( + "bytes" + "fmt" + "io/ioutil" + + "github.com/dimchansky/utfbom" +) + +func main() { + trySkip([]byte("\xEF\xBB\xBFhello")) + trySkip([]byte("hello")) +} + +func trySkip(byteData []byte) { + fmt.Println("Input:", byteData) + + // just skip BOM + output, err := ioutil.ReadAll(utfbom.SkipOnly(bytes.NewReader(byteData))) + if err != nil { + fmt.Println(err) + return + } + fmt.Println("ReadAll with BOM skipping", output) + + // skip BOM and detect encoding + sr, enc := utfbom.Skip(bytes.NewReader(byteData)) + fmt.Printf("Detected encoding: %s\n", enc) + output, err = ioutil.ReadAll(sr) + if err != nil { + fmt.Println(err) + return + } + fmt.Println("ReadAll with BOM detection and skipping", output) + fmt.Println() +} +``` + +Output: + +``` +$ go run main.go +Input: [239 187 191 104 101 108 108 111] +ReadAll with BOM skipping [104 101 108 108 111] +Detected encoding: UTF8 +ReadAll with BOM detection and skipping [104 101 108 108 111] + +Input: [104 101 108 108 111] +ReadAll with BOM skipping [104 101 108 108 111] +Detected encoding: Unknown +ReadAll with BOM detection and skipping [104 101 108 108 111] +``` + + diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/dimchansky/utfbom/go.mod b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/dimchansky/utfbom/go.mod new file mode 100644 index 000000000..4b9ecc6f5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/dimchansky/utfbom/go.mod @@ -0,0 +1 @@ +module github.com/dimchansky/utfbom \ No newline at end of file diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/dimchansky/utfbom/utfbom.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/dimchansky/utfbom/utfbom.go new file mode 100644 index 000000000..77a303e56 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/dimchansky/utfbom/utfbom.go @@ -0,0 +1,192 @@ +// Package utfbom implements the detection of the BOM (Unicode Byte Order Mark) and removing as necessary. +// It wraps an io.Reader object, creating another object (Reader) that also implements the io.Reader +// interface but provides automatic BOM checking and removing as necessary. +package utfbom + +import ( + "errors" + "io" +) + +// Encoding is type alias for detected UTF encoding. +type Encoding int + +// Constants to identify detected UTF encodings. +const ( + // Unknown encoding, returned when no BOM was detected + Unknown Encoding = iota + + // UTF8, BOM bytes: EF BB BF + UTF8 + + // UTF-16, big-endian, BOM bytes: FE FF + UTF16BigEndian + + // UTF-16, little-endian, BOM bytes: FF FE + UTF16LittleEndian + + // UTF-32, big-endian, BOM bytes: 00 00 FE FF + UTF32BigEndian + + // UTF-32, little-endian, BOM bytes: FF FE 00 00 + UTF32LittleEndian +) + +// String returns a user-friendly string representation of the encoding. Satisfies fmt.Stringer interface. +func (e Encoding) String() string { + switch e { + case UTF8: + return "UTF8" + case UTF16BigEndian: + return "UTF16BigEndian" + case UTF16LittleEndian: + return "UTF16LittleEndian" + case UTF32BigEndian: + return "UTF32BigEndian" + case UTF32LittleEndian: + return "UTF32LittleEndian" + default: + return "Unknown" + } +} + +const maxConsecutiveEmptyReads = 100 + +// Skip creates Reader which automatically detects BOM (Unicode Byte Order Mark) and removes it as necessary. +// It also returns the encoding detected by the BOM. +// If the detected encoding is not needed, you can call the SkipOnly function. +func Skip(rd io.Reader) (*Reader, Encoding) { + // Is it already a Reader? + b, ok := rd.(*Reader) + if ok { + return b, Unknown + } + + enc, left, err := detectUtf(rd) + return &Reader{ + rd: rd, + buf: left, + err: err, + }, enc +} + +// SkipOnly creates Reader which automatically detects BOM (Unicode Byte Order Mark) and removes it as necessary. +func SkipOnly(rd io.Reader) *Reader { + r, _ := Skip(rd) + return r +} + +// Reader implements automatic BOM (Unicode Byte Order Mark) checking and +// removing as necessary for an io.Reader object. +type Reader struct { + rd io.Reader // reader provided by the client + buf []byte // buffered data + err error // last error +} + +// Read is an implementation of io.Reader interface. +// The bytes are taken from the underlying Reader, but it checks for BOMs, removing them as necessary. +func (r *Reader) Read(p []byte) (n int, err error) { + if len(p) == 0 { + return 0, nil + } + + if r.buf == nil { + if r.err != nil { + return 0, r.readErr() + } + + return r.rd.Read(p) + } + + // copy as much as we can + n = copy(p, r.buf) + r.buf = nilIfEmpty(r.buf[n:]) + return n, nil +} + +func (r *Reader) readErr() error { + err := r.err + r.err = nil + return err +} + +var errNegativeRead = errors.New("utfbom: reader returned negative count from Read") + +func detectUtf(rd io.Reader) (enc Encoding, buf []byte, err error) { + buf, err = readBOM(rd) + + if len(buf) >= 4 { + if isUTF32BigEndianBOM4(buf) { + return UTF32BigEndian, nilIfEmpty(buf[4:]), err + } + if isUTF32LittleEndianBOM4(buf) { + return UTF32LittleEndian, nilIfEmpty(buf[4:]), err + } + } + + if len(buf) > 2 && isUTF8BOM3(buf) { + return UTF8, nilIfEmpty(buf[3:]), err + } + + if (err != nil && err != io.EOF) || (len(buf) < 2) { + return Unknown, nilIfEmpty(buf), err + } + + if isUTF16BigEndianBOM2(buf) { + return UTF16BigEndian, nilIfEmpty(buf[2:]), err + } + if isUTF16LittleEndianBOM2(buf) { + return UTF16LittleEndian, nilIfEmpty(buf[2:]), err + } + + return Unknown, nilIfEmpty(buf), err +} + +func readBOM(rd io.Reader) (buf []byte, err error) { + const maxBOMSize = 4 + var bom [maxBOMSize]byte // used to read BOM + + // read as many bytes as possible + for nEmpty, n := 0, 0; err == nil && len(buf) < maxBOMSize; buf = bom[:len(buf)+n] { + if n, err = rd.Read(bom[len(buf):]); n < 0 { + panic(errNegativeRead) + } + if n > 0 { + nEmpty = 0 + } else { + nEmpty++ + if nEmpty >= maxConsecutiveEmptyReads { + err = io.ErrNoProgress + } + } + } + return +} + +func isUTF32BigEndianBOM4(buf []byte) bool { + return buf[0] == 0x00 && buf[1] == 0x00 && buf[2] == 0xFE && buf[3] == 0xFF +} + +func isUTF32LittleEndianBOM4(buf []byte) bool { + return buf[0] == 0xFF && buf[1] == 0xFE && buf[2] == 0x00 && buf[3] == 0x00 +} + +func isUTF8BOM3(buf []byte) bool { + return buf[0] == 0xEF && buf[1] == 0xBB && buf[2] == 0xBF +} + +func isUTF16BigEndianBOM2(buf []byte) bool { + return buf[0] == 0xFE && buf[1] == 0xFF +} + +func isUTF16LittleEndianBOM2(buf []byte) bool { + return buf[0] == 0xFF && buf[1] == 0xFE +} + +func nilIfEmpty(buf []byte) (res []byte) { + if len(buf) > 0 { + res = buf + } + return +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/mitchellh/go-homedir/LICENSE b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/mitchellh/go-homedir/LICENSE new file mode 100644 index 000000000..f9c841a51 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/mitchellh/go-homedir/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013 Mitchell Hashimoto + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/mitchellh/go-homedir/README.md b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/mitchellh/go-homedir/README.md new file mode 100644 index 000000000..d70706d5b --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/mitchellh/go-homedir/README.md @@ -0,0 +1,14 @@ +# go-homedir + +This is a Go library for detecting the user's home directory without +the use of cgo, so the library can be used in cross-compilation environments. + +Usage is incredibly simple, just call `homedir.Dir()` to get the home directory +for a user, and `homedir.Expand()` to expand the `~` in a path to the home +directory. + +**Why not just use `os/user`?** The built-in `os/user` package requires +cgo on Darwin systems. This means that any Go code that uses that package +cannot cross compile. But 99% of the time the use for `os/user` is just to +retrieve the home directory, which we can do for the current user without +cgo. This library does that, enabling cross-compilation. diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/mitchellh/go-homedir/go.mod b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/mitchellh/go-homedir/go.mod new file mode 100644 index 000000000..7efa09a04 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/mitchellh/go-homedir/go.mod @@ -0,0 +1 @@ +module github.com/mitchellh/go-homedir diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/mitchellh/go-homedir/homedir.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/mitchellh/go-homedir/homedir.go new file mode 100644 index 000000000..25378537e --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/mitchellh/go-homedir/homedir.go @@ -0,0 +1,167 @@ +package homedir + +import ( + "bytes" + "errors" + "os" + "os/exec" + "path/filepath" + "runtime" + "strconv" + "strings" + "sync" +) + +// DisableCache will disable caching of the home directory. Caching is enabled +// by default. +var DisableCache bool + +var homedirCache string +var cacheLock sync.RWMutex + +// Dir returns the home directory for the executing user. +// +// This uses an OS-specific method for discovering the home directory. +// An error is returned if a home directory cannot be detected. +func Dir() (string, error) { + if !DisableCache { + cacheLock.RLock() + cached := homedirCache + cacheLock.RUnlock() + if cached != "" { + return cached, nil + } + } + + cacheLock.Lock() + defer cacheLock.Unlock() + + var result string + var err error + if runtime.GOOS == "windows" { + result, err = dirWindows() + } else { + // Unix-like system, so just assume Unix + result, err = dirUnix() + } + + if err != nil { + return "", err + } + homedirCache = result + return result, nil +} + +// Expand expands the path to include the home directory if the path +// is prefixed with `~`. If it isn't prefixed with `~`, the path is +// returned as-is. +func Expand(path string) (string, error) { + if len(path) == 0 { + return path, nil + } + + if path[0] != '~' { + return path, nil + } + + if len(path) > 1 && path[1] != '/' && path[1] != '\\' { + return "", errors.New("cannot expand user-specific home dir") + } + + dir, err := Dir() + if err != nil { + return "", err + } + + return filepath.Join(dir, path[1:]), nil +} + +// Reset clears the cache, forcing the next call to Dir to re-detect +// the home directory. This generally never has to be called, but can be +// useful in tests if you're modifying the home directory via the HOME +// env var or something. +func Reset() { + cacheLock.Lock() + defer cacheLock.Unlock() + homedirCache = "" +} + +func dirUnix() (string, error) { + homeEnv := "HOME" + if runtime.GOOS == "plan9" { + // On plan9, env vars are lowercase. + homeEnv = "home" + } + + // First prefer the HOME environmental variable + if home := os.Getenv(homeEnv); home != "" { + return home, nil + } + + var stdout bytes.Buffer + + // If that fails, try OS specific commands + if runtime.GOOS == "darwin" { + cmd := exec.Command("sh", "-c", `dscl -q . -read /Users/"$(whoami)" NFSHomeDirectory | sed 's/^[^ ]*: //'`) + cmd.Stdout = &stdout + if err := cmd.Run(); err == nil { + result := strings.TrimSpace(stdout.String()) + if result != "" { + return result, nil + } + } + } else { + cmd := exec.Command("getent", "passwd", strconv.Itoa(os.Getuid())) + cmd.Stdout = &stdout + if err := cmd.Run(); err != nil { + // If the error is ErrNotFound, we ignore it. Otherwise, return it. + if err != exec.ErrNotFound { + return "", err + } + } else { + if passwd := strings.TrimSpace(stdout.String()); passwd != "" { + // username:password:uid:gid:gecos:home:shell + passwdParts := strings.SplitN(passwd, ":", 7) + if len(passwdParts) > 5 { + return passwdParts[5], nil + } + } + } + } + + // If all else fails, try the shell + stdout.Reset() + cmd := exec.Command("sh", "-c", "cd && pwd") + cmd.Stdout = &stdout + if err := cmd.Run(); err != nil { + return "", err + } + + result := strings.TrimSpace(stdout.String()) + if result == "" { + return "", errors.New("blank output when reading home directory") + } + + return result, nil +} + +func dirWindows() (string, error) { + // First prefer the HOME environmental variable + if home := os.Getenv("HOME"); home != "" { + return home, nil + } + + // Prefer standard environment variable USERPROFILE + if home := os.Getenv("USERPROFILE"); home != "" { + return home, nil + } + + drive := os.Getenv("HOMEDRIVE") + path := os.Getenv("HOMEPATH") + home := drive + path + if drive == "" || path == "" { + return "", errors.New("HOMEDRIVE, HOMEPATH, or USERPROFILE are blank") + } + + return home, nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/golang.org/x/crypto/LICENSE b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/golang.org/x/crypto/LICENSE new file mode 100644 index 000000000..6a66aea5e --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/golang.org/x/crypto/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/golang.org/x/crypto/PATENTS b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/golang.org/x/crypto/PATENTS new file mode 100644 index 000000000..733099041 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/golang.org/x/crypto/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/golang.org/x/crypto/pkcs12/bmp-string.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/golang.org/x/crypto/pkcs12/bmp-string.go new file mode 100644 index 000000000..233b8b62c --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/golang.org/x/crypto/pkcs12/bmp-string.go @@ -0,0 +1,50 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package pkcs12 + +import ( + "errors" + "unicode/utf16" +) + +// bmpString returns s encoded in UCS-2 with a zero terminator. +func bmpString(s string) ([]byte, error) { + // References: + // https://tools.ietf.org/html/rfc7292#appendix-B.1 + // https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_Multilingual_Plane + // - non-BMP characters are encoded in UTF 16 by using a surrogate pair of 16-bit codes + // EncodeRune returns 0xfffd if the rune does not need special encoding + // - the above RFC provides the info that BMPStrings are NULL terminated. + + ret := make([]byte, 0, 2*len(s)+2) + + for _, r := range s { + if t, _ := utf16.EncodeRune(r); t != 0xfffd { + return nil, errors.New("pkcs12: string contains characters that cannot be encoded in UCS-2") + } + ret = append(ret, byte(r/256), byte(r%256)) + } + + return append(ret, 0, 0), nil +} + +func decodeBMPString(bmpString []byte) (string, error) { + if len(bmpString)%2 != 0 { + return "", errors.New("pkcs12: odd-length BMP string") + } + + // strip terminator if present + if l := len(bmpString); l >= 2 && bmpString[l-1] == 0 && bmpString[l-2] == 0 { + bmpString = bmpString[:l-2] + } + + s := make([]uint16, 0, len(bmpString)/2) + for len(bmpString) > 0 { + s = append(s, uint16(bmpString[0])<<8+uint16(bmpString[1])) + bmpString = bmpString[2:] + } + + return string(utf16.Decode(s)), nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/golang.org/x/crypto/pkcs12/crypto.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/golang.org/x/crypto/pkcs12/crypto.go new file mode 100644 index 000000000..484ca51b7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/golang.org/x/crypto/pkcs12/crypto.go @@ -0,0 +1,131 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package pkcs12 + +import ( + "bytes" + "crypto/cipher" + "crypto/des" + "crypto/x509/pkix" + "encoding/asn1" + "errors" + + "golang.org/x/crypto/pkcs12/internal/rc2" +) + +var ( + oidPBEWithSHAAnd3KeyTripleDESCBC = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 12, 1, 3}) + oidPBEWithSHAAnd40BitRC2CBC = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 12, 1, 6}) +) + +// pbeCipher is an abstraction of a PKCS#12 cipher. +type pbeCipher interface { + // create returns a cipher.Block given a key. + create(key []byte) (cipher.Block, error) + // deriveKey returns a key derived from the given password and salt. + deriveKey(salt, password []byte, iterations int) []byte + // deriveKey returns an IV derived from the given password and salt. + deriveIV(salt, password []byte, iterations int) []byte +} + +type shaWithTripleDESCBC struct{} + +func (shaWithTripleDESCBC) create(key []byte) (cipher.Block, error) { + return des.NewTripleDESCipher(key) +} + +func (shaWithTripleDESCBC) deriveKey(salt, password []byte, iterations int) []byte { + return pbkdf(sha1Sum, 20, 64, salt, password, iterations, 1, 24) +} + +func (shaWithTripleDESCBC) deriveIV(salt, password []byte, iterations int) []byte { + return pbkdf(sha1Sum, 20, 64, salt, password, iterations, 2, 8) +} + +type shaWith40BitRC2CBC struct{} + +func (shaWith40BitRC2CBC) create(key []byte) (cipher.Block, error) { + return rc2.New(key, len(key)*8) +} + +func (shaWith40BitRC2CBC) deriveKey(salt, password []byte, iterations int) []byte { + return pbkdf(sha1Sum, 20, 64, salt, password, iterations, 1, 5) +} + +func (shaWith40BitRC2CBC) deriveIV(salt, password []byte, iterations int) []byte { + return pbkdf(sha1Sum, 20, 64, salt, password, iterations, 2, 8) +} + +type pbeParams struct { + Salt []byte + Iterations int +} + +func pbDecrypterFor(algorithm pkix.AlgorithmIdentifier, password []byte) (cipher.BlockMode, int, error) { + var cipherType pbeCipher + + switch { + case algorithm.Algorithm.Equal(oidPBEWithSHAAnd3KeyTripleDESCBC): + cipherType = shaWithTripleDESCBC{} + case algorithm.Algorithm.Equal(oidPBEWithSHAAnd40BitRC2CBC): + cipherType = shaWith40BitRC2CBC{} + default: + return nil, 0, NotImplementedError("algorithm " + algorithm.Algorithm.String() + " is not supported") + } + + var params pbeParams + if err := unmarshal(algorithm.Parameters.FullBytes, ¶ms); err != nil { + return nil, 0, err + } + + key := cipherType.deriveKey(params.Salt, password, params.Iterations) + iv := cipherType.deriveIV(params.Salt, password, params.Iterations) + + block, err := cipherType.create(key) + if err != nil { + return nil, 0, err + } + + return cipher.NewCBCDecrypter(block, iv), block.BlockSize(), nil +} + +func pbDecrypt(info decryptable, password []byte) (decrypted []byte, err error) { + cbc, blockSize, err := pbDecrypterFor(info.Algorithm(), password) + if err != nil { + return nil, err + } + + encrypted := info.Data() + if len(encrypted) == 0 { + return nil, errors.New("pkcs12: empty encrypted data") + } + if len(encrypted)%blockSize != 0 { + return nil, errors.New("pkcs12: input is not a multiple of the block size") + } + decrypted = make([]byte, len(encrypted)) + cbc.CryptBlocks(decrypted, encrypted) + + psLen := int(decrypted[len(decrypted)-1]) + if psLen == 0 || psLen > blockSize { + return nil, ErrDecryption + } + + if len(decrypted) < psLen { + return nil, ErrDecryption + } + ps := decrypted[len(decrypted)-psLen:] + decrypted = decrypted[:len(decrypted)-psLen] + if bytes.Compare(ps, bytes.Repeat([]byte{byte(psLen)}, psLen)) != 0 { + return nil, ErrDecryption + } + + return +} + +// decryptable abstracts an object that contains ciphertext. +type decryptable interface { + Algorithm() pkix.AlgorithmIdentifier + Data() []byte +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/golang.org/x/crypto/pkcs12/errors.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/golang.org/x/crypto/pkcs12/errors.go new file mode 100644 index 000000000..7377ce6fb --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/golang.org/x/crypto/pkcs12/errors.go @@ -0,0 +1,23 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package pkcs12 + +import "errors" + +var ( + // ErrDecryption represents a failure to decrypt the input. + ErrDecryption = errors.New("pkcs12: decryption error, incorrect padding") + + // ErrIncorrectPassword is returned when an incorrect password is detected. + // Usually, P12/PFX data is signed to be able to verify the password. + ErrIncorrectPassword = errors.New("pkcs12: decryption password incorrect") +) + +// NotImplementedError indicates that the input is not currently supported. +type NotImplementedError string + +func (e NotImplementedError) Error() string { + return "pkcs12: " + string(e) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/golang.org/x/crypto/pkcs12/internal/rc2/rc2.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/golang.org/x/crypto/pkcs12/internal/rc2/rc2.go new file mode 100644 index 000000000..7499e3fb6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/golang.org/x/crypto/pkcs12/internal/rc2/rc2.go @@ -0,0 +1,271 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package rc2 implements the RC2 cipher +/* +https://www.ietf.org/rfc/rfc2268.txt +http://people.csail.mit.edu/rivest/pubs/KRRR98.pdf + +This code is licensed under the MIT license. +*/ +package rc2 + +import ( + "crypto/cipher" + "encoding/binary" +) + +// The rc2 block size in bytes +const BlockSize = 8 + +type rc2Cipher struct { + k [64]uint16 +} + +// New returns a new rc2 cipher with the given key and effective key length t1 +func New(key []byte, t1 int) (cipher.Block, error) { + // TODO(dgryski): error checking for key length + return &rc2Cipher{ + k: expandKey(key, t1), + }, nil +} + +func (*rc2Cipher) BlockSize() int { return BlockSize } + +var piTable = [256]byte{ + 0xd9, 0x78, 0xf9, 0xc4, 0x19, 0xdd, 0xb5, 0xed, 0x28, 0xe9, 0xfd, 0x79, 0x4a, 0xa0, 0xd8, 0x9d, + 0xc6, 0x7e, 0x37, 0x83, 0x2b, 0x76, 0x53, 0x8e, 0x62, 0x4c, 0x64, 0x88, 0x44, 0x8b, 0xfb, 0xa2, + 0x17, 0x9a, 0x59, 0xf5, 0x87, 0xb3, 0x4f, 0x13, 0x61, 0x45, 0x6d, 0x8d, 0x09, 0x81, 0x7d, 0x32, + 0xbd, 0x8f, 0x40, 0xeb, 0x86, 0xb7, 0x7b, 0x0b, 0xf0, 0x95, 0x21, 0x22, 0x5c, 0x6b, 0x4e, 0x82, + 0x54, 0xd6, 0x65, 0x93, 0xce, 0x60, 0xb2, 0x1c, 0x73, 0x56, 0xc0, 0x14, 0xa7, 0x8c, 0xf1, 0xdc, + 0x12, 0x75, 0xca, 0x1f, 0x3b, 0xbe, 0xe4, 0xd1, 0x42, 0x3d, 0xd4, 0x30, 0xa3, 0x3c, 0xb6, 0x26, + 0x6f, 0xbf, 0x0e, 0xda, 0x46, 0x69, 0x07, 0x57, 0x27, 0xf2, 0x1d, 0x9b, 0xbc, 0x94, 0x43, 0x03, + 0xf8, 0x11, 0xc7, 0xf6, 0x90, 0xef, 0x3e, 0xe7, 0x06, 0xc3, 0xd5, 0x2f, 0xc8, 0x66, 0x1e, 0xd7, + 0x08, 0xe8, 0xea, 0xde, 0x80, 0x52, 0xee, 0xf7, 0x84, 0xaa, 0x72, 0xac, 0x35, 0x4d, 0x6a, 0x2a, + 0x96, 0x1a, 0xd2, 0x71, 0x5a, 0x15, 0x49, 0x74, 0x4b, 0x9f, 0xd0, 0x5e, 0x04, 0x18, 0xa4, 0xec, + 0xc2, 0xe0, 0x41, 0x6e, 0x0f, 0x51, 0xcb, 0xcc, 0x24, 0x91, 0xaf, 0x50, 0xa1, 0xf4, 0x70, 0x39, + 0x99, 0x7c, 0x3a, 0x85, 0x23, 0xb8, 0xb4, 0x7a, 0xfc, 0x02, 0x36, 0x5b, 0x25, 0x55, 0x97, 0x31, + 0x2d, 0x5d, 0xfa, 0x98, 0xe3, 0x8a, 0x92, 0xae, 0x05, 0xdf, 0x29, 0x10, 0x67, 0x6c, 0xba, 0xc9, + 0xd3, 0x00, 0xe6, 0xcf, 0xe1, 0x9e, 0xa8, 0x2c, 0x63, 0x16, 0x01, 0x3f, 0x58, 0xe2, 0x89, 0xa9, + 0x0d, 0x38, 0x34, 0x1b, 0xab, 0x33, 0xff, 0xb0, 0xbb, 0x48, 0x0c, 0x5f, 0xb9, 0xb1, 0xcd, 0x2e, + 0xc5, 0xf3, 0xdb, 0x47, 0xe5, 0xa5, 0x9c, 0x77, 0x0a, 0xa6, 0x20, 0x68, 0xfe, 0x7f, 0xc1, 0xad, +} + +func expandKey(key []byte, t1 int) [64]uint16 { + + l := make([]byte, 128) + copy(l, key) + + var t = len(key) + var t8 = (t1 + 7) / 8 + var tm = byte(255 % uint(1<<(8+uint(t1)-8*uint(t8)))) + + for i := len(key); i < 128; i++ { + l[i] = piTable[l[i-1]+l[uint8(i-t)]] + } + + l[128-t8] = piTable[l[128-t8]&tm] + + for i := 127 - t8; i >= 0; i-- { + l[i] = piTable[l[i+1]^l[i+t8]] + } + + var k [64]uint16 + + for i := range k { + k[i] = uint16(l[2*i]) + uint16(l[2*i+1])*256 + } + + return k +} + +func rotl16(x uint16, b uint) uint16 { + return (x >> (16 - b)) | (x << b) +} + +func (c *rc2Cipher) Encrypt(dst, src []byte) { + + r0 := binary.LittleEndian.Uint16(src[0:]) + r1 := binary.LittleEndian.Uint16(src[2:]) + r2 := binary.LittleEndian.Uint16(src[4:]) + r3 := binary.LittleEndian.Uint16(src[6:]) + + var j int + + for j <= 16 { + // mix r0 + r0 = r0 + c.k[j] + (r3 & r2) + ((^r3) & r1) + r0 = rotl16(r0, 1) + j++ + + // mix r1 + r1 = r1 + c.k[j] + (r0 & r3) + ((^r0) & r2) + r1 = rotl16(r1, 2) + j++ + + // mix r2 + r2 = r2 + c.k[j] + (r1 & r0) + ((^r1) & r3) + r2 = rotl16(r2, 3) + j++ + + // mix r3 + r3 = r3 + c.k[j] + (r2 & r1) + ((^r2) & r0) + r3 = rotl16(r3, 5) + j++ + + } + + r0 = r0 + c.k[r3&63] + r1 = r1 + c.k[r0&63] + r2 = r2 + c.k[r1&63] + r3 = r3 + c.k[r2&63] + + for j <= 40 { + // mix r0 + r0 = r0 + c.k[j] + (r3 & r2) + ((^r3) & r1) + r0 = rotl16(r0, 1) + j++ + + // mix r1 + r1 = r1 + c.k[j] + (r0 & r3) + ((^r0) & r2) + r1 = rotl16(r1, 2) + j++ + + // mix r2 + r2 = r2 + c.k[j] + (r1 & r0) + ((^r1) & r3) + r2 = rotl16(r2, 3) + j++ + + // mix r3 + r3 = r3 + c.k[j] + (r2 & r1) + ((^r2) & r0) + r3 = rotl16(r3, 5) + j++ + + } + + r0 = r0 + c.k[r3&63] + r1 = r1 + c.k[r0&63] + r2 = r2 + c.k[r1&63] + r3 = r3 + c.k[r2&63] + + for j <= 60 { + // mix r0 + r0 = r0 + c.k[j] + (r3 & r2) + ((^r3) & r1) + r0 = rotl16(r0, 1) + j++ + + // mix r1 + r1 = r1 + c.k[j] + (r0 & r3) + ((^r0) & r2) + r1 = rotl16(r1, 2) + j++ + + // mix r2 + r2 = r2 + c.k[j] + (r1 & r0) + ((^r1) & r3) + r2 = rotl16(r2, 3) + j++ + + // mix r3 + r3 = r3 + c.k[j] + (r2 & r1) + ((^r2) & r0) + r3 = rotl16(r3, 5) + j++ + } + + binary.LittleEndian.PutUint16(dst[0:], r0) + binary.LittleEndian.PutUint16(dst[2:], r1) + binary.LittleEndian.PutUint16(dst[4:], r2) + binary.LittleEndian.PutUint16(dst[6:], r3) +} + +func (c *rc2Cipher) Decrypt(dst, src []byte) { + + r0 := binary.LittleEndian.Uint16(src[0:]) + r1 := binary.LittleEndian.Uint16(src[2:]) + r2 := binary.LittleEndian.Uint16(src[4:]) + r3 := binary.LittleEndian.Uint16(src[6:]) + + j := 63 + + for j >= 44 { + // unmix r3 + r3 = rotl16(r3, 16-5) + r3 = r3 - c.k[j] - (r2 & r1) - ((^r2) & r0) + j-- + + // unmix r2 + r2 = rotl16(r2, 16-3) + r2 = r2 - c.k[j] - (r1 & r0) - ((^r1) & r3) + j-- + + // unmix r1 + r1 = rotl16(r1, 16-2) + r1 = r1 - c.k[j] - (r0 & r3) - ((^r0) & r2) + j-- + + // unmix r0 + r0 = rotl16(r0, 16-1) + r0 = r0 - c.k[j] - (r3 & r2) - ((^r3) & r1) + j-- + } + + r3 = r3 - c.k[r2&63] + r2 = r2 - c.k[r1&63] + r1 = r1 - c.k[r0&63] + r0 = r0 - c.k[r3&63] + + for j >= 20 { + // unmix r3 + r3 = rotl16(r3, 16-5) + r3 = r3 - c.k[j] - (r2 & r1) - ((^r2) & r0) + j-- + + // unmix r2 + r2 = rotl16(r2, 16-3) + r2 = r2 - c.k[j] - (r1 & r0) - ((^r1) & r3) + j-- + + // unmix r1 + r1 = rotl16(r1, 16-2) + r1 = r1 - c.k[j] - (r0 & r3) - ((^r0) & r2) + j-- + + // unmix r0 + r0 = rotl16(r0, 16-1) + r0 = r0 - c.k[j] - (r3 & r2) - ((^r3) & r1) + j-- + + } + + r3 = r3 - c.k[r2&63] + r2 = r2 - c.k[r1&63] + r1 = r1 - c.k[r0&63] + r0 = r0 - c.k[r3&63] + + for j >= 0 { + // unmix r3 + r3 = rotl16(r3, 16-5) + r3 = r3 - c.k[j] - (r2 & r1) - ((^r2) & r0) + j-- + + // unmix r2 + r2 = rotl16(r2, 16-3) + r2 = r2 - c.k[j] - (r1 & r0) - ((^r1) & r3) + j-- + + // unmix r1 + r1 = rotl16(r1, 16-2) + r1 = r1 - c.k[j] - (r0 & r3) - ((^r0) & r2) + j-- + + // unmix r0 + r0 = rotl16(r0, 16-1) + r0 = r0 - c.k[j] - (r3 & r2) - ((^r3) & r1) + j-- + + } + + binary.LittleEndian.PutUint16(dst[0:], r0) + binary.LittleEndian.PutUint16(dst[2:], r1) + binary.LittleEndian.PutUint16(dst[4:], r2) + binary.LittleEndian.PutUint16(dst[6:], r3) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/golang.org/x/crypto/pkcs12/mac.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/golang.org/x/crypto/pkcs12/mac.go new file mode 100644 index 000000000..5f38aa7de --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/golang.org/x/crypto/pkcs12/mac.go @@ -0,0 +1,45 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package pkcs12 + +import ( + "crypto/hmac" + "crypto/sha1" + "crypto/x509/pkix" + "encoding/asn1" +) + +type macData struct { + Mac digestInfo + MacSalt []byte + Iterations int `asn1:"optional,default:1"` +} + +// from PKCS#7: +type digestInfo struct { + Algorithm pkix.AlgorithmIdentifier + Digest []byte +} + +var ( + oidSHA1 = asn1.ObjectIdentifier([]int{1, 3, 14, 3, 2, 26}) +) + +func verifyMac(macData *macData, message, password []byte) error { + if !macData.Mac.Algorithm.Algorithm.Equal(oidSHA1) { + return NotImplementedError("unknown digest algorithm: " + macData.Mac.Algorithm.Algorithm.String()) + } + + key := pbkdf(sha1Sum, 20, 64, macData.MacSalt, password, macData.Iterations, 3, 20) + + mac := hmac.New(sha1.New, key) + mac.Write(message) + expectedMAC := mac.Sum(nil) + + if !hmac.Equal(macData.Mac.Digest, expectedMAC) { + return ErrIncorrectPassword + } + return nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/golang.org/x/crypto/pkcs12/pbkdf.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/golang.org/x/crypto/pkcs12/pbkdf.go new file mode 100644 index 000000000..5c419d41e --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/golang.org/x/crypto/pkcs12/pbkdf.go @@ -0,0 +1,170 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package pkcs12 + +import ( + "bytes" + "crypto/sha1" + "math/big" +) + +var ( + one = big.NewInt(1) +) + +// sha1Sum returns the SHA-1 hash of in. +func sha1Sum(in []byte) []byte { + sum := sha1.Sum(in) + return sum[:] +} + +// fillWithRepeats returns v*ceiling(len(pattern) / v) bytes consisting of +// repeats of pattern. +func fillWithRepeats(pattern []byte, v int) []byte { + if len(pattern) == 0 { + return nil + } + outputLen := v * ((len(pattern) + v - 1) / v) + return bytes.Repeat(pattern, (outputLen+len(pattern)-1)/len(pattern))[:outputLen] +} + +func pbkdf(hash func([]byte) []byte, u, v int, salt, password []byte, r int, ID byte, size int) (key []byte) { + // implementation of https://tools.ietf.org/html/rfc7292#appendix-B.2 , RFC text verbatim in comments + + // Let H be a hash function built around a compression function f: + + // Z_2^u x Z_2^v -> Z_2^u + + // (that is, H has a chaining variable and output of length u bits, and + // the message input to the compression function of H is v bits). The + // values for u and v are as follows: + + // HASH FUNCTION VALUE u VALUE v + // MD2, MD5 128 512 + // SHA-1 160 512 + // SHA-224 224 512 + // SHA-256 256 512 + // SHA-384 384 1024 + // SHA-512 512 1024 + // SHA-512/224 224 1024 + // SHA-512/256 256 1024 + + // Furthermore, let r be the iteration count. + + // We assume here that u and v are both multiples of 8, as are the + // lengths of the password and salt strings (which we denote by p and s, + // respectively) and the number n of pseudorandom bits required. In + // addition, u and v are of course non-zero. + + // For information on security considerations for MD5 [19], see [25] and + // [1], and on those for MD2, see [18]. + + // The following procedure can be used to produce pseudorandom bits for + // a particular "purpose" that is identified by a byte called "ID". + // This standard specifies 3 different values for the ID byte: + + // 1. If ID=1, then the pseudorandom bits being produced are to be used + // as key material for performing encryption or decryption. + + // 2. If ID=2, then the pseudorandom bits being produced are to be used + // as an IV (Initial Value) for encryption or decryption. + + // 3. If ID=3, then the pseudorandom bits being produced are to be used + // as an integrity key for MACing. + + // 1. Construct a string, D (the "diversifier"), by concatenating v/8 + // copies of ID. + var D []byte + for i := 0; i < v; i++ { + D = append(D, ID) + } + + // 2. Concatenate copies of the salt together to create a string S of + // length v(ceiling(s/v)) bits (the final copy of the salt may be + // truncated to create S). Note that if the salt is the empty + // string, then so is S. + + S := fillWithRepeats(salt, v) + + // 3. Concatenate copies of the password together to create a string P + // of length v(ceiling(p/v)) bits (the final copy of the password + // may be truncated to create P). Note that if the password is the + // empty string, then so is P. + + P := fillWithRepeats(password, v) + + // 4. Set I=S||P to be the concatenation of S and P. + I := append(S, P...) + + // 5. Set c=ceiling(n/u). + c := (size + u - 1) / u + + // 6. For i=1, 2, ..., c, do the following: + A := make([]byte, c*20) + var IjBuf []byte + for i := 0; i < c; i++ { + // A. Set A2=H^r(D||I). (i.e., the r-th hash of D||1, + // H(H(H(... H(D||I)))) + Ai := hash(append(D, I...)) + for j := 1; j < r; j++ { + Ai = hash(Ai) + } + copy(A[i*20:], Ai[:]) + + if i < c-1 { // skip on last iteration + // B. Concatenate copies of Ai to create a string B of length v + // bits (the final copy of Ai may be truncated to create B). + var B []byte + for len(B) < v { + B = append(B, Ai[:]...) + } + B = B[:v] + + // C. Treating I as a concatenation I_0, I_1, ..., I_(k-1) of v-bit + // blocks, where k=ceiling(s/v)+ceiling(p/v), modify I by + // setting I_j=(I_j+B+1) mod 2^v for each j. + { + Bbi := new(big.Int).SetBytes(B) + Ij := new(big.Int) + + for j := 0; j < len(I)/v; j++ { + Ij.SetBytes(I[j*v : (j+1)*v]) + Ij.Add(Ij, Bbi) + Ij.Add(Ij, one) + Ijb := Ij.Bytes() + // We expect Ijb to be exactly v bytes, + // if it is longer or shorter we must + // adjust it accordingly. + if len(Ijb) > v { + Ijb = Ijb[len(Ijb)-v:] + } + if len(Ijb) < v { + if IjBuf == nil { + IjBuf = make([]byte, v) + } + bytesShort := v - len(Ijb) + for i := 0; i < bytesShort; i++ { + IjBuf[i] = 0 + } + copy(IjBuf[bytesShort:], Ijb) + Ijb = IjBuf + } + copy(I[j*v:(j+1)*v], Ijb) + } + } + } + } + // 7. Concatenate A_1, A_2, ..., A_c together to form a pseudorandom + // bit string, A. + + // 8. Use the first n bits of A as the output of this entire process. + return A[:size] + + // If the above process is being used to generate a DES key, the process + // should be used to create 64 random bits, and the key's parity bits + // should be set after the 64 bits have been produced. Similar concerns + // hold for 2-key and 3-key triple-DES keys, for CDMF keys, and for any + // similar keys with parity bits "built into them". +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/golang.org/x/crypto/pkcs12/pkcs12.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/golang.org/x/crypto/pkcs12/pkcs12.go new file mode 100644 index 000000000..3e2ce6940 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/golang.org/x/crypto/pkcs12/pkcs12.go @@ -0,0 +1,350 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package pkcs12 implements some of PKCS#12. +// +// This implementation is distilled from https://tools.ietf.org/html/rfc7292 +// and referenced documents. It is intended for decoding P12/PFX-stored +// certificates and keys for use with the crypto/tls package. +// +// This package is frozen. If it's missing functionality you need, consider +// an alternative like software.sslmate.com/src/go-pkcs12. +package pkcs12 + +import ( + "crypto/ecdsa" + "crypto/rsa" + "crypto/x509" + "crypto/x509/pkix" + "encoding/asn1" + "encoding/hex" + "encoding/pem" + "errors" +) + +var ( + oidDataContentType = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 7, 1}) + oidEncryptedDataContentType = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 7, 6}) + + oidFriendlyName = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 9, 20}) + oidLocalKeyID = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 9, 21}) + oidMicrosoftCSPName = asn1.ObjectIdentifier([]int{1, 3, 6, 1, 4, 1, 311, 17, 1}) +) + +type pfxPdu struct { + Version int + AuthSafe contentInfo + MacData macData `asn1:"optional"` +} + +type contentInfo struct { + ContentType asn1.ObjectIdentifier + Content asn1.RawValue `asn1:"tag:0,explicit,optional"` +} + +type encryptedData struct { + Version int + EncryptedContentInfo encryptedContentInfo +} + +type encryptedContentInfo struct { + ContentType asn1.ObjectIdentifier + ContentEncryptionAlgorithm pkix.AlgorithmIdentifier + EncryptedContent []byte `asn1:"tag:0,optional"` +} + +func (i encryptedContentInfo) Algorithm() pkix.AlgorithmIdentifier { + return i.ContentEncryptionAlgorithm +} + +func (i encryptedContentInfo) Data() []byte { return i.EncryptedContent } + +type safeBag struct { + Id asn1.ObjectIdentifier + Value asn1.RawValue `asn1:"tag:0,explicit"` + Attributes []pkcs12Attribute `asn1:"set,optional"` +} + +type pkcs12Attribute struct { + Id asn1.ObjectIdentifier + Value asn1.RawValue `asn1:"set"` +} + +type encryptedPrivateKeyInfo struct { + AlgorithmIdentifier pkix.AlgorithmIdentifier + EncryptedData []byte +} + +func (i encryptedPrivateKeyInfo) Algorithm() pkix.AlgorithmIdentifier { + return i.AlgorithmIdentifier +} + +func (i encryptedPrivateKeyInfo) Data() []byte { + return i.EncryptedData +} + +// PEM block types +const ( + certificateType = "CERTIFICATE" + privateKeyType = "PRIVATE KEY" +) + +// unmarshal calls asn1.Unmarshal, but also returns an error if there is any +// trailing data after unmarshaling. +func unmarshal(in []byte, out interface{}) error { + trailing, err := asn1.Unmarshal(in, out) + if err != nil { + return err + } + if len(trailing) != 0 { + return errors.New("pkcs12: trailing data found") + } + return nil +} + +// ToPEM converts all "safe bags" contained in pfxData to PEM blocks. +func ToPEM(pfxData []byte, password string) ([]*pem.Block, error) { + encodedPassword, err := bmpString(password) + if err != nil { + return nil, ErrIncorrectPassword + } + + bags, encodedPassword, err := getSafeContents(pfxData, encodedPassword) + + if err != nil { + return nil, err + } + + blocks := make([]*pem.Block, 0, len(bags)) + for _, bag := range bags { + block, err := convertBag(&bag, encodedPassword) + if err != nil { + return nil, err + } + blocks = append(blocks, block) + } + + return blocks, nil +} + +func convertBag(bag *safeBag, password []byte) (*pem.Block, error) { + block := &pem.Block{ + Headers: make(map[string]string), + } + + for _, attribute := range bag.Attributes { + k, v, err := convertAttribute(&attribute) + if err != nil { + return nil, err + } + block.Headers[k] = v + } + + switch { + case bag.Id.Equal(oidCertBag): + block.Type = certificateType + certsData, err := decodeCertBag(bag.Value.Bytes) + if err != nil { + return nil, err + } + block.Bytes = certsData + case bag.Id.Equal(oidPKCS8ShroundedKeyBag): + block.Type = privateKeyType + + key, err := decodePkcs8ShroudedKeyBag(bag.Value.Bytes, password) + if err != nil { + return nil, err + } + + switch key := key.(type) { + case *rsa.PrivateKey: + block.Bytes = x509.MarshalPKCS1PrivateKey(key) + case *ecdsa.PrivateKey: + block.Bytes, err = x509.MarshalECPrivateKey(key) + if err != nil { + return nil, err + } + default: + return nil, errors.New("found unknown private key type in PKCS#8 wrapping") + } + default: + return nil, errors.New("don't know how to convert a safe bag of type " + bag.Id.String()) + } + return block, nil +} + +func convertAttribute(attribute *pkcs12Attribute) (key, value string, err error) { + isString := false + + switch { + case attribute.Id.Equal(oidFriendlyName): + key = "friendlyName" + isString = true + case attribute.Id.Equal(oidLocalKeyID): + key = "localKeyId" + case attribute.Id.Equal(oidMicrosoftCSPName): + // This key is chosen to match OpenSSL. + key = "Microsoft CSP Name" + isString = true + default: + return "", "", errors.New("pkcs12: unknown attribute with OID " + attribute.Id.String()) + } + + if isString { + if err := unmarshal(attribute.Value.Bytes, &attribute.Value); err != nil { + return "", "", err + } + if value, err = decodeBMPString(attribute.Value.Bytes); err != nil { + return "", "", err + } + } else { + var id []byte + if err := unmarshal(attribute.Value.Bytes, &id); err != nil { + return "", "", err + } + value = hex.EncodeToString(id) + } + + return key, value, nil +} + +// Decode extracts a certificate and private key from pfxData. This function +// assumes that there is only one certificate and only one private key in the +// pfxData; if there are more use ToPEM instead. +func Decode(pfxData []byte, password string) (privateKey interface{}, certificate *x509.Certificate, err error) { + encodedPassword, err := bmpString(password) + if err != nil { + return nil, nil, err + } + + bags, encodedPassword, err := getSafeContents(pfxData, encodedPassword) + if err != nil { + return nil, nil, err + } + + if len(bags) != 2 { + err = errors.New("pkcs12: expected exactly two safe bags in the PFX PDU") + return + } + + for _, bag := range bags { + switch { + case bag.Id.Equal(oidCertBag): + if certificate != nil { + err = errors.New("pkcs12: expected exactly one certificate bag") + } + + certsData, err := decodeCertBag(bag.Value.Bytes) + if err != nil { + return nil, nil, err + } + certs, err := x509.ParseCertificates(certsData) + if err != nil { + return nil, nil, err + } + if len(certs) != 1 { + err = errors.New("pkcs12: expected exactly one certificate in the certBag") + return nil, nil, err + } + certificate = certs[0] + + case bag.Id.Equal(oidPKCS8ShroundedKeyBag): + if privateKey != nil { + err = errors.New("pkcs12: expected exactly one key bag") + return nil, nil, err + } + + if privateKey, err = decodePkcs8ShroudedKeyBag(bag.Value.Bytes, encodedPassword); err != nil { + return nil, nil, err + } + } + } + + if certificate == nil { + return nil, nil, errors.New("pkcs12: certificate missing") + } + if privateKey == nil { + return nil, nil, errors.New("pkcs12: private key missing") + } + + return +} + +func getSafeContents(p12Data, password []byte) (bags []safeBag, updatedPassword []byte, err error) { + pfx := new(pfxPdu) + if err := unmarshal(p12Data, pfx); err != nil { + return nil, nil, errors.New("pkcs12: error reading P12 data: " + err.Error()) + } + + if pfx.Version != 3 { + return nil, nil, NotImplementedError("can only decode v3 PFX PDU's") + } + + if !pfx.AuthSafe.ContentType.Equal(oidDataContentType) { + return nil, nil, NotImplementedError("only password-protected PFX is implemented") + } + + // unmarshal the explicit bytes in the content for type 'data' + if err := unmarshal(pfx.AuthSafe.Content.Bytes, &pfx.AuthSafe.Content); err != nil { + return nil, nil, err + } + + if len(pfx.MacData.Mac.Algorithm.Algorithm) == 0 { + return nil, nil, errors.New("pkcs12: no MAC in data") + } + + if err := verifyMac(&pfx.MacData, pfx.AuthSafe.Content.Bytes, password); err != nil { + if err == ErrIncorrectPassword && len(password) == 2 && password[0] == 0 && password[1] == 0 { + // some implementations use an empty byte array + // for the empty string password try one more + // time with empty-empty password + password = nil + err = verifyMac(&pfx.MacData, pfx.AuthSafe.Content.Bytes, password) + } + if err != nil { + return nil, nil, err + } + } + + var authenticatedSafe []contentInfo + if err := unmarshal(pfx.AuthSafe.Content.Bytes, &authenticatedSafe); err != nil { + return nil, nil, err + } + + if len(authenticatedSafe) != 2 { + return nil, nil, NotImplementedError("expected exactly two items in the authenticated safe") + } + + for _, ci := range authenticatedSafe { + var data []byte + + switch { + case ci.ContentType.Equal(oidDataContentType): + if err := unmarshal(ci.Content.Bytes, &data); err != nil { + return nil, nil, err + } + case ci.ContentType.Equal(oidEncryptedDataContentType): + var encryptedData encryptedData + if err := unmarshal(ci.Content.Bytes, &encryptedData); err != nil { + return nil, nil, err + } + if encryptedData.Version != 0 { + return nil, nil, NotImplementedError("only version 0 of EncryptedData is supported") + } + if data, err = pbDecrypt(encryptedData.EncryptedContentInfo, password); err != nil { + return nil, nil, err + } + default: + return nil, nil, NotImplementedError("only data and encryptedData content types are supported in authenticated safe") + } + + var safeContents []safeBag + if err := unmarshal(data, &safeContents); err != nil { + return nil, nil, err + } + bags = append(bags, safeContents...) + } + + return bags, password, nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/golang.org/x/crypto/pkcs12/safebags.go b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/golang.org/x/crypto/pkcs12/safebags.go new file mode 100644 index 000000000..def1f7b98 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/golang.org/x/crypto/pkcs12/safebags.go @@ -0,0 +1,57 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package pkcs12 + +import ( + "crypto/x509" + "encoding/asn1" + "errors" +) + +var ( + // see https://tools.ietf.org/html/rfc7292#appendix-D + oidCertTypeX509Certificate = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 9, 22, 1}) + oidPKCS8ShroundedKeyBag = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 12, 10, 1, 2}) + oidCertBag = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 12, 10, 1, 3}) +) + +type certBag struct { + Id asn1.ObjectIdentifier + Data []byte `asn1:"tag:0,explicit"` +} + +func decodePkcs8ShroudedKeyBag(asn1Data, password []byte) (privateKey interface{}, err error) { + pkinfo := new(encryptedPrivateKeyInfo) + if err = unmarshal(asn1Data, pkinfo); err != nil { + return nil, errors.New("pkcs12: error decoding PKCS#8 shrouded key bag: " + err.Error()) + } + + pkData, err := pbDecrypt(pkinfo, password) + if err != nil { + return nil, errors.New("pkcs12: error decrypting PKCS#8 shrouded key bag: " + err.Error()) + } + + ret := new(asn1.RawValue) + if err = unmarshal(pkData, ret); err != nil { + return nil, errors.New("pkcs12: error unmarshaling decrypted private key: " + err.Error()) + } + + if privateKey, err = x509.ParsePKCS8PrivateKey(pkData); err != nil { + return nil, errors.New("pkcs12: error parsing PKCS#8 private key: " + err.Error()) + } + + return privateKey, nil +} + +func decodeCertBag(asn1Data []byte) (x509Certificates []byte, err error) { + bag := new(certBag) + if err := unmarshal(asn1Data, bag); err != nil { + return nil, errors.New("pkcs12: error decoding cert bag: " + err.Error()) + } + if !bag.Id.Equal(oidCertTypeX509Certificate) { + return nil, NotImplementedError("only X509 certificates are supported") + } + return bag.Data, nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/vendor.json b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/vendor.json index 774da44ff..137bb2dc9 100644 --- a/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/vendor.json +++ b/vendor/github.com/hashicorp/go-discover/provider/azure/vendor/vendor.json @@ -2,18 +2,24 @@ "comment": "", "ignore": "test", "package": [ - {"path":"github.com/Azure/azure-sdk-for-go/arm/network","checksumSHA1":"PDMRG1zVjFxDESUXBwR74V+zVHs=","revision":"a49674fdba11173ce3bc934d020634e3366464de","revisionTime":"2017-12-12T18:23:29Z"}, - {"path":"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-05-01-preview/network","checksumSHA1":"TbC3pmqxFGaynGil/kEjLyBt2Ew=","revision":"4b3cf752d4d7bf6bbf3cde9d5c4d1157098726e3","revisionTime":"2018-04-30T22:05:37Z"}, - {"path":"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network","checksumSHA1":"Fs6Gcl0nhC0FJ6MsB+Ck7r4huYo=","revision":"4b3cf752d4d7bf6bbf3cde9d5c4d1157098726e3","revisionTime":"2018-04-30T22:05:37Z"}, - {"path":"github.com/Azure/azure-sdk-for-go/version","checksumSHA1":"9XPEy8cuc26nu3Sa19xVtO8j6c4=","revision":"4b3cf752d4d7bf6bbf3cde9d5c4d1157098726e3","revisionTime":"2018-04-30T22:05:37Z"}, - {"path":"github.com/Azure/go-autorest/autorest","checksumSHA1":"MlFs4OQ2cCVlZvSeKSgpdUoLKBs=","revision":"5cdef8c5dbd65369ef90f1b8d7ea2b7348ffc862","revisionTime":"2018-04-27T22:46:30Z"}, - {"path":"github.com/Azure/go-autorest/autorest/adal","checksumSHA1":"vMERbrCV9o4TWRw4dC75uaNihSc=","revision":"5cdef8c5dbd65369ef90f1b8d7ea2b7348ffc862","revisionTime":"2018-04-27T22:46:30Z"}, - {"path":"github.com/Azure/go-autorest/autorest/azure","checksumSHA1":"vUHo41PG/G6Qq+vqD65l9KHFxUs=","revision":"5cdef8c5dbd65369ef90f1b8d7ea2b7348ffc862","revisionTime":"2018-04-27T22:46:30Z"}, - {"path":"github.com/Azure/go-autorest/autorest/date","checksumSHA1":"9nXCi9qQsYjxCeajJKWttxgEt0I=","revision":"5cdef8c5dbd65369ef90f1b8d7ea2b7348ffc862","revisionTime":"2018-04-27T22:46:30Z"}, - {"path":"github.com/Azure/go-autorest/autorest/to","checksumSHA1":"SbBb2GcJNm5GjuPKGL2777QywR4=","revision":"5cdef8c5dbd65369ef90f1b8d7ea2b7348ffc862","revisionTime":"2018-04-27T22:46:30Z"}, - {"path":"github.com/Azure/go-autorest/autorest/validation","checksumSHA1":"5UH4IFIB/98iowPCzzVs4M4MXiQ=","revision":"5cdef8c5dbd65369ef90f1b8d7ea2b7348ffc862","revisionTime":"2018-04-27T22:46:30Z"}, + {"path":"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network","checksumSHA1":"Q3ShmdeEBtLVtKCecTeg/l2BskI=","revision":"0820c0553d6c410603056869f7b0e52d61ce5bee","revisionTime":"2019-11-18T06:05:48Z"}, + {"path":"github.com/Azure/azure-sdk-for-go/version","checksumSHA1":"iTWK13IzGu+91mcKEbiBExc4bl8=","revision":"0820c0553d6c410603056869f7b0e52d61ce5bee","revisionTime":"2019-11-18T06:05:48Z"}, + {"path":"github.com/Azure/go-autorest/autorest","checksumSHA1":"aDAGv8zdDrun77KVMYPtGD9t5n4=","revision":"3492b2aff5036c67228ab3c7dba3577c871db200","revisionTime":"2019-10-28T18:08:45Z"}, + {"path":"github.com/Azure/go-autorest/autorest/adal","checksumSHA1":"+sZIvmeyhDh28yRhsXVt9+I7Dhk=","revision":"3492b2aff5036c67228ab3c7dba3577c871db200","revisionTime":"2019-10-28T18:08:45Z"}, + {"path":"github.com/Azure/go-autorest/autorest/azure","checksumSHA1":"sV4wrmfmuKvYpPRPkoPObeBC77g=","revision":"3492b2aff5036c67228ab3c7dba3577c871db200","revisionTime":"2019-10-28T18:08:45Z"}, + {"path":"github.com/Azure/go-autorest/autorest/azure/auth","checksumSHA1":"S5giB0ep3QAQtB4cQJlLiaPmcFA=","revision":"3492b2aff5036c67228ab3c7dba3577c871db200","revisionTime":"2019-10-28T18:08:45Z"}, + {"path":"github.com/Azure/go-autorest/autorest/azure/cli","checksumSHA1":"thSHLNGJe/E+o7BjGctLPb0pzK8=","revision":"3492b2aff5036c67228ab3c7dba3577c871db200","revisionTime":"2019-10-28T18:08:45Z"}, + {"path":"github.com/Azure/go-autorest/autorest/date","checksumSHA1":"I9jacF5Ym6s2GU8dpi9yUT6I1hM=","revision":"3492b2aff5036c67228ab3c7dba3577c871db200","revisionTime":"2019-10-28T18:08:45Z"}, + {"path":"github.com/Azure/go-autorest/autorest/to","checksumSHA1":"o3pFknhovwgqplUNXkr6mOpEw24=","revision":"3492b2aff5036c67228ab3c7dba3577c871db200","revisionTime":"2019-10-28T18:08:45Z"}, + {"path":"github.com/Azure/go-autorest/autorest/validation","checksumSHA1":"uh3gcvSj8u8aPYC+x4YU19Gu8Tw=","revision":"3492b2aff5036c67228ab3c7dba3577c871db200","revisionTime":"2019-10-28T18:08:45Z"}, + {"path":"github.com/Azure/go-autorest/logger","checksumSHA1":"nXtlS0uRMjqa8+dmeEqo3j3AXEo=","revision":"3492b2aff5036c67228ab3c7dba3577c871db200","revisionTime":"2019-10-28T18:08:45Z"}, + {"path":"github.com/Azure/go-autorest/tracing","checksumSHA1":"StsBozgf+C8kMv6htCiFBJbmmUw=","revision":"3492b2aff5036c67228ab3c7dba3577c871db200","revisionTime":"2019-10-28T18:08:45Z"}, {"path":"github.com/dgrijalva/jwt-go","checksumSHA1":"+TKtBzv23ywvmmqRiGEjUba4YmI=","revision":"dbeaa9332f19a944acb5736b4456cfcc02140e29","revisionTime":"2017-10-19T21:57:19Z"}, - {"path":"github.com/hashicorp/go-discover/provider/azure","checksumSHA1":"F8qQlAbbXZWigahcusD+1FOgXuU=","revision":"c7c0eb3fc6b6f8024c39cb24f3fe254a72595dd4","revisionTime":"2018-04-27T00:43:23Z"} + {"path":"github.com/dimchansky/utfbom","checksumSHA1":"L7NqEfBxi5sjuvjE8hnDimfGemA=","revision":"d2133a1ce379ef6fa992b0514a77146c60db9d1c","revisionTime":"2018-12-05T23:29:56Z"}, + {"path":"github.com/hashicorp/go-discover/provider/azure","checksumSHA1":"F8qQlAbbXZWigahcusD+1FOgXuU=","revision":"c7c0eb3fc6b6f8024c39cb24f3fe254a72595dd4","revisionTime":"2018-04-27T00:43:23Z"}, + {"path":"github.com/mitchellh/go-homedir","checksumSHA1":"7zLQC+jG19ndjH24FVh/+ZliHac=","revision":"af06845cf3004701891bf4fdb884bfe4920b3727","revisionTime":"2019-01-27T04:21:35Z"}, + {"path":"golang.org/x/crypto/pkcs12","checksumSHA1":"8ghRWpo8K3eh920FNT0h/5FtPI4=","revision":"86a70503ff7e82ffc18c7b0de83db35da4791e6a","revisionTime":"2019-11-20T00:30:15Z"}, + {"path":"golang.org/x/crypto/pkcs12/internal/rc2","checksumSHA1":"p0GC51McIdA7JygoP223twJ1s0E=","revision":"86a70503ff7e82ffc18c7b0de83db35da4791e6a","revisionTime":"2019-11-20T00:30:15Z"} ], "rootPath": "github.com/hashicorp/go-discover/provider/azure" } diff --git a/vendor/github.com/hashicorp/go-discover/provider/k8s/k8s_discover.go b/vendor/github.com/hashicorp/go-discover/provider/k8s/k8s_discover.go new file mode 100644 index 000000000..28bc8fed5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/k8s/k8s_discover.go @@ -0,0 +1,209 @@ +// Package k8s provides pod discovery for Kubernetes. +package k8s + +import ( + "fmt" + "log" + "path/filepath" + "strconv" + + "github.com/hashicorp/go-multierror" + "github.com/mitchellh/go-homedir" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/rest" + "k8s.io/client-go/tools/clientcmd" + + // Register all known auth mechanisms since we might be authenticating + // from anywhere. + _ "k8s.io/client-go/plugin/pkg/client/auth" +) + +const ( + // AnnotationKeyPort is the annotation name of the field that specifies + // the port name or number to append to the address. + AnnotationKeyPort = "consul.hashicorp.com/auto-join-port" +) + +type Provider struct{} + +func (p *Provider) Help() string { + return `Kubernetes (K8S): + + provider: "k8s" + kubeconfig: Path to the kubeconfig file. + namespace: Namespace to search for pods (defaults to "default"). + label_selector: Label selector value to filter pods. + field_selector: Field selector value to filter pods. + host_network: "true" if pod host IP and ports should be used. + + The kubeconfig file value will be searched in the following locations: + + 1. Use path from "kubeconfig" option if provided. + 2. Use path from KUBECONFIG environment variable. + 3. Use default path of $HOME/.kube/config + + By default, the Pod IP is used to join. The "host_network" option may + be set to use the Host IP. No port is used by default. Pods may set + an annotation 'hashicorp/consul-auto-join-port' to a named port or + an integer value. If the value matches a named port, that port will + be used to join. + + Note that if "host_network" is set to true, then only pods that have + a HostIP available will be selected. If a port annotation exists, then + the port must be exposed via a HostPort as well, otherwise the pod will + be ignored. +` +} + +func (p *Provider) Addrs(args map[string]string, l *log.Logger) ([]string, error) { + if args["provider"] != "k8s" { + return nil, fmt.Errorf("discover-k8s: invalid provider " + args["provider"]) + } + + // Get the configuration. This can come from multiple sources. We first + // try kubeconfig it is set directly, then we fall back to in-cluster + // auth. Finally, we try the default kubeconfig path. + kubeconfig := args["kubeconfig"] + if kubeconfig == "" { + // If kubeconfig is empty, let's first try the default directory. + // This is must faster than trying in-cluster auth so we try this + // first. + dir, err := homedir.Dir() + if err != nil { + return nil, fmt.Errorf("discover-k8s: error retrieving home directory: %s", err) + } + kubeconfig = filepath.Join(dir, ".kube", "config") + } + + // First try to get the configuration from the kubeconfig value + config, configErr := clientcmd.BuildConfigFromFlags("", kubeconfig) + if configErr != nil { + configErr = fmt.Errorf("discover-k8s: error loading kubeconfig: %s", configErr) + + // kubeconfig failed, fall back and try in-cluster config. We do + // this as the fallback since this makes network connections and + // is much slower to fail. + var err error + config, err = rest.InClusterConfig() + if err != nil { + return nil, multierror.Append(configErr, fmt.Errorf( + "discover-k8s: error loading in-cluster config: %s", err)) + } + } + + // Initialize the clientset + clientset, err := kubernetes.NewForConfig(config) + if err != nil { + return nil, fmt.Errorf("discover-k8s: error initializing k8s client: %s", err) + } + + namespace := args["namespace"] + if namespace == "" { + namespace = "default" + } + + // List all the pods based on the filters we requested + pods, err := clientset.CoreV1().Pods(namespace).List(metav1.ListOptions{ + LabelSelector: args["label_selector"], + FieldSelector: args["field_selector"], + }) + if err != nil { + return nil, fmt.Errorf("discover-k8s: error listing pods: %s", err) + } + + return PodAddrs(pods, args, l) +} + +// PodAddrs extracts the addresses from a list of pods. +// +// This is a separate method so that we can unit test this without having +// to setup complicated K8S cluster scenarios. It shouldn't generally be +// called externally. +func PodAddrs(pods *corev1.PodList, args map[string]string, l *log.Logger) ([]string, error) { + hostNetwork := false + if v := args["host_network"]; v != "" { + var err error + hostNetwork, err = strconv.ParseBool(v) + if err != nil { + return nil, fmt.Errorf("discover-k8s: host_network must be boolean value: %s", err) + } + } + + var addrs []string +PodLoop: + for _, pod := range pods.Items { + if pod.Status.Phase != corev1.PodRunning { + l.Printf("[DEBUG] discover-k8s: ignoring pod %q, not running: %q", + pod.Name, pod.Status.Phase) + continue + } + + // If there is a Ready condition available, we need that to be true. + // If no ready condition is set, then we accept this pod regardless. + for _, condition := range pod.Status.Conditions { + if condition.Type == corev1.PodReady && condition.Status != corev1.ConditionTrue { + l.Printf("[DEBUG] discover-k8s: ignoring pod %q, not ready state", pod.Name) + continue PodLoop + } + } + + // Get the IP address that we will join. + addr := pod.Status.PodIP + if hostNetwork { + addr = pod.Status.HostIP + } + if addr == "" { + // This can be empty according to the API docs, so we protect that. + l.Printf("[DEBUG] discover-k8s: ignoring pod %q, requested IP is empty", pod.Name) + continue + } + + // We only use the port if it is specified as an annotation. The + // annotation value can be a name or a number. + if v := pod.Annotations[AnnotationKeyPort]; v != "" { + port, err := podPort(&pod, v, hostNetwork) + if err != nil { + l.Printf("[DEBUG] discover-k8s: ignoring pod %q, error retrieving port: %s", + pod.Name, err) + continue + } + + addr = fmt.Sprintf("%s:%d", addr, port) + } + + addrs = append(addrs, addr) + } + + return addrs, nil +} + +// podPort extracts the proper port for the address from the given pod +// for a non-empty annotation. +// +// Pre-condition: annotation is non-empty +func podPort(pod *corev1.Pod, annotation string, host bool) (int32, error) { + // First look for a matching port matching the value of the annotation. + for _, container := range pod.Spec.Containers { + for _, portDef := range container.Ports { + if portDef.Name == annotation { + if host { + // It is possible for HostPort to be zero, if that is the + // case then we ignore this port. + if portDef.HostPort == 0 { + continue + } + + return portDef.HostPort, nil + } + + return portDef.ContainerPort, nil + } + } + } + + // Otherwise assume that the port is a numeric value. + v, err := strconv.ParseInt(annotation, 0, 32) + return int32(v), err +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/k8s/k8s_discover_test.go b/vendor/github.com/hashicorp/go-discover/provider/k8s/k8s_discover_test.go new file mode 100644 index 000000000..f6714f3d0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/k8s/k8s_discover_test.go @@ -0,0 +1,320 @@ +package k8s_test + +import ( + "log" + "os" + "path/filepath" + "reflect" + "testing" + + discover "github.com/hashicorp/go-discover" + "github.com/hashicorp/go-discover/provider/k8s" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +var _ discover.Provider = (*k8s.Provider)(nil) + +// Acceptance test against a real cluster +func TestAcc(t *testing.T) { + path := "../../test/tf/k8s/kubeconfig.yaml" + path, err := filepath.Abs(path) + if err != nil { + t.Fatalf("err: %s", err) + } + + if _, err := os.Stat(path); err != nil { + t.Skipf("Skipping, can't find %q: %s", path, err) + return + } + + args := discover.Config{ + "provider": "k8s", + "kubeconfig": path, + "label_selector": "app = valid", + } + + l := log.New(os.Stderr, "", log.LstdFlags) + p := &k8s.Provider{} + addrs, err := p.Addrs(args, l) + if err != nil { + t.Fatal(err) + } + t.Logf("Addrs: %v", addrs) + if len(addrs) != 3 { + t.Fatalf("bad: %v", addrs) + } +} + +func TestPodAddrs(t *testing.T) { + cases := []struct { + Name string + Args map[string]string + Pods []corev1.Pod + Expected []string + }{ + { + "Simple pods (no ready, no annotations, etc.)", + nil, + []corev1.Pod{ + corev1.Pod{ + Status: corev1.PodStatus{ + Phase: corev1.PodRunning, + PodIP: "1.2.3.4", + HostIP: "2.3.4.5", + }, + }, + }, + []string{"1.2.3.4"}, + }, + + { + "Simple pods host network", + map[string]string{"host_network": "true"}, + []corev1.Pod{ + corev1.Pod{ + Status: corev1.PodStatus{ + Phase: corev1.PodRunning, + PodIP: "1.2.3.4", + HostIP: "2.3.4.5", + }, + }, + }, + []string{"2.3.4.5"}, + }, + + { + "Only running pods", + nil, + []corev1.Pod{ + corev1.Pod{ + Status: corev1.PodStatus{ + Phase: corev1.PodPending, + PodIP: "2.3.4.5", + }, + }, + + corev1.Pod{ + Status: corev1.PodStatus{ + Phase: corev1.PodRunning, + PodIP: "1.2.3.4", + }, + }, + }, + []string{"1.2.3.4"}, + }, + + { + "Only pods that are ready", + nil, + []corev1.Pod{ + corev1.Pod{ + Status: corev1.PodStatus{ + Phase: corev1.PodPending, + PodIP: "2.3.4.5", + }, + }, + + corev1.Pod{ + Status: corev1.PodStatus{ + Phase: corev1.PodRunning, + PodIP: "ready", + Conditions: []corev1.PodCondition{ + corev1.PodCondition{ + Type: corev1.PodReady, + Status: corev1.ConditionTrue, + }, + }, + }, + }, + + // Not true + corev1.Pod{ + Status: corev1.PodStatus{ + Phase: corev1.PodRunning, + PodIP: "not-ready", + Conditions: []corev1.PodCondition{ + corev1.PodCondition{ + Type: corev1.PodReady, + Status: corev1.ConditionUnknown, + }, + }, + }, + }, + + // Not ready type, ignored + corev1.Pod{ + Status: corev1.PodStatus{ + Phase: corev1.PodRunning, + PodIP: "scheduled", + Conditions: []corev1.PodCondition{ + corev1.PodCondition{ + Type: corev1.PodScheduled, + Status: corev1.ConditionUnknown, + }, + }, + }, + }, + }, + []string{"ready", "scheduled"}, + }, + + { + "Port annotation (named)", + nil, + []corev1.Pod{ + corev1.Pod{ + Status: corev1.PodStatus{ + Phase: corev1.PodRunning, + PodIP: "1.2.3.4", + }, + + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + corev1.Container{ + Ports: []corev1.ContainerPort{ + corev1.ContainerPort{ + Name: "my-port", + HostPort: 1234, + ContainerPort: 8500, + }, + + corev1.ContainerPort{ + Name: "http", + HostPort: 80, + ContainerPort: 8080, + }, + }, + }, + }, + }, + + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + k8s.AnnotationKeyPort: "my-port", + }, + }, + }, + }, + []string{"1.2.3.4:8500"}, + }, + + { + "Port annotation (named with host network)", + map[string]string{"host_network": "true"}, + []corev1.Pod{ + corev1.Pod{ + Status: corev1.PodStatus{ + Phase: corev1.PodRunning, + PodIP: "1.2.3.4", + HostIP: "2.3.4.5", + }, + + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + corev1.Container{ + Ports: []corev1.ContainerPort{ + corev1.ContainerPort{ + Name: "http", + HostPort: 80, + ContainerPort: 8080, + }, + }, + }, + }, + }, + + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + k8s.AnnotationKeyPort: "http", + }, + }, + }, + }, + []string{"2.3.4.5:80"}, + }, + + { + "Port annotation (direct)", + nil, + []corev1.Pod{ + corev1.Pod{ + Status: corev1.PodStatus{ + Phase: corev1.PodRunning, + PodIP: "1.2.3.4", + }, + + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + corev1.Container{ + Ports: []corev1.ContainerPort{ + corev1.ContainerPort{ + Name: "http", + HostPort: 80, + ContainerPort: 8080, + }, + }, + }, + }, + }, + + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + k8s.AnnotationKeyPort: "4600", + }, + }, + }, + }, + []string{"1.2.3.4:4600"}, + }, + + { + "Port annotation (direct with host network)", + map[string]string{"host_network": "true"}, + []corev1.Pod{ + corev1.Pod{ + Status: corev1.PodStatus{ + Phase: corev1.PodRunning, + PodIP: "1.2.3.4", + HostIP: "2.3.4.5", + }, + + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + corev1.Container{ + Ports: []corev1.ContainerPort{ + corev1.ContainerPort{ + Name: "http", + HostPort: 80, + ContainerPort: 8080, + }, + }, + }, + }, + }, + + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + k8s.AnnotationKeyPort: "4600", + }, + }, + }, + }, + []string{"2.3.4.5:4600"}, + }, + } + + for _, tt := range cases { + t.Run(tt.Name, func(t *testing.T) { + l := log.New(os.Stderr, "", log.LstdFlags) + addrs, err := k8s.PodAddrs(&corev1.PodList{Items: tt.Pods}, tt.Args, l) + if err != nil { + t.Fatalf("err: %s", err) + } + + if !reflect.DeepEqual(addrs, tt.Expected) { + t.Fatalf("bad: %#v", addrs) + } + }) + } +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/linode_discover.go b/vendor/github.com/hashicorp/go-discover/provider/linode/linode_discover.go new file mode 100644 index 000000000..7322dab34 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/linode_discover.go @@ -0,0 +1,142 @@ +// Package linode provides node discovery for Linode. +package linode + +import ( + "context" + "encoding/json" + "fmt" + "io/ioutil" + "log" + "net/http" + "os" + + "github.com/linode/linodego" + "golang.org/x/oauth2" +) + +type Filter struct { + Region string `json:"region,omitempty"` + Tag string `json:"tags,omitempty"` +} + +type Provider struct { + userAgent string +} + +func (p *Provider) SetUserAgent(s string) { + p.userAgent = s +} + +func (p *Provider) Help() string { + return `Linode: + provider: "linode" + api_token: The Linode API token to use + region: The Linode region to filter on + tag_name: The tag name to filter on + address_type: "private_v4", "public_v4", "private_v6" or "public_v6". (default: "private_v4") + + Variables can also be provided by environment variables: + export LINODE_TOKEN for api_token +` +} + +func (p *Provider) Addrs(args map[string]string, l *log.Logger) ([]string, error) { + if args["provider"] != "linode" { + return nil, fmt.Errorf("discover-linode: invalid provider " + args["provider"]) + } + + if l == nil { + l = log.New(ioutil.Discard, "", 0) + } + + addressType := args["address_type"] + region := args["region"] + tagName := args["tag_name"] + apiToken := argsOrEnv(args, "api_token", "LINODE_TOKEN") + l.Printf("[DEBUG] discover-linode: Using address_type=%s region=%s tag_name=%s", addressType, region, tagName) + + client := getLinodeClient(p.userAgent, apiToken) + + filters := Filter{ + Region: "", + Tag: "", + } + + if region != "" { + filters.Region = region + } + if tagName != "" { + filters.Tag = tagName + } + + jsonFilters, _ := json.Marshal(filters) + filterOpt := linodego.ListOptions{Filter: string(jsonFilters)} + + linodes, err := client.ListInstances(context.Background(), &filterOpt) + if err != nil { + return nil, fmt.Errorf("discover-linode: Fetching Linode instances failed: %s", err) + } + + var addrs []string + for _, linode := range linodes { + addr, err := client.GetInstanceIPAddresses(context.Background(), linode.ID) + if err != nil { + return nil, fmt.Errorf("discover-linode: Fetching Linode IP address for instance %v failed: %s", linode.ID, err) + } + + switch addressType { + case "public_v4": + if len(addr.IPv4.Public) == 0 { + break + } + addrs = append(addrs, addr.IPv4.Public[0].Address) + case "private_v4": + if len(addr.IPv4.Private) == 0 { + break + } + addrs = append(addrs, addr.IPv4.Private[0].Address) + case "public_v6": + if addr.IPv6.SLAAC.Address == "" { + break + } + addrs = append(addrs, addr.IPv6.SLAAC.Address) + case "private_v6": + if addr.IPv6.LinkLocal.Address == "" { + break + } + addrs = append(addrs, addr.IPv6.LinkLocal.Address) + default: + if len(addr.IPv4.Private) == 0 { + break + } + addrs = append(addrs, addr.IPv4.Private[0].Address) + } + } + + return addrs, nil +} + +func getLinodeClient(userAgent, apiToken string) linodego.Client { + tokenSource := oauth2.StaticTokenSource(&oauth2.Token{AccessToken: apiToken}) + + oauth2Client := &http.Client{ + Transport: &oauth2.Transport{ + Source: tokenSource, + }, + } + + client := linodego.NewClient(oauth2Client) + + if userAgent != "" { + client.SetUserAgent(userAgent) + } + + return client +} + +func argsOrEnv(args map[string]string, key, env string) string { + if value := args[key]; value != "" { + return value + } + return os.Getenv(env) +} diff --git a/vendor/github.com/golang/protobuf/LICENSE b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/LICENSE similarity index 93% rename from vendor/github.com/golang/protobuf/LICENSE rename to vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/LICENSE index 1b1b1921e..0f646931a 100644 --- a/vendor/github.com/golang/protobuf/LICENSE +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/LICENSE @@ -1,7 +1,4 @@ -Go support for Protocol Buffers - Google's data interchange format - Copyright 2010 The Go Authors. All rights reserved. -https://github.com/golang/protobuf Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/clone.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/clone.go new file mode 100644 index 000000000..3cd3249f7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/clone.go @@ -0,0 +1,253 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2011 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Protocol buffer deep copy and merge. +// TODO: RawMessage. + +package proto + +import ( + "fmt" + "log" + "reflect" + "strings" +) + +// Clone returns a deep copy of a protocol buffer. +func Clone(src Message) Message { + in := reflect.ValueOf(src) + if in.IsNil() { + return src + } + out := reflect.New(in.Type().Elem()) + dst := out.Interface().(Message) + Merge(dst, src) + return dst +} + +// Merger is the interface representing objects that can merge messages of the same type. +type Merger interface { + // Merge merges src into this message. + // Required and optional fields that are set in src will be set to that value in dst. + // Elements of repeated fields will be appended. + // + // Merge may panic if called with a different argument type than the receiver. + Merge(src Message) +} + +// generatedMerger is the custom merge method that generated protos will have. +// We must add this method since a generate Merge method will conflict with +// many existing protos that have a Merge data field already defined. +type generatedMerger interface { + XXX_Merge(src Message) +} + +// Merge merges src into dst. +// Required and optional fields that are set in src will be set to that value in dst. +// Elements of repeated fields will be appended. +// Merge panics if src and dst are not the same type, or if dst is nil. +func Merge(dst, src Message) { + if m, ok := dst.(Merger); ok { + m.Merge(src) + return + } + + in := reflect.ValueOf(src) + out := reflect.ValueOf(dst) + if out.IsNil() { + panic("proto: nil destination") + } + if in.Type() != out.Type() { + panic(fmt.Sprintf("proto.Merge(%T, %T) type mismatch", dst, src)) + } + if in.IsNil() { + return // Merge from nil src is a noop + } + if m, ok := dst.(generatedMerger); ok { + m.XXX_Merge(src) + return + } + mergeStruct(out.Elem(), in.Elem()) +} + +func mergeStruct(out, in reflect.Value) { + sprop := GetProperties(in.Type()) + for i := 0; i < in.NumField(); i++ { + f := in.Type().Field(i) + if strings.HasPrefix(f.Name, "XXX_") { + continue + } + mergeAny(out.Field(i), in.Field(i), false, sprop.Prop[i]) + } + + if emIn, err := extendable(in.Addr().Interface()); err == nil { + emOut, _ := extendable(out.Addr().Interface()) + mIn, muIn := emIn.extensionsRead() + if mIn != nil { + mOut := emOut.extensionsWrite() + muIn.Lock() + mergeExtension(mOut, mIn) + muIn.Unlock() + } + } + + uf := in.FieldByName("XXX_unrecognized") + if !uf.IsValid() { + return + } + uin := uf.Bytes() + if len(uin) > 0 { + out.FieldByName("XXX_unrecognized").SetBytes(append([]byte(nil), uin...)) + } +} + +// mergeAny performs a merge between two values of the same type. +// viaPtr indicates whether the values were indirected through a pointer (implying proto2). +// prop is set if this is a struct field (it may be nil). +func mergeAny(out, in reflect.Value, viaPtr bool, prop *Properties) { + if in.Type() == protoMessageType { + if !in.IsNil() { + if out.IsNil() { + out.Set(reflect.ValueOf(Clone(in.Interface().(Message)))) + } else { + Merge(out.Interface().(Message), in.Interface().(Message)) + } + } + return + } + switch in.Kind() { + case reflect.Bool, reflect.Float32, reflect.Float64, reflect.Int32, reflect.Int64, + reflect.String, reflect.Uint32, reflect.Uint64: + if !viaPtr && isProto3Zero(in) { + return + } + out.Set(in) + case reflect.Interface: + // Probably a oneof field; copy non-nil values. + if in.IsNil() { + return + } + // Allocate destination if it is not set, or set to a different type. + // Otherwise we will merge as normal. + if out.IsNil() || out.Elem().Type() != in.Elem().Type() { + out.Set(reflect.New(in.Elem().Elem().Type())) // interface -> *T -> T -> new(T) + } + mergeAny(out.Elem(), in.Elem(), false, nil) + case reflect.Map: + if in.Len() == 0 { + return + } + if out.IsNil() { + out.Set(reflect.MakeMap(in.Type())) + } + // For maps with value types of *T or []byte we need to deep copy each value. + elemKind := in.Type().Elem().Kind() + for _, key := range in.MapKeys() { + var val reflect.Value + switch elemKind { + case reflect.Ptr: + val = reflect.New(in.Type().Elem().Elem()) + mergeAny(val, in.MapIndex(key), false, nil) + case reflect.Slice: + val = in.MapIndex(key) + val = reflect.ValueOf(append([]byte{}, val.Bytes()...)) + default: + val = in.MapIndex(key) + } + out.SetMapIndex(key, val) + } + case reflect.Ptr: + if in.IsNil() { + return + } + if out.IsNil() { + out.Set(reflect.New(in.Elem().Type())) + } + mergeAny(out.Elem(), in.Elem(), true, nil) + case reflect.Slice: + if in.IsNil() { + return + } + if in.Type().Elem().Kind() == reflect.Uint8 { + // []byte is a scalar bytes field, not a repeated field. + + // Edge case: if this is in a proto3 message, a zero length + // bytes field is considered the zero value, and should not + // be merged. + if prop != nil && prop.proto3 && in.Len() == 0 { + return + } + + // Make a deep copy. + // Append to []byte{} instead of []byte(nil) so that we never end up + // with a nil result. + out.SetBytes(append([]byte{}, in.Bytes()...)) + return + } + n := in.Len() + if out.IsNil() { + out.Set(reflect.MakeSlice(in.Type(), 0, n)) + } + switch in.Type().Elem().Kind() { + case reflect.Bool, reflect.Float32, reflect.Float64, reflect.Int32, reflect.Int64, + reflect.String, reflect.Uint32, reflect.Uint64: + out.Set(reflect.AppendSlice(out, in)) + default: + for i := 0; i < n; i++ { + x := reflect.Indirect(reflect.New(in.Type().Elem())) + mergeAny(x, in.Index(i), false, nil) + out.Set(reflect.Append(out, x)) + } + } + case reflect.Struct: + mergeStruct(out, in) + default: + // unknown type, so not a protocol buffer + log.Printf("proto: don't know how to copy %v", in) + } +} + +func mergeExtension(out, in map[int32]Extension) { + for extNum, eIn := range in { + eOut := Extension{desc: eIn.desc} + if eIn.value != nil { + v := reflect.New(reflect.TypeOf(eIn.value)).Elem() + mergeAny(v, reflect.ValueOf(eIn.value), false, nil) + eOut.value = v.Interface() + } + if eIn.enc != nil { + eOut.enc = make([]byte, len(eIn.enc)) + copy(eOut.enc, eIn.enc) + } + + out[extNum] = eOut + } +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/decode.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/decode.go new file mode 100644 index 000000000..63b0f08be --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/decode.go @@ -0,0 +1,427 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +/* + * Routines for decoding protocol buffer data to construct in-memory representations. + */ + +import ( + "errors" + "fmt" + "io" +) + +// errOverflow is returned when an integer is too large to be represented. +var errOverflow = errors.New("proto: integer overflow") + +// ErrInternalBadWireType is returned by generated code when an incorrect +// wire type is encountered. It does not get returned to user code. +var ErrInternalBadWireType = errors.New("proto: internal error: bad wiretype for oneof") + +// DecodeVarint reads a varint-encoded integer from the slice. +// It returns the integer and the number of bytes consumed, or +// zero if there is not enough. +// This is the format for the +// int32, int64, uint32, uint64, bool, and enum +// protocol buffer types. +func DecodeVarint(buf []byte) (x uint64, n int) { + for shift := uint(0); shift < 64; shift += 7 { + if n >= len(buf) { + return 0, 0 + } + b := uint64(buf[n]) + n++ + x |= (b & 0x7F) << shift + if (b & 0x80) == 0 { + return x, n + } + } + + // The number is too large to represent in a 64-bit value. + return 0, 0 +} + +func (p *Buffer) decodeVarintSlow() (x uint64, err error) { + i := p.index + l := len(p.buf) + + for shift := uint(0); shift < 64; shift += 7 { + if i >= l { + err = io.ErrUnexpectedEOF + return + } + b := p.buf[i] + i++ + x |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + p.index = i + return + } + } + + // The number is too large to represent in a 64-bit value. + err = errOverflow + return +} + +// DecodeVarint reads a varint-encoded integer from the Buffer. +// This is the format for the +// int32, int64, uint32, uint64, bool, and enum +// protocol buffer types. +func (p *Buffer) DecodeVarint() (x uint64, err error) { + i := p.index + buf := p.buf + + if i >= len(buf) { + return 0, io.ErrUnexpectedEOF + } else if buf[i] < 0x80 { + p.index++ + return uint64(buf[i]), nil + } else if len(buf)-i < 10 { + return p.decodeVarintSlow() + } + + var b uint64 + // we already checked the first byte + x = uint64(buf[i]) - 0x80 + i++ + + b = uint64(buf[i]) + i++ + x += b << 7 + if b&0x80 == 0 { + goto done + } + x -= 0x80 << 7 + + b = uint64(buf[i]) + i++ + x += b << 14 + if b&0x80 == 0 { + goto done + } + x -= 0x80 << 14 + + b = uint64(buf[i]) + i++ + x += b << 21 + if b&0x80 == 0 { + goto done + } + x -= 0x80 << 21 + + b = uint64(buf[i]) + i++ + x += b << 28 + if b&0x80 == 0 { + goto done + } + x -= 0x80 << 28 + + b = uint64(buf[i]) + i++ + x += b << 35 + if b&0x80 == 0 { + goto done + } + x -= 0x80 << 35 + + b = uint64(buf[i]) + i++ + x += b << 42 + if b&0x80 == 0 { + goto done + } + x -= 0x80 << 42 + + b = uint64(buf[i]) + i++ + x += b << 49 + if b&0x80 == 0 { + goto done + } + x -= 0x80 << 49 + + b = uint64(buf[i]) + i++ + x += b << 56 + if b&0x80 == 0 { + goto done + } + x -= 0x80 << 56 + + b = uint64(buf[i]) + i++ + x += b << 63 + if b&0x80 == 0 { + goto done + } + + return 0, errOverflow + +done: + p.index = i + return x, nil +} + +// DecodeFixed64 reads a 64-bit integer from the Buffer. +// This is the format for the +// fixed64, sfixed64, and double protocol buffer types. +func (p *Buffer) DecodeFixed64() (x uint64, err error) { + // x, err already 0 + i := p.index + 8 + if i < 0 || i > len(p.buf) { + err = io.ErrUnexpectedEOF + return + } + p.index = i + + x = uint64(p.buf[i-8]) + x |= uint64(p.buf[i-7]) << 8 + x |= uint64(p.buf[i-6]) << 16 + x |= uint64(p.buf[i-5]) << 24 + x |= uint64(p.buf[i-4]) << 32 + x |= uint64(p.buf[i-3]) << 40 + x |= uint64(p.buf[i-2]) << 48 + x |= uint64(p.buf[i-1]) << 56 + return +} + +// DecodeFixed32 reads a 32-bit integer from the Buffer. +// This is the format for the +// fixed32, sfixed32, and float protocol buffer types. +func (p *Buffer) DecodeFixed32() (x uint64, err error) { + // x, err already 0 + i := p.index + 4 + if i < 0 || i > len(p.buf) { + err = io.ErrUnexpectedEOF + return + } + p.index = i + + x = uint64(p.buf[i-4]) + x |= uint64(p.buf[i-3]) << 8 + x |= uint64(p.buf[i-2]) << 16 + x |= uint64(p.buf[i-1]) << 24 + return +} + +// DecodeZigzag64 reads a zigzag-encoded 64-bit integer +// from the Buffer. +// This is the format used for the sint64 protocol buffer type. +func (p *Buffer) DecodeZigzag64() (x uint64, err error) { + x, err = p.DecodeVarint() + if err != nil { + return + } + x = (x >> 1) ^ uint64((int64(x&1)<<63)>>63) + return +} + +// DecodeZigzag32 reads a zigzag-encoded 32-bit integer +// from the Buffer. +// This is the format used for the sint32 protocol buffer type. +func (p *Buffer) DecodeZigzag32() (x uint64, err error) { + x, err = p.DecodeVarint() + if err != nil { + return + } + x = uint64((uint32(x) >> 1) ^ uint32((int32(x&1)<<31)>>31)) + return +} + +// DecodeRawBytes reads a count-delimited byte buffer from the Buffer. +// This is the format used for the bytes protocol buffer +// type and for embedded messages. +func (p *Buffer) DecodeRawBytes(alloc bool) (buf []byte, err error) { + n, err := p.DecodeVarint() + if err != nil { + return nil, err + } + + nb := int(n) + if nb < 0 { + return nil, fmt.Errorf("proto: bad byte length %d", nb) + } + end := p.index + nb + if end < p.index || end > len(p.buf) { + return nil, io.ErrUnexpectedEOF + } + + if !alloc { + // todo: check if can get more uses of alloc=false + buf = p.buf[p.index:end] + p.index += nb + return + } + + buf = make([]byte, nb) + copy(buf, p.buf[p.index:]) + p.index += nb + return +} + +// DecodeStringBytes reads an encoded string from the Buffer. +// This is the format used for the proto2 string type. +func (p *Buffer) DecodeStringBytes() (s string, err error) { + buf, err := p.DecodeRawBytes(false) + if err != nil { + return + } + return string(buf), nil +} + +// Unmarshaler is the interface representing objects that can +// unmarshal themselves. The argument points to data that may be +// overwritten, so implementations should not keep references to the +// buffer. +// Unmarshal implementations should not clear the receiver. +// Any unmarshaled data should be merged into the receiver. +// Callers of Unmarshal that do not want to retain existing data +// should Reset the receiver before calling Unmarshal. +type Unmarshaler interface { + Unmarshal([]byte) error +} + +// newUnmarshaler is the interface representing objects that can +// unmarshal themselves. The semantics are identical to Unmarshaler. +// +// This exists to support protoc-gen-go generated messages. +// The proto package will stop type-asserting to this interface in the future. +// +// DO NOT DEPEND ON THIS. +type newUnmarshaler interface { + XXX_Unmarshal([]byte) error +} + +// Unmarshal parses the protocol buffer representation in buf and places the +// decoded result in pb. If the struct underlying pb does not match +// the data in buf, the results can be unpredictable. +// +// Unmarshal resets pb before starting to unmarshal, so any +// existing data in pb is always removed. Use UnmarshalMerge +// to preserve and append to existing data. +func Unmarshal(buf []byte, pb Message) error { + pb.Reset() + if u, ok := pb.(newUnmarshaler); ok { + return u.XXX_Unmarshal(buf) + } + if u, ok := pb.(Unmarshaler); ok { + return u.Unmarshal(buf) + } + return NewBuffer(buf).Unmarshal(pb) +} + +// UnmarshalMerge parses the protocol buffer representation in buf and +// writes the decoded result to pb. If the struct underlying pb does not match +// the data in buf, the results can be unpredictable. +// +// UnmarshalMerge merges into existing data in pb. +// Most code should use Unmarshal instead. +func UnmarshalMerge(buf []byte, pb Message) error { + if u, ok := pb.(newUnmarshaler); ok { + return u.XXX_Unmarshal(buf) + } + if u, ok := pb.(Unmarshaler); ok { + // NOTE: The history of proto have unfortunately been inconsistent + // whether Unmarshaler should or should not implicitly clear itself. + // Some implementations do, most do not. + // Thus, calling this here may or may not do what people want. + // + // See https://github.com/golang/protobuf/issues/424 + return u.Unmarshal(buf) + } + return NewBuffer(buf).Unmarshal(pb) +} + +// DecodeMessage reads a count-delimited message from the Buffer. +func (p *Buffer) DecodeMessage(pb Message) error { + enc, err := p.DecodeRawBytes(false) + if err != nil { + return err + } + return NewBuffer(enc).Unmarshal(pb) +} + +// DecodeGroup reads a tag-delimited group from the Buffer. +// StartGroup tag is already consumed. This function consumes +// EndGroup tag. +func (p *Buffer) DecodeGroup(pb Message) error { + b := p.buf[p.index:] + x, y := findEndGroup(b) + if x < 0 { + return io.ErrUnexpectedEOF + } + err := Unmarshal(b[:x], pb) + p.index += y + return err +} + +// Unmarshal parses the protocol buffer representation in the +// Buffer and places the decoded result in pb. If the struct +// underlying pb does not match the data in the buffer, the results can be +// unpredictable. +// +// Unlike proto.Unmarshal, this does not reset pb before starting to unmarshal. +func (p *Buffer) Unmarshal(pb Message) error { + // If the object can unmarshal itself, let it. + if u, ok := pb.(newUnmarshaler); ok { + err := u.XXX_Unmarshal(p.buf[p.index:]) + p.index = len(p.buf) + return err + } + if u, ok := pb.(Unmarshaler); ok { + // NOTE: The history of proto have unfortunately been inconsistent + // whether Unmarshaler should or should not implicitly clear itself. + // Some implementations do, most do not. + // Thus, calling this here may or may not do what people want. + // + // See https://github.com/golang/protobuf/issues/424 + err := u.Unmarshal(p.buf[p.index:]) + p.index = len(p.buf) + return err + } + + // Slow workaround for messages that aren't Unmarshalers. + // This includes some hand-coded .pb.go files and + // bootstrap protos. + // TODO: fix all of those and then add Unmarshal to + // the Message interface. Then: + // The cast above and code below can be deleted. + // The old unmarshaler can be deleted. + // Clients can call Unmarshal directly (can already do that, actually). + var info InternalMessageInfo + err := info.Unmarshal(pb, p.buf[p.index:]) + p.index = len(p.buf) + return err +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/deprecated.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/deprecated.go new file mode 100644 index 000000000..35b882c09 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/deprecated.go @@ -0,0 +1,63 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2018 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +import "errors" + +// Deprecated: do not use. +type Stats struct{ Emalloc, Dmalloc, Encode, Decode, Chit, Cmiss, Size uint64 } + +// Deprecated: do not use. +func GetStats() Stats { return Stats{} } + +// Deprecated: do not use. +func MarshalMessageSet(interface{}) ([]byte, error) { + return nil, errors.New("proto: not implemented") +} + +// Deprecated: do not use. +func UnmarshalMessageSet([]byte, interface{}) error { + return errors.New("proto: not implemented") +} + +// Deprecated: do not use. +func MarshalMessageSetJSON(interface{}) ([]byte, error) { + return nil, errors.New("proto: not implemented") +} + +// Deprecated: do not use. +func UnmarshalMessageSetJSON([]byte, interface{}) error { + return errors.New("proto: not implemented") +} + +// Deprecated: do not use. +func RegisterMessageSetType(Message, int32, string) {} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/discard.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/discard.go new file mode 100644 index 000000000..dea2617ce --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/discard.go @@ -0,0 +1,350 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2017 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +import ( + "fmt" + "reflect" + "strings" + "sync" + "sync/atomic" +) + +type generatedDiscarder interface { + XXX_DiscardUnknown() +} + +// DiscardUnknown recursively discards all unknown fields from this message +// and all embedded messages. +// +// When unmarshaling a message with unrecognized fields, the tags and values +// of such fields are preserved in the Message. This allows a later call to +// marshal to be able to produce a message that continues to have those +// unrecognized fields. To avoid this, DiscardUnknown is used to +// explicitly clear the unknown fields after unmarshaling. +// +// For proto2 messages, the unknown fields of message extensions are only +// discarded from messages that have been accessed via GetExtension. +func DiscardUnknown(m Message) { + if m, ok := m.(generatedDiscarder); ok { + m.XXX_DiscardUnknown() + return + } + // TODO: Dynamically populate a InternalMessageInfo for legacy messages, + // but the master branch has no implementation for InternalMessageInfo, + // so it would be more work to replicate that approach. + discardLegacy(m) +} + +// DiscardUnknown recursively discards all unknown fields. +func (a *InternalMessageInfo) DiscardUnknown(m Message) { + di := atomicLoadDiscardInfo(&a.discard) + if di == nil { + di = getDiscardInfo(reflect.TypeOf(m).Elem()) + atomicStoreDiscardInfo(&a.discard, di) + } + di.discard(toPointer(&m)) +} + +type discardInfo struct { + typ reflect.Type + + initialized int32 // 0: only typ is valid, 1: everything is valid + lock sync.Mutex + + fields []discardFieldInfo + unrecognized field +} + +type discardFieldInfo struct { + field field // Offset of field, guaranteed to be valid + discard func(src pointer) +} + +var ( + discardInfoMap = map[reflect.Type]*discardInfo{} + discardInfoLock sync.Mutex +) + +func getDiscardInfo(t reflect.Type) *discardInfo { + discardInfoLock.Lock() + defer discardInfoLock.Unlock() + di := discardInfoMap[t] + if di == nil { + di = &discardInfo{typ: t} + discardInfoMap[t] = di + } + return di +} + +func (di *discardInfo) discard(src pointer) { + if src.isNil() { + return // Nothing to do. + } + + if atomic.LoadInt32(&di.initialized) == 0 { + di.computeDiscardInfo() + } + + for _, fi := range di.fields { + sfp := src.offset(fi.field) + fi.discard(sfp) + } + + // For proto2 messages, only discard unknown fields in message extensions + // that have been accessed via GetExtension. + if em, err := extendable(src.asPointerTo(di.typ).Interface()); err == nil { + // Ignore lock since DiscardUnknown is not concurrency safe. + emm, _ := em.extensionsRead() + for _, mx := range emm { + if m, ok := mx.value.(Message); ok { + DiscardUnknown(m) + } + } + } + + if di.unrecognized.IsValid() { + *src.offset(di.unrecognized).toBytes() = nil + } +} + +func (di *discardInfo) computeDiscardInfo() { + di.lock.Lock() + defer di.lock.Unlock() + if di.initialized != 0 { + return + } + t := di.typ + n := t.NumField() + + for i := 0; i < n; i++ { + f := t.Field(i) + if strings.HasPrefix(f.Name, "XXX_") { + continue + } + + dfi := discardFieldInfo{field: toField(&f)} + tf := f.Type + + // Unwrap tf to get its most basic type. + var isPointer, isSlice bool + if tf.Kind() == reflect.Slice && tf.Elem().Kind() != reflect.Uint8 { + isSlice = true + tf = tf.Elem() + } + if tf.Kind() == reflect.Ptr { + isPointer = true + tf = tf.Elem() + } + if isPointer && isSlice && tf.Kind() != reflect.Struct { + panic(fmt.Sprintf("%v.%s cannot be a slice of pointers to primitive types", t, f.Name)) + } + + switch tf.Kind() { + case reflect.Struct: + switch { + case !isPointer: + panic(fmt.Sprintf("%v.%s cannot be a direct struct value", t, f.Name)) + case isSlice: // E.g., []*pb.T + di := getDiscardInfo(tf) + dfi.discard = func(src pointer) { + sps := src.getPointerSlice() + for _, sp := range sps { + if !sp.isNil() { + di.discard(sp) + } + } + } + default: // E.g., *pb.T + di := getDiscardInfo(tf) + dfi.discard = func(src pointer) { + sp := src.getPointer() + if !sp.isNil() { + di.discard(sp) + } + } + } + case reflect.Map: + switch { + case isPointer || isSlice: + panic(fmt.Sprintf("%v.%s cannot be a pointer to a map or a slice of map values", t, f.Name)) + default: // E.g., map[K]V + if tf.Elem().Kind() == reflect.Ptr { // Proto struct (e.g., *T) + dfi.discard = func(src pointer) { + sm := src.asPointerTo(tf).Elem() + if sm.Len() == 0 { + return + } + for _, key := range sm.MapKeys() { + val := sm.MapIndex(key) + DiscardUnknown(val.Interface().(Message)) + } + } + } else { + dfi.discard = func(pointer) {} // Noop + } + } + case reflect.Interface: + // Must be oneof field. + switch { + case isPointer || isSlice: + panic(fmt.Sprintf("%v.%s cannot be a pointer to a interface or a slice of interface values", t, f.Name)) + default: // E.g., interface{} + // TODO: Make this faster? + dfi.discard = func(src pointer) { + su := src.asPointerTo(tf).Elem() + if !su.IsNil() { + sv := su.Elem().Elem().Field(0) + if sv.Kind() == reflect.Ptr && sv.IsNil() { + return + } + switch sv.Type().Kind() { + case reflect.Ptr: // Proto struct (e.g., *T) + DiscardUnknown(sv.Interface().(Message)) + } + } + } + } + default: + continue + } + di.fields = append(di.fields, dfi) + } + + di.unrecognized = invalidField + if f, ok := t.FieldByName("XXX_unrecognized"); ok { + if f.Type != reflect.TypeOf([]byte{}) { + panic("expected XXX_unrecognized to be of type []byte") + } + di.unrecognized = toField(&f) + } + + atomic.StoreInt32(&di.initialized, 1) +} + +func discardLegacy(m Message) { + v := reflect.ValueOf(m) + if v.Kind() != reflect.Ptr || v.IsNil() { + return + } + v = v.Elem() + if v.Kind() != reflect.Struct { + return + } + t := v.Type() + + for i := 0; i < v.NumField(); i++ { + f := t.Field(i) + if strings.HasPrefix(f.Name, "XXX_") { + continue + } + vf := v.Field(i) + tf := f.Type + + // Unwrap tf to get its most basic type. + var isPointer, isSlice bool + if tf.Kind() == reflect.Slice && tf.Elem().Kind() != reflect.Uint8 { + isSlice = true + tf = tf.Elem() + } + if tf.Kind() == reflect.Ptr { + isPointer = true + tf = tf.Elem() + } + if isPointer && isSlice && tf.Kind() != reflect.Struct { + panic(fmt.Sprintf("%T.%s cannot be a slice of pointers to primitive types", m, f.Name)) + } + + switch tf.Kind() { + case reflect.Struct: + switch { + case !isPointer: + panic(fmt.Sprintf("%T.%s cannot be a direct struct value", m, f.Name)) + case isSlice: // E.g., []*pb.T + for j := 0; j < vf.Len(); j++ { + discardLegacy(vf.Index(j).Interface().(Message)) + } + default: // E.g., *pb.T + discardLegacy(vf.Interface().(Message)) + } + case reflect.Map: + switch { + case isPointer || isSlice: + panic(fmt.Sprintf("%T.%s cannot be a pointer to a map or a slice of map values", m, f.Name)) + default: // E.g., map[K]V + tv := vf.Type().Elem() + if tv.Kind() == reflect.Ptr && tv.Implements(protoMessageType) { // Proto struct (e.g., *T) + for _, key := range vf.MapKeys() { + val := vf.MapIndex(key) + discardLegacy(val.Interface().(Message)) + } + } + } + case reflect.Interface: + // Must be oneof field. + switch { + case isPointer || isSlice: + panic(fmt.Sprintf("%T.%s cannot be a pointer to a interface or a slice of interface values", m, f.Name)) + default: // E.g., test_proto.isCommunique_Union interface + if !vf.IsNil() && f.Tag.Get("protobuf_oneof") != "" { + vf = vf.Elem() // E.g., *test_proto.Communique_Msg + if !vf.IsNil() { + vf = vf.Elem() // E.g., test_proto.Communique_Msg + vf = vf.Field(0) // E.g., Proto struct (e.g., *T) or primitive value + if vf.Kind() == reflect.Ptr { + discardLegacy(vf.Interface().(Message)) + } + } + } + } + } + } + + if vf := v.FieldByName("XXX_unrecognized"); vf.IsValid() { + if vf.Type() != reflect.TypeOf([]byte{}) { + panic("expected XXX_unrecognized to be of type []byte") + } + vf.Set(reflect.ValueOf([]byte(nil))) + } + + // For proto2 messages, only discard unknown fields in message extensions + // that have been accessed via GetExtension. + if em, err := extendable(m); err == nil { + // Ignore lock since discardLegacy is not concurrency safe. + emm, _ := em.extensionsRead() + for _, mx := range emm { + if m, ok := mx.value.(Message); ok { + discardLegacy(m) + } + } + } +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/encode.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/encode.go new file mode 100644 index 000000000..3abfed2cf --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/encode.go @@ -0,0 +1,203 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +/* + * Routines for encoding data into the wire format for protocol buffers. + */ + +import ( + "errors" + "reflect" +) + +var ( + // errRepeatedHasNil is the error returned if Marshal is called with + // a struct with a repeated field containing a nil element. + errRepeatedHasNil = errors.New("proto: repeated field has nil element") + + // errOneofHasNil is the error returned if Marshal is called with + // a struct with a oneof field containing a nil element. + errOneofHasNil = errors.New("proto: oneof field has nil value") + + // ErrNil is the error returned if Marshal is called with nil. + ErrNil = errors.New("proto: Marshal called with nil") + + // ErrTooLarge is the error returned if Marshal is called with a + // message that encodes to >2GB. + ErrTooLarge = errors.New("proto: message encodes to over 2 GB") +) + +// The fundamental encoders that put bytes on the wire. +// Those that take integer types all accept uint64 and are +// therefore of type valueEncoder. + +const maxVarintBytes = 10 // maximum length of a varint + +// EncodeVarint returns the varint encoding of x. +// This is the format for the +// int32, int64, uint32, uint64, bool, and enum +// protocol buffer types. +// Not used by the package itself, but helpful to clients +// wishing to use the same encoding. +func EncodeVarint(x uint64) []byte { + var buf [maxVarintBytes]byte + var n int + for n = 0; x > 127; n++ { + buf[n] = 0x80 | uint8(x&0x7F) + x >>= 7 + } + buf[n] = uint8(x) + n++ + return buf[0:n] +} + +// EncodeVarint writes a varint-encoded integer to the Buffer. +// This is the format for the +// int32, int64, uint32, uint64, bool, and enum +// protocol buffer types. +func (p *Buffer) EncodeVarint(x uint64) error { + for x >= 1<<7 { + p.buf = append(p.buf, uint8(x&0x7f|0x80)) + x >>= 7 + } + p.buf = append(p.buf, uint8(x)) + return nil +} + +// SizeVarint returns the varint encoding size of an integer. +func SizeVarint(x uint64) int { + switch { + case x < 1<<7: + return 1 + case x < 1<<14: + return 2 + case x < 1<<21: + return 3 + case x < 1<<28: + return 4 + case x < 1<<35: + return 5 + case x < 1<<42: + return 6 + case x < 1<<49: + return 7 + case x < 1<<56: + return 8 + case x < 1<<63: + return 9 + } + return 10 +} + +// EncodeFixed64 writes a 64-bit integer to the Buffer. +// This is the format for the +// fixed64, sfixed64, and double protocol buffer types. +func (p *Buffer) EncodeFixed64(x uint64) error { + p.buf = append(p.buf, + uint8(x), + uint8(x>>8), + uint8(x>>16), + uint8(x>>24), + uint8(x>>32), + uint8(x>>40), + uint8(x>>48), + uint8(x>>56)) + return nil +} + +// EncodeFixed32 writes a 32-bit integer to the Buffer. +// This is the format for the +// fixed32, sfixed32, and float protocol buffer types. +func (p *Buffer) EncodeFixed32(x uint64) error { + p.buf = append(p.buf, + uint8(x), + uint8(x>>8), + uint8(x>>16), + uint8(x>>24)) + return nil +} + +// EncodeZigzag64 writes a zigzag-encoded 64-bit integer +// to the Buffer. +// This is the format used for the sint64 protocol buffer type. +func (p *Buffer) EncodeZigzag64(x uint64) error { + // use signed number to get arithmetic right shift. + return p.EncodeVarint(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} + +// EncodeZigzag32 writes a zigzag-encoded 32-bit integer +// to the Buffer. +// This is the format used for the sint32 protocol buffer type. +func (p *Buffer) EncodeZigzag32(x uint64) error { + // use signed number to get arithmetic right shift. + return p.EncodeVarint(uint64((uint32(x) << 1) ^ uint32((int32(x) >> 31)))) +} + +// EncodeRawBytes writes a count-delimited byte buffer to the Buffer. +// This is the format used for the bytes protocol buffer +// type and for embedded messages. +func (p *Buffer) EncodeRawBytes(b []byte) error { + p.EncodeVarint(uint64(len(b))) + p.buf = append(p.buf, b...) + return nil +} + +// EncodeStringBytes writes an encoded string to the Buffer. +// This is the format used for the proto2 string type. +func (p *Buffer) EncodeStringBytes(s string) error { + p.EncodeVarint(uint64(len(s))) + p.buf = append(p.buf, s...) + return nil +} + +// Marshaler is the interface representing objects that can marshal themselves. +type Marshaler interface { + Marshal() ([]byte, error) +} + +// EncodeMessage writes the protocol buffer to the Buffer, +// prefixed by a varint-encoded length. +func (p *Buffer) EncodeMessage(pb Message) error { + siz := Size(pb) + p.EncodeVarint(uint64(siz)) + return p.Marshal(pb) +} + +// All protocol buffer fields are nillable, but be careful. +func isNil(v reflect.Value) bool { + switch v.Kind() { + case reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice: + return v.IsNil() + } + return false +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/equal.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/equal.go new file mode 100644 index 000000000..f9b6e41b3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/equal.go @@ -0,0 +1,301 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2011 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Protocol buffer comparison. + +package proto + +import ( + "bytes" + "log" + "reflect" + "strings" +) + +/* +Equal returns true iff protocol buffers a and b are equal. +The arguments must both be pointers to protocol buffer structs. + +Equality is defined in this way: + - Two messages are equal iff they are the same type, + corresponding fields are equal, unknown field sets + are equal, and extensions sets are equal. + - Two set scalar fields are equal iff their values are equal. + If the fields are of a floating-point type, remember that + NaN != x for all x, including NaN. If the message is defined + in a proto3 .proto file, fields are not "set"; specifically, + zero length proto3 "bytes" fields are equal (nil == {}). + - Two repeated fields are equal iff their lengths are the same, + and their corresponding elements are equal. Note a "bytes" field, + although represented by []byte, is not a repeated field and the + rule for the scalar fields described above applies. + - Two unset fields are equal. + - Two unknown field sets are equal if their current + encoded state is equal. + - Two extension sets are equal iff they have corresponding + elements that are pairwise equal. + - Two map fields are equal iff their lengths are the same, + and they contain the same set of elements. Zero-length map + fields are equal. + - Every other combination of things are not equal. + +The return value is undefined if a and b are not protocol buffers. +*/ +func Equal(a, b Message) bool { + if a == nil || b == nil { + return a == b + } + v1, v2 := reflect.ValueOf(a), reflect.ValueOf(b) + if v1.Type() != v2.Type() { + return false + } + if v1.Kind() == reflect.Ptr { + if v1.IsNil() { + return v2.IsNil() + } + if v2.IsNil() { + return false + } + v1, v2 = v1.Elem(), v2.Elem() + } + if v1.Kind() != reflect.Struct { + return false + } + return equalStruct(v1, v2) +} + +// v1 and v2 are known to have the same type. +func equalStruct(v1, v2 reflect.Value) bool { + sprop := GetProperties(v1.Type()) + for i := 0; i < v1.NumField(); i++ { + f := v1.Type().Field(i) + if strings.HasPrefix(f.Name, "XXX_") { + continue + } + f1, f2 := v1.Field(i), v2.Field(i) + if f.Type.Kind() == reflect.Ptr { + if n1, n2 := f1.IsNil(), f2.IsNil(); n1 && n2 { + // both unset + continue + } else if n1 != n2 { + // set/unset mismatch + return false + } + f1, f2 = f1.Elem(), f2.Elem() + } + if !equalAny(f1, f2, sprop.Prop[i]) { + return false + } + } + + if em1 := v1.FieldByName("XXX_InternalExtensions"); em1.IsValid() { + em2 := v2.FieldByName("XXX_InternalExtensions") + if !equalExtensions(v1.Type(), em1.Interface().(XXX_InternalExtensions), em2.Interface().(XXX_InternalExtensions)) { + return false + } + } + + if em1 := v1.FieldByName("XXX_extensions"); em1.IsValid() { + em2 := v2.FieldByName("XXX_extensions") + if !equalExtMap(v1.Type(), em1.Interface().(map[int32]Extension), em2.Interface().(map[int32]Extension)) { + return false + } + } + + uf := v1.FieldByName("XXX_unrecognized") + if !uf.IsValid() { + return true + } + + u1 := uf.Bytes() + u2 := v2.FieldByName("XXX_unrecognized").Bytes() + return bytes.Equal(u1, u2) +} + +// v1 and v2 are known to have the same type. +// prop may be nil. +func equalAny(v1, v2 reflect.Value, prop *Properties) bool { + if v1.Type() == protoMessageType { + m1, _ := v1.Interface().(Message) + m2, _ := v2.Interface().(Message) + return Equal(m1, m2) + } + switch v1.Kind() { + case reflect.Bool: + return v1.Bool() == v2.Bool() + case reflect.Float32, reflect.Float64: + return v1.Float() == v2.Float() + case reflect.Int32, reflect.Int64: + return v1.Int() == v2.Int() + case reflect.Interface: + // Probably a oneof field; compare the inner values. + n1, n2 := v1.IsNil(), v2.IsNil() + if n1 || n2 { + return n1 == n2 + } + e1, e2 := v1.Elem(), v2.Elem() + if e1.Type() != e2.Type() { + return false + } + return equalAny(e1, e2, nil) + case reflect.Map: + if v1.Len() != v2.Len() { + return false + } + for _, key := range v1.MapKeys() { + val2 := v2.MapIndex(key) + if !val2.IsValid() { + // This key was not found in the second map. + return false + } + if !equalAny(v1.MapIndex(key), val2, nil) { + return false + } + } + return true + case reflect.Ptr: + // Maps may have nil values in them, so check for nil. + if v1.IsNil() && v2.IsNil() { + return true + } + if v1.IsNil() != v2.IsNil() { + return false + } + return equalAny(v1.Elem(), v2.Elem(), prop) + case reflect.Slice: + if v1.Type().Elem().Kind() == reflect.Uint8 { + // short circuit: []byte + + // Edge case: if this is in a proto3 message, a zero length + // bytes field is considered the zero value. + if prop != nil && prop.proto3 && v1.Len() == 0 && v2.Len() == 0 { + return true + } + if v1.IsNil() != v2.IsNil() { + return false + } + return bytes.Equal(v1.Interface().([]byte), v2.Interface().([]byte)) + } + + if v1.Len() != v2.Len() { + return false + } + for i := 0; i < v1.Len(); i++ { + if !equalAny(v1.Index(i), v2.Index(i), prop) { + return false + } + } + return true + case reflect.String: + return v1.Interface().(string) == v2.Interface().(string) + case reflect.Struct: + return equalStruct(v1, v2) + case reflect.Uint32, reflect.Uint64: + return v1.Uint() == v2.Uint() + } + + // unknown type, so not a protocol buffer + log.Printf("proto: don't know how to compare %v", v1) + return false +} + +// base is the struct type that the extensions are based on. +// x1 and x2 are InternalExtensions. +func equalExtensions(base reflect.Type, x1, x2 XXX_InternalExtensions) bool { + em1, _ := x1.extensionsRead() + em2, _ := x2.extensionsRead() + return equalExtMap(base, em1, em2) +} + +func equalExtMap(base reflect.Type, em1, em2 map[int32]Extension) bool { + if len(em1) != len(em2) { + return false + } + + for extNum, e1 := range em1 { + e2, ok := em2[extNum] + if !ok { + return false + } + + m1 := extensionAsLegacyType(e1.value) + m2 := extensionAsLegacyType(e2.value) + + if m1 == nil && m2 == nil { + // Both have only encoded form. + if bytes.Equal(e1.enc, e2.enc) { + continue + } + // The bytes are different, but the extensions might still be + // equal. We need to decode them to compare. + } + + if m1 != nil && m2 != nil { + // Both are unencoded. + if !equalAny(reflect.ValueOf(m1), reflect.ValueOf(m2), nil) { + return false + } + continue + } + + // At least one is encoded. To do a semantically correct comparison + // we need to unmarshal them first. + var desc *ExtensionDesc + if m := extensionMaps[base]; m != nil { + desc = m[extNum] + } + if desc == nil { + // If both have only encoded form and the bytes are the same, + // it is handled above. We get here when the bytes are different. + // We don't know how to decode it, so just compare them as byte + // slices. + log.Printf("proto: don't know how to compare extension %d of %v", extNum, base) + return false + } + var err error + if m1 == nil { + m1, err = decodeExtension(e1.enc, desc) + } + if m2 == nil && err == nil { + m2, err = decodeExtension(e2.enc, desc) + } + if err != nil { + // The encoded form is invalid. + log.Printf("proto: badly encoded extension %d of %v: %v", extNum, base, err) + return false + } + if !equalAny(reflect.ValueOf(m1), reflect.ValueOf(m2), nil) { + return false + } + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/extensions.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/extensions.go new file mode 100644 index 000000000..fa88add30 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/extensions.go @@ -0,0 +1,607 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +/* + * Types and routines for supporting protocol buffer extensions. + */ + +import ( + "errors" + "fmt" + "io" + "reflect" + "strconv" + "sync" +) + +// ErrMissingExtension is the error returned by GetExtension if the named extension is not in the message. +var ErrMissingExtension = errors.New("proto: missing extension") + +// ExtensionRange represents a range of message extensions for a protocol buffer. +// Used in code generated by the protocol compiler. +type ExtensionRange struct { + Start, End int32 // both inclusive +} + +// extendableProto is an interface implemented by any protocol buffer generated by the current +// proto compiler that may be extended. +type extendableProto interface { + Message + ExtensionRangeArray() []ExtensionRange + extensionsWrite() map[int32]Extension + extensionsRead() (map[int32]Extension, sync.Locker) +} + +// extendableProtoV1 is an interface implemented by a protocol buffer generated by the previous +// version of the proto compiler that may be extended. +type extendableProtoV1 interface { + Message + ExtensionRangeArray() []ExtensionRange + ExtensionMap() map[int32]Extension +} + +// extensionAdapter is a wrapper around extendableProtoV1 that implements extendableProto. +type extensionAdapter struct { + extendableProtoV1 +} + +func (e extensionAdapter) extensionsWrite() map[int32]Extension { + return e.ExtensionMap() +} + +func (e extensionAdapter) extensionsRead() (map[int32]Extension, sync.Locker) { + return e.ExtensionMap(), notLocker{} +} + +// notLocker is a sync.Locker whose Lock and Unlock methods are nops. +type notLocker struct{} + +func (n notLocker) Lock() {} +func (n notLocker) Unlock() {} + +// extendable returns the extendableProto interface for the given generated proto message. +// If the proto message has the old extension format, it returns a wrapper that implements +// the extendableProto interface. +func extendable(p interface{}) (extendableProto, error) { + switch p := p.(type) { + case extendableProto: + if isNilPtr(p) { + return nil, fmt.Errorf("proto: nil %T is not extendable", p) + } + return p, nil + case extendableProtoV1: + if isNilPtr(p) { + return nil, fmt.Errorf("proto: nil %T is not extendable", p) + } + return extensionAdapter{p}, nil + } + // Don't allocate a specific error containing %T: + // this is the hot path for Clone and MarshalText. + return nil, errNotExtendable +} + +var errNotExtendable = errors.New("proto: not an extendable proto.Message") + +func isNilPtr(x interface{}) bool { + v := reflect.ValueOf(x) + return v.Kind() == reflect.Ptr && v.IsNil() +} + +// XXX_InternalExtensions is an internal representation of proto extensions. +// +// Each generated message struct type embeds an anonymous XXX_InternalExtensions field, +// thus gaining the unexported 'extensions' method, which can be called only from the proto package. +// +// The methods of XXX_InternalExtensions are not concurrency safe in general, +// but calls to logically read-only methods such as has and get may be executed concurrently. +type XXX_InternalExtensions struct { + // The struct must be indirect so that if a user inadvertently copies a + // generated message and its embedded XXX_InternalExtensions, they + // avoid the mayhem of a copied mutex. + // + // The mutex serializes all logically read-only operations to p.extensionMap. + // It is up to the client to ensure that write operations to p.extensionMap are + // mutually exclusive with other accesses. + p *struct { + mu sync.Mutex + extensionMap map[int32]Extension + } +} + +// extensionsWrite returns the extension map, creating it on first use. +func (e *XXX_InternalExtensions) extensionsWrite() map[int32]Extension { + if e.p == nil { + e.p = new(struct { + mu sync.Mutex + extensionMap map[int32]Extension + }) + e.p.extensionMap = make(map[int32]Extension) + } + return e.p.extensionMap +} + +// extensionsRead returns the extensions map for read-only use. It may be nil. +// The caller must hold the returned mutex's lock when accessing Elements within the map. +func (e *XXX_InternalExtensions) extensionsRead() (map[int32]Extension, sync.Locker) { + if e.p == nil { + return nil, nil + } + return e.p.extensionMap, &e.p.mu +} + +// ExtensionDesc represents an extension specification. +// Used in generated code from the protocol compiler. +type ExtensionDesc struct { + ExtendedType Message // nil pointer to the type that is being extended + ExtensionType interface{} // nil pointer to the extension type + Field int32 // field number + Name string // fully-qualified name of extension, for text formatting + Tag string // protobuf tag style + Filename string // name of the file in which the extension is defined +} + +func (ed *ExtensionDesc) repeated() bool { + t := reflect.TypeOf(ed.ExtensionType) + return t.Kind() == reflect.Slice && t.Elem().Kind() != reflect.Uint8 +} + +// Extension represents an extension in a message. +type Extension struct { + // When an extension is stored in a message using SetExtension + // only desc and value are set. When the message is marshaled + // enc will be set to the encoded form of the message. + // + // When a message is unmarshaled and contains extensions, each + // extension will have only enc set. When such an extension is + // accessed using GetExtension (or GetExtensions) desc and value + // will be set. + desc *ExtensionDesc + + // value is a concrete value for the extension field. Let the type of + // desc.ExtensionType be the "API type" and the type of Extension.value + // be the "storage type". The API type and storage type are the same except: + // * For scalars (except []byte), the API type uses *T, + // while the storage type uses T. + // * For repeated fields, the API type uses []T, while the storage type + // uses *[]T. + // + // The reason for the divergence is so that the storage type more naturally + // matches what is expected of when retrieving the values through the + // protobuf reflection APIs. + // + // The value may only be populated if desc is also populated. + value interface{} + + // enc is the raw bytes for the extension field. + enc []byte +} + +// SetRawExtension is for testing only. +func SetRawExtension(base Message, id int32, b []byte) { + epb, err := extendable(base) + if err != nil { + return + } + extmap := epb.extensionsWrite() + extmap[id] = Extension{enc: b} +} + +// isExtensionField returns true iff the given field number is in an extension range. +func isExtensionField(pb extendableProto, field int32) bool { + for _, er := range pb.ExtensionRangeArray() { + if er.Start <= field && field <= er.End { + return true + } + } + return false +} + +// checkExtensionTypes checks that the given extension is valid for pb. +func checkExtensionTypes(pb extendableProto, extension *ExtensionDesc) error { + var pbi interface{} = pb + // Check the extended type. + if ea, ok := pbi.(extensionAdapter); ok { + pbi = ea.extendableProtoV1 + } + if a, b := reflect.TypeOf(pbi), reflect.TypeOf(extension.ExtendedType); a != b { + return fmt.Errorf("proto: bad extended type; %v does not extend %v", b, a) + } + // Check the range. + if !isExtensionField(pb, extension.Field) { + return errors.New("proto: bad extension number; not in declared ranges") + } + return nil +} + +// extPropKey is sufficient to uniquely identify an extension. +type extPropKey struct { + base reflect.Type + field int32 +} + +var extProp = struct { + sync.RWMutex + m map[extPropKey]*Properties +}{ + m: make(map[extPropKey]*Properties), +} + +func extensionProperties(ed *ExtensionDesc) *Properties { + key := extPropKey{base: reflect.TypeOf(ed.ExtendedType), field: ed.Field} + + extProp.RLock() + if prop, ok := extProp.m[key]; ok { + extProp.RUnlock() + return prop + } + extProp.RUnlock() + + extProp.Lock() + defer extProp.Unlock() + // Check again. + if prop, ok := extProp.m[key]; ok { + return prop + } + + prop := new(Properties) + prop.Init(reflect.TypeOf(ed.ExtensionType), "unknown_name", ed.Tag, nil) + extProp.m[key] = prop + return prop +} + +// HasExtension returns whether the given extension is present in pb. +func HasExtension(pb Message, extension *ExtensionDesc) bool { + // TODO: Check types, field numbers, etc.? + epb, err := extendable(pb) + if err != nil { + return false + } + extmap, mu := epb.extensionsRead() + if extmap == nil { + return false + } + mu.Lock() + _, ok := extmap[extension.Field] + mu.Unlock() + return ok +} + +// ClearExtension removes the given extension from pb. +func ClearExtension(pb Message, extension *ExtensionDesc) { + epb, err := extendable(pb) + if err != nil { + return + } + // TODO: Check types, field numbers, etc.? + extmap := epb.extensionsWrite() + delete(extmap, extension.Field) +} + +// GetExtension retrieves a proto2 extended field from pb. +// +// If the descriptor is type complete (i.e., ExtensionDesc.ExtensionType is non-nil), +// then GetExtension parses the encoded field and returns a Go value of the specified type. +// If the field is not present, then the default value is returned (if one is specified), +// otherwise ErrMissingExtension is reported. +// +// If the descriptor is not type complete (i.e., ExtensionDesc.ExtensionType is nil), +// then GetExtension returns the raw encoded bytes of the field extension. +func GetExtension(pb Message, extension *ExtensionDesc) (interface{}, error) { + epb, err := extendable(pb) + if err != nil { + return nil, err + } + + if extension.ExtendedType != nil { + // can only check type if this is a complete descriptor + if err := checkExtensionTypes(epb, extension); err != nil { + return nil, err + } + } + + emap, mu := epb.extensionsRead() + if emap == nil { + return defaultExtensionValue(extension) + } + mu.Lock() + defer mu.Unlock() + e, ok := emap[extension.Field] + if !ok { + // defaultExtensionValue returns the default value or + // ErrMissingExtension if there is no default. + return defaultExtensionValue(extension) + } + + if e.value != nil { + // Already decoded. Check the descriptor, though. + if e.desc != extension { + // This shouldn't happen. If it does, it means that + // GetExtension was called twice with two different + // descriptors with the same field number. + return nil, errors.New("proto: descriptor conflict") + } + return extensionAsLegacyType(e.value), nil + } + + if extension.ExtensionType == nil { + // incomplete descriptor + return e.enc, nil + } + + v, err := decodeExtension(e.enc, extension) + if err != nil { + return nil, err + } + + // Remember the decoded version and drop the encoded version. + // That way it is safe to mutate what we return. + e.value = extensionAsStorageType(v) + e.desc = extension + e.enc = nil + emap[extension.Field] = e + return extensionAsLegacyType(e.value), nil +} + +// defaultExtensionValue returns the default value for extension. +// If no default for an extension is defined ErrMissingExtension is returned. +func defaultExtensionValue(extension *ExtensionDesc) (interface{}, error) { + if extension.ExtensionType == nil { + // incomplete descriptor, so no default + return nil, ErrMissingExtension + } + + t := reflect.TypeOf(extension.ExtensionType) + props := extensionProperties(extension) + + sf, _, err := fieldDefault(t, props) + if err != nil { + return nil, err + } + + if sf == nil || sf.value == nil { + // There is no default value. + return nil, ErrMissingExtension + } + + if t.Kind() != reflect.Ptr { + // We do not need to return a Ptr, we can directly return sf.value. + return sf.value, nil + } + + // We need to return an interface{} that is a pointer to sf.value. + value := reflect.New(t).Elem() + value.Set(reflect.New(value.Type().Elem())) + if sf.kind == reflect.Int32 { + // We may have an int32 or an enum, but the underlying data is int32. + // Since we can't set an int32 into a non int32 reflect.value directly + // set it as a int32. + value.Elem().SetInt(int64(sf.value.(int32))) + } else { + value.Elem().Set(reflect.ValueOf(sf.value)) + } + return value.Interface(), nil +} + +// decodeExtension decodes an extension encoded in b. +func decodeExtension(b []byte, extension *ExtensionDesc) (interface{}, error) { + t := reflect.TypeOf(extension.ExtensionType) + unmarshal := typeUnmarshaler(t, extension.Tag) + + // t is a pointer to a struct, pointer to basic type or a slice. + // Allocate space to store the pointer/slice. + value := reflect.New(t).Elem() + + var err error + for { + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + wire := int(x) & 7 + + b, err = unmarshal(b, valToPointer(value.Addr()), wire) + if err != nil { + return nil, err + } + + if len(b) == 0 { + break + } + } + return value.Interface(), nil +} + +// GetExtensions returns a slice of the extensions present in pb that are also listed in es. +// The returned slice has the same length as es; missing extensions will appear as nil elements. +func GetExtensions(pb Message, es []*ExtensionDesc) (extensions []interface{}, err error) { + epb, err := extendable(pb) + if err != nil { + return nil, err + } + extensions = make([]interface{}, len(es)) + for i, e := range es { + extensions[i], err = GetExtension(epb, e) + if err == ErrMissingExtension { + err = nil + } + if err != nil { + return + } + } + return +} + +// ExtensionDescs returns a new slice containing pb's extension descriptors, in undefined order. +// For non-registered extensions, ExtensionDescs returns an incomplete descriptor containing +// just the Field field, which defines the extension's field number. +func ExtensionDescs(pb Message) ([]*ExtensionDesc, error) { + epb, err := extendable(pb) + if err != nil { + return nil, err + } + registeredExtensions := RegisteredExtensions(pb) + + emap, mu := epb.extensionsRead() + if emap == nil { + return nil, nil + } + mu.Lock() + defer mu.Unlock() + extensions := make([]*ExtensionDesc, 0, len(emap)) + for extid, e := range emap { + desc := e.desc + if desc == nil { + desc = registeredExtensions[extid] + if desc == nil { + desc = &ExtensionDesc{Field: extid} + } + } + + extensions = append(extensions, desc) + } + return extensions, nil +} + +// SetExtension sets the specified extension of pb to the specified value. +func SetExtension(pb Message, extension *ExtensionDesc, value interface{}) error { + epb, err := extendable(pb) + if err != nil { + return err + } + if err := checkExtensionTypes(epb, extension); err != nil { + return err + } + typ := reflect.TypeOf(extension.ExtensionType) + if typ != reflect.TypeOf(value) { + return fmt.Errorf("proto: bad extension value type. got: %T, want: %T", value, extension.ExtensionType) + } + // nil extension values need to be caught early, because the + // encoder can't distinguish an ErrNil due to a nil extension + // from an ErrNil due to a missing field. Extensions are + // always optional, so the encoder would just swallow the error + // and drop all the extensions from the encoded message. + if reflect.ValueOf(value).IsNil() { + return fmt.Errorf("proto: SetExtension called with nil value of type %T", value) + } + + extmap := epb.extensionsWrite() + extmap[extension.Field] = Extension{desc: extension, value: extensionAsStorageType(value)} + return nil +} + +// ClearAllExtensions clears all extensions from pb. +func ClearAllExtensions(pb Message) { + epb, err := extendable(pb) + if err != nil { + return + } + m := epb.extensionsWrite() + for k := range m { + delete(m, k) + } +} + +// A global registry of extensions. +// The generated code will register the generated descriptors by calling RegisterExtension. + +var extensionMaps = make(map[reflect.Type]map[int32]*ExtensionDesc) + +// RegisterExtension is called from the generated code. +func RegisterExtension(desc *ExtensionDesc) { + st := reflect.TypeOf(desc.ExtendedType).Elem() + m := extensionMaps[st] + if m == nil { + m = make(map[int32]*ExtensionDesc) + extensionMaps[st] = m + } + if _, ok := m[desc.Field]; ok { + panic("proto: duplicate extension registered: " + st.String() + " " + strconv.Itoa(int(desc.Field))) + } + m[desc.Field] = desc +} + +// RegisteredExtensions returns a map of the registered extensions of a +// protocol buffer struct, indexed by the extension number. +// The argument pb should be a nil pointer to the struct type. +func RegisteredExtensions(pb Message) map[int32]*ExtensionDesc { + return extensionMaps[reflect.TypeOf(pb).Elem()] +} + +// extensionAsLegacyType converts an value in the storage type as the API type. +// See Extension.value. +func extensionAsLegacyType(v interface{}) interface{} { + switch rv := reflect.ValueOf(v); rv.Kind() { + case reflect.Bool, reflect.Int32, reflect.Int64, reflect.Uint32, reflect.Uint64, reflect.Float32, reflect.Float64, reflect.String: + // Represent primitive types as a pointer to the value. + rv2 := reflect.New(rv.Type()) + rv2.Elem().Set(rv) + v = rv2.Interface() + case reflect.Ptr: + // Represent slice types as the value itself. + switch rv.Type().Elem().Kind() { + case reflect.Slice: + if rv.IsNil() { + v = reflect.Zero(rv.Type().Elem()).Interface() + } else { + v = rv.Elem().Interface() + } + } + } + return v +} + +// extensionAsStorageType converts an value in the API type as the storage type. +// See Extension.value. +func extensionAsStorageType(v interface{}) interface{} { + switch rv := reflect.ValueOf(v); rv.Kind() { + case reflect.Ptr: + // Represent slice types as the value itself. + switch rv.Type().Elem().Kind() { + case reflect.Bool, reflect.Int32, reflect.Int64, reflect.Uint32, reflect.Uint64, reflect.Float32, reflect.Float64, reflect.String: + if rv.IsNil() { + v = reflect.Zero(rv.Type().Elem()).Interface() + } else { + v = rv.Elem().Interface() + } + } + case reflect.Slice: + // Represent slice types as a pointer to the value. + if rv.Type().Elem().Kind() != reflect.Uint8 { + rv2 := reflect.New(rv.Type()) + rv2.Elem().Set(rv) + v = rv2.Interface() + } + } + return v +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/lib.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/lib.go new file mode 100644 index 000000000..fdd328bb7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/lib.go @@ -0,0 +1,965 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/* +Package proto converts data structures to and from the wire format of +protocol buffers. It works in concert with the Go source code generated +for .proto files by the protocol compiler. + +A summary of the properties of the protocol buffer interface +for a protocol buffer variable v: + + - Names are turned from camel_case to CamelCase for export. + - There are no methods on v to set fields; just treat + them as structure fields. + - There are getters that return a field's value if set, + and return the field's default value if unset. + The getters work even if the receiver is a nil message. + - The zero value for a struct is its correct initialization state. + All desired fields must be set before marshaling. + - A Reset() method will restore a protobuf struct to its zero state. + - Non-repeated fields are pointers to the values; nil means unset. + That is, optional or required field int32 f becomes F *int32. + - Repeated fields are slices. + - Helper functions are available to aid the setting of fields. + msg.Foo = proto.String("hello") // set field + - Constants are defined to hold the default values of all fields that + have them. They have the form Default_StructName_FieldName. + Because the getter methods handle defaulted values, + direct use of these constants should be rare. + - Enums are given type names and maps from names to values. + Enum values are prefixed by the enclosing message's name, or by the + enum's type name if it is a top-level enum. Enum types have a String + method, and a Enum method to assist in message construction. + - Nested messages, groups and enums have type names prefixed with the name of + the surrounding message type. + - Extensions are given descriptor names that start with E_, + followed by an underscore-delimited list of the nested messages + that contain it (if any) followed by the CamelCased name of the + extension field itself. HasExtension, ClearExtension, GetExtension + and SetExtension are functions for manipulating extensions. + - Oneof field sets are given a single field in their message, + with distinguished wrapper types for each possible field value. + - Marshal and Unmarshal are functions to encode and decode the wire format. + +When the .proto file specifies `syntax="proto3"`, there are some differences: + + - Non-repeated fields of non-message type are values instead of pointers. + - Enum types do not get an Enum method. + +The simplest way to describe this is to see an example. +Given file test.proto, containing + + package example; + + enum FOO { X = 17; } + + message Test { + required string label = 1; + optional int32 type = 2 [default=77]; + repeated int64 reps = 3; + optional group OptionalGroup = 4 { + required string RequiredField = 5; + } + oneof union { + int32 number = 6; + string name = 7; + } + } + +The resulting file, test.pb.go, is: + + package example + + import proto "github.com/golang/protobuf/proto" + import math "math" + + type FOO int32 + const ( + FOO_X FOO = 17 + ) + var FOO_name = map[int32]string{ + 17: "X", + } + var FOO_value = map[string]int32{ + "X": 17, + } + + func (x FOO) Enum() *FOO { + p := new(FOO) + *p = x + return p + } + func (x FOO) String() string { + return proto.EnumName(FOO_name, int32(x)) + } + func (x *FOO) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(FOO_value, data) + if err != nil { + return err + } + *x = FOO(value) + return nil + } + + type Test struct { + Label *string `protobuf:"bytes,1,req,name=label" json:"label,omitempty"` + Type *int32 `protobuf:"varint,2,opt,name=type,def=77" json:"type,omitempty"` + Reps []int64 `protobuf:"varint,3,rep,name=reps" json:"reps,omitempty"` + Optionalgroup *Test_OptionalGroup `protobuf:"group,4,opt,name=OptionalGroup" json:"optionalgroup,omitempty"` + // Types that are valid to be assigned to Union: + // *Test_Number + // *Test_Name + Union isTest_Union `protobuf_oneof:"union"` + XXX_unrecognized []byte `json:"-"` + } + func (m *Test) Reset() { *m = Test{} } + func (m *Test) String() string { return proto.CompactTextString(m) } + func (*Test) ProtoMessage() {} + + type isTest_Union interface { + isTest_Union() + } + + type Test_Number struct { + Number int32 `protobuf:"varint,6,opt,name=number"` + } + type Test_Name struct { + Name string `protobuf:"bytes,7,opt,name=name"` + } + + func (*Test_Number) isTest_Union() {} + func (*Test_Name) isTest_Union() {} + + func (m *Test) GetUnion() isTest_Union { + if m != nil { + return m.Union + } + return nil + } + const Default_Test_Type int32 = 77 + + func (m *Test) GetLabel() string { + if m != nil && m.Label != nil { + return *m.Label + } + return "" + } + + func (m *Test) GetType() int32 { + if m != nil && m.Type != nil { + return *m.Type + } + return Default_Test_Type + } + + func (m *Test) GetOptionalgroup() *Test_OptionalGroup { + if m != nil { + return m.Optionalgroup + } + return nil + } + + type Test_OptionalGroup struct { + RequiredField *string `protobuf:"bytes,5,req" json:"RequiredField,omitempty"` + } + func (m *Test_OptionalGroup) Reset() { *m = Test_OptionalGroup{} } + func (m *Test_OptionalGroup) String() string { return proto.CompactTextString(m) } + + func (m *Test_OptionalGroup) GetRequiredField() string { + if m != nil && m.RequiredField != nil { + return *m.RequiredField + } + return "" + } + + func (m *Test) GetNumber() int32 { + if x, ok := m.GetUnion().(*Test_Number); ok { + return x.Number + } + return 0 + } + + func (m *Test) GetName() string { + if x, ok := m.GetUnion().(*Test_Name); ok { + return x.Name + } + return "" + } + + func init() { + proto.RegisterEnum("example.FOO", FOO_name, FOO_value) + } + +To create and play with a Test object: + + package main + + import ( + "log" + + "github.com/golang/protobuf/proto" + pb "./example.pb" + ) + + func main() { + test := &pb.Test{ + Label: proto.String("hello"), + Type: proto.Int32(17), + Reps: []int64{1, 2, 3}, + Optionalgroup: &pb.Test_OptionalGroup{ + RequiredField: proto.String("good bye"), + }, + Union: &pb.Test_Name{"fred"}, + } + data, err := proto.Marshal(test) + if err != nil { + log.Fatal("marshaling error: ", err) + } + newTest := &pb.Test{} + err = proto.Unmarshal(data, newTest) + if err != nil { + log.Fatal("unmarshaling error: ", err) + } + // Now test and newTest contain the same data. + if test.GetLabel() != newTest.GetLabel() { + log.Fatalf("data mismatch %q != %q", test.GetLabel(), newTest.GetLabel()) + } + // Use a type switch to determine which oneof was set. + switch u := test.Union.(type) { + case *pb.Test_Number: // u.Number contains the number. + case *pb.Test_Name: // u.Name contains the string. + } + // etc. + } +*/ +package proto + +import ( + "encoding/json" + "fmt" + "log" + "reflect" + "sort" + "strconv" + "sync" +) + +// RequiredNotSetError is an error type returned by either Marshal or Unmarshal. +// Marshal reports this when a required field is not initialized. +// Unmarshal reports this when a required field is missing from the wire data. +type RequiredNotSetError struct{ field string } + +func (e *RequiredNotSetError) Error() string { + if e.field == "" { + return fmt.Sprintf("proto: required field not set") + } + return fmt.Sprintf("proto: required field %q not set", e.field) +} +func (e *RequiredNotSetError) RequiredNotSet() bool { + return true +} + +type invalidUTF8Error struct{ field string } + +func (e *invalidUTF8Error) Error() string { + if e.field == "" { + return "proto: invalid UTF-8 detected" + } + return fmt.Sprintf("proto: field %q contains invalid UTF-8", e.field) +} +func (e *invalidUTF8Error) InvalidUTF8() bool { + return true +} + +// errInvalidUTF8 is a sentinel error to identify fields with invalid UTF-8. +// This error should not be exposed to the external API as such errors should +// be recreated with the field information. +var errInvalidUTF8 = &invalidUTF8Error{} + +// isNonFatal reports whether the error is either a RequiredNotSet error +// or a InvalidUTF8 error. +func isNonFatal(err error) bool { + if re, ok := err.(interface{ RequiredNotSet() bool }); ok && re.RequiredNotSet() { + return true + } + if re, ok := err.(interface{ InvalidUTF8() bool }); ok && re.InvalidUTF8() { + return true + } + return false +} + +type nonFatal struct{ E error } + +// Merge merges err into nf and reports whether it was successful. +// Otherwise it returns false for any fatal non-nil errors. +func (nf *nonFatal) Merge(err error) (ok bool) { + if err == nil { + return true // not an error + } + if !isNonFatal(err) { + return false // fatal error + } + if nf.E == nil { + nf.E = err // store first instance of non-fatal error + } + return true +} + +// Message is implemented by generated protocol buffer messages. +type Message interface { + Reset() + String() string + ProtoMessage() +} + +// A Buffer is a buffer manager for marshaling and unmarshaling +// protocol buffers. It may be reused between invocations to +// reduce memory usage. It is not necessary to use a Buffer; +// the global functions Marshal and Unmarshal create a +// temporary Buffer and are fine for most applications. +type Buffer struct { + buf []byte // encode/decode byte stream + index int // read point + + deterministic bool +} + +// NewBuffer allocates a new Buffer and initializes its internal data to +// the contents of the argument slice. +func NewBuffer(e []byte) *Buffer { + return &Buffer{buf: e} +} + +// Reset resets the Buffer, ready for marshaling a new protocol buffer. +func (p *Buffer) Reset() { + p.buf = p.buf[0:0] // for reading/writing + p.index = 0 // for reading +} + +// SetBuf replaces the internal buffer with the slice, +// ready for unmarshaling the contents of the slice. +func (p *Buffer) SetBuf(s []byte) { + p.buf = s + p.index = 0 +} + +// Bytes returns the contents of the Buffer. +func (p *Buffer) Bytes() []byte { return p.buf } + +// SetDeterministic sets whether to use deterministic serialization. +// +// Deterministic serialization guarantees that for a given binary, equal +// messages will always be serialized to the same bytes. This implies: +// +// - Repeated serialization of a message will return the same bytes. +// - Different processes of the same binary (which may be executing on +// different machines) will serialize equal messages to the same bytes. +// +// Note that the deterministic serialization is NOT canonical across +// languages. It is not guaranteed to remain stable over time. It is unstable +// across different builds with schema changes due to unknown fields. +// Users who need canonical serialization (e.g., persistent storage in a +// canonical form, fingerprinting, etc.) should define their own +// canonicalization specification and implement their own serializer rather +// than relying on this API. +// +// If deterministic serialization is requested, map entries will be sorted +// by keys in lexographical order. This is an implementation detail and +// subject to change. +func (p *Buffer) SetDeterministic(deterministic bool) { + p.deterministic = deterministic +} + +/* + * Helper routines for simplifying the creation of optional fields of basic type. + */ + +// Bool is a helper routine that allocates a new bool value +// to store v and returns a pointer to it. +func Bool(v bool) *bool { + return &v +} + +// Int32 is a helper routine that allocates a new int32 value +// to store v and returns a pointer to it. +func Int32(v int32) *int32 { + return &v +} + +// Int is a helper routine that allocates a new int32 value +// to store v and returns a pointer to it, but unlike Int32 +// its argument value is an int. +func Int(v int) *int32 { + p := new(int32) + *p = int32(v) + return p +} + +// Int64 is a helper routine that allocates a new int64 value +// to store v and returns a pointer to it. +func Int64(v int64) *int64 { + return &v +} + +// Float32 is a helper routine that allocates a new float32 value +// to store v and returns a pointer to it. +func Float32(v float32) *float32 { + return &v +} + +// Float64 is a helper routine that allocates a new float64 value +// to store v and returns a pointer to it. +func Float64(v float64) *float64 { + return &v +} + +// Uint32 is a helper routine that allocates a new uint32 value +// to store v and returns a pointer to it. +func Uint32(v uint32) *uint32 { + return &v +} + +// Uint64 is a helper routine that allocates a new uint64 value +// to store v and returns a pointer to it. +func Uint64(v uint64) *uint64 { + return &v +} + +// String is a helper routine that allocates a new string value +// to store v and returns a pointer to it. +func String(v string) *string { + return &v +} + +// EnumName is a helper function to simplify printing protocol buffer enums +// by name. Given an enum map and a value, it returns a useful string. +func EnumName(m map[int32]string, v int32) string { + s, ok := m[v] + if ok { + return s + } + return strconv.Itoa(int(v)) +} + +// UnmarshalJSONEnum is a helper function to simplify recovering enum int values +// from their JSON-encoded representation. Given a map from the enum's symbolic +// names to its int values, and a byte buffer containing the JSON-encoded +// value, it returns an int32 that can be cast to the enum type by the caller. +// +// The function can deal with both JSON representations, numeric and symbolic. +func UnmarshalJSONEnum(m map[string]int32, data []byte, enumName string) (int32, error) { + if data[0] == '"' { + // New style: enums are strings. + var repr string + if err := json.Unmarshal(data, &repr); err != nil { + return -1, err + } + val, ok := m[repr] + if !ok { + return 0, fmt.Errorf("unrecognized enum %s value %q", enumName, repr) + } + return val, nil + } + // Old style: enums are ints. + var val int32 + if err := json.Unmarshal(data, &val); err != nil { + return 0, fmt.Errorf("cannot unmarshal %#q into enum %s", data, enumName) + } + return val, nil +} + +// DebugPrint dumps the encoded data in b in a debugging format with a header +// including the string s. Used in testing but made available for general debugging. +func (p *Buffer) DebugPrint(s string, b []byte) { + var u uint64 + + obuf := p.buf + index := p.index + p.buf = b + p.index = 0 + depth := 0 + + fmt.Printf("\n--- %s ---\n", s) + +out: + for { + for i := 0; i < depth; i++ { + fmt.Print(" ") + } + + index := p.index + if index == len(p.buf) { + break + } + + op, err := p.DecodeVarint() + if err != nil { + fmt.Printf("%3d: fetching op err %v\n", index, err) + break out + } + tag := op >> 3 + wire := op & 7 + + switch wire { + default: + fmt.Printf("%3d: t=%3d unknown wire=%d\n", + index, tag, wire) + break out + + case WireBytes: + var r []byte + + r, err = p.DecodeRawBytes(false) + if err != nil { + break out + } + fmt.Printf("%3d: t=%3d bytes [%d]", index, tag, len(r)) + if len(r) <= 6 { + for i := 0; i < len(r); i++ { + fmt.Printf(" %.2x", r[i]) + } + } else { + for i := 0; i < 3; i++ { + fmt.Printf(" %.2x", r[i]) + } + fmt.Printf(" ..") + for i := len(r) - 3; i < len(r); i++ { + fmt.Printf(" %.2x", r[i]) + } + } + fmt.Printf("\n") + + case WireFixed32: + u, err = p.DecodeFixed32() + if err != nil { + fmt.Printf("%3d: t=%3d fix32 err %v\n", index, tag, err) + break out + } + fmt.Printf("%3d: t=%3d fix32 %d\n", index, tag, u) + + case WireFixed64: + u, err = p.DecodeFixed64() + if err != nil { + fmt.Printf("%3d: t=%3d fix64 err %v\n", index, tag, err) + break out + } + fmt.Printf("%3d: t=%3d fix64 %d\n", index, tag, u) + + case WireVarint: + u, err = p.DecodeVarint() + if err != nil { + fmt.Printf("%3d: t=%3d varint err %v\n", index, tag, err) + break out + } + fmt.Printf("%3d: t=%3d varint %d\n", index, tag, u) + + case WireStartGroup: + fmt.Printf("%3d: t=%3d start\n", index, tag) + depth++ + + case WireEndGroup: + depth-- + fmt.Printf("%3d: t=%3d end\n", index, tag) + } + } + + if depth != 0 { + fmt.Printf("%3d: start-end not balanced %d\n", p.index, depth) + } + fmt.Printf("\n") + + p.buf = obuf + p.index = index +} + +// SetDefaults sets unset protocol buffer fields to their default values. +// It only modifies fields that are both unset and have defined defaults. +// It recursively sets default values in any non-nil sub-messages. +func SetDefaults(pb Message) { + setDefaults(reflect.ValueOf(pb), true, false) +} + +// v is a pointer to a struct. +func setDefaults(v reflect.Value, recur, zeros bool) { + v = v.Elem() + + defaultMu.RLock() + dm, ok := defaults[v.Type()] + defaultMu.RUnlock() + if !ok { + dm = buildDefaultMessage(v.Type()) + defaultMu.Lock() + defaults[v.Type()] = dm + defaultMu.Unlock() + } + + for _, sf := range dm.scalars { + f := v.Field(sf.index) + if !f.IsNil() { + // field already set + continue + } + dv := sf.value + if dv == nil && !zeros { + // no explicit default, and don't want to set zeros + continue + } + fptr := f.Addr().Interface() // **T + // TODO: Consider batching the allocations we do here. + switch sf.kind { + case reflect.Bool: + b := new(bool) + if dv != nil { + *b = dv.(bool) + } + *(fptr.(**bool)) = b + case reflect.Float32: + f := new(float32) + if dv != nil { + *f = dv.(float32) + } + *(fptr.(**float32)) = f + case reflect.Float64: + f := new(float64) + if dv != nil { + *f = dv.(float64) + } + *(fptr.(**float64)) = f + case reflect.Int32: + // might be an enum + if ft := f.Type(); ft != int32PtrType { + // enum + f.Set(reflect.New(ft.Elem())) + if dv != nil { + f.Elem().SetInt(int64(dv.(int32))) + } + } else { + // int32 field + i := new(int32) + if dv != nil { + *i = dv.(int32) + } + *(fptr.(**int32)) = i + } + case reflect.Int64: + i := new(int64) + if dv != nil { + *i = dv.(int64) + } + *(fptr.(**int64)) = i + case reflect.String: + s := new(string) + if dv != nil { + *s = dv.(string) + } + *(fptr.(**string)) = s + case reflect.Uint8: + // exceptional case: []byte + var b []byte + if dv != nil { + db := dv.([]byte) + b = make([]byte, len(db)) + copy(b, db) + } else { + b = []byte{} + } + *(fptr.(*[]byte)) = b + case reflect.Uint32: + u := new(uint32) + if dv != nil { + *u = dv.(uint32) + } + *(fptr.(**uint32)) = u + case reflect.Uint64: + u := new(uint64) + if dv != nil { + *u = dv.(uint64) + } + *(fptr.(**uint64)) = u + default: + log.Printf("proto: can't set default for field %v (sf.kind=%v)", f, sf.kind) + } + } + + for _, ni := range dm.nested { + f := v.Field(ni) + // f is *T or []*T or map[T]*T + switch f.Kind() { + case reflect.Ptr: + if f.IsNil() { + continue + } + setDefaults(f, recur, zeros) + + case reflect.Slice: + for i := 0; i < f.Len(); i++ { + e := f.Index(i) + if e.IsNil() { + continue + } + setDefaults(e, recur, zeros) + } + + case reflect.Map: + for _, k := range f.MapKeys() { + e := f.MapIndex(k) + if e.IsNil() { + continue + } + setDefaults(e, recur, zeros) + } + } + } +} + +var ( + // defaults maps a protocol buffer struct type to a slice of the fields, + // with its scalar fields set to their proto-declared non-zero default values. + defaultMu sync.RWMutex + defaults = make(map[reflect.Type]defaultMessage) + + int32PtrType = reflect.TypeOf((*int32)(nil)) +) + +// defaultMessage represents information about the default values of a message. +type defaultMessage struct { + scalars []scalarField + nested []int // struct field index of nested messages +} + +type scalarField struct { + index int // struct field index + kind reflect.Kind // element type (the T in *T or []T) + value interface{} // the proto-declared default value, or nil +} + +// t is a struct type. +func buildDefaultMessage(t reflect.Type) (dm defaultMessage) { + sprop := GetProperties(t) + for _, prop := range sprop.Prop { + fi, ok := sprop.decoderTags.get(prop.Tag) + if !ok { + // XXX_unrecognized + continue + } + ft := t.Field(fi).Type + + sf, nested, err := fieldDefault(ft, prop) + switch { + case err != nil: + log.Print(err) + case nested: + dm.nested = append(dm.nested, fi) + case sf != nil: + sf.index = fi + dm.scalars = append(dm.scalars, *sf) + } + } + + return dm +} + +// fieldDefault returns the scalarField for field type ft. +// sf will be nil if the field can not have a default. +// nestedMessage will be true if this is a nested message. +// Note that sf.index is not set on return. +func fieldDefault(ft reflect.Type, prop *Properties) (sf *scalarField, nestedMessage bool, err error) { + var canHaveDefault bool + switch ft.Kind() { + case reflect.Ptr: + if ft.Elem().Kind() == reflect.Struct { + nestedMessage = true + } else { + canHaveDefault = true // proto2 scalar field + } + + case reflect.Slice: + switch ft.Elem().Kind() { + case reflect.Ptr: + nestedMessage = true // repeated message + case reflect.Uint8: + canHaveDefault = true // bytes field + } + + case reflect.Map: + if ft.Elem().Kind() == reflect.Ptr { + nestedMessage = true // map with message values + } + } + + if !canHaveDefault { + if nestedMessage { + return nil, true, nil + } + return nil, false, nil + } + + // We now know that ft is a pointer or slice. + sf = &scalarField{kind: ft.Elem().Kind()} + + // scalar fields without defaults + if !prop.HasDefault { + return sf, false, nil + } + + // a scalar field: either *T or []byte + switch ft.Elem().Kind() { + case reflect.Bool: + x, err := strconv.ParseBool(prop.Default) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default bool %q: %v", prop.Default, err) + } + sf.value = x + case reflect.Float32: + x, err := strconv.ParseFloat(prop.Default, 32) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default float32 %q: %v", prop.Default, err) + } + sf.value = float32(x) + case reflect.Float64: + x, err := strconv.ParseFloat(prop.Default, 64) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default float64 %q: %v", prop.Default, err) + } + sf.value = x + case reflect.Int32: + x, err := strconv.ParseInt(prop.Default, 10, 32) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default int32 %q: %v", prop.Default, err) + } + sf.value = int32(x) + case reflect.Int64: + x, err := strconv.ParseInt(prop.Default, 10, 64) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default int64 %q: %v", prop.Default, err) + } + sf.value = x + case reflect.String: + sf.value = prop.Default + case reflect.Uint8: + // []byte (not *uint8) + sf.value = []byte(prop.Default) + case reflect.Uint32: + x, err := strconv.ParseUint(prop.Default, 10, 32) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default uint32 %q: %v", prop.Default, err) + } + sf.value = uint32(x) + case reflect.Uint64: + x, err := strconv.ParseUint(prop.Default, 10, 64) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default uint64 %q: %v", prop.Default, err) + } + sf.value = x + default: + return nil, false, fmt.Errorf("proto: unhandled def kind %v", ft.Elem().Kind()) + } + + return sf, false, nil +} + +// mapKeys returns a sort.Interface to be used for sorting the map keys. +// Map fields may have key types of non-float scalars, strings and enums. +func mapKeys(vs []reflect.Value) sort.Interface { + s := mapKeySorter{vs: vs} + + // Type specialization per https://developers.google.com/protocol-buffers/docs/proto#maps. + if len(vs) == 0 { + return s + } + switch vs[0].Kind() { + case reflect.Int32, reflect.Int64: + s.less = func(a, b reflect.Value) bool { return a.Int() < b.Int() } + case reflect.Uint32, reflect.Uint64: + s.less = func(a, b reflect.Value) bool { return a.Uint() < b.Uint() } + case reflect.Bool: + s.less = func(a, b reflect.Value) bool { return !a.Bool() && b.Bool() } // false < true + case reflect.String: + s.less = func(a, b reflect.Value) bool { return a.String() < b.String() } + default: + panic(fmt.Sprintf("unsupported map key type: %v", vs[0].Kind())) + } + + return s +} + +type mapKeySorter struct { + vs []reflect.Value + less func(a, b reflect.Value) bool +} + +func (s mapKeySorter) Len() int { return len(s.vs) } +func (s mapKeySorter) Swap(i, j int) { s.vs[i], s.vs[j] = s.vs[j], s.vs[i] } +func (s mapKeySorter) Less(i, j int) bool { + return s.less(s.vs[i], s.vs[j]) +} + +// isProto3Zero reports whether v is a zero proto3 value. +func isProto3Zero(v reflect.Value) bool { + switch v.Kind() { + case reflect.Bool: + return !v.Bool() + case reflect.Int32, reflect.Int64: + return v.Int() == 0 + case reflect.Uint32, reflect.Uint64: + return v.Uint() == 0 + case reflect.Float32, reflect.Float64: + return v.Float() == 0 + case reflect.String: + return v.String() == "" + } + return false +} + +const ( + // ProtoPackageIsVersion3 is referenced from generated protocol buffer files + // to assert that that code is compatible with this version of the proto package. + ProtoPackageIsVersion3 = true + + // ProtoPackageIsVersion2 is referenced from generated protocol buffer files + // to assert that that code is compatible with this version of the proto package. + ProtoPackageIsVersion2 = true + + // ProtoPackageIsVersion1 is referenced from generated protocol buffer files + // to assert that that code is compatible with this version of the proto package. + ProtoPackageIsVersion1 = true +) + +// InternalMessageInfo is a type used internally by generated .pb.go files. +// This type is not intended to be used by non-generated code. +// This type is not subject to any compatibility guarantee. +type InternalMessageInfo struct { + marshal *marshalInfo + unmarshal *unmarshalInfo + merge *mergeInfo + discard *discardInfo +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/message_set.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/message_set.go new file mode 100644 index 000000000..f48a75676 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/message_set.go @@ -0,0 +1,181 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +/* + * Support for message sets. + */ + +import ( + "errors" +) + +// errNoMessageTypeID occurs when a protocol buffer does not have a message type ID. +// A message type ID is required for storing a protocol buffer in a message set. +var errNoMessageTypeID = errors.New("proto does not have a message type ID") + +// The first two types (_MessageSet_Item and messageSet) +// model what the protocol compiler produces for the following protocol message: +// message MessageSet { +// repeated group Item = 1 { +// required int32 type_id = 2; +// required string message = 3; +// }; +// } +// That is the MessageSet wire format. We can't use a proto to generate these +// because that would introduce a circular dependency between it and this package. + +type _MessageSet_Item struct { + TypeId *int32 `protobuf:"varint,2,req,name=type_id"` + Message []byte `protobuf:"bytes,3,req,name=message"` +} + +type messageSet struct { + Item []*_MessageSet_Item `protobuf:"group,1,rep"` + XXX_unrecognized []byte + // TODO: caching? +} + +// Make sure messageSet is a Message. +var _ Message = (*messageSet)(nil) + +// messageTypeIder is an interface satisfied by a protocol buffer type +// that may be stored in a MessageSet. +type messageTypeIder interface { + MessageTypeId() int32 +} + +func (ms *messageSet) find(pb Message) *_MessageSet_Item { + mti, ok := pb.(messageTypeIder) + if !ok { + return nil + } + id := mti.MessageTypeId() + for _, item := range ms.Item { + if *item.TypeId == id { + return item + } + } + return nil +} + +func (ms *messageSet) Has(pb Message) bool { + return ms.find(pb) != nil +} + +func (ms *messageSet) Unmarshal(pb Message) error { + if item := ms.find(pb); item != nil { + return Unmarshal(item.Message, pb) + } + if _, ok := pb.(messageTypeIder); !ok { + return errNoMessageTypeID + } + return nil // TODO: return error instead? +} + +func (ms *messageSet) Marshal(pb Message) error { + msg, err := Marshal(pb) + if err != nil { + return err + } + if item := ms.find(pb); item != nil { + // reuse existing item + item.Message = msg + return nil + } + + mti, ok := pb.(messageTypeIder) + if !ok { + return errNoMessageTypeID + } + + mtid := mti.MessageTypeId() + ms.Item = append(ms.Item, &_MessageSet_Item{ + TypeId: &mtid, + Message: msg, + }) + return nil +} + +func (ms *messageSet) Reset() { *ms = messageSet{} } +func (ms *messageSet) String() string { return CompactTextString(ms) } +func (*messageSet) ProtoMessage() {} + +// Support for the message_set_wire_format message option. + +func skipVarint(buf []byte) []byte { + i := 0 + for ; buf[i]&0x80 != 0; i++ { + } + return buf[i+1:] +} + +// unmarshalMessageSet decodes the extension map encoded in buf in the message set wire format. +// It is called by Unmarshal methods on protocol buffer messages with the message_set_wire_format option. +func unmarshalMessageSet(buf []byte, exts interface{}) error { + var m map[int32]Extension + switch exts := exts.(type) { + case *XXX_InternalExtensions: + m = exts.extensionsWrite() + case map[int32]Extension: + m = exts + default: + return errors.New("proto: not an extension map") + } + + ms := new(messageSet) + if err := Unmarshal(buf, ms); err != nil { + return err + } + for _, item := range ms.Item { + id := *item.TypeId + msg := item.Message + + // Restore wire type and field number varint, plus length varint. + // Be careful to preserve duplicate items. + b := EncodeVarint(uint64(id)<<3 | WireBytes) + if ext, ok := m[id]; ok { + // Existing data; rip off the tag and length varint + // so we join the new data correctly. + // We can assume that ext.enc is set because we are unmarshaling. + o := ext.enc[len(b):] // skip wire type and field number + _, n := DecodeVarint(o) // calculate length of length varint + o = o[n:] // skip length varint + msg = append(o, msg...) // join old data and new data + } + b = append(b, EncodeVarint(uint64(len(msg)))...) + b = append(b, msg...) + + m[id] = Extension{enc: b} + } + return nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/pointer_reflect.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/pointer_reflect.go new file mode 100644 index 000000000..94fa9194a --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/pointer_reflect.go @@ -0,0 +1,360 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2012 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// +build purego appengine js + +// This file contains an implementation of proto field accesses using package reflect. +// It is slower than the code in pointer_unsafe.go but it avoids package unsafe and can +// be used on App Engine. + +package proto + +import ( + "reflect" + "sync" +) + +const unsafeAllowed = false + +// A field identifies a field in a struct, accessible from a pointer. +// In this implementation, a field is identified by the sequence of field indices +// passed to reflect's FieldByIndex. +type field []int + +// toField returns a field equivalent to the given reflect field. +func toField(f *reflect.StructField) field { + return f.Index +} + +// invalidField is an invalid field identifier. +var invalidField = field(nil) + +// zeroField is a noop when calling pointer.offset. +var zeroField = field([]int{}) + +// IsValid reports whether the field identifier is valid. +func (f field) IsValid() bool { return f != nil } + +// The pointer type is for the table-driven decoder. +// The implementation here uses a reflect.Value of pointer type to +// create a generic pointer. In pointer_unsafe.go we use unsafe +// instead of reflect to implement the same (but faster) interface. +type pointer struct { + v reflect.Value +} + +// toPointer converts an interface of pointer type to a pointer +// that points to the same target. +func toPointer(i *Message) pointer { + return pointer{v: reflect.ValueOf(*i)} +} + +// toAddrPointer converts an interface to a pointer that points to +// the interface data. +func toAddrPointer(i *interface{}, isptr, deref bool) pointer { + v := reflect.ValueOf(*i) + u := reflect.New(v.Type()) + u.Elem().Set(v) + if deref { + u = u.Elem() + } + return pointer{v: u} +} + +// valToPointer converts v to a pointer. v must be of pointer type. +func valToPointer(v reflect.Value) pointer { + return pointer{v: v} +} + +// offset converts from a pointer to a structure to a pointer to +// one of its fields. +func (p pointer) offset(f field) pointer { + return pointer{v: p.v.Elem().FieldByIndex(f).Addr()} +} + +func (p pointer) isNil() bool { + return p.v.IsNil() +} + +// grow updates the slice s in place to make it one element longer. +// s must be addressable. +// Returns the (addressable) new element. +func grow(s reflect.Value) reflect.Value { + n, m := s.Len(), s.Cap() + if n < m { + s.SetLen(n + 1) + } else { + s.Set(reflect.Append(s, reflect.Zero(s.Type().Elem()))) + } + return s.Index(n) +} + +func (p pointer) toInt64() *int64 { + return p.v.Interface().(*int64) +} +func (p pointer) toInt64Ptr() **int64 { + return p.v.Interface().(**int64) +} +func (p pointer) toInt64Slice() *[]int64 { + return p.v.Interface().(*[]int64) +} + +var int32ptr = reflect.TypeOf((*int32)(nil)) + +func (p pointer) toInt32() *int32 { + return p.v.Convert(int32ptr).Interface().(*int32) +} + +// The toInt32Ptr/Slice methods don't work because of enums. +// Instead, we must use set/get methods for the int32ptr/slice case. +/* + func (p pointer) toInt32Ptr() **int32 { + return p.v.Interface().(**int32) +} + func (p pointer) toInt32Slice() *[]int32 { + return p.v.Interface().(*[]int32) +} +*/ +func (p pointer) getInt32Ptr() *int32 { + if p.v.Type().Elem().Elem() == reflect.TypeOf(int32(0)) { + // raw int32 type + return p.v.Elem().Interface().(*int32) + } + // an enum + return p.v.Elem().Convert(int32PtrType).Interface().(*int32) +} +func (p pointer) setInt32Ptr(v int32) { + // Allocate value in a *int32. Possibly convert that to a *enum. + // Then assign it to a **int32 or **enum. + // Note: we can convert *int32 to *enum, but we can't convert + // **int32 to **enum! + p.v.Elem().Set(reflect.ValueOf(&v).Convert(p.v.Type().Elem())) +} + +// getInt32Slice copies []int32 from p as a new slice. +// This behavior differs from the implementation in pointer_unsafe.go. +func (p pointer) getInt32Slice() []int32 { + if p.v.Type().Elem().Elem() == reflect.TypeOf(int32(0)) { + // raw int32 type + return p.v.Elem().Interface().([]int32) + } + // an enum + // Allocate a []int32, then assign []enum's values into it. + // Note: we can't convert []enum to []int32. + slice := p.v.Elem() + s := make([]int32, slice.Len()) + for i := 0; i < slice.Len(); i++ { + s[i] = int32(slice.Index(i).Int()) + } + return s +} + +// setInt32Slice copies []int32 into p as a new slice. +// This behavior differs from the implementation in pointer_unsafe.go. +func (p pointer) setInt32Slice(v []int32) { + if p.v.Type().Elem().Elem() == reflect.TypeOf(int32(0)) { + // raw int32 type + p.v.Elem().Set(reflect.ValueOf(v)) + return + } + // an enum + // Allocate a []enum, then assign []int32's values into it. + // Note: we can't convert []enum to []int32. + slice := reflect.MakeSlice(p.v.Type().Elem(), len(v), cap(v)) + for i, x := range v { + slice.Index(i).SetInt(int64(x)) + } + p.v.Elem().Set(slice) +} +func (p pointer) appendInt32Slice(v int32) { + grow(p.v.Elem()).SetInt(int64(v)) +} + +func (p pointer) toUint64() *uint64 { + return p.v.Interface().(*uint64) +} +func (p pointer) toUint64Ptr() **uint64 { + return p.v.Interface().(**uint64) +} +func (p pointer) toUint64Slice() *[]uint64 { + return p.v.Interface().(*[]uint64) +} +func (p pointer) toUint32() *uint32 { + return p.v.Interface().(*uint32) +} +func (p pointer) toUint32Ptr() **uint32 { + return p.v.Interface().(**uint32) +} +func (p pointer) toUint32Slice() *[]uint32 { + return p.v.Interface().(*[]uint32) +} +func (p pointer) toBool() *bool { + return p.v.Interface().(*bool) +} +func (p pointer) toBoolPtr() **bool { + return p.v.Interface().(**bool) +} +func (p pointer) toBoolSlice() *[]bool { + return p.v.Interface().(*[]bool) +} +func (p pointer) toFloat64() *float64 { + return p.v.Interface().(*float64) +} +func (p pointer) toFloat64Ptr() **float64 { + return p.v.Interface().(**float64) +} +func (p pointer) toFloat64Slice() *[]float64 { + return p.v.Interface().(*[]float64) +} +func (p pointer) toFloat32() *float32 { + return p.v.Interface().(*float32) +} +func (p pointer) toFloat32Ptr() **float32 { + return p.v.Interface().(**float32) +} +func (p pointer) toFloat32Slice() *[]float32 { + return p.v.Interface().(*[]float32) +} +func (p pointer) toString() *string { + return p.v.Interface().(*string) +} +func (p pointer) toStringPtr() **string { + return p.v.Interface().(**string) +} +func (p pointer) toStringSlice() *[]string { + return p.v.Interface().(*[]string) +} +func (p pointer) toBytes() *[]byte { + return p.v.Interface().(*[]byte) +} +func (p pointer) toBytesSlice() *[][]byte { + return p.v.Interface().(*[][]byte) +} +func (p pointer) toExtensions() *XXX_InternalExtensions { + return p.v.Interface().(*XXX_InternalExtensions) +} +func (p pointer) toOldExtensions() *map[int32]Extension { + return p.v.Interface().(*map[int32]Extension) +} +func (p pointer) getPointer() pointer { + return pointer{v: p.v.Elem()} +} +func (p pointer) setPointer(q pointer) { + p.v.Elem().Set(q.v) +} +func (p pointer) appendPointer(q pointer) { + grow(p.v.Elem()).Set(q.v) +} + +// getPointerSlice copies []*T from p as a new []pointer. +// This behavior differs from the implementation in pointer_unsafe.go. +func (p pointer) getPointerSlice() []pointer { + if p.v.IsNil() { + return nil + } + n := p.v.Elem().Len() + s := make([]pointer, n) + for i := 0; i < n; i++ { + s[i] = pointer{v: p.v.Elem().Index(i)} + } + return s +} + +// setPointerSlice copies []pointer into p as a new []*T. +// This behavior differs from the implementation in pointer_unsafe.go. +func (p pointer) setPointerSlice(v []pointer) { + if v == nil { + p.v.Elem().Set(reflect.New(p.v.Elem().Type()).Elem()) + return + } + s := reflect.MakeSlice(p.v.Elem().Type(), 0, len(v)) + for _, p := range v { + s = reflect.Append(s, p.v) + } + p.v.Elem().Set(s) +} + +// getInterfacePointer returns a pointer that points to the +// interface data of the interface pointed by p. +func (p pointer) getInterfacePointer() pointer { + if p.v.Elem().IsNil() { + return pointer{v: p.v.Elem()} + } + return pointer{v: p.v.Elem().Elem().Elem().Field(0).Addr()} // *interface -> interface -> *struct -> struct +} + +func (p pointer) asPointerTo(t reflect.Type) reflect.Value { + // TODO: check that p.v.Type().Elem() == t? + return p.v +} + +func atomicLoadUnmarshalInfo(p **unmarshalInfo) *unmarshalInfo { + atomicLock.Lock() + defer atomicLock.Unlock() + return *p +} +func atomicStoreUnmarshalInfo(p **unmarshalInfo, v *unmarshalInfo) { + atomicLock.Lock() + defer atomicLock.Unlock() + *p = v +} +func atomicLoadMarshalInfo(p **marshalInfo) *marshalInfo { + atomicLock.Lock() + defer atomicLock.Unlock() + return *p +} +func atomicStoreMarshalInfo(p **marshalInfo, v *marshalInfo) { + atomicLock.Lock() + defer atomicLock.Unlock() + *p = v +} +func atomicLoadMergeInfo(p **mergeInfo) *mergeInfo { + atomicLock.Lock() + defer atomicLock.Unlock() + return *p +} +func atomicStoreMergeInfo(p **mergeInfo, v *mergeInfo) { + atomicLock.Lock() + defer atomicLock.Unlock() + *p = v +} +func atomicLoadDiscardInfo(p **discardInfo) *discardInfo { + atomicLock.Lock() + defer atomicLock.Unlock() + return *p +} +func atomicStoreDiscardInfo(p **discardInfo, v *discardInfo) { + atomicLock.Lock() + defer atomicLock.Unlock() + *p = v +} + +var atomicLock sync.Mutex diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/pointer_unsafe.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/pointer_unsafe.go new file mode 100644 index 000000000..dbfffe071 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/pointer_unsafe.go @@ -0,0 +1,313 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2012 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// +build !purego,!appengine,!js + +// This file contains the implementation of the proto field accesses using package unsafe. + +package proto + +import ( + "reflect" + "sync/atomic" + "unsafe" +) + +const unsafeAllowed = true + +// A field identifies a field in a struct, accessible from a pointer. +// In this implementation, a field is identified by its byte offset from the start of the struct. +type field uintptr + +// toField returns a field equivalent to the given reflect field. +func toField(f *reflect.StructField) field { + return field(f.Offset) +} + +// invalidField is an invalid field identifier. +const invalidField = ^field(0) + +// zeroField is a noop when calling pointer.offset. +const zeroField = field(0) + +// IsValid reports whether the field identifier is valid. +func (f field) IsValid() bool { + return f != invalidField +} + +// The pointer type below is for the new table-driven encoder/decoder. +// The implementation here uses unsafe.Pointer to create a generic pointer. +// In pointer_reflect.go we use reflect instead of unsafe to implement +// the same (but slower) interface. +type pointer struct { + p unsafe.Pointer +} + +// size of pointer +var ptrSize = unsafe.Sizeof(uintptr(0)) + +// toPointer converts an interface of pointer type to a pointer +// that points to the same target. +func toPointer(i *Message) pointer { + // Super-tricky - read pointer out of data word of interface value. + // Saves ~25ns over the equivalent: + // return valToPointer(reflect.ValueOf(*i)) + return pointer{p: (*[2]unsafe.Pointer)(unsafe.Pointer(i))[1]} +} + +// toAddrPointer converts an interface to a pointer that points to +// the interface data. +func toAddrPointer(i *interface{}, isptr, deref bool) (p pointer) { + // Super-tricky - read or get the address of data word of interface value. + if isptr { + // The interface is of pointer type, thus it is a direct interface. + // The data word is the pointer data itself. We take its address. + p = pointer{p: unsafe.Pointer(uintptr(unsafe.Pointer(i)) + ptrSize)} + } else { + // The interface is not of pointer type. The data word is the pointer + // to the data. + p = pointer{p: (*[2]unsafe.Pointer)(unsafe.Pointer(i))[1]} + } + if deref { + p.p = *(*unsafe.Pointer)(p.p) + } + return p +} + +// valToPointer converts v to a pointer. v must be of pointer type. +func valToPointer(v reflect.Value) pointer { + return pointer{p: unsafe.Pointer(v.Pointer())} +} + +// offset converts from a pointer to a structure to a pointer to +// one of its fields. +func (p pointer) offset(f field) pointer { + // For safety, we should panic if !f.IsValid, however calling panic causes + // this to no longer be inlineable, which is a serious performance cost. + /* + if !f.IsValid() { + panic("invalid field") + } + */ + return pointer{p: unsafe.Pointer(uintptr(p.p) + uintptr(f))} +} + +func (p pointer) isNil() bool { + return p.p == nil +} + +func (p pointer) toInt64() *int64 { + return (*int64)(p.p) +} +func (p pointer) toInt64Ptr() **int64 { + return (**int64)(p.p) +} +func (p pointer) toInt64Slice() *[]int64 { + return (*[]int64)(p.p) +} +func (p pointer) toInt32() *int32 { + return (*int32)(p.p) +} + +// See pointer_reflect.go for why toInt32Ptr/Slice doesn't exist. +/* + func (p pointer) toInt32Ptr() **int32 { + return (**int32)(p.p) + } + func (p pointer) toInt32Slice() *[]int32 { + return (*[]int32)(p.p) + } +*/ +func (p pointer) getInt32Ptr() *int32 { + return *(**int32)(p.p) +} +func (p pointer) setInt32Ptr(v int32) { + *(**int32)(p.p) = &v +} + +// getInt32Slice loads a []int32 from p. +// The value returned is aliased with the original slice. +// This behavior differs from the implementation in pointer_reflect.go. +func (p pointer) getInt32Slice() []int32 { + return *(*[]int32)(p.p) +} + +// setInt32Slice stores a []int32 to p. +// The value set is aliased with the input slice. +// This behavior differs from the implementation in pointer_reflect.go. +func (p pointer) setInt32Slice(v []int32) { + *(*[]int32)(p.p) = v +} + +// TODO: Can we get rid of appendInt32Slice and use setInt32Slice instead? +func (p pointer) appendInt32Slice(v int32) { + s := (*[]int32)(p.p) + *s = append(*s, v) +} + +func (p pointer) toUint64() *uint64 { + return (*uint64)(p.p) +} +func (p pointer) toUint64Ptr() **uint64 { + return (**uint64)(p.p) +} +func (p pointer) toUint64Slice() *[]uint64 { + return (*[]uint64)(p.p) +} +func (p pointer) toUint32() *uint32 { + return (*uint32)(p.p) +} +func (p pointer) toUint32Ptr() **uint32 { + return (**uint32)(p.p) +} +func (p pointer) toUint32Slice() *[]uint32 { + return (*[]uint32)(p.p) +} +func (p pointer) toBool() *bool { + return (*bool)(p.p) +} +func (p pointer) toBoolPtr() **bool { + return (**bool)(p.p) +} +func (p pointer) toBoolSlice() *[]bool { + return (*[]bool)(p.p) +} +func (p pointer) toFloat64() *float64 { + return (*float64)(p.p) +} +func (p pointer) toFloat64Ptr() **float64 { + return (**float64)(p.p) +} +func (p pointer) toFloat64Slice() *[]float64 { + return (*[]float64)(p.p) +} +func (p pointer) toFloat32() *float32 { + return (*float32)(p.p) +} +func (p pointer) toFloat32Ptr() **float32 { + return (**float32)(p.p) +} +func (p pointer) toFloat32Slice() *[]float32 { + return (*[]float32)(p.p) +} +func (p pointer) toString() *string { + return (*string)(p.p) +} +func (p pointer) toStringPtr() **string { + return (**string)(p.p) +} +func (p pointer) toStringSlice() *[]string { + return (*[]string)(p.p) +} +func (p pointer) toBytes() *[]byte { + return (*[]byte)(p.p) +} +func (p pointer) toBytesSlice() *[][]byte { + return (*[][]byte)(p.p) +} +func (p pointer) toExtensions() *XXX_InternalExtensions { + return (*XXX_InternalExtensions)(p.p) +} +func (p pointer) toOldExtensions() *map[int32]Extension { + return (*map[int32]Extension)(p.p) +} + +// getPointerSlice loads []*T from p as a []pointer. +// The value returned is aliased with the original slice. +// This behavior differs from the implementation in pointer_reflect.go. +func (p pointer) getPointerSlice() []pointer { + // Super-tricky - p should point to a []*T where T is a + // message type. We load it as []pointer. + return *(*[]pointer)(p.p) +} + +// setPointerSlice stores []pointer into p as a []*T. +// The value set is aliased with the input slice. +// This behavior differs from the implementation in pointer_reflect.go. +func (p pointer) setPointerSlice(v []pointer) { + // Super-tricky - p should point to a []*T where T is a + // message type. We store it as []pointer. + *(*[]pointer)(p.p) = v +} + +// getPointer loads the pointer at p and returns it. +func (p pointer) getPointer() pointer { + return pointer{p: *(*unsafe.Pointer)(p.p)} +} + +// setPointer stores the pointer q at p. +func (p pointer) setPointer(q pointer) { + *(*unsafe.Pointer)(p.p) = q.p +} + +// append q to the slice pointed to by p. +func (p pointer) appendPointer(q pointer) { + s := (*[]unsafe.Pointer)(p.p) + *s = append(*s, q.p) +} + +// getInterfacePointer returns a pointer that points to the +// interface data of the interface pointed by p. +func (p pointer) getInterfacePointer() pointer { + // Super-tricky - read pointer out of data word of interface value. + return pointer{p: (*(*[2]unsafe.Pointer)(p.p))[1]} +} + +// asPointerTo returns a reflect.Value that is a pointer to an +// object of type t stored at p. +func (p pointer) asPointerTo(t reflect.Type) reflect.Value { + return reflect.NewAt(t, p.p) +} + +func atomicLoadUnmarshalInfo(p **unmarshalInfo) *unmarshalInfo { + return (*unmarshalInfo)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p)))) +} +func atomicStoreUnmarshalInfo(p **unmarshalInfo, v *unmarshalInfo) { + atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(p)), unsafe.Pointer(v)) +} +func atomicLoadMarshalInfo(p **marshalInfo) *marshalInfo { + return (*marshalInfo)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p)))) +} +func atomicStoreMarshalInfo(p **marshalInfo, v *marshalInfo) { + atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(p)), unsafe.Pointer(v)) +} +func atomicLoadMergeInfo(p **mergeInfo) *mergeInfo { + return (*mergeInfo)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p)))) +} +func atomicStoreMergeInfo(p **mergeInfo, v *mergeInfo) { + atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(p)), unsafe.Pointer(v)) +} +func atomicLoadDiscardInfo(p **discardInfo) *discardInfo { + return (*discardInfo)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p)))) +} +func atomicStoreDiscardInfo(p **discardInfo, v *discardInfo) { + atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(p)), unsafe.Pointer(v)) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/properties.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/properties.go new file mode 100644 index 000000000..a4b8c0cd3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/properties.go @@ -0,0 +1,544 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +/* + * Routines for encoding data into the wire format for protocol buffers. + */ + +import ( + "fmt" + "log" + "reflect" + "sort" + "strconv" + "strings" + "sync" +) + +const debug bool = false + +// Constants that identify the encoding of a value on the wire. +const ( + WireVarint = 0 + WireFixed64 = 1 + WireBytes = 2 + WireStartGroup = 3 + WireEndGroup = 4 + WireFixed32 = 5 +) + +// tagMap is an optimization over map[int]int for typical protocol buffer +// use-cases. Encoded protocol buffers are often in tag order with small tag +// numbers. +type tagMap struct { + fastTags []int + slowTags map[int]int +} + +// tagMapFastLimit is the upper bound on the tag number that will be stored in +// the tagMap slice rather than its map. +const tagMapFastLimit = 1024 + +func (p *tagMap) get(t int) (int, bool) { + if t > 0 && t < tagMapFastLimit { + if t >= len(p.fastTags) { + return 0, false + } + fi := p.fastTags[t] + return fi, fi >= 0 + } + fi, ok := p.slowTags[t] + return fi, ok +} + +func (p *tagMap) put(t int, fi int) { + if t > 0 && t < tagMapFastLimit { + for len(p.fastTags) < t+1 { + p.fastTags = append(p.fastTags, -1) + } + p.fastTags[t] = fi + return + } + if p.slowTags == nil { + p.slowTags = make(map[int]int) + } + p.slowTags[t] = fi +} + +// StructProperties represents properties for all the fields of a struct. +// decoderTags and decoderOrigNames should only be used by the decoder. +type StructProperties struct { + Prop []*Properties // properties for each field + reqCount int // required count + decoderTags tagMap // map from proto tag to struct field number + decoderOrigNames map[string]int // map from original name to struct field number + order []int // list of struct field numbers in tag order + + // OneofTypes contains information about the oneof fields in this message. + // It is keyed by the original name of a field. + OneofTypes map[string]*OneofProperties +} + +// OneofProperties represents information about a specific field in a oneof. +type OneofProperties struct { + Type reflect.Type // pointer to generated struct type for this oneof field + Field int // struct field number of the containing oneof in the message + Prop *Properties +} + +// Implement the sorting interface so we can sort the fields in tag order, as recommended by the spec. +// See encode.go, (*Buffer).enc_struct. + +func (sp *StructProperties) Len() int { return len(sp.order) } +func (sp *StructProperties) Less(i, j int) bool { + return sp.Prop[sp.order[i]].Tag < sp.Prop[sp.order[j]].Tag +} +func (sp *StructProperties) Swap(i, j int) { sp.order[i], sp.order[j] = sp.order[j], sp.order[i] } + +// Properties represents the protocol-specific behavior of a single struct field. +type Properties struct { + Name string // name of the field, for error messages + OrigName string // original name before protocol compiler (always set) + JSONName string // name to use for JSON; determined by protoc + Wire string + WireType int + Tag int + Required bool + Optional bool + Repeated bool + Packed bool // relevant for repeated primitives only + Enum string // set for enum types only + proto3 bool // whether this is known to be a proto3 field + oneof bool // whether this is a oneof field + + Default string // default value + HasDefault bool // whether an explicit default was provided + + stype reflect.Type // set for struct types only + sprop *StructProperties // set for struct types only + + mtype reflect.Type // set for map types only + MapKeyProp *Properties // set for map types only + MapValProp *Properties // set for map types only +} + +// String formats the properties in the protobuf struct field tag style. +func (p *Properties) String() string { + s := p.Wire + s += "," + s += strconv.Itoa(p.Tag) + if p.Required { + s += ",req" + } + if p.Optional { + s += ",opt" + } + if p.Repeated { + s += ",rep" + } + if p.Packed { + s += ",packed" + } + s += ",name=" + p.OrigName + if p.JSONName != p.OrigName { + s += ",json=" + p.JSONName + } + if p.proto3 { + s += ",proto3" + } + if p.oneof { + s += ",oneof" + } + if len(p.Enum) > 0 { + s += ",enum=" + p.Enum + } + if p.HasDefault { + s += ",def=" + p.Default + } + return s +} + +// Parse populates p by parsing a string in the protobuf struct field tag style. +func (p *Properties) Parse(s string) { + // "bytes,49,opt,name=foo,def=hello!" + fields := strings.Split(s, ",") // breaks def=, but handled below. + if len(fields) < 2 { + log.Printf("proto: tag has too few fields: %q", s) + return + } + + p.Wire = fields[0] + switch p.Wire { + case "varint": + p.WireType = WireVarint + case "fixed32": + p.WireType = WireFixed32 + case "fixed64": + p.WireType = WireFixed64 + case "zigzag32": + p.WireType = WireVarint + case "zigzag64": + p.WireType = WireVarint + case "bytes", "group": + p.WireType = WireBytes + // no numeric converter for non-numeric types + default: + log.Printf("proto: tag has unknown wire type: %q", s) + return + } + + var err error + p.Tag, err = strconv.Atoi(fields[1]) + if err != nil { + return + } + +outer: + for i := 2; i < len(fields); i++ { + f := fields[i] + switch { + case f == "req": + p.Required = true + case f == "opt": + p.Optional = true + case f == "rep": + p.Repeated = true + case f == "packed": + p.Packed = true + case strings.HasPrefix(f, "name="): + p.OrigName = f[5:] + case strings.HasPrefix(f, "json="): + p.JSONName = f[5:] + case strings.HasPrefix(f, "enum="): + p.Enum = f[5:] + case f == "proto3": + p.proto3 = true + case f == "oneof": + p.oneof = true + case strings.HasPrefix(f, "def="): + p.HasDefault = true + p.Default = f[4:] // rest of string + if i+1 < len(fields) { + // Commas aren't escaped, and def is always last. + p.Default += "," + strings.Join(fields[i+1:], ",") + break outer + } + } + } +} + +var protoMessageType = reflect.TypeOf((*Message)(nil)).Elem() + +// setFieldProps initializes the field properties for submessages and maps. +func (p *Properties) setFieldProps(typ reflect.Type, f *reflect.StructField, lockGetProp bool) { + switch t1 := typ; t1.Kind() { + case reflect.Ptr: + if t1.Elem().Kind() == reflect.Struct { + p.stype = t1.Elem() + } + + case reflect.Slice: + if t2 := t1.Elem(); t2.Kind() == reflect.Ptr && t2.Elem().Kind() == reflect.Struct { + p.stype = t2.Elem() + } + + case reflect.Map: + p.mtype = t1 + p.MapKeyProp = &Properties{} + p.MapKeyProp.init(reflect.PtrTo(p.mtype.Key()), "Key", f.Tag.Get("protobuf_key"), nil, lockGetProp) + p.MapValProp = &Properties{} + vtype := p.mtype.Elem() + if vtype.Kind() != reflect.Ptr && vtype.Kind() != reflect.Slice { + // The value type is not a message (*T) or bytes ([]byte), + // so we need encoders for the pointer to this type. + vtype = reflect.PtrTo(vtype) + } + p.MapValProp.init(vtype, "Value", f.Tag.Get("protobuf_val"), nil, lockGetProp) + } + + if p.stype != nil { + if lockGetProp { + p.sprop = GetProperties(p.stype) + } else { + p.sprop = getPropertiesLocked(p.stype) + } + } +} + +var ( + marshalerType = reflect.TypeOf((*Marshaler)(nil)).Elem() +) + +// Init populates the properties from a protocol buffer struct tag. +func (p *Properties) Init(typ reflect.Type, name, tag string, f *reflect.StructField) { + p.init(typ, name, tag, f, true) +} + +func (p *Properties) init(typ reflect.Type, name, tag string, f *reflect.StructField, lockGetProp bool) { + // "bytes,49,opt,def=hello!" + p.Name = name + p.OrigName = name + if tag == "" { + return + } + p.Parse(tag) + p.setFieldProps(typ, f, lockGetProp) +} + +var ( + propertiesMu sync.RWMutex + propertiesMap = make(map[reflect.Type]*StructProperties) +) + +// GetProperties returns the list of properties for the type represented by t. +// t must represent a generated struct type of a protocol message. +func GetProperties(t reflect.Type) *StructProperties { + if t.Kind() != reflect.Struct { + panic("proto: type must have kind struct") + } + + // Most calls to GetProperties in a long-running program will be + // retrieving details for types we have seen before. + propertiesMu.RLock() + sprop, ok := propertiesMap[t] + propertiesMu.RUnlock() + if ok { + return sprop + } + + propertiesMu.Lock() + sprop = getPropertiesLocked(t) + propertiesMu.Unlock() + return sprop +} + +type ( + oneofFuncsIface interface { + XXX_OneofFuncs() (func(Message, *Buffer) error, func(Message, int, int, *Buffer) (bool, error), func(Message) int, []interface{}) + } + oneofWrappersIface interface { + XXX_OneofWrappers() []interface{} + } +) + +// getPropertiesLocked requires that propertiesMu is held. +func getPropertiesLocked(t reflect.Type) *StructProperties { + if prop, ok := propertiesMap[t]; ok { + return prop + } + + prop := new(StructProperties) + // in case of recursive protos, fill this in now. + propertiesMap[t] = prop + + // build properties + prop.Prop = make([]*Properties, t.NumField()) + prop.order = make([]int, t.NumField()) + + for i := 0; i < t.NumField(); i++ { + f := t.Field(i) + p := new(Properties) + name := f.Name + p.init(f.Type, name, f.Tag.Get("protobuf"), &f, false) + + oneof := f.Tag.Get("protobuf_oneof") // special case + if oneof != "" { + // Oneof fields don't use the traditional protobuf tag. + p.OrigName = oneof + } + prop.Prop[i] = p + prop.order[i] = i + if debug { + print(i, " ", f.Name, " ", t.String(), " ") + if p.Tag > 0 { + print(p.String()) + } + print("\n") + } + } + + // Re-order prop.order. + sort.Sort(prop) + + var oots []interface{} + switch m := reflect.Zero(reflect.PtrTo(t)).Interface().(type) { + case oneofFuncsIface: + _, _, _, oots = m.XXX_OneofFuncs() + case oneofWrappersIface: + oots = m.XXX_OneofWrappers() + } + if len(oots) > 0 { + // Interpret oneof metadata. + prop.OneofTypes = make(map[string]*OneofProperties) + for _, oot := range oots { + oop := &OneofProperties{ + Type: reflect.ValueOf(oot).Type(), // *T + Prop: new(Properties), + } + sft := oop.Type.Elem().Field(0) + oop.Prop.Name = sft.Name + oop.Prop.Parse(sft.Tag.Get("protobuf")) + // There will be exactly one interface field that + // this new value is assignable to. + for i := 0; i < t.NumField(); i++ { + f := t.Field(i) + if f.Type.Kind() != reflect.Interface { + continue + } + if !oop.Type.AssignableTo(f.Type) { + continue + } + oop.Field = i + break + } + prop.OneofTypes[oop.Prop.OrigName] = oop + } + } + + // build required counts + // build tags + reqCount := 0 + prop.decoderOrigNames = make(map[string]int) + for i, p := range prop.Prop { + if strings.HasPrefix(p.Name, "XXX_") { + // Internal fields should not appear in tags/origNames maps. + // They are handled specially when encoding and decoding. + continue + } + if p.Required { + reqCount++ + } + prop.decoderTags.put(p.Tag, i) + prop.decoderOrigNames[p.OrigName] = i + } + prop.reqCount = reqCount + + return prop +} + +// A global registry of enum types. +// The generated code will register the generated maps by calling RegisterEnum. + +var enumValueMaps = make(map[string]map[string]int32) + +// RegisterEnum is called from the generated code to install the enum descriptor +// maps into the global table to aid parsing text format protocol buffers. +func RegisterEnum(typeName string, unusedNameMap map[int32]string, valueMap map[string]int32) { + if _, ok := enumValueMaps[typeName]; ok { + panic("proto: duplicate enum registered: " + typeName) + } + enumValueMaps[typeName] = valueMap +} + +// EnumValueMap returns the mapping from names to integers of the +// enum type enumType, or a nil if not found. +func EnumValueMap(enumType string) map[string]int32 { + return enumValueMaps[enumType] +} + +// A registry of all linked message types. +// The string is a fully-qualified proto name ("pkg.Message"). +var ( + protoTypedNils = make(map[string]Message) // a map from proto names to typed nil pointers + protoMapTypes = make(map[string]reflect.Type) // a map from proto names to map types + revProtoTypes = make(map[reflect.Type]string) +) + +// RegisterType is called from generated code and maps from the fully qualified +// proto name to the type (pointer to struct) of the protocol buffer. +func RegisterType(x Message, name string) { + if _, ok := protoTypedNils[name]; ok { + // TODO: Some day, make this a panic. + log.Printf("proto: duplicate proto type registered: %s", name) + return + } + t := reflect.TypeOf(x) + if v := reflect.ValueOf(x); v.Kind() == reflect.Ptr && v.Pointer() == 0 { + // Generated code always calls RegisterType with nil x. + // This check is just for extra safety. + protoTypedNils[name] = x + } else { + protoTypedNils[name] = reflect.Zero(t).Interface().(Message) + } + revProtoTypes[t] = name +} + +// RegisterMapType is called from generated code and maps from the fully qualified +// proto name to the native map type of the proto map definition. +func RegisterMapType(x interface{}, name string) { + if reflect.TypeOf(x).Kind() != reflect.Map { + panic(fmt.Sprintf("RegisterMapType(%T, %q); want map", x, name)) + } + if _, ok := protoMapTypes[name]; ok { + log.Printf("proto: duplicate proto type registered: %s", name) + return + } + t := reflect.TypeOf(x) + protoMapTypes[name] = t + revProtoTypes[t] = name +} + +// MessageName returns the fully-qualified proto name for the given message type. +func MessageName(x Message) string { + type xname interface { + XXX_MessageName() string + } + if m, ok := x.(xname); ok { + return m.XXX_MessageName() + } + return revProtoTypes[reflect.TypeOf(x)] +} + +// MessageType returns the message type (pointer to struct) for a named message. +// The type is not guaranteed to implement proto.Message if the name refers to a +// map entry. +func MessageType(name string) reflect.Type { + if t, ok := protoTypedNils[name]; ok { + return reflect.TypeOf(t) + } + return protoMapTypes[name] +} + +// A registry of all linked proto files. +var ( + protoFiles = make(map[string][]byte) // file name => fileDescriptor +) + +// RegisterFile is called from generated code and maps from the +// full file name of a .proto file to its compressed FileDescriptorProto. +func RegisterFile(filename string, fileDescriptor []byte) { + protoFiles[filename] = fileDescriptor +} + +// FileDescriptor returns the compressed FileDescriptorProto for a .proto file. +func FileDescriptor(filename string) []byte { return protoFiles[filename] } diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/table_marshal.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/table_marshal.go new file mode 100644 index 000000000..5cb11fa95 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/table_marshal.go @@ -0,0 +1,2776 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2016 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +import ( + "errors" + "fmt" + "math" + "reflect" + "sort" + "strconv" + "strings" + "sync" + "sync/atomic" + "unicode/utf8" +) + +// a sizer takes a pointer to a field and the size of its tag, computes the size of +// the encoded data. +type sizer func(pointer, int) int + +// a marshaler takes a byte slice, a pointer to a field, and its tag (in wire format), +// marshals the field to the end of the slice, returns the slice and error (if any). +type marshaler func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) + +// marshalInfo is the information used for marshaling a message. +type marshalInfo struct { + typ reflect.Type + fields []*marshalFieldInfo + unrecognized field // offset of XXX_unrecognized + extensions field // offset of XXX_InternalExtensions + v1extensions field // offset of XXX_extensions + sizecache field // offset of XXX_sizecache + initialized int32 // 0 -- only typ is set, 1 -- fully initialized + messageset bool // uses message set wire format + hasmarshaler bool // has custom marshaler + sync.RWMutex // protect extElems map, also for initialization + extElems map[int32]*marshalElemInfo // info of extension elements +} + +// marshalFieldInfo is the information used for marshaling a field of a message. +type marshalFieldInfo struct { + field field + wiretag uint64 // tag in wire format + tagsize int // size of tag in wire format + sizer sizer + marshaler marshaler + isPointer bool + required bool // field is required + name string // name of the field, for error reporting + oneofElems map[reflect.Type]*marshalElemInfo // info of oneof elements +} + +// marshalElemInfo is the information used for marshaling an extension or oneof element. +type marshalElemInfo struct { + wiretag uint64 // tag in wire format + tagsize int // size of tag in wire format + sizer sizer + marshaler marshaler + isptr bool // elem is pointer typed, thus interface of this type is a direct interface (extension only) + deref bool // dereference the pointer before operating on it; implies isptr +} + +var ( + marshalInfoMap = map[reflect.Type]*marshalInfo{} + marshalInfoLock sync.Mutex +) + +// getMarshalInfo returns the information to marshal a given type of message. +// The info it returns may not necessarily initialized. +// t is the type of the message (NOT the pointer to it). +func getMarshalInfo(t reflect.Type) *marshalInfo { + marshalInfoLock.Lock() + u, ok := marshalInfoMap[t] + if !ok { + u = &marshalInfo{typ: t} + marshalInfoMap[t] = u + } + marshalInfoLock.Unlock() + return u +} + +// Size is the entry point from generated code, +// and should be ONLY called by generated code. +// It computes the size of encoded data of msg. +// a is a pointer to a place to store cached marshal info. +func (a *InternalMessageInfo) Size(msg Message) int { + u := getMessageMarshalInfo(msg, a) + ptr := toPointer(&msg) + if ptr.isNil() { + // We get here if msg is a typed nil ((*SomeMessage)(nil)), + // so it satisfies the interface, and msg == nil wouldn't + // catch it. We don't want crash in this case. + return 0 + } + return u.size(ptr) +} + +// Marshal is the entry point from generated code, +// and should be ONLY called by generated code. +// It marshals msg to the end of b. +// a is a pointer to a place to store cached marshal info. +func (a *InternalMessageInfo) Marshal(b []byte, msg Message, deterministic bool) ([]byte, error) { + u := getMessageMarshalInfo(msg, a) + ptr := toPointer(&msg) + if ptr.isNil() { + // We get here if msg is a typed nil ((*SomeMessage)(nil)), + // so it satisfies the interface, and msg == nil wouldn't + // catch it. We don't want crash in this case. + return b, ErrNil + } + return u.marshal(b, ptr, deterministic) +} + +func getMessageMarshalInfo(msg interface{}, a *InternalMessageInfo) *marshalInfo { + // u := a.marshal, but atomically. + // We use an atomic here to ensure memory consistency. + u := atomicLoadMarshalInfo(&a.marshal) + if u == nil { + // Get marshal information from type of message. + t := reflect.ValueOf(msg).Type() + if t.Kind() != reflect.Ptr { + panic(fmt.Sprintf("cannot handle non-pointer message type %v", t)) + } + u = getMarshalInfo(t.Elem()) + // Store it in the cache for later users. + // a.marshal = u, but atomically. + atomicStoreMarshalInfo(&a.marshal, u) + } + return u +} + +// size is the main function to compute the size of the encoded data of a message. +// ptr is the pointer to the message. +func (u *marshalInfo) size(ptr pointer) int { + if atomic.LoadInt32(&u.initialized) == 0 { + u.computeMarshalInfo() + } + + // If the message can marshal itself, let it do it, for compatibility. + // NOTE: This is not efficient. + if u.hasmarshaler { + m := ptr.asPointerTo(u.typ).Interface().(Marshaler) + b, _ := m.Marshal() + return len(b) + } + + n := 0 + for _, f := range u.fields { + if f.isPointer && ptr.offset(f.field).getPointer().isNil() { + // nil pointer always marshals to nothing + continue + } + n += f.sizer(ptr.offset(f.field), f.tagsize) + } + if u.extensions.IsValid() { + e := ptr.offset(u.extensions).toExtensions() + if u.messageset { + n += u.sizeMessageSet(e) + } else { + n += u.sizeExtensions(e) + } + } + if u.v1extensions.IsValid() { + m := *ptr.offset(u.v1extensions).toOldExtensions() + n += u.sizeV1Extensions(m) + } + if u.unrecognized.IsValid() { + s := *ptr.offset(u.unrecognized).toBytes() + n += len(s) + } + // cache the result for use in marshal + if u.sizecache.IsValid() { + atomic.StoreInt32(ptr.offset(u.sizecache).toInt32(), int32(n)) + } + return n +} + +// cachedsize gets the size from cache. If there is no cache (i.e. message is not generated), +// fall back to compute the size. +func (u *marshalInfo) cachedsize(ptr pointer) int { + if u.sizecache.IsValid() { + return int(atomic.LoadInt32(ptr.offset(u.sizecache).toInt32())) + } + return u.size(ptr) +} + +// marshal is the main function to marshal a message. It takes a byte slice and appends +// the encoded data to the end of the slice, returns the slice and error (if any). +// ptr is the pointer to the message. +// If deterministic is true, map is marshaled in deterministic order. +func (u *marshalInfo) marshal(b []byte, ptr pointer, deterministic bool) ([]byte, error) { + if atomic.LoadInt32(&u.initialized) == 0 { + u.computeMarshalInfo() + } + + // If the message can marshal itself, let it do it, for compatibility. + // NOTE: This is not efficient. + if u.hasmarshaler { + m := ptr.asPointerTo(u.typ).Interface().(Marshaler) + b1, err := m.Marshal() + b = append(b, b1...) + return b, err + } + + var err, errLater error + // The old marshaler encodes extensions at beginning. + if u.extensions.IsValid() { + e := ptr.offset(u.extensions).toExtensions() + if u.messageset { + b, err = u.appendMessageSet(b, e, deterministic) + } else { + b, err = u.appendExtensions(b, e, deterministic) + } + if err != nil { + return b, err + } + } + if u.v1extensions.IsValid() { + m := *ptr.offset(u.v1extensions).toOldExtensions() + b, err = u.appendV1Extensions(b, m, deterministic) + if err != nil { + return b, err + } + } + for _, f := range u.fields { + if f.required { + if ptr.offset(f.field).getPointer().isNil() { + // Required field is not set. + // We record the error but keep going, to give a complete marshaling. + if errLater == nil { + errLater = &RequiredNotSetError{f.name} + } + continue + } + } + if f.isPointer && ptr.offset(f.field).getPointer().isNil() { + // nil pointer always marshals to nothing + continue + } + b, err = f.marshaler(b, ptr.offset(f.field), f.wiretag, deterministic) + if err != nil { + if err1, ok := err.(*RequiredNotSetError); ok { + // Required field in submessage is not set. + // We record the error but keep going, to give a complete marshaling. + if errLater == nil { + errLater = &RequiredNotSetError{f.name + "." + err1.field} + } + continue + } + if err == errRepeatedHasNil { + err = errors.New("proto: repeated field " + f.name + " has nil element") + } + if err == errInvalidUTF8 { + if errLater == nil { + fullName := revProtoTypes[reflect.PtrTo(u.typ)] + "." + f.name + errLater = &invalidUTF8Error{fullName} + } + continue + } + return b, err + } + } + if u.unrecognized.IsValid() { + s := *ptr.offset(u.unrecognized).toBytes() + b = append(b, s...) + } + return b, errLater +} + +// computeMarshalInfo initializes the marshal info. +func (u *marshalInfo) computeMarshalInfo() { + u.Lock() + defer u.Unlock() + if u.initialized != 0 { // non-atomic read is ok as it is protected by the lock + return + } + + t := u.typ + u.unrecognized = invalidField + u.extensions = invalidField + u.v1extensions = invalidField + u.sizecache = invalidField + + // If the message can marshal itself, let it do it, for compatibility. + // NOTE: This is not efficient. + if reflect.PtrTo(t).Implements(marshalerType) { + u.hasmarshaler = true + atomic.StoreInt32(&u.initialized, 1) + return + } + + // get oneof implementers + var oneofImplementers []interface{} + switch m := reflect.Zero(reflect.PtrTo(t)).Interface().(type) { + case oneofFuncsIface: + _, _, _, oneofImplementers = m.XXX_OneofFuncs() + case oneofWrappersIface: + oneofImplementers = m.XXX_OneofWrappers() + } + + n := t.NumField() + + // deal with XXX fields first + for i := 0; i < t.NumField(); i++ { + f := t.Field(i) + if !strings.HasPrefix(f.Name, "XXX_") { + continue + } + switch f.Name { + case "XXX_sizecache": + u.sizecache = toField(&f) + case "XXX_unrecognized": + u.unrecognized = toField(&f) + case "XXX_InternalExtensions": + u.extensions = toField(&f) + u.messageset = f.Tag.Get("protobuf_messageset") == "1" + case "XXX_extensions": + u.v1extensions = toField(&f) + case "XXX_NoUnkeyedLiteral": + // nothing to do + default: + panic("unknown XXX field: " + f.Name) + } + n-- + } + + // normal fields + fields := make([]marshalFieldInfo, n) // batch allocation + u.fields = make([]*marshalFieldInfo, 0, n) + for i, j := 0, 0; i < t.NumField(); i++ { + f := t.Field(i) + + if strings.HasPrefix(f.Name, "XXX_") { + continue + } + field := &fields[j] + j++ + field.name = f.Name + u.fields = append(u.fields, field) + if f.Tag.Get("protobuf_oneof") != "" { + field.computeOneofFieldInfo(&f, oneofImplementers) + continue + } + if f.Tag.Get("protobuf") == "" { + // field has no tag (not in generated message), ignore it + u.fields = u.fields[:len(u.fields)-1] + j-- + continue + } + field.computeMarshalFieldInfo(&f) + } + + // fields are marshaled in tag order on the wire. + sort.Sort(byTag(u.fields)) + + atomic.StoreInt32(&u.initialized, 1) +} + +// helper for sorting fields by tag +type byTag []*marshalFieldInfo + +func (a byTag) Len() int { return len(a) } +func (a byTag) Swap(i, j int) { a[i], a[j] = a[j], a[i] } +func (a byTag) Less(i, j int) bool { return a[i].wiretag < a[j].wiretag } + +// getExtElemInfo returns the information to marshal an extension element. +// The info it returns is initialized. +func (u *marshalInfo) getExtElemInfo(desc *ExtensionDesc) *marshalElemInfo { + // get from cache first + u.RLock() + e, ok := u.extElems[desc.Field] + u.RUnlock() + if ok { + return e + } + + t := reflect.TypeOf(desc.ExtensionType) // pointer or slice to basic type or struct + tags := strings.Split(desc.Tag, ",") + tag, err := strconv.Atoi(tags[1]) + if err != nil { + panic("tag is not an integer") + } + wt := wiretype(tags[0]) + if t.Kind() == reflect.Ptr && t.Elem().Kind() != reflect.Struct { + t = t.Elem() + } + sizer, marshaler := typeMarshaler(t, tags, false, false) + var deref bool + if t.Kind() == reflect.Slice && t.Elem().Kind() != reflect.Uint8 { + t = reflect.PtrTo(t) + deref = true + } + e = &marshalElemInfo{ + wiretag: uint64(tag)<<3 | wt, + tagsize: SizeVarint(uint64(tag) << 3), + sizer: sizer, + marshaler: marshaler, + isptr: t.Kind() == reflect.Ptr, + deref: deref, + } + + // update cache + u.Lock() + if u.extElems == nil { + u.extElems = make(map[int32]*marshalElemInfo) + } + u.extElems[desc.Field] = e + u.Unlock() + return e +} + +// computeMarshalFieldInfo fills up the information to marshal a field. +func (fi *marshalFieldInfo) computeMarshalFieldInfo(f *reflect.StructField) { + // parse protobuf tag of the field. + // tag has format of "bytes,49,opt,name=foo,def=hello!" + tags := strings.Split(f.Tag.Get("protobuf"), ",") + if tags[0] == "" { + return + } + tag, err := strconv.Atoi(tags[1]) + if err != nil { + panic("tag is not an integer") + } + wt := wiretype(tags[0]) + if tags[2] == "req" { + fi.required = true + } + fi.setTag(f, tag, wt) + fi.setMarshaler(f, tags) +} + +func (fi *marshalFieldInfo) computeOneofFieldInfo(f *reflect.StructField, oneofImplementers []interface{}) { + fi.field = toField(f) + fi.wiretag = math.MaxInt32 // Use a large tag number, make oneofs sorted at the end. This tag will not appear on the wire. + fi.isPointer = true + fi.sizer, fi.marshaler = makeOneOfMarshaler(fi, f) + fi.oneofElems = make(map[reflect.Type]*marshalElemInfo) + + ityp := f.Type // interface type + for _, o := range oneofImplementers { + t := reflect.TypeOf(o) + if !t.Implements(ityp) { + continue + } + sf := t.Elem().Field(0) // oneof implementer is a struct with a single field + tags := strings.Split(sf.Tag.Get("protobuf"), ",") + tag, err := strconv.Atoi(tags[1]) + if err != nil { + panic("tag is not an integer") + } + wt := wiretype(tags[0]) + sizer, marshaler := typeMarshaler(sf.Type, tags, false, true) // oneof should not omit any zero value + fi.oneofElems[t.Elem()] = &marshalElemInfo{ + wiretag: uint64(tag)<<3 | wt, + tagsize: SizeVarint(uint64(tag) << 3), + sizer: sizer, + marshaler: marshaler, + } + } +} + +// wiretype returns the wire encoding of the type. +func wiretype(encoding string) uint64 { + switch encoding { + case "fixed32": + return WireFixed32 + case "fixed64": + return WireFixed64 + case "varint", "zigzag32", "zigzag64": + return WireVarint + case "bytes": + return WireBytes + case "group": + return WireStartGroup + } + panic("unknown wire type " + encoding) +} + +// setTag fills up the tag (in wire format) and its size in the info of a field. +func (fi *marshalFieldInfo) setTag(f *reflect.StructField, tag int, wt uint64) { + fi.field = toField(f) + fi.wiretag = uint64(tag)<<3 | wt + fi.tagsize = SizeVarint(uint64(tag) << 3) +} + +// setMarshaler fills up the sizer and marshaler in the info of a field. +func (fi *marshalFieldInfo) setMarshaler(f *reflect.StructField, tags []string) { + switch f.Type.Kind() { + case reflect.Map: + // map field + fi.isPointer = true + fi.sizer, fi.marshaler = makeMapMarshaler(f) + return + case reflect.Ptr, reflect.Slice: + fi.isPointer = true + } + fi.sizer, fi.marshaler = typeMarshaler(f.Type, tags, true, false) +} + +// typeMarshaler returns the sizer and marshaler of a given field. +// t is the type of the field. +// tags is the generated "protobuf" tag of the field. +// If nozero is true, zero value is not marshaled to the wire. +// If oneof is true, it is a oneof field. +func typeMarshaler(t reflect.Type, tags []string, nozero, oneof bool) (sizer, marshaler) { + encoding := tags[0] + + pointer := false + slice := false + if t.Kind() == reflect.Slice && t.Elem().Kind() != reflect.Uint8 { + slice = true + t = t.Elem() + } + if t.Kind() == reflect.Ptr { + pointer = true + t = t.Elem() + } + + packed := false + proto3 := false + validateUTF8 := true + for i := 2; i < len(tags); i++ { + if tags[i] == "packed" { + packed = true + } + if tags[i] == "proto3" { + proto3 = true + } + } + validateUTF8 = validateUTF8 && proto3 + + switch t.Kind() { + case reflect.Bool: + if pointer { + return sizeBoolPtr, appendBoolPtr + } + if slice { + if packed { + return sizeBoolPackedSlice, appendBoolPackedSlice + } + return sizeBoolSlice, appendBoolSlice + } + if nozero { + return sizeBoolValueNoZero, appendBoolValueNoZero + } + return sizeBoolValue, appendBoolValue + case reflect.Uint32: + switch encoding { + case "fixed32": + if pointer { + return sizeFixed32Ptr, appendFixed32Ptr + } + if slice { + if packed { + return sizeFixed32PackedSlice, appendFixed32PackedSlice + } + return sizeFixed32Slice, appendFixed32Slice + } + if nozero { + return sizeFixed32ValueNoZero, appendFixed32ValueNoZero + } + return sizeFixed32Value, appendFixed32Value + case "varint": + if pointer { + return sizeVarint32Ptr, appendVarint32Ptr + } + if slice { + if packed { + return sizeVarint32PackedSlice, appendVarint32PackedSlice + } + return sizeVarint32Slice, appendVarint32Slice + } + if nozero { + return sizeVarint32ValueNoZero, appendVarint32ValueNoZero + } + return sizeVarint32Value, appendVarint32Value + } + case reflect.Int32: + switch encoding { + case "fixed32": + if pointer { + return sizeFixedS32Ptr, appendFixedS32Ptr + } + if slice { + if packed { + return sizeFixedS32PackedSlice, appendFixedS32PackedSlice + } + return sizeFixedS32Slice, appendFixedS32Slice + } + if nozero { + return sizeFixedS32ValueNoZero, appendFixedS32ValueNoZero + } + return sizeFixedS32Value, appendFixedS32Value + case "varint": + if pointer { + return sizeVarintS32Ptr, appendVarintS32Ptr + } + if slice { + if packed { + return sizeVarintS32PackedSlice, appendVarintS32PackedSlice + } + return sizeVarintS32Slice, appendVarintS32Slice + } + if nozero { + return sizeVarintS32ValueNoZero, appendVarintS32ValueNoZero + } + return sizeVarintS32Value, appendVarintS32Value + case "zigzag32": + if pointer { + return sizeZigzag32Ptr, appendZigzag32Ptr + } + if slice { + if packed { + return sizeZigzag32PackedSlice, appendZigzag32PackedSlice + } + return sizeZigzag32Slice, appendZigzag32Slice + } + if nozero { + return sizeZigzag32ValueNoZero, appendZigzag32ValueNoZero + } + return sizeZigzag32Value, appendZigzag32Value + } + case reflect.Uint64: + switch encoding { + case "fixed64": + if pointer { + return sizeFixed64Ptr, appendFixed64Ptr + } + if slice { + if packed { + return sizeFixed64PackedSlice, appendFixed64PackedSlice + } + return sizeFixed64Slice, appendFixed64Slice + } + if nozero { + return sizeFixed64ValueNoZero, appendFixed64ValueNoZero + } + return sizeFixed64Value, appendFixed64Value + case "varint": + if pointer { + return sizeVarint64Ptr, appendVarint64Ptr + } + if slice { + if packed { + return sizeVarint64PackedSlice, appendVarint64PackedSlice + } + return sizeVarint64Slice, appendVarint64Slice + } + if nozero { + return sizeVarint64ValueNoZero, appendVarint64ValueNoZero + } + return sizeVarint64Value, appendVarint64Value + } + case reflect.Int64: + switch encoding { + case "fixed64": + if pointer { + return sizeFixedS64Ptr, appendFixedS64Ptr + } + if slice { + if packed { + return sizeFixedS64PackedSlice, appendFixedS64PackedSlice + } + return sizeFixedS64Slice, appendFixedS64Slice + } + if nozero { + return sizeFixedS64ValueNoZero, appendFixedS64ValueNoZero + } + return sizeFixedS64Value, appendFixedS64Value + case "varint": + if pointer { + return sizeVarintS64Ptr, appendVarintS64Ptr + } + if slice { + if packed { + return sizeVarintS64PackedSlice, appendVarintS64PackedSlice + } + return sizeVarintS64Slice, appendVarintS64Slice + } + if nozero { + return sizeVarintS64ValueNoZero, appendVarintS64ValueNoZero + } + return sizeVarintS64Value, appendVarintS64Value + case "zigzag64": + if pointer { + return sizeZigzag64Ptr, appendZigzag64Ptr + } + if slice { + if packed { + return sizeZigzag64PackedSlice, appendZigzag64PackedSlice + } + return sizeZigzag64Slice, appendZigzag64Slice + } + if nozero { + return sizeZigzag64ValueNoZero, appendZigzag64ValueNoZero + } + return sizeZigzag64Value, appendZigzag64Value + } + case reflect.Float32: + if pointer { + return sizeFloat32Ptr, appendFloat32Ptr + } + if slice { + if packed { + return sizeFloat32PackedSlice, appendFloat32PackedSlice + } + return sizeFloat32Slice, appendFloat32Slice + } + if nozero { + return sizeFloat32ValueNoZero, appendFloat32ValueNoZero + } + return sizeFloat32Value, appendFloat32Value + case reflect.Float64: + if pointer { + return sizeFloat64Ptr, appendFloat64Ptr + } + if slice { + if packed { + return sizeFloat64PackedSlice, appendFloat64PackedSlice + } + return sizeFloat64Slice, appendFloat64Slice + } + if nozero { + return sizeFloat64ValueNoZero, appendFloat64ValueNoZero + } + return sizeFloat64Value, appendFloat64Value + case reflect.String: + if validateUTF8 { + if pointer { + return sizeStringPtr, appendUTF8StringPtr + } + if slice { + return sizeStringSlice, appendUTF8StringSlice + } + if nozero { + return sizeStringValueNoZero, appendUTF8StringValueNoZero + } + return sizeStringValue, appendUTF8StringValue + } + if pointer { + return sizeStringPtr, appendStringPtr + } + if slice { + return sizeStringSlice, appendStringSlice + } + if nozero { + return sizeStringValueNoZero, appendStringValueNoZero + } + return sizeStringValue, appendStringValue + case reflect.Slice: + if slice { + return sizeBytesSlice, appendBytesSlice + } + if oneof { + // Oneof bytes field may also have "proto3" tag. + // We want to marshal it as a oneof field. Do this + // check before the proto3 check. + return sizeBytesOneof, appendBytesOneof + } + if proto3 { + return sizeBytes3, appendBytes3 + } + return sizeBytes, appendBytes + case reflect.Struct: + switch encoding { + case "group": + if slice { + return makeGroupSliceMarshaler(getMarshalInfo(t)) + } + return makeGroupMarshaler(getMarshalInfo(t)) + case "bytes": + if slice { + return makeMessageSliceMarshaler(getMarshalInfo(t)) + } + return makeMessageMarshaler(getMarshalInfo(t)) + } + } + panic(fmt.Sprintf("unknown or mismatched type: type: %v, wire type: %v", t, encoding)) +} + +// Below are functions to size/marshal a specific type of a field. +// They are stored in the field's info, and called by function pointers. +// They have type sizer or marshaler. + +func sizeFixed32Value(_ pointer, tagsize int) int { + return 4 + tagsize +} +func sizeFixed32ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toUint32() + if v == 0 { + return 0 + } + return 4 + tagsize +} +func sizeFixed32Ptr(ptr pointer, tagsize int) int { + p := *ptr.toUint32Ptr() + if p == nil { + return 0 + } + return 4 + tagsize +} +func sizeFixed32Slice(ptr pointer, tagsize int) int { + s := *ptr.toUint32Slice() + return (4 + tagsize) * len(s) +} +func sizeFixed32PackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toUint32Slice() + if len(s) == 0 { + return 0 + } + return 4*len(s) + SizeVarint(uint64(4*len(s))) + tagsize +} +func sizeFixedS32Value(_ pointer, tagsize int) int { + return 4 + tagsize +} +func sizeFixedS32ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toInt32() + if v == 0 { + return 0 + } + return 4 + tagsize +} +func sizeFixedS32Ptr(ptr pointer, tagsize int) int { + p := ptr.getInt32Ptr() + if p == nil { + return 0 + } + return 4 + tagsize +} +func sizeFixedS32Slice(ptr pointer, tagsize int) int { + s := ptr.getInt32Slice() + return (4 + tagsize) * len(s) +} +func sizeFixedS32PackedSlice(ptr pointer, tagsize int) int { + s := ptr.getInt32Slice() + if len(s) == 0 { + return 0 + } + return 4*len(s) + SizeVarint(uint64(4*len(s))) + tagsize +} +func sizeFloat32Value(_ pointer, tagsize int) int { + return 4 + tagsize +} +func sizeFloat32ValueNoZero(ptr pointer, tagsize int) int { + v := math.Float32bits(*ptr.toFloat32()) + if v == 0 { + return 0 + } + return 4 + tagsize +} +func sizeFloat32Ptr(ptr pointer, tagsize int) int { + p := *ptr.toFloat32Ptr() + if p == nil { + return 0 + } + return 4 + tagsize +} +func sizeFloat32Slice(ptr pointer, tagsize int) int { + s := *ptr.toFloat32Slice() + return (4 + tagsize) * len(s) +} +func sizeFloat32PackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toFloat32Slice() + if len(s) == 0 { + return 0 + } + return 4*len(s) + SizeVarint(uint64(4*len(s))) + tagsize +} +func sizeFixed64Value(_ pointer, tagsize int) int { + return 8 + tagsize +} +func sizeFixed64ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toUint64() + if v == 0 { + return 0 + } + return 8 + tagsize +} +func sizeFixed64Ptr(ptr pointer, tagsize int) int { + p := *ptr.toUint64Ptr() + if p == nil { + return 0 + } + return 8 + tagsize +} +func sizeFixed64Slice(ptr pointer, tagsize int) int { + s := *ptr.toUint64Slice() + return (8 + tagsize) * len(s) +} +func sizeFixed64PackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toUint64Slice() + if len(s) == 0 { + return 0 + } + return 8*len(s) + SizeVarint(uint64(8*len(s))) + tagsize +} +func sizeFixedS64Value(_ pointer, tagsize int) int { + return 8 + tagsize +} +func sizeFixedS64ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toInt64() + if v == 0 { + return 0 + } + return 8 + tagsize +} +func sizeFixedS64Ptr(ptr pointer, tagsize int) int { + p := *ptr.toInt64Ptr() + if p == nil { + return 0 + } + return 8 + tagsize +} +func sizeFixedS64Slice(ptr pointer, tagsize int) int { + s := *ptr.toInt64Slice() + return (8 + tagsize) * len(s) +} +func sizeFixedS64PackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toInt64Slice() + if len(s) == 0 { + return 0 + } + return 8*len(s) + SizeVarint(uint64(8*len(s))) + tagsize +} +func sizeFloat64Value(_ pointer, tagsize int) int { + return 8 + tagsize +} +func sizeFloat64ValueNoZero(ptr pointer, tagsize int) int { + v := math.Float64bits(*ptr.toFloat64()) + if v == 0 { + return 0 + } + return 8 + tagsize +} +func sizeFloat64Ptr(ptr pointer, tagsize int) int { + p := *ptr.toFloat64Ptr() + if p == nil { + return 0 + } + return 8 + tagsize +} +func sizeFloat64Slice(ptr pointer, tagsize int) int { + s := *ptr.toFloat64Slice() + return (8 + tagsize) * len(s) +} +func sizeFloat64PackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toFloat64Slice() + if len(s) == 0 { + return 0 + } + return 8*len(s) + SizeVarint(uint64(8*len(s))) + tagsize +} +func sizeVarint32Value(ptr pointer, tagsize int) int { + v := *ptr.toUint32() + return SizeVarint(uint64(v)) + tagsize +} +func sizeVarint32ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toUint32() + if v == 0 { + return 0 + } + return SizeVarint(uint64(v)) + tagsize +} +func sizeVarint32Ptr(ptr pointer, tagsize int) int { + p := *ptr.toUint32Ptr() + if p == nil { + return 0 + } + return SizeVarint(uint64(*p)) + tagsize +} +func sizeVarint32Slice(ptr pointer, tagsize int) int { + s := *ptr.toUint32Slice() + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v)) + tagsize + } + return n +} +func sizeVarint32PackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toUint32Slice() + if len(s) == 0 { + return 0 + } + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v)) + } + return n + SizeVarint(uint64(n)) + tagsize +} +func sizeVarintS32Value(ptr pointer, tagsize int) int { + v := *ptr.toInt32() + return SizeVarint(uint64(v)) + tagsize +} +func sizeVarintS32ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toInt32() + if v == 0 { + return 0 + } + return SizeVarint(uint64(v)) + tagsize +} +func sizeVarintS32Ptr(ptr pointer, tagsize int) int { + p := ptr.getInt32Ptr() + if p == nil { + return 0 + } + return SizeVarint(uint64(*p)) + tagsize +} +func sizeVarintS32Slice(ptr pointer, tagsize int) int { + s := ptr.getInt32Slice() + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v)) + tagsize + } + return n +} +func sizeVarintS32PackedSlice(ptr pointer, tagsize int) int { + s := ptr.getInt32Slice() + if len(s) == 0 { + return 0 + } + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v)) + } + return n + SizeVarint(uint64(n)) + tagsize +} +func sizeVarint64Value(ptr pointer, tagsize int) int { + v := *ptr.toUint64() + return SizeVarint(v) + tagsize +} +func sizeVarint64ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toUint64() + if v == 0 { + return 0 + } + return SizeVarint(v) + tagsize +} +func sizeVarint64Ptr(ptr pointer, tagsize int) int { + p := *ptr.toUint64Ptr() + if p == nil { + return 0 + } + return SizeVarint(*p) + tagsize +} +func sizeVarint64Slice(ptr pointer, tagsize int) int { + s := *ptr.toUint64Slice() + n := 0 + for _, v := range s { + n += SizeVarint(v) + tagsize + } + return n +} +func sizeVarint64PackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toUint64Slice() + if len(s) == 0 { + return 0 + } + n := 0 + for _, v := range s { + n += SizeVarint(v) + } + return n + SizeVarint(uint64(n)) + tagsize +} +func sizeVarintS64Value(ptr pointer, tagsize int) int { + v := *ptr.toInt64() + return SizeVarint(uint64(v)) + tagsize +} +func sizeVarintS64ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toInt64() + if v == 0 { + return 0 + } + return SizeVarint(uint64(v)) + tagsize +} +func sizeVarintS64Ptr(ptr pointer, tagsize int) int { + p := *ptr.toInt64Ptr() + if p == nil { + return 0 + } + return SizeVarint(uint64(*p)) + tagsize +} +func sizeVarintS64Slice(ptr pointer, tagsize int) int { + s := *ptr.toInt64Slice() + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v)) + tagsize + } + return n +} +func sizeVarintS64PackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toInt64Slice() + if len(s) == 0 { + return 0 + } + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v)) + } + return n + SizeVarint(uint64(n)) + tagsize +} +func sizeZigzag32Value(ptr pointer, tagsize int) int { + v := *ptr.toInt32() + return SizeVarint(uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + tagsize +} +func sizeZigzag32ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toInt32() + if v == 0 { + return 0 + } + return SizeVarint(uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + tagsize +} +func sizeZigzag32Ptr(ptr pointer, tagsize int) int { + p := ptr.getInt32Ptr() + if p == nil { + return 0 + } + v := *p + return SizeVarint(uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + tagsize +} +func sizeZigzag32Slice(ptr pointer, tagsize int) int { + s := ptr.getInt32Slice() + n := 0 + for _, v := range s { + n += SizeVarint(uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + tagsize + } + return n +} +func sizeZigzag32PackedSlice(ptr pointer, tagsize int) int { + s := ptr.getInt32Slice() + if len(s) == 0 { + return 0 + } + n := 0 + for _, v := range s { + n += SizeVarint(uint64((uint32(v) << 1) ^ uint32((int32(v) >> 31)))) + } + return n + SizeVarint(uint64(n)) + tagsize +} +func sizeZigzag64Value(ptr pointer, tagsize int) int { + v := *ptr.toInt64() + return SizeVarint(uint64(v<<1)^uint64((int64(v)>>63))) + tagsize +} +func sizeZigzag64ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toInt64() + if v == 0 { + return 0 + } + return SizeVarint(uint64(v<<1)^uint64((int64(v)>>63))) + tagsize +} +func sizeZigzag64Ptr(ptr pointer, tagsize int) int { + p := *ptr.toInt64Ptr() + if p == nil { + return 0 + } + v := *p + return SizeVarint(uint64(v<<1)^uint64((int64(v)>>63))) + tagsize +} +func sizeZigzag64Slice(ptr pointer, tagsize int) int { + s := *ptr.toInt64Slice() + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v<<1)^uint64((int64(v)>>63))) + tagsize + } + return n +} +func sizeZigzag64PackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toInt64Slice() + if len(s) == 0 { + return 0 + } + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v<<1) ^ uint64((int64(v) >> 63))) + } + return n + SizeVarint(uint64(n)) + tagsize +} +func sizeBoolValue(_ pointer, tagsize int) int { + return 1 + tagsize +} +func sizeBoolValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toBool() + if !v { + return 0 + } + return 1 + tagsize +} +func sizeBoolPtr(ptr pointer, tagsize int) int { + p := *ptr.toBoolPtr() + if p == nil { + return 0 + } + return 1 + tagsize +} +func sizeBoolSlice(ptr pointer, tagsize int) int { + s := *ptr.toBoolSlice() + return (1 + tagsize) * len(s) +} +func sizeBoolPackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toBoolSlice() + if len(s) == 0 { + return 0 + } + return len(s) + SizeVarint(uint64(len(s))) + tagsize +} +func sizeStringValue(ptr pointer, tagsize int) int { + v := *ptr.toString() + return len(v) + SizeVarint(uint64(len(v))) + tagsize +} +func sizeStringValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toString() + if v == "" { + return 0 + } + return len(v) + SizeVarint(uint64(len(v))) + tagsize +} +func sizeStringPtr(ptr pointer, tagsize int) int { + p := *ptr.toStringPtr() + if p == nil { + return 0 + } + v := *p + return len(v) + SizeVarint(uint64(len(v))) + tagsize +} +func sizeStringSlice(ptr pointer, tagsize int) int { + s := *ptr.toStringSlice() + n := 0 + for _, v := range s { + n += len(v) + SizeVarint(uint64(len(v))) + tagsize + } + return n +} +func sizeBytes(ptr pointer, tagsize int) int { + v := *ptr.toBytes() + if v == nil { + return 0 + } + return len(v) + SizeVarint(uint64(len(v))) + tagsize +} +func sizeBytes3(ptr pointer, tagsize int) int { + v := *ptr.toBytes() + if len(v) == 0 { + return 0 + } + return len(v) + SizeVarint(uint64(len(v))) + tagsize +} +func sizeBytesOneof(ptr pointer, tagsize int) int { + v := *ptr.toBytes() + return len(v) + SizeVarint(uint64(len(v))) + tagsize +} +func sizeBytesSlice(ptr pointer, tagsize int) int { + s := *ptr.toBytesSlice() + n := 0 + for _, v := range s { + n += len(v) + SizeVarint(uint64(len(v))) + tagsize + } + return n +} + +// appendFixed32 appends an encoded fixed32 to b. +func appendFixed32(b []byte, v uint32) []byte { + b = append(b, + byte(v), + byte(v>>8), + byte(v>>16), + byte(v>>24)) + return b +} + +// appendFixed64 appends an encoded fixed64 to b. +func appendFixed64(b []byte, v uint64) []byte { + b = append(b, + byte(v), + byte(v>>8), + byte(v>>16), + byte(v>>24), + byte(v>>32), + byte(v>>40), + byte(v>>48), + byte(v>>56)) + return b +} + +// appendVarint appends an encoded varint to b. +func appendVarint(b []byte, v uint64) []byte { + // TODO: make 1-byte (maybe 2-byte) case inline-able, once we + // have non-leaf inliner. + switch { + case v < 1<<7: + b = append(b, byte(v)) + case v < 1<<14: + b = append(b, + byte(v&0x7f|0x80), + byte(v>>7)) + case v < 1<<21: + b = append(b, + byte(v&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte(v>>14)) + case v < 1<<28: + b = append(b, + byte(v&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte((v>>14)&0x7f|0x80), + byte(v>>21)) + case v < 1<<35: + b = append(b, + byte(v&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte((v>>14)&0x7f|0x80), + byte((v>>21)&0x7f|0x80), + byte(v>>28)) + case v < 1<<42: + b = append(b, + byte(v&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte((v>>14)&0x7f|0x80), + byte((v>>21)&0x7f|0x80), + byte((v>>28)&0x7f|0x80), + byte(v>>35)) + case v < 1<<49: + b = append(b, + byte(v&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte((v>>14)&0x7f|0x80), + byte((v>>21)&0x7f|0x80), + byte((v>>28)&0x7f|0x80), + byte((v>>35)&0x7f|0x80), + byte(v>>42)) + case v < 1<<56: + b = append(b, + byte(v&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte((v>>14)&0x7f|0x80), + byte((v>>21)&0x7f|0x80), + byte((v>>28)&0x7f|0x80), + byte((v>>35)&0x7f|0x80), + byte((v>>42)&0x7f|0x80), + byte(v>>49)) + case v < 1<<63: + b = append(b, + byte(v&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte((v>>14)&0x7f|0x80), + byte((v>>21)&0x7f|0x80), + byte((v>>28)&0x7f|0x80), + byte((v>>35)&0x7f|0x80), + byte((v>>42)&0x7f|0x80), + byte((v>>49)&0x7f|0x80), + byte(v>>56)) + default: + b = append(b, + byte(v&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte((v>>14)&0x7f|0x80), + byte((v>>21)&0x7f|0x80), + byte((v>>28)&0x7f|0x80), + byte((v>>35)&0x7f|0x80), + byte((v>>42)&0x7f|0x80), + byte((v>>49)&0x7f|0x80), + byte((v>>56)&0x7f|0x80), + 1) + } + return b +} + +func appendFixed32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toUint32() + b = appendVarint(b, wiretag) + b = appendFixed32(b, v) + return b, nil +} +func appendFixed32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toUint32() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed32(b, v) + return b, nil +} +func appendFixed32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toUint32Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed32(b, *p) + return b, nil +} +func appendFixed32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toUint32Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendFixed32(b, v) + } + return b, nil +} +func appendFixed32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toUint32Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + b = appendVarint(b, uint64(4*len(s))) + for _, v := range s { + b = appendFixed32(b, v) + } + return b, nil +} +func appendFixedS32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt32() + b = appendVarint(b, wiretag) + b = appendFixed32(b, uint32(v)) + return b, nil +} +func appendFixedS32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt32() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed32(b, uint32(v)) + return b, nil +} +func appendFixedS32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := ptr.getInt32Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed32(b, uint32(*p)) + return b, nil +} +func appendFixedS32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := ptr.getInt32Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendFixed32(b, uint32(v)) + } + return b, nil +} +func appendFixedS32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := ptr.getInt32Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + b = appendVarint(b, uint64(4*len(s))) + for _, v := range s { + b = appendFixed32(b, uint32(v)) + } + return b, nil +} +func appendFloat32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := math.Float32bits(*ptr.toFloat32()) + b = appendVarint(b, wiretag) + b = appendFixed32(b, v) + return b, nil +} +func appendFloat32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := math.Float32bits(*ptr.toFloat32()) + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed32(b, v) + return b, nil +} +func appendFloat32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toFloat32Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed32(b, math.Float32bits(*p)) + return b, nil +} +func appendFloat32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toFloat32Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendFixed32(b, math.Float32bits(v)) + } + return b, nil +} +func appendFloat32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toFloat32Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + b = appendVarint(b, uint64(4*len(s))) + for _, v := range s { + b = appendFixed32(b, math.Float32bits(v)) + } + return b, nil +} +func appendFixed64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toUint64() + b = appendVarint(b, wiretag) + b = appendFixed64(b, v) + return b, nil +} +func appendFixed64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toUint64() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed64(b, v) + return b, nil +} +func appendFixed64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toUint64Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed64(b, *p) + return b, nil +} +func appendFixed64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toUint64Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendFixed64(b, v) + } + return b, nil +} +func appendFixed64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toUint64Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + b = appendVarint(b, uint64(8*len(s))) + for _, v := range s { + b = appendFixed64(b, v) + } + return b, nil +} +func appendFixedS64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt64() + b = appendVarint(b, wiretag) + b = appendFixed64(b, uint64(v)) + return b, nil +} +func appendFixedS64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt64() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed64(b, uint64(v)) + return b, nil +} +func appendFixedS64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toInt64Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed64(b, uint64(*p)) + return b, nil +} +func appendFixedS64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toInt64Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendFixed64(b, uint64(v)) + } + return b, nil +} +func appendFixedS64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toInt64Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + b = appendVarint(b, uint64(8*len(s))) + for _, v := range s { + b = appendFixed64(b, uint64(v)) + } + return b, nil +} +func appendFloat64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := math.Float64bits(*ptr.toFloat64()) + b = appendVarint(b, wiretag) + b = appendFixed64(b, v) + return b, nil +} +func appendFloat64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := math.Float64bits(*ptr.toFloat64()) + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed64(b, v) + return b, nil +} +func appendFloat64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toFloat64Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed64(b, math.Float64bits(*p)) + return b, nil +} +func appendFloat64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toFloat64Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendFixed64(b, math.Float64bits(v)) + } + return b, nil +} +func appendFloat64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toFloat64Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + b = appendVarint(b, uint64(8*len(s))) + for _, v := range s { + b = appendFixed64(b, math.Float64bits(v)) + } + return b, nil +} +func appendVarint32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toUint32() + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v)) + return b, nil +} +func appendVarint32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toUint32() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v)) + return b, nil +} +func appendVarint32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toUint32Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(*p)) + return b, nil +} +func appendVarint32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toUint32Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v)) + } + return b, nil +} +func appendVarint32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toUint32Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + // compute size + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v)) + } + b = appendVarint(b, uint64(n)) + for _, v := range s { + b = appendVarint(b, uint64(v)) + } + return b, nil +} +func appendVarintS32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt32() + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v)) + return b, nil +} +func appendVarintS32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt32() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v)) + return b, nil +} +func appendVarintS32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := ptr.getInt32Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(*p)) + return b, nil +} +func appendVarintS32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := ptr.getInt32Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v)) + } + return b, nil +} +func appendVarintS32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := ptr.getInt32Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + // compute size + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v)) + } + b = appendVarint(b, uint64(n)) + for _, v := range s { + b = appendVarint(b, uint64(v)) + } + return b, nil +} +func appendVarint64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toUint64() + b = appendVarint(b, wiretag) + b = appendVarint(b, v) + return b, nil +} +func appendVarint64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toUint64() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, v) + return b, nil +} +func appendVarint64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toUint64Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, *p) + return b, nil +} +func appendVarint64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toUint64Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendVarint(b, v) + } + return b, nil +} +func appendVarint64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toUint64Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + // compute size + n := 0 + for _, v := range s { + n += SizeVarint(v) + } + b = appendVarint(b, uint64(n)) + for _, v := range s { + b = appendVarint(b, v) + } + return b, nil +} +func appendVarintS64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt64() + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v)) + return b, nil +} +func appendVarintS64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt64() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v)) + return b, nil +} +func appendVarintS64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toInt64Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(*p)) + return b, nil +} +func appendVarintS64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toInt64Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v)) + } + return b, nil +} +func appendVarintS64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toInt64Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + // compute size + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v)) + } + b = appendVarint(b, uint64(n)) + for _, v := range s { + b = appendVarint(b, uint64(v)) + } + return b, nil +} +func appendZigzag32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt32() + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + return b, nil +} +func appendZigzag32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt32() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + return b, nil +} +func appendZigzag32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := ptr.getInt32Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + v := *p + b = appendVarint(b, uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + return b, nil +} +func appendZigzag32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := ptr.getInt32Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + } + return b, nil +} +func appendZigzag32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := ptr.getInt32Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + // compute size + n := 0 + for _, v := range s { + n += SizeVarint(uint64((uint32(v) << 1) ^ uint32((int32(v) >> 31)))) + } + b = appendVarint(b, uint64(n)) + for _, v := range s { + b = appendVarint(b, uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + } + return b, nil +} +func appendZigzag64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt64() + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v<<1)^uint64((int64(v)>>63))) + return b, nil +} +func appendZigzag64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt64() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v<<1)^uint64((int64(v)>>63))) + return b, nil +} +func appendZigzag64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toInt64Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + v := *p + b = appendVarint(b, uint64(v<<1)^uint64((int64(v)>>63))) + return b, nil +} +func appendZigzag64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toInt64Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v<<1)^uint64((int64(v)>>63))) + } + return b, nil +} +func appendZigzag64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toInt64Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + // compute size + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v<<1) ^ uint64((int64(v) >> 63))) + } + b = appendVarint(b, uint64(n)) + for _, v := range s { + b = appendVarint(b, uint64(v<<1)^uint64((int64(v)>>63))) + } + return b, nil +} +func appendBoolValue(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toBool() + b = appendVarint(b, wiretag) + if v { + b = append(b, 1) + } else { + b = append(b, 0) + } + return b, nil +} +func appendBoolValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toBool() + if !v { + return b, nil + } + b = appendVarint(b, wiretag) + b = append(b, 1) + return b, nil +} + +func appendBoolPtr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toBoolPtr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + if *p { + b = append(b, 1) + } else { + b = append(b, 0) + } + return b, nil +} +func appendBoolSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toBoolSlice() + for _, v := range s { + b = appendVarint(b, wiretag) + if v { + b = append(b, 1) + } else { + b = append(b, 0) + } + } + return b, nil +} +func appendBoolPackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toBoolSlice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + b = appendVarint(b, uint64(len(s))) + for _, v := range s { + if v { + b = append(b, 1) + } else { + b = append(b, 0) + } + } + return b, nil +} +func appendStringValue(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toString() + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + return b, nil +} +func appendStringValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toString() + if v == "" { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + return b, nil +} +func appendStringPtr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toStringPtr() + if p == nil { + return b, nil + } + v := *p + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + return b, nil +} +func appendStringSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toStringSlice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + } + return b, nil +} +func appendUTF8StringValue(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + var invalidUTF8 bool + v := *ptr.toString() + if !utf8.ValidString(v) { + invalidUTF8 = true + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + if invalidUTF8 { + return b, errInvalidUTF8 + } + return b, nil +} +func appendUTF8StringValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + var invalidUTF8 bool + v := *ptr.toString() + if v == "" { + return b, nil + } + if !utf8.ValidString(v) { + invalidUTF8 = true + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + if invalidUTF8 { + return b, errInvalidUTF8 + } + return b, nil +} +func appendUTF8StringPtr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + var invalidUTF8 bool + p := *ptr.toStringPtr() + if p == nil { + return b, nil + } + v := *p + if !utf8.ValidString(v) { + invalidUTF8 = true + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + if invalidUTF8 { + return b, errInvalidUTF8 + } + return b, nil +} +func appendUTF8StringSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + var invalidUTF8 bool + s := *ptr.toStringSlice() + for _, v := range s { + if !utf8.ValidString(v) { + invalidUTF8 = true + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + } + if invalidUTF8 { + return b, errInvalidUTF8 + } + return b, nil +} +func appendBytes(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toBytes() + if v == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + return b, nil +} +func appendBytes3(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toBytes() + if len(v) == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + return b, nil +} +func appendBytesOneof(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toBytes() + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + return b, nil +} +func appendBytesSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toBytesSlice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + } + return b, nil +} + +// makeGroupMarshaler returns the sizer and marshaler for a group. +// u is the marshal info of the underlying message. +func makeGroupMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + p := ptr.getPointer() + if p.isNil() { + return 0 + } + return u.size(p) + 2*tagsize + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + p := ptr.getPointer() + if p.isNil() { + return b, nil + } + var err error + b = appendVarint(b, wiretag) // start group + b, err = u.marshal(b, p, deterministic) + b = appendVarint(b, wiretag+(WireEndGroup-WireStartGroup)) // end group + return b, err + } +} + +// makeGroupSliceMarshaler returns the sizer and marshaler for a group slice. +// u is the marshal info of the underlying message. +func makeGroupSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getPointerSlice() + n := 0 + for _, v := range s { + if v.isNil() { + continue + } + n += u.size(v) + 2*tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getPointerSlice() + var err error + var nerr nonFatal + for _, v := range s { + if v.isNil() { + return b, errRepeatedHasNil + } + b = appendVarint(b, wiretag) // start group + b, err = u.marshal(b, v, deterministic) + b = appendVarint(b, wiretag+(WireEndGroup-WireStartGroup)) // end group + if !nerr.Merge(err) { + if err == ErrNil { + err = errRepeatedHasNil + } + return b, err + } + } + return b, nerr.E + } +} + +// makeMessageMarshaler returns the sizer and marshaler for a message field. +// u is the marshal info of the message. +func makeMessageMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + p := ptr.getPointer() + if p.isNil() { + return 0 + } + siz := u.size(p) + return siz + SizeVarint(uint64(siz)) + tagsize + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + p := ptr.getPointer() + if p.isNil() { + return b, nil + } + b = appendVarint(b, wiretag) + siz := u.cachedsize(p) + b = appendVarint(b, uint64(siz)) + return u.marshal(b, p, deterministic) + } +} + +// makeMessageSliceMarshaler returns the sizer and marshaler for a message slice. +// u is the marshal info of the message. +func makeMessageSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getPointerSlice() + n := 0 + for _, v := range s { + if v.isNil() { + continue + } + siz := u.size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getPointerSlice() + var err error + var nerr nonFatal + for _, v := range s { + if v.isNil() { + return b, errRepeatedHasNil + } + b = appendVarint(b, wiretag) + siz := u.cachedsize(v) + b = appendVarint(b, uint64(siz)) + b, err = u.marshal(b, v, deterministic) + + if !nerr.Merge(err) { + if err == ErrNil { + err = errRepeatedHasNil + } + return b, err + } + } + return b, nerr.E + } +} + +// makeMapMarshaler returns the sizer and marshaler for a map field. +// f is the pointer to the reflect data structure of the field. +func makeMapMarshaler(f *reflect.StructField) (sizer, marshaler) { + // figure out key and value type + t := f.Type + keyType := t.Key() + valType := t.Elem() + keyTags := strings.Split(f.Tag.Get("protobuf_key"), ",") + valTags := strings.Split(f.Tag.Get("protobuf_val"), ",") + keySizer, keyMarshaler := typeMarshaler(keyType, keyTags, false, false) // don't omit zero value in map + valSizer, valMarshaler := typeMarshaler(valType, valTags, false, false) // don't omit zero value in map + keyWireTag := 1<<3 | wiretype(keyTags[0]) + valWireTag := 2<<3 | wiretype(valTags[0]) + + // We create an interface to get the addresses of the map key and value. + // If value is pointer-typed, the interface is a direct interface, the + // idata itself is the value. Otherwise, the idata is the pointer to the + // value. + // Key cannot be pointer-typed. + valIsPtr := valType.Kind() == reflect.Ptr + + // If value is a message with nested maps, calling + // valSizer in marshal may be quadratic. We should use + // cached version in marshal (but not in size). + // If value is not message type, we don't have size cache, + // but it cannot be nested either. Just use valSizer. + valCachedSizer := valSizer + if valIsPtr && valType.Elem().Kind() == reflect.Struct { + u := getMarshalInfo(valType.Elem()) + valCachedSizer = func(ptr pointer, tagsize int) int { + // Same as message sizer, but use cache. + p := ptr.getPointer() + if p.isNil() { + return 0 + } + siz := u.cachedsize(p) + return siz + SizeVarint(uint64(siz)) + tagsize + } + } + return func(ptr pointer, tagsize int) int { + m := ptr.asPointerTo(t).Elem() // the map + n := 0 + for _, k := range m.MapKeys() { + ki := k.Interface() + vi := m.MapIndex(k).Interface() + kaddr := toAddrPointer(&ki, false, false) // pointer to key + vaddr := toAddrPointer(&vi, valIsPtr, false) // pointer to value + siz := keySizer(kaddr, 1) + valSizer(vaddr, 1) // tag of key = 1 (size=1), tag of val = 2 (size=1) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, tag uint64, deterministic bool) ([]byte, error) { + m := ptr.asPointerTo(t).Elem() // the map + var err error + keys := m.MapKeys() + if len(keys) > 1 && deterministic { + sort.Sort(mapKeys(keys)) + } + + var nerr nonFatal + for _, k := range keys { + ki := k.Interface() + vi := m.MapIndex(k).Interface() + kaddr := toAddrPointer(&ki, false, false) // pointer to key + vaddr := toAddrPointer(&vi, valIsPtr, false) // pointer to value + b = appendVarint(b, tag) + siz := keySizer(kaddr, 1) + valCachedSizer(vaddr, 1) // tag of key = 1 (size=1), tag of val = 2 (size=1) + b = appendVarint(b, uint64(siz)) + b, err = keyMarshaler(b, kaddr, keyWireTag, deterministic) + if !nerr.Merge(err) { + return b, err + } + b, err = valMarshaler(b, vaddr, valWireTag, deterministic) + if err != ErrNil && !nerr.Merge(err) { // allow nil value in map + return b, err + } + } + return b, nerr.E + } +} + +// makeOneOfMarshaler returns the sizer and marshaler for a oneof field. +// fi is the marshal info of the field. +// f is the pointer to the reflect data structure of the field. +func makeOneOfMarshaler(fi *marshalFieldInfo, f *reflect.StructField) (sizer, marshaler) { + // Oneof field is an interface. We need to get the actual data type on the fly. + t := f.Type + return func(ptr pointer, _ int) int { + p := ptr.getInterfacePointer() + if p.isNil() { + return 0 + } + v := ptr.asPointerTo(t).Elem().Elem().Elem() // *interface -> interface -> *struct -> struct + telem := v.Type() + e := fi.oneofElems[telem] + return e.sizer(p, e.tagsize) + }, + func(b []byte, ptr pointer, _ uint64, deterministic bool) ([]byte, error) { + p := ptr.getInterfacePointer() + if p.isNil() { + return b, nil + } + v := ptr.asPointerTo(t).Elem().Elem().Elem() // *interface -> interface -> *struct -> struct + telem := v.Type() + if telem.Field(0).Type.Kind() == reflect.Ptr && p.getPointer().isNil() { + return b, errOneofHasNil + } + e := fi.oneofElems[telem] + return e.marshaler(b, p, e.wiretag, deterministic) + } +} + +// sizeExtensions computes the size of encoded data for a XXX_InternalExtensions field. +func (u *marshalInfo) sizeExtensions(ext *XXX_InternalExtensions) int { + m, mu := ext.extensionsRead() + if m == nil { + return 0 + } + mu.Lock() + + n := 0 + for _, e := range m { + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + n += len(e.enc) + continue + } + + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + ei := u.getExtElemInfo(e.desc) + v := e.value + p := toAddrPointer(&v, ei.isptr, ei.deref) + n += ei.sizer(p, ei.tagsize) + } + mu.Unlock() + return n +} + +// appendExtensions marshals a XXX_InternalExtensions field to the end of byte slice b. +func (u *marshalInfo) appendExtensions(b []byte, ext *XXX_InternalExtensions, deterministic bool) ([]byte, error) { + m, mu := ext.extensionsRead() + if m == nil { + return b, nil + } + mu.Lock() + defer mu.Unlock() + + var err error + var nerr nonFatal + + // Fast-path for common cases: zero or one extensions. + // Don't bother sorting the keys. + if len(m) <= 1 { + for _, e := range m { + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + b = append(b, e.enc...) + continue + } + + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + + ei := u.getExtElemInfo(e.desc) + v := e.value + p := toAddrPointer(&v, ei.isptr, ei.deref) + b, err = ei.marshaler(b, p, ei.wiretag, deterministic) + if !nerr.Merge(err) { + return b, err + } + } + return b, nerr.E + } + + // Sort the keys to provide a deterministic encoding. + // Not sure this is required, but the old code does it. + keys := make([]int, 0, len(m)) + for k := range m { + keys = append(keys, int(k)) + } + sort.Ints(keys) + + for _, k := range keys { + e := m[int32(k)] + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + b = append(b, e.enc...) + continue + } + + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + + ei := u.getExtElemInfo(e.desc) + v := e.value + p := toAddrPointer(&v, ei.isptr, ei.deref) + b, err = ei.marshaler(b, p, ei.wiretag, deterministic) + if !nerr.Merge(err) { + return b, err + } + } + return b, nerr.E +} + +// message set format is: +// message MessageSet { +// repeated group Item = 1 { +// required int32 type_id = 2; +// required string message = 3; +// }; +// } + +// sizeMessageSet computes the size of encoded data for a XXX_InternalExtensions field +// in message set format (above). +func (u *marshalInfo) sizeMessageSet(ext *XXX_InternalExtensions) int { + m, mu := ext.extensionsRead() + if m == nil { + return 0 + } + mu.Lock() + + n := 0 + for id, e := range m { + n += 2 // start group, end group. tag = 1 (size=1) + n += SizeVarint(uint64(id)) + 1 // type_id, tag = 2 (size=1) + + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + msgWithLen := skipVarint(e.enc) // skip old tag, but leave the length varint + siz := len(msgWithLen) + n += siz + 1 // message, tag = 3 (size=1) + continue + } + + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + + ei := u.getExtElemInfo(e.desc) + v := e.value + p := toAddrPointer(&v, ei.isptr, ei.deref) + n += ei.sizer(p, 1) // message, tag = 3 (size=1) + } + mu.Unlock() + return n +} + +// appendMessageSet marshals a XXX_InternalExtensions field in message set format (above) +// to the end of byte slice b. +func (u *marshalInfo) appendMessageSet(b []byte, ext *XXX_InternalExtensions, deterministic bool) ([]byte, error) { + m, mu := ext.extensionsRead() + if m == nil { + return b, nil + } + mu.Lock() + defer mu.Unlock() + + var err error + var nerr nonFatal + + // Fast-path for common cases: zero or one extensions. + // Don't bother sorting the keys. + if len(m) <= 1 { + for id, e := range m { + b = append(b, 1<<3|WireStartGroup) + b = append(b, 2<<3|WireVarint) + b = appendVarint(b, uint64(id)) + + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + msgWithLen := skipVarint(e.enc) // skip old tag, but leave the length varint + b = append(b, 3<<3|WireBytes) + b = append(b, msgWithLen...) + b = append(b, 1<<3|WireEndGroup) + continue + } + + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + + ei := u.getExtElemInfo(e.desc) + v := e.value + p := toAddrPointer(&v, ei.isptr, ei.deref) + b, err = ei.marshaler(b, p, 3<<3|WireBytes, deterministic) + if !nerr.Merge(err) { + return b, err + } + b = append(b, 1<<3|WireEndGroup) + } + return b, nerr.E + } + + // Sort the keys to provide a deterministic encoding. + keys := make([]int, 0, len(m)) + for k := range m { + keys = append(keys, int(k)) + } + sort.Ints(keys) + + for _, id := range keys { + e := m[int32(id)] + b = append(b, 1<<3|WireStartGroup) + b = append(b, 2<<3|WireVarint) + b = appendVarint(b, uint64(id)) + + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + msgWithLen := skipVarint(e.enc) // skip old tag, but leave the length varint + b = append(b, 3<<3|WireBytes) + b = append(b, msgWithLen...) + b = append(b, 1<<3|WireEndGroup) + continue + } + + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + + ei := u.getExtElemInfo(e.desc) + v := e.value + p := toAddrPointer(&v, ei.isptr, ei.deref) + b, err = ei.marshaler(b, p, 3<<3|WireBytes, deterministic) + b = append(b, 1<<3|WireEndGroup) + if !nerr.Merge(err) { + return b, err + } + } + return b, nerr.E +} + +// sizeV1Extensions computes the size of encoded data for a V1-API extension field. +func (u *marshalInfo) sizeV1Extensions(m map[int32]Extension) int { + if m == nil { + return 0 + } + + n := 0 + for _, e := range m { + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + n += len(e.enc) + continue + } + + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + + ei := u.getExtElemInfo(e.desc) + v := e.value + p := toAddrPointer(&v, ei.isptr, ei.deref) + n += ei.sizer(p, ei.tagsize) + } + return n +} + +// appendV1Extensions marshals a V1-API extension field to the end of byte slice b. +func (u *marshalInfo) appendV1Extensions(b []byte, m map[int32]Extension, deterministic bool) ([]byte, error) { + if m == nil { + return b, nil + } + + // Sort the keys to provide a deterministic encoding. + keys := make([]int, 0, len(m)) + for k := range m { + keys = append(keys, int(k)) + } + sort.Ints(keys) + + var err error + var nerr nonFatal + for _, k := range keys { + e := m[int32(k)] + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + b = append(b, e.enc...) + continue + } + + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + + ei := u.getExtElemInfo(e.desc) + v := e.value + p := toAddrPointer(&v, ei.isptr, ei.deref) + b, err = ei.marshaler(b, p, ei.wiretag, deterministic) + if !nerr.Merge(err) { + return b, err + } + } + return b, nerr.E +} + +// newMarshaler is the interface representing objects that can marshal themselves. +// +// This exists to support protoc-gen-go generated messages. +// The proto package will stop type-asserting to this interface in the future. +// +// DO NOT DEPEND ON THIS. +type newMarshaler interface { + XXX_Size() int + XXX_Marshal(b []byte, deterministic bool) ([]byte, error) +} + +// Size returns the encoded size of a protocol buffer message. +// This is the main entry point. +func Size(pb Message) int { + if m, ok := pb.(newMarshaler); ok { + return m.XXX_Size() + } + if m, ok := pb.(Marshaler); ok { + // If the message can marshal itself, let it do it, for compatibility. + // NOTE: This is not efficient. + b, _ := m.Marshal() + return len(b) + } + // in case somehow we didn't generate the wrapper + if pb == nil { + return 0 + } + var info InternalMessageInfo + return info.Size(pb) +} + +// Marshal takes a protocol buffer message +// and encodes it into the wire format, returning the data. +// This is the main entry point. +func Marshal(pb Message) ([]byte, error) { + if m, ok := pb.(newMarshaler); ok { + siz := m.XXX_Size() + b := make([]byte, 0, siz) + return m.XXX_Marshal(b, false) + } + if m, ok := pb.(Marshaler); ok { + // If the message can marshal itself, let it do it, for compatibility. + // NOTE: This is not efficient. + return m.Marshal() + } + // in case somehow we didn't generate the wrapper + if pb == nil { + return nil, ErrNil + } + var info InternalMessageInfo + siz := info.Size(pb) + b := make([]byte, 0, siz) + return info.Marshal(b, pb, false) +} + +// Marshal takes a protocol buffer message +// and encodes it into the wire format, writing the result to the +// Buffer. +// This is an alternative entry point. It is not necessary to use +// a Buffer for most applications. +func (p *Buffer) Marshal(pb Message) error { + var err error + if m, ok := pb.(newMarshaler); ok { + siz := m.XXX_Size() + p.grow(siz) // make sure buf has enough capacity + p.buf, err = m.XXX_Marshal(p.buf, p.deterministic) + return err + } + if m, ok := pb.(Marshaler); ok { + // If the message can marshal itself, let it do it, for compatibility. + // NOTE: This is not efficient. + b, err := m.Marshal() + p.buf = append(p.buf, b...) + return err + } + // in case somehow we didn't generate the wrapper + if pb == nil { + return ErrNil + } + var info InternalMessageInfo + siz := info.Size(pb) + p.grow(siz) // make sure buf has enough capacity + p.buf, err = info.Marshal(p.buf, pb, p.deterministic) + return err +} + +// grow grows the buffer's capacity, if necessary, to guarantee space for +// another n bytes. After grow(n), at least n bytes can be written to the +// buffer without another allocation. +func (p *Buffer) grow(n int) { + need := len(p.buf) + n + if need <= cap(p.buf) { + return + } + newCap := len(p.buf) * 2 + if newCap < need { + newCap = need + } + p.buf = append(make([]byte, 0, newCap), p.buf...) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/table_merge.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/table_merge.go new file mode 100644 index 000000000..5525def6a --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/table_merge.go @@ -0,0 +1,654 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2016 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +import ( + "fmt" + "reflect" + "strings" + "sync" + "sync/atomic" +) + +// Merge merges the src message into dst. +// This assumes that dst and src of the same type and are non-nil. +func (a *InternalMessageInfo) Merge(dst, src Message) { + mi := atomicLoadMergeInfo(&a.merge) + if mi == nil { + mi = getMergeInfo(reflect.TypeOf(dst).Elem()) + atomicStoreMergeInfo(&a.merge, mi) + } + mi.merge(toPointer(&dst), toPointer(&src)) +} + +type mergeInfo struct { + typ reflect.Type + + initialized int32 // 0: only typ is valid, 1: everything is valid + lock sync.Mutex + + fields []mergeFieldInfo + unrecognized field // Offset of XXX_unrecognized +} + +type mergeFieldInfo struct { + field field // Offset of field, guaranteed to be valid + + // isPointer reports whether the value in the field is a pointer. + // This is true for the following situations: + // * Pointer to struct + // * Pointer to basic type (proto2 only) + // * Slice (first value in slice header is a pointer) + // * String (first value in string header is a pointer) + isPointer bool + + // basicWidth reports the width of the field assuming that it is directly + // embedded in the struct (as is the case for basic types in proto3). + // The possible values are: + // 0: invalid + // 1: bool + // 4: int32, uint32, float32 + // 8: int64, uint64, float64 + basicWidth int + + // Where dst and src are pointers to the types being merged. + merge func(dst, src pointer) +} + +var ( + mergeInfoMap = map[reflect.Type]*mergeInfo{} + mergeInfoLock sync.Mutex +) + +func getMergeInfo(t reflect.Type) *mergeInfo { + mergeInfoLock.Lock() + defer mergeInfoLock.Unlock() + mi := mergeInfoMap[t] + if mi == nil { + mi = &mergeInfo{typ: t} + mergeInfoMap[t] = mi + } + return mi +} + +// merge merges src into dst assuming they are both of type *mi.typ. +func (mi *mergeInfo) merge(dst, src pointer) { + if dst.isNil() { + panic("proto: nil destination") + } + if src.isNil() { + return // Nothing to do. + } + + if atomic.LoadInt32(&mi.initialized) == 0 { + mi.computeMergeInfo() + } + + for _, fi := range mi.fields { + sfp := src.offset(fi.field) + + // As an optimization, we can avoid the merge function call cost + // if we know for sure that the source will have no effect + // by checking if it is the zero value. + if unsafeAllowed { + if fi.isPointer && sfp.getPointer().isNil() { // Could be slice or string + continue + } + if fi.basicWidth > 0 { + switch { + case fi.basicWidth == 1 && !*sfp.toBool(): + continue + case fi.basicWidth == 4 && *sfp.toUint32() == 0: + continue + case fi.basicWidth == 8 && *sfp.toUint64() == 0: + continue + } + } + } + + dfp := dst.offset(fi.field) + fi.merge(dfp, sfp) + } + + // TODO: Make this faster? + out := dst.asPointerTo(mi.typ).Elem() + in := src.asPointerTo(mi.typ).Elem() + if emIn, err := extendable(in.Addr().Interface()); err == nil { + emOut, _ := extendable(out.Addr().Interface()) + mIn, muIn := emIn.extensionsRead() + if mIn != nil { + mOut := emOut.extensionsWrite() + muIn.Lock() + mergeExtension(mOut, mIn) + muIn.Unlock() + } + } + + if mi.unrecognized.IsValid() { + if b := *src.offset(mi.unrecognized).toBytes(); len(b) > 0 { + *dst.offset(mi.unrecognized).toBytes() = append([]byte(nil), b...) + } + } +} + +func (mi *mergeInfo) computeMergeInfo() { + mi.lock.Lock() + defer mi.lock.Unlock() + if mi.initialized != 0 { + return + } + t := mi.typ + n := t.NumField() + + props := GetProperties(t) + for i := 0; i < n; i++ { + f := t.Field(i) + if strings.HasPrefix(f.Name, "XXX_") { + continue + } + + mfi := mergeFieldInfo{field: toField(&f)} + tf := f.Type + + // As an optimization, we can avoid the merge function call cost + // if we know for sure that the source will have no effect + // by checking if it is the zero value. + if unsafeAllowed { + switch tf.Kind() { + case reflect.Ptr, reflect.Slice, reflect.String: + // As a special case, we assume slices and strings are pointers + // since we know that the first field in the SliceSlice or + // StringHeader is a data pointer. + mfi.isPointer = true + case reflect.Bool: + mfi.basicWidth = 1 + case reflect.Int32, reflect.Uint32, reflect.Float32: + mfi.basicWidth = 4 + case reflect.Int64, reflect.Uint64, reflect.Float64: + mfi.basicWidth = 8 + } + } + + // Unwrap tf to get at its most basic type. + var isPointer, isSlice bool + if tf.Kind() == reflect.Slice && tf.Elem().Kind() != reflect.Uint8 { + isSlice = true + tf = tf.Elem() + } + if tf.Kind() == reflect.Ptr { + isPointer = true + tf = tf.Elem() + } + if isPointer && isSlice && tf.Kind() != reflect.Struct { + panic("both pointer and slice for basic type in " + tf.Name()) + } + + switch tf.Kind() { + case reflect.Int32: + switch { + case isSlice: // E.g., []int32 + mfi.merge = func(dst, src pointer) { + // NOTE: toInt32Slice is not defined (see pointer_reflect.go). + /* + sfsp := src.toInt32Slice() + if *sfsp != nil { + dfsp := dst.toInt32Slice() + *dfsp = append(*dfsp, *sfsp...) + if *dfsp == nil { + *dfsp = []int64{} + } + } + */ + sfs := src.getInt32Slice() + if sfs != nil { + dfs := dst.getInt32Slice() + dfs = append(dfs, sfs...) + if dfs == nil { + dfs = []int32{} + } + dst.setInt32Slice(dfs) + } + } + case isPointer: // E.g., *int32 + mfi.merge = func(dst, src pointer) { + // NOTE: toInt32Ptr is not defined (see pointer_reflect.go). + /* + sfpp := src.toInt32Ptr() + if *sfpp != nil { + dfpp := dst.toInt32Ptr() + if *dfpp == nil { + *dfpp = Int32(**sfpp) + } else { + **dfpp = **sfpp + } + } + */ + sfp := src.getInt32Ptr() + if sfp != nil { + dfp := dst.getInt32Ptr() + if dfp == nil { + dst.setInt32Ptr(*sfp) + } else { + *dfp = *sfp + } + } + } + default: // E.g., int32 + mfi.merge = func(dst, src pointer) { + if v := *src.toInt32(); v != 0 { + *dst.toInt32() = v + } + } + } + case reflect.Int64: + switch { + case isSlice: // E.g., []int64 + mfi.merge = func(dst, src pointer) { + sfsp := src.toInt64Slice() + if *sfsp != nil { + dfsp := dst.toInt64Slice() + *dfsp = append(*dfsp, *sfsp...) + if *dfsp == nil { + *dfsp = []int64{} + } + } + } + case isPointer: // E.g., *int64 + mfi.merge = func(dst, src pointer) { + sfpp := src.toInt64Ptr() + if *sfpp != nil { + dfpp := dst.toInt64Ptr() + if *dfpp == nil { + *dfpp = Int64(**sfpp) + } else { + **dfpp = **sfpp + } + } + } + default: // E.g., int64 + mfi.merge = func(dst, src pointer) { + if v := *src.toInt64(); v != 0 { + *dst.toInt64() = v + } + } + } + case reflect.Uint32: + switch { + case isSlice: // E.g., []uint32 + mfi.merge = func(dst, src pointer) { + sfsp := src.toUint32Slice() + if *sfsp != nil { + dfsp := dst.toUint32Slice() + *dfsp = append(*dfsp, *sfsp...) + if *dfsp == nil { + *dfsp = []uint32{} + } + } + } + case isPointer: // E.g., *uint32 + mfi.merge = func(dst, src pointer) { + sfpp := src.toUint32Ptr() + if *sfpp != nil { + dfpp := dst.toUint32Ptr() + if *dfpp == nil { + *dfpp = Uint32(**sfpp) + } else { + **dfpp = **sfpp + } + } + } + default: // E.g., uint32 + mfi.merge = func(dst, src pointer) { + if v := *src.toUint32(); v != 0 { + *dst.toUint32() = v + } + } + } + case reflect.Uint64: + switch { + case isSlice: // E.g., []uint64 + mfi.merge = func(dst, src pointer) { + sfsp := src.toUint64Slice() + if *sfsp != nil { + dfsp := dst.toUint64Slice() + *dfsp = append(*dfsp, *sfsp...) + if *dfsp == nil { + *dfsp = []uint64{} + } + } + } + case isPointer: // E.g., *uint64 + mfi.merge = func(dst, src pointer) { + sfpp := src.toUint64Ptr() + if *sfpp != nil { + dfpp := dst.toUint64Ptr() + if *dfpp == nil { + *dfpp = Uint64(**sfpp) + } else { + **dfpp = **sfpp + } + } + } + default: // E.g., uint64 + mfi.merge = func(dst, src pointer) { + if v := *src.toUint64(); v != 0 { + *dst.toUint64() = v + } + } + } + case reflect.Float32: + switch { + case isSlice: // E.g., []float32 + mfi.merge = func(dst, src pointer) { + sfsp := src.toFloat32Slice() + if *sfsp != nil { + dfsp := dst.toFloat32Slice() + *dfsp = append(*dfsp, *sfsp...) + if *dfsp == nil { + *dfsp = []float32{} + } + } + } + case isPointer: // E.g., *float32 + mfi.merge = func(dst, src pointer) { + sfpp := src.toFloat32Ptr() + if *sfpp != nil { + dfpp := dst.toFloat32Ptr() + if *dfpp == nil { + *dfpp = Float32(**sfpp) + } else { + **dfpp = **sfpp + } + } + } + default: // E.g., float32 + mfi.merge = func(dst, src pointer) { + if v := *src.toFloat32(); v != 0 { + *dst.toFloat32() = v + } + } + } + case reflect.Float64: + switch { + case isSlice: // E.g., []float64 + mfi.merge = func(dst, src pointer) { + sfsp := src.toFloat64Slice() + if *sfsp != nil { + dfsp := dst.toFloat64Slice() + *dfsp = append(*dfsp, *sfsp...) + if *dfsp == nil { + *dfsp = []float64{} + } + } + } + case isPointer: // E.g., *float64 + mfi.merge = func(dst, src pointer) { + sfpp := src.toFloat64Ptr() + if *sfpp != nil { + dfpp := dst.toFloat64Ptr() + if *dfpp == nil { + *dfpp = Float64(**sfpp) + } else { + **dfpp = **sfpp + } + } + } + default: // E.g., float64 + mfi.merge = func(dst, src pointer) { + if v := *src.toFloat64(); v != 0 { + *dst.toFloat64() = v + } + } + } + case reflect.Bool: + switch { + case isSlice: // E.g., []bool + mfi.merge = func(dst, src pointer) { + sfsp := src.toBoolSlice() + if *sfsp != nil { + dfsp := dst.toBoolSlice() + *dfsp = append(*dfsp, *sfsp...) + if *dfsp == nil { + *dfsp = []bool{} + } + } + } + case isPointer: // E.g., *bool + mfi.merge = func(dst, src pointer) { + sfpp := src.toBoolPtr() + if *sfpp != nil { + dfpp := dst.toBoolPtr() + if *dfpp == nil { + *dfpp = Bool(**sfpp) + } else { + **dfpp = **sfpp + } + } + } + default: // E.g., bool + mfi.merge = func(dst, src pointer) { + if v := *src.toBool(); v { + *dst.toBool() = v + } + } + } + case reflect.String: + switch { + case isSlice: // E.g., []string + mfi.merge = func(dst, src pointer) { + sfsp := src.toStringSlice() + if *sfsp != nil { + dfsp := dst.toStringSlice() + *dfsp = append(*dfsp, *sfsp...) + if *dfsp == nil { + *dfsp = []string{} + } + } + } + case isPointer: // E.g., *string + mfi.merge = func(dst, src pointer) { + sfpp := src.toStringPtr() + if *sfpp != nil { + dfpp := dst.toStringPtr() + if *dfpp == nil { + *dfpp = String(**sfpp) + } else { + **dfpp = **sfpp + } + } + } + default: // E.g., string + mfi.merge = func(dst, src pointer) { + if v := *src.toString(); v != "" { + *dst.toString() = v + } + } + } + case reflect.Slice: + isProto3 := props.Prop[i].proto3 + switch { + case isPointer: + panic("bad pointer in byte slice case in " + tf.Name()) + case tf.Elem().Kind() != reflect.Uint8: + panic("bad element kind in byte slice case in " + tf.Name()) + case isSlice: // E.g., [][]byte + mfi.merge = func(dst, src pointer) { + sbsp := src.toBytesSlice() + if *sbsp != nil { + dbsp := dst.toBytesSlice() + for _, sb := range *sbsp { + if sb == nil { + *dbsp = append(*dbsp, nil) + } else { + *dbsp = append(*dbsp, append([]byte{}, sb...)) + } + } + if *dbsp == nil { + *dbsp = [][]byte{} + } + } + } + default: // E.g., []byte + mfi.merge = func(dst, src pointer) { + sbp := src.toBytes() + if *sbp != nil { + dbp := dst.toBytes() + if !isProto3 || len(*sbp) > 0 { + *dbp = append([]byte{}, *sbp...) + } + } + } + } + case reflect.Struct: + switch { + case !isPointer: + panic(fmt.Sprintf("message field %s without pointer", tf)) + case isSlice: // E.g., []*pb.T + mi := getMergeInfo(tf) + mfi.merge = func(dst, src pointer) { + sps := src.getPointerSlice() + if sps != nil { + dps := dst.getPointerSlice() + for _, sp := range sps { + var dp pointer + if !sp.isNil() { + dp = valToPointer(reflect.New(tf)) + mi.merge(dp, sp) + } + dps = append(dps, dp) + } + if dps == nil { + dps = []pointer{} + } + dst.setPointerSlice(dps) + } + } + default: // E.g., *pb.T + mi := getMergeInfo(tf) + mfi.merge = func(dst, src pointer) { + sp := src.getPointer() + if !sp.isNil() { + dp := dst.getPointer() + if dp.isNil() { + dp = valToPointer(reflect.New(tf)) + dst.setPointer(dp) + } + mi.merge(dp, sp) + } + } + } + case reflect.Map: + switch { + case isPointer || isSlice: + panic("bad pointer or slice in map case in " + tf.Name()) + default: // E.g., map[K]V + mfi.merge = func(dst, src pointer) { + sm := src.asPointerTo(tf).Elem() + if sm.Len() == 0 { + return + } + dm := dst.asPointerTo(tf).Elem() + if dm.IsNil() { + dm.Set(reflect.MakeMap(tf)) + } + + switch tf.Elem().Kind() { + case reflect.Ptr: // Proto struct (e.g., *T) + for _, key := range sm.MapKeys() { + val := sm.MapIndex(key) + val = reflect.ValueOf(Clone(val.Interface().(Message))) + dm.SetMapIndex(key, val) + } + case reflect.Slice: // E.g. Bytes type (e.g., []byte) + for _, key := range sm.MapKeys() { + val := sm.MapIndex(key) + val = reflect.ValueOf(append([]byte{}, val.Bytes()...)) + dm.SetMapIndex(key, val) + } + default: // Basic type (e.g., string) + for _, key := range sm.MapKeys() { + val := sm.MapIndex(key) + dm.SetMapIndex(key, val) + } + } + } + } + case reflect.Interface: + // Must be oneof field. + switch { + case isPointer || isSlice: + panic("bad pointer or slice in interface case in " + tf.Name()) + default: // E.g., interface{} + // TODO: Make this faster? + mfi.merge = func(dst, src pointer) { + su := src.asPointerTo(tf).Elem() + if !su.IsNil() { + du := dst.asPointerTo(tf).Elem() + typ := su.Elem().Type() + if du.IsNil() || du.Elem().Type() != typ { + du.Set(reflect.New(typ.Elem())) // Initialize interface if empty + } + sv := su.Elem().Elem().Field(0) + if sv.Kind() == reflect.Ptr && sv.IsNil() { + return + } + dv := du.Elem().Elem().Field(0) + if dv.Kind() == reflect.Ptr && dv.IsNil() { + dv.Set(reflect.New(sv.Type().Elem())) // Initialize proto message if empty + } + switch sv.Type().Kind() { + case reflect.Ptr: // Proto struct (e.g., *T) + Merge(dv.Interface().(Message), sv.Interface().(Message)) + case reflect.Slice: // E.g. Bytes type (e.g., []byte) + dv.Set(reflect.ValueOf(append([]byte{}, sv.Bytes()...))) + default: // Basic type (e.g., string) + dv.Set(sv) + } + } + } + } + default: + panic(fmt.Sprintf("merger not found for type:%s", tf)) + } + mi.fields = append(mi.fields, mfi) + } + + mi.unrecognized = invalidField + if f, ok := t.FieldByName("XXX_unrecognized"); ok { + if f.Type != reflect.TypeOf([]byte{}) { + panic("expected XXX_unrecognized to be of type []byte") + } + mi.unrecognized = toField(&f) + } + + atomic.StoreInt32(&mi.initialized, 1) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/table_unmarshal.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/table_unmarshal.go new file mode 100644 index 000000000..acee2fc52 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/table_unmarshal.go @@ -0,0 +1,2053 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2016 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +import ( + "errors" + "fmt" + "io" + "math" + "reflect" + "strconv" + "strings" + "sync" + "sync/atomic" + "unicode/utf8" +) + +// Unmarshal is the entry point from the generated .pb.go files. +// This function is not intended to be used by non-generated code. +// This function is not subject to any compatibility guarantee. +// msg contains a pointer to a protocol buffer struct. +// b is the data to be unmarshaled into the protocol buffer. +// a is a pointer to a place to store cached unmarshal information. +func (a *InternalMessageInfo) Unmarshal(msg Message, b []byte) error { + // Load the unmarshal information for this message type. + // The atomic load ensures memory consistency. + u := atomicLoadUnmarshalInfo(&a.unmarshal) + if u == nil { + // Slow path: find unmarshal info for msg, update a with it. + u = getUnmarshalInfo(reflect.TypeOf(msg).Elem()) + atomicStoreUnmarshalInfo(&a.unmarshal, u) + } + // Then do the unmarshaling. + err := u.unmarshal(toPointer(&msg), b) + return err +} + +type unmarshalInfo struct { + typ reflect.Type // type of the protobuf struct + + // 0 = only typ field is initialized + // 1 = completely initialized + initialized int32 + lock sync.Mutex // prevents double initialization + dense []unmarshalFieldInfo // fields indexed by tag # + sparse map[uint64]unmarshalFieldInfo // fields indexed by tag # + reqFields []string // names of required fields + reqMask uint64 // 1< 0 { + // Read tag and wire type. + // Special case 1 and 2 byte varints. + var x uint64 + if b[0] < 128 { + x = uint64(b[0]) + b = b[1:] + } else if len(b) >= 2 && b[1] < 128 { + x = uint64(b[0]&0x7f) + uint64(b[1])<<7 + b = b[2:] + } else { + var n int + x, n = decodeVarint(b) + if n == 0 { + return io.ErrUnexpectedEOF + } + b = b[n:] + } + tag := x >> 3 + wire := int(x) & 7 + + // Dispatch on the tag to one of the unmarshal* functions below. + var f unmarshalFieldInfo + if tag < uint64(len(u.dense)) { + f = u.dense[tag] + } else { + f = u.sparse[tag] + } + if fn := f.unmarshal; fn != nil { + var err error + b, err = fn(b, m.offset(f.field), wire) + if err == nil { + reqMask |= f.reqMask + continue + } + if r, ok := err.(*RequiredNotSetError); ok { + // Remember this error, but keep parsing. We need to produce + // a full parse even if a required field is missing. + if errLater == nil { + errLater = r + } + reqMask |= f.reqMask + continue + } + if err != errInternalBadWireType { + if err == errInvalidUTF8 { + if errLater == nil { + fullName := revProtoTypes[reflect.PtrTo(u.typ)] + "." + f.name + errLater = &invalidUTF8Error{fullName} + } + continue + } + return err + } + // Fragments with bad wire type are treated as unknown fields. + } + + // Unknown tag. + if !u.unrecognized.IsValid() { + // Don't keep unrecognized data; just skip it. + var err error + b, err = skipField(b, wire) + if err != nil { + return err + } + continue + } + // Keep unrecognized data around. + // maybe in extensions, maybe in the unrecognized field. + z := m.offset(u.unrecognized).toBytes() + var emap map[int32]Extension + var e Extension + for _, r := range u.extensionRanges { + if uint64(r.Start) <= tag && tag <= uint64(r.End) { + if u.extensions.IsValid() { + mp := m.offset(u.extensions).toExtensions() + emap = mp.extensionsWrite() + e = emap[int32(tag)] + z = &e.enc + break + } + if u.oldExtensions.IsValid() { + p := m.offset(u.oldExtensions).toOldExtensions() + emap = *p + if emap == nil { + emap = map[int32]Extension{} + *p = emap + } + e = emap[int32(tag)] + z = &e.enc + break + } + panic("no extensions field available") + } + } + + // Use wire type to skip data. + var err error + b0 := b + b, err = skipField(b, wire) + if err != nil { + return err + } + *z = encodeVarint(*z, tag<<3|uint64(wire)) + *z = append(*z, b0[:len(b0)-len(b)]...) + + if emap != nil { + emap[int32(tag)] = e + } + } + if reqMask != u.reqMask && errLater == nil { + // A required field of this message is missing. + for _, n := range u.reqFields { + if reqMask&1 == 0 { + errLater = &RequiredNotSetError{n} + } + reqMask >>= 1 + } + } + return errLater +} + +// computeUnmarshalInfo fills in u with information for use +// in unmarshaling protocol buffers of type u.typ. +func (u *unmarshalInfo) computeUnmarshalInfo() { + u.lock.Lock() + defer u.lock.Unlock() + if u.initialized != 0 { + return + } + t := u.typ + n := t.NumField() + + // Set up the "not found" value for the unrecognized byte buffer. + // This is the default for proto3. + u.unrecognized = invalidField + u.extensions = invalidField + u.oldExtensions = invalidField + + // List of the generated type and offset for each oneof field. + type oneofField struct { + ityp reflect.Type // interface type of oneof field + field field // offset in containing message + } + var oneofFields []oneofField + + for i := 0; i < n; i++ { + f := t.Field(i) + if f.Name == "XXX_unrecognized" { + // The byte slice used to hold unrecognized input is special. + if f.Type != reflect.TypeOf(([]byte)(nil)) { + panic("bad type for XXX_unrecognized field: " + f.Type.Name()) + } + u.unrecognized = toField(&f) + continue + } + if f.Name == "XXX_InternalExtensions" { + // Ditto here. + if f.Type != reflect.TypeOf(XXX_InternalExtensions{}) { + panic("bad type for XXX_InternalExtensions field: " + f.Type.Name()) + } + u.extensions = toField(&f) + if f.Tag.Get("protobuf_messageset") == "1" { + u.isMessageSet = true + } + continue + } + if f.Name == "XXX_extensions" { + // An older form of the extensions field. + if f.Type != reflect.TypeOf((map[int32]Extension)(nil)) { + panic("bad type for XXX_extensions field: " + f.Type.Name()) + } + u.oldExtensions = toField(&f) + continue + } + if f.Name == "XXX_NoUnkeyedLiteral" || f.Name == "XXX_sizecache" { + continue + } + + oneof := f.Tag.Get("protobuf_oneof") + if oneof != "" { + oneofFields = append(oneofFields, oneofField{f.Type, toField(&f)}) + // The rest of oneof processing happens below. + continue + } + + tags := f.Tag.Get("protobuf") + tagArray := strings.Split(tags, ",") + if len(tagArray) < 2 { + panic("protobuf tag not enough fields in " + t.Name() + "." + f.Name + ": " + tags) + } + tag, err := strconv.Atoi(tagArray[1]) + if err != nil { + panic("protobuf tag field not an integer: " + tagArray[1]) + } + + name := "" + for _, tag := range tagArray[3:] { + if strings.HasPrefix(tag, "name=") { + name = tag[5:] + } + } + + // Extract unmarshaling function from the field (its type and tags). + unmarshal := fieldUnmarshaler(&f) + + // Required field? + var reqMask uint64 + if tagArray[2] == "req" { + bit := len(u.reqFields) + u.reqFields = append(u.reqFields, name) + reqMask = uint64(1) << uint(bit) + // TODO: if we have more than 64 required fields, we end up + // not verifying that all required fields are present. + // Fix this, perhaps using a count of required fields? + } + + // Store the info in the correct slot in the message. + u.setTag(tag, toField(&f), unmarshal, reqMask, name) + } + + // Find any types associated with oneof fields. + var oneofImplementers []interface{} + switch m := reflect.Zero(reflect.PtrTo(t)).Interface().(type) { + case oneofFuncsIface: + _, _, _, oneofImplementers = m.XXX_OneofFuncs() + case oneofWrappersIface: + oneofImplementers = m.XXX_OneofWrappers() + } + for _, v := range oneofImplementers { + tptr := reflect.TypeOf(v) // *Msg_X + typ := tptr.Elem() // Msg_X + + f := typ.Field(0) // oneof implementers have one field + baseUnmarshal := fieldUnmarshaler(&f) + tags := strings.Split(f.Tag.Get("protobuf"), ",") + fieldNum, err := strconv.Atoi(tags[1]) + if err != nil { + panic("protobuf tag field not an integer: " + tags[1]) + } + var name string + for _, tag := range tags { + if strings.HasPrefix(tag, "name=") { + name = strings.TrimPrefix(tag, "name=") + break + } + } + + // Find the oneof field that this struct implements. + // Might take O(n^2) to process all of the oneofs, but who cares. + for _, of := range oneofFields { + if tptr.Implements(of.ityp) { + // We have found the corresponding interface for this struct. + // That lets us know where this struct should be stored + // when we encounter it during unmarshaling. + unmarshal := makeUnmarshalOneof(typ, of.ityp, baseUnmarshal) + u.setTag(fieldNum, of.field, unmarshal, 0, name) + } + } + + } + + // Get extension ranges, if any. + fn := reflect.Zero(reflect.PtrTo(t)).MethodByName("ExtensionRangeArray") + if fn.IsValid() { + if !u.extensions.IsValid() && !u.oldExtensions.IsValid() { + panic("a message with extensions, but no extensions field in " + t.Name()) + } + u.extensionRanges = fn.Call(nil)[0].Interface().([]ExtensionRange) + } + + // Explicitly disallow tag 0. This will ensure we flag an error + // when decoding a buffer of all zeros. Without this code, we + // would decode and skip an all-zero buffer of even length. + // [0 0] is [tag=0/wiretype=varint varint-encoded-0]. + u.setTag(0, zeroField, func(b []byte, f pointer, w int) ([]byte, error) { + return nil, fmt.Errorf("proto: %s: illegal tag 0 (wire type %d)", t, w) + }, 0, "") + + // Set mask for required field check. + u.reqMask = uint64(1)<= 0 && (tag < 16 || tag < 2*n) { // TODO: what are the right numbers here? + for len(u.dense) <= tag { + u.dense = append(u.dense, unmarshalFieldInfo{}) + } + u.dense[tag] = i + return + } + if u.sparse == nil { + u.sparse = map[uint64]unmarshalFieldInfo{} + } + u.sparse[uint64(tag)] = i +} + +// fieldUnmarshaler returns an unmarshaler for the given field. +func fieldUnmarshaler(f *reflect.StructField) unmarshaler { + if f.Type.Kind() == reflect.Map { + return makeUnmarshalMap(f) + } + return typeUnmarshaler(f.Type, f.Tag.Get("protobuf")) +} + +// typeUnmarshaler returns an unmarshaler for the given field type / field tag pair. +func typeUnmarshaler(t reflect.Type, tags string) unmarshaler { + tagArray := strings.Split(tags, ",") + encoding := tagArray[0] + name := "unknown" + proto3 := false + validateUTF8 := true + for _, tag := range tagArray[3:] { + if strings.HasPrefix(tag, "name=") { + name = tag[5:] + } + if tag == "proto3" { + proto3 = true + } + } + validateUTF8 = validateUTF8 && proto3 + + // Figure out packaging (pointer, slice, or both) + slice := false + pointer := false + if t.Kind() == reflect.Slice && t.Elem().Kind() != reflect.Uint8 { + slice = true + t = t.Elem() + } + if t.Kind() == reflect.Ptr { + pointer = true + t = t.Elem() + } + + // We'll never have both pointer and slice for basic types. + if pointer && slice && t.Kind() != reflect.Struct { + panic("both pointer and slice for basic type in " + t.Name()) + } + + switch t.Kind() { + case reflect.Bool: + if pointer { + return unmarshalBoolPtr + } + if slice { + return unmarshalBoolSlice + } + return unmarshalBoolValue + case reflect.Int32: + switch encoding { + case "fixed32": + if pointer { + return unmarshalFixedS32Ptr + } + if slice { + return unmarshalFixedS32Slice + } + return unmarshalFixedS32Value + case "varint": + // this could be int32 or enum + if pointer { + return unmarshalInt32Ptr + } + if slice { + return unmarshalInt32Slice + } + return unmarshalInt32Value + case "zigzag32": + if pointer { + return unmarshalSint32Ptr + } + if slice { + return unmarshalSint32Slice + } + return unmarshalSint32Value + } + case reflect.Int64: + switch encoding { + case "fixed64": + if pointer { + return unmarshalFixedS64Ptr + } + if slice { + return unmarshalFixedS64Slice + } + return unmarshalFixedS64Value + case "varint": + if pointer { + return unmarshalInt64Ptr + } + if slice { + return unmarshalInt64Slice + } + return unmarshalInt64Value + case "zigzag64": + if pointer { + return unmarshalSint64Ptr + } + if slice { + return unmarshalSint64Slice + } + return unmarshalSint64Value + } + case reflect.Uint32: + switch encoding { + case "fixed32": + if pointer { + return unmarshalFixed32Ptr + } + if slice { + return unmarshalFixed32Slice + } + return unmarshalFixed32Value + case "varint": + if pointer { + return unmarshalUint32Ptr + } + if slice { + return unmarshalUint32Slice + } + return unmarshalUint32Value + } + case reflect.Uint64: + switch encoding { + case "fixed64": + if pointer { + return unmarshalFixed64Ptr + } + if slice { + return unmarshalFixed64Slice + } + return unmarshalFixed64Value + case "varint": + if pointer { + return unmarshalUint64Ptr + } + if slice { + return unmarshalUint64Slice + } + return unmarshalUint64Value + } + case reflect.Float32: + if pointer { + return unmarshalFloat32Ptr + } + if slice { + return unmarshalFloat32Slice + } + return unmarshalFloat32Value + case reflect.Float64: + if pointer { + return unmarshalFloat64Ptr + } + if slice { + return unmarshalFloat64Slice + } + return unmarshalFloat64Value + case reflect.Map: + panic("map type in typeUnmarshaler in " + t.Name()) + case reflect.Slice: + if pointer { + panic("bad pointer in slice case in " + t.Name()) + } + if slice { + return unmarshalBytesSlice + } + return unmarshalBytesValue + case reflect.String: + if validateUTF8 { + if pointer { + return unmarshalUTF8StringPtr + } + if slice { + return unmarshalUTF8StringSlice + } + return unmarshalUTF8StringValue + } + if pointer { + return unmarshalStringPtr + } + if slice { + return unmarshalStringSlice + } + return unmarshalStringValue + case reflect.Struct: + // message or group field + if !pointer { + panic(fmt.Sprintf("message/group field %s:%s without pointer", t, encoding)) + } + switch encoding { + case "bytes": + if slice { + return makeUnmarshalMessageSlicePtr(getUnmarshalInfo(t), name) + } + return makeUnmarshalMessagePtr(getUnmarshalInfo(t), name) + case "group": + if slice { + return makeUnmarshalGroupSlicePtr(getUnmarshalInfo(t), name) + } + return makeUnmarshalGroupPtr(getUnmarshalInfo(t), name) + } + } + panic(fmt.Sprintf("unmarshaler not found type:%s encoding:%s", t, encoding)) +} + +// Below are all the unmarshalers for individual fields of various types. + +func unmarshalInt64Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int64(x) + *f.toInt64() = v + return b, nil +} + +func unmarshalInt64Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int64(x) + *f.toInt64Ptr() = &v + return b, nil +} + +func unmarshalInt64Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + x, n = decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int64(x) + s := f.toInt64Slice() + *s = append(*s, v) + } + return res, nil + } + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int64(x) + s := f.toInt64Slice() + *s = append(*s, v) + return b, nil +} + +func unmarshalSint64Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int64(x>>1) ^ int64(x)<<63>>63 + *f.toInt64() = v + return b, nil +} + +func unmarshalSint64Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int64(x>>1) ^ int64(x)<<63>>63 + *f.toInt64Ptr() = &v + return b, nil +} + +func unmarshalSint64Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + x, n = decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int64(x>>1) ^ int64(x)<<63>>63 + s := f.toInt64Slice() + *s = append(*s, v) + } + return res, nil + } + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int64(x>>1) ^ int64(x)<<63>>63 + s := f.toInt64Slice() + *s = append(*s, v) + return b, nil +} + +func unmarshalUint64Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := uint64(x) + *f.toUint64() = v + return b, nil +} + +func unmarshalUint64Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := uint64(x) + *f.toUint64Ptr() = &v + return b, nil +} + +func unmarshalUint64Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + x, n = decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := uint64(x) + s := f.toUint64Slice() + *s = append(*s, v) + } + return res, nil + } + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := uint64(x) + s := f.toUint64Slice() + *s = append(*s, v) + return b, nil +} + +func unmarshalInt32Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int32(x) + *f.toInt32() = v + return b, nil +} + +func unmarshalInt32Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int32(x) + f.setInt32Ptr(v) + return b, nil +} + +func unmarshalInt32Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + x, n = decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int32(x) + f.appendInt32Slice(v) + } + return res, nil + } + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int32(x) + f.appendInt32Slice(v) + return b, nil +} + +func unmarshalSint32Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int32(x>>1) ^ int32(x)<<31>>31 + *f.toInt32() = v + return b, nil +} + +func unmarshalSint32Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int32(x>>1) ^ int32(x)<<31>>31 + f.setInt32Ptr(v) + return b, nil +} + +func unmarshalSint32Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + x, n = decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int32(x>>1) ^ int32(x)<<31>>31 + f.appendInt32Slice(v) + } + return res, nil + } + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int32(x>>1) ^ int32(x)<<31>>31 + f.appendInt32Slice(v) + return b, nil +} + +func unmarshalUint32Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := uint32(x) + *f.toUint32() = v + return b, nil +} + +func unmarshalUint32Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := uint32(x) + *f.toUint32Ptr() = &v + return b, nil +} + +func unmarshalUint32Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + x, n = decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := uint32(x) + s := f.toUint32Slice() + *s = append(*s, v) + } + return res, nil + } + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := uint32(x) + s := f.toUint32Slice() + *s = append(*s, v) + return b, nil +} + +func unmarshalFixed64Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed64 { + return b, errInternalBadWireType + } + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56 + *f.toUint64() = v + return b[8:], nil +} + +func unmarshalFixed64Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed64 { + return b, errInternalBadWireType + } + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56 + *f.toUint64Ptr() = &v + return b[8:], nil +} + +func unmarshalFixed64Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56 + s := f.toUint64Slice() + *s = append(*s, v) + b = b[8:] + } + return res, nil + } + if w != WireFixed64 { + return b, errInternalBadWireType + } + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56 + s := f.toUint64Slice() + *s = append(*s, v) + return b[8:], nil +} + +func unmarshalFixedS64Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed64 { + return b, errInternalBadWireType + } + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := int64(b[0]) | int64(b[1])<<8 | int64(b[2])<<16 | int64(b[3])<<24 | int64(b[4])<<32 | int64(b[5])<<40 | int64(b[6])<<48 | int64(b[7])<<56 + *f.toInt64() = v + return b[8:], nil +} + +func unmarshalFixedS64Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed64 { + return b, errInternalBadWireType + } + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := int64(b[0]) | int64(b[1])<<8 | int64(b[2])<<16 | int64(b[3])<<24 | int64(b[4])<<32 | int64(b[5])<<40 | int64(b[6])<<48 | int64(b[7])<<56 + *f.toInt64Ptr() = &v + return b[8:], nil +} + +func unmarshalFixedS64Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := int64(b[0]) | int64(b[1])<<8 | int64(b[2])<<16 | int64(b[3])<<24 | int64(b[4])<<32 | int64(b[5])<<40 | int64(b[6])<<48 | int64(b[7])<<56 + s := f.toInt64Slice() + *s = append(*s, v) + b = b[8:] + } + return res, nil + } + if w != WireFixed64 { + return b, errInternalBadWireType + } + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := int64(b[0]) | int64(b[1])<<8 | int64(b[2])<<16 | int64(b[3])<<24 | int64(b[4])<<32 | int64(b[5])<<40 | int64(b[6])<<48 | int64(b[7])<<56 + s := f.toInt64Slice() + *s = append(*s, v) + return b[8:], nil +} + +func unmarshalFixed32Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed32 { + return b, errInternalBadWireType + } + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24 + *f.toUint32() = v + return b[4:], nil +} + +func unmarshalFixed32Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed32 { + return b, errInternalBadWireType + } + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24 + *f.toUint32Ptr() = &v + return b[4:], nil +} + +func unmarshalFixed32Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24 + s := f.toUint32Slice() + *s = append(*s, v) + b = b[4:] + } + return res, nil + } + if w != WireFixed32 { + return b, errInternalBadWireType + } + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24 + s := f.toUint32Slice() + *s = append(*s, v) + return b[4:], nil +} + +func unmarshalFixedS32Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed32 { + return b, errInternalBadWireType + } + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := int32(b[0]) | int32(b[1])<<8 | int32(b[2])<<16 | int32(b[3])<<24 + *f.toInt32() = v + return b[4:], nil +} + +func unmarshalFixedS32Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed32 { + return b, errInternalBadWireType + } + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := int32(b[0]) | int32(b[1])<<8 | int32(b[2])<<16 | int32(b[3])<<24 + f.setInt32Ptr(v) + return b[4:], nil +} + +func unmarshalFixedS32Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := int32(b[0]) | int32(b[1])<<8 | int32(b[2])<<16 | int32(b[3])<<24 + f.appendInt32Slice(v) + b = b[4:] + } + return res, nil + } + if w != WireFixed32 { + return b, errInternalBadWireType + } + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := int32(b[0]) | int32(b[1])<<8 | int32(b[2])<<16 | int32(b[3])<<24 + f.appendInt32Slice(v) + return b[4:], nil +} + +func unmarshalBoolValue(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + // Note: any length varint is allowed, even though any sane + // encoder will use one byte. + // See https://github.com/golang/protobuf/issues/76 + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + // TODO: check if x>1? Tests seem to indicate no. + v := x != 0 + *f.toBool() = v + return b[n:], nil +} + +func unmarshalBoolPtr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + v := x != 0 + *f.toBoolPtr() = &v + return b[n:], nil +} + +func unmarshalBoolSlice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + x, n = decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + v := x != 0 + s := f.toBoolSlice() + *s = append(*s, v) + b = b[n:] + } + return res, nil + } + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + v := x != 0 + s := f.toBoolSlice() + *s = append(*s, v) + return b[n:], nil +} + +func unmarshalFloat64Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed64 { + return b, errInternalBadWireType + } + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := math.Float64frombits(uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56) + *f.toFloat64() = v + return b[8:], nil +} + +func unmarshalFloat64Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed64 { + return b, errInternalBadWireType + } + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := math.Float64frombits(uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56) + *f.toFloat64Ptr() = &v + return b[8:], nil +} + +func unmarshalFloat64Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := math.Float64frombits(uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56) + s := f.toFloat64Slice() + *s = append(*s, v) + b = b[8:] + } + return res, nil + } + if w != WireFixed64 { + return b, errInternalBadWireType + } + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := math.Float64frombits(uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56) + s := f.toFloat64Slice() + *s = append(*s, v) + return b[8:], nil +} + +func unmarshalFloat32Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed32 { + return b, errInternalBadWireType + } + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := math.Float32frombits(uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24) + *f.toFloat32() = v + return b[4:], nil +} + +func unmarshalFloat32Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed32 { + return b, errInternalBadWireType + } + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := math.Float32frombits(uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24) + *f.toFloat32Ptr() = &v + return b[4:], nil +} + +func unmarshalFloat32Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := math.Float32frombits(uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24) + s := f.toFloat32Slice() + *s = append(*s, v) + b = b[4:] + } + return res, nil + } + if w != WireFixed32 { + return b, errInternalBadWireType + } + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := math.Float32frombits(uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24) + s := f.toFloat32Slice() + *s = append(*s, v) + return b[4:], nil +} + +func unmarshalStringValue(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := string(b[:x]) + *f.toString() = v + return b[x:], nil +} + +func unmarshalStringPtr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := string(b[:x]) + *f.toStringPtr() = &v + return b[x:], nil +} + +func unmarshalStringSlice(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := string(b[:x]) + s := f.toStringSlice() + *s = append(*s, v) + return b[x:], nil +} + +func unmarshalUTF8StringValue(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := string(b[:x]) + *f.toString() = v + if !utf8.ValidString(v) { + return b[x:], errInvalidUTF8 + } + return b[x:], nil +} + +func unmarshalUTF8StringPtr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := string(b[:x]) + *f.toStringPtr() = &v + if !utf8.ValidString(v) { + return b[x:], errInvalidUTF8 + } + return b[x:], nil +} + +func unmarshalUTF8StringSlice(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := string(b[:x]) + s := f.toStringSlice() + *s = append(*s, v) + if !utf8.ValidString(v) { + return b[x:], errInvalidUTF8 + } + return b[x:], nil +} + +var emptyBuf [0]byte + +func unmarshalBytesValue(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + // The use of append here is a trick which avoids the zeroing + // that would be required if we used a make/copy pair. + // We append to emptyBuf instead of nil because we want + // a non-nil result even when the length is 0. + v := append(emptyBuf[:], b[:x]...) + *f.toBytes() = v + return b[x:], nil +} + +func unmarshalBytesSlice(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := append(emptyBuf[:], b[:x]...) + s := f.toBytesSlice() + *s = append(*s, v) + return b[x:], nil +} + +func makeUnmarshalMessagePtr(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + // First read the message field to see if something is there. + // The semantics of multiple submessages are weird. Instead of + // the last one winning (as it is for all other fields), multiple + // submessages are merged. + v := f.getPointer() + if v.isNil() { + v = valToPointer(reflect.New(sub.typ)) + f.setPointer(v) + } + err := sub.unmarshal(v, b[:x]) + if err != nil { + if r, ok := err.(*RequiredNotSetError); ok { + r.field = name + "." + r.field + } else { + return nil, err + } + } + return b[x:], err + } +} + +func makeUnmarshalMessageSlicePtr(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := valToPointer(reflect.New(sub.typ)) + err := sub.unmarshal(v, b[:x]) + if err != nil { + if r, ok := err.(*RequiredNotSetError); ok { + r.field = name + "." + r.field + } else { + return nil, err + } + } + f.appendPointer(v) + return b[x:], err + } +} + +func makeUnmarshalGroupPtr(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireStartGroup { + return b, errInternalBadWireType + } + x, y := findEndGroup(b) + if x < 0 { + return nil, io.ErrUnexpectedEOF + } + v := f.getPointer() + if v.isNil() { + v = valToPointer(reflect.New(sub.typ)) + f.setPointer(v) + } + err := sub.unmarshal(v, b[:x]) + if err != nil { + if r, ok := err.(*RequiredNotSetError); ok { + r.field = name + "." + r.field + } else { + return nil, err + } + } + return b[y:], err + } +} + +func makeUnmarshalGroupSlicePtr(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireStartGroup { + return b, errInternalBadWireType + } + x, y := findEndGroup(b) + if x < 0 { + return nil, io.ErrUnexpectedEOF + } + v := valToPointer(reflect.New(sub.typ)) + err := sub.unmarshal(v, b[:x]) + if err != nil { + if r, ok := err.(*RequiredNotSetError); ok { + r.field = name + "." + r.field + } else { + return nil, err + } + } + f.appendPointer(v) + return b[y:], err + } +} + +func makeUnmarshalMap(f *reflect.StructField) unmarshaler { + t := f.Type + kt := t.Key() + vt := t.Elem() + unmarshalKey := typeUnmarshaler(kt, f.Tag.Get("protobuf_key")) + unmarshalVal := typeUnmarshaler(vt, f.Tag.Get("protobuf_val")) + return func(b []byte, f pointer, w int) ([]byte, error) { + // The map entry is a submessage. Figure out how big it is. + if w != WireBytes { + return nil, fmt.Errorf("proto: bad wiretype for map field: got %d want %d", w, WireBytes) + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + r := b[x:] // unused data to return + b = b[:x] // data for map entry + + // Note: we could use #keys * #values ~= 200 functions + // to do map decoding without reflection. Probably not worth it. + // Maps will be somewhat slow. Oh well. + + // Read key and value from data. + var nerr nonFatal + k := reflect.New(kt) + v := reflect.New(vt) + for len(b) > 0 { + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + wire := int(x) & 7 + b = b[n:] + + var err error + switch x >> 3 { + case 1: + b, err = unmarshalKey(b, valToPointer(k), wire) + case 2: + b, err = unmarshalVal(b, valToPointer(v), wire) + default: + err = errInternalBadWireType // skip unknown tag + } + + if nerr.Merge(err) { + continue + } + if err != errInternalBadWireType { + return nil, err + } + + // Skip past unknown fields. + b, err = skipField(b, wire) + if err != nil { + return nil, err + } + } + + // Get map, allocate if needed. + m := f.asPointerTo(t).Elem() // an addressable map[K]T + if m.IsNil() { + m.Set(reflect.MakeMap(t)) + } + + // Insert into map. + m.SetMapIndex(k.Elem(), v.Elem()) + + return r, nerr.E + } +} + +// makeUnmarshalOneof makes an unmarshaler for oneof fields. +// for: +// message Msg { +// oneof F { +// int64 X = 1; +// float64 Y = 2; +// } +// } +// typ is the type of the concrete entry for a oneof case (e.g. Msg_X). +// ityp is the interface type of the oneof field (e.g. isMsg_F). +// unmarshal is the unmarshaler for the base type of the oneof case (e.g. int64). +// Note that this function will be called once for each case in the oneof. +func makeUnmarshalOneof(typ, ityp reflect.Type, unmarshal unmarshaler) unmarshaler { + sf := typ.Field(0) + field0 := toField(&sf) + return func(b []byte, f pointer, w int) ([]byte, error) { + // Allocate holder for value. + v := reflect.New(typ) + + // Unmarshal data into holder. + // We unmarshal into the first field of the holder object. + var err error + var nerr nonFatal + b, err = unmarshal(b, valToPointer(v).offset(field0), w) + if !nerr.Merge(err) { + return nil, err + } + + // Write pointer to holder into target field. + f.asPointerTo(ityp).Elem().Set(v) + + return b, nerr.E + } +} + +// Error used by decode internally. +var errInternalBadWireType = errors.New("proto: internal error: bad wiretype") + +// skipField skips past a field of type wire and returns the remaining bytes. +func skipField(b []byte, wire int) ([]byte, error) { + switch wire { + case WireVarint: + _, k := decodeVarint(b) + if k == 0 { + return b, io.ErrUnexpectedEOF + } + b = b[k:] + case WireFixed32: + if len(b) < 4 { + return b, io.ErrUnexpectedEOF + } + b = b[4:] + case WireFixed64: + if len(b) < 8 { + return b, io.ErrUnexpectedEOF + } + b = b[8:] + case WireBytes: + m, k := decodeVarint(b) + if k == 0 || uint64(len(b)-k) < m { + return b, io.ErrUnexpectedEOF + } + b = b[uint64(k)+m:] + case WireStartGroup: + _, i := findEndGroup(b) + if i == -1 { + return b, io.ErrUnexpectedEOF + } + b = b[i:] + default: + return b, fmt.Errorf("proto: can't skip unknown wire type %d", wire) + } + return b, nil +} + +// findEndGroup finds the index of the next EndGroup tag. +// Groups may be nested, so the "next" EndGroup tag is the first +// unpaired EndGroup. +// findEndGroup returns the indexes of the start and end of the EndGroup tag. +// Returns (-1,-1) if it can't find one. +func findEndGroup(b []byte) (int, int) { + depth := 1 + i := 0 + for { + x, n := decodeVarint(b[i:]) + if n == 0 { + return -1, -1 + } + j := i + i += n + switch x & 7 { + case WireVarint: + _, k := decodeVarint(b[i:]) + if k == 0 { + return -1, -1 + } + i += k + case WireFixed32: + if len(b)-4 < i { + return -1, -1 + } + i += 4 + case WireFixed64: + if len(b)-8 < i { + return -1, -1 + } + i += 8 + case WireBytes: + m, k := decodeVarint(b[i:]) + if k == 0 { + return -1, -1 + } + i += k + if uint64(len(b)-i) < m { + return -1, -1 + } + i += int(m) + case WireStartGroup: + depth++ + case WireEndGroup: + depth-- + if depth == 0 { + return j, i + } + default: + return -1, -1 + } + } +} + +// encodeVarint appends a varint-encoded integer to b and returns the result. +func encodeVarint(b []byte, x uint64) []byte { + for x >= 1<<7 { + b = append(b, byte(x&0x7f|0x80)) + x >>= 7 + } + return append(b, byte(x)) +} + +// decodeVarint reads a varint-encoded integer from b. +// Returns the decoded integer and the number of bytes read. +// If there is an error, it returns 0,0. +func decodeVarint(b []byte) (uint64, int) { + var x, y uint64 + if len(b) == 0 { + goto bad + } + x = uint64(b[0]) + if x < 0x80 { + return x, 1 + } + x -= 0x80 + + if len(b) <= 1 { + goto bad + } + y = uint64(b[1]) + x += y << 7 + if y < 0x80 { + return x, 2 + } + x -= 0x80 << 7 + + if len(b) <= 2 { + goto bad + } + y = uint64(b[2]) + x += y << 14 + if y < 0x80 { + return x, 3 + } + x -= 0x80 << 14 + + if len(b) <= 3 { + goto bad + } + y = uint64(b[3]) + x += y << 21 + if y < 0x80 { + return x, 4 + } + x -= 0x80 << 21 + + if len(b) <= 4 { + goto bad + } + y = uint64(b[4]) + x += y << 28 + if y < 0x80 { + return x, 5 + } + x -= 0x80 << 28 + + if len(b) <= 5 { + goto bad + } + y = uint64(b[5]) + x += y << 35 + if y < 0x80 { + return x, 6 + } + x -= 0x80 << 35 + + if len(b) <= 6 { + goto bad + } + y = uint64(b[6]) + x += y << 42 + if y < 0x80 { + return x, 7 + } + x -= 0x80 << 42 + + if len(b) <= 7 { + goto bad + } + y = uint64(b[7]) + x += y << 49 + if y < 0x80 { + return x, 8 + } + x -= 0x80 << 49 + + if len(b) <= 8 { + goto bad + } + y = uint64(b[8]) + x += y << 56 + if y < 0x80 { + return x, 9 + } + x -= 0x80 << 56 + + if len(b) <= 9 { + goto bad + } + y = uint64(b[9]) + x += y << 63 + if y < 2 { + return x, 10 + } + +bad: + return 0, 0 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/text.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/text.go new file mode 100644 index 000000000..1aaee725b --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/text.go @@ -0,0 +1,843 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +// Functions for writing the text protocol buffer format. + +import ( + "bufio" + "bytes" + "encoding" + "errors" + "fmt" + "io" + "log" + "math" + "reflect" + "sort" + "strings" +) + +var ( + newline = []byte("\n") + spaces = []byte(" ") + endBraceNewline = []byte("}\n") + backslashN = []byte{'\\', 'n'} + backslashR = []byte{'\\', 'r'} + backslashT = []byte{'\\', 't'} + backslashDQ = []byte{'\\', '"'} + backslashBS = []byte{'\\', '\\'} + posInf = []byte("inf") + negInf = []byte("-inf") + nan = []byte("nan") +) + +type writer interface { + io.Writer + WriteByte(byte) error +} + +// textWriter is an io.Writer that tracks its indentation level. +type textWriter struct { + ind int + complete bool // if the current position is a complete line + compact bool // whether to write out as a one-liner + w writer +} + +func (w *textWriter) WriteString(s string) (n int, err error) { + if !strings.Contains(s, "\n") { + if !w.compact && w.complete { + w.writeIndent() + } + w.complete = false + return io.WriteString(w.w, s) + } + // WriteString is typically called without newlines, so this + // codepath and its copy are rare. We copy to avoid + // duplicating all of Write's logic here. + return w.Write([]byte(s)) +} + +func (w *textWriter) Write(p []byte) (n int, err error) { + newlines := bytes.Count(p, newline) + if newlines == 0 { + if !w.compact && w.complete { + w.writeIndent() + } + n, err = w.w.Write(p) + w.complete = false + return n, err + } + + frags := bytes.SplitN(p, newline, newlines+1) + if w.compact { + for i, frag := range frags { + if i > 0 { + if err := w.w.WriteByte(' '); err != nil { + return n, err + } + n++ + } + nn, err := w.w.Write(frag) + n += nn + if err != nil { + return n, err + } + } + return n, nil + } + + for i, frag := range frags { + if w.complete { + w.writeIndent() + } + nn, err := w.w.Write(frag) + n += nn + if err != nil { + return n, err + } + if i+1 < len(frags) { + if err := w.w.WriteByte('\n'); err != nil { + return n, err + } + n++ + } + } + w.complete = len(frags[len(frags)-1]) == 0 + return n, nil +} + +func (w *textWriter) WriteByte(c byte) error { + if w.compact && c == '\n' { + c = ' ' + } + if !w.compact && w.complete { + w.writeIndent() + } + err := w.w.WriteByte(c) + w.complete = c == '\n' + return err +} + +func (w *textWriter) indent() { w.ind++ } + +func (w *textWriter) unindent() { + if w.ind == 0 { + log.Print("proto: textWriter unindented too far") + return + } + w.ind-- +} + +func writeName(w *textWriter, props *Properties) error { + if _, err := w.WriteString(props.OrigName); err != nil { + return err + } + if props.Wire != "group" { + return w.WriteByte(':') + } + return nil +} + +func requiresQuotes(u string) bool { + // When type URL contains any characters except [0-9A-Za-z./\-]*, it must be quoted. + for _, ch := range u { + switch { + case ch == '.' || ch == '/' || ch == '_': + continue + case '0' <= ch && ch <= '9': + continue + case 'A' <= ch && ch <= 'Z': + continue + case 'a' <= ch && ch <= 'z': + continue + default: + return true + } + } + return false +} + +// isAny reports whether sv is a google.protobuf.Any message +func isAny(sv reflect.Value) bool { + type wkt interface { + XXX_WellKnownType() string + } + t, ok := sv.Addr().Interface().(wkt) + return ok && t.XXX_WellKnownType() == "Any" +} + +// writeProto3Any writes an expanded google.protobuf.Any message. +// +// It returns (false, nil) if sv value can't be unmarshaled (e.g. because +// required messages are not linked in). +// +// It returns (true, error) when sv was written in expanded format or an error +// was encountered. +func (tm *TextMarshaler) writeProto3Any(w *textWriter, sv reflect.Value) (bool, error) { + turl := sv.FieldByName("TypeUrl") + val := sv.FieldByName("Value") + if !turl.IsValid() || !val.IsValid() { + return true, errors.New("proto: invalid google.protobuf.Any message") + } + + b, ok := val.Interface().([]byte) + if !ok { + return true, errors.New("proto: invalid google.protobuf.Any message") + } + + parts := strings.Split(turl.String(), "/") + mt := MessageType(parts[len(parts)-1]) + if mt == nil { + return false, nil + } + m := reflect.New(mt.Elem()) + if err := Unmarshal(b, m.Interface().(Message)); err != nil { + return false, nil + } + w.Write([]byte("[")) + u := turl.String() + if requiresQuotes(u) { + writeString(w, u) + } else { + w.Write([]byte(u)) + } + if w.compact { + w.Write([]byte("]:<")) + } else { + w.Write([]byte("]: <\n")) + w.ind++ + } + if err := tm.writeStruct(w, m.Elem()); err != nil { + return true, err + } + if w.compact { + w.Write([]byte("> ")) + } else { + w.ind-- + w.Write([]byte(">\n")) + } + return true, nil +} + +func (tm *TextMarshaler) writeStruct(w *textWriter, sv reflect.Value) error { + if tm.ExpandAny && isAny(sv) { + if canExpand, err := tm.writeProto3Any(w, sv); canExpand { + return err + } + } + st := sv.Type() + sprops := GetProperties(st) + for i := 0; i < sv.NumField(); i++ { + fv := sv.Field(i) + props := sprops.Prop[i] + name := st.Field(i).Name + + if name == "XXX_NoUnkeyedLiteral" { + continue + } + + if strings.HasPrefix(name, "XXX_") { + // There are two XXX_ fields: + // XXX_unrecognized []byte + // XXX_extensions map[int32]proto.Extension + // The first is handled here; + // the second is handled at the bottom of this function. + if name == "XXX_unrecognized" && !fv.IsNil() { + if err := writeUnknownStruct(w, fv.Interface().([]byte)); err != nil { + return err + } + } + continue + } + if fv.Kind() == reflect.Ptr && fv.IsNil() { + // Field not filled in. This could be an optional field or + // a required field that wasn't filled in. Either way, there + // isn't anything we can show for it. + continue + } + if fv.Kind() == reflect.Slice && fv.IsNil() { + // Repeated field that is empty, or a bytes field that is unused. + continue + } + + if props.Repeated && fv.Kind() == reflect.Slice { + // Repeated field. + for j := 0; j < fv.Len(); j++ { + if err := writeName(w, props); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte(' '); err != nil { + return err + } + } + v := fv.Index(j) + if v.Kind() == reflect.Ptr && v.IsNil() { + // A nil message in a repeated field is not valid, + // but we can handle that more gracefully than panicking. + if _, err := w.Write([]byte("\n")); err != nil { + return err + } + continue + } + if err := tm.writeAny(w, v, props); err != nil { + return err + } + if err := w.WriteByte('\n'); err != nil { + return err + } + } + continue + } + if fv.Kind() == reflect.Map { + // Map fields are rendered as a repeated struct with key/value fields. + keys := fv.MapKeys() + sort.Sort(mapKeys(keys)) + for _, key := range keys { + val := fv.MapIndex(key) + if err := writeName(w, props); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte(' '); err != nil { + return err + } + } + // open struct + if err := w.WriteByte('<'); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte('\n'); err != nil { + return err + } + } + w.indent() + // key + if _, err := w.WriteString("key:"); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte(' '); err != nil { + return err + } + } + if err := tm.writeAny(w, key, props.MapKeyProp); err != nil { + return err + } + if err := w.WriteByte('\n'); err != nil { + return err + } + // nil values aren't legal, but we can avoid panicking because of them. + if val.Kind() != reflect.Ptr || !val.IsNil() { + // value + if _, err := w.WriteString("value:"); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte(' '); err != nil { + return err + } + } + if err := tm.writeAny(w, val, props.MapValProp); err != nil { + return err + } + if err := w.WriteByte('\n'); err != nil { + return err + } + } + // close struct + w.unindent() + if err := w.WriteByte('>'); err != nil { + return err + } + if err := w.WriteByte('\n'); err != nil { + return err + } + } + continue + } + if props.proto3 && fv.Kind() == reflect.Slice && fv.Len() == 0 { + // empty bytes field + continue + } + if fv.Kind() != reflect.Ptr && fv.Kind() != reflect.Slice { + // proto3 non-repeated scalar field; skip if zero value + if isProto3Zero(fv) { + continue + } + } + + if fv.Kind() == reflect.Interface { + // Check if it is a oneof. + if st.Field(i).Tag.Get("protobuf_oneof") != "" { + // fv is nil, or holds a pointer to generated struct. + // That generated struct has exactly one field, + // which has a protobuf struct tag. + if fv.IsNil() { + continue + } + inner := fv.Elem().Elem() // interface -> *T -> T + tag := inner.Type().Field(0).Tag.Get("protobuf") + props = new(Properties) // Overwrite the outer props var, but not its pointee. + props.Parse(tag) + // Write the value in the oneof, not the oneof itself. + fv = inner.Field(0) + + // Special case to cope with malformed messages gracefully: + // If the value in the oneof is a nil pointer, don't panic + // in writeAny. + if fv.Kind() == reflect.Ptr && fv.IsNil() { + // Use errors.New so writeAny won't render quotes. + msg := errors.New("/* nil */") + fv = reflect.ValueOf(&msg).Elem() + } + } + } + + if err := writeName(w, props); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte(' '); err != nil { + return err + } + } + + // Enums have a String method, so writeAny will work fine. + if err := tm.writeAny(w, fv, props); err != nil { + return err + } + + if err := w.WriteByte('\n'); err != nil { + return err + } + } + + // Extensions (the XXX_extensions field). + pv := sv.Addr() + if _, err := extendable(pv.Interface()); err == nil { + if err := tm.writeExtensions(w, pv); err != nil { + return err + } + } + + return nil +} + +// writeAny writes an arbitrary field. +func (tm *TextMarshaler) writeAny(w *textWriter, v reflect.Value, props *Properties) error { + v = reflect.Indirect(v) + + // Floats have special cases. + if v.Kind() == reflect.Float32 || v.Kind() == reflect.Float64 { + x := v.Float() + var b []byte + switch { + case math.IsInf(x, 1): + b = posInf + case math.IsInf(x, -1): + b = negInf + case math.IsNaN(x): + b = nan + } + if b != nil { + _, err := w.Write(b) + return err + } + // Other values are handled below. + } + + // We don't attempt to serialise every possible value type; only those + // that can occur in protocol buffers. + switch v.Kind() { + case reflect.Slice: + // Should only be a []byte; repeated fields are handled in writeStruct. + if err := writeString(w, string(v.Bytes())); err != nil { + return err + } + case reflect.String: + if err := writeString(w, v.String()); err != nil { + return err + } + case reflect.Struct: + // Required/optional group/message. + var bra, ket byte = '<', '>' + if props != nil && props.Wire == "group" { + bra, ket = '{', '}' + } + if err := w.WriteByte(bra); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte('\n'); err != nil { + return err + } + } + w.indent() + if v.CanAddr() { + // Calling v.Interface on a struct causes the reflect package to + // copy the entire struct. This is racy with the new Marshaler + // since we atomically update the XXX_sizecache. + // + // Thus, we retrieve a pointer to the struct if possible to avoid + // a race since v.Interface on the pointer doesn't copy the struct. + // + // If v is not addressable, then we are not worried about a race + // since it implies that the binary Marshaler cannot possibly be + // mutating this value. + v = v.Addr() + } + if etm, ok := v.Interface().(encoding.TextMarshaler); ok { + text, err := etm.MarshalText() + if err != nil { + return err + } + if _, err = w.Write(text); err != nil { + return err + } + } else { + if v.Kind() == reflect.Ptr { + v = v.Elem() + } + if err := tm.writeStruct(w, v); err != nil { + return err + } + } + w.unindent() + if err := w.WriteByte(ket); err != nil { + return err + } + default: + _, err := fmt.Fprint(w, v.Interface()) + return err + } + return nil +} + +// equivalent to C's isprint. +func isprint(c byte) bool { + return c >= 0x20 && c < 0x7f +} + +// writeString writes a string in the protocol buffer text format. +// It is similar to strconv.Quote except we don't use Go escape sequences, +// we treat the string as a byte sequence, and we use octal escapes. +// These differences are to maintain interoperability with the other +// languages' implementations of the text format. +func writeString(w *textWriter, s string) error { + // use WriteByte here to get any needed indent + if err := w.WriteByte('"'); err != nil { + return err + } + // Loop over the bytes, not the runes. + for i := 0; i < len(s); i++ { + var err error + // Divergence from C++: we don't escape apostrophes. + // There's no need to escape them, and the C++ parser + // copes with a naked apostrophe. + switch c := s[i]; c { + case '\n': + _, err = w.w.Write(backslashN) + case '\r': + _, err = w.w.Write(backslashR) + case '\t': + _, err = w.w.Write(backslashT) + case '"': + _, err = w.w.Write(backslashDQ) + case '\\': + _, err = w.w.Write(backslashBS) + default: + if isprint(c) { + err = w.w.WriteByte(c) + } else { + _, err = fmt.Fprintf(w.w, "\\%03o", c) + } + } + if err != nil { + return err + } + } + return w.WriteByte('"') +} + +func writeUnknownStruct(w *textWriter, data []byte) (err error) { + if !w.compact { + if _, err := fmt.Fprintf(w, "/* %d unknown bytes */\n", len(data)); err != nil { + return err + } + } + b := NewBuffer(data) + for b.index < len(b.buf) { + x, err := b.DecodeVarint() + if err != nil { + _, err := fmt.Fprintf(w, "/* %v */\n", err) + return err + } + wire, tag := x&7, x>>3 + if wire == WireEndGroup { + w.unindent() + if _, err := w.Write(endBraceNewline); err != nil { + return err + } + continue + } + if _, err := fmt.Fprint(w, tag); err != nil { + return err + } + if wire != WireStartGroup { + if err := w.WriteByte(':'); err != nil { + return err + } + } + if !w.compact || wire == WireStartGroup { + if err := w.WriteByte(' '); err != nil { + return err + } + } + switch wire { + case WireBytes: + buf, e := b.DecodeRawBytes(false) + if e == nil { + _, err = fmt.Fprintf(w, "%q", buf) + } else { + _, err = fmt.Fprintf(w, "/* %v */", e) + } + case WireFixed32: + x, err = b.DecodeFixed32() + err = writeUnknownInt(w, x, err) + case WireFixed64: + x, err = b.DecodeFixed64() + err = writeUnknownInt(w, x, err) + case WireStartGroup: + err = w.WriteByte('{') + w.indent() + case WireVarint: + x, err = b.DecodeVarint() + err = writeUnknownInt(w, x, err) + default: + _, err = fmt.Fprintf(w, "/* unknown wire type %d */", wire) + } + if err != nil { + return err + } + if err = w.WriteByte('\n'); err != nil { + return err + } + } + return nil +} + +func writeUnknownInt(w *textWriter, x uint64, err error) error { + if err == nil { + _, err = fmt.Fprint(w, x) + } else { + _, err = fmt.Fprintf(w, "/* %v */", err) + } + return err +} + +type int32Slice []int32 + +func (s int32Slice) Len() int { return len(s) } +func (s int32Slice) Less(i, j int) bool { return s[i] < s[j] } +func (s int32Slice) Swap(i, j int) { s[i], s[j] = s[j], s[i] } + +// writeExtensions writes all the extensions in pv. +// pv is assumed to be a pointer to a protocol message struct that is extendable. +func (tm *TextMarshaler) writeExtensions(w *textWriter, pv reflect.Value) error { + emap := extensionMaps[pv.Type().Elem()] + ep, _ := extendable(pv.Interface()) + + // Order the extensions by ID. + // This isn't strictly necessary, but it will give us + // canonical output, which will also make testing easier. + m, mu := ep.extensionsRead() + if m == nil { + return nil + } + mu.Lock() + ids := make([]int32, 0, len(m)) + for id := range m { + ids = append(ids, id) + } + sort.Sort(int32Slice(ids)) + mu.Unlock() + + for _, extNum := range ids { + ext := m[extNum] + var desc *ExtensionDesc + if emap != nil { + desc = emap[extNum] + } + if desc == nil { + // Unknown extension. + if err := writeUnknownStruct(w, ext.enc); err != nil { + return err + } + continue + } + + pb, err := GetExtension(ep, desc) + if err != nil { + return fmt.Errorf("failed getting extension: %v", err) + } + + // Repeated extensions will appear as a slice. + if !desc.repeated() { + if err := tm.writeExtension(w, desc.Name, pb); err != nil { + return err + } + } else { + v := reflect.ValueOf(pb) + for i := 0; i < v.Len(); i++ { + if err := tm.writeExtension(w, desc.Name, v.Index(i).Interface()); err != nil { + return err + } + } + } + } + return nil +} + +func (tm *TextMarshaler) writeExtension(w *textWriter, name string, pb interface{}) error { + if _, err := fmt.Fprintf(w, "[%s]:", name); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte(' '); err != nil { + return err + } + } + if err := tm.writeAny(w, reflect.ValueOf(pb), nil); err != nil { + return err + } + if err := w.WriteByte('\n'); err != nil { + return err + } + return nil +} + +func (w *textWriter) writeIndent() { + if !w.complete { + return + } + remain := w.ind * 2 + for remain > 0 { + n := remain + if n > len(spaces) { + n = len(spaces) + } + w.w.Write(spaces[:n]) + remain -= n + } + w.complete = false +} + +// TextMarshaler is a configurable text format marshaler. +type TextMarshaler struct { + Compact bool // use compact text format (one line). + ExpandAny bool // expand google.protobuf.Any messages of known types +} + +// Marshal writes a given protocol buffer in text format. +// The only errors returned are from w. +func (tm *TextMarshaler) Marshal(w io.Writer, pb Message) error { + val := reflect.ValueOf(pb) + if pb == nil || val.IsNil() { + w.Write([]byte("")) + return nil + } + var bw *bufio.Writer + ww, ok := w.(writer) + if !ok { + bw = bufio.NewWriter(w) + ww = bw + } + aw := &textWriter{ + w: ww, + complete: true, + compact: tm.Compact, + } + + if etm, ok := pb.(encoding.TextMarshaler); ok { + text, err := etm.MarshalText() + if err != nil { + return err + } + if _, err = aw.Write(text); err != nil { + return err + } + if bw != nil { + return bw.Flush() + } + return nil + } + // Dereference the received pointer so we don't have outer < and >. + v := reflect.Indirect(val) + if err := tm.writeStruct(aw, v); err != nil { + return err + } + if bw != nil { + return bw.Flush() + } + return nil +} + +// Text is the same as Marshal, but returns the string directly. +func (tm *TextMarshaler) Text(pb Message) string { + var buf bytes.Buffer + tm.Marshal(&buf, pb) + return buf.String() +} + +var ( + defaultTextMarshaler = TextMarshaler{} + compactTextMarshaler = TextMarshaler{Compact: true} +) + +// TODO: consider removing some of the Marshal functions below. + +// MarshalText writes a given protocol buffer in text format. +// The only errors returned are from w. +func MarshalText(w io.Writer, pb Message) error { return defaultTextMarshaler.Marshal(w, pb) } + +// MarshalTextString is the same as MarshalText, but returns the string directly. +func MarshalTextString(pb Message) string { return defaultTextMarshaler.Text(pb) } + +// CompactText writes a given protocol buffer in compact text format (one line). +func CompactText(w io.Writer, pb Message) error { return compactTextMarshaler.Marshal(w, pb) } + +// CompactTextString is the same as CompactText, but returns the string directly. +func CompactTextString(pb Message) string { return compactTextMarshaler.Text(pb) } diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/text_parser.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/text_parser.go new file mode 100644 index 000000000..bb55a3af2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/golang/protobuf/proto/text_parser.go @@ -0,0 +1,880 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +// Functions for parsing the Text protocol buffer format. +// TODO: message sets. + +import ( + "encoding" + "errors" + "fmt" + "reflect" + "strconv" + "strings" + "unicode/utf8" +) + +// Error string emitted when deserializing Any and fields are already set +const anyRepeatedlyUnpacked = "Any message unpacked multiple times, or %q already set" + +type ParseError struct { + Message string + Line int // 1-based line number + Offset int // 0-based byte offset from start of input +} + +func (p *ParseError) Error() string { + if p.Line == 1 { + // show offset only for first line + return fmt.Sprintf("line 1.%d: %v", p.Offset, p.Message) + } + return fmt.Sprintf("line %d: %v", p.Line, p.Message) +} + +type token struct { + value string + err *ParseError + line int // line number + offset int // byte number from start of input, not start of line + unquoted string // the unquoted version of value, if it was a quoted string +} + +func (t *token) String() string { + if t.err == nil { + return fmt.Sprintf("%q (line=%d, offset=%d)", t.value, t.line, t.offset) + } + return fmt.Sprintf("parse error: %v", t.err) +} + +type textParser struct { + s string // remaining input + done bool // whether the parsing is finished (success or error) + backed bool // whether back() was called + offset, line int + cur token +} + +func newTextParser(s string) *textParser { + p := new(textParser) + p.s = s + p.line = 1 + p.cur.line = 1 + return p +} + +func (p *textParser) errorf(format string, a ...interface{}) *ParseError { + pe := &ParseError{fmt.Sprintf(format, a...), p.cur.line, p.cur.offset} + p.cur.err = pe + p.done = true + return pe +} + +// Numbers and identifiers are matched by [-+._A-Za-z0-9] +func isIdentOrNumberChar(c byte) bool { + switch { + case 'A' <= c && c <= 'Z', 'a' <= c && c <= 'z': + return true + case '0' <= c && c <= '9': + return true + } + switch c { + case '-', '+', '.', '_': + return true + } + return false +} + +func isWhitespace(c byte) bool { + switch c { + case ' ', '\t', '\n', '\r': + return true + } + return false +} + +func isQuote(c byte) bool { + switch c { + case '"', '\'': + return true + } + return false +} + +func (p *textParser) skipWhitespace() { + i := 0 + for i < len(p.s) && (isWhitespace(p.s[i]) || p.s[i] == '#') { + if p.s[i] == '#' { + // comment; skip to end of line or input + for i < len(p.s) && p.s[i] != '\n' { + i++ + } + if i == len(p.s) { + break + } + } + if p.s[i] == '\n' { + p.line++ + } + i++ + } + p.offset += i + p.s = p.s[i:len(p.s)] + if len(p.s) == 0 { + p.done = true + } +} + +func (p *textParser) advance() { + // Skip whitespace + p.skipWhitespace() + if p.done { + return + } + + // Start of non-whitespace + p.cur.err = nil + p.cur.offset, p.cur.line = p.offset, p.line + p.cur.unquoted = "" + switch p.s[0] { + case '<', '>', '{', '}', ':', '[', ']', ';', ',', '/': + // Single symbol + p.cur.value, p.s = p.s[0:1], p.s[1:len(p.s)] + case '"', '\'': + // Quoted string + i := 1 + for i < len(p.s) && p.s[i] != p.s[0] && p.s[i] != '\n' { + if p.s[i] == '\\' && i+1 < len(p.s) { + // skip escaped char + i++ + } + i++ + } + if i >= len(p.s) || p.s[i] != p.s[0] { + p.errorf("unmatched quote") + return + } + unq, err := unquoteC(p.s[1:i], rune(p.s[0])) + if err != nil { + p.errorf("invalid quoted string %s: %v", p.s[0:i+1], err) + return + } + p.cur.value, p.s = p.s[0:i+1], p.s[i+1:len(p.s)] + p.cur.unquoted = unq + default: + i := 0 + for i < len(p.s) && isIdentOrNumberChar(p.s[i]) { + i++ + } + if i == 0 { + p.errorf("unexpected byte %#x", p.s[0]) + return + } + p.cur.value, p.s = p.s[0:i], p.s[i:len(p.s)] + } + p.offset += len(p.cur.value) +} + +var ( + errBadUTF8 = errors.New("proto: bad UTF-8") +) + +func unquoteC(s string, quote rune) (string, error) { + // This is based on C++'s tokenizer.cc. + // Despite its name, this is *not* parsing C syntax. + // For instance, "\0" is an invalid quoted string. + + // Avoid allocation in trivial cases. + simple := true + for _, r := range s { + if r == '\\' || r == quote { + simple = false + break + } + } + if simple { + return s, nil + } + + buf := make([]byte, 0, 3*len(s)/2) + for len(s) > 0 { + r, n := utf8.DecodeRuneInString(s) + if r == utf8.RuneError && n == 1 { + return "", errBadUTF8 + } + s = s[n:] + if r != '\\' { + if r < utf8.RuneSelf { + buf = append(buf, byte(r)) + } else { + buf = append(buf, string(r)...) + } + continue + } + + ch, tail, err := unescape(s) + if err != nil { + return "", err + } + buf = append(buf, ch...) + s = tail + } + return string(buf), nil +} + +func unescape(s string) (ch string, tail string, err error) { + r, n := utf8.DecodeRuneInString(s) + if r == utf8.RuneError && n == 1 { + return "", "", errBadUTF8 + } + s = s[n:] + switch r { + case 'a': + return "\a", s, nil + case 'b': + return "\b", s, nil + case 'f': + return "\f", s, nil + case 'n': + return "\n", s, nil + case 'r': + return "\r", s, nil + case 't': + return "\t", s, nil + case 'v': + return "\v", s, nil + case '?': + return "?", s, nil // trigraph workaround + case '\'', '"', '\\': + return string(r), s, nil + case '0', '1', '2', '3', '4', '5', '6', '7': + if len(s) < 2 { + return "", "", fmt.Errorf(`\%c requires 2 following digits`, r) + } + ss := string(r) + s[:2] + s = s[2:] + i, err := strconv.ParseUint(ss, 8, 8) + if err != nil { + return "", "", fmt.Errorf(`\%s contains non-octal digits`, ss) + } + return string([]byte{byte(i)}), s, nil + case 'x', 'X', 'u', 'U': + var n int + switch r { + case 'x', 'X': + n = 2 + case 'u': + n = 4 + case 'U': + n = 8 + } + if len(s) < n { + return "", "", fmt.Errorf(`\%c requires %d following digits`, r, n) + } + ss := s[:n] + s = s[n:] + i, err := strconv.ParseUint(ss, 16, 64) + if err != nil { + return "", "", fmt.Errorf(`\%c%s contains non-hexadecimal digits`, r, ss) + } + if r == 'x' || r == 'X' { + return string([]byte{byte(i)}), s, nil + } + if i > utf8.MaxRune { + return "", "", fmt.Errorf(`\%c%s is not a valid Unicode code point`, r, ss) + } + return string(i), s, nil + } + return "", "", fmt.Errorf(`unknown escape \%c`, r) +} + +// Back off the parser by one token. Can only be done between calls to next(). +// It makes the next advance() a no-op. +func (p *textParser) back() { p.backed = true } + +// Advances the parser and returns the new current token. +func (p *textParser) next() *token { + if p.backed || p.done { + p.backed = false + return &p.cur + } + p.advance() + if p.done { + p.cur.value = "" + } else if len(p.cur.value) > 0 && isQuote(p.cur.value[0]) { + // Look for multiple quoted strings separated by whitespace, + // and concatenate them. + cat := p.cur + for { + p.skipWhitespace() + if p.done || !isQuote(p.s[0]) { + break + } + p.advance() + if p.cur.err != nil { + return &p.cur + } + cat.value += " " + p.cur.value + cat.unquoted += p.cur.unquoted + } + p.done = false // parser may have seen EOF, but we want to return cat + p.cur = cat + } + return &p.cur +} + +func (p *textParser) consumeToken(s string) error { + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value != s { + p.back() + return p.errorf("expected %q, found %q", s, tok.value) + } + return nil +} + +// Return a RequiredNotSetError indicating which required field was not set. +func (p *textParser) missingRequiredFieldError(sv reflect.Value) *RequiredNotSetError { + st := sv.Type() + sprops := GetProperties(st) + for i := 0; i < st.NumField(); i++ { + if !isNil(sv.Field(i)) { + continue + } + + props := sprops.Prop[i] + if props.Required { + return &RequiredNotSetError{fmt.Sprintf("%v.%v", st, props.OrigName)} + } + } + return &RequiredNotSetError{fmt.Sprintf("%v.", st)} // should not happen +} + +// Returns the index in the struct for the named field, as well as the parsed tag properties. +func structFieldByName(sprops *StructProperties, name string) (int, *Properties, bool) { + i, ok := sprops.decoderOrigNames[name] + if ok { + return i, sprops.Prop[i], true + } + return -1, nil, false +} + +// Consume a ':' from the input stream (if the next token is a colon), +// returning an error if a colon is needed but not present. +func (p *textParser) checkForColon(props *Properties, typ reflect.Type) *ParseError { + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value != ":" { + // Colon is optional when the field is a group or message. + needColon := true + switch props.Wire { + case "group": + needColon = false + case "bytes": + // A "bytes" field is either a message, a string, or a repeated field; + // those three become *T, *string and []T respectively, so we can check for + // this field being a pointer to a non-string. + if typ.Kind() == reflect.Ptr { + // *T or *string + if typ.Elem().Kind() == reflect.String { + break + } + } else if typ.Kind() == reflect.Slice { + // []T or []*T + if typ.Elem().Kind() != reflect.Ptr { + break + } + } else if typ.Kind() == reflect.String { + // The proto3 exception is for a string field, + // which requires a colon. + break + } + needColon = false + } + if needColon { + return p.errorf("expected ':', found %q", tok.value) + } + p.back() + } + return nil +} + +func (p *textParser) readStruct(sv reflect.Value, terminator string) error { + st := sv.Type() + sprops := GetProperties(st) + reqCount := sprops.reqCount + var reqFieldErr error + fieldSet := make(map[string]bool) + // A struct is a sequence of "name: value", terminated by one of + // '>' or '}', or the end of the input. A name may also be + // "[extension]" or "[type/url]". + // + // The whole struct can also be an expanded Any message, like: + // [type/url] < ... struct contents ... > + for { + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value == terminator { + break + } + if tok.value == "[" { + // Looks like an extension or an Any. + // + // TODO: Check whether we need to handle + // namespace rooted names (e.g. ".something.Foo"). + extName, err := p.consumeExtName() + if err != nil { + return err + } + + if s := strings.LastIndex(extName, "/"); s >= 0 { + // If it contains a slash, it's an Any type URL. + messageName := extName[s+1:] + mt := MessageType(messageName) + if mt == nil { + return p.errorf("unrecognized message %q in google.protobuf.Any", messageName) + } + tok = p.next() + if tok.err != nil { + return tok.err + } + // consume an optional colon + if tok.value == ":" { + tok = p.next() + if tok.err != nil { + return tok.err + } + } + var terminator string + switch tok.value { + case "<": + terminator = ">" + case "{": + terminator = "}" + default: + return p.errorf("expected '{' or '<', found %q", tok.value) + } + v := reflect.New(mt.Elem()) + if pe := p.readStruct(v.Elem(), terminator); pe != nil { + return pe + } + b, err := Marshal(v.Interface().(Message)) + if err != nil { + return p.errorf("failed to marshal message of type %q: %v", messageName, err) + } + if fieldSet["type_url"] { + return p.errorf(anyRepeatedlyUnpacked, "type_url") + } + if fieldSet["value"] { + return p.errorf(anyRepeatedlyUnpacked, "value") + } + sv.FieldByName("TypeUrl").SetString(extName) + sv.FieldByName("Value").SetBytes(b) + fieldSet["type_url"] = true + fieldSet["value"] = true + continue + } + + var desc *ExtensionDesc + // This could be faster, but it's functional. + // TODO: Do something smarter than a linear scan. + for _, d := range RegisteredExtensions(reflect.New(st).Interface().(Message)) { + if d.Name == extName { + desc = d + break + } + } + if desc == nil { + return p.errorf("unrecognized extension %q", extName) + } + + props := &Properties{} + props.Parse(desc.Tag) + + typ := reflect.TypeOf(desc.ExtensionType) + if err := p.checkForColon(props, typ); err != nil { + return err + } + + rep := desc.repeated() + + // Read the extension structure, and set it in + // the value we're constructing. + var ext reflect.Value + if !rep { + ext = reflect.New(typ).Elem() + } else { + ext = reflect.New(typ.Elem()).Elem() + } + if err := p.readAny(ext, props); err != nil { + if _, ok := err.(*RequiredNotSetError); !ok { + return err + } + reqFieldErr = err + } + ep := sv.Addr().Interface().(Message) + if !rep { + SetExtension(ep, desc, ext.Interface()) + } else { + old, err := GetExtension(ep, desc) + var sl reflect.Value + if err == nil { + sl = reflect.ValueOf(old) // existing slice + } else { + sl = reflect.MakeSlice(typ, 0, 1) + } + sl = reflect.Append(sl, ext) + SetExtension(ep, desc, sl.Interface()) + } + if err := p.consumeOptionalSeparator(); err != nil { + return err + } + continue + } + + // This is a normal, non-extension field. + name := tok.value + var dst reflect.Value + fi, props, ok := structFieldByName(sprops, name) + if ok { + dst = sv.Field(fi) + } else if oop, ok := sprops.OneofTypes[name]; ok { + // It is a oneof. + props = oop.Prop + nv := reflect.New(oop.Type.Elem()) + dst = nv.Elem().Field(0) + field := sv.Field(oop.Field) + if !field.IsNil() { + return p.errorf("field '%s' would overwrite already parsed oneof '%s'", name, sv.Type().Field(oop.Field).Name) + } + field.Set(nv) + } + if !dst.IsValid() { + return p.errorf("unknown field name %q in %v", name, st) + } + + if dst.Kind() == reflect.Map { + // Consume any colon. + if err := p.checkForColon(props, dst.Type()); err != nil { + return err + } + + // Construct the map if it doesn't already exist. + if dst.IsNil() { + dst.Set(reflect.MakeMap(dst.Type())) + } + key := reflect.New(dst.Type().Key()).Elem() + val := reflect.New(dst.Type().Elem()).Elem() + + // The map entry should be this sequence of tokens: + // < key : KEY value : VALUE > + // However, implementations may omit key or value, and technically + // we should support them in any order. See b/28924776 for a time + // this went wrong. + + tok := p.next() + var terminator string + switch tok.value { + case "<": + terminator = ">" + case "{": + terminator = "}" + default: + return p.errorf("expected '{' or '<', found %q", tok.value) + } + for { + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value == terminator { + break + } + switch tok.value { + case "key": + if err := p.consumeToken(":"); err != nil { + return err + } + if err := p.readAny(key, props.MapKeyProp); err != nil { + return err + } + if err := p.consumeOptionalSeparator(); err != nil { + return err + } + case "value": + if err := p.checkForColon(props.MapValProp, dst.Type().Elem()); err != nil { + return err + } + if err := p.readAny(val, props.MapValProp); err != nil { + return err + } + if err := p.consumeOptionalSeparator(); err != nil { + return err + } + default: + p.back() + return p.errorf(`expected "key", "value", or %q, found %q`, terminator, tok.value) + } + } + + dst.SetMapIndex(key, val) + continue + } + + // Check that it's not already set if it's not a repeated field. + if !props.Repeated && fieldSet[name] { + return p.errorf("non-repeated field %q was repeated", name) + } + + if err := p.checkForColon(props, dst.Type()); err != nil { + return err + } + + // Parse into the field. + fieldSet[name] = true + if err := p.readAny(dst, props); err != nil { + if _, ok := err.(*RequiredNotSetError); !ok { + return err + } + reqFieldErr = err + } + if props.Required { + reqCount-- + } + + if err := p.consumeOptionalSeparator(); err != nil { + return err + } + + } + + if reqCount > 0 { + return p.missingRequiredFieldError(sv) + } + return reqFieldErr +} + +// consumeExtName consumes extension name or expanded Any type URL and the +// following ']'. It returns the name or URL consumed. +func (p *textParser) consumeExtName() (string, error) { + tok := p.next() + if tok.err != nil { + return "", tok.err + } + + // If extension name or type url is quoted, it's a single token. + if len(tok.value) > 2 && isQuote(tok.value[0]) && tok.value[len(tok.value)-1] == tok.value[0] { + name, err := unquoteC(tok.value[1:len(tok.value)-1], rune(tok.value[0])) + if err != nil { + return "", err + } + return name, p.consumeToken("]") + } + + // Consume everything up to "]" + var parts []string + for tok.value != "]" { + parts = append(parts, tok.value) + tok = p.next() + if tok.err != nil { + return "", p.errorf("unrecognized type_url or extension name: %s", tok.err) + } + if p.done && tok.value != "]" { + return "", p.errorf("unclosed type_url or extension name") + } + } + return strings.Join(parts, ""), nil +} + +// consumeOptionalSeparator consumes an optional semicolon or comma. +// It is used in readStruct to provide backward compatibility. +func (p *textParser) consumeOptionalSeparator() error { + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value != ";" && tok.value != "," { + p.back() + } + return nil +} + +func (p *textParser) readAny(v reflect.Value, props *Properties) error { + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value == "" { + return p.errorf("unexpected EOF") + } + + switch fv := v; fv.Kind() { + case reflect.Slice: + at := v.Type() + if at.Elem().Kind() == reflect.Uint8 { + // Special case for []byte + if tok.value[0] != '"' && tok.value[0] != '\'' { + // Deliberately written out here, as the error after + // this switch statement would write "invalid []byte: ...", + // which is not as user-friendly. + return p.errorf("invalid string: %v", tok.value) + } + bytes := []byte(tok.unquoted) + fv.Set(reflect.ValueOf(bytes)) + return nil + } + // Repeated field. + if tok.value == "[" { + // Repeated field with list notation, like [1,2,3]. + for { + fv.Set(reflect.Append(fv, reflect.New(at.Elem()).Elem())) + err := p.readAny(fv.Index(fv.Len()-1), props) + if err != nil { + return err + } + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value == "]" { + break + } + if tok.value != "," { + return p.errorf("Expected ']' or ',' found %q", tok.value) + } + } + return nil + } + // One value of the repeated field. + p.back() + fv.Set(reflect.Append(fv, reflect.New(at.Elem()).Elem())) + return p.readAny(fv.Index(fv.Len()-1), props) + case reflect.Bool: + // true/1/t/True or false/f/0/False. + switch tok.value { + case "true", "1", "t", "True": + fv.SetBool(true) + return nil + case "false", "0", "f", "False": + fv.SetBool(false) + return nil + } + case reflect.Float32, reflect.Float64: + v := tok.value + // Ignore 'f' for compatibility with output generated by C++, but don't + // remove 'f' when the value is "-inf" or "inf". + if strings.HasSuffix(v, "f") && tok.value != "-inf" && tok.value != "inf" { + v = v[:len(v)-1] + } + if f, err := strconv.ParseFloat(v, fv.Type().Bits()); err == nil { + fv.SetFloat(f) + return nil + } + case reflect.Int32: + if x, err := strconv.ParseInt(tok.value, 0, 32); err == nil { + fv.SetInt(x) + return nil + } + + if len(props.Enum) == 0 { + break + } + m, ok := enumValueMaps[props.Enum] + if !ok { + break + } + x, ok := m[tok.value] + if !ok { + break + } + fv.SetInt(int64(x)) + return nil + case reflect.Int64: + if x, err := strconv.ParseInt(tok.value, 0, 64); err == nil { + fv.SetInt(x) + return nil + } + + case reflect.Ptr: + // A basic field (indirected through pointer), or a repeated message/group + p.back() + fv.Set(reflect.New(fv.Type().Elem())) + return p.readAny(fv.Elem(), props) + case reflect.String: + if tok.value[0] == '"' || tok.value[0] == '\'' { + fv.SetString(tok.unquoted) + return nil + } + case reflect.Struct: + var terminator string + switch tok.value { + case "{": + terminator = "}" + case "<": + terminator = ">" + default: + return p.errorf("expected '{' or '<', found %q", tok.value) + } + // TODO: Handle nested messages which implement encoding.TextUnmarshaler. + return p.readStruct(fv, terminator) + case reflect.Uint32: + if x, err := strconv.ParseUint(tok.value, 0, 32); err == nil { + fv.SetUint(uint64(x)) + return nil + } + case reflect.Uint64: + if x, err := strconv.ParseUint(tok.value, 0, 64); err == nil { + fv.SetUint(x) + return nil + } + } + return p.errorf("invalid %v: %v", v.Type(), tok.value) +} + +// UnmarshalText reads a protocol buffer in Text format. UnmarshalText resets pb +// before starting to unmarshal, so any existing data in pb is always removed. +// If a required field is not set and no other error occurs, +// UnmarshalText returns *RequiredNotSetError. +func UnmarshalText(s string, pb Message) error { + if um, ok := pb.(encoding.TextUnmarshaler); ok { + return um.UnmarshalText([]byte(s)) + } + pb.Reset() + v := reflect.ValueOf(pb) + return newTextParser(s).readStruct(v.Elem(), "") +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/API_SUPPORT.md b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/API_SUPPORT.md new file mode 100644 index 000000000..2fd663f4f --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/API_SUPPORT.md @@ -0,0 +1,379 @@ +# API Support + +## Linodes + +- `/linode/instances` + - [x] `GET` + - [X] `POST` +- `/linode/instances/$id` + - [x] `GET` + - [X] `PUT` + - [X] `DELETE` +- `/linode/instances/$id/boot` + - [x] `POST` +- `/linode/instances/$id/clone` + - [x] `POST` +- `/linode/instances/$id/mutate` + - [X] `POST` +- `/linode/instances/$id/reboot` + - [x] `POST` +- `/linode/instances/$id/rebuild` + - [X] `POST` +- `/linode/instances/$id/rescue` + - [X] `POST` +- `/linode/instances/$id/resize` + - [x] `POST` +- `/linode/instances/$id/shutdown` + - [x] `POST` +- `/linode/instances/$id/volumes` + - [X] `GET` + +### Backups + +- `/linode/instances/$id/backups` + - [X] `GET` + - [ ] `POST` +- `/linode/instances/$id/backups/$id/restore` + - [ ] `POST` +- `/linode/instances/$id/backups/cancel` + - [ ] `POST` +- `/linode/instances/$id/backups/enable` + - [ ] `POST` + +### Configs + +- `/linode/instances/$id/configs` + - [X] `GET` + - [X] `POST` +- `/linode/instances/$id/configs/$id` + - [X] `GET` + - [X] `PUT` + - [X] `DELETE` + +### Disks + +- `/linode/instances/$id/disks` + - [X] `GET` + - [X] `POST` +- `/linode/instances/$id/disks/$id` + - [X] `GET` + - [X] `PUT` + - [X] `POST` + - [X] `DELETE` +- `/linode/instances/$id/disks/$id/password` + - [X] `POST` +- `/linode/instances/$id/disks/$id/resize` + - [X] `POST` + +### IPs + +- `/linode/instances/$id/ips` + - [ ] `GET` + - [ ] `POST` +- `/linode/instances/$id/ips/$ip_address` + - [ ] `GET` + - [ ] `PUT` + - [ ] `DELETE` +- `/linode/instances/$id/ips/sharing` + - [ ] `POST` + +### Kernels + +- `/linode/kernels` + - [X] `GET` +- `/linode/kernels/$id` + - [X] `GET` + +### StackScripts + +- `/linode/stackscripts` + - [x] `GET` + - [X] `POST` +- `/linode/stackscripts/$id` + - [x] `GET` + - [X] `PUT` + - [X] `DELETE` + +### Stats + +- `/linode/instances/$id/stats` + - [ ] `GET` +- `/linode/instances/$id/stats/$year/$month` + - [ ] `GET` + +### Types + +- `/linode/types` + - [X] `GET` +- `/linode/types/$id` + - [X] `GET` + +## Domains + +- `/domains` + - [X] `GET` + - [X] `POST` +- `/domains/$id` + - [X] `GET` + - [X] `PUT` + - [X] `DELETE` +- `/domains/$id/clone` + - [ ] `POST` +- `/domains/$id/records` + - [X] `GET` + - [X] `POST` +- `/domains/$id/records/$id` + - [X] `GET` + - [X] `PUT` + - [X] `DELETE` + +## Longview + +- `/longview/clients` + - [X] `GET` + - [ ] `POST` +- `/longview/clients/$id` + - [X] `GET` + - [ ] `PUT` + - [ ] `DELETE` + +### Subscriptions + +- `/longview/subscriptions` + - [ ] `GET` +- `/longview/subscriptions/$id` + - [ ] `GET` + +### NodeBalancers + +- `/nodebalancers` + - [X] `GET` + - [X] `POST` +- `/nodebalancers/$id` + - [X] `GET` + - [X] `PUT` + - [X] `DELETE` + +### NodeBalancer Configs + +- `/nodebalancers/$id/configs` + - [X] `GET` + - [X] `POST` +- `/nodebalancers/$id/configs/$id` + - [X] `GET` + - [X] `DELETE` +- `/nodebalancers/$id/configs/$id/nodes` + - [X] `GET` + - [X] `POST` +- `/nodebalancers/$id/configs/$id/nodes/$id` + - [X] `GET` + - [X] `PUT` + - [X] `DELETE` +- `/nodebalancers/$id/configs/$id/rebuild` + - [X] `POST` + +## Networking + +- `/networking/ip-assign` + - [ ] `POST` +- `/networking/ips` + - [X] `GET` + - [ ] `POST` +- `/networking/ips/$address` + - [X] `GET` + - [ ] `PUT` + - [ ] `DELETE` + +### IPv6 + +- `/networking/ips` + - [X] `GET` +- `/networking/ips/$address` + - [X] `GET` + - [ ] `PUT` +- /networking/ipv6/ranges + - [X] `GET` +- /networking/ipv6/pools + - [X] `GET` + +## Regions + +- `/regions` + - [x] `GET` +- `/regions/$id` + - [x] `GET` + +## Support + +- `/support/tickets` + - [X] `GET` + - [ ] `POST` +- `/support/tickets/$id` + - [X] `GET` +- `/support/tickets/$id/attachments` + - [ ] `POST` +- `/support/tickets/$id/replies` + - [ ] `GET` + - [ ] `POST` + +## Tags + +- `/tags/` + - [X] `GET` + - [X] `POST` +- `/tags/$id` + - [X] `GET` + - [X] `DELETE` + +## Account + +### Events + +- `/account/events` + - [X] `GET` +- `/account/events/$id` + - [X] `GET` +- `/account/events/$id/read` + - [X] `POST` +- `/account/events/$id/seen` + - [X] `POST` + +### Invoices + +- `/account/invoices/` + - [X] `GET` +- `/account/invoices/$id` + - [X] `GET` +- `/account/invoices/$id/items` + - [X] `GET` + +### Notifications + +- `/account/notifications` + - [X] `GET` + +### OAuth Clients + +- `/account/oauth-clients` + - [ ] `GET` + - [ ] `POST` +- `/account/oauth-clients/$id` + - [ ] `GET` + - [ ] `PUT` + - [ ] `DELETE` +- `/account/oauth-clients/$id/reset_secret` + - [ ] `POST` +- `/account/oauth-clients/$id/thumbnail` + - [ ] `GET` + - [ ] `PUT` + +### Payments + +- `/account/payments` + - [ ] `GET` + - [ ] `POST` +- `/account/payments/$id` + - [ ] `GET` +- `/account/payments/paypal` + - [ ] `GET` +- `/account/payments/paypal/execute` + - [ ] `POST` + +### Settings + +- `/account/settings` + - [ ] `GET` + - [ ] `PUT` + +### Users + +- `/account/users` + - [X] `GET` + - [X] `POST` +- `/account/users/$username` + - [X] `GET` + - [X] `PUT` + - [X] `DELETE` +- `/account/users/$username/grants` + - [ ] `GET` + - [ ] `PUT` +- `/account/users/$username/password` + - [ ] `POST` + +## Profile + +### Personalized User Settings + +- `/profile` + - [X] `GET` + - [X] `PUT` + +### Granted OAuth Apps + +- `/profile/apps` + - [ ] `GET` +- `/profile/apps/$id` + - [ ] `GET` + - [ ] `DELETE` + +### Grants to Linode Resources + +- `/profile/grants` + - [ ] `GET` + +### SSH Keys + +- `/profile/sshkeys` + - [x] `GET` + - [x] `POST` +- `/profile/sshkeys/$id` + - [x] `GET` + - [x] `PUT` + - [x] `DELETE` + +### Two-Factor + +- `/profile/tfa-disable` + - [ ] `POST` +- `/profile/tfa-enable` + - [ ] `POST` +- `/profile/tfa-enable-confirm` + - [ ] `POST` + +### Personal Access API Tokens + +- `/profile/tokens` + - [X] `GET` + - [X] `POST` +- `/profile/tokens/$id` + - [X] `GET` + - [X] `PUT` + - [X] `DELETE` + +## Images + +- `/images` + - [x] `GET` +- `/images/$id` + - [x] `GET` + - [X] `POST` + - [X] `PUT` + - [X] `DELETE` + +## Volumes + +- `/volumes` + - [X] `GET` + - [X] `POST` +- `/volumes/$id` + - [X] `GET` + - [X] `PUT` + - [X] `DELETE` +- `/volumes/$id/attach` + - [X] `POST` +- `/volumes/$id/clone` + - [X] `POST` +- `/volumes/$id/detach` + - [X] `POST` +- `/volumes/$id/resize` + - [X] `POST` diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/CHANGELOG.md b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/CHANGELOG.md new file mode 100644 index 000000000..54c176642 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/CHANGELOG.md @@ -0,0 +1,239 @@ +# Change Log + +## Unreleased + +### Fixes + +### Features + + + +## [v0.7.1](https://github.com/linode/linodego/compare/v0.7.0..v0.7.1) (2018-02-05) + +### Features + +* add `ClassDedicated` constant (`dedicated`) for use in `LinodeType` `Class` values + See the [Dedicated CPU Announcement](https://blog.linode.com/2019/02/05/introducing-linode-dedicated-cpu-instances/) + + + +## [v0.7.0](https://github.com/linode/linodego/compare/v0.6.2..v0.7.0) (2018-12-03) + +### Features + +* add `Tags` field in: `NodeBalancer`, `Domain`, `Volume` +* add `UpdateIPAddress` (for setting RDNS) + +### Fixes + +* invalid URL for `/v4/networking/` enpoints (IPv6 Ranges and Pools) has been correcrted + + + +## [v0.6.2](https://github.com/linode/linodego/compare/v0.6.1..v0.6.2) (2018-10-26) + +### Fixes + +* add missing `Account` fields: `address_1`, `address_2`, `phone` + + +## [v0.6.1](https://github.com/linode/linodego/compare/v0.6.0..v0.6.1) (2018-10-26) + +### Features + +* Adds support for fetching and updating basic Profile information + + +## [v0.6.0](https://github.com/linode/linodego/compare/v0.5.1..v0.6.0) (2018-10-25) + +### Fixes + +* Fixes Image date handling +* Fixes broken example code in README +* Fixes WaitForEventFinished when encountering events without entity +* Fixes ResizeInstanceDisk which was executing CloneInstanceDisk +* Fixes go-resty import path to gopkg.in version for future go module support + +### Features + +* Adds support for user account operations +* Adds support for profile tokens +* Adds support for Tags +* Adds PasswordResetInstanceDisk +* Adds DiskStatus constants +* Adds WaitForInstanceDiskStatus +* Adds SetPollDelay for configuring poll duration + + * Reduced polling time to millisecond granularity + * Change polling default to 3s to avoid 429 conditions + * Use poll delay in waitfor functions + + +## [v0.5.1](https://github.com/linode/linodego/compare/v0.5.0...v0.5.1) (2018-09-10) + +### Fixes + +* Domain.Status was not imported from API responses correctly + + +## [v0.5.0](https://github.com/linode/linodego/compare/v0.4.0...v0.5.0) (2018-09-09) + +### Breaking Changes + +* List functions return slice of thing instead of slice of pointer to thing + +### Feature + +* add SSHKeys methods to client (also affects InstanceCreate, InstanceDiskCreate) +* add RebuildNodeBalancerConfig (and CreateNodeBalancerConfig with Nodes) + +### Fixes + +* Event.TimeRemaining wouldn't parse all possible API value +* Tests no longer rely on known/special instance and volume ids + + +## [0.4.0](https://github.com/linode/linodego/compare/v0.3.0...0.4.0) (2018-08-27) + +### Breaking Changes + +Replaces bool, error results with error results, for: + +* instance\_snapshots.go: EnableInstanceBackups +* instance\_snapshots.go: CancelInstanceBackups +* instance\_snapshots.go: RestoreInstanceBackup +* instances.go: BootInstance +* instances.go: RebootInstance +* instances.go: MutateInstance +* instances.go: RescueInstance +* instances.go: ResizeInstance +* instances.go: ShutdownInstance +* volumes.go: DetachVolume +* volumes.go: ResizeVolume + + +### Docs + +* reword text about breaking changes until first tag + +### Feat + +* added MigrateInstance and InstanceResizing from 4.0.1-4.0.3 API Changelog +* added gometalinter to travis builds +* added missing function and type comments as reported by linting tools +* supply json values for all fields, useful for mocking responses using linodego types +* use context channels in WaitFor\* functions +* add LinodeTypeClass type (enum) +* add TicketStatus type (enum) +* update template thing and add a test template + +### Fix + +* TransferQuota was TransferQuote (and not parsed from the api correctly) +* stackscripts udf was not parsed correctly +* add InstanceCreateOptions.PrivateIP +* check the WaitFor timeout before sleeping to avoid extra sleep +* various linting warnings and unhandled err results as reported by linting tools +* fix GetStackscript 404 handling + + + + +## [0.3.0](https://github.com/linode/linodego/compare/v0.2.0...0.3.0) (2018-08-15) + +### Breaking Changes + +* WaitForVolumeLinodeID return fetch volume for consistency with out WaitFors +* Moved linodego from chiefy to github.com/linode. Thanks [@chiefy](https://github.com/chiefy)! + + + +## [v0.2.0](https://github.com/linode/linodego/compare/v0.1.1...v0.2.0) (2018-08-11) + +### Breaking Changes + +* WaitFor\* should be client methods + *use `client.WaitFor...` rather than `linodego.WaitFor(..., client, ...)`* + +* remove ListInstanceSnapshots (does not exist in the API) + *this never worked, so shouldn't cause a problem* + +* Changes UpdateOptions and CreateOptions and similar Options parameters to values instead of pointers + *these were never optional and the function never updated any values in the Options structures* + +* fixed various optional/zero Update and Create options + *some values are now pointers, and vice-versa* + + * Changes InstanceUpdateOptions to use pointers for optional fields Backups and Alerts + * Changes InstanceClone's Disks and Configs to ints instead of strings + +* using new enum string aliased types where appropriate + *`InstanceSnapshotStatus`, `DiskFilesystem`, `NodeMode`* + +### Feature + +* add RescueInstance and RescueInstanceOptions +* add CreateImage, UpdateImage, DeleteImage +* add EnableInstanceBackups, CancelInstanceBackups, RestoreInstanceBackup +* add WatchdogEnabled to InstanceUpdateOptions + +### Fix + +* return Volume from AttachVolume instead of bool +* add more boilerplate to template.go +* nodebalancers and domain records had no pagination support +* NodeBalancer transfer stats are not int + +### Tests + +* add fixtures and tests for NodeBalancerNodes +* fix nodebalancer tests to handle changes due to random labels +* add tests for nodebalancers and nodebalancer configs +* added tests for Backups flow +* TestListInstanceBackups fixture is hand tweaked because repeated polled events + appear to get the tests stuck + +### Deps + +* update all dependencies to latest + + + +## [v0.1.1](https://github.com/linode/linodego/compare/v0.0.1...v0.1.0) (2018-07-30) + +Adds more Domain handling + +### Fixed + +* go-resty doesnt pass errors when content-type is not set +* Domain, DomainRecords, tests and fixtures + +### Added + +* add CreateDomainRecord, UpdateDomainRecord, and DeleteDomainRecord + + + +## [v0.1.0](https://github.com/linode/linodego/compare/v0.0.1...v0.1.0) (2018-07-23) + +Deals with NewClient and context for all http requests + +### Breaking Changes + +* changed `NewClient(token, *http.RoundTripper)` to `NewClient(*http.Client)` +* changed all `Client` `Get`, `List`, `Create`, `Update`, `Delete`, and `Wait` calls to take context as the first parameter + +### Fixed + +* fixed docs should now show Examples for more functions + +### Added + +* added `Client.SetBaseURL(url string)` + + +## v0.0.1 (2018-07-20) + +### Changed + +* Initial tagged release diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/Gopkg.lock b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/Gopkg.lock new file mode 100644 index 000000000..a7ca4f015 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/Gopkg.lock @@ -0,0 +1,111 @@ +# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. + + +[[projects]] + branch = "master" + digest = "1:6e1c13bc32e58ccb4afa1115a3ba4fc071d918ed897b40dfa323ffb3fcc6619d" + name = "github.com/dnaeon/go-vcr" + packages = [ + "cassette", + "recorder", + ] + pruneopts = "UT" + revision = "aafff18a5cc28fa0b2f26baf6a14472cda9b54c6" + +[[projects]] + digest = "1:97df918963298c287643883209a2c3f642e6593379f97ab400c2a2e219ab647d" + name = "github.com/golang/protobuf" + packages = ["proto"] + pruneopts = "UT" + revision = "aa810b61a9c79d51363740d207bb46cf8e620ed5" + version = "v1.2.0" + +[[projects]] + branch = "master" + digest = "1:33b9d71d1dde2106309484a388eb7ba53cd1f67014e34a71f7b3dbc20bd186e5" + name = "golang.org/x/net" + packages = [ + "context", + "context/ctxhttp", + "idna", + "publicsuffix", + ] + pruneopts = "UT" + revision = "8a410e7b638dca158bf9e766925842f6651ff828" + +[[projects]] + branch = "master" + digest = "1:363b547c971a2b07474c598b6e9ebcb238d556d8a27f37b3895ad20cd50e7281" + name = "golang.org/x/oauth2" + packages = [ + ".", + "internal", + ] + pruneopts = "UT" + revision = "d2e6202438beef2727060aa7cabdd924d92ebfd9" + +[[projects]] + digest = "1:a2ab62866c75542dd18d2b069fec854577a20211d7c0ea6ae746072a1dccdd18" + name = "golang.org/x/text" + packages = [ + "collate", + "collate/build", + "internal/colltab", + "internal/gen", + "internal/tag", + "internal/triegen", + "internal/ucd", + "language", + "secure/bidirule", + "transform", + "unicode/bidi", + "unicode/cldr", + "unicode/norm", + "unicode/rangetable", + ] + pruneopts = "UT" + revision = "f21a4dfb5e38f5895301dc265a8def02365cc3d0" + version = "v0.3.0" + +[[projects]] + digest = "1:328b5e4f197d928c444a51a75385f4b978915c0e75521f0ad6a3db976c97a7d3" + name = "google.golang.org/appengine" + packages = [ + "internal", + "internal/base", + "internal/datastore", + "internal/log", + "internal/remote_api", + "internal/urlfetch", + "urlfetch", + ] + pruneopts = "UT" + revision = "b1f26356af11148e710935ed1ac8a7f5702c7612" + version = "v1.1.0" + +[[projects]] + digest = "1:b7fc4c3fd91df516486f53cc86f4b55a0c815782dbe852c5a19cce8e6c577aac" + name = "gopkg.in/resty.v1" + packages = ["."] + pruneopts = "UT" + revision = "d4920dcf5b7689548a6db640278a9b35a5b48ec6" + version = "v1.9.1" + +[[projects]] + digest = "1:342378ac4dcb378a5448dd723f0784ae519383532f5e70ade24132c4c8693202" + name = "gopkg.in/yaml.v2" + packages = ["."] + pruneopts = "UT" + revision = "5420a8b6744d3b0345ab293f6fcba19c978f1183" + version = "v2.2.1" + +[solve-meta] + analyzer-name = "dep" + analyzer-version = 1 + input-imports = [ + "github.com/dnaeon/go-vcr/recorder", + "golang.org/x/oauth2", + "gopkg.in/resty.v1", + ] + solver-name = "gps-cdcl" + solver-version = 1 diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/Gopkg.toml b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/Gopkg.toml new file mode 100644 index 000000000..2765dc95c --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/Gopkg.toml @@ -0,0 +1,29 @@ +# Gopkg.toml example +# +# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html +# for detailed Gopkg.toml documentation. +# +# required = ["github.com/user/thing/cmd/thing"] +# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] +# +# [[constraint]] +# name = "github.com/user/project" +# version = "1.0.0" +# +# [[constraint]] +# name = "github.com/user/project2" +# branch = "dev" +# source = "github.com/myfork/project2" +# +# [[override]] +# name = "github.com/x/y" +# version = "2.4.0" +# +# [prune] +# non-go = false +# go-tests = true +# unused-packages = true + +[prune] + go-tests = true + unused-packages = true diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/LICENSE b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/LICENSE new file mode 100644 index 000000000..6b0e6bace --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Christopher "Chief" Najewicz + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/Makefile b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/Makefile new file mode 100644 index 000000000..e5f533d42 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/Makefile @@ -0,0 +1,43 @@ +include .env + +.PHONY: vendor example refresh-fixtures clean-fixtures + +.PHONY: test +test: vendor + @LINODE_FIXTURE_MODE="play" \ + LINODE_TOKEN="awesometokenawesometokenawesometoken" \ + go test $(ARGS) + +$(GOPATH)/bin/dep: + @go get -u github.com/golang/dep/cmd/dep + +vendor: $(GOPATH)/bin/dep + @dep ensure + +example: + @go run example/main.go + +clean-fixtures: + @-rm fixtures/*.yaml + +refresh-fixtures: clean-fixtures fixtures + +.PHONY: fixtures +fixtures: + @echo "* Running fixtures" + @LINODE_TOKEN=$(LINODE_TOKEN) \ + LINODE_FIXTURE_MODE="record" go test $(ARGS) + @echo "* Santizing fixtures" + @for yaml in fixtures/*yaml; do \ + sed -E -i "" -e "s/$(LINODE_TOKEN)/awesometokenawesometokenawesometoken/g" \ + -e 's/20[0-9]{2}-[01][0-9]-[0-3][0-9]T[0-2][0-9]:[0-9]{2}:[0-9]{2}/2018-01-02T03:04:05/g' \ + -e 's/nb-[0-9]{1,3}-[0-9]{1,3}-[0-9]{1,3}-[0-9]{1,3}\./nb-10-20-30-40./g' \ + -e 's/192\.168\.((1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])\.)(1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])/192.168.030.040/g' \ + -e '/^192\.168/!s/((1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])\.){3}(1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])/10.20.30.40/g' \ + -e 's/(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))/1234::5678/g' \ + $$yaml; \ + done + +.PHONY: godoc +godoc: + @godoc -http=:6060 diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/README.md b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/README.md new file mode 100644 index 000000000..7d0ae2bc1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/README.md @@ -0,0 +1,178 @@ +# linodego + +[![Build Status](https://travis-ci.org/linode/linodego.svg?branch=master)](https://travis-ci.org/linode/linodego) +[![GoDoc](https://godoc.org/github.com/linode/linodego?status.svg)](https://godoc.org/github.com/linode/linodego) +[![Go Report Card](https://goreportcard.com/badge/github.com/linode/linodego)](https://goreportcard.com/report/github.com/linode/linodego) +[![codecov](https://codecov.io/gh/linode/linodego/branch/master/graph/badge.svg)](https://codecov.io/gh/linode/linodego) + +Go client for [Linode REST v4 API](https://developers.linode.com/api/v4) + +## Installation + +```sh +go get -u github.com/linode/linodego +``` + +## API Support + +Check [API_SUPPORT.md](API_SUPPORT.md) for current support of the Linode `v4` API endpoints. + +** Note: This project will change and break until we release a v1.0.0 tagged version. Breaking changes in v0.x.x will be denoted with a minor version bump (v0.2.4 -> v0.3.0) ** + +## Documentation + +See [godoc](https://godoc.org/github.com/linode/linodego) for a complete reference. + +The API generally follows the naming patterns prescribed in the [OpenAPIv3 document for Linode APIv4](https://developers.linode.com/api/v4). + +Deviations in naming have been made to avoid using "Linode" and "Instance" redundantly or inconsistently. + +A brief summary of the features offered in this API client are shown here. + +## Examples + +### General Usage + +```go +package main + +import ( + "context" + "fmt" + + "github.com/linode/linodego" + "golang.org/x/oauth2" + + "log" + "net/http" + "os" +) + +func main() { + apiKey, ok := os.LookupEnv("LINODE_TOKEN") + if !ok { + log.Fatal("Could not find LINODE_TOKEN, please assert it is set.") + } + tokenSource := oauth2.StaticTokenSource(&oauth2.Token{AccessToken: apiKey}) + + oauth2Client := &http.Client{ + Transport: &oauth2.Transport{ + Source: tokenSource, + }, + } + + linodeClient := linodego.NewClient(oauth2Client) + linodeClient.SetDebug(true) + + res, err := linodeClient.GetInstance(context.Background(), 4090913) + if err != nil { + log.Fatal(err) + } + fmt.Printf("%v", res) +} +``` + +### Pagination + +#### Auto-Pagination Requests + +```go +kernels, err := linodego.ListKernels(context.Background(), nil) +// len(kernels) == 218 +``` + +Or, use a page value of "0": + +```go +opts := NewListOptions(0,"") +kernels, err := linodego.ListKernels(context.Background(), opts) +// len(kernels) == 218 +``` + +#### Single Page + +```go +opts := NewListOptions(2,"") +// or opts := ListOptions{PageOptions: &PageOptions: {Page: 2 }} +kernels, err := linodego.ListKernels(context.Background(), opts) +// len(kernels) == 100 +``` + +ListOptions are supplied as a pointer because the Pages and Results +values are set in the supplied ListOptions. + +```go +// opts.Results == 218 +``` + +#### Filtering + +```go +opts := ListOptions{Filter: "{\"mine\":true}"} +// or opts := NewListOptions(0, "{\"mine\":true}") +stackscripts, err := linodego.ListStackscripts(context.Background(), opts) +``` + +### Error Handling + +#### Getting Single Entities + +```go +linode, err := linodego.GetLinode(context.Background(), 555) // any Linode ID that does not exist or is not yours +// linode == nil: true +// err.Error() == "[404] Not Found" +// err.Code == "404" +// err.Message == "Not Found" +``` + +#### Lists + +For lists, the list is still returned as `[]`, but `err` works the same way as on the `Get` request. + +```go +linodes, err := linodego.ListLinodes(context.Background(), NewListOptions(0, "{\"foo\":bar}")) +// linodes == [] +// err.Error() == "[400] [X-Filter] Cannot filter on foo" +``` + +Otherwise sane requests beyond the last page do not trigger an error, just an empty result: + +```go +linodes, err := linodego.ListLinodes(context.Background(), NewListOptions(9999, "")) +// linodes == [] +// err = nil +``` + +### Writes + +When performing a `POST` or `PUT` request, multiple field related errors will be returned as a single error, currently like: + +```go +// err.Error() == "[400] [field1] foo problem; [field2] bar problem; [field3] baz problem" +``` + +## Tests + +Run `make test` to run the unit tests. This is the same as running `go test` except that `make test` will +execute the tests while playing back API response fixtures that were recorded during a previous development build. + +`go test` can be used without the fixtures. Copy `env.sample` to `.env` and configure your persistent test +settings, including an API token. + +`go test -short` can be used to run live API tests that do not require an account token. + +This will be simplified in future versions. + +To update the test fixtures, run `make fixtures`. This will record the API responses into the `fixtures/` directory. +Be careful about committing any sensitive account details. An attempt has been made to sanitize IP addresses and +dates, but no automated sanitization will be performed against `fixtures/*Account*.yaml`, for example. + +To prevent disrupting unaffected fixtures, target fixture generation like so: `make ARGS="-run TestListVolumes" fixtures`. + +## Discussion / Help + +Join us at [#linodego](https://gophers.slack.com/messages/CAG93EB2S) on the [gophers slack](https://gophers.slack.com) + +## License + +[MIT License](LICENSE) diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/account.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/account.go new file mode 100644 index 000000000..d6092f07d --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/account.go @@ -0,0 +1,45 @@ +package linodego + +import "context" + +// Account associated with the token in use +type Account struct { + FirstName string `json:"first_name"` + LastName string `json:"last_name"` + Email string `json:"email"` + Company string `json:"company"` + Address1 string `json:"address_1"` + Address2 string `json:"address_2"` + Balance float32 `json:"balance"` + City string `json:"city"` + State string `json:"state"` + Zip string `json:"zip"` + Country string `json:"country"` + TaxID string `json:"tax_id"` + Phone string `json:"phone"` + CreditCard *CreditCard `json:"credit_card"` +} + +// CreditCard information associated with the Account. +type CreditCard struct { + LastFour string `json:"last_four"` + Expiry string `json:"expiry"` +} + +// fixDates converts JSON timestamps to Go time.Time values +func (v *Account) fixDates() *Account { + return v +} + +// GetAccount gets the contact and billing information related to the Account +func (c *Client) GetAccount(ctx context.Context) (*Account, error) { + e, err := c.Account.Endpoint() + if err != nil { + return nil, err + } + r, err := coupleAPIErrors(c.R(ctx).SetResult(&Account{}).Get(e)) + if err != nil { + return nil, err + } + return r.Result().(*Account).fixDates(), nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/account_events.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/account_events.go new file mode 100644 index 000000000..e2365c35b --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/account_events.go @@ -0,0 +1,277 @@ +package linodego + +import ( + "context" + "encoding/json" + "fmt" + "log" + "strconv" + "strings" + "time" +) + +// Event represents an action taken on the Account. +type Event struct { + CreatedStr string `json:"created"` + + // The unique ID of this Event. + ID int `json:"id"` + + // Current status of the Event, Enum: "failed" "finished" "notification" "scheduled" "started" + Status EventStatus `json:"status"` + + // The action that caused this Event. New actions may be added in the future. + Action EventAction `json:"action"` + + // A percentage estimating the amount of time remaining for an Event. Returns null for notification events. + PercentComplete int `json:"percent_complete"` + + // The rate of completion of the Event. Only some Events will return rate; for example, migration and resize Events. + Rate *string `json:"rate"` + + // If this Event has been read. + Read bool `json:"read"` + + // If this Event has been seen. + Seen bool `json:"seen"` + + // The estimated time remaining until the completion of this Event. This value is only returned for in-progress events. + TimeRemainingMsg json.RawMessage `json:"time_remaining"` + TimeRemaining *int `json:"-"` + + // The username of the User who caused the Event. + Username string `json:"username"` + + // Detailed information about the Event's entity, including ID, type, label, and URL used to access it. + Entity *EventEntity `json:"entity"` + + // When this Event was created. + Created *time.Time `json:"-"` +} + +// EventAction constants start with Action and include all known Linode API Event Actions. +type EventAction string + +// EventAction constants represent the actions that cause an Event. New actions may be added in the future. +const ( + ActionBackupsEnable EventAction = "backups_enable" + ActionBackupsCancel EventAction = "backups_cancel" + ActionBackupsRestore EventAction = "backups_restore" + ActionCommunityQuestionReply EventAction = "community_question_reply" + ActionCreateCardUpdated EventAction = "credit_card_updated" + ActionDiskCreate EventAction = "disk_create" + ActionDiskDelete EventAction = "disk_delete" + ActionDiskDuplicate EventAction = "disk_duplicate" + ActionDiskImagize EventAction = "disk_imagize" + ActionDiskResize EventAction = "disk_resize" + ActionDNSRecordCreate EventAction = "dns_record_create" + ActionDNSRecordDelete EventAction = "dns_record_delete" + ActionDNSZoneCreate EventAction = "dns_zone_create" + ActionDNSZoneDelete EventAction = "dns_zone_delete" + ActionImageDelete EventAction = "image_delete" + ActionLinodeAddIP EventAction = "linode_addip" + ActionLinodeBoot EventAction = "linode_boot" + ActionLinodeClone EventAction = "linode_clone" + ActionLinodeCreate EventAction = "linode_create" + ActionLinodeDelete EventAction = "linode_delete" + ActionLinodeDeleteIP EventAction = "linode_deleteip" + ActionLinodeMigrate EventAction = "linode_migrate" + ActionLinodeMutate EventAction = "linode_mutate" + ActionLinodeReboot EventAction = "linode_reboot" + ActionLinodeRebuild EventAction = "linode_rebuild" + ActionLinodeResize EventAction = "linode_resize" + ActionLinodeShutdown EventAction = "linode_shutdown" + ActionLinodeSnapshot EventAction = "linode_snapshot" + ActionLongviewClientCreate EventAction = "longviewclient_create" + ActionLongviewClientDelete EventAction = "longviewclient_delete" + ActionManagedDisabled EventAction = "managed_disabled" + ActionManagedEnabled EventAction = "managed_enabled" + ActionManagedServiceCreate EventAction = "managed_service_create" + ActionManagedServiceDelete EventAction = "managed_service_delete" + ActionNodebalancerCreate EventAction = "nodebalancer_create" + ActionNodebalancerDelete EventAction = "nodebalancer_delete" + ActionNodebalancerConfigCreate EventAction = "nodebalancer_config_create" + ActionNodebalancerConfigDelete EventAction = "nodebalancer_config_delete" + ActionPasswordReset EventAction = "password_reset" + ActionPaymentSubmitted EventAction = "payment_submitted" + ActionStackScriptCreate EventAction = "stackscript_create" + ActionStackScriptDelete EventAction = "stackscript_delete" + ActionStackScriptPublicize EventAction = "stackscript_publicize" + ActionStackScriptRevise EventAction = "stackscript_revise" + ActionTFADisabled EventAction = "tfa_disabled" + ActionTFAEnabled EventAction = "tfa_enabled" + ActionTicketAttachmentUpload EventAction = "ticket_attachment_upload" + ActionTicketCreate EventAction = "ticket_create" + ActionTicketReply EventAction = "ticket_reply" + ActionVolumeAttach EventAction = "volume_attach" + ActionVolumeClone EventAction = "volume_clone" + ActionVolumeCreate EventAction = "volume_create" + ActionVolumeDelte EventAction = "volume_delete" + ActionVolumeDetach EventAction = "volume_detach" + ActionVolumeResize EventAction = "volume_resize" +) + +// EntityType constants start with Entity and include Linode API Event Entity Types +type EntityType string + +// EntityType contants are the entities an Event can be related to +const ( + EntityLinode EntityType = "linode" + EntityDisk EntityType = "disk" +) + +// EventStatus constants start with Event and include Linode API Event Status values +type EventStatus string + +// EventStatus constants reflect the current status of an Event +const ( + EventFailed EventStatus = "failed" + EventFinished EventStatus = "finished" + EventNotification EventStatus = "notification" + EventScheduled EventStatus = "scheduled" + EventStarted EventStatus = "started" +) + +// EventEntity provides detailed information about the Event's +// associated entity, including ID, Type, Label, and a URL that +// can be used to access it. +type EventEntity struct { + // ID may be a string or int, it depends on the EntityType + ID interface{} `json:"id"` + Label string `json:"label"` + Type EntityType `json:"type"` + URL string `json:"url"` +} + +// EventsPagedResponse represents a paginated Events API response +type EventsPagedResponse struct { + *PageOptions + Data []Event `json:"data"` +} + +// endpoint gets the endpoint URL for Event +func (EventsPagedResponse) endpoint(c *Client) string { + endpoint, err := c.Events.Endpoint() + if err != nil { + panic(err) + } + return endpoint +} + +// endpointWithID gets the endpoint URL for a specific Event +func (e Event) endpointWithID(c *Client) string { + endpoint, err := c.Events.Endpoint() + if err != nil { + panic(err) + } + endpoint = fmt.Sprintf("%s/%d", endpoint, e.ID) + return endpoint +} + +// appendData appends Events when processing paginated Event responses +func (resp *EventsPagedResponse) appendData(r *EventsPagedResponse) { + resp.Data = append(resp.Data, r.Data...) +} + +// ListEvents gets a collection of Event objects representing actions taken +// on the Account. The Events returned depend on the token grants and the grants +// of the associated user. +func (c *Client) ListEvents(ctx context.Context, opts *ListOptions) ([]Event, error) { + response := EventsPagedResponse{} + err := c.listHelper(ctx, &response, opts) + for i := range response.Data { + response.Data[i].fixDates() + } + if err != nil { + return nil, err + } + return response.Data, nil +} + +// GetEvent gets the Event with the Event ID +func (c *Client) GetEvent(ctx context.Context, id int) (*Event, error) { + e, err := c.Events.Endpoint() + if err != nil { + return nil, err + } + e = fmt.Sprintf("%s/%d", e, id) + r, err := c.R(ctx).SetResult(&Event{}).Get(e) + if err != nil { + return nil, err + } + return r.Result().(*Event).fixDates(), nil +} + +// fixDates converts JSON timestamps to Go time.Time values +func (e *Event) fixDates() *Event { + e.Created, _ = parseDates(e.CreatedStr) + e.TimeRemaining = unmarshalTimeRemaining(e.TimeRemainingMsg) + return e +} + +// MarkEventRead marks a single Event as read. +func (c *Client) MarkEventRead(ctx context.Context, event *Event) error { + e := event.endpointWithID(c) + e = fmt.Sprintf("%s/read", e) + + _, err := coupleAPIErrors(c.R(ctx).Post(e)) + + return err +} + +// MarkEventsSeen marks all Events up to and including this Event by ID as seen. +func (c *Client) MarkEventsSeen(ctx context.Context, event *Event) error { + e := event.endpointWithID(c) + e = fmt.Sprintf("%s/seen", e) + + _, err := coupleAPIErrors(c.R(ctx).Post(e)) + + return err +} + +func unmarshalTimeRemaining(m json.RawMessage) *int { + jsonBytes, err := m.MarshalJSON() + if err != nil { + panic(jsonBytes) + } + + if len(jsonBytes) == 4 && string(jsonBytes) == "null" { + return nil + } + + var timeStr string + if err := json.Unmarshal(jsonBytes, &timeStr); err == nil && len(timeStr) > 0 { + if dur, err := durationToSeconds(timeStr); err != nil { + panic(err) + } else { + return &dur + } + } else { + var intPtr int + if err := json.Unmarshal(jsonBytes, &intPtr); err == nil { + return &intPtr + } + } + + log.Println("[WARN] Unexpected unmarshalTimeRemaining value: ", jsonBytes) + return nil +} + +// durationToSeconds takes a hh:mm:ss string and returns the number of seconds +func durationToSeconds(s string) (int, error) { + multipliers := [3]int{60 * 60, 60, 1} + segs := strings.Split(s, ":") + if len(segs) > len(multipliers) { + return 0, fmt.Errorf("too many ':' separators in time duration: %s", s) + } + var d int + l := len(segs) + for i := 0; i < l; i++ { + m, err := strconv.Atoi(segs[i]) + if err != nil { + return 0, err + } + d += m * multipliers[i+len(multipliers)-l] + } + return d, nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/account_invoices.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/account_invoices.go new file mode 100644 index 000000000..75ca2f73d --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/account_invoices.go @@ -0,0 +1,125 @@ +package linodego + +import ( + "context" + "fmt" + "time" +) + +// Invoice structs reflect an invoice for billable activity on the account. +type Invoice struct { + DateStr string `json:"date"` + + ID int `json:"id"` + Label string `json:"label"` + Total float32 `json:"total"` + Date *time.Time `json:"-"` +} + +// InvoiceItem structs reflect an single billable activity associate with an Invoice +type InvoiceItem struct { + FromStr string `json:"from"` + ToStr string `json:"to"` + + Label string `json:"label"` + Type string `json:"type"` + UnitPrice int `json:"unitprice"` + Quantity int `json:"quantity"` + Amount float32 `json:"amount"` + From *time.Time `json:"-"` + To *time.Time `json:"-"` +} + +// InvoicesPagedResponse represents a paginated Invoice API response +type InvoicesPagedResponse struct { + *PageOptions + Data []Invoice `json:"data"` +} + +// endpoint gets the endpoint URL for Invoice +func (InvoicesPagedResponse) endpoint(c *Client) string { + endpoint, err := c.Invoices.Endpoint() + if err != nil { + panic(err) + } + return endpoint +} + +// appendData appends Invoices when processing paginated Invoice responses +func (resp *InvoicesPagedResponse) appendData(r *InvoicesPagedResponse) { + resp.Data = append(resp.Data, r.Data...) +} + +// ListInvoices gets a paginated list of Invoices against the Account +func (c *Client) ListInvoices(ctx context.Context, opts *ListOptions) ([]Invoice, error) { + response := InvoicesPagedResponse{} + err := c.listHelper(ctx, &response, opts) + for i := range response.Data { + response.Data[i].fixDates() + } + if err != nil { + return nil, err + } + return response.Data, nil +} + +// fixDates converts JSON timestamps to Go time.Time values +func (v *Invoice) fixDates() *Invoice { + v.Date, _ = parseDates(v.DateStr) + return v +} + +// fixDates converts JSON timestamps to Go time.Time values +func (v *InvoiceItem) fixDates() *InvoiceItem { + v.From, _ = parseDates(v.FromStr) + v.To, _ = parseDates(v.ToStr) + return v +} + +// GetInvoice gets the a single Invoice matching the provided ID +func (c *Client) GetInvoice(ctx context.Context, id int) (*Invoice, error) { + e, err := c.Invoices.Endpoint() + if err != nil { + return nil, err + } + + e = fmt.Sprintf("%s/%d", e, id) + r, err := coupleAPIErrors(c.R(ctx).SetResult(&Invoice{}).Get(e)) + if err != nil { + return nil, err + } + return r.Result().(*Invoice).fixDates(), nil +} + +// InvoiceItemsPagedResponse represents a paginated Invoice Item API response +type InvoiceItemsPagedResponse struct { + *PageOptions + Data []InvoiceItem `json:"data"` +} + +// endpointWithID gets the endpoint URL for InvoiceItems associated with a specific Invoice +func (InvoiceItemsPagedResponse) endpointWithID(c *Client, id int) string { + endpoint, err := c.InvoiceItems.endpointWithID(id) + if err != nil { + panic(err) + } + return endpoint +} + +// appendData appends InvoiceItems when processing paginated Invoice Item responses +func (resp *InvoiceItemsPagedResponse) appendData(r *InvoiceItemsPagedResponse) { + resp.Data = append(resp.Data, r.Data...) +} + +// ListInvoiceItems gets the invoice items associated with a specific Invoice +func (c *Client) ListInvoiceItems(ctx context.Context, id int, opts *ListOptions) ([]InvoiceItem, error) { + response := InvoiceItemsPagedResponse{} + err := c.listHelperWithID(ctx, &response, id, opts) + for i := range response.Data { + response.Data[i].fixDates() + } + if err != nil { + return nil, err + } + return response.Data, nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/account_notifications.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/account_notifications.go new file mode 100644 index 000000000..1d2de2e62 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/account_notifications.go @@ -0,0 +1,101 @@ +package linodego + +import ( + "context" + "time" +) + +// Notification represents a notification on an Account +type Notification struct { + UntilStr string `json:"until"` + WhenStr string `json:"when"` + + Label string `json:"label"` + Body *string `json:"body"` + Message string `json:"message"` + Type NotificationType `json:"type"` + Severity NotificationSeverity `json:"severity"` + Entity *NotificationEntity `json:"entity"` + Until *time.Time `json:"-"` + When *time.Time `json:"-"` +} + +// NotificationEntity adds detailed information about the Notification. +// This could refer to the ticket that triggered the notification, for example. +type NotificationEntity struct { + ID int `json:"id"` + Label string `json:"label"` + Type string `json:"type"` + URL string `json:"url"` +} + +// NotificationSeverity constants start with Notification and include all known Linode API Notification Severities. +type NotificationSeverity string + +// NotificationSeverity constants represent the actions that cause a Notification. New severities may be added in the future. +const ( + NotificationMinor NotificationSeverity = "minor" + NotificationMajor NotificationSeverity = "major" + NotificationCritical NotificationSeverity = "critical" +) + +// NotificationType constants start with Notification and include all known Linode API Notification Types. +type NotificationType string + +// NotificationType constants represent the actions that cause a Notification. New types may be added in the future. +const ( + NotificationMigrationScheduled NotificationType = "migration_scheduled" + NotificationMigrationImminent NotificationType = "migration_imminent" + NotificationMigrationPending NotificationType = "migration_pending" + NotificationRebootScheduled NotificationType = "reboot_scheduled" + NotificationOutage NotificationType = "outage" + NotificationPaymentDue NotificationType = "payment_due" + NotificationTicketImportant NotificationType = "ticket_important" + NotificationTicketAbuse NotificationType = "ticket_abuse" + NotificationNotice NotificationType = "notice" + NotificationMaintenance NotificationType = "maintenance" +) + +// NotificationsPagedResponse represents a paginated Notifications API response +type NotificationsPagedResponse struct { + *PageOptions + Data []Notification `json:"data"` +} + +// endpoint gets the endpoint URL for Notification +func (NotificationsPagedResponse) endpoint(c *Client) string { + endpoint, err := c.Notifications.Endpoint() + if err != nil { + panic(err) + } + return endpoint +} + +// appendData appends Notifications when processing paginated Notification responses +func (resp *NotificationsPagedResponse) appendData(r *NotificationsPagedResponse) { + resp.Data = append(resp.Data, r.Data...) +} + +// ListNotifications gets a collection of Notification objects representing important, +// often time-sensitive items related to the Account. An account cannot interact directly with +// Notifications, and a Notification will disappear when the circumstances causing it +// have been resolved. For example, if the account has an important Ticket open, a response +// to the Ticket will dismiss the Notification. +func (c *Client) ListNotifications(ctx context.Context, opts *ListOptions) ([]Notification, error) { + response := NotificationsPagedResponse{} + err := c.listHelper(ctx, &response, opts) + for i := range response.Data { + response.Data[i].fixDates() + } + if err != nil { + return nil, err + } + return response.Data, nil +} + +// fixDates converts JSON timestamps to Go time.Time values +func (v *Notification) fixDates() *Notification { + v.Until, _ = parseDates(v.UntilStr) + v.When, _ = parseDates(v.WhenStr) + return v +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/account_users.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/account_users.go new file mode 100644 index 000000000..a51fbe7f1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/account_users.go @@ -0,0 +1,164 @@ +package linodego + +import ( + "context" + "encoding/json" + "fmt" +) + +// User represents a User object +type User struct { + Username string `json:"username"` + Email string `json:"email"` + Restricted bool `json:"restricted"` + SSHKeys []string `json:"ssh_keys"` +} + +// UserCreateOptions fields are those accepted by CreateUser +type UserCreateOptions struct { + Username string `json:"username"` + Email string `json:"email"` + Restricted bool `json:"restricted,omitempty"` +} + +// UserUpdateOptions fields are those accepted by UpdateUser +type UserUpdateOptions struct { + Username string `json:"username,omitempty"` + Email string `json:"email,omitempty"` + Restricted *bool `json:"restricted,omitempty"` + SSHKeys *[]string `json:"ssh_keys,omitempty"` +} + +// GetCreateOptions converts a User to UserCreateOptions for use in CreateUser +func (i User) GetCreateOptions() (o UserCreateOptions) { + o.Username = i.Username + o.Email = i.Email + o.Restricted = i.Restricted + return +} + +// GetUpdateOptions converts a User to UserUpdateOptions for use in UpdateUser +func (i User) GetUpdateOptions() (o UserUpdateOptions) { + o.Username = i.Username + o.Email = i.Email + o.Restricted = copyBool(&i.Restricted) + return +} + +// UsersPagedResponse represents a paginated User API response +type UsersPagedResponse struct { + *PageOptions + Data []User `json:"data"` +} + +// endpoint gets the endpoint URL for User +func (UsersPagedResponse) endpoint(c *Client) string { + endpoint, err := c.Users.Endpoint() + if err != nil { + panic(err) + } + return endpoint +} + +// appendData appends Users when processing paginated User responses +func (resp *UsersPagedResponse) appendData(r *UsersPagedResponse) { + resp.Data = append(resp.Data, r.Data...) +} + +// ListUsers lists Users on the account +func (c *Client) ListUsers(ctx context.Context, opts *ListOptions) ([]User, error) { + response := UsersPagedResponse{} + err := c.listHelper(ctx, &response, opts) + for i := range response.Data { + response.Data[i].fixDates() + } + if err != nil { + return nil, err + } + return response.Data, nil +} + +// fixDates converts JSON timestamps to Go time.Time values +func (i *User) fixDates() *User { + return i +} + +// GetUser gets the user with the provided ID +func (c *Client) GetUser(ctx context.Context, id string) (*User, error) { + e, err := c.Users.Endpoint() + if err != nil { + return nil, err + } + e = fmt.Sprintf("%s/%s", e, id) + r, err := coupleAPIErrors(c.R(ctx).SetResult(&User{}).Get(e)) + if err != nil { + return nil, err + } + return r.Result().(*User).fixDates(), nil +} + +// CreateUser creates a User. The email address must be confirmed before the +// User account can be accessed. +func (c *Client) CreateUser(ctx context.Context, createOpts UserCreateOptions) (*User, error) { + var body string + e, err := c.Users.Endpoint() + if err != nil { + return nil, err + } + + req := c.R(ctx).SetResult(&User{}) + + if bodyData, err := json.Marshal(createOpts); err == nil { + body = string(bodyData) + } else { + return nil, NewError(err) + } + + r, err := coupleAPIErrors(req. + SetBody(body). + Post(e)) + + if err != nil { + return nil, err + } + return r.Result().(*User).fixDates(), nil +} + +// UpdateUser updates the User with the specified id +func (c *Client) UpdateUser(ctx context.Context, id string, updateOpts UserUpdateOptions) (*User, error) { + var body string + e, err := c.Users.Endpoint() + if err != nil { + return nil, err + } + e = fmt.Sprintf("%s/%s", e, id) + + req := c.R(ctx).SetResult(&User{}) + + if bodyData, err := json.Marshal(updateOpts); err == nil { + body = string(bodyData) + } else { + return nil, NewError(err) + } + + r, err := coupleAPIErrors(req. + SetBody(body). + Put(e)) + + if err != nil { + return nil, err + } + return r.Result().(*User).fixDates(), nil +} + +// DeleteUser deletes the User with the specified id +func (c *Client) DeleteUser(ctx context.Context, id string) error { + e, err := c.Users.Endpoint() + if err != nil { + return err + } + e = fmt.Sprintf("%s/%s", e, id) + + _, err = coupleAPIErrors(c.R(ctx).Delete(e)) + return err +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/client.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/client.go new file mode 100644 index 000000000..224a496de --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/client.go @@ -0,0 +1,257 @@ +package linodego + +import ( + "context" + "fmt" + "log" + "net/http" + "os" + "strconv" + "time" + + "gopkg.in/resty.v1" +) + +const ( + // APIHost Linode API hostname + APIHost = "api.linode.com" + // APIVersion Linode API version + APIVersion = "v4" + // APIProto connect to API with http(s) + APIProto = "https" + // Version of linodego + Version = "0.7.0" + // APIEnvVar environment var to check for API token + APIEnvVar = "LINODE_TOKEN" + // APISecondsPerPoll how frequently to poll for new Events or Status in WaitFor functions + APISecondsPerPoll = 3 + // DefaultUserAgent is the default User-Agent sent in HTTP request headers + DefaultUserAgent = "linodego " + Version + " https://github.com/linode/linodego" +) + +var ( + envDebug = false +) + +// Client is a wrapper around the Resty client +type Client struct { + resty *resty.Client + userAgent string + resources map[string]*Resource + debug bool + + millisecondsPerPoll time.Duration + + Images *Resource + InstanceDisks *Resource + InstanceConfigs *Resource + InstanceSnapshots *Resource + InstanceIPs *Resource + InstanceVolumes *Resource + Instances *Resource + IPAddresses *Resource + IPv6Pools *Resource + IPv6Ranges *Resource + Regions *Resource + StackScripts *Resource + Volumes *Resource + Kernels *Resource + Types *Resource + Domains *Resource + DomainRecords *Resource + Longview *Resource + LongviewClients *Resource + LongviewSubscriptions *Resource + NodeBalancers *Resource + NodeBalancerConfigs *Resource + NodeBalancerNodes *Resource + SSHKeys *Resource + Tickets *Resource + Tokens *Resource + Token *Resource + Account *Resource + Invoices *Resource + InvoiceItems *Resource + Events *Resource + Notifications *Resource + Profile *Resource + Managed *Resource + Tags *Resource + Users *Resource +} + +func init() { + // Wether or not we will enable Resty debugging output + if apiDebug, ok := os.LookupEnv("LINODE_DEBUG"); ok { + if parsed, err := strconv.ParseBool(apiDebug); err == nil { + envDebug = parsed + log.Println("[INFO] LINODE_DEBUG being set to", envDebug) + } else { + log.Println("[WARN] LINODE_DEBUG should be an integer, 0 or 1") + } + } + +} + +// SetUserAgent sets a custom user-agent for HTTP requests +func (c *Client) SetUserAgent(ua string) *Client { + c.userAgent = ua + c.resty.SetHeader("User-Agent", c.userAgent) + + return c +} + +// R wraps resty's R method +func (c *Client) R(ctx context.Context) *resty.Request { + return c.resty.R(). + ExpectContentType("application/json"). + SetHeader("Content-Type", "application/json"). + SetContext(ctx). + SetError(APIError{}) +} + +// SetDebug sets the debug on resty's client +func (c *Client) SetDebug(debug bool) *Client { + c.debug = debug + c.resty.SetDebug(debug) + return c +} + +// SetBaseURL sets the base URL of the Linode v4 API (https://api.linode.com/v4) +func (c *Client) SetBaseURL(url string) *Client { + c.resty.SetHostURL(url) + return c +} + +// SetPollDelay sets the number of milliseconds to wait between events or status polls. +// Affects all WaitFor* functions. +func (c *Client) SetPollDelay(delay time.Duration) *Client { + c.millisecondsPerPoll = delay + return c +} + +// Resource looks up a resource by name +func (c Client) Resource(resourceName string) *Resource { + selectedResource, ok := c.resources[resourceName] + if !ok { + log.Fatalf("Could not find resource named '%s', exiting.", resourceName) + } + return selectedResource +} + +// NewClient factory to create new Client struct +func NewClient(hc *http.Client) (client Client) { + restyClient := resty.NewWithClient(hc) + client.resty = restyClient + client.SetUserAgent(DefaultUserAgent) + client.SetBaseURL(fmt.Sprintf("%s://%s/%s", APIProto, APIHost, APIVersion)) + client.SetPollDelay(1000 * APISecondsPerPoll) + + resources := map[string]*Resource{ + stackscriptsName: NewResource(&client, stackscriptsName, stackscriptsEndpoint, false, Stackscript{}, StackscriptsPagedResponse{}), + imagesName: NewResource(&client, imagesName, imagesEndpoint, false, Image{}, ImagesPagedResponse{}), + instancesName: NewResource(&client, instancesName, instancesEndpoint, false, Instance{}, InstancesPagedResponse{}), + instanceDisksName: NewResource(&client, instanceDisksName, instanceDisksEndpoint, true, InstanceDisk{}, InstanceDisksPagedResponse{}), + instanceConfigsName: NewResource(&client, instanceConfigsName, instanceConfigsEndpoint, true, InstanceConfig{}, InstanceConfigsPagedResponse{}), + instanceSnapshotsName: NewResource(&client, instanceSnapshotsName, instanceSnapshotsEndpoint, true, InstanceSnapshot{}, nil), + instanceIPsName: NewResource(&client, instanceIPsName, instanceIPsEndpoint, true, InstanceIP{}, nil), // really? + instanceVolumesName: NewResource(&client, instanceVolumesName, instanceVolumesEndpoint, true, nil, InstanceVolumesPagedResponse{}), // really? + ipaddressesName: NewResource(&client, ipaddressesName, ipaddressesEndpoint, false, nil, IPAddressesPagedResponse{}), // really? + ipv6poolsName: NewResource(&client, ipv6poolsName, ipv6poolsEndpoint, false, nil, IPv6PoolsPagedResponse{}), // really? + ipv6rangesName: NewResource(&client, ipv6rangesName, ipv6rangesEndpoint, false, IPv6Range{}, IPv6RangesPagedResponse{}), + regionsName: NewResource(&client, regionsName, regionsEndpoint, false, Region{}, RegionsPagedResponse{}), + volumesName: NewResource(&client, volumesName, volumesEndpoint, false, Volume{}, VolumesPagedResponse{}), + kernelsName: NewResource(&client, kernelsName, kernelsEndpoint, false, LinodeKernel{}, LinodeKernelsPagedResponse{}), + typesName: NewResource(&client, typesName, typesEndpoint, false, LinodeType{}, LinodeTypesPagedResponse{}), + domainsName: NewResource(&client, domainsName, domainsEndpoint, false, Domain{}, DomainsPagedResponse{}), + domainRecordsName: NewResource(&client, domainRecordsName, domainRecordsEndpoint, true, DomainRecord{}, DomainRecordsPagedResponse{}), + longviewName: NewResource(&client, longviewName, longviewEndpoint, false, nil, nil), // really? + longviewclientsName: NewResource(&client, longviewclientsName, longviewclientsEndpoint, false, LongviewClient{}, LongviewClientsPagedResponse{}), + longviewsubscriptionsName: NewResource(&client, longviewsubscriptionsName, longviewsubscriptionsEndpoint, false, LongviewSubscription{}, LongviewSubscriptionsPagedResponse{}), + nodebalancersName: NewResource(&client, nodebalancersName, nodebalancersEndpoint, false, NodeBalancer{}, NodeBalancerConfigsPagedResponse{}), + nodebalancerconfigsName: NewResource(&client, nodebalancerconfigsName, nodebalancerconfigsEndpoint, true, NodeBalancerConfig{}, NodeBalancerConfigsPagedResponse{}), + nodebalancernodesName: NewResource(&client, nodebalancernodesName, nodebalancernodesEndpoint, true, NodeBalancerNode{}, NodeBalancerNodesPagedResponse{}), + notificationsName: NewResource(&client, notificationsName, notificationsEndpoint, false, Notification{}, NotificationsPagedResponse{}), + sshkeysName: NewResource(&client, sshkeysName, sshkeysEndpoint, false, SSHKey{}, SSHKeysPagedResponse{}), + ticketsName: NewResource(&client, ticketsName, ticketsEndpoint, false, Ticket{}, TicketsPagedResponse{}), + tokensName: NewResource(&client, tokensName, tokensEndpoint, false, Token{}, TokensPagedResponse{}), + accountName: NewResource(&client, accountName, accountEndpoint, false, Account{}, nil), // really? + eventsName: NewResource(&client, eventsName, eventsEndpoint, false, Event{}, EventsPagedResponse{}), + invoicesName: NewResource(&client, invoicesName, invoicesEndpoint, false, Invoice{}, InvoicesPagedResponse{}), + invoiceItemsName: NewResource(&client, invoiceItemsName, invoiceItemsEndpoint, true, InvoiceItem{}, InvoiceItemsPagedResponse{}), + profileName: NewResource(&client, profileName, profileEndpoint, false, nil, nil), // really? + managedName: NewResource(&client, managedName, managedEndpoint, false, nil, nil), // really? + tagsName: NewResource(&client, tagsName, tagsEndpoint, false, Tag{}, TagsPagedResponse{}), + usersName: NewResource(&client, usersName, usersEndpoint, false, User{}, UsersPagedResponse{}), + } + + client.resources = resources + + client.SetDebug(envDebug) + client.Images = resources[imagesName] + client.StackScripts = resources[stackscriptsName] + client.Instances = resources[instancesName] + client.Regions = resources[regionsName] + client.InstanceDisks = resources[instanceDisksName] + client.InstanceConfigs = resources[instanceConfigsName] + client.InstanceSnapshots = resources[instanceSnapshotsName] + client.InstanceIPs = resources[instanceIPsName] + client.InstanceVolumes = resources[instanceVolumesName] + client.IPAddresses = resources[ipaddressesName] + client.IPv6Pools = resources[ipv6poolsName] + client.IPv6Ranges = resources[ipv6rangesName] + client.Volumes = resources[volumesName] + client.Kernels = resources[kernelsName] + client.Types = resources[typesName] + client.Domains = resources[domainsName] + client.DomainRecords = resources[domainRecordsName] + client.Longview = resources[longviewName] + client.LongviewSubscriptions = resources[longviewsubscriptionsName] + client.NodeBalancers = resources[nodebalancersName] + client.NodeBalancerConfigs = resources[nodebalancerconfigsName] + client.NodeBalancerNodes = resources[nodebalancernodesName] + client.Notifications = resources[notificationsName] + client.SSHKeys = resources[sshkeysName] + client.Tickets = resources[ticketsName] + client.Tokens = resources[tokensName] + client.Account = resources[accountName] + client.Events = resources[eventsName] + client.Invoices = resources[invoicesName] + client.Profile = resources[profileName] + client.Managed = resources[managedName] + client.Tags = resources[tagsName] + client.Users = resources[usersName] + return +} + +func copyBool(bPtr *bool) *bool { + if bPtr == nil { + return nil + } + var t = *bPtr + return &t +} + +func copyInt(iPtr *int) *int { + if iPtr == nil { + return nil + } + var t = *iPtr + return &t +} + +func copyString(sPtr *string) *string { + if sPtr == nil { + return nil + } + var t = *sPtr + return &t +} + +func copyTime(tPtr *time.Time) *time.Time { + if tPtr == nil { + return nil + } + var t = *tPtr + return &t +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/domain_records.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/domain_records.go new file mode 100644 index 000000000..215ac8004 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/domain_records.go @@ -0,0 +1,195 @@ +package linodego + +import ( + "context" + "encoding/json" + "fmt" +) + +// DomainRecord represents a DomainRecord object +type DomainRecord struct { + ID int `json:"id"` + Type DomainRecordType `json:"type"` + Name string `json:"name"` + Target string `json:"target"` + Priority int `json:"priority"` + Weight int `json:"weight"` + Port int `json:"port"` + Service *string `json:"service"` + Protocol *string `json:"protocol"` + TTLSec int `json:"ttl_sec"` + Tag *string `json:"tag"` +} + +// DomainRecordCreateOptions fields are those accepted by CreateDomainRecord +type DomainRecordCreateOptions struct { + Type DomainRecordType `json:"type"` + Name string `json:"name"` + Target string `json:"target"` + Priority *int `json:"priority,omitempty"` + Weight *int `json:"weight,omitempty"` + Port *int `json:"port,omitempty"` + Service *string `json:"service,omitempty"` + Protocol *string `json:"protocol,omitempty"` + TTLSec int `json:"ttl_sec,omitempty"` // 0 is not accepted by Linode, so can be omitted + Tag *string `json:"tag,omitempty"` +} + +// DomainRecordUpdateOptions fields are those accepted by UpdateDomainRecord +type DomainRecordUpdateOptions struct { + Type DomainRecordType `json:"type,omitempty"` + Name string `json:"name,omitempty"` + Target string `json:"target,omitempty"` + Priority *int `json:"priority,omitempty"` // 0 is valid, so omit only nil values + Weight *int `json:"weight,omitempty"` // 0 is valid, so omit only nil values + Port *int `json:"port,omitempty"` // 0 is valid to spec, so omit only nil values + Service *string `json:"service,omitempty"` + Protocol *string `json:"protocol,omitempty"` + TTLSec int `json:"ttl_sec,omitempty"` // 0 is not accepted by Linode, so can be omitted + Tag *string `json:"tag,omitempty"` +} + +// DomainRecordType constants start with RecordType and include Linode API Domain Record Types +type DomainRecordType string + +// DomainRecordType contants are the DNS record types a DomainRecord can assign +const ( + RecordTypeA DomainRecordType = "A" + RecordTypeAAAA DomainRecordType = "AAAA" + RecordTypeNS DomainRecordType = "NS" + RecordTypeMX DomainRecordType = "MX" + RecordTypeCNAME DomainRecordType = "CNAME" + RecordTypeTXT DomainRecordType = "TXT" + RecordTypeSRV DomainRecordType = "SRV" + RecordTypePTR DomainRecordType = "PTR" + RecordTypeCAA DomainRecordType = "CAA" +) + +// GetUpdateOptions converts a DomainRecord to DomainRecordUpdateOptions for use in UpdateDomainRecord +func (d DomainRecord) GetUpdateOptions() (du DomainRecordUpdateOptions) { + du.Type = d.Type + du.Name = d.Name + du.Target = d.Target + du.Priority = copyInt(&d.Priority) + du.Weight = copyInt(&d.Weight) + du.Port = copyInt(&d.Port) + du.Service = copyString(d.Service) + du.Protocol = copyString(d.Protocol) + du.TTLSec = d.TTLSec + du.Tag = copyString(d.Tag) + return +} + +// DomainRecordsPagedResponse represents a paginated DomainRecord API response +type DomainRecordsPagedResponse struct { + *PageOptions + Data []DomainRecord `json:"data"` +} + +// endpoint gets the endpoint URL for InstanceConfig +func (DomainRecordsPagedResponse) endpointWithID(c *Client, id int) string { + endpoint, err := c.DomainRecords.endpointWithID(id) + if err != nil { + panic(err) + } + return endpoint +} + +// appendData appends DomainRecords when processing paginated DomainRecord responses +func (resp *DomainRecordsPagedResponse) appendData(r *DomainRecordsPagedResponse) { + resp.Data = append(resp.Data, r.Data...) +} + +// ListDomainRecords lists DomainRecords +func (c *Client) ListDomainRecords(ctx context.Context, domainID int, opts *ListOptions) ([]DomainRecord, error) { + response := DomainRecordsPagedResponse{} + err := c.listHelperWithID(ctx, &response, domainID, opts) + if err != nil { + return nil, err + } + return response.Data, nil +} + +// fixDates converts JSON timestamps to Go time.Time values +func (d *DomainRecord) fixDates() *DomainRecord { + return d +} + +// GetDomainRecord gets the domainrecord with the provided ID +func (c *Client) GetDomainRecord(ctx context.Context, domainID int, id int) (*DomainRecord, error) { + e, err := c.DomainRecords.endpointWithID(domainID) + if err != nil { + return nil, err + } + e = fmt.Sprintf("%s/%d", e, id) + r, err := coupleAPIErrors(c.R(ctx).SetResult(&DomainRecord{}).Get(e)) + if err != nil { + return nil, err + } + return r.Result().(*DomainRecord), nil +} + +// CreateDomainRecord creates a DomainRecord +func (c *Client) CreateDomainRecord(ctx context.Context, domainID int, domainrecord DomainRecordCreateOptions) (*DomainRecord, error) { + var body string + e, err := c.DomainRecords.endpointWithID(domainID) + if err != nil { + return nil, err + } + + req := c.R(ctx).SetResult(&DomainRecord{}) + + bodyData, err := json.Marshal(domainrecord) + if err != nil { + return nil, NewError(err) + } + body = string(bodyData) + + r, err := coupleAPIErrors(req. + SetBody(body). + Post(e)) + + if err != nil { + return nil, err + } + return r.Result().(*DomainRecord).fixDates(), nil +} + +// UpdateDomainRecord updates the DomainRecord with the specified id +func (c *Client) UpdateDomainRecord(ctx context.Context, domainID int, id int, domainrecord DomainRecordUpdateOptions) (*DomainRecord, error) { + var body string + e, err := c.DomainRecords.endpointWithID(domainID) + if err != nil { + return nil, err + } + e = fmt.Sprintf("%s/%d", e, id) + + req := c.R(ctx).SetResult(&DomainRecord{}) + + if bodyData, err := json.Marshal(domainrecord); err == nil { + body = string(bodyData) + } else { + return nil, NewError(err) + } + + r, err := coupleAPIErrors(req. + SetBody(body). + Put(e)) + + if err != nil { + return nil, err + } + return r.Result().(*DomainRecord).fixDates(), nil +} + +// DeleteDomainRecord deletes the DomainRecord with the specified id +func (c *Client) DeleteDomainRecord(ctx context.Context, domainID int, id int) error { + e, err := c.DomainRecords.endpointWithID(domainID) + if err != nil { + return err + } + e = fmt.Sprintf("%s/%d", e, id) + + _, err = coupleAPIErrors(c.R(ctx).Delete(e)) + return err +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/domains.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/domains.go new file mode 100644 index 000000000..43e4a65f5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/domains.go @@ -0,0 +1,295 @@ +package linodego + +import ( + "context" + "encoding/json" + "fmt" +) + +// Domain represents a Domain object +type Domain struct { + // This Domain's unique ID + ID int `json:"id"` + + // The domain this Domain represents. These must be unique in our system; you cannot have two Domains representing the same domain. + Domain string `json:"domain"` + + // If this Domain represents the authoritative source of information for the domain it describes, or if it is a read-only copy of a master (also called a slave). + Type DomainType `json:"type"` // Enum:"master" "slave" + + // Deprecated: The group this Domain belongs to. This is for display purposes only. + Group string `json:"group"` + + // Used to control whether this Domain is currently being rendered. + Status DomainStatus `json:"status"` // Enum:"disabled" "active" "edit_mode" "has_errors" + + // A description for this Domain. This is for display purposes only. + Description string `json:"description"` + + // Start of Authority email address. This is required for master Domains. + SOAEmail string `json:"soa_email"` + + // The interval, in seconds, at which a failed refresh should be retried. + // Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value. + RetrySec int `json:"retry_sec"` + + // The IP addresses representing the master DNS for this Domain. + MasterIPs []string `json:"master_ips"` + + // The list of IPs that may perform a zone transfer for this Domain. This is potentially dangerous, and should be set to an empty list unless you intend to use it. + AXfrIPs []string `json:"axfr_ips"` + + // An array of tags applied to this object. Tags are for organizational purposes only. + Tags []string `json:"tags"` + + // The amount of time in seconds that may pass before this Domain is no longer authoritative. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value. + ExpireSec int `json:"expire_sec"` + + // The amount of time in seconds before this Domain should be refreshed. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value. + RefreshSec int `json:"refresh_sec"` + + // "Time to Live" - the amount of time in seconds that this Domain's records may be cached by resolvers or other domain servers. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value. + TTLSec int `json:"ttl_sec"` +} + +// DomainCreateOptions fields are those accepted by CreateDomain +type DomainCreateOptions struct { + // The domain this Domain represents. These must be unique in our system; you cannot have two Domains representing the same domain. + Domain string `json:"domain"` + + // If this Domain represents the authoritative source of information for the domain it describes, or if it is a read-only copy of a master (also called a slave). + // Enum:"master" "slave" + Type DomainType `json:"type"` + + // Deprecated: The group this Domain belongs to. This is for display purposes only. + Group string `json:"group,omitempty"` + + // Used to control whether this Domain is currently being rendered. + // Enum:"disabled" "active" "edit_mode" "has_errors" + Status DomainStatus `json:"status,omitempty"` + + // A description for this Domain. This is for display purposes only. + Description string `json:"description,omitempty"` + + // Start of Authority email address. This is required for master Domains. + SOAEmail string `json:"soa_email,omitempty"` + + // The interval, in seconds, at which a failed refresh should be retried. + // Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value. + RetrySec int `json:"retry_sec,omitempty"` + + // The IP addresses representing the master DNS for this Domain. + MasterIPs []string `json:"master_ips,omitempty"` + + // The list of IPs that may perform a zone transfer for this Domain. This is potentially dangerous, and should be set to an empty list unless you intend to use it. + AXfrIPs []string `json:"axfr_ips,omitempty"` + + // An array of tags applied to this object. Tags are for organizational purposes only. + Tags []string `json:"tags"` + + // The amount of time in seconds that may pass before this Domain is no longer authoritative. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value. + ExpireSec int `json:"expire_sec,omitempty"` + + // The amount of time in seconds before this Domain should be refreshed. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value. + RefreshSec int `json:"refresh_sec,omitempty"` + + // "Time to Live" - the amount of time in seconds that this Domain's records may be cached by resolvers or other domain servers. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value. + TTLSec int `json:"ttl_sec,omitempty"` +} + +// DomainUpdateOptions converts a Domain to DomainUpdateOptions for use in UpdateDomain +type DomainUpdateOptions struct { + // The domain this Domain represents. These must be unique in our system; you cannot have two Domains representing the same domain. + Domain string `json:"domain,omitempty"` + + // If this Domain represents the authoritative source of information for the domain it describes, or if it is a read-only copy of a master (also called a slave). + // Enum:"master" "slave" + Type DomainType `json:"type,omitempty"` + + // Deprecated: The group this Domain belongs to. This is for display purposes only. + Group string `json:"group,omitempty"` + + // Used to control whether this Domain is currently being rendered. + // Enum:"disabled" "active" "edit_mode" "has_errors" + Status DomainStatus `json:"status,omitempty"` + + // A description for this Domain. This is for display purposes only. + Description string `json:"description,omitempty"` + + // Start of Authority email address. This is required for master Domains. + SOAEmail string `json:"soa_email,omitempty"` + + // The interval, in seconds, at which a failed refresh should be retried. + // Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value. + RetrySec int `json:"retry_sec,omitempty"` + + // The IP addresses representing the master DNS for this Domain. + MasterIPs []string `json:"master_ips,omitempty"` + + // The list of IPs that may perform a zone transfer for this Domain. This is potentially dangerous, and should be set to an empty list unless you intend to use it. + AXfrIPs []string `json:"axfr_ips,omitempty"` + + // An array of tags applied to this object. Tags are for organizational purposes only. + Tags []string `json:"tags"` + + // The amount of time in seconds that may pass before this Domain is no longer authoritative. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value. + ExpireSec int `json:"expire_sec,omitempty"` + + // The amount of time in seconds before this Domain should be refreshed. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value. + RefreshSec int `json:"refresh_sec,omitempty"` + + // "Time to Live" - the amount of time in seconds that this Domain's records may be cached by resolvers or other domain servers. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value. + TTLSec int `json:"ttl_sec,omitempty"` +} + +// DomainType constants start with DomainType and include Linode API Domain Type values +type DomainType string + +// DomainType constants reflect the DNS zone type of a Domain +const ( + DomainTypeMaster DomainType = "master" + DomainTypeSlave DomainType = "slave" +) + +// DomainStatus constants start with DomainStatus and include Linode API Domain Status values +type DomainStatus string + +// DomainStatus constants reflect the current status of a Domain +const ( + DomainStatusDisabled DomainStatus = "disabled" + DomainStatusActive DomainStatus = "active" + DomainStatusEditMode DomainStatus = "edit_mode" + DomainStatusHasErrors DomainStatus = "has_errors" +) + +// GetUpdateOptions converts a Domain to DomainUpdateOptions for use in UpdateDomain +func (d Domain) GetUpdateOptions() (du DomainUpdateOptions) { + du.Domain = d.Domain + du.Type = d.Type + du.Group = d.Group + du.Status = d.Status + du.Description = d.Description + du.SOAEmail = d.SOAEmail + du.RetrySec = d.RetrySec + du.MasterIPs = d.MasterIPs + du.AXfrIPs = d.AXfrIPs + du.Tags = d.Tags + du.ExpireSec = d.ExpireSec + du.RefreshSec = d.RefreshSec + du.TTLSec = d.TTLSec + return +} + +// DomainsPagedResponse represents a paginated Domain API response +type DomainsPagedResponse struct { + *PageOptions + Data []Domain `json:"data"` +} + +// endpoint gets the endpoint URL for Domain +func (DomainsPagedResponse) endpoint(c *Client) string { + endpoint, err := c.Domains.Endpoint() + if err != nil { + panic(err) + } + return endpoint +} + +// appendData appends Domains when processing paginated Domain responses +func (resp *DomainsPagedResponse) appendData(r *DomainsPagedResponse) { + resp.Data = append(resp.Data, r.Data...) +} + +// ListDomains lists Domains +func (c *Client) ListDomains(ctx context.Context, opts *ListOptions) ([]Domain, error) { + response := DomainsPagedResponse{} + err := c.listHelper(ctx, &response, opts) + if err != nil { + return nil, err + } + return response.Data, nil +} + +// fixDates converts JSON timestamps to Go time.Time values +func (d *Domain) fixDates() *Domain { + return d +} + +// GetDomain gets the domain with the provided ID +func (c *Client) GetDomain(ctx context.Context, id int) (*Domain, error) { + e, err := c.Domains.Endpoint() + if err != nil { + return nil, err + } + e = fmt.Sprintf("%s/%d", e, id) + r, err := coupleAPIErrors(c.R(ctx).SetResult(&Domain{}).Get(e)) + if err != nil { + return nil, err + } + return r.Result().(*Domain).fixDates(), nil +} + +// CreateDomain creates a Domain +func (c *Client) CreateDomain(ctx context.Context, domain DomainCreateOptions) (*Domain, error) { + var body string + e, err := c.Domains.Endpoint() + if err != nil { + return nil, err + } + + req := c.R(ctx).SetResult(&Domain{}) + + bodyData, err := json.Marshal(domain) + if err != nil { + return nil, NewError(err) + } + body = string(bodyData) + + r, err := coupleAPIErrors(req. + SetBody(body). + Post(e)) + + if err != nil { + return nil, err + } + return r.Result().(*Domain).fixDates(), nil +} + +// UpdateDomain updates the Domain with the specified id +func (c *Client) UpdateDomain(ctx context.Context, id int, domain DomainUpdateOptions) (*Domain, error) { + var body string + e, err := c.Domains.Endpoint() + if err != nil { + return nil, err + } + e = fmt.Sprintf("%s/%d", e, id) + + req := c.R(ctx).SetResult(&Domain{}) + + if bodyData, err := json.Marshal(domain); err == nil { + body = string(bodyData) + } else { + return nil, NewError(err) + } + + r, err := coupleAPIErrors(req. + SetBody(body). + Put(e)) + + if err != nil { + return nil, err + } + return r.Result().(*Domain).fixDates(), nil +} + +// DeleteDomain deletes the Domain with the specified id +func (c *Client) DeleteDomain(ctx context.Context, id int) error { + e, err := c.Domains.Endpoint() + if err != nil { + return err + } + e = fmt.Sprintf("%s/%d", e, id) + + _, err = coupleAPIErrors(c.R(ctx).Delete(e)) + return err +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/env.sample b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/env.sample new file mode 100644 index 000000000..b1c9d1803 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/env.sample @@ -0,0 +1,2 @@ +LINODE_TOKEN= +LINODE_DEBUG=0 diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/errors.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/errors.go new file mode 100644 index 000000000..9ceb881a2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/errors.go @@ -0,0 +1,109 @@ +package linodego + +import ( + "fmt" + "log" + "net/http" + "strings" + + "gopkg.in/resty.v1" +) + +const ( + // ErrorFromString is the Code identifying Errors created by string types + ErrorFromString = 1 + // ErrorFromError is the Code identifying Errors created by error types + ErrorFromError = 2 + // ErrorFromStringer is the Code identifying Errors created by fmt.Stringer types + ErrorFromStringer = 3 +) + +// Error wraps the LinodeGo error with the relevant http.Response +type Error struct { + Response *http.Response + Code int + Message string +} + +// APIErrorReason is an individual invalid request message returned by the Linode API +type APIErrorReason struct { + Reason string `json:"reason"` + Field string `json:"field"` +} + +func (r APIErrorReason) Error() string { + if len(r.Field) == 0 { + return r.Reason + } + return fmt.Sprintf("[%s] %s", r.Field, r.Reason) +} + +// APIError is the error-set returned by the Linode API when presented with an invalid request +type APIError struct { + Errors []APIErrorReason `json:"errors"` +} + +func coupleAPIErrors(r *resty.Response, err error) (*resty.Response, error) { + if err != nil { + return nil, NewError(err) + } + + if r.Error() != nil { + apiError, ok := r.Error().(*APIError) + if !ok || (ok && len(apiError.Errors) == 0) { + return r, nil + } + return nil, NewError(r) + } + + return r, nil +} + +func (e APIError) Error() string { + var x []string + for _, msg := range e.Errors { + x = append(x, msg.Error()) + } + return strings.Join(x, "; ") +} + +func (g Error) Error() string { + return fmt.Sprintf("[%03d] %s", g.Code, g.Message) +} + +// NewError creates a linodego.Error with a Code identifying the source err type, +// - ErrorFromString (1) from a string +// - ErrorFromError (2) for an error +// - ErrorFromStringer (3) for a Stringer +// - HTTP Status Codes (100-600) for a resty.Response object +func NewError(err interface{}) *Error { + if err == nil { + return nil + } + + switch e := err.(type) { + case *Error: + return e + case *resty.Response: + apiError, ok := e.Error().(*APIError) + + if !ok { + log.Fatalln("Unexpected Resty Error Response") + } + + return &Error{ + Code: e.RawResponse.StatusCode, + Message: apiError.Error(), + Response: e.RawResponse, + } + case error: + return &Error{Code: ErrorFromError, Message: e.Error()} + case string: + return &Error{Code: ErrorFromString, Message: e} + case fmt.Stringer: + return &Error{Code: ErrorFromStringer, Message: e.String()} + default: + log.Fatalln("Unsupported type to linodego.NewError") + panic(err) + } +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/images.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/images.go new file mode 100644 index 000000000..979ce2ed1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/images.go @@ -0,0 +1,168 @@ +package linodego + +import ( + "context" + "encoding/json" + "fmt" + "time" +) + +// Image represents a deployable Image object for use with Linode Instances +type Image struct { + CreatedStr string `json:"created"` + ExpiryStr string `json:"expiry"` + ID string `json:"id"` + CreatedBy string `json:"created_by"` + Label string `json:"label"` + Description string `json:"description"` + Type string `json:"type"` + Vendor string `json:"vendor"` + Size int `json:"size"` + IsPublic bool `json:"is_public"` + Deprecated bool `json:"deprecated"` + + Created *time.Time `json:"-"` + Expiry *time.Time `json:"-"` +} + +// ImageCreateOptions fields are those accepted by CreateImage +type ImageCreateOptions struct { + DiskID int `json:"disk_id"` + Label string `json:"label"` + Description string `json:"description,omitempty"` +} + +// ImageUpdateOptions fields are those accepted by UpdateImage +type ImageUpdateOptions struct { + Label string `json:"label,omitempty"` + Description *string `json:"description,omitempty"` +} + +func (i *Image) fixDates() *Image { + i.Created, _ = parseDates(i.CreatedStr) + + if len(i.ExpiryStr) > 0 { + i.Expiry, _ = parseDates(i.ExpiryStr) + } else { + i.Expiry = nil + } + return i +} + +// GetUpdateOptions converts an Image to ImageUpdateOptions for use in UpdateImage +func (i Image) GetUpdateOptions() (iu ImageUpdateOptions) { + iu.Label = i.Label + iu.Description = copyString(&i.Description) + return +} + +// ImagesPagedResponse represents a linode API response for listing of images +type ImagesPagedResponse struct { + *PageOptions + Data []Image `json:"data"` +} + +func (ImagesPagedResponse) endpoint(c *Client) string { + endpoint, err := c.Images.Endpoint() + if err != nil { + panic(err) + } + return endpoint +} + +func (resp *ImagesPagedResponse) appendData(r *ImagesPagedResponse) { + resp.Data = append(resp.Data, r.Data...) +} + +// ListImages lists Images +func (c *Client) ListImages(ctx context.Context, opts *ListOptions) ([]Image, error) { + response := ImagesPagedResponse{} + err := c.listHelper(ctx, &response, opts) + for i := range response.Data { + response.Data[i].fixDates() + } + if err != nil { + return nil, err + } + return response.Data, nil + +} + +// GetImage gets the Image with the provided ID +func (c *Client) GetImage(ctx context.Context, id string) (*Image, error) { + e, err := c.Images.Endpoint() + if err != nil { + return nil, err + } + e = fmt.Sprintf("%s/%s", e, id) + r, err := coupleAPIErrors(c.Images.R(ctx).Get(e)) + if err != nil { + return nil, err + } + return r.Result().(*Image).fixDates(), nil +} + +// CreateImage creates a Image +func (c *Client) CreateImage(ctx context.Context, createOpts ImageCreateOptions) (*Image, error) { + var body string + e, err := c.Images.Endpoint() + if err != nil { + return nil, err + } + + req := c.R(ctx).SetResult(&Image{}) + + if bodyData, err := json.Marshal(createOpts); err == nil { + body = string(bodyData) + } else { + return nil, NewError(err) + } + + r, err := coupleAPIErrors(req. + SetBody(body). + Post(e)) + + if err != nil { + return nil, err + } + return r.Result().(*Image).fixDates(), nil +} + +// UpdateImage updates the Image with the specified id +func (c *Client) UpdateImage(ctx context.Context, id string, updateOpts ImageUpdateOptions) (*Image, error) { + var body string + e, err := c.Images.Endpoint() + if err != nil { + return nil, err + } + e = fmt.Sprintf("%s/%s", e, id) + + req := c.R(ctx).SetResult(&Image{}) + + if bodyData, err := json.Marshal(updateOpts); err == nil { + body = string(bodyData) + } else { + return nil, NewError(err) + } + + r, err := coupleAPIErrors(req. + SetBody(body). + Put(e)) + + if err != nil { + return nil, err + } + return r.Result().(*Image).fixDates(), nil +} + +// DeleteImage deletes the Image with the specified id +func (c *Client) DeleteImage(ctx context.Context, id string) error { + e, err := c.Images.Endpoint() + if err != nil { + return err + } + e = fmt.Sprintf("%s/%s", e, id) + + _, err = coupleAPIErrors(c.R(ctx).Delete(e)) + return err +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/instance_configs.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/instance_configs.go new file mode 100644 index 000000000..979a27495 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/instance_configs.go @@ -0,0 +1,246 @@ +package linodego + +import ( + "context" + "encoding/json" + "fmt" + "time" +) + +// InstanceConfig represents all of the settings that control the boot and run configuration of a Linode Instance +type InstanceConfig struct { + CreatedStr string `json:"created"` + UpdatedStr string `json:"updated"` + + ID int `json:"id"` + Label string `json:"label"` + Comments string `json:"comments"` + Devices *InstanceConfigDeviceMap `json:"devices"` + Helpers *InstanceConfigHelpers `json:"helpers"` + MemoryLimit int `json:"memory_limit"` + Kernel string `json:"kernel"` + InitRD *int `json:"init_rd"` + RootDevice string `json:"root_device"` + RunLevel string `json:"run_level"` + VirtMode string `json:"virt_mode"` + Created *time.Time `json:"-"` + Updated *time.Time `json:"-"` +} + +// InstanceConfigDevice contains either the DiskID or VolumeID assigned to a Config Device +type InstanceConfigDevice struct { + DiskID int `json:"disk_id,omitempty"` + VolumeID int `json:"volume_id,omitempty"` +} + +// InstanceConfigDeviceMap contains SDA-SDH InstanceConfigDevice settings +type InstanceConfigDeviceMap struct { + SDA *InstanceConfigDevice `json:"sda,omitempty"` + SDB *InstanceConfigDevice `json:"sdb,omitempty"` + SDC *InstanceConfigDevice `json:"sdc,omitempty"` + SDD *InstanceConfigDevice `json:"sdd,omitempty"` + SDE *InstanceConfigDevice `json:"sde,omitempty"` + SDF *InstanceConfigDevice `json:"sdf,omitempty"` + SDG *InstanceConfigDevice `json:"sdg,omitempty"` + SDH *InstanceConfigDevice `json:"sdh,omitempty"` +} + +// InstanceConfigHelpers are Instance Config options that control Linux distribution specific tweaks +type InstanceConfigHelpers struct { + UpdateDBDisabled bool `json:"updatedb_disabled"` + Distro bool `json:"distro"` + ModulesDep bool `json:"modules_dep"` + Network bool `json:"network"` + DevTmpFsAutomount bool `json:"devtmpfs_automount"` +} + +// InstanceConfigsPagedResponse represents a paginated InstanceConfig API response +type InstanceConfigsPagedResponse struct { + *PageOptions + Data []InstanceConfig `json:"data"` +} + +// InstanceConfigCreateOptions are InstanceConfig settings that can be used at creation +type InstanceConfigCreateOptions struct { + Label string `json:"label,omitempty"` + Comments string `json:"comments,omitempty"` + Devices InstanceConfigDeviceMap `json:"devices"` + Helpers *InstanceConfigHelpers `json:"helpers,omitempty"` + MemoryLimit int `json:"memory_limit,omitempty"` + Kernel string `json:"kernel,omitempty"` + InitRD int `json:"init_rd,omitempty"` + RootDevice *string `json:"root_device,omitempty"` + RunLevel string `json:"run_level,omitempty"` + VirtMode string `json:"virt_mode,omitempty"` +} + +// InstanceConfigUpdateOptions are InstanceConfig settings that can be used in updates +type InstanceConfigUpdateOptions struct { + Label string `json:"label,omitempty"` + Comments string `json:"comments"` + Devices *InstanceConfigDeviceMap `json:"devices,omitempty"` + Helpers *InstanceConfigHelpers `json:"helpers,omitempty"` + // MemoryLimit 0 means unlimitted, this is not omitted + MemoryLimit int `json:"memory_limit"` + Kernel string `json:"kernel,omitempty"` + // InitRD is nullable, permit the sending of null + InitRD *int `json:"init_rd"` + RootDevice string `json:"root_device,omitempty"` + RunLevel string `json:"run_level,omitempty"` + VirtMode string `json:"virt_mode,omitempty"` +} + +// GetCreateOptions converts a InstanceConfig to InstanceConfigCreateOptions for use in CreateInstanceConfig +func (i InstanceConfig) GetCreateOptions() InstanceConfigCreateOptions { + initrd := 0 + if i.InitRD != nil { + initrd = *i.InitRD + } + return InstanceConfigCreateOptions{ + Label: i.Label, + Comments: i.Comments, + Devices: *i.Devices, + Helpers: i.Helpers, + MemoryLimit: i.MemoryLimit, + Kernel: i.Kernel, + InitRD: initrd, + RootDevice: copyString(&i.RootDevice), + RunLevel: i.RunLevel, + VirtMode: i.VirtMode, + } +} + +// GetUpdateOptions converts a InstanceConfig to InstanceConfigUpdateOptions for use in UpdateInstanceConfig +func (i InstanceConfig) GetUpdateOptions() InstanceConfigUpdateOptions { + return InstanceConfigUpdateOptions{ + Label: i.Label, + Comments: i.Comments, + Devices: i.Devices, + Helpers: i.Helpers, + MemoryLimit: i.MemoryLimit, + Kernel: i.Kernel, + InitRD: copyInt(i.InitRD), + RootDevice: i.RootDevice, + RunLevel: i.RunLevel, + VirtMode: i.VirtMode, + } +} + +// endpointWithID gets the endpoint URL for InstanceConfigs of a given Instance +func (InstanceConfigsPagedResponse) endpointWithID(c *Client, id int) string { + endpoint, err := c.InstanceConfigs.endpointWithID(id) + if err != nil { + panic(err) + } + return endpoint +} + +// appendData appends InstanceConfigs when processing paginated InstanceConfig responses +func (resp *InstanceConfigsPagedResponse) appendData(r *InstanceConfigsPagedResponse) { + resp.Data = append(resp.Data, r.Data...) +} + +// ListInstanceConfigs lists InstanceConfigs +func (c *Client) ListInstanceConfigs(ctx context.Context, linodeID int, opts *ListOptions) ([]InstanceConfig, error) { + response := InstanceConfigsPagedResponse{} + err := c.listHelperWithID(ctx, &response, linodeID, opts) + for i := range response.Data { + response.Data[i].fixDates() + } + if err != nil { + return nil, err + } + return response.Data, nil +} + +// fixDates converts JSON timestamps to Go time.Time values +func (i *InstanceConfig) fixDates() *InstanceConfig { + i.Created, _ = parseDates(i.CreatedStr) + i.Updated, _ = parseDates(i.UpdatedStr) + return i +} + +// GetInstanceConfig gets the template with the provided ID +func (c *Client) GetInstanceConfig(ctx context.Context, linodeID int, configID int) (*InstanceConfig, error) { + e, err := c.InstanceConfigs.endpointWithID(linodeID) + if err != nil { + return nil, err + } + e = fmt.Sprintf("%s/%d", e, configID) + r, err := coupleAPIErrors(c.R(ctx).SetResult(&InstanceConfig{}).Get(e)) + if err != nil { + return nil, err + } + return r.Result().(*InstanceConfig).fixDates(), nil +} + +// CreateInstanceConfig creates a new InstanceConfig for the given Instance +func (c *Client) CreateInstanceConfig(ctx context.Context, linodeID int, createOpts InstanceConfigCreateOptions) (*InstanceConfig, error) { + var body string + e, err := c.InstanceConfigs.endpointWithID(linodeID) + if err != nil { + return nil, err + } + + req := c.R(ctx).SetResult(&InstanceConfig{}) + + if bodyData, err := json.Marshal(createOpts); err == nil { + body = string(bodyData) + } else { + return nil, err + } + + r, err := coupleAPIErrors(req. + SetBody(body). + Post(e)) + + if err != nil { + return nil, err + } + + return r.Result().(*InstanceConfig).fixDates(), nil +} + +// UpdateInstanceConfig update an InstanceConfig for the given Instance +func (c *Client) UpdateInstanceConfig(ctx context.Context, linodeID int, configID int, updateOpts InstanceConfigUpdateOptions) (*InstanceConfig, error) { + var body string + e, err := c.InstanceConfigs.endpointWithID(linodeID) + if err != nil { + return nil, err + } + e = fmt.Sprintf("%s/%d", e, configID) + req := c.R(ctx).SetResult(&InstanceConfig{}) + + if bodyData, err := json.Marshal(updateOpts); err == nil { + body = string(bodyData) + } else { + return nil, err + } + + r, err := coupleAPIErrors(req. + SetBody(body). + Put(e)) + + if err != nil { + return nil, err + } + + return r.Result().(*InstanceConfig).fixDates(), nil +} + +// RenameInstanceConfig renames an InstanceConfig +func (c *Client) RenameInstanceConfig(ctx context.Context, linodeID int, configID int, label string) (*InstanceConfig, error) { + return c.UpdateInstanceConfig(ctx, linodeID, configID, InstanceConfigUpdateOptions{Label: label}) +} + +// DeleteInstanceConfig deletes a Linode InstanceConfig +func (c *Client) DeleteInstanceConfig(ctx context.Context, linodeID int, configID int) error { + e, err := c.InstanceConfigs.endpointWithID(linodeID) + if err != nil { + return err + } + e = fmt.Sprintf("%s/%d", e, configID) + + _, err = coupleAPIErrors(c.R(ctx).Delete(e)) + return err +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/instance_disks.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/instance_disks.go new file mode 100644 index 000000000..9b43d6b8d --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/instance_disks.go @@ -0,0 +1,251 @@ +package linodego + +import ( + "context" + "encoding/json" + "fmt" + "time" +) + +// InstanceDisk represents an Instance Disk object +type InstanceDisk struct { + CreatedStr string `json:"created"` + UpdatedStr string `json:"updated"` + + ID int `json:"id"` + Label string `json:"label"` + Status DiskStatus `json:"status"` + Size int `json:"size"` + Filesystem DiskFilesystem `json:"filesystem"` + Created time.Time `json:"-"` + Updated time.Time `json:"-"` +} + +// DiskFilesystem constants start with Filesystem and include Linode API Filesystems +type DiskFilesystem string + +// DiskFilesystem constants represent the filesystems types an Instance Disk may use +const ( + FilesystemRaw DiskFilesystem = "raw" + FilesystemSwap DiskFilesystem = "swap" + FilesystemExt3 DiskFilesystem = "ext3" + FilesystemExt4 DiskFilesystem = "ext4" + FilesystemInitrd DiskFilesystem = "initrd" +) + +// DiskStatus constants have the prefix "Disk" and include Linode API Instance Disk Status +type DiskStatus string + +// DiskStatus constants represent the status values an Instance Disk may have +const ( + DiskReady DiskStatus = "ready" + DiskNotReady DiskStatus = "not ready" + DiskDeleting DiskStatus = "deleting" +) + +// InstanceDisksPagedResponse represents a paginated InstanceDisk API response +type InstanceDisksPagedResponse struct { + *PageOptions + Data []InstanceDisk `json:"data"` +} + +// InstanceDiskCreateOptions are InstanceDisk settings that can be used at creation +type InstanceDiskCreateOptions struct { + Label string `json:"label"` + Size int `json:"size"` + + // Image is optional, but requires RootPass if provided + Image string `json:"image,omitempty"` + RootPass string `json:"root_pass,omitempty"` + + Filesystem string `json:"filesystem,omitempty"` + AuthorizedKeys []string `json:"authorized_keys,omitempty"` + AuthorizedUsers []string `json:"authorized_users,omitempty"` + ReadOnly bool `json:"read_only,omitempty"` + StackscriptID int `json:"stackscript_id,omitempty"` + StackscriptData map[string]string `json:"stackscript_data,omitempty"` +} + +// InstanceDiskUpdateOptions are InstanceDisk settings that can be used in updates +type InstanceDiskUpdateOptions struct { + Label string `json:"label"` + ReadOnly bool `json:"read_only"` +} + +// endpointWithID gets the endpoint URL for InstanceDisks of a given Instance +func (InstanceDisksPagedResponse) endpointWithID(c *Client, id int) string { + endpoint, err := c.InstanceDisks.endpointWithID(id) + if err != nil { + panic(err) + } + return endpoint +} + +// appendData appends InstanceDisks when processing paginated InstanceDisk responses +func (resp *InstanceDisksPagedResponse) appendData(r *InstanceDisksPagedResponse) { + resp.Data = append(resp.Data, r.Data...) +} + +// ListInstanceDisks lists InstanceDisks +func (c *Client) ListInstanceDisks(ctx context.Context, linodeID int, opts *ListOptions) ([]InstanceDisk, error) { + response := InstanceDisksPagedResponse{} + err := c.listHelperWithID(ctx, &response, linodeID, opts) + for i := range response.Data { + response.Data[i].fixDates() + } + if err != nil { + return nil, err + } + return response.Data, nil +} + +// fixDates converts JSON timestamps to Go time.Time values +func (v *InstanceDisk) fixDates() *InstanceDisk { + if created, err := parseDates(v.CreatedStr); err == nil { + v.Created = *created + } + if updated, err := parseDates(v.UpdatedStr); err == nil { + v.Updated = *updated + } + return v +} + +// GetInstanceDisk gets the template with the provided ID +func (c *Client) GetInstanceDisk(ctx context.Context, linodeID int, configID int) (*InstanceDisk, error) { + e, err := c.InstanceDisks.endpointWithID(linodeID) + if err != nil { + return nil, err + } + e = fmt.Sprintf("%s/%d", e, configID) + r, err := coupleAPIErrors(c.R(ctx).SetResult(&InstanceDisk{}).Get(e)) + if err != nil { + return nil, err + } + return r.Result().(*InstanceDisk).fixDates(), nil +} + +// CreateInstanceDisk creates a new InstanceDisk for the given Instance +func (c *Client) CreateInstanceDisk(ctx context.Context, linodeID int, createOpts InstanceDiskCreateOptions) (*InstanceDisk, error) { + var body string + e, err := c.InstanceDisks.endpointWithID(linodeID) + if err != nil { + return nil, err + } + + req := c.R(ctx).SetResult(&InstanceDisk{}) + + if bodyData, err := json.Marshal(createOpts); err == nil { + body = string(bodyData) + } else { + return nil, NewError(err) + } + + r, err := coupleAPIErrors(req. + SetBody(body). + Post(e)) + + if err != nil { + return nil, err + } + + return r.Result().(*InstanceDisk).fixDates(), nil +} + +// UpdateInstanceDisk creates a new InstanceDisk for the given Instance +func (c *Client) UpdateInstanceDisk(ctx context.Context, linodeID int, diskID int, updateOpts InstanceDiskUpdateOptions) (*InstanceDisk, error) { + var body string + e, err := c.InstanceDisks.endpointWithID(linodeID) + if err != nil { + return nil, err + } + e = fmt.Sprintf("%s/%d", e, diskID) + + req := c.R(ctx).SetResult(&InstanceDisk{}) + + if bodyData, err := json.Marshal(updateOpts); err == nil { + body = string(bodyData) + } else { + return nil, NewError(err) + } + + r, err := coupleAPIErrors(req. + SetBody(body). + Put(e)) + + if err != nil { + return nil, err + } + + return r.Result().(*InstanceDisk).fixDates(), nil +} + +// RenameInstanceDisk renames an InstanceDisk +func (c *Client) RenameInstanceDisk(ctx context.Context, linodeID int, diskID int, label string) (*InstanceDisk, error) { + return c.UpdateInstanceDisk(ctx, linodeID, diskID, InstanceDiskUpdateOptions{Label: label}) +} + +// ResizeInstanceDisk resizes the size of the Instance disk +func (c *Client) ResizeInstanceDisk(ctx context.Context, linodeID int, diskID int, size int) error { + var body string + e, err := c.InstanceDisks.endpointWithID(linodeID) + if err != nil { + return err + } + e = fmt.Sprintf("%s/%d/resize", e, diskID) + + req := c.R(ctx).SetResult(&InstanceDisk{}) + updateOpts := map[string]interface{}{ + "size": size, + } + + if bodyData, err := json.Marshal(updateOpts); err == nil { + body = string(bodyData) + } else { + return NewError(err) + } + + _, err = coupleAPIErrors(req. + SetBody(body). + Post(e)) + + return err +} + +// PasswordResetInstanceDisk resets the "root" account password on the Instance disk +func (c *Client) PasswordResetInstanceDisk(ctx context.Context, linodeID int, diskID int, password string) error { + var body string + e, err := c.InstanceDisks.endpointWithID(linodeID) + if err != nil { + return err + } + e = fmt.Sprintf("%s/%d/password", e, diskID) + + req := c.R(ctx).SetResult(&InstanceDisk{}) + updateOpts := map[string]interface{}{ + "password": password, + } + + if bodyData, err := json.Marshal(updateOpts); err == nil { + body = string(bodyData) + } else { + return NewError(err) + } + + _, err = coupleAPIErrors(req. + SetBody(body). + Post(e)) + + return err +} + +// DeleteInstanceDisk deletes a Linode Instance Disk +func (c *Client) DeleteInstanceDisk(ctx context.Context, linodeID int, diskID int) error { + e, err := c.InstanceDisks.endpointWithID(linodeID) + if err != nil { + return err + } + e = fmt.Sprintf("%s/%d", e, diskID) + + _, err = coupleAPIErrors(c.R(ctx).Delete(e)) + return err +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/instance_ips.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/instance_ips.go new file mode 100644 index 000000000..a30d04f16 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/instance_ips.go @@ -0,0 +1,106 @@ +package linodego + +import ( + "context" + "encoding/json" + "fmt" +) + +// InstanceIPAddressResponse contains the IPv4 and IPv6 details for an Instance +type InstanceIPAddressResponse struct { + IPv4 *InstanceIPv4Response `json:"ipv4"` + IPv6 *InstanceIPv6Response `json:"ipv6"` +} + +// InstanceIPv4Response contains the details of all IPv4 addresses associated with an Instance +type InstanceIPv4Response struct { + Public []*InstanceIP `json:"public"` + Private []*InstanceIP `json:"private"` + Shared []*InstanceIP `json:"shared"` +} + +// InstanceIP represents an Instance IP with additional DNS and networking details +type InstanceIP struct { + Address string `json:"address"` + Gateway string `json:"gateway"` + SubnetMask string `json:"subnet_mask"` + Prefix int `json:"prefix"` + Type string `json:"type"` + Public bool `json:"public"` + RDNS string `json:"rdns"` + LinodeID int `json:"linode_id"` + Region string `json:"region"` +} + +// InstanceIPv6Response contains the IPv6 addresses and ranges for an Instance +type InstanceIPv6Response struct { + LinkLocal *InstanceIP `json:"link_local"` + SLAAC *InstanceIP `json:"slaac"` + Global []*IPv6Range `json:"global"` +} + +// IPv6Range represents a range of IPv6 addresses routed to a single Linode in a given Region +type IPv6Range struct { + Range string `json:"range"` + Region string `json:"region"` +} + +// GetInstanceIPAddresses gets the IPAddresses for a Linode instance +func (c *Client) GetInstanceIPAddresses(ctx context.Context, linodeID int) (*InstanceIPAddressResponse, error) { + e, err := c.InstanceIPs.endpointWithID(linodeID) + if err != nil { + return nil, err + } + r, err := coupleAPIErrors(c.R(ctx).SetResult(&InstanceIPAddressResponse{}).Get(e)) + if err != nil { + return nil, err + } + return r.Result().(*InstanceIPAddressResponse), nil +} + +// GetInstanceIPAddress gets the IPAddress for a Linode instance matching a supplied IP address +func (c *Client) GetInstanceIPAddress(ctx context.Context, linodeID int, ipaddress string) (*InstanceIP, error) { + e, err := c.InstanceIPs.endpointWithID(linodeID) + if err != nil { + return nil, err + } + e = fmt.Sprintf("%s/%s", e, ipaddress) + r, err := coupleAPIErrors(c.R(ctx).SetResult(&InstanceIP{}).Get(e)) + if err != nil { + return nil, err + } + return r.Result().(*InstanceIP), nil +} + +// AddInstanceIPAddress adds a public or private IP to a Linode instance +func (c *Client) AddInstanceIPAddress(ctx context.Context, linodeID int, public bool) (*InstanceIP, error) { + var body string + e, err := c.InstanceIPs.endpointWithID(linodeID) + if err != nil { + return nil, err + } + + req := c.R(ctx).SetResult(&InstanceIP{}) + + instanceipRequest := struct { + Type string `json:"type"` + Public bool `json:"public"` + }{"ipv4", public} + + if bodyData, err := json.Marshal(instanceipRequest); err == nil { + body = string(bodyData) + } else { + return nil, NewError(err) + } + + r, err := coupleAPIErrors(req. + SetHeader("Content-Type", "application/json"). + SetBody(body). + Post(e)) + + if err != nil { + return nil, err + } + + return r.Result().(*InstanceIP), nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/instance_snapshots.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/instance_snapshots.go new file mode 100644 index 000000000..7933507dc --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/instance_snapshots.go @@ -0,0 +1,188 @@ +package linodego + +import ( + "context" + "encoding/json" + "fmt" + "time" +) + +// InstanceBackupsResponse response struct for backup snapshot +type InstanceBackupsResponse struct { + Automatic []*InstanceSnapshot `json:"automatic"` + Snapshot *InstanceBackupSnapshotResponse `json:"snapshot"` +} + +// InstanceBackupSnapshotResponse fields are those representing Instance Backup Snapshots +type InstanceBackupSnapshotResponse struct { + Current *InstanceSnapshot `json:"current"` + InProgress *InstanceSnapshot `json:"in_progress"` +} + +// RestoreInstanceOptions fields are those accepted by InstanceRestore +type RestoreInstanceOptions struct { + LinodeID int `json:"linode_id"` + Overwrite bool `json:"overwrite"` +} + +// InstanceSnapshot represents a linode backup snapshot +type InstanceSnapshot struct { + CreatedStr string `json:"created"` + UpdatedStr string `json:"updated"` + FinishedStr string `json:"finished"` + + ID int `json:"id"` + Label string `json:"label"` + Status InstanceSnapshotStatus `json:"status"` + Type string `json:"type"` + Created *time.Time `json:"-"` + Updated *time.Time `json:"-"` + Finished *time.Time `json:"-"` + Configs []string `json:"configs"` + Disks []*InstanceSnapshotDisk `json:"disks"` +} + +// InstanceSnapshotDisk fields represent the source disk of a Snapshot +type InstanceSnapshotDisk struct { + Label string `json:"label"` + Size int `json:"size"` + Filesystem string `json:"filesystem"` +} + +// InstanceSnapshotStatus constants start with Snapshot and include Linode API Instance Backup Snapshot status values +type InstanceSnapshotStatus string + +// InstanceSnapshotStatus constants reflect the current status of an Instance Snapshot +var ( + SnapshotPaused InstanceSnapshotStatus = "paused" + SnapshotPending InstanceSnapshotStatus = "pending" + SnapshotRunning InstanceSnapshotStatus = "running" + SnapshotNeedsPostProcessing InstanceSnapshotStatus = "needsPostProcessing" + SnapshotSuccessful InstanceSnapshotStatus = "successful" + SnapshotFailed InstanceSnapshotStatus = "failed" + SnapshotUserAborted InstanceSnapshotStatus = "userAborted" +) + +func (l *InstanceSnapshot) fixDates() *InstanceSnapshot { + l.Created, _ = parseDates(l.CreatedStr) + l.Updated, _ = parseDates(l.UpdatedStr) + l.Finished, _ = parseDates(l.FinishedStr) + return l +} + +// GetInstanceSnapshot gets the snapshot with the provided ID +func (c *Client) GetInstanceSnapshot(ctx context.Context, linodeID int, snapshotID int) (*InstanceSnapshot, error) { + e, err := c.InstanceSnapshots.endpointWithID(linodeID) + if err != nil { + return nil, err + } + e = fmt.Sprintf("%s/%d", e, snapshotID) + r, err := coupleAPIErrors(c.R(ctx).SetResult(&InstanceSnapshot{}).Get(e)) + if err != nil { + return nil, err + } + return r.Result().(*InstanceSnapshot).fixDates(), nil +} + +// CreateInstanceSnapshot Creates or Replaces the snapshot Backup of a Linode. If a previous snapshot exists for this Linode, it will be deleted. +func (c *Client) CreateInstanceSnapshot(ctx context.Context, linodeID int, label string) (*InstanceSnapshot, error) { + o, err := json.Marshal(map[string]string{"label": label}) + if err != nil { + return nil, err + } + body := string(o) + e, err := c.InstanceSnapshots.endpointWithID(linodeID) + if err != nil { + return nil, err + } + + r, err := coupleAPIErrors(c.R(ctx). + SetBody(body). + SetResult(&InstanceSnapshot{}). + Post(e)) + + if err != nil { + return nil, err + } + + return r.Result().(*InstanceSnapshot).fixDates(), nil +} + +// GetInstanceBackups gets the Instance's available Backups. +// This is not called ListInstanceBackups because a single object is returned, matching the API response. +func (c *Client) GetInstanceBackups(ctx context.Context, linodeID int) (*InstanceBackupsResponse, error) { + e, err := c.InstanceSnapshots.endpointWithID(linodeID) + if err != nil { + return nil, err + } + r, err := coupleAPIErrors(c.R(ctx). + SetResult(&InstanceBackupsResponse{}). + Get(e)) + if err != nil { + return nil, err + } + return r.Result().(*InstanceBackupsResponse).fixDates(), nil +} + +// EnableInstanceBackups Enables backups for the specified Linode. +func (c *Client) EnableInstanceBackups(ctx context.Context, linodeID int) error { + e, err := c.InstanceSnapshots.endpointWithID(linodeID) + if err != nil { + return err + } + e = fmt.Sprintf("%s/enable", e) + + _, err = coupleAPIErrors(c.R(ctx).Post(e)) + return err +} + +// CancelInstanceBackups Cancels backups for the specified Linode. +func (c *Client) CancelInstanceBackups(ctx context.Context, linodeID int) error { + e, err := c.InstanceSnapshots.endpointWithID(linodeID) + if err != nil { + return err + } + e = fmt.Sprintf("%s/cancel", e) + + _, err = coupleAPIErrors(c.R(ctx).Post(e)) + return err +} + +// RestoreInstanceBackup Restores a Linode's Backup to the specified Linode. +func (c *Client) RestoreInstanceBackup(ctx context.Context, linodeID int, backupID int, opts RestoreInstanceOptions) error { + o, err := json.Marshal(opts) + if err != nil { + return NewError(err) + } + body := string(o) + e, err := c.InstanceSnapshots.endpointWithID(linodeID) + if err != nil { + return err + } + e = fmt.Sprintf("%s/%d/restore", e, backupID) + + _, err = coupleAPIErrors(c.R(ctx).SetBody(body).Post(e)) + + return err + +} + +func (l *InstanceBackupSnapshotResponse) fixDates() *InstanceBackupSnapshotResponse { + if l.Current != nil { + l.Current.fixDates() + } + if l.InProgress != nil { + l.InProgress.fixDates() + } + return l +} + +func (l *InstanceBackupsResponse) fixDates() *InstanceBackupsResponse { + for i := range l.Automatic { + l.Automatic[i].fixDates() + } + if l.Snapshot != nil { + l.Snapshot.fixDates() + } + return l +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/instance_volumes.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/instance_volumes.go new file mode 100644 index 000000000..b6c9a9ae0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/instance_volumes.go @@ -0,0 +1,38 @@ +package linodego + +import ( + "context" +) + +// InstanceVolumesPagedResponse represents a paginated InstanceVolume API response +type InstanceVolumesPagedResponse struct { + *PageOptions + Data []Volume `json:"data"` +} + +// endpoint gets the endpoint URL for InstanceVolume +func (InstanceVolumesPagedResponse) endpointWithID(c *Client, id int) string { + endpoint, err := c.InstanceVolumes.endpointWithID(id) + if err != nil { + panic(err) + } + return endpoint +} + +// appendData appends InstanceVolumes when processing paginated InstanceVolume responses +func (resp *InstanceVolumesPagedResponse) appendData(r *InstanceVolumesPagedResponse) { + resp.Data = append(resp.Data, r.Data...) +} + +// ListInstanceVolumes lists InstanceVolumes +func (c *Client) ListInstanceVolumes(ctx context.Context, linodeID int, opts *ListOptions) ([]Volume, error) { + response := InstanceVolumesPagedResponse{} + err := c.listHelperWithID(ctx, &response, linodeID, opts) + for i := range response.Data { + response.Data[i].fixDates() + } + if err != nil { + return nil, err + } + return response.Data, nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/instances.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/instances.go new file mode 100644 index 000000000..85775508a --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/instances.go @@ -0,0 +1,454 @@ +package linodego + +import ( + "context" + "encoding/json" + "fmt" + "net" + "time" +) + +/* + * https://developers.linode.com/v4/reference/endpoints/linode/instances + */ + +// InstanceStatus constants start with Instance and include Linode API Instance Status values +type InstanceStatus string + +// InstanceStatus constants reflect the current status of an Instance +const ( + InstanceBooting InstanceStatus = "booting" + InstanceRunning InstanceStatus = "running" + InstanceOffline InstanceStatus = "offline" + InstanceShuttingDown InstanceStatus = "shutting_down" + InstanceRebooting InstanceStatus = "rebooting" + InstanceProvisioning InstanceStatus = "provisioning" + InstanceDeleting InstanceStatus = "deleting" + InstanceMigrating InstanceStatus = "migrating" + InstanceRebuilding InstanceStatus = "rebuilding" + InstanceCloning InstanceStatus = "cloning" + InstanceRestoring InstanceStatus = "restoring" + InstanceResizing InstanceStatus = "resizing" +) + +// Instance represents a linode object +type Instance struct { + CreatedStr string `json:"created"` + UpdatedStr string `json:"updated"` + + ID int `json:"id"` + Created *time.Time `json:"-"` + Updated *time.Time `json:"-"` + Region string `json:"region"` + Alerts *InstanceAlert `json:"alerts"` + Backups *InstanceBackup `json:"backups"` + Image string `json:"image"` + Group string `json:"group"` + IPv4 []*net.IP `json:"ipv4"` + IPv6 string `json:"ipv6"` + Label string `json:"label"` + Type string `json:"type"` + Status InstanceStatus `json:"status"` + Hypervisor string `json:"hypervisor"` + Specs *InstanceSpec `json:"specs"` + WatchdogEnabled bool `json:"watchdog_enabled"` + Tags []string `json:"tags"` +} + +// InstanceSpec represents a linode spec +type InstanceSpec struct { + Disk int `json:"disk"` + Memory int `json:"memory"` + VCPUs int `json:"vcpus"` + Transfer int `json:"transfer"` +} + +// InstanceAlert represents a metric alert +type InstanceAlert struct { + CPU int `json:"cpu"` + IO int `json:"io"` + NetworkIn int `json:"network_in"` + NetworkOut int `json:"network_out"` + TransferQuota int `json:"transfer_quota"` +} + +// InstanceBackup represents backup settings for an instance +type InstanceBackup struct { + Enabled bool `json:"enabled"` + Schedule struct { + Day string `json:"day,omitempty"` + Window string `json:"window,omitempty"` + } +} + +// InstanceCreateOptions require only Region and Type +type InstanceCreateOptions struct { + Region string `json:"region"` + Type string `json:"type"` + Label string `json:"label,omitempty"` + Group string `json:"group,omitempty"` + RootPass string `json:"root_pass,omitempty"` + AuthorizedKeys []string `json:"authorized_keys,omitempty"` + AuthorizedUsers []string `json:"authorized_users,omitempty"` + StackScriptID int `json:"stackscript_id,omitempty"` + StackScriptData map[string]string `json:"stackscript_data,omitempty"` + BackupID int `json:"backup_id,omitempty"` + Image string `json:"image,omitempty"` + BackupsEnabled bool `json:"backups_enabled,omitempty"` + PrivateIP bool `json:"private_ip,omitempty"` + Tags []string `json:"tags,omitempty"` + + // Creation fields that need to be set explicitly false, "", or 0 use pointers + SwapSize *int `json:"swap_size,omitempty"` + Booted *bool `json:"booted,omitempty"` +} + +// InstanceUpdateOptions is an options struct used when Updating an Instance +type InstanceUpdateOptions struct { + Label string `json:"label,omitempty"` + Group string `json:"group,omitempty"` + Backups *InstanceBackup `json:"backups,omitempty"` + Alerts *InstanceAlert `json:"alerts,omitempty"` + WatchdogEnabled *bool `json:"watchdog_enabled,omitempty"` + Tags *[]string `json:"tags,omitempty"` +} + +// GetUpdateOptions converts an Instance to InstanceUpdateOptions for use in UpdateInstance +func (l *Instance) GetUpdateOptions() InstanceUpdateOptions { + return InstanceUpdateOptions{ + Label: l.Label, + Group: l.Group, + Backups: l.Backups, + Alerts: l.Alerts, + WatchdogEnabled: &l.WatchdogEnabled, + Tags: &l.Tags, + } +} + +// InstanceCloneOptions is an options struct sent when Cloning an Instance +type InstanceCloneOptions struct { + Region string `json:"region,omitempty"` + Type string `json:"type,omitempty"` + + // LinodeID is an optional existing instance to use as the target of the clone + LinodeID int `json:"linode_id,omitempty"` + Label string `json:"label,omitempty"` + Group string `json:"group,omitempty"` + BackupsEnabled bool `json:"backups_enabled"` + Disks []int `json:"disks,omitempty"` + Configs []int `json:"configs,omitempty"` +} + +func (l *Instance) fixDates() *Instance { + l.Created, _ = parseDates(l.CreatedStr) + l.Updated, _ = parseDates(l.UpdatedStr) + return l +} + +// InstancesPagedResponse represents a linode API response for listing +type InstancesPagedResponse struct { + *PageOptions + Data []Instance `json:"data"` +} + +// endpoint gets the endpoint URL for Instance +func (InstancesPagedResponse) endpoint(c *Client) string { + endpoint, err := c.Instances.Endpoint() + if err != nil { + panic(err) + } + return endpoint +} + +// appendData appends Instances when processing paginated Instance responses +func (resp *InstancesPagedResponse) appendData(r *InstancesPagedResponse) { + resp.Data = append(resp.Data, r.Data...) +} + +// ListInstances lists linode instances +func (c *Client) ListInstances(ctx context.Context, opts *ListOptions) ([]Instance, error) { + response := InstancesPagedResponse{} + err := c.listHelper(ctx, &response, opts) + for i := range response.Data { + response.Data[i].fixDates() + } + if err != nil { + return nil, err + } + return response.Data, nil +} + +// GetInstance gets the instance with the provided ID +func (c *Client) GetInstance(ctx context.Context, linodeID int) (*Instance, error) { + e, err := c.Instances.Endpoint() + if err != nil { + return nil, err + } + e = fmt.Sprintf("%s/%d", e, linodeID) + r, err := coupleAPIErrors(c.R(ctx). + SetResult(Instance{}). + Get(e)) + if err != nil { + return nil, err + } + return r.Result().(*Instance).fixDates(), nil +} + +// CreateInstance creates a Linode instance +func (c *Client) CreateInstance(ctx context.Context, instance InstanceCreateOptions) (*Instance, error) { + var body string + e, err := c.Instances.Endpoint() + if err != nil { + return nil, err + } + + req := c.R(ctx).SetResult(&Instance{}) + + if bodyData, err := json.Marshal(instance); err == nil { + body = string(bodyData) + } else { + return nil, NewError(err) + } + + r, err := coupleAPIErrors(req. + SetBody(body). + Post(e)) + + if err != nil { + return nil, err + } + return r.Result().(*Instance).fixDates(), nil +} + +// UpdateInstance creates a Linode instance +func (c *Client) UpdateInstance(ctx context.Context, id int, instance InstanceUpdateOptions) (*Instance, error) { + var body string + e, err := c.Instances.Endpoint() + if err != nil { + return nil, err + } + e = fmt.Sprintf("%s/%d", e, id) + + req := c.R(ctx).SetResult(&Instance{}) + + if bodyData, err := json.Marshal(instance); err == nil { + body = string(bodyData) + } else { + return nil, NewError(err) + } + + r, err := coupleAPIErrors(req. + SetBody(body). + Put(e)) + + if err != nil { + return nil, err + } + return r.Result().(*Instance).fixDates(), nil +} + +// RenameInstance renames an Instance +func (c *Client) RenameInstance(ctx context.Context, linodeID int, label string) (*Instance, error) { + return c.UpdateInstance(ctx, linodeID, InstanceUpdateOptions{Label: label}) +} + +// DeleteInstance deletes a Linode instance +func (c *Client) DeleteInstance(ctx context.Context, id int) error { + e, err := c.Instances.Endpoint() + if err != nil { + return err + } + e = fmt.Sprintf("%s/%d", e, id) + + _, err = coupleAPIErrors(c.R(ctx).Delete(e)) + return err +} + +// BootInstance will boot a Linode instance +// A configID of 0 will cause Linode to choose the last/best config +func (c *Client) BootInstance(ctx context.Context, id int, configID int) error { + bodyStr := "" + + if configID != 0 { + bodyMap := map[string]int{"config_id": configID} + bodyJSON, err := json.Marshal(bodyMap) + if err != nil { + return NewError(err) + } + bodyStr = string(bodyJSON) + } + + e, err := c.Instances.Endpoint() + if err != nil { + return err + } + + e = fmt.Sprintf("%s/%d/boot", e, id) + _, err = coupleAPIErrors(c.R(ctx). + SetBody(bodyStr). + Post(e)) + + return err +} + +// CloneInstance clone an existing Instances Disks and Configuration profiles to another Linode Instance +func (c *Client) CloneInstance(ctx context.Context, id int, options InstanceCloneOptions) (*Instance, error) { + var body string + e, err := c.Instances.Endpoint() + if err != nil { + return nil, err + } + e = fmt.Sprintf("%s/%d/clone", e, id) + + req := c.R(ctx).SetResult(&Instance{}) + + if bodyData, err := json.Marshal(options); err == nil { + body = string(bodyData) + } else { + return nil, NewError(err) + } + + r, err := coupleAPIErrors(req. + SetBody(body). + Post(e)) + + if err != nil { + return nil, err + } + + return r.Result().(*Instance).fixDates(), nil +} + +// RebootInstance reboots a Linode instance +// A configID of 0 will cause Linode to choose the last/best config +func (c *Client) RebootInstance(ctx context.Context, id int, configID int) error { + bodyStr := "{}" + + if configID != 0 { + bodyMap := map[string]int{"config_id": configID} + bodyJSON, err := json.Marshal(bodyMap) + if err != nil { + return NewError(err) + } + bodyStr = string(bodyJSON) + } + + e, err := c.Instances.Endpoint() + if err != nil { + return err + } + + e = fmt.Sprintf("%s/%d/reboot", e, id) + + _, err = coupleAPIErrors(c.R(ctx). + SetBody(bodyStr). + Post(e)) + + return err +} + +// RebuildInstanceOptions is a struct representing the options to send to the rebuild linode endpoint +type RebuildInstanceOptions struct { + Image string `json:"image"` + RootPass string `json:"root_pass"` + AuthorizedKeys []string `json:"authorized_keys"` + AuthorizedUsers []string `json:"authorized_users"` + StackscriptID int `json:"stackscript_id"` + StackscriptData map[string]string `json:"stackscript_data"` + Booted bool `json:"booted"` +} + +// RebuildInstance Deletes all Disks and Configs on this Linode, +// then deploys a new Image to this Linode with the given attributes. +func (c *Client) RebuildInstance(ctx context.Context, id int, opts RebuildInstanceOptions) (*Instance, error) { + o, err := json.Marshal(opts) + if err != nil { + return nil, NewError(err) + } + b := string(o) + e, err := c.Instances.Endpoint() + if err != nil { + return nil, err + } + e = fmt.Sprintf("%s/%d/rebuild", e, id) + r, err := coupleAPIErrors(c.R(ctx). + SetBody(b). + SetResult(&Instance{}). + Post(e)) + if err != nil { + return nil, err + } + return r.Result().(*Instance).fixDates(), nil +} + +// RescueInstanceOptions fields are those accepted by RescueInstance +type RescueInstanceOptions struct { + Devices InstanceConfigDeviceMap `json:"devices"` +} + +// RescueInstance reboots an instance into a safe environment for performing many system recovery and disk management tasks. +// Rescue Mode is based on the Finnix recovery distribution, a self-contained and bootable Linux distribution. +// You can also use Rescue Mode for tasks other than disaster recovery, such as formatting disks to use different filesystems, +// copying data between disks, and downloading files from a disk via SSH and SFTP. +func (c *Client) RescueInstance(ctx context.Context, id int, opts RescueInstanceOptions) error { + o, err := json.Marshal(opts) + if err != nil { + return NewError(err) + } + b := string(o) + e, err := c.Instances.Endpoint() + if err != nil { + return err + } + e = fmt.Sprintf("%s/%d/rescue", e, id) + + _, err = coupleAPIErrors(c.R(ctx). + SetBody(b). + Post(e)) + + return err +} + +// ResizeInstance resizes an instance to new Linode type +func (c *Client) ResizeInstance(ctx context.Context, id int, linodeType string) error { + body := fmt.Sprintf("{\"type\":\"%s\"}", linodeType) + + e, err := c.Instances.Endpoint() + if err != nil { + return err + } + e = fmt.Sprintf("%s/%d/resize", e, id) + + _, err = coupleAPIErrors(c.R(ctx). + SetBody(body). + Post(e)) + + return err +} + +// ShutdownInstance - Shutdown an instance +func (c *Client) ShutdownInstance(ctx context.Context, id int) error { + return c.simpleInstanceAction(ctx, "shutdown", id) +} + +// MutateInstance Upgrades a Linode to its next generation. +func (c *Client) MutateInstance(ctx context.Context, id int) error { + return c.simpleInstanceAction(ctx, "mutate", id) +} + +// MigrateInstance - Migrate an instance +func (c *Client) MigrateInstance(ctx context.Context, id int) error { + return c.simpleInstanceAction(ctx, "migrate", id) +} + +// simpleInstanceAction is a helper for Instance actions that take no parameters +// and return empty responses `{}` unless they return a standard error +func (c *Client) simpleInstanceAction(ctx context.Context, action string, id int) error { + e, err := c.Instances.Endpoint() + if err != nil { + return err + } + e = fmt.Sprintf("%s/%d/%s", e, id, action) + _, err = coupleAPIErrors(c.R(ctx).Post(e)) + return err +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/kernels.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/kernels.go new file mode 100644 index 000000000..233a38db5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/kernels.go @@ -0,0 +1,61 @@ +package linodego + +import ( + "context" + "fmt" +) + +// LinodeKernel represents a Linode Instance kernel object +type LinodeKernel struct { + ID string `json:"id"` + Label string `json:"label"` + Version string `json:"version"` + Architecture string `json:"architecture"` + KVM bool `json:"kvm"` + XEN bool `json:"xen"` + PVOPS bool `json:"pvops"` +} + +// LinodeKernelsPagedResponse represents a Linode kernels API response for listing +type LinodeKernelsPagedResponse struct { + *PageOptions + Data []LinodeKernel `json:"data"` +} + +// ListKernels lists linode kernels +func (c *Client) ListKernels(ctx context.Context, opts *ListOptions) ([]LinodeKernel, error) { + response := LinodeKernelsPagedResponse{} + err := c.listHelper(ctx, &response, opts) + if err != nil { + return nil, err + } + return response.Data, nil +} + +func (LinodeKernelsPagedResponse) endpoint(c *Client) string { + endpoint, err := c.Kernels.Endpoint() + if err != nil { + panic(err) + } + return endpoint +} + +func (resp *LinodeKernelsPagedResponse) appendData(r *LinodeKernelsPagedResponse) { + resp.Data = append(resp.Data, r.Data...) +} + +// GetKernel gets the kernel with the provided ID +func (c *Client) GetKernel(ctx context.Context, kernelID string) (*LinodeKernel, error) { + e, err := c.Kernels.Endpoint() + if err != nil { + return nil, err + } + e = fmt.Sprintf("%s/%s", e, kernelID) + r, err := c.R(ctx). + SetResult(&LinodeKernel{}). + Get(e) + if err != nil { + return nil, err + } + return r.Result().(*LinodeKernel), nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/longview.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/longview.go new file mode 100644 index 000000000..524af6776 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/longview.go @@ -0,0 +1,67 @@ +package linodego + +import ( + "context" + "fmt" +) + +// LongviewClient represents a LongviewClient object +type LongviewClient struct { + ID int `json:"id"` + // UpdatedStr string `json:"updated"` + // Updated *time.Time `json:"-"` +} + +// LongviewClientsPagedResponse represents a paginated LongviewClient API response +type LongviewClientsPagedResponse struct { + *PageOptions + Data []LongviewClient `json:"data"` +} + +// endpoint gets the endpoint URL for LongviewClient +func (LongviewClientsPagedResponse) endpoint(c *Client) string { + endpoint, err := c.LongviewClients.Endpoint() + if err != nil { + panic(err) + } + return endpoint +} + +// appendData appends LongviewClients when processing paginated LongviewClient responses +func (resp *LongviewClientsPagedResponse) appendData(r *LongviewClientsPagedResponse) { + resp.Data = append(resp.Data, r.Data...) +} + +// ListLongviewClients lists LongviewClients +func (c *Client) ListLongviewClients(ctx context.Context, opts *ListOptions) ([]LongviewClient, error) { + response := LongviewClientsPagedResponse{} + err := c.listHelper(ctx, &response, opts) + for i := range response.Data { + response.Data[i].fixDates() + } + if err != nil { + return nil, err + } + return response.Data, nil +} + +// fixDates converts JSON timestamps to Go time.Time values +func (v *LongviewClient) fixDates() *LongviewClient { + // v.Created, _ = parseDates(v.CreatedStr) + // v.Updated, _ = parseDates(v.UpdatedStr) + return v +} + +// GetLongviewClient gets the template with the provided ID +func (c *Client) GetLongviewClient(ctx context.Context, id string) (*LongviewClient, error) { + e, err := c.LongviewClients.Endpoint() + if err != nil { + return nil, err + } + e = fmt.Sprintf("%s/%s", e, id) + r, err := c.R(ctx).SetResult(&LongviewClient{}).Get(e) + if err != nil { + return nil, err + } + return r.Result().(*LongviewClient).fixDates(), nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/longview_subscriptions.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/longview_subscriptions.go new file mode 100644 index 000000000..253316599 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/longview_subscriptions.go @@ -0,0 +1,70 @@ +package linodego + +import ( + "context" + "fmt" +) + +// LongviewSubscription represents a LongviewSubscription object +type LongviewSubscription struct { + ID string `json:"id"` + Label string `json:"label"` + ClientsIncluded int `json:"clients_included"` + Price *LinodePrice `json:"price"` + // UpdatedStr string `json:"updated"` + // Updated *time.Time `json:"-"` +} + +// LongviewSubscriptionsPagedResponse represents a paginated LongviewSubscription API response +type LongviewSubscriptionsPagedResponse struct { + *PageOptions + Data []LongviewSubscription `json:"data"` +} + +// endpoint gets the endpoint URL for LongviewSubscription +func (LongviewSubscriptionsPagedResponse) endpoint(c *Client) string { + endpoint, err := c.LongviewSubscriptions.Endpoint() + if err != nil { + panic(err) + } + return endpoint +} + +// appendData appends LongviewSubscriptions when processing paginated LongviewSubscription responses +func (resp *LongviewSubscriptionsPagedResponse) appendData(r *LongviewSubscriptionsPagedResponse) { + resp.Data = append(resp.Data, r.Data...) +} + +// ListLongviewSubscriptions lists LongviewSubscriptions +func (c *Client) ListLongviewSubscriptions(ctx context.Context, opts *ListOptions) ([]LongviewSubscription, error) { + response := LongviewSubscriptionsPagedResponse{} + err := c.listHelper(ctx, &response, opts) + for i := range response.Data { + response.Data[i].fixDates() + } + if err != nil { + return nil, err + } + return response.Data, nil +} + +// fixDates converts JSON timestamps to Go time.Time values +func (v *LongviewSubscription) fixDates() *LongviewSubscription { + // v.Created, _ = parseDates(v.CreatedStr) + // v.Updated, _ = parseDates(v.UpdatedStr) + return v +} + +// GetLongviewSubscription gets the template with the provided ID +func (c *Client) GetLongviewSubscription(ctx context.Context, id string) (*LongviewSubscription, error) { + e, err := c.LongviewSubscriptions.Endpoint() + if err != nil { + return nil, err + } + e = fmt.Sprintf("%s/%s", e, id) + r, err := c.R(ctx).SetResult(&LongviewSubscription{}).Get(e) + if err != nil { + return nil, err + } + return r.Result().(*LongviewSubscription).fixDates(), nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/managed.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/managed.go new file mode 100644 index 000000000..152361292 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/managed.go @@ -0,0 +1 @@ +package linodego diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/network_ips.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/network_ips.go new file mode 100644 index 000000000..01dd5c1d3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/network_ips.go @@ -0,0 +1,90 @@ +package linodego + +import ( + "context" + "encoding/json" + "fmt" +) + +// IPAddressesPagedResponse represents a paginated IPAddress API response +type IPAddressesPagedResponse struct { + *PageOptions + Data []InstanceIP `json:"data"` +} + +// IPAddressUpdateOptions fields are those accepted by UpdateToken +type IPAddressUpdateOptions struct { + // The reverse DNS assigned to this address. For public IPv4 addresses, this will be set to a default value provided by Linode if set to nil. + RDNS *string `json:"rdns"` +} + +// GetUpdateOptions converts a IPAddress to IPAddressUpdateOptions for use in UpdateIPAddress +func (i InstanceIP) GetUpdateOptions() (o IPAddressUpdateOptions) { + o.RDNS = copyString(&i.RDNS) + return +} + +// endpoint gets the endpoint URL for IPAddress +func (IPAddressesPagedResponse) endpoint(c *Client) string { + endpoint, err := c.IPAddresses.Endpoint() + if err != nil { + panic(err) + } + return endpoint +} + +// appendData appends IPAddresses when processing paginated InstanceIPAddress responses +func (resp *IPAddressesPagedResponse) appendData(r *IPAddressesPagedResponse) { + resp.Data = append(resp.Data, r.Data...) +} + +// ListIPAddresses lists IPAddresses +func (c *Client) ListIPAddresses(ctx context.Context, opts *ListOptions) ([]InstanceIP, error) { + response := IPAddressesPagedResponse{} + err := c.listHelper(ctx, &response, opts) + if err != nil { + return nil, err + } + return response.Data, nil +} + +// GetIPAddress gets the template with the provided ID +func (c *Client) GetIPAddress(ctx context.Context, id string) (*InstanceIP, error) { + e, err := c.IPAddresses.Endpoint() + if err != nil { + return nil, err + } + e = fmt.Sprintf("%s/%s", e, id) + r, err := coupleAPIErrors(c.R(ctx).SetResult(&InstanceIP{}).Get(e)) + if err != nil { + return nil, err + } + return r.Result().(*InstanceIP), nil +} + +// UpdateIPAddress updates the IPAddress with the specified id +func (c *Client) UpdateIPAddress(ctx context.Context, id string, updateOpts IPAddressUpdateOptions) (*InstanceIP, error) { + var body string + e, err := c.IPAddresses.Endpoint() + if err != nil { + return nil, err + } + e = fmt.Sprintf("%s/%s", e, id) + + req := c.R(ctx).SetResult(&InstanceIP{}) + + if bodyData, err := json.Marshal(updateOpts); err == nil { + body = string(bodyData) + } else { + return nil, NewError(err) + } + + r, err := coupleAPIErrors(req. + SetBody(body). + Put(e)) + + if err != nil { + return nil, err + } + return r.Result().(*InstanceIP), nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/network_pools.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/network_pools.go new file mode 100644 index 000000000..03085923c --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/network_pools.go @@ -0,0 +1,50 @@ +package linodego + +import ( + "context" + "fmt" +) + +// IPv6PoolsPagedResponse represents a paginated IPv6Pool API response +type IPv6PoolsPagedResponse struct { + *PageOptions + Data []IPv6Range `json:"data"` +} + +// endpoint gets the endpoint URL for IPv6Pool +func (IPv6PoolsPagedResponse) endpoint(c *Client) string { + endpoint, err := c.IPv6Pools.Endpoint() + if err != nil { + panic(err) + } + return endpoint +} + +// appendData appends IPv6Pools when processing paginated IPv6Pool responses +func (resp *IPv6PoolsPagedResponse) appendData(r *IPv6PoolsPagedResponse) { + resp.Data = append(resp.Data, r.Data...) +} + +// ListIPv6Pools lists IPv6Pools +func (c *Client) ListIPv6Pools(ctx context.Context, opts *ListOptions) ([]IPv6Range, error) { + response := IPv6PoolsPagedResponse{} + err := c.listHelper(ctx, &response, opts) + if err != nil { + return nil, err + } + return response.Data, nil +} + +// GetIPv6Pool gets the template with the provided ID +func (c *Client) GetIPv6Pool(ctx context.Context, id string) (*IPv6Range, error) { + e, err := c.IPv6Pools.Endpoint() + if err != nil { + return nil, err + } + e = fmt.Sprintf("%s/%s", e, id) + r, err := coupleAPIErrors(c.R(ctx).SetResult(&IPv6Range{}).Get(e)) + if err != nil { + return nil, err + } + return r.Result().(*IPv6Range), nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/network_ranges.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/network_ranges.go new file mode 100644 index 000000000..0c0ba15a3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/network_ranges.go @@ -0,0 +1,50 @@ +package linodego + +import ( + "context" + "fmt" +) + +// IPv6RangesPagedResponse represents a paginated IPv6Range API response +type IPv6RangesPagedResponse struct { + *PageOptions + Data []IPv6Range `json:"data"` +} + +// endpoint gets the endpoint URL for IPv6Range +func (IPv6RangesPagedResponse) endpoint(c *Client) string { + endpoint, err := c.IPv6Ranges.Endpoint() + if err != nil { + panic(err) + } + return endpoint +} + +// appendData appends IPv6Ranges when processing paginated IPv6Range responses +func (resp *IPv6RangesPagedResponse) appendData(r *IPv6RangesPagedResponse) { + resp.Data = append(resp.Data, r.Data...) +} + +// ListIPv6Ranges lists IPv6Ranges +func (c *Client) ListIPv6Ranges(ctx context.Context, opts *ListOptions) ([]IPv6Range, error) { + response := IPv6RangesPagedResponse{} + err := c.listHelper(ctx, &response, opts) + if err != nil { + return nil, err + } + return response.Data, nil +} + +// GetIPv6Range gets the template with the provided ID +func (c *Client) GetIPv6Range(ctx context.Context, id string) (*IPv6Range, error) { + e, err := c.IPv6Ranges.Endpoint() + if err != nil { + return nil, err + } + e = fmt.Sprintf("%s/%s", e, id) + r, err := coupleAPIErrors(c.R(ctx).SetResult(&IPv6Range{}).Get(e)) + if err != nil { + return nil, err + } + return r.Result().(*IPv6Range), nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/nodebalancer.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/nodebalancer.go new file mode 100644 index 000000000..a8d797d24 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/nodebalancer.go @@ -0,0 +1,199 @@ +package linodego + +import ( + "context" + "encoding/json" + "fmt" + "time" +) + +// NodeBalancer represents a NodeBalancer object +type NodeBalancer struct { + CreatedStr string `json:"created"` + UpdatedStr string `json:"updated"` + // This NodeBalancer's unique ID. + ID int `json:"id"` + // This NodeBalancer's label. These must be unique on your Account. + Label *string `json:"label"` + // The Region where this NodeBalancer is located. NodeBalancers only support backends in the same Region. + Region string `json:"region"` + // This NodeBalancer's hostname, ending with .nodebalancer.linode.com + Hostname *string `json:"hostname"` + // This NodeBalancer's public IPv4 address. + IPv4 *string `json:"ipv4"` + // This NodeBalancer's public IPv6 address. + IPv6 *string `json:"ipv6"` + // Throttle connections per second (0-20). Set to 0 (zero) to disable throttling. + ClientConnThrottle int `json:"client_conn_throttle"` + // Information about the amount of transfer this NodeBalancer has had so far this month. + Transfer NodeBalancerTransfer `json:"transfer"` + + // An array of tags applied to this object. Tags are for organizational purposes only. + Tags []string `json:"tags"` + + Created *time.Time `json:"-"` + Updated *time.Time `json:"-"` +} + +// NodeBalancerTransfer contains information about the amount of transfer a NodeBalancer has had in the current month +type NodeBalancerTransfer struct { + // The total transfer, in MB, used by this NodeBalancer this month. + Total *float64 `json:"total"` + // The total inbound transfer, in MB, used for this NodeBalancer this month. + Out *float64 `json:"out"` + // The total outbound transfer, in MB, used for this NodeBalancer this month. + In *float64 `json:"in"` +} + +// NodeBalancerCreateOptions are the options permitted for CreateNodeBalancer +type NodeBalancerCreateOptions struct { + Label *string `json:"label,omitempty"` + Region string `json:"region,omitempty"` + ClientConnThrottle *int `json:"client_conn_throttle,omitempty"` + Configs []*NodeBalancerConfigCreateOptions `json:"configs,omitempty"` + Tags []string `json:"tags"` +} + +// NodeBalancerUpdateOptions are the options permitted for UpdateNodeBalancer +type NodeBalancerUpdateOptions struct { + Label *string `json:"label,omitempty"` + ClientConnThrottle *int `json:"client_conn_throttle,omitempty"` + Tags *[]string `json:"tags,omitempty"` +} + +// GetCreateOptions converts a NodeBalancer to NodeBalancerCreateOptions for use in CreateNodeBalancer +func (i NodeBalancer) GetCreateOptions() NodeBalancerCreateOptions { + return NodeBalancerCreateOptions{ + Label: i.Label, + Region: i.Region, + ClientConnThrottle: &i.ClientConnThrottle, + Tags: i.Tags, + } +} + +// GetUpdateOptions converts a NodeBalancer to NodeBalancerUpdateOptions for use in UpdateNodeBalancer +func (i NodeBalancer) GetUpdateOptions() NodeBalancerUpdateOptions { + return NodeBalancerUpdateOptions{ + Label: i.Label, + ClientConnThrottle: &i.ClientConnThrottle, + Tags: &i.Tags, + } +} + +// NodeBalancersPagedResponse represents a paginated NodeBalancer API response +type NodeBalancersPagedResponse struct { + *PageOptions + Data []NodeBalancer `json:"data"` +} + +func (NodeBalancersPagedResponse) endpoint(c *Client) string { + endpoint, err := c.NodeBalancers.Endpoint() + if err != nil { + panic(err) + } + return endpoint +} + +func (resp *NodeBalancersPagedResponse) appendData(r *NodeBalancersPagedResponse) { + resp.Data = append(resp.Data, r.Data...) +} + +// ListNodeBalancers lists NodeBalancers +func (c *Client) ListNodeBalancers(ctx context.Context, opts *ListOptions) ([]NodeBalancer, error) { + response := NodeBalancersPagedResponse{} + err := c.listHelper(ctx, &response, opts) + if err != nil { + return nil, err + } + return response.Data, nil +} + +// fixDates converts JSON timestamps to Go time.Time values +func (i *NodeBalancer) fixDates() *NodeBalancer { + i.Created, _ = parseDates(i.CreatedStr) + i.Updated, _ = parseDates(i.UpdatedStr) + return i +} + +// GetNodeBalancer gets the NodeBalancer with the provided ID +func (c *Client) GetNodeBalancer(ctx context.Context, id int) (*NodeBalancer, error) { + e, err := c.NodeBalancers.Endpoint() + if err != nil { + return nil, err + } + e = fmt.Sprintf("%s/%d", e, id) + r, err := coupleAPIErrors(c.R(ctx). + SetResult(&NodeBalancer{}). + Get(e)) + if err != nil { + return nil, err + } + return r.Result().(*NodeBalancer).fixDates(), nil +} + +// CreateNodeBalancer creates a NodeBalancer +func (c *Client) CreateNodeBalancer(ctx context.Context, nodebalancer NodeBalancerCreateOptions) (*NodeBalancer, error) { + var body string + e, err := c.NodeBalancers.Endpoint() + if err != nil { + return nil, err + } + + req := c.R(ctx).SetResult(&NodeBalancer{}) + + if bodyData, err := json.Marshal(nodebalancer); err == nil { + body = string(bodyData) + } else { + return nil, NewError(err) + } + + r, err := coupleAPIErrors(req. + SetHeader("Content-Type", "application/json"). + SetBody(body). + Post(e)) + + if err != nil { + return nil, err + } + return r.Result().(*NodeBalancer).fixDates(), nil +} + +// UpdateNodeBalancer updates the NodeBalancer with the specified id +func (c *Client) UpdateNodeBalancer(ctx context.Context, id int, updateOpts NodeBalancerUpdateOptions) (*NodeBalancer, error) { + var body string + e, err := c.NodeBalancers.Endpoint() + if err != nil { + return nil, err + } + e = fmt.Sprintf("%s/%d", e, id) + + req := c.R(ctx).SetResult(&NodeBalancer{}) + + if bodyData, err := json.Marshal(updateOpts); err == nil { + body = string(bodyData) + } else { + return nil, NewError(err) + } + + r, err := coupleAPIErrors(req. + SetBody(body). + Put(e)) + + if err != nil { + return nil, err + } + return r.Result().(*NodeBalancer).fixDates(), nil +} + +// DeleteNodeBalancer deletes the NodeBalancer with the specified id +func (c *Client) DeleteNodeBalancer(ctx context.Context, id int) error { + e, err := c.NodeBalancers.Endpoint() + if err != nil { + return err + } + e = fmt.Sprintf("%s/%d", e, id) + + _, err = coupleAPIErrors(c.R(ctx).Delete(e)) + + return err +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/nodebalancer_config_nodes.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/nodebalancer_config_nodes.go new file mode 100644 index 000000000..e1ca55cb5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/nodebalancer_config_nodes.go @@ -0,0 +1,186 @@ +package linodego + +import ( + "context" + "encoding/json" + "fmt" +) + +// NodeBalancerNode objects represent a backend that can accept traffic for a NodeBalancer Config +type NodeBalancerNode struct { + ID int `json:"id"` + Address string `json:"address"` + Label string `json:"label"` + Status string `json:"status"` + Weight int `json:"weight"` + Mode NodeMode `json:"mode"` + ConfigID int `json:"config_id"` + NodeBalancerID int `json:"nodebalancer_id"` +} + +// NodeMode is the mode a NodeBalancer should use when sending traffic to a NodeBalancer Node +type NodeMode string + +var ( + // ModeAccept is the NodeMode indicating a NodeBalancer Node is accepting traffic + ModeAccept NodeMode = "accept" + + // ModeReject is the NodeMode indicating a NodeBalancer Node is not receiving traffic + ModeReject NodeMode = "reject" + + // ModeDrain is the NodeMode indicating a NodeBalancer Node is not receiving new traffic, but may continue receiving traffic from pinned connections + ModeDrain NodeMode = "drain" +) + +// NodeBalancerNodeCreateOptions fields are those accepted by CreateNodeBalancerNode +type NodeBalancerNodeCreateOptions struct { + Address string `json:"address"` + Label string `json:"label"` + Weight int `json:"weight,omitempty"` + Mode NodeMode `json:"mode,omitempty"` +} + +// NodeBalancerNodeUpdateOptions fields are those accepted by UpdateNodeBalancerNode +type NodeBalancerNodeUpdateOptions struct { + Address string `json:"address,omitempty"` + Label string `json:"label,omitempty"` + Weight int `json:"weight,omitempty"` + Mode NodeMode `json:"mode,omitempty"` +} + +// GetCreateOptions converts a NodeBalancerNode to NodeBalancerNodeCreateOptions for use in CreateNodeBalancerNode +func (i NodeBalancerNode) GetCreateOptions() NodeBalancerNodeCreateOptions { + return NodeBalancerNodeCreateOptions{ + Address: i.Address, + Label: i.Label, + Weight: i.Weight, + Mode: i.Mode, + } +} + +// GetUpdateOptions converts a NodeBalancerNode to NodeBalancerNodeUpdateOptions for use in UpdateNodeBalancerNode +func (i NodeBalancerNode) GetUpdateOptions() NodeBalancerNodeUpdateOptions { + return NodeBalancerNodeUpdateOptions{ + Address: i.Address, + Label: i.Label, + Weight: i.Weight, + Mode: i.Mode, + } +} + +// NodeBalancerNodesPagedResponse represents a paginated NodeBalancerNode API response +type NodeBalancerNodesPagedResponse struct { + *PageOptions + Data []NodeBalancerNode `json:"data"` +} + +// endpoint gets the endpoint URL for NodeBalancerNode +func (NodeBalancerNodesPagedResponse) endpointWithTwoIDs(c *Client, nodebalancerID int, configID int) string { + endpoint, err := c.NodeBalancerNodes.endpointWithID(nodebalancerID, configID) + if err != nil { + panic(err) + } + return endpoint +} + +// appendData appends NodeBalancerNodes when processing paginated NodeBalancerNode responses +func (resp *NodeBalancerNodesPagedResponse) appendData(r *NodeBalancerNodesPagedResponse) { + resp.Data = append(resp.Data, r.Data...) +} + +// ListNodeBalancerNodes lists NodeBalancerNodes +func (c *Client) ListNodeBalancerNodes(ctx context.Context, nodebalancerID int, configID int, opts *ListOptions) ([]NodeBalancerNode, error) { + response := NodeBalancerNodesPagedResponse{} + err := c.listHelperWithTwoIDs(ctx, &response, nodebalancerID, configID, opts) + for i := range response.Data { + response.Data[i].fixDates() + } + if err != nil { + return nil, err + } + return response.Data, nil +} + +// fixDates converts JSON timestamps to Go time.Time values +func (i *NodeBalancerNode) fixDates() *NodeBalancerNode { + return i +} + +// GetNodeBalancerNode gets the template with the provided ID +func (c *Client) GetNodeBalancerNode(ctx context.Context, nodebalancerID int, configID int, nodeID int) (*NodeBalancerNode, error) { + e, err := c.NodeBalancerNodes.endpointWithID(nodebalancerID, configID) + if err != nil { + return nil, err + } + e = fmt.Sprintf("%s/%d", e, nodeID) + r, err := coupleAPIErrors(c.R(ctx).SetResult(&NodeBalancerNode{}).Get(e)) + if err != nil { + return nil, err + } + return r.Result().(*NodeBalancerNode).fixDates(), nil +} + +// CreateNodeBalancerNode creates a NodeBalancerNode +func (c *Client) CreateNodeBalancerNode(ctx context.Context, nodebalancerID int, configID int, createOpts NodeBalancerNodeCreateOptions) (*NodeBalancerNode, error) { + var body string + e, err := c.NodeBalancerNodes.endpointWithID(nodebalancerID, configID) + if err != nil { + return nil, err + } + + req := c.R(ctx).SetResult(&NodeBalancerNode{}) + + if bodyData, err := json.Marshal(createOpts); err == nil { + body = string(bodyData) + } else { + return nil, NewError(err) + } + + r, err := coupleAPIErrors(req. + SetBody(body). + Post(e)) + + if err != nil { + return nil, err + } + return r.Result().(*NodeBalancerNode).fixDates(), nil +} + +// UpdateNodeBalancerNode updates the NodeBalancerNode with the specified id +func (c *Client) UpdateNodeBalancerNode(ctx context.Context, nodebalancerID int, configID int, nodeID int, updateOpts NodeBalancerNodeUpdateOptions) (*NodeBalancerNode, error) { + var body string + e, err := c.NodeBalancerNodes.endpointWithID(nodebalancerID, configID) + if err != nil { + return nil, err + } + e = fmt.Sprintf("%s/%d", e, nodeID) + + req := c.R(ctx).SetResult(&NodeBalancerNode{}) + + if bodyData, err := json.Marshal(updateOpts); err == nil { + body = string(bodyData) + } else { + return nil, NewError(err) + } + + r, err := coupleAPIErrors(req. + SetBody(body). + Put(e)) + + if err != nil { + return nil, err + } + return r.Result().(*NodeBalancerNode).fixDates(), nil +} + +// DeleteNodeBalancerNode deletes the NodeBalancerNode with the specified id +func (c *Client) DeleteNodeBalancerNode(ctx context.Context, nodebalancerID int, configID int, nodeID int) error { + e, err := c.NodeBalancerNodes.endpointWithID(nodebalancerID, configID) + if err != nil { + return err + } + e = fmt.Sprintf("%s/%d", e, nodeID) + + _, err = coupleAPIErrors(c.R(ctx).Delete(e)) + return err +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/nodebalancer_configs.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/nodebalancer_configs.go new file mode 100644 index 000000000..aa87019c5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/nodebalancer_configs.go @@ -0,0 +1,334 @@ +package linodego + +import ( + "context" + "encoding/json" + "fmt" +) + +// NodeBalancerConfig objects allow a NodeBalancer to accept traffic on a new port +type NodeBalancerConfig struct { + ID int `json:"id"` + Port int `json:"port"` + Protocol ConfigProtocol `json:"protocol"` + Algorithm ConfigAlgorithm `json:"algorithm"` + Stickiness ConfigStickiness `json:"stickiness"` + Check ConfigCheck `json:"check"` + CheckInterval int `json:"check_interval"` + CheckAttempts int `json:"check_attempts"` + CheckPath string `json:"check_path"` + CheckBody string `json:"check_body"` + CheckPassive bool `json:"check_passive"` + CheckTimeout int `json:"check_timeout"` + CipherSuite ConfigCipher `json:"cipher_suite"` + NodeBalancerID int `json:"nodebalancer_id"` + SSLCommonName string `json:"ssl_commonname"` + SSLFingerprint string `json:"ssl_fingerprint"` + SSLCert string `json:"ssl_cert"` + SSLKey string `json:"ssl_key"` + NodesStatus *NodeBalancerNodeStatus `json:"nodes_status"` +} + +// ConfigAlgorithm constants start with Algorithm and include Linode API NodeBalancer Config Algorithms +type ConfigAlgorithm string + +// ConfigAlgorithm constants reflect the NodeBalancer Config Algorithm +const ( + AlgorithmRoundRobin ConfigAlgorithm = "roundrobin" + AlgorithmLeastConn ConfigAlgorithm = "leastconn" + AlgorithmSource ConfigAlgorithm = "source" +) + +// ConfigStickiness constants start with Stickiness and include Linode API NodeBalancer Config Stickiness +type ConfigStickiness string + +// ConfigStickiness constants reflect the node stickiness method for a NodeBalancer Config +const ( + StickinessNone ConfigStickiness = "none" + StickinessTable ConfigStickiness = "table" + StickinessHTTPCookie ConfigStickiness = "http_cookie" +) + +// ConfigCheck constants start with Check and include Linode API NodeBalancer Config Check methods +type ConfigCheck string + +// ConfigCheck constants reflect the node health status checking method for a NodeBalancer Config +const ( + CheckNone ConfigCheck = "none" + CheckConnection ConfigCheck = "connection" + CheckHTTP ConfigCheck = "http" + CheckHTTPBody ConfigCheck = "http_body" +) + +// ConfigProtocol constants start with Protocol and include Linode API Nodebalancer Config protocols +type ConfigProtocol string + +// ConfigProtocol constants reflect the protocol used by a NodeBalancer Config +const ( + ProtocolHTTP ConfigProtocol = "http" + ProtocolHTTPS ConfigProtocol = "https" + ProtocolTCP ConfigProtocol = "tcp" +) + +// ConfigCipher constants start with Cipher and include Linode API NodeBalancer Config Cipher values +type ConfigCipher string + +// ConfigCipher constants reflect the preferred cipher set for a NodeBalancer Config +const ( + CipherRecommended ConfigCipher = "recommended" + CipherLegacy ConfigCipher = "legacy" +) + +// NodeBalancerNodeStatus represents the total number of nodes whose status is Up or Down +type NodeBalancerNodeStatus struct { + Up int `json:"up"` + Down int `json:"down"` +} + +// NodeBalancerConfigCreateOptions are permitted by CreateNodeBalancerConfig +type NodeBalancerConfigCreateOptions struct { + Port int `json:"port"` + Protocol ConfigProtocol `json:"protocol,omitempty"` + Algorithm ConfigAlgorithm `json:"algorithm,omitempty"` + Stickiness ConfigStickiness `json:"stickiness,omitempty"` + Check ConfigCheck `json:"check,omitempty"` + CheckInterval int `json:"check_interval,omitempty"` + CheckAttempts int `json:"check_attempts,omitempty"` + CheckPath string `json:"check_path,omitempty"` + CheckBody string `json:"check_body,omitempty"` + CheckPassive *bool `json:"check_passive,omitempty"` + CheckTimeout int `json:"check_timeout,omitempty"` + CipherSuite ConfigCipher `json:"cipher_suite,omitempty"` + SSLCert string `json:"ssl_cert,omitempty"` + SSLKey string `json:"ssl_key,omitempty"` + Nodes []NodeBalancerNodeCreateOptions `json:"nodes,omitempty"` +} + +// NodeBalancerConfigRebuildOptions used by RebuildNodeBalancerConfig +type NodeBalancerConfigRebuildOptions struct { + Port int `json:"port"` + Protocol ConfigProtocol `json:"protocol,omitempty"` + Algorithm ConfigAlgorithm `json:"algorithm,omitempty"` + Stickiness ConfigStickiness `json:"stickiness,omitempty"` + Check ConfigCheck `json:"check,omitempty"` + CheckInterval int `json:"check_interval,omitempty"` + CheckAttempts int `json:"check_attempts,omitempty"` + CheckPath string `json:"check_path,omitempty"` + CheckBody string `json:"check_body,omitempty"` + CheckPassive *bool `json:"check_passive,omitempty"` + CheckTimeout int `json:"check_timeout,omitempty"` + CipherSuite ConfigCipher `json:"cipher_suite,omitempty"` + SSLCert string `json:"ssl_cert,omitempty"` + SSLKey string `json:"ssl_key,omitempty"` + Nodes []NodeBalancerNodeCreateOptions `json:"nodes"` +} + +// NodeBalancerConfigUpdateOptions are permitted by UpdateNodeBalancerConfig +type NodeBalancerConfigUpdateOptions NodeBalancerConfigCreateOptions + +// GetCreateOptions converts a NodeBalancerConfig to NodeBalancerConfigCreateOptions for use in CreateNodeBalancerConfig +func (i NodeBalancerConfig) GetCreateOptions() NodeBalancerConfigCreateOptions { + return NodeBalancerConfigCreateOptions{ + Port: i.Port, + Protocol: i.Protocol, + Algorithm: i.Algorithm, + Stickiness: i.Stickiness, + Check: i.Check, + CheckInterval: i.CheckInterval, + CheckAttempts: i.CheckAttempts, + CheckTimeout: i.CheckTimeout, + CheckPath: i.CheckPath, + CheckBody: i.CheckBody, + CheckPassive: copyBool(&i.CheckPassive), + CipherSuite: i.CipherSuite, + SSLCert: i.SSLCert, + SSLKey: i.SSLKey, + } +} + +// GetUpdateOptions converts a NodeBalancerConfig to NodeBalancerConfigUpdateOptions for use in UpdateNodeBalancerConfig +func (i NodeBalancerConfig) GetUpdateOptions() NodeBalancerConfigUpdateOptions { + return NodeBalancerConfigUpdateOptions{ + Port: i.Port, + Protocol: i.Protocol, + Algorithm: i.Algorithm, + Stickiness: i.Stickiness, + Check: i.Check, + CheckInterval: i.CheckInterval, + CheckAttempts: i.CheckAttempts, + CheckPath: i.CheckPath, + CheckBody: i.CheckBody, + CheckPassive: copyBool(&i.CheckPassive), + CheckTimeout: i.CheckTimeout, + CipherSuite: i.CipherSuite, + SSLCert: i.SSLCert, + SSLKey: i.SSLKey, + } +} + +// GetRebuildOptions converts a NodeBalancerConfig to NodeBalancerConfigRebuildOptions for use in RebuildNodeBalancerConfig +func (i NodeBalancerConfig) GetRebuildOptions() NodeBalancerConfigRebuildOptions { + return NodeBalancerConfigRebuildOptions{ + Port: i.Port, + Protocol: i.Protocol, + Algorithm: i.Algorithm, + Stickiness: i.Stickiness, + Check: i.Check, + CheckInterval: i.CheckInterval, + CheckAttempts: i.CheckAttempts, + CheckTimeout: i.CheckTimeout, + CheckPath: i.CheckPath, + CheckBody: i.CheckBody, + CheckPassive: copyBool(&i.CheckPassive), + CipherSuite: i.CipherSuite, + SSLCert: i.SSLCert, + SSLKey: i.SSLKey, + Nodes: make([]NodeBalancerNodeCreateOptions, 0), + } +} + +// NodeBalancerConfigsPagedResponse represents a paginated NodeBalancerConfig API response +type NodeBalancerConfigsPagedResponse struct { + *PageOptions + Data []NodeBalancerConfig `json:"data"` +} + +// endpointWithID gets the endpoint URL for NodeBalancerConfig +func (NodeBalancerConfigsPagedResponse) endpointWithID(c *Client, id int) string { + endpoint, err := c.NodeBalancerConfigs.endpointWithID(id) + if err != nil { + panic(err) + } + return endpoint +} + +// appendData appends NodeBalancerConfigs when processing paginated NodeBalancerConfig responses +func (resp *NodeBalancerConfigsPagedResponse) appendData(r *NodeBalancerConfigsPagedResponse) { + resp.Data = append(resp.Data, r.Data...) +} + +// ListNodeBalancerConfigs lists NodeBalancerConfigs +func (c *Client) ListNodeBalancerConfigs(ctx context.Context, nodebalancerID int, opts *ListOptions) ([]NodeBalancerConfig, error) { + response := NodeBalancerConfigsPagedResponse{} + err := c.listHelperWithID(ctx, &response, nodebalancerID, opts) + for i := range response.Data { + response.Data[i].fixDates() + } + if err != nil { + return nil, err + } + return response.Data, nil +} + +// fixDates converts JSON timestamps to Go time.Time values +func (i *NodeBalancerConfig) fixDates() *NodeBalancerConfig { + return i +} + +// GetNodeBalancerConfig gets the template with the provided ID +func (c *Client) GetNodeBalancerConfig(ctx context.Context, nodebalancerID int, configID int) (*NodeBalancerConfig, error) { + e, err := c.NodeBalancerConfigs.endpointWithID(nodebalancerID) + if err != nil { + return nil, err + } + e = fmt.Sprintf("%s/%d", e, configID) + r, err := coupleAPIErrors(c.R(ctx).SetResult(&NodeBalancerConfig{}).Get(e)) + if err != nil { + return nil, err + } + return r.Result().(*NodeBalancerConfig).fixDates(), nil +} + +// CreateNodeBalancerConfig creates a NodeBalancerConfig +func (c *Client) CreateNodeBalancerConfig(ctx context.Context, nodebalancerID int, nodebalancerConfig NodeBalancerConfigCreateOptions) (*NodeBalancerConfig, error) { + var body string + e, err := c.NodeBalancerConfigs.endpointWithID(nodebalancerID) + + if err != nil { + return nil, err + } + + req := c.R(ctx).SetResult(&NodeBalancerConfig{}) + + if bodyData, err := json.Marshal(nodebalancerConfig); err == nil { + body = string(bodyData) + } else { + return nil, NewError(err) + } + + r, err := coupleAPIErrors(req. + SetHeader("Content-Type", "application/json"). + SetBody(body). + Post(e)) + + if err != nil { + return nil, err + } + return r.Result().(*NodeBalancerConfig).fixDates(), nil +} + +// UpdateNodeBalancerConfig updates the NodeBalancerConfig with the specified id +func (c *Client) UpdateNodeBalancerConfig(ctx context.Context, nodebalancerID int, configID int, updateOpts NodeBalancerConfigUpdateOptions) (*NodeBalancerConfig, error) { + var body string + e, err := c.NodeBalancerConfigs.endpointWithID(nodebalancerID) + if err != nil { + return nil, err + } + e = fmt.Sprintf("%s/%d", e, configID) + + req := c.R(ctx).SetResult(&NodeBalancerConfig{}) + + if bodyData, err := json.Marshal(updateOpts); err == nil { + body = string(bodyData) + } else { + return nil, NewError(err) + } + + r, err := coupleAPIErrors(req. + SetBody(body). + Put(e)) + + if err != nil { + return nil, err + } + return r.Result().(*NodeBalancerConfig).fixDates(), nil +} + +// DeleteNodeBalancerConfig deletes the NodeBalancerConfig with the specified id +func (c *Client) DeleteNodeBalancerConfig(ctx context.Context, nodebalancerID int, configID int) error { + e, err := c.NodeBalancerConfigs.endpointWithID(nodebalancerID) + if err != nil { + return err + } + e = fmt.Sprintf("%s/%d", e, configID) + + _, err = coupleAPIErrors(c.R(ctx).Delete(e)) + return err +} + +// RebuildNodeBalancerConfig updates the NodeBalancer with the specified id +func (c *Client) RebuildNodeBalancerConfig(ctx context.Context, nodeBalancerID int, configID int, rebuildOpts NodeBalancerConfigRebuildOptions) (*NodeBalancerConfig, error) { + var body string + e, err := c.NodeBalancerConfigs.endpointWithID(nodeBalancerID) + if err != nil { + return nil, err + } + e = fmt.Sprintf("%s/%d/rebuild", e, configID) + + req := c.R(ctx).SetResult(&NodeBalancerConfig{}) + + if bodyData, err := json.Marshal(rebuildOpts); err == nil { + body = string(bodyData) + } else { + return nil, NewError(err) + } + + r, err := coupleAPIErrors(req. + SetBody(body). + Post(e)) + + if err != nil { + return nil, err + } + return r.Result().(*NodeBalancerConfig).fixDates(), nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/pagination.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/pagination.go new file mode 100644 index 000000000..bfe6de3b7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/pagination.go @@ -0,0 +1,430 @@ +package linodego + +/** + * Pagination and Filtering types and helpers + */ + +import ( + "context" + "fmt" + "log" + "strconv" + + "gopkg.in/resty.v1" +) + +// PageOptions are the pagination parameters for List endpoints +type PageOptions struct { + Page int `url:"page,omitempty" json:"page"` + Pages int `url:"pages,omitempty" json:"pages"` + Results int `url:"results,omitempty" json:"results"` +} + +// ListOptions are the pagination and filtering (TODO) parameters for endpoints +type ListOptions struct { + *PageOptions + Filter string +} + +// NewListOptions simplified construction of ListOptions using only +// the two writable properties, Page and Filter +func NewListOptions(Page int, Filter string) *ListOptions { + return &ListOptions{PageOptions: &PageOptions{Page: Page}, Filter: Filter} + +} + +// listHelper abstracts fetching and pagination for GET endpoints that +// do not require any Ids (top level endpoints). +// When opts (or opts.Page) is nil, all pages will be fetched and +// returned in a single (endpoint-specific)PagedResponse +// opts.results and opts.pages will be updated from the API response +func (c *Client) listHelper(ctx context.Context, i interface{}, opts *ListOptions) error { + req := c.R(ctx) + if opts != nil && opts.PageOptions != nil && opts.Page > 0 { + req.SetQueryParam("page", strconv.Itoa(opts.Page)) + } + + var ( + err error + pages int + results int + r *resty.Response + ) + + if opts != nil && len(opts.Filter) > 0 { + req.SetHeader("X-Filter", opts.Filter) + } + + switch v := i.(type) { + case *LinodeKernelsPagedResponse: + if r, err = coupleAPIErrors(req.SetResult(LinodeKernelsPagedResponse{}).Get(v.endpoint(c))); err == nil { + pages = r.Result().(*LinodeKernelsPagedResponse).Pages + results = r.Result().(*LinodeKernelsPagedResponse).Results + v.appendData(r.Result().(*LinodeKernelsPagedResponse)) + } + case *LinodeTypesPagedResponse: + if r, err = coupleAPIErrors(req.SetResult(LinodeTypesPagedResponse{}).Get(v.endpoint(c))); err == nil { + pages = r.Result().(*LinodeTypesPagedResponse).Pages + results = r.Result().(*LinodeTypesPagedResponse).Results + v.appendData(r.Result().(*LinodeTypesPagedResponse)) + } + case *ImagesPagedResponse: + if r, err = coupleAPIErrors(req.SetResult(ImagesPagedResponse{}).Get(v.endpoint(c))); err == nil { + pages = r.Result().(*ImagesPagedResponse).Pages + results = r.Result().(*ImagesPagedResponse).Results + v.appendData(r.Result().(*ImagesPagedResponse)) + } + case *StackscriptsPagedResponse: + if r, err = coupleAPIErrors(req.SetResult(StackscriptsPagedResponse{}).Get(v.endpoint(c))); err == nil { + pages = r.Result().(*StackscriptsPagedResponse).Pages + results = r.Result().(*StackscriptsPagedResponse).Results + v.appendData(r.Result().(*StackscriptsPagedResponse)) + } + case *InstancesPagedResponse: + if r, err = coupleAPIErrors(req.SetResult(InstancesPagedResponse{}).Get(v.endpoint(c))); err == nil { + pages = r.Result().(*InstancesPagedResponse).Pages + results = r.Result().(*InstancesPagedResponse).Results + v.appendData(r.Result().(*InstancesPagedResponse)) + } + case *RegionsPagedResponse: + if r, err = coupleAPIErrors(req.SetResult(RegionsPagedResponse{}).Get(v.endpoint(c))); err == nil { + pages = r.Result().(*RegionsPagedResponse).Pages + results = r.Result().(*RegionsPagedResponse).Results + v.appendData(r.Result().(*RegionsPagedResponse)) + } + case *VolumesPagedResponse: + if r, err = coupleAPIErrors(req.SetResult(VolumesPagedResponse{}).Get(v.endpoint(c))); err == nil { + pages = r.Result().(*VolumesPagedResponse).Pages + results = r.Result().(*VolumesPagedResponse).Results + v.appendData(r.Result().(*VolumesPagedResponse)) + } + case *DomainsPagedResponse: + if r, err = coupleAPIErrors(req.SetResult(DomainsPagedResponse{}).Get(v.endpoint(c))); err == nil { + response, ok := r.Result().(*DomainsPagedResponse) + if !ok { + return fmt.Errorf("Response is not a *DomainsPagedResponse") + } + pages = response.Pages + results = response.Results + v.appendData(response) + } + case *EventsPagedResponse: + if r, err = coupleAPIErrors(req.SetResult(EventsPagedResponse{}).Get(v.endpoint(c))); err == nil { + pages = r.Result().(*EventsPagedResponse).Pages + results = r.Result().(*EventsPagedResponse).Results + v.appendData(r.Result().(*EventsPagedResponse)) + } + case *LongviewSubscriptionsPagedResponse: + if r, err = coupleAPIErrors(req.SetResult(LongviewSubscriptionsPagedResponse{}).Get(v.endpoint(c))); err == nil { + pages = r.Result().(*LongviewSubscriptionsPagedResponse).Pages + results = r.Result().(*LongviewSubscriptionsPagedResponse).Results + v.appendData(r.Result().(*LongviewSubscriptionsPagedResponse)) + } + case *LongviewClientsPagedResponse: + if r, err = coupleAPIErrors(req.SetResult(LongviewClientsPagedResponse{}).Get(v.endpoint(c))); err == nil { + pages = r.Result().(*LongviewClientsPagedResponse).Pages + results = r.Result().(*LongviewClientsPagedResponse).Results + v.appendData(r.Result().(*LongviewClientsPagedResponse)) + } + case *IPAddressesPagedResponse: + if r, err = coupleAPIErrors(req.SetResult(IPAddressesPagedResponse{}).Get(v.endpoint(c))); err == nil { + pages = r.Result().(*IPAddressesPagedResponse).Pages + results = r.Result().(*IPAddressesPagedResponse).Results + v.appendData(r.Result().(*IPAddressesPagedResponse)) + } + case *IPv6PoolsPagedResponse: + if r, err = coupleAPIErrors(req.SetResult(IPv6PoolsPagedResponse{}).Get(v.endpoint(c))); err == nil { + pages = r.Result().(*IPv6PoolsPagedResponse).Pages + results = r.Result().(*IPv6PoolsPagedResponse).Results + v.appendData(r.Result().(*IPv6PoolsPagedResponse)) + } + case *IPv6RangesPagedResponse: + if r, err = coupleAPIErrors(req.SetResult(IPv6RangesPagedResponse{}).Get(v.endpoint(c))); err == nil { + pages = r.Result().(*IPv6RangesPagedResponse).Pages + results = r.Result().(*IPv6RangesPagedResponse).Results + v.appendData(r.Result().(*IPv6RangesPagedResponse)) + // @TODO consolidate this type with IPv6PoolsPagedResponse? + } + case *SSHKeysPagedResponse: + if r, err = coupleAPIErrors(req.SetResult(SSHKeysPagedResponse{}).Get(v.endpoint(c))); err == nil { + response, ok := r.Result().(*SSHKeysPagedResponse) + if !ok { + return fmt.Errorf("Response is not a *SSHKeysPagedResponse") + } + pages = response.Pages + results = response.Results + v.appendData(response) + } + case *TicketsPagedResponse: + if r, err = coupleAPIErrors(req.SetResult(TicketsPagedResponse{}).Get(v.endpoint(c))); err == nil { + pages = r.Result().(*TicketsPagedResponse).Pages + results = r.Result().(*TicketsPagedResponse).Results + v.appendData(r.Result().(*TicketsPagedResponse)) + } + case *InvoicesPagedResponse: + if r, err = coupleAPIErrors(req.SetResult(InvoicesPagedResponse{}).Get(v.endpoint(c))); err == nil { + pages = r.Result().(*InvoicesPagedResponse).Pages + results = r.Result().(*InvoicesPagedResponse).Results + v.appendData(r.Result().(*InvoicesPagedResponse)) + } + case *NotificationsPagedResponse: + if r, err = coupleAPIErrors(req.SetResult(NotificationsPagedResponse{}).Get(v.endpoint(c))); err == nil { + pages = r.Result().(*NotificationsPagedResponse).Pages + results = r.Result().(*NotificationsPagedResponse).Results + v.appendData(r.Result().(*NotificationsPagedResponse)) + } + case *NodeBalancersPagedResponse: + if r, err = coupleAPIErrors(req.SetResult(NodeBalancersPagedResponse{}).Get(v.endpoint(c))); err == nil { + pages = r.Result().(*NodeBalancersPagedResponse).Pages + results = r.Result().(*NodeBalancersPagedResponse).Results + v.appendData(r.Result().(*NodeBalancersPagedResponse)) + } + case *TagsPagedResponse: + if r, err = coupleAPIErrors(req.SetResult(TagsPagedResponse{}).Get(v.endpoint(c))); err == nil { + pages = r.Result().(*TagsPagedResponse).Pages + results = r.Result().(*TagsPagedResponse).Results + v.appendData(r.Result().(*TagsPagedResponse)) + } + case *TokensPagedResponse: + if r, err = coupleAPIErrors(req.SetResult(TokensPagedResponse{}).Get(v.endpoint(c))); err == nil { + pages = r.Result().(*TokensPagedResponse).Pages + results = r.Result().(*TokensPagedResponse).Results + v.appendData(r.Result().(*TokensPagedResponse)) + } + case *UsersPagedResponse: + if r, err = coupleAPIErrors(req.SetResult(UsersPagedResponse{}).Get(v.endpoint(c))); err == nil { + pages = r.Result().(*UsersPagedResponse).Pages + results = r.Result().(*UsersPagedResponse).Results + v.appendData(r.Result().(*UsersPagedResponse)) + } + /** + case AccountOauthClientsPagedResponse: + case AccountPaymentsPagedResponse: + case ProfileAppsPagedResponse: + case ProfileWhitelistPagedResponse: + case ManagedContactsPagedResponse: + case ManagedCredentialsPagedResponse: + case ManagedIssuesPagedResponse: + case ManagedLinodeSettingsPagedResponse: + case ManagedServicesPagedResponse: + **/ + default: + log.Fatalf("listHelper interface{} %+v used", i) + } + + if err != nil { + return err + } + + if opts == nil { + for page := 2; page <= pages; page = page + 1 { + if err := c.listHelper(ctx, i, &ListOptions{PageOptions: &PageOptions{Page: page}}); err != nil { + return err + } + } + } else { + if opts.PageOptions == nil { + opts.PageOptions = &PageOptions{} + } + + if opts.Page == 0 { + for page := 2; page <= pages; page = page + 1 { + opts.Page = page + if err := c.listHelper(ctx, i, opts); err != nil { + return err + } + } + } + opts.Results = results + opts.Pages = pages + } + + return nil +} + +// listHelperWithID abstracts fetching and pagination for GET endpoints that +// require an Id (second level endpoints). +// When opts (or opts.Page) is nil, all pages will be fetched and +// returned in a single (endpoint-specific)PagedResponse +// opts.results and opts.pages will be updated from the API response +func (c *Client) listHelperWithID(ctx context.Context, i interface{}, idRaw interface{}, opts *ListOptions) error { + req := c.R(ctx) + if opts != nil && opts.Page > 0 { + req.SetQueryParam("page", strconv.Itoa(opts.Page)) + } + + var ( + err error + pages int + results int + r *resty.Response + ) + + id, _ := idRaw.(int) + + if opts != nil && len(opts.Filter) > 0 { + req.SetHeader("X-Filter", opts.Filter) + } + + switch v := i.(type) { + case *InvoiceItemsPagedResponse: + if r, err = coupleAPIErrors(req.SetResult(InvoiceItemsPagedResponse{}).Get(v.endpointWithID(c, id))); err == nil { + pages = r.Result().(*InvoiceItemsPagedResponse).Pages + results = r.Result().(*InvoiceItemsPagedResponse).Results + v.appendData(r.Result().(*InvoiceItemsPagedResponse)) + } + case *DomainRecordsPagedResponse: + if r, err = coupleAPIErrors(req.SetResult(DomainRecordsPagedResponse{}).Get(v.endpointWithID(c, id))); err == nil { + response, ok := r.Result().(*DomainRecordsPagedResponse) + if !ok { + return fmt.Errorf("Response is not a *DomainRecordsPagedResponse") + } + pages = response.Pages + results = response.Results + v.appendData(response) + } + case *InstanceConfigsPagedResponse: + if r, err = coupleAPIErrors(req.SetResult(InstanceConfigsPagedResponse{}).Get(v.endpointWithID(c, id))); err == nil { + pages = r.Result().(*InstanceConfigsPagedResponse).Pages + results = r.Result().(*InstanceConfigsPagedResponse).Results + v.appendData(r.Result().(*InstanceConfigsPagedResponse)) + } + case *InstanceDisksPagedResponse: + if r, err = coupleAPIErrors(req.SetResult(InstanceDisksPagedResponse{}).Get(v.endpointWithID(c, id))); err == nil { + pages = r.Result().(*InstanceDisksPagedResponse).Pages + results = r.Result().(*InstanceDisksPagedResponse).Results + v.appendData(r.Result().(*InstanceDisksPagedResponse)) + } + case *NodeBalancerConfigsPagedResponse: + if r, err = coupleAPIErrors(req.SetResult(NodeBalancerConfigsPagedResponse{}).Get(v.endpointWithID(c, id))); err == nil { + pages = r.Result().(*NodeBalancerConfigsPagedResponse).Pages + results = r.Result().(*NodeBalancerConfigsPagedResponse).Results + v.appendData(r.Result().(*NodeBalancerConfigsPagedResponse)) + } + case *InstanceVolumesPagedResponse: + if r, err = coupleAPIErrors(req.SetResult(InstanceVolumesPagedResponse{}).Get(v.endpointWithID(c, id))); err == nil { + pages = r.Result().(*InstanceVolumesPagedResponse).Pages + results = r.Result().(*InstanceVolumesPagedResponse).Results + v.appendData(r.Result().(*InstanceVolumesPagedResponse)) + } + case *TaggedObjectsPagedResponse: + idStr := idRaw.(string) + + if r, err = coupleAPIErrors(req.SetResult(TaggedObjectsPagedResponse{}).Get(v.endpointWithID(c, idStr))); err == nil { + pages = r.Result().(*TaggedObjectsPagedResponse).Pages + results = r.Result().(*TaggedObjectsPagedResponse).Results + v.appendData(r.Result().(*TaggedObjectsPagedResponse)) + } + /** + case TicketAttachmentsPagedResponse: + if r, err = req.SetResult(v).Get(v.endpoint(c)); r.Error() != nil { + return NewError(r) + } else if err == nil { + pages = r.Result().(*TicketAttachmentsPagedResponse).Pages + results = r.Result().(*TicketAttachmentsPagedResponse).Results + v.appendData(r.Result().(*TicketAttachmentsPagedResponse)) + } + case TicketRepliesPagedResponse: + if r, err = req.SetResult(v).Get(v.endpoint(c)); r.Error() != nil { + return NewError(r) + } else if err == nil { + pages = r.Result().(*TicketRepliesPagedResponse).Pages + results = r.Result().(*TicketRepliesPagedResponse).Results + v.appendData(r.Result().(*TicketRepliesPagedResponse)) + } + **/ + default: + log.Fatalf("Unknown listHelperWithID interface{} %T used", i) + } + + if err != nil { + return err + } + + if opts == nil { + for page := 2; page <= pages; page = page + 1 { + if err := c.listHelperWithID(ctx, i, id, &ListOptions{PageOptions: &PageOptions{Page: page}}); err != nil { + return err + } + } + } else { + if opts.PageOptions == nil { + opts.PageOptions = &PageOptions{} + } + if opts.Page == 0 { + for page := 2; page <= pages; page = page + 1 { + opts.Page = page + if err := c.listHelperWithID(ctx, i, id, opts); err != nil { + return err + } + } + } + opts.Results = results + opts.Pages = pages + } + + return nil +} + +// listHelperWithTwoIDs abstracts fetching and pagination for GET endpoints that +// require twos IDs (third level endpoints). +// When opts (or opts.Page) is nil, all pages will be fetched and +// returned in a single (endpoint-specific)PagedResponse +// opts.results and opts.pages will be updated from the API response +func (c *Client) listHelperWithTwoIDs(ctx context.Context, i interface{}, firstID, secondID int, opts *ListOptions) error { + req := c.R(ctx) + if opts != nil && opts.Page > 0 { + req.SetQueryParam("page", strconv.Itoa(opts.Page)) + } + + var ( + err error + pages int + results int + r *resty.Response + ) + + if opts != nil && len(opts.Filter) > 0 { + req.SetHeader("X-Filter", opts.Filter) + } + + switch v := i.(type) { + case *NodeBalancerNodesPagedResponse: + if r, err = coupleAPIErrors(req.SetResult(NodeBalancerNodesPagedResponse{}).Get(v.endpointWithTwoIDs(c, firstID, secondID))); err == nil { + pages = r.Result().(*NodeBalancerNodesPagedResponse).Pages + results = r.Result().(*NodeBalancerNodesPagedResponse).Results + v.appendData(r.Result().(*NodeBalancerNodesPagedResponse)) + } + + default: + log.Fatalf("Unknown listHelperWithTwoIDs interface{} %T used", i) + } + + if err != nil { + return err + } + + if opts == nil { + for page := 2; page <= pages; page = page + 1 { + if err := c.listHelper(ctx, i, &ListOptions{PageOptions: &PageOptions{Page: page}}); err != nil { + return err + } + } + } else { + if opts.PageOptions == nil { + opts.PageOptions = &PageOptions{} + } + if opts.Page == 0 { + for page := 2; page <= pages; page = page + 1 { + opts.Page = page + if err := c.listHelperWithTwoIDs(ctx, i, firstID, secondID, opts); err != nil { + return err + } + } + } + opts.Results = results + opts.Pages = pages + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/profile.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/profile.go new file mode 100644 index 000000000..3d29b2a52 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/profile.go @@ -0,0 +1,117 @@ +package linodego + +/* + - copy profile_test.go and do the same + - When updating Profile structs, + - use pointers where ever null'able would have a different meaning if the wrapper + supplied "" or 0 instead + - Add "NameOfResource" to client.go, resources.go, pagination.go +*/ + +import ( + "context" + "encoding/json" +) + +// LishAuthMethod constants start with AuthMethod and include Linode API Lish Authentication Methods +type LishAuthMethod string + +// LishAuthMethod constants are the methods of authentication allowed when connecting via Lish +const ( + AuthMethodPasswordKeys LishAuthMethod = "password_keys" + AuthMethodKeysOnly LishAuthMethod = "keys_only" + AuthMethodDisabled LishAuthMethod = "disabled" +) + +// ProfileReferrals represent a User's status in the Referral Program +type ProfileReferrals struct { + Total int `json:"total"` + Completed int `json:"completed"` + Pending int `json:"pending"` + Credit float64 `json:"credit"` + Code string `json:"code"` + URL string `json:"url"` +} + +// Profile represents a Profile object +type Profile struct { + UID int `json:"uid"` + Username string `json:"username"` + Email string `json:"email"` + Timezone string `json:"timezone"` + EmailNotifications bool `json:"email_notifications"` + IPWhitelistEnabled bool `json:"ip_whitelist_enabled"` + TwoFactorAuth bool `json:"two_factor_auth"` + Restricted bool `json:"restricted"` + LishAuthMethod LishAuthMethod `json:"lish_auth_method"` + Referrals ProfileReferrals `json:"referrals"` + AuthorizedKeys []string `json:"authorized_keys"` +} + +// ProfileUpdateOptions fields are those accepted by UpdateProfile +type ProfileUpdateOptions struct { + Email string `json:"email,omitempty"` + Timezone string `json:"timezone,omitempty"` + EmailNotifications *bool `json:"email_notifications,omitempty"` + IPWhitelistEnabled *bool `json:"ip_whitelist_enabled,omitempty"` + LishAuthMethod LishAuthMethod `json:"lish_auth_method,omitempty"` + AuthorizedKeys *[]string `json:"authorized_keys,omitempty"` + TwoFactorAuth *bool `json:"two_factor_auth,omitempty"` + Restricted *bool `json:"restricted,omitempty"` +} + +// GetUpdateOptions converts a Profile to ProfileUpdateOptions for use in UpdateProfile +func (i Profile) GetUpdateOptions() (o ProfileUpdateOptions) { + o.Email = i.Email + o.Timezone = i.Timezone + o.EmailNotifications = copyBool(&i.EmailNotifications) + o.IPWhitelistEnabled = copyBool(&i.IPWhitelistEnabled) + o.LishAuthMethod = i.LishAuthMethod + authorizedKeys := make([]string, len(i.AuthorizedKeys)) + copy(authorizedKeys, i.AuthorizedKeys) + o.AuthorizedKeys = &authorizedKeys + o.TwoFactorAuth = copyBool(&i.TwoFactorAuth) + o.Restricted = copyBool(&i.Restricted) + + return +} + +// GetProfile gets the profile with the provided ID +func (c *Client) GetProfile(ctx context.Context) (*Profile, error) { + e, err := c.Profile.Endpoint() + if err != nil { + return nil, err + } + + r, err := coupleAPIErrors(c.R(ctx).SetResult(&Profile{}).Get(e)) + if err != nil { + return nil, err + } + return r.Result().(*Profile), nil +} + +// UpdateProfile updates the Profile with the specified id +func (c *Client) UpdateProfile(ctx context.Context, updateOpts ProfileUpdateOptions) (*Profile, error) { + var body string + e, err := c.Profile.Endpoint() + if err != nil { + return nil, err + } + + req := c.R(ctx).SetResult(&Profile{}) + + if bodyData, err := json.Marshal(updateOpts); err == nil { + body = string(bodyData) + } else { + return nil, NewError(err) + } + + r, err := coupleAPIErrors(req. + SetBody(body). + Put(e)) + + if err != nil { + return nil, err + } + return r.Result().(*Profile), nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/profile_sshkeys.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/profile_sshkeys.go new file mode 100644 index 000000000..2ec4d4f71 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/profile_sshkeys.go @@ -0,0 +1,160 @@ +package linodego + +import ( + "context" + "encoding/json" + "fmt" + "time" +) + +// SSHKey represents a SSHKey object +type SSHKey struct { + ID int `json:"id"` + Label string `json:"label"` + SSHKey string `json:"ssh_key"` + CreatedStr string `json:"created"` + Created *time.Time `json:"-"` +} + +// SSHKeyCreateOptions fields are those accepted by CreateSSHKey +type SSHKeyCreateOptions struct { + Label string `json:"label"` + SSHKey string `json:"ssh_key"` +} + +// SSHKeyUpdateOptions fields are those accepted by UpdateSSHKey +type SSHKeyUpdateOptions struct { + Label string `json:"label"` +} + +// GetCreateOptions converts a SSHKey to SSHKeyCreateOptions for use in CreateSSHKey +func (i SSHKey) GetCreateOptions() (o SSHKeyCreateOptions) { + o.Label = i.Label + o.SSHKey = i.SSHKey + return +} + +// GetUpdateOptions converts a SSHKey to SSHKeyCreateOptions for use in UpdateSSHKey +func (i SSHKey) GetUpdateOptions() (o SSHKeyUpdateOptions) { + o.Label = i.Label + return +} + +// SSHKeysPagedResponse represents a paginated SSHKey API response +type SSHKeysPagedResponse struct { + *PageOptions + Data []SSHKey `json:"data"` +} + +// endpoint gets the endpoint URL for SSHKey +func (SSHKeysPagedResponse) endpoint(c *Client) string { + endpoint, err := c.SSHKeys.Endpoint() + if err != nil { + panic(err) + } + return endpoint +} + +// appendData appends SSHKeys when processing paginated SSHKey responses +func (resp *SSHKeysPagedResponse) appendData(r *SSHKeysPagedResponse) { + resp.Data = append(resp.Data, r.Data...) +} + +// ListSSHKeys lists SSHKeys +func (c *Client) ListSSHKeys(ctx context.Context, opts *ListOptions) ([]SSHKey, error) { + response := SSHKeysPagedResponse{} + err := c.listHelper(ctx, &response, opts) + for i := range response.Data { + response.Data[i].fixDates() + } + if err != nil { + return nil, err + } + return response.Data, nil +} + +// fixDates converts JSON timestamps to Go time.Time values +func (i *SSHKey) fixDates() *SSHKey { + i.Created, _ = parseDates(i.CreatedStr) + return i +} + +// GetSSHKey gets the sshkey with the provided ID +func (c *Client) GetSSHKey(ctx context.Context, id int) (*SSHKey, error) { + e, err := c.SSHKeys.Endpoint() + if err != nil { + return nil, err + } + e = fmt.Sprintf("%s/%d", e, id) + r, err := coupleAPIErrors(c.R(ctx).SetResult(&SSHKey{}).Get(e)) + if err != nil { + return nil, err + } + return r.Result().(*SSHKey).fixDates(), nil +} + +// CreateSSHKey creates a SSHKey +func (c *Client) CreateSSHKey(ctx context.Context, createOpts SSHKeyCreateOptions) (*SSHKey, error) { + var body string + e, err := c.SSHKeys.Endpoint() + if err != nil { + return nil, err + } + + req := c.R(ctx).SetResult(&SSHKey{}) + + if bodyData, err := json.Marshal(createOpts); err == nil { + body = string(bodyData) + } else { + return nil, NewError(err) + } + + r, err := coupleAPIErrors(req. + SetBody(body). + Post(e)) + + if err != nil { + return nil, err + } + return r.Result().(*SSHKey).fixDates(), nil +} + +// UpdateSSHKey updates the SSHKey with the specified id +func (c *Client) UpdateSSHKey(ctx context.Context, id int, updateOpts SSHKeyUpdateOptions) (*SSHKey, error) { + var body string + e, err := c.SSHKeys.Endpoint() + if err != nil { + return nil, err + } + e = fmt.Sprintf("%s/%d", e, id) + + req := c.R(ctx).SetResult(&SSHKey{}) + + if bodyData, err := json.Marshal(updateOpts); err == nil { + body = string(bodyData) + } else { + return nil, NewError(err) + } + + r, err := coupleAPIErrors(req. + SetBody(body). + Put(e)) + + if err != nil { + return nil, err + } + return r.Result().(*SSHKey).fixDates(), nil +} + +// DeleteSSHKey deletes the SSHKey with the specified id +func (c *Client) DeleteSSHKey(ctx context.Context, id int) error { + e, err := c.SSHKeys.Endpoint() + if err != nil { + return err + } + e = fmt.Sprintf("%s/%d", e, id) + + _, err = coupleAPIErrors(c.R(ctx).Delete(e)) + return err + +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/profile_tokens.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/profile_tokens.go new file mode 100644 index 000000000..bd95dfe05 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/profile_tokens.go @@ -0,0 +1,195 @@ +package linodego + +import ( + "context" + "encoding/json" + "fmt" + "time" +) + +// Token represents a Token object +type Token struct { + // This token's unique ID, which can be used to revoke it. + ID int `json:"id"` + + // The scopes this token was created with. These define what parts of the Account the token can be used to access. Many command-line tools, such as the Linode CLI, require tokens with access to *. Tokens with more restrictive scopes are generally more secure. + Scopes string `json:"scopes"` + + // This token's label. This is for display purposes only, but can be used to more easily track what you're using each token for. (1-100 Characters) + Label string `json:"label"` + + // The token used to access the API. When the token is created, the full token is returned here. Otherwise, only the first 16 characters are returned. + Token string `json:"token"` + + // The date and time this token was created. + Created *time.Time `json:"-"` + CreatedStr string `json:"created"` + + // When this token will expire. Personal Access Tokens cannot be renewed, so after this time the token will be completely unusable and a new token will need to be generated. Tokens may be created with "null" as their expiry and will never expire unless revoked. + Expiry *time.Time `json:"-"` + ExpiryStr string `json:"expiry"` +} + +// TokenCreateOptions fields are those accepted by CreateToken +type TokenCreateOptions struct { + // The scopes this token was created with. These define what parts of the Account the token can be used to access. Many command-line tools, such as the Linode CLI, require tokens with access to *. Tokens with more restrictive scopes are generally more secure. + Scopes string `json:"scopes"` + + // This token's label. This is for display purposes only, but can be used to more easily track what you're using each token for. (1-100 Characters) + Label string `json:"label"` + + // When this token will expire. Personal Access Tokens cannot be renewed, so after this time the token will be completely unusable and a new token will need to be generated. Tokens may be created with "null" as their expiry and will never expire unless revoked. + Expiry *time.Time `json:"expiry"` +} + +// TokenUpdateOptions fields are those accepted by UpdateToken +type TokenUpdateOptions struct { + // This token's label. This is for display purposes only, but can be used to more easily track what you're using each token for. (1-100 Characters) + Label string `json:"label"` +} + +// GetCreateOptions converts a Token to TokenCreateOptions for use in CreateToken +func (i Token) GetCreateOptions() (o TokenCreateOptions) { + o.Label = i.Label + o.Expiry = copyTime(i.Expiry) + o.Scopes = i.Scopes + return +} + +// GetUpdateOptions converts a Token to TokenUpdateOptions for use in UpdateToken +func (i Token) GetUpdateOptions() (o TokenUpdateOptions) { + o.Label = i.Label + return +} + +// TokensPagedResponse represents a paginated Token API response +type TokensPagedResponse struct { + *PageOptions + Data []Token `json:"data"` +} + +// endpoint gets the endpoint URL for Token +func (TokensPagedResponse) endpoint(c *Client) string { + endpoint, err := c.Tokens.Endpoint() + if err != nil { + panic(err) + } + return endpoint +} + +// appendData appends Tokens when processing paginated Token responses +func (resp *TokensPagedResponse) appendData(r *TokensPagedResponse) { + resp.Data = append(resp.Data, r.Data...) +} + +// ListTokens lists Tokens +func (c *Client) ListTokens(ctx context.Context, opts *ListOptions) ([]Token, error) { + response := TokensPagedResponse{} + err := c.listHelper(ctx, &response, opts) + for i := range response.Data { + response.Data[i].fixDates() + } + if err != nil { + return nil, err + } + return response.Data, nil +} + +// fixDates converts JSON timestamps to Go time.Time values +func (i *Token) fixDates() *Token { + i.Created, _ = parseDates(i.CreatedStr) + i.Expiry, _ = parseDates(i.ExpiryStr) + return i +} + +// GetToken gets the token with the provided ID +func (c *Client) GetToken(ctx context.Context, id int) (*Token, error) { + e, err := c.Tokens.Endpoint() + if err != nil { + return nil, err + } + e = fmt.Sprintf("%s/%d", e, id) + r, err := coupleAPIErrors(c.R(ctx).SetResult(&Token{}).Get(e)) + if err != nil { + return nil, err + } + return r.Result().(*Token).fixDates(), nil +} + +// CreateToken creates a Token +func (c *Client) CreateToken(ctx context.Context, createOpts TokenCreateOptions) (*Token, error) { + var body string + e, err := c.Tokens.Endpoint() + if err != nil { + return nil, err + } + + req := c.R(ctx).SetResult(&Token{}) + + // Format the Time as a string to meet the ISO8601 requirement + createOptsFixed := struct { + Label string `json:"label"` + Scopes string `json:"scopes"` + Expiry *string `json:"expiry"` + }{} + createOptsFixed.Label = createOpts.Label + createOptsFixed.Scopes = createOpts.Scopes + if createOpts.Expiry != nil { + iso8601Expiry := createOpts.Expiry.UTC().Format("2006-01-02T15:04:05") + createOptsFixed.Expiry = &iso8601Expiry + } + + if bodyData, err := json.Marshal(createOptsFixed); err == nil { + body = string(bodyData) + } else { + return nil, NewError(err) + } + + r, err := coupleAPIErrors(req. + SetBody(body). + Post(e)) + + if err != nil { + return nil, err + } + return r.Result().(*Token).fixDates(), nil +} + +// UpdateToken updates the Token with the specified id +func (c *Client) UpdateToken(ctx context.Context, id int, updateOpts TokenUpdateOptions) (*Token, error) { + var body string + e, err := c.Tokens.Endpoint() + if err != nil { + return nil, err + } + e = fmt.Sprintf("%s/%d", e, id) + + req := c.R(ctx).SetResult(&Token{}) + + if bodyData, err := json.Marshal(updateOpts); err == nil { + body = string(bodyData) + } else { + return nil, NewError(err) + } + + r, err := coupleAPIErrors(req. + SetBody(body). + Put(e)) + + if err != nil { + return nil, err + } + return r.Result().(*Token).fixDates(), nil +} + +// DeleteToken deletes the Token with the specified id +func (c *Client) DeleteToken(ctx context.Context, id int) error { + e, err := c.Tokens.Endpoint() + if err != nil { + return err + } + e = fmt.Sprintf("%s/%d", e, id) + + _, err = coupleAPIErrors(c.R(ctx).Delete(e)) + return err +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/regions.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/regions.go new file mode 100644 index 000000000..b13b996ea --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/regions.go @@ -0,0 +1,64 @@ +package linodego + +import ( + "context" + "fmt" +) + +// Region represents a linode region object +type Region struct { + ID string `json:"id"` + Country string `json:"country"` +} + +// RegionsPagedResponse represents a linode API response for listing +type RegionsPagedResponse struct { + *PageOptions + Data []Region `json:"data"` +} + +// endpoint gets the endpoint URL for Region +func (RegionsPagedResponse) endpoint(c *Client) string { + endpoint, err := c.Regions.Endpoint() + if err != nil { + panic(err) + } + return endpoint +} + +// appendData appends Regions when processing paginated Region responses +func (resp *RegionsPagedResponse) appendData(r *RegionsPagedResponse) { + resp.Data = append(resp.Data, r.Data...) +} + +// ListRegions lists Regions +func (c *Client) ListRegions(ctx context.Context, opts *ListOptions) ([]Region, error) { + response := RegionsPagedResponse{} + err := c.listHelper(ctx, &response, opts) + for i := range response.Data { + response.Data[i].fixDates() + } + if err != nil { + return nil, err + } + return response.Data, nil +} + +// fixDates converts JSON timestamps to Go time.Time values +func (v *Region) fixDates() *Region { + return v +} + +// GetRegion gets the template with the provided ID +func (c *Client) GetRegion(ctx context.Context, id string) (*Region, error) { + e, err := c.Regions.Endpoint() + if err != nil { + return nil, err + } + e = fmt.Sprintf("%s/%s", e, id) + r, err := coupleAPIErrors(c.R(ctx).SetResult(&Region{}).Get(e)) + if err != nil { + return nil, err + } + return r.Result().(*Region).fixDates(), nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/resources.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/resources.go new file mode 100644 index 000000000..fe0c258cf --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/resources.go @@ -0,0 +1,162 @@ +package linodego + +import ( + "bytes" + "context" + "fmt" + "text/template" + + "gopkg.in/resty.v1" +) + +const ( + stackscriptsName = "stackscripts" + imagesName = "images" + instancesName = "instances" + instanceDisksName = "disks" + instanceConfigsName = "configs" + instanceIPsName = "ips" + instanceSnapshotsName = "snapshots" + instanceVolumesName = "instancevolumes" + ipaddressesName = "ipaddresses" + ipv6poolsName = "ipv6pools" + ipv6rangesName = "ipv6ranges" + regionsName = "regions" + volumesName = "volumes" + kernelsName = "kernels" + typesName = "types" + domainsName = "domains" + domainRecordsName = "records" + longviewName = "longview" + longviewclientsName = "longviewclients" + longviewsubscriptionsName = "longviewsubscriptions" + nodebalancersName = "nodebalancers" + nodebalancerconfigsName = "nodebalancerconfigs" + nodebalancernodesName = "nodebalancernodes" + notificationsName = "notifications" + sshkeysName = "sshkeys" + ticketsName = "tickets" + tokensName = "tokens" + accountName = "account" + eventsName = "events" + invoicesName = "invoices" + invoiceItemsName = "invoiceitems" + profileName = "profile" + managedName = "managed" + tagsName = "tags" + usersName = "users" + // notificationsName = "notifications" + + stackscriptsEndpoint = "linode/stackscripts" + imagesEndpoint = "images" + instancesEndpoint = "linode/instances" + instanceConfigsEndpoint = "linode/instances/{{ .ID }}/configs" + instanceDisksEndpoint = "linode/instances/{{ .ID }}/disks" + instanceSnapshotsEndpoint = "linode/instances/{{ .ID }}/backups" + instanceIPsEndpoint = "linode/instances/{{ .ID }}/ips" + instanceVolumesEndpoint = "linode/instances/{{ .ID }}/volumes" + ipaddressesEndpoint = "networking/ips" + ipv6poolsEndpoint = "networking/ipv6/pools" + ipv6rangesEndpoint = "networking/ipv6/ranges" + regionsEndpoint = "regions" + volumesEndpoint = "volumes" + kernelsEndpoint = "linode/kernels" + typesEndpoint = "linode/types" + domainsEndpoint = "domains" + domainRecordsEndpoint = "domains/{{ .ID }}/records" + longviewEndpoint = "longview" + longviewclientsEndpoint = "longview/clients" + longviewsubscriptionsEndpoint = "longview/subscriptions" + nodebalancersEndpoint = "nodebalancers" + // @TODO we can't use these nodebalancer endpoints unless we include these templated fields + // The API seems inconsistent about including parent IDs in objects, (compare instance configs to nb configs) + // Parent IDs would be immutable for updates and are ignored in create requests .. + // Should we include these fields in CreateOpts and UpdateOpts? + nodebalancerconfigsEndpoint = "nodebalancers/{{ .ID }}/configs" + nodebalancernodesEndpoint = "nodebalancers/{{ .ID }}/configs/{{ .SecondID }}/nodes" + sshkeysEndpoint = "profile/sshkeys" + ticketsEndpoint = "support/tickets" + tokensEndpoint = "profile/tokens" + accountEndpoint = "account" + eventsEndpoint = "account/events" + invoicesEndpoint = "account/invoices" + invoiceItemsEndpoint = "account/invoices/{{ .ID }}/items" + profileEndpoint = "profile" + managedEndpoint = "managed" + tagsEndpoint = "tags" + usersEndpoint = "account/users" + notificationsEndpoint = "account/notifications" +) + +// Resource represents a linode API resource +type Resource struct { + name string + endpoint string + isTemplate bool + endpointTemplate *template.Template + R func(ctx context.Context) *resty.Request + PR func(ctx context.Context) *resty.Request +} + +// NewResource is the factory to create a new Resource struct. If it has a template string the useTemplate bool must be set. +func NewResource(client *Client, name string, endpoint string, useTemplate bool, singleType interface{}, pagedType interface{}) *Resource { + var tmpl *template.Template + + if useTemplate { + tmpl = template.Must(template.New(name).Parse(endpoint)) + } + + r := func(ctx context.Context) *resty.Request { + return client.R(ctx).SetResult(singleType) + } + + pr := func(ctx context.Context) *resty.Request { + return client.R(ctx).SetResult(pagedType) + } + + return &Resource{name, endpoint, useTemplate, tmpl, r, pr} +} + +func (r Resource) render(data ...interface{}) (string, error) { + if data == nil { + return "", NewError("Cannot template endpoint with data") + } + out := "" + buf := bytes.NewBufferString(out) + + var substitutions interface{} + if len(data) == 1 { + substitutions = struct{ ID interface{} }{data[0]} + } else if len(data) == 2 { + substitutions = struct { + ID interface{} + SecondID interface{} + }{data[0], data[1]} + } else { + return "", NewError("Too many arguments to render template (expected 1 or 2)") + } + if err := r.endpointTemplate.Execute(buf, substitutions); err != nil { + return "", NewError(err) + } + return buf.String(), nil +} + +// endpointWithID will return the rendered endpoint string for the resource with provided id +func (r Resource) endpointWithID(id ...int) (string, error) { + if !r.isTemplate { + return r.endpoint, nil + } + data := make([]interface{}, len(id)) + for i, v := range id { + data[i] = v + } + return r.render(data...) +} + +// Endpoint will return the non-templated endpoint string for resource +func (r Resource) Endpoint() (string, error) { + if r.isTemplate { + return "", NewError(fmt.Sprintf("Tried to get endpoint for %s without providing data for template", r.name)) + } + return r.endpoint, nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/stackscripts.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/stackscripts.go new file mode 100644 index 000000000..daf339b2f --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/stackscripts.go @@ -0,0 +1,208 @@ +package linodego + +import ( + "context" + "encoding/json" + "fmt" + "time" +) + +// Stackscript represents a Linode StackScript +type Stackscript struct { + CreatedStr string `json:"created"` + UpdatedStr string `json:"updated"` + + ID int `json:"id"` + Username string `json:"username"` + Label string `json:"label"` + Description string `json:"description"` + Images []string `json:"images"` + DeploymentsTotal int `json:"deployments_total"` + DeploymentsActive int `json:"deployments_active"` + IsPublic bool `json:"is_public"` + Created *time.Time `json:"-"` + Updated *time.Time `json:"-"` + RevNote string `json:"rev_note"` + Script string `json:"script"` + UserDefinedFields *[]StackscriptUDF `json:"user_defined_fields"` + UserGravatarID string `json:"user_gravatar_id"` +} + +// StackscriptUDF define a single variable that is accepted by a Stackscript +type StackscriptUDF struct { + // A human-readable label for the field that will serve as the input prompt for entering the value during deployment. + Label string `json:"label"` + + // The name of the field. + Name string `json:"name"` + + // An example value for the field. + Example string `json:"example"` + + // A list of acceptable single values for the field. + OneOf string `json:"oneOf,omitempty"` + + // A list of acceptable values for the field in any quantity, combination or order. + ManyOf string `json:"manyOf,omitempty"` + + // The default value. If not specified, this value will be used. + Default string `json:"default,omitempty"` +} + +// StackscriptCreateOptions fields are those accepted by CreateStackscript +type StackscriptCreateOptions struct { + Label string `json:"label"` + Description string `json:"description"` + Images []string `json:"images"` + IsPublic bool `json:"is_public"` + RevNote string `json:"rev_note"` + Script string `json:"script"` +} + +// StackscriptUpdateOptions fields are those accepted by UpdateStackscript +type StackscriptUpdateOptions StackscriptCreateOptions + +// GetCreateOptions converts a Stackscript to StackscriptCreateOptions for use in CreateStackscript +func (i Stackscript) GetCreateOptions() StackscriptCreateOptions { + return StackscriptCreateOptions{ + Label: i.Label, + Description: i.Description, + Images: i.Images, + IsPublic: i.IsPublic, + RevNote: i.RevNote, + Script: i.Script, + } +} + +// GetUpdateOptions converts a Stackscript to StackscriptUpdateOptions for use in UpdateStackscript +func (i Stackscript) GetUpdateOptions() StackscriptUpdateOptions { + return StackscriptUpdateOptions{ + Label: i.Label, + Description: i.Description, + Images: i.Images, + IsPublic: i.IsPublic, + RevNote: i.RevNote, + Script: i.Script, + } +} + +// StackscriptsPagedResponse represents a paginated Stackscript API response +type StackscriptsPagedResponse struct { + *PageOptions + Data []Stackscript `json:"data"` +} + +// endpoint gets the endpoint URL for Stackscript +func (StackscriptsPagedResponse) endpoint(c *Client) string { + endpoint, err := c.StackScripts.Endpoint() + if err != nil { + panic(err) + } + return endpoint +} + +// appendData appends Stackscripts when processing paginated Stackscript responses +func (resp *StackscriptsPagedResponse) appendData(r *StackscriptsPagedResponse) { + resp.Data = append(resp.Data, r.Data...) +} + +// ListStackscripts lists Stackscripts +func (c *Client) ListStackscripts(ctx context.Context, opts *ListOptions) ([]Stackscript, error) { + response := StackscriptsPagedResponse{} + err := c.listHelper(ctx, &response, opts) + for i := range response.Data { + response.Data[i].fixDates() + } + if err != nil { + return nil, err + } + return response.Data, nil +} + +// fixDates converts JSON timestamps to Go time.Time values +func (i *Stackscript) fixDates() *Stackscript { + i.Created, _ = parseDates(i.CreatedStr) + i.Updated, _ = parseDates(i.UpdatedStr) + return i +} + +// GetStackscript gets the Stackscript with the provided ID +func (c *Client) GetStackscript(ctx context.Context, id int) (*Stackscript, error) { + e, err := c.StackScripts.Endpoint() + if err != nil { + return nil, err + } + e = fmt.Sprintf("%s/%d", e, id) + r, err := coupleAPIErrors(c.R(ctx). + SetResult(&Stackscript{}). + Get(e)) + if err != nil { + return nil, err + } + return r.Result().(*Stackscript).fixDates(), nil +} + +// CreateStackscript creates a StackScript +func (c *Client) CreateStackscript(ctx context.Context, createOpts StackscriptCreateOptions) (*Stackscript, error) { + var body string + e, err := c.StackScripts.Endpoint() + if err != nil { + return nil, err + } + + req := c.R(ctx).SetResult(&Stackscript{}) + + if bodyData, err := json.Marshal(createOpts); err == nil { + body = string(bodyData) + } else { + return nil, NewError(err) + } + + r, err := coupleAPIErrors(req. + SetBody(body). + Post(e)) + + if err != nil { + return nil, err + } + return r.Result().(*Stackscript).fixDates(), nil +} + +// UpdateStackscript updates the StackScript with the specified id +func (c *Client) UpdateStackscript(ctx context.Context, id int, updateOpts StackscriptUpdateOptions) (*Stackscript, error) { + var body string + e, err := c.StackScripts.Endpoint() + if err != nil { + return nil, err + } + e = fmt.Sprintf("%s/%d", e, id) + + req := c.R(ctx).SetResult(&Stackscript{}) + + if bodyData, err := json.Marshal(updateOpts); err == nil { + body = string(bodyData) + } else { + return nil, NewError(err) + } + + r, err := coupleAPIErrors(req. + SetBody(body). + Put(e)) + + if err != nil { + return nil, err + } + return r.Result().(*Stackscript).fixDates(), nil +} + +// DeleteStackscript deletes the StackScript with the specified id +func (c *Client) DeleteStackscript(ctx context.Context, id int) error { + e, err := c.StackScripts.Endpoint() + if err != nil { + return err + } + e = fmt.Sprintf("%s/%d", e, id) + + _, err = coupleAPIErrors(c.R(ctx).Delete(e)) + return err +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/support.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/support.go new file mode 100644 index 000000000..6c72a4adf --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/support.go @@ -0,0 +1,88 @@ +package linodego + +import ( + "context" + "fmt" + "time" +) + +// Ticket represents a support ticket object +type Ticket struct { + ID int `json:"id"` + Attachments []string `json:"attachments"` + Closed *time.Time `json:"-"` + Description string `json:"description"` + Entity *TicketEntity `json:"entity"` + GravatarID string `json:"gravatar_id"` + Opened *time.Time `json:"-"` + OpenedBy string `json:"opened_by"` + Status TicketStatus `json:"status"` + Summary string `json:"summary"` + Updated *time.Time `json:"-"` + UpdatedBy string `json:"updated_by"` +} + +// TicketEntity refers a ticket to a specific entity +type TicketEntity struct { + ID int `json:"id"` + Label string `json:"label"` + Type string `json:"type"` + URL string `json:"url"` +} + +// TicketStatus constants start with Ticket and include Linode API Ticket Status values +type TicketStatus string + +// TicketStatus constants reflect the current status of a Ticket +const ( + TicketNew TicketStatus = "new" + TicketClosed TicketStatus = "closed" + TicketOpen TicketStatus = "open" +) + +// TicketsPagedResponse represents a paginated ticket API response +type TicketsPagedResponse struct { + *PageOptions + Data []Ticket `json:"data"` +} + +func (TicketsPagedResponse) endpoint(c *Client) string { + endpoint, err := c.Tickets.Endpoint() + if err != nil { + panic(err) + } + return endpoint +} + +func (resp *TicketsPagedResponse) appendData(r *TicketsPagedResponse) { + resp.Data = append(resp.Data, r.Data...) +} + +// ListTickets returns a collection of Support Tickets on the Account. Support Tickets +// can be both tickets opened with Linode for support, as well as tickets generated by +// Linode regarding the Account. This collection includes all Support Tickets generated +// on the Account, with open tickets returned first. +func (c *Client) ListTickets(ctx context.Context, opts *ListOptions) ([]Ticket, error) { + response := TicketsPagedResponse{} + err := c.listHelper(ctx, &response, opts) + if err != nil { + return nil, err + } + return response.Data, nil +} + +// GetTicket gets a Support Ticket on the Account with the specified ID +func (c *Client) GetTicket(ctx context.Context, id int) (*Ticket, error) { + e, err := c.Tickets.Endpoint() + if err != nil { + return nil, err + } + e = fmt.Sprintf("%s/%d", e, id) + r, err := coupleAPIErrors(c.R(ctx). + SetResult(&Ticket{}). + Get(e)) + if err != nil { + return nil, err + } + return r.Result().(*Ticket), nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/tags.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/tags.go new file mode 100644 index 000000000..2cb44272b --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/tags.go @@ -0,0 +1,219 @@ +package linodego + +import ( + "context" + "encoding/json" + "errors" + "fmt" +) + +// Tag represents a Tag object +type Tag struct { + Label string `json:"label"` +} + +// TaggedObject represents a Tagged Object object +type TaggedObject struct { + Type string `json:"type"` + RawData json.RawMessage `json:"data"` + Data interface{} `json:"-"` +} + +// SortedObjects currently only includes Instances +type SortedObjects struct { + Instances []Instance + Domains []Domain + Volumes []Volume + NodeBalancers []NodeBalancer + /* + StackScripts []Stackscript + */ +} + +// TaggedObjectList are a list of TaggedObjects, as returning by ListTaggedObjects +type TaggedObjectList []TaggedObject + +// TagCreateOptions fields are those accepted by CreateTag +type TagCreateOptions struct { + Label string `json:"label"` + Linodes []int `json:"linodes,omitempty"` + Domains []int `json:"domains,omitempty"` + Volumes []int `json:"volumes,omitempty"` + NodeBalancers []int `json:"nodebalancers,omitempty"` +} + +// GetCreateOptions converts a Tag to TagCreateOptions for use in CreateTag +func (i Tag) GetCreateOptions() (o TagCreateOptions) { + o.Label = i.Label + return +} + +// TaggedObjectsPagedResponse represents a paginated Tag API response +type TaggedObjectsPagedResponse struct { + *PageOptions + Data []TaggedObject `json:"data"` +} + +// TagsPagedResponse represents a paginated Tag API response +type TagsPagedResponse struct { + *PageOptions + Data []Tag `json:"data"` +} + +// endpoint gets the endpoint URL for Tag +func (TagsPagedResponse) endpoint(c *Client) string { + endpoint, err := c.Tags.Endpoint() + if err != nil { + panic(err) + } + return endpoint +} + +// endpoint gets the endpoint URL for Tag +func (TaggedObjectsPagedResponse) endpointWithID(c *Client, id string) string { + endpoint, err := c.Tags.Endpoint() + if err != nil { + panic(err) + } + endpoint = fmt.Sprintf("%s/%s", endpoint, id) + return endpoint +} + +// appendData appends Tags when processing paginated Tag responses +func (resp *TagsPagedResponse) appendData(r *TagsPagedResponse) { + resp.Data = append(resp.Data, r.Data...) +} + +// appendData appends TaggedObjects when processing paginated TaggedObjects responses +func (resp *TaggedObjectsPagedResponse) appendData(r *TaggedObjectsPagedResponse) { + resp.Data = append(resp.Data, r.Data...) +} + +// ListTags lists Tags +func (c *Client) ListTags(ctx context.Context, opts *ListOptions) ([]Tag, error) { + response := TagsPagedResponse{} + err := c.listHelper(ctx, &response, opts) + if err != nil { + return nil, err + } + return response.Data, nil +} + +// fixData stores an object of the type defined by Type in Data using RawData +func (i *TaggedObject) fixData() (*TaggedObject, error) { + switch i.Type { + case "linode": + obj := Instance{} + if err := json.Unmarshal(i.RawData, &obj); err != nil { + return nil, err + } + i.Data = obj + case "nodebalancer": + obj := NodeBalancer{} + if err := json.Unmarshal(i.RawData, &obj); err != nil { + return nil, err + } + i.Data = obj + case "domain": + obj := Domain{} + if err := json.Unmarshal(i.RawData, &obj); err != nil { + return nil, err + } + i.Data = obj + case "volume": + obj := Volume{} + if err := json.Unmarshal(i.RawData, &obj); err != nil { + return nil, err + } + i.Data = obj + } + + return i, nil +} + +// ListTaggedObjects lists Tagged Objects +func (c *Client) ListTaggedObjects(ctx context.Context, label string, opts *ListOptions) (TaggedObjectList, error) { + response := TaggedObjectsPagedResponse{} + err := c.listHelperWithID(ctx, &response, label, opts) + if err != nil { + return nil, err + } + for i := range response.Data { + if _, err := response.Data[i].fixData(); err != nil { + return nil, err + } + } + return response.Data, nil +} + +// SortedObjects converts a list of TaggedObjects into a Sorted Objects struct, for easier access +func (t TaggedObjectList) SortedObjects() (SortedObjects, error) { + so := SortedObjects{} + for _, o := range t { + switch o.Type { + case "linode": + if instance, ok := o.Data.(Instance); ok { + so.Instances = append(so.Instances, instance) + } else { + return so, errors.New("Expected an Instance when Type was \"linode\"") + } + case "domain": + if domain, ok := o.Data.(Domain); ok { + so.Domains = append(so.Domains, domain) + } else { + return so, errors.New("Expected a Domain when Type was \"domain\"") + } + case "volume": + if volume, ok := o.Data.(Volume); ok { + so.Volumes = append(so.Volumes, volume) + } else { + return so, errors.New("Expected an Volume when Type was \"volume\"") + } + case "nodebalancer": + if nodebalancer, ok := o.Data.(NodeBalancer); ok { + so.NodeBalancers = append(so.NodeBalancers, nodebalancer) + } else { + return so, errors.New("Expected an NodeBalancer when Type was \"nodebalancer\"") + } + } + } + return so, nil +} + +// CreateTag creates a Tag +func (c *Client) CreateTag(ctx context.Context, createOpts TagCreateOptions) (*Tag, error) { + var body string + e, err := c.Tags.Endpoint() + if err != nil { + return nil, err + } + + req := c.R(ctx).SetResult(&Tag{}) + + if bodyData, err := json.Marshal(createOpts); err == nil { + body = string(bodyData) + } else { + return nil, NewError(err) + } + + r, err := coupleAPIErrors(req. + SetBody(body). + Post(e)) + + if err != nil { + return nil, err + } + return r.Result().(*Tag), nil +} + +// DeleteTag deletes the Tag with the specified id +func (c *Client) DeleteTag(ctx context.Context, label string) error { + e, err := c.Tags.Endpoint() + if err != nil { + return err + } + e = fmt.Sprintf("%s/%s", e, label) + + _, err = coupleAPIErrors(c.R(ctx).Delete(e)) + return err +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/types.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/types.go new file mode 100644 index 000000000..d1ffbafef --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/types.go @@ -0,0 +1,90 @@ +package linodego + +import ( + "context" + "fmt" +) + +// LinodeType represents a linode type object +type LinodeType struct { + ID string `json:"id"` + Disk int `json:"disk"` + Class LinodeTypeClass `json:"class"` // enum: nanode, standard, highmem, dedicated + Price *LinodePrice `json:"price"` + Label string `json:"label"` + Addons *LinodeAddons `json:"addons"` + NetworkOut int `json:"network_out"` + Memory int `json:"memory"` + Transfer int `json:"transfer"` + VCPUs int `json:"vcpus"` +} + +// LinodePrice represents a linode type price object +type LinodePrice struct { + Hourly float32 `json:"hourly"` + Monthly float32 `json:"monthly"` +} + +// LinodeBackupsAddon represents a linode backups addon object +type LinodeBackupsAddon struct { + Price *LinodePrice `json:"price"` +} + +// LinodeAddons represent the linode addons object +type LinodeAddons struct { + Backups *LinodeBackupsAddon `json:"backups"` +} + +// LinodeTypeClass constants start with Class and include Linode API Instance Type Classes +type LinodeTypeClass string + +// LinodeTypeClass contants are the Instance Type Classes that an Instance Type can be assigned +const ( + ClassNanode LinodeTypeClass = "nanode" + ClassStandard LinodeTypeClass = "standard" + ClassHighmem LinodeTypeClass = "highmem" + ClassDedicated LinodeTypeClass = "dedicated" +) + +// LinodeTypesPagedResponse represents a linode types API response for listing +type LinodeTypesPagedResponse struct { + *PageOptions + Data []LinodeType `json:"data"` +} + +func (LinodeTypesPagedResponse) endpoint(c *Client) string { + endpoint, err := c.Types.Endpoint() + if err != nil { + panic(err) + } + return endpoint +} + +func (resp *LinodeTypesPagedResponse) appendData(r *LinodeTypesPagedResponse) { + resp.Data = append(resp.Data, r.Data...) +} + +// ListTypes lists linode types +func (c *Client) ListTypes(ctx context.Context, opts *ListOptions) ([]LinodeType, error) { + response := LinodeTypesPagedResponse{} + err := c.listHelper(ctx, &response, opts) + if err != nil { + return nil, err + } + return response.Data, nil +} + +// GetType gets the type with the provided ID +func (c *Client) GetType(ctx context.Context, typeID string) (*LinodeType, error) { + e, err := c.Types.Endpoint() + if err != nil { + return nil, err + } + e = fmt.Sprintf("%s/%s", e, typeID) + + r, err := coupleAPIErrors(c.Types.R(ctx).Get(e)) + if err != nil { + return nil, err + } + return r.Result().(*LinodeType), nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/util.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/util.go new file mode 100644 index 000000000..a37a304e4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/util.go @@ -0,0 +1,15 @@ +package linodego + +import "time" + +const ( + dateLayout = "2006-01-02T15:04:05" +) + +func parseDates(dateStr string) (*time.Time, error) { + d, err := time.Parse(dateLayout, dateStr) + if err != nil { + return nil, err + } + return &d, nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/volumes.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/volumes.go new file mode 100644 index 000000000..0a528b545 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/volumes.go @@ -0,0 +1,299 @@ +package linodego + +import ( + "context" + "encoding/json" + "fmt" + "time" +) + +// VolumeStatus indicates the status of the Volume +type VolumeStatus string + +const ( + // VolumeCreating indicates the Volume is being created and is not yet available for use + VolumeCreating VolumeStatus = "creating" + + // VolumeActive indicates the Volume is online and available for use + VolumeActive VolumeStatus = "active" + + // VolumeResizing indicates the Volume is in the process of upgrading its current capacity + VolumeResizing VolumeStatus = "resizing" + + // VolumeContactSupport indicates there is a problem with the Volume. A support ticket must be opened to resolve the issue + VolumeContactSupport VolumeStatus = "contact_support" +) + +// Volume represents a linode volume object +type Volume struct { + CreatedStr string `json:"created"` + UpdatedStr string `json:"updated"` + + ID int `json:"id"` + Label string `json:"label"` + Status VolumeStatus `json:"status"` + Region string `json:"region"` + Size int `json:"size"` + LinodeID *int `json:"linode_id"` + FilesystemPath string `json:"filesystem_path"` + Tags []string `json:"tags"` + Created time.Time `json:"-"` + Updated time.Time `json:"-"` +} + +// VolumeCreateOptions fields are those accepted by CreateVolume +type VolumeCreateOptions struct { + Label string `json:"label,omitempty"` + Region string `json:"region,omitempty"` + LinodeID int `json:"linode_id,omitempty"` + ConfigID int `json:"config_id,omitempty"` + // The Volume's size, in GiB. Minimum size is 10GiB, maximum size is 10240GiB. A "0" value will result in the default size. + Size int `json:"size,omitempty"` + // An array of tags applied to this object. Tags are for organizational purposes only. + Tags []string `json:"tags"` +} + +// VolumeUpdateOptions fields are those accepted by UpdateVolume +type VolumeUpdateOptions struct { + Label string `json:"label,omitempty"` + Tags *[]string `json:"tags,omitempty"` +} + +// VolumeAttachOptions fields are those accepted by AttachVolume +type VolumeAttachOptions struct { + LinodeID int `json:"linode_id"` + ConfigID int `json:"config_id,omitempty"` +} + +// VolumesPagedResponse represents a linode API response for listing of volumes +type VolumesPagedResponse struct { + *PageOptions + Data []Volume `json:"data"` +} + +// GetUpdateOptions converts a Volume to VolumeUpdateOptions for use in UpdateVolume +func (v Volume) GetUpdateOptions() (updateOpts VolumeUpdateOptions) { + updateOpts.Label = v.Label + updateOpts.Tags = &v.Tags + return +} + +// GetCreateOptions converts a Volume to VolumeCreateOptions for use in CreateVolume +func (v Volume) GetCreateOptions() (createOpts VolumeCreateOptions) { + createOpts.Label = v.Label + createOpts.Tags = v.Tags + createOpts.Region = v.Region + createOpts.Size = v.Size + if v.LinodeID != nil && *v.LinodeID > 0 { + createOpts.LinodeID = *v.LinodeID + } + return +} + +// endpoint gets the endpoint URL for Volume +func (VolumesPagedResponse) endpoint(c *Client) string { + endpoint, err := c.Volumes.Endpoint() + if err != nil { + panic(err) + } + return endpoint +} + +// appendData appends Volumes when processing paginated Volume responses +func (resp *VolumesPagedResponse) appendData(r *VolumesPagedResponse) { + resp.Data = append(resp.Data, r.Data...) +} + +// ListVolumes lists Volumes +func (c *Client) ListVolumes(ctx context.Context, opts *ListOptions) ([]Volume, error) { + response := VolumesPagedResponse{} + err := c.listHelper(ctx, &response, opts) + for i := range response.Data { + response.Data[i].fixDates() + } + if err != nil { + return nil, err + } + return response.Data, nil +} + +// fixDates converts JSON timestamps to Go time.Time values +func (v *Volume) fixDates() *Volume { + if parsed, err := parseDates(v.CreatedStr); err != nil { + v.Created = *parsed + } + if parsed, err := parseDates(v.UpdatedStr); err != nil { + v.Updated = *parsed + } + return v +} + +// GetVolume gets the template with the provided ID +func (c *Client) GetVolume(ctx context.Context, id int) (*Volume, error) { + e, err := c.Volumes.Endpoint() + if err != nil { + return nil, err + } + e = fmt.Sprintf("%s/%d", e, id) + r, err := coupleAPIErrors(c.R(ctx).SetResult(&Volume{}).Get(e)) + if err != nil { + return nil, err + } + return r.Result().(*Volume).fixDates(), nil +} + +// AttachVolume attaches a volume to a Linode instance +func (c *Client) AttachVolume(ctx context.Context, id int, options *VolumeAttachOptions) (*Volume, error) { + body := "" + if bodyData, err := json.Marshal(options); err == nil { + body = string(bodyData) + } else { + return nil, NewError(err) + } + + e, err := c.Volumes.Endpoint() + if err != nil { + return nil, NewError(err) + } + + e = fmt.Sprintf("%s/%d/attach", e, id) + resp, err := coupleAPIErrors(c.R(ctx). + SetResult(&Volume{}). + SetBody(body). + Post(e)) + + if err != nil { + return nil, err + } + + return resp.Result().(*Volume).fixDates(), nil +} + +// CreateVolume creates a Linode Volume +func (c *Client) CreateVolume(ctx context.Context, createOpts VolumeCreateOptions) (*Volume, error) { + body := "" + if bodyData, err := json.Marshal(createOpts); err == nil { + body = string(bodyData) + } else { + return nil, NewError(err) + } + + e, err := c.Volumes.Endpoint() + if err != nil { + return nil, NewError(err) + } + + resp, err := coupleAPIErrors(c.R(ctx). + SetResult(&Volume{}). + SetBody(body). + Post(e)) + + if err != nil { + return nil, err + } + + return resp.Result().(*Volume).fixDates(), nil +} + +// RenameVolume renames the label of a Linode volume +// DEPRECATED: use UpdateVolume +func (c *Client) RenameVolume(ctx context.Context, id int, label string) (*Volume, error) { + updateOpts := VolumeUpdateOptions{Label: label} + return c.UpdateVolume(ctx, id, updateOpts) +} + +// UpdateVolume updates the Volume with the specified id +func (c *Client) UpdateVolume(ctx context.Context, id int, volume VolumeUpdateOptions) (*Volume, error) { + var body string + e, err := c.Volumes.Endpoint() + if err != nil { + return nil, err + } + e = fmt.Sprintf("%s/%d", e, id) + + req := c.R(ctx).SetResult(&Volume{}) + + if bodyData, err := json.Marshal(volume); err == nil { + body = string(bodyData) + } else { + return nil, NewError(err) + } + + r, err := coupleAPIErrors(req. + SetBody(body). + Put(e)) + + if err != nil { + return nil, err + } + return r.Result().(*Volume).fixDates(), nil +} + +// CloneVolume clones a Linode volume +func (c *Client) CloneVolume(ctx context.Context, id int, label string) (*Volume, error) { + body := fmt.Sprintf("{\"label\":\"%s\"}", label) + + e, err := c.Volumes.Endpoint() + if err != nil { + return nil, NewError(err) + } + e = fmt.Sprintf("%s/%d/clone", e, id) + + resp, err := coupleAPIErrors(c.R(ctx). + SetResult(&Volume{}). + SetBody(body). + Post(e)) + + if err != nil { + return nil, err + } + + return resp.Result().(*Volume).fixDates(), nil +} + +// DetachVolume detaches a Linode volume +func (c *Client) DetachVolume(ctx context.Context, id int) error { + body := "" + + e, err := c.Volumes.Endpoint() + if err != nil { + return NewError(err) + } + + e = fmt.Sprintf("%s/%d/detach", e, id) + + _, err = coupleAPIErrors(c.R(ctx). + SetBody(body). + Post(e)) + + return err +} + +// ResizeVolume resizes an instance to new Linode type +func (c *Client) ResizeVolume(ctx context.Context, id int, size int) error { + body := fmt.Sprintf("{\"size\": %d}", size) + + e, err := c.Volumes.Endpoint() + if err != nil { + return NewError(err) + } + e = fmt.Sprintf("%s/%d/resize", e, id) + + _, err = coupleAPIErrors(c.R(ctx). + SetBody(body). + Post(e)) + + return err +} + +// DeleteVolume deletes the Volume with the specified id +func (c *Client) DeleteVolume(ctx context.Context, id int) error { + e, err := c.Volumes.Endpoint() + if err != nil { + return err + } + e = fmt.Sprintf("%s/%d", e, id) + + _, err = coupleAPIErrors(c.R(ctx).Delete(e)) + return err +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/waitfor.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/waitfor.go new file mode 100644 index 000000000..8f29a4150 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/github.com/linode/linodego/waitfor.go @@ -0,0 +1,273 @@ +package linodego + +import ( + "context" + "encoding/json" + "fmt" + "log" + "strconv" + "strings" + "time" +) + +// WaitForInstanceStatus waits for the Linode instance to reach the desired state +// before returning. It will timeout with an error after timeoutSeconds. +func (client Client) WaitForInstanceStatus(ctx context.Context, instanceID int, status InstanceStatus, timeoutSeconds int) (*Instance, error) { + ctx, cancel := context.WithTimeout(ctx, time.Duration(timeoutSeconds)*time.Second) + defer cancel() + + ticker := time.NewTicker(client.millisecondsPerPoll * time.Millisecond) + defer ticker.Stop() + for { + select { + case <-ticker.C: + instance, err := client.GetInstance(ctx, instanceID) + if err != nil { + return instance, err + } + complete := (instance.Status == status) + + if complete { + return instance, nil + } + case <-ctx.Done(): + return nil, fmt.Errorf("Error waiting for Instance %d status %s: %s", instanceID, status, ctx.Err()) + } + } +} + +// WaitForInstanceDiskStatus waits for the Linode instance disk to reach the desired state +// before returning. It will timeout with an error after timeoutSeconds. +func (client Client) WaitForInstanceDiskStatus(ctx context.Context, instanceID int, diskID int, status DiskStatus, timeoutSeconds int) (*InstanceDisk, error) { + ctx, cancel := context.WithTimeout(ctx, time.Duration(timeoutSeconds)*time.Second) + defer cancel() + + ticker := time.NewTicker(client.millisecondsPerPoll * time.Millisecond) + defer ticker.Stop() + for { + select { + case <-ticker.C: + // GetInstanceDisk will 404 on newly created disks. use List instead. + // disk, err := client.GetInstanceDisk(ctx, instanceID, diskID) + disks, err := client.ListInstanceDisks(ctx, instanceID, nil) + if err != nil { + return nil, err + } + for _, disk := range disks { + if disk.ID == diskID { + complete := (disk.Status == status) + if complete { + return &disk, nil + } + break + } + } + + case <-ctx.Done(): + return nil, fmt.Errorf("Error waiting for Instance %d Disk %d status %s: %s", instanceID, diskID, status, ctx.Err()) + } + } +} + +// WaitForVolumeStatus waits for the Volume to reach the desired state +// before returning. It will timeout with an error after timeoutSeconds. +func (client Client) WaitForVolumeStatus(ctx context.Context, volumeID int, status VolumeStatus, timeoutSeconds int) (*Volume, error) { + ctx, cancel := context.WithTimeout(ctx, time.Duration(timeoutSeconds)*time.Second) + defer cancel() + + ticker := time.NewTicker(client.millisecondsPerPoll * time.Millisecond) + defer ticker.Stop() + for { + select { + case <-ticker.C: + volume, err := client.GetVolume(ctx, volumeID) + if err != nil { + return volume, err + } + complete := (volume.Status == status) + + if complete { + return volume, nil + } + case <-ctx.Done(): + return nil, fmt.Errorf("Error waiting for Volume %d status %s: %s", volumeID, status, ctx.Err()) + } + } +} + +// WaitForSnapshotStatus waits for the Snapshot to reach the desired state +// before returning. It will timeout with an error after timeoutSeconds. +func (client Client) WaitForSnapshotStatus(ctx context.Context, instanceID int, snapshotID int, status InstanceSnapshotStatus, timeoutSeconds int) (*InstanceSnapshot, error) { + ctx, cancel := context.WithTimeout(ctx, time.Duration(timeoutSeconds)*time.Second) + defer cancel() + + ticker := time.NewTicker(client.millisecondsPerPoll * time.Millisecond) + defer ticker.Stop() + for { + select { + case <-ticker.C: + snapshot, err := client.GetInstanceSnapshot(ctx, instanceID, snapshotID) + if err != nil { + return snapshot, err + } + complete := (snapshot.Status == status) + + if complete { + return snapshot, nil + } + case <-ctx.Done(): + return nil, fmt.Errorf("Error waiting for Instance %d Snapshot %d status %s: %s", instanceID, snapshotID, status, ctx.Err()) + } + } +} + +// WaitForVolumeLinodeID waits for the Volume to match the desired LinodeID +// before returning. An active Instance will not immediately attach or detach a volume, so the +// the LinodeID must be polled to determine volume readiness from the API. +// WaitForVolumeLinodeID will timeout with an error after timeoutSeconds. +func (client Client) WaitForVolumeLinodeID(ctx context.Context, volumeID int, linodeID *int, timeoutSeconds int) (*Volume, error) { + ctx, cancel := context.WithTimeout(ctx, time.Duration(timeoutSeconds)*time.Second) + defer cancel() + + ticker := time.NewTicker(client.millisecondsPerPoll * time.Millisecond) + defer ticker.Stop() + for { + select { + case <-ticker.C: + volume, err := client.GetVolume(ctx, volumeID) + if err != nil { + return volume, err + } + + if linodeID == nil && volume.LinodeID == nil { + return volume, nil + } else if linodeID == nil || volume.LinodeID == nil { + // continue waiting + } else if *volume.LinodeID == *linodeID { + return volume, nil + } + + case <-ctx.Done(): + return nil, fmt.Errorf("Error waiting for Volume %d to have Instance %v: %s", volumeID, linodeID, ctx.Err()) + } + } +} + +// WaitForEventFinished waits for an entity action to reach the 'finished' state +// before returning. It will timeout with an error after timeoutSeconds. +// If the event indicates a failure both the failed event and the error will be returned. +func (client Client) WaitForEventFinished(ctx context.Context, id interface{}, entityType EntityType, action EventAction, minStart time.Time, timeoutSeconds int) (*Event, error) { + titledEntityType := strings.Title(string(entityType)) + filter, _ := json.Marshal(map[string]interface{}{ + // Entity is not filtered by the API + // Perhaps one day they will permit Entity ID/Type filtering. + // We'll have to verify these values manually, for now. + //"entity": map[string]interface{}{ + // "id": fmt.Sprintf("%v", id), + // "type": entityType, + //}, + + // Nor is action + //"action": action, + + // Created is not correctly filtered by the API + // We'll have to verify these values manually, for now. + //"created": map[string]interface{}{ + // "+gte": minStart.Format(time.RFC3339), + //}, + + // With potentially 1000+ events coming back, we should filter on something + "seen": false, + + // Float the latest events to page 1 + "+order_by": "created", + "+order": "desc", + }) + + // Optimistically restrict results to page 1. We should remove this when more + // precise filtering options exist. + listOptions := NewListOptions(1, string(filter)) + + ctx, cancel := context.WithTimeout(ctx, time.Duration(timeoutSeconds)*time.Second) + defer cancel() + + if deadline, ok := ctx.Deadline(); ok { + duration := time.Until(deadline) + log.Printf("[INFO] Waiting %d seconds for %s events since %v for %s %v", int(duration.Seconds()), action, minStart, titledEntityType, id) + } + + ticker := time.NewTicker(client.millisecondsPerPoll * time.Millisecond) + defer ticker.Stop() + for { + select { + case <-ticker.C: + + events, err := client.ListEvents(ctx, listOptions) + if err != nil { + return nil, err + } + + // If there are events for this instance + action, inspect them + for _, event := range events { + if event.Action != action { + // log.Println("action mismatch", event.Action, action) + continue + } + if event.Entity == nil || event.Entity.Type != entityType { + // log.Println("type mismatch", event.Entity.Type, entityType) + continue + } + + var entID string + + switch event.Entity.ID.(type) { + case float64, float32: + entID = fmt.Sprintf("%.f", event.Entity.ID) + case int: + entID = strconv.Itoa(event.Entity.ID.(int)) + default: + entID = fmt.Sprintf("%v", event.Entity.ID) + } + + var findID string + switch id.(type) { + case float64, float32: + findID = fmt.Sprintf("%.f", id) + case int: + findID = strconv.Itoa(id.(int)) + default: + findID = fmt.Sprintf("%v", id) + } + + if entID != findID { + // log.Println("id mismatch", entID, findID) + continue + } + + // @TODO(displague) This event.Created check shouldn't be needed, but it appears + // that the ListEvents method is not populating it correctly + if event.Created == nil { + log.Printf("[WARN] event.Created is nil when API returned: %#+v", event.CreatedStr) + } else if *event.Created != minStart && !event.Created.After(minStart) { + // Not the event we were looking for + // log.Println(event.Created, "is not >=", minStart) + continue + + } + + if event.Status == EventFailed { + return &event, fmt.Errorf("%s %v action %s failed", titledEntityType, id, action) + } else if event.Status == EventScheduled { + log.Printf("[INFO] %s %v action %s is scheduled", titledEntityType, id, action) + } else if event.Status == EventFinished { + log.Printf("[INFO] %s %v action %s is finished", titledEntityType, id, action) + return &event, nil + } + // TODO(displague) can we bump the ticker to TimeRemaining/2 (>=1) when non-nil? + log.Printf("[INFO] %s %v action %s is %s", titledEntityType, id, action, event.Status) + } + case <-ctx.Done(): + return nil, fmt.Errorf("Error waiting for Event Status '%s' of %s %v action '%s': %s", EventFinished, titledEntityType, id, action, ctx.Err()) + } + } +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/golang.org/x/net/LICENSE b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/golang.org/x/net/LICENSE new file mode 100644 index 000000000..6a66aea5e --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/golang.org/x/net/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/golang.org/x/net/PATENTS b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/golang.org/x/net/PATENTS new file mode 100644 index 000000000..733099041 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/golang.org/x/net/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/golang.org/x/net/context/context.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/golang.org/x/net/context/context.go new file mode 100644 index 000000000..a3c021d3f --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/golang.org/x/net/context/context.go @@ -0,0 +1,56 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package context defines the Context type, which carries deadlines, +// cancelation signals, and other request-scoped values across API boundaries +// and between processes. +// As of Go 1.7 this package is available in the standard library under the +// name context. https://golang.org/pkg/context. +// +// Incoming requests to a server should create a Context, and outgoing calls to +// servers should accept a Context. The chain of function calls between must +// propagate the Context, optionally replacing it with a modified copy created +// using WithDeadline, WithTimeout, WithCancel, or WithValue. +// +// Programs that use Contexts should follow these rules to keep interfaces +// consistent across packages and enable static analysis tools to check context +// propagation: +// +// Do not store Contexts inside a struct type; instead, pass a Context +// explicitly to each function that needs it. The Context should be the first +// parameter, typically named ctx: +// +// func DoSomething(ctx context.Context, arg Arg) error { +// // ... use ctx ... +// } +// +// Do not pass a nil Context, even if a function permits it. Pass context.TODO +// if you are unsure about which Context to use. +// +// Use context Values only for request-scoped data that transits processes and +// APIs, not for passing optional parameters to functions. +// +// The same Context may be passed to functions running in different goroutines; +// Contexts are safe for simultaneous use by multiple goroutines. +// +// See http://blog.golang.org/context for example code for a server that uses +// Contexts. +package context // import "golang.org/x/net/context" + +// Background returns a non-nil, empty Context. It is never canceled, has no +// values, and has no deadline. It is typically used by the main function, +// initialization, and tests, and as the top-level Context for incoming +// requests. +func Background() Context { + return background +} + +// TODO returns a non-nil, empty Context. Code should use context.TODO when +// it's unclear which Context to use or it is not yet available (because the +// surrounding function has not yet been extended to accept a Context +// parameter). TODO is recognized by static analysis tools that determine +// whether Contexts are propagated correctly in a program. +func TODO() Context { + return todo +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/golang.org/x/net/context/ctxhttp/ctxhttp.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/golang.org/x/net/context/ctxhttp/ctxhttp.go new file mode 100644 index 000000000..37dc0cfdb --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/golang.org/x/net/context/ctxhttp/ctxhttp.go @@ -0,0 +1,71 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package ctxhttp provides helper functions for performing context-aware HTTP requests. +package ctxhttp // import "golang.org/x/net/context/ctxhttp" + +import ( + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// Do sends an HTTP request with the provided http.Client and returns +// an HTTP response. +// +// If the client is nil, http.DefaultClient is used. +// +// The provided ctx must be non-nil. If it is canceled or times out, +// ctx.Err() will be returned. +func Do(ctx context.Context, client *http.Client, req *http.Request) (*http.Response, error) { + if client == nil { + client = http.DefaultClient + } + resp, err := client.Do(req.WithContext(ctx)) + // If we got an error, and the context has been canceled, + // the context's error is probably more useful. + if err != nil { + select { + case <-ctx.Done(): + err = ctx.Err() + default: + } + } + return resp, err +} + +// Get issues a GET request via the Do function. +func Get(ctx context.Context, client *http.Client, url string) (*http.Response, error) { + req, err := http.NewRequest("GET", url, nil) + if err != nil { + return nil, err + } + return Do(ctx, client, req) +} + +// Head issues a HEAD request via the Do function. +func Head(ctx context.Context, client *http.Client, url string) (*http.Response, error) { + req, err := http.NewRequest("HEAD", url, nil) + if err != nil { + return nil, err + } + return Do(ctx, client, req) +} + +// Post issues a POST request via the Do function. +func Post(ctx context.Context, client *http.Client, url string, bodyType string, body io.Reader) (*http.Response, error) { + req, err := http.NewRequest("POST", url, body) + if err != nil { + return nil, err + } + req.Header.Set("Content-Type", bodyType) + return Do(ctx, client, req) +} + +// PostForm issues a POST request via the Do function. +func PostForm(ctx context.Context, client *http.Client, url string, data url.Values) (*http.Response, error) { + return Post(ctx, client, url, "application/x-www-form-urlencoded", strings.NewReader(data.Encode())) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/golang.org/x/net/context/go17.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/golang.org/x/net/context/go17.go new file mode 100644 index 000000000..d20f52b7d --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/golang.org/x/net/context/go17.go @@ -0,0 +1,72 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build go1.7 + +package context + +import ( + "context" // standard library's context, as of Go 1.7 + "time" +) + +var ( + todo = context.TODO() + background = context.Background() +) + +// Canceled is the error returned by Context.Err when the context is canceled. +var Canceled = context.Canceled + +// DeadlineExceeded is the error returned by Context.Err when the context's +// deadline passes. +var DeadlineExceeded = context.DeadlineExceeded + +// WithCancel returns a copy of parent with a new Done channel. The returned +// context's Done channel is closed when the returned cancel function is called +// or when the parent context's Done channel is closed, whichever happens first. +// +// Canceling this context releases resources associated with it, so code should +// call cancel as soon as the operations running in this Context complete. +func WithCancel(parent Context) (ctx Context, cancel CancelFunc) { + ctx, f := context.WithCancel(parent) + return ctx, CancelFunc(f) +} + +// WithDeadline returns a copy of the parent context with the deadline adjusted +// to be no later than d. If the parent's deadline is already earlier than d, +// WithDeadline(parent, d) is semantically equivalent to parent. The returned +// context's Done channel is closed when the deadline expires, when the returned +// cancel function is called, or when the parent context's Done channel is +// closed, whichever happens first. +// +// Canceling this context releases resources associated with it, so code should +// call cancel as soon as the operations running in this Context complete. +func WithDeadline(parent Context, deadline time.Time) (Context, CancelFunc) { + ctx, f := context.WithDeadline(parent, deadline) + return ctx, CancelFunc(f) +} + +// WithTimeout returns WithDeadline(parent, time.Now().Add(timeout)). +// +// Canceling this context releases resources associated with it, so code should +// call cancel as soon as the operations running in this Context complete: +// +// func slowOperationWithTimeout(ctx context.Context) (Result, error) { +// ctx, cancel := context.WithTimeout(ctx, 100*time.Millisecond) +// defer cancel() // releases resources if slowOperation completes before timeout elapses +// return slowOperation(ctx) +// } +func WithTimeout(parent Context, timeout time.Duration) (Context, CancelFunc) { + return WithDeadline(parent, time.Now().Add(timeout)) +} + +// WithValue returns a copy of parent in which the value associated with key is +// val. +// +// Use context Values only for request-scoped data that transits processes and +// APIs, not for passing optional parameters to functions. +func WithValue(parent Context, key interface{}, val interface{}) Context { + return context.WithValue(parent, key, val) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/golang.org/x/net/context/go19.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/golang.org/x/net/context/go19.go new file mode 100644 index 000000000..d88bd1db1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/golang.org/x/net/context/go19.go @@ -0,0 +1,20 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build go1.9 + +package context + +import "context" // standard library's context, as of Go 1.7 + +// A Context carries a deadline, a cancelation signal, and other values across +// API boundaries. +// +// Context's methods may be called by multiple goroutines simultaneously. +type Context = context.Context + +// A CancelFunc tells an operation to abandon its work. +// A CancelFunc does not wait for the work to stop. +// After the first call, subsequent calls to a CancelFunc do nothing. +type CancelFunc = context.CancelFunc diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/golang.org/x/net/context/pre_go17.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/golang.org/x/net/context/pre_go17.go new file mode 100644 index 000000000..0f35592df --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/golang.org/x/net/context/pre_go17.go @@ -0,0 +1,300 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !go1.7 + +package context + +import ( + "errors" + "fmt" + "sync" + "time" +) + +// An emptyCtx is never canceled, has no values, and has no deadline. It is not +// struct{}, since vars of this type must have distinct addresses. +type emptyCtx int + +func (*emptyCtx) Deadline() (deadline time.Time, ok bool) { + return +} + +func (*emptyCtx) Done() <-chan struct{} { + return nil +} + +func (*emptyCtx) Err() error { + return nil +} + +func (*emptyCtx) Value(key interface{}) interface{} { + return nil +} + +func (e *emptyCtx) String() string { + switch e { + case background: + return "context.Background" + case todo: + return "context.TODO" + } + return "unknown empty Context" +} + +var ( + background = new(emptyCtx) + todo = new(emptyCtx) +) + +// Canceled is the error returned by Context.Err when the context is canceled. +var Canceled = errors.New("context canceled") + +// DeadlineExceeded is the error returned by Context.Err when the context's +// deadline passes. +var DeadlineExceeded = errors.New("context deadline exceeded") + +// WithCancel returns a copy of parent with a new Done channel. The returned +// context's Done channel is closed when the returned cancel function is called +// or when the parent context's Done channel is closed, whichever happens first. +// +// Canceling this context releases resources associated with it, so code should +// call cancel as soon as the operations running in this Context complete. +func WithCancel(parent Context) (ctx Context, cancel CancelFunc) { + c := newCancelCtx(parent) + propagateCancel(parent, c) + return c, func() { c.cancel(true, Canceled) } +} + +// newCancelCtx returns an initialized cancelCtx. +func newCancelCtx(parent Context) *cancelCtx { + return &cancelCtx{ + Context: parent, + done: make(chan struct{}), + } +} + +// propagateCancel arranges for child to be canceled when parent is. +func propagateCancel(parent Context, child canceler) { + if parent.Done() == nil { + return // parent is never canceled + } + if p, ok := parentCancelCtx(parent); ok { + p.mu.Lock() + if p.err != nil { + // parent has already been canceled + child.cancel(false, p.err) + } else { + if p.children == nil { + p.children = make(map[canceler]bool) + } + p.children[child] = true + } + p.mu.Unlock() + } else { + go func() { + select { + case <-parent.Done(): + child.cancel(false, parent.Err()) + case <-child.Done(): + } + }() + } +} + +// parentCancelCtx follows a chain of parent references until it finds a +// *cancelCtx. This function understands how each of the concrete types in this +// package represents its parent. +func parentCancelCtx(parent Context) (*cancelCtx, bool) { + for { + switch c := parent.(type) { + case *cancelCtx: + return c, true + case *timerCtx: + return c.cancelCtx, true + case *valueCtx: + parent = c.Context + default: + return nil, false + } + } +} + +// removeChild removes a context from its parent. +func removeChild(parent Context, child canceler) { + p, ok := parentCancelCtx(parent) + if !ok { + return + } + p.mu.Lock() + if p.children != nil { + delete(p.children, child) + } + p.mu.Unlock() +} + +// A canceler is a context type that can be canceled directly. The +// implementations are *cancelCtx and *timerCtx. +type canceler interface { + cancel(removeFromParent bool, err error) + Done() <-chan struct{} +} + +// A cancelCtx can be canceled. When canceled, it also cancels any children +// that implement canceler. +type cancelCtx struct { + Context + + done chan struct{} // closed by the first cancel call. + + mu sync.Mutex + children map[canceler]bool // set to nil by the first cancel call + err error // set to non-nil by the first cancel call +} + +func (c *cancelCtx) Done() <-chan struct{} { + return c.done +} + +func (c *cancelCtx) Err() error { + c.mu.Lock() + defer c.mu.Unlock() + return c.err +} + +func (c *cancelCtx) String() string { + return fmt.Sprintf("%v.WithCancel", c.Context) +} + +// cancel closes c.done, cancels each of c's children, and, if +// removeFromParent is true, removes c from its parent's children. +func (c *cancelCtx) cancel(removeFromParent bool, err error) { + if err == nil { + panic("context: internal error: missing cancel error") + } + c.mu.Lock() + if c.err != nil { + c.mu.Unlock() + return // already canceled + } + c.err = err + close(c.done) + for child := range c.children { + // NOTE: acquiring the child's lock while holding parent's lock. + child.cancel(false, err) + } + c.children = nil + c.mu.Unlock() + + if removeFromParent { + removeChild(c.Context, c) + } +} + +// WithDeadline returns a copy of the parent context with the deadline adjusted +// to be no later than d. If the parent's deadline is already earlier than d, +// WithDeadline(parent, d) is semantically equivalent to parent. The returned +// context's Done channel is closed when the deadline expires, when the returned +// cancel function is called, or when the parent context's Done channel is +// closed, whichever happens first. +// +// Canceling this context releases resources associated with it, so code should +// call cancel as soon as the operations running in this Context complete. +func WithDeadline(parent Context, deadline time.Time) (Context, CancelFunc) { + if cur, ok := parent.Deadline(); ok && cur.Before(deadline) { + // The current deadline is already sooner than the new one. + return WithCancel(parent) + } + c := &timerCtx{ + cancelCtx: newCancelCtx(parent), + deadline: deadline, + } + propagateCancel(parent, c) + d := deadline.Sub(time.Now()) + if d <= 0 { + c.cancel(true, DeadlineExceeded) // deadline has already passed + return c, func() { c.cancel(true, Canceled) } + } + c.mu.Lock() + defer c.mu.Unlock() + if c.err == nil { + c.timer = time.AfterFunc(d, func() { + c.cancel(true, DeadlineExceeded) + }) + } + return c, func() { c.cancel(true, Canceled) } +} + +// A timerCtx carries a timer and a deadline. It embeds a cancelCtx to +// implement Done and Err. It implements cancel by stopping its timer then +// delegating to cancelCtx.cancel. +type timerCtx struct { + *cancelCtx + timer *time.Timer // Under cancelCtx.mu. + + deadline time.Time +} + +func (c *timerCtx) Deadline() (deadline time.Time, ok bool) { + return c.deadline, true +} + +func (c *timerCtx) String() string { + return fmt.Sprintf("%v.WithDeadline(%s [%s])", c.cancelCtx.Context, c.deadline, c.deadline.Sub(time.Now())) +} + +func (c *timerCtx) cancel(removeFromParent bool, err error) { + c.cancelCtx.cancel(false, err) + if removeFromParent { + // Remove this timerCtx from its parent cancelCtx's children. + removeChild(c.cancelCtx.Context, c) + } + c.mu.Lock() + if c.timer != nil { + c.timer.Stop() + c.timer = nil + } + c.mu.Unlock() +} + +// WithTimeout returns WithDeadline(parent, time.Now().Add(timeout)). +// +// Canceling this context releases resources associated with it, so code should +// call cancel as soon as the operations running in this Context complete: +// +// func slowOperationWithTimeout(ctx context.Context) (Result, error) { +// ctx, cancel := context.WithTimeout(ctx, 100*time.Millisecond) +// defer cancel() // releases resources if slowOperation completes before timeout elapses +// return slowOperation(ctx) +// } +func WithTimeout(parent Context, timeout time.Duration) (Context, CancelFunc) { + return WithDeadline(parent, time.Now().Add(timeout)) +} + +// WithValue returns a copy of parent in which the value associated with key is +// val. +// +// Use context Values only for request-scoped data that transits processes and +// APIs, not for passing optional parameters to functions. +func WithValue(parent Context, key interface{}, val interface{}) Context { + return &valueCtx{parent, key, val} +} + +// A valueCtx carries a key-value pair. It implements Value for that key and +// delegates all other calls to the embedded Context. +type valueCtx struct { + Context + key, val interface{} +} + +func (c *valueCtx) String() string { + return fmt.Sprintf("%v.WithValue(%#v, %#v)", c.Context, c.key, c.val) +} + +func (c *valueCtx) Value(key interface{}) interface{} { + if c.key == key { + return c.val + } + return c.Context.Value(key) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/golang.org/x/net/context/pre_go19.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/golang.org/x/net/context/pre_go19.go new file mode 100644 index 000000000..b105f80be --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/golang.org/x/net/context/pre_go19.go @@ -0,0 +1,109 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !go1.9 + +package context + +import "time" + +// A Context carries a deadline, a cancelation signal, and other values across +// API boundaries. +// +// Context's methods may be called by multiple goroutines simultaneously. +type Context interface { + // Deadline returns the time when work done on behalf of this context + // should be canceled. Deadline returns ok==false when no deadline is + // set. Successive calls to Deadline return the same results. + Deadline() (deadline time.Time, ok bool) + + // Done returns a channel that's closed when work done on behalf of this + // context should be canceled. Done may return nil if this context can + // never be canceled. Successive calls to Done return the same value. + // + // WithCancel arranges for Done to be closed when cancel is called; + // WithDeadline arranges for Done to be closed when the deadline + // expires; WithTimeout arranges for Done to be closed when the timeout + // elapses. + // + // Done is provided for use in select statements: + // + // // Stream generates values with DoSomething and sends them to out + // // until DoSomething returns an error or ctx.Done is closed. + // func Stream(ctx context.Context, out chan<- Value) error { + // for { + // v, err := DoSomething(ctx) + // if err != nil { + // return err + // } + // select { + // case <-ctx.Done(): + // return ctx.Err() + // case out <- v: + // } + // } + // } + // + // See http://blog.golang.org/pipelines for more examples of how to use + // a Done channel for cancelation. + Done() <-chan struct{} + + // Err returns a non-nil error value after Done is closed. Err returns + // Canceled if the context was canceled or DeadlineExceeded if the + // context's deadline passed. No other values for Err are defined. + // After Done is closed, successive calls to Err return the same value. + Err() error + + // Value returns the value associated with this context for key, or nil + // if no value is associated with key. Successive calls to Value with + // the same key returns the same result. + // + // Use context values only for request-scoped data that transits + // processes and API boundaries, not for passing optional parameters to + // functions. + // + // A key identifies a specific value in a Context. Functions that wish + // to store values in Context typically allocate a key in a global + // variable then use that key as the argument to context.WithValue and + // Context.Value. A key can be any type that supports equality; + // packages should define keys as an unexported type to avoid + // collisions. + // + // Packages that define a Context key should provide type-safe accessors + // for the values stores using that key: + // + // // Package user defines a User type that's stored in Contexts. + // package user + // + // import "golang.org/x/net/context" + // + // // User is the type of value stored in the Contexts. + // type User struct {...} + // + // // key is an unexported type for keys defined in this package. + // // This prevents collisions with keys defined in other packages. + // type key int + // + // // userKey is the key for user.User values in Contexts. It is + // // unexported; clients use user.NewContext and user.FromContext + // // instead of using this key directly. + // var userKey key = 0 + // + // // NewContext returns a new Context that carries value u. + // func NewContext(ctx context.Context, u *User) context.Context { + // return context.WithValue(ctx, userKey, u) + // } + // + // // FromContext returns the User value stored in ctx, if any. + // func FromContext(ctx context.Context) (*User, bool) { + // u, ok := ctx.Value(userKey).(*User) + // return u, ok + // } + Value(key interface{}) interface{} +} + +// A CancelFunc tells an operation to abandon its work. +// A CancelFunc does not wait for the work to stop. +// After the first call, subsequent calls to a CancelFunc do nothing. +type CancelFunc func() diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/golang.org/x/net/publicsuffix/list.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/golang.org/x/net/publicsuffix/list.go new file mode 100644 index 000000000..8405ac1b7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/golang.org/x/net/publicsuffix/list.go @@ -0,0 +1,177 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:generate go run gen.go + +// Package publicsuffix provides a public suffix list based on data from +// https://publicsuffix.org/ +// +// A public suffix is one under which Internet users can directly register +// names. It is related to, but different from, a TLD (top level domain). +// +// "com" is a TLD (top level domain). Top level means it has no dots. +// +// "com" is also a public suffix. Amazon and Google have registered different +// siblings under that domain: "amazon.com" and "google.com". +// +// "au" is another TLD, again because it has no dots. But it's not "amazon.au". +// Instead, it's "amazon.com.au". +// +// "com.au" isn't an actual TLD, because it's not at the top level (it has +// dots). But it is an eTLD (effective TLD), because that's the branching point +// for domain name registrars. +// +// Another name for "an eTLD" is "a public suffix". Often, what's more of +// interest is the eTLD+1, or one more label than the public suffix. For +// example, browsers partition read/write access to HTTP cookies according to +// the eTLD+1. Web pages served from "amazon.com.au" can't read cookies from +// "google.com.au", but web pages served from "maps.google.com" can share +// cookies from "www.google.com", so you don't have to sign into Google Maps +// separately from signing into Google Web Search. Note that all four of those +// domains have 3 labels and 2 dots. The first two domains are each an eTLD+1, +// the last two are not (but share the same eTLD+1: "google.com"). +// +// All of these domains have the same eTLD+1: +// - "www.books.amazon.co.uk" +// - "books.amazon.co.uk" +// - "amazon.co.uk" +// Specifically, the eTLD+1 is "amazon.co.uk", because the eTLD is "co.uk". +// +// There is no closed form algorithm to calculate the eTLD of a domain. +// Instead, the calculation is data driven. This package provides a +// pre-compiled snapshot of Mozilla's PSL (Public Suffix List) data at +// https://publicsuffix.org/ +package publicsuffix // import "golang.org/x/net/publicsuffix" + +// TODO: specify case sensitivity and leading/trailing dot behavior for +// func PublicSuffix and func EffectiveTLDPlusOne. + +import ( + "fmt" + "net/http/cookiejar" + "strings" +) + +// List implements the cookiejar.PublicSuffixList interface by calling the +// PublicSuffix function. +var List cookiejar.PublicSuffixList = list{} + +type list struct{} + +func (list) PublicSuffix(domain string) string { + ps, _ := PublicSuffix(domain) + return ps +} + +func (list) String() string { + return version +} + +// PublicSuffix returns the public suffix of the domain using a copy of the +// publicsuffix.org database compiled into the library. +// +// icann is whether the public suffix is managed by the Internet Corporation +// for Assigned Names and Numbers. If not, the public suffix is either a +// privately managed domain (and in practice, not a top level domain) or an +// unmanaged top level domain (and not explicitly mentioned in the +// publicsuffix.org list). For example, "foo.org" and "foo.co.uk" are ICANN +// domains, "foo.dyndns.org" and "foo.blogspot.co.uk" are private domains and +// "cromulent" is an unmanaged top level domain. +// +// Use cases for distinguishing ICANN domains like "foo.com" from private +// domains like "foo.appspot.com" can be found at +// https://wiki.mozilla.org/Public_Suffix_List/Use_Cases +func PublicSuffix(domain string) (publicSuffix string, icann bool) { + lo, hi := uint32(0), uint32(numTLD) + s, suffix, icannNode, wildcard := domain, len(domain), false, false +loop: + for { + dot := strings.LastIndex(s, ".") + if wildcard { + icann = icannNode + suffix = 1 + dot + } + if lo == hi { + break + } + f := find(s[1+dot:], lo, hi) + if f == notFound { + break + } + + u := nodes[f] >> (nodesBitsTextOffset + nodesBitsTextLength) + icannNode = u&(1<>= nodesBitsICANN + u = children[u&(1<>= childrenBitsLo + hi = u & (1<>= childrenBitsHi + switch u & (1<>= childrenBitsNodeType + wildcard = u&(1<>= nodesBitsTextLength + offset := x & (1< 299 { + return nil, fmt.Errorf("oauth2: cannot fetch token: %v\nResponse: %s", r.Status, body) + } + + var token *Token + content, _, _ := mime.ParseMediaType(r.Header.Get("Content-Type")) + switch content { + case "application/x-www-form-urlencoded", "text/plain": + vals, err := url.ParseQuery(string(body)) + if err != nil { + return nil, err + } + token = &Token{ + AccessToken: vals.Get("access_token"), + TokenType: vals.Get("token_type"), + RefreshToken: vals.Get("refresh_token"), + Raw: vals, + } + e := vals.Get("expires_in") + if e == "" { + // TODO(jbd): Facebook's OAuth2 implementation is broken and + // returns expires_in field in expires. Remove the fallback to expires, + // when Facebook fixes their implementation. + e = vals.Get("expires") + } + expires, _ := strconv.Atoi(e) + if expires != 0 { + token.Expiry = time.Now().Add(time.Duration(expires) * time.Second) + } + default: + var tj tokenJSON + if err = json.Unmarshal(body, &tj); err != nil { + return nil, err + } + token = &Token{ + AccessToken: tj.AccessToken, + TokenType: tj.TokenType, + RefreshToken: tj.RefreshToken, + Expiry: tj.expiry(), + Raw: make(map[string]interface{}), + } + json.Unmarshal(body, &token.Raw) // no error checks for optional fields + } + // Don't overwrite `RefreshToken` with an empty value + // if this was a token refreshing request. + if token.RefreshToken == "" { + token.RefreshToken = v.Get("refresh_token") + } + return token, nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/golang.org/x/oauth2/internal/transport.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/golang.org/x/oauth2/internal/transport.go new file mode 100644 index 000000000..f1f173e34 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/golang.org/x/oauth2/internal/transport.go @@ -0,0 +1,69 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package internal contains support packages for oauth2 package. +package internal + +import ( + "net/http" + + "golang.org/x/net/context" +) + +// HTTPClient is the context key to use with golang.org/x/net/context's +// WithValue function to associate an *http.Client value with a context. +var HTTPClient ContextKey + +// ContextKey is just an empty struct. It exists so HTTPClient can be +// an immutable public variable with a unique type. It's immutable +// because nobody else can create a ContextKey, being unexported. +type ContextKey struct{} + +// ContextClientFunc is a func which tries to return an *http.Client +// given a Context value. If it returns an error, the search stops +// with that error. If it returns (nil, nil), the search continues +// down the list of registered funcs. +type ContextClientFunc func(context.Context) (*http.Client, error) + +var contextClientFuncs []ContextClientFunc + +func RegisterContextClientFunc(fn ContextClientFunc) { + contextClientFuncs = append(contextClientFuncs, fn) +} + +func ContextClient(ctx context.Context) (*http.Client, error) { + if ctx != nil { + if hc, ok := ctx.Value(HTTPClient).(*http.Client); ok { + return hc, nil + } + } + for _, fn := range contextClientFuncs { + c, err := fn(ctx) + if err != nil { + return nil, err + } + if c != nil { + return c, nil + } + } + return http.DefaultClient, nil +} + +func ContextTransport(ctx context.Context) http.RoundTripper { + hc, err := ContextClient(ctx) + // This is a rare error case (somebody using nil on App Engine). + if err != nil { + return ErrorTransport{err} + } + return hc.Transport +} + +// ErrorTransport returns the specified error on RoundTrip. +// This RoundTripper should be used in rare error cases where +// error handling can be postponed to response handling time. +type ErrorTransport struct{ Err error } + +func (t ErrorTransport) RoundTrip(*http.Request) (*http.Response, error) { + return nil, t.Err +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/golang.org/x/oauth2/oauth2.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/golang.org/x/oauth2/oauth2.go new file mode 100644 index 000000000..3e4835d7e --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/golang.org/x/oauth2/oauth2.go @@ -0,0 +1,340 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package oauth2 provides support for making +// OAuth2 authorized and authenticated HTTP requests. +// It can additionally grant authorization with Bearer JWT. +package oauth2 // import "golang.org/x/oauth2" + +import ( + "bytes" + "errors" + "net/http" + "net/url" + "strings" + "sync" + + "golang.org/x/net/context" + "golang.org/x/oauth2/internal" +) + +// NoContext is the default context you should supply if not using +// your own context.Context (see https://golang.org/x/net/context). +// +// Deprecated: Use context.Background() or context.TODO() instead. +var NoContext = context.TODO() + +// RegisterBrokenAuthHeaderProvider registers an OAuth2 server +// identified by the tokenURL prefix as an OAuth2 implementation +// which doesn't support the HTTP Basic authentication +// scheme to authenticate with the authorization server. +// Once a server is registered, credentials (client_id and client_secret) +// will be passed as query parameters rather than being present +// in the Authorization header. +// See https://code.google.com/p/goauth2/issues/detail?id=31 for background. +func RegisterBrokenAuthHeaderProvider(tokenURL string) { + internal.RegisterBrokenAuthHeaderProvider(tokenURL) +} + +// Config describes a typical 3-legged OAuth2 flow, with both the +// client application information and the server's endpoint URLs. +// For the client credentials 2-legged OAuth2 flow, see the clientcredentials +// package (https://golang.org/x/oauth2/clientcredentials). +type Config struct { + // ClientID is the application's ID. + ClientID string + + // ClientSecret is the application's secret. + ClientSecret string + + // Endpoint contains the resource server's token endpoint + // URLs. These are constants specific to each server and are + // often available via site-specific packages, such as + // google.Endpoint or github.Endpoint. + Endpoint Endpoint + + // RedirectURL is the URL to redirect users going through + // the OAuth flow, after the resource owner's URLs. + RedirectURL string + + // Scope specifies optional requested permissions. + Scopes []string +} + +// A TokenSource is anything that can return a token. +type TokenSource interface { + // Token returns a token or an error. + // Token must be safe for concurrent use by multiple goroutines. + // The returned Token must not be modified. + Token() (*Token, error) +} + +// Endpoint contains the OAuth 2.0 provider's authorization and token +// endpoint URLs. +type Endpoint struct { + AuthURL string + TokenURL string +} + +var ( + // AccessTypeOnline and AccessTypeOffline are options passed + // to the Options.AuthCodeURL method. They modify the + // "access_type" field that gets sent in the URL returned by + // AuthCodeURL. + // + // Online is the default if neither is specified. If your + // application needs to refresh access tokens when the user + // is not present at the browser, then use offline. This will + // result in your application obtaining a refresh token the + // first time your application exchanges an authorization + // code for a user. + AccessTypeOnline AuthCodeOption = SetAuthURLParam("access_type", "online") + AccessTypeOffline AuthCodeOption = SetAuthURLParam("access_type", "offline") + + // ApprovalForce forces the users to view the consent dialog + // and confirm the permissions request at the URL returned + // from AuthCodeURL, even if they've already done so. + ApprovalForce AuthCodeOption = SetAuthURLParam("approval_prompt", "force") +) + +// An AuthCodeOption is passed to Config.AuthCodeURL. +type AuthCodeOption interface { + setValue(url.Values) +} + +type setParam struct{ k, v string } + +func (p setParam) setValue(m url.Values) { m.Set(p.k, p.v) } + +// SetAuthURLParam builds an AuthCodeOption which passes key/value parameters +// to a provider's authorization endpoint. +func SetAuthURLParam(key, value string) AuthCodeOption { + return setParam{key, value} +} + +// AuthCodeURL returns a URL to OAuth 2.0 provider's consent page +// that asks for permissions for the required scopes explicitly. +// +// State is a token to protect the user from CSRF attacks. You must +// always provide a non-zero string and validate that it matches the +// the state query parameter on your redirect callback. +// See http://tools.ietf.org/html/rfc6749#section-10.12 for more info. +// +// Opts may include AccessTypeOnline or AccessTypeOffline, as well +// as ApprovalForce. +func (c *Config) AuthCodeURL(state string, opts ...AuthCodeOption) string { + var buf bytes.Buffer + buf.WriteString(c.Endpoint.AuthURL) + v := url.Values{ + "response_type": {"code"}, + "client_id": {c.ClientID}, + "redirect_uri": internal.CondVal(c.RedirectURL), + "scope": internal.CondVal(strings.Join(c.Scopes, " ")), + "state": internal.CondVal(state), + } + for _, opt := range opts { + opt.setValue(v) + } + if strings.Contains(c.Endpoint.AuthURL, "?") { + buf.WriteByte('&') + } else { + buf.WriteByte('?') + } + buf.WriteString(v.Encode()) + return buf.String() +} + +// PasswordCredentialsToken converts a resource owner username and password +// pair into a token. +// +// Per the RFC, this grant type should only be used "when there is a high +// degree of trust between the resource owner and the client (e.g., the client +// is part of the device operating system or a highly privileged application), +// and when other authorization grant types are not available." +// See https://tools.ietf.org/html/rfc6749#section-4.3 for more info. +// +// The HTTP client to use is derived from the context. +// If nil, http.DefaultClient is used. +func (c *Config) PasswordCredentialsToken(ctx context.Context, username, password string) (*Token, error) { + return retrieveToken(ctx, c, url.Values{ + "grant_type": {"password"}, + "username": {username}, + "password": {password}, + "scope": internal.CondVal(strings.Join(c.Scopes, " ")), + }) +} + +// Exchange converts an authorization code into a token. +// +// It is used after a resource provider redirects the user back +// to the Redirect URI (the URL obtained from AuthCodeURL). +// +// The HTTP client to use is derived from the context. +// If a client is not provided via the context, http.DefaultClient is used. +// +// The code will be in the *http.Request.FormValue("code"). Before +// calling Exchange, be sure to validate FormValue("state"). +func (c *Config) Exchange(ctx context.Context, code string) (*Token, error) { + return retrieveToken(ctx, c, url.Values{ + "grant_type": {"authorization_code"}, + "code": {code}, + "redirect_uri": internal.CondVal(c.RedirectURL), + }) +} + +// Client returns an HTTP client using the provided token. +// The token will auto-refresh as necessary. The underlying +// HTTP transport will be obtained using the provided context. +// The returned client and its Transport should not be modified. +func (c *Config) Client(ctx context.Context, t *Token) *http.Client { + return NewClient(ctx, c.TokenSource(ctx, t)) +} + +// TokenSource returns a TokenSource that returns t until t expires, +// automatically refreshing it as necessary using the provided context. +// +// Most users will use Config.Client instead. +func (c *Config) TokenSource(ctx context.Context, t *Token) TokenSource { + tkr := &tokenRefresher{ + ctx: ctx, + conf: c, + } + if t != nil { + tkr.refreshToken = t.RefreshToken + } + return &reuseTokenSource{ + t: t, + new: tkr, + } +} + +// tokenRefresher is a TokenSource that makes "grant_type"=="refresh_token" +// HTTP requests to renew a token using a RefreshToken. +type tokenRefresher struct { + ctx context.Context // used to get HTTP requests + conf *Config + refreshToken string +} + +// WARNING: Token is not safe for concurrent access, as it +// updates the tokenRefresher's refreshToken field. +// Within this package, it is used by reuseTokenSource which +// synchronizes calls to this method with its own mutex. +func (tf *tokenRefresher) Token() (*Token, error) { + if tf.refreshToken == "" { + return nil, errors.New("oauth2: token expired and refresh token is not set") + } + + tk, err := retrieveToken(tf.ctx, tf.conf, url.Values{ + "grant_type": {"refresh_token"}, + "refresh_token": {tf.refreshToken}, + }) + + if err != nil { + return nil, err + } + if tf.refreshToken != tk.RefreshToken { + tf.refreshToken = tk.RefreshToken + } + return tk, err +} + +// reuseTokenSource is a TokenSource that holds a single token in memory +// and validates its expiry before each call to retrieve it with +// Token. If it's expired, it will be auto-refreshed using the +// new TokenSource. +type reuseTokenSource struct { + new TokenSource // called when t is expired. + + mu sync.Mutex // guards t + t *Token +} + +// Token returns the current token if it's still valid, else will +// refresh the current token (using r.Context for HTTP client +// information) and return the new one. +func (s *reuseTokenSource) Token() (*Token, error) { + s.mu.Lock() + defer s.mu.Unlock() + if s.t.Valid() { + return s.t, nil + } + t, err := s.new.Token() + if err != nil { + return nil, err + } + s.t = t + return t, nil +} + +// StaticTokenSource returns a TokenSource that always returns the same token. +// Because the provided token t is never refreshed, StaticTokenSource is only +// useful for tokens that never expire. +func StaticTokenSource(t *Token) TokenSource { + return staticTokenSource{t} +} + +// staticTokenSource is a TokenSource that always returns the same Token. +type staticTokenSource struct { + t *Token +} + +func (s staticTokenSource) Token() (*Token, error) { + return s.t, nil +} + +// HTTPClient is the context key to use with golang.org/x/net/context's +// WithValue function to associate an *http.Client value with a context. +var HTTPClient internal.ContextKey + +// NewClient creates an *http.Client from a Context and TokenSource. +// The returned client is not valid beyond the lifetime of the context. +// +// As a special case, if src is nil, a non-OAuth2 client is returned +// using the provided context. This exists to support related OAuth2 +// packages. +func NewClient(ctx context.Context, src TokenSource) *http.Client { + if src == nil { + c, err := internal.ContextClient(ctx) + if err != nil { + return &http.Client{Transport: internal.ErrorTransport{Err: err}} + } + return c + } + return &http.Client{ + Transport: &Transport{ + Base: internal.ContextTransport(ctx), + Source: ReuseTokenSource(nil, src), + }, + } +} + +// ReuseTokenSource returns a TokenSource which repeatedly returns the +// same token as long as it's valid, starting with t. +// When its cached token is invalid, a new token is obtained from src. +// +// ReuseTokenSource is typically used to reuse tokens from a cache +// (such as a file on disk) between runs of a program, rather than +// obtaining new tokens unnecessarily. +// +// The initial token t may be nil, in which case the TokenSource is +// wrapped in a caching version if it isn't one already. This also +// means it's always safe to wrap ReuseTokenSource around any other +// TokenSource without adverse effects. +func ReuseTokenSource(t *Token, src TokenSource) TokenSource { + // Don't wrap a reuseTokenSource in itself. That would work, + // but cause an unnecessary number of mutex operations. + // Just build the equivalent one. + if rt, ok := src.(*reuseTokenSource); ok { + if t == nil { + // Just use it directly. + return rt + } + src = rt.new + } + return &reuseTokenSource{ + t: t, + new: src, + } +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/golang.org/x/oauth2/token.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/golang.org/x/oauth2/token.go new file mode 100644 index 000000000..7a3167f15 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/golang.org/x/oauth2/token.go @@ -0,0 +1,158 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package oauth2 + +import ( + "net/http" + "net/url" + "strconv" + "strings" + "time" + + "golang.org/x/net/context" + "golang.org/x/oauth2/internal" +) + +// expiryDelta determines how earlier a token should be considered +// expired than its actual expiration time. It is used to avoid late +// expirations due to client-server time mismatches. +const expiryDelta = 10 * time.Second + +// Token represents the crendentials used to authorize +// the requests to access protected resources on the OAuth 2.0 +// provider's backend. +// +// Most users of this package should not access fields of Token +// directly. They're exported mostly for use by related packages +// implementing derivative OAuth2 flows. +type Token struct { + // AccessToken is the token that authorizes and authenticates + // the requests. + AccessToken string `json:"access_token"` + + // TokenType is the type of token. + // The Type method returns either this or "Bearer", the default. + TokenType string `json:"token_type,omitempty"` + + // RefreshToken is a token that's used by the application + // (as opposed to the user) to refresh the access token + // if it expires. + RefreshToken string `json:"refresh_token,omitempty"` + + // Expiry is the optional expiration time of the access token. + // + // If zero, TokenSource implementations will reuse the same + // token forever and RefreshToken or equivalent + // mechanisms for that TokenSource will not be used. + Expiry time.Time `json:"expiry,omitempty"` + + // raw optionally contains extra metadata from the server + // when updating a token. + raw interface{} +} + +// Type returns t.TokenType if non-empty, else "Bearer". +func (t *Token) Type() string { + if strings.EqualFold(t.TokenType, "bearer") { + return "Bearer" + } + if strings.EqualFold(t.TokenType, "mac") { + return "MAC" + } + if strings.EqualFold(t.TokenType, "basic") { + return "Basic" + } + if t.TokenType != "" { + return t.TokenType + } + return "Bearer" +} + +// SetAuthHeader sets the Authorization header to r using the access +// token in t. +// +// This method is unnecessary when using Transport or an HTTP Client +// returned by this package. +func (t *Token) SetAuthHeader(r *http.Request) { + r.Header.Set("Authorization", t.Type()+" "+t.AccessToken) +} + +// WithExtra returns a new Token that's a clone of t, but using the +// provided raw extra map. This is only intended for use by packages +// implementing derivative OAuth2 flows. +func (t *Token) WithExtra(extra interface{}) *Token { + t2 := new(Token) + *t2 = *t + t2.raw = extra + return t2 +} + +// Extra returns an extra field. +// Extra fields are key-value pairs returned by the server as a +// part of the token retrieval response. +func (t *Token) Extra(key string) interface{} { + if raw, ok := t.raw.(map[string]interface{}); ok { + return raw[key] + } + + vals, ok := t.raw.(url.Values) + if !ok { + return nil + } + + v := vals.Get(key) + switch s := strings.TrimSpace(v); strings.Count(s, ".") { + case 0: // Contains no "."; try to parse as int + if i, err := strconv.ParseInt(s, 10, 64); err == nil { + return i + } + case 1: // Contains a single "."; try to parse as float + if f, err := strconv.ParseFloat(s, 64); err == nil { + return f + } + } + + return v +} + +// expired reports whether the token is expired. +// t must be non-nil. +func (t *Token) expired() bool { + if t.Expiry.IsZero() { + return false + } + return t.Expiry.Add(-expiryDelta).Before(time.Now()) +} + +// Valid reports whether t is non-nil, has an AccessToken, and is not expired. +func (t *Token) Valid() bool { + return t != nil && t.AccessToken != "" && !t.expired() +} + +// tokenFromInternal maps an *internal.Token struct into +// a *Token struct. +func tokenFromInternal(t *internal.Token) *Token { + if t == nil { + return nil + } + return &Token{ + AccessToken: t.AccessToken, + TokenType: t.TokenType, + RefreshToken: t.RefreshToken, + Expiry: t.Expiry, + raw: t.Raw, + } +} + +// retrieveToken takes a *Config and uses that to retrieve an *internal.Token. +// This token is then mapped from *internal.Token into an *oauth2.Token which is returned along +// with an error.. +func retrieveToken(ctx context.Context, c *Config, v url.Values) (*Token, error) { + tk, err := internal.RetrieveToken(ctx, c.ClientID, c.ClientSecret, c.Endpoint.TokenURL, v) + if err != nil { + return nil, err + } + return tokenFromInternal(tk), nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/golang.org/x/oauth2/transport.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/golang.org/x/oauth2/transport.go new file mode 100644 index 000000000..92ac7e253 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/golang.org/x/oauth2/transport.go @@ -0,0 +1,132 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package oauth2 + +import ( + "errors" + "io" + "net/http" + "sync" +) + +// Transport is an http.RoundTripper that makes OAuth 2.0 HTTP requests, +// wrapping a base RoundTripper and adding an Authorization header +// with a token from the supplied Sources. +// +// Transport is a low-level mechanism. Most code will use the +// higher-level Config.Client method instead. +type Transport struct { + // Source supplies the token to add to outgoing requests' + // Authorization headers. + Source TokenSource + + // Base is the base RoundTripper used to make HTTP requests. + // If nil, http.DefaultTransport is used. + Base http.RoundTripper + + mu sync.Mutex // guards modReq + modReq map[*http.Request]*http.Request // original -> modified +} + +// RoundTrip authorizes and authenticates the request with an +// access token. If no token exists or token is expired, +// tries to refresh/fetch a new token. +func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) { + if t.Source == nil { + return nil, errors.New("oauth2: Transport's Source is nil") + } + token, err := t.Source.Token() + if err != nil { + return nil, err + } + + req2 := cloneRequest(req) // per RoundTripper contract + token.SetAuthHeader(req2) + t.setModReq(req, req2) + res, err := t.base().RoundTrip(req2) + if err != nil { + t.setModReq(req, nil) + return nil, err + } + res.Body = &onEOFReader{ + rc: res.Body, + fn: func() { t.setModReq(req, nil) }, + } + return res, nil +} + +// CancelRequest cancels an in-flight request by closing its connection. +func (t *Transport) CancelRequest(req *http.Request) { + type canceler interface { + CancelRequest(*http.Request) + } + if cr, ok := t.base().(canceler); ok { + t.mu.Lock() + modReq := t.modReq[req] + delete(t.modReq, req) + t.mu.Unlock() + cr.CancelRequest(modReq) + } +} + +func (t *Transport) base() http.RoundTripper { + if t.Base != nil { + return t.Base + } + return http.DefaultTransport +} + +func (t *Transport) setModReq(orig, mod *http.Request) { + t.mu.Lock() + defer t.mu.Unlock() + if t.modReq == nil { + t.modReq = make(map[*http.Request]*http.Request) + } + if mod == nil { + delete(t.modReq, orig) + } else { + t.modReq[orig] = mod + } +} + +// cloneRequest returns a clone of the provided *http.Request. +// The clone is a shallow copy of the struct and its Header map. +func cloneRequest(r *http.Request) *http.Request { + // shallow copy of the struct + r2 := new(http.Request) + *r2 = *r + // deep copy of the Header + r2.Header = make(http.Header, len(r.Header)) + for k, s := range r.Header { + r2.Header[k] = append([]string(nil), s...) + } + return r2 +} + +type onEOFReader struct { + rc io.ReadCloser + fn func() +} + +func (r *onEOFReader) Read(p []byte) (n int, err error) { + n, err = r.rc.Read(p) + if err == io.EOF { + r.runFunc() + } + return +} + +func (r *onEOFReader) Close() error { + err := r.rc.Close() + r.runFunc() + return err +} + +func (r *onEOFReader) runFunc() { + if fn := r.fn; fn != nil { + fn() + r.fn = nil + } +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/LICENSE b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/LICENSE new file mode 100644 index 000000000..d64569567 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/api.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/api.go new file mode 100644 index 000000000..a6ec19e14 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/api.go @@ -0,0 +1,675 @@ +// Copyright 2011 Google Inc. All rights reserved. +// Use of this source code is governed by the Apache 2.0 +// license that can be found in the LICENSE file. + +// +build !appengine + +package internal + +import ( + "bytes" + "errors" + "fmt" + "io/ioutil" + "log" + "net" + "net/http" + "net/url" + "os" + "runtime" + "strconv" + "strings" + "sync" + "sync/atomic" + "time" + + "github.com/golang/protobuf/proto" + netcontext "golang.org/x/net/context" + + basepb "google.golang.org/appengine/internal/base" + logpb "google.golang.org/appengine/internal/log" + remotepb "google.golang.org/appengine/internal/remote_api" +) + +const ( + apiPath = "/rpc_http" + defaultTicketSuffix = "/default.20150612t184001.0" +) + +var ( + // Incoming headers. + ticketHeader = http.CanonicalHeaderKey("X-AppEngine-API-Ticket") + dapperHeader = http.CanonicalHeaderKey("X-Google-DapperTraceInfo") + traceHeader = http.CanonicalHeaderKey("X-Cloud-Trace-Context") + curNamespaceHeader = http.CanonicalHeaderKey("X-AppEngine-Current-Namespace") + userIPHeader = http.CanonicalHeaderKey("X-AppEngine-User-IP") + remoteAddrHeader = http.CanonicalHeaderKey("X-AppEngine-Remote-Addr") + devRequestIdHeader = http.CanonicalHeaderKey("X-Appengine-Dev-Request-Id") + + // Outgoing headers. + apiEndpointHeader = http.CanonicalHeaderKey("X-Google-RPC-Service-Endpoint") + apiEndpointHeaderValue = []string{"app-engine-apis"} + apiMethodHeader = http.CanonicalHeaderKey("X-Google-RPC-Service-Method") + apiMethodHeaderValue = []string{"/VMRemoteAPI.CallRemoteAPI"} + apiDeadlineHeader = http.CanonicalHeaderKey("X-Google-RPC-Service-Deadline") + apiContentType = http.CanonicalHeaderKey("Content-Type") + apiContentTypeValue = []string{"application/octet-stream"} + logFlushHeader = http.CanonicalHeaderKey("X-AppEngine-Log-Flush-Count") + + apiHTTPClient = &http.Client{ + Transport: &http.Transport{ + Proxy: http.ProxyFromEnvironment, + Dial: limitDial, + }, + } + + defaultTicketOnce sync.Once + defaultTicket string + backgroundContextOnce sync.Once + backgroundContext netcontext.Context +) + +func apiURL() *url.URL { + host, port := "appengine.googleapis.internal", "10001" + if h := os.Getenv("API_HOST"); h != "" { + host = h + } + if p := os.Getenv("API_PORT"); p != "" { + port = p + } + return &url.URL{ + Scheme: "http", + Host: host + ":" + port, + Path: apiPath, + } +} + +func handleHTTP(w http.ResponseWriter, r *http.Request) { + c := &context{ + req: r, + outHeader: w.Header(), + apiURL: apiURL(), + } + r = r.WithContext(withContext(r.Context(), c)) + c.req = r + + stopFlushing := make(chan int) + + // Patch up RemoteAddr so it looks reasonable. + if addr := r.Header.Get(userIPHeader); addr != "" { + r.RemoteAddr = addr + } else if addr = r.Header.Get(remoteAddrHeader); addr != "" { + r.RemoteAddr = addr + } else { + // Should not normally reach here, but pick a sensible default anyway. + r.RemoteAddr = "127.0.0.1" + } + // The address in the headers will most likely be of these forms: + // 123.123.123.123 + // 2001:db8::1 + // net/http.Request.RemoteAddr is specified to be in "IP:port" form. + if _, _, err := net.SplitHostPort(r.RemoteAddr); err != nil { + // Assume the remote address is only a host; add a default port. + r.RemoteAddr = net.JoinHostPort(r.RemoteAddr, "80") + } + + // Start goroutine responsible for flushing app logs. + // This is done after adding c to ctx.m (and stopped before removing it) + // because flushing logs requires making an API call. + go c.logFlusher(stopFlushing) + + executeRequestSafely(c, r) + c.outHeader = nil // make sure header changes aren't respected any more + + stopFlushing <- 1 // any logging beyond this point will be dropped + + // Flush any pending logs asynchronously. + c.pendingLogs.Lock() + flushes := c.pendingLogs.flushes + if len(c.pendingLogs.lines) > 0 { + flushes++ + } + c.pendingLogs.Unlock() + flushed := make(chan struct{}) + go func() { + defer close(flushed) + // Force a log flush, because with very short requests we + // may not ever flush logs. + c.flushLog(true) + }() + w.Header().Set(logFlushHeader, strconv.Itoa(flushes)) + + // Avoid nil Write call if c.Write is never called. + if c.outCode != 0 { + w.WriteHeader(c.outCode) + } + if c.outBody != nil { + w.Write(c.outBody) + } + // Wait for the last flush to complete before returning, + // otherwise the security ticket will not be valid. + <-flushed +} + +func executeRequestSafely(c *context, r *http.Request) { + defer func() { + if x := recover(); x != nil { + logf(c, 4, "%s", renderPanic(x)) // 4 == critical + c.outCode = 500 + } + }() + + http.DefaultServeMux.ServeHTTP(c, r) +} + +func renderPanic(x interface{}) string { + buf := make([]byte, 16<<10) // 16 KB should be plenty + buf = buf[:runtime.Stack(buf, false)] + + // Remove the first few stack frames: + // this func + // the recover closure in the caller + // That will root the stack trace at the site of the panic. + const ( + skipStart = "internal.renderPanic" + skipFrames = 2 + ) + start := bytes.Index(buf, []byte(skipStart)) + p := start + for i := 0; i < skipFrames*2 && p+1 < len(buf); i++ { + p = bytes.IndexByte(buf[p+1:], '\n') + p + 1 + if p < 0 { + break + } + } + if p >= 0 { + // buf[start:p+1] is the block to remove. + // Copy buf[p+1:] over buf[start:] and shrink buf. + copy(buf[start:], buf[p+1:]) + buf = buf[:len(buf)-(p+1-start)] + } + + // Add panic heading. + head := fmt.Sprintf("panic: %v\n\n", x) + if len(head) > len(buf) { + // Extremely unlikely to happen. + return head + } + copy(buf[len(head):], buf) + copy(buf, head) + + return string(buf) +} + +// context represents the context of an in-flight HTTP request. +// It implements the appengine.Context and http.ResponseWriter interfaces. +type context struct { + req *http.Request + + outCode int + outHeader http.Header + outBody []byte + + pendingLogs struct { + sync.Mutex + lines []*logpb.UserAppLogLine + flushes int + } + + apiURL *url.URL +} + +var contextKey = "holds a *context" + +// jointContext joins two contexts in a superficial way. +// It takes values and timeouts from a base context, and only values from another context. +type jointContext struct { + base netcontext.Context + valuesOnly netcontext.Context +} + +func (c jointContext) Deadline() (time.Time, bool) { + return c.base.Deadline() +} + +func (c jointContext) Done() <-chan struct{} { + return c.base.Done() +} + +func (c jointContext) Err() error { + return c.base.Err() +} + +func (c jointContext) Value(key interface{}) interface{} { + if val := c.base.Value(key); val != nil { + return val + } + return c.valuesOnly.Value(key) +} + +// fromContext returns the App Engine context or nil if ctx is not +// derived from an App Engine context. +func fromContext(ctx netcontext.Context) *context { + c, _ := ctx.Value(&contextKey).(*context) + return c +} + +func withContext(parent netcontext.Context, c *context) netcontext.Context { + ctx := netcontext.WithValue(parent, &contextKey, c) + if ns := c.req.Header.Get(curNamespaceHeader); ns != "" { + ctx = withNamespace(ctx, ns) + } + return ctx +} + +func toContext(c *context) netcontext.Context { + return withContext(netcontext.Background(), c) +} + +func IncomingHeaders(ctx netcontext.Context) http.Header { + if c := fromContext(ctx); c != nil { + return c.req.Header + } + return nil +} + +func ReqContext(req *http.Request) netcontext.Context { + return req.Context() +} + +func WithContext(parent netcontext.Context, req *http.Request) netcontext.Context { + return jointContext{ + base: parent, + valuesOnly: req.Context(), + } +} + +// DefaultTicket returns a ticket used for background context or dev_appserver. +func DefaultTicket() string { + defaultTicketOnce.Do(func() { + if IsDevAppServer() { + defaultTicket = "testapp" + defaultTicketSuffix + return + } + appID := partitionlessAppID() + escAppID := strings.Replace(strings.Replace(appID, ":", "_", -1), ".", "_", -1) + majVersion := VersionID(nil) + if i := strings.Index(majVersion, "."); i > 0 { + majVersion = majVersion[:i] + } + defaultTicket = fmt.Sprintf("%s/%s.%s.%s", escAppID, ModuleName(nil), majVersion, InstanceID()) + }) + return defaultTicket +} + +func BackgroundContext() netcontext.Context { + backgroundContextOnce.Do(func() { + // Compute background security ticket. + ticket := DefaultTicket() + + c := &context{ + req: &http.Request{ + Header: http.Header{ + ticketHeader: []string{ticket}, + }, + }, + apiURL: apiURL(), + } + backgroundContext = toContext(c) + + // TODO(dsymonds): Wire up the shutdown handler to do a final flush. + go c.logFlusher(make(chan int)) + }) + + return backgroundContext +} + +// RegisterTestRequest registers the HTTP request req for testing, such that +// any API calls are sent to the provided URL. It returns a closure to delete +// the registration. +// It should only be used by aetest package. +func RegisterTestRequest(req *http.Request, apiURL *url.URL, decorate func(netcontext.Context) netcontext.Context) (*http.Request, func()) { + c := &context{ + req: req, + apiURL: apiURL, + } + ctx := withContext(decorate(req.Context()), c) + req = req.WithContext(ctx) + c.req = req + return req, func() {} +} + +var errTimeout = &CallError{ + Detail: "Deadline exceeded", + Code: int32(remotepb.RpcError_CANCELLED), + Timeout: true, +} + +func (c *context) Header() http.Header { return c.outHeader } + +// Copied from $GOROOT/src/pkg/net/http/transfer.go. Some response status +// codes do not permit a response body (nor response entity headers such as +// Content-Length, Content-Type, etc). +func bodyAllowedForStatus(status int) bool { + switch { + case status >= 100 && status <= 199: + return false + case status == 204: + return false + case status == 304: + return false + } + return true +} + +func (c *context) Write(b []byte) (int, error) { + if c.outCode == 0 { + c.WriteHeader(http.StatusOK) + } + if len(b) > 0 && !bodyAllowedForStatus(c.outCode) { + return 0, http.ErrBodyNotAllowed + } + c.outBody = append(c.outBody, b...) + return len(b), nil +} + +func (c *context) WriteHeader(code int) { + if c.outCode != 0 { + logf(c, 3, "WriteHeader called multiple times on request.") // error level + return + } + c.outCode = code +} + +func (c *context) post(body []byte, timeout time.Duration) (b []byte, err error) { + hreq := &http.Request{ + Method: "POST", + URL: c.apiURL, + Header: http.Header{ + apiEndpointHeader: apiEndpointHeaderValue, + apiMethodHeader: apiMethodHeaderValue, + apiContentType: apiContentTypeValue, + apiDeadlineHeader: []string{strconv.FormatFloat(timeout.Seconds(), 'f', -1, 64)}, + }, + Body: ioutil.NopCloser(bytes.NewReader(body)), + ContentLength: int64(len(body)), + Host: c.apiURL.Host, + } + if info := c.req.Header.Get(dapperHeader); info != "" { + hreq.Header.Set(dapperHeader, info) + } + if info := c.req.Header.Get(traceHeader); info != "" { + hreq.Header.Set(traceHeader, info) + } + + tr := apiHTTPClient.Transport.(*http.Transport) + + var timedOut int32 // atomic; set to 1 if timed out + t := time.AfterFunc(timeout, func() { + atomic.StoreInt32(&timedOut, 1) + tr.CancelRequest(hreq) + }) + defer t.Stop() + defer func() { + // Check if timeout was exceeded. + if atomic.LoadInt32(&timedOut) != 0 { + err = errTimeout + } + }() + + hresp, err := apiHTTPClient.Do(hreq) + if err != nil { + return nil, &CallError{ + Detail: fmt.Sprintf("service bridge HTTP failed: %v", err), + Code: int32(remotepb.RpcError_UNKNOWN), + } + } + defer hresp.Body.Close() + hrespBody, err := ioutil.ReadAll(hresp.Body) + if hresp.StatusCode != 200 { + return nil, &CallError{ + Detail: fmt.Sprintf("service bridge returned HTTP %d (%q)", hresp.StatusCode, hrespBody), + Code: int32(remotepb.RpcError_UNKNOWN), + } + } + if err != nil { + return nil, &CallError{ + Detail: fmt.Sprintf("service bridge response bad: %v", err), + Code: int32(remotepb.RpcError_UNKNOWN), + } + } + return hrespBody, nil +} + +func Call(ctx netcontext.Context, service, method string, in, out proto.Message) error { + if ns := NamespaceFromContext(ctx); ns != "" { + if fn, ok := NamespaceMods[service]; ok { + fn(in, ns) + } + } + + if f, ctx, ok := callOverrideFromContext(ctx); ok { + return f(ctx, service, method, in, out) + } + + // Handle already-done contexts quickly. + select { + case <-ctx.Done(): + return ctx.Err() + default: + } + + c := fromContext(ctx) + if c == nil { + // Give a good error message rather than a panic lower down. + return errNotAppEngineContext + } + + // Apply transaction modifications if we're in a transaction. + if t := transactionFromContext(ctx); t != nil { + if t.finished { + return errors.New("transaction context has expired") + } + applyTransaction(in, &t.transaction) + } + + // Default RPC timeout is 60s. + timeout := 60 * time.Second + if deadline, ok := ctx.Deadline(); ok { + timeout = deadline.Sub(time.Now()) + } + + data, err := proto.Marshal(in) + if err != nil { + return err + } + + ticket := c.req.Header.Get(ticketHeader) + // Use a test ticket under test environment. + if ticket == "" { + if appid := ctx.Value(&appIDOverrideKey); appid != nil { + ticket = appid.(string) + defaultTicketSuffix + } + } + // Fall back to use background ticket when the request ticket is not available in Flex or dev_appserver. + if ticket == "" { + ticket = DefaultTicket() + } + if dri := c.req.Header.Get(devRequestIdHeader); IsDevAppServer() && dri != "" { + ticket = dri + } + req := &remotepb.Request{ + ServiceName: &service, + Method: &method, + Request: data, + RequestId: &ticket, + } + hreqBody, err := proto.Marshal(req) + if err != nil { + return err + } + + hrespBody, err := c.post(hreqBody, timeout) + if err != nil { + return err + } + + res := &remotepb.Response{} + if err := proto.Unmarshal(hrespBody, res); err != nil { + return err + } + if res.RpcError != nil { + ce := &CallError{ + Detail: res.RpcError.GetDetail(), + Code: *res.RpcError.Code, + } + switch remotepb.RpcError_ErrorCode(ce.Code) { + case remotepb.RpcError_CANCELLED, remotepb.RpcError_DEADLINE_EXCEEDED: + ce.Timeout = true + } + return ce + } + if res.ApplicationError != nil { + return &APIError{ + Service: *req.ServiceName, + Detail: res.ApplicationError.GetDetail(), + Code: *res.ApplicationError.Code, + } + } + if res.Exception != nil || res.JavaException != nil { + // This shouldn't happen, but let's be defensive. + return &CallError{ + Detail: "service bridge returned exception", + Code: int32(remotepb.RpcError_UNKNOWN), + } + } + return proto.Unmarshal(res.Response, out) +} + +func (c *context) Request() *http.Request { + return c.req +} + +func (c *context) addLogLine(ll *logpb.UserAppLogLine) { + // Truncate long log lines. + // TODO(dsymonds): Check if this is still necessary. + const lim = 8 << 10 + if len(*ll.Message) > lim { + suffix := fmt.Sprintf("...(length %d)", len(*ll.Message)) + ll.Message = proto.String((*ll.Message)[:lim-len(suffix)] + suffix) + } + + c.pendingLogs.Lock() + c.pendingLogs.lines = append(c.pendingLogs.lines, ll) + c.pendingLogs.Unlock() +} + +var logLevelName = map[int64]string{ + 0: "DEBUG", + 1: "INFO", + 2: "WARNING", + 3: "ERROR", + 4: "CRITICAL", +} + +func logf(c *context, level int64, format string, args ...interface{}) { + if c == nil { + panic("not an App Engine context") + } + s := fmt.Sprintf(format, args...) + s = strings.TrimRight(s, "\n") // Remove any trailing newline characters. + c.addLogLine(&logpb.UserAppLogLine{ + TimestampUsec: proto.Int64(time.Now().UnixNano() / 1e3), + Level: &level, + Message: &s, + }) + // Only duplicate log to stderr if not running on App Engine second generation + if !IsSecondGen() { + log.Print(logLevelName[level] + ": " + s) + } +} + +// flushLog attempts to flush any pending logs to the appserver. +// It should not be called concurrently. +func (c *context) flushLog(force bool) (flushed bool) { + c.pendingLogs.Lock() + // Grab up to 30 MB. We can get away with up to 32 MB, but let's be cautious. + n, rem := 0, 30<<20 + for ; n < len(c.pendingLogs.lines); n++ { + ll := c.pendingLogs.lines[n] + // Each log line will require about 3 bytes of overhead. + nb := proto.Size(ll) + 3 + if nb > rem { + break + } + rem -= nb + } + lines := c.pendingLogs.lines[:n] + c.pendingLogs.lines = c.pendingLogs.lines[n:] + c.pendingLogs.Unlock() + + if len(lines) == 0 && !force { + // Nothing to flush. + return false + } + + rescueLogs := false + defer func() { + if rescueLogs { + c.pendingLogs.Lock() + c.pendingLogs.lines = append(lines, c.pendingLogs.lines...) + c.pendingLogs.Unlock() + } + }() + + buf, err := proto.Marshal(&logpb.UserAppLogGroup{ + LogLine: lines, + }) + if err != nil { + log.Printf("internal.flushLog: marshaling UserAppLogGroup: %v", err) + rescueLogs = true + return false + } + + req := &logpb.FlushRequest{ + Logs: buf, + } + res := &basepb.VoidProto{} + c.pendingLogs.Lock() + c.pendingLogs.flushes++ + c.pendingLogs.Unlock() + if err := Call(toContext(c), "logservice", "Flush", req, res); err != nil { + log.Printf("internal.flushLog: Flush RPC: %v", err) + rescueLogs = true + return false + } + return true +} + +const ( + // Log flushing parameters. + flushInterval = 1 * time.Second + forceFlushInterval = 60 * time.Second +) + +func (c *context) logFlusher(stop <-chan int) { + lastFlush := time.Now() + tick := time.NewTicker(flushInterval) + for { + select { + case <-stop: + // Request finished. + tick.Stop() + return + case <-tick.C: + force := time.Now().Sub(lastFlush) > forceFlushInterval + if c.flushLog(force) { + lastFlush = time.Now() + } + } + } +} + +func ContextForTesting(req *http.Request) netcontext.Context { + return toContext(&context{req: req}) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/api_classic.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/api_classic.go new file mode 100644 index 000000000..f0f40b2e3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/api_classic.go @@ -0,0 +1,169 @@ +// Copyright 2015 Google Inc. All rights reserved. +// Use of this source code is governed by the Apache 2.0 +// license that can be found in the LICENSE file. + +// +build appengine + +package internal + +import ( + "errors" + "fmt" + "net/http" + "time" + + "appengine" + "appengine_internal" + basepb "appengine_internal/base" + + "github.com/golang/protobuf/proto" + netcontext "golang.org/x/net/context" +) + +var contextKey = "holds an appengine.Context" + +// fromContext returns the App Engine context or nil if ctx is not +// derived from an App Engine context. +func fromContext(ctx netcontext.Context) appengine.Context { + c, _ := ctx.Value(&contextKey).(appengine.Context) + return c +} + +// This is only for classic App Engine adapters. +func ClassicContextFromContext(ctx netcontext.Context) (appengine.Context, error) { + c := fromContext(ctx) + if c == nil { + return nil, errNotAppEngineContext + } + return c, nil +} + +func withContext(parent netcontext.Context, c appengine.Context) netcontext.Context { + ctx := netcontext.WithValue(parent, &contextKey, c) + + s := &basepb.StringProto{} + c.Call("__go__", "GetNamespace", &basepb.VoidProto{}, s, nil) + if ns := s.GetValue(); ns != "" { + ctx = NamespacedContext(ctx, ns) + } + + return ctx +} + +func IncomingHeaders(ctx netcontext.Context) http.Header { + if c := fromContext(ctx); c != nil { + if req, ok := c.Request().(*http.Request); ok { + return req.Header + } + } + return nil +} + +func ReqContext(req *http.Request) netcontext.Context { + return WithContext(netcontext.Background(), req) +} + +func WithContext(parent netcontext.Context, req *http.Request) netcontext.Context { + c := appengine.NewContext(req) + return withContext(parent, c) +} + +type testingContext struct { + appengine.Context + + req *http.Request +} + +func (t *testingContext) FullyQualifiedAppID() string { return "dev~testcontext" } +func (t *testingContext) Call(service, method string, _, _ appengine_internal.ProtoMessage, _ *appengine_internal.CallOptions) error { + if service == "__go__" && method == "GetNamespace" { + return nil + } + return fmt.Errorf("testingContext: unsupported Call") +} +func (t *testingContext) Request() interface{} { return t.req } + +func ContextForTesting(req *http.Request) netcontext.Context { + return withContext(netcontext.Background(), &testingContext{req: req}) +} + +func Call(ctx netcontext.Context, service, method string, in, out proto.Message) error { + if ns := NamespaceFromContext(ctx); ns != "" { + if fn, ok := NamespaceMods[service]; ok { + fn(in, ns) + } + } + + if f, ctx, ok := callOverrideFromContext(ctx); ok { + return f(ctx, service, method, in, out) + } + + // Handle already-done contexts quickly. + select { + case <-ctx.Done(): + return ctx.Err() + default: + } + + c := fromContext(ctx) + if c == nil { + // Give a good error message rather than a panic lower down. + return errNotAppEngineContext + } + + // Apply transaction modifications if we're in a transaction. + if t := transactionFromContext(ctx); t != nil { + if t.finished { + return errors.New("transaction context has expired") + } + applyTransaction(in, &t.transaction) + } + + var opts *appengine_internal.CallOptions + if d, ok := ctx.Deadline(); ok { + opts = &appengine_internal.CallOptions{ + Timeout: d.Sub(time.Now()), + } + } + + err := c.Call(service, method, in, out, opts) + switch v := err.(type) { + case *appengine_internal.APIError: + return &APIError{ + Service: v.Service, + Detail: v.Detail, + Code: v.Code, + } + case *appengine_internal.CallError: + return &CallError{ + Detail: v.Detail, + Code: v.Code, + Timeout: v.Timeout, + } + } + return err +} + +func handleHTTP(w http.ResponseWriter, r *http.Request) { + panic("handleHTTP called; this should be impossible") +} + +func logf(c appengine.Context, level int64, format string, args ...interface{}) { + var fn func(format string, args ...interface{}) + switch level { + case 0: + fn = c.Debugf + case 1: + fn = c.Infof + case 2: + fn = c.Warningf + case 3: + fn = c.Errorf + case 4: + fn = c.Criticalf + default: + // This shouldn't happen. + fn = c.Criticalf + } + fn(format, args...) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/api_common.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/api_common.go new file mode 100644 index 000000000..e0c0b214b --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/api_common.go @@ -0,0 +1,123 @@ +// Copyright 2015 Google Inc. All rights reserved. +// Use of this source code is governed by the Apache 2.0 +// license that can be found in the LICENSE file. + +package internal + +import ( + "errors" + "os" + + "github.com/golang/protobuf/proto" + netcontext "golang.org/x/net/context" +) + +var errNotAppEngineContext = errors.New("not an App Engine context") + +type CallOverrideFunc func(ctx netcontext.Context, service, method string, in, out proto.Message) error + +var callOverrideKey = "holds []CallOverrideFunc" + +func WithCallOverride(ctx netcontext.Context, f CallOverrideFunc) netcontext.Context { + // We avoid appending to any existing call override + // so we don't risk overwriting a popped stack below. + var cofs []CallOverrideFunc + if uf, ok := ctx.Value(&callOverrideKey).([]CallOverrideFunc); ok { + cofs = append(cofs, uf...) + } + cofs = append(cofs, f) + return netcontext.WithValue(ctx, &callOverrideKey, cofs) +} + +func callOverrideFromContext(ctx netcontext.Context) (CallOverrideFunc, netcontext.Context, bool) { + cofs, _ := ctx.Value(&callOverrideKey).([]CallOverrideFunc) + if len(cofs) == 0 { + return nil, nil, false + } + // We found a list of overrides; grab the last, and reconstitute a + // context that will hide it. + f := cofs[len(cofs)-1] + ctx = netcontext.WithValue(ctx, &callOverrideKey, cofs[:len(cofs)-1]) + return f, ctx, true +} + +type logOverrideFunc func(level int64, format string, args ...interface{}) + +var logOverrideKey = "holds a logOverrideFunc" + +func WithLogOverride(ctx netcontext.Context, f logOverrideFunc) netcontext.Context { + return netcontext.WithValue(ctx, &logOverrideKey, f) +} + +var appIDOverrideKey = "holds a string, being the full app ID" + +func WithAppIDOverride(ctx netcontext.Context, appID string) netcontext.Context { + return netcontext.WithValue(ctx, &appIDOverrideKey, appID) +} + +var namespaceKey = "holds the namespace string" + +func withNamespace(ctx netcontext.Context, ns string) netcontext.Context { + return netcontext.WithValue(ctx, &namespaceKey, ns) +} + +func NamespaceFromContext(ctx netcontext.Context) string { + // If there's no namespace, return the empty string. + ns, _ := ctx.Value(&namespaceKey).(string) + return ns +} + +// FullyQualifiedAppID returns the fully-qualified application ID. +// This may contain a partition prefix (e.g. "s~" for High Replication apps), +// or a domain prefix (e.g. "example.com:"). +func FullyQualifiedAppID(ctx netcontext.Context) string { + if id, ok := ctx.Value(&appIDOverrideKey).(string); ok { + return id + } + return fullyQualifiedAppID(ctx) +} + +func Logf(ctx netcontext.Context, level int64, format string, args ...interface{}) { + if f, ok := ctx.Value(&logOverrideKey).(logOverrideFunc); ok { + f(level, format, args...) + return + } + c := fromContext(ctx) + if c == nil { + panic(errNotAppEngineContext) + } + logf(c, level, format, args...) +} + +// NamespacedContext wraps a Context to support namespaces. +func NamespacedContext(ctx netcontext.Context, namespace string) netcontext.Context { + return withNamespace(ctx, namespace) +} + +// SetTestEnv sets the env variables for testing background ticket in Flex. +func SetTestEnv() func() { + var environ = []struct { + key, value string + }{ + {"GAE_LONG_APP_ID", "my-app-id"}, + {"GAE_MINOR_VERSION", "067924799508853122"}, + {"GAE_MODULE_INSTANCE", "0"}, + {"GAE_MODULE_NAME", "default"}, + {"GAE_MODULE_VERSION", "20150612t184001"}, + } + + for _, v := range environ { + old := os.Getenv(v.key) + os.Setenv(v.key, v.value) + v.value = old + } + return func() { // Restore old environment after the test completes. + for _, v := range environ { + if v.value == "" { + os.Unsetenv(v.key) + continue + } + os.Setenv(v.key, v.value) + } + } +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/app_id.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/app_id.go new file mode 100644 index 000000000..11df8c07b --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/app_id.go @@ -0,0 +1,28 @@ +// Copyright 2011 Google Inc. All rights reserved. +// Use of this source code is governed by the Apache 2.0 +// license that can be found in the LICENSE file. + +package internal + +import ( + "strings" +) + +func parseFullAppID(appid string) (partition, domain, displayID string) { + if i := strings.Index(appid, "~"); i != -1 { + partition, appid = appid[:i], appid[i+1:] + } + if i := strings.Index(appid, ":"); i != -1 { + domain, appid = appid[:i], appid[i+1:] + } + return partition, domain, appid +} + +// appID returns "appid" or "domain.com:appid". +func appID(fullAppID string) string { + _, dom, dis := parseFullAppID(fullAppID) + if dom != "" { + return dom + ":" + dis + } + return dis +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/base/api_base.pb.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/base/api_base.pb.go new file mode 100644 index 000000000..db4777e68 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/base/api_base.pb.go @@ -0,0 +1,308 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: google.golang.org/appengine/internal/base/api_base.proto + +package base + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package + +type StringProto struct { + Value *string `protobuf:"bytes,1,req,name=value" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *StringProto) Reset() { *m = StringProto{} } +func (m *StringProto) String() string { return proto.CompactTextString(m) } +func (*StringProto) ProtoMessage() {} +func (*StringProto) Descriptor() ([]byte, []int) { + return fileDescriptor_api_base_9d49f8792e0c1140, []int{0} +} +func (m *StringProto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_StringProto.Unmarshal(m, b) +} +func (m *StringProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_StringProto.Marshal(b, m, deterministic) +} +func (dst *StringProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_StringProto.Merge(dst, src) +} +func (m *StringProto) XXX_Size() int { + return xxx_messageInfo_StringProto.Size(m) +} +func (m *StringProto) XXX_DiscardUnknown() { + xxx_messageInfo_StringProto.DiscardUnknown(m) +} + +var xxx_messageInfo_StringProto proto.InternalMessageInfo + +func (m *StringProto) GetValue() string { + if m != nil && m.Value != nil { + return *m.Value + } + return "" +} + +type Integer32Proto struct { + Value *int32 `protobuf:"varint,1,req,name=value" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Integer32Proto) Reset() { *m = Integer32Proto{} } +func (m *Integer32Proto) String() string { return proto.CompactTextString(m) } +func (*Integer32Proto) ProtoMessage() {} +func (*Integer32Proto) Descriptor() ([]byte, []int) { + return fileDescriptor_api_base_9d49f8792e0c1140, []int{1} +} +func (m *Integer32Proto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Integer32Proto.Unmarshal(m, b) +} +func (m *Integer32Proto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Integer32Proto.Marshal(b, m, deterministic) +} +func (dst *Integer32Proto) XXX_Merge(src proto.Message) { + xxx_messageInfo_Integer32Proto.Merge(dst, src) +} +func (m *Integer32Proto) XXX_Size() int { + return xxx_messageInfo_Integer32Proto.Size(m) +} +func (m *Integer32Proto) XXX_DiscardUnknown() { + xxx_messageInfo_Integer32Proto.DiscardUnknown(m) +} + +var xxx_messageInfo_Integer32Proto proto.InternalMessageInfo + +func (m *Integer32Proto) GetValue() int32 { + if m != nil && m.Value != nil { + return *m.Value + } + return 0 +} + +type Integer64Proto struct { + Value *int64 `protobuf:"varint,1,req,name=value" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Integer64Proto) Reset() { *m = Integer64Proto{} } +func (m *Integer64Proto) String() string { return proto.CompactTextString(m) } +func (*Integer64Proto) ProtoMessage() {} +func (*Integer64Proto) Descriptor() ([]byte, []int) { + return fileDescriptor_api_base_9d49f8792e0c1140, []int{2} +} +func (m *Integer64Proto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Integer64Proto.Unmarshal(m, b) +} +func (m *Integer64Proto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Integer64Proto.Marshal(b, m, deterministic) +} +func (dst *Integer64Proto) XXX_Merge(src proto.Message) { + xxx_messageInfo_Integer64Proto.Merge(dst, src) +} +func (m *Integer64Proto) XXX_Size() int { + return xxx_messageInfo_Integer64Proto.Size(m) +} +func (m *Integer64Proto) XXX_DiscardUnknown() { + xxx_messageInfo_Integer64Proto.DiscardUnknown(m) +} + +var xxx_messageInfo_Integer64Proto proto.InternalMessageInfo + +func (m *Integer64Proto) GetValue() int64 { + if m != nil && m.Value != nil { + return *m.Value + } + return 0 +} + +type BoolProto struct { + Value *bool `protobuf:"varint,1,req,name=value" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BoolProto) Reset() { *m = BoolProto{} } +func (m *BoolProto) String() string { return proto.CompactTextString(m) } +func (*BoolProto) ProtoMessage() {} +func (*BoolProto) Descriptor() ([]byte, []int) { + return fileDescriptor_api_base_9d49f8792e0c1140, []int{3} +} +func (m *BoolProto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BoolProto.Unmarshal(m, b) +} +func (m *BoolProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BoolProto.Marshal(b, m, deterministic) +} +func (dst *BoolProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_BoolProto.Merge(dst, src) +} +func (m *BoolProto) XXX_Size() int { + return xxx_messageInfo_BoolProto.Size(m) +} +func (m *BoolProto) XXX_DiscardUnknown() { + xxx_messageInfo_BoolProto.DiscardUnknown(m) +} + +var xxx_messageInfo_BoolProto proto.InternalMessageInfo + +func (m *BoolProto) GetValue() bool { + if m != nil && m.Value != nil { + return *m.Value + } + return false +} + +type DoubleProto struct { + Value *float64 `protobuf:"fixed64,1,req,name=value" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DoubleProto) Reset() { *m = DoubleProto{} } +func (m *DoubleProto) String() string { return proto.CompactTextString(m) } +func (*DoubleProto) ProtoMessage() {} +func (*DoubleProto) Descriptor() ([]byte, []int) { + return fileDescriptor_api_base_9d49f8792e0c1140, []int{4} +} +func (m *DoubleProto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DoubleProto.Unmarshal(m, b) +} +func (m *DoubleProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DoubleProto.Marshal(b, m, deterministic) +} +func (dst *DoubleProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_DoubleProto.Merge(dst, src) +} +func (m *DoubleProto) XXX_Size() int { + return xxx_messageInfo_DoubleProto.Size(m) +} +func (m *DoubleProto) XXX_DiscardUnknown() { + xxx_messageInfo_DoubleProto.DiscardUnknown(m) +} + +var xxx_messageInfo_DoubleProto proto.InternalMessageInfo + +func (m *DoubleProto) GetValue() float64 { + if m != nil && m.Value != nil { + return *m.Value + } + return 0 +} + +type BytesProto struct { + Value []byte `protobuf:"bytes,1,req,name=value" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BytesProto) Reset() { *m = BytesProto{} } +func (m *BytesProto) String() string { return proto.CompactTextString(m) } +func (*BytesProto) ProtoMessage() {} +func (*BytesProto) Descriptor() ([]byte, []int) { + return fileDescriptor_api_base_9d49f8792e0c1140, []int{5} +} +func (m *BytesProto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BytesProto.Unmarshal(m, b) +} +func (m *BytesProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BytesProto.Marshal(b, m, deterministic) +} +func (dst *BytesProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_BytesProto.Merge(dst, src) +} +func (m *BytesProto) XXX_Size() int { + return xxx_messageInfo_BytesProto.Size(m) +} +func (m *BytesProto) XXX_DiscardUnknown() { + xxx_messageInfo_BytesProto.DiscardUnknown(m) +} + +var xxx_messageInfo_BytesProto proto.InternalMessageInfo + +func (m *BytesProto) GetValue() []byte { + if m != nil { + return m.Value + } + return nil +} + +type VoidProto struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *VoidProto) Reset() { *m = VoidProto{} } +func (m *VoidProto) String() string { return proto.CompactTextString(m) } +func (*VoidProto) ProtoMessage() {} +func (*VoidProto) Descriptor() ([]byte, []int) { + return fileDescriptor_api_base_9d49f8792e0c1140, []int{6} +} +func (m *VoidProto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_VoidProto.Unmarshal(m, b) +} +func (m *VoidProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_VoidProto.Marshal(b, m, deterministic) +} +func (dst *VoidProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_VoidProto.Merge(dst, src) +} +func (m *VoidProto) XXX_Size() int { + return xxx_messageInfo_VoidProto.Size(m) +} +func (m *VoidProto) XXX_DiscardUnknown() { + xxx_messageInfo_VoidProto.DiscardUnknown(m) +} + +var xxx_messageInfo_VoidProto proto.InternalMessageInfo + +func init() { + proto.RegisterType((*StringProto)(nil), "appengine.base.StringProto") + proto.RegisterType((*Integer32Proto)(nil), "appengine.base.Integer32Proto") + proto.RegisterType((*Integer64Proto)(nil), "appengine.base.Integer64Proto") + proto.RegisterType((*BoolProto)(nil), "appengine.base.BoolProto") + proto.RegisterType((*DoubleProto)(nil), "appengine.base.DoubleProto") + proto.RegisterType((*BytesProto)(nil), "appengine.base.BytesProto") + proto.RegisterType((*VoidProto)(nil), "appengine.base.VoidProto") +} + +func init() { + proto.RegisterFile("google.golang.org/appengine/internal/base/api_base.proto", fileDescriptor_api_base_9d49f8792e0c1140) +} + +var fileDescriptor_api_base_9d49f8792e0c1140 = []byte{ + // 199 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0xcf, 0x3f, 0x4b, 0xc6, 0x30, + 0x10, 0x06, 0x70, 0x5a, 0xad, 0xb4, 0x57, 0xe9, 0x20, 0x0e, 0x1d, 0xb5, 0x05, 0x71, 0x4a, 0x40, + 0x45, 0x9c, 0x83, 0x8b, 0x9b, 0x28, 0x38, 0xb8, 0x48, 0x8a, 0xc7, 0x11, 0x08, 0xb9, 0x90, 0xa6, + 0x82, 0xdf, 0x5e, 0xda, 0xd2, 0xfa, 0xc2, 0x9b, 0xed, 0xfe, 0xfc, 0xe0, 0xe1, 0x81, 0x27, 0x62, + 0x26, 0x8b, 0x82, 0xd8, 0x6a, 0x47, 0x82, 0x03, 0x49, 0xed, 0x3d, 0x3a, 0x32, 0x0e, 0xa5, 0x71, + 0x11, 0x83, 0xd3, 0x56, 0x0e, 0x7a, 0x44, 0xa9, 0xbd, 0xf9, 0x9a, 0x07, 0xe1, 0x03, 0x47, 0xbe, + 0x68, 0x76, 0x27, 0xe6, 0x6b, 0xd7, 0x43, 0xfd, 0x1e, 0x83, 0x71, 0xf4, 0xba, 0xbc, 0x2f, 0xa1, + 0xf8, 0xd1, 0x76, 0xc2, 0x36, 0xbb, 0xca, 0x6f, 0xab, 0xb7, 0x75, 0xe9, 0x6e, 0xa0, 0x79, 0x71, + 0x11, 0x09, 0xc3, 0xfd, 0x5d, 0xc2, 0x15, 0xc7, 0xee, 0xf1, 0x21, 0xe1, 0x4e, 0x36, 0x77, 0x0d, + 0x95, 0x62, 0xb6, 0x09, 0x52, 0x6e, 0xa4, 0x87, 0xfa, 0x99, 0xa7, 0xc1, 0x62, 0x02, 0x65, 0xff, + 0x79, 0xa0, 0x7e, 0x23, 0x8e, 0xab, 0x69, 0x0f, 0xcd, 0xb9, 0xca, 0xcb, 0xdd, 0xd5, 0x50, 0x7d, + 0xb0, 0xf9, 0x5e, 0x98, 0x3a, 0xfb, 0x3c, 0x9d, 0x9b, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0xba, + 0x37, 0x25, 0xea, 0x44, 0x01, 0x00, 0x00, +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/base/api_base.proto b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/base/api_base.proto new file mode 100644 index 000000000..56cd7a3ca --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/base/api_base.proto @@ -0,0 +1,33 @@ +// Built-in base types for API calls. Primarily useful as return types. + +syntax = "proto2"; +option go_package = "base"; + +package appengine.base; + +message StringProto { + required string value = 1; +} + +message Integer32Proto { + required int32 value = 1; +} + +message Integer64Proto { + required int64 value = 1; +} + +message BoolProto { + required bool value = 1; +} + +message DoubleProto { + required double value = 1; +} + +message BytesProto { + required bytes value = 1 [ctype=CORD]; +} + +message VoidProto { +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.pb.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.pb.go new file mode 100644 index 000000000..2fb748289 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.pb.go @@ -0,0 +1,4367 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: google.golang.org/appengine/internal/datastore/datastore_v3.proto + +package datastore + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package + +type Property_Meaning int32 + +const ( + Property_NO_MEANING Property_Meaning = 0 + Property_BLOB Property_Meaning = 14 + Property_TEXT Property_Meaning = 15 + Property_BYTESTRING Property_Meaning = 16 + Property_ATOM_CATEGORY Property_Meaning = 1 + Property_ATOM_LINK Property_Meaning = 2 + Property_ATOM_TITLE Property_Meaning = 3 + Property_ATOM_CONTENT Property_Meaning = 4 + Property_ATOM_SUMMARY Property_Meaning = 5 + Property_ATOM_AUTHOR Property_Meaning = 6 + Property_GD_WHEN Property_Meaning = 7 + Property_GD_EMAIL Property_Meaning = 8 + Property_GEORSS_POINT Property_Meaning = 9 + Property_GD_IM Property_Meaning = 10 + Property_GD_PHONENUMBER Property_Meaning = 11 + Property_GD_POSTALADDRESS Property_Meaning = 12 + Property_GD_RATING Property_Meaning = 13 + Property_BLOBKEY Property_Meaning = 17 + Property_ENTITY_PROTO Property_Meaning = 19 + Property_INDEX_VALUE Property_Meaning = 18 +) + +var Property_Meaning_name = map[int32]string{ + 0: "NO_MEANING", + 14: "BLOB", + 15: "TEXT", + 16: "BYTESTRING", + 1: "ATOM_CATEGORY", + 2: "ATOM_LINK", + 3: "ATOM_TITLE", + 4: "ATOM_CONTENT", + 5: "ATOM_SUMMARY", + 6: "ATOM_AUTHOR", + 7: "GD_WHEN", + 8: "GD_EMAIL", + 9: "GEORSS_POINT", + 10: "GD_IM", + 11: "GD_PHONENUMBER", + 12: "GD_POSTALADDRESS", + 13: "GD_RATING", + 17: "BLOBKEY", + 19: "ENTITY_PROTO", + 18: "INDEX_VALUE", +} +var Property_Meaning_value = map[string]int32{ + "NO_MEANING": 0, + "BLOB": 14, + "TEXT": 15, + "BYTESTRING": 16, + "ATOM_CATEGORY": 1, + "ATOM_LINK": 2, + "ATOM_TITLE": 3, + "ATOM_CONTENT": 4, + "ATOM_SUMMARY": 5, + "ATOM_AUTHOR": 6, + "GD_WHEN": 7, + "GD_EMAIL": 8, + "GEORSS_POINT": 9, + "GD_IM": 10, + "GD_PHONENUMBER": 11, + "GD_POSTALADDRESS": 12, + "GD_RATING": 13, + "BLOBKEY": 17, + "ENTITY_PROTO": 19, + "INDEX_VALUE": 18, +} + +func (x Property_Meaning) Enum() *Property_Meaning { + p := new(Property_Meaning) + *p = x + return p +} +func (x Property_Meaning) String() string { + return proto.EnumName(Property_Meaning_name, int32(x)) +} +func (x *Property_Meaning) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Property_Meaning_value, data, "Property_Meaning") + if err != nil { + return err + } + *x = Property_Meaning(value) + return nil +} +func (Property_Meaning) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{2, 0} +} + +type Property_FtsTokenizationOption int32 + +const ( + Property_HTML Property_FtsTokenizationOption = 1 + Property_ATOM Property_FtsTokenizationOption = 2 +) + +var Property_FtsTokenizationOption_name = map[int32]string{ + 1: "HTML", + 2: "ATOM", +} +var Property_FtsTokenizationOption_value = map[string]int32{ + "HTML": 1, + "ATOM": 2, +} + +func (x Property_FtsTokenizationOption) Enum() *Property_FtsTokenizationOption { + p := new(Property_FtsTokenizationOption) + *p = x + return p +} +func (x Property_FtsTokenizationOption) String() string { + return proto.EnumName(Property_FtsTokenizationOption_name, int32(x)) +} +func (x *Property_FtsTokenizationOption) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Property_FtsTokenizationOption_value, data, "Property_FtsTokenizationOption") + if err != nil { + return err + } + *x = Property_FtsTokenizationOption(value) + return nil +} +func (Property_FtsTokenizationOption) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{2, 1} +} + +type EntityProto_Kind int32 + +const ( + EntityProto_GD_CONTACT EntityProto_Kind = 1 + EntityProto_GD_EVENT EntityProto_Kind = 2 + EntityProto_GD_MESSAGE EntityProto_Kind = 3 +) + +var EntityProto_Kind_name = map[int32]string{ + 1: "GD_CONTACT", + 2: "GD_EVENT", + 3: "GD_MESSAGE", +} +var EntityProto_Kind_value = map[string]int32{ + "GD_CONTACT": 1, + "GD_EVENT": 2, + "GD_MESSAGE": 3, +} + +func (x EntityProto_Kind) Enum() *EntityProto_Kind { + p := new(EntityProto_Kind) + *p = x + return p +} +func (x EntityProto_Kind) String() string { + return proto.EnumName(EntityProto_Kind_name, int32(x)) +} +func (x *EntityProto_Kind) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(EntityProto_Kind_value, data, "EntityProto_Kind") + if err != nil { + return err + } + *x = EntityProto_Kind(value) + return nil +} +func (EntityProto_Kind) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{6, 0} +} + +type Index_Property_Direction int32 + +const ( + Index_Property_ASCENDING Index_Property_Direction = 1 + Index_Property_DESCENDING Index_Property_Direction = 2 +) + +var Index_Property_Direction_name = map[int32]string{ + 1: "ASCENDING", + 2: "DESCENDING", +} +var Index_Property_Direction_value = map[string]int32{ + "ASCENDING": 1, + "DESCENDING": 2, +} + +func (x Index_Property_Direction) Enum() *Index_Property_Direction { + p := new(Index_Property_Direction) + *p = x + return p +} +func (x Index_Property_Direction) String() string { + return proto.EnumName(Index_Property_Direction_name, int32(x)) +} +func (x *Index_Property_Direction) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Index_Property_Direction_value, data, "Index_Property_Direction") + if err != nil { + return err + } + *x = Index_Property_Direction(value) + return nil +} +func (Index_Property_Direction) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{8, 0, 0} +} + +type CompositeIndex_State int32 + +const ( + CompositeIndex_WRITE_ONLY CompositeIndex_State = 1 + CompositeIndex_READ_WRITE CompositeIndex_State = 2 + CompositeIndex_DELETED CompositeIndex_State = 3 + CompositeIndex_ERROR CompositeIndex_State = 4 +) + +var CompositeIndex_State_name = map[int32]string{ + 1: "WRITE_ONLY", + 2: "READ_WRITE", + 3: "DELETED", + 4: "ERROR", +} +var CompositeIndex_State_value = map[string]int32{ + "WRITE_ONLY": 1, + "READ_WRITE": 2, + "DELETED": 3, + "ERROR": 4, +} + +func (x CompositeIndex_State) Enum() *CompositeIndex_State { + p := new(CompositeIndex_State) + *p = x + return p +} +func (x CompositeIndex_State) String() string { + return proto.EnumName(CompositeIndex_State_name, int32(x)) +} +func (x *CompositeIndex_State) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(CompositeIndex_State_value, data, "CompositeIndex_State") + if err != nil { + return err + } + *x = CompositeIndex_State(value) + return nil +} +func (CompositeIndex_State) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{9, 0} +} + +type Snapshot_Status int32 + +const ( + Snapshot_INACTIVE Snapshot_Status = 0 + Snapshot_ACTIVE Snapshot_Status = 1 +) + +var Snapshot_Status_name = map[int32]string{ + 0: "INACTIVE", + 1: "ACTIVE", +} +var Snapshot_Status_value = map[string]int32{ + "INACTIVE": 0, + "ACTIVE": 1, +} + +func (x Snapshot_Status) Enum() *Snapshot_Status { + p := new(Snapshot_Status) + *p = x + return p +} +func (x Snapshot_Status) String() string { + return proto.EnumName(Snapshot_Status_name, int32(x)) +} +func (x *Snapshot_Status) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Snapshot_Status_value, data, "Snapshot_Status") + if err != nil { + return err + } + *x = Snapshot_Status(value) + return nil +} +func (Snapshot_Status) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{12, 0} +} + +type Query_Hint int32 + +const ( + Query_ORDER_FIRST Query_Hint = 1 + Query_ANCESTOR_FIRST Query_Hint = 2 + Query_FILTER_FIRST Query_Hint = 3 +) + +var Query_Hint_name = map[int32]string{ + 1: "ORDER_FIRST", + 2: "ANCESTOR_FIRST", + 3: "FILTER_FIRST", +} +var Query_Hint_value = map[string]int32{ + "ORDER_FIRST": 1, + "ANCESTOR_FIRST": 2, + "FILTER_FIRST": 3, +} + +func (x Query_Hint) Enum() *Query_Hint { + p := new(Query_Hint) + *p = x + return p +} +func (x Query_Hint) String() string { + return proto.EnumName(Query_Hint_name, int32(x)) +} +func (x *Query_Hint) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Query_Hint_value, data, "Query_Hint") + if err != nil { + return err + } + *x = Query_Hint(value) + return nil +} +func (Query_Hint) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{15, 0} +} + +type Query_Filter_Operator int32 + +const ( + Query_Filter_LESS_THAN Query_Filter_Operator = 1 + Query_Filter_LESS_THAN_OR_EQUAL Query_Filter_Operator = 2 + Query_Filter_GREATER_THAN Query_Filter_Operator = 3 + Query_Filter_GREATER_THAN_OR_EQUAL Query_Filter_Operator = 4 + Query_Filter_EQUAL Query_Filter_Operator = 5 + Query_Filter_IN Query_Filter_Operator = 6 + Query_Filter_EXISTS Query_Filter_Operator = 7 +) + +var Query_Filter_Operator_name = map[int32]string{ + 1: "LESS_THAN", + 2: "LESS_THAN_OR_EQUAL", + 3: "GREATER_THAN", + 4: "GREATER_THAN_OR_EQUAL", + 5: "EQUAL", + 6: "IN", + 7: "EXISTS", +} +var Query_Filter_Operator_value = map[string]int32{ + "LESS_THAN": 1, + "LESS_THAN_OR_EQUAL": 2, + "GREATER_THAN": 3, + "GREATER_THAN_OR_EQUAL": 4, + "EQUAL": 5, + "IN": 6, + "EXISTS": 7, +} + +func (x Query_Filter_Operator) Enum() *Query_Filter_Operator { + p := new(Query_Filter_Operator) + *p = x + return p +} +func (x Query_Filter_Operator) String() string { + return proto.EnumName(Query_Filter_Operator_name, int32(x)) +} +func (x *Query_Filter_Operator) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Query_Filter_Operator_value, data, "Query_Filter_Operator") + if err != nil { + return err + } + *x = Query_Filter_Operator(value) + return nil +} +func (Query_Filter_Operator) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{15, 0, 0} +} + +type Query_Order_Direction int32 + +const ( + Query_Order_ASCENDING Query_Order_Direction = 1 + Query_Order_DESCENDING Query_Order_Direction = 2 +) + +var Query_Order_Direction_name = map[int32]string{ + 1: "ASCENDING", + 2: "DESCENDING", +} +var Query_Order_Direction_value = map[string]int32{ + "ASCENDING": 1, + "DESCENDING": 2, +} + +func (x Query_Order_Direction) Enum() *Query_Order_Direction { + p := new(Query_Order_Direction) + *p = x + return p +} +func (x Query_Order_Direction) String() string { + return proto.EnumName(Query_Order_Direction_name, int32(x)) +} +func (x *Query_Order_Direction) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Query_Order_Direction_value, data, "Query_Order_Direction") + if err != nil { + return err + } + *x = Query_Order_Direction(value) + return nil +} +func (Query_Order_Direction) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{15, 1, 0} +} + +type Error_ErrorCode int32 + +const ( + Error_BAD_REQUEST Error_ErrorCode = 1 + Error_CONCURRENT_TRANSACTION Error_ErrorCode = 2 + Error_INTERNAL_ERROR Error_ErrorCode = 3 + Error_NEED_INDEX Error_ErrorCode = 4 + Error_TIMEOUT Error_ErrorCode = 5 + Error_PERMISSION_DENIED Error_ErrorCode = 6 + Error_BIGTABLE_ERROR Error_ErrorCode = 7 + Error_COMMITTED_BUT_STILL_APPLYING Error_ErrorCode = 8 + Error_CAPABILITY_DISABLED Error_ErrorCode = 9 + Error_TRY_ALTERNATE_BACKEND Error_ErrorCode = 10 + Error_SAFE_TIME_TOO_OLD Error_ErrorCode = 11 +) + +var Error_ErrorCode_name = map[int32]string{ + 1: "BAD_REQUEST", + 2: "CONCURRENT_TRANSACTION", + 3: "INTERNAL_ERROR", + 4: "NEED_INDEX", + 5: "TIMEOUT", + 6: "PERMISSION_DENIED", + 7: "BIGTABLE_ERROR", + 8: "COMMITTED_BUT_STILL_APPLYING", + 9: "CAPABILITY_DISABLED", + 10: "TRY_ALTERNATE_BACKEND", + 11: "SAFE_TIME_TOO_OLD", +} +var Error_ErrorCode_value = map[string]int32{ + "BAD_REQUEST": 1, + "CONCURRENT_TRANSACTION": 2, + "INTERNAL_ERROR": 3, + "NEED_INDEX": 4, + "TIMEOUT": 5, + "PERMISSION_DENIED": 6, + "BIGTABLE_ERROR": 7, + "COMMITTED_BUT_STILL_APPLYING": 8, + "CAPABILITY_DISABLED": 9, + "TRY_ALTERNATE_BACKEND": 10, + "SAFE_TIME_TOO_OLD": 11, +} + +func (x Error_ErrorCode) Enum() *Error_ErrorCode { + p := new(Error_ErrorCode) + *p = x + return p +} +func (x Error_ErrorCode) String() string { + return proto.EnumName(Error_ErrorCode_name, int32(x)) +} +func (x *Error_ErrorCode) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Error_ErrorCode_value, data, "Error_ErrorCode") + if err != nil { + return err + } + *x = Error_ErrorCode(value) + return nil +} +func (Error_ErrorCode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{19, 0} +} + +type PutRequest_AutoIdPolicy int32 + +const ( + PutRequest_CURRENT PutRequest_AutoIdPolicy = 0 + PutRequest_SEQUENTIAL PutRequest_AutoIdPolicy = 1 +) + +var PutRequest_AutoIdPolicy_name = map[int32]string{ + 0: "CURRENT", + 1: "SEQUENTIAL", +} +var PutRequest_AutoIdPolicy_value = map[string]int32{ + "CURRENT": 0, + "SEQUENTIAL": 1, +} + +func (x PutRequest_AutoIdPolicy) Enum() *PutRequest_AutoIdPolicy { + p := new(PutRequest_AutoIdPolicy) + *p = x + return p +} +func (x PutRequest_AutoIdPolicy) String() string { + return proto.EnumName(PutRequest_AutoIdPolicy_name, int32(x)) +} +func (x *PutRequest_AutoIdPolicy) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(PutRequest_AutoIdPolicy_value, data, "PutRequest_AutoIdPolicy") + if err != nil { + return err + } + *x = PutRequest_AutoIdPolicy(value) + return nil +} +func (PutRequest_AutoIdPolicy) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{23, 0} +} + +type BeginTransactionRequest_TransactionMode int32 + +const ( + BeginTransactionRequest_UNKNOWN BeginTransactionRequest_TransactionMode = 0 + BeginTransactionRequest_READ_ONLY BeginTransactionRequest_TransactionMode = 1 + BeginTransactionRequest_READ_WRITE BeginTransactionRequest_TransactionMode = 2 +) + +var BeginTransactionRequest_TransactionMode_name = map[int32]string{ + 0: "UNKNOWN", + 1: "READ_ONLY", + 2: "READ_WRITE", +} +var BeginTransactionRequest_TransactionMode_value = map[string]int32{ + "UNKNOWN": 0, + "READ_ONLY": 1, + "READ_WRITE": 2, +} + +func (x BeginTransactionRequest_TransactionMode) Enum() *BeginTransactionRequest_TransactionMode { + p := new(BeginTransactionRequest_TransactionMode) + *p = x + return p +} +func (x BeginTransactionRequest_TransactionMode) String() string { + return proto.EnumName(BeginTransactionRequest_TransactionMode_name, int32(x)) +} +func (x *BeginTransactionRequest_TransactionMode) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(BeginTransactionRequest_TransactionMode_value, data, "BeginTransactionRequest_TransactionMode") + if err != nil { + return err + } + *x = BeginTransactionRequest_TransactionMode(value) + return nil +} +func (BeginTransactionRequest_TransactionMode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{36, 0} +} + +type Action struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Action) Reset() { *m = Action{} } +func (m *Action) String() string { return proto.CompactTextString(m) } +func (*Action) ProtoMessage() {} +func (*Action) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{0} +} +func (m *Action) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Action.Unmarshal(m, b) +} +func (m *Action) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Action.Marshal(b, m, deterministic) +} +func (dst *Action) XXX_Merge(src proto.Message) { + xxx_messageInfo_Action.Merge(dst, src) +} +func (m *Action) XXX_Size() int { + return xxx_messageInfo_Action.Size(m) +} +func (m *Action) XXX_DiscardUnknown() { + xxx_messageInfo_Action.DiscardUnknown(m) +} + +var xxx_messageInfo_Action proto.InternalMessageInfo + +type PropertyValue struct { + Int64Value *int64 `protobuf:"varint,1,opt,name=int64Value" json:"int64Value,omitempty"` + BooleanValue *bool `protobuf:"varint,2,opt,name=booleanValue" json:"booleanValue,omitempty"` + StringValue *string `protobuf:"bytes,3,opt,name=stringValue" json:"stringValue,omitempty"` + DoubleValue *float64 `protobuf:"fixed64,4,opt,name=doubleValue" json:"doubleValue,omitempty"` + Pointvalue *PropertyValue_PointValue `protobuf:"group,5,opt,name=PointValue,json=pointvalue" json:"pointvalue,omitempty"` + Uservalue *PropertyValue_UserValue `protobuf:"group,8,opt,name=UserValue,json=uservalue" json:"uservalue,omitempty"` + Referencevalue *PropertyValue_ReferenceValue `protobuf:"group,12,opt,name=ReferenceValue,json=referencevalue" json:"referencevalue,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PropertyValue) Reset() { *m = PropertyValue{} } +func (m *PropertyValue) String() string { return proto.CompactTextString(m) } +func (*PropertyValue) ProtoMessage() {} +func (*PropertyValue) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{1} +} +func (m *PropertyValue) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PropertyValue.Unmarshal(m, b) +} +func (m *PropertyValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PropertyValue.Marshal(b, m, deterministic) +} +func (dst *PropertyValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_PropertyValue.Merge(dst, src) +} +func (m *PropertyValue) XXX_Size() int { + return xxx_messageInfo_PropertyValue.Size(m) +} +func (m *PropertyValue) XXX_DiscardUnknown() { + xxx_messageInfo_PropertyValue.DiscardUnknown(m) +} + +var xxx_messageInfo_PropertyValue proto.InternalMessageInfo + +func (m *PropertyValue) GetInt64Value() int64 { + if m != nil && m.Int64Value != nil { + return *m.Int64Value + } + return 0 +} + +func (m *PropertyValue) GetBooleanValue() bool { + if m != nil && m.BooleanValue != nil { + return *m.BooleanValue + } + return false +} + +func (m *PropertyValue) GetStringValue() string { + if m != nil && m.StringValue != nil { + return *m.StringValue + } + return "" +} + +func (m *PropertyValue) GetDoubleValue() float64 { + if m != nil && m.DoubleValue != nil { + return *m.DoubleValue + } + return 0 +} + +func (m *PropertyValue) GetPointvalue() *PropertyValue_PointValue { + if m != nil { + return m.Pointvalue + } + return nil +} + +func (m *PropertyValue) GetUservalue() *PropertyValue_UserValue { + if m != nil { + return m.Uservalue + } + return nil +} + +func (m *PropertyValue) GetReferencevalue() *PropertyValue_ReferenceValue { + if m != nil { + return m.Referencevalue + } + return nil +} + +type PropertyValue_PointValue struct { + X *float64 `protobuf:"fixed64,6,req,name=x" json:"x,omitempty"` + Y *float64 `protobuf:"fixed64,7,req,name=y" json:"y,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PropertyValue_PointValue) Reset() { *m = PropertyValue_PointValue{} } +func (m *PropertyValue_PointValue) String() string { return proto.CompactTextString(m) } +func (*PropertyValue_PointValue) ProtoMessage() {} +func (*PropertyValue_PointValue) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{1, 0} +} +func (m *PropertyValue_PointValue) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PropertyValue_PointValue.Unmarshal(m, b) +} +func (m *PropertyValue_PointValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PropertyValue_PointValue.Marshal(b, m, deterministic) +} +func (dst *PropertyValue_PointValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_PropertyValue_PointValue.Merge(dst, src) +} +func (m *PropertyValue_PointValue) XXX_Size() int { + return xxx_messageInfo_PropertyValue_PointValue.Size(m) +} +func (m *PropertyValue_PointValue) XXX_DiscardUnknown() { + xxx_messageInfo_PropertyValue_PointValue.DiscardUnknown(m) +} + +var xxx_messageInfo_PropertyValue_PointValue proto.InternalMessageInfo + +func (m *PropertyValue_PointValue) GetX() float64 { + if m != nil && m.X != nil { + return *m.X + } + return 0 +} + +func (m *PropertyValue_PointValue) GetY() float64 { + if m != nil && m.Y != nil { + return *m.Y + } + return 0 +} + +type PropertyValue_UserValue struct { + Email *string `protobuf:"bytes,9,req,name=email" json:"email,omitempty"` + AuthDomain *string `protobuf:"bytes,10,req,name=auth_domain,json=authDomain" json:"auth_domain,omitempty"` + Nickname *string `protobuf:"bytes,11,opt,name=nickname" json:"nickname,omitempty"` + FederatedIdentity *string `protobuf:"bytes,21,opt,name=federated_identity,json=federatedIdentity" json:"federated_identity,omitempty"` + FederatedProvider *string `protobuf:"bytes,22,opt,name=federated_provider,json=federatedProvider" json:"federated_provider,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PropertyValue_UserValue) Reset() { *m = PropertyValue_UserValue{} } +func (m *PropertyValue_UserValue) String() string { return proto.CompactTextString(m) } +func (*PropertyValue_UserValue) ProtoMessage() {} +func (*PropertyValue_UserValue) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{1, 1} +} +func (m *PropertyValue_UserValue) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PropertyValue_UserValue.Unmarshal(m, b) +} +func (m *PropertyValue_UserValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PropertyValue_UserValue.Marshal(b, m, deterministic) +} +func (dst *PropertyValue_UserValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_PropertyValue_UserValue.Merge(dst, src) +} +func (m *PropertyValue_UserValue) XXX_Size() int { + return xxx_messageInfo_PropertyValue_UserValue.Size(m) +} +func (m *PropertyValue_UserValue) XXX_DiscardUnknown() { + xxx_messageInfo_PropertyValue_UserValue.DiscardUnknown(m) +} + +var xxx_messageInfo_PropertyValue_UserValue proto.InternalMessageInfo + +func (m *PropertyValue_UserValue) GetEmail() string { + if m != nil && m.Email != nil { + return *m.Email + } + return "" +} + +func (m *PropertyValue_UserValue) GetAuthDomain() string { + if m != nil && m.AuthDomain != nil { + return *m.AuthDomain + } + return "" +} + +func (m *PropertyValue_UserValue) GetNickname() string { + if m != nil && m.Nickname != nil { + return *m.Nickname + } + return "" +} + +func (m *PropertyValue_UserValue) GetFederatedIdentity() string { + if m != nil && m.FederatedIdentity != nil { + return *m.FederatedIdentity + } + return "" +} + +func (m *PropertyValue_UserValue) GetFederatedProvider() string { + if m != nil && m.FederatedProvider != nil { + return *m.FederatedProvider + } + return "" +} + +type PropertyValue_ReferenceValue struct { + App *string `protobuf:"bytes,13,req,name=app" json:"app,omitempty"` + NameSpace *string `protobuf:"bytes,20,opt,name=name_space,json=nameSpace" json:"name_space,omitempty"` + Pathelement []*PropertyValue_ReferenceValue_PathElement `protobuf:"group,14,rep,name=PathElement,json=pathelement" json:"pathelement,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PropertyValue_ReferenceValue) Reset() { *m = PropertyValue_ReferenceValue{} } +func (m *PropertyValue_ReferenceValue) String() string { return proto.CompactTextString(m) } +func (*PropertyValue_ReferenceValue) ProtoMessage() {} +func (*PropertyValue_ReferenceValue) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{1, 2} +} +func (m *PropertyValue_ReferenceValue) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PropertyValue_ReferenceValue.Unmarshal(m, b) +} +func (m *PropertyValue_ReferenceValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PropertyValue_ReferenceValue.Marshal(b, m, deterministic) +} +func (dst *PropertyValue_ReferenceValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_PropertyValue_ReferenceValue.Merge(dst, src) +} +func (m *PropertyValue_ReferenceValue) XXX_Size() int { + return xxx_messageInfo_PropertyValue_ReferenceValue.Size(m) +} +func (m *PropertyValue_ReferenceValue) XXX_DiscardUnknown() { + xxx_messageInfo_PropertyValue_ReferenceValue.DiscardUnknown(m) +} + +var xxx_messageInfo_PropertyValue_ReferenceValue proto.InternalMessageInfo + +func (m *PropertyValue_ReferenceValue) GetApp() string { + if m != nil && m.App != nil { + return *m.App + } + return "" +} + +func (m *PropertyValue_ReferenceValue) GetNameSpace() string { + if m != nil && m.NameSpace != nil { + return *m.NameSpace + } + return "" +} + +func (m *PropertyValue_ReferenceValue) GetPathelement() []*PropertyValue_ReferenceValue_PathElement { + if m != nil { + return m.Pathelement + } + return nil +} + +type PropertyValue_ReferenceValue_PathElement struct { + Type *string `protobuf:"bytes,15,req,name=type" json:"type,omitempty"` + Id *int64 `protobuf:"varint,16,opt,name=id" json:"id,omitempty"` + Name *string `protobuf:"bytes,17,opt,name=name" json:"name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PropertyValue_ReferenceValue_PathElement) Reset() { + *m = PropertyValue_ReferenceValue_PathElement{} +} +func (m *PropertyValue_ReferenceValue_PathElement) String() string { return proto.CompactTextString(m) } +func (*PropertyValue_ReferenceValue_PathElement) ProtoMessage() {} +func (*PropertyValue_ReferenceValue_PathElement) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{1, 2, 0} +} +func (m *PropertyValue_ReferenceValue_PathElement) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PropertyValue_ReferenceValue_PathElement.Unmarshal(m, b) +} +func (m *PropertyValue_ReferenceValue_PathElement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PropertyValue_ReferenceValue_PathElement.Marshal(b, m, deterministic) +} +func (dst *PropertyValue_ReferenceValue_PathElement) XXX_Merge(src proto.Message) { + xxx_messageInfo_PropertyValue_ReferenceValue_PathElement.Merge(dst, src) +} +func (m *PropertyValue_ReferenceValue_PathElement) XXX_Size() int { + return xxx_messageInfo_PropertyValue_ReferenceValue_PathElement.Size(m) +} +func (m *PropertyValue_ReferenceValue_PathElement) XXX_DiscardUnknown() { + xxx_messageInfo_PropertyValue_ReferenceValue_PathElement.DiscardUnknown(m) +} + +var xxx_messageInfo_PropertyValue_ReferenceValue_PathElement proto.InternalMessageInfo + +func (m *PropertyValue_ReferenceValue_PathElement) GetType() string { + if m != nil && m.Type != nil { + return *m.Type + } + return "" +} + +func (m *PropertyValue_ReferenceValue_PathElement) GetId() int64 { + if m != nil && m.Id != nil { + return *m.Id + } + return 0 +} + +func (m *PropertyValue_ReferenceValue_PathElement) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +type Property struct { + Meaning *Property_Meaning `protobuf:"varint,1,opt,name=meaning,enum=appengine.Property_Meaning,def=0" json:"meaning,omitempty"` + MeaningUri *string `protobuf:"bytes,2,opt,name=meaning_uri,json=meaningUri" json:"meaning_uri,omitempty"` + Name *string `protobuf:"bytes,3,req,name=name" json:"name,omitempty"` + Value *PropertyValue `protobuf:"bytes,5,req,name=value" json:"value,omitempty"` + Multiple *bool `protobuf:"varint,4,req,name=multiple" json:"multiple,omitempty"` + Searchable *bool `protobuf:"varint,6,opt,name=searchable,def=0" json:"searchable,omitempty"` + FtsTokenizationOption *Property_FtsTokenizationOption `protobuf:"varint,8,opt,name=fts_tokenization_option,json=ftsTokenizationOption,enum=appengine.Property_FtsTokenizationOption" json:"fts_tokenization_option,omitempty"` + Locale *string `protobuf:"bytes,9,opt,name=locale,def=en" json:"locale,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Property) Reset() { *m = Property{} } +func (m *Property) String() string { return proto.CompactTextString(m) } +func (*Property) ProtoMessage() {} +func (*Property) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{2} +} +func (m *Property) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Property.Unmarshal(m, b) +} +func (m *Property) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Property.Marshal(b, m, deterministic) +} +func (dst *Property) XXX_Merge(src proto.Message) { + xxx_messageInfo_Property.Merge(dst, src) +} +func (m *Property) XXX_Size() int { + return xxx_messageInfo_Property.Size(m) +} +func (m *Property) XXX_DiscardUnknown() { + xxx_messageInfo_Property.DiscardUnknown(m) +} + +var xxx_messageInfo_Property proto.InternalMessageInfo + +const Default_Property_Meaning Property_Meaning = Property_NO_MEANING +const Default_Property_Searchable bool = false +const Default_Property_Locale string = "en" + +func (m *Property) GetMeaning() Property_Meaning { + if m != nil && m.Meaning != nil { + return *m.Meaning + } + return Default_Property_Meaning +} + +func (m *Property) GetMeaningUri() string { + if m != nil && m.MeaningUri != nil { + return *m.MeaningUri + } + return "" +} + +func (m *Property) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *Property) GetValue() *PropertyValue { + if m != nil { + return m.Value + } + return nil +} + +func (m *Property) GetMultiple() bool { + if m != nil && m.Multiple != nil { + return *m.Multiple + } + return false +} + +func (m *Property) GetSearchable() bool { + if m != nil && m.Searchable != nil { + return *m.Searchable + } + return Default_Property_Searchable +} + +func (m *Property) GetFtsTokenizationOption() Property_FtsTokenizationOption { + if m != nil && m.FtsTokenizationOption != nil { + return *m.FtsTokenizationOption + } + return Property_HTML +} + +func (m *Property) GetLocale() string { + if m != nil && m.Locale != nil { + return *m.Locale + } + return Default_Property_Locale +} + +type Path struct { + Element []*Path_Element `protobuf:"group,1,rep,name=Element,json=element" json:"element,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Path) Reset() { *m = Path{} } +func (m *Path) String() string { return proto.CompactTextString(m) } +func (*Path) ProtoMessage() {} +func (*Path) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{3} +} +func (m *Path) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Path.Unmarshal(m, b) +} +func (m *Path) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Path.Marshal(b, m, deterministic) +} +func (dst *Path) XXX_Merge(src proto.Message) { + xxx_messageInfo_Path.Merge(dst, src) +} +func (m *Path) XXX_Size() int { + return xxx_messageInfo_Path.Size(m) +} +func (m *Path) XXX_DiscardUnknown() { + xxx_messageInfo_Path.DiscardUnknown(m) +} + +var xxx_messageInfo_Path proto.InternalMessageInfo + +func (m *Path) GetElement() []*Path_Element { + if m != nil { + return m.Element + } + return nil +} + +type Path_Element struct { + Type *string `protobuf:"bytes,2,req,name=type" json:"type,omitempty"` + Id *int64 `protobuf:"varint,3,opt,name=id" json:"id,omitempty"` + Name *string `protobuf:"bytes,4,opt,name=name" json:"name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Path_Element) Reset() { *m = Path_Element{} } +func (m *Path_Element) String() string { return proto.CompactTextString(m) } +func (*Path_Element) ProtoMessage() {} +func (*Path_Element) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{3, 0} +} +func (m *Path_Element) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Path_Element.Unmarshal(m, b) +} +func (m *Path_Element) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Path_Element.Marshal(b, m, deterministic) +} +func (dst *Path_Element) XXX_Merge(src proto.Message) { + xxx_messageInfo_Path_Element.Merge(dst, src) +} +func (m *Path_Element) XXX_Size() int { + return xxx_messageInfo_Path_Element.Size(m) +} +func (m *Path_Element) XXX_DiscardUnknown() { + xxx_messageInfo_Path_Element.DiscardUnknown(m) +} + +var xxx_messageInfo_Path_Element proto.InternalMessageInfo + +func (m *Path_Element) GetType() string { + if m != nil && m.Type != nil { + return *m.Type + } + return "" +} + +func (m *Path_Element) GetId() int64 { + if m != nil && m.Id != nil { + return *m.Id + } + return 0 +} + +func (m *Path_Element) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +type Reference struct { + App *string `protobuf:"bytes,13,req,name=app" json:"app,omitempty"` + NameSpace *string `protobuf:"bytes,20,opt,name=name_space,json=nameSpace" json:"name_space,omitempty"` + Path *Path `protobuf:"bytes,14,req,name=path" json:"path,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Reference) Reset() { *m = Reference{} } +func (m *Reference) String() string { return proto.CompactTextString(m) } +func (*Reference) ProtoMessage() {} +func (*Reference) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{4} +} +func (m *Reference) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Reference.Unmarshal(m, b) +} +func (m *Reference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Reference.Marshal(b, m, deterministic) +} +func (dst *Reference) XXX_Merge(src proto.Message) { + xxx_messageInfo_Reference.Merge(dst, src) +} +func (m *Reference) XXX_Size() int { + return xxx_messageInfo_Reference.Size(m) +} +func (m *Reference) XXX_DiscardUnknown() { + xxx_messageInfo_Reference.DiscardUnknown(m) +} + +var xxx_messageInfo_Reference proto.InternalMessageInfo + +func (m *Reference) GetApp() string { + if m != nil && m.App != nil { + return *m.App + } + return "" +} + +func (m *Reference) GetNameSpace() string { + if m != nil && m.NameSpace != nil { + return *m.NameSpace + } + return "" +} + +func (m *Reference) GetPath() *Path { + if m != nil { + return m.Path + } + return nil +} + +type User struct { + Email *string `protobuf:"bytes,1,req,name=email" json:"email,omitempty"` + AuthDomain *string `protobuf:"bytes,2,req,name=auth_domain,json=authDomain" json:"auth_domain,omitempty"` + Nickname *string `protobuf:"bytes,3,opt,name=nickname" json:"nickname,omitempty"` + FederatedIdentity *string `protobuf:"bytes,6,opt,name=federated_identity,json=federatedIdentity" json:"federated_identity,omitempty"` + FederatedProvider *string `protobuf:"bytes,7,opt,name=federated_provider,json=federatedProvider" json:"federated_provider,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *User) Reset() { *m = User{} } +func (m *User) String() string { return proto.CompactTextString(m) } +func (*User) ProtoMessage() {} +func (*User) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{5} +} +func (m *User) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_User.Unmarshal(m, b) +} +func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_User.Marshal(b, m, deterministic) +} +func (dst *User) XXX_Merge(src proto.Message) { + xxx_messageInfo_User.Merge(dst, src) +} +func (m *User) XXX_Size() int { + return xxx_messageInfo_User.Size(m) +} +func (m *User) XXX_DiscardUnknown() { + xxx_messageInfo_User.DiscardUnknown(m) +} + +var xxx_messageInfo_User proto.InternalMessageInfo + +func (m *User) GetEmail() string { + if m != nil && m.Email != nil { + return *m.Email + } + return "" +} + +func (m *User) GetAuthDomain() string { + if m != nil && m.AuthDomain != nil { + return *m.AuthDomain + } + return "" +} + +func (m *User) GetNickname() string { + if m != nil && m.Nickname != nil { + return *m.Nickname + } + return "" +} + +func (m *User) GetFederatedIdentity() string { + if m != nil && m.FederatedIdentity != nil { + return *m.FederatedIdentity + } + return "" +} + +func (m *User) GetFederatedProvider() string { + if m != nil && m.FederatedProvider != nil { + return *m.FederatedProvider + } + return "" +} + +type EntityProto struct { + Key *Reference `protobuf:"bytes,13,req,name=key" json:"key,omitempty"` + EntityGroup *Path `protobuf:"bytes,16,req,name=entity_group,json=entityGroup" json:"entity_group,omitempty"` + Owner *User `protobuf:"bytes,17,opt,name=owner" json:"owner,omitempty"` + Kind *EntityProto_Kind `protobuf:"varint,4,opt,name=kind,enum=appengine.EntityProto_Kind" json:"kind,omitempty"` + KindUri *string `protobuf:"bytes,5,opt,name=kind_uri,json=kindUri" json:"kind_uri,omitempty"` + Property []*Property `protobuf:"bytes,14,rep,name=property" json:"property,omitempty"` + RawProperty []*Property `protobuf:"bytes,15,rep,name=raw_property,json=rawProperty" json:"raw_property,omitempty"` + Rank *int32 `protobuf:"varint,18,opt,name=rank" json:"rank,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *EntityProto) Reset() { *m = EntityProto{} } +func (m *EntityProto) String() string { return proto.CompactTextString(m) } +func (*EntityProto) ProtoMessage() {} +func (*EntityProto) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{6} +} +func (m *EntityProto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_EntityProto.Unmarshal(m, b) +} +func (m *EntityProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_EntityProto.Marshal(b, m, deterministic) +} +func (dst *EntityProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_EntityProto.Merge(dst, src) +} +func (m *EntityProto) XXX_Size() int { + return xxx_messageInfo_EntityProto.Size(m) +} +func (m *EntityProto) XXX_DiscardUnknown() { + xxx_messageInfo_EntityProto.DiscardUnknown(m) +} + +var xxx_messageInfo_EntityProto proto.InternalMessageInfo + +func (m *EntityProto) GetKey() *Reference { + if m != nil { + return m.Key + } + return nil +} + +func (m *EntityProto) GetEntityGroup() *Path { + if m != nil { + return m.EntityGroup + } + return nil +} + +func (m *EntityProto) GetOwner() *User { + if m != nil { + return m.Owner + } + return nil +} + +func (m *EntityProto) GetKind() EntityProto_Kind { + if m != nil && m.Kind != nil { + return *m.Kind + } + return EntityProto_GD_CONTACT +} + +func (m *EntityProto) GetKindUri() string { + if m != nil && m.KindUri != nil { + return *m.KindUri + } + return "" +} + +func (m *EntityProto) GetProperty() []*Property { + if m != nil { + return m.Property + } + return nil +} + +func (m *EntityProto) GetRawProperty() []*Property { + if m != nil { + return m.RawProperty + } + return nil +} + +func (m *EntityProto) GetRank() int32 { + if m != nil && m.Rank != nil { + return *m.Rank + } + return 0 +} + +type CompositeProperty struct { + IndexId *int64 `protobuf:"varint,1,req,name=index_id,json=indexId" json:"index_id,omitempty"` + Value []string `protobuf:"bytes,2,rep,name=value" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CompositeProperty) Reset() { *m = CompositeProperty{} } +func (m *CompositeProperty) String() string { return proto.CompactTextString(m) } +func (*CompositeProperty) ProtoMessage() {} +func (*CompositeProperty) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{7} +} +func (m *CompositeProperty) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CompositeProperty.Unmarshal(m, b) +} +func (m *CompositeProperty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CompositeProperty.Marshal(b, m, deterministic) +} +func (dst *CompositeProperty) XXX_Merge(src proto.Message) { + xxx_messageInfo_CompositeProperty.Merge(dst, src) +} +func (m *CompositeProperty) XXX_Size() int { + return xxx_messageInfo_CompositeProperty.Size(m) +} +func (m *CompositeProperty) XXX_DiscardUnknown() { + xxx_messageInfo_CompositeProperty.DiscardUnknown(m) +} + +var xxx_messageInfo_CompositeProperty proto.InternalMessageInfo + +func (m *CompositeProperty) GetIndexId() int64 { + if m != nil && m.IndexId != nil { + return *m.IndexId + } + return 0 +} + +func (m *CompositeProperty) GetValue() []string { + if m != nil { + return m.Value + } + return nil +} + +type Index struct { + EntityType *string `protobuf:"bytes,1,req,name=entity_type,json=entityType" json:"entity_type,omitempty"` + Ancestor *bool `protobuf:"varint,5,req,name=ancestor" json:"ancestor,omitempty"` + Property []*Index_Property `protobuf:"group,2,rep,name=Property,json=property" json:"property,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Index) Reset() { *m = Index{} } +func (m *Index) String() string { return proto.CompactTextString(m) } +func (*Index) ProtoMessage() {} +func (*Index) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{8} +} +func (m *Index) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Index.Unmarshal(m, b) +} +func (m *Index) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Index.Marshal(b, m, deterministic) +} +func (dst *Index) XXX_Merge(src proto.Message) { + xxx_messageInfo_Index.Merge(dst, src) +} +func (m *Index) XXX_Size() int { + return xxx_messageInfo_Index.Size(m) +} +func (m *Index) XXX_DiscardUnknown() { + xxx_messageInfo_Index.DiscardUnknown(m) +} + +var xxx_messageInfo_Index proto.InternalMessageInfo + +func (m *Index) GetEntityType() string { + if m != nil && m.EntityType != nil { + return *m.EntityType + } + return "" +} + +func (m *Index) GetAncestor() bool { + if m != nil && m.Ancestor != nil { + return *m.Ancestor + } + return false +} + +func (m *Index) GetProperty() []*Index_Property { + if m != nil { + return m.Property + } + return nil +} + +type Index_Property struct { + Name *string `protobuf:"bytes,3,req,name=name" json:"name,omitempty"` + Direction *Index_Property_Direction `protobuf:"varint,4,opt,name=direction,enum=appengine.Index_Property_Direction,def=1" json:"direction,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Index_Property) Reset() { *m = Index_Property{} } +func (m *Index_Property) String() string { return proto.CompactTextString(m) } +func (*Index_Property) ProtoMessage() {} +func (*Index_Property) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{8, 0} +} +func (m *Index_Property) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Index_Property.Unmarshal(m, b) +} +func (m *Index_Property) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Index_Property.Marshal(b, m, deterministic) +} +func (dst *Index_Property) XXX_Merge(src proto.Message) { + xxx_messageInfo_Index_Property.Merge(dst, src) +} +func (m *Index_Property) XXX_Size() int { + return xxx_messageInfo_Index_Property.Size(m) +} +func (m *Index_Property) XXX_DiscardUnknown() { + xxx_messageInfo_Index_Property.DiscardUnknown(m) +} + +var xxx_messageInfo_Index_Property proto.InternalMessageInfo + +const Default_Index_Property_Direction Index_Property_Direction = Index_Property_ASCENDING + +func (m *Index_Property) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *Index_Property) GetDirection() Index_Property_Direction { + if m != nil && m.Direction != nil { + return *m.Direction + } + return Default_Index_Property_Direction +} + +type CompositeIndex struct { + AppId *string `protobuf:"bytes,1,req,name=app_id,json=appId" json:"app_id,omitempty"` + Id *int64 `protobuf:"varint,2,req,name=id" json:"id,omitempty"` + Definition *Index `protobuf:"bytes,3,req,name=definition" json:"definition,omitempty"` + State *CompositeIndex_State `protobuf:"varint,4,req,name=state,enum=appengine.CompositeIndex_State" json:"state,omitempty"` + OnlyUseIfRequired *bool `protobuf:"varint,6,opt,name=only_use_if_required,json=onlyUseIfRequired,def=0" json:"only_use_if_required,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CompositeIndex) Reset() { *m = CompositeIndex{} } +func (m *CompositeIndex) String() string { return proto.CompactTextString(m) } +func (*CompositeIndex) ProtoMessage() {} +func (*CompositeIndex) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{9} +} +func (m *CompositeIndex) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CompositeIndex.Unmarshal(m, b) +} +func (m *CompositeIndex) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CompositeIndex.Marshal(b, m, deterministic) +} +func (dst *CompositeIndex) XXX_Merge(src proto.Message) { + xxx_messageInfo_CompositeIndex.Merge(dst, src) +} +func (m *CompositeIndex) XXX_Size() int { + return xxx_messageInfo_CompositeIndex.Size(m) +} +func (m *CompositeIndex) XXX_DiscardUnknown() { + xxx_messageInfo_CompositeIndex.DiscardUnknown(m) +} + +var xxx_messageInfo_CompositeIndex proto.InternalMessageInfo + +const Default_CompositeIndex_OnlyUseIfRequired bool = false + +func (m *CompositeIndex) GetAppId() string { + if m != nil && m.AppId != nil { + return *m.AppId + } + return "" +} + +func (m *CompositeIndex) GetId() int64 { + if m != nil && m.Id != nil { + return *m.Id + } + return 0 +} + +func (m *CompositeIndex) GetDefinition() *Index { + if m != nil { + return m.Definition + } + return nil +} + +func (m *CompositeIndex) GetState() CompositeIndex_State { + if m != nil && m.State != nil { + return *m.State + } + return CompositeIndex_WRITE_ONLY +} + +func (m *CompositeIndex) GetOnlyUseIfRequired() bool { + if m != nil && m.OnlyUseIfRequired != nil { + return *m.OnlyUseIfRequired + } + return Default_CompositeIndex_OnlyUseIfRequired +} + +type IndexPostfix struct { + IndexValue []*IndexPostfix_IndexValue `protobuf:"bytes,1,rep,name=index_value,json=indexValue" json:"index_value,omitempty"` + Key *Reference `protobuf:"bytes,2,opt,name=key" json:"key,omitempty"` + Before *bool `protobuf:"varint,3,opt,name=before,def=1" json:"before,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *IndexPostfix) Reset() { *m = IndexPostfix{} } +func (m *IndexPostfix) String() string { return proto.CompactTextString(m) } +func (*IndexPostfix) ProtoMessage() {} +func (*IndexPostfix) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{10} +} +func (m *IndexPostfix) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_IndexPostfix.Unmarshal(m, b) +} +func (m *IndexPostfix) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_IndexPostfix.Marshal(b, m, deterministic) +} +func (dst *IndexPostfix) XXX_Merge(src proto.Message) { + xxx_messageInfo_IndexPostfix.Merge(dst, src) +} +func (m *IndexPostfix) XXX_Size() int { + return xxx_messageInfo_IndexPostfix.Size(m) +} +func (m *IndexPostfix) XXX_DiscardUnknown() { + xxx_messageInfo_IndexPostfix.DiscardUnknown(m) +} + +var xxx_messageInfo_IndexPostfix proto.InternalMessageInfo + +const Default_IndexPostfix_Before bool = true + +func (m *IndexPostfix) GetIndexValue() []*IndexPostfix_IndexValue { + if m != nil { + return m.IndexValue + } + return nil +} + +func (m *IndexPostfix) GetKey() *Reference { + if m != nil { + return m.Key + } + return nil +} + +func (m *IndexPostfix) GetBefore() bool { + if m != nil && m.Before != nil { + return *m.Before + } + return Default_IndexPostfix_Before +} + +type IndexPostfix_IndexValue struct { + PropertyName *string `protobuf:"bytes,1,req,name=property_name,json=propertyName" json:"property_name,omitempty"` + Value *PropertyValue `protobuf:"bytes,2,req,name=value" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *IndexPostfix_IndexValue) Reset() { *m = IndexPostfix_IndexValue{} } +func (m *IndexPostfix_IndexValue) String() string { return proto.CompactTextString(m) } +func (*IndexPostfix_IndexValue) ProtoMessage() {} +func (*IndexPostfix_IndexValue) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{10, 0} +} +func (m *IndexPostfix_IndexValue) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_IndexPostfix_IndexValue.Unmarshal(m, b) +} +func (m *IndexPostfix_IndexValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_IndexPostfix_IndexValue.Marshal(b, m, deterministic) +} +func (dst *IndexPostfix_IndexValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_IndexPostfix_IndexValue.Merge(dst, src) +} +func (m *IndexPostfix_IndexValue) XXX_Size() int { + return xxx_messageInfo_IndexPostfix_IndexValue.Size(m) +} +func (m *IndexPostfix_IndexValue) XXX_DiscardUnknown() { + xxx_messageInfo_IndexPostfix_IndexValue.DiscardUnknown(m) +} + +var xxx_messageInfo_IndexPostfix_IndexValue proto.InternalMessageInfo + +func (m *IndexPostfix_IndexValue) GetPropertyName() string { + if m != nil && m.PropertyName != nil { + return *m.PropertyName + } + return "" +} + +func (m *IndexPostfix_IndexValue) GetValue() *PropertyValue { + if m != nil { + return m.Value + } + return nil +} + +type IndexPosition struct { + Key *string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` + Before *bool `protobuf:"varint,2,opt,name=before,def=1" json:"before,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *IndexPosition) Reset() { *m = IndexPosition{} } +func (m *IndexPosition) String() string { return proto.CompactTextString(m) } +func (*IndexPosition) ProtoMessage() {} +func (*IndexPosition) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{11} +} +func (m *IndexPosition) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_IndexPosition.Unmarshal(m, b) +} +func (m *IndexPosition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_IndexPosition.Marshal(b, m, deterministic) +} +func (dst *IndexPosition) XXX_Merge(src proto.Message) { + xxx_messageInfo_IndexPosition.Merge(dst, src) +} +func (m *IndexPosition) XXX_Size() int { + return xxx_messageInfo_IndexPosition.Size(m) +} +func (m *IndexPosition) XXX_DiscardUnknown() { + xxx_messageInfo_IndexPosition.DiscardUnknown(m) +} + +var xxx_messageInfo_IndexPosition proto.InternalMessageInfo + +const Default_IndexPosition_Before bool = true + +func (m *IndexPosition) GetKey() string { + if m != nil && m.Key != nil { + return *m.Key + } + return "" +} + +func (m *IndexPosition) GetBefore() bool { + if m != nil && m.Before != nil { + return *m.Before + } + return Default_IndexPosition_Before +} + +type Snapshot struct { + Ts *int64 `protobuf:"varint,1,req,name=ts" json:"ts,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Snapshot) Reset() { *m = Snapshot{} } +func (m *Snapshot) String() string { return proto.CompactTextString(m) } +func (*Snapshot) ProtoMessage() {} +func (*Snapshot) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{12} +} +func (m *Snapshot) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Snapshot.Unmarshal(m, b) +} +func (m *Snapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Snapshot.Marshal(b, m, deterministic) +} +func (dst *Snapshot) XXX_Merge(src proto.Message) { + xxx_messageInfo_Snapshot.Merge(dst, src) +} +func (m *Snapshot) XXX_Size() int { + return xxx_messageInfo_Snapshot.Size(m) +} +func (m *Snapshot) XXX_DiscardUnknown() { + xxx_messageInfo_Snapshot.DiscardUnknown(m) +} + +var xxx_messageInfo_Snapshot proto.InternalMessageInfo + +func (m *Snapshot) GetTs() int64 { + if m != nil && m.Ts != nil { + return *m.Ts + } + return 0 +} + +type InternalHeader struct { + Qos *string `protobuf:"bytes,1,opt,name=qos" json:"qos,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *InternalHeader) Reset() { *m = InternalHeader{} } +func (m *InternalHeader) String() string { return proto.CompactTextString(m) } +func (*InternalHeader) ProtoMessage() {} +func (*InternalHeader) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{13} +} +func (m *InternalHeader) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_InternalHeader.Unmarshal(m, b) +} +func (m *InternalHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_InternalHeader.Marshal(b, m, deterministic) +} +func (dst *InternalHeader) XXX_Merge(src proto.Message) { + xxx_messageInfo_InternalHeader.Merge(dst, src) +} +func (m *InternalHeader) XXX_Size() int { + return xxx_messageInfo_InternalHeader.Size(m) +} +func (m *InternalHeader) XXX_DiscardUnknown() { + xxx_messageInfo_InternalHeader.DiscardUnknown(m) +} + +var xxx_messageInfo_InternalHeader proto.InternalMessageInfo + +func (m *InternalHeader) GetQos() string { + if m != nil && m.Qos != nil { + return *m.Qos + } + return "" +} + +type Transaction struct { + Header *InternalHeader `protobuf:"bytes,4,opt,name=header" json:"header,omitempty"` + Handle *uint64 `protobuf:"fixed64,1,req,name=handle" json:"handle,omitempty"` + App *string `protobuf:"bytes,2,req,name=app" json:"app,omitempty"` + MarkChanges *bool `protobuf:"varint,3,opt,name=mark_changes,json=markChanges,def=0" json:"mark_changes,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Transaction) Reset() { *m = Transaction{} } +func (m *Transaction) String() string { return proto.CompactTextString(m) } +func (*Transaction) ProtoMessage() {} +func (*Transaction) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{14} +} +func (m *Transaction) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Transaction.Unmarshal(m, b) +} +func (m *Transaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Transaction.Marshal(b, m, deterministic) +} +func (dst *Transaction) XXX_Merge(src proto.Message) { + xxx_messageInfo_Transaction.Merge(dst, src) +} +func (m *Transaction) XXX_Size() int { + return xxx_messageInfo_Transaction.Size(m) +} +func (m *Transaction) XXX_DiscardUnknown() { + xxx_messageInfo_Transaction.DiscardUnknown(m) +} + +var xxx_messageInfo_Transaction proto.InternalMessageInfo + +const Default_Transaction_MarkChanges bool = false + +func (m *Transaction) GetHeader() *InternalHeader { + if m != nil { + return m.Header + } + return nil +} + +func (m *Transaction) GetHandle() uint64 { + if m != nil && m.Handle != nil { + return *m.Handle + } + return 0 +} + +func (m *Transaction) GetApp() string { + if m != nil && m.App != nil { + return *m.App + } + return "" +} + +func (m *Transaction) GetMarkChanges() bool { + if m != nil && m.MarkChanges != nil { + return *m.MarkChanges + } + return Default_Transaction_MarkChanges +} + +type Query struct { + Header *InternalHeader `protobuf:"bytes,39,opt,name=header" json:"header,omitempty"` + App *string `protobuf:"bytes,1,req,name=app" json:"app,omitempty"` + NameSpace *string `protobuf:"bytes,29,opt,name=name_space,json=nameSpace" json:"name_space,omitempty"` + Kind *string `protobuf:"bytes,3,opt,name=kind" json:"kind,omitempty"` + Ancestor *Reference `protobuf:"bytes,17,opt,name=ancestor" json:"ancestor,omitempty"` + Filter []*Query_Filter `protobuf:"group,4,rep,name=Filter,json=filter" json:"filter,omitempty"` + SearchQuery *string `protobuf:"bytes,8,opt,name=search_query,json=searchQuery" json:"search_query,omitempty"` + Order []*Query_Order `protobuf:"group,9,rep,name=Order,json=order" json:"order,omitempty"` + Hint *Query_Hint `protobuf:"varint,18,opt,name=hint,enum=appengine.Query_Hint" json:"hint,omitempty"` + Count *int32 `protobuf:"varint,23,opt,name=count" json:"count,omitempty"` + Offset *int32 `protobuf:"varint,12,opt,name=offset,def=0" json:"offset,omitempty"` + Limit *int32 `protobuf:"varint,16,opt,name=limit" json:"limit,omitempty"` + CompiledCursor *CompiledCursor `protobuf:"bytes,30,opt,name=compiled_cursor,json=compiledCursor" json:"compiled_cursor,omitempty"` + EndCompiledCursor *CompiledCursor `protobuf:"bytes,31,opt,name=end_compiled_cursor,json=endCompiledCursor" json:"end_compiled_cursor,omitempty"` + CompositeIndex []*CompositeIndex `protobuf:"bytes,19,rep,name=composite_index,json=compositeIndex" json:"composite_index,omitempty"` + RequirePerfectPlan *bool `protobuf:"varint,20,opt,name=require_perfect_plan,json=requirePerfectPlan,def=0" json:"require_perfect_plan,omitempty"` + KeysOnly *bool `protobuf:"varint,21,opt,name=keys_only,json=keysOnly,def=0" json:"keys_only,omitempty"` + Transaction *Transaction `protobuf:"bytes,22,opt,name=transaction" json:"transaction,omitempty"` + Compile *bool `protobuf:"varint,25,opt,name=compile,def=0" json:"compile,omitempty"` + FailoverMs *int64 `protobuf:"varint,26,opt,name=failover_ms,json=failoverMs" json:"failover_ms,omitempty"` + Strong *bool `protobuf:"varint,32,opt,name=strong" json:"strong,omitempty"` + PropertyName []string `protobuf:"bytes,33,rep,name=property_name,json=propertyName" json:"property_name,omitempty"` + GroupByPropertyName []string `protobuf:"bytes,34,rep,name=group_by_property_name,json=groupByPropertyName" json:"group_by_property_name,omitempty"` + Distinct *bool `protobuf:"varint,24,opt,name=distinct" json:"distinct,omitempty"` + MinSafeTimeSeconds *int64 `protobuf:"varint,35,opt,name=min_safe_time_seconds,json=minSafeTimeSeconds" json:"min_safe_time_seconds,omitempty"` + SafeReplicaName []string `protobuf:"bytes,36,rep,name=safe_replica_name,json=safeReplicaName" json:"safe_replica_name,omitempty"` + PersistOffset *bool `protobuf:"varint,37,opt,name=persist_offset,json=persistOffset,def=0" json:"persist_offset,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Query) Reset() { *m = Query{} } +func (m *Query) String() string { return proto.CompactTextString(m) } +func (*Query) ProtoMessage() {} +func (*Query) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{15} +} +func (m *Query) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Query.Unmarshal(m, b) +} +func (m *Query) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Query.Marshal(b, m, deterministic) +} +func (dst *Query) XXX_Merge(src proto.Message) { + xxx_messageInfo_Query.Merge(dst, src) +} +func (m *Query) XXX_Size() int { + return xxx_messageInfo_Query.Size(m) +} +func (m *Query) XXX_DiscardUnknown() { + xxx_messageInfo_Query.DiscardUnknown(m) +} + +var xxx_messageInfo_Query proto.InternalMessageInfo + +const Default_Query_Offset int32 = 0 +const Default_Query_RequirePerfectPlan bool = false +const Default_Query_KeysOnly bool = false +const Default_Query_Compile bool = false +const Default_Query_PersistOffset bool = false + +func (m *Query) GetHeader() *InternalHeader { + if m != nil { + return m.Header + } + return nil +} + +func (m *Query) GetApp() string { + if m != nil && m.App != nil { + return *m.App + } + return "" +} + +func (m *Query) GetNameSpace() string { + if m != nil && m.NameSpace != nil { + return *m.NameSpace + } + return "" +} + +func (m *Query) GetKind() string { + if m != nil && m.Kind != nil { + return *m.Kind + } + return "" +} + +func (m *Query) GetAncestor() *Reference { + if m != nil { + return m.Ancestor + } + return nil +} + +func (m *Query) GetFilter() []*Query_Filter { + if m != nil { + return m.Filter + } + return nil +} + +func (m *Query) GetSearchQuery() string { + if m != nil && m.SearchQuery != nil { + return *m.SearchQuery + } + return "" +} + +func (m *Query) GetOrder() []*Query_Order { + if m != nil { + return m.Order + } + return nil +} + +func (m *Query) GetHint() Query_Hint { + if m != nil && m.Hint != nil { + return *m.Hint + } + return Query_ORDER_FIRST +} + +func (m *Query) GetCount() int32 { + if m != nil && m.Count != nil { + return *m.Count + } + return 0 +} + +func (m *Query) GetOffset() int32 { + if m != nil && m.Offset != nil { + return *m.Offset + } + return Default_Query_Offset +} + +func (m *Query) GetLimit() int32 { + if m != nil && m.Limit != nil { + return *m.Limit + } + return 0 +} + +func (m *Query) GetCompiledCursor() *CompiledCursor { + if m != nil { + return m.CompiledCursor + } + return nil +} + +func (m *Query) GetEndCompiledCursor() *CompiledCursor { + if m != nil { + return m.EndCompiledCursor + } + return nil +} + +func (m *Query) GetCompositeIndex() []*CompositeIndex { + if m != nil { + return m.CompositeIndex + } + return nil +} + +func (m *Query) GetRequirePerfectPlan() bool { + if m != nil && m.RequirePerfectPlan != nil { + return *m.RequirePerfectPlan + } + return Default_Query_RequirePerfectPlan +} + +func (m *Query) GetKeysOnly() bool { + if m != nil && m.KeysOnly != nil { + return *m.KeysOnly + } + return Default_Query_KeysOnly +} + +func (m *Query) GetTransaction() *Transaction { + if m != nil { + return m.Transaction + } + return nil +} + +func (m *Query) GetCompile() bool { + if m != nil && m.Compile != nil { + return *m.Compile + } + return Default_Query_Compile +} + +func (m *Query) GetFailoverMs() int64 { + if m != nil && m.FailoverMs != nil { + return *m.FailoverMs + } + return 0 +} + +func (m *Query) GetStrong() bool { + if m != nil && m.Strong != nil { + return *m.Strong + } + return false +} + +func (m *Query) GetPropertyName() []string { + if m != nil { + return m.PropertyName + } + return nil +} + +func (m *Query) GetGroupByPropertyName() []string { + if m != nil { + return m.GroupByPropertyName + } + return nil +} + +func (m *Query) GetDistinct() bool { + if m != nil && m.Distinct != nil { + return *m.Distinct + } + return false +} + +func (m *Query) GetMinSafeTimeSeconds() int64 { + if m != nil && m.MinSafeTimeSeconds != nil { + return *m.MinSafeTimeSeconds + } + return 0 +} + +func (m *Query) GetSafeReplicaName() []string { + if m != nil { + return m.SafeReplicaName + } + return nil +} + +func (m *Query) GetPersistOffset() bool { + if m != nil && m.PersistOffset != nil { + return *m.PersistOffset + } + return Default_Query_PersistOffset +} + +type Query_Filter struct { + Op *Query_Filter_Operator `protobuf:"varint,6,req,name=op,enum=appengine.Query_Filter_Operator" json:"op,omitempty"` + Property []*Property `protobuf:"bytes,14,rep,name=property" json:"property,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Query_Filter) Reset() { *m = Query_Filter{} } +func (m *Query_Filter) String() string { return proto.CompactTextString(m) } +func (*Query_Filter) ProtoMessage() {} +func (*Query_Filter) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{15, 0} +} +func (m *Query_Filter) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Query_Filter.Unmarshal(m, b) +} +func (m *Query_Filter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Query_Filter.Marshal(b, m, deterministic) +} +func (dst *Query_Filter) XXX_Merge(src proto.Message) { + xxx_messageInfo_Query_Filter.Merge(dst, src) +} +func (m *Query_Filter) XXX_Size() int { + return xxx_messageInfo_Query_Filter.Size(m) +} +func (m *Query_Filter) XXX_DiscardUnknown() { + xxx_messageInfo_Query_Filter.DiscardUnknown(m) +} + +var xxx_messageInfo_Query_Filter proto.InternalMessageInfo + +func (m *Query_Filter) GetOp() Query_Filter_Operator { + if m != nil && m.Op != nil { + return *m.Op + } + return Query_Filter_LESS_THAN +} + +func (m *Query_Filter) GetProperty() []*Property { + if m != nil { + return m.Property + } + return nil +} + +type Query_Order struct { + Property *string `protobuf:"bytes,10,req,name=property" json:"property,omitempty"` + Direction *Query_Order_Direction `protobuf:"varint,11,opt,name=direction,enum=appengine.Query_Order_Direction,def=1" json:"direction,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Query_Order) Reset() { *m = Query_Order{} } +func (m *Query_Order) String() string { return proto.CompactTextString(m) } +func (*Query_Order) ProtoMessage() {} +func (*Query_Order) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{15, 1} +} +func (m *Query_Order) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Query_Order.Unmarshal(m, b) +} +func (m *Query_Order) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Query_Order.Marshal(b, m, deterministic) +} +func (dst *Query_Order) XXX_Merge(src proto.Message) { + xxx_messageInfo_Query_Order.Merge(dst, src) +} +func (m *Query_Order) XXX_Size() int { + return xxx_messageInfo_Query_Order.Size(m) +} +func (m *Query_Order) XXX_DiscardUnknown() { + xxx_messageInfo_Query_Order.DiscardUnknown(m) +} + +var xxx_messageInfo_Query_Order proto.InternalMessageInfo + +const Default_Query_Order_Direction Query_Order_Direction = Query_Order_ASCENDING + +func (m *Query_Order) GetProperty() string { + if m != nil && m.Property != nil { + return *m.Property + } + return "" +} + +func (m *Query_Order) GetDirection() Query_Order_Direction { + if m != nil && m.Direction != nil { + return *m.Direction + } + return Default_Query_Order_Direction +} + +type CompiledQuery struct { + Primaryscan *CompiledQuery_PrimaryScan `protobuf:"group,1,req,name=PrimaryScan,json=primaryscan" json:"primaryscan,omitempty"` + Mergejoinscan []*CompiledQuery_MergeJoinScan `protobuf:"group,7,rep,name=MergeJoinScan,json=mergejoinscan" json:"mergejoinscan,omitempty"` + IndexDef *Index `protobuf:"bytes,21,opt,name=index_def,json=indexDef" json:"index_def,omitempty"` + Offset *int32 `protobuf:"varint,10,opt,name=offset,def=0" json:"offset,omitempty"` + Limit *int32 `protobuf:"varint,11,opt,name=limit" json:"limit,omitempty"` + KeysOnly *bool `protobuf:"varint,12,req,name=keys_only,json=keysOnly" json:"keys_only,omitempty"` + PropertyName []string `protobuf:"bytes,24,rep,name=property_name,json=propertyName" json:"property_name,omitempty"` + DistinctInfixSize *int32 `protobuf:"varint,25,opt,name=distinct_infix_size,json=distinctInfixSize" json:"distinct_infix_size,omitempty"` + Entityfilter *CompiledQuery_EntityFilter `protobuf:"group,13,opt,name=EntityFilter,json=entityfilter" json:"entityfilter,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CompiledQuery) Reset() { *m = CompiledQuery{} } +func (m *CompiledQuery) String() string { return proto.CompactTextString(m) } +func (*CompiledQuery) ProtoMessage() {} +func (*CompiledQuery) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{16} +} +func (m *CompiledQuery) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CompiledQuery.Unmarshal(m, b) +} +func (m *CompiledQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CompiledQuery.Marshal(b, m, deterministic) +} +func (dst *CompiledQuery) XXX_Merge(src proto.Message) { + xxx_messageInfo_CompiledQuery.Merge(dst, src) +} +func (m *CompiledQuery) XXX_Size() int { + return xxx_messageInfo_CompiledQuery.Size(m) +} +func (m *CompiledQuery) XXX_DiscardUnknown() { + xxx_messageInfo_CompiledQuery.DiscardUnknown(m) +} + +var xxx_messageInfo_CompiledQuery proto.InternalMessageInfo + +const Default_CompiledQuery_Offset int32 = 0 + +func (m *CompiledQuery) GetPrimaryscan() *CompiledQuery_PrimaryScan { + if m != nil { + return m.Primaryscan + } + return nil +} + +func (m *CompiledQuery) GetMergejoinscan() []*CompiledQuery_MergeJoinScan { + if m != nil { + return m.Mergejoinscan + } + return nil +} + +func (m *CompiledQuery) GetIndexDef() *Index { + if m != nil { + return m.IndexDef + } + return nil +} + +func (m *CompiledQuery) GetOffset() int32 { + if m != nil && m.Offset != nil { + return *m.Offset + } + return Default_CompiledQuery_Offset +} + +func (m *CompiledQuery) GetLimit() int32 { + if m != nil && m.Limit != nil { + return *m.Limit + } + return 0 +} + +func (m *CompiledQuery) GetKeysOnly() bool { + if m != nil && m.KeysOnly != nil { + return *m.KeysOnly + } + return false +} + +func (m *CompiledQuery) GetPropertyName() []string { + if m != nil { + return m.PropertyName + } + return nil +} + +func (m *CompiledQuery) GetDistinctInfixSize() int32 { + if m != nil && m.DistinctInfixSize != nil { + return *m.DistinctInfixSize + } + return 0 +} + +func (m *CompiledQuery) GetEntityfilter() *CompiledQuery_EntityFilter { + if m != nil { + return m.Entityfilter + } + return nil +} + +type CompiledQuery_PrimaryScan struct { + IndexName *string `protobuf:"bytes,2,opt,name=index_name,json=indexName" json:"index_name,omitempty"` + StartKey *string `protobuf:"bytes,3,opt,name=start_key,json=startKey" json:"start_key,omitempty"` + StartInclusive *bool `protobuf:"varint,4,opt,name=start_inclusive,json=startInclusive" json:"start_inclusive,omitempty"` + EndKey *string `protobuf:"bytes,5,opt,name=end_key,json=endKey" json:"end_key,omitempty"` + EndInclusive *bool `protobuf:"varint,6,opt,name=end_inclusive,json=endInclusive" json:"end_inclusive,omitempty"` + StartPostfixValue []string `protobuf:"bytes,22,rep,name=start_postfix_value,json=startPostfixValue" json:"start_postfix_value,omitempty"` + EndPostfixValue []string `protobuf:"bytes,23,rep,name=end_postfix_value,json=endPostfixValue" json:"end_postfix_value,omitempty"` + EndUnappliedLogTimestampUs *int64 `protobuf:"varint,19,opt,name=end_unapplied_log_timestamp_us,json=endUnappliedLogTimestampUs" json:"end_unapplied_log_timestamp_us,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CompiledQuery_PrimaryScan) Reset() { *m = CompiledQuery_PrimaryScan{} } +func (m *CompiledQuery_PrimaryScan) String() string { return proto.CompactTextString(m) } +func (*CompiledQuery_PrimaryScan) ProtoMessage() {} +func (*CompiledQuery_PrimaryScan) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{16, 0} +} +func (m *CompiledQuery_PrimaryScan) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CompiledQuery_PrimaryScan.Unmarshal(m, b) +} +func (m *CompiledQuery_PrimaryScan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CompiledQuery_PrimaryScan.Marshal(b, m, deterministic) +} +func (dst *CompiledQuery_PrimaryScan) XXX_Merge(src proto.Message) { + xxx_messageInfo_CompiledQuery_PrimaryScan.Merge(dst, src) +} +func (m *CompiledQuery_PrimaryScan) XXX_Size() int { + return xxx_messageInfo_CompiledQuery_PrimaryScan.Size(m) +} +func (m *CompiledQuery_PrimaryScan) XXX_DiscardUnknown() { + xxx_messageInfo_CompiledQuery_PrimaryScan.DiscardUnknown(m) +} + +var xxx_messageInfo_CompiledQuery_PrimaryScan proto.InternalMessageInfo + +func (m *CompiledQuery_PrimaryScan) GetIndexName() string { + if m != nil && m.IndexName != nil { + return *m.IndexName + } + return "" +} + +func (m *CompiledQuery_PrimaryScan) GetStartKey() string { + if m != nil && m.StartKey != nil { + return *m.StartKey + } + return "" +} + +func (m *CompiledQuery_PrimaryScan) GetStartInclusive() bool { + if m != nil && m.StartInclusive != nil { + return *m.StartInclusive + } + return false +} + +func (m *CompiledQuery_PrimaryScan) GetEndKey() string { + if m != nil && m.EndKey != nil { + return *m.EndKey + } + return "" +} + +func (m *CompiledQuery_PrimaryScan) GetEndInclusive() bool { + if m != nil && m.EndInclusive != nil { + return *m.EndInclusive + } + return false +} + +func (m *CompiledQuery_PrimaryScan) GetStartPostfixValue() []string { + if m != nil { + return m.StartPostfixValue + } + return nil +} + +func (m *CompiledQuery_PrimaryScan) GetEndPostfixValue() []string { + if m != nil { + return m.EndPostfixValue + } + return nil +} + +func (m *CompiledQuery_PrimaryScan) GetEndUnappliedLogTimestampUs() int64 { + if m != nil && m.EndUnappliedLogTimestampUs != nil { + return *m.EndUnappliedLogTimestampUs + } + return 0 +} + +type CompiledQuery_MergeJoinScan struct { + IndexName *string `protobuf:"bytes,8,req,name=index_name,json=indexName" json:"index_name,omitempty"` + PrefixValue []string `protobuf:"bytes,9,rep,name=prefix_value,json=prefixValue" json:"prefix_value,omitempty"` + ValuePrefix *bool `protobuf:"varint,20,opt,name=value_prefix,json=valuePrefix,def=0" json:"value_prefix,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CompiledQuery_MergeJoinScan) Reset() { *m = CompiledQuery_MergeJoinScan{} } +func (m *CompiledQuery_MergeJoinScan) String() string { return proto.CompactTextString(m) } +func (*CompiledQuery_MergeJoinScan) ProtoMessage() {} +func (*CompiledQuery_MergeJoinScan) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{16, 1} +} +func (m *CompiledQuery_MergeJoinScan) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CompiledQuery_MergeJoinScan.Unmarshal(m, b) +} +func (m *CompiledQuery_MergeJoinScan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CompiledQuery_MergeJoinScan.Marshal(b, m, deterministic) +} +func (dst *CompiledQuery_MergeJoinScan) XXX_Merge(src proto.Message) { + xxx_messageInfo_CompiledQuery_MergeJoinScan.Merge(dst, src) +} +func (m *CompiledQuery_MergeJoinScan) XXX_Size() int { + return xxx_messageInfo_CompiledQuery_MergeJoinScan.Size(m) +} +func (m *CompiledQuery_MergeJoinScan) XXX_DiscardUnknown() { + xxx_messageInfo_CompiledQuery_MergeJoinScan.DiscardUnknown(m) +} + +var xxx_messageInfo_CompiledQuery_MergeJoinScan proto.InternalMessageInfo + +const Default_CompiledQuery_MergeJoinScan_ValuePrefix bool = false + +func (m *CompiledQuery_MergeJoinScan) GetIndexName() string { + if m != nil && m.IndexName != nil { + return *m.IndexName + } + return "" +} + +func (m *CompiledQuery_MergeJoinScan) GetPrefixValue() []string { + if m != nil { + return m.PrefixValue + } + return nil +} + +func (m *CompiledQuery_MergeJoinScan) GetValuePrefix() bool { + if m != nil && m.ValuePrefix != nil { + return *m.ValuePrefix + } + return Default_CompiledQuery_MergeJoinScan_ValuePrefix +} + +type CompiledQuery_EntityFilter struct { + Distinct *bool `protobuf:"varint,14,opt,name=distinct,def=0" json:"distinct,omitempty"` + Kind *string `protobuf:"bytes,17,opt,name=kind" json:"kind,omitempty"` + Ancestor *Reference `protobuf:"bytes,18,opt,name=ancestor" json:"ancestor,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CompiledQuery_EntityFilter) Reset() { *m = CompiledQuery_EntityFilter{} } +func (m *CompiledQuery_EntityFilter) String() string { return proto.CompactTextString(m) } +func (*CompiledQuery_EntityFilter) ProtoMessage() {} +func (*CompiledQuery_EntityFilter) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{16, 2} +} +func (m *CompiledQuery_EntityFilter) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CompiledQuery_EntityFilter.Unmarshal(m, b) +} +func (m *CompiledQuery_EntityFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CompiledQuery_EntityFilter.Marshal(b, m, deterministic) +} +func (dst *CompiledQuery_EntityFilter) XXX_Merge(src proto.Message) { + xxx_messageInfo_CompiledQuery_EntityFilter.Merge(dst, src) +} +func (m *CompiledQuery_EntityFilter) XXX_Size() int { + return xxx_messageInfo_CompiledQuery_EntityFilter.Size(m) +} +func (m *CompiledQuery_EntityFilter) XXX_DiscardUnknown() { + xxx_messageInfo_CompiledQuery_EntityFilter.DiscardUnknown(m) +} + +var xxx_messageInfo_CompiledQuery_EntityFilter proto.InternalMessageInfo + +const Default_CompiledQuery_EntityFilter_Distinct bool = false + +func (m *CompiledQuery_EntityFilter) GetDistinct() bool { + if m != nil && m.Distinct != nil { + return *m.Distinct + } + return Default_CompiledQuery_EntityFilter_Distinct +} + +func (m *CompiledQuery_EntityFilter) GetKind() string { + if m != nil && m.Kind != nil { + return *m.Kind + } + return "" +} + +func (m *CompiledQuery_EntityFilter) GetAncestor() *Reference { + if m != nil { + return m.Ancestor + } + return nil +} + +type CompiledCursor struct { + Position *CompiledCursor_Position `protobuf:"group,2,opt,name=Position,json=position" json:"position,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CompiledCursor) Reset() { *m = CompiledCursor{} } +func (m *CompiledCursor) String() string { return proto.CompactTextString(m) } +func (*CompiledCursor) ProtoMessage() {} +func (*CompiledCursor) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{17} +} +func (m *CompiledCursor) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CompiledCursor.Unmarshal(m, b) +} +func (m *CompiledCursor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CompiledCursor.Marshal(b, m, deterministic) +} +func (dst *CompiledCursor) XXX_Merge(src proto.Message) { + xxx_messageInfo_CompiledCursor.Merge(dst, src) +} +func (m *CompiledCursor) XXX_Size() int { + return xxx_messageInfo_CompiledCursor.Size(m) +} +func (m *CompiledCursor) XXX_DiscardUnknown() { + xxx_messageInfo_CompiledCursor.DiscardUnknown(m) +} + +var xxx_messageInfo_CompiledCursor proto.InternalMessageInfo + +func (m *CompiledCursor) GetPosition() *CompiledCursor_Position { + if m != nil { + return m.Position + } + return nil +} + +type CompiledCursor_Position struct { + StartKey *string `protobuf:"bytes,27,opt,name=start_key,json=startKey" json:"start_key,omitempty"` + Indexvalue []*CompiledCursor_Position_IndexValue `protobuf:"group,29,rep,name=IndexValue,json=indexvalue" json:"indexvalue,omitempty"` + Key *Reference `protobuf:"bytes,32,opt,name=key" json:"key,omitempty"` + StartInclusive *bool `protobuf:"varint,28,opt,name=start_inclusive,json=startInclusive,def=1" json:"start_inclusive,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CompiledCursor_Position) Reset() { *m = CompiledCursor_Position{} } +func (m *CompiledCursor_Position) String() string { return proto.CompactTextString(m) } +func (*CompiledCursor_Position) ProtoMessage() {} +func (*CompiledCursor_Position) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{17, 0} +} +func (m *CompiledCursor_Position) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CompiledCursor_Position.Unmarshal(m, b) +} +func (m *CompiledCursor_Position) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CompiledCursor_Position.Marshal(b, m, deterministic) +} +func (dst *CompiledCursor_Position) XXX_Merge(src proto.Message) { + xxx_messageInfo_CompiledCursor_Position.Merge(dst, src) +} +func (m *CompiledCursor_Position) XXX_Size() int { + return xxx_messageInfo_CompiledCursor_Position.Size(m) +} +func (m *CompiledCursor_Position) XXX_DiscardUnknown() { + xxx_messageInfo_CompiledCursor_Position.DiscardUnknown(m) +} + +var xxx_messageInfo_CompiledCursor_Position proto.InternalMessageInfo + +const Default_CompiledCursor_Position_StartInclusive bool = true + +func (m *CompiledCursor_Position) GetStartKey() string { + if m != nil && m.StartKey != nil { + return *m.StartKey + } + return "" +} + +func (m *CompiledCursor_Position) GetIndexvalue() []*CompiledCursor_Position_IndexValue { + if m != nil { + return m.Indexvalue + } + return nil +} + +func (m *CompiledCursor_Position) GetKey() *Reference { + if m != nil { + return m.Key + } + return nil +} + +func (m *CompiledCursor_Position) GetStartInclusive() bool { + if m != nil && m.StartInclusive != nil { + return *m.StartInclusive + } + return Default_CompiledCursor_Position_StartInclusive +} + +type CompiledCursor_Position_IndexValue struct { + Property *string `protobuf:"bytes,30,opt,name=property" json:"property,omitempty"` + Value *PropertyValue `protobuf:"bytes,31,req,name=value" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CompiledCursor_Position_IndexValue) Reset() { *m = CompiledCursor_Position_IndexValue{} } +func (m *CompiledCursor_Position_IndexValue) String() string { return proto.CompactTextString(m) } +func (*CompiledCursor_Position_IndexValue) ProtoMessage() {} +func (*CompiledCursor_Position_IndexValue) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{17, 0, 0} +} +func (m *CompiledCursor_Position_IndexValue) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CompiledCursor_Position_IndexValue.Unmarshal(m, b) +} +func (m *CompiledCursor_Position_IndexValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CompiledCursor_Position_IndexValue.Marshal(b, m, deterministic) +} +func (dst *CompiledCursor_Position_IndexValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_CompiledCursor_Position_IndexValue.Merge(dst, src) +} +func (m *CompiledCursor_Position_IndexValue) XXX_Size() int { + return xxx_messageInfo_CompiledCursor_Position_IndexValue.Size(m) +} +func (m *CompiledCursor_Position_IndexValue) XXX_DiscardUnknown() { + xxx_messageInfo_CompiledCursor_Position_IndexValue.DiscardUnknown(m) +} + +var xxx_messageInfo_CompiledCursor_Position_IndexValue proto.InternalMessageInfo + +func (m *CompiledCursor_Position_IndexValue) GetProperty() string { + if m != nil && m.Property != nil { + return *m.Property + } + return "" +} + +func (m *CompiledCursor_Position_IndexValue) GetValue() *PropertyValue { + if m != nil { + return m.Value + } + return nil +} + +type Cursor struct { + Cursor *uint64 `protobuf:"fixed64,1,req,name=cursor" json:"cursor,omitempty"` + App *string `protobuf:"bytes,2,opt,name=app" json:"app,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Cursor) Reset() { *m = Cursor{} } +func (m *Cursor) String() string { return proto.CompactTextString(m) } +func (*Cursor) ProtoMessage() {} +func (*Cursor) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{18} +} +func (m *Cursor) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Cursor.Unmarshal(m, b) +} +func (m *Cursor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Cursor.Marshal(b, m, deterministic) +} +func (dst *Cursor) XXX_Merge(src proto.Message) { + xxx_messageInfo_Cursor.Merge(dst, src) +} +func (m *Cursor) XXX_Size() int { + return xxx_messageInfo_Cursor.Size(m) +} +func (m *Cursor) XXX_DiscardUnknown() { + xxx_messageInfo_Cursor.DiscardUnknown(m) +} + +var xxx_messageInfo_Cursor proto.InternalMessageInfo + +func (m *Cursor) GetCursor() uint64 { + if m != nil && m.Cursor != nil { + return *m.Cursor + } + return 0 +} + +func (m *Cursor) GetApp() string { + if m != nil && m.App != nil { + return *m.App + } + return "" +} + +type Error struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Error) Reset() { *m = Error{} } +func (m *Error) String() string { return proto.CompactTextString(m) } +func (*Error) ProtoMessage() {} +func (*Error) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{19} +} +func (m *Error) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Error.Unmarshal(m, b) +} +func (m *Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Error.Marshal(b, m, deterministic) +} +func (dst *Error) XXX_Merge(src proto.Message) { + xxx_messageInfo_Error.Merge(dst, src) +} +func (m *Error) XXX_Size() int { + return xxx_messageInfo_Error.Size(m) +} +func (m *Error) XXX_DiscardUnknown() { + xxx_messageInfo_Error.DiscardUnknown(m) +} + +var xxx_messageInfo_Error proto.InternalMessageInfo + +type Cost struct { + IndexWrites *int32 `protobuf:"varint,1,opt,name=index_writes,json=indexWrites" json:"index_writes,omitempty"` + IndexWriteBytes *int32 `protobuf:"varint,2,opt,name=index_write_bytes,json=indexWriteBytes" json:"index_write_bytes,omitempty"` + EntityWrites *int32 `protobuf:"varint,3,opt,name=entity_writes,json=entityWrites" json:"entity_writes,omitempty"` + EntityWriteBytes *int32 `protobuf:"varint,4,opt,name=entity_write_bytes,json=entityWriteBytes" json:"entity_write_bytes,omitempty"` + Commitcost *Cost_CommitCost `protobuf:"group,5,opt,name=CommitCost,json=commitcost" json:"commitcost,omitempty"` + ApproximateStorageDelta *int32 `protobuf:"varint,8,opt,name=approximate_storage_delta,json=approximateStorageDelta" json:"approximate_storage_delta,omitempty"` + IdSequenceUpdates *int32 `protobuf:"varint,9,opt,name=id_sequence_updates,json=idSequenceUpdates" json:"id_sequence_updates,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Cost) Reset() { *m = Cost{} } +func (m *Cost) String() string { return proto.CompactTextString(m) } +func (*Cost) ProtoMessage() {} +func (*Cost) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{20} +} +func (m *Cost) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Cost.Unmarshal(m, b) +} +func (m *Cost) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Cost.Marshal(b, m, deterministic) +} +func (dst *Cost) XXX_Merge(src proto.Message) { + xxx_messageInfo_Cost.Merge(dst, src) +} +func (m *Cost) XXX_Size() int { + return xxx_messageInfo_Cost.Size(m) +} +func (m *Cost) XXX_DiscardUnknown() { + xxx_messageInfo_Cost.DiscardUnknown(m) +} + +var xxx_messageInfo_Cost proto.InternalMessageInfo + +func (m *Cost) GetIndexWrites() int32 { + if m != nil && m.IndexWrites != nil { + return *m.IndexWrites + } + return 0 +} + +func (m *Cost) GetIndexWriteBytes() int32 { + if m != nil && m.IndexWriteBytes != nil { + return *m.IndexWriteBytes + } + return 0 +} + +func (m *Cost) GetEntityWrites() int32 { + if m != nil && m.EntityWrites != nil { + return *m.EntityWrites + } + return 0 +} + +func (m *Cost) GetEntityWriteBytes() int32 { + if m != nil && m.EntityWriteBytes != nil { + return *m.EntityWriteBytes + } + return 0 +} + +func (m *Cost) GetCommitcost() *Cost_CommitCost { + if m != nil { + return m.Commitcost + } + return nil +} + +func (m *Cost) GetApproximateStorageDelta() int32 { + if m != nil && m.ApproximateStorageDelta != nil { + return *m.ApproximateStorageDelta + } + return 0 +} + +func (m *Cost) GetIdSequenceUpdates() int32 { + if m != nil && m.IdSequenceUpdates != nil { + return *m.IdSequenceUpdates + } + return 0 +} + +type Cost_CommitCost struct { + RequestedEntityPuts *int32 `protobuf:"varint,6,opt,name=requested_entity_puts,json=requestedEntityPuts" json:"requested_entity_puts,omitempty"` + RequestedEntityDeletes *int32 `protobuf:"varint,7,opt,name=requested_entity_deletes,json=requestedEntityDeletes" json:"requested_entity_deletes,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Cost_CommitCost) Reset() { *m = Cost_CommitCost{} } +func (m *Cost_CommitCost) String() string { return proto.CompactTextString(m) } +func (*Cost_CommitCost) ProtoMessage() {} +func (*Cost_CommitCost) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{20, 0} +} +func (m *Cost_CommitCost) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Cost_CommitCost.Unmarshal(m, b) +} +func (m *Cost_CommitCost) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Cost_CommitCost.Marshal(b, m, deterministic) +} +func (dst *Cost_CommitCost) XXX_Merge(src proto.Message) { + xxx_messageInfo_Cost_CommitCost.Merge(dst, src) +} +func (m *Cost_CommitCost) XXX_Size() int { + return xxx_messageInfo_Cost_CommitCost.Size(m) +} +func (m *Cost_CommitCost) XXX_DiscardUnknown() { + xxx_messageInfo_Cost_CommitCost.DiscardUnknown(m) +} + +var xxx_messageInfo_Cost_CommitCost proto.InternalMessageInfo + +func (m *Cost_CommitCost) GetRequestedEntityPuts() int32 { + if m != nil && m.RequestedEntityPuts != nil { + return *m.RequestedEntityPuts + } + return 0 +} + +func (m *Cost_CommitCost) GetRequestedEntityDeletes() int32 { + if m != nil && m.RequestedEntityDeletes != nil { + return *m.RequestedEntityDeletes + } + return 0 +} + +type GetRequest struct { + Header *InternalHeader `protobuf:"bytes,6,opt,name=header" json:"header,omitempty"` + Key []*Reference `protobuf:"bytes,1,rep,name=key" json:"key,omitempty"` + Transaction *Transaction `protobuf:"bytes,2,opt,name=transaction" json:"transaction,omitempty"` + FailoverMs *int64 `protobuf:"varint,3,opt,name=failover_ms,json=failoverMs" json:"failover_ms,omitempty"` + Strong *bool `protobuf:"varint,4,opt,name=strong" json:"strong,omitempty"` + AllowDeferred *bool `protobuf:"varint,5,opt,name=allow_deferred,json=allowDeferred,def=0" json:"allow_deferred,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetRequest) Reset() { *m = GetRequest{} } +func (m *GetRequest) String() string { return proto.CompactTextString(m) } +func (*GetRequest) ProtoMessage() {} +func (*GetRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{21} +} +func (m *GetRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetRequest.Unmarshal(m, b) +} +func (m *GetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetRequest.Marshal(b, m, deterministic) +} +func (dst *GetRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetRequest.Merge(dst, src) +} +func (m *GetRequest) XXX_Size() int { + return xxx_messageInfo_GetRequest.Size(m) +} +func (m *GetRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetRequest proto.InternalMessageInfo + +const Default_GetRequest_AllowDeferred bool = false + +func (m *GetRequest) GetHeader() *InternalHeader { + if m != nil { + return m.Header + } + return nil +} + +func (m *GetRequest) GetKey() []*Reference { + if m != nil { + return m.Key + } + return nil +} + +func (m *GetRequest) GetTransaction() *Transaction { + if m != nil { + return m.Transaction + } + return nil +} + +func (m *GetRequest) GetFailoverMs() int64 { + if m != nil && m.FailoverMs != nil { + return *m.FailoverMs + } + return 0 +} + +func (m *GetRequest) GetStrong() bool { + if m != nil && m.Strong != nil { + return *m.Strong + } + return false +} + +func (m *GetRequest) GetAllowDeferred() bool { + if m != nil && m.AllowDeferred != nil { + return *m.AllowDeferred + } + return Default_GetRequest_AllowDeferred +} + +type GetResponse struct { + Entity []*GetResponse_Entity `protobuf:"group,1,rep,name=Entity,json=entity" json:"entity,omitempty"` + Deferred []*Reference `protobuf:"bytes,5,rep,name=deferred" json:"deferred,omitempty"` + InOrder *bool `protobuf:"varint,6,opt,name=in_order,json=inOrder,def=1" json:"in_order,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetResponse) Reset() { *m = GetResponse{} } +func (m *GetResponse) String() string { return proto.CompactTextString(m) } +func (*GetResponse) ProtoMessage() {} +func (*GetResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{22} +} +func (m *GetResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetResponse.Unmarshal(m, b) +} +func (m *GetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetResponse.Marshal(b, m, deterministic) +} +func (dst *GetResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetResponse.Merge(dst, src) +} +func (m *GetResponse) XXX_Size() int { + return xxx_messageInfo_GetResponse.Size(m) +} +func (m *GetResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetResponse proto.InternalMessageInfo + +const Default_GetResponse_InOrder bool = true + +func (m *GetResponse) GetEntity() []*GetResponse_Entity { + if m != nil { + return m.Entity + } + return nil +} + +func (m *GetResponse) GetDeferred() []*Reference { + if m != nil { + return m.Deferred + } + return nil +} + +func (m *GetResponse) GetInOrder() bool { + if m != nil && m.InOrder != nil { + return *m.InOrder + } + return Default_GetResponse_InOrder +} + +type GetResponse_Entity struct { + Entity *EntityProto `protobuf:"bytes,2,opt,name=entity" json:"entity,omitempty"` + Key *Reference `protobuf:"bytes,4,opt,name=key" json:"key,omitempty"` + Version *int64 `protobuf:"varint,3,opt,name=version" json:"version,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetResponse_Entity) Reset() { *m = GetResponse_Entity{} } +func (m *GetResponse_Entity) String() string { return proto.CompactTextString(m) } +func (*GetResponse_Entity) ProtoMessage() {} +func (*GetResponse_Entity) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{22, 0} +} +func (m *GetResponse_Entity) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetResponse_Entity.Unmarshal(m, b) +} +func (m *GetResponse_Entity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetResponse_Entity.Marshal(b, m, deterministic) +} +func (dst *GetResponse_Entity) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetResponse_Entity.Merge(dst, src) +} +func (m *GetResponse_Entity) XXX_Size() int { + return xxx_messageInfo_GetResponse_Entity.Size(m) +} +func (m *GetResponse_Entity) XXX_DiscardUnknown() { + xxx_messageInfo_GetResponse_Entity.DiscardUnknown(m) +} + +var xxx_messageInfo_GetResponse_Entity proto.InternalMessageInfo + +func (m *GetResponse_Entity) GetEntity() *EntityProto { + if m != nil { + return m.Entity + } + return nil +} + +func (m *GetResponse_Entity) GetKey() *Reference { + if m != nil { + return m.Key + } + return nil +} + +func (m *GetResponse_Entity) GetVersion() int64 { + if m != nil && m.Version != nil { + return *m.Version + } + return 0 +} + +type PutRequest struct { + Header *InternalHeader `protobuf:"bytes,11,opt,name=header" json:"header,omitempty"` + Entity []*EntityProto `protobuf:"bytes,1,rep,name=entity" json:"entity,omitempty"` + Transaction *Transaction `protobuf:"bytes,2,opt,name=transaction" json:"transaction,omitempty"` + CompositeIndex []*CompositeIndex `protobuf:"bytes,3,rep,name=composite_index,json=compositeIndex" json:"composite_index,omitempty"` + Trusted *bool `protobuf:"varint,4,opt,name=trusted,def=0" json:"trusted,omitempty"` + Force *bool `protobuf:"varint,7,opt,name=force,def=0" json:"force,omitempty"` + MarkChanges *bool `protobuf:"varint,8,opt,name=mark_changes,json=markChanges,def=0" json:"mark_changes,omitempty"` + Snapshot []*Snapshot `protobuf:"bytes,9,rep,name=snapshot" json:"snapshot,omitempty"` + AutoIdPolicy *PutRequest_AutoIdPolicy `protobuf:"varint,10,opt,name=auto_id_policy,json=autoIdPolicy,enum=appengine.PutRequest_AutoIdPolicy,def=0" json:"auto_id_policy,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PutRequest) Reset() { *m = PutRequest{} } +func (m *PutRequest) String() string { return proto.CompactTextString(m) } +func (*PutRequest) ProtoMessage() {} +func (*PutRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{23} +} +func (m *PutRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PutRequest.Unmarshal(m, b) +} +func (m *PutRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PutRequest.Marshal(b, m, deterministic) +} +func (dst *PutRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_PutRequest.Merge(dst, src) +} +func (m *PutRequest) XXX_Size() int { + return xxx_messageInfo_PutRequest.Size(m) +} +func (m *PutRequest) XXX_DiscardUnknown() { + xxx_messageInfo_PutRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_PutRequest proto.InternalMessageInfo + +const Default_PutRequest_Trusted bool = false +const Default_PutRequest_Force bool = false +const Default_PutRequest_MarkChanges bool = false +const Default_PutRequest_AutoIdPolicy PutRequest_AutoIdPolicy = PutRequest_CURRENT + +func (m *PutRequest) GetHeader() *InternalHeader { + if m != nil { + return m.Header + } + return nil +} + +func (m *PutRequest) GetEntity() []*EntityProto { + if m != nil { + return m.Entity + } + return nil +} + +func (m *PutRequest) GetTransaction() *Transaction { + if m != nil { + return m.Transaction + } + return nil +} + +func (m *PutRequest) GetCompositeIndex() []*CompositeIndex { + if m != nil { + return m.CompositeIndex + } + return nil +} + +func (m *PutRequest) GetTrusted() bool { + if m != nil && m.Trusted != nil { + return *m.Trusted + } + return Default_PutRequest_Trusted +} + +func (m *PutRequest) GetForce() bool { + if m != nil && m.Force != nil { + return *m.Force + } + return Default_PutRequest_Force +} + +func (m *PutRequest) GetMarkChanges() bool { + if m != nil && m.MarkChanges != nil { + return *m.MarkChanges + } + return Default_PutRequest_MarkChanges +} + +func (m *PutRequest) GetSnapshot() []*Snapshot { + if m != nil { + return m.Snapshot + } + return nil +} + +func (m *PutRequest) GetAutoIdPolicy() PutRequest_AutoIdPolicy { + if m != nil && m.AutoIdPolicy != nil { + return *m.AutoIdPolicy + } + return Default_PutRequest_AutoIdPolicy +} + +type PutResponse struct { + Key []*Reference `protobuf:"bytes,1,rep,name=key" json:"key,omitempty"` + Cost *Cost `protobuf:"bytes,2,opt,name=cost" json:"cost,omitempty"` + Version []int64 `protobuf:"varint,3,rep,name=version" json:"version,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PutResponse) Reset() { *m = PutResponse{} } +func (m *PutResponse) String() string { return proto.CompactTextString(m) } +func (*PutResponse) ProtoMessage() {} +func (*PutResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{24} +} +func (m *PutResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PutResponse.Unmarshal(m, b) +} +func (m *PutResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PutResponse.Marshal(b, m, deterministic) +} +func (dst *PutResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_PutResponse.Merge(dst, src) +} +func (m *PutResponse) XXX_Size() int { + return xxx_messageInfo_PutResponse.Size(m) +} +func (m *PutResponse) XXX_DiscardUnknown() { + xxx_messageInfo_PutResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_PutResponse proto.InternalMessageInfo + +func (m *PutResponse) GetKey() []*Reference { + if m != nil { + return m.Key + } + return nil +} + +func (m *PutResponse) GetCost() *Cost { + if m != nil { + return m.Cost + } + return nil +} + +func (m *PutResponse) GetVersion() []int64 { + if m != nil { + return m.Version + } + return nil +} + +type TouchRequest struct { + Header *InternalHeader `protobuf:"bytes,10,opt,name=header" json:"header,omitempty"` + Key []*Reference `protobuf:"bytes,1,rep,name=key" json:"key,omitempty"` + CompositeIndex []*CompositeIndex `protobuf:"bytes,2,rep,name=composite_index,json=compositeIndex" json:"composite_index,omitempty"` + Force *bool `protobuf:"varint,3,opt,name=force,def=0" json:"force,omitempty"` + Snapshot []*Snapshot `protobuf:"bytes,9,rep,name=snapshot" json:"snapshot,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TouchRequest) Reset() { *m = TouchRequest{} } +func (m *TouchRequest) String() string { return proto.CompactTextString(m) } +func (*TouchRequest) ProtoMessage() {} +func (*TouchRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{25} +} +func (m *TouchRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TouchRequest.Unmarshal(m, b) +} +func (m *TouchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TouchRequest.Marshal(b, m, deterministic) +} +func (dst *TouchRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_TouchRequest.Merge(dst, src) +} +func (m *TouchRequest) XXX_Size() int { + return xxx_messageInfo_TouchRequest.Size(m) +} +func (m *TouchRequest) XXX_DiscardUnknown() { + xxx_messageInfo_TouchRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_TouchRequest proto.InternalMessageInfo + +const Default_TouchRequest_Force bool = false + +func (m *TouchRequest) GetHeader() *InternalHeader { + if m != nil { + return m.Header + } + return nil +} + +func (m *TouchRequest) GetKey() []*Reference { + if m != nil { + return m.Key + } + return nil +} + +func (m *TouchRequest) GetCompositeIndex() []*CompositeIndex { + if m != nil { + return m.CompositeIndex + } + return nil +} + +func (m *TouchRequest) GetForce() bool { + if m != nil && m.Force != nil { + return *m.Force + } + return Default_TouchRequest_Force +} + +func (m *TouchRequest) GetSnapshot() []*Snapshot { + if m != nil { + return m.Snapshot + } + return nil +} + +type TouchResponse struct { + Cost *Cost `protobuf:"bytes,1,opt,name=cost" json:"cost,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TouchResponse) Reset() { *m = TouchResponse{} } +func (m *TouchResponse) String() string { return proto.CompactTextString(m) } +func (*TouchResponse) ProtoMessage() {} +func (*TouchResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{26} +} +func (m *TouchResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TouchResponse.Unmarshal(m, b) +} +func (m *TouchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TouchResponse.Marshal(b, m, deterministic) +} +func (dst *TouchResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_TouchResponse.Merge(dst, src) +} +func (m *TouchResponse) XXX_Size() int { + return xxx_messageInfo_TouchResponse.Size(m) +} +func (m *TouchResponse) XXX_DiscardUnknown() { + xxx_messageInfo_TouchResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_TouchResponse proto.InternalMessageInfo + +func (m *TouchResponse) GetCost() *Cost { + if m != nil { + return m.Cost + } + return nil +} + +type DeleteRequest struct { + Header *InternalHeader `protobuf:"bytes,10,opt,name=header" json:"header,omitempty"` + Key []*Reference `protobuf:"bytes,6,rep,name=key" json:"key,omitempty"` + Transaction *Transaction `protobuf:"bytes,5,opt,name=transaction" json:"transaction,omitempty"` + Trusted *bool `protobuf:"varint,4,opt,name=trusted,def=0" json:"trusted,omitempty"` + Force *bool `protobuf:"varint,7,opt,name=force,def=0" json:"force,omitempty"` + MarkChanges *bool `protobuf:"varint,8,opt,name=mark_changes,json=markChanges,def=0" json:"mark_changes,omitempty"` + Snapshot []*Snapshot `protobuf:"bytes,9,rep,name=snapshot" json:"snapshot,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeleteRequest) Reset() { *m = DeleteRequest{} } +func (m *DeleteRequest) String() string { return proto.CompactTextString(m) } +func (*DeleteRequest) ProtoMessage() {} +func (*DeleteRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{27} +} +func (m *DeleteRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DeleteRequest.Unmarshal(m, b) +} +func (m *DeleteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DeleteRequest.Marshal(b, m, deterministic) +} +func (dst *DeleteRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteRequest.Merge(dst, src) +} +func (m *DeleteRequest) XXX_Size() int { + return xxx_messageInfo_DeleteRequest.Size(m) +} +func (m *DeleteRequest) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_DeleteRequest proto.InternalMessageInfo + +const Default_DeleteRequest_Trusted bool = false +const Default_DeleteRequest_Force bool = false +const Default_DeleteRequest_MarkChanges bool = false + +func (m *DeleteRequest) GetHeader() *InternalHeader { + if m != nil { + return m.Header + } + return nil +} + +func (m *DeleteRequest) GetKey() []*Reference { + if m != nil { + return m.Key + } + return nil +} + +func (m *DeleteRequest) GetTransaction() *Transaction { + if m != nil { + return m.Transaction + } + return nil +} + +func (m *DeleteRequest) GetTrusted() bool { + if m != nil && m.Trusted != nil { + return *m.Trusted + } + return Default_DeleteRequest_Trusted +} + +func (m *DeleteRequest) GetForce() bool { + if m != nil && m.Force != nil { + return *m.Force + } + return Default_DeleteRequest_Force +} + +func (m *DeleteRequest) GetMarkChanges() bool { + if m != nil && m.MarkChanges != nil { + return *m.MarkChanges + } + return Default_DeleteRequest_MarkChanges +} + +func (m *DeleteRequest) GetSnapshot() []*Snapshot { + if m != nil { + return m.Snapshot + } + return nil +} + +type DeleteResponse struct { + Cost *Cost `protobuf:"bytes,1,opt,name=cost" json:"cost,omitempty"` + Version []int64 `protobuf:"varint,3,rep,name=version" json:"version,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeleteResponse) Reset() { *m = DeleteResponse{} } +func (m *DeleteResponse) String() string { return proto.CompactTextString(m) } +func (*DeleteResponse) ProtoMessage() {} +func (*DeleteResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{28} +} +func (m *DeleteResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DeleteResponse.Unmarshal(m, b) +} +func (m *DeleteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DeleteResponse.Marshal(b, m, deterministic) +} +func (dst *DeleteResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteResponse.Merge(dst, src) +} +func (m *DeleteResponse) XXX_Size() int { + return xxx_messageInfo_DeleteResponse.Size(m) +} +func (m *DeleteResponse) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_DeleteResponse proto.InternalMessageInfo + +func (m *DeleteResponse) GetCost() *Cost { + if m != nil { + return m.Cost + } + return nil +} + +func (m *DeleteResponse) GetVersion() []int64 { + if m != nil { + return m.Version + } + return nil +} + +type NextRequest struct { + Header *InternalHeader `protobuf:"bytes,5,opt,name=header" json:"header,omitempty"` + Cursor *Cursor `protobuf:"bytes,1,req,name=cursor" json:"cursor,omitempty"` + Count *int32 `protobuf:"varint,2,opt,name=count" json:"count,omitempty"` + Offset *int32 `protobuf:"varint,4,opt,name=offset,def=0" json:"offset,omitempty"` + Compile *bool `protobuf:"varint,3,opt,name=compile,def=0" json:"compile,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NextRequest) Reset() { *m = NextRequest{} } +func (m *NextRequest) String() string { return proto.CompactTextString(m) } +func (*NextRequest) ProtoMessage() {} +func (*NextRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{29} +} +func (m *NextRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NextRequest.Unmarshal(m, b) +} +func (m *NextRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NextRequest.Marshal(b, m, deterministic) +} +func (dst *NextRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_NextRequest.Merge(dst, src) +} +func (m *NextRequest) XXX_Size() int { + return xxx_messageInfo_NextRequest.Size(m) +} +func (m *NextRequest) XXX_DiscardUnknown() { + xxx_messageInfo_NextRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_NextRequest proto.InternalMessageInfo + +const Default_NextRequest_Offset int32 = 0 +const Default_NextRequest_Compile bool = false + +func (m *NextRequest) GetHeader() *InternalHeader { + if m != nil { + return m.Header + } + return nil +} + +func (m *NextRequest) GetCursor() *Cursor { + if m != nil { + return m.Cursor + } + return nil +} + +func (m *NextRequest) GetCount() int32 { + if m != nil && m.Count != nil { + return *m.Count + } + return 0 +} + +func (m *NextRequest) GetOffset() int32 { + if m != nil && m.Offset != nil { + return *m.Offset + } + return Default_NextRequest_Offset +} + +func (m *NextRequest) GetCompile() bool { + if m != nil && m.Compile != nil { + return *m.Compile + } + return Default_NextRequest_Compile +} + +type QueryResult struct { + Cursor *Cursor `protobuf:"bytes,1,opt,name=cursor" json:"cursor,omitempty"` + Result []*EntityProto `protobuf:"bytes,2,rep,name=result" json:"result,omitempty"` + SkippedResults *int32 `protobuf:"varint,7,opt,name=skipped_results,json=skippedResults" json:"skipped_results,omitempty"` + MoreResults *bool `protobuf:"varint,3,req,name=more_results,json=moreResults" json:"more_results,omitempty"` + KeysOnly *bool `protobuf:"varint,4,opt,name=keys_only,json=keysOnly" json:"keys_only,omitempty"` + IndexOnly *bool `protobuf:"varint,9,opt,name=index_only,json=indexOnly" json:"index_only,omitempty"` + SmallOps *bool `protobuf:"varint,10,opt,name=small_ops,json=smallOps" json:"small_ops,omitempty"` + CompiledQuery *CompiledQuery `protobuf:"bytes,5,opt,name=compiled_query,json=compiledQuery" json:"compiled_query,omitempty"` + CompiledCursor *CompiledCursor `protobuf:"bytes,6,opt,name=compiled_cursor,json=compiledCursor" json:"compiled_cursor,omitempty"` + Index []*CompositeIndex `protobuf:"bytes,8,rep,name=index" json:"index,omitempty"` + Version []int64 `protobuf:"varint,11,rep,name=version" json:"version,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *QueryResult) Reset() { *m = QueryResult{} } +func (m *QueryResult) String() string { return proto.CompactTextString(m) } +func (*QueryResult) ProtoMessage() {} +func (*QueryResult) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{30} +} +func (m *QueryResult) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_QueryResult.Unmarshal(m, b) +} +func (m *QueryResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_QueryResult.Marshal(b, m, deterministic) +} +func (dst *QueryResult) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryResult.Merge(dst, src) +} +func (m *QueryResult) XXX_Size() int { + return xxx_messageInfo_QueryResult.Size(m) +} +func (m *QueryResult) XXX_DiscardUnknown() { + xxx_messageInfo_QueryResult.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryResult proto.InternalMessageInfo + +func (m *QueryResult) GetCursor() *Cursor { + if m != nil { + return m.Cursor + } + return nil +} + +func (m *QueryResult) GetResult() []*EntityProto { + if m != nil { + return m.Result + } + return nil +} + +func (m *QueryResult) GetSkippedResults() int32 { + if m != nil && m.SkippedResults != nil { + return *m.SkippedResults + } + return 0 +} + +func (m *QueryResult) GetMoreResults() bool { + if m != nil && m.MoreResults != nil { + return *m.MoreResults + } + return false +} + +func (m *QueryResult) GetKeysOnly() bool { + if m != nil && m.KeysOnly != nil { + return *m.KeysOnly + } + return false +} + +func (m *QueryResult) GetIndexOnly() bool { + if m != nil && m.IndexOnly != nil { + return *m.IndexOnly + } + return false +} + +func (m *QueryResult) GetSmallOps() bool { + if m != nil && m.SmallOps != nil { + return *m.SmallOps + } + return false +} + +func (m *QueryResult) GetCompiledQuery() *CompiledQuery { + if m != nil { + return m.CompiledQuery + } + return nil +} + +func (m *QueryResult) GetCompiledCursor() *CompiledCursor { + if m != nil { + return m.CompiledCursor + } + return nil +} + +func (m *QueryResult) GetIndex() []*CompositeIndex { + if m != nil { + return m.Index + } + return nil +} + +func (m *QueryResult) GetVersion() []int64 { + if m != nil { + return m.Version + } + return nil +} + +type AllocateIdsRequest struct { + Header *InternalHeader `protobuf:"bytes,4,opt,name=header" json:"header,omitempty"` + ModelKey *Reference `protobuf:"bytes,1,opt,name=model_key,json=modelKey" json:"model_key,omitempty"` + Size *int64 `protobuf:"varint,2,opt,name=size" json:"size,omitempty"` + Max *int64 `protobuf:"varint,3,opt,name=max" json:"max,omitempty"` + Reserve []*Reference `protobuf:"bytes,5,rep,name=reserve" json:"reserve,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AllocateIdsRequest) Reset() { *m = AllocateIdsRequest{} } +func (m *AllocateIdsRequest) String() string { return proto.CompactTextString(m) } +func (*AllocateIdsRequest) ProtoMessage() {} +func (*AllocateIdsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{31} +} +func (m *AllocateIdsRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AllocateIdsRequest.Unmarshal(m, b) +} +func (m *AllocateIdsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AllocateIdsRequest.Marshal(b, m, deterministic) +} +func (dst *AllocateIdsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllocateIdsRequest.Merge(dst, src) +} +func (m *AllocateIdsRequest) XXX_Size() int { + return xxx_messageInfo_AllocateIdsRequest.Size(m) +} +func (m *AllocateIdsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_AllocateIdsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_AllocateIdsRequest proto.InternalMessageInfo + +func (m *AllocateIdsRequest) GetHeader() *InternalHeader { + if m != nil { + return m.Header + } + return nil +} + +func (m *AllocateIdsRequest) GetModelKey() *Reference { + if m != nil { + return m.ModelKey + } + return nil +} + +func (m *AllocateIdsRequest) GetSize() int64 { + if m != nil && m.Size != nil { + return *m.Size + } + return 0 +} + +func (m *AllocateIdsRequest) GetMax() int64 { + if m != nil && m.Max != nil { + return *m.Max + } + return 0 +} + +func (m *AllocateIdsRequest) GetReserve() []*Reference { + if m != nil { + return m.Reserve + } + return nil +} + +type AllocateIdsResponse struct { + Start *int64 `protobuf:"varint,1,req,name=start" json:"start,omitempty"` + End *int64 `protobuf:"varint,2,req,name=end" json:"end,omitempty"` + Cost *Cost `protobuf:"bytes,3,opt,name=cost" json:"cost,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AllocateIdsResponse) Reset() { *m = AllocateIdsResponse{} } +func (m *AllocateIdsResponse) String() string { return proto.CompactTextString(m) } +func (*AllocateIdsResponse) ProtoMessage() {} +func (*AllocateIdsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{32} +} +func (m *AllocateIdsResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AllocateIdsResponse.Unmarshal(m, b) +} +func (m *AllocateIdsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AllocateIdsResponse.Marshal(b, m, deterministic) +} +func (dst *AllocateIdsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllocateIdsResponse.Merge(dst, src) +} +func (m *AllocateIdsResponse) XXX_Size() int { + return xxx_messageInfo_AllocateIdsResponse.Size(m) +} +func (m *AllocateIdsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_AllocateIdsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_AllocateIdsResponse proto.InternalMessageInfo + +func (m *AllocateIdsResponse) GetStart() int64 { + if m != nil && m.Start != nil { + return *m.Start + } + return 0 +} + +func (m *AllocateIdsResponse) GetEnd() int64 { + if m != nil && m.End != nil { + return *m.End + } + return 0 +} + +func (m *AllocateIdsResponse) GetCost() *Cost { + if m != nil { + return m.Cost + } + return nil +} + +type CompositeIndices struct { + Index []*CompositeIndex `protobuf:"bytes,1,rep,name=index" json:"index,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CompositeIndices) Reset() { *m = CompositeIndices{} } +func (m *CompositeIndices) String() string { return proto.CompactTextString(m) } +func (*CompositeIndices) ProtoMessage() {} +func (*CompositeIndices) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{33} +} +func (m *CompositeIndices) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CompositeIndices.Unmarshal(m, b) +} +func (m *CompositeIndices) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CompositeIndices.Marshal(b, m, deterministic) +} +func (dst *CompositeIndices) XXX_Merge(src proto.Message) { + xxx_messageInfo_CompositeIndices.Merge(dst, src) +} +func (m *CompositeIndices) XXX_Size() int { + return xxx_messageInfo_CompositeIndices.Size(m) +} +func (m *CompositeIndices) XXX_DiscardUnknown() { + xxx_messageInfo_CompositeIndices.DiscardUnknown(m) +} + +var xxx_messageInfo_CompositeIndices proto.InternalMessageInfo + +func (m *CompositeIndices) GetIndex() []*CompositeIndex { + if m != nil { + return m.Index + } + return nil +} + +type AddActionsRequest struct { + Header *InternalHeader `protobuf:"bytes,3,opt,name=header" json:"header,omitempty"` + Transaction *Transaction `protobuf:"bytes,1,req,name=transaction" json:"transaction,omitempty"` + Action []*Action `protobuf:"bytes,2,rep,name=action" json:"action,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AddActionsRequest) Reset() { *m = AddActionsRequest{} } +func (m *AddActionsRequest) String() string { return proto.CompactTextString(m) } +func (*AddActionsRequest) ProtoMessage() {} +func (*AddActionsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{34} +} +func (m *AddActionsRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AddActionsRequest.Unmarshal(m, b) +} +func (m *AddActionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AddActionsRequest.Marshal(b, m, deterministic) +} +func (dst *AddActionsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_AddActionsRequest.Merge(dst, src) +} +func (m *AddActionsRequest) XXX_Size() int { + return xxx_messageInfo_AddActionsRequest.Size(m) +} +func (m *AddActionsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_AddActionsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_AddActionsRequest proto.InternalMessageInfo + +func (m *AddActionsRequest) GetHeader() *InternalHeader { + if m != nil { + return m.Header + } + return nil +} + +func (m *AddActionsRequest) GetTransaction() *Transaction { + if m != nil { + return m.Transaction + } + return nil +} + +func (m *AddActionsRequest) GetAction() []*Action { + if m != nil { + return m.Action + } + return nil +} + +type AddActionsResponse struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AddActionsResponse) Reset() { *m = AddActionsResponse{} } +func (m *AddActionsResponse) String() string { return proto.CompactTextString(m) } +func (*AddActionsResponse) ProtoMessage() {} +func (*AddActionsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{35} +} +func (m *AddActionsResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AddActionsResponse.Unmarshal(m, b) +} +func (m *AddActionsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AddActionsResponse.Marshal(b, m, deterministic) +} +func (dst *AddActionsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_AddActionsResponse.Merge(dst, src) +} +func (m *AddActionsResponse) XXX_Size() int { + return xxx_messageInfo_AddActionsResponse.Size(m) +} +func (m *AddActionsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_AddActionsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_AddActionsResponse proto.InternalMessageInfo + +type BeginTransactionRequest struct { + Header *InternalHeader `protobuf:"bytes,3,opt,name=header" json:"header,omitempty"` + App *string `protobuf:"bytes,1,req,name=app" json:"app,omitempty"` + AllowMultipleEg *bool `protobuf:"varint,2,opt,name=allow_multiple_eg,json=allowMultipleEg,def=0" json:"allow_multiple_eg,omitempty"` + DatabaseId *string `protobuf:"bytes,4,opt,name=database_id,json=databaseId" json:"database_id,omitempty"` + Mode *BeginTransactionRequest_TransactionMode `protobuf:"varint,5,opt,name=mode,enum=appengine.BeginTransactionRequest_TransactionMode,def=0" json:"mode,omitempty"` + PreviousTransaction *Transaction `protobuf:"bytes,7,opt,name=previous_transaction,json=previousTransaction" json:"previous_transaction,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BeginTransactionRequest) Reset() { *m = BeginTransactionRequest{} } +func (m *BeginTransactionRequest) String() string { return proto.CompactTextString(m) } +func (*BeginTransactionRequest) ProtoMessage() {} +func (*BeginTransactionRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{36} +} +func (m *BeginTransactionRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BeginTransactionRequest.Unmarshal(m, b) +} +func (m *BeginTransactionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BeginTransactionRequest.Marshal(b, m, deterministic) +} +func (dst *BeginTransactionRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_BeginTransactionRequest.Merge(dst, src) +} +func (m *BeginTransactionRequest) XXX_Size() int { + return xxx_messageInfo_BeginTransactionRequest.Size(m) +} +func (m *BeginTransactionRequest) XXX_DiscardUnknown() { + xxx_messageInfo_BeginTransactionRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_BeginTransactionRequest proto.InternalMessageInfo + +const Default_BeginTransactionRequest_AllowMultipleEg bool = false +const Default_BeginTransactionRequest_Mode BeginTransactionRequest_TransactionMode = BeginTransactionRequest_UNKNOWN + +func (m *BeginTransactionRequest) GetHeader() *InternalHeader { + if m != nil { + return m.Header + } + return nil +} + +func (m *BeginTransactionRequest) GetApp() string { + if m != nil && m.App != nil { + return *m.App + } + return "" +} + +func (m *BeginTransactionRequest) GetAllowMultipleEg() bool { + if m != nil && m.AllowMultipleEg != nil { + return *m.AllowMultipleEg + } + return Default_BeginTransactionRequest_AllowMultipleEg +} + +func (m *BeginTransactionRequest) GetDatabaseId() string { + if m != nil && m.DatabaseId != nil { + return *m.DatabaseId + } + return "" +} + +func (m *BeginTransactionRequest) GetMode() BeginTransactionRequest_TransactionMode { + if m != nil && m.Mode != nil { + return *m.Mode + } + return Default_BeginTransactionRequest_Mode +} + +func (m *BeginTransactionRequest) GetPreviousTransaction() *Transaction { + if m != nil { + return m.PreviousTransaction + } + return nil +} + +type CommitResponse struct { + Cost *Cost `protobuf:"bytes,1,opt,name=cost" json:"cost,omitempty"` + Version []*CommitResponse_Version `protobuf:"group,3,rep,name=Version,json=version" json:"version,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CommitResponse) Reset() { *m = CommitResponse{} } +func (m *CommitResponse) String() string { return proto.CompactTextString(m) } +func (*CommitResponse) ProtoMessage() {} +func (*CommitResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{37} +} +func (m *CommitResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CommitResponse.Unmarshal(m, b) +} +func (m *CommitResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CommitResponse.Marshal(b, m, deterministic) +} +func (dst *CommitResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_CommitResponse.Merge(dst, src) +} +func (m *CommitResponse) XXX_Size() int { + return xxx_messageInfo_CommitResponse.Size(m) +} +func (m *CommitResponse) XXX_DiscardUnknown() { + xxx_messageInfo_CommitResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_CommitResponse proto.InternalMessageInfo + +func (m *CommitResponse) GetCost() *Cost { + if m != nil { + return m.Cost + } + return nil +} + +func (m *CommitResponse) GetVersion() []*CommitResponse_Version { + if m != nil { + return m.Version + } + return nil +} + +type CommitResponse_Version struct { + RootEntityKey *Reference `protobuf:"bytes,4,req,name=root_entity_key,json=rootEntityKey" json:"root_entity_key,omitempty"` + Version *int64 `protobuf:"varint,5,req,name=version" json:"version,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CommitResponse_Version) Reset() { *m = CommitResponse_Version{} } +func (m *CommitResponse_Version) String() string { return proto.CompactTextString(m) } +func (*CommitResponse_Version) ProtoMessage() {} +func (*CommitResponse_Version) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{37, 0} +} +func (m *CommitResponse_Version) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CommitResponse_Version.Unmarshal(m, b) +} +func (m *CommitResponse_Version) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CommitResponse_Version.Marshal(b, m, deterministic) +} +func (dst *CommitResponse_Version) XXX_Merge(src proto.Message) { + xxx_messageInfo_CommitResponse_Version.Merge(dst, src) +} +func (m *CommitResponse_Version) XXX_Size() int { + return xxx_messageInfo_CommitResponse_Version.Size(m) +} +func (m *CommitResponse_Version) XXX_DiscardUnknown() { + xxx_messageInfo_CommitResponse_Version.DiscardUnknown(m) +} + +var xxx_messageInfo_CommitResponse_Version proto.InternalMessageInfo + +func (m *CommitResponse_Version) GetRootEntityKey() *Reference { + if m != nil { + return m.RootEntityKey + } + return nil +} + +func (m *CommitResponse_Version) GetVersion() int64 { + if m != nil && m.Version != nil { + return *m.Version + } + return 0 +} + +func init() { + proto.RegisterType((*Action)(nil), "appengine.Action") + proto.RegisterType((*PropertyValue)(nil), "appengine.PropertyValue") + proto.RegisterType((*PropertyValue_PointValue)(nil), "appengine.PropertyValue.PointValue") + proto.RegisterType((*PropertyValue_UserValue)(nil), "appengine.PropertyValue.UserValue") + proto.RegisterType((*PropertyValue_ReferenceValue)(nil), "appengine.PropertyValue.ReferenceValue") + proto.RegisterType((*PropertyValue_ReferenceValue_PathElement)(nil), "appengine.PropertyValue.ReferenceValue.PathElement") + proto.RegisterType((*Property)(nil), "appengine.Property") + proto.RegisterType((*Path)(nil), "appengine.Path") + proto.RegisterType((*Path_Element)(nil), "appengine.Path.Element") + proto.RegisterType((*Reference)(nil), "appengine.Reference") + proto.RegisterType((*User)(nil), "appengine.User") + proto.RegisterType((*EntityProto)(nil), "appengine.EntityProto") + proto.RegisterType((*CompositeProperty)(nil), "appengine.CompositeProperty") + proto.RegisterType((*Index)(nil), "appengine.Index") + proto.RegisterType((*Index_Property)(nil), "appengine.Index.Property") + proto.RegisterType((*CompositeIndex)(nil), "appengine.CompositeIndex") + proto.RegisterType((*IndexPostfix)(nil), "appengine.IndexPostfix") + proto.RegisterType((*IndexPostfix_IndexValue)(nil), "appengine.IndexPostfix.IndexValue") + proto.RegisterType((*IndexPosition)(nil), "appengine.IndexPosition") + proto.RegisterType((*Snapshot)(nil), "appengine.Snapshot") + proto.RegisterType((*InternalHeader)(nil), "appengine.InternalHeader") + proto.RegisterType((*Transaction)(nil), "appengine.Transaction") + proto.RegisterType((*Query)(nil), "appengine.Query") + proto.RegisterType((*Query_Filter)(nil), "appengine.Query.Filter") + proto.RegisterType((*Query_Order)(nil), "appengine.Query.Order") + proto.RegisterType((*CompiledQuery)(nil), "appengine.CompiledQuery") + proto.RegisterType((*CompiledQuery_PrimaryScan)(nil), "appengine.CompiledQuery.PrimaryScan") + proto.RegisterType((*CompiledQuery_MergeJoinScan)(nil), "appengine.CompiledQuery.MergeJoinScan") + proto.RegisterType((*CompiledQuery_EntityFilter)(nil), "appengine.CompiledQuery.EntityFilter") + proto.RegisterType((*CompiledCursor)(nil), "appengine.CompiledCursor") + proto.RegisterType((*CompiledCursor_Position)(nil), "appengine.CompiledCursor.Position") + proto.RegisterType((*CompiledCursor_Position_IndexValue)(nil), "appengine.CompiledCursor.Position.IndexValue") + proto.RegisterType((*Cursor)(nil), "appengine.Cursor") + proto.RegisterType((*Error)(nil), "appengine.Error") + proto.RegisterType((*Cost)(nil), "appengine.Cost") + proto.RegisterType((*Cost_CommitCost)(nil), "appengine.Cost.CommitCost") + proto.RegisterType((*GetRequest)(nil), "appengine.GetRequest") + proto.RegisterType((*GetResponse)(nil), "appengine.GetResponse") + proto.RegisterType((*GetResponse_Entity)(nil), "appengine.GetResponse.Entity") + proto.RegisterType((*PutRequest)(nil), "appengine.PutRequest") + proto.RegisterType((*PutResponse)(nil), "appengine.PutResponse") + proto.RegisterType((*TouchRequest)(nil), "appengine.TouchRequest") + proto.RegisterType((*TouchResponse)(nil), "appengine.TouchResponse") + proto.RegisterType((*DeleteRequest)(nil), "appengine.DeleteRequest") + proto.RegisterType((*DeleteResponse)(nil), "appengine.DeleteResponse") + proto.RegisterType((*NextRequest)(nil), "appengine.NextRequest") + proto.RegisterType((*QueryResult)(nil), "appengine.QueryResult") + proto.RegisterType((*AllocateIdsRequest)(nil), "appengine.AllocateIdsRequest") + proto.RegisterType((*AllocateIdsResponse)(nil), "appengine.AllocateIdsResponse") + proto.RegisterType((*CompositeIndices)(nil), "appengine.CompositeIndices") + proto.RegisterType((*AddActionsRequest)(nil), "appengine.AddActionsRequest") + proto.RegisterType((*AddActionsResponse)(nil), "appengine.AddActionsResponse") + proto.RegisterType((*BeginTransactionRequest)(nil), "appengine.BeginTransactionRequest") + proto.RegisterType((*CommitResponse)(nil), "appengine.CommitResponse") + proto.RegisterType((*CommitResponse_Version)(nil), "appengine.CommitResponse.Version") +} + +func init() { + proto.RegisterFile("google.golang.org/appengine/internal/datastore/datastore_v3.proto", fileDescriptor_datastore_v3_83b17b80c34f6179) +} + +var fileDescriptor_datastore_v3_83b17b80c34f6179 = []byte{ + // 4156 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x5a, 0xcd, 0x73, 0xe3, 0x46, + 0x76, 0x37, 0xc1, 0xef, 0x47, 0x89, 0x82, 0x5a, 0xf3, 0xc1, 0xa1, 0x3f, 0x46, 0xc6, 0xac, 0x6d, + 0xd9, 0x6b, 0x73, 0x6c, 0xf9, 0x23, 0x5b, 0x4a, 0x76, 0x1d, 0x4a, 0xc4, 0x68, 0x90, 0xa1, 0x48, + 0xb9, 0x09, 0xd9, 0x9e, 0x5c, 0x50, 0x18, 0xa2, 0x29, 0x21, 0x43, 0x02, 0x30, 0x00, 0x6a, 0x46, + 0x93, 0xe4, 0x90, 0x4b, 0x2a, 0x55, 0x5b, 0xa9, 0x1c, 0x92, 0x4a, 0x25, 0xf9, 0x07, 0x72, 0xc8, + 0x39, 0x95, 0xaa, 0x54, 0xf6, 0x98, 0x5b, 0x0e, 0x7b, 0xc9, 0x31, 0x95, 0x73, 0xf2, 0x27, 0x24, + 0x39, 0xa4, 0xfa, 0x75, 0x03, 0x02, 0x28, 0x4a, 0x23, 0x6d, 0xf6, 0x90, 0x13, 0xd1, 0xef, 0xfd, + 0xba, 0xf1, 0xfa, 0xf5, 0xfb, 0x6c, 0x10, 0xba, 0xc7, 0xbe, 0x7f, 0x3c, 0x65, 0x9d, 0x63, 0x7f, + 0x6a, 0x7b, 0xc7, 0x1d, 0x3f, 0x3c, 0x7e, 0x68, 0x07, 0x01, 0xf3, 0x8e, 0x5d, 0x8f, 0x3d, 0x74, + 0xbd, 0x98, 0x85, 0x9e, 0x3d, 0x7d, 0xe8, 0xd8, 0xb1, 0x1d, 0xc5, 0x7e, 0xc8, 0xce, 0x9f, 0xac, + 0xd3, 0xcf, 0x3b, 0x41, 0xe8, 0xc7, 0x3e, 0xa9, 0xa7, 0x13, 0xb4, 0x1a, 0x54, 0xba, 0xe3, 0xd8, + 0xf5, 0x3d, 0xed, 0x1f, 0x2b, 0xb0, 0x7a, 0x18, 0xfa, 0x01, 0x0b, 0xe3, 0xb3, 0x6f, 0xed, 0xe9, + 0x9c, 0x91, 0x77, 0x00, 0x5c, 0x2f, 0xfe, 0xea, 0x0b, 0x1c, 0xb5, 0x0a, 0x9b, 0x85, 0xad, 0x22, + 0xcd, 0x50, 0x88, 0x06, 0x2b, 0xcf, 0x7c, 0x7f, 0xca, 0x6c, 0x4f, 0x20, 0x94, 0xcd, 0xc2, 0x56, + 0x8d, 0xe6, 0x68, 0x64, 0x13, 0x1a, 0x51, 0x1c, 0xba, 0xde, 0xb1, 0x80, 0x14, 0x37, 0x0b, 0x5b, + 0x75, 0x9a, 0x25, 0x71, 0x84, 0xe3, 0xcf, 0x9f, 0x4d, 0x99, 0x40, 0x94, 0x36, 0x0b, 0x5b, 0x05, + 0x9a, 0x25, 0x91, 0x3d, 0x80, 0xc0, 0x77, 0xbd, 0xf8, 0x14, 0x01, 0xe5, 0xcd, 0xc2, 0x16, 0x6c, + 0x3f, 0xe8, 0xa4, 0x7b, 0xe8, 0xe4, 0xa4, 0xee, 0x1c, 0x72, 0x28, 0x3e, 0xd2, 0xcc, 0x34, 0xf2, + 0xdb, 0x50, 0x9f, 0x47, 0x2c, 0x14, 0x6b, 0xd4, 0x70, 0x0d, 0xed, 0xd2, 0x35, 0x8e, 0x22, 0x16, + 0x8a, 0x25, 0xce, 0x27, 0x91, 0x21, 0x34, 0x43, 0x36, 0x61, 0x21, 0xf3, 0xc6, 0x4c, 0x2c, 0xb3, + 0x82, 0xcb, 0x7c, 0x70, 0xe9, 0x32, 0x34, 0x81, 0x8b, 0xb5, 0x16, 0xa6, 0xb7, 0xb7, 0x00, 0xce, + 0x85, 0x25, 0x2b, 0x50, 0x78, 0xd9, 0xaa, 0x6c, 0x2a, 0x5b, 0x05, 0x5a, 0x78, 0xc9, 0x47, 0x67, + 0xad, 0xaa, 0x18, 0x9d, 0xb5, 0xff, 0xa9, 0x00, 0xf5, 0x54, 0x26, 0x72, 0x0b, 0xca, 0x6c, 0x66, + 0xbb, 0xd3, 0x56, 0x7d, 0x53, 0xd9, 0xaa, 0x53, 0x31, 0x20, 0xf7, 0xa1, 0x61, 0xcf, 0xe3, 0x13, + 0xcb, 0xf1, 0x67, 0xb6, 0xeb, 0xb5, 0x00, 0x79, 0xc0, 0x49, 0x3d, 0xa4, 0x90, 0x36, 0xd4, 0x3c, + 0x77, 0xfc, 0xdc, 0xb3, 0x67, 0xac, 0xd5, 0xc0, 0x73, 0x48, 0xc7, 0xe4, 0x13, 0x20, 0x13, 0xe6, + 0xb0, 0xd0, 0x8e, 0x99, 0x63, 0xb9, 0x0e, 0xf3, 0x62, 0x37, 0x3e, 0x6b, 0xdd, 0x46, 0xd4, 0x7a, + 0xca, 0x31, 0x24, 0x23, 0x0f, 0x0f, 0x42, 0xff, 0xd4, 0x75, 0x58, 0xd8, 0xba, 0xb3, 0x00, 0x3f, + 0x94, 0x8c, 0xf6, 0xbf, 0x17, 0xa0, 0x99, 0xd7, 0x05, 0x51, 0xa1, 0x68, 0x07, 0x41, 0x6b, 0x15, + 0xa5, 0xe4, 0x8f, 0xe4, 0x6d, 0x00, 0x2e, 0x8a, 0x15, 0x05, 0xf6, 0x98, 0xb5, 0x6e, 0xe1, 0x5a, + 0x75, 0x4e, 0x19, 0x71, 0x02, 0x39, 0x82, 0x46, 0x60, 0xc7, 0x27, 0x6c, 0xca, 0x66, 0xcc, 0x8b, + 0x5b, 0xcd, 0xcd, 0xe2, 0x16, 0x6c, 0x7f, 0x7e, 0x4d, 0xd5, 0x77, 0x0e, 0xed, 0xf8, 0x44, 0x17, + 0x53, 0x69, 0x76, 0x9d, 0xb6, 0x0e, 0x8d, 0x0c, 0x8f, 0x10, 0x28, 0xc5, 0x67, 0x01, 0x6b, 0xad, + 0xa1, 0x5c, 0xf8, 0x4c, 0x9a, 0xa0, 0xb8, 0x4e, 0x4b, 0x45, 0xf3, 0x57, 0x5c, 0x87, 0x63, 0x50, + 0x87, 0xeb, 0x28, 0x22, 0x3e, 0x6b, 0xff, 0x51, 0x86, 0x5a, 0x22, 0x00, 0xe9, 0x42, 0x75, 0xc6, + 0x6c, 0xcf, 0xf5, 0x8e, 0xd1, 0x69, 0x9a, 0xdb, 0x6f, 0x2e, 0x11, 0xb3, 0x73, 0x20, 0x20, 0x3b, + 0x30, 0x18, 0x5a, 0x07, 0x7a, 0x77, 0x60, 0x0c, 0xf6, 0x69, 0x32, 0x8f, 0x1f, 0xa6, 0x7c, 0xb4, + 0xe6, 0xa1, 0x8b, 0x9e, 0x55, 0xa7, 0x20, 0x49, 0x47, 0xa1, 0x9b, 0x0a, 0x51, 0x14, 0x82, 0xe2, + 0x21, 0x76, 0xa0, 0x9c, 0xb8, 0x88, 0xb2, 0xd5, 0xd8, 0x6e, 0x5d, 0xa6, 0x1c, 0x2a, 0x60, 0xdc, + 0x20, 0x66, 0xf3, 0x69, 0xec, 0x06, 0x53, 0xee, 0x76, 0xca, 0x56, 0x8d, 0xa6, 0x63, 0xf2, 0x1e, + 0x40, 0xc4, 0xec, 0x70, 0x7c, 0x62, 0x3f, 0x9b, 0xb2, 0x56, 0x85, 0x7b, 0xf6, 0x4e, 0x79, 0x62, + 0x4f, 0x23, 0x46, 0x33, 0x0c, 0x62, 0xc3, 0xdd, 0x49, 0x1c, 0x59, 0xb1, 0xff, 0x9c, 0x79, 0xee, + 0x2b, 0x9b, 0x07, 0x12, 0xcb, 0x0f, 0xf8, 0x0f, 0xfa, 0x58, 0x73, 0xfb, 0xc3, 0x65, 0x5b, 0x7f, + 0x14, 0x47, 0x66, 0x66, 0xc6, 0x10, 0x27, 0xd0, 0xdb, 0x93, 0x65, 0x64, 0xd2, 0x86, 0xca, 0xd4, + 0x1f, 0xdb, 0x53, 0xd6, 0xaa, 0x73, 0x2d, 0xec, 0x28, 0xcc, 0xa3, 0x92, 0xa2, 0xfd, 0xb3, 0x02, + 0x55, 0xa9, 0x47, 0xd2, 0x84, 0x8c, 0x26, 0xd5, 0x37, 0x48, 0x0d, 0x4a, 0xbb, 0xfd, 0xe1, 0xae, + 0xda, 0xe4, 0x4f, 0xa6, 0xfe, 0xbd, 0xa9, 0xae, 0x71, 0xcc, 0xee, 0x53, 0x53, 0x1f, 0x99, 0x94, + 0x63, 0x54, 0xb2, 0x0e, 0xab, 0x5d, 0x73, 0x78, 0x60, 0xed, 0x75, 0x4d, 0x7d, 0x7f, 0x48, 0x9f, + 0xaa, 0x05, 0xb2, 0x0a, 0x75, 0x24, 0xf5, 0x8d, 0xc1, 0x13, 0x55, 0xe1, 0x33, 0x70, 0x68, 0x1a, + 0x66, 0x5f, 0x57, 0x8b, 0x44, 0x85, 0x15, 0x31, 0x63, 0x38, 0x30, 0xf5, 0x81, 0xa9, 0x96, 0x52, + 0xca, 0xe8, 0xe8, 0xe0, 0xa0, 0x4b, 0x9f, 0xaa, 0x65, 0xb2, 0x06, 0x0d, 0xa4, 0x74, 0x8f, 0xcc, + 0xc7, 0x43, 0xaa, 0x56, 0x48, 0x03, 0xaa, 0xfb, 0x3d, 0xeb, 0xbb, 0xc7, 0xfa, 0x40, 0xad, 0x92, + 0x15, 0xa8, 0xed, 0xf7, 0x2c, 0xfd, 0xa0, 0x6b, 0xf4, 0xd5, 0x1a, 0x9f, 0xbd, 0xaf, 0x0f, 0xe9, + 0x68, 0x64, 0x1d, 0x0e, 0x8d, 0x81, 0xa9, 0xd6, 0x49, 0x1d, 0xca, 0xfb, 0x3d, 0xcb, 0x38, 0x50, + 0x81, 0x10, 0x68, 0xee, 0xf7, 0xac, 0xc3, 0xc7, 0xc3, 0x81, 0x3e, 0x38, 0x3a, 0xd8, 0xd5, 0xa9, + 0xda, 0x20, 0xb7, 0x40, 0xe5, 0xb4, 0xe1, 0xc8, 0xec, 0xf6, 0xbb, 0xbd, 0x1e, 0xd5, 0x47, 0x23, + 0x75, 0x85, 0x4b, 0xbd, 0xdf, 0xb3, 0x68, 0xd7, 0xe4, 0xfb, 0x5a, 0xe5, 0x2f, 0xe4, 0x7b, 0x7f, + 0xa2, 0x3f, 0x55, 0xd7, 0xf9, 0x2b, 0xf4, 0x81, 0x69, 0x98, 0x4f, 0xad, 0x43, 0x3a, 0x34, 0x87, + 0xea, 0x06, 0x17, 0xd0, 0x18, 0xf4, 0xf4, 0xef, 0xad, 0x6f, 0xbb, 0xfd, 0x23, 0x5d, 0x25, 0xda, + 0x8f, 0xe1, 0xf6, 0xd2, 0x33, 0xe1, 0xaa, 0x7b, 0x6c, 0x1e, 0xf4, 0xd5, 0x02, 0x7f, 0xe2, 0x9b, + 0x52, 0x15, 0xed, 0x0f, 0xa0, 0xc4, 0x5d, 0x86, 0x7c, 0x06, 0xd5, 0xc4, 0x1b, 0x0b, 0xe8, 0x8d, + 0x77, 0xb3, 0x67, 0x6d, 0xc7, 0x27, 0x9d, 0xc4, 0xe3, 0x12, 0x5c, 0xbb, 0x0b, 0xd5, 0x45, 0x4f, + 0x53, 0x2e, 0x78, 0x5a, 0xf1, 0x82, 0xa7, 0x95, 0x32, 0x9e, 0x66, 0x43, 0x3d, 0xf5, 0xed, 0x9b, + 0x47, 0x91, 0x07, 0x50, 0xe2, 0xde, 0xdf, 0x6a, 0xa2, 0x87, 0xac, 0x2d, 0x08, 0x4c, 0x91, 0xa9, + 0xfd, 0x43, 0x01, 0x4a, 0x3c, 0xda, 0x9e, 0x07, 0xda, 0xc2, 0x15, 0x81, 0x56, 0xb9, 0x32, 0xd0, + 0x16, 0xaf, 0x15, 0x68, 0x2b, 0x37, 0x0b, 0xb4, 0xd5, 0x4b, 0x02, 0xad, 0xf6, 0x67, 0x45, 0x68, + 0xe8, 0x38, 0xf3, 0x10, 0x13, 0xfd, 0xfb, 0x50, 0x7c, 0xce, 0xce, 0x50, 0x3f, 0x8d, 0xed, 0x5b, + 0x99, 0xdd, 0xa6, 0x2a, 0xa4, 0x1c, 0x40, 0xb6, 0x61, 0x45, 0xbc, 0xd0, 0x3a, 0x0e, 0xfd, 0x79, + 0xd0, 0x52, 0x97, 0xab, 0xa7, 0x21, 0x40, 0xfb, 0x1c, 0x43, 0xde, 0x83, 0xb2, 0xff, 0xc2, 0x63, + 0x21, 0xc6, 0xc1, 0x3c, 0x98, 0x2b, 0x8f, 0x0a, 0x2e, 0x79, 0x08, 0xa5, 0xe7, 0xae, 0xe7, 0xe0, + 0x19, 0xe6, 0x23, 0x61, 0x46, 0xd0, 0xce, 0x13, 0xd7, 0x73, 0x28, 0x02, 0xc9, 0x3d, 0xa8, 0xf1, + 0x5f, 0x8c, 0x7b, 0x65, 0xdc, 0x68, 0x95, 0x8f, 0x79, 0xd0, 0x7b, 0x08, 0xb5, 0x40, 0xc6, 0x10, + 0x4c, 0x00, 0x8d, 0xed, 0x8d, 0x25, 0xe1, 0x85, 0xa6, 0x20, 0xf2, 0x15, 0xac, 0x84, 0xf6, 0x0b, + 0x2b, 0x9d, 0xb4, 0x76, 0xf9, 0xa4, 0x46, 0x68, 0xbf, 0x48, 0x23, 0x38, 0x81, 0x52, 0x68, 0x7b, + 0xcf, 0x5b, 0x64, 0xb3, 0xb0, 0x55, 0xa6, 0xf8, 0xac, 0x7d, 0x01, 0x25, 0x2e, 0x25, 0x8f, 0x08, + 0xfb, 0x3d, 0xf4, 0xff, 0xee, 0x9e, 0xa9, 0x16, 0x12, 0x7f, 0xfe, 0x96, 0x47, 0x03, 0x45, 0x72, + 0x0f, 0xf4, 0xd1, 0xa8, 0xbb, 0xaf, 0xab, 0x45, 0xad, 0x07, 0xeb, 0x7b, 0xfe, 0x2c, 0xf0, 0x23, + 0x37, 0x66, 0xe9, 0xf2, 0xf7, 0xa0, 0xe6, 0x7a, 0x0e, 0x7b, 0x69, 0xb9, 0x0e, 0x9a, 0x56, 0x91, + 0x56, 0x71, 0x6c, 0x38, 0xdc, 0xe4, 0x4e, 0x65, 0x31, 0x55, 0xe4, 0x26, 0x87, 0x03, 0xed, 0x2f, + 0x15, 0x28, 0x1b, 0x1c, 0xc1, 0x8d, 0x4f, 0x9e, 0x14, 0x7a, 0x8f, 0x30, 0x4c, 0x10, 0x24, 0x93, + 0xfb, 0x50, 0x1b, 0x6a, 0xb6, 0x37, 0x66, 0xbc, 0xe2, 0xc3, 0x3c, 0x50, 0xa3, 0xe9, 0x98, 0x7c, + 0x99, 0xd1, 0x9f, 0x82, 0x2e, 0x7b, 0x2f, 0xa3, 0x0a, 0x7c, 0xc1, 0x12, 0x2d, 0xb6, 0xff, 0xaa, + 0x90, 0x49, 0x6e, 0xcb, 0x12, 0x4f, 0x1f, 0xea, 0x8e, 0x1b, 0x32, 0xac, 0x23, 0xe5, 0x41, 0x3f, + 0xb8, 0x74, 0xe1, 0x4e, 0x2f, 0x81, 0xee, 0xd4, 0xbb, 0xa3, 0x3d, 0x7d, 0xd0, 0xe3, 0x99, 0xef, + 0x7c, 0x01, 0xed, 0x23, 0xa8, 0xa7, 0x10, 0x0c, 0xc7, 0x09, 0x48, 0x2d, 0x70, 0xf5, 0xf6, 0xf4, + 0x74, 0xac, 0x68, 0x7f, 0xad, 0x40, 0x33, 0xd5, 0xaf, 0xd0, 0xd0, 0x6d, 0xa8, 0xd8, 0x41, 0x90, + 0xa8, 0xb6, 0x4e, 0xcb, 0x76, 0x10, 0x18, 0x8e, 0x8c, 0x2d, 0x0a, 0x6a, 0x9b, 0xc7, 0x96, 0x4f, + 0x01, 0x1c, 0x36, 0x71, 0x3d, 0x17, 0x85, 0x2e, 0xa2, 0xc1, 0xab, 0x8b, 0x42, 0xd3, 0x0c, 0x86, + 0x7c, 0x09, 0xe5, 0x28, 0xb6, 0x63, 0x91, 0x2b, 0x9b, 0xdb, 0xf7, 0x33, 0xe0, 0xbc, 0x08, 0x9d, + 0x11, 0x87, 0x51, 0x81, 0x26, 0x5f, 0xc1, 0x2d, 0xdf, 0x9b, 0x9e, 0x59, 0xf3, 0x88, 0x59, 0xee, + 0xc4, 0x0a, 0xd9, 0x0f, 0x73, 0x37, 0x64, 0x4e, 0x3e, 0xa7, 0xae, 0x73, 0xc8, 0x51, 0xc4, 0x8c, + 0x09, 0x95, 0x7c, 0xed, 0x6b, 0x28, 0xe3, 0x3a, 0x7c, 0xcf, 0xdf, 0x51, 0xc3, 0xd4, 0xad, 0xe1, + 0xa0, 0xff, 0x54, 0xe8, 0x80, 0xea, 0xdd, 0x9e, 0x85, 0x44, 0x55, 0xe1, 0xc1, 0xbe, 0xa7, 0xf7, + 0x75, 0x53, 0xef, 0xa9, 0x45, 0x9e, 0x3d, 0x74, 0x4a, 0x87, 0x54, 0x2d, 0x69, 0xff, 0x53, 0x80, + 0x15, 0x94, 0xe7, 0xd0, 0x8f, 0xe2, 0x89, 0xfb, 0x92, 0xec, 0x41, 0x43, 0x98, 0xdd, 0xa9, 0x2c, + 0xe8, 0xb9, 0x33, 0x68, 0x8b, 0x7b, 0x96, 0x68, 0x31, 0x90, 0x75, 0xb4, 0x9b, 0x3e, 0x27, 0x21, + 0x45, 0x41, 0xa7, 0xbf, 0x22, 0xa4, 0xbc, 0x05, 0x95, 0x67, 0x6c, 0xe2, 0x87, 0x22, 0x04, 0xd6, + 0x76, 0x4a, 0x71, 0x38, 0x67, 0x54, 0xd2, 0xda, 0x36, 0xc0, 0xf9, 0xfa, 0xe4, 0x01, 0xac, 0x26, + 0xc6, 0x66, 0xa1, 0x71, 0x89, 0x93, 0x5b, 0x49, 0x88, 0x83, 0x5c, 0x75, 0xa3, 0x5c, 0xab, 0xba, + 0xd1, 0xbe, 0x86, 0xd5, 0x64, 0x3f, 0xe2, 0xfc, 0x54, 0x21, 0x79, 0x01, 0x63, 0xca, 0x82, 0x8c, + 0xca, 0x45, 0x19, 0xb5, 0x9f, 0x41, 0x6d, 0xe4, 0xd9, 0x41, 0x74, 0xe2, 0xc7, 0xdc, 0x7a, 0xe2, + 0x48, 0xfa, 0xaa, 0x12, 0x47, 0x9a, 0x06, 0x15, 0x7e, 0x38, 0xf3, 0x88, 0xbb, 0xbf, 0x31, 0xe8, + 0xee, 0x99, 0xc6, 0xb7, 0xba, 0xfa, 0x06, 0x01, 0xa8, 0xc8, 0xe7, 0x82, 0xa6, 0x41, 0xd3, 0x90, + 0xed, 0xd8, 0x63, 0x66, 0x3b, 0x2c, 0xe4, 0x12, 0xfc, 0xe0, 0x47, 0x89, 0x04, 0x3f, 0xf8, 0x91, + 0xf6, 0x17, 0x05, 0x68, 0x98, 0xa1, 0xed, 0x45, 0xb6, 0x30, 0xf7, 0xcf, 0xa0, 0x72, 0x82, 0x58, + 0x74, 0xa3, 0xc6, 0x82, 0x7f, 0x66, 0x17, 0xa3, 0x12, 0x48, 0xee, 0x40, 0xe5, 0xc4, 0xf6, 0x9c, + 0xa9, 0xd0, 0x5a, 0x85, 0xca, 0x51, 0x92, 0x1b, 0x95, 0xf3, 0xdc, 0xb8, 0x05, 0x2b, 0x33, 0x3b, + 0x7c, 0x6e, 0x8d, 0x4f, 0x6c, 0xef, 0x98, 0x45, 0xf2, 0x60, 0xa4, 0x05, 0x36, 0x38, 0x6b, 0x4f, + 0x70, 0xb4, 0xbf, 0x5f, 0x81, 0xf2, 0x37, 0x73, 0x16, 0x9e, 0x65, 0x04, 0xfa, 0xe0, 0xba, 0x02, + 0xc9, 0x17, 0x17, 0x2e, 0x4b, 0xca, 0x6f, 0x2f, 0x26, 0x65, 0x22, 0x53, 0x84, 0xc8, 0x95, 0x22, + 0x0b, 0x7c, 0x9a, 0x09, 0x63, 0xeb, 0x57, 0xd8, 0xda, 0x79, 0x70, 0x7b, 0x08, 0x95, 0x89, 0x3b, + 0x8d, 0x51, 0x75, 0x8b, 0xd5, 0x08, 0xee, 0xa5, 0xf3, 0x08, 0xd9, 0x54, 0xc2, 0xc8, 0xbb, 0xb0, + 0x22, 0x2a, 0x59, 0xeb, 0x07, 0xce, 0xc6, 0x82, 0x95, 0xf7, 0xa6, 0x48, 0x13, 0xbb, 0xff, 0x18, + 0xca, 0x7e, 0xc8, 0x37, 0x5f, 0xc7, 0x25, 0xef, 0x5c, 0x58, 0x72, 0xc8, 0xb9, 0x54, 0x80, 0xc8, + 0x87, 0x50, 0x3a, 0x71, 0xbd, 0x18, 0xb3, 0x46, 0x73, 0xfb, 0xf6, 0x05, 0xf0, 0x63, 0xd7, 0x8b, + 0x29, 0x42, 0x78, 0x98, 0x1f, 0xfb, 0x73, 0x2f, 0x6e, 0xdd, 0xc5, 0x0c, 0x23, 0x06, 0xe4, 0x1e, + 0x54, 0xfc, 0xc9, 0x24, 0x62, 0x31, 0x76, 0x96, 0xe5, 0x9d, 0xc2, 0xa7, 0x54, 0x12, 0xf8, 0x84, + 0xa9, 0x3b, 0x73, 0x63, 0xec, 0x43, 0xca, 0x54, 0x0c, 0xc8, 0x2e, 0xac, 0x8d, 0xfd, 0x59, 0xe0, + 0x4e, 0x99, 0x63, 0x8d, 0xe7, 0x61, 0xe4, 0x87, 0xad, 0x77, 0x2e, 0x1c, 0xd3, 0x9e, 0x44, 0xec, + 0x21, 0x80, 0x36, 0xc7, 0xb9, 0x31, 0x31, 0x60, 0x83, 0x79, 0x8e, 0xb5, 0xb8, 0xce, 0xfd, 0xd7, + 0xad, 0xb3, 0xce, 0x3c, 0x27, 0x4f, 0x4a, 0xc4, 0xc1, 0x48, 0x68, 0x61, 0xcc, 0x68, 0x6d, 0x60, + 0x90, 0xb9, 0x77, 0x69, 0xac, 0x14, 0xe2, 0x64, 0xc2, 0xf7, 0x6f, 0xc0, 0x2d, 0x19, 0x22, 0xad, + 0x80, 0x85, 0x13, 0x36, 0x8e, 0xad, 0x60, 0x6a, 0x7b, 0x58, 0xca, 0xa5, 0xc6, 0x4a, 0x24, 0xe4, + 0x50, 0x20, 0x0e, 0xa7, 0xb6, 0x47, 0x34, 0xa8, 0x3f, 0x67, 0x67, 0x91, 0xc5, 0x23, 0x29, 0x76, + 0xae, 0x29, 0xba, 0xc6, 0xe9, 0x43, 0x6f, 0x7a, 0x46, 0x7e, 0x02, 0x8d, 0xf8, 0xdc, 0xdb, 0xb0, + 0x61, 0x6d, 0xe4, 0x4e, 0x35, 0xe3, 0x8b, 0x34, 0x0b, 0x25, 0xf7, 0xa1, 0x2a, 0x35, 0xd4, 0xba, + 0x97, 0x5d, 0x3b, 0xa1, 0xf2, 0xc4, 0x3c, 0xb1, 0xdd, 0xa9, 0x7f, 0xca, 0x42, 0x6b, 0x16, 0xb5, + 0xda, 0xe2, 0xb6, 0x24, 0x21, 0x1d, 0x44, 0xdc, 0x4f, 0xa3, 0x38, 0xf4, 0xbd, 0xe3, 0xd6, 0x26, + 0xde, 0x93, 0xc8, 0xd1, 0xc5, 0xe0, 0xf7, 0x2e, 0x66, 0xfe, 0x7c, 0xf0, 0xfb, 0x1c, 0xee, 0x60, + 0x65, 0x66, 0x3d, 0x3b, 0xb3, 0xf2, 0x68, 0x0d, 0xd1, 0x1b, 0xc8, 0xdd, 0x3d, 0x3b, 0xcc, 0x4e, + 0x6a, 0x43, 0xcd, 0x71, 0xa3, 0xd8, 0xf5, 0xc6, 0x71, 0xab, 0x85, 0xef, 0x4c, 0xc7, 0xe4, 0x33, + 0xb8, 0x3d, 0x73, 0x3d, 0x2b, 0xb2, 0x27, 0xcc, 0x8a, 0x5d, 0xee, 0x9b, 0x6c, 0xec, 0x7b, 0x4e, + 0xd4, 0x7a, 0x80, 0x82, 0x93, 0x99, 0xeb, 0x8d, 0xec, 0x09, 0x33, 0xdd, 0x19, 0x1b, 0x09, 0x0e, + 0xf9, 0x08, 0xd6, 0x11, 0x1e, 0xb2, 0x60, 0xea, 0x8e, 0x6d, 0xf1, 0xfa, 0x1f, 0xe1, 0xeb, 0xd7, + 0x38, 0x83, 0x0a, 0x3a, 0xbe, 0xfa, 0x63, 0x68, 0x06, 0x2c, 0x8c, 0xdc, 0x28, 0xb6, 0xa4, 0x45, + 0xbf, 0x97, 0xd5, 0xda, 0xaa, 0x64, 0x0e, 0x91, 0xd7, 0xfe, 0xcf, 0x02, 0x54, 0x84, 0x73, 0x92, + 0x4f, 0x41, 0xf1, 0x03, 0xbc, 0x06, 0x69, 0x6e, 0x6f, 0x5e, 0xe2, 0xc1, 0x9d, 0x61, 0xc0, 0xeb, + 0x5e, 0x3f, 0xa4, 0x8a, 0x1f, 0xdc, 0xb8, 0x28, 0xd4, 0xfe, 0x10, 0x6a, 0xc9, 0x02, 0xbc, 0xbc, + 0xe8, 0xeb, 0xa3, 0x91, 0x65, 0x3e, 0xee, 0x0e, 0xd4, 0x02, 0xb9, 0x03, 0x24, 0x1d, 0x5a, 0x43, + 0x6a, 0xe9, 0xdf, 0x1c, 0x75, 0xfb, 0xaa, 0x82, 0x5d, 0x1a, 0xd5, 0xbb, 0xa6, 0x4e, 0x05, 0xb2, + 0x48, 0xee, 0xc1, 0xed, 0x2c, 0xe5, 0x1c, 0x5c, 0xc2, 0x14, 0x8c, 0x8f, 0x65, 0x52, 0x01, 0xc5, + 0x18, 0xa8, 0x15, 0x9e, 0x16, 0xf4, 0xef, 0x8d, 0x91, 0x39, 0x52, 0xab, 0xed, 0xbf, 0x29, 0x40, + 0x19, 0xc3, 0x06, 0x3f, 0x9f, 0x54, 0x72, 0x71, 0x5d, 0x73, 0x5e, 0xb9, 0x1a, 0xd9, 0x92, 0xaa, + 0x81, 0x01, 0x65, 0x73, 0x79, 0xf4, 0xf9, 0xb5, 0xd6, 0x53, 0x3f, 0x85, 0x12, 0x8f, 0x52, 0xbc, + 0x43, 0x1c, 0xd2, 0x9e, 0x4e, 0xad, 0x47, 0x06, 0x1d, 0xf1, 0x2a, 0x97, 0x40, 0xb3, 0x3b, 0xd8, + 0xd3, 0x47, 0xe6, 0x30, 0xa1, 0xa1, 0x56, 0x1e, 0x19, 0x7d, 0x33, 0x45, 0x15, 0xb5, 0x9f, 0xd7, + 0x60, 0x35, 0x89, 0x09, 0x22, 0x82, 0x3e, 0x82, 0x46, 0x10, 0xba, 0x33, 0x3b, 0x3c, 0x8b, 0xc6, + 0xb6, 0x87, 0x49, 0x01, 0xb6, 0x7f, 0xb4, 0x24, 0xaa, 0x88, 0x1d, 0x1d, 0x0a, 0xec, 0x68, 0x6c, + 0x7b, 0x34, 0x3b, 0x91, 0xf4, 0x61, 0x75, 0xc6, 0xc2, 0x63, 0xf6, 0x7b, 0xbe, 0xeb, 0xe1, 0x4a, + 0x55, 0x8c, 0xc8, 0xef, 0x5f, 0xba, 0xd2, 0x01, 0x47, 0xff, 0x8e, 0xef, 0x7a, 0xb8, 0x56, 0x7e, + 0x32, 0xf9, 0x04, 0xea, 0xa2, 0x12, 0x72, 0xd8, 0x04, 0x63, 0xc5, 0xb2, 0xda, 0x4f, 0xd4, 0xe8, + 0x3d, 0x36, 0xc9, 0xc4, 0x65, 0xb8, 0x34, 0x2e, 0x37, 0xb2, 0x71, 0xf9, 0xcd, 0x6c, 0x2c, 0x5a, + 0x11, 0x55, 0x78, 0x1a, 0x84, 0x2e, 0x38, 0x7c, 0x6b, 0x89, 0xc3, 0x77, 0x60, 0x23, 0xf1, 0x55, + 0xcb, 0xf5, 0x26, 0xee, 0x4b, 0x2b, 0x72, 0x5f, 0x89, 0xd8, 0x53, 0xa6, 0xeb, 0x09, 0xcb, 0xe0, + 0x9c, 0x91, 0xfb, 0x8a, 0x11, 0x23, 0xe9, 0xe0, 0x64, 0x0e, 0x5c, 0xc5, 0xab, 0xc9, 0xf7, 0x2e, + 0x55, 0x8f, 0x68, 0xbe, 0x64, 0x46, 0xcc, 0x4d, 0x6d, 0xff, 0x52, 0x81, 0x46, 0xe6, 0x1c, 0x78, + 0xf6, 0x16, 0xca, 0x42, 0x61, 0xc5, 0x55, 0x94, 0x50, 0x1f, 0x4a, 0xfa, 0x26, 0xd4, 0xa3, 0xd8, + 0x0e, 0x63, 0x8b, 0x17, 0x57, 0xb2, 0xdd, 0x45, 0xc2, 0x13, 0x76, 0x46, 0x3e, 0x80, 0x35, 0xc1, + 0x74, 0xbd, 0xf1, 0x74, 0x1e, 0xb9, 0xa7, 0xa2, 0x99, 0xaf, 0xd1, 0x26, 0x92, 0x8d, 0x84, 0x4a, + 0xee, 0x42, 0x95, 0x67, 0x21, 0xbe, 0x86, 0x68, 0xfa, 0x2a, 0xcc, 0x73, 0xf8, 0x0a, 0x0f, 0x60, + 0x95, 0x33, 0xce, 0xe7, 0x57, 0xc4, 0x2d, 0x33, 0xf3, 0x9c, 0xf3, 0xd9, 0x1d, 0xd8, 0x10, 0xaf, + 0x09, 0x44, 0xf1, 0x2a, 0x2b, 0xdc, 0x3b, 0xa8, 0xd8, 0x75, 0x64, 0xc9, 0xb2, 0x56, 0x14, 0x9c, + 0x1f, 0x01, 0xcf, 0x5e, 0x0b, 0xe8, 0xbb, 0x22, 0x94, 0x31, 0xcf, 0xc9, 0x61, 0x77, 0xe1, 0x1d, + 0x8e, 0x9d, 0x7b, 0x76, 0x10, 0x4c, 0x5d, 0xe6, 0x58, 0x53, 0xff, 0x18, 0x43, 0x66, 0x14, 0xdb, + 0xb3, 0xc0, 0x9a, 0x47, 0xad, 0x0d, 0x0c, 0x99, 0x6d, 0xe6, 0x39, 0x47, 0x09, 0xa8, 0xef, 0x1f, + 0x9b, 0x09, 0xe4, 0x28, 0x6a, 0xff, 0x3e, 0xac, 0xe6, 0xec, 0x71, 0x41, 0xa7, 0x35, 0x74, 0xfe, + 0x8c, 0x4e, 0xdf, 0x85, 0x95, 0x20, 0x64, 0xe7, 0xa2, 0xd5, 0x51, 0xb4, 0x86, 0xa0, 0x09, 0xb1, + 0xb6, 0x60, 0x05, 0x79, 0x96, 0x20, 0xe6, 0xf3, 0x63, 0x03, 0x59, 0x87, 0xc8, 0x69, 0xbf, 0x80, + 0x95, 0xec, 0x69, 0x93, 0x77, 0x33, 0x69, 0xa1, 0x99, 0xcb, 0x93, 0x69, 0x76, 0x48, 0x2a, 0xb2, + 0xf5, 0x4b, 0x2a, 0x32, 0x72, 0x9d, 0x8a, 0x4c, 0xfb, 0x2f, 0xd9, 0x9c, 0x65, 0x2a, 0x84, 0x9f, + 0x41, 0x2d, 0x90, 0xf5, 0x38, 0x5a, 0x52, 0xfe, 0x12, 0x3e, 0x0f, 0xee, 0x24, 0x95, 0x3b, 0x4d, + 0xe7, 0xb4, 0xff, 0x56, 0x81, 0x5a, 0x5a, 0xd0, 0xe7, 0x2c, 0xef, 0xcd, 0x05, 0xcb, 0x3b, 0x90, + 0x1a, 0x16, 0x0a, 0x7c, 0x1b, 0xa3, 0xc5, 0x27, 0xaf, 0x7f, 0xd7, 0xc5, 0xb6, 0xe7, 0x34, 0xdb, + 0xf6, 0x6c, 0xbe, 0xae, 0xed, 0xf9, 0xe4, 0xa2, 0xc1, 0xbf, 0x95, 0xe9, 0x2d, 0x16, 0xcc, 0xbe, + 0xfd, 0x7d, 0xae, 0x0f, 0xca, 0x26, 0x84, 0x77, 0xc4, 0x7e, 0xd2, 0x84, 0x90, 0xb6, 0x3f, 0xf7, + 0xaf, 0xd7, 0xfe, 0x6c, 0x43, 0x45, 0xea, 0xfc, 0x0e, 0x54, 0x64, 0x4d, 0x27, 0x1b, 0x04, 0x31, + 0x3a, 0x6f, 0x10, 0x0a, 0xb2, 0x4e, 0xd7, 0x7e, 0xae, 0x40, 0x59, 0x0f, 0x43, 0x3f, 0xd4, 0xfe, + 0x48, 0x81, 0x3a, 0x3e, 0xed, 0xf9, 0x0e, 0xe3, 0xd9, 0x60, 0xb7, 0xdb, 0xb3, 0xa8, 0xfe, 0xcd, + 0x91, 0x8e, 0xd9, 0xa0, 0x0d, 0x77, 0xf6, 0x86, 0x83, 0xbd, 0x23, 0x4a, 0xf5, 0x81, 0x69, 0x99, + 0xb4, 0x3b, 0x18, 0xf1, 0xb6, 0x67, 0x38, 0x50, 0x15, 0x9e, 0x29, 0x8c, 0x81, 0xa9, 0xd3, 0x41, + 0xb7, 0x6f, 0x89, 0x56, 0xb4, 0x88, 0x77, 0xb3, 0xba, 0xde, 0xb3, 0xf0, 0xd6, 0x51, 0x2d, 0xf1, + 0x96, 0xd5, 0x34, 0x0e, 0xf4, 0xe1, 0x91, 0xa9, 0x96, 0xc9, 0x6d, 0x58, 0x3f, 0xd4, 0xe9, 0x81, + 0x31, 0x1a, 0x19, 0xc3, 0x81, 0xd5, 0xd3, 0x07, 0x86, 0xde, 0x53, 0x2b, 0x7c, 0x9d, 0x5d, 0x63, + 0xdf, 0xec, 0xee, 0xf6, 0x75, 0xb9, 0x4e, 0x95, 0x6c, 0xc2, 0x5b, 0x7b, 0xc3, 0x83, 0x03, 0xc3, + 0x34, 0xf5, 0x9e, 0xb5, 0x7b, 0x64, 0x5a, 0x23, 0xd3, 0xe8, 0xf7, 0xad, 0xee, 0xe1, 0x61, 0xff, + 0x29, 0x4f, 0x60, 0x35, 0x72, 0x17, 0x36, 0xf6, 0xba, 0x87, 0xdd, 0x5d, 0xa3, 0x6f, 0x98, 0x4f, + 0xad, 0x9e, 0x31, 0xe2, 0xf3, 0x7b, 0x6a, 0x9d, 0x27, 0x6c, 0x93, 0x3e, 0xb5, 0xba, 0x7d, 0x14, + 0xcd, 0xd4, 0xad, 0xdd, 0xee, 0xde, 0x13, 0x7d, 0xd0, 0x53, 0x81, 0x0b, 0x30, 0xea, 0x3e, 0xd2, + 0x2d, 0x2e, 0x92, 0x65, 0x0e, 0x87, 0xd6, 0xb0, 0xdf, 0x53, 0x1b, 0xda, 0xbf, 0x14, 0xa1, 0xb4, + 0xe7, 0x47, 0x31, 0xf7, 0x46, 0xe1, 0xac, 0x2f, 0x42, 0x37, 0x66, 0xa2, 0x7f, 0x2b, 0x53, 0xd1, + 0x4b, 0x7f, 0x87, 0x24, 0x1e, 0x50, 0x32, 0x10, 0xeb, 0xd9, 0x19, 0xc7, 0x29, 0x88, 0x5b, 0x3b, + 0xc7, 0xed, 0x72, 0xb2, 0x88, 0x68, 0x78, 0x85, 0x23, 0xd7, 0x2b, 0x22, 0x4e, 0x06, 0x61, 0xb9, + 0xe0, 0xc7, 0x40, 0xb2, 0x20, 0xb9, 0x62, 0x09, 0x91, 0x6a, 0x06, 0x29, 0x96, 0xdc, 0x01, 0x18, + 0xfb, 0xb3, 0x99, 0x1b, 0x8f, 0xfd, 0x28, 0x96, 0x5f, 0xc8, 0xda, 0x39, 0x63, 0x8f, 0x62, 0x6e, + 0xf1, 0x33, 0x37, 0xe6, 0x8f, 0x34, 0x83, 0x26, 0x3b, 0x70, 0xcf, 0x0e, 0x82, 0xd0, 0x7f, 0xe9, + 0xce, 0xec, 0x98, 0x59, 0xdc, 0x73, 0xed, 0x63, 0x66, 0x39, 0x6c, 0x1a, 0xdb, 0xd8, 0x13, 0x95, + 0xe9, 0xdd, 0x0c, 0x60, 0x24, 0xf8, 0x3d, 0xce, 0xe6, 0x71, 0xd7, 0x75, 0xac, 0x88, 0xfd, 0x30, + 0xe7, 0x1e, 0x60, 0xcd, 0x03, 0xc7, 0xe6, 0x62, 0xd6, 0x45, 0x96, 0x72, 0x9d, 0x91, 0xe4, 0x1c, + 0x09, 0x46, 0xfb, 0x15, 0xc0, 0xb9, 0x14, 0x64, 0x1b, 0x6e, 0xf3, 0x3a, 0x9e, 0x45, 0x31, 0x73, + 0x2c, 0xb9, 0xdb, 0x60, 0x1e, 0x47, 0x18, 0xe2, 0xcb, 0x74, 0x23, 0x65, 0xca, 0x9b, 0xc2, 0x79, + 0x1c, 0x91, 0x9f, 0x40, 0xeb, 0xc2, 0x1c, 0x87, 0x4d, 0x19, 0x7f, 0x6d, 0x15, 0xa7, 0xdd, 0x59, + 0x98, 0xd6, 0x13, 0x5c, 0xed, 0x4f, 0x14, 0x80, 0x7d, 0x16, 0x53, 0xc1, 0xcd, 0x34, 0xb6, 0x95, + 0xeb, 0x36, 0xb6, 0xef, 0x27, 0x17, 0x08, 0xc5, 0xab, 0x63, 0xc0, 0x42, 0x97, 0xa1, 0xdc, 0xa4, + 0xcb, 0xc8, 0x35, 0x11, 0xc5, 0x2b, 0x9a, 0x88, 0x52, 0xae, 0x89, 0xf8, 0x18, 0x9a, 0xf6, 0x74, + 0xea, 0xbf, 0xe0, 0x05, 0x0d, 0x0b, 0x43, 0xe6, 0xa0, 0x11, 0x9c, 0xd7, 0xdb, 0xc8, 0xec, 0x49, + 0x9e, 0xf6, 0xe7, 0x0a, 0x34, 0x50, 0x15, 0x51, 0xe0, 0x7b, 0x11, 0x23, 0x5f, 0x42, 0x45, 0x5e, + 0x44, 0x8b, 0x8b, 0xfc, 0xb7, 0x33, 0xb2, 0x66, 0x70, 0xb2, 0x68, 0xa0, 0x12, 0xcc, 0x33, 0x42, + 0xe6, 0x75, 0x97, 0x2b, 0x25, 0x45, 0x91, 0xfb, 0x50, 0x73, 0x3d, 0x4b, 0xb4, 0xd4, 0x95, 0x4c, + 0x58, 0xac, 0xba, 0x1e, 0xd6, 0xb2, 0xed, 0x57, 0x50, 0x11, 0x2f, 0x21, 0x9d, 0x54, 0xa6, 0x8b, + 0xfa, 0xcb, 0xdc, 0x1c, 0xa7, 0xc2, 0xc8, 0xc3, 0x29, 0xbd, 0x2e, 0x40, 0xb7, 0xa0, 0x7a, 0xca, + 0x9b, 0x0f, 0xbc, 0xf4, 0xe3, 0xea, 0x4d, 0x86, 0xda, 0x1f, 0x97, 0x00, 0x0e, 0xe7, 0x4b, 0x0c, + 0xa4, 0x71, 0x5d, 0x03, 0xe9, 0xe4, 0xf4, 0xf8, 0x7a, 0x99, 0x7f, 0x75, 0x43, 0x59, 0xd2, 0x69, + 0x17, 0x6f, 0xda, 0x69, 0xdf, 0x87, 0x6a, 0x1c, 0xce, 0xb9, 0xa3, 0x08, 0x63, 0x4a, 0x5b, 0x5a, + 0x49, 0x25, 0x6f, 0x42, 0x79, 0xe2, 0x87, 0x63, 0x86, 0x8e, 0x95, 0xb2, 0x05, 0xed, 0xc2, 0x65, + 0x52, 0xed, 0xb2, 0xcb, 0x24, 0xde, 0xa0, 0x45, 0xf2, 0x1e, 0x0d, 0x0b, 0x99, 0x7c, 0x83, 0x96, + 0x5c, 0xb1, 0xd1, 0x14, 0x44, 0xbe, 0x81, 0xa6, 0x3d, 0x8f, 0x7d, 0xcb, 0xe5, 0x15, 0xda, 0xd4, + 0x1d, 0x9f, 0x61, 0xd9, 0xdd, 0xcc, 0x7f, 0xaf, 0x4f, 0x0f, 0xaa, 0xd3, 0x9d, 0xc7, 0xbe, 0xe1, + 0x1c, 0x22, 0x72, 0xa7, 0x2a, 0x93, 0x12, 0x5d, 0xb1, 0x33, 0x64, 0xed, 0xc7, 0xb0, 0x92, 0x85, + 0xf1, 0x04, 0x24, 0x81, 0xea, 0x1b, 0x3c, 0x3b, 0x8d, 0x78, 0x6a, 0x1b, 0x98, 0x46, 0xb7, 0xaf, + 0x16, 0xb4, 0x18, 0x1a, 0xb8, 0xbc, 0xf4, 0x8e, 0xeb, 0xba, 0xfd, 0x03, 0x28, 0x61, 0xf8, 0x55, + 0x2e, 0x7c, 0x0f, 0xc1, 0x98, 0x8b, 0xcc, 0xbc, 0xf9, 0x15, 0xb3, 0xe6, 0xf7, 0xdf, 0x05, 0x58, + 0x31, 0xfd, 0xf9, 0xf8, 0xe4, 0xa2, 0x01, 0xc2, 0xaf, 0x3b, 0x42, 0x2d, 0x31, 0x1f, 0xe5, 0xa6, + 0xe6, 0x93, 0x5a, 0x47, 0x71, 0x89, 0x75, 0xdc, 0xf4, 0xcc, 0xb5, 0x2f, 0x60, 0x55, 0x6e, 0x5e, + 0x6a, 0x3d, 0xd1, 0x66, 0xe1, 0x0a, 0x6d, 0x6a, 0xbf, 0x50, 0x60, 0x55, 0xc4, 0xf7, 0xff, 0xbb, + 0xd2, 0x2a, 0x37, 0x0c, 0xeb, 0xe5, 0x1b, 0x5d, 0x1e, 0xfd, 0xbf, 0xf4, 0x34, 0x6d, 0x08, 0xcd, + 0x44, 0x7d, 0x37, 0x50, 0xfb, 0x15, 0x46, 0xfc, 0x8b, 0x02, 0x34, 0x06, 0xec, 0xe5, 0x92, 0x20, + 0x5a, 0xbe, 0xee, 0x71, 0x7c, 0x98, 0x2b, 0x57, 0x1b, 0xdb, 0xeb, 0x59, 0x19, 0xc4, 0xd5, 0x63, + 0x52, 0xc1, 0xa6, 0xb7, 0xa8, 0xca, 0xf2, 0x5b, 0xd4, 0xd2, 0x62, 0xb7, 0x9e, 0xb9, 0xc5, 0x2b, + 0x2e, 0xbb, 0xc5, 0xd3, 0xfe, 0xad, 0x08, 0x0d, 0x6c, 0x90, 0x29, 0x8b, 0xe6, 0xd3, 0x38, 0x27, + 0x4c, 0xe1, 0x6a, 0x61, 0x3a, 0x50, 0x09, 0x71, 0x92, 0x74, 0xa5, 0x4b, 0x83, 0xbf, 0x40, 0x61, + 0x6b, 0xfc, 0xdc, 0x0d, 0x02, 0xe6, 0x58, 0x82, 0x92, 0x14, 0x30, 0x4d, 0x49, 0x16, 0x22, 0x44, + 0xbc, 0xfc, 0x9c, 0xf9, 0x21, 0x4b, 0x51, 0x45, 0xbc, 0x4f, 0x68, 0x70, 0x5a, 0x02, 0xc9, 0xdd, + 0x37, 0x88, 0xca, 0xe0, 0xfc, 0xbe, 0x21, 0xed, 0x35, 0x91, 0x5b, 0x47, 0xae, 0xe8, 0x35, 0x91, + 0xcd, 0xbb, 0xa8, 0x99, 0x3d, 0x9d, 0x5a, 0x7e, 0x10, 0xa1, 0xd3, 0xd4, 0x68, 0x0d, 0x09, 0xc3, + 0x20, 0x22, 0x5f, 0x43, 0x7a, 0x5d, 0x2c, 0x6f, 0xc9, 0xc5, 0x39, 0xb6, 0x2e, 0xbb, 0x58, 0xa0, + 0xab, 0xe3, 0xdc, 0xfd, 0xcf, 0x92, 0x1b, 0xea, 0xca, 0x4d, 0x6f, 0xa8, 0x1f, 0x42, 0x59, 0xc4, + 0xa8, 0xda, 0xeb, 0x62, 0x94, 0xc0, 0x65, 0xed, 0xb3, 0x91, 0xb7, 0xcf, 0x5f, 0x16, 0x80, 0x74, + 0xa7, 0x53, 0x7f, 0x6c, 0xc7, 0xcc, 0x70, 0xa2, 0x8b, 0x66, 0x7a, 0xed, 0xcf, 0x2e, 0x9f, 0x41, + 0x7d, 0xe6, 0x3b, 0x6c, 0x6a, 0x25, 0xdf, 0x94, 0x2e, 0xad, 0x7e, 0x10, 0xc6, 0x5b, 0x52, 0x02, + 0x25, 0xbc, 0xc4, 0x51, 0xb0, 0xee, 0xc0, 0x67, 0xde, 0x84, 0xcd, 0xec, 0x97, 0xb2, 0x14, 0xe1, + 0x8f, 0xa4, 0x03, 0xd5, 0x90, 0x45, 0x2c, 0x3c, 0x65, 0x57, 0x16, 0x55, 0x09, 0x48, 0x7b, 0x06, + 0x1b, 0xb9, 0x1d, 0x49, 0x47, 0xbe, 0x85, 0x5f, 0x2b, 0xc3, 0x58, 0x7e, 0xb4, 0x12, 0x03, 0xfe, + 0x3a, 0xe6, 0x25, 0x9f, 0x41, 0xf9, 0x63, 0xea, 0xf0, 0xc5, 0xab, 0xe2, 0xec, 0x1e, 0xa8, 0x59, + 0x4d, 0xbb, 0x63, 0x0c, 0x36, 0xf2, 0x54, 0x0a, 0xd7, 0x3b, 0x15, 0xed, 0xef, 0x0a, 0xb0, 0xde, + 0x75, 0x1c, 0xf1, 0x77, 0xc3, 0x25, 0xaa, 0x2f, 0x5e, 0x57, 0xf5, 0x0b, 0x81, 0x58, 0x84, 0x89, + 0x6b, 0x05, 0xe2, 0x0f, 0xa1, 0x92, 0xd6, 0x5a, 0xc5, 0x05, 0x77, 0x16, 0x72, 0x51, 0x09, 0xd0, + 0x6e, 0x01, 0xc9, 0x0a, 0x2b, 0xb4, 0xaa, 0xfd, 0x69, 0x11, 0xee, 0xee, 0xb2, 0x63, 0xd7, 0xcb, + 0xbe, 0xe2, 0x57, 0xdf, 0xc9, 0xc5, 0x4f, 0x65, 0x9f, 0xc1, 0xba, 0x28, 0xe4, 0x93, 0x7f, 0x62, + 0x59, 0xec, 0x58, 0x7e, 0x9d, 0x94, 0xb1, 0x6a, 0x0d, 0xf9, 0x07, 0x92, 0xad, 0xe3, 0x7f, 0xc5, + 0x1c, 0x3b, 0xb6, 0x9f, 0xd9, 0x11, 0xb3, 0x5c, 0x47, 0xfe, 0x59, 0x06, 0x12, 0x92, 0xe1, 0x90, + 0x21, 0x94, 0xb8, 0x0d, 0xa2, 0xeb, 0x36, 0xb7, 0xb7, 0x33, 0x62, 0x5d, 0xb2, 0x95, 0xac, 0x02, + 0x0f, 0x7c, 0x87, 0xed, 0x54, 0x8f, 0x06, 0x4f, 0x06, 0xc3, 0xef, 0x06, 0x14, 0x17, 0x22, 0x06, + 0xdc, 0x0a, 0x42, 0x76, 0xea, 0xfa, 0xf3, 0xc8, 0xca, 0x9e, 0x44, 0xf5, 0xca, 0x94, 0xb8, 0x91, + 0xcc, 0xc9, 0x10, 0xb5, 0x9f, 0xc2, 0xda, 0xc2, 0xcb, 0x78, 0x6d, 0x26, 0x5f, 0xa7, 0xbe, 0x41, + 0x56, 0xa1, 0x8e, 0x1f, 0xbb, 0x97, 0x7f, 0xfb, 0xd6, 0xfe, 0xb5, 0x80, 0x57, 0x4c, 0x33, 0x37, + 0xbe, 0x59, 0x06, 0xfb, 0xcd, 0x7c, 0x06, 0x83, 0xed, 0x77, 0xf3, 0xe6, 0x9b, 0x59, 0xb0, 0xf3, + 0xad, 0x00, 0xa6, 0x41, 0xa4, 0x6d, 0x43, 0x55, 0xd2, 0xc8, 0x6f, 0xc1, 0x5a, 0xe8, 0xfb, 0x71, + 0xd2, 0x89, 0x8a, 0x0e, 0xe4, 0xf2, 0x3f, 0xdb, 0xac, 0x72, 0xb0, 0x48, 0x06, 0x4f, 0xf2, 0xbd, + 0x48, 0x59, 0xfc, 0x0d, 0x44, 0x0e, 0x77, 0x1b, 0xbf, 0x5b, 0x4f, 0xff, 0xb7, 0xfb, 0xbf, 0x01, + 0x00, 0x00, 0xff, 0xff, 0x35, 0x9f, 0x30, 0x98, 0xf2, 0x2b, 0x00, 0x00, +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.proto b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.proto new file mode 100755 index 000000000..497b4d9a9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.proto @@ -0,0 +1,551 @@ +syntax = "proto2"; +option go_package = "datastore"; + +package appengine; + +message Action{} + +message PropertyValue { + optional int64 int64Value = 1; + optional bool booleanValue = 2; + optional string stringValue = 3; + optional double doubleValue = 4; + + optional group PointValue = 5 { + required double x = 6; + required double y = 7; + } + + optional group UserValue = 8 { + required string email = 9; + required string auth_domain = 10; + optional string nickname = 11; + optional string federated_identity = 21; + optional string federated_provider = 22; + } + + optional group ReferenceValue = 12 { + required string app = 13; + optional string name_space = 20; + repeated group PathElement = 14 { + required string type = 15; + optional int64 id = 16; + optional string name = 17; + } + } +} + +message Property { + enum Meaning { + NO_MEANING = 0; + BLOB = 14; + TEXT = 15; + BYTESTRING = 16; + + ATOM_CATEGORY = 1; + ATOM_LINK = 2; + ATOM_TITLE = 3; + ATOM_CONTENT = 4; + ATOM_SUMMARY = 5; + ATOM_AUTHOR = 6; + + GD_WHEN = 7; + GD_EMAIL = 8; + GEORSS_POINT = 9; + GD_IM = 10; + + GD_PHONENUMBER = 11; + GD_POSTALADDRESS = 12; + + GD_RATING = 13; + + BLOBKEY = 17; + ENTITY_PROTO = 19; + + INDEX_VALUE = 18; + }; + + optional Meaning meaning = 1 [default = NO_MEANING]; + optional string meaning_uri = 2; + + required string name = 3; + + required PropertyValue value = 5; + + required bool multiple = 4; + + optional bool searchable = 6 [default=false]; + + enum FtsTokenizationOption { + HTML = 1; + ATOM = 2; + } + + optional FtsTokenizationOption fts_tokenization_option = 8; + + optional string locale = 9 [default = "en"]; +} + +message Path { + repeated group Element = 1 { + required string type = 2; + optional int64 id = 3; + optional string name = 4; + } +} + +message Reference { + required string app = 13; + optional string name_space = 20; + required Path path = 14; +} + +message User { + required string email = 1; + required string auth_domain = 2; + optional string nickname = 3; + optional string federated_identity = 6; + optional string federated_provider = 7; +} + +message EntityProto { + required Reference key = 13; + required Path entity_group = 16; + optional User owner = 17; + + enum Kind { + GD_CONTACT = 1; + GD_EVENT = 2; + GD_MESSAGE = 3; + } + optional Kind kind = 4; + optional string kind_uri = 5; + + repeated Property property = 14; + repeated Property raw_property = 15; + + optional int32 rank = 18; +} + +message CompositeProperty { + required int64 index_id = 1; + repeated string value = 2; +} + +message Index { + required string entity_type = 1; + required bool ancestor = 5; + repeated group Property = 2 { + required string name = 3; + enum Direction { + ASCENDING = 1; + DESCENDING = 2; + } + optional Direction direction = 4 [default = ASCENDING]; + } +} + +message CompositeIndex { + required string app_id = 1; + required int64 id = 2; + required Index definition = 3; + + enum State { + WRITE_ONLY = 1; + READ_WRITE = 2; + DELETED = 3; + ERROR = 4; + } + required State state = 4; + + optional bool only_use_if_required = 6 [default = false]; +} + +message IndexPostfix { + message IndexValue { + required string property_name = 1; + required PropertyValue value = 2; + } + + repeated IndexValue index_value = 1; + + optional Reference key = 2; + + optional bool before = 3 [default=true]; +} + +message IndexPosition { + optional string key = 1; + + optional bool before = 2 [default=true]; +} + +message Snapshot { + enum Status { + INACTIVE = 0; + ACTIVE = 1; + } + + required int64 ts = 1; +} + +message InternalHeader { + optional string qos = 1; +} + +message Transaction { + optional InternalHeader header = 4; + required fixed64 handle = 1; + required string app = 2; + optional bool mark_changes = 3 [default = false]; +} + +message Query { + optional InternalHeader header = 39; + + required string app = 1; + optional string name_space = 29; + + optional string kind = 3; + optional Reference ancestor = 17; + + repeated group Filter = 4 { + enum Operator { + LESS_THAN = 1; + LESS_THAN_OR_EQUAL = 2; + GREATER_THAN = 3; + GREATER_THAN_OR_EQUAL = 4; + EQUAL = 5; + IN = 6; + EXISTS = 7; + } + + required Operator op = 6; + repeated Property property = 14; + } + + optional string search_query = 8; + + repeated group Order = 9 { + enum Direction { + ASCENDING = 1; + DESCENDING = 2; + } + + required string property = 10; + optional Direction direction = 11 [default = ASCENDING]; + } + + enum Hint { + ORDER_FIRST = 1; + ANCESTOR_FIRST = 2; + FILTER_FIRST = 3; + } + optional Hint hint = 18; + + optional int32 count = 23; + + optional int32 offset = 12 [default = 0]; + + optional int32 limit = 16; + + optional CompiledCursor compiled_cursor = 30; + optional CompiledCursor end_compiled_cursor = 31; + + repeated CompositeIndex composite_index = 19; + + optional bool require_perfect_plan = 20 [default = false]; + + optional bool keys_only = 21 [default = false]; + + optional Transaction transaction = 22; + + optional bool compile = 25 [default = false]; + + optional int64 failover_ms = 26; + + optional bool strong = 32; + + repeated string property_name = 33; + + repeated string group_by_property_name = 34; + + optional bool distinct = 24; + + optional int64 min_safe_time_seconds = 35; + + repeated string safe_replica_name = 36; + + optional bool persist_offset = 37 [default=false]; +} + +message CompiledQuery { + required group PrimaryScan = 1 { + optional string index_name = 2; + + optional string start_key = 3; + optional bool start_inclusive = 4; + optional string end_key = 5; + optional bool end_inclusive = 6; + + repeated string start_postfix_value = 22; + repeated string end_postfix_value = 23; + + optional int64 end_unapplied_log_timestamp_us = 19; + } + + repeated group MergeJoinScan = 7 { + required string index_name = 8; + + repeated string prefix_value = 9; + + optional bool value_prefix = 20 [default=false]; + } + + optional Index index_def = 21; + + optional int32 offset = 10 [default = 0]; + + optional int32 limit = 11; + + required bool keys_only = 12; + + repeated string property_name = 24; + + optional int32 distinct_infix_size = 25; + + optional group EntityFilter = 13 { + optional bool distinct = 14 [default=false]; + + optional string kind = 17; + optional Reference ancestor = 18; + } +} + +message CompiledCursor { + optional group Position = 2 { + optional string start_key = 27; + + repeated group IndexValue = 29 { + optional string property = 30; + required PropertyValue value = 31; + } + + optional Reference key = 32; + + optional bool start_inclusive = 28 [default=true]; + } +} + +message Cursor { + required fixed64 cursor = 1; + + optional string app = 2; +} + +message Error { + enum ErrorCode { + BAD_REQUEST = 1; + CONCURRENT_TRANSACTION = 2; + INTERNAL_ERROR = 3; + NEED_INDEX = 4; + TIMEOUT = 5; + PERMISSION_DENIED = 6; + BIGTABLE_ERROR = 7; + COMMITTED_BUT_STILL_APPLYING = 8; + CAPABILITY_DISABLED = 9; + TRY_ALTERNATE_BACKEND = 10; + SAFE_TIME_TOO_OLD = 11; + } +} + +message Cost { + optional int32 index_writes = 1; + optional int32 index_write_bytes = 2; + optional int32 entity_writes = 3; + optional int32 entity_write_bytes = 4; + optional group CommitCost = 5 { + optional int32 requested_entity_puts = 6; + optional int32 requested_entity_deletes = 7; + }; + optional int32 approximate_storage_delta = 8; + optional int32 id_sequence_updates = 9; +} + +message GetRequest { + optional InternalHeader header = 6; + + repeated Reference key = 1; + optional Transaction transaction = 2; + + optional int64 failover_ms = 3; + + optional bool strong = 4; + + optional bool allow_deferred = 5 [default=false]; +} + +message GetResponse { + repeated group Entity = 1 { + optional EntityProto entity = 2; + optional Reference key = 4; + + optional int64 version = 3; + } + + repeated Reference deferred = 5; + + optional bool in_order = 6 [default=true]; +} + +message PutRequest { + optional InternalHeader header = 11; + + repeated EntityProto entity = 1; + optional Transaction transaction = 2; + repeated CompositeIndex composite_index = 3; + + optional bool trusted = 4 [default = false]; + + optional bool force = 7 [default = false]; + + optional bool mark_changes = 8 [default = false]; + repeated Snapshot snapshot = 9; + + enum AutoIdPolicy { + CURRENT = 0; + SEQUENTIAL = 1; + } + optional AutoIdPolicy auto_id_policy = 10 [default = CURRENT]; +} + +message PutResponse { + repeated Reference key = 1; + optional Cost cost = 2; + repeated int64 version = 3; +} + +message TouchRequest { + optional InternalHeader header = 10; + + repeated Reference key = 1; + repeated CompositeIndex composite_index = 2; + optional bool force = 3 [default = false]; + repeated Snapshot snapshot = 9; +} + +message TouchResponse { + optional Cost cost = 1; +} + +message DeleteRequest { + optional InternalHeader header = 10; + + repeated Reference key = 6; + optional Transaction transaction = 5; + + optional bool trusted = 4 [default = false]; + + optional bool force = 7 [default = false]; + + optional bool mark_changes = 8 [default = false]; + repeated Snapshot snapshot = 9; +} + +message DeleteResponse { + optional Cost cost = 1; + repeated int64 version = 3; +} + +message NextRequest { + optional InternalHeader header = 5; + + required Cursor cursor = 1; + optional int32 count = 2; + + optional int32 offset = 4 [default = 0]; + + optional bool compile = 3 [default = false]; +} + +message QueryResult { + optional Cursor cursor = 1; + + repeated EntityProto result = 2; + + optional int32 skipped_results = 7; + + required bool more_results = 3; + + optional bool keys_only = 4; + + optional bool index_only = 9; + + optional bool small_ops = 10; + + optional CompiledQuery compiled_query = 5; + + optional CompiledCursor compiled_cursor = 6; + + repeated CompositeIndex index = 8; + + repeated int64 version = 11; +} + +message AllocateIdsRequest { + optional InternalHeader header = 4; + + optional Reference model_key = 1; + + optional int64 size = 2; + + optional int64 max = 3; + + repeated Reference reserve = 5; +} + +message AllocateIdsResponse { + required int64 start = 1; + required int64 end = 2; + optional Cost cost = 3; +} + +message CompositeIndices { + repeated CompositeIndex index = 1; +} + +message AddActionsRequest { + optional InternalHeader header = 3; + + required Transaction transaction = 1; + repeated Action action = 2; +} + +message AddActionsResponse { +} + +message BeginTransactionRequest { + optional InternalHeader header = 3; + + required string app = 1; + optional bool allow_multiple_eg = 2 [default = false]; + optional string database_id = 4; + + enum TransactionMode { + UNKNOWN = 0; + READ_ONLY = 1; + READ_WRITE = 2; + } + optional TransactionMode mode = 5 [default = UNKNOWN]; + + optional Transaction previous_transaction = 7; +} + +message CommitResponse { + optional Cost cost = 1; + + repeated group Version = 3 { + required Reference root_entity_key = 4; + required int64 version = 5; + } +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/identity.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/identity.go new file mode 100644 index 000000000..9b4134e42 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/identity.go @@ -0,0 +1,55 @@ +// Copyright 2011 Google Inc. All rights reserved. +// Use of this source code is governed by the Apache 2.0 +// license that can be found in the LICENSE file. + +package internal + +import ( + "os" + + netcontext "golang.org/x/net/context" +) + +var ( + // This is set to true in identity_classic.go, which is behind the appengine build tag. + // The appengine build tag is set for the first generation runtimes (<= Go 1.9) but not + // the second generation runtimes (>= Go 1.11), so this indicates whether we're on a + // first-gen runtime. See IsStandard below for the second-gen check. + appengineStandard bool + + // This is set to true in identity_flex.go, which is behind the appenginevm build tag. + appengineFlex bool +) + +// AppID is the implementation of the wrapper function of the same name in +// ../identity.go. See that file for commentary. +func AppID(c netcontext.Context) string { + return appID(FullyQualifiedAppID(c)) +} + +// IsStandard is the implementation of the wrapper function of the same name in +// ../appengine.go. See that file for commentary. +func IsStandard() bool { + // appengineStandard will be true for first-gen runtimes (<= Go 1.9) but not + // second-gen (>= Go 1.11). + return appengineStandard || IsSecondGen() +} + +// IsStandard is the implementation of the wrapper function of the same name in +// ../appengine.go. See that file for commentary. +func IsSecondGen() bool { + // Second-gen runtimes set $GAE_ENV so we use that to check if we're on a second-gen runtime. + return os.Getenv("GAE_ENV") == "standard" +} + +// IsFlex is the implementation of the wrapper function of the same name in +// ../appengine.go. See that file for commentary. +func IsFlex() bool { + return appengineFlex +} + +// IsAppEngine is the implementation of the wrapper function of the same name in +// ../appengine.go. See that file for commentary. +func IsAppEngine() bool { + return IsStandard() || IsFlex() +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/identity_classic.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/identity_classic.go new file mode 100644 index 000000000..4e979f45e --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/identity_classic.go @@ -0,0 +1,61 @@ +// Copyright 2015 Google Inc. All rights reserved. +// Use of this source code is governed by the Apache 2.0 +// license that can be found in the LICENSE file. + +// +build appengine + +package internal + +import ( + "appengine" + + netcontext "golang.org/x/net/context" +) + +func init() { + appengineStandard = true +} + +func DefaultVersionHostname(ctx netcontext.Context) string { + c := fromContext(ctx) + if c == nil { + panic(errNotAppEngineContext) + } + return appengine.DefaultVersionHostname(c) +} + +func Datacenter(_ netcontext.Context) string { return appengine.Datacenter() } +func ServerSoftware() string { return appengine.ServerSoftware() } +func InstanceID() string { return appengine.InstanceID() } +func IsDevAppServer() bool { return appengine.IsDevAppServer() } + +func RequestID(ctx netcontext.Context) string { + c := fromContext(ctx) + if c == nil { + panic(errNotAppEngineContext) + } + return appengine.RequestID(c) +} + +func ModuleName(ctx netcontext.Context) string { + c := fromContext(ctx) + if c == nil { + panic(errNotAppEngineContext) + } + return appengine.ModuleName(c) +} +func VersionID(ctx netcontext.Context) string { + c := fromContext(ctx) + if c == nil { + panic(errNotAppEngineContext) + } + return appengine.VersionID(c) +} + +func fullyQualifiedAppID(ctx netcontext.Context) string { + c := fromContext(ctx) + if c == nil { + panic(errNotAppEngineContext) + } + return c.FullyQualifiedAppID() +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/identity_flex.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/identity_flex.go new file mode 100644 index 000000000..d5e2e7b5e --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/identity_flex.go @@ -0,0 +1,11 @@ +// Copyright 2018 Google LLC. All rights reserved. +// Use of this source code is governed by the Apache 2.0 +// license that can be found in the LICENSE file. + +// +build appenginevm + +package internal + +func init() { + appengineFlex = true +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/identity_vm.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/identity_vm.go new file mode 100644 index 000000000..5d8067263 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/identity_vm.go @@ -0,0 +1,134 @@ +// Copyright 2011 Google Inc. All rights reserved. +// Use of this source code is governed by the Apache 2.0 +// license that can be found in the LICENSE file. + +// +build !appengine + +package internal + +import ( + "log" + "net/http" + "os" + "strings" + + netcontext "golang.org/x/net/context" +) + +// These functions are implementations of the wrapper functions +// in ../appengine/identity.go. See that file for commentary. + +const ( + hDefaultVersionHostname = "X-AppEngine-Default-Version-Hostname" + hRequestLogId = "X-AppEngine-Request-Log-Id" + hDatacenter = "X-AppEngine-Datacenter" +) + +func ctxHeaders(ctx netcontext.Context) http.Header { + c := fromContext(ctx) + if c == nil { + return nil + } + return c.Request().Header +} + +func DefaultVersionHostname(ctx netcontext.Context) string { + return ctxHeaders(ctx).Get(hDefaultVersionHostname) +} + +func RequestID(ctx netcontext.Context) string { + return ctxHeaders(ctx).Get(hRequestLogId) +} + +func Datacenter(ctx netcontext.Context) string { + if dc := ctxHeaders(ctx).Get(hDatacenter); dc != "" { + return dc + } + // If the header isn't set, read zone from the metadata service. + // It has the format projects/[NUMERIC_PROJECT_ID]/zones/[ZONE] + zone, err := getMetadata("instance/zone") + if err != nil { + log.Printf("Datacenter: %v", err) + return "" + } + parts := strings.Split(string(zone), "/") + if len(parts) == 0 { + return "" + } + return parts[len(parts)-1] +} + +func ServerSoftware() string { + // TODO(dsymonds): Remove fallback when we've verified this. + if s := os.Getenv("SERVER_SOFTWARE"); s != "" { + return s + } + if s := os.Getenv("GAE_ENV"); s != "" { + return s + } + return "Google App Engine/1.x.x" +} + +// TODO(dsymonds): Remove the metadata fetches. + +func ModuleName(_ netcontext.Context) string { + if s := os.Getenv("GAE_MODULE_NAME"); s != "" { + return s + } + if s := os.Getenv("GAE_SERVICE"); s != "" { + return s + } + return string(mustGetMetadata("instance/attributes/gae_backend_name")) +} + +func VersionID(_ netcontext.Context) string { + if s1, s2 := os.Getenv("GAE_MODULE_VERSION"), os.Getenv("GAE_MINOR_VERSION"); s1 != "" && s2 != "" { + return s1 + "." + s2 + } + if s1, s2 := os.Getenv("GAE_VERSION"), os.Getenv("GAE_DEPLOYMENT_ID"); s1 != "" && s2 != "" { + return s1 + "." + s2 + } + return string(mustGetMetadata("instance/attributes/gae_backend_version")) + "." + string(mustGetMetadata("instance/attributes/gae_backend_minor_version")) +} + +func InstanceID() string { + if s := os.Getenv("GAE_MODULE_INSTANCE"); s != "" { + return s + } + if s := os.Getenv("GAE_INSTANCE"); s != "" { + return s + } + return string(mustGetMetadata("instance/attributes/gae_backend_instance")) +} + +func partitionlessAppID() string { + // gae_project has everything except the partition prefix. + if appID := os.Getenv("GAE_LONG_APP_ID"); appID != "" { + return appID + } + if project := os.Getenv("GOOGLE_CLOUD_PROJECT"); project != "" { + return project + } + return string(mustGetMetadata("instance/attributes/gae_project")) +} + +func fullyQualifiedAppID(_ netcontext.Context) string { + if s := os.Getenv("GAE_APPLICATION"); s != "" { + return s + } + appID := partitionlessAppID() + + part := os.Getenv("GAE_PARTITION") + if part == "" { + part = string(mustGetMetadata("instance/attributes/gae_partition")) + } + + if part != "" { + appID = part + "~" + appID + } + return appID +} + +func IsDevAppServer() bool { + return os.Getenv("RUN_WITH_DEVAPPSERVER") != "" +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/internal.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/internal.go new file mode 100644 index 000000000..051ea3980 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/internal.go @@ -0,0 +1,110 @@ +// Copyright 2011 Google Inc. All rights reserved. +// Use of this source code is governed by the Apache 2.0 +// license that can be found in the LICENSE file. + +// Package internal provides support for package appengine. +// +// Programs should not use this package directly. Its API is not stable. +// Use packages appengine and appengine/* instead. +package internal + +import ( + "fmt" + + "github.com/golang/protobuf/proto" + + remotepb "google.golang.org/appengine/internal/remote_api" +) + +// errorCodeMaps is a map of service name to the error code map for the service. +var errorCodeMaps = make(map[string]map[int32]string) + +// RegisterErrorCodeMap is called from API implementations to register their +// error code map. This should only be called from init functions. +func RegisterErrorCodeMap(service string, m map[int32]string) { + errorCodeMaps[service] = m +} + +type timeoutCodeKey struct { + service string + code int32 +} + +// timeoutCodes is the set of service+code pairs that represent timeouts. +var timeoutCodes = make(map[timeoutCodeKey]bool) + +func RegisterTimeoutErrorCode(service string, code int32) { + timeoutCodes[timeoutCodeKey{service, code}] = true +} + +// APIError is the type returned by appengine.Context's Call method +// when an API call fails in an API-specific way. This may be, for instance, +// a taskqueue API call failing with TaskQueueServiceError::UNKNOWN_QUEUE. +type APIError struct { + Service string + Detail string + Code int32 // API-specific error code +} + +func (e *APIError) Error() string { + if e.Code == 0 { + if e.Detail == "" { + return "APIError " + } + return e.Detail + } + s := fmt.Sprintf("API error %d", e.Code) + if m, ok := errorCodeMaps[e.Service]; ok { + s += " (" + e.Service + ": " + m[e.Code] + ")" + } else { + // Shouldn't happen, but provide a bit more detail if it does. + s = e.Service + " " + s + } + if e.Detail != "" { + s += ": " + e.Detail + } + return s +} + +func (e *APIError) IsTimeout() bool { + return timeoutCodes[timeoutCodeKey{e.Service, e.Code}] +} + +// CallError is the type returned by appengine.Context's Call method when an +// API call fails in a generic way, such as RpcError::CAPABILITY_DISABLED. +type CallError struct { + Detail string + Code int32 + // TODO: Remove this if we get a distinguishable error code. + Timeout bool +} + +func (e *CallError) Error() string { + var msg string + switch remotepb.RpcError_ErrorCode(e.Code) { + case remotepb.RpcError_UNKNOWN: + return e.Detail + case remotepb.RpcError_OVER_QUOTA: + msg = "Over quota" + case remotepb.RpcError_CAPABILITY_DISABLED: + msg = "Capability disabled" + case remotepb.RpcError_CANCELLED: + msg = "Canceled" + default: + msg = fmt.Sprintf("Call error %d", e.Code) + } + s := msg + ": " + e.Detail + if e.Timeout { + s += " (timeout)" + } + return s +} + +func (e *CallError) IsTimeout() bool { + return e.Timeout +} + +// NamespaceMods is a map from API service to a function that will mutate an RPC request to attach a namespace. +// The function should be prepared to be called on the same message more than once; it should only modify the +// RPC request the first time. +var NamespaceMods = make(map[string]func(m proto.Message, namespace string)) diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/log/log_service.pb.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/log/log_service.pb.go new file mode 100644 index 000000000..8545ac4ad --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/log/log_service.pb.go @@ -0,0 +1,1313 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: google.golang.org/appengine/internal/log/log_service.proto + +package log + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package + +type LogServiceError_ErrorCode int32 + +const ( + LogServiceError_OK LogServiceError_ErrorCode = 0 + LogServiceError_INVALID_REQUEST LogServiceError_ErrorCode = 1 + LogServiceError_STORAGE_ERROR LogServiceError_ErrorCode = 2 +) + +var LogServiceError_ErrorCode_name = map[int32]string{ + 0: "OK", + 1: "INVALID_REQUEST", + 2: "STORAGE_ERROR", +} +var LogServiceError_ErrorCode_value = map[string]int32{ + "OK": 0, + "INVALID_REQUEST": 1, + "STORAGE_ERROR": 2, +} + +func (x LogServiceError_ErrorCode) Enum() *LogServiceError_ErrorCode { + p := new(LogServiceError_ErrorCode) + *p = x + return p +} +func (x LogServiceError_ErrorCode) String() string { + return proto.EnumName(LogServiceError_ErrorCode_name, int32(x)) +} +func (x *LogServiceError_ErrorCode) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(LogServiceError_ErrorCode_value, data, "LogServiceError_ErrorCode") + if err != nil { + return err + } + *x = LogServiceError_ErrorCode(value) + return nil +} +func (LogServiceError_ErrorCode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_log_service_f054fd4b5012319d, []int{0, 0} +} + +type LogServiceError struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *LogServiceError) Reset() { *m = LogServiceError{} } +func (m *LogServiceError) String() string { return proto.CompactTextString(m) } +func (*LogServiceError) ProtoMessage() {} +func (*LogServiceError) Descriptor() ([]byte, []int) { + return fileDescriptor_log_service_f054fd4b5012319d, []int{0} +} +func (m *LogServiceError) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_LogServiceError.Unmarshal(m, b) +} +func (m *LogServiceError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_LogServiceError.Marshal(b, m, deterministic) +} +func (dst *LogServiceError) XXX_Merge(src proto.Message) { + xxx_messageInfo_LogServiceError.Merge(dst, src) +} +func (m *LogServiceError) XXX_Size() int { + return xxx_messageInfo_LogServiceError.Size(m) +} +func (m *LogServiceError) XXX_DiscardUnknown() { + xxx_messageInfo_LogServiceError.DiscardUnknown(m) +} + +var xxx_messageInfo_LogServiceError proto.InternalMessageInfo + +type UserAppLogLine struct { + TimestampUsec *int64 `protobuf:"varint,1,req,name=timestamp_usec,json=timestampUsec" json:"timestamp_usec,omitempty"` + Level *int64 `protobuf:"varint,2,req,name=level" json:"level,omitempty"` + Message *string `protobuf:"bytes,3,req,name=message" json:"message,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UserAppLogLine) Reset() { *m = UserAppLogLine{} } +func (m *UserAppLogLine) String() string { return proto.CompactTextString(m) } +func (*UserAppLogLine) ProtoMessage() {} +func (*UserAppLogLine) Descriptor() ([]byte, []int) { + return fileDescriptor_log_service_f054fd4b5012319d, []int{1} +} +func (m *UserAppLogLine) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UserAppLogLine.Unmarshal(m, b) +} +func (m *UserAppLogLine) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UserAppLogLine.Marshal(b, m, deterministic) +} +func (dst *UserAppLogLine) XXX_Merge(src proto.Message) { + xxx_messageInfo_UserAppLogLine.Merge(dst, src) +} +func (m *UserAppLogLine) XXX_Size() int { + return xxx_messageInfo_UserAppLogLine.Size(m) +} +func (m *UserAppLogLine) XXX_DiscardUnknown() { + xxx_messageInfo_UserAppLogLine.DiscardUnknown(m) +} + +var xxx_messageInfo_UserAppLogLine proto.InternalMessageInfo + +func (m *UserAppLogLine) GetTimestampUsec() int64 { + if m != nil && m.TimestampUsec != nil { + return *m.TimestampUsec + } + return 0 +} + +func (m *UserAppLogLine) GetLevel() int64 { + if m != nil && m.Level != nil { + return *m.Level + } + return 0 +} + +func (m *UserAppLogLine) GetMessage() string { + if m != nil && m.Message != nil { + return *m.Message + } + return "" +} + +type UserAppLogGroup struct { + LogLine []*UserAppLogLine `protobuf:"bytes,2,rep,name=log_line,json=logLine" json:"log_line,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UserAppLogGroup) Reset() { *m = UserAppLogGroup{} } +func (m *UserAppLogGroup) String() string { return proto.CompactTextString(m) } +func (*UserAppLogGroup) ProtoMessage() {} +func (*UserAppLogGroup) Descriptor() ([]byte, []int) { + return fileDescriptor_log_service_f054fd4b5012319d, []int{2} +} +func (m *UserAppLogGroup) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UserAppLogGroup.Unmarshal(m, b) +} +func (m *UserAppLogGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UserAppLogGroup.Marshal(b, m, deterministic) +} +func (dst *UserAppLogGroup) XXX_Merge(src proto.Message) { + xxx_messageInfo_UserAppLogGroup.Merge(dst, src) +} +func (m *UserAppLogGroup) XXX_Size() int { + return xxx_messageInfo_UserAppLogGroup.Size(m) +} +func (m *UserAppLogGroup) XXX_DiscardUnknown() { + xxx_messageInfo_UserAppLogGroup.DiscardUnknown(m) +} + +var xxx_messageInfo_UserAppLogGroup proto.InternalMessageInfo + +func (m *UserAppLogGroup) GetLogLine() []*UserAppLogLine { + if m != nil { + return m.LogLine + } + return nil +} + +type FlushRequest struct { + Logs []byte `protobuf:"bytes,1,opt,name=logs" json:"logs,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FlushRequest) Reset() { *m = FlushRequest{} } +func (m *FlushRequest) String() string { return proto.CompactTextString(m) } +func (*FlushRequest) ProtoMessage() {} +func (*FlushRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_log_service_f054fd4b5012319d, []int{3} +} +func (m *FlushRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FlushRequest.Unmarshal(m, b) +} +func (m *FlushRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FlushRequest.Marshal(b, m, deterministic) +} +func (dst *FlushRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_FlushRequest.Merge(dst, src) +} +func (m *FlushRequest) XXX_Size() int { + return xxx_messageInfo_FlushRequest.Size(m) +} +func (m *FlushRequest) XXX_DiscardUnknown() { + xxx_messageInfo_FlushRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_FlushRequest proto.InternalMessageInfo + +func (m *FlushRequest) GetLogs() []byte { + if m != nil { + return m.Logs + } + return nil +} + +type SetStatusRequest struct { + Status *string `protobuf:"bytes,1,req,name=status" json:"status,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SetStatusRequest) Reset() { *m = SetStatusRequest{} } +func (m *SetStatusRequest) String() string { return proto.CompactTextString(m) } +func (*SetStatusRequest) ProtoMessage() {} +func (*SetStatusRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_log_service_f054fd4b5012319d, []int{4} +} +func (m *SetStatusRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SetStatusRequest.Unmarshal(m, b) +} +func (m *SetStatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SetStatusRequest.Marshal(b, m, deterministic) +} +func (dst *SetStatusRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetStatusRequest.Merge(dst, src) +} +func (m *SetStatusRequest) XXX_Size() int { + return xxx_messageInfo_SetStatusRequest.Size(m) +} +func (m *SetStatusRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SetStatusRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SetStatusRequest proto.InternalMessageInfo + +func (m *SetStatusRequest) GetStatus() string { + if m != nil && m.Status != nil { + return *m.Status + } + return "" +} + +type LogOffset struct { + RequestId []byte `protobuf:"bytes,1,opt,name=request_id,json=requestId" json:"request_id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *LogOffset) Reset() { *m = LogOffset{} } +func (m *LogOffset) String() string { return proto.CompactTextString(m) } +func (*LogOffset) ProtoMessage() {} +func (*LogOffset) Descriptor() ([]byte, []int) { + return fileDescriptor_log_service_f054fd4b5012319d, []int{5} +} +func (m *LogOffset) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_LogOffset.Unmarshal(m, b) +} +func (m *LogOffset) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_LogOffset.Marshal(b, m, deterministic) +} +func (dst *LogOffset) XXX_Merge(src proto.Message) { + xxx_messageInfo_LogOffset.Merge(dst, src) +} +func (m *LogOffset) XXX_Size() int { + return xxx_messageInfo_LogOffset.Size(m) +} +func (m *LogOffset) XXX_DiscardUnknown() { + xxx_messageInfo_LogOffset.DiscardUnknown(m) +} + +var xxx_messageInfo_LogOffset proto.InternalMessageInfo + +func (m *LogOffset) GetRequestId() []byte { + if m != nil { + return m.RequestId + } + return nil +} + +type LogLine struct { + Time *int64 `protobuf:"varint,1,req,name=time" json:"time,omitempty"` + Level *int32 `protobuf:"varint,2,req,name=level" json:"level,omitempty"` + LogMessage *string `protobuf:"bytes,3,req,name=log_message,json=logMessage" json:"log_message,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *LogLine) Reset() { *m = LogLine{} } +func (m *LogLine) String() string { return proto.CompactTextString(m) } +func (*LogLine) ProtoMessage() {} +func (*LogLine) Descriptor() ([]byte, []int) { + return fileDescriptor_log_service_f054fd4b5012319d, []int{6} +} +func (m *LogLine) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_LogLine.Unmarshal(m, b) +} +func (m *LogLine) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_LogLine.Marshal(b, m, deterministic) +} +func (dst *LogLine) XXX_Merge(src proto.Message) { + xxx_messageInfo_LogLine.Merge(dst, src) +} +func (m *LogLine) XXX_Size() int { + return xxx_messageInfo_LogLine.Size(m) +} +func (m *LogLine) XXX_DiscardUnknown() { + xxx_messageInfo_LogLine.DiscardUnknown(m) +} + +var xxx_messageInfo_LogLine proto.InternalMessageInfo + +func (m *LogLine) GetTime() int64 { + if m != nil && m.Time != nil { + return *m.Time + } + return 0 +} + +func (m *LogLine) GetLevel() int32 { + if m != nil && m.Level != nil { + return *m.Level + } + return 0 +} + +func (m *LogLine) GetLogMessage() string { + if m != nil && m.LogMessage != nil { + return *m.LogMessage + } + return "" +} + +type RequestLog struct { + AppId *string `protobuf:"bytes,1,req,name=app_id,json=appId" json:"app_id,omitempty"` + ModuleId *string `protobuf:"bytes,37,opt,name=module_id,json=moduleId,def=default" json:"module_id,omitempty"` + VersionId *string `protobuf:"bytes,2,req,name=version_id,json=versionId" json:"version_id,omitempty"` + RequestId []byte `protobuf:"bytes,3,req,name=request_id,json=requestId" json:"request_id,omitempty"` + Offset *LogOffset `protobuf:"bytes,35,opt,name=offset" json:"offset,omitempty"` + Ip *string `protobuf:"bytes,4,req,name=ip" json:"ip,omitempty"` + Nickname *string `protobuf:"bytes,5,opt,name=nickname" json:"nickname,omitempty"` + StartTime *int64 `protobuf:"varint,6,req,name=start_time,json=startTime" json:"start_time,omitempty"` + EndTime *int64 `protobuf:"varint,7,req,name=end_time,json=endTime" json:"end_time,omitempty"` + Latency *int64 `protobuf:"varint,8,req,name=latency" json:"latency,omitempty"` + Mcycles *int64 `protobuf:"varint,9,req,name=mcycles" json:"mcycles,omitempty"` + Method *string `protobuf:"bytes,10,req,name=method" json:"method,omitempty"` + Resource *string `protobuf:"bytes,11,req,name=resource" json:"resource,omitempty"` + HttpVersion *string `protobuf:"bytes,12,req,name=http_version,json=httpVersion" json:"http_version,omitempty"` + Status *int32 `protobuf:"varint,13,req,name=status" json:"status,omitempty"` + ResponseSize *int64 `protobuf:"varint,14,req,name=response_size,json=responseSize" json:"response_size,omitempty"` + Referrer *string `protobuf:"bytes,15,opt,name=referrer" json:"referrer,omitempty"` + UserAgent *string `protobuf:"bytes,16,opt,name=user_agent,json=userAgent" json:"user_agent,omitempty"` + UrlMapEntry *string `protobuf:"bytes,17,req,name=url_map_entry,json=urlMapEntry" json:"url_map_entry,omitempty"` + Combined *string `protobuf:"bytes,18,req,name=combined" json:"combined,omitempty"` + ApiMcycles *int64 `protobuf:"varint,19,opt,name=api_mcycles,json=apiMcycles" json:"api_mcycles,omitempty"` + Host *string `protobuf:"bytes,20,opt,name=host" json:"host,omitempty"` + Cost *float64 `protobuf:"fixed64,21,opt,name=cost" json:"cost,omitempty"` + TaskQueueName *string `protobuf:"bytes,22,opt,name=task_queue_name,json=taskQueueName" json:"task_queue_name,omitempty"` + TaskName *string `protobuf:"bytes,23,opt,name=task_name,json=taskName" json:"task_name,omitempty"` + WasLoadingRequest *bool `protobuf:"varint,24,opt,name=was_loading_request,json=wasLoadingRequest" json:"was_loading_request,omitempty"` + PendingTime *int64 `protobuf:"varint,25,opt,name=pending_time,json=pendingTime" json:"pending_time,omitempty"` + ReplicaIndex *int32 `protobuf:"varint,26,opt,name=replica_index,json=replicaIndex,def=-1" json:"replica_index,omitempty"` + Finished *bool `protobuf:"varint,27,opt,name=finished,def=1" json:"finished,omitempty"` + CloneKey []byte `protobuf:"bytes,28,opt,name=clone_key,json=cloneKey" json:"clone_key,omitempty"` + Line []*LogLine `protobuf:"bytes,29,rep,name=line" json:"line,omitempty"` + LinesIncomplete *bool `protobuf:"varint,36,opt,name=lines_incomplete,json=linesIncomplete" json:"lines_incomplete,omitempty"` + AppEngineRelease []byte `protobuf:"bytes,38,opt,name=app_engine_release,json=appEngineRelease" json:"app_engine_release,omitempty"` + ExitReason *int32 `protobuf:"varint,30,opt,name=exit_reason,json=exitReason" json:"exit_reason,omitempty"` + WasThrottledForTime *bool `protobuf:"varint,31,opt,name=was_throttled_for_time,json=wasThrottledForTime" json:"was_throttled_for_time,omitempty"` + WasThrottledForRequests *bool `protobuf:"varint,32,opt,name=was_throttled_for_requests,json=wasThrottledForRequests" json:"was_throttled_for_requests,omitempty"` + ThrottledTime *int64 `protobuf:"varint,33,opt,name=throttled_time,json=throttledTime" json:"throttled_time,omitempty"` + ServerName []byte `protobuf:"bytes,34,opt,name=server_name,json=serverName" json:"server_name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RequestLog) Reset() { *m = RequestLog{} } +func (m *RequestLog) String() string { return proto.CompactTextString(m) } +func (*RequestLog) ProtoMessage() {} +func (*RequestLog) Descriptor() ([]byte, []int) { + return fileDescriptor_log_service_f054fd4b5012319d, []int{7} +} +func (m *RequestLog) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RequestLog.Unmarshal(m, b) +} +func (m *RequestLog) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RequestLog.Marshal(b, m, deterministic) +} +func (dst *RequestLog) XXX_Merge(src proto.Message) { + xxx_messageInfo_RequestLog.Merge(dst, src) +} +func (m *RequestLog) XXX_Size() int { + return xxx_messageInfo_RequestLog.Size(m) +} +func (m *RequestLog) XXX_DiscardUnknown() { + xxx_messageInfo_RequestLog.DiscardUnknown(m) +} + +var xxx_messageInfo_RequestLog proto.InternalMessageInfo + +const Default_RequestLog_ModuleId string = "default" +const Default_RequestLog_ReplicaIndex int32 = -1 +const Default_RequestLog_Finished bool = true + +func (m *RequestLog) GetAppId() string { + if m != nil && m.AppId != nil { + return *m.AppId + } + return "" +} + +func (m *RequestLog) GetModuleId() string { + if m != nil && m.ModuleId != nil { + return *m.ModuleId + } + return Default_RequestLog_ModuleId +} + +func (m *RequestLog) GetVersionId() string { + if m != nil && m.VersionId != nil { + return *m.VersionId + } + return "" +} + +func (m *RequestLog) GetRequestId() []byte { + if m != nil { + return m.RequestId + } + return nil +} + +func (m *RequestLog) GetOffset() *LogOffset { + if m != nil { + return m.Offset + } + return nil +} + +func (m *RequestLog) GetIp() string { + if m != nil && m.Ip != nil { + return *m.Ip + } + return "" +} + +func (m *RequestLog) GetNickname() string { + if m != nil && m.Nickname != nil { + return *m.Nickname + } + return "" +} + +func (m *RequestLog) GetStartTime() int64 { + if m != nil && m.StartTime != nil { + return *m.StartTime + } + return 0 +} + +func (m *RequestLog) GetEndTime() int64 { + if m != nil && m.EndTime != nil { + return *m.EndTime + } + return 0 +} + +func (m *RequestLog) GetLatency() int64 { + if m != nil && m.Latency != nil { + return *m.Latency + } + return 0 +} + +func (m *RequestLog) GetMcycles() int64 { + if m != nil && m.Mcycles != nil { + return *m.Mcycles + } + return 0 +} + +func (m *RequestLog) GetMethod() string { + if m != nil && m.Method != nil { + return *m.Method + } + return "" +} + +func (m *RequestLog) GetResource() string { + if m != nil && m.Resource != nil { + return *m.Resource + } + return "" +} + +func (m *RequestLog) GetHttpVersion() string { + if m != nil && m.HttpVersion != nil { + return *m.HttpVersion + } + return "" +} + +func (m *RequestLog) GetStatus() int32 { + if m != nil && m.Status != nil { + return *m.Status + } + return 0 +} + +func (m *RequestLog) GetResponseSize() int64 { + if m != nil && m.ResponseSize != nil { + return *m.ResponseSize + } + return 0 +} + +func (m *RequestLog) GetReferrer() string { + if m != nil && m.Referrer != nil { + return *m.Referrer + } + return "" +} + +func (m *RequestLog) GetUserAgent() string { + if m != nil && m.UserAgent != nil { + return *m.UserAgent + } + return "" +} + +func (m *RequestLog) GetUrlMapEntry() string { + if m != nil && m.UrlMapEntry != nil { + return *m.UrlMapEntry + } + return "" +} + +func (m *RequestLog) GetCombined() string { + if m != nil && m.Combined != nil { + return *m.Combined + } + return "" +} + +func (m *RequestLog) GetApiMcycles() int64 { + if m != nil && m.ApiMcycles != nil { + return *m.ApiMcycles + } + return 0 +} + +func (m *RequestLog) GetHost() string { + if m != nil && m.Host != nil { + return *m.Host + } + return "" +} + +func (m *RequestLog) GetCost() float64 { + if m != nil && m.Cost != nil { + return *m.Cost + } + return 0 +} + +func (m *RequestLog) GetTaskQueueName() string { + if m != nil && m.TaskQueueName != nil { + return *m.TaskQueueName + } + return "" +} + +func (m *RequestLog) GetTaskName() string { + if m != nil && m.TaskName != nil { + return *m.TaskName + } + return "" +} + +func (m *RequestLog) GetWasLoadingRequest() bool { + if m != nil && m.WasLoadingRequest != nil { + return *m.WasLoadingRequest + } + return false +} + +func (m *RequestLog) GetPendingTime() int64 { + if m != nil && m.PendingTime != nil { + return *m.PendingTime + } + return 0 +} + +func (m *RequestLog) GetReplicaIndex() int32 { + if m != nil && m.ReplicaIndex != nil { + return *m.ReplicaIndex + } + return Default_RequestLog_ReplicaIndex +} + +func (m *RequestLog) GetFinished() bool { + if m != nil && m.Finished != nil { + return *m.Finished + } + return Default_RequestLog_Finished +} + +func (m *RequestLog) GetCloneKey() []byte { + if m != nil { + return m.CloneKey + } + return nil +} + +func (m *RequestLog) GetLine() []*LogLine { + if m != nil { + return m.Line + } + return nil +} + +func (m *RequestLog) GetLinesIncomplete() bool { + if m != nil && m.LinesIncomplete != nil { + return *m.LinesIncomplete + } + return false +} + +func (m *RequestLog) GetAppEngineRelease() []byte { + if m != nil { + return m.AppEngineRelease + } + return nil +} + +func (m *RequestLog) GetExitReason() int32 { + if m != nil && m.ExitReason != nil { + return *m.ExitReason + } + return 0 +} + +func (m *RequestLog) GetWasThrottledForTime() bool { + if m != nil && m.WasThrottledForTime != nil { + return *m.WasThrottledForTime + } + return false +} + +func (m *RequestLog) GetWasThrottledForRequests() bool { + if m != nil && m.WasThrottledForRequests != nil { + return *m.WasThrottledForRequests + } + return false +} + +func (m *RequestLog) GetThrottledTime() int64 { + if m != nil && m.ThrottledTime != nil { + return *m.ThrottledTime + } + return 0 +} + +func (m *RequestLog) GetServerName() []byte { + if m != nil { + return m.ServerName + } + return nil +} + +type LogModuleVersion struct { + ModuleId *string `protobuf:"bytes,1,opt,name=module_id,json=moduleId,def=default" json:"module_id,omitempty"` + VersionId *string `protobuf:"bytes,2,opt,name=version_id,json=versionId" json:"version_id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *LogModuleVersion) Reset() { *m = LogModuleVersion{} } +func (m *LogModuleVersion) String() string { return proto.CompactTextString(m) } +func (*LogModuleVersion) ProtoMessage() {} +func (*LogModuleVersion) Descriptor() ([]byte, []int) { + return fileDescriptor_log_service_f054fd4b5012319d, []int{8} +} +func (m *LogModuleVersion) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_LogModuleVersion.Unmarshal(m, b) +} +func (m *LogModuleVersion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_LogModuleVersion.Marshal(b, m, deterministic) +} +func (dst *LogModuleVersion) XXX_Merge(src proto.Message) { + xxx_messageInfo_LogModuleVersion.Merge(dst, src) +} +func (m *LogModuleVersion) XXX_Size() int { + return xxx_messageInfo_LogModuleVersion.Size(m) +} +func (m *LogModuleVersion) XXX_DiscardUnknown() { + xxx_messageInfo_LogModuleVersion.DiscardUnknown(m) +} + +var xxx_messageInfo_LogModuleVersion proto.InternalMessageInfo + +const Default_LogModuleVersion_ModuleId string = "default" + +func (m *LogModuleVersion) GetModuleId() string { + if m != nil && m.ModuleId != nil { + return *m.ModuleId + } + return Default_LogModuleVersion_ModuleId +} + +func (m *LogModuleVersion) GetVersionId() string { + if m != nil && m.VersionId != nil { + return *m.VersionId + } + return "" +} + +type LogReadRequest struct { + AppId *string `protobuf:"bytes,1,req,name=app_id,json=appId" json:"app_id,omitempty"` + VersionId []string `protobuf:"bytes,2,rep,name=version_id,json=versionId" json:"version_id,omitempty"` + ModuleVersion []*LogModuleVersion `protobuf:"bytes,19,rep,name=module_version,json=moduleVersion" json:"module_version,omitempty"` + StartTime *int64 `protobuf:"varint,3,opt,name=start_time,json=startTime" json:"start_time,omitempty"` + EndTime *int64 `protobuf:"varint,4,opt,name=end_time,json=endTime" json:"end_time,omitempty"` + Offset *LogOffset `protobuf:"bytes,5,opt,name=offset" json:"offset,omitempty"` + RequestId [][]byte `protobuf:"bytes,6,rep,name=request_id,json=requestId" json:"request_id,omitempty"` + MinimumLogLevel *int32 `protobuf:"varint,7,opt,name=minimum_log_level,json=minimumLogLevel" json:"minimum_log_level,omitempty"` + IncludeIncomplete *bool `protobuf:"varint,8,opt,name=include_incomplete,json=includeIncomplete" json:"include_incomplete,omitempty"` + Count *int64 `protobuf:"varint,9,opt,name=count" json:"count,omitempty"` + CombinedLogRegex *string `protobuf:"bytes,14,opt,name=combined_log_regex,json=combinedLogRegex" json:"combined_log_regex,omitempty"` + HostRegex *string `protobuf:"bytes,15,opt,name=host_regex,json=hostRegex" json:"host_regex,omitempty"` + ReplicaIndex *int32 `protobuf:"varint,16,opt,name=replica_index,json=replicaIndex" json:"replica_index,omitempty"` + IncludeAppLogs *bool `protobuf:"varint,10,opt,name=include_app_logs,json=includeAppLogs" json:"include_app_logs,omitempty"` + AppLogsPerRequest *int32 `protobuf:"varint,17,opt,name=app_logs_per_request,json=appLogsPerRequest" json:"app_logs_per_request,omitempty"` + IncludeHost *bool `protobuf:"varint,11,opt,name=include_host,json=includeHost" json:"include_host,omitempty"` + IncludeAll *bool `protobuf:"varint,12,opt,name=include_all,json=includeAll" json:"include_all,omitempty"` + CacheIterator *bool `protobuf:"varint,13,opt,name=cache_iterator,json=cacheIterator" json:"cache_iterator,omitempty"` + NumShards *int32 `protobuf:"varint,18,opt,name=num_shards,json=numShards" json:"num_shards,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *LogReadRequest) Reset() { *m = LogReadRequest{} } +func (m *LogReadRequest) String() string { return proto.CompactTextString(m) } +func (*LogReadRequest) ProtoMessage() {} +func (*LogReadRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_log_service_f054fd4b5012319d, []int{9} +} +func (m *LogReadRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_LogReadRequest.Unmarshal(m, b) +} +func (m *LogReadRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_LogReadRequest.Marshal(b, m, deterministic) +} +func (dst *LogReadRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_LogReadRequest.Merge(dst, src) +} +func (m *LogReadRequest) XXX_Size() int { + return xxx_messageInfo_LogReadRequest.Size(m) +} +func (m *LogReadRequest) XXX_DiscardUnknown() { + xxx_messageInfo_LogReadRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_LogReadRequest proto.InternalMessageInfo + +func (m *LogReadRequest) GetAppId() string { + if m != nil && m.AppId != nil { + return *m.AppId + } + return "" +} + +func (m *LogReadRequest) GetVersionId() []string { + if m != nil { + return m.VersionId + } + return nil +} + +func (m *LogReadRequest) GetModuleVersion() []*LogModuleVersion { + if m != nil { + return m.ModuleVersion + } + return nil +} + +func (m *LogReadRequest) GetStartTime() int64 { + if m != nil && m.StartTime != nil { + return *m.StartTime + } + return 0 +} + +func (m *LogReadRequest) GetEndTime() int64 { + if m != nil && m.EndTime != nil { + return *m.EndTime + } + return 0 +} + +func (m *LogReadRequest) GetOffset() *LogOffset { + if m != nil { + return m.Offset + } + return nil +} + +func (m *LogReadRequest) GetRequestId() [][]byte { + if m != nil { + return m.RequestId + } + return nil +} + +func (m *LogReadRequest) GetMinimumLogLevel() int32 { + if m != nil && m.MinimumLogLevel != nil { + return *m.MinimumLogLevel + } + return 0 +} + +func (m *LogReadRequest) GetIncludeIncomplete() bool { + if m != nil && m.IncludeIncomplete != nil { + return *m.IncludeIncomplete + } + return false +} + +func (m *LogReadRequest) GetCount() int64 { + if m != nil && m.Count != nil { + return *m.Count + } + return 0 +} + +func (m *LogReadRequest) GetCombinedLogRegex() string { + if m != nil && m.CombinedLogRegex != nil { + return *m.CombinedLogRegex + } + return "" +} + +func (m *LogReadRequest) GetHostRegex() string { + if m != nil && m.HostRegex != nil { + return *m.HostRegex + } + return "" +} + +func (m *LogReadRequest) GetReplicaIndex() int32 { + if m != nil && m.ReplicaIndex != nil { + return *m.ReplicaIndex + } + return 0 +} + +func (m *LogReadRequest) GetIncludeAppLogs() bool { + if m != nil && m.IncludeAppLogs != nil { + return *m.IncludeAppLogs + } + return false +} + +func (m *LogReadRequest) GetAppLogsPerRequest() int32 { + if m != nil && m.AppLogsPerRequest != nil { + return *m.AppLogsPerRequest + } + return 0 +} + +func (m *LogReadRequest) GetIncludeHost() bool { + if m != nil && m.IncludeHost != nil { + return *m.IncludeHost + } + return false +} + +func (m *LogReadRequest) GetIncludeAll() bool { + if m != nil && m.IncludeAll != nil { + return *m.IncludeAll + } + return false +} + +func (m *LogReadRequest) GetCacheIterator() bool { + if m != nil && m.CacheIterator != nil { + return *m.CacheIterator + } + return false +} + +func (m *LogReadRequest) GetNumShards() int32 { + if m != nil && m.NumShards != nil { + return *m.NumShards + } + return 0 +} + +type LogReadResponse struct { + Log []*RequestLog `protobuf:"bytes,1,rep,name=log" json:"log,omitempty"` + Offset *LogOffset `protobuf:"bytes,2,opt,name=offset" json:"offset,omitempty"` + LastEndTime *int64 `protobuf:"varint,3,opt,name=last_end_time,json=lastEndTime" json:"last_end_time,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *LogReadResponse) Reset() { *m = LogReadResponse{} } +func (m *LogReadResponse) String() string { return proto.CompactTextString(m) } +func (*LogReadResponse) ProtoMessage() {} +func (*LogReadResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_log_service_f054fd4b5012319d, []int{10} +} +func (m *LogReadResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_LogReadResponse.Unmarshal(m, b) +} +func (m *LogReadResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_LogReadResponse.Marshal(b, m, deterministic) +} +func (dst *LogReadResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_LogReadResponse.Merge(dst, src) +} +func (m *LogReadResponse) XXX_Size() int { + return xxx_messageInfo_LogReadResponse.Size(m) +} +func (m *LogReadResponse) XXX_DiscardUnknown() { + xxx_messageInfo_LogReadResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_LogReadResponse proto.InternalMessageInfo + +func (m *LogReadResponse) GetLog() []*RequestLog { + if m != nil { + return m.Log + } + return nil +} + +func (m *LogReadResponse) GetOffset() *LogOffset { + if m != nil { + return m.Offset + } + return nil +} + +func (m *LogReadResponse) GetLastEndTime() int64 { + if m != nil && m.LastEndTime != nil { + return *m.LastEndTime + } + return 0 +} + +type LogUsageRecord struct { + VersionId *string `protobuf:"bytes,1,opt,name=version_id,json=versionId" json:"version_id,omitempty"` + StartTime *int32 `protobuf:"varint,2,opt,name=start_time,json=startTime" json:"start_time,omitempty"` + EndTime *int32 `protobuf:"varint,3,opt,name=end_time,json=endTime" json:"end_time,omitempty"` + Count *int64 `protobuf:"varint,4,opt,name=count" json:"count,omitempty"` + TotalSize *int64 `protobuf:"varint,5,opt,name=total_size,json=totalSize" json:"total_size,omitempty"` + Records *int32 `protobuf:"varint,6,opt,name=records" json:"records,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *LogUsageRecord) Reset() { *m = LogUsageRecord{} } +func (m *LogUsageRecord) String() string { return proto.CompactTextString(m) } +func (*LogUsageRecord) ProtoMessage() {} +func (*LogUsageRecord) Descriptor() ([]byte, []int) { + return fileDescriptor_log_service_f054fd4b5012319d, []int{11} +} +func (m *LogUsageRecord) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_LogUsageRecord.Unmarshal(m, b) +} +func (m *LogUsageRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_LogUsageRecord.Marshal(b, m, deterministic) +} +func (dst *LogUsageRecord) XXX_Merge(src proto.Message) { + xxx_messageInfo_LogUsageRecord.Merge(dst, src) +} +func (m *LogUsageRecord) XXX_Size() int { + return xxx_messageInfo_LogUsageRecord.Size(m) +} +func (m *LogUsageRecord) XXX_DiscardUnknown() { + xxx_messageInfo_LogUsageRecord.DiscardUnknown(m) +} + +var xxx_messageInfo_LogUsageRecord proto.InternalMessageInfo + +func (m *LogUsageRecord) GetVersionId() string { + if m != nil && m.VersionId != nil { + return *m.VersionId + } + return "" +} + +func (m *LogUsageRecord) GetStartTime() int32 { + if m != nil && m.StartTime != nil { + return *m.StartTime + } + return 0 +} + +func (m *LogUsageRecord) GetEndTime() int32 { + if m != nil && m.EndTime != nil { + return *m.EndTime + } + return 0 +} + +func (m *LogUsageRecord) GetCount() int64 { + if m != nil && m.Count != nil { + return *m.Count + } + return 0 +} + +func (m *LogUsageRecord) GetTotalSize() int64 { + if m != nil && m.TotalSize != nil { + return *m.TotalSize + } + return 0 +} + +func (m *LogUsageRecord) GetRecords() int32 { + if m != nil && m.Records != nil { + return *m.Records + } + return 0 +} + +type LogUsageRequest struct { + AppId *string `protobuf:"bytes,1,req,name=app_id,json=appId" json:"app_id,omitempty"` + VersionId []string `protobuf:"bytes,2,rep,name=version_id,json=versionId" json:"version_id,omitempty"` + StartTime *int32 `protobuf:"varint,3,opt,name=start_time,json=startTime" json:"start_time,omitempty"` + EndTime *int32 `protobuf:"varint,4,opt,name=end_time,json=endTime" json:"end_time,omitempty"` + ResolutionHours *uint32 `protobuf:"varint,5,opt,name=resolution_hours,json=resolutionHours,def=1" json:"resolution_hours,omitempty"` + CombineVersions *bool `protobuf:"varint,6,opt,name=combine_versions,json=combineVersions" json:"combine_versions,omitempty"` + UsageVersion *int32 `protobuf:"varint,7,opt,name=usage_version,json=usageVersion" json:"usage_version,omitempty"` + VersionsOnly *bool `protobuf:"varint,8,opt,name=versions_only,json=versionsOnly" json:"versions_only,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *LogUsageRequest) Reset() { *m = LogUsageRequest{} } +func (m *LogUsageRequest) String() string { return proto.CompactTextString(m) } +func (*LogUsageRequest) ProtoMessage() {} +func (*LogUsageRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_log_service_f054fd4b5012319d, []int{12} +} +func (m *LogUsageRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_LogUsageRequest.Unmarshal(m, b) +} +func (m *LogUsageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_LogUsageRequest.Marshal(b, m, deterministic) +} +func (dst *LogUsageRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_LogUsageRequest.Merge(dst, src) +} +func (m *LogUsageRequest) XXX_Size() int { + return xxx_messageInfo_LogUsageRequest.Size(m) +} +func (m *LogUsageRequest) XXX_DiscardUnknown() { + xxx_messageInfo_LogUsageRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_LogUsageRequest proto.InternalMessageInfo + +const Default_LogUsageRequest_ResolutionHours uint32 = 1 + +func (m *LogUsageRequest) GetAppId() string { + if m != nil && m.AppId != nil { + return *m.AppId + } + return "" +} + +func (m *LogUsageRequest) GetVersionId() []string { + if m != nil { + return m.VersionId + } + return nil +} + +func (m *LogUsageRequest) GetStartTime() int32 { + if m != nil && m.StartTime != nil { + return *m.StartTime + } + return 0 +} + +func (m *LogUsageRequest) GetEndTime() int32 { + if m != nil && m.EndTime != nil { + return *m.EndTime + } + return 0 +} + +func (m *LogUsageRequest) GetResolutionHours() uint32 { + if m != nil && m.ResolutionHours != nil { + return *m.ResolutionHours + } + return Default_LogUsageRequest_ResolutionHours +} + +func (m *LogUsageRequest) GetCombineVersions() bool { + if m != nil && m.CombineVersions != nil { + return *m.CombineVersions + } + return false +} + +func (m *LogUsageRequest) GetUsageVersion() int32 { + if m != nil && m.UsageVersion != nil { + return *m.UsageVersion + } + return 0 +} + +func (m *LogUsageRequest) GetVersionsOnly() bool { + if m != nil && m.VersionsOnly != nil { + return *m.VersionsOnly + } + return false +} + +type LogUsageResponse struct { + Usage []*LogUsageRecord `protobuf:"bytes,1,rep,name=usage" json:"usage,omitempty"` + Summary *LogUsageRecord `protobuf:"bytes,2,opt,name=summary" json:"summary,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *LogUsageResponse) Reset() { *m = LogUsageResponse{} } +func (m *LogUsageResponse) String() string { return proto.CompactTextString(m) } +func (*LogUsageResponse) ProtoMessage() {} +func (*LogUsageResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_log_service_f054fd4b5012319d, []int{13} +} +func (m *LogUsageResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_LogUsageResponse.Unmarshal(m, b) +} +func (m *LogUsageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_LogUsageResponse.Marshal(b, m, deterministic) +} +func (dst *LogUsageResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_LogUsageResponse.Merge(dst, src) +} +func (m *LogUsageResponse) XXX_Size() int { + return xxx_messageInfo_LogUsageResponse.Size(m) +} +func (m *LogUsageResponse) XXX_DiscardUnknown() { + xxx_messageInfo_LogUsageResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_LogUsageResponse proto.InternalMessageInfo + +func (m *LogUsageResponse) GetUsage() []*LogUsageRecord { + if m != nil { + return m.Usage + } + return nil +} + +func (m *LogUsageResponse) GetSummary() *LogUsageRecord { + if m != nil { + return m.Summary + } + return nil +} + +func init() { + proto.RegisterType((*LogServiceError)(nil), "appengine.LogServiceError") + proto.RegisterType((*UserAppLogLine)(nil), "appengine.UserAppLogLine") + proto.RegisterType((*UserAppLogGroup)(nil), "appengine.UserAppLogGroup") + proto.RegisterType((*FlushRequest)(nil), "appengine.FlushRequest") + proto.RegisterType((*SetStatusRequest)(nil), "appengine.SetStatusRequest") + proto.RegisterType((*LogOffset)(nil), "appengine.LogOffset") + proto.RegisterType((*LogLine)(nil), "appengine.LogLine") + proto.RegisterType((*RequestLog)(nil), "appengine.RequestLog") + proto.RegisterType((*LogModuleVersion)(nil), "appengine.LogModuleVersion") + proto.RegisterType((*LogReadRequest)(nil), "appengine.LogReadRequest") + proto.RegisterType((*LogReadResponse)(nil), "appengine.LogReadResponse") + proto.RegisterType((*LogUsageRecord)(nil), "appengine.LogUsageRecord") + proto.RegisterType((*LogUsageRequest)(nil), "appengine.LogUsageRequest") + proto.RegisterType((*LogUsageResponse)(nil), "appengine.LogUsageResponse") +} + +func init() { + proto.RegisterFile("google.golang.org/appengine/internal/log/log_service.proto", fileDescriptor_log_service_f054fd4b5012319d) +} + +var fileDescriptor_log_service_f054fd4b5012319d = []byte{ + // 1553 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xdd, 0x72, 0xdb, 0xc6, + 0x15, 0x2e, 0x48, 0x51, 0x24, 0x0f, 0x49, 0x91, 0x5a, 0xcb, 0xce, 0xda, 0xae, 0x6b, 0x1a, 0x4e, + 0x1c, 0xd6, 0x93, 0x48, 0x93, 0xa4, 0x57, 0xca, 0x95, 0xd3, 0x2a, 0x8e, 0x26, 0xb4, 0xd5, 0x40, + 0x72, 0x3a, 0xd3, 0x1b, 0x0c, 0x0a, 0x1c, 0x81, 0x18, 0x2f, 0xb1, 0xc8, 0xee, 0xc2, 0x91, 0x72, + 0xdb, 0xdb, 0x3e, 0x46, 0x1f, 0xa2, 0xaf, 0xd2, 0xb7, 0xe9, 0xec, 0xd9, 0x05, 0x44, 0x2a, 0x4d, + 0xc6, 0x33, 0xb9, 0xe0, 0x10, 0xfb, 0x9d, 0x83, 0xdd, 0xf3, 0xf3, 0x9d, 0x6f, 0x01, 0xc7, 0xb9, + 0x94, 0xb9, 0xc0, 0xc3, 0x5c, 0x8a, 0xa4, 0xcc, 0x0f, 0xa5, 0xca, 0x8f, 0x92, 0xaa, 0xc2, 0x32, + 0x2f, 0x4a, 0x3c, 0x2a, 0x4a, 0x83, 0xaa, 0x4c, 0xc4, 0x91, 0x90, 0xb9, 0xfd, 0xc5, 0x1a, 0xd5, + 0xbb, 0x22, 0xc5, 0xc3, 0x4a, 0x49, 0x23, 0xd9, 0xb0, 0xf5, 0x0c, 0x5f, 0xc3, 0x74, 0x29, 0xf3, + 0x73, 0x67, 0x3e, 0x51, 0x4a, 0xaa, 0xf0, 0x4b, 0x18, 0xd2, 0xc3, 0x9f, 0x65, 0x86, 0x6c, 0x17, + 0x3a, 0x67, 0xdf, 0xce, 0x7e, 0xc7, 0xee, 0xc0, 0xf4, 0xf4, 0xf5, 0xf7, 0x2f, 0x96, 0xa7, 0x7f, + 0x89, 0xa3, 0x93, 0xef, 0xde, 0x9c, 0x9c, 0x5f, 0xcc, 0x02, 0xb6, 0x0f, 0x93, 0xf3, 0x8b, 0xb3, + 0xe8, 0xc5, 0xcb, 0x93, 0xf8, 0x24, 0x8a, 0xce, 0xa2, 0x59, 0x27, 0xcc, 0x61, 0xef, 0x8d, 0x46, + 0xf5, 0xa2, 0xaa, 0x96, 0x32, 0x5f, 0x16, 0x25, 0xb2, 0x8f, 0x60, 0xcf, 0x14, 0x6b, 0xd4, 0x26, + 0x59, 0x57, 0x71, 0xad, 0x31, 0xe5, 0xc1, 0xbc, 0xb3, 0xe8, 0x46, 0x93, 0x16, 0x7d, 0xa3, 0x31, + 0x65, 0x07, 0xd0, 0x13, 0xf8, 0x0e, 0x05, 0xef, 0x90, 0xd5, 0x2d, 0x18, 0x87, 0xfe, 0x1a, 0xb5, + 0x4e, 0x72, 0xe4, 0xdd, 0x79, 0x67, 0x31, 0x8c, 0x9a, 0x65, 0xf8, 0x12, 0xa6, 0x37, 0x07, 0xbd, + 0x54, 0xb2, 0xae, 0xd8, 0x9f, 0x60, 0x60, 0x73, 0x15, 0x45, 0x89, 0xbc, 0x33, 0xef, 0x2e, 0x46, + 0x9f, 0xdf, 0x3f, 0x6c, 0x33, 0x3d, 0xdc, 0x0e, 0x2b, 0xea, 0x0b, 0xf7, 0x10, 0x86, 0x30, 0xfe, + 0x5a, 0xd4, 0x7a, 0x15, 0xe1, 0x0f, 0x35, 0x6a, 0xc3, 0x18, 0xec, 0x08, 0x99, 0x6b, 0x1e, 0xcc, + 0x83, 0xc5, 0x38, 0xa2, 0xe7, 0xf0, 0x39, 0xcc, 0xce, 0xd1, 0x9c, 0x9b, 0xc4, 0xd4, 0xba, 0xf1, + 0xbb, 0x07, 0xbb, 0x9a, 0x00, 0xca, 0x67, 0x18, 0xf9, 0x55, 0xf8, 0x1c, 0x86, 0x4b, 0x99, 0x9f, + 0x5d, 0x5e, 0x6a, 0x34, 0xec, 0x11, 0x80, 0x72, 0xfe, 0x71, 0x91, 0xf9, 0x2d, 0x87, 0x1e, 0x39, + 0xcd, 0xc2, 0x0b, 0xe8, 0x37, 0x65, 0x62, 0xb0, 0x63, 0x0b, 0xe2, 0x8b, 0x43, 0xcf, 0xdb, 0x35, + 0xe9, 0x35, 0x35, 0x79, 0x0c, 0x23, 0x9b, 0xe6, 0x76, 0x5d, 0x40, 0xc8, 0xfc, 0x95, 0x2f, 0xcd, + 0x3f, 0x01, 0xc0, 0x47, 0xb9, 0x94, 0x39, 0xbb, 0x0b, 0xbb, 0x49, 0x55, 0xb9, 0xf3, 0xad, 0x6b, + 0x2f, 0xa9, 0xaa, 0xd3, 0x8c, 0x7d, 0x08, 0xc3, 0xb5, 0xcc, 0x6a, 0x81, 0xd6, 0xf2, 0xd1, 0x3c, + 0x58, 0x0c, 0x8f, 0xfb, 0x19, 0x5e, 0x26, 0xb5, 0x30, 0xd1, 0xc0, 0x59, 0x4e, 0x33, 0x9b, 0xc0, + 0x3b, 0x54, 0xba, 0x90, 0xa5, 0x75, 0xeb, 0xd0, 0x06, 0x43, 0x8f, 0x38, 0xf3, 0x46, 0x7e, 0x36, + 0x94, 0xcd, 0xfc, 0xd8, 0x27, 0xb0, 0x2b, 0xa9, 0x10, 0xfc, 0xe9, 0x3c, 0x58, 0x8c, 0x3e, 0x3f, + 0xd8, 0xe8, 0x47, 0x5b, 0xa4, 0xc8, 0xfb, 0xb0, 0x3d, 0xe8, 0x14, 0x15, 0xdf, 0xa1, 0x33, 0x3a, + 0x45, 0xc5, 0x1e, 0xc0, 0xa0, 0x2c, 0xd2, 0xb7, 0x65, 0xb2, 0x46, 0xde, 0xb3, 0x01, 0x46, 0xed, + 0xda, 0x1e, 0xac, 0x4d, 0xa2, 0x4c, 0x4c, 0x45, 0xdb, 0xa5, 0xa2, 0x0d, 0x09, 0xb9, 0xb0, 0x95, + 0xbb, 0x0f, 0x03, 0x2c, 0x33, 0x67, 0xec, 0x93, 0xb1, 0x8f, 0x65, 0x46, 0x26, 0x0e, 0x7d, 0x91, + 0x18, 0x2c, 0xd3, 0x6b, 0x3e, 0x70, 0x16, 0xbf, 0x24, 0xb2, 0xa5, 0xd7, 0xa9, 0x40, 0xcd, 0x87, + 0xce, 0xe2, 0x97, 0xb6, 0xd7, 0x6b, 0x34, 0x2b, 0x99, 0x71, 0x70, 0xbd, 0x76, 0x2b, 0x1b, 0xa1, + 0x42, 0x2d, 0x6b, 0x95, 0x22, 0x1f, 0x91, 0xa5, 0x5d, 0xb3, 0x27, 0x30, 0x5e, 0x19, 0x53, 0xc5, + 0xbe, 0x58, 0x7c, 0x4c, 0xf6, 0x91, 0xc5, 0xbe, 0x77, 0xd0, 0x06, 0x85, 0x26, 0xd4, 0x60, 0xbf, + 0x62, 0x4f, 0x61, 0xa2, 0x50, 0x57, 0xb2, 0xd4, 0x18, 0xeb, 0xe2, 0x27, 0xe4, 0x7b, 0x14, 0xce, + 0xb8, 0x01, 0xcf, 0x8b, 0x9f, 0xd0, 0x9d, 0x7d, 0x89, 0x4a, 0xa1, 0xe2, 0x53, 0x57, 0x9d, 0x66, + 0x6d, 0xab, 0x53, 0x6b, 0x54, 0x71, 0x92, 0x63, 0x69, 0xf8, 0x8c, 0xac, 0x43, 0x8b, 0xbc, 0xb0, + 0x00, 0x0b, 0x61, 0x52, 0x2b, 0x11, 0xaf, 0x93, 0x2a, 0xc6, 0xd2, 0xa8, 0x6b, 0xbe, 0xef, 0x62, + 0xab, 0x95, 0x78, 0x95, 0x54, 0x27, 0x16, 0xb2, 0xdb, 0xa7, 0x72, 0xfd, 0x8f, 0xa2, 0xc4, 0x8c, + 0x33, 0x97, 0x5a, 0xb3, 0xb6, 0x0c, 0x4c, 0xaa, 0x22, 0x6e, 0x8a, 0x75, 0x67, 0x1e, 0x2c, 0xba, + 0x11, 0x24, 0x55, 0xf1, 0xca, 0xd7, 0x8b, 0xc1, 0xce, 0x4a, 0x6a, 0xc3, 0x0f, 0xe8, 0x64, 0x7a, + 0xb6, 0x58, 0x6a, 0xb1, 0xbb, 0xf3, 0x60, 0x11, 0x44, 0xf4, 0xcc, 0x9e, 0xc1, 0xd4, 0x24, 0xfa, + 0x6d, 0xfc, 0x43, 0x8d, 0x35, 0xc6, 0xd4, 0xe8, 0x7b, 0xf4, 0xca, 0xc4, 0xc2, 0xdf, 0x59, 0xf4, + 0xb5, 0xed, 0xf6, 0x43, 0x18, 0x92, 0x1f, 0x79, 0x7c, 0xe0, 0x92, 0xb5, 0x00, 0x19, 0x0f, 0xe1, + 0xce, 0x8f, 0x89, 0x8e, 0x85, 0x4c, 0xb2, 0xa2, 0xcc, 0x63, 0xcf, 0x3e, 0xce, 0xe7, 0xc1, 0x62, + 0x10, 0xed, 0xff, 0x98, 0xe8, 0xa5, 0xb3, 0x34, 0x83, 0xfb, 0x04, 0xc6, 0x15, 0x96, 0xe4, 0x4b, + 0xfc, 0xb8, 0x4f, 0xe1, 0x8f, 0x3c, 0x46, 0x1c, 0xf9, 0xd8, 0x36, 0xa0, 0x12, 0x45, 0x9a, 0xc4, + 0x45, 0x99, 0xe1, 0x15, 0x7f, 0x30, 0x0f, 0x16, 0xbd, 0xe3, 0xce, 0xa7, 0x9f, 0xd9, 0x26, 0x90, + 0xe1, 0xd4, 0xe2, 0x6c, 0x0e, 0x83, 0xcb, 0xa2, 0x2c, 0xf4, 0x0a, 0x33, 0xfe, 0xd0, 0x1e, 0x78, + 0xbc, 0x63, 0x54, 0x8d, 0x51, 0x8b, 0xda, 0xd0, 0x53, 0x21, 0x4b, 0x8c, 0xdf, 0xe2, 0x35, 0xff, + 0x3d, 0x09, 0xc0, 0x80, 0x80, 0x6f, 0xf1, 0x9a, 0x3d, 0x83, 0x1d, 0x52, 0xab, 0x47, 0xa4, 0x56, + 0x6c, 0x7b, 0x3a, 0x48, 0xa6, 0xc8, 0xce, 0xfe, 0x08, 0x33, 0xfb, 0xaf, 0xe3, 0xa2, 0x4c, 0xe5, + 0xba, 0x12, 0x68, 0x90, 0x7f, 0x48, 0xf9, 0x4d, 0x09, 0x3f, 0x6d, 0x61, 0xf6, 0x09, 0x30, 0x3b, + 0xed, 0x6e, 0x9b, 0x58, 0xa1, 0xc0, 0x44, 0x23, 0x7f, 0x46, 0x07, 0xcf, 0x92, 0xaa, 0x3a, 0x21, + 0x43, 0xe4, 0x70, 0xdb, 0x49, 0xbc, 0x2a, 0x4c, 0xac, 0x30, 0xd1, 0xb2, 0xe4, 0x7f, 0xb0, 0x69, + 0x46, 0x60, 0xa1, 0x88, 0x10, 0xf6, 0x05, 0xdc, 0xb3, 0xc5, 0x35, 0x2b, 0x25, 0x8d, 0x11, 0x98, + 0xc5, 0x97, 0x52, 0xb9, 0xb2, 0x3d, 0xa6, 0xf3, 0x6d, 0xe9, 0x2f, 0x1a, 0xe3, 0xd7, 0x52, 0x51, + 0xf9, 0xbe, 0x84, 0x07, 0x3f, 0x7f, 0xc9, 0xf7, 0x45, 0xf3, 0x39, 0xbd, 0xf8, 0xc1, 0xad, 0x17, + 0x7d, 0x77, 0x34, 0xdd, 0x17, 0xed, 0x8b, 0x74, 0xd2, 0x13, 0x6a, 0xd0, 0xa4, 0x45, 0xe9, 0x8c, + 0xc7, 0x30, 0xb2, 0x97, 0x1a, 0x2a, 0x47, 0x8a, 0x90, 0x12, 0x04, 0x07, 0x59, 0x5a, 0x84, 0x7f, + 0x83, 0xd9, 0x52, 0xe6, 0xaf, 0x48, 0xc8, 0x9a, 0x81, 0xdb, 0xd2, 0xbc, 0xe0, 0x7d, 0x35, 0x2f, + 0xd8, 0xd2, 0xbc, 0xf0, 0xbf, 0x3d, 0xd8, 0x5b, 0xca, 0x3c, 0xc2, 0x24, 0x6b, 0x28, 0xf5, 0x0b, + 0x12, 0x7b, 0x7b, 0xa3, 0xee, 0xb6, 0x78, 0x7e, 0x05, 0x7b, 0x3e, 0x9a, 0x46, 0x23, 0xee, 0x10, + 0x0f, 0x1e, 0x6e, 0xf3, 0x60, 0x2b, 0x85, 0x68, 0xb2, 0xde, 0xca, 0x68, 0x5b, 0x07, 0xbb, 0x54, + 0xa9, 0x5f, 0xd0, 0xc1, 0x1d, 0x32, 0xb6, 0x3a, 0x78, 0xa3, 0xcd, 0xbd, 0xf7, 0xd0, 0xe6, 0x6d, + 0xa1, 0xdf, 0x9d, 0x77, 0xb7, 0x85, 0xfe, 0x39, 0xec, 0xaf, 0x8b, 0xb2, 0x58, 0xd7, 0xeb, 0x98, + 0xae, 0x60, 0xba, 0xb5, 0xfa, 0xc4, 0xa6, 0xa9, 0x37, 0x58, 0x46, 0xd3, 0xfd, 0xf5, 0x29, 0xb0, + 0xa2, 0x4c, 0x45, 0x9d, 0xe1, 0x26, 0x9d, 0x07, 0x6e, 0x5c, 0xbd, 0x65, 0x83, 0xd0, 0x07, 0xd0, + 0x4b, 0x65, 0x5d, 0x1a, 0x3e, 0xa4, 0xf8, 0xdd, 0xc2, 0xd2, 0xbc, 0x91, 0x23, 0x3a, 0x51, 0x61, + 0x8e, 0x57, 0x7c, 0x8f, 0x7a, 0x35, 0x6b, 0x2c, 0xd4, 0xa5, 0x1c, 0xaf, 0x6c, 0xf4, 0x56, 0x83, + 0xbc, 0x97, 0x53, 0xcb, 0xa1, 0x45, 0x9c, 0xf9, 0xe9, 0xed, 0x71, 0x9f, 0x51, 0xe4, 0xdb, 0xa3, + 0xbe, 0x80, 0x59, 0x13, 0xb6, 0xed, 0x35, 0x7d, 0x23, 0x00, 0x05, 0xbd, 0xe7, 0x71, 0xf7, 0x75, + 0xa1, 0xd9, 0x11, 0x1c, 0x34, 0x1e, 0x71, 0x85, 0x2d, 0xf3, 0xf9, 0x3e, 0xed, 0xba, 0x9f, 0x38, + 0xb7, 0xbf, 0xa2, 0xda, 0x50, 0xa4, 0x66, 0x6b, 0x92, 0xcd, 0x11, 0x6d, 0x3b, 0xf2, 0xd8, 0x37, + 0x56, 0x29, 0x1f, 0xc3, 0xa8, 0x3d, 0x5d, 0x08, 0x3e, 0x26, 0x0f, 0x68, 0x0e, 0x16, 0xc2, 0x8e, + 0x4d, 0x9a, 0xa4, 0x2b, 0x8c, 0x0b, 0x83, 0x2a, 0x31, 0x52, 0xf1, 0x09, 0xf9, 0x4c, 0x08, 0x3d, + 0xf5, 0xa0, 0xad, 0x44, 0x59, 0xaf, 0x63, 0xbd, 0x4a, 0x54, 0xa6, 0x39, 0xa3, 0x88, 0x86, 0x65, + 0xbd, 0x3e, 0x27, 0x20, 0xfc, 0x57, 0x40, 0xdf, 0x83, 0x8e, 0xdb, 0xee, 0xb2, 0x61, 0x1f, 0x43, + 0x57, 0xc8, 0x9c, 0x07, 0xc4, 0xcd, 0xbb, 0x1b, 0x2c, 0xb9, 0xf9, 0xc6, 0x88, 0xac, 0xc7, 0x06, + 0xa3, 0x3a, 0xef, 0xc1, 0xa8, 0x10, 0x26, 0x22, 0xd1, 0x26, 0x6e, 0xf9, 0xe9, 0xc8, 0x3b, 0xb2, + 0xe0, 0x89, 0xe3, 0x68, 0xf8, 0x9f, 0x80, 0x46, 0xed, 0x8d, 0xfd, 0xac, 0x89, 0x30, 0x95, 0xea, + 0xf6, 0x4c, 0x05, 0xb7, 0x86, 0xf3, 0xd6, 0x3c, 0x74, 0x5c, 0x7e, 0xff, 0x7f, 0x1e, 0xba, 0x64, + 0x6c, 0xe7, 0xa1, 0xe5, 0xd9, 0xce, 0x26, 0xcf, 0x1e, 0x01, 0x18, 0x69, 0x12, 0xe1, 0xee, 0xe1, + 0x9e, 0x9b, 0x2f, 0x42, 0xe8, 0x12, 0xe6, 0xd0, 0x57, 0x14, 0x97, 0xe6, 0xbb, 0x6e, 0x3b, 0xbf, + 0x0c, 0xff, 0xdd, 0xa1, 0x4a, 0xfa, 0xd0, 0x7f, 0x8b, 0x4c, 0xfc, 0x7c, 0xc4, 0x7b, 0xbf, 0x36, + 0xe2, 0xbd, 0xcd, 0x11, 0x9f, 0xd9, 0xcf, 0x11, 0x51, 0x1b, 0xbb, 0xf7, 0x4a, 0xd6, 0x4a, 0x53, + 0x0a, 0x93, 0xe3, 0xe0, 0xb3, 0x68, 0x7a, 0x63, 0xfa, 0xc6, 0x5a, 0xec, 0x25, 0xe3, 0x07, 0xa7, + 0xd1, 0x23, 0x97, 0xd4, 0x20, 0x9a, 0x7a, 0xdc, 0x8b, 0x0e, 0x7d, 0xa0, 0xd4, 0x36, 0xb1, 0x56, + 0xb8, 0xdc, 0xa8, 0x8f, 0x09, 0x6c, 0xa4, 0xe9, 0x29, 0x4c, 0x9a, 0x7d, 0x62, 0x59, 0x8a, 0x6b, + 0x3f, 0xe2, 0xe3, 0x06, 0x3c, 0x2b, 0xc5, 0x75, 0x78, 0x45, 0x2a, 0xed, 0xab, 0xe4, 0x09, 0x77, + 0x04, 0x3d, 0xda, 0xc8, 0x53, 0xee, 0xfe, 0x36, 0x8d, 0x36, 0xc8, 0x10, 0x39, 0x3f, 0xf6, 0x05, + 0xf4, 0x75, 0xbd, 0x5e, 0x27, 0xea, 0xda, 0x33, 0xef, 0x57, 0x5e, 0x69, 0x3c, 0xbf, 0xea, 0xfd, + 0xdd, 0x92, 0xf6, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x70, 0xd9, 0xa0, 0xf8, 0x48, 0x0d, 0x00, + 0x00, +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/log/log_service.proto b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/log/log_service.proto new file mode 100644 index 000000000..8981dc475 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/log/log_service.proto @@ -0,0 +1,150 @@ +syntax = "proto2"; +option go_package = "log"; + +package appengine; + +message LogServiceError { + enum ErrorCode { + OK = 0; + INVALID_REQUEST = 1; + STORAGE_ERROR = 2; + } +} + +message UserAppLogLine { + required int64 timestamp_usec = 1; + required int64 level = 2; + required string message = 3; +} + +message UserAppLogGroup { + repeated UserAppLogLine log_line = 2; +} + +message FlushRequest { + optional bytes logs = 1; +} + +message SetStatusRequest { + required string status = 1; +} + + +message LogOffset { + optional bytes request_id = 1; +} + +message LogLine { + required int64 time = 1; + required int32 level = 2; + required string log_message = 3; +} + +message RequestLog { + required string app_id = 1; + optional string module_id = 37 [default="default"]; + required string version_id = 2; + required bytes request_id = 3; + optional LogOffset offset = 35; + required string ip = 4; + optional string nickname = 5; + required int64 start_time = 6; + required int64 end_time = 7; + required int64 latency = 8; + required int64 mcycles = 9; + required string method = 10; + required string resource = 11; + required string http_version = 12; + required int32 status = 13; + required int64 response_size = 14; + optional string referrer = 15; + optional string user_agent = 16; + required string url_map_entry = 17; + required string combined = 18; + optional int64 api_mcycles = 19; + optional string host = 20; + optional double cost = 21; + + optional string task_queue_name = 22; + optional string task_name = 23; + + optional bool was_loading_request = 24; + optional int64 pending_time = 25; + optional int32 replica_index = 26 [default = -1]; + optional bool finished = 27 [default = true]; + optional bytes clone_key = 28; + + repeated LogLine line = 29; + + optional bool lines_incomplete = 36; + optional bytes app_engine_release = 38; + + optional int32 exit_reason = 30; + optional bool was_throttled_for_time = 31; + optional bool was_throttled_for_requests = 32; + optional int64 throttled_time = 33; + + optional bytes server_name = 34; +} + +message LogModuleVersion { + optional string module_id = 1 [default="default"]; + optional string version_id = 2; +} + +message LogReadRequest { + required string app_id = 1; + repeated string version_id = 2; + repeated LogModuleVersion module_version = 19; + + optional int64 start_time = 3; + optional int64 end_time = 4; + optional LogOffset offset = 5; + repeated bytes request_id = 6; + + optional int32 minimum_log_level = 7; + optional bool include_incomplete = 8; + optional int64 count = 9; + + optional string combined_log_regex = 14; + optional string host_regex = 15; + optional int32 replica_index = 16; + + optional bool include_app_logs = 10; + optional int32 app_logs_per_request = 17; + optional bool include_host = 11; + optional bool include_all = 12; + optional bool cache_iterator = 13; + optional int32 num_shards = 18; +} + +message LogReadResponse { + repeated RequestLog log = 1; + optional LogOffset offset = 2; + optional int64 last_end_time = 3; +} + +message LogUsageRecord { + optional string version_id = 1; + optional int32 start_time = 2; + optional int32 end_time = 3; + optional int64 count = 4; + optional int64 total_size = 5; + optional int32 records = 6; +} + +message LogUsageRequest { + required string app_id = 1; + repeated string version_id = 2; + optional int32 start_time = 3; + optional int32 end_time = 4; + optional uint32 resolution_hours = 5 [default = 1]; + optional bool combine_versions = 6; + optional int32 usage_version = 7; + optional bool versions_only = 8; +} + +message LogUsageResponse { + repeated LogUsageRecord usage = 1; + optional LogUsageRecord summary = 2; +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/main.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/main.go new file mode 100644 index 000000000..1e765312f --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/main.go @@ -0,0 +1,16 @@ +// Copyright 2011 Google Inc. All rights reserved. +// Use of this source code is governed by the Apache 2.0 +// license that can be found in the LICENSE file. + +// +build appengine + +package internal + +import ( + "appengine_internal" +) + +func Main() { + MainPath = "" + appengine_internal.Main() +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/main_common.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/main_common.go new file mode 100644 index 000000000..357dce4dd --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/main_common.go @@ -0,0 +1,7 @@ +package internal + +// MainPath stores the file path of the main package. On App Engine Standard +// using Go version 1.9 and below, this will be unset. On App Engine Flex and +// App Engine Standard second-gen (Go 1.11 and above), this will be the +// filepath to package main. +var MainPath string diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/main_vm.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/main_vm.go new file mode 100644 index 000000000..ddb79a333 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/main_vm.go @@ -0,0 +1,69 @@ +// Copyright 2011 Google Inc. All rights reserved. +// Use of this source code is governed by the Apache 2.0 +// license that can be found in the LICENSE file. + +// +build !appengine + +package internal + +import ( + "io" + "log" + "net/http" + "net/url" + "os" + "path/filepath" + "runtime" +) + +func Main() { + MainPath = filepath.Dir(findMainPath()) + installHealthChecker(http.DefaultServeMux) + + port := "8080" + if s := os.Getenv("PORT"); s != "" { + port = s + } + + host := "" + if IsDevAppServer() { + host = "127.0.0.1" + } + if err := http.ListenAndServe(host+":"+port, http.HandlerFunc(handleHTTP)); err != nil { + log.Fatalf("http.ListenAndServe: %v", err) + } +} + +// Find the path to package main by looking at the root Caller. +func findMainPath() string { + pc := make([]uintptr, 100) + n := runtime.Callers(2, pc) + frames := runtime.CallersFrames(pc[:n]) + for { + frame, more := frames.Next() + // Tests won't have package main, instead they have testing.tRunner + if frame.Function == "main.main" || frame.Function == "testing.tRunner" { + return frame.File + } + if !more { + break + } + } + return "" +} + +func installHealthChecker(mux *http.ServeMux) { + // If no health check handler has been installed by this point, add a trivial one. + const healthPath = "/_ah/health" + hreq := &http.Request{ + Method: "GET", + URL: &url.URL{ + Path: healthPath, + }, + } + if _, pat := mux.Handler(hreq); pat != healthPath { + mux.HandleFunc(healthPath, func(w http.ResponseWriter, r *http.Request) { + io.WriteString(w, "ok") + }) + } +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/metadata.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/metadata.go new file mode 100644 index 000000000..c4ba63bb4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/metadata.go @@ -0,0 +1,60 @@ +// Copyright 2014 Google Inc. All rights reserved. +// Use of this source code is governed by the Apache 2.0 +// license that can be found in the LICENSE file. + +package internal + +// This file has code for accessing metadata. +// +// References: +// https://cloud.google.com/compute/docs/metadata + +import ( + "fmt" + "io/ioutil" + "net/http" + "net/url" +) + +const ( + metadataHost = "metadata" + metadataPath = "/computeMetadata/v1/" +) + +var ( + metadataRequestHeaders = http.Header{ + "Metadata-Flavor": []string{"Google"}, + } +) + +// TODO(dsymonds): Do we need to support default values, like Python? +func mustGetMetadata(key string) []byte { + b, err := getMetadata(key) + if err != nil { + panic(fmt.Sprintf("Metadata fetch failed for '%s': %v", key, err)) + } + return b +} + +func getMetadata(key string) ([]byte, error) { + // TODO(dsymonds): May need to use url.Parse to support keys with query args. + req := &http.Request{ + Method: "GET", + URL: &url.URL{ + Scheme: "http", + Host: metadataHost, + Path: metadataPath + key, + }, + Header: metadataRequestHeaders, + Host: metadataHost, + } + resp, err := http.DefaultClient.Do(req) + if err != nil { + return nil, err + } + defer resp.Body.Close() + if resp.StatusCode != 200 { + return nil, fmt.Errorf("metadata server returned HTTP %d", resp.StatusCode) + } + return ioutil.ReadAll(resp.Body) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/net.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/net.go new file mode 100644 index 000000000..3b94cf0c6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/net.go @@ -0,0 +1,56 @@ +// Copyright 2014 Google Inc. All rights reserved. +// Use of this source code is governed by the Apache 2.0 +// license that can be found in the LICENSE file. + +package internal + +// This file implements a network dialer that limits the number of concurrent connections. +// It is only used for API calls. + +import ( + "log" + "net" + "runtime" + "sync" + "time" +) + +var limitSem = make(chan int, 100) // TODO(dsymonds): Use environment variable. + +func limitRelease() { + // non-blocking + select { + case <-limitSem: + default: + // This should not normally happen. + log.Print("appengine: unbalanced limitSem release!") + } +} + +func limitDial(network, addr string) (net.Conn, error) { + limitSem <- 1 + + // Dial with a timeout in case the API host is MIA. + // The connection should normally be very fast. + conn, err := net.DialTimeout(network, addr, 500*time.Millisecond) + if err != nil { + limitRelease() + return nil, err + } + lc := &limitConn{Conn: conn} + runtime.SetFinalizer(lc, (*limitConn).Close) // shouldn't usually be required + return lc, nil +} + +type limitConn struct { + close sync.Once + net.Conn +} + +func (lc *limitConn) Close() error { + defer lc.close.Do(func() { + limitRelease() + runtime.SetFinalizer(lc, nil) + }) + return lc.Conn.Close() +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/regen.sh b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/regen.sh new file mode 100755 index 000000000..2fdb546a6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/regen.sh @@ -0,0 +1,40 @@ +#!/bin/bash -e +# +# This script rebuilds the generated code for the protocol buffers. +# To run this you will need protoc and goprotobuf installed; +# see https://github.com/golang/protobuf for instructions. + +PKG=google.golang.org/appengine + +function die() { + echo 1>&2 $* + exit 1 +} + +# Sanity check that the right tools are accessible. +for tool in go protoc protoc-gen-go; do + q=$(which $tool) || die "didn't find $tool" + echo 1>&2 "$tool: $q" +done + +echo -n 1>&2 "finding package dir... " +pkgdir=$(go list -f '{{.Dir}}' $PKG) +echo 1>&2 $pkgdir +base=$(echo $pkgdir | sed "s,/$PKG\$,,") +echo 1>&2 "base: $base" +cd $base + +# Run protoc once per package. +for dir in $(find $PKG/internal -name '*.proto' | xargs dirname | sort | uniq); do + echo 1>&2 "* $dir" + protoc --go_out=. $dir/*.proto +done + +for f in $(find $PKG/internal -name '*.pb.go'); do + # Remove proto.RegisterEnum calls. + # These cause duplicate registration panics when these packages + # are used on classic App Engine. proto.RegisterEnum only affects + # parsing the text format; we don't care about that. + # https://code.google.com/p/googleappengine/issues/detail?id=11670#c17 + sed -i '/proto.RegisterEnum/d' $f +done diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/remote_api/remote_api.pb.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/remote_api/remote_api.pb.go new file mode 100644 index 000000000..8d782a38e --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/remote_api/remote_api.pb.go @@ -0,0 +1,361 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: google.golang.org/appengine/internal/remote_api/remote_api.proto + +package remote_api + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package + +type RpcError_ErrorCode int32 + +const ( + RpcError_UNKNOWN RpcError_ErrorCode = 0 + RpcError_CALL_NOT_FOUND RpcError_ErrorCode = 1 + RpcError_PARSE_ERROR RpcError_ErrorCode = 2 + RpcError_SECURITY_VIOLATION RpcError_ErrorCode = 3 + RpcError_OVER_QUOTA RpcError_ErrorCode = 4 + RpcError_REQUEST_TOO_LARGE RpcError_ErrorCode = 5 + RpcError_CAPABILITY_DISABLED RpcError_ErrorCode = 6 + RpcError_FEATURE_DISABLED RpcError_ErrorCode = 7 + RpcError_BAD_REQUEST RpcError_ErrorCode = 8 + RpcError_RESPONSE_TOO_LARGE RpcError_ErrorCode = 9 + RpcError_CANCELLED RpcError_ErrorCode = 10 + RpcError_REPLAY_ERROR RpcError_ErrorCode = 11 + RpcError_DEADLINE_EXCEEDED RpcError_ErrorCode = 12 +) + +var RpcError_ErrorCode_name = map[int32]string{ + 0: "UNKNOWN", + 1: "CALL_NOT_FOUND", + 2: "PARSE_ERROR", + 3: "SECURITY_VIOLATION", + 4: "OVER_QUOTA", + 5: "REQUEST_TOO_LARGE", + 6: "CAPABILITY_DISABLED", + 7: "FEATURE_DISABLED", + 8: "BAD_REQUEST", + 9: "RESPONSE_TOO_LARGE", + 10: "CANCELLED", + 11: "REPLAY_ERROR", + 12: "DEADLINE_EXCEEDED", +} +var RpcError_ErrorCode_value = map[string]int32{ + "UNKNOWN": 0, + "CALL_NOT_FOUND": 1, + "PARSE_ERROR": 2, + "SECURITY_VIOLATION": 3, + "OVER_QUOTA": 4, + "REQUEST_TOO_LARGE": 5, + "CAPABILITY_DISABLED": 6, + "FEATURE_DISABLED": 7, + "BAD_REQUEST": 8, + "RESPONSE_TOO_LARGE": 9, + "CANCELLED": 10, + "REPLAY_ERROR": 11, + "DEADLINE_EXCEEDED": 12, +} + +func (x RpcError_ErrorCode) Enum() *RpcError_ErrorCode { + p := new(RpcError_ErrorCode) + *p = x + return p +} +func (x RpcError_ErrorCode) String() string { + return proto.EnumName(RpcError_ErrorCode_name, int32(x)) +} +func (x *RpcError_ErrorCode) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(RpcError_ErrorCode_value, data, "RpcError_ErrorCode") + if err != nil { + return err + } + *x = RpcError_ErrorCode(value) + return nil +} +func (RpcError_ErrorCode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_remote_api_1978114ec33a273d, []int{2, 0} +} + +type Request struct { + ServiceName *string `protobuf:"bytes,2,req,name=service_name,json=serviceName" json:"service_name,omitempty"` + Method *string `protobuf:"bytes,3,req,name=method" json:"method,omitempty"` + Request []byte `protobuf:"bytes,4,req,name=request" json:"request,omitempty"` + RequestId *string `protobuf:"bytes,5,opt,name=request_id,json=requestId" json:"request_id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Request) Reset() { *m = Request{} } +func (m *Request) String() string { return proto.CompactTextString(m) } +func (*Request) ProtoMessage() {} +func (*Request) Descriptor() ([]byte, []int) { + return fileDescriptor_remote_api_1978114ec33a273d, []int{0} +} +func (m *Request) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Request.Unmarshal(m, b) +} +func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Request.Marshal(b, m, deterministic) +} +func (dst *Request) XXX_Merge(src proto.Message) { + xxx_messageInfo_Request.Merge(dst, src) +} +func (m *Request) XXX_Size() int { + return xxx_messageInfo_Request.Size(m) +} +func (m *Request) XXX_DiscardUnknown() { + xxx_messageInfo_Request.DiscardUnknown(m) +} + +var xxx_messageInfo_Request proto.InternalMessageInfo + +func (m *Request) GetServiceName() string { + if m != nil && m.ServiceName != nil { + return *m.ServiceName + } + return "" +} + +func (m *Request) GetMethod() string { + if m != nil && m.Method != nil { + return *m.Method + } + return "" +} + +func (m *Request) GetRequest() []byte { + if m != nil { + return m.Request + } + return nil +} + +func (m *Request) GetRequestId() string { + if m != nil && m.RequestId != nil { + return *m.RequestId + } + return "" +} + +type ApplicationError struct { + Code *int32 `protobuf:"varint,1,req,name=code" json:"code,omitempty"` + Detail *string `protobuf:"bytes,2,req,name=detail" json:"detail,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ApplicationError) Reset() { *m = ApplicationError{} } +func (m *ApplicationError) String() string { return proto.CompactTextString(m) } +func (*ApplicationError) ProtoMessage() {} +func (*ApplicationError) Descriptor() ([]byte, []int) { + return fileDescriptor_remote_api_1978114ec33a273d, []int{1} +} +func (m *ApplicationError) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ApplicationError.Unmarshal(m, b) +} +func (m *ApplicationError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ApplicationError.Marshal(b, m, deterministic) +} +func (dst *ApplicationError) XXX_Merge(src proto.Message) { + xxx_messageInfo_ApplicationError.Merge(dst, src) +} +func (m *ApplicationError) XXX_Size() int { + return xxx_messageInfo_ApplicationError.Size(m) +} +func (m *ApplicationError) XXX_DiscardUnknown() { + xxx_messageInfo_ApplicationError.DiscardUnknown(m) +} + +var xxx_messageInfo_ApplicationError proto.InternalMessageInfo + +func (m *ApplicationError) GetCode() int32 { + if m != nil && m.Code != nil { + return *m.Code + } + return 0 +} + +func (m *ApplicationError) GetDetail() string { + if m != nil && m.Detail != nil { + return *m.Detail + } + return "" +} + +type RpcError struct { + Code *int32 `protobuf:"varint,1,req,name=code" json:"code,omitempty"` + Detail *string `protobuf:"bytes,2,opt,name=detail" json:"detail,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RpcError) Reset() { *m = RpcError{} } +func (m *RpcError) String() string { return proto.CompactTextString(m) } +func (*RpcError) ProtoMessage() {} +func (*RpcError) Descriptor() ([]byte, []int) { + return fileDescriptor_remote_api_1978114ec33a273d, []int{2} +} +func (m *RpcError) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RpcError.Unmarshal(m, b) +} +func (m *RpcError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RpcError.Marshal(b, m, deterministic) +} +func (dst *RpcError) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcError.Merge(dst, src) +} +func (m *RpcError) XXX_Size() int { + return xxx_messageInfo_RpcError.Size(m) +} +func (m *RpcError) XXX_DiscardUnknown() { + xxx_messageInfo_RpcError.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcError proto.InternalMessageInfo + +func (m *RpcError) GetCode() int32 { + if m != nil && m.Code != nil { + return *m.Code + } + return 0 +} + +func (m *RpcError) GetDetail() string { + if m != nil && m.Detail != nil { + return *m.Detail + } + return "" +} + +type Response struct { + Response []byte `protobuf:"bytes,1,opt,name=response" json:"response,omitempty"` + Exception []byte `protobuf:"bytes,2,opt,name=exception" json:"exception,omitempty"` + ApplicationError *ApplicationError `protobuf:"bytes,3,opt,name=application_error,json=applicationError" json:"application_error,omitempty"` + JavaException []byte `protobuf:"bytes,4,opt,name=java_exception,json=javaException" json:"java_exception,omitempty"` + RpcError *RpcError `protobuf:"bytes,5,opt,name=rpc_error,json=rpcError" json:"rpc_error,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Response) Reset() { *m = Response{} } +func (m *Response) String() string { return proto.CompactTextString(m) } +func (*Response) ProtoMessage() {} +func (*Response) Descriptor() ([]byte, []int) { + return fileDescriptor_remote_api_1978114ec33a273d, []int{3} +} +func (m *Response) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Response.Unmarshal(m, b) +} +func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Response.Marshal(b, m, deterministic) +} +func (dst *Response) XXX_Merge(src proto.Message) { + xxx_messageInfo_Response.Merge(dst, src) +} +func (m *Response) XXX_Size() int { + return xxx_messageInfo_Response.Size(m) +} +func (m *Response) XXX_DiscardUnknown() { + xxx_messageInfo_Response.DiscardUnknown(m) +} + +var xxx_messageInfo_Response proto.InternalMessageInfo + +func (m *Response) GetResponse() []byte { + if m != nil { + return m.Response + } + return nil +} + +func (m *Response) GetException() []byte { + if m != nil { + return m.Exception + } + return nil +} + +func (m *Response) GetApplicationError() *ApplicationError { + if m != nil { + return m.ApplicationError + } + return nil +} + +func (m *Response) GetJavaException() []byte { + if m != nil { + return m.JavaException + } + return nil +} + +func (m *Response) GetRpcError() *RpcError { + if m != nil { + return m.RpcError + } + return nil +} + +func init() { + proto.RegisterType((*Request)(nil), "remote_api.Request") + proto.RegisterType((*ApplicationError)(nil), "remote_api.ApplicationError") + proto.RegisterType((*RpcError)(nil), "remote_api.RpcError") + proto.RegisterType((*Response)(nil), "remote_api.Response") +} + +func init() { + proto.RegisterFile("google.golang.org/appengine/internal/remote_api/remote_api.proto", fileDescriptor_remote_api_1978114ec33a273d) +} + +var fileDescriptor_remote_api_1978114ec33a273d = []byte{ + // 531 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x51, 0x6e, 0xd3, 0x40, + 0x10, 0x86, 0xb1, 0x9b, 0x34, 0xf1, 0xc4, 0x2d, 0xdb, 0xa5, 0x14, 0x0b, 0x15, 0x29, 0x44, 0x42, + 0xca, 0x53, 0x2a, 0x38, 0x00, 0x62, 0x63, 0x6f, 0x91, 0x85, 0x65, 0xa7, 0x6b, 0xbb, 0x50, 0x5e, + 0x56, 0x2b, 0x67, 0x65, 0x8c, 0x12, 0xaf, 0xd9, 0x98, 0x8a, 0x17, 0x6e, 0xc0, 0xb5, 0x38, 0x0c, + 0xb7, 0x40, 0x36, 0x6e, 0x63, 0xf5, 0x89, 0xb7, 0x7f, 0x7e, 0x7b, 0xe6, 0x1b, 0xcd, 0xcc, 0xc2, + 0xbb, 0x5c, 0xa9, 0x7c, 0x23, 0x17, 0xb9, 0xda, 0x88, 0x32, 0x5f, 0x28, 0x9d, 0x5f, 0x88, 0xaa, + 0x92, 0x65, 0x5e, 0x94, 0xf2, 0xa2, 0x28, 0x6b, 0xa9, 0x4b, 0xb1, 0xb9, 0xd0, 0x72, 0xab, 0x6a, + 0xc9, 0x45, 0x55, 0xf4, 0xe4, 0xa2, 0xd2, 0xaa, 0x56, 0x18, 0xf6, 0xce, 0xec, 0x27, 0x8c, 0x98, + 0xfc, 0xf6, 0x5d, 0xee, 0x6a, 0xfc, 0x12, 0xec, 0x9d, 0xd4, 0xb7, 0x45, 0x26, 0x79, 0x29, 0xb6, + 0xd2, 0x31, 0xa7, 0xe6, 0xdc, 0x62, 0x93, 0xce, 0x0b, 0xc5, 0x56, 0xe2, 0x33, 0x38, 0xdc, 0xca, + 0xfa, 0x8b, 0x5a, 0x3b, 0x07, 0xed, 0xc7, 0x2e, 0xc2, 0x0e, 0x8c, 0xf4, 0xbf, 0x2a, 0xce, 0x60, + 0x6a, 0xce, 0x6d, 0x76, 0x17, 0xe2, 0x17, 0x00, 0x9d, 0xe4, 0xc5, 0xda, 0x19, 0x4e, 0x8d, 0xb9, + 0xc5, 0xac, 0xce, 0xf1, 0xd7, 0xb3, 0xb7, 0x80, 0x48, 0x55, 0x6d, 0x8a, 0x4c, 0xd4, 0x85, 0x2a, + 0xa9, 0xd6, 0x4a, 0x63, 0x0c, 0x83, 0x4c, 0xad, 0xa5, 0x63, 0x4c, 0xcd, 0xf9, 0x90, 0xb5, 0xba, + 0x01, 0xaf, 0x65, 0x2d, 0x8a, 0x4d, 0xd7, 0x55, 0x17, 0xcd, 0x7e, 0x9b, 0x30, 0x66, 0x55, 0xf6, + 0x7f, 0x89, 0x46, 0x2f, 0xf1, 0x97, 0x09, 0x56, 0x9b, 0xe5, 0x36, 0x7f, 0x4d, 0x60, 0x94, 0x86, + 0x1f, 0xc2, 0xe8, 0x63, 0x88, 0x1e, 0x61, 0x0c, 0xc7, 0x2e, 0x09, 0x02, 0x1e, 0x46, 0x09, 0xbf, + 0x8c, 0xd2, 0xd0, 0x43, 0x06, 0x7e, 0x0c, 0x93, 0x15, 0x61, 0x31, 0xe5, 0x94, 0xb1, 0x88, 0x21, + 0x13, 0x9f, 0x01, 0x8e, 0xa9, 0x9b, 0x32, 0x3f, 0xb9, 0xe1, 0xd7, 0x7e, 0x14, 0x90, 0xc4, 0x8f, + 0x42, 0x74, 0x80, 0x8f, 0x01, 0xa2, 0x6b, 0xca, 0xf8, 0x55, 0x1a, 0x25, 0x04, 0x0d, 0xf0, 0x53, + 0x38, 0x61, 0xf4, 0x2a, 0xa5, 0x71, 0xc2, 0x93, 0x28, 0xe2, 0x01, 0x61, 0xef, 0x29, 0x1a, 0xe2, + 0x67, 0xf0, 0xc4, 0x25, 0x2b, 0xb2, 0xf4, 0x83, 0xa6, 0x80, 0xe7, 0xc7, 0x64, 0x19, 0x50, 0x0f, + 0x1d, 0xe2, 0x53, 0x40, 0x97, 0x94, 0x24, 0x29, 0xa3, 0x7b, 0x77, 0xd4, 0xe0, 0x97, 0xc4, 0xe3, + 0x5d, 0x25, 0x34, 0x6e, 0xf0, 0x8c, 0xc6, 0xab, 0x28, 0x8c, 0x69, 0xaf, 0xae, 0x85, 0x8f, 0xc0, + 0x72, 0x49, 0xe8, 0xd2, 0xa0, 0xc9, 0x03, 0x8c, 0xc0, 0x66, 0x74, 0x15, 0x90, 0x9b, 0xae, 0xef, + 0x49, 0xd3, 0x8f, 0x47, 0x89, 0x17, 0xf8, 0x21, 0xe5, 0xf4, 0x93, 0x4b, 0xa9, 0x47, 0x3d, 0x64, + 0xcf, 0xfe, 0x18, 0x30, 0x66, 0x72, 0x57, 0xa9, 0x72, 0x27, 0xf1, 0x73, 0x18, 0xeb, 0x4e, 0x3b, + 0xc6, 0xd4, 0x98, 0xdb, 0xec, 0x3e, 0xc6, 0xe7, 0x60, 0xc9, 0x1f, 0x99, 0xac, 0x9a, 0x75, 0xb5, + 0x23, 0xb5, 0xd9, 0xde, 0xc0, 0x3e, 0x9c, 0x88, 0xfd, 0x3a, 0xb9, 0x6c, 0x06, 0xec, 0x1c, 0x4c, + 0x8d, 0xf9, 0xe4, 0xcd, 0xf9, 0xa2, 0x77, 0x87, 0x0f, 0x77, 0xce, 0x90, 0x78, 0x78, 0x05, 0xaf, + 0xe0, 0xf8, 0xab, 0xb8, 0x15, 0x7c, 0x4f, 0x1b, 0xb4, 0xb4, 0xa3, 0xc6, 0xa5, 0xf7, 0xc4, 0xd7, + 0x60, 0xe9, 0x2a, 0xeb, 0x48, 0xc3, 0x96, 0x74, 0xda, 0x27, 0xdd, 0x1d, 0x07, 0x1b, 0xeb, 0x4e, + 0x2d, 0xed, 0xcf, 0xbd, 0x07, 0xf0, 0x37, 0x00, 0x00, 0xff, 0xff, 0x38, 0xd1, 0x0f, 0x22, 0x4f, + 0x03, 0x00, 0x00, +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/remote_api/remote_api.proto b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/remote_api/remote_api.proto new file mode 100644 index 000000000..f21763a4e --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/remote_api/remote_api.proto @@ -0,0 +1,44 @@ +syntax = "proto2"; +option go_package = "remote_api"; + +package remote_api; + +message Request { + required string service_name = 2; + required string method = 3; + required bytes request = 4; + optional string request_id = 5; +} + +message ApplicationError { + required int32 code = 1; + required string detail = 2; +} + +message RpcError { + enum ErrorCode { + UNKNOWN = 0; + CALL_NOT_FOUND = 1; + PARSE_ERROR = 2; + SECURITY_VIOLATION = 3; + OVER_QUOTA = 4; + REQUEST_TOO_LARGE = 5; + CAPABILITY_DISABLED = 6; + FEATURE_DISABLED = 7; + BAD_REQUEST = 8; + RESPONSE_TOO_LARGE = 9; + CANCELLED = 10; + REPLAY_ERROR = 11; + DEADLINE_EXCEEDED = 12; + } + required int32 code = 1; + optional string detail = 2; +} + +message Response { + optional bytes response = 1; + optional bytes exception = 2; + optional ApplicationError application_error = 3; + optional bytes java_exception = 4; + optional RpcError rpc_error = 5; +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/transaction.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/transaction.go new file mode 100644 index 000000000..9006ae653 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/transaction.go @@ -0,0 +1,115 @@ +// Copyright 2014 Google Inc. All rights reserved. +// Use of this source code is governed by the Apache 2.0 +// license that can be found in the LICENSE file. + +package internal + +// This file implements hooks for applying datastore transactions. + +import ( + "errors" + "reflect" + + "github.com/golang/protobuf/proto" + netcontext "golang.org/x/net/context" + + basepb "google.golang.org/appengine/internal/base" + pb "google.golang.org/appengine/internal/datastore" +) + +var transactionSetters = make(map[reflect.Type]reflect.Value) + +// RegisterTransactionSetter registers a function that sets transaction information +// in a protocol buffer message. f should be a function with two arguments, +// the first being a protocol buffer type, and the second being *datastore.Transaction. +func RegisterTransactionSetter(f interface{}) { + v := reflect.ValueOf(f) + transactionSetters[v.Type().In(0)] = v +} + +// applyTransaction applies the transaction t to message pb +// by using the relevant setter passed to RegisterTransactionSetter. +func applyTransaction(pb proto.Message, t *pb.Transaction) { + v := reflect.ValueOf(pb) + if f, ok := transactionSetters[v.Type()]; ok { + f.Call([]reflect.Value{v, reflect.ValueOf(t)}) + } +} + +var transactionKey = "used for *Transaction" + +func transactionFromContext(ctx netcontext.Context) *transaction { + t, _ := ctx.Value(&transactionKey).(*transaction) + return t +} + +func withTransaction(ctx netcontext.Context, t *transaction) netcontext.Context { + return netcontext.WithValue(ctx, &transactionKey, t) +} + +type transaction struct { + transaction pb.Transaction + finished bool +} + +var ErrConcurrentTransaction = errors.New("internal: concurrent transaction") + +func RunTransactionOnce(c netcontext.Context, f func(netcontext.Context) error, xg bool, readOnly bool, previousTransaction *pb.Transaction) (*pb.Transaction, error) { + if transactionFromContext(c) != nil { + return nil, errors.New("nested transactions are not supported") + } + + // Begin the transaction. + t := &transaction{} + req := &pb.BeginTransactionRequest{ + App: proto.String(FullyQualifiedAppID(c)), + } + if xg { + req.AllowMultipleEg = proto.Bool(true) + } + if previousTransaction != nil { + req.PreviousTransaction = previousTransaction + } + if readOnly { + req.Mode = pb.BeginTransactionRequest_READ_ONLY.Enum() + } else { + req.Mode = pb.BeginTransactionRequest_READ_WRITE.Enum() + } + if err := Call(c, "datastore_v3", "BeginTransaction", req, &t.transaction); err != nil { + return nil, err + } + + // Call f, rolling back the transaction if f returns a non-nil error, or panics. + // The panic is not recovered. + defer func() { + if t.finished { + return + } + t.finished = true + // Ignore the error return value, since we are already returning a non-nil + // error (or we're panicking). + Call(c, "datastore_v3", "Rollback", &t.transaction, &basepb.VoidProto{}) + }() + if err := f(withTransaction(c, t)); err != nil { + return &t.transaction, err + } + t.finished = true + + // Commit the transaction. + res := &pb.CommitResponse{} + err := Call(c, "datastore_v3", "Commit", &t.transaction, res) + if ae, ok := err.(*APIError); ok { + /* TODO: restore this conditional + if appengine.IsDevAppServer() { + */ + // The Python Dev AppServer raises an ApplicationError with error code 2 (which is + // Error.CONCURRENT_TRANSACTION) and message "Concurrency exception.". + if ae.Code == int32(pb.Error_BAD_REQUEST) && ae.Detail == "ApplicationError: 2 Concurrency exception." { + return &t.transaction, ErrConcurrentTransaction + } + if ae.Code == int32(pb.Error_CONCURRENT_TRANSACTION) { + return &t.transaction, ErrConcurrentTransaction + } + } + return &t.transaction, err +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.pb.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.pb.go new file mode 100644 index 000000000..5f727750a --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.pb.go @@ -0,0 +1,527 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: google.golang.org/appengine/internal/urlfetch/urlfetch_service.proto + +package urlfetch + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package + +type URLFetchServiceError_ErrorCode int32 + +const ( + URLFetchServiceError_OK URLFetchServiceError_ErrorCode = 0 + URLFetchServiceError_INVALID_URL URLFetchServiceError_ErrorCode = 1 + URLFetchServiceError_FETCH_ERROR URLFetchServiceError_ErrorCode = 2 + URLFetchServiceError_UNSPECIFIED_ERROR URLFetchServiceError_ErrorCode = 3 + URLFetchServiceError_RESPONSE_TOO_LARGE URLFetchServiceError_ErrorCode = 4 + URLFetchServiceError_DEADLINE_EXCEEDED URLFetchServiceError_ErrorCode = 5 + URLFetchServiceError_SSL_CERTIFICATE_ERROR URLFetchServiceError_ErrorCode = 6 + URLFetchServiceError_DNS_ERROR URLFetchServiceError_ErrorCode = 7 + URLFetchServiceError_CLOSED URLFetchServiceError_ErrorCode = 8 + URLFetchServiceError_INTERNAL_TRANSIENT_ERROR URLFetchServiceError_ErrorCode = 9 + URLFetchServiceError_TOO_MANY_REDIRECTS URLFetchServiceError_ErrorCode = 10 + URLFetchServiceError_MALFORMED_REPLY URLFetchServiceError_ErrorCode = 11 + URLFetchServiceError_CONNECTION_ERROR URLFetchServiceError_ErrorCode = 12 +) + +var URLFetchServiceError_ErrorCode_name = map[int32]string{ + 0: "OK", + 1: "INVALID_URL", + 2: "FETCH_ERROR", + 3: "UNSPECIFIED_ERROR", + 4: "RESPONSE_TOO_LARGE", + 5: "DEADLINE_EXCEEDED", + 6: "SSL_CERTIFICATE_ERROR", + 7: "DNS_ERROR", + 8: "CLOSED", + 9: "INTERNAL_TRANSIENT_ERROR", + 10: "TOO_MANY_REDIRECTS", + 11: "MALFORMED_REPLY", + 12: "CONNECTION_ERROR", +} +var URLFetchServiceError_ErrorCode_value = map[string]int32{ + "OK": 0, + "INVALID_URL": 1, + "FETCH_ERROR": 2, + "UNSPECIFIED_ERROR": 3, + "RESPONSE_TOO_LARGE": 4, + "DEADLINE_EXCEEDED": 5, + "SSL_CERTIFICATE_ERROR": 6, + "DNS_ERROR": 7, + "CLOSED": 8, + "INTERNAL_TRANSIENT_ERROR": 9, + "TOO_MANY_REDIRECTS": 10, + "MALFORMED_REPLY": 11, + "CONNECTION_ERROR": 12, +} + +func (x URLFetchServiceError_ErrorCode) Enum() *URLFetchServiceError_ErrorCode { + p := new(URLFetchServiceError_ErrorCode) + *p = x + return p +} +func (x URLFetchServiceError_ErrorCode) String() string { + return proto.EnumName(URLFetchServiceError_ErrorCode_name, int32(x)) +} +func (x *URLFetchServiceError_ErrorCode) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(URLFetchServiceError_ErrorCode_value, data, "URLFetchServiceError_ErrorCode") + if err != nil { + return err + } + *x = URLFetchServiceError_ErrorCode(value) + return nil +} +func (URLFetchServiceError_ErrorCode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{0, 0} +} + +type URLFetchRequest_RequestMethod int32 + +const ( + URLFetchRequest_GET URLFetchRequest_RequestMethod = 1 + URLFetchRequest_POST URLFetchRequest_RequestMethod = 2 + URLFetchRequest_HEAD URLFetchRequest_RequestMethod = 3 + URLFetchRequest_PUT URLFetchRequest_RequestMethod = 4 + URLFetchRequest_DELETE URLFetchRequest_RequestMethod = 5 + URLFetchRequest_PATCH URLFetchRequest_RequestMethod = 6 +) + +var URLFetchRequest_RequestMethod_name = map[int32]string{ + 1: "GET", + 2: "POST", + 3: "HEAD", + 4: "PUT", + 5: "DELETE", + 6: "PATCH", +} +var URLFetchRequest_RequestMethod_value = map[string]int32{ + "GET": 1, + "POST": 2, + "HEAD": 3, + "PUT": 4, + "DELETE": 5, + "PATCH": 6, +} + +func (x URLFetchRequest_RequestMethod) Enum() *URLFetchRequest_RequestMethod { + p := new(URLFetchRequest_RequestMethod) + *p = x + return p +} +func (x URLFetchRequest_RequestMethod) String() string { + return proto.EnumName(URLFetchRequest_RequestMethod_name, int32(x)) +} +func (x *URLFetchRequest_RequestMethod) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(URLFetchRequest_RequestMethod_value, data, "URLFetchRequest_RequestMethod") + if err != nil { + return err + } + *x = URLFetchRequest_RequestMethod(value) + return nil +} +func (URLFetchRequest_RequestMethod) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{1, 0} +} + +type URLFetchServiceError struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *URLFetchServiceError) Reset() { *m = URLFetchServiceError{} } +func (m *URLFetchServiceError) String() string { return proto.CompactTextString(m) } +func (*URLFetchServiceError) ProtoMessage() {} +func (*URLFetchServiceError) Descriptor() ([]byte, []int) { + return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{0} +} +func (m *URLFetchServiceError) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_URLFetchServiceError.Unmarshal(m, b) +} +func (m *URLFetchServiceError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_URLFetchServiceError.Marshal(b, m, deterministic) +} +func (dst *URLFetchServiceError) XXX_Merge(src proto.Message) { + xxx_messageInfo_URLFetchServiceError.Merge(dst, src) +} +func (m *URLFetchServiceError) XXX_Size() int { + return xxx_messageInfo_URLFetchServiceError.Size(m) +} +func (m *URLFetchServiceError) XXX_DiscardUnknown() { + xxx_messageInfo_URLFetchServiceError.DiscardUnknown(m) +} + +var xxx_messageInfo_URLFetchServiceError proto.InternalMessageInfo + +type URLFetchRequest struct { + Method *URLFetchRequest_RequestMethod `protobuf:"varint,1,req,name=Method,enum=appengine.URLFetchRequest_RequestMethod" json:"Method,omitempty"` + Url *string `protobuf:"bytes,2,req,name=Url" json:"Url,omitempty"` + Header []*URLFetchRequest_Header `protobuf:"group,3,rep,name=Header,json=header" json:"header,omitempty"` + Payload []byte `protobuf:"bytes,6,opt,name=Payload" json:"Payload,omitempty"` + FollowRedirects *bool `protobuf:"varint,7,opt,name=FollowRedirects,def=1" json:"FollowRedirects,omitempty"` + Deadline *float64 `protobuf:"fixed64,8,opt,name=Deadline" json:"Deadline,omitempty"` + MustValidateServerCertificate *bool `protobuf:"varint,9,opt,name=MustValidateServerCertificate,def=1" json:"MustValidateServerCertificate,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *URLFetchRequest) Reset() { *m = URLFetchRequest{} } +func (m *URLFetchRequest) String() string { return proto.CompactTextString(m) } +func (*URLFetchRequest) ProtoMessage() {} +func (*URLFetchRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{1} +} +func (m *URLFetchRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_URLFetchRequest.Unmarshal(m, b) +} +func (m *URLFetchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_URLFetchRequest.Marshal(b, m, deterministic) +} +func (dst *URLFetchRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_URLFetchRequest.Merge(dst, src) +} +func (m *URLFetchRequest) XXX_Size() int { + return xxx_messageInfo_URLFetchRequest.Size(m) +} +func (m *URLFetchRequest) XXX_DiscardUnknown() { + xxx_messageInfo_URLFetchRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_URLFetchRequest proto.InternalMessageInfo + +const Default_URLFetchRequest_FollowRedirects bool = true +const Default_URLFetchRequest_MustValidateServerCertificate bool = true + +func (m *URLFetchRequest) GetMethod() URLFetchRequest_RequestMethod { + if m != nil && m.Method != nil { + return *m.Method + } + return URLFetchRequest_GET +} + +func (m *URLFetchRequest) GetUrl() string { + if m != nil && m.Url != nil { + return *m.Url + } + return "" +} + +func (m *URLFetchRequest) GetHeader() []*URLFetchRequest_Header { + if m != nil { + return m.Header + } + return nil +} + +func (m *URLFetchRequest) GetPayload() []byte { + if m != nil { + return m.Payload + } + return nil +} + +func (m *URLFetchRequest) GetFollowRedirects() bool { + if m != nil && m.FollowRedirects != nil { + return *m.FollowRedirects + } + return Default_URLFetchRequest_FollowRedirects +} + +func (m *URLFetchRequest) GetDeadline() float64 { + if m != nil && m.Deadline != nil { + return *m.Deadline + } + return 0 +} + +func (m *URLFetchRequest) GetMustValidateServerCertificate() bool { + if m != nil && m.MustValidateServerCertificate != nil { + return *m.MustValidateServerCertificate + } + return Default_URLFetchRequest_MustValidateServerCertificate +} + +type URLFetchRequest_Header struct { + Key *string `protobuf:"bytes,4,req,name=Key" json:"Key,omitempty"` + Value *string `protobuf:"bytes,5,req,name=Value" json:"Value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *URLFetchRequest_Header) Reset() { *m = URLFetchRequest_Header{} } +func (m *URLFetchRequest_Header) String() string { return proto.CompactTextString(m) } +func (*URLFetchRequest_Header) ProtoMessage() {} +func (*URLFetchRequest_Header) Descriptor() ([]byte, []int) { + return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{1, 0} +} +func (m *URLFetchRequest_Header) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_URLFetchRequest_Header.Unmarshal(m, b) +} +func (m *URLFetchRequest_Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_URLFetchRequest_Header.Marshal(b, m, deterministic) +} +func (dst *URLFetchRequest_Header) XXX_Merge(src proto.Message) { + xxx_messageInfo_URLFetchRequest_Header.Merge(dst, src) +} +func (m *URLFetchRequest_Header) XXX_Size() int { + return xxx_messageInfo_URLFetchRequest_Header.Size(m) +} +func (m *URLFetchRequest_Header) XXX_DiscardUnknown() { + xxx_messageInfo_URLFetchRequest_Header.DiscardUnknown(m) +} + +var xxx_messageInfo_URLFetchRequest_Header proto.InternalMessageInfo + +func (m *URLFetchRequest_Header) GetKey() string { + if m != nil && m.Key != nil { + return *m.Key + } + return "" +} + +func (m *URLFetchRequest_Header) GetValue() string { + if m != nil && m.Value != nil { + return *m.Value + } + return "" +} + +type URLFetchResponse struct { + Content []byte `protobuf:"bytes,1,opt,name=Content" json:"Content,omitempty"` + StatusCode *int32 `protobuf:"varint,2,req,name=StatusCode" json:"StatusCode,omitempty"` + Header []*URLFetchResponse_Header `protobuf:"group,3,rep,name=Header,json=header" json:"header,omitempty"` + ContentWasTruncated *bool `protobuf:"varint,6,opt,name=ContentWasTruncated,def=0" json:"ContentWasTruncated,omitempty"` + ExternalBytesSent *int64 `protobuf:"varint,7,opt,name=ExternalBytesSent" json:"ExternalBytesSent,omitempty"` + ExternalBytesReceived *int64 `protobuf:"varint,8,opt,name=ExternalBytesReceived" json:"ExternalBytesReceived,omitempty"` + FinalUrl *string `protobuf:"bytes,9,opt,name=FinalUrl" json:"FinalUrl,omitempty"` + ApiCpuMilliseconds *int64 `protobuf:"varint,10,opt,name=ApiCpuMilliseconds,def=0" json:"ApiCpuMilliseconds,omitempty"` + ApiBytesSent *int64 `protobuf:"varint,11,opt,name=ApiBytesSent,def=0" json:"ApiBytesSent,omitempty"` + ApiBytesReceived *int64 `protobuf:"varint,12,opt,name=ApiBytesReceived,def=0" json:"ApiBytesReceived,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *URLFetchResponse) Reset() { *m = URLFetchResponse{} } +func (m *URLFetchResponse) String() string { return proto.CompactTextString(m) } +func (*URLFetchResponse) ProtoMessage() {} +func (*URLFetchResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{2} +} +func (m *URLFetchResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_URLFetchResponse.Unmarshal(m, b) +} +func (m *URLFetchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_URLFetchResponse.Marshal(b, m, deterministic) +} +func (dst *URLFetchResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_URLFetchResponse.Merge(dst, src) +} +func (m *URLFetchResponse) XXX_Size() int { + return xxx_messageInfo_URLFetchResponse.Size(m) +} +func (m *URLFetchResponse) XXX_DiscardUnknown() { + xxx_messageInfo_URLFetchResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_URLFetchResponse proto.InternalMessageInfo + +const Default_URLFetchResponse_ContentWasTruncated bool = false +const Default_URLFetchResponse_ApiCpuMilliseconds int64 = 0 +const Default_URLFetchResponse_ApiBytesSent int64 = 0 +const Default_URLFetchResponse_ApiBytesReceived int64 = 0 + +func (m *URLFetchResponse) GetContent() []byte { + if m != nil { + return m.Content + } + return nil +} + +func (m *URLFetchResponse) GetStatusCode() int32 { + if m != nil && m.StatusCode != nil { + return *m.StatusCode + } + return 0 +} + +func (m *URLFetchResponse) GetHeader() []*URLFetchResponse_Header { + if m != nil { + return m.Header + } + return nil +} + +func (m *URLFetchResponse) GetContentWasTruncated() bool { + if m != nil && m.ContentWasTruncated != nil { + return *m.ContentWasTruncated + } + return Default_URLFetchResponse_ContentWasTruncated +} + +func (m *URLFetchResponse) GetExternalBytesSent() int64 { + if m != nil && m.ExternalBytesSent != nil { + return *m.ExternalBytesSent + } + return 0 +} + +func (m *URLFetchResponse) GetExternalBytesReceived() int64 { + if m != nil && m.ExternalBytesReceived != nil { + return *m.ExternalBytesReceived + } + return 0 +} + +func (m *URLFetchResponse) GetFinalUrl() string { + if m != nil && m.FinalUrl != nil { + return *m.FinalUrl + } + return "" +} + +func (m *URLFetchResponse) GetApiCpuMilliseconds() int64 { + if m != nil && m.ApiCpuMilliseconds != nil { + return *m.ApiCpuMilliseconds + } + return Default_URLFetchResponse_ApiCpuMilliseconds +} + +func (m *URLFetchResponse) GetApiBytesSent() int64 { + if m != nil && m.ApiBytesSent != nil { + return *m.ApiBytesSent + } + return Default_URLFetchResponse_ApiBytesSent +} + +func (m *URLFetchResponse) GetApiBytesReceived() int64 { + if m != nil && m.ApiBytesReceived != nil { + return *m.ApiBytesReceived + } + return Default_URLFetchResponse_ApiBytesReceived +} + +type URLFetchResponse_Header struct { + Key *string `protobuf:"bytes,4,req,name=Key" json:"Key,omitempty"` + Value *string `protobuf:"bytes,5,req,name=Value" json:"Value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *URLFetchResponse_Header) Reset() { *m = URLFetchResponse_Header{} } +func (m *URLFetchResponse_Header) String() string { return proto.CompactTextString(m) } +func (*URLFetchResponse_Header) ProtoMessage() {} +func (*URLFetchResponse_Header) Descriptor() ([]byte, []int) { + return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{2, 0} +} +func (m *URLFetchResponse_Header) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_URLFetchResponse_Header.Unmarshal(m, b) +} +func (m *URLFetchResponse_Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_URLFetchResponse_Header.Marshal(b, m, deterministic) +} +func (dst *URLFetchResponse_Header) XXX_Merge(src proto.Message) { + xxx_messageInfo_URLFetchResponse_Header.Merge(dst, src) +} +func (m *URLFetchResponse_Header) XXX_Size() int { + return xxx_messageInfo_URLFetchResponse_Header.Size(m) +} +func (m *URLFetchResponse_Header) XXX_DiscardUnknown() { + xxx_messageInfo_URLFetchResponse_Header.DiscardUnknown(m) +} + +var xxx_messageInfo_URLFetchResponse_Header proto.InternalMessageInfo + +func (m *URLFetchResponse_Header) GetKey() string { + if m != nil && m.Key != nil { + return *m.Key + } + return "" +} + +func (m *URLFetchResponse_Header) GetValue() string { + if m != nil && m.Value != nil { + return *m.Value + } + return "" +} + +func init() { + proto.RegisterType((*URLFetchServiceError)(nil), "appengine.URLFetchServiceError") + proto.RegisterType((*URLFetchRequest)(nil), "appengine.URLFetchRequest") + proto.RegisterType((*URLFetchRequest_Header)(nil), "appengine.URLFetchRequest.Header") + proto.RegisterType((*URLFetchResponse)(nil), "appengine.URLFetchResponse") + proto.RegisterType((*URLFetchResponse_Header)(nil), "appengine.URLFetchResponse.Header") +} + +func init() { + proto.RegisterFile("google.golang.org/appengine/internal/urlfetch/urlfetch_service.proto", fileDescriptor_urlfetch_service_b245a7065f33bced) +} + +var fileDescriptor_urlfetch_service_b245a7065f33bced = []byte{ + // 770 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xdd, 0x6e, 0xe3, 0x54, + 0x10, 0xc6, 0x76, 0x7e, 0xa7, 0x5d, 0x7a, 0x76, 0xb6, 0x45, 0x66, 0xb5, 0xa0, 0x10, 0x09, 0x29, + 0x17, 0x90, 0x2e, 0x2b, 0x24, 0x44, 0xaf, 0x70, 0xed, 0x93, 0xad, 0xa9, 0x63, 0x47, 0xc7, 0x4e, + 0x61, 0xb9, 0xb1, 0xac, 0x78, 0x9a, 0x5a, 0xb2, 0xec, 0x60, 0x9f, 0x2c, 0xf4, 0x35, 0x78, 0x0d, + 0xde, 0x87, 0xa7, 0xe1, 0x02, 0x9d, 0xc4, 0xc9, 0x6e, 0xbb, 0xd1, 0x4a, 0x5c, 0x65, 0xe6, 0x9b, + 0xef, 0xcc, 0x99, 0x7c, 0xdf, 0xf8, 0x80, 0xb3, 0x2c, 0xcb, 0x65, 0x4e, 0xe3, 0x65, 0x99, 0x27, + 0xc5, 0x72, 0x5c, 0x56, 0xcb, 0xf3, 0x64, 0xb5, 0xa2, 0x62, 0x99, 0x15, 0x74, 0x9e, 0x15, 0x92, + 0xaa, 0x22, 0xc9, 0xcf, 0xd7, 0x55, 0x7e, 0x4b, 0x72, 0x71, 0xb7, 0x0f, 0xe2, 0x9a, 0xaa, 0xb7, + 0xd9, 0x82, 0xc6, 0xab, 0xaa, 0x94, 0x25, 0xf6, 0xf7, 0x67, 0x86, 0x7f, 0xeb, 0x70, 0x3a, 0x17, + 0xde, 0x44, 0xb1, 0xc2, 0x2d, 0x89, 0x57, 0x55, 0x59, 0x0d, 0xff, 0xd2, 0xa1, 0xbf, 0x89, 0xec, + 0x32, 0x25, 0xec, 0x80, 0x1e, 0x5c, 0xb3, 0x4f, 0xf0, 0x04, 0x8e, 0x5c, 0xff, 0xc6, 0xf2, 0x5c, + 0x27, 0x9e, 0x0b, 0x8f, 0x69, 0x0a, 0x98, 0xf0, 0xc8, 0xbe, 0x8a, 0xb9, 0x10, 0x81, 0x60, 0x3a, + 0x9e, 0xc1, 0xd3, 0xb9, 0x1f, 0xce, 0xb8, 0xed, 0x4e, 0x5c, 0xee, 0x34, 0xb0, 0x81, 0x9f, 0x01, + 0x0a, 0x1e, 0xce, 0x02, 0x3f, 0xe4, 0x71, 0x14, 0x04, 0xb1, 0x67, 0x89, 0xd7, 0x9c, 0xb5, 0x14, + 0xdd, 0xe1, 0x96, 0xe3, 0xb9, 0x3e, 0x8f, 0xf9, 0xaf, 0x36, 0xe7, 0x0e, 0x77, 0x58, 0x1b, 0x3f, + 0x87, 0xb3, 0x30, 0xf4, 0x62, 0x9b, 0x8b, 0xc8, 0x9d, 0xb8, 0xb6, 0x15, 0xf1, 0xa6, 0x53, 0x07, + 0x9f, 0x40, 0xdf, 0xf1, 0xc3, 0x26, 0xed, 0x22, 0x40, 0xc7, 0xf6, 0x82, 0x90, 0x3b, 0xac, 0x87, + 0x2f, 0xc0, 0x74, 0xfd, 0x88, 0x0b, 0xdf, 0xf2, 0xe2, 0x48, 0x58, 0x7e, 0xe8, 0x72, 0x3f, 0x6a, + 0x98, 0x7d, 0x35, 0x82, 0xba, 0x79, 0x6a, 0xf9, 0x6f, 0x62, 0xc1, 0x1d, 0x57, 0x70, 0x3b, 0x0a, + 0x19, 0xe0, 0x33, 0x38, 0x99, 0x5a, 0xde, 0x24, 0x10, 0x53, 0xee, 0xc4, 0x82, 0xcf, 0xbc, 0x37, + 0xec, 0x08, 0x4f, 0x81, 0xd9, 0x81, 0xef, 0x73, 0x3b, 0x72, 0x03, 0xbf, 0x69, 0x71, 0x3c, 0xfc, + 0xc7, 0x80, 0x93, 0x9d, 0x5a, 0x82, 0x7e, 0x5f, 0x53, 0x2d, 0xf1, 0x27, 0xe8, 0x4c, 0x49, 0xde, + 0x95, 0xa9, 0xa9, 0x0d, 0xf4, 0xd1, 0xa7, 0xaf, 0x46, 0xe3, 0xbd, 0xba, 0xe3, 0x47, 0xdc, 0x71, + 0xf3, 0xbb, 0xe5, 0x8b, 0xe6, 0x1c, 0x32, 0x30, 0xe6, 0x55, 0x6e, 0xea, 0x03, 0x7d, 0xd4, 0x17, + 0x2a, 0xc4, 0x1f, 0xa1, 0x73, 0x47, 0x49, 0x4a, 0x95, 0x69, 0x0c, 0x8c, 0x11, 0xbc, 0xfa, 0xea, + 0x23, 0x3d, 0xaf, 0x36, 0x44, 0xd1, 0x1c, 0xc0, 0x17, 0xd0, 0x9d, 0x25, 0xf7, 0x79, 0x99, 0xa4, + 0x66, 0x67, 0xa0, 0x8d, 0x8e, 0x2f, 0xf5, 0x9e, 0x26, 0x76, 0x10, 0x8e, 0xe1, 0x64, 0x52, 0xe6, + 0x79, 0xf9, 0x87, 0xa0, 0x34, 0xab, 0x68, 0x21, 0x6b, 0xb3, 0x3b, 0xd0, 0x46, 0xbd, 0x8b, 0x96, + 0xac, 0xd6, 0x24, 0x1e, 0x17, 0xf1, 0x39, 0xf4, 0x1c, 0x4a, 0xd2, 0x3c, 0x2b, 0xc8, 0xec, 0x0d, + 0xb4, 0x91, 0x26, 0xf6, 0x39, 0xfe, 0x0c, 0x5f, 0x4c, 0xd7, 0xb5, 0xbc, 0x49, 0xf2, 0x2c, 0x4d, + 0x24, 0xa9, 0xed, 0xa1, 0xca, 0xa6, 0x4a, 0x66, 0xb7, 0xd9, 0x22, 0x91, 0x64, 0xf6, 0xdf, 0xeb, + 0xfc, 0x71, 0xea, 0xf3, 0x97, 0xd0, 0xd9, 0xfe, 0x0f, 0x25, 0xc6, 0x35, 0xdd, 0x9b, 0xad, 0xad, + 0x18, 0xd7, 0x74, 0x8f, 0xa7, 0xd0, 0xbe, 0x49, 0xf2, 0x35, 0x99, 0xed, 0x0d, 0xb6, 0x4d, 0x86, + 0x1e, 0x3c, 0x79, 0xa0, 0x26, 0x76, 0xc1, 0x78, 0xcd, 0x23, 0xa6, 0x61, 0x0f, 0x5a, 0xb3, 0x20, + 0x8c, 0x98, 0xae, 0xa2, 0x2b, 0x6e, 0x39, 0xcc, 0x50, 0xc5, 0xd9, 0x3c, 0x62, 0x2d, 0xb5, 0x2e, + 0x0e, 0xf7, 0x78, 0xc4, 0x59, 0x1b, 0xfb, 0xd0, 0x9e, 0x59, 0x91, 0x7d, 0xc5, 0x3a, 0xc3, 0x7f, + 0x0d, 0x60, 0xef, 0x84, 0xad, 0x57, 0x65, 0x51, 0x13, 0x9a, 0xd0, 0xb5, 0xcb, 0x42, 0x52, 0x21, + 0x4d, 0x4d, 0x49, 0x29, 0x76, 0x29, 0x7e, 0x09, 0x10, 0xca, 0x44, 0xae, 0x6b, 0xf5, 0x71, 0x6c, + 0x8c, 0x6b, 0x8b, 0xf7, 0x10, 0xbc, 0x78, 0xe4, 0xdf, 0xf0, 0xa0, 0x7f, 0xdb, 0x6b, 0x1e, 0x1b, + 0xf8, 0x03, 0x3c, 0x6b, 0xae, 0xf9, 0x25, 0xa9, 0xa3, 0x6a, 0x5d, 0x28, 0x81, 0xb6, 0x66, 0xf6, + 0x2e, 0xda, 0xb7, 0x49, 0x5e, 0x93, 0x38, 0xc4, 0xc0, 0x6f, 0xe0, 0x29, 0xff, 0x73, 0xfb, 0x02, + 0x5c, 0xde, 0x4b, 0xaa, 0x43, 0x35, 0xb8, 0x72, 0xd7, 0x10, 0x1f, 0x16, 0xf0, 0x7b, 0x38, 0x7b, + 0x00, 0x0a, 0x5a, 0x50, 0xf6, 0x96, 0xd2, 0x8d, 0xcd, 0x86, 0x38, 0x5c, 0x54, 0xfb, 0x30, 0xc9, + 0x8a, 0x24, 0x57, 0xfb, 0xaa, 0xec, 0xed, 0x8b, 0x7d, 0x8e, 0xdf, 0x01, 0x5a, 0xab, 0xcc, 0x5e, + 0xad, 0xa7, 0x59, 0x9e, 0x67, 0x35, 0x2d, 0xca, 0x22, 0xad, 0x4d, 0x50, 0xed, 0x2e, 0xb4, 0x97, + 0xe2, 0x40, 0x11, 0xbf, 0x86, 0x63, 0x6b, 0x95, 0xbd, 0x9b, 0xf6, 0x68, 0x47, 0x7e, 0x00, 0xe3, + 0xb7, 0xc0, 0x76, 0xf9, 0x7e, 0xcc, 0xe3, 0x1d, 0xf5, 0x83, 0xd2, 0xff, 0x5f, 0xa6, 0x4b, 0xf8, + 0xad, 0xb7, 0x7b, 0x2a, 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x1d, 0x9f, 0x6d, 0x24, 0x63, 0x05, + 0x00, 0x00, +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.proto b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.proto new file mode 100644 index 000000000..f695edf6a --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.proto @@ -0,0 +1,64 @@ +syntax = "proto2"; +option go_package = "urlfetch"; + +package appengine; + +message URLFetchServiceError { + enum ErrorCode { + OK = 0; + INVALID_URL = 1; + FETCH_ERROR = 2; + UNSPECIFIED_ERROR = 3; + RESPONSE_TOO_LARGE = 4; + DEADLINE_EXCEEDED = 5; + SSL_CERTIFICATE_ERROR = 6; + DNS_ERROR = 7; + CLOSED = 8; + INTERNAL_TRANSIENT_ERROR = 9; + TOO_MANY_REDIRECTS = 10; + MALFORMED_REPLY = 11; + CONNECTION_ERROR = 12; + } +} + +message URLFetchRequest { + enum RequestMethod { + GET = 1; + POST = 2; + HEAD = 3; + PUT = 4; + DELETE = 5; + PATCH = 6; + } + required RequestMethod Method = 1; + required string Url = 2; + repeated group Header = 3 { + required string Key = 4; + required string Value = 5; + } + optional bytes Payload = 6 [ctype=CORD]; + + optional bool FollowRedirects = 7 [default=true]; + + optional double Deadline = 8; + + optional bool MustValidateServerCertificate = 9 [default=true]; +} + +message URLFetchResponse { + optional bytes Content = 1; + required int32 StatusCode = 2; + repeated group Header = 3 { + required string Key = 4; + required string Value = 5; + } + optional bool ContentWasTruncated = 6 [default=false]; + optional int64 ExternalBytesSent = 7; + optional int64 ExternalBytesReceived = 8; + + optional string FinalUrl = 9; + + optional int64 ApiCpuMilliseconds = 10 [default=0]; + optional int64 ApiBytesSent = 11 [default=0]; + optional int64 ApiBytesReceived = 12 [default=0]; +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/urlfetch/urlfetch.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/urlfetch/urlfetch.go new file mode 100644 index 000000000..6ffe1e6d9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/google.golang.org/appengine/urlfetch/urlfetch.go @@ -0,0 +1,210 @@ +// Copyright 2011 Google Inc. All rights reserved. +// Use of this source code is governed by the Apache 2.0 +// license that can be found in the LICENSE file. + +// Package urlfetch provides an http.RoundTripper implementation +// for fetching URLs via App Engine's urlfetch service. +package urlfetch // import "google.golang.org/appengine/urlfetch" + +import ( + "errors" + "fmt" + "io" + "io/ioutil" + "net/http" + "net/url" + "strconv" + "strings" + "time" + + "github.com/golang/protobuf/proto" + "golang.org/x/net/context" + + "google.golang.org/appengine/internal" + pb "google.golang.org/appengine/internal/urlfetch" +) + +// Transport is an implementation of http.RoundTripper for +// App Engine. Users should generally create an http.Client using +// this transport and use the Client rather than using this transport +// directly. +type Transport struct { + Context context.Context + + // Controls whether the application checks the validity of SSL certificates + // over HTTPS connections. A value of false (the default) instructs the + // application to send a request to the server only if the certificate is + // valid and signed by a trusted certificate authority (CA), and also + // includes a hostname that matches the certificate. A value of true + // instructs the application to perform no certificate validation. + AllowInvalidServerCertificate bool +} + +// Verify statically that *Transport implements http.RoundTripper. +var _ http.RoundTripper = (*Transport)(nil) + +// Client returns an *http.Client using a default urlfetch Transport. This +// client will have the default deadline of 5 seconds, and will check the +// validity of SSL certificates. +// +// Any deadline of the provided context will be used for requests through this client; +// if the client does not have a deadline then a 5 second default is used. +func Client(ctx context.Context) *http.Client { + return &http.Client{ + Transport: &Transport{ + Context: ctx, + }, + } +} + +type bodyReader struct { + content []byte + truncated bool + closed bool +} + +// ErrTruncatedBody is the error returned after the final Read() from a +// response's Body if the body has been truncated by App Engine's proxy. +var ErrTruncatedBody = errors.New("urlfetch: truncated body") + +func statusCodeToText(code int) string { + if t := http.StatusText(code); t != "" { + return t + } + return strconv.Itoa(code) +} + +func (br *bodyReader) Read(p []byte) (n int, err error) { + if br.closed { + if br.truncated { + return 0, ErrTruncatedBody + } + return 0, io.EOF + } + n = copy(p, br.content) + if n > 0 { + br.content = br.content[n:] + return + } + if br.truncated { + br.closed = true + return 0, ErrTruncatedBody + } + return 0, io.EOF +} + +func (br *bodyReader) Close() error { + br.closed = true + br.content = nil + return nil +} + +// A map of the URL Fetch-accepted methods that take a request body. +var methodAcceptsRequestBody = map[string]bool{ + "POST": true, + "PUT": true, + "PATCH": true, +} + +// urlString returns a valid string given a URL. This function is necessary because +// the String method of URL doesn't correctly handle URLs with non-empty Opaque values. +// See http://code.google.com/p/go/issues/detail?id=4860. +func urlString(u *url.URL) string { + if u.Opaque == "" || strings.HasPrefix(u.Opaque, "//") { + return u.String() + } + aux := *u + aux.Opaque = "//" + aux.Host + aux.Opaque + return aux.String() +} + +// RoundTrip issues a single HTTP request and returns its response. Per the +// http.RoundTripper interface, RoundTrip only returns an error if there +// was an unsupported request or the URL Fetch proxy fails. +// Note that HTTP response codes such as 5xx, 403, 404, etc are not +// errors as far as the transport is concerned and will be returned +// with err set to nil. +func (t *Transport) RoundTrip(req *http.Request) (res *http.Response, err error) { + methNum, ok := pb.URLFetchRequest_RequestMethod_value[req.Method] + if !ok { + return nil, fmt.Errorf("urlfetch: unsupported HTTP method %q", req.Method) + } + + method := pb.URLFetchRequest_RequestMethod(methNum) + + freq := &pb.URLFetchRequest{ + Method: &method, + Url: proto.String(urlString(req.URL)), + FollowRedirects: proto.Bool(false), // http.Client's responsibility + MustValidateServerCertificate: proto.Bool(!t.AllowInvalidServerCertificate), + } + if deadline, ok := t.Context.Deadline(); ok { + freq.Deadline = proto.Float64(deadline.Sub(time.Now()).Seconds()) + } + + for k, vals := range req.Header { + for _, val := range vals { + freq.Header = append(freq.Header, &pb.URLFetchRequest_Header{ + Key: proto.String(k), + Value: proto.String(val), + }) + } + } + if methodAcceptsRequestBody[req.Method] && req.Body != nil { + // Avoid a []byte copy if req.Body has a Bytes method. + switch b := req.Body.(type) { + case interface { + Bytes() []byte + }: + freq.Payload = b.Bytes() + default: + freq.Payload, err = ioutil.ReadAll(req.Body) + if err != nil { + return nil, err + } + } + } + + fres := &pb.URLFetchResponse{} + if err := internal.Call(t.Context, "urlfetch", "Fetch", freq, fres); err != nil { + return nil, err + } + + res = &http.Response{} + res.StatusCode = int(*fres.StatusCode) + res.Status = fmt.Sprintf("%d %s", res.StatusCode, statusCodeToText(res.StatusCode)) + res.Header = make(http.Header) + res.Request = req + + // Faked: + res.ProtoMajor = 1 + res.ProtoMinor = 1 + res.Proto = "HTTP/1.1" + res.Close = true + + for _, h := range fres.Header { + hkey := http.CanonicalHeaderKey(*h.Key) + hval := *h.Value + if hkey == "Content-Length" { + // Will get filled in below for all but HEAD requests. + if req.Method == "HEAD" { + res.ContentLength, _ = strconv.ParseInt(hval, 10, 64) + } + continue + } + res.Header.Add(hkey, hval) + } + + if req.Method != "HEAD" { + res.ContentLength = int64(len(fres.Content)) + } + + truncated := fres.GetContentWasTruncated() + res.Body = &bodyReader{content: fres.Content, truncated: truncated} + return +} + +func init() { + internal.RegisterErrorCodeMap("urlfetch", pb.URLFetchServiceError_ErrorCode_name) + internal.RegisterTimeoutErrorCode("urlfetch", int32(pb.URLFetchServiceError_DEADLINE_EXCEEDED)) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/BUILD.bazel b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/BUILD.bazel new file mode 100644 index 000000000..698c326c5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/BUILD.bazel @@ -0,0 +1,36 @@ +package(default_visibility = ["//visibility:private"]) + +load("@bazel_gazelle//:def.bzl", "gazelle") +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +gazelle( + name = "gazelle", + command = "fix", + prefix = "gopkg.in/resty.v1", +) + +go_library( + name = "go_default_library", + srcs = glob( + ["*.go"], + exclude = ["*_test.go"], + ), + importpath = "gopkg.in/resty.v1", + visibility = ["//visibility:public"], + deps = ["@org_golang_x_net//publicsuffix:go_default_library"], +) + +go_test( + name = "go_default_test", + srcs = + glob( + ["*_test.go"], + exclude = ["example_test.go"], + ), + data = glob([".testdata/*"]), + embed = [":go_default_library"], + importpath = "gopkg.in/resty.v1", + deps = [ + "@org_golang_x_net//proxy:go_default_library", + ], +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/LICENSE b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/LICENSE new file mode 100644 index 000000000..5cf0a2f99 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2019 Jeevanandam M., https://myjeeva.com + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/README.md b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/README.md new file mode 100644 index 000000000..8305734db --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/README.md @@ -0,0 +1,741 @@ +

+

Resty

+

Simple HTTP and REST client library for Go (inspired by Ruby rest-client)

+

Features section describes in detail about Resty capabilities

+

+

+

Build Status Code Coverage Go Report Card Release Version GoDoc License

+

+

+

Resty Communication Channels

+

Chat on Gitter - Resty Community Twitter @go_resty

+

+ +## News + + * Resty `v2` development is in-progress :smile: + * v1.12.0 [released](https://github.com/go-resty/resty/releases/tag/v1.12.0) and tagged on Feb 27, 2019. + * v1.11.0 [released](https://github.com/go-resty/resty/releases/tag/v1.11.0) and tagged on Jan 06, 2019. + * v1.10.3 [released](https://github.com/go-resty/resty/releases/tag/v1.10.3) and tagged on Dec 04, 2018. + * v1.0 released and tagged on Sep 25, 2017. - Resty's first version was released on Sep 15, 2015 then it grew gradually as a very handy and helpful library. Its been a two years since first release. I'm very thankful to Resty users and its [contributors](https://github.com/go-resty/resty/graphs/contributors). + +## Features + + * GET, POST, PUT, DELETE, HEAD, PATCH, OPTIONS, etc. + * Simple and chainable methods for settings and request + * Request Body can be `string`, `[]byte`, `struct`, `map`, `slice` and `io.Reader` too + * Auto detects `Content-Type` + * Buffer less processing for `io.Reader` + * [Response](https://godoc.org/gopkg.in/resty.v1#Response) object gives you more possibility + * Access as `[]byte` array - `response.Body()` OR Access as `string` - `response.String()` + * Know your `response.Time()` and when we `response.ReceivedAt()` + * Automatic marshal and unmarshal for `JSON` and `XML` content type + * Default is `JSON`, if you supply `struct/map` without header `Content-Type` + * For auto-unmarshal, refer to - + - Success scenario [Request.SetResult()](https://godoc.org/gopkg.in/resty.v1#Request.SetResult) and [Response.Result()](https://godoc.org/gopkg.in/resty.v1#Response.Result). + - Error scenario [Request.SetError()](https://godoc.org/gopkg.in/resty.v1#Request.SetError) and [Response.Error()](https://godoc.org/gopkg.in/resty.v1#Response.Error). + - Supports [RFC7807](https://tools.ietf.org/html/rfc7807) - `application/problem+json` & `application/problem+xml` + * Easy to upload one or more file(s) via `multipart/form-data` + * Auto detects file content type + * Request URL [Path Params (aka URI Params)](https://godoc.org/gopkg.in/resty.v1#Request.SetPathParams) + * Backoff Retry Mechanism with retry condition function [reference](retry_test.go) + * resty client HTTP & REST [Request](https://godoc.org/gopkg.in/resty.v1#Client.OnBeforeRequest) and [Response](https://godoc.org/gopkg.in/resty.v1#Client.OnAfterResponse) middlewares + * `Request.SetContext` supported `go1.7` and above + * Authorization option of `BasicAuth` and `Bearer` token + * Set request `ContentLength` value for all request or particular request + * Choose between HTTP and REST mode. Default is `REST` + * `HTTP` - default up to 10 redirects and no automatic response unmarshal + * `REST` - defaults to no redirects and automatic response marshal/unmarshal for `JSON` & `XML` + * Custom [Root Certificates](https://godoc.org/gopkg.in/resty.v1#Client.SetRootCertificate) and Client [Certificates](https://godoc.org/gopkg.in/resty.v1#Client.SetCertificates) + * Download/Save HTTP response directly into File, like `curl -o` flag. See [SetOutputDirectory](https://godoc.org/gopkg.in/resty.v1#Client.SetOutputDirectory) & [SetOutput](https://godoc.org/gopkg.in/resty.v1#Request.SetOutput). + * Cookies for your request and CookieJar support + * SRV Record based request instead of Host URL + * Client settings like `Timeout`, `RedirectPolicy`, `Proxy`, `TLSClientConfig`, `Transport`, etc. + * Optionally allows GET request with payload, see [SetAllowGetMethodPayload](https://godoc.org/gopkg.in/resty.v1#Client.SetAllowGetMethodPayload) + * Supports registering external JSON library into resty, see [how to use](https://github.com/go-resty/resty/issues/76#issuecomment-314015250) + * Exposes Response reader without reading response (no auto-unmarshaling) if need be, see [how to use](https://github.com/go-resty/resty/issues/87#issuecomment-322100604) + * Option to specify expected `Content-Type` when response `Content-Type` header missing. Refer to [#92](https://github.com/go-resty/resty/issues/92) + * Resty design + * Have client level settings & options and also override at Request level if you want to + * Request and Response middlewares + * Create Multiple clients if you want to `resty.New()` + * Supports `http.RoundTripper` implementation, see [SetTransport](https://godoc.org/gopkg.in/resty.v1#Client.SetTransport) + * goroutine concurrent safe + * REST and HTTP modes + * Debug mode - clean and informative logging presentation + * Gzip - Go does it automatically also resty has fallback handling too + * Works fine with `HTTP/2` and `HTTP/1.1` + * [Bazel support](#bazel-support) + * Easily mock resty for testing, [for e.g.](#mocking-http-requests-using-httpmock-library) + * Well tested client library + +Resty works with `go1.3` and above. + +### Included Batteries + + * Redirect Policies - see [how to use](#redirect-policy) + * NoRedirectPolicy + * FlexibleRedirectPolicy + * DomainCheckRedirectPolicy + * etc. [more info](redirect.go) + * Retry Mechanism [how to use](#retries) + * Backoff Retry + * Conditional Retry + * SRV Record based request instead of Host URL [how to use](resty_test.go#L1412) + * etc (upcoming - throw your idea's [here](https://github.com/go-resty/resty/issues)). + +## Installation + +#### Stable Version - Production Ready + +Please refer section [Versioning](#versioning) for detailed info. + +##### go.mod + +```bash +require gopkg.in/resty.v1 v1.12.0 +``` + +##### go get +```bash +go get -u gopkg.in/resty.v1 +``` + +#### Heads up for upcoming Resty v2 + +Resty v2 release will be moving away from `gopkg.in` proxy versioning. It will completely follow and adpating Go Mod versioning recommendation. For e.g.: module definition would be `module github.com/go-resty/resty/v2`. + + +## It might be beneficial for your project :smile: + +Resty author also published following projects for Go Community. + + * [aah framework](https://aahframework.org) - A secure, flexible, rapid Go web framework. + * [THUMBAI](https://thumbai.app), [Source Code](https://github.com/thumbai/thumbai) - Go Mod Repository, Go Vanity Service and Simple Proxy Server. + * [go-model](https://github.com/jeevatkm/go-model) - Robust & Easy to use model mapper and utility methods for Go `struct`. + +## Usage + +The following samples will assist you to become as comfortable as possible with resty library. Resty comes with ready to use DefaultClient. + +Import resty into your code and refer it as `resty`. + +```go +import "gopkg.in/resty.v1" +``` + +#### Simple GET + +```go +// GET request +resp, err := resty.R().Get("http://httpbin.org/get") + +// explore response object +fmt.Printf("\nError: %v", err) +fmt.Printf("\nResponse Status Code: %v", resp.StatusCode()) +fmt.Printf("\nResponse Status: %v", resp.Status()) +fmt.Printf("\nResponse Time: %v", resp.Time()) +fmt.Printf("\nResponse Received At: %v", resp.ReceivedAt()) +fmt.Printf("\nResponse Body: %v", resp) // or resp.String() or string(resp.Body()) +// more... + +/* Output +Error: +Response Status Code: 200 +Response Status: 200 OK +Response Time: 160.1151ms +Response Received At: 2018-10-16 16:28:34.8595663 -0700 PDT m=+0.166119401 +Response Body: { + "args": {}, + "headers": { + "Accept-Encoding": "gzip", + "Connection": "close", + "Host": "httpbin.org", + "User-Agent": "go-resty/1.10.0 (https://github.com/go-resty/resty)" + }, + "origin": "0.0.0.0", + "url": "http://httpbin.org/get" +} +*/ +``` + +#### Enhanced GET + +```go +resp, err := resty.R(). + SetQueryParams(map[string]string{ + "page_no": "1", + "limit": "20", + "sort":"name", + "order": "asc", + "random":strconv.FormatInt(time.Now().Unix(), 10), + }). + SetHeader("Accept", "application/json"). + SetAuthToken("BC594900518B4F7EAC75BD37F019E08FBC594900518B4F7EAC75BD37F019E08F"). + Get("/search_result") + + +// Sample of using Request.SetQueryString method +resp, err := resty.R(). + SetQueryString("productId=232&template=fresh-sample&cat=resty&source=google&kw=buy a lot more"). + SetHeader("Accept", "application/json"). + SetAuthToken("BC594900518B4F7EAC75BD37F019E08FBC594900518B4F7EAC75BD37F019E08F"). + Get("/show_product") +``` + +#### Various POST method combinations + +```go +// POST JSON string +// No need to set content type, if you have client level setting +resp, err := resty.R(). + SetHeader("Content-Type", "application/json"). + SetBody(`{"username":"testuser", "password":"testpass"}`). + SetResult(&AuthSuccess{}). // or SetResult(AuthSuccess{}). + Post("https://myapp.com/login") + +// POST []byte array +// No need to set content type, if you have client level setting +resp, err := resty.R(). + SetHeader("Content-Type", "application/json"). + SetBody([]byte(`{"username":"testuser", "password":"testpass"}`)). + SetResult(&AuthSuccess{}). // or SetResult(AuthSuccess{}). + Post("https://myapp.com/login") + +// POST Struct, default is JSON content type. No need to set one +resp, err := resty.R(). + SetBody(User{Username: "testuser", Password: "testpass"}). + SetResult(&AuthSuccess{}). // or SetResult(AuthSuccess{}). + SetError(&AuthError{}). // or SetError(AuthError{}). + Post("https://myapp.com/login") + +// POST Map, default is JSON content type. No need to set one +resp, err := resty.R(). + SetBody(map[string]interface{}{"username": "testuser", "password": "testpass"}). + SetResult(&AuthSuccess{}). // or SetResult(AuthSuccess{}). + SetError(&AuthError{}). // or SetError(AuthError{}). + Post("https://myapp.com/login") + +// POST of raw bytes for file upload. For example: upload file to Dropbox +fileBytes, _ := ioutil.ReadFile("/Users/jeeva/mydocument.pdf") + +// See we are not setting content-type header, since go-resty automatically detects Content-Type for you +resp, err := resty.R(). + SetBody(fileBytes). + SetContentLength(true). // Dropbox expects this value + SetAuthToken(""). + SetError(&DropboxError{}). // or SetError(DropboxError{}). + Post("https://content.dropboxapi.com/1/files_put/auto/resty/mydocument.pdf") // for upload Dropbox supports PUT too + +// Note: resty detects Content-Type for request body/payload if content type header is not set. +// * For struct and map data type defaults to 'application/json' +// * Fallback is plain text content type +``` + +#### Sample PUT + +You can use various combinations of `PUT` method call like demonstrated for `POST`. + +```go +// Note: This is one sample of PUT method usage, refer POST for more combination + +// Request goes as JSON content type +// No need to set auth token, error, if you have client level settings +resp, err := resty.R(). + SetBody(Article{ + Title: "go-resty", + Content: "This is my article content, oh ya!", + Author: "Jeevanandam M", + Tags: []string{"article", "sample", "resty"}, + }). + SetAuthToken("C6A79608-782F-4ED0-A11D-BD82FAD829CD"). + SetError(&Error{}). // or SetError(Error{}). + Put("https://myapp.com/article/1234") +``` + +#### Sample PATCH + +You can use various combinations of `PATCH` method call like demonstrated for `POST`. + +```go +// Note: This is one sample of PUT method usage, refer POST for more combination + +// Request goes as JSON content type +// No need to set auth token, error, if you have client level settings +resp, err := resty.R(). + SetBody(Article{ + Tags: []string{"new tag1", "new tag2"}, + }). + SetAuthToken("C6A79608-782F-4ED0-A11D-BD82FAD829CD"). + SetError(&Error{}). // or SetError(Error{}). + Patch("https://myapp.com/articles/1234") +``` + +#### Sample DELETE, HEAD, OPTIONS + +```go +// DELETE a article +// No need to set auth token, error, if you have client level settings +resp, err := resty.R(). + SetAuthToken("C6A79608-782F-4ED0-A11D-BD82FAD829CD"). + SetError(&Error{}). // or SetError(Error{}). + Delete("https://myapp.com/articles/1234") + +// DELETE a articles with payload/body as a JSON string +// No need to set auth token, error, if you have client level settings +resp, err := resty.R(). + SetAuthToken("C6A79608-782F-4ED0-A11D-BD82FAD829CD"). + SetError(&Error{}). // or SetError(Error{}). + SetHeader("Content-Type", "application/json"). + SetBody(`{article_ids: [1002, 1006, 1007, 87683, 45432] }`). + Delete("https://myapp.com/articles") + +// HEAD of resource +// No need to set auth token, if you have client level settings +resp, err := resty.R(). + SetAuthToken("C6A79608-782F-4ED0-A11D-BD82FAD829CD"). + Head("https://myapp.com/videos/hi-res-video") + +// OPTIONS of resource +// No need to set auth token, if you have client level settings +resp, err := resty.R(). + SetAuthToken("C6A79608-782F-4ED0-A11D-BD82FAD829CD"). + Options("https://myapp.com/servers/nyc-dc-01") +``` + +### Multipart File(s) upload + +#### Using io.Reader + +```go +profileImgBytes, _ := ioutil.ReadFile("/Users/jeeva/test-img.png") +notesBytes, _ := ioutil.ReadFile("/Users/jeeva/text-file.txt") + +resp, err := resty.R(). + SetFileReader("profile_img", "test-img.png", bytes.NewReader(profileImgBytes)). + SetFileReader("notes", "text-file.txt", bytes.NewReader(notesBytes)). + SetFormData(map[string]string{ + "first_name": "Jeevanandam", + "last_name": "M", + }). + Post("http://myapp.com/upload") +``` + +#### Using File directly from Path + +```go +// Single file scenario +resp, err := resty.R(). + SetFile("profile_img", "/Users/jeeva/test-img.png"). + Post("http://myapp.com/upload") + +// Multiple files scenario +resp, err := resty.R(). + SetFiles(map[string]string{ + "profile_img": "/Users/jeeva/test-img.png", + "notes": "/Users/jeeva/text-file.txt", + }). + Post("http://myapp.com/upload") + +// Multipart of form fields and files +resp, err := resty.R(). + SetFiles(map[string]string{ + "profile_img": "/Users/jeeva/test-img.png", + "notes": "/Users/jeeva/text-file.txt", + }). + SetFormData(map[string]string{ + "first_name": "Jeevanandam", + "last_name": "M", + "zip_code": "00001", + "city": "my city", + "access_token": "C6A79608-782F-4ED0-A11D-BD82FAD829CD", + }). + Post("http://myapp.com/profile") +``` + +#### Sample Form submission + +```go +// just mentioning about POST as an example with simple flow +// User Login +resp, err := resty.R(). + SetFormData(map[string]string{ + "username": "jeeva", + "password": "mypass", + }). + Post("http://myapp.com/login") + +// Followed by profile update +resp, err := resty.R(). + SetFormData(map[string]string{ + "first_name": "Jeevanandam", + "last_name": "M", + "zip_code": "00001", + "city": "new city update", + }). + Post("http://myapp.com/profile") + +// Multi value form data +criteria := url.Values{ + "search_criteria": []string{"book", "glass", "pencil"}, +} +resp, err := resty.R(). + SetMultiValueFormData(criteria). + Post("http://myapp.com/search") +``` + +#### Save HTTP Response into File + +```go +// Setting output directory path, If directory not exists then resty creates one! +// This is optional one, if you're planning using absoule path in +// `Request.SetOutput` and can used together. +resty.SetOutputDirectory("/Users/jeeva/Downloads") + +// HTTP response gets saved into file, similar to curl -o flag +_, err := resty.R(). + SetOutput("plugin/ReplyWithHeader-v5.1-beta.zip"). + Get("http://bit.ly/1LouEKr") + +// OR using absolute path +// Note: output directory path is not used for absoulte path +_, err := resty.R(). + SetOutput("/MyDownloads/plugin/ReplyWithHeader-v5.1-beta.zip"). + Get("http://bit.ly/1LouEKr") +``` + +#### Request URL Path Params + +Resty provides easy to use dynamic request URL path params. Params can be set at client and request level. Client level params value can be overridden at request level. + +```go +resty.R().SetPathParams(map[string]string{ + "userId": "sample@sample.com", + "subAccountId": "100002", +}). +Get("/v1/users/{userId}/{subAccountId}/details") + +// Result: +// Composed URL - /v1/users/sample@sample.com/100002/details +``` + +#### Request and Response Middleware + +Resty provides middleware ability to manipulate for Request and Response. It is more flexible than callback approach. + +```go +// Registering Request Middleware +resty.OnBeforeRequest(func(c *resty.Client, req *resty.Request) error { + // Now you have access to Client and current Request object + // manipulate it as per your need + + return nil // if its success otherwise return error + }) + +// Registering Response Middleware +resty.OnAfterResponse(func(c *resty.Client, resp *resty.Response) error { + // Now you have access to Client and current Response object + // manipulate it as per your need + + return nil // if its success otherwise return error + }) +``` + +#### Redirect Policy + +Resty provides few ready to use redirect policy(s) also it supports multiple policies together. + +```go +// Assign Client Redirect Policy. Create one as per you need +resty.SetRedirectPolicy(resty.FlexibleRedirectPolicy(15)) + +// Wanna multiple policies such as redirect count, domain name check, etc +resty.SetRedirectPolicy(resty.FlexibleRedirectPolicy(20), + resty.DomainCheckRedirectPolicy("host1.com", "host2.org", "host3.net")) +``` + +##### Custom Redirect Policy + +Implement [RedirectPolicy](redirect.go#L20) interface and register it with resty client. Have a look [redirect.go](redirect.go) for more information. + +```go +// Using raw func into resty.SetRedirectPolicy +resty.SetRedirectPolicy(resty.RedirectPolicyFunc(func(req *http.Request, via []*http.Request) error { + // Implement your logic here + + // return nil for continue redirect otherwise return error to stop/prevent redirect + return nil +})) + +//--------------------------------------------------- + +// Using struct create more flexible redirect policy +type CustomRedirectPolicy struct { + // variables goes here +} + +func (c *CustomRedirectPolicy) Apply(req *http.Request, via []*http.Request) error { + // Implement your logic here + + // return nil for continue redirect otherwise return error to stop/prevent redirect + return nil +} + +// Registering in resty +resty.SetRedirectPolicy(CustomRedirectPolicy{/* initialize variables */}) +``` + +#### Custom Root Certificates and Client Certificates + +```go +// Custom Root certificates, just supply .pem file. +// you can add one or more root certificates, its get appended +resty.SetRootCertificate("/path/to/root/pemFile1.pem") +resty.SetRootCertificate("/path/to/root/pemFile2.pem") +// ... and so on! + +// Adding Client Certificates, you add one or more certificates +// Sample for creating certificate object +// Parsing public/private key pair from a pair of files. The files must contain PEM encoded data. +cert1, err := tls.LoadX509KeyPair("certs/client.pem", "certs/client.key") +if err != nil { + log.Fatalf("ERROR client certificate: %s", err) +} +// ... + +// You add one or more certificates +resty.SetCertificates(cert1, cert2, cert3) +``` + +#### Proxy Settings - Client as well as at Request Level + +Default `Go` supports Proxy via environment variable `HTTP_PROXY`. Resty provides support via `SetProxy` & `RemoveProxy`. +Choose as per your need. + +**Client Level Proxy** settings applied to all the request + +```go +// Setting a Proxy URL and Port +resty.SetProxy("http://proxyserver:8888") + +// Want to remove proxy setting +resty.RemoveProxy() +``` + +#### Retries + +Resty uses [backoff](http://www.awsarchitectureblog.com/2015/03/backoff.html) +to increase retry intervals after each attempt. + +Usage example: + +```go +// Retries are configured per client +resty. + // Set retry count to non zero to enable retries + SetRetryCount(3). + // You can override initial retry wait time. + // Default is 100 milliseconds. + SetRetryWaitTime(5 * time.Second). + // MaxWaitTime can be overridden as well. + // Default is 2 seconds. + SetRetryMaxWaitTime(20 * time.Second) +``` + +Above setup will result in resty retrying requests returned non nil error up to +3 times with delay increased after each attempt. + +You can optionally provide client with custom retry conditions: + +```go +resty.AddRetryCondition( + // Condition function will be provided with *resty.Response as a + // parameter. It is expected to return (bool, error) pair. Resty will retry + // in case condition returns true or non nil error. + func(r *resty.Response) (bool, error) { + return r.StatusCode() == http.StatusTooManyRequests, nil + }, +) +``` + +Above example will make resty retry requests ended with `429 Too Many Requests` +status code. + +Multiple retry conditions can be added. + +It is also possible to use `resty.Backoff(...)` to get arbitrary retry scenarios +implemented. [Reference](retry_test.go). + +#### Choose REST or HTTP mode + +```go +// REST mode. This is Default. +resty.SetRESTMode() + +// HTTP mode +resty.SetHTTPMode() +``` + +#### Allow GET request with Payload + +```go +// Allow GET request with Payload. This is disabled by default. +resty.SetAllowGetMethodPayload(true) +``` + +#### Wanna Multiple Clients + +```go +// Here you go! +// Client 1 +client1 := resty.New() +client1.R().Get("http://httpbin.org") +// ... + +// Client 2 +client2 := resty.New() +client2.R().Head("http://httpbin.org") +// ... + +// Bend it as per your need!!! +``` + +#### Remaining Client Settings & its Options + +```go +// Unique settings at Client level +//-------------------------------- +// Enable debug mode +resty.SetDebug(true) + +// Using you custom log writer +logFile, _ := os.OpenFile("/Users/jeeva/go-resty.log", os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666) +resty.SetLogger(logFile) + +// Assign Client TLSClientConfig +// One can set custom root-certificate. Refer: http://golang.org/pkg/crypto/tls/#example_Dial +resty.SetTLSClientConfig(&tls.Config{ RootCAs: roots }) + +// or One can disable security check (https) +resty.SetTLSClientConfig(&tls.Config{ InsecureSkipVerify: true }) + +// Set client timeout as per your need +resty.SetTimeout(1 * time.Minute) + + +// You can override all below settings and options at request level if you want to +//-------------------------------------------------------------------------------- +// Host URL for all request. So you can use relative URL in the request +resty.SetHostURL("http://httpbin.org") + +// Headers for all request +resty.SetHeader("Accept", "application/json") +resty.SetHeaders(map[string]string{ + "Content-Type": "application/json", + "User-Agent": "My custom User Agent String", + }) + +// Cookies for all request +resty.SetCookie(&http.Cookie{ + Name:"go-resty", + Value:"This is cookie value", + Path: "/", + Domain: "sample.com", + MaxAge: 36000, + HttpOnly: true, + Secure: false, + }) +resty.SetCookies(cookies) + +// URL query parameters for all request +resty.SetQueryParam("user_id", "00001") +resty.SetQueryParams(map[string]string{ // sample of those who use this manner + "api_key": "api-key-here", + "api_secert": "api-secert", + }) +resty.R().SetQueryString("productId=232&template=fresh-sample&cat=resty&source=google&kw=buy a lot more") + +// Form data for all request. Typically used with POST and PUT +resty.SetFormData(map[string]string{ + "access_token": "BC594900-518B-4F7E-AC75-BD37F019E08F", + }) + +// Basic Auth for all request +resty.SetBasicAuth("myuser", "mypass") + +// Bearer Auth Token for all request +resty.SetAuthToken("BC594900518B4F7EAC75BD37F019E08FBC594900518B4F7EAC75BD37F019E08F") + +// Enabling Content length value for all request +resty.SetContentLength(true) + +// Registering global Error object structure for JSON/XML request +resty.SetError(&Error{}) // or resty.SetError(Error{}) +``` + +#### Unix Socket + +```go +unixSocket := "/var/run/my_socket.sock" + +// Create a Go's http.Transport so we can set it in resty. +transport := http.Transport{ + Dial: func(_, _ string) (net.Conn, error) { + return net.Dial("unix", unixSocket) + }, +} + +// Set the previous transport that we created, set the scheme of the communication to the +// socket and set the unixSocket as the HostURL. +r := resty.New().SetTransport(&transport).SetScheme("http").SetHostURL(unixSocket) + +// No need to write the host's URL on the request, just the path. +r.R().Get("/index.html") +``` + +#### Bazel support + +Resty can be built, tested and depended upon via [Bazel](https://bazel.build). +For example, to run all tests: + +```shell +bazel test :go_default_test +``` + +#### Mocking http requests using [httpmock](https://github.com/jarcoal/httpmock) library + +In order to mock the http requests when testing your application you +could use the `httpmock` library. + +When using the default resty client, you should pass the client to the library as follow: + +```go +httpmock.ActivateNonDefault(resty.DefaultClient.GetClient()) +``` + +More detailed example of mocking resty http requests using ginko could be found [here](https://github.com/jarcoal/httpmock#ginkgo--resty-example). + +## Versioning + +resty releases versions according to [Semantic Versioning](http://semver.org) + + * `gopkg.in/resty.vX` points to appropriate tagged versions; `X` denotes version series number and it's a stable release for production use. For e.g. `gopkg.in/resty.v0`. + * Development takes place at the master branch. Although the code in master should always compile and test successfully, it might break API's. I aim to maintain backwards compatibility, but sometimes API's and behavior might be changed to fix a bug. + +## Contribution + +I would welcome your contribution! If you find any improvement or issue you want to fix, feel free to send a pull request, I like pull requests that include test cases for fix/enhancement. I have done my best to bring pretty good code coverage. Feel free to write tests. + +BTW, I'd like to know what you think about `Resty`. Kindly open an issue or send me an email; it'd mean a lot to me. + +## Creator + +[Jeevanandam M.](https://github.com/jeevatkm) (jeeva@myjeeva.com) + +## Contributors + +Have a look on [Contributors](https://github.com/go-resty/resty/graphs/contributors) page. + +## License + +Resty released under MIT license, refer [LICENSE](LICENSE) file. diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/WORKSPACE b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/WORKSPACE new file mode 100644 index 000000000..5459d6321 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/WORKSPACE @@ -0,0 +1,27 @@ +workspace(name = "resty") + +git_repository( + name = "io_bazel_rules_go", + remote = "https://github.com/bazelbuild/rules_go.git", + tag = "0.13.0", +) + +git_repository( + name = "bazel_gazelle", + remote = "https://github.com/bazelbuild/bazel-gazelle.git", + tag = "0.13.0", +) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_rules_dependencies", + "go_register_toolchains", +) + +go_rules_dependencies() + +go_register_toolchains() + +load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies") + +gazelle_dependencies() diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/client.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/client.go new file mode 100644 index 000000000..68d447fa6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/client.go @@ -0,0 +1,926 @@ +// Copyright (c) 2015-2019 Jeevanandam M (jeeva@myjeeva.com), All rights reserved. +// resty source code and usage is governed by a MIT style +// license that can be found in the LICENSE file. + +package resty + +import ( + "bytes" + "compress/gzip" + "crypto/tls" + "crypto/x509" + "errors" + "fmt" + "io" + "io/ioutil" + "log" + "net/http" + "net/url" + "reflect" + "regexp" + "strings" + "sync" + "time" +) + +const ( + // MethodGet HTTP method + MethodGet = "GET" + + // MethodPost HTTP method + MethodPost = "POST" + + // MethodPut HTTP method + MethodPut = "PUT" + + // MethodDelete HTTP method + MethodDelete = "DELETE" + + // MethodPatch HTTP method + MethodPatch = "PATCH" + + // MethodHead HTTP method + MethodHead = "HEAD" + + // MethodOptions HTTP method + MethodOptions = "OPTIONS" +) + +var ( + hdrUserAgentKey = http.CanonicalHeaderKey("User-Agent") + hdrAcceptKey = http.CanonicalHeaderKey("Accept") + hdrContentTypeKey = http.CanonicalHeaderKey("Content-Type") + hdrContentLengthKey = http.CanonicalHeaderKey("Content-Length") + hdrContentEncodingKey = http.CanonicalHeaderKey("Content-Encoding") + hdrAuthorizationKey = http.CanonicalHeaderKey("Authorization") + + plainTextType = "text/plain; charset=utf-8" + jsonContentType = "application/json; charset=utf-8" + formContentType = "application/x-www-form-urlencoded" + + jsonCheck = regexp.MustCompile(`(?i:(application|text)/(json|.*\+json|json\-.*)(;|$))`) + xmlCheck = regexp.MustCompile(`(?i:(application|text)/(xml|.*\+xml)(;|$))`) + + hdrUserAgentValue = "go-resty/%s (https://github.com/go-resty/resty)" + bufPool = &sync.Pool{New: func() interface{} { return &bytes.Buffer{} }} +) + +// Client type is used for HTTP/RESTful global values +// for all request raised from the client +type Client struct { + HostURL string + QueryParam url.Values + FormData url.Values + Header http.Header + UserInfo *User + Token string + Cookies []*http.Cookie + Error reflect.Type + Debug bool + DisableWarn bool + AllowGetMethodPayload bool + Log *log.Logger + RetryCount int + RetryWaitTime time.Duration + RetryMaxWaitTime time.Duration + RetryConditions []RetryConditionFunc + JSONMarshal func(v interface{}) ([]byte, error) + JSONUnmarshal func(data []byte, v interface{}) error + + jsonEscapeHTML bool + httpClient *http.Client + setContentLength bool + isHTTPMode bool + outputDirectory string + scheme string + proxyURL *url.URL + closeConnection bool + notParseResponse bool + debugBodySizeLimit int64 + logPrefix string + pathParams map[string]string + beforeRequest []func(*Client, *Request) error + udBeforeRequest []func(*Client, *Request) error + preReqHook func(*Client, *Request) error + afterResponse []func(*Client, *Response) error + requestLog func(*RequestLog) error + responseLog func(*ResponseLog) error +} + +// User type is to hold an username and password information +type User struct { + Username, Password string +} + +//‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +// Client methods +//___________________________________ + +// SetHostURL method is to set Host URL in the client instance. It will be used with request +// raised from this client with relative URL +// // Setting HTTP address +// resty.SetHostURL("http://myjeeva.com") +// +// // Setting HTTPS address +// resty.SetHostURL("https://myjeeva.com") +// +func (c *Client) SetHostURL(url string) *Client { + c.HostURL = strings.TrimRight(url, "/") + return c +} + +// SetHeader method sets a single header field and its value in the client instance. +// These headers will be applied to all requests raised from this client instance. +// Also it can be overridden at request level header options, see `resty.R().SetHeader` +// or `resty.R().SetHeaders`. +// +// Example: To set `Content-Type` and `Accept` as `application/json` +// +// resty. +// SetHeader("Content-Type", "application/json"). +// SetHeader("Accept", "application/json") +// +func (c *Client) SetHeader(header, value string) *Client { + c.Header.Set(header, value) + return c +} + +// SetHeaders method sets multiple headers field and its values at one go in the client instance. +// These headers will be applied to all requests raised from this client instance. Also it can be +// overridden at request level headers options, see `resty.R().SetHeaders` or `resty.R().SetHeader`. +// +// Example: To set `Content-Type` and `Accept` as `application/json` +// +// resty.SetHeaders(map[string]string{ +// "Content-Type": "application/json", +// "Accept": "application/json", +// }) +// +func (c *Client) SetHeaders(headers map[string]string) *Client { + for h, v := range headers { + c.Header.Set(h, v) + } + + return c +} + +// SetCookieJar method sets custom http.CookieJar in the resty client. Its way to override default. +// Example: sometimes we don't want to save cookies in api contacting, we can remove the default +// CookieJar in resty client. +// +// resty.SetCookieJar(nil) +// +func (c *Client) SetCookieJar(jar http.CookieJar) *Client { + c.httpClient.Jar = jar + return c +} + +// SetCookie method appends a single cookie in the client instance. +// These cookies will be added to all the request raised from this client instance. +// resty.SetCookie(&http.Cookie{ +// Name:"go-resty", +// Value:"This is cookie value", +// Path: "/", +// Domain: "sample.com", +// MaxAge: 36000, +// HttpOnly: true, +// Secure: false, +// }) +// +func (c *Client) SetCookie(hc *http.Cookie) *Client { + c.Cookies = append(c.Cookies, hc) + return c +} + +// SetCookies method sets an array of cookies in the client instance. +// These cookies will be added to all the request raised from this client instance. +// cookies := make([]*http.Cookie, 0) +// +// cookies = append(cookies, &http.Cookie{ +// Name:"go-resty-1", +// Value:"This is cookie 1 value", +// Path: "/", +// Domain: "sample.com", +// MaxAge: 36000, +// HttpOnly: true, +// Secure: false, +// }) +// +// cookies = append(cookies, &http.Cookie{ +// Name:"go-resty-2", +// Value:"This is cookie 2 value", +// Path: "/", +// Domain: "sample.com", +// MaxAge: 36000, +// HttpOnly: true, +// Secure: false, +// }) +// +// // Setting a cookies into resty +// resty.SetCookies(cookies) +// +func (c *Client) SetCookies(cs []*http.Cookie) *Client { + c.Cookies = append(c.Cookies, cs...) + return c +} + +// SetQueryParam method sets single parameter and its value in the client instance. +// It will be formed as query string for the request. For example: `search=kitchen%20papers&size=large` +// in the URL after `?` mark. These query params will be added to all the request raised from +// this client instance. Also it can be overridden at request level Query Param options, +// see `resty.R().SetQueryParam` or `resty.R().SetQueryParams`. +// resty. +// SetQueryParam("search", "kitchen papers"). +// SetQueryParam("size", "large") +// +func (c *Client) SetQueryParam(param, value string) *Client { + c.QueryParam.Set(param, value) + return c +} + +// SetQueryParams method sets multiple parameters and their values at one go in the client instance. +// It will be formed as query string for the request. For example: `search=kitchen%20papers&size=large` +// in the URL after `?` mark. These query params will be added to all the request raised from this +// client instance. Also it can be overridden at request level Query Param options, +// see `resty.R().SetQueryParams` or `resty.R().SetQueryParam`. +// resty.SetQueryParams(map[string]string{ +// "search": "kitchen papers", +// "size": "large", +// }) +// +func (c *Client) SetQueryParams(params map[string]string) *Client { + for p, v := range params { + c.SetQueryParam(p, v) + } + + return c +} + +// SetFormData method sets Form parameters and their values in the client instance. +// It's applicable only HTTP method `POST` and `PUT` and requets content type would be set as +// `application/x-www-form-urlencoded`. These form data will be added to all the request raised from +// this client instance. Also it can be overridden at request level form data, see `resty.R().SetFormData`. +// resty.SetFormData(map[string]string{ +// "access_token": "BC594900-518B-4F7E-AC75-BD37F019E08F", +// "user_id": "3455454545", +// }) +// +func (c *Client) SetFormData(data map[string]string) *Client { + for k, v := range data { + c.FormData.Set(k, v) + } + + return c +} + +// SetBasicAuth method sets the basic authentication header in the HTTP request. Example: +// Authorization: Basic +// +// Example: To set the header for username "go-resty" and password "welcome" +// resty.SetBasicAuth("go-resty", "welcome") +// +// This basic auth information gets added to all the request rasied from this client instance. +// Also it can be overridden or set one at the request level is supported, see `resty.R().SetBasicAuth`. +// +func (c *Client) SetBasicAuth(username, password string) *Client { + c.UserInfo = &User{Username: username, Password: password} + return c +} + +// SetAuthToken method sets bearer auth token header in the HTTP request. Example: +// Authorization: Bearer +// +// Example: To set auth token BC594900518B4F7EAC75BD37F019E08FBC594900518B4F7EAC75BD37F019E08F +// +// resty.SetAuthToken("BC594900518B4F7EAC75BD37F019E08FBC594900518B4F7EAC75BD37F019E08F") +// +// This bearer auth token gets added to all the request rasied from this client instance. +// Also it can be overridden or set one at the request level is supported, see `resty.R().SetAuthToken`. +// +func (c *Client) SetAuthToken(token string) *Client { + c.Token = token + return c +} + +// R method creates a request instance, its used for Get, Post, Put, Delete, Patch, Head and Options. +func (c *Client) R() *Request { + r := &Request{ + QueryParam: url.Values{}, + FormData: url.Values{}, + Header: http.Header{}, + + client: c, + multipartFiles: []*File{}, + multipartFields: []*MultipartField{}, + pathParams: map[string]string{}, + jsonEscapeHTML: true, + } + + return r +} + +// NewRequest is an alias for R(). Creates a request instance, its used for +// Get, Post, Put, Delete, Patch, Head and Options. +func (c *Client) NewRequest() *Request { + return c.R() +} + +// OnBeforeRequest method appends request middleware into the before request chain. +// Its gets applied after default `go-resty` request middlewares and before request +// been sent from `go-resty` to host server. +// resty.OnBeforeRequest(func(c *resty.Client, r *resty.Request) error { +// // Now you have access to Client and Request instance +// // manipulate it as per your need +// +// return nil // if its success otherwise return error +// }) +// +func (c *Client) OnBeforeRequest(m func(*Client, *Request) error) *Client { + c.udBeforeRequest = append(c.udBeforeRequest, m) + return c +} + +// OnAfterResponse method appends response middleware into the after response chain. +// Once we receive response from host server, default `go-resty` response middleware +// gets applied and then user assigened response middlewares applied. +// resty.OnAfterResponse(func(c *resty.Client, r *resty.Response) error { +// // Now you have access to Client and Response instance +// // manipulate it as per your need +// +// return nil // if its success otherwise return error +// }) +// +func (c *Client) OnAfterResponse(m func(*Client, *Response) error) *Client { + c.afterResponse = append(c.afterResponse, m) + return c +} + +// SetPreRequestHook method sets the given pre-request function into resty client. +// It is called right before the request is fired. +// +// Note: Only one pre-request hook can be registered. Use `resty.OnBeforeRequest` for mutilple. +func (c *Client) SetPreRequestHook(h func(*Client, *Request) error) *Client { + if c.preReqHook != nil { + c.Log.Printf("Overwriting an existing pre-request hook: %s", functionName(h)) + } + c.preReqHook = h + return c +} + +// SetDebug method enables the debug mode on `go-resty` client. Client logs details of every request and response. +// For `Request` it logs information such as HTTP verb, Relative URL path, Host, Headers, Body if it has one. +// For `Response` it logs information such as Status, Response Time, Headers, Body if it has one. +// resty.SetDebug(true) +// +func (c *Client) SetDebug(d bool) *Client { + c.Debug = d + return c +} + +// SetDebugBodyLimit sets the maximum size for which the response body will be logged in debug mode. +// resty.SetDebugBodyLimit(1000000) +// +func (c *Client) SetDebugBodyLimit(sl int64) *Client { + c.debugBodySizeLimit = sl + return c +} + +// OnRequestLog method used to set request log callback into resty. Registered callback gets +// called before the resty actually logs the information. +func (c *Client) OnRequestLog(rl func(*RequestLog) error) *Client { + if c.requestLog != nil { + c.Log.Printf("Overwriting an existing on-request-log callback from=%s to=%s", functionName(c.requestLog), functionName(rl)) + } + c.requestLog = rl + return c +} + +// OnResponseLog method used to set response log callback into resty. Registered callback gets +// called before the resty actually logs the information. +func (c *Client) OnResponseLog(rl func(*ResponseLog) error) *Client { + if c.responseLog != nil { + c.Log.Printf("Overwriting an existing on-response-log callback from=%s to=%s", functionName(c.responseLog), functionName(rl)) + } + c.responseLog = rl + return c +} + +// SetDisableWarn method disables the warning message on `go-resty` client. +// For example: go-resty warns the user when BasicAuth used on HTTP mode. +// resty.SetDisableWarn(true) +// +func (c *Client) SetDisableWarn(d bool) *Client { + c.DisableWarn = d + return c +} + +// SetAllowGetMethodPayload method allows the GET method with payload on `go-resty` client. +// For example: go-resty allows the user sends request with a payload on HTTP GET method. +// resty.SetAllowGetMethodPayload(true) +// +func (c *Client) SetAllowGetMethodPayload(a bool) *Client { + c.AllowGetMethodPayload = a + return c +} + +// SetLogger method sets given writer for logging go-resty request and response details. +// Default is os.Stderr +// file, _ := os.OpenFile("/Users/jeeva/go-resty.log", os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666) +// +// resty.SetLogger(file) +// +func (c *Client) SetLogger(w io.Writer) *Client { + c.Log = getLogger(w) + return c +} + +// SetContentLength method enables the HTTP header `Content-Length` value for every request. +// By default go-resty won't set `Content-Length`. +// resty.SetContentLength(true) +// +// Also you have an option to enable for particular request. See `resty.R().SetContentLength` +// +func (c *Client) SetContentLength(l bool) *Client { + c.setContentLength = l + return c +} + +// SetTimeout method sets timeout for request raised from client. +// resty.SetTimeout(time.Duration(1 * time.Minute)) +// +func (c *Client) SetTimeout(timeout time.Duration) *Client { + c.httpClient.Timeout = timeout + return c +} + +// SetError method is to register the global or client common `Error` object into go-resty. +// It is used for automatic unmarshalling if response status code is greater than 399 and +// content type either JSON or XML. Can be pointer or non-pointer. +// resty.SetError(&Error{}) +// // OR +// resty.SetError(Error{}) +// +func (c *Client) SetError(err interface{}) *Client { + c.Error = typeOf(err) + return c +} + +// SetRedirectPolicy method sets the client redirect poilicy. go-resty provides ready to use +// redirect policies. Wanna create one for yourself refer `redirect.go`. +// +// resty.SetRedirectPolicy(FlexibleRedirectPolicy(20)) +// +// // Need multiple redirect policies together +// resty.SetRedirectPolicy(FlexibleRedirectPolicy(20), DomainCheckRedirectPolicy("host1.com", "host2.net")) +// +func (c *Client) SetRedirectPolicy(policies ...interface{}) *Client { + for _, p := range policies { + if _, ok := p.(RedirectPolicy); !ok { + c.Log.Printf("ERORR: %v does not implement resty.RedirectPolicy (missing Apply method)", + functionName(p)) + } + } + + c.httpClient.CheckRedirect = func(req *http.Request, via []*http.Request) error { + for _, p := range policies { + if err := p.(RedirectPolicy).Apply(req, via); err != nil { + return err + } + } + return nil // looks good, go ahead + } + + return c +} + +// SetRetryCount method enables retry on `go-resty` client and allows you +// to set no. of retry count. Resty uses a Backoff mechanism. +func (c *Client) SetRetryCount(count int) *Client { + c.RetryCount = count + return c +} + +// SetRetryWaitTime method sets default wait time to sleep before retrying +// request. +// Default is 100 milliseconds. +func (c *Client) SetRetryWaitTime(waitTime time.Duration) *Client { + c.RetryWaitTime = waitTime + return c +} + +// SetRetryMaxWaitTime method sets max wait time to sleep before retrying +// request. +// Default is 2 seconds. +func (c *Client) SetRetryMaxWaitTime(maxWaitTime time.Duration) *Client { + c.RetryMaxWaitTime = maxWaitTime + return c +} + +// AddRetryCondition method adds a retry condition function to array of functions +// that are checked to determine if the request is retried. The request will +// retry if any of the functions return true and error is nil. +func (c *Client) AddRetryCondition(condition RetryConditionFunc) *Client { + c.RetryConditions = append(c.RetryConditions, condition) + return c +} + +// SetHTTPMode method sets go-resty mode to 'http' +func (c *Client) SetHTTPMode() *Client { + return c.SetMode("http") +} + +// SetRESTMode method sets go-resty mode to 'rest' +func (c *Client) SetRESTMode() *Client { + return c.SetMode("rest") +} + +// SetMode method sets go-resty client mode to given value such as 'http' & 'rest'. +// 'rest': +// - No Redirect +// - Automatic response unmarshal if it is JSON or XML +// 'http': +// - Up to 10 Redirects +// - No automatic unmarshall. Response will be treated as `response.String()` +// +// If you want more redirects, use FlexibleRedirectPolicy +// resty.SetRedirectPolicy(FlexibleRedirectPolicy(20)) +// +func (c *Client) SetMode(mode string) *Client { + // HTTP + if mode == "http" { + c.isHTTPMode = true + c.SetRedirectPolicy(FlexibleRedirectPolicy(10)) + c.afterResponse = []func(*Client, *Response) error{ + responseLogger, + saveResponseIntoFile, + } + return c + } + + // RESTful + c.isHTTPMode = false + c.SetRedirectPolicy(NoRedirectPolicy()) + c.afterResponse = []func(*Client, *Response) error{ + responseLogger, + parseResponseBody, + saveResponseIntoFile, + } + return c +} + +// Mode method returns the current client mode. Typically its a "http" or "rest". +// Default is "rest" +func (c *Client) Mode() string { + if c.isHTTPMode { + return "http" + } + return "rest" +} + +// SetTLSClientConfig method sets TLSClientConfig for underling client Transport. +// +// Example: +// // One can set custom root-certificate. Refer: http://golang.org/pkg/crypto/tls/#example_Dial +// resty.SetTLSClientConfig(&tls.Config{ RootCAs: roots }) +// +// // or One can disable security check (https) +// resty.SetTLSClientConfig(&tls.Config{ InsecureSkipVerify: true }) +// Note: This method overwrites existing `TLSClientConfig`. +// +func (c *Client) SetTLSClientConfig(config *tls.Config) *Client { + transport, err := c.getTransport() + if err != nil { + c.Log.Printf("ERROR %v", err) + return c + } + transport.TLSClientConfig = config + return c +} + +// SetProxy method sets the Proxy URL and Port for resty client. +// resty.SetProxy("http://proxyserver:8888") +// +// Alternatives: At request level proxy, see `Request.SetProxy`. OR Without this `SetProxy` method, +// you can also set Proxy via environment variable. By default `Go` uses setting from `HTTP_PROXY`. +// +func (c *Client) SetProxy(proxyURL string) *Client { + transport, err := c.getTransport() + if err != nil { + c.Log.Printf("ERROR %v", err) + return c + } + + if pURL, err := url.Parse(proxyURL); err == nil { + c.proxyURL = pURL + transport.Proxy = http.ProxyURL(c.proxyURL) + } else { + c.Log.Printf("ERROR %v", err) + c.RemoveProxy() + } + return c +} + +// RemoveProxy method removes the proxy configuration from resty client +// resty.RemoveProxy() +// +func (c *Client) RemoveProxy() *Client { + transport, err := c.getTransport() + if err != nil { + c.Log.Printf("ERROR %v", err) + return c + } + c.proxyURL = nil + transport.Proxy = nil + return c +} + +// SetCertificates method helps to set client certificates into resty conveniently. +// +func (c *Client) SetCertificates(certs ...tls.Certificate) *Client { + config, err := c.getTLSConfig() + if err != nil { + c.Log.Printf("ERROR %v", err) + return c + } + config.Certificates = append(config.Certificates, certs...) + return c +} + +// SetRootCertificate method helps to add one or more root certificates into resty client +// resty.SetRootCertificate("/path/to/root/pemFile.pem") +// +func (c *Client) SetRootCertificate(pemFilePath string) *Client { + rootPemData, err := ioutil.ReadFile(pemFilePath) + if err != nil { + c.Log.Printf("ERROR %v", err) + return c + } + + config, err := c.getTLSConfig() + if err != nil { + c.Log.Printf("ERROR %v", err) + return c + } + if config.RootCAs == nil { + config.RootCAs = x509.NewCertPool() + } + + config.RootCAs.AppendCertsFromPEM(rootPemData) + + return c +} + +// SetOutputDirectory method sets output directory for saving HTTP response into file. +// If the output directory not exists then resty creates one. This setting is optional one, +// if you're planning using absoule path in `Request.SetOutput` and can used together. +// resty.SetOutputDirectory("/save/http/response/here") +// +func (c *Client) SetOutputDirectory(dirPath string) *Client { + c.outputDirectory = dirPath + return c +} + +// SetTransport method sets custom `*http.Transport` or any `http.RoundTripper` +// compatible interface implementation in the resty client. +// +// NOTE: +// +// - If transport is not type of `*http.Transport` then you may not be able to +// take advantage of some of the `resty` client settings. +// +// - It overwrites the resty client transport instance and it's configurations. +// +// transport := &http.Transport{ +// // somthing like Proxying to httptest.Server, etc... +// Proxy: func(req *http.Request) (*url.URL, error) { +// return url.Parse(server.URL) +// }, +// } +// +// resty.SetTransport(transport) +// +func (c *Client) SetTransport(transport http.RoundTripper) *Client { + if transport != nil { + c.httpClient.Transport = transport + } + return c +} + +// SetScheme method sets custom scheme in the resty client. It's way to override default. +// resty.SetScheme("http") +// +func (c *Client) SetScheme(scheme string) *Client { + if !IsStringEmpty(scheme) { + c.scheme = scheme + } + + return c +} + +// SetCloseConnection method sets variable `Close` in http request struct with the given +// value. More info: https://golang.org/src/net/http/request.go +func (c *Client) SetCloseConnection(close bool) *Client { + c.closeConnection = close + return c +} + +// SetDoNotParseResponse method instructs `Resty` not to parse the response body automatically. +// Resty exposes the raw response body as `io.ReadCloser`. Also do not forget to close the body, +// otherwise you might get into connection leaks, no connection reuse. +// +// Please Note: Response middlewares are not applicable, if you use this option. Basically you have +// taken over the control of response parsing from `Resty`. +func (c *Client) SetDoNotParseResponse(parse bool) *Client { + c.notParseResponse = parse + return c +} + +// SetLogPrefix method sets the Resty logger prefix value. +func (c *Client) SetLogPrefix(prefix string) *Client { + c.logPrefix = prefix + c.Log.SetPrefix(prefix) + return c +} + +// SetPathParams method sets multiple URL path key-value pairs at one go in the +// resty client instance. +// resty.SetPathParams(map[string]string{ +// "userId": "sample@sample.com", +// "subAccountId": "100002", +// }) +// +// Result: +// URL - /v1/users/{userId}/{subAccountId}/details +// Composed URL - /v1/users/sample@sample.com/100002/details +// It replace the value of the key while composing request URL. Also it can be +// overridden at request level Path Params options, see `Request.SetPathParams`. +func (c *Client) SetPathParams(params map[string]string) *Client { + for p, v := range params { + c.pathParams[p] = v + } + return c +} + +// SetJSONEscapeHTML method is to enable/disable the HTML escape on JSON marshal. +// +// NOTE: This option only applicable to standard JSON Marshaller. +func (c *Client) SetJSONEscapeHTML(b bool) *Client { + c.jsonEscapeHTML = b + return c +} + +// IsProxySet method returns the true if proxy is set on client otherwise false. +func (c *Client) IsProxySet() bool { + return c.proxyURL != nil +} + +// GetClient method returns the current http.Client used by the resty client. +func (c *Client) GetClient() *http.Client { + return c.httpClient +} + +//‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +// Client Unexported methods +//___________________________________ + +// executes the given `Request` object and returns response +func (c *Client) execute(req *Request) (*Response, error) { + defer releaseBuffer(req.bodyBuf) + // Apply Request middleware + var err error + + // user defined on before request methods + // to modify the *resty.Request object + for _, f := range c.udBeforeRequest { + if err = f(c, req); err != nil { + return nil, err + } + } + + // resty middlewares + for _, f := range c.beforeRequest { + if err = f(c, req); err != nil { + return nil, err + } + } + + // call pre-request if defined + if c.preReqHook != nil { + if err = c.preReqHook(c, req); err != nil { + return nil, err + } + } + + if hostHeader := req.Header.Get("Host"); hostHeader != "" { + req.RawRequest.Host = hostHeader + } + + if err = requestLogger(c, req); err != nil { + return nil, err + } + + req.Time = time.Now() + resp, err := c.httpClient.Do(req.RawRequest) + + response := &Response{ + Request: req, + RawResponse: resp, + receivedAt: time.Now(), + } + + if err != nil || req.notParseResponse || c.notParseResponse { + return response, err + } + + if !req.isSaveResponse { + defer closeq(resp.Body) + body := resp.Body + + // GitHub #142 & #187 + if strings.EqualFold(resp.Header.Get(hdrContentEncodingKey), "gzip") && resp.ContentLength != 0 { + if _, ok := body.(*gzip.Reader); !ok { + body, err = gzip.NewReader(body) + if err != nil { + return response, err + } + defer closeq(body) + } + } + + if response.body, err = ioutil.ReadAll(body); err != nil { + return response, err + } + + response.size = int64(len(response.body)) + } + + // Apply Response middleware + for _, f := range c.afterResponse { + if err = f(c, response); err != nil { + break + } + } + + return response, err +} + +// enables a log prefix +func (c *Client) enableLogPrefix() { + c.Log.SetFlags(log.LstdFlags) + c.Log.SetPrefix(c.logPrefix) +} + +// disables a log prefix +func (c *Client) disableLogPrefix() { + c.Log.SetFlags(0) + c.Log.SetPrefix("") +} + +// getting TLS client config if not exists then create one +func (c *Client) getTLSConfig() (*tls.Config, error) { + transport, err := c.getTransport() + if err != nil { + return nil, err + } + if transport.TLSClientConfig == nil { + transport.TLSClientConfig = &tls.Config{} + } + return transport.TLSClientConfig, nil +} + +// returns `*http.Transport` currently in use or error +// in case currently used `transport` is not an `*http.Transport` +func (c *Client) getTransport() (*http.Transport, error) { + if c.httpClient.Transport == nil { + c.SetTransport(new(http.Transport)) + } + + if transport, ok := c.httpClient.Transport.(*http.Transport); ok { + return transport, nil + } + return nil, errors.New("current transport is not an *http.Transport instance") +} + +// +// File +// + +// File represent file information for multipart request +type File struct { + Name string + ParamName string + io.Reader +} + +// String returns string value of current file details +func (f *File) String() string { + return fmt.Sprintf("ParamName: %v; FileName: %v", f.ParamName, f.Name) +} + +// MultipartField represent custom data part for multipart request +type MultipartField struct { + Param string + FileName string + ContentType string + io.Reader +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/default.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/default.go new file mode 100644 index 000000000..cc6ae478c --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/default.go @@ -0,0 +1,327 @@ +// Copyright (c) 2015-2019 Jeevanandam M (jeeva@myjeeva.com), All rights reserved. +// resty source code and usage is governed by a MIT style +// license that can be found in the LICENSE file. + +package resty + +import ( + "crypto/tls" + "encoding/json" + "io" + "math" + "net/http" + "net/http/cookiejar" + "net/url" + "os" + "time" + + "golang.org/x/net/publicsuffix" +) + +// DefaultClient of resty +var DefaultClient *Client + +// New method creates a new go-resty client. +func New() *Client { + cookieJar, _ := cookiejar.New(&cookiejar.Options{PublicSuffixList: publicsuffix.List}) + return createClient(&http.Client{Jar: cookieJar}) +} + +// NewWithClient method create a new go-resty client with given `http.Client`. +func NewWithClient(hc *http.Client) *Client { + return createClient(hc) +} + +// R creates a new resty request object, it is used form a HTTP/RESTful request +// such as GET, POST, PUT, DELETE, HEAD, PATCH and OPTIONS. +func R() *Request { + return DefaultClient.R() +} + +// NewRequest is an alias for R(). Creates a new resty request object, it is used form a HTTP/RESTful request +// such as GET, POST, PUT, DELETE, HEAD, PATCH and OPTIONS. +func NewRequest() *Request { + return R() +} + +// SetHostURL sets Host URL. See `Client.SetHostURL for more information. +func SetHostURL(url string) *Client { + return DefaultClient.SetHostURL(url) +} + +// SetHeader sets single header. See `Client.SetHeader` for more information. +func SetHeader(header, value string) *Client { + return DefaultClient.SetHeader(header, value) +} + +// SetHeaders sets multiple headers. See `Client.SetHeaders` for more information. +func SetHeaders(headers map[string]string) *Client { + return DefaultClient.SetHeaders(headers) +} + +// SetCookieJar sets custom http.CookieJar. See `Client.SetCookieJar` for more information. +func SetCookieJar(jar http.CookieJar) *Client { + return DefaultClient.SetCookieJar(jar) +} + +// SetCookie sets single cookie object. See `Client.SetCookie` for more information. +func SetCookie(hc *http.Cookie) *Client { + return DefaultClient.SetCookie(hc) +} + +// SetCookies sets multiple cookie object. See `Client.SetCookies` for more information. +func SetCookies(cs []*http.Cookie) *Client { + return DefaultClient.SetCookies(cs) +} + +// SetQueryParam method sets single parameter and its value. See `Client.SetQueryParam` for more information. +func SetQueryParam(param, value string) *Client { + return DefaultClient.SetQueryParam(param, value) +} + +// SetQueryParams method sets multiple parameters and its value. See `Client.SetQueryParams` for more information. +func SetQueryParams(params map[string]string) *Client { + return DefaultClient.SetQueryParams(params) +} + +// SetFormData method sets Form parameters and its values. See `Client.SetFormData` for more information. +func SetFormData(data map[string]string) *Client { + return DefaultClient.SetFormData(data) +} + +// SetBasicAuth method sets the basic authentication header. See `Client.SetBasicAuth` for more information. +func SetBasicAuth(username, password string) *Client { + return DefaultClient.SetBasicAuth(username, password) +} + +// SetAuthToken method sets bearer auth token header. See `Client.SetAuthToken` for more information. +func SetAuthToken(token string) *Client { + return DefaultClient.SetAuthToken(token) +} + +// OnBeforeRequest method sets request middleware. See `Client.OnBeforeRequest` for more information. +func OnBeforeRequest(m func(*Client, *Request) error) *Client { + return DefaultClient.OnBeforeRequest(m) +} + +// OnAfterResponse method sets response middleware. See `Client.OnAfterResponse` for more information. +func OnAfterResponse(m func(*Client, *Response) error) *Client { + return DefaultClient.OnAfterResponse(m) +} + +// SetPreRequestHook method sets the pre-request hook. See `Client.SetPreRequestHook` for more information. +func SetPreRequestHook(h func(*Client, *Request) error) *Client { + return DefaultClient.SetPreRequestHook(h) +} + +// SetDebug method enables the debug mode. See `Client.SetDebug` for more information. +func SetDebug(d bool) *Client { + return DefaultClient.SetDebug(d) +} + +// SetDebugBodyLimit method sets the response body limit for debug mode. See `Client.SetDebugBodyLimit` for more information. +func SetDebugBodyLimit(sl int64) *Client { + return DefaultClient.SetDebugBodyLimit(sl) +} + +// SetAllowGetMethodPayload method allows the GET method with payload. See `Client.SetAllowGetMethodPayload` for more information. +func SetAllowGetMethodPayload(a bool) *Client { + return DefaultClient.SetAllowGetMethodPayload(a) +} + +// SetRetryCount method sets the retry count. See `Client.SetRetryCount` for more information. +func SetRetryCount(count int) *Client { + return DefaultClient.SetRetryCount(count) +} + +// SetRetryWaitTime method sets the retry wait time. See `Client.SetRetryWaitTime` for more information. +func SetRetryWaitTime(waitTime time.Duration) *Client { + return DefaultClient.SetRetryWaitTime(waitTime) +} + +// SetRetryMaxWaitTime method sets the retry max wait time. See `Client.SetRetryMaxWaitTime` for more information. +func SetRetryMaxWaitTime(maxWaitTime time.Duration) *Client { + return DefaultClient.SetRetryMaxWaitTime(maxWaitTime) +} + +// AddRetryCondition method appends check function for retry. See `Client.AddRetryCondition` for more information. +func AddRetryCondition(condition RetryConditionFunc) *Client { + return DefaultClient.AddRetryCondition(condition) +} + +// SetDisableWarn method disables warning comes from `go-resty` client. See `Client.SetDisableWarn` for more information. +func SetDisableWarn(d bool) *Client { + return DefaultClient.SetDisableWarn(d) +} + +// SetLogger method sets given writer for logging. See `Client.SetLogger` for more information. +func SetLogger(w io.Writer) *Client { + return DefaultClient.SetLogger(w) +} + +// SetContentLength method enables `Content-Length` value. See `Client.SetContentLength` for more information. +func SetContentLength(l bool) *Client { + return DefaultClient.SetContentLength(l) +} + +// SetError method is to register the global or client common `Error` object. See `Client.SetError` for more information. +func SetError(err interface{}) *Client { + return DefaultClient.SetError(err) +} + +// SetRedirectPolicy method sets the client redirect poilicy. See `Client.SetRedirectPolicy` for more information. +func SetRedirectPolicy(policies ...interface{}) *Client { + return DefaultClient.SetRedirectPolicy(policies...) +} + +// SetHTTPMode method sets go-resty mode into HTTP. See `Client.SetMode` for more information. +func SetHTTPMode() *Client { + return DefaultClient.SetHTTPMode() +} + +// SetRESTMode method sets go-resty mode into RESTful. See `Client.SetMode` for more information. +func SetRESTMode() *Client { + return DefaultClient.SetRESTMode() +} + +// Mode method returns the current client mode. See `Client.Mode` for more information. +func Mode() string { + return DefaultClient.Mode() +} + +// SetTLSClientConfig method sets TLSClientConfig for underling client Transport. See `Client.SetTLSClientConfig` for more information. +func SetTLSClientConfig(config *tls.Config) *Client { + return DefaultClient.SetTLSClientConfig(config) +} + +// SetTimeout method sets timeout for request. See `Client.SetTimeout` for more information. +func SetTimeout(timeout time.Duration) *Client { + return DefaultClient.SetTimeout(timeout) +} + +// SetProxy method sets Proxy for request. See `Client.SetProxy` for more information. +func SetProxy(proxyURL string) *Client { + return DefaultClient.SetProxy(proxyURL) +} + +// RemoveProxy method removes the proxy configuration. See `Client.RemoveProxy` for more information. +func RemoveProxy() *Client { + return DefaultClient.RemoveProxy() +} + +// SetCertificates method helps to set client certificates into resty conveniently. +// See `Client.SetCertificates` for more information and example. +func SetCertificates(certs ...tls.Certificate) *Client { + return DefaultClient.SetCertificates(certs...) +} + +// SetRootCertificate method helps to add one or more root certificates into resty client. +// See `Client.SetRootCertificate` for more information. +func SetRootCertificate(pemFilePath string) *Client { + return DefaultClient.SetRootCertificate(pemFilePath) +} + +// SetOutputDirectory method sets output directory. See `Client.SetOutputDirectory` for more information. +func SetOutputDirectory(dirPath string) *Client { + return DefaultClient.SetOutputDirectory(dirPath) +} + +// SetTransport method sets custom `*http.Transport` or any `http.RoundTripper` +// compatible interface implementation in the resty client. +// See `Client.SetTransport` for more information. +func SetTransport(transport http.RoundTripper) *Client { + return DefaultClient.SetTransport(transport) +} + +// SetScheme method sets custom scheme in the resty client. +// See `Client.SetScheme` for more information. +func SetScheme(scheme string) *Client { + return DefaultClient.SetScheme(scheme) +} + +// SetCloseConnection method sets close connection value in the resty client. +// See `Client.SetCloseConnection` for more information. +func SetCloseConnection(close bool) *Client { + return DefaultClient.SetCloseConnection(close) +} + +// SetDoNotParseResponse method instructs `Resty` not to parse the response body automatically. +// See `Client.SetDoNotParseResponse` for more information. +func SetDoNotParseResponse(parse bool) *Client { + return DefaultClient.SetDoNotParseResponse(parse) +} + +// SetPathParams method sets the Request path parameter key-value pairs. See +// `Client.SetPathParams` for more information. +func SetPathParams(params map[string]string) *Client { + return DefaultClient.SetPathParams(params) +} + +// IsProxySet method returns the true if proxy is set on client otherwise false. +// See `Client.IsProxySet` for more information. +func IsProxySet() bool { + return DefaultClient.IsProxySet() +} + +// GetClient method returns the current `http.Client` used by the default resty client. +func GetClient() *http.Client { + return DefaultClient.httpClient +} + +//‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +// Unexported methods +//___________________________________ + +func createClient(hc *http.Client) *Client { + c := &Client{ + HostURL: "", + QueryParam: url.Values{}, + FormData: url.Values{}, + Header: http.Header{}, + UserInfo: nil, + Token: "", + Cookies: make([]*http.Cookie, 0), + Debug: false, + Log: getLogger(os.Stderr), + RetryCount: 0, + RetryWaitTime: defaultWaitTime, + RetryMaxWaitTime: defaultMaxWaitTime, + JSONMarshal: json.Marshal, + JSONUnmarshal: json.Unmarshal, + jsonEscapeHTML: true, + httpClient: hc, + debugBodySizeLimit: math.MaxInt32, + pathParams: make(map[string]string), + } + + // Log Prefix + c.SetLogPrefix("RESTY ") + + // Default redirect policy + c.SetRedirectPolicy(NoRedirectPolicy()) + + // default before request middlewares + c.beforeRequest = []func(*Client, *Request) error{ + parseRequestURL, + parseRequestHeader, + parseRequestBody, + createHTTPRequest, + addCredentials, + } + + // user defined request middlewares + c.udBeforeRequest = []func(*Client, *Request) error{} + + // default after response middlewares + c.afterResponse = []func(*Client, *Response) error{ + responseLogger, + parseResponseBody, + saveResponseIntoFile, + } + + return c +} + +func init() { + DefaultClient = New() +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/go.mod b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/go.mod new file mode 100644 index 000000000..61341be87 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/go.mod @@ -0,0 +1,3 @@ +module gopkg.in/resty.v1 + +require golang.org/x/net v0.0.0-20181220203305-927f97764cc3 diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/middleware.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/middleware.go new file mode 100644 index 000000000..9b6f102ed --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/middleware.go @@ -0,0 +1,469 @@ +// Copyright (c) 2015-2019 Jeevanandam M (jeeva@myjeeva.com), All rights reserved. +// resty source code and usage is governed by a MIT style +// license that can be found in the LICENSE file. + +package resty + +import ( + "bytes" + "encoding/xml" + "errors" + "fmt" + "io" + "mime/multipart" + "net/http" + "net/url" + "os" + "path/filepath" + "reflect" + "strings" + "time" +) + +//‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +// Request Middleware(s) +//___________________________________ + +func parseRequestURL(c *Client, r *Request) error { + // GitHub #103 Path Params + if len(r.pathParams) > 0 { + for p, v := range r.pathParams { + r.URL = strings.Replace(r.URL, "{"+p+"}", url.PathEscape(v), -1) + } + } + if len(c.pathParams) > 0 { + for p, v := range c.pathParams { + r.URL = strings.Replace(r.URL, "{"+p+"}", url.PathEscape(v), -1) + } + } + + // Parsing request URL + reqURL, err := url.Parse(r.URL) + if err != nil { + return err + } + + // If Request.URL is relative path then added c.HostURL into + // the request URL otherwise Request.URL will be used as-is + if !reqURL.IsAbs() { + r.URL = reqURL.String() + if len(r.URL) > 0 && r.URL[0] != '/' { + r.URL = "/" + r.URL + } + + reqURL, err = url.Parse(c.HostURL + r.URL) + if err != nil { + return err + } + } + + // Adding Query Param + query := make(url.Values) + for k, v := range c.QueryParam { + for _, iv := range v { + query.Add(k, iv) + } + } + + for k, v := range r.QueryParam { + // remove query param from client level by key + // since overrides happens for that key in the request + query.Del(k) + + for _, iv := range v { + query.Add(k, iv) + } + } + + // GitHub #123 Preserve query string order partially. + // Since not feasible in `SetQuery*` resty methods, because + // standard package `url.Encode(...)` sorts the query params + // alphabetically + if len(query) > 0 { + if IsStringEmpty(reqURL.RawQuery) { + reqURL.RawQuery = query.Encode() + } else { + reqURL.RawQuery = reqURL.RawQuery + "&" + query.Encode() + } + } + + r.URL = reqURL.String() + + return nil +} + +func parseRequestHeader(c *Client, r *Request) error { + hdr := make(http.Header) + for k := range c.Header { + hdr[k] = append(hdr[k], c.Header[k]...) + } + + for k := range r.Header { + hdr.Del(k) + hdr[k] = append(hdr[k], r.Header[k]...) + } + + if IsStringEmpty(hdr.Get(hdrUserAgentKey)) { + hdr.Set(hdrUserAgentKey, fmt.Sprintf(hdrUserAgentValue, Version)) + } + + ct := hdr.Get(hdrContentTypeKey) + if IsStringEmpty(hdr.Get(hdrAcceptKey)) && !IsStringEmpty(ct) && + (IsJSONType(ct) || IsXMLType(ct)) { + hdr.Set(hdrAcceptKey, hdr.Get(hdrContentTypeKey)) + } + + r.Header = hdr + + return nil +} + +func parseRequestBody(c *Client, r *Request) (err error) { + if isPayloadSupported(r.Method, c.AllowGetMethodPayload) { + // Handling Multipart + if r.isMultiPart && !(r.Method == MethodPatch) { + if err = handleMultipart(c, r); err != nil { + return + } + + goto CL + } + + // Handling Form Data + if len(c.FormData) > 0 || len(r.FormData) > 0 { + handleFormData(c, r) + + goto CL + } + + // Handling Request body + if r.Body != nil { + handleContentType(c, r) + + if err = handleRequestBody(c, r); err != nil { + return + } + } + } + +CL: + // by default resty won't set content length, you can if you want to :) + if (c.setContentLength || r.setContentLength) && r.bodyBuf != nil { + r.Header.Set(hdrContentLengthKey, fmt.Sprintf("%d", r.bodyBuf.Len())) + } + + return +} + +func createHTTPRequest(c *Client, r *Request) (err error) { + if r.bodyBuf == nil { + if reader, ok := r.Body.(io.Reader); ok { + r.RawRequest, err = http.NewRequest(r.Method, r.URL, reader) + } else { + r.RawRequest, err = http.NewRequest(r.Method, r.URL, nil) + } + } else { + r.RawRequest, err = http.NewRequest(r.Method, r.URL, r.bodyBuf) + } + + if err != nil { + return + } + + // Assign close connection option + r.RawRequest.Close = c.closeConnection + + // Add headers into http request + r.RawRequest.Header = r.Header + + // Add cookies into http request + for _, cookie := range c.Cookies { + r.RawRequest.AddCookie(cookie) + } + + // it's for non-http scheme option + if r.RawRequest.URL != nil && r.RawRequest.URL.Scheme == "" { + r.RawRequest.URL.Scheme = c.scheme + r.RawRequest.URL.Host = r.URL + } + + // Use context if it was specified + r.addContextIfAvailable() + + return +} + +func addCredentials(c *Client, r *Request) error { + var isBasicAuth bool + // Basic Auth + if r.UserInfo != nil { // takes precedence + r.RawRequest.SetBasicAuth(r.UserInfo.Username, r.UserInfo.Password) + isBasicAuth = true + } else if c.UserInfo != nil { + r.RawRequest.SetBasicAuth(c.UserInfo.Username, c.UserInfo.Password) + isBasicAuth = true + } + + if !c.DisableWarn { + if isBasicAuth && !strings.HasPrefix(r.URL, "https") { + c.Log.Println("WARNING - Using Basic Auth in HTTP mode is not secure.") + } + } + + // Token Auth + if !IsStringEmpty(r.Token) { // takes precedence + r.RawRequest.Header.Set(hdrAuthorizationKey, "Bearer "+r.Token) + } else if !IsStringEmpty(c.Token) { + r.RawRequest.Header.Set(hdrAuthorizationKey, "Bearer "+c.Token) + } + + return nil +} + +func requestLogger(c *Client, r *Request) error { + if c.Debug { + rr := r.RawRequest + rl := &RequestLog{Header: copyHeaders(rr.Header), Body: r.fmtBodyString()} + if c.requestLog != nil { + if err := c.requestLog(rl); err != nil { + return err + } + } + + reqLog := "\n---------------------- REQUEST LOG -----------------------\n" + + fmt.Sprintf("%s %s %s\n", r.Method, rr.URL.RequestURI(), rr.Proto) + + fmt.Sprintf("HOST : %s\n", rr.URL.Host) + + fmt.Sprintf("HEADERS:\n") + + composeHeaders(rl.Header) + "\n" + + fmt.Sprintf("BODY :\n%v\n", rl.Body) + + "----------------------------------------------------------\n" + + c.Log.Print(reqLog) + } + + return nil +} + +//‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +// Response Middleware(s) +//___________________________________ + +func responseLogger(c *Client, res *Response) error { + if c.Debug { + rl := &ResponseLog{Header: copyHeaders(res.Header()), Body: res.fmtBodyString(c.debugBodySizeLimit)} + if c.responseLog != nil { + if err := c.responseLog(rl); err != nil { + return err + } + } + + resLog := "\n---------------------- RESPONSE LOG -----------------------\n" + + fmt.Sprintf("STATUS : %s\n", res.Status()) + + fmt.Sprintf("RECEIVED AT : %v\n", res.ReceivedAt().Format(time.RFC3339Nano)) + + fmt.Sprintf("RESPONSE TIME : %v\n", res.Time()) + + "HEADERS:\n" + + composeHeaders(rl.Header) + "\n" + if res.Request.isSaveResponse { + resLog += fmt.Sprintf("BODY :\n***** RESPONSE WRITTEN INTO FILE *****\n") + } else { + resLog += fmt.Sprintf("BODY :\n%v\n", rl.Body) + } + resLog += "----------------------------------------------------------\n" + + c.Log.Print(resLog) + } + + return nil +} + +func parseResponseBody(c *Client, res *Response) (err error) { + if res.StatusCode() == http.StatusNoContent { + return + } + // Handles only JSON or XML content type + ct := firstNonEmpty(res.Header().Get(hdrContentTypeKey), res.Request.fallbackContentType) + if IsJSONType(ct) || IsXMLType(ct) { + // HTTP status code > 199 and < 300, considered as Result + if res.IsSuccess() { + if res.Request.Result != nil { + err = Unmarshalc(c, ct, res.body, res.Request.Result) + return + } + } + + // HTTP status code > 399, considered as Error + if res.IsError() { + // global error interface + if res.Request.Error == nil && c.Error != nil { + res.Request.Error = reflect.New(c.Error).Interface() + } + + if res.Request.Error != nil { + err = Unmarshalc(c, ct, res.body, res.Request.Error) + } + } + } + + return +} + +func handleMultipart(c *Client, r *Request) (err error) { + r.bodyBuf = acquireBuffer() + w := multipart.NewWriter(r.bodyBuf) + + for k, v := range c.FormData { + for _, iv := range v { + if err = w.WriteField(k, iv); err != nil { + return err + } + } + } + + for k, v := range r.FormData { + for _, iv := range v { + if strings.HasPrefix(k, "@") { // file + err = addFile(w, k[1:], iv) + if err != nil { + return + } + } else { // form value + if err = w.WriteField(k, iv); err != nil { + return err + } + } + } + } + + // #21 - adding io.Reader support + if len(r.multipartFiles) > 0 { + for _, f := range r.multipartFiles { + err = addFileReader(w, f) + if err != nil { + return + } + } + } + + // GitHub #130 adding multipart field support with content type + if len(r.multipartFields) > 0 { + for _, mf := range r.multipartFields { + if err = addMultipartFormField(w, mf); err != nil { + return + } + } + } + + r.Header.Set(hdrContentTypeKey, w.FormDataContentType()) + err = w.Close() + + return +} + +func handleFormData(c *Client, r *Request) { + formData := url.Values{} + + for k, v := range c.FormData { + for _, iv := range v { + formData.Add(k, iv) + } + } + + for k, v := range r.FormData { + // remove form data field from client level by key + // since overrides happens for that key in the request + formData.Del(k) + + for _, iv := range v { + formData.Add(k, iv) + } + } + + r.bodyBuf = bytes.NewBuffer([]byte(formData.Encode())) + r.Header.Set(hdrContentTypeKey, formContentType) + r.isFormData = true +} + +func handleContentType(c *Client, r *Request) { + contentType := r.Header.Get(hdrContentTypeKey) + if IsStringEmpty(contentType) { + contentType = DetectContentType(r.Body) + r.Header.Set(hdrContentTypeKey, contentType) + } +} + +func handleRequestBody(c *Client, r *Request) (err error) { + var bodyBytes []byte + contentType := r.Header.Get(hdrContentTypeKey) + kind := kindOf(r.Body) + r.bodyBuf = nil + + if reader, ok := r.Body.(io.Reader); ok { + if c.setContentLength || r.setContentLength { // keep backward compability + r.bodyBuf = acquireBuffer() + _, err = r.bodyBuf.ReadFrom(reader) + r.Body = nil + } else { + // Otherwise buffer less processing for `io.Reader`, sounds good. + return + } + } else if b, ok := r.Body.([]byte); ok { + bodyBytes = b + } else if s, ok := r.Body.(string); ok { + bodyBytes = []byte(s) + } else if IsJSONType(contentType) && + (kind == reflect.Struct || kind == reflect.Map || kind == reflect.Slice) { + bodyBytes, err = jsonMarshal(c, r, r.Body) + } else if IsXMLType(contentType) && (kind == reflect.Struct) { + bodyBytes, err = xml.Marshal(r.Body) + } + + if bodyBytes == nil && r.bodyBuf == nil { + err = errors.New("unsupported 'Body' type/value") + } + + // if any errors during body bytes handling, return it + if err != nil { + return + } + + // []byte into Buffer + if bodyBytes != nil && r.bodyBuf == nil { + r.bodyBuf = acquireBuffer() + _, _ = r.bodyBuf.Write(bodyBytes) + } + + return +} + +func saveResponseIntoFile(c *Client, res *Response) error { + if res.Request.isSaveResponse { + file := "" + + if len(c.outputDirectory) > 0 && !filepath.IsAbs(res.Request.outputFile) { + file += c.outputDirectory + string(filepath.Separator) + } + + file = filepath.Clean(file + res.Request.outputFile) + if err := createDirectory(filepath.Dir(file)); err != nil { + return err + } + + outFile, err := os.Create(file) + if err != nil { + return err + } + defer closeq(outFile) + + // io.Copy reads maximum 32kb size, it is perfect for large file download too + defer closeq(res.RawResponse.Body) + + written, err := io.Copy(outFile, res.RawResponse.Body) + if err != nil { + return err + } + + res.size = written + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/redirect.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/redirect.go new file mode 100644 index 000000000..b426134ad --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/redirect.go @@ -0,0 +1,99 @@ +// Copyright (c) 2015-2019 Jeevanandam M (jeeva@myjeeva.com), All rights reserved. +// resty source code and usage is governed by a MIT style +// license that can be found in the LICENSE file. + +package resty + +import ( + "errors" + "fmt" + "net" + "net/http" + "strings" +) + +type ( + // RedirectPolicy to regulate the redirects in the resty client. + // Objects implementing the RedirectPolicy interface can be registered as + // + // Apply function should return nil to continue the redirect jounery, otherwise + // return error to stop the redirect. + RedirectPolicy interface { + Apply(req *http.Request, via []*http.Request) error + } + + // The RedirectPolicyFunc type is an adapter to allow the use of ordinary functions as RedirectPolicy. + // If f is a function with the appropriate signature, RedirectPolicyFunc(f) is a RedirectPolicy object that calls f. + RedirectPolicyFunc func(*http.Request, []*http.Request) error +) + +// Apply calls f(req, via). +func (f RedirectPolicyFunc) Apply(req *http.Request, via []*http.Request) error { + return f(req, via) +} + +// NoRedirectPolicy is used to disable redirects in the HTTP client +// resty.SetRedirectPolicy(NoRedirectPolicy()) +func NoRedirectPolicy() RedirectPolicy { + return RedirectPolicyFunc(func(req *http.Request, via []*http.Request) error { + return errors.New("auto redirect is disabled") + }) +} + +// FlexibleRedirectPolicy is convenient method to create No of redirect policy for HTTP client. +// resty.SetRedirectPolicy(FlexibleRedirectPolicy(20)) +func FlexibleRedirectPolicy(noOfRedirect int) RedirectPolicy { + return RedirectPolicyFunc(func(req *http.Request, via []*http.Request) error { + if len(via) >= noOfRedirect { + return fmt.Errorf("stopped after %d redirects", noOfRedirect) + } + + checkHostAndAddHeaders(req, via[0]) + + return nil + }) +} + +// DomainCheckRedirectPolicy is convenient method to define domain name redirect rule in resty client. +// Redirect is allowed for only mentioned host in the policy. +// resty.SetRedirectPolicy(DomainCheckRedirectPolicy("host1.com", "host2.org", "host3.net")) +func DomainCheckRedirectPolicy(hostnames ...string) RedirectPolicy { + hosts := make(map[string]bool) + for _, h := range hostnames { + hosts[strings.ToLower(h)] = true + } + + fn := RedirectPolicyFunc(func(req *http.Request, via []*http.Request) error { + if ok := hosts[getHostname(req.URL.Host)]; !ok { + return errors.New("redirect is not allowed as per DomainCheckRedirectPolicy") + } + + return nil + }) + + return fn +} + +func getHostname(host string) (hostname string) { + if strings.Index(host, ":") > 0 { + host, _, _ = net.SplitHostPort(host) + } + hostname = strings.ToLower(host) + return +} + +// By default Golang will not redirect request headers +// after go throughing various discussion comments from thread +// https://github.com/golang/go/issues/4800 +// go-resty will add all the headers during a redirect for the same host +func checkHostAndAddHeaders(cur *http.Request, pre *http.Request) { + curHostname := getHostname(cur.URL.Host) + preHostname := getHostname(pre.URL.Host) + if strings.EqualFold(curHostname, preHostname) { + for key, val := range pre.Header { + cur.Header[key] = val + } + } else { // only library User-Agent header is added + cur.Header.Set(hdrUserAgentKey, fmt.Sprintf(hdrUserAgentValue, Version)) + } +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/request.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/request.go new file mode 100644 index 000000000..c6adff3dd --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/request.go @@ -0,0 +1,586 @@ +// Copyright (c) 2015-2019 Jeevanandam M (jeeva@myjeeva.com), All rights reserved. +// resty source code and usage is governed by a MIT style +// license that can be found in the LICENSE file. + +package resty + +import ( + "encoding/base64" + "encoding/json" + "encoding/xml" + "fmt" + "io" + "net" + "net/url" + "reflect" + "strings" +) + +// SRVRecord holds the data to query the SRV record for the following service +type SRVRecord struct { + Service string + Domain string +} + +// SetHeader method is to set a single header field and its value in the current request. +// Example: To set `Content-Type` and `Accept` as `application/json`. +// resty.R(). +// SetHeader("Content-Type", "application/json"). +// SetHeader("Accept", "application/json") +// +// Also you can override header value, which was set at client instance level. +// +func (r *Request) SetHeader(header, value string) *Request { + r.Header.Set(header, value) + return r +} + +// SetHeaders method sets multiple headers field and its values at one go in the current request. +// Example: To set `Content-Type` and `Accept` as `application/json` +// +// resty.R(). +// SetHeaders(map[string]string{ +// "Content-Type": "application/json", +// "Accept": "application/json", +// }) +// Also you can override header value, which was set at client instance level. +// +func (r *Request) SetHeaders(headers map[string]string) *Request { + for h, v := range headers { + r.SetHeader(h, v) + } + + return r +} + +// SetQueryParam method sets single parameter and its value in the current request. +// It will be formed as query string for the request. +// Example: `search=kitchen%20papers&size=large` in the URL after `?` mark. +// resty.R(). +// SetQueryParam("search", "kitchen papers"). +// SetQueryParam("size", "large") +// Also you can override query params value, which was set at client instance level +// +func (r *Request) SetQueryParam(param, value string) *Request { + r.QueryParam.Set(param, value) + return r +} + +// SetQueryParams method sets multiple parameters and its values at one go in the current request. +// It will be formed as query string for the request. +// Example: `search=kitchen%20papers&size=large` in the URL after `?` mark. +// resty.R(). +// SetQueryParams(map[string]string{ +// "search": "kitchen papers", +// "size": "large", +// }) +// Also you can override query params value, which was set at client instance level +// +func (r *Request) SetQueryParams(params map[string]string) *Request { + for p, v := range params { + r.SetQueryParam(p, v) + } + + return r +} + +// SetMultiValueQueryParams method appends multiple parameters with multi-value +// at one go in the current request. It will be formed as query string for the request. +// Example: `status=pending&status=approved&status=open` in the URL after `?` mark. +// resty.R(). +// SetMultiValueQueryParams(url.Values{ +// "status": []string{"pending", "approved", "open"}, +// }) +// Also you can override query params value, which was set at client instance level +// +func (r *Request) SetMultiValueQueryParams(params url.Values) *Request { + for p, v := range params { + for _, pv := range v { + r.QueryParam.Add(p, pv) + } + } + + return r +} + +// SetQueryString method provides ability to use string as an input to set URL query string for the request. +// +// Using String as an input +// resty.R(). +// SetQueryString("productId=232&template=fresh-sample&cat=resty&source=google&kw=buy a lot more") +// +func (r *Request) SetQueryString(query string) *Request { + params, err := url.ParseQuery(strings.TrimSpace(query)) + if err == nil { + for p, v := range params { + for _, pv := range v { + r.QueryParam.Add(p, pv) + } + } + } else { + r.client.Log.Printf("ERROR %v", err) + } + return r +} + +// SetFormData method sets Form parameters and their values in the current request. +// It's applicable only HTTP method `POST` and `PUT` and requests content type would be set as +// `application/x-www-form-urlencoded`. +// resty.R(). +// SetFormData(map[string]string{ +// "access_token": "BC594900-518B-4F7E-AC75-BD37F019E08F", +// "user_id": "3455454545", +// }) +// Also you can override form data value, which was set at client instance level +// +func (r *Request) SetFormData(data map[string]string) *Request { + for k, v := range data { + r.FormData.Set(k, v) + } + + return r +} + +// SetMultiValueFormData method appends multiple form parameters with multi-value +// at one go in the current request. +// resty.R(). +// SetMultiValueFormData(url.Values{ +// "search_criteria": []string{"book", "glass", "pencil"}, +// }) +// Also you can override form data value, which was set at client instance level +// +func (r *Request) SetMultiValueFormData(params url.Values) *Request { + for k, v := range params { + for _, kv := range v { + r.FormData.Add(k, kv) + } + } + + return r +} + +// SetBody method sets the request body for the request. It supports various realtime needs as easy. +// We can say its quite handy or powerful. Supported request body data types is `string`, +// `[]byte`, `struct`, `map`, `slice` and `io.Reader`. Body value can be pointer or non-pointer. +// Automatic marshalling for JSON and XML content type, if it is `struct`, `map`, or `slice`. +// +// Note: `io.Reader` is processed as bufferless mode while sending request. +// +// Example: +// +// Struct as a body input, based on content type, it will be marshalled. +// resty.R(). +// SetBody(User{ +// Username: "jeeva@myjeeva.com", +// Password: "welcome2resty", +// }) +// +// Map as a body input, based on content type, it will be marshalled. +// resty.R(). +// SetBody(map[string]interface{}{ +// "username": "jeeva@myjeeva.com", +// "password": "welcome2resty", +// "address": &Address{ +// Address1: "1111 This is my street", +// Address2: "Apt 201", +// City: "My City", +// State: "My State", +// ZipCode: 00000, +// }, +// }) +// +// String as a body input. Suitable for any need as a string input. +// resty.R(). +// SetBody(`{ +// "username": "jeeva@getrightcare.com", +// "password": "admin" +// }`) +// +// []byte as a body input. Suitable for raw request such as file upload, serialize & deserialize, etc. +// resty.R(). +// SetBody([]byte("This is my raw request, sent as-is")) +// +func (r *Request) SetBody(body interface{}) *Request { + r.Body = body + return r +} + +// SetResult method is to register the response `Result` object for automatic unmarshalling in the RESTful mode +// if response status code is between 200 and 299 and content type either JSON or XML. +// +// Note: Result object can be pointer or non-pointer. +// resty.R().SetResult(&AuthToken{}) +// // OR +// resty.R().SetResult(AuthToken{}) +// +// Accessing a result value +// response.Result().(*AuthToken) +// +func (r *Request) SetResult(res interface{}) *Request { + r.Result = getPointer(res) + return r +} + +// SetError method is to register the request `Error` object for automatic unmarshalling in the RESTful mode +// if response status code is greater than 399 and content type either JSON or XML. +// +// Note: Error object can be pointer or non-pointer. +// resty.R().SetError(&AuthError{}) +// // OR +// resty.R().SetError(AuthError{}) +// +// Accessing a error value +// response.Error().(*AuthError) +// +func (r *Request) SetError(err interface{}) *Request { + r.Error = getPointer(err) + return r +} + +// SetFile method is to set single file field name and its path for multipart upload. +// resty.R(). +// SetFile("my_file", "/Users/jeeva/Gas Bill - Sep.pdf") +// +func (r *Request) SetFile(param, filePath string) *Request { + r.isMultiPart = true + r.FormData.Set("@"+param, filePath) + return r +} + +// SetFiles method is to set multiple file field name and its path for multipart upload. +// resty.R(). +// SetFiles(map[string]string{ +// "my_file1": "/Users/jeeva/Gas Bill - Sep.pdf", +// "my_file2": "/Users/jeeva/Electricity Bill - Sep.pdf", +// "my_file3": "/Users/jeeva/Water Bill - Sep.pdf", +// }) +// +func (r *Request) SetFiles(files map[string]string) *Request { + r.isMultiPart = true + + for f, fp := range files { + r.FormData.Set("@"+f, fp) + } + + return r +} + +// SetFileReader method is to set single file using io.Reader for multipart upload. +// resty.R(). +// SetFileReader("profile_img", "my-profile-img.png", bytes.NewReader(profileImgBytes)). +// SetFileReader("notes", "user-notes.txt", bytes.NewReader(notesBytes)) +// +func (r *Request) SetFileReader(param, fileName string, reader io.Reader) *Request { + r.isMultiPart = true + r.multipartFiles = append(r.multipartFiles, &File{ + Name: fileName, + ParamName: param, + Reader: reader, + }) + return r +} + +// SetMultipartField method is to set custom data using io.Reader for multipart upload. +func (r *Request) SetMultipartField(param, fileName, contentType string, reader io.Reader) *Request { + r.isMultiPart = true + r.multipartFields = append(r.multipartFields, &MultipartField{ + Param: param, + FileName: fileName, + ContentType: contentType, + Reader: reader, + }) + return r +} + +// SetMultipartFields method is to set multiple data fields using io.Reader for multipart upload. +// Example: +// resty.R().SetMultipartFields( +// &resty.MultipartField{ +// Param: "uploadManifest1", +// FileName: "upload-file-1.json", +// ContentType: "application/json", +// Reader: strings.NewReader(`{"input": {"name": "Uploaded document 1", "_filename" : ["file1.txt"]}}`), +// }, +// &resty.MultipartField{ +// Param: "uploadManifest2", +// FileName: "upload-file-2.json", +// ContentType: "application/json", +// Reader: strings.NewReader(`{"input": {"name": "Uploaded document 2", "_filename" : ["file2.txt"]}}`), +// }) +// +// If you have slice already, then simply call- +// resty.R().SetMultipartFields(fields...) +func (r *Request) SetMultipartFields(fields ...*MultipartField) *Request { + r.isMultiPart = true + r.multipartFields = append(r.multipartFields, fields...) + return r +} + +// SetContentLength method sets the HTTP header `Content-Length` value for current request. +// By default go-resty won't set `Content-Length`. Also you have an option to enable for every +// request. See `resty.SetContentLength` +// resty.R().SetContentLength(true) +// +func (r *Request) SetContentLength(l bool) *Request { + r.setContentLength = true + return r +} + +// SetBasicAuth method sets the basic authentication header in the current HTTP request. +// For Header example: +// Authorization: Basic +// +// To set the header for username "go-resty" and password "welcome" +// resty.R().SetBasicAuth("go-resty", "welcome") +// +// This method overrides the credentials set by method `resty.SetBasicAuth`. +// +func (r *Request) SetBasicAuth(username, password string) *Request { + r.UserInfo = &User{Username: username, Password: password} + return r +} + +// SetAuthToken method sets bearer auth token header in the current HTTP request. Header example: +// Authorization: Bearer +// +// Example: To set auth token BC594900518B4F7EAC75BD37F019E08FBC594900518B4F7EAC75BD37F019E08F +// +// resty.R().SetAuthToken("BC594900518B4F7EAC75BD37F019E08FBC594900518B4F7EAC75BD37F019E08F") +// +// This method overrides the Auth token set by method `resty.SetAuthToken`. +// +func (r *Request) SetAuthToken(token string) *Request { + r.Token = token + return r +} + +// SetOutput method sets the output file for current HTTP request. Current HTTP response will be +// saved into given file. It is similar to `curl -o` flag. Absolute path or relative path can be used. +// If is it relative path then output file goes under the output directory, as mentioned +// in the `Client.SetOutputDirectory`. +// resty.R(). +// SetOutput("/Users/jeeva/Downloads/ReplyWithHeader-v5.1-beta.zip"). +// Get("http://bit.ly/1LouEKr") +// +// Note: In this scenario `Response.Body` might be nil. +func (r *Request) SetOutput(file string) *Request { + r.outputFile = file + r.isSaveResponse = true + return r +} + +// SetSRV method sets the details to query the service SRV record and execute the +// request. +// resty.R(). +// SetSRV(SRVRecord{"web", "testservice.com"}). +// Get("/get") +func (r *Request) SetSRV(srv *SRVRecord) *Request { + r.SRV = srv + return r +} + +// SetDoNotParseResponse method instructs `Resty` not to parse the response body automatically. +// Resty exposes the raw response body as `io.ReadCloser`. Also do not forget to close the body, +// otherwise you might get into connection leaks, no connection reuse. +// +// Please Note: Response middlewares are not applicable, if you use this option. Basically you have +// taken over the control of response parsing from `Resty`. +func (r *Request) SetDoNotParseResponse(parse bool) *Request { + r.notParseResponse = parse + return r +} + +// SetPathParams method sets multiple URL path key-value pairs at one go in the +// resty current request instance. +// resty.R().SetPathParams(map[string]string{ +// "userId": "sample@sample.com", +// "subAccountId": "100002", +// }) +// +// Result: +// URL - /v1/users/{userId}/{subAccountId}/details +// Composed URL - /v1/users/sample@sample.com/100002/details +// It replace the value of the key while composing request URL. Also you can +// override Path Params value, which was set at client instance level. +func (r *Request) SetPathParams(params map[string]string) *Request { + for p, v := range params { + r.pathParams[p] = v + } + return r +} + +// ExpectContentType method allows to provide fallback `Content-Type` for automatic unmarshalling +// when `Content-Type` response header is unavailable. +func (r *Request) ExpectContentType(contentType string) *Request { + r.fallbackContentType = contentType + return r +} + +// SetJSONEscapeHTML method is to enable/disable the HTML escape on JSON marshal. +// +// NOTE: This option only applicable to standard JSON Marshaller. +func (r *Request) SetJSONEscapeHTML(b bool) *Request { + r.jsonEscapeHTML = b + return r +} + +//‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +// HTTP verb method starts here +//___________________________________ + +// Get method does GET HTTP request. It's defined in section 4.3.1 of RFC7231. +func (r *Request) Get(url string) (*Response, error) { + return r.Execute(MethodGet, url) +} + +// Head method does HEAD HTTP request. It's defined in section 4.3.2 of RFC7231. +func (r *Request) Head(url string) (*Response, error) { + return r.Execute(MethodHead, url) +} + +// Post method does POST HTTP request. It's defined in section 4.3.3 of RFC7231. +func (r *Request) Post(url string) (*Response, error) { + return r.Execute(MethodPost, url) +} + +// Put method does PUT HTTP request. It's defined in section 4.3.4 of RFC7231. +func (r *Request) Put(url string) (*Response, error) { + return r.Execute(MethodPut, url) +} + +// Delete method does DELETE HTTP request. It's defined in section 4.3.5 of RFC7231. +func (r *Request) Delete(url string) (*Response, error) { + return r.Execute(MethodDelete, url) +} + +// Options method does OPTIONS HTTP request. It's defined in section 4.3.7 of RFC7231. +func (r *Request) Options(url string) (*Response, error) { + return r.Execute(MethodOptions, url) +} + +// Patch method does PATCH HTTP request. It's defined in section 2 of RFC5789. +func (r *Request) Patch(url string) (*Response, error) { + return r.Execute(MethodPatch, url) +} + +// Execute method performs the HTTP request with given HTTP method and URL +// for current `Request`. +// resp, err := resty.R().Execute(resty.GET, "http://httpbin.org/get") +// +func (r *Request) Execute(method, url string) (*Response, error) { + var addrs []*net.SRV + var err error + + if r.isMultiPart && !(method == MethodPost || method == MethodPut) { + return nil, fmt.Errorf("multipart content is not allowed in HTTP verb [%v]", method) + } + + if r.SRV != nil { + _, addrs, err = net.LookupSRV(r.SRV.Service, "tcp", r.SRV.Domain) + if err != nil { + return nil, err + } + } + + r.Method = method + r.URL = r.selectAddr(addrs, url, 0) + + if r.client.RetryCount == 0 { + return r.client.execute(r) + } + + var resp *Response + attempt := 0 + _ = Backoff( + func() (*Response, error) { + attempt++ + + r.URL = r.selectAddr(addrs, url, attempt) + + resp, err = r.client.execute(r) + if err != nil { + r.client.Log.Printf("ERROR %v, Attempt %v", err, attempt) + if r.isContextCancelledIfAvailable() { + // stop Backoff from retrying request if request has been + // canceled by context + return resp, nil + } + } + + return resp, err + }, + Retries(r.client.RetryCount), + WaitTime(r.client.RetryWaitTime), + MaxWaitTime(r.client.RetryMaxWaitTime), + RetryConditions(r.client.RetryConditions), + ) + + return resp, err +} + +//‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +// Request Unexported methods +//___________________________________ + +func (r *Request) fmtBodyString() (body string) { + body = "***** NO CONTENT *****" + if isPayloadSupported(r.Method, r.client.AllowGetMethodPayload) { + if _, ok := r.Body.(io.Reader); ok { + body = "***** BODY IS io.Reader *****" + return + } + + // multipart or form-data + if r.isMultiPart || r.isFormData { + body = r.bodyBuf.String() + return + } + + // request body data + if r.Body == nil { + return + } + var prtBodyBytes []byte + var err error + + contentType := r.Header.Get(hdrContentTypeKey) + kind := kindOf(r.Body) + if canJSONMarshal(contentType, kind) { + prtBodyBytes, err = json.MarshalIndent(&r.Body, "", " ") + } else if IsXMLType(contentType) && (kind == reflect.Struct) { + prtBodyBytes, err = xml.MarshalIndent(&r.Body, "", " ") + } else if b, ok := r.Body.(string); ok { + if IsJSONType(contentType) { + bodyBytes := []byte(b) + out := acquireBuffer() + defer releaseBuffer(out) + if err = json.Indent(out, bodyBytes, "", " "); err == nil { + prtBodyBytes = out.Bytes() + } + } else { + body = b + return + } + } else if b, ok := r.Body.([]byte); ok { + body = base64.StdEncoding.EncodeToString(b) + } + + if prtBodyBytes != nil && err == nil { + body = string(prtBodyBytes) + } + } + + return +} + +func (r *Request) selectAddr(addrs []*net.SRV, path string, attempt int) string { + if addrs == nil { + return path + } + + idx := attempt % len(addrs) + domain := strings.TrimRight(addrs[idx].Target, ".") + path = strings.TrimLeft(path, "/") + + return fmt.Sprintf("%s://%s:%d/%s", r.client.scheme, domain, addrs[idx].Port, path) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/request16.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/request16.go new file mode 100644 index 000000000..079ecfca7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/request16.go @@ -0,0 +1,63 @@ +// +build !go1.7 + +// Copyright (c) 2015-2019 Jeevanandam M (jeeva@myjeeva.com) +// 2016 Andrew Grigorev (https://github.com/ei-grad) +// All rights reserved. +// resty source code and usage is governed by a MIT style +// license that can be found in the LICENSE file. + +package resty + +import ( + "bytes" + "encoding/json" + "net/http" + "net/url" + "time" +) + +// Request type is used to compose and send individual request from client +// go-resty is provide option override client level settings such as +// Auth Token, Basic Auth credentials, Header, Query Param, Form Data, Error object +// and also you can add more options for that particular request +type Request struct { + URL string + Method string + Token string + QueryParam url.Values + FormData url.Values + Header http.Header + Time time.Time + Body interface{} + Result interface{} + Error interface{} + RawRequest *http.Request + SRV *SRVRecord + UserInfo *User + + isMultiPart bool + isFormData bool + setContentLength bool + isSaveResponse bool + notParseResponse bool + jsonEscapeHTML bool + outputFile string + fallbackContentType string + pathParams map[string]string + client *Client + bodyBuf *bytes.Buffer + multipartFiles []*File + multipartFields []*MultipartField +} + +func (r *Request) addContextIfAvailable() { + // nothing to do for golang<1.7 +} + +func (r *Request) isContextCancelledIfAvailable() bool { + // just always return false golang<1.7 + return false +} + +// for !go1.7 +var noescapeJSONMarshal = json.Marshal diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/request17.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/request17.go new file mode 100644 index 000000000..0629a114c --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/request17.go @@ -0,0 +1,96 @@ +// +build go1.7 go1.8 + +// Copyright (c) 2015-2019 Jeevanandam M (jeeva@myjeeva.com) +// 2016 Andrew Grigorev (https://github.com/ei-grad) +// All rights reserved. +// resty source code and usage is governed by a MIT style +// license that can be found in the LICENSE file. + +package resty + +import ( + "bytes" + "context" + "encoding/json" + "net/http" + "net/url" + "time" +) + +// Request type is used to compose and send individual request from client +// go-resty is provide option override client level settings such as +// Auth Token, Basic Auth credentials, Header, Query Param, Form Data, Error object +// and also you can add more options for that particular request +type Request struct { + URL string + Method string + Token string + QueryParam url.Values + FormData url.Values + Header http.Header + Time time.Time + Body interface{} + Result interface{} + Error interface{} + RawRequest *http.Request + SRV *SRVRecord + UserInfo *User + + isMultiPart bool + isFormData bool + setContentLength bool + isSaveResponse bool + notParseResponse bool + jsonEscapeHTML bool + outputFile string + fallbackContentType string + ctx context.Context + pathParams map[string]string + client *Client + bodyBuf *bytes.Buffer + multipartFiles []*File + multipartFields []*MultipartField +} + +// Context method returns the Context if its already set in request +// otherwise it creates new one using `context.Background()`. +func (r *Request) Context() context.Context { + if r.ctx == nil { + return context.Background() + } + return r.ctx +} + +// SetContext method sets the context.Context for current Request. It allows +// to interrupt the request execution if ctx.Done() channel is closed. +// See https://blog.golang.org/context article and the "context" package +// documentation. +func (r *Request) SetContext(ctx context.Context) *Request { + r.ctx = ctx + return r +} + +func (r *Request) addContextIfAvailable() { + if r.ctx != nil { + r.RawRequest = r.RawRequest.WithContext(r.ctx) + } +} + +func (r *Request) isContextCancelledIfAvailable() bool { + if r.ctx != nil { + if r.ctx.Err() != nil { + return true + } + } + return false +} + +// for go1.7+ +var noescapeJSONMarshal = func(v interface{}) ([]byte, error) { + buf := acquireBuffer() + defer releaseBuffer(buf) + encoder := json.NewEncoder(buf) + encoder.SetEscapeHTML(false) + err := encoder.Encode(v) + return buf.Bytes(), err +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/response.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/response.go new file mode 100644 index 000000000..ea2a027a5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/response.go @@ -0,0 +1,150 @@ +// Copyright (c) 2015-2019 Jeevanandam M (jeeva@myjeeva.com), All rights reserved. +// resty source code and usage is governed by a MIT style +// license that can be found in the LICENSE file. + +package resty + +import ( + "encoding/json" + "fmt" + "io" + "net/http" + "strings" + "time" +) + +// Response is an object represents executed request and its values. +type Response struct { + Request *Request + RawResponse *http.Response + + body []byte + size int64 + receivedAt time.Time +} + +// Body method returns HTTP response as []byte array for the executed request. +// Note: `Response.Body` might be nil, if `Request.SetOutput` is used. +func (r *Response) Body() []byte { + if r.RawResponse == nil { + return []byte{} + } + return r.body +} + +// Status method returns the HTTP status string for the executed request. +// Example: 200 OK +func (r *Response) Status() string { + if r.RawResponse == nil { + return "" + } + + return r.RawResponse.Status +} + +// StatusCode method returns the HTTP status code for the executed request. +// Example: 200 +func (r *Response) StatusCode() int { + if r.RawResponse == nil { + return 0 + } + + return r.RawResponse.StatusCode +} + +// Result method returns the response value as an object if it has one +func (r *Response) Result() interface{} { + return r.Request.Result +} + +// Error method returns the error object if it has one +func (r *Response) Error() interface{} { + return r.Request.Error +} + +// Header method returns the response headers +func (r *Response) Header() http.Header { + if r.RawResponse == nil { + return http.Header{} + } + + return r.RawResponse.Header +} + +// Cookies method to access all the response cookies +func (r *Response) Cookies() []*http.Cookie { + if r.RawResponse == nil { + return make([]*http.Cookie, 0) + } + + return r.RawResponse.Cookies() +} + +// String method returns the body of the server response as String. +func (r *Response) String() string { + if r.body == nil { + return "" + } + + return strings.TrimSpace(string(r.body)) +} + +// Time method returns the time of HTTP response time that from request we sent and received a request. +// See `response.ReceivedAt` to know when client recevied response and see `response.Request.Time` to know +// when client sent a request. +func (r *Response) Time() time.Duration { + return r.receivedAt.Sub(r.Request.Time) +} + +// ReceivedAt method returns when response got recevied from server for the request. +func (r *Response) ReceivedAt() time.Time { + return r.receivedAt +} + +// Size method returns the HTTP response size in bytes. Ya, you can relay on HTTP `Content-Length` header, +// however it won't be good for chucked transfer/compressed response. Since Resty calculates response size +// at the client end. You will get actual size of the http response. +func (r *Response) Size() int64 { + return r.size +} + +// RawBody method exposes the HTTP raw response body. Use this method in-conjunction with `SetDoNotParseResponse` +// option otherwise you get an error as `read err: http: read on closed response body`. +// +// Do not forget to close the body, otherwise you might get into connection leaks, no connection reuse. +// Basically you have taken over the control of response parsing from `Resty`. +func (r *Response) RawBody() io.ReadCloser { + if r.RawResponse == nil { + return nil + } + return r.RawResponse.Body +} + +// IsSuccess method returns true if HTTP status code >= 200 and <= 299 otherwise false. +func (r *Response) IsSuccess() bool { + return r.StatusCode() > 199 && r.StatusCode() < 300 +} + +// IsError method returns true if HTTP status code >= 400 otherwise false. +func (r *Response) IsError() bool { + return r.StatusCode() > 399 +} + +func (r *Response) fmtBodyString(sl int64) string { + if r.body != nil { + if int64(len(r.body)) > sl { + return fmt.Sprintf("***** RESPONSE TOO LARGE (size - %d) *****", len(r.body)) + } + ct := r.Header().Get(hdrContentTypeKey) + if IsJSONType(ct) { + out := acquireBuffer() + defer releaseBuffer(out) + if err := json.Indent(out, r.body, "", " "); err == nil { + return out.String() + } + } + return r.String() + } + + return "***** NO CONTENT *****" +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/resty.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/resty.go new file mode 100644 index 000000000..9a32463d7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/resty.go @@ -0,0 +1,9 @@ +// Copyright (c) 2015-2019 Jeevanandam M (jeeva@myjeeva.com), All rights reserved. +// resty source code and usage is governed by a MIT style +// license that can be found in the LICENSE file. + +// Package resty provides Simple HTTP and REST client library for Go. +package resty + +// Version # of resty +const Version = "1.12.0" diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/retry.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/retry.go new file mode 100644 index 000000000..4ed9b6d60 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/retry.go @@ -0,0 +1,118 @@ +// Copyright (c) 2015-2019 Jeevanandam M (jeeva@myjeeva.com), All rights reserved. +// resty source code and usage is governed by a MIT style +// license that can be found in the LICENSE file. + +package resty + +import ( + "math" + "math/rand" + "time" +) + +const ( + defaultMaxRetries = 3 + defaultWaitTime = time.Duration(100) * time.Millisecond + defaultMaxWaitTime = time.Duration(2000) * time.Millisecond +) + +type ( + // Option is to create convenient retry options like wait time, max retries, etc. + Option func(*Options) + + // RetryConditionFunc type is for retry condition function + RetryConditionFunc func(*Response) (bool, error) + + // Options to hold go-resty retry values + Options struct { + maxRetries int + waitTime time.Duration + maxWaitTime time.Duration + retryConditions []RetryConditionFunc + } +) + +// Retries sets the max number of retries +func Retries(value int) Option { + return func(o *Options) { + o.maxRetries = value + } +} + +// WaitTime sets the default wait time to sleep between requests +func WaitTime(value time.Duration) Option { + return func(o *Options) { + o.waitTime = value + } +} + +// MaxWaitTime sets the max wait time to sleep between requests +func MaxWaitTime(value time.Duration) Option { + return func(o *Options) { + o.maxWaitTime = value + } +} + +// RetryConditions sets the conditions that will be checked for retry. +func RetryConditions(conditions []RetryConditionFunc) Option { + return func(o *Options) { + o.retryConditions = conditions + } +} + +// Backoff retries with increasing timeout duration up until X amount of retries +// (Default is 3 attempts, Override with option Retries(n)) +func Backoff(operation func() (*Response, error), options ...Option) error { + // Defaults + opts := Options{ + maxRetries: defaultMaxRetries, + waitTime: defaultWaitTime, + maxWaitTime: defaultMaxWaitTime, + retryConditions: []RetryConditionFunc{}, + } + + for _, o := range options { + o(&opts) + } + + var ( + resp *Response + err error + ) + base := float64(opts.waitTime) // Time to wait between each attempt + capLevel := float64(opts.maxWaitTime) // Maximum amount of wait time for the retry + for attempt := 0; attempt < opts.maxRetries; attempt++ { + resp, err = operation() + + var needsRetry bool + var conditionErr error + for _, condition := range opts.retryConditions { + needsRetry, conditionErr = condition(resp) + if needsRetry || conditionErr != nil { + break + } + } + + // If the operation returned no error, there was no condition satisfied and + // there was no error caused by the conditional functions. + if err == nil && !needsRetry && conditionErr == nil { + return nil + } + // Adding capped exponential backup with jitter + // See the following article... + // http://www.awsarchitectureblog.com/2015/03/backoff.html + temp := math.Min(capLevel, base*math.Exp2(float64(attempt))) + ri := int(temp / 2) + if ri <= 0 { + ri = 1<<31 - 1 // max int for arch 386 + } + sleepDuration := time.Duration(math.Abs(float64(ri + rand.Intn(ri)))) + + if sleepDuration < opts.waitTime { + sleepDuration = opts.waitTime + } + time.Sleep(sleepDuration) + } + + return err +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/util.go b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/util.go new file mode 100644 index 000000000..997cd1009 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/gopkg.in/resty.v1/util.go @@ -0,0 +1,281 @@ +// Copyright (c) 2015-2019 Jeevanandam M (jeeva@myjeeva.com), All rights reserved. +// resty source code and usage is governed by a MIT style +// license that can be found in the LICENSE file. + +package resty + +import ( + "bytes" + "encoding/json" + "encoding/xml" + "fmt" + "io" + "log" + "mime/multipart" + "net/http" + "net/textproto" + "os" + "path/filepath" + "reflect" + "runtime" + "sort" + "strings" +) + +//‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +// Package Helper methods +//___________________________________ + +// IsStringEmpty method tells whether given string is empty or not +func IsStringEmpty(str string) bool { + return len(strings.TrimSpace(str)) == 0 +} + +// DetectContentType method is used to figure out `Request.Body` content type for request header +func DetectContentType(body interface{}) string { + contentType := plainTextType + kind := kindOf(body) + switch kind { + case reflect.Struct, reflect.Map: + contentType = jsonContentType + case reflect.String: + contentType = plainTextType + default: + if b, ok := body.([]byte); ok { + contentType = http.DetectContentType(b) + } else if kind == reflect.Slice { + contentType = jsonContentType + } + } + + return contentType +} + +// IsJSONType method is to check JSON content type or not +func IsJSONType(ct string) bool { + return jsonCheck.MatchString(ct) +} + +// IsXMLType method is to check XML content type or not +func IsXMLType(ct string) bool { + return xmlCheck.MatchString(ct) +} + +// Unmarshal content into object from JSON or XML +// Deprecated: kept for backward compatibility +func Unmarshal(ct string, b []byte, d interface{}) (err error) { + if IsJSONType(ct) { + err = json.Unmarshal(b, d) + } else if IsXMLType(ct) { + err = xml.Unmarshal(b, d) + } + + return +} + +// Unmarshalc content into object from JSON or XML +func Unmarshalc(c *Client, ct string, b []byte, d interface{}) (err error) { + if IsJSONType(ct) { + err = c.JSONUnmarshal(b, d) + } else if IsXMLType(ct) { + err = xml.Unmarshal(b, d) + } + + return +} + +//‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +// RequestLog and ResponseLog type +//___________________________________ + +// RequestLog struct is used to collected information from resty request +// instance for debug logging. It sent to request log callback before resty +// actually logs the information. +type RequestLog struct { + Header http.Header + Body string +} + +// ResponseLog struct is used to collected information from resty response +// instance for debug logging. It sent to response log callback before resty +// actually logs the information. +type ResponseLog struct { + Header http.Header + Body string +} + +//‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +// Package Unexported methods +//___________________________________ + +// way to disable the HTML escape as opt-in +func jsonMarshal(c *Client, r *Request, d interface{}) ([]byte, error) { + if !r.jsonEscapeHTML { + return noescapeJSONMarshal(d) + } else if !c.jsonEscapeHTML { + return noescapeJSONMarshal(d) + } + return c.JSONMarshal(d) +} + +func firstNonEmpty(v ...string) string { + for _, s := range v { + if !IsStringEmpty(s) { + return s + } + } + return "" +} + +func getLogger(w io.Writer) *log.Logger { + return log.New(w, "RESTY ", log.LstdFlags) +} + +var quoteEscaper = strings.NewReplacer("\\", "\\\\", `"`, "\\\"") + +func escapeQuotes(s string) string { + return quoteEscaper.Replace(s) +} + +func createMultipartHeader(param, fileName, contentType string) textproto.MIMEHeader { + hdr := make(textproto.MIMEHeader) + hdr.Set("Content-Disposition", fmt.Sprintf(`form-data; name="%s"; filename="%s"`, + escapeQuotes(param), escapeQuotes(fileName))) + hdr.Set("Content-Type", contentType) + return hdr +} + +func addMultipartFormField(w *multipart.Writer, mf *MultipartField) error { + partWriter, err := w.CreatePart(createMultipartHeader(mf.Param, mf.FileName, mf.ContentType)) + if err != nil { + return err + } + + _, err = io.Copy(partWriter, mf.Reader) + return err +} + +func writeMultipartFormFile(w *multipart.Writer, fieldName, fileName string, r io.Reader) error { + // Auto detect actual multipart content type + cbuf := make([]byte, 512) + size, err := r.Read(cbuf) + if err != nil { + return err + } + + partWriter, err := w.CreatePart(createMultipartHeader(fieldName, fileName, http.DetectContentType(cbuf))) + if err != nil { + return err + } + + if _, err = partWriter.Write(cbuf[:size]); err != nil { + return err + } + + _, err = io.Copy(partWriter, r) + return err +} + +func addFile(w *multipart.Writer, fieldName, path string) error { + file, err := os.Open(path) + if err != nil { + return err + } + defer closeq(file) + return writeMultipartFormFile(w, fieldName, filepath.Base(path), file) +} + +func addFileReader(w *multipart.Writer, f *File) error { + return writeMultipartFormFile(w, f.ParamName, f.Name, f.Reader) +} + +func getPointer(v interface{}) interface{} { + vv := valueOf(v) + if vv.Kind() == reflect.Ptr { + return v + } + return reflect.New(vv.Type()).Interface() +} + +func isPayloadSupported(m string, allowMethodGet bool) bool { + return !(m == MethodHead || m == MethodOptions || (m == MethodGet && !allowMethodGet)) +} + +func typeOf(i interface{}) reflect.Type { + return indirect(valueOf(i)).Type() +} + +func valueOf(i interface{}) reflect.Value { + return reflect.ValueOf(i) +} + +func indirect(v reflect.Value) reflect.Value { + return reflect.Indirect(v) +} + +func kindOf(v interface{}) reflect.Kind { + return typeOf(v).Kind() +} + +func createDirectory(dir string) (err error) { + if _, err = os.Stat(dir); err != nil { + if os.IsNotExist(err) { + if err = os.MkdirAll(dir, 0755); err != nil { + return + } + } + } + return +} + +func canJSONMarshal(contentType string, kind reflect.Kind) bool { + return IsJSONType(contentType) && (kind == reflect.Struct || kind == reflect.Map || kind == reflect.Slice) +} + +func functionName(i interface{}) string { + return runtime.FuncForPC(reflect.ValueOf(i).Pointer()).Name() +} + +func acquireBuffer() *bytes.Buffer { + return bufPool.Get().(*bytes.Buffer) +} + +func releaseBuffer(buf *bytes.Buffer) { + if buf != nil { + buf.Reset() + bufPool.Put(buf) + } +} + +func closeq(v interface{}) { + if c, ok := v.(io.Closer); ok { + sliently(c.Close()) + } +} + +func sliently(_ ...interface{}) {} + +func composeHeaders(hdrs http.Header) string { + var str []string + for _, k := range sortHeaderKeys(hdrs) { + str = append(str, fmt.Sprintf("%25s: %s", k, strings.Join(hdrs[k], ", "))) + } + return strings.Join(str, "\n") +} + +func sortHeaderKeys(hdrs http.Header) []string { + var keys []string + for key := range hdrs { + keys = append(keys, key) + } + sort.Strings(keys) + return keys +} + +func copyHeaders(hdrs http.Header) http.Header { + nh := http.Header{} + for k, v := range hdrs { + nh[k] = v + } + return nh +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/vendor.json b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/vendor.json new file mode 100644 index 000000000..fb20b9fec --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/linode/vendor/vendor.json @@ -0,0 +1,25 @@ +{ + "comment": "", + "ignore": "test", + "package": [ + {"path":"appengine","revision":""}, + {"path":"appengine_internal","revision":""}, + {"path":"appengine_internal/base","revision":""}, + {"path":"github.com/golang/protobuf/proto","checksumSHA1":"CGj8VcI/CpzxaNqlqpEVM7qElD4=","revision":"b285ee9cfc6c881bb20c0d8dc73370ea9b9ec90f","revisionTime":"2019-05-17T06:12:10Z"}, + {"path":"github.com/linode/linodego","checksumSHA1":"jm8r8aj8JP35ocqQ2bwoHgy6wpM=","revision":"42d84d42f3f28fe1fe1823c58c11715241eda24e","revisionTime":"2019-02-05T19:19:13Z"}, + {"path":"golang.org/x/net/context","checksumSHA1":"GtamqiJoL7PGHsN454AoffBFMa8=","revision":"018c4d40a106a7ae83689758294fcd8d23850745","revisionTime":"2019-05-20T20:50:50Z"}, + {"path":"golang.org/x/net/context/ctxhttp","checksumSHA1":"aFpql3G+Nw8zkzfqLWQJNZC8pu0=","revision":"018c4d40a106a7ae83689758294fcd8d23850745","revisionTime":"2019-05-20T20:50:50Z"}, + {"path":"golang.org/x/net/publicsuffix","checksumSHA1":"j6leSoJatxWHJGLjRxIjZ8GbaDQ=","revision":"16b79f2e4e95ea23b2bf9903c9809ff7b013ce85","revisionTime":"2019-03-01T08:36:47Z"}, + {"path":"golang.org/x/oauth2","checksumSHA1":"/F4kBHR/0qnLRJgjKqlUo3Iksds=","revision":"9a379c6b3e95a790ffc43293c2a78dee0d7b6e20","revisionTime":"2017-07-25T16:55:14Z"}, + {"path":"golang.org/x/oauth2/internal","checksumSHA1":"eztsaK5Uim4juQOtqUf6VF+foD4=","revision":"9a379c6b3e95a790ffc43293c2a78dee0d7b6e20","revisionTime":"2017-07-25T16:55:14Z"}, + {"path":"google.golang.org/appengine/internal","checksumSHA1":"/R9+Y0jX9ijye8Ea6oh/RBwOOg4=","revision":"311d3c5cf9373249645db030e53c37c209a8b378","revisionTime":"2019-05-15T04:47:07Z"}, + {"path":"google.golang.org/appengine/internal/base","checksumSHA1":"5PakGXEgSbyFptkhGO8MnGf7uH0=","revision":"311d3c5cf9373249645db030e53c37c209a8b378","revisionTime":"2019-05-15T04:47:07Z"}, + {"path":"google.golang.org/appengine/internal/datastore","checksumSHA1":"3DZ+Ah5hFQb1/nh1+li2VE+kkfk=","revision":"311d3c5cf9373249645db030e53c37c209a8b378","revisionTime":"2019-05-15T04:47:07Z"}, + {"path":"google.golang.org/appengine/internal/log","checksumSHA1":"HJQ4JM9YWfwIe4vmAgXC7J/1T3E=","revision":"311d3c5cf9373249645db030e53c37c209a8b378","revisionTime":"2019-05-15T04:47:07Z"}, + {"path":"google.golang.org/appengine/internal/remote_api","checksumSHA1":"hApgRLSl7w9XG2waJxdH/o0A398=","revision":"311d3c5cf9373249645db030e53c37c209a8b378","revisionTime":"2019-05-15T04:47:07Z"}, + {"path":"google.golang.org/appengine/internal/urlfetch","checksumSHA1":"ZnEUFEjcGAVZNDPOOc+VLN7x4pI=","revision":"311d3c5cf9373249645db030e53c37c209a8b378","revisionTime":"2019-05-15T04:47:07Z"}, + {"path":"google.golang.org/appengine/urlfetch","checksumSHA1":"akOV9pYnCbcPA8wJUutSQVibdyg=","revision":"311d3c5cf9373249645db030e53c37c209a8b378","revisionTime":"2019-05-15T04:47:07Z"}, + {"path":"gopkg.in/resty.v1","checksumSHA1":"iwwCOtfdXj5RGjQThilFlGzUNTc=","revision":"fa5875c0caa5c260ab78acec5a244215a730247f","revisionTime":"2019-02-28T07:26:48Z"} + ], + "rootPath": "github.com/hashicorp/go-discover/provider/linode" +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/mdns_provider.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/mdns_provider.go new file mode 100644 index 000000000..7445a8357 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/mdns_provider.go @@ -0,0 +1,119 @@ +// Package mdns provides node discovery via mDNS. +package mdns + +import ( + "fmt" + "io/ioutil" + "log" + "net" + "strconv" + "time" + + m "github.com/hashicorp/mdns" +) + +// Provider implements the Provider interface. +type Provider struct{} + +// Help returns help information for the mDNS package. +func (p *Provider) Help() string { + return `mDNS: + + provider: "mdns" + service: The mDNS service name. + domain: The mDNS discovery domain. Default "local". + timeout: The mDNS lookup timeout. Default "5s" (five seconds). + v6: IPv6 will be allowed and preferred when set to "true" + and disabled when set to "false". Default "true". + v4: IPv4 will be allowed when set to "true" and disabled + when set to "false". Default "true". +` +} + +// Addrs returns discovered addresses for the mDNS package. +func (p *Provider) Addrs(args map[string]string, l *log.Logger) ([]string, error) { + var params *m.QueryParam + var ch chan *m.ServiceEntry + var v6, v4 bool + var addrs []string + var err error + + // default to null logger + if l == nil { + l = log.New(ioutil.Discard, "", 0) + } + + // init params + params = new(m.QueryParam) + + // validate and set service record + if args["service"] == "" { + return nil, fmt.Errorf("discover-mdns: Service record not provided." + + " Please specify a service record for the mDNS lookup.") + } + params.Service = args["service"] + + // validate and set domain + if args["domain"] != "" { + params.Domain = args["domain"] + } else { + params.Domain = "local" + } + + // validate and set timeout + if args["timeout"] != "" { + if params.Timeout, err = time.ParseDuration(args["timeout"]); err != nil { + return nil, fmt.Errorf("discover-mdns: Failed to parse timeout: %s", err) + } + } else { + params.Timeout = 5 * time.Second + } + + // validate and set v6 toggle + if args["v6"] != "" { + if v6, err = strconv.ParseBool(args["v6"]); err != nil { + return nil, fmt.Errorf("discover-mdns: Failed to parse v6: %s", err) + } + } else { + v6 = true + } + + // validate and set v4 toggle + if args["v4"] != "" { + if v4, err = strconv.ParseBool(args["v4"]); err != nil { + return nil, fmt.Errorf("discover-mdns: Failed to parse v4: %s", err) + } + } else { + v4 = true + } + + // init entries channel + ch = make(chan *m.ServiceEntry) + defer close(ch) + params.Entries = ch + + // build addresses + go func() { + var addr string + for e := range ch { + addr = "" // reset addr each loop + if v6 && e.AddrV6 != nil { + addr = net.JoinHostPort(e.AddrV6.String(), + strconv.Itoa(e.Port)) + } + if addr == "" && v4 && e.AddrV4 != nil { + addr = net.JoinHostPort(e.AddrV4.String(), + strconv.Itoa(e.Port)) + } + if addr != "" { + l.Printf("[DEBUG] discover-mdns: %s -> %s", + e.Host, addr) + // build address list + addrs = append(addrs, addr) + } + } + }() + + // lookup and return + return addrs, m.Query(params) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/LICENSE b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/LICENSE new file mode 100644 index 000000000..6a66aea5e --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/PATENTS b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/PATENTS new file mode 100644 index 000000000..733099041 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/internal/iana/const.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/internal/iana/const.go new file mode 100644 index 000000000..769227656 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/internal/iana/const.go @@ -0,0 +1,184 @@ +// go generate gen.go +// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// Package iana provides protocol number resources managed by the Internet Assigned Numbers Authority (IANA). +package iana + +// Differentiated Services Field Codepoints (DSCP), Updated: 2013-06-25 +const ( + DiffServCS0 = 0x0 // CS0 + DiffServCS1 = 0x20 // CS1 + DiffServCS2 = 0x40 // CS2 + DiffServCS3 = 0x60 // CS3 + DiffServCS4 = 0x80 // CS4 + DiffServCS5 = 0xa0 // CS5 + DiffServCS6 = 0xc0 // CS6 + DiffServCS7 = 0xe0 // CS7 + DiffServAF11 = 0x28 // AF11 + DiffServAF12 = 0x30 // AF12 + DiffServAF13 = 0x38 // AF13 + DiffServAF21 = 0x48 // AF21 + DiffServAF22 = 0x50 // AF22 + DiffServAF23 = 0x58 // AF23 + DiffServAF31 = 0x68 // AF31 + DiffServAF32 = 0x70 // AF32 + DiffServAF33 = 0x78 // AF33 + DiffServAF41 = 0x88 // AF41 + DiffServAF42 = 0x90 // AF42 + DiffServAF43 = 0x98 // AF43 + DiffServEFPHB = 0xb8 // EF PHB + DiffServVOICEADMIT = 0xb0 // VOICE-ADMIT +) + +// IPv4 TOS Byte and IPv6 Traffic Class Octet, Updated: 2001-09-06 +const ( + NotECNTransport = 0x0 // Not-ECT (Not ECN-Capable Transport) + ECNTransport1 = 0x1 // ECT(1) (ECN-Capable Transport(1)) + ECNTransport0 = 0x2 // ECT(0) (ECN-Capable Transport(0)) + CongestionExperienced = 0x3 // CE (Congestion Experienced) +) + +// Protocol Numbers, Updated: 2014-08-12 +const ( + ProtocolIP = 0 // IPv4 encapsulation, pseudo protocol number + ProtocolHOPOPT = 0 // IPv6 Hop-by-Hop Option + ProtocolICMP = 1 // Internet Control Message + ProtocolIGMP = 2 // Internet Group Management + ProtocolGGP = 3 // Gateway-to-Gateway + ProtocolIPv4 = 4 // IPv4 encapsulation + ProtocolST = 5 // Stream + ProtocolTCP = 6 // Transmission Control + ProtocolCBT = 7 // CBT + ProtocolEGP = 8 // Exterior Gateway Protocol + ProtocolIGP = 9 // any private interior gateway (used by Cisco for their IGRP) + ProtocolBBNRCCMON = 10 // BBN RCC Monitoring + ProtocolNVPII = 11 // Network Voice Protocol + ProtocolPUP = 12 // PUP + ProtocolARGUS = 13 // ARGUS + ProtocolEMCON = 14 // EMCON + ProtocolXNET = 15 // Cross Net Debugger + ProtocolCHAOS = 16 // Chaos + ProtocolUDP = 17 // User Datagram + ProtocolMUX = 18 // Multiplexing + ProtocolDCNMEAS = 19 // DCN Measurement Subsystems + ProtocolHMP = 20 // Host Monitoring + ProtocolPRM = 21 // Packet Radio Measurement + ProtocolXNSIDP = 22 // XEROX NS IDP + ProtocolTRUNK1 = 23 // Trunk-1 + ProtocolTRUNK2 = 24 // Trunk-2 + ProtocolLEAF1 = 25 // Leaf-1 + ProtocolLEAF2 = 26 // Leaf-2 + ProtocolRDP = 27 // Reliable Data Protocol + ProtocolIRTP = 28 // Internet Reliable Transaction + ProtocolISOTP4 = 29 // ISO Transport Protocol Class 4 + ProtocolNETBLT = 30 // Bulk Data Transfer Protocol + ProtocolMFENSP = 31 // MFE Network Services Protocol + ProtocolMERITINP = 32 // MERIT Internodal Protocol + ProtocolDCCP = 33 // Datagram Congestion Control Protocol + Protocol3PC = 34 // Third Party Connect Protocol + ProtocolIDPR = 35 // Inter-Domain Policy Routing Protocol + ProtocolXTP = 36 // XTP + ProtocolDDP = 37 // Datagram Delivery Protocol + ProtocolIDPRCMTP = 38 // IDPR Control Message Transport Proto + ProtocolTPPP = 39 // TP++ Transport Protocol + ProtocolIL = 40 // IL Transport Protocol + ProtocolIPv6 = 41 // IPv6 encapsulation + ProtocolSDRP = 42 // Source Demand Routing Protocol + ProtocolIPv6Route = 43 // Routing Header for IPv6 + ProtocolIPv6Frag = 44 // Fragment Header for IPv6 + ProtocolIDRP = 45 // Inter-Domain Routing Protocol + ProtocolRSVP = 46 // Reservation Protocol + ProtocolGRE = 47 // Generic Routing Encapsulation + ProtocolDSR = 48 // Dynamic Source Routing Protocol + ProtocolBNA = 49 // BNA + ProtocolESP = 50 // Encap Security Payload + ProtocolAH = 51 // Authentication Header + ProtocolINLSP = 52 // Integrated Net Layer Security TUBA + ProtocolSWIPE = 53 // IP with Encryption + ProtocolNARP = 54 // NBMA Address Resolution Protocol + ProtocolMOBILE = 55 // IP Mobility + ProtocolTLSP = 56 // Transport Layer Security Protocol using Kryptonet key management + ProtocolSKIP = 57 // SKIP + ProtocolIPv6ICMP = 58 // ICMP for IPv6 + ProtocolIPv6NoNxt = 59 // No Next Header for IPv6 + ProtocolIPv6Opts = 60 // Destination Options for IPv6 + ProtocolCFTP = 62 // CFTP + ProtocolSATEXPAK = 64 // SATNET and Backroom EXPAK + ProtocolKRYPTOLAN = 65 // Kryptolan + ProtocolRVD = 66 // MIT Remote Virtual Disk Protocol + ProtocolIPPC = 67 // Internet Pluribus Packet Core + ProtocolSATMON = 69 // SATNET Monitoring + ProtocolVISA = 70 // VISA Protocol + ProtocolIPCV = 71 // Internet Packet Core Utility + ProtocolCPNX = 72 // Computer Protocol Network Executive + ProtocolCPHB = 73 // Computer Protocol Heart Beat + ProtocolWSN = 74 // Wang Span Network + ProtocolPVP = 75 // Packet Video Protocol + ProtocolBRSATMON = 76 // Backroom SATNET Monitoring + ProtocolSUNND = 77 // SUN ND PROTOCOL-Temporary + ProtocolWBMON = 78 // WIDEBAND Monitoring + ProtocolWBEXPAK = 79 // WIDEBAND EXPAK + ProtocolISOIP = 80 // ISO Internet Protocol + ProtocolVMTP = 81 // VMTP + ProtocolSECUREVMTP = 82 // SECURE-VMTP + ProtocolVINES = 83 // VINES + ProtocolTTP = 84 // Transaction Transport Protocol + ProtocolIPTM = 84 // Internet Protocol Traffic Manager + ProtocolNSFNETIGP = 85 // NSFNET-IGP + ProtocolDGP = 86 // Dissimilar Gateway Protocol + ProtocolTCF = 87 // TCF + ProtocolEIGRP = 88 // EIGRP + ProtocolOSPFIGP = 89 // OSPFIGP + ProtocolSpriteRPC = 90 // Sprite RPC Protocol + ProtocolLARP = 91 // Locus Address Resolution Protocol + ProtocolMTP = 92 // Multicast Transport Protocol + ProtocolAX25 = 93 // AX.25 Frames + ProtocolIPIP = 94 // IP-within-IP Encapsulation Protocol + ProtocolMICP = 95 // Mobile Internetworking Control Pro. + ProtocolSCCSP = 96 // Semaphore Communications Sec. Pro. + ProtocolETHERIP = 97 // Ethernet-within-IP Encapsulation + ProtocolENCAP = 98 // Encapsulation Header + ProtocolGMTP = 100 // GMTP + ProtocolIFMP = 101 // Ipsilon Flow Management Protocol + ProtocolPNNI = 102 // PNNI over IP + ProtocolPIM = 103 // Protocol Independent Multicast + ProtocolARIS = 104 // ARIS + ProtocolSCPS = 105 // SCPS + ProtocolQNX = 106 // QNX + ProtocolAN = 107 // Active Networks + ProtocolIPComp = 108 // IP Payload Compression Protocol + ProtocolSNP = 109 // Sitara Networks Protocol + ProtocolCompaqPeer = 110 // Compaq Peer Protocol + ProtocolIPXinIP = 111 // IPX in IP + ProtocolVRRP = 112 // Virtual Router Redundancy Protocol + ProtocolPGM = 113 // PGM Reliable Transport Protocol + ProtocolL2TP = 115 // Layer Two Tunneling Protocol + ProtocolDDX = 116 // D-II Data Exchange (DDX) + ProtocolIATP = 117 // Interactive Agent Transfer Protocol + ProtocolSTP = 118 // Schedule Transfer Protocol + ProtocolSRP = 119 // SpectraLink Radio Protocol + ProtocolUTI = 120 // UTI + ProtocolSMP = 121 // Simple Message Protocol + ProtocolSM = 122 // Simple Multicast Protocol + ProtocolPTP = 123 // Performance Transparency Protocol + ProtocolISIS = 124 // ISIS over IPv4 + ProtocolFIRE = 125 // FIRE + ProtocolCRTP = 126 // Combat Radio Transport Protocol + ProtocolCRUDP = 127 // Combat Radio User Datagram + ProtocolSSCOPMCE = 128 // SSCOPMCE + ProtocolIPLT = 129 // IPLT + ProtocolSPS = 130 // Secure Packet Shield + ProtocolPIPE = 131 // Private IP Encapsulation within IP + ProtocolSCTP = 132 // Stream Control Transmission Protocol + ProtocolFC = 133 // Fibre Channel + ProtocolRSVPE2EIGNORE = 134 // RSVP-E2E-IGNORE + ProtocolMobilityHeader = 135 // Mobility Header + ProtocolUDPLite = 136 // UDPLite + ProtocolMPLSinIP = 137 // MPLS-in-IP + ProtocolMANET = 138 // MANET Protocols + ProtocolHIP = 139 // Host Identity Protocol + ProtocolShim6 = 140 // Shim6 Protocol + ProtocolWESP = 141 // Wrapped Encapsulating Security Payload + ProtocolROHC = 142 // Robust Header Compression + ProtocolReserved = 255 // Reserved +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/control.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/control.go new file mode 100644 index 000000000..1f5c993fb --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/control.go @@ -0,0 +1,70 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv4 + +import ( + "fmt" + "net" + "sync" +) + +type rawOpt struct { + sync.RWMutex + cflags ControlFlags +} + +func (c *rawOpt) set(f ControlFlags) { c.cflags |= f } +func (c *rawOpt) clear(f ControlFlags) { c.cflags &^= f } +func (c *rawOpt) isset(f ControlFlags) bool { return c.cflags&f != 0 } + +type ControlFlags uint + +const ( + FlagTTL ControlFlags = 1 << iota // pass the TTL on the received packet + FlagSrc // pass the source address on the received packet + FlagDst // pass the destination address on the received packet + FlagInterface // pass the interface index on the received packet +) + +// A ControlMessage represents per packet basis IP-level socket options. +type ControlMessage struct { + // Receiving socket options: SetControlMessage allows to + // receive the options from the protocol stack using ReadFrom + // method of PacketConn or RawConn. + // + // Specifying socket options: ControlMessage for WriteTo + // method of PacketConn or RawConn allows to send the options + // to the protocol stack. + // + TTL int // time-to-live, receiving only + Src net.IP // source address, specifying only + Dst net.IP // destination address, receiving only + IfIndex int // interface index, must be 1 <= value when specifying +} + +func (cm *ControlMessage) String() string { + if cm == nil { + return "" + } + return fmt.Sprintf("ttl: %v, src: %v, dst: %v, ifindex: %v", cm.TTL, cm.Src, cm.Dst, cm.IfIndex) +} + +// Ancillary data socket options +const ( + ctlTTL = iota // header field + ctlSrc // header field + ctlDst // header field + ctlInterface // inbound or outbound interface + ctlPacketInfo // inbound or outbound packet path + ctlMax +) + +// A ctlOpt represents a binding for ancillary data socket option. +type ctlOpt struct { + name int // option name, must be equal or greater than 1 + length int // option length + marshal func([]byte, *ControlMessage) []byte + parse func(*ControlMessage, []byte) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/control_bsd.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/control_bsd.go new file mode 100644 index 000000000..de03b0cff --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/control_bsd.go @@ -0,0 +1,40 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd netbsd openbsd + +package ipv4 + +import ( + "net" + "syscall" + "unsafe" + + "github.com/hashicorp/go.net/internal/iana" +) + +func marshalDst(b []byte, cm *ControlMessage) []byte { + m := (*syscall.Cmsghdr)(unsafe.Pointer(&b[0])) + m.Level = iana.ProtocolIP + m.Type = sysIP_RECVDSTADDR + m.SetLen(syscall.CmsgLen(net.IPv4len)) + return b[syscall.CmsgSpace(net.IPv4len):] +} + +func parseDst(cm *ControlMessage, b []byte) { + cm.Dst = b[:net.IPv4len] +} + +func marshalInterface(b []byte, cm *ControlMessage) []byte { + m := (*syscall.Cmsghdr)(unsafe.Pointer(&b[0])) + m.Level = iana.ProtocolIP + m.Type = sysIP_RECVIF + m.SetLen(syscall.CmsgLen(syscall.SizeofSockaddrDatalink)) + return b[syscall.CmsgSpace(syscall.SizeofSockaddrDatalink):] +} + +func parseInterface(cm *ControlMessage, b []byte) { + sadl := (*syscall.SockaddrDatalink)(unsafe.Pointer(&b[0])) + cm.IfIndex = int(sadl.Index) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/control_pktinfo.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/control_pktinfo.go new file mode 100644 index 000000000..3ce6c6f10 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/control_pktinfo.go @@ -0,0 +1,37 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin linux + +package ipv4 + +import ( + "syscall" + "unsafe" + + "github.com/hashicorp/go.net/internal/iana" +) + +func marshalPacketInfo(b []byte, cm *ControlMessage) []byte { + m := (*syscall.Cmsghdr)(unsafe.Pointer(&b[0])) + m.Level = iana.ProtocolIP + m.Type = sysIP_PKTINFO + m.SetLen(syscall.CmsgLen(sysSizeofInetPktinfo)) + if cm != nil { + pi := (*sysInetPktinfo)(unsafe.Pointer(&b[syscall.CmsgLen(0)])) + if ip := cm.Src.To4(); ip != nil { + copy(pi.Spec_dst[:], ip) + } + if cm.IfIndex != 0 { + pi.setIfindex(cm.IfIndex) + } + } + return b[syscall.CmsgSpace(sysSizeofInetPktinfo):] +} + +func parsePacketInfo(cm *ControlMessage, b []byte) { + pi := (*sysInetPktinfo)(unsafe.Pointer(&b[0])) + cm.IfIndex = int(pi.Ifindex) + cm.Dst = pi.Addr[:] +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/control_stub.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/control_stub.go new file mode 100644 index 000000000..f626de6d6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/control_stub.go @@ -0,0 +1,27 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build nacl plan9 solaris + +package ipv4 + +func setControlMessage(fd int, opt *rawOpt, cf ControlFlags, on bool) error { + // TODO(mikio): Implement this + return errOpNoSupport +} + +func newControlMessage(opt *rawOpt) []byte { + // TODO(mikio): Implement this + return nil +} + +func parseControlMessage(b []byte) (*ControlMessage, error) { + // TODO(mikio): Implement this + return nil, errOpNoSupport +} + +func marshalControlMessage(cm *ControlMessage) []byte { + // TODO(mikio): Implement this + return nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/control_unix.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/control_unix.go new file mode 100644 index 000000000..b96c964fe --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/control_unix.go @@ -0,0 +1,166 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd + +package ipv4 + +import ( + "os" + "syscall" + "unsafe" + + "github.com/hashicorp/go.net/internal/iana" +) + +func setControlMessage(fd int, opt *rawOpt, cf ControlFlags, on bool) error { + opt.Lock() + defer opt.Unlock() + if cf&FlagTTL != 0 { + if err := setInt(fd, &sockOpts[ssoReceiveTTL], boolint(on)); err != nil { + return err + } + if on { + opt.set(FlagTTL) + } else { + opt.clear(FlagTTL) + } + } + if sockOpts[ssoPacketInfo].name > 0 { + if cf&(FlagSrc|FlagDst|FlagInterface) != 0 { + if err := setInt(fd, &sockOpts[ssoPacketInfo], boolint(on)); err != nil { + return err + } + if on { + opt.set(cf & (FlagSrc | FlagDst | FlagInterface)) + } else { + opt.clear(cf & (FlagSrc | FlagDst | FlagInterface)) + } + } + } else { + if cf&FlagDst != 0 { + if err := setInt(fd, &sockOpts[ssoReceiveDst], boolint(on)); err != nil { + return err + } + if on { + opt.set(FlagDst) + } else { + opt.clear(FlagDst) + } + } + if cf&FlagInterface != 0 { + if err := setInt(fd, &sockOpts[ssoReceiveInterface], boolint(on)); err != nil { + return err + } + if on { + opt.set(FlagInterface) + } else { + opt.clear(FlagInterface) + } + } + } + return nil +} + +func newControlMessage(opt *rawOpt) (oob []byte) { + opt.RLock() + var l int + if opt.isset(FlagTTL) { + l += syscall.CmsgSpace(ctlOpts[ctlTTL].length) + } + if ctlOpts[ctlPacketInfo].name > 0 { + if opt.isset(FlagSrc | FlagDst | FlagInterface) { + l += syscall.CmsgSpace(ctlOpts[ctlPacketInfo].length) + } + } else { + if opt.isset(FlagDst) { + l += syscall.CmsgSpace(ctlOpts[ctlDst].length) + } + if opt.isset(FlagInterface) { + l += syscall.CmsgSpace(ctlOpts[ctlInterface].length) + } + } + if l > 0 { + oob = make([]byte, l) + b := oob + if opt.isset(FlagTTL) { + b = ctlOpts[ctlTTL].marshal(b, nil) + } + if ctlOpts[ctlPacketInfo].name > 0 { + if opt.isset(FlagSrc | FlagDst | FlagInterface) { + b = ctlOpts[ctlPacketInfo].marshal(b, nil) + } + } else { + if opt.isset(FlagDst) { + b = ctlOpts[ctlDst].marshal(b, nil) + } + if opt.isset(FlagInterface) { + b = ctlOpts[ctlInterface].marshal(b, nil) + } + } + } + opt.RUnlock() + return +} + +func parseControlMessage(b []byte) (*ControlMessage, error) { + if len(b) == 0 { + return nil, nil + } + cmsgs, err := syscall.ParseSocketControlMessage(b) + if err != nil { + return nil, os.NewSyscallError("parse socket control message", err) + } + cm := &ControlMessage{} + for _, m := range cmsgs { + if m.Header.Level != iana.ProtocolIP { + continue + } + switch int(m.Header.Type) { + case ctlOpts[ctlTTL].name: + ctlOpts[ctlTTL].parse(cm, m.Data[:]) + case ctlOpts[ctlDst].name: + ctlOpts[ctlDst].parse(cm, m.Data[:]) + case ctlOpts[ctlInterface].name: + ctlOpts[ctlInterface].parse(cm, m.Data[:]) + case ctlOpts[ctlPacketInfo].name: + ctlOpts[ctlPacketInfo].parse(cm, m.Data[:]) + } + } + return cm, nil +} + +func marshalControlMessage(cm *ControlMessage) (oob []byte) { + if cm == nil { + return nil + } + var l int + if ctlOpts[ctlPacketInfo].name > 0 { + if cm.Src.To4() != nil || cm.IfIndex != 0 { + l += syscall.CmsgSpace(ctlOpts[ctlPacketInfo].length) + } + } + if l > 0 { + oob = make([]byte, l) + b := oob + if ctlOpts[ctlPacketInfo].name > 0 { + if cm.Src.To4() != nil || cm.IfIndex != 0 { + b = ctlOpts[ctlPacketInfo].marshal(b, cm) + } + } + } + return +} + +func marshalTTL(b []byte, cm *ControlMessage) []byte { + m := (*syscall.Cmsghdr)(unsafe.Pointer(&b[0])) + m.Level = iana.ProtocolIP + m.Type = sysIP_RECVTTL + m.SetLen(syscall.CmsgLen(1)) + return b[syscall.CmsgSpace(1):] +} + +func parseTTL(cm *ControlMessage, b []byte) { + cm.TTL = int(*(*byte)(unsafe.Pointer(&b[:1][0]))) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/control_windows.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/control_windows.go new file mode 100644 index 000000000..5a68a55a5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/control_windows.go @@ -0,0 +1,27 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv4 + +import "syscall" + +func setControlMessage(fd syscall.Handle, opt *rawOpt, cf ControlFlags, on bool) error { + // TODO(mikio): Implement this + return syscall.EWINDOWS +} + +func newControlMessage(opt *rawOpt) []byte { + // TODO(mikio): Implement this + return nil +} + +func parseControlMessage(b []byte) (*ControlMessage, error) { + // TODO(mikio): Implement this + return nil, syscall.EWINDOWS +} + +func marshalControlMessage(cm *ControlMessage) []byte { + // TODO(mikio): Implement this + return nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/dgramopt_posix.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/dgramopt_posix.go new file mode 100644 index 000000000..fce881a8e --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/dgramopt_posix.go @@ -0,0 +1,129 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd windows + +package ipv4 + +import ( + "net" + "syscall" +) + +// MulticastTTL returns the time-to-live field value for outgoing +// multicast packets. +func (c *dgramOpt) MulticastTTL() (int, error) { + if !c.ok() { + return 0, syscall.EINVAL + } + fd, err := c.sysfd() + if err != nil { + return 0, err + } + return getInt(fd, &sockOpts[ssoMulticastTTL]) +} + +// SetMulticastTTL sets the time-to-live field value for future +// outgoing multicast packets. +func (c *dgramOpt) SetMulticastTTL(ttl int) error { + if !c.ok() { + return syscall.EINVAL + } + fd, err := c.sysfd() + if err != nil { + return err + } + return setInt(fd, &sockOpts[ssoMulticastTTL], ttl) +} + +// MulticastInterface returns the default interface for multicast +// packet transmissions. +func (c *dgramOpt) MulticastInterface() (*net.Interface, error) { + if !c.ok() { + return nil, syscall.EINVAL + } + fd, err := c.sysfd() + if err != nil { + return nil, err + } + return getInterface(fd, &sockOpts[ssoMulticastInterface]) +} + +// SetMulticastInterface sets the default interface for future +// multicast packet transmissions. +func (c *dgramOpt) SetMulticastInterface(ifi *net.Interface) error { + if !c.ok() { + return syscall.EINVAL + } + fd, err := c.sysfd() + if err != nil { + return err + } + return setInterface(fd, &sockOpts[ssoMulticastInterface], ifi) +} + +// MulticastLoopback reports whether transmitted multicast packets +// should be copied and send back to the originator. +func (c *dgramOpt) MulticastLoopback() (bool, error) { + if !c.ok() { + return false, syscall.EINVAL + } + fd, err := c.sysfd() + if err != nil { + return false, err + } + on, err := getInt(fd, &sockOpts[ssoMulticastLoopback]) + if err != nil { + return false, err + } + return on == 1, nil +} + +// SetMulticastLoopback sets whether transmitted multicast packets +// should be copied and send back to the originator. +func (c *dgramOpt) SetMulticastLoopback(on bool) error { + if !c.ok() { + return syscall.EINVAL + } + fd, err := c.sysfd() + if err != nil { + return err + } + return setInt(fd, &sockOpts[ssoMulticastLoopback], boolint(on)) +} + +// JoinGroup joins the group address group on the interface ifi. +// It uses the system assigned multicast interface when ifi is nil, +// although this is not recommended because the assignment depends on +// platforms and sometimes it might require routing configuration. +func (c *dgramOpt) JoinGroup(ifi *net.Interface, group net.Addr) error { + if !c.ok() { + return syscall.EINVAL + } + fd, err := c.sysfd() + if err != nil { + return err + } + grp := netAddrToIP4(group) + if grp == nil { + return errMissingAddress + } + return setGroup(fd, &sockOpts[ssoJoinGroup], ifi, grp) +} + +// LeaveGroup leaves the group address group on the interface ifi. +func (c *dgramOpt) LeaveGroup(ifi *net.Interface, group net.Addr) error { + if !c.ok() { + return syscall.EINVAL + } + fd, err := c.sysfd() + if err != nil { + return err + } + grp := netAddrToIP4(group) + if grp == nil { + return errMissingAddress + } + return setGroup(fd, &sockOpts[ssoLeaveGroup], ifi, grp) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/dgramopt_stub.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/dgramopt_stub.go new file mode 100644 index 000000000..bee9e0400 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/dgramopt_stub.go @@ -0,0 +1,49 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build nacl plan9 solaris + +package ipv4 + +import "net" + +func (c *dgramOpt) MulticastTTL() (int, error) { + // TODO(mikio): Implement this + return 0, errOpNoSupport +} + +func (c *dgramOpt) SetMulticastTTL(ttl int) error { + // TODO(mikio): Implement this + return errOpNoSupport +} + +func (c *dgramOpt) MulticastInterface() (*net.Interface, error) { + // TODO(mikio): Implement this + return nil, errOpNoSupport +} + +func (c *dgramOpt) SetMulticastInterface(ifi *net.Interface) error { + // TODO(mikio): Implement this + return errOpNoSupport +} + +func (c *dgramOpt) MulticastLoopback() (bool, error) { + // TODO(mikio): Implement this + return false, errOpNoSupport +} + +func (c *dgramOpt) SetMulticastLoopback(on bool) error { + // TODO(mikio): Implement this + return errOpNoSupport +} + +func (c *dgramOpt) JoinGroup(ifi *net.Interface, grp net.Addr) error { + // TODO(mikio): Implement this + return errOpNoSupport +} + +func (c *dgramOpt) LeaveGroup(ifi *net.Interface, grp net.Addr) error { + // TODO(mikio): Implement this + return errOpNoSupport +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/doc.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/doc.go new file mode 100644 index 000000000..576cd83ec --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/doc.go @@ -0,0 +1,196 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package ipv4 implements IP-level socket options for the Internet +// Protocol version 4. +// +// The package provides IP-level socket options that allow +// manipulation of IPv4 facilities. The IPv4 and basic host +// requirements for IPv4 are defined in RFC 791, RFC 1112 and RFC +// 1122. +// +// +// Unicasting +// +// The options for unicasting are available for net.TCPConn, +// net.UDPConn and net.IPConn which are created as network connections +// that use the IPv4 transport. When a single TCP connection carrying +// a data flow of multiple packets needs to indicate the flow is +// important, ipv4.Conn is used to set the type-of-service field on +// the IPv4 header for each packet. +// +// ln, err := net.Listen("tcp4", "0.0.0.0:1024") +// if err != nil { +// // error handling +// } +// defer ln.Close() +// for { +// c, err := ln.Accept() +// if err != nil { +// // error handling +// } +// go func(c net.Conn) { +// defer c.Close() +// +// The outgoing packets will be labeled DiffServ assured forwarding +// class 1 low drop precedence, as known as AF11 packets. +// +// if err := ipv4.NewConn(c).SetTOS(DiffServAF11); err != nil { +// // error handling +// } +// if _, err := c.Write(data); err != nil { +// // error handling +// } +// }(c) +// } +// +// +// Multicasting +// +// The options for multicasting are available for net.UDPConn and +// net.IPconn which are created as network connections that use the +// IPv4 transport. A few network facilities must be prepared before +// you begin multicasting, at a minimum joining network interfaces and +// multicast groups. +// +// en0, err := net.InterfaceByName("en0") +// if err != nil { +// // error handling +// } +// en1, err := net.InterfaceByIndex(911) +// if err != nil { +// // error handling +// } +// group := net.IPv4(224, 0, 0, 250) +// +// First, an application listens to an appropriate address with an +// appropriate service port. +// +// c, err := net.ListenPacket("udp4", "0.0.0.0:1024") +// if err != nil { +// // error handling +// } +// defer c.Close() +// +// Second, the application joins multicast groups, starts listening to +// the groups on the specified network interfaces. Note that the +// service port for transport layer protocol does not matter with this +// operation as joining groups affects only network and link layer +// protocols, such as IPv4 and Ethernet. +// +// p := ipv4.NewPacketConn(c) +// if err := p.JoinGroup(en0, &net.UDPAddr{IP: group}); err != nil { +// // error handling +// } +// if err := p.JoinGroup(en1, &net.UDPAddr{IP: group}); err != nil { +// // error handling +// } +// +// The application might set per packet control message transmissions +// between the protocol stack within the kernel. When the application +// needs a destination address on an incoming packet, +// SetControlMessage of ipv4.PacketConn is used to enable control +// message transmissons. +// +// if err := p.SetControlMessage(ipv4.FlagDst, true); err != nil { +// // error handling +// } +// +// The application could identify whether the received packets are +// of interest by using the control message that contains the +// destination address of the received packet. +// +// b := make([]byte, 1500) +// for { +// n, cm, src, err := p.ReadFrom(b) +// if err != nil { +// // error handling +// } +// if cm.Dst.IsMulticast() { +// if cm.Dst.Equal(group) +// // joined group, do something +// } else { +// // unknown group, discard +// continue +// } +// } +// +// The application can also send both unicast and multicast packets. +// +// p.SetTOS(DiffServCS0) +// p.SetTTL(16) +// if _, err := p.WriteTo(data, nil, src); err != nil { +// // error handling +// } +// dst := &net.UDPAddr{IP: group, Port: 1024} +// for _, ifi := range []*net.Interface{en0, en1} { +// if err := p.SetMulticastInterface(ifi); err != nil { +// // error handling +// } +// p.SetMulticastTTL(2) +// if _, err := p.WriteTo(data, nil, dst); err != nil { +// // error handling +// } +// } +// } +// +// +// More multicasting +// +// An application that uses PacketConn or RawConn may join multiple +// multicast groups. For example, a UDP listener with port 1024 might +// join two different groups across over two different network +// interfaces by using: +// +// c, err := net.ListenPacket("udp4", "0.0.0.0:1024") +// if err != nil { +// // error handling +// } +// defer c.Close() +// p := ipv4.NewPacketConn(c) +// if err := p.JoinGroup(en0, &net.UDPAddr{IP: net.IPv4(224, 0, 0, 248)}); err != nil { +// // error handling +// } +// if err := p.JoinGroup(en0, &net.UDPAddr{IP: net.IPv4(224, 0, 0, 249)}); err != nil { +// // error handling +// } +// if err := p.JoinGroup(en1, &net.UDPAddr{IP: net.IPv4(224, 0, 0, 249)}); err != nil { +// // error handling +// } +// +// It is possible for multiple UDP listeners that listen on the same +// UDP port to join the same multicast group. The net package will +// provide a socket that listens to a wildcard address with reusable +// UDP port when an appropriate multicast address prefix is passed to +// the net.ListenPacket or net.ListenUDP. +// +// c1, err := net.ListenPacket("udp4", "224.0.0.0:1024") +// if err != nil { +// // error handling +// } +// defer c1.Close() +// c2, err := net.ListenPacket("udp4", "224.0.0.0:1024") +// if err != nil { +// // error handling +// } +// defer c2.Close() +// p1 := ipv4.NewPacketConn(c1) +// if err := p1.JoinGroup(en0, &net.UDPAddr{IP: net.IPv4(224, 0, 0, 248)}); err != nil { +// // error handling +// } +// p2 := ipv4.NewPacketConn(c2) +// if err := p2.JoinGroup(en0, &net.UDPAddr{IP: net.IPv4(224, 0, 0, 248)}); err != nil { +// // error handling +// } +// +// Also it is possible for the application to leave or rejoin a +// multicast group on the network interface. +// +// if err := p.LeaveGroup(en0, &net.UDPAddr{IP: net.IPv4(224, 0, 0, 248)}); err != nil { +// // error handling +// } +// if err := p.JoinGroup(en0, &net.UDPAddr{IP: net.IPv4(224, 0, 0, 250)}); err != nil { +// // error handling +// } +package ipv4 diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/endpoint.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/endpoint.go new file mode 100644 index 000000000..27cc5808f --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/endpoint.go @@ -0,0 +1,181 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv4 + +import ( + "net" + "syscall" + "time" +) + +// A Conn represents a network endpoint that uses the IPv4 transport. +// It is used to control basic IP-level socket options such as TOS and +// TTL. +type Conn struct { + genericOpt +} + +type genericOpt struct { + net.Conn +} + +func (c *genericOpt) ok() bool { return c != nil && c.Conn != nil } + +// NewConn returns a new Conn. +func NewConn(c net.Conn) *Conn { + return &Conn{ + genericOpt: genericOpt{Conn: c}, + } +} + +// A PacketConn represents a packet network endpoint that uses the +// IPv4 transport. It is used to control several IP-level socket +// options including multicasting. It also provides datagram based +// network I/O methods specific to the IPv4 and higher layer protocols +// such as UDP. +type PacketConn struct { + genericOpt + dgramOpt + payloadHandler +} + +type dgramOpt struct { + net.PacketConn +} + +func (c *dgramOpt) ok() bool { return c != nil && c.PacketConn != nil } + +// SetControlMessage sets the per packet IP-level socket options. +func (c *PacketConn) SetControlMessage(cf ControlFlags, on bool) error { + if !c.payloadHandler.ok() { + return syscall.EINVAL + } + fd, err := c.payloadHandler.sysfd() + if err != nil { + return err + } + return setControlMessage(fd, &c.payloadHandler.rawOpt, cf, on) +} + +// SetDeadline sets the read and write deadlines associated with the +// endpoint. +func (c *PacketConn) SetDeadline(t time.Time) error { + if !c.payloadHandler.ok() { + return syscall.EINVAL + } + return c.payloadHandler.PacketConn.SetDeadline(t) +} + +// SetReadDeadline sets the read deadline associated with the +// endpoint. +func (c *PacketConn) SetReadDeadline(t time.Time) error { + if !c.payloadHandler.ok() { + return syscall.EINVAL + } + return c.payloadHandler.PacketConn.SetReadDeadline(t) +} + +// SetWriteDeadline sets the write deadline associated with the +// endpoint. +func (c *PacketConn) SetWriteDeadline(t time.Time) error { + if !c.payloadHandler.ok() { + return syscall.EINVAL + } + return c.payloadHandler.PacketConn.SetWriteDeadline(t) +} + +// Close closes the endpoint. +func (c *PacketConn) Close() error { + if !c.payloadHandler.ok() { + return syscall.EINVAL + } + return c.payloadHandler.PacketConn.Close() +} + +// NewPacketConn returns a new PacketConn using c as its underlying +// transport. +func NewPacketConn(c net.PacketConn) *PacketConn { + return &PacketConn{ + genericOpt: genericOpt{Conn: c.(net.Conn)}, + dgramOpt: dgramOpt{PacketConn: c}, + payloadHandler: payloadHandler{PacketConn: c}, + } +} + +// A RawConn represents a packet network endpoint that uses the IPv4 +// transport. It is used to control several IP-level socket options +// including IPv4 header manipulation. It also provides datagram +// based network I/O methods specific to the IPv4 and higher layer +// protocols that handle IPv4 datagram directly such as OSPF, GRE. +type RawConn struct { + genericOpt + dgramOpt + packetHandler +} + +// SetControlMessage sets the per packet IP-level socket options. +func (c *RawConn) SetControlMessage(cf ControlFlags, on bool) error { + if !c.packetHandler.ok() { + return syscall.EINVAL + } + fd, err := c.packetHandler.sysfd() + if err != nil { + return err + } + return setControlMessage(fd, &c.packetHandler.rawOpt, cf, on) +} + +// SetDeadline sets the read and write deadlines associated with the +// endpoint. +func (c *RawConn) SetDeadline(t time.Time) error { + if !c.packetHandler.ok() { + return syscall.EINVAL + } + return c.packetHandler.c.SetDeadline(t) +} + +// SetReadDeadline sets the read deadline associated with the +// endpoint. +func (c *RawConn) SetReadDeadline(t time.Time) error { + if !c.packetHandler.ok() { + return syscall.EINVAL + } + return c.packetHandler.c.SetReadDeadline(t) +} + +// SetWriteDeadline sets the write deadline associated with the +// endpoint. +func (c *RawConn) SetWriteDeadline(t time.Time) error { + if !c.packetHandler.ok() { + return syscall.EINVAL + } + return c.packetHandler.c.SetWriteDeadline(t) +} + +// Close closes the endpoint. +func (c *RawConn) Close() error { + if !c.packetHandler.ok() { + return syscall.EINVAL + } + return c.packetHandler.c.Close() +} + +// NewRawConn returns a new RawConn using c as its underlying +// transport. +func NewRawConn(c net.PacketConn) (*RawConn, error) { + r := &RawConn{ + genericOpt: genericOpt{Conn: c.(net.Conn)}, + dgramOpt: dgramOpt{PacketConn: c}, + packetHandler: packetHandler{c: c.(*net.IPConn)}, + } + fd, err := r.packetHandler.sysfd() + if err != nil { + return nil, err + } + if err := setInt(fd, &sockOpts[ssoHeaderPrepend], boolint(true)); err != nil { + return nil, err + } + return r, nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/genericopt_posix.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/genericopt_posix.go new file mode 100644 index 000000000..fefa0be36 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/genericopt_posix.go @@ -0,0 +1,59 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd windows + +package ipv4 + +import "syscall" + +// TOS returns the type-of-service field value for outgoing packets. +func (c *genericOpt) TOS() (int, error) { + if !c.ok() { + return 0, syscall.EINVAL + } + fd, err := c.sysfd() + if err != nil { + return 0, err + } + return getInt(fd, &sockOpts[ssoTOS]) +} + +// SetTOS sets the type-of-service field value for future outgoing +// packets. +func (c *genericOpt) SetTOS(tos int) error { + if !c.ok() { + return syscall.EINVAL + } + fd, err := c.sysfd() + if err != nil { + return err + } + return setInt(fd, &sockOpts[ssoTOS], tos) +} + +// TTL returns the time-to-live field value for outgoing packets. +func (c *genericOpt) TTL() (int, error) { + if !c.ok() { + return 0, syscall.EINVAL + } + fd, err := c.sysfd() + if err != nil { + return 0, err + } + return getInt(fd, &sockOpts[ssoTTL]) +} + +// SetTTL sets the time-to-live field value for future outgoing +// packets. +func (c *genericOpt) SetTTL(ttl int) error { + if !c.ok() { + return syscall.EINVAL + } + fd, err := c.sysfd() + if err != nil { + return err + } + return setInt(fd, &sockOpts[ssoTTL], ttl) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/genericopt_stub.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/genericopt_stub.go new file mode 100644 index 000000000..b202744d5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/genericopt_stub.go @@ -0,0 +1,27 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build nacl plan9 solaris + +package ipv4 + +func (c *genericOpt) TOS() (int, error) { + // TODO(mikio): Implement this + return 0, errOpNoSupport +} + +func (c *genericOpt) SetTOS(tos int) error { + // TODO(mikio): Implement this + return errOpNoSupport +} + +func (c *genericOpt) TTL() (int, error) { + // TODO(mikio): Implement this + return 0, errOpNoSupport +} + +func (c *genericOpt) SetTTL(ttl int) error { + // TODO(mikio): Implement this + return errOpNoSupport +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/header.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/header.go new file mode 100644 index 000000000..672f2d34d --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/header.go @@ -0,0 +1,163 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv4 + +import ( + "errors" + "fmt" + "net" + "runtime" + "syscall" + "unsafe" +) + +var ( + errMissingAddress = errors.New("missing address") + errMissingHeader = errors.New("missing header") + errHeaderTooShort = errors.New("header too short") + errBufferTooShort = errors.New("buffer too short") + errInvalidConnType = errors.New("invalid conn type") +) + +// References: +// +// RFC 791 Internet Protocol +// http://tools.ietf.org/html/rfc791 +// RFC 1112 Host Extensions for IP Multicasting +// http://tools.ietf.org/html/rfc1112 +// RFC 1122 Requirements for Internet Hosts +// http://tools.ietf.org/html/rfc1122 + +const ( + Version = 4 // protocol version + HeaderLen = 20 // header length without extension headers + maxHeaderLen = 60 // sensible default, revisit if later RFCs define new usage of version and header length fields +) + +const ( + posTOS = 1 // type-of-service + posTotalLen = 2 // packet total length + posID = 4 // identification + posFragOff = 6 // fragment offset + posTTL = 8 // time-to-live + posProtocol = 9 // next protocol + posChecksum = 10 // checksum + posSrc = 12 // source address + posDst = 16 // destination address +) + +type HeaderFlags int + +const ( + MoreFragments HeaderFlags = 1 << iota // more fragments flag + DontFragment // don't fragment flag +) + +// A Header represents an IPv4 header. +type Header struct { + Version int // protocol version + Len int // header length + TOS int // type-of-service + TotalLen int // packet total length + ID int // identification + Flags HeaderFlags // flags + FragOff int // fragment offset + TTL int // time-to-live + Protocol int // next protocol + Checksum int // checksum + Src net.IP // source address + Dst net.IP // destination address + Options []byte // options, extension headers +} + +func (h *Header) String() string { + if h == nil { + return "" + } + return fmt.Sprintf("ver: %v, hdrlen: %v, tos: %#x, totallen: %v, id: %#x, flags: %#x, fragoff: %#x, ttl: %v, proto: %v, cksum: %#x, src: %v, dst: %v", h.Version, h.Len, h.TOS, h.TotalLen, h.ID, h.Flags, h.FragOff, h.TTL, h.Protocol, h.Checksum, h.Src, h.Dst) +} + +// Please refer to the online manual; IP(4) on Darwin, FreeBSD and +// OpenBSD. IP(7) on Linux. +const supportsNewIPInput = runtime.GOOS == "linux" || runtime.GOOS == "openbsd" + +// Marshal returns the binary encoding of the IPv4 header h. +func (h *Header) Marshal() ([]byte, error) { + if h == nil { + return nil, syscall.EINVAL + } + if h.Len < HeaderLen { + return nil, errHeaderTooShort + } + hdrlen := HeaderLen + len(h.Options) + b := make([]byte, hdrlen) + b[0] = byte(Version<<4 | (hdrlen >> 2 & 0x0f)) + b[posTOS] = byte(h.TOS) + flagsAndFragOff := (h.FragOff & 0x1fff) | int(h.Flags<<13) + if supportsNewIPInput { + b[posTotalLen], b[posTotalLen+1] = byte(h.TotalLen>>8), byte(h.TotalLen) + b[posFragOff], b[posFragOff+1] = byte(flagsAndFragOff>>8), byte(flagsAndFragOff) + } else { + *(*uint16)(unsafe.Pointer(&b[posTotalLen : posTotalLen+1][0])) = uint16(h.TotalLen) + *(*uint16)(unsafe.Pointer(&b[posFragOff : posFragOff+1][0])) = uint16(flagsAndFragOff) + } + b[posID], b[posID+1] = byte(h.ID>>8), byte(h.ID) + b[posTTL] = byte(h.TTL) + b[posProtocol] = byte(h.Protocol) + b[posChecksum], b[posChecksum+1] = byte(h.Checksum>>8), byte(h.Checksum) + if ip := h.Src.To4(); ip != nil { + copy(b[posSrc:posSrc+net.IPv4len], ip[:net.IPv4len]) + } + if ip := h.Dst.To4(); ip != nil { + copy(b[posDst:posDst+net.IPv4len], ip[:net.IPv4len]) + } else { + return nil, errMissingAddress + } + if len(h.Options) > 0 { + copy(b[HeaderLen:], h.Options) + } + return b, nil +} + +// See http://www.freebsd.org/doc/en/books/porters-handbook/freebsd-versions.html. +var freebsdVersion uint32 + +// ParseHeader parses b as an IPv4 header. +func ParseHeader(b []byte) (*Header, error) { + if len(b) < HeaderLen { + return nil, errHeaderTooShort + } + hdrlen := int(b[0]&0x0f) << 2 + if hdrlen > len(b) { + return nil, errBufferTooShort + } + h := &Header{} + h.Version = int(b[0] >> 4) + h.Len = hdrlen + h.TOS = int(b[posTOS]) + if supportsNewIPInput { + h.TotalLen = int(b[posTotalLen])<<8 | int(b[posTotalLen+1]) + h.FragOff = int(b[posFragOff])<<8 | int(b[posFragOff+1]) + } else { + h.TotalLen = int(*(*uint16)(unsafe.Pointer(&b[posTotalLen : posTotalLen+1][0]))) + if runtime.GOOS != "freebsd" || freebsdVersion < 1000000 { + h.TotalLen += hdrlen + } + h.FragOff = int(*(*uint16)(unsafe.Pointer(&b[posFragOff : posFragOff+1][0]))) + } + h.Flags = HeaderFlags(h.FragOff&0xe000) >> 13 + h.FragOff = h.FragOff & 0x1fff + h.ID = int(b[posID])<<8 | int(b[posID+1]) + h.TTL = int(b[posTTL]) + h.Protocol = int(b[posProtocol]) + h.Checksum = int(b[posChecksum])<<8 | int(b[posChecksum+1]) + h.Src = net.IPv4(b[posSrc], b[posSrc+1], b[posSrc+2], b[posSrc+3]) + h.Dst = net.IPv4(b[posDst], b[posDst+1], b[posDst+2], b[posDst+3]) + if hdrlen-HeaderLen > 0 { + h.Options = make([]byte, hdrlen-HeaderLen) + copy(h.Options, b[HeaderLen:]) + } + return h, nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/helper.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/helper.go new file mode 100644 index 000000000..20c2d247b --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/helper.go @@ -0,0 +1,37 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv4 + +import ( + "errors" + "net" +) + +var ( + errOpNoSupport = errors.New("operation not supported") + errNoSuchInterface = errors.New("no such interface") + errNoSuchMulticastInterface = errors.New("no such multicast interface") +) + +func boolint(b bool) int { + if b { + return 1 + } + return 0 +} + +func netAddrToIP4(a net.Addr) net.IP { + switch v := a.(type) { + case *net.UDPAddr: + if ip := v.IP.To4(); ip != nil { + return ip + } + case *net.IPAddr: + if ip := v.IP.To4(); ip != nil { + return ip + } + } + return nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/helper_stub.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/helper_stub.go new file mode 100644 index 000000000..314d4d5f0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/helper_stub.go @@ -0,0 +1,27 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build nacl plan9 solaris + +package ipv4 + +func (c *genericOpt) sysfd() (int, error) { + // TODO(mikio): Implement this + return 0, errOpNoSupport +} + +func (c *dgramOpt) sysfd() (int, error) { + // TODO(mikio): Implement this + return 0, errOpNoSupport +} + +func (c *payloadHandler) sysfd() (int, error) { + // TODO(mikio): Implement this + return 0, errOpNoSupport +} + +func (c *packetHandler) sysfd() (int, error) { + // TODO(mikio): Implement this + return 0, errOpNoSupport +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/helper_unix.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/helper_unix.go new file mode 100644 index 000000000..345ca7dc7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/helper_unix.go @@ -0,0 +1,50 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd + +package ipv4 + +import ( + "net" + "reflect" +) + +func (c *genericOpt) sysfd() (int, error) { + switch p := c.Conn.(type) { + case *net.TCPConn, *net.UDPConn, *net.IPConn: + return sysfd(p) + } + return 0, errInvalidConnType +} + +func (c *dgramOpt) sysfd() (int, error) { + switch p := c.PacketConn.(type) { + case *net.UDPConn, *net.IPConn: + return sysfd(p.(net.Conn)) + } + return 0, errInvalidConnType +} + +func (c *payloadHandler) sysfd() (int, error) { + return sysfd(c.PacketConn.(net.Conn)) +} + +func (c *packetHandler) sysfd() (int, error) { + return sysfd(c.c) +} + +func sysfd(c net.Conn) (int, error) { + cv := reflect.ValueOf(c) + switch ce := cv.Elem(); ce.Kind() { + case reflect.Struct: + netfd := ce.FieldByName("conn").FieldByName("fd") + switch fe := netfd.Elem(); fe.Kind() { + case reflect.Struct: + fd := fe.FieldByName("sysfd") + return int(fd.Int()), nil + } + } + return 0, errInvalidConnType +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/helper_windows.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/helper_windows.go new file mode 100644 index 000000000..322b2a5e4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/helper_windows.go @@ -0,0 +1,49 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv4 + +import ( + "net" + "reflect" + "syscall" +) + +func (c *genericOpt) sysfd() (syscall.Handle, error) { + switch p := c.Conn.(type) { + case *net.TCPConn, *net.UDPConn, *net.IPConn: + return sysfd(p) + } + return syscall.InvalidHandle, errInvalidConnType +} + +func (c *dgramOpt) sysfd() (syscall.Handle, error) { + switch p := c.PacketConn.(type) { + case *net.UDPConn, *net.IPConn: + return sysfd(p.(net.Conn)) + } + return syscall.InvalidHandle, errInvalidConnType +} + +func (c *payloadHandler) sysfd() (syscall.Handle, error) { + return sysfd(c.PacketConn.(net.Conn)) +} + +func (c *packetHandler) sysfd() (syscall.Handle, error) { + return sysfd(c.c) +} + +func sysfd(c net.Conn) (syscall.Handle, error) { + cv := reflect.ValueOf(c) + switch ce := cv.Elem(); ce.Kind() { + case reflect.Struct: + netfd := ce.FieldByName("conn").FieldByName("fd") + switch fe := netfd.Elem(); fe.Kind() { + case reflect.Struct: + fd := fe.FieldByName("sysfd") + return syscall.Handle(fd.Uint()), nil + } + } + return syscall.InvalidHandle, errInvalidConnType +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/iana.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/iana.go new file mode 100644 index 000000000..be10c9488 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/iana.go @@ -0,0 +1,34 @@ +// go generate gen.go +// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +package ipv4 + +// Internet Control Message Protocol (ICMP) Parameters, Updated: 2013-04-19 +const ( + ICMPTypeEchoReply ICMPType = 0 // Echo Reply + ICMPTypeDestinationUnreachable ICMPType = 3 // Destination Unreachable + ICMPTypeRedirect ICMPType = 5 // Redirect + ICMPTypeEcho ICMPType = 8 // Echo + ICMPTypeRouterAdvertisement ICMPType = 9 // Router Advertisement + ICMPTypeRouterSolicitation ICMPType = 10 // Router Solicitation + ICMPTypeTimeExceeded ICMPType = 11 // Time Exceeded + ICMPTypeParameterProblem ICMPType = 12 // Parameter Problem + ICMPTypeTimestamp ICMPType = 13 // Timestamp + ICMPTypeTimestampReply ICMPType = 14 // Timestamp Reply + ICMPTypePhoturis ICMPType = 40 // Photuris +) + +// Internet Control Message Protocol (ICMP) Parameters, Updated: 2013-04-19 +var icmpTypes = map[ICMPType]string{ + 0: "echo reply", + 3: "destination unreachable", + 5: "redirect", + 8: "echo", + 9: "router advertisement", + 10: "router solicitation", + 11: "time exceeded", + 12: "parameter problem", + 13: "timestamp", + 14: "timestamp reply", + 40: "photuris", +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/icmp.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/icmp.go new file mode 100644 index 000000000..d595967f9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/icmp.go @@ -0,0 +1,16 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv4 + +// An ICMPType represents a type of ICMP message. +type ICMPType int + +func (typ ICMPType) String() string { + s, ok := icmpTypes[typ] + if !ok { + return "" + } + return s +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/packet.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/packet.go new file mode 100644 index 000000000..09864314e --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/packet.go @@ -0,0 +1,97 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv4 + +import ( + "net" + "syscall" +) + +// A packetHandler represents the IPv4 datagram handler. +type packetHandler struct { + c *net.IPConn + rawOpt +} + +func (c *packetHandler) ok() bool { return c != nil && c.c != nil } + +// ReadFrom reads an IPv4 datagram from the endpoint c, copying the +// datagram into b. It returns the received datagram as the IPv4 +// header h, the payload p and the control message cm. +func (c *packetHandler) ReadFrom(b []byte) (h *Header, p []byte, cm *ControlMessage, err error) { + if !c.ok() { + return nil, nil, nil, syscall.EINVAL + } + oob := newControlMessage(&c.rawOpt) + n, oobn, _, src, err := c.c.ReadMsgIP(b, oob) + if err != nil { + return nil, nil, nil, err + } + var hs []byte + if hs, p, err = slicePacket(b[:n]); err != nil { + return nil, nil, nil, err + } + if h, err = ParseHeader(hs); err != nil { + return nil, nil, nil, err + } + if cm, err = parseControlMessage(oob[:oobn]); err != nil { + return nil, nil, nil, err + } + if src != nil && cm != nil { + cm.Src = src.IP + } + return +} + +func slicePacket(b []byte) (h, p []byte, err error) { + if len(b) < HeaderLen { + return nil, nil, errHeaderTooShort + } + hdrlen := int(b[0]&0x0f) << 2 + return b[:hdrlen], b[hdrlen:], nil +} + +// WriteTo writes an IPv4 datagram through the endpoint c, copying the +// datagram from the IPv4 header h and the payload p. The control +// message cm allows the datagram path and the outgoing interface to be +// specified. Currently only Darwin and Linux support this. The cm +// may be nil if control of the outgoing datagram is not required. +// +// The IPv4 header h must contain appropriate fields that include: +// +// Version = ipv4.Version +// Len = +// TOS = +// TotalLen = +// ID = platform sets an appropriate value if ID is zero +// FragOff = +// TTL = +// Protocol = +// Checksum = platform sets an appropriate value if Checksum is zero +// Src = platform sets an appropriate value if Src is nil +// Dst = +// Options = optional +func (c *packetHandler) WriteTo(h *Header, p []byte, cm *ControlMessage) error { + if !c.ok() { + return syscall.EINVAL + } + oob := marshalControlMessage(cm) + wh, err := h.Marshal() + if err != nil { + return err + } + dst := &net.IPAddr{} + if cm != nil { + if ip := cm.Dst.To4(); ip != nil { + dst.IP = ip + } + } + if dst.IP == nil { + dst.IP = h.Dst + } + wh = append(wh, p...) + _, _, err = c.c.WriteMsgIP(wh, oob, dst) + return err +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/payload.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/payload.go new file mode 100644 index 000000000..d7698cbd3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/payload.go @@ -0,0 +1,15 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv4 + +import "net" + +// A payloadHandler represents the IPv4 datagram payload handler. +type payloadHandler struct { + net.PacketConn + rawOpt +} + +func (c *payloadHandler) ok() bool { return c != nil && c.PacketConn != nil } diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/payload_cmsg.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/payload_cmsg.go new file mode 100644 index 000000000..2cda8b996 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/payload_cmsg.go @@ -0,0 +1,75 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !plan9,!solaris,!windows + +package ipv4 + +import ( + "net" + "syscall" +) + +// ReadFrom reads a payload of the received IPv4 datagram, from the +// endpoint c, copying the payload into b. It returns the number of +// bytes copied into b, the control message cm and the source address +// src of the received datagram. +func (c *payloadHandler) ReadFrom(b []byte) (n int, cm *ControlMessage, src net.Addr, err error) { + if !c.ok() { + return 0, nil, nil, syscall.EINVAL + } + oob := newControlMessage(&c.rawOpt) + var oobn int + switch c := c.PacketConn.(type) { + case *net.UDPConn: + if n, oobn, _, src, err = c.ReadMsgUDP(b, oob); err != nil { + return 0, nil, nil, err + } + case *net.IPConn: + nb := make([]byte, maxHeaderLen+len(b)) + if n, oobn, _, src, err = c.ReadMsgIP(nb, oob); err != nil { + return 0, nil, nil, err + } + hdrlen := int(nb[0]&0x0f) << 2 + copy(b, nb[hdrlen:]) + n -= hdrlen + default: + return 0, nil, nil, errInvalidConnType + } + if cm, err = parseControlMessage(oob[:oobn]); err != nil { + return 0, nil, nil, err + } + if cm != nil { + cm.Src = netAddrToIP4(src) + } + return +} + +// WriteTo writes a payload of the IPv4 datagram, to the destination +// address dst through the endpoint c, copying the payload from b. It +// returns the number of bytes written. The control message cm allows +// the datagram path and the outgoing interface to be specified. +// Currently only Darwin and Darwin support this. The cm may be nil if +// control of the outgoing datagram is not required. +func (c *payloadHandler) WriteTo(b []byte, cm *ControlMessage, dst net.Addr) (n int, err error) { + if !c.ok() { + return 0, syscall.EINVAL + } + oob := marshalControlMessage(cm) + if dst == nil { + return 0, errMissingAddress + } + switch c := c.PacketConn.(type) { + case *net.UDPConn: + n, _, err = c.WriteMsgUDP(b, oob, dst.(*net.UDPAddr)) + case *net.IPConn: + n, _, err = c.WriteMsgIP(b, oob, dst.(*net.IPAddr)) + default: + return 0, errInvalidConnType + } + if err != nil { + return 0, err + } + return +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/payload_nocmsg.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/payload_nocmsg.go new file mode 100644 index 000000000..d128c9c2e --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/payload_nocmsg.go @@ -0,0 +1,42 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build plan9 solaris windows + +package ipv4 + +import ( + "net" + "syscall" +) + +// ReadFrom reads a payload of the received IPv4 datagram, from the +// endpoint c, copying the payload into b. It returns the number of +// bytes copied into b, the control message cm and the source address +// src of the received datagram. +func (c *payloadHandler) ReadFrom(b []byte) (n int, cm *ControlMessage, src net.Addr, err error) { + if !c.ok() { + return 0, nil, nil, syscall.EINVAL + } + if n, src, err = c.PacketConn.ReadFrom(b); err != nil { + return 0, nil, nil, err + } + return +} + +// WriteTo writes a payload of the IPv4 datagram, to the destination +// address dst through the endpoint c, copying the payload from b. It +// returns the number of bytes written. The control message cm allows +// the datagram path and the outgoing interface to be specified. +// Currently only Darwin and Linux support this. The cm may be nil if +// control of the outgoing datagram is not required. +func (c *payloadHandler) WriteTo(b []byte, cm *ControlMessage, dst net.Addr) (n int, err error) { + if !c.ok() { + return 0, syscall.EINVAL + } + if dst == nil { + return 0, errMissingAddress + } + return c.PacketConn.WriteTo(b, dst) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sockopt.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sockopt.go new file mode 100644 index 000000000..4f4e5b530 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sockopt.go @@ -0,0 +1,37 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv4 + +// Sticky socket options +const ( + ssoTOS = iota // header field for unicast packet + ssoTTL // header field for unicast packet + ssoMulticastTTL // header field for multicast packet + ssoMulticastInterface // outbound interface for multicast packet + ssoMulticastLoopback // loopback for multicast packet + ssoReceiveTTL // header field on received packet + ssoReceiveDst // header field on received packet + ssoReceiveInterface // inbound interface on received packet + ssoPacketInfo // incbound or outbound packet path + ssoHeaderPrepend // ipv4 header + ssoJoinGroup // any-source multicast + ssoLeaveGroup // any-source multicast + ssoMax +) + +// Sticky socket option value types +const ( + ssoTypeByte = iota + 1 + ssoTypeInt + ssoTypeInterface + ssoTypeIPMreq + ssoTypeIPMreqn +) + +// A sockOpt represents a binding for sticky socket option. +type sockOpt struct { + name int // option name, must be equal or greater than 1 + typ int // option value type, must be equal or greater than 1 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sockopt_asmreq.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sockopt_asmreq.go new file mode 100644 index 000000000..4a6aa78ef --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sockopt_asmreq.go @@ -0,0 +1,83 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd netbsd openbsd windows + +package ipv4 + +import "net" + +func setIPMreqInterface(mreq *sysIPMreq, ifi *net.Interface) error { + if ifi == nil { + return nil + } + ifat, err := ifi.Addrs() + if err != nil { + return err + } + for _, ifa := range ifat { + switch ifa := ifa.(type) { + case *net.IPAddr: + if ip := ifa.IP.To4(); ip != nil { + copy(mreq.Interface[:], ip) + return nil + } + case *net.IPNet: + if ip := ifa.IP.To4(); ip != nil { + copy(mreq.Interface[:], ip) + return nil + } + } + } + return errNoSuchInterface +} + +func netIP4ToInterface(ip net.IP) (*net.Interface, error) { + ift, err := net.Interfaces() + if err != nil { + return nil, err + } + for _, ifi := range ift { + ifat, err := ifi.Addrs() + if err != nil { + return nil, err + } + for _, ifa := range ifat { + switch ifa := ifa.(type) { + case *net.IPAddr: + if ip.Equal(ifa.IP) { + return &ifi, nil + } + case *net.IPNet: + if ip.Equal(ifa.IP) { + return &ifi, nil + } + } + } + } + return nil, errNoSuchInterface +} + +func netInterfaceToIP4(ifi *net.Interface) (net.IP, error) { + if ifi == nil { + return net.IPv4zero.To4(), nil + } + ifat, err := ifi.Addrs() + if err != nil { + return nil, err + } + for _, ifa := range ifat { + switch ifa := ifa.(type) { + case *net.IPAddr: + if ip := ifa.IP.To4(); ip != nil { + return ip, nil + } + case *net.IPNet: + if ip := ifa.IP.To4(); ip != nil { + return ip, nil + } + } + } + return nil, errNoSuchInterface +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sockopt_asmreq_stub.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sockopt_asmreq_stub.go new file mode 100644 index 000000000..45551528b --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sockopt_asmreq_stub.go @@ -0,0 +1,21 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !darwin,!dragonfly,!freebsd,!netbsd,!openbsd,!windows + +package ipv4 + +import "net" + +func setsockoptIPMreq(fd, name int, ifi *net.Interface, grp net.IP) error { + return errOpNoSupport +} + +func getsockoptInterface(fd, name int) (*net.Interface, error) { + return nil, errOpNoSupport +} + +func setsockoptInterface(fd, name int, ifi *net.Interface) error { + return errOpNoSupport +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sockopt_asmreq_unix.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sockopt_asmreq_unix.go new file mode 100644 index 000000000..e8816991d --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sockopt_asmreq_unix.go @@ -0,0 +1,46 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd netbsd openbsd + +package ipv4 + +import ( + "net" + "os" + "unsafe" + + "github.com/hashicorp/go.net/internal/iana" +) + +func setsockoptIPMreq(fd, name int, ifi *net.Interface, grp net.IP) error { + mreq := sysIPMreq{Multiaddr: [4]byte{grp[0], grp[1], grp[2], grp[3]}} + if err := setIPMreqInterface(&mreq, ifi); err != nil { + return err + } + return os.NewSyscallError("setsockopt", setsockopt(fd, iana.ProtocolIP, name, unsafe.Pointer(&mreq), sysSizeofIPMreq)) +} + +func getsockoptInterface(fd, name int) (*net.Interface, error) { + var b [4]byte + l := sysSockoptLen(4) + if err := getsockopt(fd, iana.ProtocolIP, name, unsafe.Pointer(&b[0]), &l); err != nil { + return nil, os.NewSyscallError("getsockopt", err) + } + ifi, err := netIP4ToInterface(net.IPv4(b[0], b[1], b[2], b[3])) + if err != nil { + return nil, err + } + return ifi, nil +} + +func setsockoptInterface(fd, name int, ifi *net.Interface) error { + ip, err := netInterfaceToIP4(ifi) + if err != nil { + return err + } + var b [4]byte + copy(b[:], ip) + return os.NewSyscallError("setsockopt", setsockopt(fd, iana.ProtocolIP, name, unsafe.Pointer(&b[0]), sysSockoptLen(4))) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sockopt_asmreq_windows.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sockopt_asmreq_windows.go new file mode 100644 index 000000000..7faaefc3d --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sockopt_asmreq_windows.go @@ -0,0 +1,45 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv4 + +import ( + "net" + "os" + "syscall" + "unsafe" + + "github.com/hashicorp/go.net/internal/iana" +) + +func setsockoptIPMreq(fd syscall.Handle, name int, ifi *net.Interface, grp net.IP) error { + mreq := sysIPMreq{Multiaddr: [4]byte{grp[0], grp[1], grp[2], grp[3]}} + if err := setIPMreqInterface(&mreq, ifi); err != nil { + return err + } + return os.NewSyscallError("setsockopt", syscall.Setsockopt(fd, iana.ProtocolIP, int32(name), (*byte)(unsafe.Pointer(&mreq)), int32(sysSizeofIPMreq))) +} + +func getsockoptInterface(fd syscall.Handle, name int) (*net.Interface, error) { + var b [4]byte + l := int32(4) + if err := syscall.Getsockopt(fd, iana.ProtocolIP, int32(name), (*byte)(unsafe.Pointer(&b[0])), &l); err != nil { + return nil, os.NewSyscallError("getsockopt", err) + } + ifi, err := netIP4ToInterface(net.IPv4(b[0], b[1], b[2], b[3])) + if err != nil { + return nil, err + } + return ifi, nil +} + +func setsockoptInterface(fd syscall.Handle, name int, ifi *net.Interface) error { + ip, err := netInterfaceToIP4(ifi) + if err != nil { + return err + } + var b [4]byte + copy(b[:], ip) + return os.NewSyscallError("setsockopt", syscall.Setsockopt(fd, iana.ProtocolIP, int32(name), (*byte)(unsafe.Pointer(&b[0])), 4)) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sockopt_asmreqn_stub.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sockopt_asmreqn_stub.go new file mode 100644 index 000000000..332f403e8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sockopt_asmreqn_stub.go @@ -0,0 +1,17 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !darwin,!freebsd,!linux,!windows + +package ipv4 + +import "net" + +func getsockoptIPMreqn(fd, name int) (*net.Interface, error) { + return nil, errOpNoSupport +} + +func setsockoptIPMreqn(fd, name int, ifi *net.Interface, grp net.IP) error { + return errOpNoSupport +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sockopt_asmreqn_unix.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sockopt_asmreqn_unix.go new file mode 100644 index 000000000..dd8f90b6f --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sockopt_asmreqn_unix.go @@ -0,0 +1,42 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin freebsd linux + +package ipv4 + +import ( + "net" + "os" + "unsafe" + + "github.com/hashicorp/go.net/internal/iana" +) + +func getsockoptIPMreqn(fd, name int) (*net.Interface, error) { + var mreqn sysIPMreqn + l := sysSockoptLen(sysSizeofIPMreqn) + if err := getsockopt(fd, iana.ProtocolIP, name, unsafe.Pointer(&mreqn), &l); err != nil { + return nil, os.NewSyscallError("getsockopt", err) + } + if mreqn.Ifindex == 0 { + return nil, nil + } + ifi, err := net.InterfaceByIndex(int(mreqn.Ifindex)) + if err != nil { + return nil, err + } + return ifi, nil +} + +func setsockoptIPMreqn(fd, name int, ifi *net.Interface, grp net.IP) error { + var mreqn sysIPMreqn + if ifi != nil { + mreqn.Ifindex = int32(ifi.Index) + } + if grp != nil { + mreqn.Multiaddr = [4]byte{grp[0], grp[1], grp[2], grp[3]} + } + return os.NewSyscallError("setsockopt", setsockopt(fd, iana.ProtocolIP, name, unsafe.Pointer(&mreqn), sysSizeofIPMreqn)) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sockopt_stub.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sockopt_stub.go new file mode 100644 index 000000000..5ba892f84 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sockopt_stub.go @@ -0,0 +1,29 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build nacl plan9 solaris + +package ipv4 + +import "net" + +func getInt(fd int, opt *sockOpt) (int, error) { + return 0, errOpNoSupport +} + +func setInt(fd int, opt *sockOpt, v int) error { + return errOpNoSupport +} + +func getInterface(fd int, opt *sockOpt) (*net.Interface, error) { + return nil, errOpNoSupport +} + +func setInterface(fd int, opt *sockOpt, ifi *net.Interface) error { + return errOpNoSupport +} + +func setGroup(fd int, opt *sockOpt, ifi *net.Interface, ip net.IP) error { + return errOpNoSupport +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sockopt_unix.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sockopt_unix.go new file mode 100644 index 000000000..8320e8046 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sockopt_unix.go @@ -0,0 +1,94 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd + +package ipv4 + +import ( + "net" + "os" + "unsafe" + + "github.com/hashicorp/go.net/internal/iana" +) + +func getInt(fd int, opt *sockOpt) (int, error) { + if opt.name < 1 || (opt.typ != ssoTypeByte && opt.typ != ssoTypeInt) { + return 0, errOpNoSupport + } + var i int32 + var b byte + p := unsafe.Pointer(&i) + l := sysSockoptLen(4) + if opt.typ == ssoTypeByte { + p = unsafe.Pointer(&b) + l = sysSockoptLen(1) + } + if err := getsockopt(fd, iana.ProtocolIP, opt.name, p, &l); err != nil { + return 0, os.NewSyscallError("getsockopt", err) + } + if opt.typ == ssoTypeByte { + return int(b), nil + } + return int(i), nil +} + +func setInt(fd int, opt *sockOpt, v int) error { + if opt.name < 1 || (opt.typ != ssoTypeByte && opt.typ != ssoTypeInt) { + return errOpNoSupport + } + i := int32(v) + var b byte + p := unsafe.Pointer(&i) + l := sysSockoptLen(4) + if opt.typ == ssoTypeByte { + b = byte(v) + p = unsafe.Pointer(&b) + l = sysSockoptLen(1) + } + return os.NewSyscallError("setsockopt", setsockopt(fd, iana.ProtocolIP, opt.name, p, l)) +} + +func getInterface(fd int, opt *sockOpt) (*net.Interface, error) { + if opt.name < 1 { + return nil, errOpNoSupport + } + switch opt.typ { + case ssoTypeInterface: + return getsockoptInterface(fd, opt.name) + case ssoTypeIPMreqn: + return getsockoptIPMreqn(fd, opt.name) + default: + return nil, errOpNoSupport + } +} + +func setInterface(fd int, opt *sockOpt, ifi *net.Interface) error { + if opt.name < 1 { + return errOpNoSupport + } + switch opt.typ { + case ssoTypeInterface: + return setsockoptInterface(fd, opt.name, ifi) + case ssoTypeIPMreqn: + return setsockoptIPMreqn(fd, opt.name, ifi, nil) + default: + return errOpNoSupport + } +} + +func setGroup(fd int, opt *sockOpt, ifi *net.Interface, grp net.IP) error { + if opt.name < 1 { + return errOpNoSupport + } + switch opt.typ { + case ssoTypeIPMreq: + return setsockoptIPMreq(fd, opt.name, ifi, grp) + case ssoTypeIPMreqn: + return setsockoptIPMreqn(fd, opt.name, ifi, grp) + default: + return errOpNoSupport + } +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sockopt_windows.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sockopt_windows.go new file mode 100644 index 000000000..ca30099ad --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sockopt_windows.go @@ -0,0 +1,55 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv4 + +import ( + "net" + "os" + "syscall" + "unsafe" + + "github.com/hashicorp/go.net/internal/iana" +) + +func getInt(fd syscall.Handle, opt *sockOpt) (int, error) { + if opt.name < 1 || opt.typ != ssoTypeInt { + return 0, errOpNoSupport + } + var i int32 + l := int32(4) + if err := syscall.Getsockopt(fd, iana.ProtocolIP, int32(opt.name), (*byte)(unsafe.Pointer(&i)), &l); err != nil { + return 0, os.NewSyscallError("getsockopt", err) + } + return int(i), nil +} + +func setInt(fd syscall.Handle, opt *sockOpt, v int) error { + if opt.name < 1 || opt.typ != ssoTypeInt { + return errOpNoSupport + } + i := int32(v) + return os.NewSyscallError("setsockopt", syscall.Setsockopt(fd, iana.ProtocolIP, int32(opt.name), (*byte)(unsafe.Pointer(&i)), 4)) +} + +func getInterface(fd syscall.Handle, opt *sockOpt) (*net.Interface, error) { + if opt.name < 1 || opt.typ != ssoTypeInterface { + return nil, errOpNoSupport + } + return getsockoptInterface(fd, opt.name) +} + +func setInterface(fd syscall.Handle, opt *sockOpt, ifi *net.Interface) error { + if opt.name < 1 || opt.typ != ssoTypeInterface { + return errOpNoSupport + } + return setsockoptInterface(fd, opt.name, ifi) +} + +func setGroup(fd syscall.Handle, opt *sockOpt, ifi *net.Interface, grp net.IP) error { + if opt.name < 1 || opt.typ != ssoTypeIPMreq { + return errOpNoSupport + } + return setsockoptIPMreq(fd, opt.name, ifi, grp) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sys_bsd.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sys_bsd.go new file mode 100644 index 000000000..a669a4403 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sys_bsd.go @@ -0,0 +1,36 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build dragonfly netbsd + +package ipv4 + +import ( + "net" + "syscall" +) + +type sysSockoptLen int32 + +var ( + ctlOpts = [ctlMax]ctlOpt{ + ctlTTL: {sysIP_RECVTTL, 1, marshalTTL, parseTTL}, + ctlDst: {sysIP_RECVDSTADDR, net.IPv4len, marshalDst, parseDst}, + ctlInterface: {sysIP_RECVIF, syscall.SizeofSockaddrDatalink, marshalInterface, parseInterface}, + } + + sockOpts = [ssoMax]sockOpt{ + ssoTOS: {sysIP_TOS, ssoTypeInt}, + ssoTTL: {sysIP_TTL, ssoTypeInt}, + ssoMulticastTTL: {sysIP_MULTICAST_TTL, ssoTypeByte}, + ssoMulticastInterface: {sysIP_MULTICAST_IF, ssoTypeInterface}, + ssoMulticastLoopback: {sysIP_MULTICAST_LOOP, ssoTypeInt}, + ssoReceiveTTL: {sysIP_RECVTTL, ssoTypeInt}, + ssoReceiveDst: {sysIP_RECVDSTADDR, ssoTypeInt}, + ssoReceiveInterface: {sysIP_RECVIF, ssoTypeInt}, + ssoHeaderPrepend: {sysIP_HDRINCL, ssoTypeInt}, + ssoJoinGroup: {sysIP_ADD_MEMBERSHIP, ssoTypeIPMreq}, + ssoLeaveGroup: {sysIP_DROP_MEMBERSHIP, ssoTypeIPMreq}, + } +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sys_darwin.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sys_darwin.go new file mode 100644 index 000000000..75f1e5121 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sys_darwin.go @@ -0,0 +1,64 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv4 + +import ( + "net" + "syscall" +) + +type sysSockoptLen int32 + +var ( + ctlOpts = [ctlMax]ctlOpt{ + ctlTTL: {sysIP_RECVTTL, 1, marshalTTL, parseTTL}, + ctlDst: {sysIP_RECVDSTADDR, net.IPv4len, marshalDst, parseDst}, + ctlInterface: {sysIP_RECVIF, syscall.SizeofSockaddrDatalink, marshalInterface, parseInterface}, + } + + sockOpts = [ssoMax]sockOpt{ + ssoTOS: {sysIP_TOS, ssoTypeInt}, + ssoTTL: {sysIP_TTL, ssoTypeInt}, + ssoMulticastTTL: {sysIP_MULTICAST_TTL, ssoTypeByte}, + ssoMulticastInterface: {sysIP_MULTICAST_IF, ssoTypeInterface}, + ssoMulticastLoopback: {sysIP_MULTICAST_LOOP, ssoTypeInt}, + ssoReceiveTTL: {sysIP_RECVTTL, ssoTypeInt}, + ssoReceiveDst: {sysIP_RECVDSTADDR, ssoTypeInt}, + ssoReceiveInterface: {sysIP_RECVIF, ssoTypeInt}, + ssoHeaderPrepend: {sysIP_HDRINCL, ssoTypeInt}, + ssoJoinGroup: {sysIP_ADD_MEMBERSHIP, ssoTypeIPMreq}, + ssoLeaveGroup: {sysIP_DROP_MEMBERSHIP, ssoTypeIPMreq}, + } +) + +func init() { + // Seems like kern.osreldate is veiled on latest OS X. We use + // kern.osrelease instead. + osver, err := syscall.Sysctl("kern.osrelease") + if err != nil { + return + } + var i int + for i = range osver { + if osver[i] != '.' { + continue + } + } + // The IP_PKTINFO was introduced in OS X 10.7 (Darwin + // 11.0.0). See http://support.apple.com/kb/HT1633. + if i > 2 || i == 2 && osver[0] >= '1' && osver[1] >= '1' { + ctlOpts[ctlPacketInfo].name = sysIP_PKTINFO + ctlOpts[ctlPacketInfo].length = sysSizeofInetPktinfo + ctlOpts[ctlPacketInfo].marshal = marshalPacketInfo + ctlOpts[ctlPacketInfo].parse = parsePacketInfo + sockOpts[ssoPacketInfo].name = sysIP_RECVPKTINFO + sockOpts[ssoPacketInfo].typ = ssoTypeInt + sockOpts[ssoMulticastInterface].typ = ssoTypeIPMreqn + } +} + +func (pi *sysInetPktinfo) setIfindex(i int) { + pi.Ifindex = uint32(i) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sys_freebsd.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sys_freebsd.go new file mode 100644 index 000000000..61dcc1412 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sys_freebsd.go @@ -0,0 +1,41 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv4 + +import ( + "net" + "syscall" +) + +type sysSockoptLen int32 + +var ( + ctlOpts = [ctlMax]ctlOpt{ + ctlTTL: {sysIP_RECVTTL, 1, marshalTTL, parseTTL}, + ctlDst: {sysIP_RECVDSTADDR, net.IPv4len, marshalDst, parseDst}, + ctlInterface: {sysIP_RECVIF, syscall.SizeofSockaddrDatalink, marshalInterface, parseInterface}, + } + + sockOpts = [ssoMax]sockOpt{ + ssoTOS: {sysIP_TOS, ssoTypeInt}, + ssoTTL: {sysIP_TTL, ssoTypeInt}, + ssoMulticastTTL: {sysIP_MULTICAST_TTL, ssoTypeByte}, + ssoMulticastInterface: {sysIP_MULTICAST_IF, ssoTypeInterface}, + ssoMulticastLoopback: {sysIP_MULTICAST_LOOP, ssoTypeInt}, + ssoReceiveTTL: {sysIP_RECVTTL, ssoTypeInt}, + ssoReceiveDst: {sysIP_RECVDSTADDR, ssoTypeInt}, + ssoReceiveInterface: {sysIP_RECVIF, ssoTypeInt}, + ssoHeaderPrepend: {sysIP_HDRINCL, ssoTypeInt}, + ssoJoinGroup: {sysIP_ADD_MEMBERSHIP, ssoTypeIPMreq}, + ssoLeaveGroup: {sysIP_DROP_MEMBERSHIP, ssoTypeIPMreq}, + } +) + +func init() { + freebsdVersion, _ = syscall.SysctlUint32("kern.osreldate") + if freebsdVersion >= 1000000 { + sockOpts[ssoMulticastInterface].typ = ssoTypeIPMreqn + } +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sys_linux.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sys_linux.go new file mode 100644 index 000000000..f9dd72f9b --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sys_linux.go @@ -0,0 +1,31 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv4 + +type sysSockoptLen int32 + +var ( + ctlOpts = [ctlMax]ctlOpt{ + ctlTTL: {sysIP_TTL, 1, marshalTTL, parseTTL}, + ctlPacketInfo: {sysIP_PKTINFO, sysSizeofInetPktinfo, marshalPacketInfo, parsePacketInfo}, + } + + sockOpts = [ssoMax]sockOpt{ + ssoTOS: {sysIP_TOS, ssoTypeInt}, + ssoTTL: {sysIP_TTL, ssoTypeInt}, + ssoMulticastTTL: {sysIP_MULTICAST_TTL, ssoTypeInt}, + ssoMulticastInterface: {sysIP_MULTICAST_IF, ssoTypeIPMreqn}, + ssoMulticastLoopback: {sysIP_MULTICAST_LOOP, ssoTypeInt}, + ssoReceiveTTL: {sysIP_RECVTTL, ssoTypeInt}, + ssoPacketInfo: {sysIP_PKTINFO, ssoTypeInt}, + ssoHeaderPrepend: {sysIP_HDRINCL, ssoTypeInt}, + ssoJoinGroup: {sysIP_ADD_MEMBERSHIP, ssoTypeIPMreqn}, + ssoLeaveGroup: {sysIP_DROP_MEMBERSHIP, ssoTypeIPMreqn}, + } +) + +func (pi *sysInetPktinfo) setIfindex(i int) { + pi.Ifindex = int32(i) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sys_openbsd.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sys_openbsd.go new file mode 100644 index 000000000..550f20816 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sys_openbsd.go @@ -0,0 +1,34 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv4 + +import ( + "net" + "syscall" +) + +type sysSockoptLen int32 + +var ( + ctlOpts = [ctlMax]ctlOpt{ + ctlTTL: {sysIP_RECVTTL, 1, marshalTTL, parseTTL}, + ctlDst: {sysIP_RECVDSTADDR, net.IPv4len, marshalDst, parseDst}, + ctlInterface: {sysIP_RECVIF, syscall.SizeofSockaddrDatalink, marshalInterface, parseInterface}, + } + + sockOpts = [ssoMax]sockOpt{ + ssoTOS: {sysIP_TOS, ssoTypeInt}, + ssoTTL: {sysIP_TTL, ssoTypeInt}, + ssoMulticastTTL: {sysIP_MULTICAST_TTL, ssoTypeByte}, + ssoMulticastInterface: {sysIP_MULTICAST_IF, ssoTypeInterface}, + ssoMulticastLoopback: {sysIP_MULTICAST_LOOP, ssoTypeByte}, + ssoReceiveTTL: {sysIP_RECVTTL, ssoTypeInt}, + ssoReceiveDst: {sysIP_RECVDSTADDR, ssoTypeInt}, + ssoReceiveInterface: {sysIP_RECVIF, ssoTypeInt}, + ssoHeaderPrepend: {sysIP_HDRINCL, ssoTypeInt}, + ssoJoinGroup: {sysIP_ADD_MEMBERSHIP, ssoTypeIPMreq}, + ssoLeaveGroup: {sysIP_DROP_MEMBERSHIP, ssoTypeIPMreq}, + } +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sys_stub.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sys_stub.go new file mode 100644 index 000000000..efbcc479a --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sys_stub.go @@ -0,0 +1,15 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build nacl plan9 solaris + +package ipv4 + +type sysSockoptLen int32 + +var ( + ctlOpts = [ctlMax]ctlOpt{} + + sockOpts = [ssoMax]sockOpt{} +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sys_windows.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sys_windows.go new file mode 100644 index 000000000..466489fe0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/sys_windows.go @@ -0,0 +1,61 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv4 + +const ( + // See ws2tcpip.h. + sysIP_OPTIONS = 0x1 + sysIP_HDRINCL = 0x2 + sysIP_TOS = 0x3 + sysIP_TTL = 0x4 + sysIP_MULTICAST_IF = 0x9 + sysIP_MULTICAST_TTL = 0xa + sysIP_MULTICAST_LOOP = 0xb + sysIP_ADD_MEMBERSHIP = 0xc + sysIP_DROP_MEMBERSHIP = 0xd + sysIP_DONTFRAGMENT = 0xe + sysIP_ADD_SOURCE_MEMBERSHIP = 0xf + sysIP_DROP_SOURCE_MEMBERSHIP = 0x10 + sysIP_PKTINFO = 0x13 + + sysSizeofInetPktinfo = 0x8 + sysSizeofIPMreq = 0x8 + sysSizeofIPMreqSource = 0xc +) + +type sysInetPktinfo struct { + Addr [4]byte + Ifindex int32 +} + +type sysIPMreq struct { + Multiaddr [4]byte + Interface [4]byte +} + +type sysIPMreqSource struct { + Multiaddr [4]byte + Sourceaddr [4]byte + Interface [4]byte +} + +// See http://msdn.microsoft.com/en-us/library/windows/desktop/ms738586(v=vs.85).aspx +var ( + ctlOpts = [ctlMax]ctlOpt{} + + sockOpts = [ssoMax]sockOpt{ + ssoTOS: {sysIP_TOS, ssoTypeInt}, + ssoTTL: {sysIP_TTL, ssoTypeInt}, + ssoMulticastTTL: {sysIP_MULTICAST_TTL, ssoTypeInt}, + ssoMulticastInterface: {sysIP_MULTICAST_IF, ssoTypeInterface}, + ssoMulticastLoopback: {sysIP_MULTICAST_LOOP, ssoTypeInt}, + ssoJoinGroup: {sysIP_ADD_MEMBERSHIP, ssoTypeIPMreq}, + ssoLeaveGroup: {sysIP_DROP_MEMBERSHIP, ssoTypeIPMreq}, + } +) + +func (pi *sysInetPktinfo) setIfindex(i int) { + pi.Ifindex = int32(i) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/syscall_linux_386.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/syscall_linux_386.go new file mode 100644 index 000000000..ab4ad0454 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/syscall_linux_386.go @@ -0,0 +1,31 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv4 + +import ( + "syscall" + "unsafe" +) + +const ( + sysGETSOCKOPT = 0xf + sysSETSOCKOPT = 0xe +) + +func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) + +func getsockopt(fd, level, name int, v unsafe.Pointer, l *sysSockoptLen) error { + if _, errno := socketcall(sysGETSOCKOPT, uintptr(fd), uintptr(level), uintptr(name), uintptr(v), uintptr(unsafe.Pointer(l)), 0); errno != 0 { + return error(errno) + } + return nil +} + +func setsockopt(fd, level, name int, v unsafe.Pointer, l sysSockoptLen) error { + if _, errno := socketcall(sysSETSOCKOPT, uintptr(fd), uintptr(level), uintptr(name), uintptr(v), uintptr(l), 0); errno != 0 { + return error(errno) + } + return nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/syscall_unix.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/syscall_unix.go new file mode 100644 index 000000000..29e8f168f --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/syscall_unix.go @@ -0,0 +1,26 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux,amd64 linux,arm netbsd openbsd + +package ipv4 + +import ( + "syscall" + "unsafe" +) + +func getsockopt(fd, level, name int, v unsafe.Pointer, l *sysSockoptLen) error { + if _, _, errno := syscall.Syscall6(syscall.SYS_GETSOCKOPT, uintptr(fd), uintptr(level), uintptr(name), uintptr(v), uintptr(unsafe.Pointer(l)), 0); errno != 0 { + return error(errno) + } + return nil +} + +func setsockopt(fd, level, name int, v unsafe.Pointer, l sysSockoptLen) error { + if _, _, errno := syscall.Syscall6(syscall.SYS_SETSOCKOPT, uintptr(fd), uintptr(level), uintptr(name), uintptr(v), uintptr(l), 0); errno != 0 { + return error(errno) + } + return nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/thunk_linux_386.s b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/thunk_linux_386.s new file mode 100644 index 000000000..daa78bc02 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/thunk_linux_386.s @@ -0,0 +1,8 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build go1.2 + +TEXT ·socketcall(SB),4,$0-36 + JMP syscall·socketcall(SB) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/zsys_darwin.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/zsys_darwin.go new file mode 100644 index 000000000..5fe13fca0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/zsys_darwin.go @@ -0,0 +1,62 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_darwin.go + +package ipv4 + +const ( + sysIP_OPTIONS = 0x1 + sysIP_HDRINCL = 0x2 + sysIP_TOS = 0x3 + sysIP_TTL = 0x4 + sysIP_RECVOPTS = 0x5 + sysIP_RECVRETOPTS = 0x6 + sysIP_RECVDSTADDR = 0x7 + sysIP_RETOPTS = 0x8 + sysIP_RECVIF = 0x14 + sysIP_STRIPHDR = 0x17 + sysIP_RECVTTL = 0x18 + sysIP_BOUND_IF = 0x19 + sysIP_PKTINFO = 0x1a + sysIP_RECVPKTINFO = 0x1a + + sysIP_MULTICAST_IF = 0x9 + sysIP_MULTICAST_TTL = 0xa + sysIP_MULTICAST_LOOP = 0xb + sysIP_ADD_MEMBERSHIP = 0xc + sysIP_DROP_MEMBERSHIP = 0xd + sysIP_MULTICAST_VIF = 0xe + sysIP_MULTICAST_IFINDEX = 0x42 + sysIP_ADD_SOURCE_MEMBERSHIP = 0x46 + sysIP_DROP_SOURCE_MEMBERSHIP = 0x47 + sysIP_BLOCK_SOURCE = 0x48 + sysIP_UNBLOCK_SOURCE = 0x49 + + sysSizeofInetPktinfo = 0xc + + sysSizeofIPMreq = 0x8 + sysSizeofIPMreqn = 0xc + sysSizeofIPMreqSource = 0xc +) + +type sysInetPktinfo struct { + Ifindex uint32 + Spec_dst [4]byte /* in_addr */ + Addr [4]byte /* in_addr */ +} + +type sysIPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type sysIPMreqn struct { + Multiaddr [4]byte /* in_addr */ + Address [4]byte /* in_addr */ + Ifindex int32 +} + +type sysIPMreqSource struct { + Multiaddr [4]byte /* in_addr */ + Sourceaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/zsys_dragonfly.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/zsys_dragonfly.go new file mode 100644 index 000000000..f5c9ccec4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/zsys_dragonfly.go @@ -0,0 +1,33 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_dragonfly.go + +// +build dragonfly + +package ipv4 + +const ( + sysIP_OPTIONS = 0x1 + sysIP_HDRINCL = 0x2 + sysIP_TOS = 0x3 + sysIP_TTL = 0x4 + sysIP_RECVOPTS = 0x5 + sysIP_RECVRETOPTS = 0x6 + sysIP_RECVDSTADDR = 0x7 + sysIP_RETOPTS = 0x8 + sysIP_RECVIF = 0x14 + sysIP_RECVTTL = 0x41 + + sysIP_MULTICAST_IF = 0x9 + sysIP_MULTICAST_TTL = 0xa + sysIP_MULTICAST_LOOP = 0xb + sysIP_MULTICAST_VIF = 0xe + sysIP_ADD_MEMBERSHIP = 0xc + sysIP_DROP_MEMBERSHIP = 0xd + + sysSizeofIPMreq = 0x8 +) + +type sysIPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/zsys_freebsd.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/zsys_freebsd.go new file mode 100644 index 000000000..9728714f9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/zsys_freebsd.go @@ -0,0 +1,55 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_freebsd.go + +package ipv4 + +const ( + sysIP_OPTIONS = 0x1 + sysIP_HDRINCL = 0x2 + sysIP_TOS = 0x3 + sysIP_TTL = 0x4 + sysIP_RECVOPTS = 0x5 + sysIP_RECVRETOPTS = 0x6 + sysIP_RECVDSTADDR = 0x7 + sysIP_SENDSRCADDR = 0x7 + sysIP_RETOPTS = 0x8 + sysIP_RECVIF = 0x14 + sysIP_ONESBCAST = 0x17 + sysIP_BINDANY = 0x18 + sysIP_RECVTTL = 0x41 + sysIP_MINTTL = 0x42 + sysIP_DONTFRAG = 0x43 + sysIP_RECVTOS = 0x44 + + sysIP_MULTICAST_IF = 0x9 + sysIP_MULTICAST_TTL = 0xa + sysIP_MULTICAST_LOOP = 0xb + sysIP_ADD_MEMBERSHIP = 0xc + sysIP_DROP_MEMBERSHIP = 0xd + sysIP_MULTICAST_VIF = 0xe + sysIP_ADD_SOURCE_MEMBERSHIP = 0x46 + sysIP_DROP_SOURCE_MEMBERSHIP = 0x47 + sysIP_BLOCK_SOURCE = 0x48 + sysIP_UNBLOCK_SOURCE = 0x49 + + sysSizeofIPMreq = 0x8 + sysSizeofIPMreqn = 0xc + sysSizeofIPMreqSource = 0xc +) + +type sysIPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type sysIPMreqn struct { + Multiaddr [4]byte /* in_addr */ + Address [4]byte /* in_addr */ + Ifindex int32 +} + +type sysIPMreqSource struct { + Multiaddr [4]byte /* in_addr */ + Sourceaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/zsys_linux.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/zsys_linux.go new file mode 100644 index 000000000..98d2efa3a --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/zsys_linux.go @@ -0,0 +1,94 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_linux.go + +package ipv4 + +const ( + sysIP_TOS = 0x1 + sysIP_TTL = 0x2 + sysIP_HDRINCL = 0x3 + sysIP_OPTIONS = 0x4 + sysIP_ROUTER_ALERT = 0x5 + sysIP_RECVOPTS = 0x6 + sysIP_RETOPTS = 0x7 + sysIP_PKTINFO = 0x8 + sysIP_PKTOPTIONS = 0x9 + sysIP_MTU_DISCOVER = 0xa + sysIP_RECVERR = 0xb + sysIP_RECVTTL = 0xc + sysIP_RECVTOS = 0xd + sysIP_MTU = 0xe + sysIP_FREEBIND = 0xf + sysIP_TRANSPARENT = 0x13 + sysIP_RECVRETOPTS = 0x7 + sysIP_ORIGDSTADDR = 0x14 + sysIP_RECVORIGDSTADDR = 0x14 + sysIP_MINTTL = 0x15 + sysIP_NODEFRAG = 0x16 + sysIP_UNICAST_IF = 0x32 + + sysIP_MULTICAST_IF = 0x20 + sysIP_MULTICAST_TTL = 0x21 + sysIP_MULTICAST_LOOP = 0x22 + sysIP_ADD_MEMBERSHIP = 0x23 + sysIP_DROP_MEMBERSHIP = 0x24 + sysIP_UNBLOCK_SOURCE = 0x25 + sysIP_BLOCK_SOURCE = 0x26 + sysIP_ADD_SOURCE_MEMBERSHIP = 0x27 + sysIP_DROP_SOURCE_MEMBERSHIP = 0x28 + sysIP_MULTICAST_ALL = 0x31 + + sysIP_PMTUDISC_DONT = 0x0 + sysIP_PMTUDISC_WANT = 0x1 + sysIP_PMTUDISC_DO = 0x2 + sysIP_PMTUDISC_PROBE = 0x3 + sysIP_PMTUDISC_INTERFACE = 0x4 + sysIP_PMTUDISC_OMIT = 0x5 + + sysSO_EE_ORIGIN_NONE = 0x0 + sysSO_EE_ORIGIN_LOCAL = 0x1 + sysSO_EE_ORIGIN_ICMP = 0x2 + sysSO_EE_ORIGIN_ICMP6 = 0x3 + sysSO_EE_ORIGIN_TXSTATUS = 0x4 + sysSO_EE_ORIGIN_TIMESTAMPING = 0x4 + + sysSizeofInetPktinfo = 0xc + sysSizeofSockExtendedErr = 0x10 + + sysSizeofIPMreq = 0x8 + sysSizeofIPMreqn = 0xc + sysSizeofIPMreqSource = 0xc +) + +type sysInetPktinfo struct { + Ifindex int32 + Spec_dst [4]byte /* in_addr */ + Addr [4]byte /* in_addr */ +} + +type sysSockExtendedErr struct { + Errno uint32 + Origin uint8 + Type uint8 + Code uint8 + Pad uint8 + Info uint32 + Data uint32 +} + +type sysIPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type sysIPMreqn struct { + Multiaddr [4]byte /* in_addr */ + Address [4]byte /* in_addr */ + Ifindex int32 +} + +type sysIPMreqSource struct { + Multiaddr uint32 + Interface uint32 + Sourceaddr uint32 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/zsys_netbsd.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/zsys_netbsd.go new file mode 100644 index 000000000..8a440eb65 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/zsys_netbsd.go @@ -0,0 +1,30 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_netbsd.go + +package ipv4 + +const ( + sysIP_OPTIONS = 0x1 + sysIP_HDRINCL = 0x2 + sysIP_TOS = 0x3 + sysIP_TTL = 0x4 + sysIP_RECVOPTS = 0x5 + sysIP_RECVRETOPTS = 0x6 + sysIP_RECVDSTADDR = 0x7 + sysIP_RETOPTS = 0x8 + sysIP_RECVIF = 0x14 + sysIP_RECVTTL = 0x17 + + sysIP_MULTICAST_IF = 0x9 + sysIP_MULTICAST_TTL = 0xa + sysIP_MULTICAST_LOOP = 0xb + sysIP_ADD_MEMBERSHIP = 0xc + sysIP_DROP_MEMBERSHIP = 0xd + + sysSizeofIPMreq = 0x8 +) + +type sysIPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/zsys_openbsd.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/zsys_openbsd.go new file mode 100644 index 000000000..fd522b573 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/zsys_openbsd.go @@ -0,0 +1,30 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_openbsd.go + +package ipv4 + +const ( + sysIP_OPTIONS = 0x1 + sysIP_HDRINCL = 0x2 + sysIP_TOS = 0x3 + sysIP_TTL = 0x4 + sysIP_RECVOPTS = 0x5 + sysIP_RECVRETOPTS = 0x6 + sysIP_RECVDSTADDR = 0x7 + sysIP_RETOPTS = 0x8 + sysIP_RECVIF = 0x1e + sysIP_RECVTTL = 0x1f + + sysIP_MULTICAST_IF = 0x9 + sysIP_MULTICAST_TTL = 0xa + sysIP_MULTICAST_LOOP = 0xb + sysIP_ADD_MEMBERSHIP = 0xc + sysIP_DROP_MEMBERSHIP = 0xd + + sysSizeofIPMreq = 0x8 +) + +type sysIPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/zsys_solaris.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/zsys_solaris.go new file mode 100644 index 000000000..d7c23349a --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv4/zsys_solaris.go @@ -0,0 +1,60 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_solaris.go + +// +build solaris + +package ipv4 + +const ( + sysIP_OPTIONS = 0x1 + sysIP_HDRINCL = 0x2 + sysIP_TOS = 0x3 + sysIP_TTL = 0x4 + sysIP_RECVOPTS = 0x5 + sysIP_RECVRETOPTS = 0x6 + sysIP_RECVDSTADDR = 0x7 + sysIP_RETOPTS = 0x8 + sysIP_RECVIF = 0x9 + sysIP_RECVSLLA = 0xa + sysIP_RECVTTL = 0xb + sysIP_NEXTHOP = 0x19 + sysIP_PKTINFO = 0x1a + sysIP_RECVPKTINFO = 0x1a + sysIP_DONTFRAG = 0x1b + sysIP_BOUND_IF = 0x41 + sysIP_UNSPEC_SRC = 0x42 + sysIP_BROADCAST_TTL = 0x43 + sysIP_DHCPINIT_IF = 0x45 + + sysIP_MULTICAST_IF = 0x10 + sysIP_MULTICAST_TTL = 0x11 + sysIP_MULTICAST_LOOP = 0x12 + sysIP_ADD_MEMBERSHIP = 0x13 + sysIP_DROP_MEMBERSHIP = 0x14 + sysIP_BLOCK_SOURCE = 0x15 + sysIP_UNBLOCK_SOURCE = 0x16 + sysIP_ADD_SOURCE_MEMBERSHIP = 0x17 + sysIP_DROP_SOURCE_MEMBERSHIP = 0x18 + + sysSizeofInetPktinfo = 0xc + + sysSizeofIPMreq = 0x8 + sysSizeofIPMreqSource = 0xc +) + +type sysInetPktinfo struct { + Ifindex uint32 + Spec_dst [4]byte /* in_addr */ + Addr [4]byte /* in_addr */ +} + +type sysIPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type sysIPMreqSource struct { + Multiaddr [4]byte /* in_addr */ + Sourceaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/control.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/control.go new file mode 100644 index 000000000..4485d68a0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/control.go @@ -0,0 +1,83 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv6 + +import ( + "errors" + "fmt" + "net" + "sync" +) + +var ( + errMissingAddress = errors.New("missing address") + errInvalidConnType = errors.New("invalid conn type") + errNoSuchInterface = errors.New("no such interface") +) + +// References: +// +// RFC 2292 Advanced Sockets API for IPv6 +// http://tools.ietf.org/html/rfc2292 +// RFC 2460 Internet Protocol, Version 6 (IPv6) Specification +// http://tools.ietf.org/html/rfc2460 +// RFC 3493 Basic Socket Interface Extensions for IPv6 +// http://tools.ietf.org/html/rfc3493.html +// RFC 3542 Advanced Sockets Application Program Interface (API) for IPv6 +// http://tools.ietf.org/html/rfc3542 +// +// Note that RFC 3542 obsoletes RFC 2292 but OS X Snow Leopard and the +// former still support RFC 2292 only. Please be aware that almost +// all protocol implementations prohibit using a combination of RFC +// 2292 and RFC 3542 for some practical reasons. + +type rawOpt struct { + sync.Mutex + cflags ControlFlags +} + +func (c *rawOpt) set(f ControlFlags) { c.cflags |= f } +func (c *rawOpt) clear(f ControlFlags) { c.cflags &^= f } +func (c *rawOpt) isset(f ControlFlags) bool { return c.cflags&f != 0 } + +// A ControlFlags represents per packet basis IP-level socket option +// control flags. +type ControlFlags uint + +const ( + FlagTrafficClass ControlFlags = 1 << iota // pass the traffic class on the received packet + FlagHopLimit // pass the hop limit on the received packet + FlagSrc // pass the source address on the received packet + FlagDst // pass the destination address on the received packet + FlagInterface // pass the interface index on the received packet + FlagPathMTU // pass the path MTU on the received packet path +) + +// A ControlMessage represents per packet basis IP-level socket +// options. +type ControlMessage struct { + // Receiving socket options: SetControlMessage allows to + // receive the options from the protocol stack using ReadFrom + // method of PacketConn. + // + // Specifying socket options: ControlMessage for WriteTo + // method of PacketConn allows to send the options to the + // protocol stack. + // + TrafficClass int // traffic class, must be 1 <= value <= 255 when specifying + HopLimit int // hop limit, must be 1 <= value <= 255 when specifying + Src net.IP // source address, specifying only + Dst net.IP // destination address, receiving only + IfIndex int // interface index, must be 1 <= value when specifying + NextHop net.IP // next hop address, specifying only + MTU int // path MTU, receiving only +} + +func (cm *ControlMessage) String() string { + if cm == nil { + return "" + } + return fmt.Sprintf("tclass: %#x, hoplim: %v, src: %v, dst: %v, ifindex: %v, nexthop: %v, mtu: %v", cm.TrafficClass, cm.HopLimit, cm.Src, cm.Dst, cm.IfIndex, cm.NextHop, cm.MTU) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/control_rfc2292_unix.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/control_rfc2292_unix.go new file mode 100644 index 000000000..47196c58f --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/control_rfc2292_unix.go @@ -0,0 +1,151 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin + +package ipv6 + +import ( + "net" + "os" + "syscall" + "unsafe" +) + +const pktinfo = FlagDst | FlagInterface + +func setControlMessage(fd int, opt *rawOpt, cf ControlFlags, on bool) error { + opt.Lock() + defer opt.Unlock() + if cf&FlagHopLimit != 0 { + if err := setIPv6ReceiveHopLimit(fd, on); err != nil { + return err + } + if on { + opt.set(FlagHopLimit) + } else { + opt.clear(FlagHopLimit) + } + } + if cf&pktinfo != 0 { + if err := setIPv6ReceivePacketInfo(fd, on); err != nil { + return err + } + if on { + opt.set(cf & pktinfo) + } else { + opt.clear(cf & pktinfo) + } + } + return nil +} + +func newControlMessage(opt *rawOpt) (oob []byte) { + opt.Lock() + defer opt.Unlock() + l, off := 0, 0 + if opt.isset(FlagHopLimit) { + l += syscall.CmsgSpace(4) + } + if opt.isset(pktinfo) { + l += syscall.CmsgSpace(sysSizeofPacketInfo) + } + if l > 0 { + oob = make([]byte, l) + if opt.isset(FlagHopLimit) { + m := (*syscall.Cmsghdr)(unsafe.Pointer(&oob[off])) + m.Level = ianaProtocolIPv6 + m.Type = sysSockopt2292HopLimit + m.SetLen(syscall.CmsgLen(4)) + off += syscall.CmsgSpace(4) + } + if opt.isset(pktinfo) { + m := (*syscall.Cmsghdr)(unsafe.Pointer(&oob[off])) + m.Level = ianaProtocolIPv6 + m.Type = sysSockopt2292PacketInfo + m.SetLen(syscall.CmsgLen(sysSizeofPacketInfo)) + off += syscall.CmsgSpace(sysSizeofPacketInfo) + } + } + return +} + +func parseControlMessage(b []byte) (*ControlMessage, error) { + if len(b) == 0 { + return nil, nil + } + cmsgs, err := syscall.ParseSocketControlMessage(b) + if err != nil { + return nil, os.NewSyscallError("parse socket control message", err) + } + cm := &ControlMessage{} + for _, m := range cmsgs { + if m.Header.Level != ianaProtocolIPv6 { + continue + } + switch m.Header.Type { + case sysSockopt2292HopLimit: + cm.HopLimit = int(*(*byte)(unsafe.Pointer(&m.Data[:1][0]))) + case sysSockopt2292PacketInfo: + pi := (*sysPacketInfo)(unsafe.Pointer(&m.Data[0])) + cm.IfIndex = int(pi.IfIndex) + cm.Dst = pi.IP[:] + } + } + return cm, nil +} + +func marshalControlMessage(cm *ControlMessage) (oob []byte) { + if cm == nil { + return + } + l, off := 0, 0 + if cm.HopLimit > 0 { + l += syscall.CmsgSpace(4) + } + pion := false + if cm.Src.To4() == nil && cm.Src.To16() != nil || cm.IfIndex != 0 { + pion = true + l += syscall.CmsgSpace(sysSizeofPacketInfo) + } + if len(cm.NextHop) == net.IPv6len { + l += syscall.CmsgSpace(syscall.SizeofSockaddrInet6) + } + if l > 0 { + oob = make([]byte, l) + if cm.HopLimit > 0 { + m := (*syscall.Cmsghdr)(unsafe.Pointer(&oob[off])) + m.Level = ianaProtocolIPv6 + m.Type = sysSockopt2292HopLimit + m.SetLen(syscall.CmsgLen(4)) + data := oob[off+syscall.CmsgLen(0):] + *(*byte)(unsafe.Pointer(&data[:1][0])) = byte(cm.HopLimit) + off += syscall.CmsgSpace(4) + } + if pion { + m := (*syscall.Cmsghdr)(unsafe.Pointer(&oob[off])) + m.Level = ianaProtocolIPv6 + m.Type = sysSockopt2292PacketInfo + m.SetLen(syscall.CmsgLen(sysSizeofPacketInfo)) + pi := (*sysPacketInfo)(unsafe.Pointer(&oob[off+syscall.CmsgLen(0)])) + if ip := cm.Src.To16(); ip != nil && ip.To4() == nil { + copy(pi.IP[:], ip) + } + if cm.IfIndex != 0 { + pi.IfIndex = uint32(cm.IfIndex) + } + off += syscall.CmsgSpace(sysSizeofPacketInfo) + } + if len(cm.NextHop) == net.IPv6len { + m := (*syscall.Cmsghdr)(unsafe.Pointer(&oob[off])) + m.Level = ianaProtocolIPv6 + m.Type = sysSockopt2292NextHop + m.SetLen(syscall.CmsgLen(syscall.SizeofSockaddrInet6)) + sa := (*syscall.RawSockaddrInet6)(unsafe.Pointer(&oob[off+syscall.CmsgLen(0)])) + setSockaddr(sa, cm.NextHop, cm.IfIndex) + off += syscall.CmsgSpace(syscall.SizeofSockaddrInet6) + } + } + return +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/control_rfc3542_stub.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/control_rfc3542_stub.go new file mode 100644 index 000000000..538ffec80 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/control_rfc3542_stub.go @@ -0,0 +1,27 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build nacl plan9 solaris + +package ipv6 + +func setControlMessage(fd int, opt *rawOpt, cf ControlFlags, on bool) error { + // TODO(mikio): Implement this + return errOpNoSupport +} + +func newControlMessage(opt *rawOpt) (oob []byte) { + // TODO(mikio): Implement this + return nil +} + +func parseControlMessage(b []byte) (*ControlMessage, error) { + // TODO(mikio): Implement this + return nil, errOpNoSupport +} + +func marshalControlMessage(cm *ControlMessage) (oob []byte) { + // TODO(mikio): Implement this + return nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/control_rfc3542_unix.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/control_rfc3542_unix.go new file mode 100644 index 000000000..0f5149fae --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/control_rfc3542_unix.go @@ -0,0 +1,210 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build dragonfly freebsd linux netbsd openbsd + +package ipv6 + +import ( + "net" + "os" + "syscall" + "unsafe" +) + +const pktinfo = FlagDst | FlagInterface + +func setControlMessage(fd int, opt *rawOpt, cf ControlFlags, on bool) error { + opt.Lock() + defer opt.Unlock() + if cf&FlagTrafficClass != 0 { + if err := setIPv6ReceiveTrafficClass(fd, on); err != nil { + return err + } + if on { + opt.set(FlagTrafficClass) + } else { + opt.clear(FlagTrafficClass) + } + } + if cf&FlagHopLimit != 0 { + if err := setIPv6ReceiveHopLimit(fd, on); err != nil { + return err + } + if on { + opt.set(FlagHopLimit) + } else { + opt.clear(FlagHopLimit) + } + } + if cf&pktinfo != 0 { + if err := setIPv6ReceivePacketInfo(fd, on); err != nil { + return err + } + if on { + opt.set(cf & pktinfo) + } else { + opt.clear(cf & pktinfo) + } + } + if cf&FlagPathMTU != 0 { + if err := setIPv6ReceivePathMTU(fd, on); err != nil { + return err + } + if on { + opt.set(FlagPathMTU) + } else { + opt.clear(FlagPathMTU) + } + } + return nil +} + +func newControlMessage(opt *rawOpt) (oob []byte) { + opt.Lock() + defer opt.Unlock() + l, off := 0, 0 + if opt.isset(FlagTrafficClass) { + l += syscall.CmsgSpace(4) + } + if opt.isset(FlagHopLimit) { + l += syscall.CmsgSpace(4) + } + if opt.isset(pktinfo) { + l += syscall.CmsgSpace(sysSizeofPacketInfo) + } + if opt.isset(FlagPathMTU) { + l += syscall.CmsgSpace(sysSizeofMTUInfo) + } + if l > 0 { + oob = make([]byte, l) + if opt.isset(FlagTrafficClass) { + m := (*syscall.Cmsghdr)(unsafe.Pointer(&oob[off])) + m.Level = ianaProtocolIPv6 + m.Type = sysSockoptReceiveTrafficClass + m.SetLen(syscall.CmsgLen(4)) + off += syscall.CmsgSpace(4) + } + if opt.isset(FlagHopLimit) { + m := (*syscall.Cmsghdr)(unsafe.Pointer(&oob[off])) + m.Level = ianaProtocolIPv6 + m.Type = sysSockoptReceiveHopLimit + m.SetLen(syscall.CmsgLen(4)) + off += syscall.CmsgSpace(4) + } + if opt.isset(pktinfo) { + m := (*syscall.Cmsghdr)(unsafe.Pointer(&oob[off])) + m.Level = ianaProtocolIPv6 + m.Type = sysSockoptReceivePacketInfo + m.SetLen(syscall.CmsgLen(sysSizeofPacketInfo)) + off += syscall.CmsgSpace(sysSizeofPacketInfo) + } + if opt.isset(FlagPathMTU) { + m := (*syscall.Cmsghdr)(unsafe.Pointer(&oob[off])) + m.Level = ianaProtocolIPv6 + m.Type = sysSockoptReceivePathMTU + m.SetLen(syscall.CmsgLen(sysSizeofMTUInfo)) + off += syscall.CmsgSpace(sysSizeofMTUInfo) + } + } + return +} + +func parseControlMessage(b []byte) (*ControlMessage, error) { + if len(b) == 0 { + return nil, nil + } + cmsgs, err := syscall.ParseSocketControlMessage(b) + if err != nil { + return nil, os.NewSyscallError("parse socket control message", err) + } + cm := &ControlMessage{} + for _, m := range cmsgs { + if m.Header.Level != ianaProtocolIPv6 { + continue + } + switch m.Header.Type { + case sysSockoptTrafficClass: + cm.TrafficClass = int(*(*byte)(unsafe.Pointer(&m.Data[:1][0]))) + case sysSockoptHopLimit: + cm.HopLimit = int(*(*byte)(unsafe.Pointer(&m.Data[:1][0]))) + case sysSockoptPacketInfo: + pi := (*sysPacketInfo)(unsafe.Pointer(&m.Data[0])) + cm.Dst = pi.IP[:] + cm.IfIndex = int(pi.IfIndex) + case sysSockoptPathMTU: + mi := (*sysMTUInfo)(unsafe.Pointer(&m.Data[0])) + cm.Dst = mi.Addr.Addr[:] + cm.IfIndex = int(mi.Addr.Scope_id) + cm.MTU = int(mi.MTU) + } + } + return cm, nil +} + +func marshalControlMessage(cm *ControlMessage) (oob []byte) { + if cm == nil { + return + } + l, off := 0, 0 + if cm.TrafficClass > 0 { + l += syscall.CmsgSpace(4) + } + if cm.HopLimit > 0 { + l += syscall.CmsgSpace(4) + } + pion := false + if cm.Src.To4() == nil && cm.Src.To16() != nil || cm.IfIndex != 0 { + pion = true + l += syscall.CmsgSpace(sysSizeofPacketInfo) + } + if len(cm.NextHop) == net.IPv6len { + l += syscall.CmsgSpace(syscall.SizeofSockaddrInet6) + } + if l > 0 { + oob = make([]byte, l) + if cm.TrafficClass > 0 { + m := (*syscall.Cmsghdr)(unsafe.Pointer(&oob[off])) + m.Level = ianaProtocolIPv6 + m.Type = sysSockoptTrafficClass + m.SetLen(syscall.CmsgLen(4)) + data := oob[off+syscall.CmsgLen(0):] + *(*byte)(unsafe.Pointer(&data[:1][0])) = byte(cm.TrafficClass) + off += syscall.CmsgSpace(4) + } + if cm.HopLimit > 0 { + m := (*syscall.Cmsghdr)(unsafe.Pointer(&oob[off])) + m.Level = ianaProtocolIPv6 + m.Type = sysSockoptHopLimit + m.SetLen(syscall.CmsgLen(4)) + data := oob[off+syscall.CmsgLen(0):] + *(*byte)(unsafe.Pointer(&data[:1][0])) = byte(cm.HopLimit) + off += syscall.CmsgSpace(4) + } + if pion { + m := (*syscall.Cmsghdr)(unsafe.Pointer(&oob[off])) + m.Level = ianaProtocolIPv6 + m.Type = sysSockoptPacketInfo + m.SetLen(syscall.CmsgLen(sysSizeofPacketInfo)) + pi := (*sysPacketInfo)(unsafe.Pointer(&oob[off+syscall.CmsgLen(0)])) + if ip := cm.Src.To16(); ip != nil && ip.To4() == nil { + copy(pi.IP[:], ip) + } + if cm.IfIndex != 0 { + pi.IfIndex = uint32(cm.IfIndex) + } + off += syscall.CmsgSpace(sysSizeofPacketInfo) + } + if len(cm.NextHop) == net.IPv6len { + m := (*syscall.Cmsghdr)(unsafe.Pointer(&oob[off])) + m.Level = ianaProtocolIPv6 + m.Type = sysSockoptNextHop + m.SetLen(syscall.CmsgLen(syscall.SizeofSockaddrInet6)) + sa := (*syscall.RawSockaddrInet6)(unsafe.Pointer(&oob[off+syscall.CmsgLen(0)])) + setSockaddr(sa, cm.NextHop, cm.IfIndex) + off += syscall.CmsgSpace(syscall.SizeofSockaddrInet6) + } + } + return +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/control_rfc3542_windows.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/control_rfc3542_windows.go new file mode 100644 index 000000000..b4d53fb65 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/control_rfc3542_windows.go @@ -0,0 +1,27 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv6 + +import "syscall" + +func setControlMessage(fd syscall.Handle, opt *rawOpt, cf ControlFlags, on bool) error { + // TODO(mikio): Implement this + return syscall.EWINDOWS +} + +func newControlMessage(opt *rawOpt) (oob []byte) { + // TODO(mikio): Implement this + return nil +} + +func parseControlMessage(b []byte) (*ControlMessage, error) { + // TODO(mikio): Implement this + return nil, syscall.EWINDOWS +} + +func marshalControlMessage(cm *ControlMessage) (oob []byte) { + // TODO(mikio): Implement this + return nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/dgramopt_posix.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/dgramopt_posix.go new file mode 100644 index 000000000..d12d123a8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/dgramopt_posix.go @@ -0,0 +1,178 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd windows + +package ipv6 + +import ( + "net" + "syscall" +) + +// MulticastHopLimit returns the hop limit field value for outgoing +// multicast packets. +func (c *dgramOpt) MulticastHopLimit() (int, error) { + if !c.ok() { + return 0, syscall.EINVAL + } + fd, err := c.sysfd() + if err != nil { + return 0, err + } + return ipv6MulticastHopLimit(fd) +} + +// SetMulticastHopLimit sets the hop limit field value for future +// outgoing multicast packets. +func (c *dgramOpt) SetMulticastHopLimit(hoplim int) error { + if !c.ok() { + return syscall.EINVAL + } + fd, err := c.sysfd() + if err != nil { + return err + } + return setIPv6MulticastHopLimit(fd, hoplim) +} + +// MulticastInterface returns the default interface for multicast +// packet transmissions. +func (c *dgramOpt) MulticastInterface() (*net.Interface, error) { + if !c.ok() { + return nil, syscall.EINVAL + } + fd, err := c.sysfd() + if err != nil { + return nil, err + } + return ipv6MulticastInterface(fd) +} + +// SetMulticastInterface sets the default interface for future +// multicast packet transmissions. +func (c *dgramOpt) SetMulticastInterface(ifi *net.Interface) error { + if !c.ok() { + return syscall.EINVAL + } + fd, err := c.sysfd() + if err != nil { + return err + } + return setIPv6MulticastInterface(fd, ifi) +} + +// MulticastLoopback reports whether transmitted multicast packets +// should be copied and send back to the originator. +func (c *dgramOpt) MulticastLoopback() (bool, error) { + if !c.ok() { + return false, syscall.EINVAL + } + fd, err := c.sysfd() + if err != nil { + return false, err + } + return ipv6MulticastLoopback(fd) +} + +// SetMulticastLoopback sets whether transmitted multicast packets +// should be copied and send back to the originator. +func (c *dgramOpt) SetMulticastLoopback(on bool) error { + if !c.ok() { + return syscall.EINVAL + } + fd, err := c.sysfd() + if err != nil { + return err + } + return setIPv6MulticastLoopback(fd, on) +} + +// JoinGroup joins the group address group on the interface ifi. +// It uses the system assigned multicast interface when ifi is nil, +// although this is not recommended because the assignment depends on +// platforms and sometimes it might require routing configuration. +func (c *dgramOpt) JoinGroup(ifi *net.Interface, group net.Addr) error { + if !c.ok() { + return syscall.EINVAL + } + fd, err := c.sysfd() + if err != nil { + return err + } + grp := netAddrToIP16(group) + if grp == nil { + return errMissingAddress + } + return joinIPv6Group(fd, ifi, grp) +} + +// LeaveGroup leaves the group address group on the interface ifi. +func (c *dgramOpt) LeaveGroup(ifi *net.Interface, group net.Addr) error { + if !c.ok() { + return syscall.EINVAL + } + fd, err := c.sysfd() + if err != nil { + return err + } + grp := netAddrToIP16(group) + if grp == nil { + return errMissingAddress + } + return leaveIPv6Group(fd, ifi, grp) +} + +// Checksum reports whether the kernel will compute, store or verify a +// checksum for both incoming and outgoing packets. If on is true, it +// returns an offset in bytes into the data of where the checksum +// field is located. +func (c *dgramOpt) Checksum() (on bool, offset int, err error) { + if !c.ok() { + return false, 0, syscall.EINVAL + } + fd, err := c.sysfd() + if err != nil { + return false, 0, err + } + return ipv6Checksum(fd) +} + +// SetChecksum enables the kernel checksum processing. If on is ture, +// the offset should be an offset in bytes into the data of where the +// checksum field is located. +func (c *dgramOpt) SetChecksum(on bool, offset int) error { + if !c.ok() { + return syscall.EINVAL + } + fd, err := c.sysfd() + if err != nil { + return err + } + return setIPv6Checksum(fd, on, offset) +} + +// ICMPFilter returns an ICMP filter. +func (c *dgramOpt) ICMPFilter() (*ICMPFilter, error) { + if !c.ok() { + return nil, syscall.EINVAL + } + fd, err := c.sysfd() + if err != nil { + return nil, err + } + return ipv6ICMPFilter(fd) +} + +// SetICMPFilter deploys the ICMP filter. +func (c *dgramOpt) SetICMPFilter(f *ICMPFilter) error { + if !c.ok() { + return syscall.EINVAL + } + fd, err := c.sysfd() + if err != nil { + return err + } + return setIPv6ICMPFilter(fd, f) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/dgramopt_stub.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/dgramopt_stub.go new file mode 100644 index 000000000..a39bd7148 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/dgramopt_stub.go @@ -0,0 +1,95 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build nacl plan9 solaris + +package ipv6 + +import "net" + +// MulticastHopLimit returns the hop limit field value for outgoing +// multicast packets. +func (c *dgramOpt) MulticastHopLimit() (int, error) { + // TODO(mikio): Implement this + return 0, errOpNoSupport +} + +// SetMulticastHopLimit sets the hop limit field value for future +// outgoing multicast packets. +func (c *dgramOpt) SetMulticastHopLimit(hoplim int) error { + // TODO(mikio): Implement this + return errOpNoSupport +} + +// MulticastInterface returns the default interface for multicast +// packet transmissions. +func (c *dgramOpt) MulticastInterface() (*net.Interface, error) { + // TODO(mikio): Implement this + return nil, errOpNoSupport +} + +// SetMulticastInterface sets the default interface for future +// multicast packet transmissions. +func (c *dgramOpt) SetMulticastInterface(ifi *net.Interface) error { + // TODO(mikio): Implement this + return errOpNoSupport +} + +// MulticastLoopback reports whether transmitted multicast packets +// should be copied and send back to the originator. +func (c *dgramOpt) MulticastLoopback() (bool, error) { + // TODO(mikio): Implement this + return false, errOpNoSupport +} + +// SetMulticastLoopback sets whether transmitted multicast packets +// should be copied and send back to the originator. +func (c *dgramOpt) SetMulticastLoopback(on bool) error { + // TODO(mikio): Implement this + return errOpNoSupport +} + +// JoinGroup joins the group address group on the interface ifi. +// It uses the system assigned multicast interface when ifi is nil, +// although this is not recommended because the assignment depends on +// platforms and sometimes it might require routing configuration. +func (c *dgramOpt) JoinGroup(ifi *net.Interface, group net.Addr) error { + // TODO(mikio): Implement this + return errOpNoSupport +} + +// LeaveGroup leaves the group address group on the interface ifi. +func (c *dgramOpt) LeaveGroup(ifi *net.Interface, group net.Addr) error { + // TODO(mikio): Implement this + return errOpNoSupport +} + +// Checksum reports whether the kernel will compute, store or verify a +// checksum for both incoming and outgoing packets. If on is true, it +// returns an offset in bytes into the data of where the checksum +// field is located. +func (c *dgramOpt) Checksum() (on bool, offset int, err error) { + // TODO(mikio): Implement this + return false, 0, errOpNoSupport +} + +// SetChecksum enables the kernel checksum processing. If on is ture, +// the offset should be an offset in bytes into the data of where the +// checksum field is located. +func (c *dgramOpt) SetChecksum(on bool, offset int) error { + // TODO(mikio): Implement this + return errOpNoSupport +} + +// ICMPFilter returns an ICMP filter. +func (c *dgramOpt) ICMPFilter() (*ICMPFilter, error) { + // TODO(mikio): Implement this + return nil, errOpNoSupport +} + +// SetICMPFilter deploys the ICMP filter. +func (c *dgramOpt) SetICMPFilter(f *ICMPFilter) error { + // TODO(mikio): Implement this + return errOpNoSupport +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/doc.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/doc.go new file mode 100644 index 000000000..b4578c586 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/doc.go @@ -0,0 +1,193 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package ipv6 implements IP-level socket options for the Internet +// Protocol version 6. +// +// The package provides IP-level socket options that allow +// manipulation of IPv6 facilities. The IPv6 and socket options for +// IPv6 are defined in RFC 2460, RFC 3493 and RFC 3542. +// +// +// Unicasting +// +// The options for unicasting are available for net.TCPConn, +// net.UDPConn and net.IPConn which are created as network connections +// that use the IPv6 transport. When a single TCP connection carrying +// a data flow of multiple packets needs to indicate the flow is +// important, ipv6.Conn is used to set the traffic class field on the +// IPv6 header for each packet. +// +// ln, err := net.Listen("tcp6", "[::]:1024") +// if err != nil { +// // error handling +// } +// defer ln.Close() +// for { +// c, err := ln.Accept() +// if err != nil { +// // error handling +// } +// go func(c net.Conn) { +// defer c.Close() +// +// The outgoing packets will be labeled DiffServ assured forwarding +// class 1 low drop precedence, as known as AF11 packets. +// +// if err := ipv6.NewConn(c).SetTrafficClass(DiffServAF11); err != nil { +// // error handling +// } +// if _, err := c.Write(data); err != nil { +// // error handling +// } +// }(c) +// } +// +// +// Multicasting +// +// The options for multicasting are available for net.UDPConn and +// net.IPconn which are created as network connections that use the +// IPv6 transport. A few network facilities must be prepared before +// you begin multicasting, at a minimum joining network interfaces and +// multicast groups. +// +// en0, err := net.InterfaceByName("en0") +// if err != nil { +// // error handling +// } +// en1, err := net.InterfaceByIndex(911) +// if err != nil { +// // error handling +// } +// group := net.ParseIP("ff02::114") +// +// First, an application listens to an appropriate address with an +// appropriate service port. +// +// c, err := net.ListenPacket("udp6", "[::]:1024") +// if err != nil { +// // error handling +// } +// defer c.Close() +// +// Second, the application joins multicast groups, starts listening to +// the groups on the specified network interfaces. Note that the +// service port for transport layer protocol does not matter with this +// operation as joining groups affects only network and link layer +// protocols, such as IPv6 and Ethernet. +// +// p := ipv6.NewPacketConn(c) +// if err := p.JoinGroup(en0, &net.UDPAddr{IP: group}); err != nil { +// // error handling +// } +// if err := p.JoinGroup(en1, &net.UDPAddr{IP: group}); err != nil { +// // error handling +// } +// +// The application might set per packet control message transmissions +// between the protocol stack within the kernel. When the application +// needs a destination address on an incoming packet, +// SetControlMessage of ipv6.PacketConn is used to enable control +// message transmissons. +// +// if err := p.SetControlMessage(ipv6.FlagDst, true); err != nil { +// // error handling +// } +// +// The application could identify whether the received packets are +// of interest by using the control message that contains the +// destination address of the received packet. +// +// b := make([]byte, 1500) +// for { +// n, rcm, src, err := p.ReadFrom(b) +// if err != nil { +// // error handling +// } +// if rcm.Dst.IsMulticast() { +// if rcm.Dst.Equal(group) +// // joined group, do something +// } else { +// // unknown group, discard +// continue +// } +// } +// +// The application can also send both unicast and multicast packets. +// +// p.SetTrafficClass(DiffServCS0) +// p.SetHopLimit(16) +// if _, err := p.WriteTo(data[:n], nil, src); err != nil { +// // error handling +// } +// dst := &net.UDPAddr{IP: group, Port: 1024} +// wcm := ipv6.ControlMessage{TrafficClass: DiffServCS7, HopLimit: 1} +// for _, ifi := range []*net.Interface{en0, en1} { +// wcm.IfIndex = ifi.Index +// if _, err := p.WriteTo(data[:n], &wcm, dst); err != nil { +// // error handling +// } +// } +// } +// +// +// More multicasting +// +// An application that uses PacketConn may join multiple multicast +// groups. For example, a UDP listener with port 1024 might join two +// different groups across over two different network interfaces by +// using: +// +// c, err := net.ListenPacket("udp6", "[::]:1024") +// if err != nil { +// // error handling +// } +// defer c.Close() +// p := ipv6.NewPacketConn(c) +// if err := p.JoinGroup(en0, &net.UDPAddr{IP: net.ParseIP("ff02::1:114")}); err != nil { +// // error handling +// } +// if err := p.JoinGroup(en0, &net.UDPAddr{IP: net.ParseIP("ff02::2:114")}); err != nil { +// // error handling +// } +// if err := p.JoinGroup(en1, &net.UDPAddr{IP: net.ParseIP("ff02::2:114")}); err != nil { +// // error handling +// } +// +// It is possible for multiple UDP listeners that listen on the same +// UDP port to join the same multicast group. The net package will +// provide a socket that listens to a wildcard address with reusable +// UDP port when an appropriate multicast address prefix is passed to +// the net.ListenPacket or net.ListenUDP. +// +// c1, err := net.ListenPacket("udp6", "[ff02::]:1024") +// if err != nil { +// // error handling +// } +// defer c1.Close() +// c2, err := net.ListenPacket("udp6", "[ff02::]:1024") +// if err != nil { +// // error handling +// } +// defer c2.Close() +// p1 := ipv6.NewPacketConn(c1) +// if err := p1.JoinGroup(en0, &net.UDPAddr{IP: net.ParseIP("ff02::114")}); err != nil { +// // error handling +// } +// p2 := ipv6.NewPacketConn(c2) +// if err := p2.JoinGroup(en0, &net.UDPAddr{IP: net.ParseIP("ff02::114")}); err != nil { +// // error handling +// } +// +// Also it is possible for the application to leave or rejoin a +// multicast group on the network interface. +// +// if err := p.LeaveGroup(en0, &net.UDPAddr{IP: net.ParseIP("ff02::114")}); err != nil { +// // error handling +// } +// if err := p.JoinGroup(en0, &net.UDPAddr{IP: net.ParseIP("ff01::114")}); err != nil { +// // error handling +// } +package ipv6 diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/endpoint.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/endpoint.go new file mode 100644 index 000000000..04eee35fa --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/endpoint.go @@ -0,0 +1,119 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv6 + +import ( + "net" + "syscall" + "time" +) + +// A Conn represents a network endpoint that uses IPv6 transport. +// It allows to set basic IP-level socket options such as traffic +// class and hop limit. +type Conn struct { + genericOpt +} + +type genericOpt struct { + net.Conn +} + +func (c *genericOpt) ok() bool { return c != nil && c.Conn != nil } + +// PathMTU returns a path MTU value for the destination associated +// with the endpoint. +func (c *Conn) PathMTU() (int, error) { + if !c.genericOpt.ok() { + return 0, syscall.EINVAL + } + fd, err := c.genericOpt.sysfd() + if err != nil { + return 0, err + } + return ipv6PathMTU(fd) +} + +// NewConn returns a new Conn. +func NewConn(c net.Conn) *Conn { + return &Conn{ + genericOpt: genericOpt{Conn: c}, + } +} + +// A PacketConn represents a packet network endpoint that uses IPv6 +// transport. It is used to control several IP-level socket options +// including IPv6 header manipulation. It also provides datagram +// based network I/O methods specific to the IPv6 and higher layer +// protocols such as OSPF, GRE, and UDP. +type PacketConn struct { + genericOpt + dgramOpt + payloadHandler +} + +type dgramOpt struct { + net.PacketConn +} + +func (c *dgramOpt) ok() bool { return c != nil && c.PacketConn != nil } + +// SetControlMessage allows to receive the per packet basis IP-level +// socket options. +func (c *PacketConn) SetControlMessage(cf ControlFlags, on bool) error { + if !c.payloadHandler.ok() { + return syscall.EINVAL + } + fd, err := c.payloadHandler.sysfd() + if err != nil { + return err + } + return setControlMessage(fd, &c.payloadHandler.rawOpt, cf, on) +} + +// SetDeadline sets the read and write deadlines associated with the +// endpoint. +func (c *PacketConn) SetDeadline(t time.Time) error { + if !c.payloadHandler.ok() { + return syscall.EINVAL + } + return c.payloadHandler.SetDeadline(t) +} + +// SetReadDeadline sets the read deadline associated with the +// endpoint. +func (c *PacketConn) SetReadDeadline(t time.Time) error { + if !c.payloadHandler.ok() { + return syscall.EINVAL + } + return c.payloadHandler.SetReadDeadline(t) +} + +// SetWriteDeadline sets the write deadline associated with the +// endpoint. +func (c *PacketConn) SetWriteDeadline(t time.Time) error { + if !c.payloadHandler.ok() { + return syscall.EINVAL + } + return c.payloadHandler.SetWriteDeadline(t) +} + +// Close closes the endpoint. +func (c *PacketConn) Close() error { + if !c.payloadHandler.ok() { + return syscall.EINVAL + } + return c.payloadHandler.Close() +} + +// NewPacketConn returns a new PacketConn using c as its underlying +// transport. +func NewPacketConn(c net.PacketConn) *PacketConn { + return &PacketConn{ + genericOpt: genericOpt{Conn: c.(net.Conn)}, + dgramOpt: dgramOpt{PacketConn: c}, + payloadHandler: payloadHandler{PacketConn: c}, + } +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/genericopt_posix.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/genericopt_posix.go new file mode 100644 index 000000000..7b8ae8c1e --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/genericopt_posix.go @@ -0,0 +1,60 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd windows + +package ipv6 + +import "syscall" + +// TrafficClass returns the traffic class field value for outgoing +// packets. +func (c *genericOpt) TrafficClass() (int, error) { + if !c.ok() { + return 0, syscall.EINVAL + } + fd, err := c.sysfd() + if err != nil { + return 0, err + } + return ipv6TrafficClass(fd) +} + +// SetTrafficClass sets the traffic class field value for future +// outgoing packets. +func (c *genericOpt) SetTrafficClass(tclass int) error { + if !c.ok() { + return syscall.EINVAL + } + fd, err := c.sysfd() + if err != nil { + return err + } + return setIPv6TrafficClass(fd, tclass) +} + +// HopLimit returns the hop limit field value for outgoing packets. +func (c *genericOpt) HopLimit() (int, error) { + if !c.ok() { + return 0, syscall.EINVAL + } + fd, err := c.sysfd() + if err != nil { + return 0, err + } + return ipv6HopLimit(fd) +} + +// SetHopLimit sets the hop limit field value for future outgoing +// packets. +func (c *genericOpt) SetHopLimit(hoplim int) error { + if !c.ok() { + return syscall.EINVAL + } + fd, err := c.sysfd() + if err != nil { + return err + } + return setIPv6HopLimit(fd, hoplim) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/genericopt_stub.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/genericopt_stub.go new file mode 100644 index 000000000..8871df966 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/genericopt_stub.go @@ -0,0 +1,34 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build nacl plan9 solaris + +package ipv6 + +// TrafficClass returns the traffic class field value for outgoing +// packets. +func (c *genericOpt) TrafficClass() (int, error) { + // TODO(mikio): Implement this + return 0, errOpNoSupport +} + +// SetTrafficClass sets the traffic class field value for future +// outgoing packets. +func (c *genericOpt) SetTrafficClass(tclass int) error { + // TODO(mikio): Implement this + return errOpNoSupport +} + +// HopLimit returns the hop limit field value for outgoing packets. +func (c *genericOpt) HopLimit() (int, error) { + // TODO(mikio): Implement this + return 0, errOpNoSupport +} + +// SetHopLimit sets the hop limit field value for future outgoing +// packets. +func (c *genericOpt) SetHopLimit(hoplim int) error { + // TODO(mikio): Implement this + return errOpNoSupport +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/helper.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/helper.go new file mode 100644 index 000000000..649348481 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/helper.go @@ -0,0 +1,33 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv6 + +import ( + "errors" + "net" +) + +var errOpNoSupport = errors.New("operation not supported") + +func boolint(b bool) int { + if b { + return 1 + } + return 0 +} + +func netAddrToIP16(a net.Addr) net.IP { + switch v := a.(type) { + case *net.UDPAddr: + if ip := v.IP.To16(); ip != nil && ip.To4() == nil { + return ip + } + case *net.IPAddr: + if ip := v.IP.To16(); ip != nil && ip.To4() == nil { + return ip + } + } + return nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/helper_stub.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/helper_stub.go new file mode 100644 index 000000000..1864ba0af --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/helper_stub.go @@ -0,0 +1,22 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build nacl plan9 solaris + +package ipv6 + +func (c *genericOpt) sysfd() (int, error) { + // TODO(mikio): Implement this + return 0, errOpNoSupport +} + +func (c *dgramOpt) sysfd() (int, error) { + // TODO(mikio): Implement this + return 0, errOpNoSupport +} + +func (c *payloadHandler) sysfd() (int, error) { + // TODO(mikio): Implement this + return 0, errOpNoSupport +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/helper_unix.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/helper_unix.go new file mode 100644 index 000000000..92868ed29 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/helper_unix.go @@ -0,0 +1,46 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd + +package ipv6 + +import ( + "net" + "reflect" +) + +func (c *genericOpt) sysfd() (int, error) { + switch p := c.Conn.(type) { + case *net.TCPConn, *net.UDPConn, *net.IPConn: + return sysfd(p) + } + return 0, errInvalidConnType +} + +func (c *dgramOpt) sysfd() (int, error) { + switch p := c.PacketConn.(type) { + case *net.UDPConn, *net.IPConn: + return sysfd(p.(net.Conn)) + } + return 0, errInvalidConnType +} + +func (c *payloadHandler) sysfd() (int, error) { + return sysfd(c.PacketConn.(net.Conn)) +} + +func sysfd(c net.Conn) (int, error) { + cv := reflect.ValueOf(c) + switch ce := cv.Elem(); ce.Kind() { + case reflect.Struct: + nfd := ce.FieldByName("conn").FieldByName("fd") + switch fe := nfd.Elem(); fe.Kind() { + case reflect.Struct: + fd := fe.FieldByName("sysfd") + return int(fd.Int()), nil + } + } + return 0, errInvalidConnType +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/helper_windows.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/helper_windows.go new file mode 100644 index 000000000..28c401b53 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/helper_windows.go @@ -0,0 +1,45 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv6 + +import ( + "net" + "reflect" + "syscall" +) + +func (c *genericOpt) sysfd() (syscall.Handle, error) { + switch p := c.Conn.(type) { + case *net.TCPConn, *net.UDPConn, *net.IPConn: + return sysfd(p) + } + return syscall.InvalidHandle, errInvalidConnType +} + +func (c *dgramOpt) sysfd() (syscall.Handle, error) { + switch p := c.PacketConn.(type) { + case *net.UDPConn, *net.IPConn: + return sysfd(p.(net.Conn)) + } + return syscall.InvalidHandle, errInvalidConnType +} + +func (c *payloadHandler) sysfd() (syscall.Handle, error) { + return sysfd(c.PacketConn.(net.Conn)) +} + +func sysfd(c net.Conn) (syscall.Handle, error) { + cv := reflect.ValueOf(c) + switch ce := cv.Elem(); ce.Kind() { + case reflect.Struct: + netfd := ce.FieldByName("conn").FieldByName("fd") + switch fe := netfd.Elem(); fe.Kind() { + case reflect.Struct: + fd := fe.FieldByName("sysfd") + return syscall.Handle(fd.Uint()), nil + } + } + return syscall.InvalidHandle, errInvalidConnType +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/iana.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/iana.go new file mode 100644 index 000000000..429087c5f --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/iana.go @@ -0,0 +1,224 @@ +// go run gen.go +// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +package ipv6 + +// Internet Control Message Protocol version 6 (ICMPv6) Parameters, Updated: 2013-07-03 +const ( + ICMPTypeDestinationUnreachable ICMPType = 1 // Destination Unreachable + ICMPTypePacketTooBig ICMPType = 2 // Packet Too Big + ICMPTypeTimeExceeded ICMPType = 3 // Time Exceeded + ICMPTypeParameterProblem ICMPType = 4 // Parameter Problem + ICMPTypeEchoRequest ICMPType = 128 // Echo Request + ICMPTypeEchoReply ICMPType = 129 // Echo Reply + ICMPTypeMulticastListenerQuery ICMPType = 130 // Multicast Listener Query + ICMPTypeMulticastListenerReport ICMPType = 131 // Multicast Listener Report + ICMPTypeMulticastListenerDone ICMPType = 132 // Multicast Listener Done + ICMPTypeRouterSolicitation ICMPType = 133 // Router Solicitation + ICMPTypeRouterAdvertisement ICMPType = 134 // Router Advertisement + ICMPTypeNeighborSolicitation ICMPType = 135 // Neighbor Solicitation + ICMPTypeNeighborAdvertisement ICMPType = 136 // Neighbor Advertisement + ICMPTypeRedirect ICMPType = 137 // Redirect Message + ICMPTypeRouterRenumbering ICMPType = 138 // Router Renumbering + ICMPTypeNodeInformationQuery ICMPType = 139 // ICMP Node Information Query + ICMPTypeNodeInformationResponse ICMPType = 140 // ICMP Node Information Response + ICMPTypeInverseNeighborDiscoverySolicitation ICMPType = 141 // Inverse Neighbor Discovery Solicitation Message + ICMPTypeInverseNeighborDiscoveryAdvertisement ICMPType = 142 // Inverse Neighbor Discovery Advertisement Message + ICMPTypeVersion2MulticastListenerReport ICMPType = 143 // Version 2 Multicast Listener Report + ICMPTypeHomeAgentAddressDiscoveryRequest ICMPType = 144 // Home Agent Address Discovery Request Message + ICMPTypeHomeAgentAddressDiscoveryReply ICMPType = 145 // Home Agent Address Discovery Reply Message + ICMPTypeMobilePrefixSolicitation ICMPType = 146 // Mobile Prefix Solicitation + ICMPTypeMobilePrefixAdvertisement ICMPType = 147 // Mobile Prefix Advertisement + ICMPTypeCertificationPathSolicitation ICMPType = 148 // Certification Path Solicitation Message + ICMPTypeCertificationPathAdvertisement ICMPType = 149 // Certification Path Advertisement Message + ICMPTypeMulticastRouterAdvertisement ICMPType = 151 // Multicast Router Advertisement + ICMPTypeMulticastRouterSolicitation ICMPType = 152 // Multicast Router Solicitation + ICMPTypeMulticastRouterTermination ICMPType = 153 // Multicast Router Termination + ICMPTypeFMIPv6 ICMPType = 154 // FMIPv6 Messages + ICMPTypeRPLControl ICMPType = 155 // RPL Control Message + ICMPTypeILNPv6LocatorUpdate ICMPType = 156 // ILNPv6 Locator Update Message + ICMPTypeDuplicateAddressRequest ICMPType = 157 // Duplicate Address Request + ICMPTypeDuplicateAddressConfirmation ICMPType = 158 // Duplicate Address Confirmation +) + +// Internet Control Message Protocol version 6 (ICMPv6) Parameters, Updated: 2013-07-03 +var icmpTypes = map[ICMPType]string{ + 1: "destination unreachable", + 2: "packet too big", + 3: "time exceeded", + 4: "parameter problem", + 128: "echo request", + 129: "echo reply", + 130: "multicast listener query", + 131: "multicast listener report", + 132: "multicast listener done", + 133: "router solicitation", + 134: "router advertisement", + 135: "neighbor solicitation", + 136: "neighbor advertisement", + 137: "redirect message", + 138: "router renumbering", + 139: "icmp node information query", + 140: "icmp node information response", + 141: "inverse neighbor discovery solicitation message", + 142: "inverse neighbor discovery advertisement message", + 143: "version 2 multicast listener report", + 144: "home agent address discovery request message", + 145: "home agent address discovery reply message", + 146: "mobile prefix solicitation", + 147: "mobile prefix advertisement", + 148: "certification path solicitation message", + 149: "certification path advertisement message", + 151: "multicast router advertisement", + 152: "multicast router solicitation", + 153: "multicast router termination", + 154: "fmipv6 messages", + 155: "rpl control message", + 156: "ilnpv6 locator update message", + 157: "duplicate address request", + 158: "duplicate address confirmation", +} + +// Protocol Numbers, Updated: 2013-02-17 +const ( + ianaProtocolHOPOPT = 0 // IPv6 Hop-by-Hop Option + ianaProtocolICMP = 1 // Internet Control Message + ianaProtocolIGMP = 2 // Internet Group Management + ianaProtocolGGP = 3 // Gateway-to-Gateway + ianaProtocolIPv4 = 4 // IPv4 encapsulation + ianaProtocolST = 5 // Stream + ianaProtocolTCP = 6 // Transmission Control + ianaProtocolCBT = 7 // CBT + ianaProtocolEGP = 8 // Exterior Gateway Protocol + ianaProtocolIGP = 9 // any private interior gateway (used by Cisco for their IGRP) + ianaProtocolBBNRCCMON = 10 // BBN RCC Monitoring + ianaProtocolNVPII = 11 // Network Voice Protocol + ianaProtocolPUP = 12 // PUP + ianaProtocolARGUS = 13 // ARGUS + ianaProtocolEMCON = 14 // EMCON + ianaProtocolXNET = 15 // Cross Net Debugger + ianaProtocolCHAOS = 16 // Chaos + ianaProtocolUDP = 17 // User Datagram + ianaProtocolMUX = 18 // Multiplexing + ianaProtocolDCNMEAS = 19 // DCN Measurement Subsystems + ianaProtocolHMP = 20 // Host Monitoring + ianaProtocolPRM = 21 // Packet Radio Measurement + ianaProtocolXNSIDP = 22 // XEROX NS IDP + ianaProtocolTRUNK1 = 23 // Trunk-1 + ianaProtocolTRUNK2 = 24 // Trunk-2 + ianaProtocolLEAF1 = 25 // Leaf-1 + ianaProtocolLEAF2 = 26 // Leaf-2 + ianaProtocolRDP = 27 // Reliable Data Protocol + ianaProtocolIRTP = 28 // Internet Reliable Transaction + ianaProtocolISOTP4 = 29 // ISO Transport Protocol Class 4 + ianaProtocolNETBLT = 30 // Bulk Data Transfer Protocol + ianaProtocolMFENSP = 31 // MFE Network Services Protocol + ianaProtocolMERITINP = 32 // MERIT Internodal Protocol + ianaProtocolDCCP = 33 // Datagram Congestion Control Protocol + ianaProtocol3PC = 34 // Third Party Connect Protocol + ianaProtocolIDPR = 35 // Inter-Domain Policy Routing Protocol + ianaProtocolXTP = 36 // XTP + ianaProtocolDDP = 37 // Datagram Delivery Protocol + ianaProtocolIDPRCMTP = 38 // IDPR Control Message Transport Proto + ianaProtocolTPPP = 39 // TP++ Transport Protocol + ianaProtocolIL = 40 // IL Transport Protocol + ianaProtocolIPv6 = 41 // IPv6 encapsulation + ianaProtocolSDRP = 42 // Source Demand Routing Protocol + ianaProtocolIPv6Route = 43 // Routing Header for IPv6 + ianaProtocolIPv6Frag = 44 // Fragment Header for IPv6 + ianaProtocolIDRP = 45 // Inter-Domain Routing Protocol + ianaProtocolRSVP = 46 // Reservation Protocol + ianaProtocolGRE = 47 // Generic Routing Encapsulation + ianaProtocolDSR = 48 // Dynamic Source Routing Protocol + ianaProtocolBNA = 49 // BNA + ianaProtocolESP = 50 // Encap Security Payload + ianaProtocolAH = 51 // Authentication Header + ianaProtocolINLSP = 52 // Integrated Net Layer Security TUBA + ianaProtocolSWIPE = 53 // IP with Encryption + ianaProtocolNARP = 54 // NBMA Address Resolution Protocol + ianaProtocolMOBILE = 55 // IP Mobility + ianaProtocolTLSP = 56 // Transport Layer Security Protocol using Kryptonet key management + ianaProtocolSKIP = 57 // SKIP + ianaProtocolIPv6ICMP = 58 // ICMP for IPv6 + ianaProtocolIPv6NoNxt = 59 // No Next Header for IPv6 + ianaProtocolIPv6Opts = 60 // Destination Options for IPv6 + ianaProtocolCFTP = 62 // CFTP + ianaProtocolSATEXPAK = 64 // SATNET and Backroom EXPAK + ianaProtocolKRYPTOLAN = 65 // Kryptolan + ianaProtocolRVD = 66 // MIT Remote Virtual Disk Protocol + ianaProtocolIPPC = 67 // Internet Pluribus Packet Core + ianaProtocolSATMON = 69 // SATNET Monitoring + ianaProtocolVISA = 70 // VISA Protocol + ianaProtocolIPCV = 71 // Internet Packet Core Utility + ianaProtocolCPNX = 72 // Computer Protocol Network Executive + ianaProtocolCPHB = 73 // Computer Protocol Heart Beat + ianaProtocolWSN = 74 // Wang Span Network + ianaProtocolPVP = 75 // Packet Video Protocol + ianaProtocolBRSATMON = 76 // Backroom SATNET Monitoring + ianaProtocolSUNND = 77 // SUN ND PROTOCOL-Temporary + ianaProtocolWBMON = 78 // WIDEBAND Monitoring + ianaProtocolWBEXPAK = 79 // WIDEBAND EXPAK + ianaProtocolISOIP = 80 // ISO Internet Protocol + ianaProtocolVMTP = 81 // VMTP + ianaProtocolSECUREVMTP = 82 // SECURE-VMTP + ianaProtocolVINES = 83 // VINES + ianaProtocolTTP = 84 // TTP + ianaProtocolIPTM = 84 // Protocol Internet Protocol Traffic Manager + ianaProtocolNSFNETIGP = 85 // NSFNET-IGP + ianaProtocolDGP = 86 // Dissimilar Gateway Protocol + ianaProtocolTCF = 87 // TCF + ianaProtocolEIGRP = 88 // EIGRP + ianaProtocolOSPFIGP = 89 // OSPFIGP + ianaProtocolSpriteRPC = 90 // Sprite RPC Protocol + ianaProtocolLARP = 91 // Locus Address Resolution Protocol + ianaProtocolMTP = 92 // Multicast Transport Protocol + ianaProtocolAX25 = 93 // AX.25 Frames + ianaProtocolIPIP = 94 // IP-within-IP Encapsulation Protocol + ianaProtocolMICP = 95 // Mobile Internetworking Control Pro. + ianaProtocolSCCSP = 96 // Semaphore Communications Sec. Pro. + ianaProtocolETHERIP = 97 // Ethernet-within-IP Encapsulation + ianaProtocolENCAP = 98 // Encapsulation Header + ianaProtocolGMTP = 100 // GMTP + ianaProtocolIFMP = 101 // Ipsilon Flow Management Protocol + ianaProtocolPNNI = 102 // PNNI over IP + ianaProtocolPIM = 103 // Protocol Independent Multicast + ianaProtocolARIS = 104 // ARIS + ianaProtocolSCPS = 105 // SCPS + ianaProtocolQNX = 106 // QNX + ianaProtocolAN = 107 // Active Networks + ianaProtocolIPComp = 108 // IP Payload Compression Protocol + ianaProtocolSNP = 109 // Sitara Networks Protocol + ianaProtocolCompaqPeer = 110 // Compaq Peer Protocol + ianaProtocolIPXinIP = 111 // IPX in IP + ianaProtocolVRRP = 112 // Virtual Router Redundancy Protocol + ianaProtocolPGM = 113 // PGM Reliable Transport Protocol + ianaProtocolL2TP = 115 // Layer Two Tunneling Protocol + ianaProtocolDDX = 116 // D-II Data Exchange (DDX) + ianaProtocolIATP = 117 // Interactive Agent Transfer Protocol + ianaProtocolSTP = 118 // Schedule Transfer Protocol + ianaProtocolSRP = 119 // SpectraLink Radio Protocol + ianaProtocolUTI = 120 // UTI + ianaProtocolSMP = 121 // Simple Message Protocol + ianaProtocolSM = 122 // SM + ianaProtocolPTP = 123 // Performance Transparency Protocol + ianaProtocolISIS = 124 // ISIS over IPv4 + ianaProtocolFIRE = 125 // FIRE + ianaProtocolCRTP = 126 // Combat Radio Transport Protocol + ianaProtocolCRUDP = 127 // Combat Radio User Datagram + ianaProtocolSSCOPMCE = 128 // SSCOPMCE + ianaProtocolIPLT = 129 // IPLT + ianaProtocolSPS = 130 // Secure Packet Shield + ianaProtocolPIPE = 131 // Private IP Encapsulation within IP + ianaProtocolSCTP = 132 // Stream Control Transmission Protocol + ianaProtocolFC = 133 // Fibre Channel + ianaProtocolRSVPE2EIGNORE = 134 // RSVP-E2E-IGNORE + ianaProtocolMobilityHeader = 135 // Mobility Header + ianaProtocolUDPLite = 136 // UDPLite + ianaProtocolMPLSinIP = 137 // MPLS-in-IP + ianaProtocolMANET = 138 // MANET Protocols + ianaProtocolHIP = 139 // Host Identity Protocol + ianaProtocolShim6 = 140 // Shim6 Protocol + ianaProtocolWESP = 141 // Wrapped Encapsulating Security Payload + ianaProtocolROHC = 142 // Robust Header Compression + ianaProtocolReserved = 255 // Reserved +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/icmp.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/icmp.go new file mode 100644 index 000000000..b45486fd8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/icmp.go @@ -0,0 +1,47 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv6 + +import "sync" + +// An ICMPType represents a type of ICMP message. +type ICMPType int + +func (typ ICMPType) String() string { + s, ok := icmpTypes[typ] + if !ok { + return "" + } + return s +} + +// An ICMPFilter represents an ICMP message filter for incoming +// packets. +type ICMPFilter struct { + mu sync.RWMutex + sysICMPFilter +} + +// Set sets the ICMP type and filter action to the filter. +func (f *ICMPFilter) Set(typ ICMPType, block bool) { + f.mu.Lock() + f.set(typ, block) + f.mu.Unlock() +} + +// SetAll sets the filter action to the filter. +func (f *ICMPFilter) SetAll(block bool) { + f.mu.Lock() + f.setAll(block) + f.mu.Unlock() +} + +// WillBlock reports whether the ICMP type will be blocked. +func (f *ICMPFilter) WillBlock(typ ICMPType) bool { + f.mu.RLock() + ok := f.willBlock(typ) + f.mu.RUnlock() + return ok +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/icmp_bsd.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/icmp_bsd.go new file mode 100644 index 000000000..92d3d62c0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/icmp_bsd.go @@ -0,0 +1,33 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd netbsd openbsd + +package ipv6 + +type sysICMPFilter struct { + Filt [8]uint32 +} + +func (f *sysICMPFilter) set(typ ICMPType, block bool) { + if block { + f.Filt[typ>>5] &^= 1 << (uint32(typ) & 31) + } else { + f.Filt[typ>>5] |= 1 << (uint32(typ) & 31) + } +} + +func (f *sysICMPFilter) setAll(block bool) { + for i := range f.Filt { + if block { + f.Filt[i] = 0 + } else { + f.Filt[i] = 1<<32 - 1 + } + } +} + +func (f *sysICMPFilter) willBlock(typ ICMPType) bool { + return f.Filt[typ>>5]&(1<<(uint32(typ)&31)) == 0 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/icmp_linux.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/icmp_linux.go new file mode 100644 index 000000000..7b3e2bd49 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/icmp_linux.go @@ -0,0 +1,31 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv6 + +type sysICMPFilter struct { + Data [8]uint32 +} + +func (f *sysICMPFilter) set(typ ICMPType, block bool) { + if block { + f.Data[typ>>5] |= 1 << (uint32(typ) & 31) + } else { + f.Data[typ>>5] &^= 1 << (uint32(typ) & 31) + } +} + +func (f *sysICMPFilter) setAll(block bool) { + for i := range f.Data { + if block { + f.Data[i] = 1<<32 - 1 + } else { + f.Data[i] = 0 + } + } +} + +func (f *sysICMPFilter) willBlock(typ ICMPType) bool { + return f.Data[typ>>5]&(1<<(uint32(typ)&31)) != 0 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/icmp_stub.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/icmp_stub.go new file mode 100644 index 000000000..9588715da --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/icmp_stub.go @@ -0,0 +1,24 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build nacl plan9 solaris + +package ipv6 + +type sysICMPFilter struct { + // TODO(mikio): Implement this +} + +func (f *sysICMPFilter) set(typ ICMPType, block bool) { + // TODO(mikio): Implement this +} + +func (f *sysICMPFilter) setAll(block bool) { + // TODO(mikio): Implement this +} + +func (f *sysICMPFilter) willBlock(typ ICMPType) bool { + // TODO(mikio): Implement this + return false +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/icmp_windows.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/icmp_windows.go new file mode 100644 index 000000000..cf4ea4c09 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/icmp_windows.go @@ -0,0 +1,22 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv6 + +type sysICMPFilter struct { + // TODO(mikio): Implement this +} + +func (f *sysICMPFilter) set(typ ICMPType, block bool) { + // TODO(mikio): Implement this +} + +func (f *sysICMPFilter) setAll(block bool) { + // TODO(mikio): Implement this +} + +func (f *sysICMPFilter) willBlock(typ ICMPType) bool { + // TODO(mikio): Implement this + return false +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/payload.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/payload.go new file mode 100644 index 000000000..529b20bca --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/payload.go @@ -0,0 +1,15 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv6 + +import "net" + +// A payloadHandler represents the IPv6 datagram payload handler. +type payloadHandler struct { + net.PacketConn + rawOpt +} + +func (c *payloadHandler) ok() bool { return c != nil && c.PacketConn != nil } diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/payload_cmsg.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/payload_cmsg.go new file mode 100644 index 000000000..8e90d324d --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/payload_cmsg.go @@ -0,0 +1,70 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !nacl,!plan9,!windows + +package ipv6 + +import ( + "net" + "syscall" +) + +// ReadFrom reads a payload of the received IPv6 datagram, from the +// endpoint c, copying the payload into b. It returns the number of +// bytes copied into b, the control message cm and the source address +// src of the received datagram. +func (c *payloadHandler) ReadFrom(b []byte) (n int, cm *ControlMessage, src net.Addr, err error) { + if !c.ok() { + return 0, nil, nil, syscall.EINVAL + } + oob := newControlMessage(&c.rawOpt) + var oobn int + switch c := c.PacketConn.(type) { + case *net.UDPConn: + if n, oobn, _, src, err = c.ReadMsgUDP(b, oob); err != nil { + return 0, nil, nil, err + } + case *net.IPConn: + if n, oobn, _, src, err = c.ReadMsgIP(b, oob); err != nil { + return 0, nil, nil, err + } + default: + return 0, nil, nil, errInvalidConnType + } + if cm, err = parseControlMessage(oob[:oobn]); err != nil { + return 0, nil, nil, err + } + if cm != nil { + cm.Src = netAddrToIP16(src) + } + return +} + +// WriteTo writes a payload of the IPv6 datagram, to the destination +// address dst through the endpoint c, copying the payload from b. It +// returns the number of bytes written. The control message cm allows +// the IPv6 header fields and the datagram path to be specified. The +// cm may be nil if control of the outgoing datagram is not required. +func (c *payloadHandler) WriteTo(b []byte, cm *ControlMessage, dst net.Addr) (n int, err error) { + if !c.ok() { + return 0, syscall.EINVAL + } + oob := marshalControlMessage(cm) + if dst == nil { + return 0, errMissingAddress + } + switch c := c.PacketConn.(type) { + case *net.UDPConn: + n, _, err = c.WriteMsgUDP(b, oob, dst.(*net.UDPAddr)) + case *net.IPConn: + n, _, err = c.WriteMsgIP(b, oob, dst.(*net.IPAddr)) + default: + return 0, errInvalidConnType + } + if err != nil { + return 0, err + } + return +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/payload_nocmsg.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/payload_nocmsg.go new file mode 100644 index 000000000..499204d0c --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/payload_nocmsg.go @@ -0,0 +1,41 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build nacl plan9 windows + +package ipv6 + +import ( + "net" + "syscall" +) + +// ReadFrom reads a payload of the received IPv6 datagram, from the +// endpoint c, copying the payload into b. It returns the number of +// bytes copied into b, the control message cm and the source address +// src of the received datagram. +func (c *payloadHandler) ReadFrom(b []byte) (n int, cm *ControlMessage, src net.Addr, err error) { + if !c.ok() { + return 0, nil, nil, syscall.EINVAL + } + if n, src, err = c.PacketConn.ReadFrom(b); err != nil { + return 0, nil, nil, err + } + return +} + +// WriteTo writes a payload of the IPv6 datagram, to the destination +// address dst through the endpoint c, copying the payload from b. It +// returns the number of bytes written. The control message cm allows +// the IPv6 header fields and the datagram path to be specified. The +// cm may be nil if control of the outgoing datagram is not required. +func (c *payloadHandler) WriteTo(b []byte, cm *ControlMessage, dst net.Addr) (n int, err error) { + if !c.ok() { + return 0, syscall.EINVAL + } + if dst == nil { + return 0, errMissingAddress + } + return c.PacketConn.WriteTo(b, dst) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/sockopt.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/sockopt.go new file mode 100644 index 000000000..b511c8d57 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/sockopt.go @@ -0,0 +1,40 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv6 + +// Sticky socket options +const ( + ssoTrafficClass = iota // header field for unicast packet, RFC 3542 + ssoHopLimit // header field for unicast packet, RFC 3493 + ssoMulticastInterface // outbound interface for multicast packet, RFC 3493 + ssoMulticastHopLimit // header field for multicast packet, RFC 3493 + ssoMulticastLoopback // loopback for multicast packet, RFC 3493 + ssoReceiveTrafficClass // header field on received packet, RFC 3542 + ssoReceiveHopLimit // header field on received packet, RFC 2292 or 3542 + ssoReceivePacketInfo // incbound or outbound packet path, RFC 2292 or 3542 + ssoReceivePathMTU // path mtu, RFC 3542 + ssoPathMTU // path mtu, RFC 3542 + ssoChecksum // packet checksum, RFC 2292 or 3542 + ssoICMPFilter // icmp filter, RFC 2292 or 3542 + ssoJoinGroup // any-source multicast, RFC 3493 + ssoLeaveGroup // any-source multicast, RFC 3493 + ssoMax +) + +// Sticky socket option value types +const ( + ssoTypeInt = iota + 1 + ssoTypeInterface + ssoTypeICMPFilter + ssoTypeMTUInfo + ssoTypeIPMreq +) + +// A sockOpt represents a binding for sticky socket option. +type sockOpt struct { + level int // option level + name int // option name, must be equal or greater than 1 + typ int // option value type, must be equal or greater than 1 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/sockopt_rfc2292_unix.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/sockopt_rfc2292_unix.go new file mode 100644 index 000000000..851043a5e --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/sockopt_rfc2292_unix.go @@ -0,0 +1,70 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin + +package ipv6 + +import ( + "os" + "syscall" + "unsafe" +) + +func ipv6ReceiveTrafficClass(fd int) (bool, error) { + return false, errOpNoSupport +} + +func setIPv6ReceiveTrafficClass(fd int, v bool) error { + return errOpNoSupport +} + +func ipv6ReceiveHopLimit(fd int) (bool, error) { + v, err := syscall.GetsockoptInt(fd, ianaProtocolIPv6, sysSockopt2292HopLimit) + if err != nil { + return false, os.NewSyscallError("getsockopt", err) + } + return v == 1, nil +} + +func setIPv6ReceiveHopLimit(fd int, v bool) error { + return os.NewSyscallError("setsockopt", syscall.SetsockoptInt(fd, ianaProtocolIPv6, sysSockopt2292HopLimit, boolint(v))) +} + +func ipv6ReceivePacketInfo(fd int) (bool, error) { + v, err := syscall.GetsockoptInt(fd, ianaProtocolIPv6, sysSockopt2292PacketInfo) + if err != nil { + return false, os.NewSyscallError("getsockopt", err) + } + return v == 1, nil +} + +func setIPv6ReceivePacketInfo(fd int, v bool) error { + return os.NewSyscallError("setsockopt", syscall.SetsockoptInt(fd, ianaProtocolIPv6, sysSockopt2292PacketInfo, boolint(v))) +} + +func ipv6PathMTU(fd int) (int, error) { + return 0, errOpNoSupport +} + +func ipv6ReceivePathMTU(fd int) (bool, error) { + return false, errOpNoSupport +} + +func setIPv6ReceivePathMTU(fd int, v bool) error { + return errOpNoSupport +} + +func ipv6ICMPFilter(fd int) (*ICMPFilter, error) { + var v ICMPFilter + l := sysSockoptLen(sysSizeofICMPFilter) + if err := getsockopt(fd, ianaProtocolIPv6ICMP, sysSockoptICMPFilter, unsafe.Pointer(&v.sysICMPFilter), &l); err != nil { + return nil, os.NewSyscallError("getsockopt", err) + } + return &v, nil +} + +func setIPv6ICMPFilter(fd int, f *ICMPFilter) error { + return os.NewSyscallError("setsockopt", setsockopt(fd, ianaProtocolIPv6ICMP, sysSockoptICMPFilter, unsafe.Pointer(&f.sysICMPFilter), sysSizeofICMPFilter)) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/sockopt_rfc3493_bsd.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/sockopt_rfc3493_bsd.go new file mode 100644 index 000000000..0542253a3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/sockopt_rfc3493_bsd.go @@ -0,0 +1,19 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd netbsd openbsd + +package ipv6 + +import ( + "os" + "syscall" +) + +func setIPv6Checksum(fd int, on bool, offset int) error { + if !on { + offset = -1 + } + return os.NewSyscallError("setsockopt", syscall.SetsockoptInt(fd, ianaProtocolIPv6, sysSockoptChecksum, offset)) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/sockopt_rfc3493_linux.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/sockopt_rfc3493_linux.go new file mode 100644 index 000000000..0f4d2ba7d --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/sockopt_rfc3493_linux.go @@ -0,0 +1,17 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv6 + +import ( + "os" + "syscall" +) + +func setIPv6Checksum(fd int, on bool, offset int) error { + if !on { + offset = -1 + } + return os.NewSyscallError("setsockopt", syscall.SetsockoptInt(fd, ianaProtocolReserved, sysSockoptChecksum, offset)) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/sockopt_rfc3493_unix.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/sockopt_rfc3493_unix.go new file mode 100644 index 000000000..710bacc21 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/sockopt_rfc3493_unix.go @@ -0,0 +1,115 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd + +package ipv6 + +import ( + "net" + "os" + "syscall" + "unsafe" +) + +func ipv6TrafficClass(fd int) (int, error) { + v, err := syscall.GetsockoptInt(fd, ianaProtocolIPv6, sysSockoptTrafficClass) + if err != nil { + return 0, os.NewSyscallError("getsockopt", err) + } + return v, nil +} + +func setIPv6TrafficClass(fd, v int) error { + return os.NewSyscallError("setsockopt", syscall.SetsockoptInt(fd, ianaProtocolIPv6, sysSockoptTrafficClass, v)) +} + +func ipv6HopLimit(fd int) (int, error) { + v, err := syscall.GetsockoptInt(fd, ianaProtocolIPv6, sysSockoptUnicastHopLimit) + if err != nil { + return 0, os.NewSyscallError("getsockopt", err) + } + return v, nil +} + +func setIPv6HopLimit(fd, v int) error { + return os.NewSyscallError("setsockopt", syscall.SetsockoptInt(fd, ianaProtocolIPv6, sysSockoptUnicastHopLimit, v)) +} + +func ipv6Checksum(fd int) (bool, int, error) { + v, err := syscall.GetsockoptInt(fd, ianaProtocolIPv6, sysSockoptChecksum) + if err != nil { + return false, 0, os.NewSyscallError("getsockopt", err) + } + on := true + if v == -1 { + on = false + } + return on, v, nil +} + +func ipv6MulticastHopLimit(fd int) (int, error) { + v, err := syscall.GetsockoptInt(fd, ianaProtocolIPv6, sysSockoptMulticastHopLimit) + if err != nil { + return 0, os.NewSyscallError("getsockopt", err) + } + return v, nil +} + +func setIPv6MulticastHopLimit(fd, v int) error { + return os.NewSyscallError("setsockopt", syscall.SetsockoptInt(fd, ianaProtocolIPv6, sysSockoptMulticastHopLimit, v)) +} + +func ipv6MulticastInterface(fd int) (*net.Interface, error) { + v, err := syscall.GetsockoptInt(fd, ianaProtocolIPv6, sysSockoptMulticastInterface) + if err != nil { + return nil, os.NewSyscallError("getsockopt", err) + } + if v == 0 { + return nil, nil + } + ifi, err := net.InterfaceByIndex(v) + if err != nil { + return nil, err + } + return ifi, nil +} + +func setIPv6MulticastInterface(fd int, ifi *net.Interface) error { + var v int + if ifi != nil { + v = ifi.Index + } + return os.NewSyscallError("setsockopt", syscall.SetsockoptInt(fd, ianaProtocolIPv6, sysSockoptMulticastInterface, v)) +} + +func ipv6MulticastLoopback(fd int) (bool, error) { + v, err := syscall.GetsockoptInt(fd, ianaProtocolIPv6, sysSockoptMulticastLoopback) + if err != nil { + return false, os.NewSyscallError("getsockopt", err) + } + return v == 1, nil +} + +func setIPv6MulticastLoopback(fd int, v bool) error { + return os.NewSyscallError("setsockopt", syscall.SetsockoptInt(fd, ianaProtocolIPv6, sysSockoptMulticastLoopback, boolint(v))) +} + +func joinIPv6Group(fd int, ifi *net.Interface, grp net.IP) error { + mreq := sysMulticastReq{} + copy(mreq.IP[:], grp) + if ifi != nil { + mreq.IfIndex = uint32(ifi.Index) + } + return os.NewSyscallError("setsockopt", setsockopt(fd, ianaProtocolIPv6, sysSockoptJoinGroup, unsafe.Pointer(&mreq), sysSizeofMulticastReq)) +} + +func leaveIPv6Group(fd int, ifi *net.Interface, grp net.IP) error { + mreq := sysMulticastReq{} + copy(mreq.IP[:], grp) + if ifi != nil { + mreq.IfIndex = uint32(ifi.Index) + } + return os.NewSyscallError("setsockopt", setsockopt(fd, ianaProtocolIPv6, sysSockoptLeaveGroup, unsafe.Pointer(&mreq), sysSizeofMulticastReq)) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/sockopt_rfc3493_windows.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/sockopt_rfc3493_windows.go new file mode 100644 index 000000000..aeac8b6a8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/sockopt_rfc3493_windows.go @@ -0,0 +1,116 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv6 + +import ( + "net" + "os" + "syscall" + "unsafe" +) + +func ipv6TrafficClass(fd syscall.Handle) (int, error) { + // TODO(mikio): Implement this + return 0, syscall.EWINDOWS +} + +func setIPv6TrafficClass(fd syscall.Handle, v int) error { + // TODO(mikio): Implement this + return syscall.EWINDOWS +} + +func ipv6HopLimit(fd syscall.Handle) (int, error) { + var v int32 + l := int32(4) + if err := syscall.Getsockopt(fd, ianaProtocolIPv6, sysSockoptUnicastHopLimit, (*byte)(unsafe.Pointer(&v)), &l); err != nil { + return 0, os.NewSyscallError("getsockopt", err) + } + return int(v), nil +} + +func setIPv6HopLimit(fd syscall.Handle, v int) error { + vv := int32(v) + return os.NewSyscallError("setsockopt", syscall.Setsockopt(fd, ianaProtocolIPv6, sysSockoptUnicastHopLimit, (*byte)(unsafe.Pointer(&vv)), 4)) +} + +func ipv6Checksum(fd syscall.Handle) (bool, int, error) { + // TODO(mikio): Implement this + return false, 0, syscall.EWINDOWS +} + +func ipv6MulticastHopLimit(fd syscall.Handle) (int, error) { + var v int32 + l := int32(4) + if err := syscall.Getsockopt(fd, ianaProtocolIPv6, sysSockoptMulticastHopLimit, (*byte)(unsafe.Pointer(&v)), &l); err != nil { + return 0, os.NewSyscallError("getsockopt", err) + } + return int(v), nil +} + +func setIPv6MulticastHopLimit(fd syscall.Handle, v int) error { + vv := int32(v) + return os.NewSyscallError("setsockopt", syscall.Setsockopt(fd, ianaProtocolIPv6, sysSockoptMulticastHopLimit, (*byte)(unsafe.Pointer(&vv)), 4)) +} + +func ipv6MulticastInterface(fd syscall.Handle) (*net.Interface, error) { + var v int32 + l := int32(4) + if err := syscall.Getsockopt(fd, ianaProtocolIPv6, sysSockoptMulticastInterface, (*byte)(unsafe.Pointer(&v)), &l); err != nil { + return nil, os.NewSyscallError("getsockopt", err) + } + if v == 0 { + return nil, nil + } + ifi, err := net.InterfaceByIndex(int(v)) + if err != nil { + return nil, err + } + return ifi, nil +} + +func setIPv6MulticastInterface(fd syscall.Handle, ifi *net.Interface) error { + var v int32 + if ifi != nil { + v = int32(ifi.Index) + } + return os.NewSyscallError("setsockopt", syscall.Setsockopt(fd, ianaProtocolIPv6, sysSockoptMulticastInterface, (*byte)(unsafe.Pointer(&v)), 4)) +} + +func ipv6MulticastLoopback(fd syscall.Handle) (bool, error) { + var v int32 + l := int32(4) + if err := syscall.Getsockopt(fd, ianaProtocolIPv6, sysSockoptMulticastLoopback, (*byte)(unsafe.Pointer(&v)), &l); err != nil { + return false, os.NewSyscallError("getsockopt", err) + } + return v == 1, nil +} + +func setIPv6MulticastLoopback(fd syscall.Handle, v bool) error { + vv := int32(boolint(v)) + return os.NewSyscallError("setsockopt", syscall.Setsockopt(fd, ianaProtocolIPv6, sysSockoptMulticastLoopback, (*byte)(unsafe.Pointer(&vv)), 4)) +} + +func joinIPv6Group(fd syscall.Handle, ifi *net.Interface, grp net.IP) error { + mreq := sysMulticastReq{} + copy(mreq.IP[:], grp) + if ifi != nil { + mreq.IfIndex = uint32(ifi.Index) + } + return os.NewSyscallError("setsockopt", syscall.Setsockopt(fd, ianaProtocolIPv6, sysSockoptJoinGroup, (*byte)(unsafe.Pointer(&mreq)), int32(sysSizeofMulticastReq))) +} + +func leaveIPv6Group(fd syscall.Handle, ifi *net.Interface, grp net.IP) error { + mreq := sysMulticastReq{} + copy(mreq.IP[:], grp) + if ifi != nil { + mreq.IfIndex = uint32(ifi.Index) + } + return os.NewSyscallError("setsockopt", syscall.Setsockopt(fd, ianaProtocolIPv6, sysSockoptLeaveGroup, (*byte)(unsafe.Pointer(&mreq)), int32(sysSizeofMulticastReq))) +} + +func setIPv6Checksum(fd syscall.Handle, on bool, offset int) error { + // TODO(mikio): Implement this + return syscall.EWINDOWS +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/sockopt_rfc3542_stub.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/sockopt_rfc3542_stub.go new file mode 100644 index 000000000..03aa43b63 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/sockopt_rfc3542_stub.go @@ -0,0 +1,12 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build nacl plan9 solaris + +package ipv6 + +func ipv6PathMTU(fd int) (int, error) { + // TODO(mikio): Implement this + return 0, errOpNoSupport +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/sockopt_rfc3542_unix.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/sockopt_rfc3542_unix.go new file mode 100644 index 000000000..cf9d52636 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/sockopt_rfc3542_unix.go @@ -0,0 +1,83 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build dragonfly freebsd linux netbsd openbsd + +package ipv6 + +import ( + "os" + "syscall" + "unsafe" +) + +func ipv6ReceiveTrafficClass(fd int) (bool, error) { + v, err := syscall.GetsockoptInt(fd, ianaProtocolIPv6, sysSockoptReceiveTrafficClass) + if err != nil { + return false, os.NewSyscallError("getsockopt", err) + } + return v == 1, nil +} + +func setIPv6ReceiveTrafficClass(fd int, v bool) error { + return os.NewSyscallError("setsockopt", syscall.SetsockoptInt(fd, ianaProtocolIPv6, sysSockoptReceiveTrafficClass, boolint(v))) +} + +func ipv6ReceiveHopLimit(fd int) (bool, error) { + v, err := syscall.GetsockoptInt(fd, ianaProtocolIPv6, sysSockoptReceiveHopLimit) + if err != nil { + return false, os.NewSyscallError("getsockopt", err) + } + return v == 1, nil +} + +func setIPv6ReceiveHopLimit(fd int, v bool) error { + return os.NewSyscallError("setsockopt", syscall.SetsockoptInt(fd, ianaProtocolIPv6, sysSockoptReceiveHopLimit, boolint(v))) +} + +func ipv6ReceivePacketInfo(fd int) (bool, error) { + v, err := syscall.GetsockoptInt(fd, ianaProtocolIPv6, sysSockoptReceivePacketInfo) + if err != nil { + return false, os.NewSyscallError("getsockopt", err) + } + return v == 1, nil +} + +func setIPv6ReceivePacketInfo(fd int, v bool) error { + return os.NewSyscallError("setsockopt", syscall.SetsockoptInt(fd, ianaProtocolIPv6, sysSockoptReceivePacketInfo, boolint(v))) +} + +func ipv6PathMTU(fd int) (int, error) { + var v sysMTUInfo + l := sysSockoptLen(sysSizeofMTUInfo) + if err := getsockopt(fd, ianaProtocolIPv6, sysSockoptPathMTU, unsafe.Pointer(&v), &l); err != nil { + return 0, os.NewSyscallError("getsockopt", err) + } + return int(v.MTU), nil +} + +func ipv6ReceivePathMTU(fd int) (bool, error) { + v, err := syscall.GetsockoptInt(fd, ianaProtocolIPv6, sysSockoptReceivePathMTU) + if err != nil { + return false, os.NewSyscallError("getsockopt", err) + } + return v == 1, nil +} + +func setIPv6ReceivePathMTU(fd int, v bool) error { + return os.NewSyscallError("setsockopt", syscall.SetsockoptInt(fd, ianaProtocolIPv6, sysSockoptReceivePathMTU, boolint(v))) +} + +func ipv6ICMPFilter(fd int) (*ICMPFilter, error) { + var v ICMPFilter + l := sysSockoptLen(sysSizeofICMPFilter) + if err := getsockopt(fd, ianaProtocolIPv6ICMP, sysSockoptICMPFilter, unsafe.Pointer(&v.sysICMPFilter), &l); err != nil { + return nil, os.NewSyscallError("getsockopt", err) + } + return &v, nil +} + +func setIPv6ICMPFilter(fd int, f *ICMPFilter) error { + return os.NewSyscallError("setsockopt", setsockopt(fd, ianaProtocolIPv6ICMP, sysSockoptICMPFilter, unsafe.Pointer(&f.sysICMPFilter), sysSizeofICMPFilter)) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/sockopt_rfc3542_windows.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/sockopt_rfc3542_windows.go new file mode 100644 index 000000000..2bc22d9a5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/sockopt_rfc3542_windows.go @@ -0,0 +1,62 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv6 + +import "syscall" + +func ipv6ReceiveTrafficClass(fd syscall.Handle) (bool, error) { + // TODO(mikio): Implement this + return false, syscall.EWINDOWS +} + +func setIPv6ReceiveTrafficClass(fd syscall.Handle, v bool) error { + // TODO(mikio): Implement this + return syscall.EWINDOWS +} + +func ipv6ReceiveHopLimit(fd syscall.Handle) (bool, error) { + // TODO(mikio): Implement this + return false, syscall.EWINDOWS +} + +func setIPv6ReceiveHopLimit(fd syscall.Handle, v bool) error { + // TODO(mikio): Implement this + return syscall.EWINDOWS +} + +func ipv6ReceivePacketInfo(fd syscall.Handle) (bool, error) { + // TODO(mikio): Implement this + return false, syscall.EWINDOWS +} + +func setIPv6ReceivePacketInfo(fd syscall.Handle, v bool) error { + // TODO(mikio): Implement this + return syscall.EWINDOWS +} + +func ipv6PathMTU(fd syscall.Handle) (int, error) { + // TODO(mikio): Implement this + return 0, syscall.EWINDOWS +} + +func ipv6ReceivePathMTU(fd syscall.Handle) (bool, error) { + // TODO(mikio): Implement this + return false, syscall.EWINDOWS +} + +func setIPv6ReceivePathMTU(fd syscall.Handle, v bool) error { + // TODO(mikio): Implement this + return syscall.EWINDOWS +} + +func ipv6ICMPFilter(fd syscall.Handle) (*ICMPFilter, error) { + // TODO(mikio): Implement this + return nil, syscall.EWINDOWS +} + +func setIPv6ICMPFilter(fd syscall.Handle, f *ICMPFilter) error { + // TODO(mikio): Implement this + return syscall.EWINDOWS +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/sys.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/sys.go new file mode 100644 index 000000000..18b1acacd --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/sys.go @@ -0,0 +1,23 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv6 + +type sysSockoptLen uint32 + +const ( + sysSizeofPacketInfo = 0x14 + sysSizeofMulticastReq = 0x14 + sysSizeofICMPFilter = 0x20 +) + +type sysPacketInfo struct { + IP [16]byte + IfIndex uint32 +} + +type sysMulticastReq struct { + IP [16]byte + IfIndex uint32 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/sys_bsd.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/sys_bsd.go new file mode 100644 index 000000000..9e2ef4b00 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/sys_bsd.go @@ -0,0 +1,37 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build dragonfly freebsd netbsd openbsd + +package ipv6 + +import ( + "net" + "syscall" +) + +// RFC 3542 options +const ( + // See /usr/include/netinet6/in6.h. + sysSockoptReceiveTrafficClass = syscall.IPV6_RECVTCLASS + sysSockoptTrafficClass = syscall.IPV6_TCLASS + sysSockoptReceiveHopLimit = syscall.IPV6_RECVHOPLIMIT + sysSockoptHopLimit = syscall.IPV6_HOPLIMIT + sysSockoptReceivePacketInfo = syscall.IPV6_RECVPKTINFO + sysSockoptPacketInfo = syscall.IPV6_PKTINFO + sysSockoptReceivePathMTU = syscall.IPV6_RECVPATHMTU + sysSockoptPathMTU = syscall.IPV6_PATHMTU + sysSockoptNextHop = syscall.IPV6_NEXTHOP + sysSockoptChecksum = syscall.IPV6_CHECKSUM + + // See /usr/include/netinet6/in6.h. + sysSockoptICMPFilter = 0x12 // syscall.ICMP6_FILTER +) + +func setSockaddr(sa *syscall.RawSockaddrInet6, ip net.IP, ifindex int) { + sa.Len = syscall.SizeofSockaddrInet6 + sa.Family = syscall.AF_INET6 + copy(sa.Addr[:], ip) + sa.Scope_id = uint32(ifindex) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/sys_darwin.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/sys_darwin.go new file mode 100644 index 000000000..418eb4849 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/sys_darwin.go @@ -0,0 +1,43 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv6 + +import ( + "net" + "syscall" +) + +// RFC 2292 options +const ( + // See /usr/include/netinet6/in6.h. + sysSockopt2292HopLimit = syscall.IPV6_2292HOPLIMIT + sysSockopt2292PacketInfo = syscall.IPV6_2292PKTINFO + sysSockopt2292NextHop = syscall.IPV6_2292NEXTHOP +) + +// RFC 3542 options +const ( + // See /usr/include/netinet6/in6.h. + sysSockoptReceiveTrafficClass = 0x23 // IPV6_RECVTCLASS + sysSockoptTrafficClass = 0x24 // IPV6_TCLASS + sysSockoptReceiveHopLimit = 0x25 // IPV6_RECVHOPLIMIT + sysSockoptHopLimit = 0x2f // IPV6_HOPLIMIT + sysSockoptReceivePacketInfo = 0x3d // IPV6_RECVPKTINFO + sysSockoptPacketInfo = 0x2e // IPV6_PKTINFO + sysSockoptReceivePathMTU = 0x2b // IPV6_RECVPATHMTU + sysSockoptPathMTU = 0x2c // IPV6_PATHMTU + sysSockoptNextHop = 0x30 // IPV6_NEXTHOP + sysSockoptChecksum = 0x1a // IPV6_CHECKSUM + + // See /usr/include/netinet6/in6.h. + sysSockoptICMPFilter = 0x12 // ICMP6_FILTER +) + +func setSockaddr(sa *syscall.RawSockaddrInet6, ip net.IP, ifindex int) { + sa.Len = syscall.SizeofSockaddrInet6 + sa.Family = syscall.AF_INET6 + copy(sa.Addr[:], ip) + sa.Scope_id = uint32(ifindex) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/sys_linux.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/sys_linux.go new file mode 100644 index 000000000..e711f0047 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/sys_linux.go @@ -0,0 +1,34 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv6 + +import ( + "net" + "syscall" +) + +// RFC 3542 options +const ( + // See /usr/include/linux/ipv6.h,in6.h. + sysSockoptReceiveTrafficClass = syscall.IPV6_RECVTCLASS + sysSockoptTrafficClass = syscall.IPV6_TCLASS + sysSockoptReceiveHopLimit = syscall.IPV6_RECVHOPLIMIT + sysSockoptHopLimit = syscall.IPV6_HOPLIMIT + sysSockoptReceivePacketInfo = syscall.IPV6_RECVPKTINFO + sysSockoptPacketInfo = syscall.IPV6_PKTINFO + sysSockoptReceivePathMTU = 0x3c // IPV6_RECVPATHMTU + sysSockoptPathMTU = 0x3d // IPV6_PATHMTU + sysSockoptNextHop = syscall.IPV6_NEXTHOP + sysSockoptChecksum = syscall.IPV6_CHECKSUM + + // See /usr/include/linux/icmpv6.h. + sysSockoptICMPFilter = 0x1 // syscall.ICMPV6_FILTER +) + +func setSockaddr(sa *syscall.RawSockaddrInet6, ip net.IP, ifindex int) { + sa.Family = syscall.AF_INET6 + copy(sa.Addr[:], ip) + sa.Scope_id = uint32(ifindex) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/sys_unix.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/sys_unix.go new file mode 100644 index 000000000..fc5b00d28 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/sys_unix.go @@ -0,0 +1,26 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd + +package ipv6 + +import "syscall" + +// RFC 3493 options +const ( + sysSockoptUnicastHopLimit = syscall.IPV6_UNICAST_HOPS + sysSockoptMulticastHopLimit = syscall.IPV6_MULTICAST_HOPS + sysSockoptMulticastInterface = syscall.IPV6_MULTICAST_IF + sysSockoptMulticastLoopback = syscall.IPV6_MULTICAST_LOOP + sysSockoptJoinGroup = syscall.IPV6_JOIN_GROUP + sysSockoptLeaveGroup = syscall.IPV6_LEAVE_GROUP +) + +const sysSizeofMTUInfo = 0x20 + +type sysMTUInfo struct { + Addr syscall.RawSockaddrInet6 + MTU uint32 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/sys_windows.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/sys_windows.go new file mode 100644 index 000000000..9fef66a53 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/sys_windows.go @@ -0,0 +1,33 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv6 + +import ( + "net" + "syscall" +) + +// RFC 3493 options +const ( + // See ws2tcpip.h. + sysSockoptUnicastHopLimit = syscall.IPV6_UNICAST_HOPS + sysSockoptMulticastHopLimit = syscall.IPV6_MULTICAST_HOPS + sysSockoptMulticastInterface = syscall.IPV6_MULTICAST_IF + sysSockoptMulticastLoopback = syscall.IPV6_MULTICAST_LOOP + sysSockoptJoinGroup = syscall.IPV6_JOIN_GROUP + sysSockoptLeaveGroup = syscall.IPV6_LEAVE_GROUP +) + +// RFC 3542 options +const ( + // See ws2tcpip.h. + sysSockoptPacketInfo = 0x13 // IPV6_PKTINFO +) + +func setSockaddr(sa *syscall.RawSockaddrInet6, ip net.IP, ifindex int) { + sa.Family = syscall.AF_INET6 + copy(sa.Addr[:], ip) + sa.Scope_id = uint32(ifindex) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/syscall_linux_386.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/syscall_linux_386.go new file mode 100644 index 000000000..82633a564 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/syscall_linux_386.go @@ -0,0 +1,31 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv6 + +import ( + "syscall" + "unsafe" +) + +const ( + sysGETSOCKOPT = 0xf + sysSETSOCKOPT = 0xe +) + +func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) + +func getsockopt(fd, level, name int, v unsafe.Pointer, l *sysSockoptLen) error { + if _, errno := socketcall(sysGETSOCKOPT, uintptr(fd), uintptr(level), uintptr(name), uintptr(v), uintptr(unsafe.Pointer(l)), 0); errno != 0 { + return error(errno) + } + return nil +} + +func setsockopt(fd, level, name int, v unsafe.Pointer, l sysSockoptLen) error { + if _, errno := socketcall(sysSETSOCKOPT, uintptr(fd), uintptr(level), uintptr(name), uintptr(v), uintptr(l), 0); errno != 0 { + return error(errno) + } + return nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/syscall_unix.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/syscall_unix.go new file mode 100644 index 000000000..73b949fff --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/syscall_unix.go @@ -0,0 +1,26 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux,amd64 linux,arm netbsd openbsd + +package ipv6 + +import ( + "syscall" + "unsafe" +) + +func getsockopt(fd, level, name int, v unsafe.Pointer, l *sysSockoptLen) error { + if _, _, errno := syscall.Syscall6(syscall.SYS_GETSOCKOPT, uintptr(fd), uintptr(level), uintptr(name), uintptr(v), uintptr(unsafe.Pointer(l)), 0); errno != 0 { + return error(errno) + } + return nil +} + +func setsockopt(fd, level, name int, v unsafe.Pointer, l sysSockoptLen) error { + if _, _, errno := syscall.Syscall6(syscall.SYS_SETSOCKOPT, uintptr(fd), uintptr(level), uintptr(name), uintptr(v), uintptr(l), 0); errno != 0 { + return error(errno) + } + return nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/thunk_linux_386.s b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/thunk_linux_386.s new file mode 100644 index 000000000..daa78bc02 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/thunk_linux_386.s @@ -0,0 +1,8 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build go1.2 + +TEXT ·socketcall(SB),4,$0-36 + JMP syscall·socketcall(SB) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/zsys_darwin.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/zsys_darwin.go new file mode 100644 index 000000000..bd168835c --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/zsys_darwin.go @@ -0,0 +1,101 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_darwin.go + +package ipv6 + +const ( + sysIPV6_UNICAST_HOPS = 0x4 + sysIPV6_MULTICAST_IF = 0x9 + sysIPV6_MULTICAST_HOPS = 0xa + sysIPV6_MULTICAST_LOOP = 0xb + sysIPV6_JOIN_GROUP = 0xc + sysIPV6_LEAVE_GROUP = 0xd + + sysIPV6_PORTRANGE = 0xe + sysICMP6_FILTER = 0x12 + sysIPV6_2292PKTINFO = 0x13 + sysIPV6_2292HOPLIMIT = 0x14 + sysIPV6_2292NEXTHOP = 0x15 + sysIPV6_2292HOPOPTS = 0x16 + sysIPV6_2292DSTOPTS = 0x17 + sysIPV6_2292RTHDR = 0x18 + + sysIPV6_2292PKTOPTIONS = 0x19 + + sysIPV6_CHECKSUM = 0x1a + sysIPV6_V6ONLY = 0x1b + + sysIPV6_IPSEC_POLICY = 0x1c + + sysIPV6_RECVTCLASS = 0x23 + sysIPV6_TCLASS = 0x24 + + sysIPV6_RTHDRDSTOPTS = 0x39 + + sysIPV6_RECVPKTINFO = 0x3d + + sysIPV6_RECVHOPLIMIT = 0x25 + sysIPV6_RECVRTHDR = 0x26 + sysIPV6_RECVHOPOPTS = 0x27 + sysIPV6_RECVDSTOPTS = 0x28 + + sysIPV6_USE_MIN_MTU = 0x2a + sysIPV6_RECVPATHMTU = 0x2b + + sysIPV6_PATHMTU = 0x2c + + sysIPV6_PKTINFO = 0x2e + sysIPV6_HOPLIMIT = 0x2f + sysIPV6_NEXTHOP = 0x30 + sysIPV6_HOPOPTS = 0x31 + sysIPV6_DSTOPTS = 0x32 + sysIPV6_RTHDR = 0x33 + + sysIPV6_AUTOFLOWLABEL = 0x3b + + sysIPV6_DONTFRAG = 0x3e + + sysIPV6_PREFER_TEMPADDR = 0x3f + + sysIPV6_BOUND_IF = 0x7d + + sysIPV6_PORTRANGE_DEFAULT = 0x0 + sysIPV6_PORTRANGE_HIGH = 0x1 + sysIPV6_PORTRANGE_LOW = 0x2 + + sysSizeofSockaddrInet6 = 0x1c + sysSizeofInet6Pktinfo = 0x14 + sysSizeofIPv6Mtuinfo = 0x20 + + sysSizeofIPv6Mreq = 0x14 + + sysSizeofICMPv6Filter = 0x20 +) + +type sysSockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type sysInet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type sysIPv6Mtuinfo struct { + Addr sysSockaddrInet6 + Mtu uint32 +} + +type sysIPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type sysICMPv6Filter struct { + Filt [8]uint32 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/zsys_dragonfly.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/zsys_dragonfly.go new file mode 100644 index 000000000..5a03ab734 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/zsys_dragonfly.go @@ -0,0 +1,90 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_dragonfly.go + +// +build dragonfly + +package ipv6 + +const ( + sysIPV6_UNICAST_HOPS = 0x4 + sysIPV6_MULTICAST_IF = 0x9 + sysIPV6_MULTICAST_HOPS = 0xa + sysIPV6_MULTICAST_LOOP = 0xb + sysIPV6_JOIN_GROUP = 0xc + sysIPV6_LEAVE_GROUP = 0xd + sysIPV6_PORTRANGE = 0xe + sysICMP6_FILTER = 0x12 + + sysIPV6_CHECKSUM = 0x1a + sysIPV6_V6ONLY = 0x1b + + sysIPV6_IPSEC_POLICY = 0x1c + + sysIPV6_RTHDRDSTOPTS = 0x23 + sysIPV6_RECVPKTINFO = 0x24 + sysIPV6_RECVHOPLIMIT = 0x25 + sysIPV6_RECVRTHDR = 0x26 + sysIPV6_RECVHOPOPTS = 0x27 + sysIPV6_RECVDSTOPTS = 0x28 + + sysIPV6_USE_MIN_MTU = 0x2a + sysIPV6_RECVPATHMTU = 0x2b + + sysIPV6_PATHMTU = 0x2c + + sysIPV6_PKTINFO = 0x2e + sysIPV6_HOPLIMIT = 0x2f + sysIPV6_NEXTHOP = 0x30 + sysIPV6_HOPOPTS = 0x31 + sysIPV6_DSTOPTS = 0x32 + sysIPV6_RTHDR = 0x33 + + sysIPV6_RECVTCLASS = 0x39 + + sysIPV6_AUTOFLOWLABEL = 0x3b + + sysIPV6_TCLASS = 0x3d + sysIPV6_DONTFRAG = 0x3e + + sysIPV6_PREFER_TEMPADDR = 0x3f + + sysIPV6_PORTRANGE_DEFAULT = 0x0 + sysIPV6_PORTRANGE_HIGH = 0x1 + sysIPV6_PORTRANGE_LOW = 0x2 + + sysSizeofSockaddrInet6 = 0x1c + sysSizeofInet6Pktinfo = 0x14 + sysSizeofIPv6Mtuinfo = 0x20 + + sysSizeofIPv6Mreq = 0x14 + + sysSizeofICMPv6Filter = 0x20 +) + +type sysSockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type sysInet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type sysIPv6Mtuinfo struct { + Addr sysSockaddrInet6 + Mtu uint32 +} + +type sysIPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type sysICMPv6Filter struct { + Filt [8]uint32 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/zsys_freebsd.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/zsys_freebsd.go new file mode 100644 index 000000000..381b35705 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/zsys_freebsd.go @@ -0,0 +1,91 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_freebsd.go + +package ipv6 + +const ( + sysIPV6_UNICAST_HOPS = 0x4 + sysIPV6_MULTICAST_IF = 0x9 + sysIPV6_MULTICAST_HOPS = 0xa + sysIPV6_MULTICAST_LOOP = 0xb + sysIPV6_JOIN_GROUP = 0xc + sysIPV6_LEAVE_GROUP = 0xd + sysIPV6_PORTRANGE = 0xe + sysICMP6_FILTER = 0x12 + + sysIPV6_CHECKSUM = 0x1a + sysIPV6_V6ONLY = 0x1b + + sysIPV6_IPSEC_POLICY = 0x1c + + sysIPV6_RTHDRDSTOPTS = 0x23 + + sysIPV6_RECVPKTINFO = 0x24 + sysIPV6_RECVHOPLIMIT = 0x25 + sysIPV6_RECVRTHDR = 0x26 + sysIPV6_RECVHOPOPTS = 0x27 + sysIPV6_RECVDSTOPTS = 0x28 + + sysIPV6_USE_MIN_MTU = 0x2a + sysIPV6_RECVPATHMTU = 0x2b + + sysIPV6_PATHMTU = 0x2c + + sysIPV6_PKTINFO = 0x2e + sysIPV6_HOPLIMIT = 0x2f + sysIPV6_NEXTHOP = 0x30 + sysIPV6_HOPOPTS = 0x31 + sysIPV6_DSTOPTS = 0x32 + sysIPV6_RTHDR = 0x33 + + sysIPV6_RECVTCLASS = 0x39 + + sysIPV6_AUTOFLOWLABEL = 0x3b + + sysIPV6_TCLASS = 0x3d + sysIPV6_DONTFRAG = 0x3e + + sysIPV6_PREFER_TEMPADDR = 0x3f + + sysIPV6_BINDANY = 0x40 + + sysIPV6_PORTRANGE_DEFAULT = 0x0 + sysIPV6_PORTRANGE_HIGH = 0x1 + sysIPV6_PORTRANGE_LOW = 0x2 + + sysSizeofSockaddrInet6 = 0x1c + sysSizeofInet6Pktinfo = 0x14 + sysSizeofIPv6Mtuinfo = 0x20 + + sysSizeofIPv6Mreq = 0x14 + + sysSizeofICMPv6Filter = 0x20 +) + +type sysSockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type sysInet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type sysIPv6Mtuinfo struct { + Addr sysSockaddrInet6 + Mtu uint32 +} + +type sysIPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type sysICMPv6Filter struct { + Filt [8]uint32 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/zsys_linux.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/zsys_linux.go new file mode 100644 index 000000000..442642e69 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/zsys_linux.go @@ -0,0 +1,133 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_linux.go + +package ipv6 + +const ( + sysIPV6_ADDRFORM = 0x1 + sysIPV6_2292PKTINFO = 0x2 + sysIPV6_2292HOPOPTS = 0x3 + sysIPV6_2292DSTOPTS = 0x4 + sysIPV6_2292RTHDR = 0x5 + sysIPV6_2292PKTOPTIONS = 0x6 + sysIPV6_CHECKSUM = 0x7 + sysIPV6_2292HOPLIMIT = 0x8 + sysIPV6_NEXTHOP = 0x9 + sysIPV6_FLOWINFO = 0xb + + sysIPV6_UNICAST_HOPS = 0x10 + sysIPV6_MULTICAST_IF = 0x11 + sysIPV6_MULTICAST_HOPS = 0x12 + sysIPV6_MULTICAST_LOOP = 0x13 + sysIPV6_ADD_MEMBERSHIP = 0x14 + sysIPV6_DROP_MEMBERSHIP = 0x15 + sysIPV6_ROUTER_ALERT = 0x16 + sysIPV6_MTU_DISCOVER = 0x17 + sysIPV6_MTU = 0x18 + sysIPV6_RECVERR = 0x19 + sysIPV6_V6ONLY = 0x1a + sysIPV6_JOIN_ANYCAST = 0x1b + sysIPV6_LEAVE_ANYCAST = 0x1c + + sysIPV6_PMTUDISC_DONT = 0x0 + sysIPV6_PMTUDISC_WANT = 0x1 + sysIPV6_PMTUDISC_DO = 0x2 + sysIPV6_PMTUDISC_PROBE = 0x3 + sysIPV6_PMTUDISC_INTERFACE = 0x4 + sysIPV6_PMTUDISC_OMIT = 0x5 + + sysIPV6_FLOWLABEL_MGR = 0x20 + sysIPV6_FLOWINFO_SEND = 0x21 + + sysIPV6_IPSEC_POLICY = 0x22 + sysIPV6_XFRM_POLICY = 0x23 + + sysIPV6_RECVPKTINFO = 0x31 + sysIPV6_PKTINFO = 0x32 + sysIPV6_RECVHOPLIMIT = 0x33 + sysIPV6_HOPLIMIT = 0x34 + sysIPV6_RECVHOPOPTS = 0x35 + sysIPV6_HOPOPTS = 0x36 + sysIPV6_RTHDRDSTOPTS = 0x37 + sysIPV6_RECVRTHDR = 0x38 + sysIPV6_RTHDR = 0x39 + sysIPV6_RECVDSTOPTS = 0x3a + sysIPV6_DSTOPTS = 0x3b + sysIPV6_RECVPATHMTU = 0x3c + sysIPV6_PATHMTU = 0x3d + sysIPV6_DONTFRAG = 0x3e + + sysIPV6_RECVTCLASS = 0x42 + sysIPV6_TCLASS = 0x43 + + sysIPV6_ADDR_PREFERENCES = 0x48 + + sysIPV6_PREFER_SRC_TMP = 0x1 + sysIPV6_PREFER_SRC_PUBLIC = 0x2 + sysIPV6_PREFER_SRC_PUBTMP_DEFAULT = 0x100 + sysIPV6_PREFER_SRC_COA = 0x4 + sysIPV6_PREFER_SRC_HOME = 0x400 + sysIPV6_PREFER_SRC_CGA = 0x8 + sysIPV6_PREFER_SRC_NONCGA = 0x800 + + sysIPV6_MINHOPCOUNT = 0x49 + + sysIPV6_ORIGDSTADDR = 0x4a + sysIPV6_RECVORIGDSTADDR = 0x4a + sysIPV6_TRANSPARENT = 0x4b + sysIPV6_UNICAST_IF = 0x4c + + sysICMPV6_FILTER = 0x1 + + sysICMPV6_FILTER_BLOCK = 0x1 + sysICMPV6_FILTER_PASS = 0x2 + sysICMPV6_FILTER_BLOCKOTHERS = 0x3 + sysICMPV6_FILTER_PASSONLY = 0x4 + + sysSizeofSockaddrInet6 = 0x1c + sysSizeofInet6Pktinfo = 0x14 + sysSizeofIPv6Mtuinfo = 0x20 + sysSizeofIPv6FlowlabelReq = 0x20 + + sysSizeofIPv6Mreq = 0x14 + + sysSizeofICMPv6Filter = 0x20 +) + +type sysSockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type sysInet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex int32 +} + +type sysIPv6Mtuinfo struct { + Addr sysSockaddrInet6 + Mtu uint32 +} + +type sysIPv6FlowlabelReq struct { + Dst [16]byte /* in6_addr */ + Label uint32 + Action uint8 + Share uint8 + Flags uint16 + Expires uint16 + Linger uint16 + X__flr_pad uint32 +} + +type sysIPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Ifindex int32 +} + +type sysICMPv6Filter struct { + Data [8]uint32 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/zsys_netbsd.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/zsys_netbsd.go new file mode 100644 index 000000000..d6ec88e39 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/zsys_netbsd.go @@ -0,0 +1,84 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_netbsd.go + +package ipv6 + +const ( + sysIPV6_UNICAST_HOPS = 0x4 + sysIPV6_MULTICAST_IF = 0x9 + sysIPV6_MULTICAST_HOPS = 0xa + sysIPV6_MULTICAST_LOOP = 0xb + sysIPV6_JOIN_GROUP = 0xc + sysIPV6_LEAVE_GROUP = 0xd + sysIPV6_PORTRANGE = 0xe + sysICMP6_FILTER = 0x12 + + sysIPV6_CHECKSUM = 0x1a + sysIPV6_V6ONLY = 0x1b + + sysIPV6_IPSEC_POLICY = 0x1c + + sysIPV6_RTHDRDSTOPTS = 0x23 + + sysIPV6_RECVPKTINFO = 0x24 + sysIPV6_RECVHOPLIMIT = 0x25 + sysIPV6_RECVRTHDR = 0x26 + sysIPV6_RECVHOPOPTS = 0x27 + sysIPV6_RECVDSTOPTS = 0x28 + + sysIPV6_USE_MIN_MTU = 0x2a + sysIPV6_RECVPATHMTU = 0x2b + sysIPV6_PATHMTU = 0x2c + + sysIPV6_PKTINFO = 0x2e + sysIPV6_HOPLIMIT = 0x2f + sysIPV6_NEXTHOP = 0x30 + sysIPV6_HOPOPTS = 0x31 + sysIPV6_DSTOPTS = 0x32 + sysIPV6_RTHDR = 0x33 + + sysIPV6_RECVTCLASS = 0x39 + + sysIPV6_TCLASS = 0x3d + sysIPV6_DONTFRAG = 0x3e + + sysIPV6_PORTRANGE_DEFAULT = 0x0 + sysIPV6_PORTRANGE_HIGH = 0x1 + sysIPV6_PORTRANGE_LOW = 0x2 + + sysSizeofSockaddrInet6 = 0x1c + sysSizeofInet6Pktinfo = 0x14 + sysSizeofIPv6Mtuinfo = 0x20 + + sysSizeofIPv6Mreq = 0x14 + + sysSizeofICMPv6Filter = 0x20 +) + +type sysSockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type sysInet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type sysIPv6Mtuinfo struct { + Addr sysSockaddrInet6 + Mtu uint32 +} + +type sysIPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type sysICMPv6Filter struct { + Filt [8]uint32 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/zsys_openbsd.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/zsys_openbsd.go new file mode 100644 index 000000000..3e080b78a --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/zsys_openbsd.go @@ -0,0 +1,93 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_openbsd.go + +package ipv6 + +const ( + sysIPV6_UNICAST_HOPS = 0x4 + sysIPV6_MULTICAST_IF = 0x9 + sysIPV6_MULTICAST_HOPS = 0xa + sysIPV6_MULTICAST_LOOP = 0xb + sysIPV6_JOIN_GROUP = 0xc + sysIPV6_LEAVE_GROUP = 0xd + sysIPV6_PORTRANGE = 0xe + sysICMP6_FILTER = 0x12 + + sysIPV6_CHECKSUM = 0x1a + sysIPV6_V6ONLY = 0x1b + + sysIPV6_RTHDRDSTOPTS = 0x23 + + sysIPV6_RECVPKTINFO = 0x24 + sysIPV6_RECVHOPLIMIT = 0x25 + sysIPV6_RECVRTHDR = 0x26 + sysIPV6_RECVHOPOPTS = 0x27 + sysIPV6_RECVDSTOPTS = 0x28 + + sysIPV6_USE_MIN_MTU = 0x2a + sysIPV6_RECVPATHMTU = 0x2b + + sysIPV6_PATHMTU = 0x2c + + sysIPV6_PKTINFO = 0x2e + sysIPV6_HOPLIMIT = 0x2f + sysIPV6_NEXTHOP = 0x30 + sysIPV6_HOPOPTS = 0x31 + sysIPV6_DSTOPTS = 0x32 + sysIPV6_RTHDR = 0x33 + + sysIPV6_AUTH_LEVEL = 0x35 + sysIPV6_ESP_TRANS_LEVEL = 0x36 + sysIPV6_ESP_NETWORK_LEVEL = 0x37 + sysIPSEC6_OUTSA = 0x38 + sysIPV6_RECVTCLASS = 0x39 + + sysIPV6_AUTOFLOWLABEL = 0x3b + sysIPV6_IPCOMP_LEVEL = 0x3c + + sysIPV6_TCLASS = 0x3d + sysIPV6_DONTFRAG = 0x3e + sysIPV6_PIPEX = 0x3f + + sysIPV6_RTABLE = 0x1021 + + sysIPV6_PORTRANGE_DEFAULT = 0x0 + sysIPV6_PORTRANGE_HIGH = 0x1 + sysIPV6_PORTRANGE_LOW = 0x2 + + sysSizeofSockaddrInet6 = 0x1c + sysSizeofInet6Pktinfo = 0x14 + sysSizeofIPv6Mtuinfo = 0x20 + + sysSizeofIPv6Mreq = 0x14 + + sysSizeofICMPv6Filter = 0x20 +) + +type sysSockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type sysInet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type sysIPv6Mtuinfo struct { + Addr sysSockaddrInet6 + Mtu uint32 +} + +type sysIPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type sysICMPv6Filter struct { + Filt [8]uint32 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/zsys_solaris.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/zsys_solaris.go new file mode 100644 index 000000000..cdf00c25d --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/go.net/ipv6/zsys_solaris.go @@ -0,0 +1,105 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_solaris.go + +// +build solaris + +package ipv6 + +const ( + sysIPV6_UNICAST_HOPS = 0x5 + sysIPV6_MULTICAST_IF = 0x6 + sysIPV6_MULTICAST_HOPS = 0x7 + sysIPV6_MULTICAST_LOOP = 0x8 + sysIPV6_JOIN_GROUP = 0x9 + sysIPV6_LEAVE_GROUP = 0xa + + sysIPV6_PKTINFO = 0xb + + sysIPV6_HOPLIMIT = 0xc + sysIPV6_NEXTHOP = 0xd + sysIPV6_HOPOPTS = 0xe + sysIPV6_DSTOPTS = 0xf + + sysIPV6_RTHDR = 0x10 + sysIPV6_RTHDRDSTOPTS = 0x11 + + sysIPV6_RECVPKTINFO = 0x12 + sysIPV6_RECVHOPLIMIT = 0x13 + sysIPV6_RECVHOPOPTS = 0x14 + + sysIPV6_RECVRTHDR = 0x16 + + sysIPV6_RECVRTHDRDSTOPTS = 0x17 + + sysIPV6_CHECKSUM = 0x18 + sysIPV6_RECVTCLASS = 0x19 + sysIPV6_USE_MIN_MTU = 0x20 + sysIPV6_DONTFRAG = 0x21 + sysIPV6_SEC_OPT = 0x22 + sysIPV6_SRC_PREFERENCES = 0x23 + sysIPV6_RECVPATHMTU = 0x24 + sysIPV6_PATHMTU = 0x25 + sysIPV6_TCLASS = 0x26 + sysIPV6_V6ONLY = 0x27 + + sysIPV6_RECVDSTOPTS = 0x28 + + sysIPV6_PREFER_SRC_HOME = 0x1 + sysIPV6_PREFER_SRC_COA = 0x2 + sysIPV6_PREFER_SRC_PUBLIC = 0x4 + sysIPV6_PREFER_SRC_TMP = 0x8 + sysIPV6_PREFER_SRC_NONCGA = 0x10 + sysIPV6_PREFER_SRC_CGA = 0x20 + + sysIPV6_PREFER_SRC_MIPMASK = 0x3 + sysIPV6_PREFER_SRC_MIPDEFAULT = 0x1 + sysIPV6_PREFER_SRC_TMPMASK = 0xc + sysIPV6_PREFER_SRC_TMPDEFAULT = 0x4 + sysIPV6_PREFER_SRC_CGAMASK = 0x30 + sysIPV6_PREFER_SRC_CGADEFAULT = 0x10 + + sysIPV6_PREFER_SRC_MASK = 0x3f + + sysIPV6_PREFER_SRC_DEFAULT = 0x15 + + sysIPV6_BOUND_IF = 0x41 + sysIPV6_UNSPEC_SRC = 0x42 + + sysICMP6_FILTER = 0x1 + + sysSizeofSockaddrInet6 = 0x20 + sysSizeofInet6Pktinfo = 0x14 + sysSizeofIPv6Mtuinfo = 0x24 + + sysSizeofIPv6Mreq = 0x14 + + sysSizeofICMPv6Filter = 0x20 +) + +type sysSockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 + X__sin6_src_id uint32 +} + +type sysInet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type sysIPv6Mtuinfo struct { + Addr sysSockaddrInet6 + Mtu uint32 +} + +type sysIPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type sysICMPv6Filter struct { + X__icmp6_filt [8]uint32 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/mdns/LICENSE b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/mdns/LICENSE new file mode 100644 index 000000000..a5df10e67 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/mdns/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2014 Armon Dadgar + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/mdns/README.md b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/mdns/README.md new file mode 100644 index 000000000..80f3d90ab --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/mdns/README.md @@ -0,0 +1,37 @@ +mdns +==== + +Simple mDNS client/server library in Golang. mDNS or Multicast DNS can be +used to discover services on the local network without the use of an authoritative +DNS server. This enables peer-to-peer discovery. It is important to note that many +networks restrict the use of multicasting, which prevents mDNS from functioning. +Notably, multicast cannot be used in any sort of cloud, or shared infrastructure +environment. However it works well in most office, home, or private infrastructure +environments. + +Using the library is very simple, here is an example of publishing a service entry: + + // Setup our service export + host, _ := os.Hostname() + info := []string{"My awesome service"}, + service, _ := NewMDNSService(host, "_foobar._tcp", "", "", 8000, nil, info) + + // Create the mDNS server, defer shutdown + server, _ := mdns.NewServer(&mdns.Config{Zone: service}) + defer server.Shutdown() + + +Doing a lookup for service providers is also very simple: + + // Make a channel for results and start listening + entriesCh := make(chan *mdns.ServiceEntry, 4) + go func() { + for entry := range entriesCh { + fmt.Printf("Got new entry: %v\n", entry) + } + }() + + // Start the lookup + mdns.Lookup("_foobar._tcp", entriesCh) + close(entriesCh) + diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/mdns/client.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/mdns/client.go new file mode 100644 index 000000000..ab1c80def --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/mdns/client.go @@ -0,0 +1,364 @@ +package mdns + +import ( + "fmt" + "log" + "net" + "strings" + "sync" + "time" + + "github.com/hashicorp/go.net/ipv4" + "github.com/hashicorp/go.net/ipv6" + "github.com/miekg/dns" +) + +// ServiceEntry is returned after we query for a service +type ServiceEntry struct { + Name string + Host string + AddrV4 net.IP + AddrV6 net.IP + Port int + Info string + InfoFields []string + + Addr net.IP // @Deprecated + + hasTXT bool + sent bool +} + +// complete is used to check if we have all the info we need +func (s *ServiceEntry) complete() bool { + return (s.AddrV4 != nil || s.AddrV6 != nil || s.Addr != nil) && s.Port != 0 && s.hasTXT +} + +// QueryParam is used to customize how a Lookup is performed +type QueryParam struct { + Service string // Service to lookup + Domain string // Lookup domain, default "local" + Timeout time.Duration // Lookup timeout, default 1 second + Interface *net.Interface // Multicast interface to use + Entries chan<- *ServiceEntry // Entries Channel + WantUnicastResponse bool // Unicast response desired, as per 5.4 in RFC +} + +// DefaultParams is used to return a default set of QueryParam's +func DefaultParams(service string) *QueryParam { + return &QueryParam{ + Service: service, + Domain: "local", + Timeout: time.Second, + Entries: make(chan *ServiceEntry), + WantUnicastResponse: false, // TODO(reddaly): Change this default. + } +} + +// Query looks up a given service, in a domain, waiting at most +// for a timeout before finishing the query. The results are streamed +// to a channel. Sends will not block, so clients should make sure to +// either read or buffer. +func Query(params *QueryParam) error { + // Create a new client + client, err := newClient() + if err != nil { + return err + } + defer client.Close() + + // Set the multicast interface + if params.Interface != nil { + if err := client.setInterface(params.Interface); err != nil { + return err + } + } + + // Ensure defaults are set + if params.Domain == "" { + params.Domain = "local" + } + if params.Timeout == 0 { + params.Timeout = time.Second + } + + // Run the query + return client.query(params) +} + +// Lookup is the same as Query, however it uses all the default parameters +func Lookup(service string, entries chan<- *ServiceEntry) error { + params := DefaultParams(service) + params.Entries = entries + return Query(params) +} + +// Client provides a query interface that can be used to +// search for service providers using mDNS +type client struct { + ipv4UnicastConn *net.UDPConn + ipv6UnicastConn *net.UDPConn + + ipv4MulticastConn *net.UDPConn + ipv6MulticastConn *net.UDPConn + + closed bool + closedCh chan struct{} // TODO(reddaly): This doesn't appear to be used. + closeLock sync.Mutex +} + +// NewClient creates a new mdns Client that can be used to query +// for records +func newClient() (*client, error) { + // TODO(reddaly): At least attempt to bind to the port required in the spec. + // Create a IPv4 listener + uconn4, err := net.ListenUDP("udp4", &net.UDPAddr{IP: net.IPv4zero, Port: 0}) + if err != nil { + log.Printf("[ERR] mdns: Failed to bind to udp4 port: %v", err) + } + uconn6, err := net.ListenUDP("udp6", &net.UDPAddr{IP: net.IPv6zero, Port: 0}) + if err != nil { + log.Printf("[ERR] mdns: Failed to bind to udp6 port: %v", err) + } + + if uconn4 == nil && uconn6 == nil { + return nil, fmt.Errorf("failed to bind to any unicast udp port") + } + + mconn4, err := net.ListenMulticastUDP("udp4", nil, ipv4Addr) + if err != nil { + log.Printf("[ERR] mdns: Failed to bind to udp4 port: %v", err) + } + mconn6, err := net.ListenMulticastUDP("udp6", nil, ipv6Addr) + if err != nil { + log.Printf("[ERR] mdns: Failed to bind to udp6 port: %v", err) + } + + if mconn4 == nil && mconn6 == nil { + return nil, fmt.Errorf("failed to bind to any multicast udp port") + } + + c := &client{ + ipv4MulticastConn: mconn4, + ipv6MulticastConn: mconn6, + ipv4UnicastConn: uconn4, + ipv6UnicastConn: uconn6, + closedCh: make(chan struct{}), + } + return c, nil +} + +// Close is used to cleanup the client +func (c *client) Close() error { + c.closeLock.Lock() + defer c.closeLock.Unlock() + + if c.closed { + return nil + } + c.closed = true + + log.Printf("[INFO] mdns: Closing client %v", *c) + close(c.closedCh) + + if c.ipv4UnicastConn != nil { + c.ipv4UnicastConn.Close() + } + if c.ipv6UnicastConn != nil { + c.ipv6UnicastConn.Close() + } + if c.ipv4MulticastConn != nil { + c.ipv4MulticastConn.Close() + } + if c.ipv6MulticastConn != nil { + c.ipv6MulticastConn.Close() + } + + return nil +} + +// setInterface is used to set the query interface, uses sytem +// default if not provided +func (c *client) setInterface(iface *net.Interface) error { + p := ipv4.NewPacketConn(c.ipv4UnicastConn) + if err := p.SetMulticastInterface(iface); err != nil { + return err + } + p2 := ipv6.NewPacketConn(c.ipv6UnicastConn) + if err := p2.SetMulticastInterface(iface); err != nil { + return err + } + p = ipv4.NewPacketConn(c.ipv4MulticastConn) + if err := p.SetMulticastInterface(iface); err != nil { + return err + } + p2 = ipv6.NewPacketConn(c.ipv6MulticastConn) + if err := p2.SetMulticastInterface(iface); err != nil { + return err + } + return nil +} + +// query is used to perform a lookup and stream results +func (c *client) query(params *QueryParam) error { + // Create the service name + serviceAddr := fmt.Sprintf("%s.%s.", trimDot(params.Service), trimDot(params.Domain)) + + // Start listening for response packets + msgCh := make(chan *dns.Msg, 32) + go c.recv(c.ipv4UnicastConn, msgCh) + go c.recv(c.ipv6UnicastConn, msgCh) + go c.recv(c.ipv4MulticastConn, msgCh) + go c.recv(c.ipv6MulticastConn, msgCh) + + // Send the query + m := new(dns.Msg) + m.SetQuestion(serviceAddr, dns.TypePTR) + // RFC 6762, section 18.12. Repurposing of Top Bit of qclass in Question + // Section + // + // In the Question Section of a Multicast DNS query, the top bit of the qclass + // field is used to indicate that unicast responses are preferred for this + // particular question. (See Section 5.4.) + if params.WantUnicastResponse { + m.Question[0].Qclass |= 1 << 15 + } + m.RecursionDesired = false + if err := c.sendQuery(m); err != nil { + return err + } + + // Map the in-progress responses + inprogress := make(map[string]*ServiceEntry) + + // Listen until we reach the timeout + finish := time.After(params.Timeout) + for { + select { + case resp := <-msgCh: + var inp *ServiceEntry + for _, answer := range append(resp.Answer, resp.Extra...) { + // TODO(reddaly): Check that response corresponds to serviceAddr? + switch rr := answer.(type) { + case *dns.PTR: + // Create new entry for this + inp = ensureName(inprogress, rr.Ptr) + + case *dns.SRV: + // Check for a target mismatch + if rr.Target != rr.Hdr.Name { + alias(inprogress, rr.Hdr.Name, rr.Target) + } + + // Get the port + inp = ensureName(inprogress, rr.Hdr.Name) + inp.Host = rr.Target + inp.Port = int(rr.Port) + + case *dns.TXT: + // Pull out the txt + inp = ensureName(inprogress, rr.Hdr.Name) + inp.Info = strings.Join(rr.Txt, "|") + inp.InfoFields = rr.Txt + inp.hasTXT = true + + case *dns.A: + // Pull out the IP + inp = ensureName(inprogress, rr.Hdr.Name) + inp.Addr = rr.A // @Deprecated + inp.AddrV4 = rr.A + + case *dns.AAAA: + // Pull out the IP + inp = ensureName(inprogress, rr.Hdr.Name) + inp.Addr = rr.AAAA // @Deprecated + inp.AddrV6 = rr.AAAA + } + } + + if inp == nil { + continue + } + + // Check if this entry is complete + if inp.complete() { + if inp.sent { + continue + } + inp.sent = true + select { + case params.Entries <- inp: + default: + } + } else { + // Fire off a node specific query + m := new(dns.Msg) + m.SetQuestion(inp.Name, dns.TypePTR) + m.RecursionDesired = false + if err := c.sendQuery(m); err != nil { + log.Printf("[ERR] mdns: Failed to query instance %s: %v", inp.Name, err) + } + } + case <-finish: + return nil + } + } +} + +// sendQuery is used to multicast a query out +func (c *client) sendQuery(q *dns.Msg) error { + buf, err := q.Pack() + if err != nil { + return err + } + if c.ipv4UnicastConn != nil { + c.ipv4UnicastConn.WriteToUDP(buf, ipv4Addr) + } + if c.ipv6UnicastConn != nil { + c.ipv6UnicastConn.WriteToUDP(buf, ipv6Addr) + } + return nil +} + +// recv is used to receive until we get a shutdown +func (c *client) recv(l *net.UDPConn, msgCh chan *dns.Msg) { + if l == nil { + return + } + buf := make([]byte, 65536) + for !c.closed { + n, err := l.Read(buf) + if err != nil { + log.Printf("[ERR] mdns: Failed to read packet: %v", err) + continue + } + msg := new(dns.Msg) + if err := msg.Unpack(buf[:n]); err != nil { + log.Printf("[ERR] mdns: Failed to unpack packet: %v", err) + continue + } + select { + case msgCh <- msg: + case <-c.closedCh: + return + } + } +} + +// ensureName is used to ensure the named node is in progress +func ensureName(inprogress map[string]*ServiceEntry, name string) *ServiceEntry { + if inp, ok := inprogress[name]; ok { + return inp + } + inp := &ServiceEntry{ + Name: name, + } + inprogress[name] = inp + return inp +} + +// alias is used to setup an alias between two entries +func alias(inprogress map[string]*ServiceEntry, src, dst string) { + srcEntry := ensureName(inprogress, src) + inprogress[dst] = srcEntry +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/mdns/server.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/mdns/server.go new file mode 100644 index 000000000..8b44e1ac0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/mdns/server.go @@ -0,0 +1,290 @@ +package mdns + +import ( + "fmt" + "log" + "net" + "strings" + "sync" + + "github.com/miekg/dns" +) + +const ( + ipv4mdns = "224.0.0.251" + ipv6mdns = "ff02::fb" + mdnsPort = 5353 + forceUnicastResponses = false +) + +var ( + ipv4Addr = &net.UDPAddr{ + IP: net.ParseIP(ipv4mdns), + Port: mdnsPort, + } + ipv6Addr = &net.UDPAddr{ + IP: net.ParseIP(ipv6mdns), + Port: mdnsPort, + } +) + +// Config is used to configure the mDNS server +type Config struct { + // Zone must be provided to support responding to queries + Zone Zone + + // Iface if provided binds the multicast listener to the given + // interface. If not provided, the system default multicase interface + // is used. + Iface *net.Interface + + // LogEmptyResponses indicates the server should print an informative message + // when there is an mDNS query for which the server has no response. + LogEmptyResponses bool +} + +// mDNS server is used to listen for mDNS queries and respond if we +// have a matching local record +type Server struct { + config *Config + + ipv4List *net.UDPConn + ipv6List *net.UDPConn + + shutdown bool + shutdownCh chan struct{} + shutdownLock sync.Mutex +} + +// NewServer is used to create a new mDNS server from a config +func NewServer(config *Config) (*Server, error) { + // Create the listeners + ipv4List, _ := net.ListenMulticastUDP("udp4", config.Iface, ipv4Addr) + ipv6List, _ := net.ListenMulticastUDP("udp6", config.Iface, ipv6Addr) + + // Check if we have any listener + if ipv4List == nil && ipv6List == nil { + return nil, fmt.Errorf("No multicast listeners could be started") + } + + s := &Server{ + config: config, + ipv4List: ipv4List, + ipv6List: ipv6List, + shutdownCh: make(chan struct{}), + } + + if ipv4List != nil { + go s.recv(s.ipv4List) + } + + if ipv6List != nil { + go s.recv(s.ipv6List) + } + + return s, nil +} + +// Shutdown is used to shutdown the listener +func (s *Server) Shutdown() error { + s.shutdownLock.Lock() + defer s.shutdownLock.Unlock() + + if s.shutdown { + return nil + } + s.shutdown = true + close(s.shutdownCh) + + if s.ipv4List != nil { + s.ipv4List.Close() + } + if s.ipv6List != nil { + s.ipv6List.Close() + } + return nil +} + +// recv is a long running routine to receive packets from an interface +func (s *Server) recv(c *net.UDPConn) { + if c == nil { + return + } + buf := make([]byte, 65536) + for !s.shutdown { + n, from, err := c.ReadFrom(buf) + if err != nil { + continue + } + if err := s.parsePacket(buf[:n], from); err != nil { + log.Printf("[ERR] mdns: Failed to handle query: %v", err) + } + } +} + +// parsePacket is used to parse an incoming packet +func (s *Server) parsePacket(packet []byte, from net.Addr) error { + var msg dns.Msg + if err := msg.Unpack(packet); err != nil { + log.Printf("[ERR] mdns: Failed to unpack packet: %v", err) + return err + } + return s.handleQuery(&msg, from) +} + +// handleQuery is used to handle an incoming query +func (s *Server) handleQuery(query *dns.Msg, from net.Addr) error { + if query.Opcode != dns.OpcodeQuery { + // "In both multicast query and multicast response messages, the OPCODE MUST + // be zero on transmission (only standard queries are currently supported + // over multicast). Multicast DNS messages received with an OPCODE other + // than zero MUST be silently ignored." Note: OpcodeQuery == 0 + return fmt.Errorf("mdns: received query with non-zero Opcode %v: %v", query.Opcode, *query) + } + if query.Rcode != 0 { + // "In both multicast query and multicast response messages, the Response + // Code MUST be zero on transmission. Multicast DNS messages received with + // non-zero Response Codes MUST be silently ignored." + return fmt.Errorf("mdns: received query with non-zero Rcode %v: %v", query.Rcode, *query) + } + + // TODO(reddaly): Handle "TC (Truncated) Bit": + // In query messages, if the TC bit is set, it means that additional + // Known-Answer records may be following shortly. A responder SHOULD + // record this fact, and wait for those additional Known-Answer records, + // before deciding whether to respond. If the TC bit is clear, it means + // that the querying host has no additional Known Answers. + if query.Truncated { + return fmt.Errorf("[ERR] mdns: support for DNS requests with high truncated bit not implemented: %v", *query) + } + + var unicastAnswer, multicastAnswer []dns.RR + + // Handle each question + for _, q := range query.Question { + mrecs, urecs := s.handleQuestion(q) + multicastAnswer = append(multicastAnswer, mrecs...) + unicastAnswer = append(unicastAnswer, urecs...) + } + + // See section 18 of RFC 6762 for rules about DNS headers. + resp := func(unicast bool) *dns.Msg { + // 18.1: ID (Query Identifier) + // 0 for multicast response, query.Id for unicast response + id := uint16(0) + if unicast { + id = query.Id + } + + var answer []dns.RR + if unicast { + answer = unicastAnswer + } else { + answer = multicastAnswer + } + if len(answer) == 0 { + return nil + } + + return &dns.Msg{ + MsgHdr: dns.MsgHdr{ + Id: id, + + // 18.2: QR (Query/Response) Bit - must be set to 1 in response. + Response: true, + + // 18.3: OPCODE - must be zero in response (OpcodeQuery == 0) + Opcode: dns.OpcodeQuery, + + // 18.4: AA (Authoritative Answer) Bit - must be set to 1 + Authoritative: true, + + // The following fields must all be set to 0: + // 18.5: TC (TRUNCATED) Bit + // 18.6: RD (Recursion Desired) Bit + // 18.7: RA (Recursion Available) Bit + // 18.8: Z (Zero) Bit + // 18.9: AD (Authentic Data) Bit + // 18.10: CD (Checking Disabled) Bit + // 18.11: RCODE (Response Code) + }, + // 18.12 pertains to questions (handled by handleQuestion) + // 18.13 pertains to resource records (handled by handleQuestion) + + // 18.14: Name Compression - responses should be compressed (though see + // caveats in the RFC), so set the Compress bit (part of the dns library + // API, not part of the DNS packet) to true. + Compress: true, + + Answer: answer, + } + } + + if s.config.LogEmptyResponses && len(multicastAnswer) == 0 && len(unicastAnswer) == 0 { + questions := make([]string, len(query.Question)) + for i, q := range query.Question { + questions[i] = q.Name + } + log.Printf("no responses for query with questions: %s", strings.Join(questions, ", ")) + } + + if mresp := resp(false); mresp != nil { + if err := s.sendResponse(mresp, from, false); err != nil { + return fmt.Errorf("mdns: error sending multicast response: %v", err) + } + } + if uresp := resp(true); uresp != nil { + if err := s.sendResponse(uresp, from, true); err != nil { + return fmt.Errorf("mdns: error sending unicast response: %v", err) + } + } + return nil +} + +// handleQuestion is used to handle an incoming question +// +// The response to a question may be transmitted over multicast, unicast, or +// both. The return values are DNS records for each transmission type. +func (s *Server) handleQuestion(q dns.Question) (multicastRecs, unicastRecs []dns.RR) { + records := s.config.Zone.Records(q) + + if len(records) == 0 { + return nil, nil + } + + // Handle unicast and multicast responses. + // TODO(reddaly): The decision about sending over unicast vs. multicast is not + // yet fully compliant with RFC 6762. For example, the unicast bit should be + // ignored if the records in question are close to TTL expiration. For now, + // we just use the unicast bit to make the decision, as per the spec: + // RFC 6762, section 18.12. Repurposing of Top Bit of qclass in Question + // Section + // + // In the Question Section of a Multicast DNS query, the top bit of the + // qclass field is used to indicate that unicast responses are preferred + // for this particular question. (See Section 5.4.) + if q.Qclass&(1<<15) != 0 || forceUnicastResponses { + return nil, records + } + return records, nil +} + +// sendResponse is used to send a response packet +func (s *Server) sendResponse(resp *dns.Msg, from net.Addr, unicast bool) error { + // TODO(reddaly): Respect the unicast argument, and allow sending responses + // over multicast. + buf, err := resp.Pack() + if err != nil { + return err + } + + // Determine the socket to send from + addr := from.(*net.UDPAddr) + if addr.IP.To4() != nil { + _, err = s.ipv4List.WriteToUDP(buf, addr) + return err + } else { + _, err = s.ipv6List.WriteToUDP(buf, addr) + return err + } +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/mdns/zone.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/mdns/zone.go new file mode 100644 index 000000000..6f442c7b1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/hashicorp/mdns/zone.go @@ -0,0 +1,307 @@ +package mdns + +import ( + "fmt" + "net" + "os" + "strings" + + "github.com/miekg/dns" +) + +const ( + // defaultTTL is the default TTL value in returned DNS records in seconds. + defaultTTL = 120 +) + +// Zone is the interface used to integrate with the server and +// to serve records dynamically +type Zone interface { + // Records returns DNS records in response to a DNS question. + Records(q dns.Question) []dns.RR +} + +// MDNSService is used to export a named service by implementing a Zone +type MDNSService struct { + Instance string // Instance name (e.g. "hostService name") + Service string // Service name (e.g. "_http._tcp.") + Domain string // If blank, assumes "local" + HostName string // Host machine DNS name (e.g. "mymachine.net.") + Port int // Service Port + IPs []net.IP // IP addresses for the service's host + TXT []string // Service TXT records + + serviceAddr string // Fully qualified service address + instanceAddr string // Fully qualified instance address + enumAddr string // _services._dns-sd._udp. +} + +// validateFQDN returns an error if the passed string is not a fully qualified +// hdomain name (more specifically, a hostname). +func validateFQDN(s string) error { + if len(s) == 0 { + return fmt.Errorf("FQDN must not be blank") + } + if s[len(s)-1] != '.' { + return fmt.Errorf("FQDN must end in period: %s", s) + } + // TODO(reddaly): Perform full validation. + + return nil +} + +// NewMDNSService returns a new instance of MDNSService. +// +// If domain, hostName, or ips is set to the zero value, then a default value +// will be inferred from the operating system. +// +// TODO(reddaly): This interface may need to change to account for "unique +// record" conflict rules of the mDNS protocol. Upon startup, the server should +// check to ensure that the instance name does not conflict with other instance +// names, and, if required, select a new name. There may also be conflicting +// hostName A/AAAA records. +func NewMDNSService(instance, service, domain, hostName string, port int, ips []net.IP, txt []string) (*MDNSService, error) { + // Sanity check inputs + if instance == "" { + return nil, fmt.Errorf("missing service instance name") + } + if service == "" { + return nil, fmt.Errorf("missing service name") + } + if port == 0 { + return nil, fmt.Errorf("missing service port") + } + + // Set default domain + if domain == "" { + domain = "local." + } + if err := validateFQDN(domain); err != nil { + return nil, fmt.Errorf("domain %q is not a fully-qualified domain name: %v", domain, err) + } + + // Get host information if no host is specified. + if hostName == "" { + var err error + hostName, err = os.Hostname() + if err != nil { + return nil, fmt.Errorf("could not determine host: %v", err) + } + hostName = fmt.Sprintf("%s.", hostName) + } + if err := validateFQDN(hostName); err != nil { + return nil, fmt.Errorf("hostName %q is not a fully-qualified domain name: %v", hostName, err) + } + + if len(ips) == 0 { + var err error + ips, err = net.LookupIP(hostName) + if err != nil { + // Try appending the host domain suffix and lookup again + // (required for Linux-based hosts) + tmpHostName := fmt.Sprintf("%s%s", hostName, domain) + + ips, err = net.LookupIP(tmpHostName) + + if err != nil { + return nil, fmt.Errorf("could not determine host IP addresses for %s", hostName) + } + } + } + for _, ip := range ips { + if ip.To4() == nil && ip.To16() == nil { + return nil, fmt.Errorf("invalid IP address in IPs list: %v", ip) + } + } + + return &MDNSService{ + Instance: instance, + Service: service, + Domain: domain, + HostName: hostName, + Port: port, + IPs: ips, + TXT: txt, + serviceAddr: fmt.Sprintf("%s.%s.", trimDot(service), trimDot(domain)), + instanceAddr: fmt.Sprintf("%s.%s.%s.", instance, trimDot(service), trimDot(domain)), + enumAddr: fmt.Sprintf("_services._dns-sd._udp.%s.", trimDot(domain)), + }, nil +} + +// trimDot is used to trim the dots from the start or end of a string +func trimDot(s string) string { + return strings.Trim(s, ".") +} + +// Records returns DNS records in response to a DNS question. +func (m *MDNSService) Records(q dns.Question) []dns.RR { + switch q.Name { + case m.enumAddr: + return m.serviceEnum(q) + case m.serviceAddr: + return m.serviceRecords(q) + case m.instanceAddr: + return m.instanceRecords(q) + case m.HostName: + if q.Qtype == dns.TypeA || q.Qtype == dns.TypeAAAA { + return m.instanceRecords(q) + } + fallthrough + default: + return nil + } +} + +func (m *MDNSService) serviceEnum(q dns.Question) []dns.RR { + switch q.Qtype { + case dns.TypeANY: + fallthrough + case dns.TypePTR: + rr := &dns.PTR{ + Hdr: dns.RR_Header{ + Name: q.Name, + Rrtype: dns.TypePTR, + Class: dns.ClassINET, + Ttl: defaultTTL, + }, + Ptr: m.serviceAddr, + } + return []dns.RR{rr} + default: + return nil + } +} + +// serviceRecords is called when the query matches the service name +func (m *MDNSService) serviceRecords(q dns.Question) []dns.RR { + switch q.Qtype { + case dns.TypeANY: + fallthrough + case dns.TypePTR: + // Build a PTR response for the service + rr := &dns.PTR{ + Hdr: dns.RR_Header{ + Name: q.Name, + Rrtype: dns.TypePTR, + Class: dns.ClassINET, + Ttl: defaultTTL, + }, + Ptr: m.instanceAddr, + } + servRec := []dns.RR{rr} + + // Get the instance records + instRecs := m.instanceRecords(dns.Question{ + Name: m.instanceAddr, + Qtype: dns.TypeANY, + }) + + // Return the service record with the instance records + return append(servRec, instRecs...) + default: + return nil + } +} + +// serviceRecords is called when the query matches the instance name +func (m *MDNSService) instanceRecords(q dns.Question) []dns.RR { + switch q.Qtype { + case dns.TypeANY: + // Get the SRV, which includes A and AAAA + recs := m.instanceRecords(dns.Question{ + Name: m.instanceAddr, + Qtype: dns.TypeSRV, + }) + + // Add the TXT record + recs = append(recs, m.instanceRecords(dns.Question{ + Name: m.instanceAddr, + Qtype: dns.TypeTXT, + })...) + return recs + + case dns.TypeA: + var rr []dns.RR + for _, ip := range m.IPs { + if ip4 := ip.To4(); ip4 != nil { + rr = append(rr, &dns.A{ + Hdr: dns.RR_Header{ + Name: m.HostName, + Rrtype: dns.TypeA, + Class: dns.ClassINET, + Ttl: defaultTTL, + }, + A: ip4, + }) + } + } + return rr + + case dns.TypeAAAA: + var rr []dns.RR + for _, ip := range m.IPs { + if ip.To4() != nil { + // TODO(reddaly): IPv4 addresses could be encoded in IPv6 format and + // putinto AAAA records, but the current logic puts ipv4-encodable + // addresses into the A records exclusively. Perhaps this should be + // configurable? + continue + } + + if ip16 := ip.To16(); ip16 != nil { + rr = append(rr, &dns.AAAA{ + Hdr: dns.RR_Header{ + Name: m.HostName, + Rrtype: dns.TypeAAAA, + Class: dns.ClassINET, + Ttl: defaultTTL, + }, + AAAA: ip16, + }) + } + } + return rr + + case dns.TypeSRV: + // Create the SRV Record + srv := &dns.SRV{ + Hdr: dns.RR_Header{ + Name: q.Name, + Rrtype: dns.TypeSRV, + Class: dns.ClassINET, + Ttl: defaultTTL, + }, + Priority: 10, + Weight: 1, + Port: uint16(m.Port), + Target: m.HostName, + } + recs := []dns.RR{srv} + + // Add the A record + recs = append(recs, m.instanceRecords(dns.Question{ + Name: m.instanceAddr, + Qtype: dns.TypeA, + })...) + + // Add the AAAA record + recs = append(recs, m.instanceRecords(dns.Question{ + Name: m.instanceAddr, + Qtype: dns.TypeAAAA, + })...) + return recs + + case dns.TypeTXT: + txt := &dns.TXT{ + Hdr: dns.RR_Header{ + Name: q.Name, + Rrtype: dns.TypeTXT, + Class: dns.ClassINET, + Ttl: defaultTTL, + }, + Txt: m.TXT, + } + return []dns.RR{txt} + } + return nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/AUTHORS b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/AUTHORS new file mode 100644 index 000000000..196568352 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/AUTHORS @@ -0,0 +1 @@ +Miek Gieben diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/CONTRIBUTORS b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/CONTRIBUTORS new file mode 100644 index 000000000..5903779d8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/CONTRIBUTORS @@ -0,0 +1,10 @@ +Alex A. Skinner +Andrew Tunnell-Jones +Ask Bjørn Hansen +Dave Cheney +Dusty Wilson +Marek Majkowski +Peter van Dijk +Omri Bahumi +Alex Sergeyev +James Hartig diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/COPYRIGHT b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/COPYRIGHT new file mode 100644 index 000000000..35702b10e --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/COPYRIGHT @@ -0,0 +1,9 @@ +Copyright 2009 The Go Authors. All rights reserved. Use of this source code +is governed by a BSD-style license that can be found in the LICENSE file. +Extensions of the original work are copyright (c) 2011 Miek Gieben + +Copyright 2011 Miek Gieben. All rights reserved. Use of this source code is +governed by a BSD-style license that can be found in the LICENSE file. + +Copyright 2014 CloudFlare. All rights reserved. Use of this source code is +governed by a BSD-style license that can be found in the LICENSE file. diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/Gopkg.lock b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/Gopkg.lock new file mode 100644 index 000000000..0c73a6444 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/Gopkg.lock @@ -0,0 +1,21 @@ +# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. + + +[[projects]] + branch = "master" + name = "golang.org/x/crypto" + packages = ["ed25519","ed25519/internal/edwards25519"] + revision = "b080dc9a8c480b08e698fb1219160d598526310f" + +[[projects]] + branch = "master" + name = "golang.org/x/net" + packages = ["bpf","internal/iana","internal/socket","ipv4","ipv6"] + revision = "894f8ed5849b15b810ae41e9590a0d05395bba27" + +[solve-meta] + analyzer-name = "dep" + analyzer-version = 1 + inputs-digest = "c4abc38abaeeeeb9be92455c9c02cae32841122b8982aaa067ef25bb8e86ff9d" + solver-name = "gps-cdcl" + solver-version = 1 diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/Gopkg.toml b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/Gopkg.toml new file mode 100644 index 000000000..2f655b2c7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/Gopkg.toml @@ -0,0 +1,26 @@ + +# Gopkg.toml example +# +# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md +# for detailed Gopkg.toml documentation. +# +# required = ["github.com/user/thing/cmd/thing"] +# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] +# +# [[constraint]] +# name = "github.com/user/project" +# version = "1.0.0" +# +# [[constraint]] +# name = "github.com/user/project2" +# branch = "dev" +# source = "github.com/myfork/project2" +# +# [[override]] +# name = "github.com/x/y" +# version = "2.4.0" + + +[[constraint]] + branch = "master" + name = "golang.org/x/crypto" diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/LICENSE b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/LICENSE new file mode 100644 index 000000000..5763fa7fe --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/LICENSE @@ -0,0 +1,32 @@ +Extensions of the original work are copyright (c) 2011 Miek Gieben + +As this is fork of the official Go code the same license applies: + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/Makefile.fuzz b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/Makefile.fuzz new file mode 100644 index 000000000..dc158c4ac --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/Makefile.fuzz @@ -0,0 +1,33 @@ +# Makefile for fuzzing +# +# Use go-fuzz and needs the tools installed. +# See https://blog.cloudflare.com/dns-parser-meet-go-fuzzer/ +# +# Installing go-fuzz: +# $ make -f Makefile.fuzz get +# Installs: +# * github.com/dvyukov/go-fuzz/go-fuzz +# * get github.com/dvyukov/go-fuzz/go-fuzz-build + +all: build + +.PHONY: build +build: + go-fuzz-build -tags fuzz github.com/miekg/dns + +.PHONY: build-newrr +build-newrr: + go-fuzz-build -func FuzzNewRR -tags fuzz github.com/miekg/dns + +.PHONY: fuzz +fuzz: + go-fuzz -bin=dns-fuzz.zip -workdir=fuzz + +.PHONY: get +get: + go get github.com/dvyukov/go-fuzz/go-fuzz + go get github.com/dvyukov/go-fuzz/go-fuzz-build + +.PHONY: clean +clean: + rm *-fuzz.zip diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/Makefile.release b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/Makefile.release new file mode 100644 index 000000000..8fb748e8a --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/Makefile.release @@ -0,0 +1,52 @@ +# Makefile for releasing. +# +# The release is controlled from version.go. The version found there is +# used to tag the git repo, we're not building any artifects so there is nothing +# to upload to github. +# +# * Up the version in version.go +# * Run: make -f Makefile.release release +# * will *commit* your change with 'Release $VERSION' +# * push to github +# + +define GO +//+build ignore + +package main + +import ( + "fmt" + + "github.com/miekg/dns" +) + +func main() { + fmt.Println(dns.Version.String()) +} +endef + +$(file > version_release.go,$(GO)) +VERSION:=$(shell go run version_release.go) +TAG="v$(VERSION)" + +all: + @echo Use the \'release\' target to start a release $(VERSION) + rm -f version_release.go + +.PHONY: release +release: commit push + @echo Released $(VERSION) + rm -f version_release.go + +.PHONY: commit +commit: + @echo Committing release $(VERSION) + git commit -am"Release $(VERSION)" + git tag $(TAG) + +.PHONY: push +push: + @echo Pushing release $(VERSION) to master + git push --tags + git push diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/README.md b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/README.md new file mode 100644 index 000000000..1ad23c751 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/README.md @@ -0,0 +1,168 @@ +[![Build Status](https://travis-ci.org/miekg/dns.svg?branch=master)](https://travis-ci.org/miekg/dns) +[![Code Coverage](https://img.shields.io/codecov/c/github/miekg/dns/master.svg)](https://codecov.io/github/miekg/dns?branch=master) +[![Go Report Card](https://goreportcard.com/badge/github.com/miekg/dns)](https://goreportcard.com/report/miekg/dns) +[![](https://godoc.org/github.com/miekg/dns?status.svg)](https://godoc.org/github.com/miekg/dns) + +# Alternative (more granular) approach to a DNS library + +> Less is more. + +Complete and usable DNS library. All widely used Resource Records are supported, including the +DNSSEC types. It follows a lean and mean philosophy. If there is stuff you should know as a DNS +programmer there isn't a convenience function for it. Server side and client side programming is +supported, i.e. you can build servers and resolvers with it. + +We try to keep the "master" branch as sane as possible and at the bleeding edge of standards, +avoiding breaking changes wherever reasonable. We support the last two versions of Go. + +# Goals + +* KISS; +* Fast; +* Small API. If it's easy to code in Go, don't make a function for it. + +# Users + +A not-so-up-to-date-list-that-may-be-actually-current: + +* https://github.com/coredns/coredns +* https://cloudflare.com +* https://github.com/abh/geodns +* http://www.statdns.com/ +* http://www.dnsinspect.com/ +* https://github.com/chuangbo/jianbing-dictionary-dns +* http://www.dns-lg.com/ +* https://github.com/fcambus/rrda +* https://github.com/kenshinx/godns +* https://github.com/skynetservices/skydns +* https://github.com/hashicorp/consul +* https://github.com/DevelopersPL/godnsagent +* https://github.com/duedil-ltd/discodns +* https://github.com/StalkR/dns-reverse-proxy +* https://github.com/tianon/rawdns +* https://mesosphere.github.io/mesos-dns/ +* https://pulse.turbobytes.com/ +* https://play.google.com/store/apps/details?id=com.turbobytes.dig +* https://github.com/fcambus/statzone +* https://github.com/benschw/dns-clb-go +* https://github.com/corny/dnscheck for http://public-dns.info/ +* https://namesmith.io +* https://github.com/miekg/unbound +* https://github.com/miekg/exdns +* https://dnslookup.org +* https://github.com/looterz/grimd +* https://github.com/phamhongviet/serf-dns +* https://github.com/mehrdadrad/mylg +* https://github.com/bamarni/dockness +* https://github.com/fffaraz/microdns +* http://kelda.io +* https://github.com/ipdcode/hades (JD.COM) +* https://github.com/StackExchange/dnscontrol/ +* https://www.dnsperf.com/ +* https://dnssectest.net/ +* https://dns.apebits.com +* https://github.com/oif/apex +* https://github.com/jedisct1/dnscrypt-proxy +* https://github.com/jedisct1/rpdns + +Send pull request if you want to be listed here. + +# Features + +* UDP/TCP queries, IPv4 and IPv6; +* RFC 1035 zone file parsing ($INCLUDE, $ORIGIN, $TTL and $GENERATE (for all record types) are supported; +* Fast: + * Reply speed around ~ 80K qps (faster hardware results in more qps); + * Parsing RRs ~ 100K RR/s, that's 5M records in about 50 seconds; +* Server side programming (mimicking the net/http package); +* Client side programming; +* DNSSEC: signing, validating and key generation for DSA, RSA, ECDSA and Ed25519; +* EDNS0, NSID, Cookies; +* AXFR/IXFR; +* TSIG, SIG(0); +* DNS over TLS: optional encrypted connection between client and server; +* DNS name compression; +* Depends only on the standard library. + +Have fun! + +Miek Gieben - 2010-2012 - + +# Building + +Building is done with the `go` tool. If you have setup your GOPATH correctly, the following should +work: + + go get github.com/miekg/dns + go build github.com/miekg/dns + +## Examples + +A short "how to use the API" is at the beginning of doc.go (this also will show +when you call `godoc github.com/miekg/dns`). + +Example programs can be found in the `github.com/miekg/exdns` repository. + +## Supported RFCs + +*all of them* + +* 103{4,5} - DNS standard +* 1348 - NSAP record (removed the record) +* 1982 - Serial Arithmetic +* 1876 - LOC record +* 1995 - IXFR +* 1996 - DNS notify +* 2136 - DNS Update (dynamic updates) +* 2181 - RRset definition - there is no RRset type though, just []RR +* 2537 - RSAMD5 DNS keys +* 2065 - DNSSEC (updated in later RFCs) +* 2671 - EDNS record +* 2782 - SRV record +* 2845 - TSIG record +* 2915 - NAPTR record +* 2929 - DNS IANA Considerations +* 3110 - RSASHA1 DNS keys +* 3225 - DO bit (DNSSEC OK) +* 340{1,2,3} - NAPTR record +* 3445 - Limiting the scope of (DNS)KEY +* 3597 - Unknown RRs +* 403{3,4,5} - DNSSEC + validation functions +* 4255 - SSHFP record +* 4343 - Case insensitivity +* 4408 - SPF record +* 4509 - SHA256 Hash in DS +* 4592 - Wildcards in the DNS +* 4635 - HMAC SHA TSIG +* 4701 - DHCID +* 4892 - id.server +* 5001 - NSID +* 5155 - NSEC3 record +* 5205 - HIP record +* 5702 - SHA2 in the DNS +* 5936 - AXFR +* 5966 - TCP implementation recommendations +* 6605 - ECDSA +* 6725 - IANA Registry Update +* 6742 - ILNP DNS +* 6840 - Clarifications and Implementation Notes for DNS Security +* 6844 - CAA record +* 6891 - EDNS0 update +* 6895 - DNS IANA considerations +* 6975 - Algorithm Understanding in DNSSEC +* 7043 - EUI48/EUI64 records +* 7314 - DNS (EDNS) EXPIRE Option +* 7477 - CSYNC RR +* 7828 - edns-tcp-keepalive EDNS0 Option +* 7553 - URI record +* 7858 - DNS over TLS: Initiation and Performance Considerations +* 7871 - EDNS0 Client Subnet +* 7873 - Domain Name System (DNS) Cookies (draft-ietf-dnsop-cookies) +* 8080 - EdDSA for DNSSEC + +## Loosely based upon + +* `ldns` +* `NSD` +* `Net::DNS` +* `GRONG` diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/client.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/client.go new file mode 100644 index 000000000..856b1698d --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/client.go @@ -0,0 +1,506 @@ +package dns + +// A client implementation. + +import ( + "bytes" + "context" + "crypto/tls" + "encoding/binary" + "io" + "net" + "strings" + "time" +) + +const dnsTimeout time.Duration = 2 * time.Second +const tcpIdleTimeout time.Duration = 8 * time.Second + +// A Conn represents a connection to a DNS server. +type Conn struct { + net.Conn // a net.Conn holding the connection + UDPSize uint16 // minimum receive buffer for UDP messages + TsigSecret map[string]string // secret(s) for Tsig map[], zonename must be in canonical form (lowercase, fqdn, see RFC 4034 Section 6.2) + rtt time.Duration + t time.Time + tsigRequestMAC string +} + +// A Client defines parameters for a DNS client. +type Client struct { + Net string // if "tcp" or "tcp-tls" (DNS over TLS) a TCP query will be initiated, otherwise an UDP one (default is "" for UDP) + UDPSize uint16 // minimum receive buffer for UDP messages + TLSConfig *tls.Config // TLS connection configuration + Dialer *net.Dialer // a net.Dialer used to set local address, timeouts and more + // Timeout is a cumulative timeout for dial, write and read, defaults to 0 (disabled) - overrides DialTimeout, ReadTimeout, + // WriteTimeout when non-zero. Can be overridden with net.Dialer.Timeout (see Client.ExchangeWithDialer and + // Client.Dialer) or context.Context.Deadline (see the deprecated ExchangeContext) + Timeout time.Duration + DialTimeout time.Duration // net.DialTimeout, defaults to 2 seconds, or net.Dialer.Timeout if expiring earlier - overridden by Timeout when that value is non-zero + ReadTimeout time.Duration // net.Conn.SetReadTimeout value for connections, defaults to 2 seconds - overridden by Timeout when that value is non-zero + WriteTimeout time.Duration // net.Conn.SetWriteTimeout value for connections, defaults to 2 seconds - overridden by Timeout when that value is non-zero + TsigSecret map[string]string // secret(s) for Tsig map[], zonename must be in canonical form (lowercase, fqdn, see RFC 4034 Section 6.2) + SingleInflight bool // if true suppress multiple outstanding queries for the same Qname, Qtype and Qclass + group singleflight +} + +// Exchange performs a synchronous UDP query. It sends the message m to the address +// contained in a and waits for a reply. Exchange does not retry a failed query, nor +// will it fall back to TCP in case of truncation. +// See client.Exchange for more information on setting larger buffer sizes. +func Exchange(m *Msg, a string) (r *Msg, err error) { + client := Client{Net: "udp"} + r, _, err = client.Exchange(m, a) + return r, err +} + +func (c *Client) dialTimeout() time.Duration { + if c.Timeout != 0 { + return c.Timeout + } + if c.DialTimeout != 0 { + return c.DialTimeout + } + return dnsTimeout +} + +func (c *Client) readTimeout() time.Duration { + if c.ReadTimeout != 0 { + return c.ReadTimeout + } + return dnsTimeout +} + +func (c *Client) writeTimeout() time.Duration { + if c.WriteTimeout != 0 { + return c.WriteTimeout + } + return dnsTimeout +} + +// Dial connects to the address on the named network. +func (c *Client) Dial(address string) (conn *Conn, err error) { + // create a new dialer with the appropriate timeout + var d net.Dialer + if c.Dialer == nil { + d = net.Dialer{} + } else { + d = net.Dialer(*c.Dialer) + } + d.Timeout = c.getTimeoutForRequest(c.writeTimeout()) + + network := "udp" + useTLS := false + + switch c.Net { + case "tcp-tls": + network = "tcp" + useTLS = true + case "tcp4-tls": + network = "tcp4" + useTLS = true + case "tcp6-tls": + network = "tcp6" + useTLS = true + default: + if c.Net != "" { + network = c.Net + } + } + + conn = new(Conn) + if useTLS { + conn.Conn, err = tls.DialWithDialer(&d, network, address, c.TLSConfig) + } else { + conn.Conn, err = d.Dial(network, address) + } + if err != nil { + return nil, err + } + return conn, nil +} + +// Exchange performs a synchronous query. It sends the message m to the address +// contained in a and waits for a reply. Basic use pattern with a *dns.Client: +// +// c := new(dns.Client) +// in, rtt, err := c.Exchange(message, "127.0.0.1:53") +// +// Exchange does not retry a failed query, nor will it fall back to TCP in +// case of truncation. +// It is up to the caller to create a message that allows for larger responses to be +// returned. Specifically this means adding an EDNS0 OPT RR that will advertise a larger +// buffer, see SetEdns0. Messages without an OPT RR will fallback to the historic limit +// of 512 bytes +// To specify a local address or a timeout, the caller has to set the `Client.Dialer` +// attribute appropriately +func (c *Client) Exchange(m *Msg, address string) (r *Msg, rtt time.Duration, err error) { + if !c.SingleInflight { + return c.exchange(m, address) + } + + t := "nop" + if t1, ok := TypeToString[m.Question[0].Qtype]; ok { + t = t1 + } + cl := "nop" + if cl1, ok := ClassToString[m.Question[0].Qclass]; ok { + cl = cl1 + } + r, rtt, err, shared := c.group.Do(m.Question[0].Name+t+cl, func() (*Msg, time.Duration, error) { + return c.exchange(m, address) + }) + if r != nil && shared { + r = r.Copy() + } + return r, rtt, err +} + +func (c *Client) exchange(m *Msg, a string) (r *Msg, rtt time.Duration, err error) { + var co *Conn + + co, err = c.Dial(a) + + if err != nil { + return nil, 0, err + } + defer co.Close() + + opt := m.IsEdns0() + // If EDNS0 is used use that for size. + if opt != nil && opt.UDPSize() >= MinMsgSize { + co.UDPSize = opt.UDPSize() + } + // Otherwise use the client's configured UDP size. + if opt == nil && c.UDPSize >= MinMsgSize { + co.UDPSize = c.UDPSize + } + + co.TsigSecret = c.TsigSecret + // write with the appropriate write timeout + co.SetWriteDeadline(time.Now().Add(c.getTimeoutForRequest(c.writeTimeout()))) + if err = co.WriteMsg(m); err != nil { + return nil, 0, err + } + + co.SetReadDeadline(time.Now().Add(c.getTimeoutForRequest(c.readTimeout()))) + r, err = co.ReadMsg() + if err == nil && r.Id != m.Id { + err = ErrId + } + return r, co.rtt, err +} + +// ReadMsg reads a message from the connection co. +// If the received message contains a TSIG record the transaction signature +// is verified. This method always tries to return the message, however if an +// error is returned there are no guarantees that the returned message is a +// valid representation of the packet read. +func (co *Conn) ReadMsg() (*Msg, error) { + p, err := co.ReadMsgHeader(nil) + if err != nil { + return nil, err + } + + m := new(Msg) + if err := m.Unpack(p); err != nil { + // If an error was returned, we still want to allow the user to use + // the message, but naively they can just check err if they don't want + // to use an erroneous message + return m, err + } + if t := m.IsTsig(); t != nil { + if _, ok := co.TsigSecret[t.Hdr.Name]; !ok { + return m, ErrSecret + } + // Need to work on the original message p, as that was used to calculate the tsig. + err = TsigVerify(p, co.TsigSecret[t.Hdr.Name], co.tsigRequestMAC, false) + } + return m, err +} + +// ReadMsgHeader reads a DNS message, parses and populates hdr (when hdr is not nil). +// Returns message as a byte slice to be parsed with Msg.Unpack later on. +// Note that error handling on the message body is not possible as only the header is parsed. +func (co *Conn) ReadMsgHeader(hdr *Header) ([]byte, error) { + var ( + p []byte + n int + err error + ) + + switch t := co.Conn.(type) { + case *net.TCPConn, *tls.Conn: + r := t.(io.Reader) + + // First two bytes specify the length of the entire message. + l, err := tcpMsgLen(r) + if err != nil { + return nil, err + } + p = make([]byte, l) + n, err = tcpRead(r, p) + co.rtt = time.Since(co.t) + default: + if co.UDPSize > MinMsgSize { + p = make([]byte, co.UDPSize) + } else { + p = make([]byte, MinMsgSize) + } + n, err = co.Read(p) + co.rtt = time.Since(co.t) + } + + if err != nil { + return nil, err + } else if n < headerSize { + return nil, ErrShortRead + } + + p = p[:n] + if hdr != nil { + dh, _, err := unpackMsgHdr(p, 0) + if err != nil { + return nil, err + } + *hdr = dh + } + return p, err +} + +// tcpMsgLen is a helper func to read first two bytes of stream as uint16 packet length. +func tcpMsgLen(t io.Reader) (int, error) { + p := []byte{0, 0} + n, err := t.Read(p) + if err != nil { + return 0, err + } + + // As seen with my local router/switch, returns 1 byte on the above read, + // resulting a a ShortRead. Just write it out (instead of loop) and read the + // other byte. + if n == 1 { + n1, err := t.Read(p[1:]) + if err != nil { + return 0, err + } + n += n1 + } + + if n != 2 { + return 0, ErrShortRead + } + l := binary.BigEndian.Uint16(p) + if l == 0 { + return 0, ErrShortRead + } + return int(l), nil +} + +// tcpRead calls TCPConn.Read enough times to fill allocated buffer. +func tcpRead(t io.Reader, p []byte) (int, error) { + n, err := t.Read(p) + if err != nil { + return n, err + } + for n < len(p) { + j, err := t.Read(p[n:]) + if err != nil { + return n, err + } + n += j + } + return n, err +} + +// Read implements the net.Conn read method. +func (co *Conn) Read(p []byte) (n int, err error) { + if co.Conn == nil { + return 0, ErrConnEmpty + } + if len(p) < 2 { + return 0, io.ErrShortBuffer + } + switch t := co.Conn.(type) { + case *net.TCPConn, *tls.Conn: + r := t.(io.Reader) + + l, err := tcpMsgLen(r) + if err != nil { + return 0, err + } + if l > len(p) { + return int(l), io.ErrShortBuffer + } + return tcpRead(r, p[:l]) + } + // UDP connection + n, err = co.Conn.Read(p) + if err != nil { + return n, err + } + return n, err +} + +// WriteMsg sends a message through the connection co. +// If the message m contains a TSIG record the transaction +// signature is calculated. +func (co *Conn) WriteMsg(m *Msg) (err error) { + var out []byte + if t := m.IsTsig(); t != nil { + mac := "" + if _, ok := co.TsigSecret[t.Hdr.Name]; !ok { + return ErrSecret + } + out, mac, err = TsigGenerate(m, co.TsigSecret[t.Hdr.Name], co.tsigRequestMAC, false) + // Set for the next read, although only used in zone transfers + co.tsigRequestMAC = mac + } else { + out, err = m.Pack() + } + if err != nil { + return err + } + co.t = time.Now() + if _, err = co.Write(out); err != nil { + return err + } + return nil +} + +// Write implements the net.Conn Write method. +func (co *Conn) Write(p []byte) (n int, err error) { + switch t := co.Conn.(type) { + case *net.TCPConn, *tls.Conn: + w := t.(io.Writer) + + lp := len(p) + if lp < 2 { + return 0, io.ErrShortBuffer + } + if lp > MaxMsgSize { + return 0, &Error{err: "message too large"} + } + l := make([]byte, 2, lp+2) + binary.BigEndian.PutUint16(l, uint16(lp)) + p = append(l, p...) + n, err := io.Copy(w, bytes.NewReader(p)) + return int(n), err + } + n, err = co.Conn.Write(p) + return n, err +} + +// Return the appropriate timeout for a specific request +func (c *Client) getTimeoutForRequest(timeout time.Duration) time.Duration { + var requestTimeout time.Duration + if c.Timeout != 0 { + requestTimeout = c.Timeout + } else { + requestTimeout = timeout + } + // net.Dialer.Timeout has priority if smaller than the timeouts computed so + // far + if c.Dialer != nil && c.Dialer.Timeout != 0 { + if c.Dialer.Timeout < requestTimeout { + requestTimeout = c.Dialer.Timeout + } + } + return requestTimeout +} + +// Dial connects to the address on the named network. +func Dial(network, address string) (conn *Conn, err error) { + conn = new(Conn) + conn.Conn, err = net.Dial(network, address) + if err != nil { + return nil, err + } + return conn, nil +} + +// ExchangeContext performs a synchronous UDP query, like Exchange. It +// additionally obeys deadlines from the passed Context. +func ExchangeContext(ctx context.Context, m *Msg, a string) (r *Msg, err error) { + client := Client{Net: "udp"} + r, _, err = client.ExchangeContext(ctx, m, a) + // ignorint rtt to leave the original ExchangeContext API unchanged, but + // this function will go away + return r, err +} + +// ExchangeConn performs a synchronous query. It sends the message m via the connection +// c and waits for a reply. The connection c is not closed by ExchangeConn. +// This function is going away, but can easily be mimicked: +// +// co := &dns.Conn{Conn: c} // c is your net.Conn +// co.WriteMsg(m) +// in, _ := co.ReadMsg() +// co.Close() +// +func ExchangeConn(c net.Conn, m *Msg) (r *Msg, err error) { + println("dns: ExchangeConn: this function is deprecated") + co := new(Conn) + co.Conn = c + if err = co.WriteMsg(m); err != nil { + return nil, err + } + r, err = co.ReadMsg() + if err == nil && r.Id != m.Id { + err = ErrId + } + return r, err +} + +// DialTimeout acts like Dial but takes a timeout. +func DialTimeout(network, address string, timeout time.Duration) (conn *Conn, err error) { + client := Client{Net: network, Dialer: &net.Dialer{Timeout: timeout}} + conn, err = client.Dial(address) + if err != nil { + return nil, err + } + return conn, nil +} + +// DialWithTLS connects to the address on the named network with TLS. +func DialWithTLS(network, address string, tlsConfig *tls.Config) (conn *Conn, err error) { + if !strings.HasSuffix(network, "-tls") { + network += "-tls" + } + client := Client{Net: network, TLSConfig: tlsConfig} + conn, err = client.Dial(address) + + if err != nil { + return nil, err + } + return conn, nil +} + +// DialTimeoutWithTLS acts like DialWithTLS but takes a timeout. +func DialTimeoutWithTLS(network, address string, tlsConfig *tls.Config, timeout time.Duration) (conn *Conn, err error) { + if !strings.HasSuffix(network, "-tls") { + network += "-tls" + } + client := Client{Net: network, Dialer: &net.Dialer{Timeout: timeout}, TLSConfig: tlsConfig} + conn, err = client.Dial(address) + if err != nil { + return nil, err + } + return conn, nil +} + +// ExchangeContext acts like Exchange, but honors the deadline on the provided +// context, if present. If there is both a context deadline and a configured +// timeout on the client, the earliest of the two takes effect. +func (c *Client) ExchangeContext(ctx context.Context, m *Msg, a string) (r *Msg, rtt time.Duration, err error) { + var timeout time.Duration + if deadline, ok := ctx.Deadline(); !ok { + timeout = 0 + } else { + timeout = deadline.Sub(time.Now()) + } + // not passing the context to the underlying calls, as the API does not support + // context. For timeouts you should set up Client.Dialer and call Client.Exchange. + c.Dialer = &net.Dialer{Timeout: timeout} + return c.Exchange(m, a) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/clientconfig.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/clientconfig.go new file mode 100644 index 000000000..a606ef696 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/clientconfig.go @@ -0,0 +1,139 @@ +package dns + +import ( + "bufio" + "io" + "os" + "strconv" + "strings" +) + +// ClientConfig wraps the contents of the /etc/resolv.conf file. +type ClientConfig struct { + Servers []string // servers to use + Search []string // suffixes to append to local name + Port string // what port to use + Ndots int // number of dots in name to trigger absolute lookup + Timeout int // seconds before giving up on packet + Attempts int // lost packets before giving up on server, not used in the package dns +} + +// ClientConfigFromFile parses a resolv.conf(5) like file and returns +// a *ClientConfig. +func ClientConfigFromFile(resolvconf string) (*ClientConfig, error) { + file, err := os.Open(resolvconf) + if err != nil { + return nil, err + } + defer file.Close() + return ClientConfigFromReader(file) +} + +// ClientConfigFromReader works like ClientConfigFromFile but takes an io.Reader as argument +func ClientConfigFromReader(resolvconf io.Reader) (*ClientConfig, error) { + c := new(ClientConfig) + scanner := bufio.NewScanner(resolvconf) + c.Servers = make([]string, 0) + c.Search = make([]string, 0) + c.Port = "53" + c.Ndots = 1 + c.Timeout = 5 + c.Attempts = 2 + + for scanner.Scan() { + if err := scanner.Err(); err != nil { + return nil, err + } + line := scanner.Text() + f := strings.Fields(line) + if len(f) < 1 { + continue + } + switch f[0] { + case "nameserver": // add one name server + if len(f) > 1 { + // One more check: make sure server name is + // just an IP address. Otherwise we need DNS + // to look it up. + name := f[1] + c.Servers = append(c.Servers, name) + } + + case "domain": // set search path to just this domain + if len(f) > 1 { + c.Search = make([]string, 1) + c.Search[0] = f[1] + } else { + c.Search = make([]string, 0) + } + + case "search": // set search path to given servers + c.Search = make([]string, len(f)-1) + for i := 0; i < len(c.Search); i++ { + c.Search[i] = f[i+1] + } + + case "options": // magic options + for i := 1; i < len(f); i++ { + s := f[i] + switch { + case len(s) >= 6 && s[:6] == "ndots:": + n, _ := strconv.Atoi(s[6:]) + if n < 0 { + n = 0 + } else if n > 15 { + n = 15 + } + c.Ndots = n + case len(s) >= 8 && s[:8] == "timeout:": + n, _ := strconv.Atoi(s[8:]) + if n < 1 { + n = 1 + } + c.Timeout = n + case len(s) >= 8 && s[:9] == "attempts:": + n, _ := strconv.Atoi(s[9:]) + if n < 1 { + n = 1 + } + c.Attempts = n + case s == "rotate": + /* not imp */ + } + } + } + } + return c, nil +} + +// NameList returns all of the names that should be queried based on the +// config. It is based off of go's net/dns name building, but it does not +// check the length of the resulting names. +func (c *ClientConfig) NameList(name string) []string { + // if this domain is already fully qualified, no append needed. + if IsFqdn(name) { + return []string{name} + } + + // Check to see if the name has more labels than Ndots. Do this before making + // the domain fully qualified. + hasNdots := CountLabel(name) > c.Ndots + // Make the domain fully qualified. + name = Fqdn(name) + + // Make a list of names based off search. + names := []string{} + + // If name has enough dots, try that first. + if hasNdots { + names = append(names, name) + } + for _, s := range c.Search { + names = append(names, Fqdn(name+s)) + } + // If we didn't have enough dots, try after suffixes. + if !hasNdots { + names = append(names, name) + } + return names +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/compress_generate.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/compress_generate.go new file mode 100644 index 000000000..87fb36f68 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/compress_generate.go @@ -0,0 +1,188 @@ +//+build ignore + +// compression_generate.go is meant to run with go generate. It will use +// go/{importer,types} to track down all the RR struct types. Then for each type +// it will look to see if there are (compressible) names, if so it will add that +// type to compressionLenHelperType and comressionLenSearchType which "fake" the +// compression so that Len() is fast. +package main + +import ( + "bytes" + "fmt" + "go/format" + "go/importer" + "go/types" + "log" + "os" +) + +var packageHdr = ` +// Code generated by "go run compress_generate.go"; DO NOT EDIT. + +package dns + +` + +// getTypeStruct will take a type and the package scope, and return the +// (innermost) struct if the type is considered a RR type (currently defined as +// those structs beginning with a RR_Header, could be redefined as implementing +// the RR interface). The bool return value indicates if embedded structs were +// resolved. +func getTypeStruct(t types.Type, scope *types.Scope) (*types.Struct, bool) { + st, ok := t.Underlying().(*types.Struct) + if !ok { + return nil, false + } + if st.Field(0).Type() == scope.Lookup("RR_Header").Type() { + return st, false + } + if st.Field(0).Anonymous() { + st, _ := getTypeStruct(st.Field(0).Type(), scope) + return st, true + } + return nil, false +} + +func main() { + // Import and type-check the package + pkg, err := importer.Default().Import("github.com/miekg/dns") + fatalIfErr(err) + scope := pkg.Scope() + + var domainTypes []string // Types that have a domain name in them (either compressible or not). + var cdomainTypes []string // Types that have a compressible domain name in them (subset of domainType) +Names: + for _, name := range scope.Names() { + o := scope.Lookup(name) + if o == nil || !o.Exported() { + continue + } + st, _ := getTypeStruct(o.Type(), scope) + if st == nil { + continue + } + if name == "PrivateRR" { + continue + } + + if scope.Lookup("Type"+o.Name()) == nil && o.Name() != "RFC3597" { + log.Fatalf("Constant Type%s does not exist.", o.Name()) + } + + for i := 1; i < st.NumFields(); i++ { + if _, ok := st.Field(i).Type().(*types.Slice); ok { + if st.Tag(i) == `dns:"domain-name"` { + domainTypes = append(domainTypes, o.Name()) + continue Names + } + if st.Tag(i) == `dns:"cdomain-name"` { + cdomainTypes = append(cdomainTypes, o.Name()) + domainTypes = append(domainTypes, o.Name()) + continue Names + } + continue + } + + switch { + case st.Tag(i) == `dns:"domain-name"`: + domainTypes = append(domainTypes, o.Name()) + continue Names + case st.Tag(i) == `dns:"cdomain-name"`: + cdomainTypes = append(cdomainTypes, o.Name()) + domainTypes = append(domainTypes, o.Name()) + continue Names + } + } + } + + b := &bytes.Buffer{} + b.WriteString(packageHdr) + + // compressionLenHelperType - all types that have domain-name/cdomain-name can be used for compressing names + + fmt.Fprint(b, "func compressionLenHelperType(c map[string]int, r RR) {\n") + fmt.Fprint(b, "switch x := r.(type) {\n") + for _, name := range domainTypes { + o := scope.Lookup(name) + st, _ := getTypeStruct(o.Type(), scope) + + fmt.Fprintf(b, "case *%s:\n", name) + for i := 1; i < st.NumFields(); i++ { + out := func(s string) { fmt.Fprintf(b, "compressionLenHelper(c, x.%s)\n", st.Field(i).Name()) } + + if _, ok := st.Field(i).Type().(*types.Slice); ok { + switch st.Tag(i) { + case `dns:"domain-name"`: + fallthrough + case `dns:"cdomain-name"`: + // For HIP we need to slice over the elements in this slice. + fmt.Fprintf(b, `for i := range x.%s { + compressionLenHelper(c, x.%s[i]) + } +`, st.Field(i).Name(), st.Field(i).Name()) + } + continue + } + + switch { + case st.Tag(i) == `dns:"cdomain-name"`: + fallthrough + case st.Tag(i) == `dns:"domain-name"`: + out(st.Field(i).Name()) + } + } + } + fmt.Fprintln(b, "}\n}\n\n") + + // compressionLenSearchType - search cdomain-tags types for compressible names. + + fmt.Fprint(b, "func compressionLenSearchType(c map[string]int, r RR) (int, bool) {\n") + fmt.Fprint(b, "switch x := r.(type) {\n") + for _, name := range cdomainTypes { + o := scope.Lookup(name) + st, _ := getTypeStruct(o.Type(), scope) + + fmt.Fprintf(b, "case *%s:\n", name) + j := 1 + for i := 1; i < st.NumFields(); i++ { + out := func(s string, j int) { + fmt.Fprintf(b, "k%d, ok%d := compressionLenSearch(c, x.%s)\n", j, j, st.Field(i).Name()) + } + + // There are no slice types with names that can be compressed. + + switch { + case st.Tag(i) == `dns:"cdomain-name"`: + out(st.Field(i).Name(), j) + j++ + } + } + k := "k1" + ok := "ok1" + for i := 2; i < j; i++ { + k += fmt.Sprintf(" + k%d", i) + ok += fmt.Sprintf(" && ok%d", i) + } + fmt.Fprintf(b, "return %s, %s\n", k, ok) + } + fmt.Fprintln(b, "}\nreturn 0, false\n}\n\n") + + // gofmt + res, err := format.Source(b.Bytes()) + if err != nil { + b.WriteTo(os.Stderr) + log.Fatal(err) + } + + f, err := os.Create("zcompress.go") + fatalIfErr(err) + defer f.Close() + f.Write(res) +} + +func fatalIfErr(err error) { + if err != nil { + log.Fatal(err) + } +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/dane.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/dane.go new file mode 100644 index 000000000..8c4a14ef1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/dane.go @@ -0,0 +1,43 @@ +package dns + +import ( + "crypto/sha256" + "crypto/sha512" + "crypto/x509" + "encoding/hex" + "errors" +) + +// CertificateToDANE converts a certificate to a hex string as used in the TLSA or SMIMEA records. +func CertificateToDANE(selector, matchingType uint8, cert *x509.Certificate) (string, error) { + switch matchingType { + case 0: + switch selector { + case 0: + return hex.EncodeToString(cert.Raw), nil + case 1: + return hex.EncodeToString(cert.RawSubjectPublicKeyInfo), nil + } + case 1: + h := sha256.New() + switch selector { + case 0: + h.Write(cert.Raw) + return hex.EncodeToString(h.Sum(nil)), nil + case 1: + h.Write(cert.RawSubjectPublicKeyInfo) + return hex.EncodeToString(h.Sum(nil)), nil + } + case 2: + h := sha512.New() + switch selector { + case 0: + h.Write(cert.Raw) + return hex.EncodeToString(h.Sum(nil)), nil + case 1: + h.Write(cert.RawSubjectPublicKeyInfo) + return hex.EncodeToString(h.Sum(nil)), nil + } + } + return "", errors.New("dns: bad MatchingType or Selector") +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/defaults.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/defaults.go new file mode 100644 index 000000000..14e18b0b3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/defaults.go @@ -0,0 +1,288 @@ +package dns + +import ( + "errors" + "net" + "strconv" +) + +const hexDigit = "0123456789abcdef" + +// Everything is assumed in ClassINET. + +// SetReply creates a reply message from a request message. +func (dns *Msg) SetReply(request *Msg) *Msg { + dns.Id = request.Id + dns.Response = true + dns.Opcode = request.Opcode + if dns.Opcode == OpcodeQuery { + dns.RecursionDesired = request.RecursionDesired // Copy rd bit + dns.CheckingDisabled = request.CheckingDisabled // Copy cd bit + } + dns.Rcode = RcodeSuccess + if len(request.Question) > 0 { + dns.Question = make([]Question, 1) + dns.Question[0] = request.Question[0] + } + return dns +} + +// SetQuestion creates a question message, it sets the Question +// section, generates an Id and sets the RecursionDesired (RD) +// bit to true. +func (dns *Msg) SetQuestion(z string, t uint16) *Msg { + dns.Id = Id() + dns.RecursionDesired = true + dns.Question = make([]Question, 1) + dns.Question[0] = Question{z, t, ClassINET} + return dns +} + +// SetNotify creates a notify message, it sets the Question +// section, generates an Id and sets the Authoritative (AA) +// bit to true. +func (dns *Msg) SetNotify(z string) *Msg { + dns.Opcode = OpcodeNotify + dns.Authoritative = true + dns.Id = Id() + dns.Question = make([]Question, 1) + dns.Question[0] = Question{z, TypeSOA, ClassINET} + return dns +} + +// SetRcode creates an error message suitable for the request. +func (dns *Msg) SetRcode(request *Msg, rcode int) *Msg { + dns.SetReply(request) + dns.Rcode = rcode + return dns +} + +// SetRcodeFormatError creates a message with FormError set. +func (dns *Msg) SetRcodeFormatError(request *Msg) *Msg { + dns.Rcode = RcodeFormatError + dns.Opcode = OpcodeQuery + dns.Response = true + dns.Authoritative = false + dns.Id = request.Id + return dns +} + +// SetUpdate makes the message a dynamic update message. It +// sets the ZONE section to: z, TypeSOA, ClassINET. +func (dns *Msg) SetUpdate(z string) *Msg { + dns.Id = Id() + dns.Response = false + dns.Opcode = OpcodeUpdate + dns.Compress = false // BIND9 cannot handle compression + dns.Question = make([]Question, 1) + dns.Question[0] = Question{z, TypeSOA, ClassINET} + return dns +} + +// SetIxfr creates message for requesting an IXFR. +func (dns *Msg) SetIxfr(z string, serial uint32, ns, mbox string) *Msg { + dns.Id = Id() + dns.Question = make([]Question, 1) + dns.Ns = make([]RR, 1) + s := new(SOA) + s.Hdr = RR_Header{z, TypeSOA, ClassINET, defaultTtl, 0} + s.Serial = serial + s.Ns = ns + s.Mbox = mbox + dns.Question[0] = Question{z, TypeIXFR, ClassINET} + dns.Ns[0] = s + return dns +} + +// SetAxfr creates message for requesting an AXFR. +func (dns *Msg) SetAxfr(z string) *Msg { + dns.Id = Id() + dns.Question = make([]Question, 1) + dns.Question[0] = Question{z, TypeAXFR, ClassINET} + return dns +} + +// SetTsig appends a TSIG RR to the message. +// This is only a skeleton TSIG RR that is added as the last RR in the +// additional section. The Tsig is calculated when the message is being send. +func (dns *Msg) SetTsig(z, algo string, fudge uint16, timesigned int64) *Msg { + t := new(TSIG) + t.Hdr = RR_Header{z, TypeTSIG, ClassANY, 0, 0} + t.Algorithm = algo + t.Fudge = fudge + t.TimeSigned = uint64(timesigned) + t.OrigId = dns.Id + dns.Extra = append(dns.Extra, t) + return dns +} + +// SetEdns0 appends a EDNS0 OPT RR to the message. +// TSIG should always the last RR in a message. +func (dns *Msg) SetEdns0(udpsize uint16, do bool) *Msg { + e := new(OPT) + e.Hdr.Name = "." + e.Hdr.Rrtype = TypeOPT + e.SetUDPSize(udpsize) + if do { + e.SetDo() + } + dns.Extra = append(dns.Extra, e) + return dns +} + +// IsTsig checks if the message has a TSIG record as the last record +// in the additional section. It returns the TSIG record found or nil. +func (dns *Msg) IsTsig() *TSIG { + if len(dns.Extra) > 0 { + if dns.Extra[len(dns.Extra)-1].Header().Rrtype == TypeTSIG { + return dns.Extra[len(dns.Extra)-1].(*TSIG) + } + } + return nil +} + +// IsEdns0 checks if the message has a EDNS0 (OPT) record, any EDNS0 +// record in the additional section will do. It returns the OPT record +// found or nil. +func (dns *Msg) IsEdns0() *OPT { + // EDNS0 is at the end of the additional section, start there. + // We might want to change this to *only* look at the last two + // records. So we see TSIG and/or OPT - this a slightly bigger + // change though. + for i := len(dns.Extra) - 1; i >= 0; i-- { + if dns.Extra[i].Header().Rrtype == TypeOPT { + return dns.Extra[i].(*OPT) + } + } + return nil +} + +// IsDomainName checks if s is a valid domain name, it returns the number of +// labels and true, when a domain name is valid. Note that non fully qualified +// domain name is considered valid, in this case the last label is counted in +// the number of labels. When false is returned the number of labels is not +// defined. Also note that this function is extremely liberal; almost any +// string is a valid domain name as the DNS is 8 bit protocol. It checks if each +// label fits in 63 characters, but there is no length check for the entire +// string s. I.e. a domain name longer than 255 characters is considered valid. +func IsDomainName(s string) (labels int, ok bool) { + _, labels, err := packDomainName(s, nil, 0, nil, false) + return labels, err == nil +} + +// IsSubDomain checks if child is indeed a child of the parent. If child and parent +// are the same domain true is returned as well. +func IsSubDomain(parent, child string) bool { + // Entire child is contained in parent + return CompareDomainName(parent, child) == CountLabel(parent) +} + +// IsMsg sanity checks buf and returns an error if it isn't a valid DNS packet. +// The checking is performed on the binary payload. +func IsMsg(buf []byte) error { + // Header + if len(buf) < 12 { + return errors.New("dns: bad message header") + } + // Header: Opcode + // TODO(miek): more checks here, e.g. check all header bits. + return nil +} + +// IsFqdn checks if a domain name is fully qualified. +func IsFqdn(s string) bool { + l := len(s) + if l == 0 { + return false + } + return s[l-1] == '.' +} + +// IsRRset checks if a set of RRs is a valid RRset as defined by RFC 2181. +// This means the RRs need to have the same type, name, and class. Returns true +// if the RR set is valid, otherwise false. +func IsRRset(rrset []RR) bool { + if len(rrset) == 0 { + return false + } + if len(rrset) == 1 { + return true + } + rrHeader := rrset[0].Header() + rrType := rrHeader.Rrtype + rrClass := rrHeader.Class + rrName := rrHeader.Name + + for _, rr := range rrset[1:] { + curRRHeader := rr.Header() + if curRRHeader.Rrtype != rrType || curRRHeader.Class != rrClass || curRRHeader.Name != rrName { + // Mismatch between the records, so this is not a valid rrset for + //signing/verifying + return false + } + } + + return true +} + +// Fqdn return the fully qualified domain name from s. +// If s is already fully qualified, it behaves as the identity function. +func Fqdn(s string) string { + if IsFqdn(s) { + return s + } + return s + "." +} + +// Copied from the official Go code. + +// ReverseAddr returns the in-addr.arpa. or ip6.arpa. hostname of the IP +// address suitable for reverse DNS (PTR) record lookups or an error if it fails +// to parse the IP address. +func ReverseAddr(addr string) (arpa string, err error) { + ip := net.ParseIP(addr) + if ip == nil { + return "", &Error{err: "unrecognized address: " + addr} + } + if ip.To4() != nil { + return strconv.Itoa(int(ip[15])) + "." + strconv.Itoa(int(ip[14])) + "." + strconv.Itoa(int(ip[13])) + "." + + strconv.Itoa(int(ip[12])) + ".in-addr.arpa.", nil + } + // Must be IPv6 + buf := make([]byte, 0, len(ip)*4+len("ip6.arpa.")) + // Add it, in reverse, to the buffer + for i := len(ip) - 1; i >= 0; i-- { + v := ip[i] + buf = append(buf, hexDigit[v&0xF]) + buf = append(buf, '.') + buf = append(buf, hexDigit[v>>4]) + buf = append(buf, '.') + } + // Append "ip6.arpa." and return (buf already has the final .) + buf = append(buf, "ip6.arpa."...) + return string(buf), nil +} + +// String returns the string representation for the type t. +func (t Type) String() string { + if t1, ok := TypeToString[uint16(t)]; ok { + return t1 + } + return "TYPE" + strconv.Itoa(int(t)) +} + +// String returns the string representation for the class c. +func (c Class) String() string { + if s, ok := ClassToString[uint16(c)]; ok { + // Only emit mnemonics when they are unambiguous, specically ANY is in both. + if _, ok := StringToType[s]; !ok { + return s + } + } + return "CLASS" + strconv.Itoa(int(c)) +} + +// String returns the string representation for the name n. +func (n Name) String() string { + return sprintName(string(n)) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/dns.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/dns.go new file mode 100644 index 000000000..5133eac72 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/dns.go @@ -0,0 +1,107 @@ +package dns + +import "strconv" + +const ( + year68 = 1 << 31 // For RFC1982 (Serial Arithmetic) calculations in 32 bits. + defaultTtl = 3600 // Default internal TTL. + + // DefaultMsgSize is the standard default for messages larger than 512 bytes. + DefaultMsgSize = 4096 + // MinMsgSize is the minimal size of a DNS packet. + MinMsgSize = 512 + // MaxMsgSize is the largest possible DNS packet. + MaxMsgSize = 65535 +) + +// Error represents a DNS error. +type Error struct{ err string } + +func (e *Error) Error() string { + if e == nil { + return "dns: " + } + return "dns: " + e.err +} + +// An RR represents a resource record. +type RR interface { + // Header returns the header of an resource record. The header contains + // everything up to the rdata. + Header() *RR_Header + // String returns the text representation of the resource record. + String() string + + // copy returns a copy of the RR + copy() RR + // len returns the length (in octets) of the uncompressed RR in wire format. + len() int + // pack packs an RR into wire format. + pack([]byte, int, map[string]int, bool) (int, error) +} + +// RR_Header is the header all DNS resource records share. +type RR_Header struct { + Name string `dns:"cdomain-name"` + Rrtype uint16 + Class uint16 + Ttl uint32 + Rdlength uint16 // Length of data after header. +} + +// Header returns itself. This is here to make RR_Header implements the RR interface. +func (h *RR_Header) Header() *RR_Header { return h } + +// Just to implement the RR interface. +func (h *RR_Header) copy() RR { return nil } + +func (h *RR_Header) copyHeader() *RR_Header { + r := new(RR_Header) + r.Name = h.Name + r.Rrtype = h.Rrtype + r.Class = h.Class + r.Ttl = h.Ttl + r.Rdlength = h.Rdlength + return r +} + +func (h *RR_Header) String() string { + var s string + + if h.Rrtype == TypeOPT { + s = ";" + // and maybe other things + } + + s += sprintName(h.Name) + "\t" + s += strconv.FormatInt(int64(h.Ttl), 10) + "\t" + s += Class(h.Class).String() + "\t" + s += Type(h.Rrtype).String() + "\t" + return s +} + +func (h *RR_Header) len() int { + l := len(h.Name) + 1 + l += 10 // rrtype(2) + class(2) + ttl(4) + rdlength(2) + return l +} + +// ToRFC3597 converts a known RR to the unknown RR representation from RFC 3597. +func (rr *RFC3597) ToRFC3597(r RR) error { + buf := make([]byte, r.len()*2) + off, err := PackRR(r, buf, 0, nil, false) + if err != nil { + return err + } + buf = buf[:off] + if int(r.Header().Rdlength) > off { + return ErrBuf + } + + rfc3597, _, err := unpackRFC3597(*r.Header(), buf, off-int(r.Header().Rdlength)) + if err != nil { + return err + } + *rr = *rfc3597.(*RFC3597) + return nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/dnssec.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/dnssec.go new file mode 100644 index 000000000..ac9fdd45e --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/dnssec.go @@ -0,0 +1,784 @@ +package dns + +import ( + "bytes" + "crypto" + "crypto/dsa" + "crypto/ecdsa" + "crypto/elliptic" + _ "crypto/md5" + "crypto/rand" + "crypto/rsa" + _ "crypto/sha1" + _ "crypto/sha256" + _ "crypto/sha512" + "encoding/asn1" + "encoding/binary" + "encoding/hex" + "math/big" + "sort" + "strings" + "time" + + "golang.org/x/crypto/ed25519" +) + +// DNSSEC encryption algorithm codes. +const ( + _ uint8 = iota + RSAMD5 + DH + DSA + _ // Skip 4, RFC 6725, section 2.1 + RSASHA1 + DSANSEC3SHA1 + RSASHA1NSEC3SHA1 + RSASHA256 + _ // Skip 9, RFC 6725, section 2.1 + RSASHA512 + _ // Skip 11, RFC 6725, section 2.1 + ECCGOST + ECDSAP256SHA256 + ECDSAP384SHA384 + ED25519 + ED448 + INDIRECT uint8 = 252 + PRIVATEDNS uint8 = 253 // Private (experimental keys) + PRIVATEOID uint8 = 254 +) + +// AlgorithmToString is a map of algorithm IDs to algorithm names. +var AlgorithmToString = map[uint8]string{ + RSAMD5: "RSAMD5", + DH: "DH", + DSA: "DSA", + RSASHA1: "RSASHA1", + DSANSEC3SHA1: "DSA-NSEC3-SHA1", + RSASHA1NSEC3SHA1: "RSASHA1-NSEC3-SHA1", + RSASHA256: "RSASHA256", + RSASHA512: "RSASHA512", + ECCGOST: "ECC-GOST", + ECDSAP256SHA256: "ECDSAP256SHA256", + ECDSAP384SHA384: "ECDSAP384SHA384", + ED25519: "ED25519", + ED448: "ED448", + INDIRECT: "INDIRECT", + PRIVATEDNS: "PRIVATEDNS", + PRIVATEOID: "PRIVATEOID", +} + +// StringToAlgorithm is the reverse of AlgorithmToString. +var StringToAlgorithm = reverseInt8(AlgorithmToString) + +// AlgorithmToHash is a map of algorithm crypto hash IDs to crypto.Hash's. +var AlgorithmToHash = map[uint8]crypto.Hash{ + RSAMD5: crypto.MD5, // Deprecated in RFC 6725 + RSASHA1: crypto.SHA1, + RSASHA1NSEC3SHA1: crypto.SHA1, + RSASHA256: crypto.SHA256, + ECDSAP256SHA256: crypto.SHA256, + ECDSAP384SHA384: crypto.SHA384, + RSASHA512: crypto.SHA512, + ED25519: crypto.Hash(0), +} + +// DNSSEC hashing algorithm codes. +const ( + _ uint8 = iota + SHA1 // RFC 4034 + SHA256 // RFC 4509 + GOST94 // RFC 5933 + SHA384 // Experimental + SHA512 // Experimental +) + +// HashToString is a map of hash IDs to names. +var HashToString = map[uint8]string{ + SHA1: "SHA1", + SHA256: "SHA256", + GOST94: "GOST94", + SHA384: "SHA384", + SHA512: "SHA512", +} + +// StringToHash is a map of names to hash IDs. +var StringToHash = reverseInt8(HashToString) + +// DNSKEY flag values. +const ( + SEP = 1 + REVOKE = 1 << 7 + ZONE = 1 << 8 +) + +// The RRSIG needs to be converted to wireformat with some of the rdata (the signature) missing. +type rrsigWireFmt struct { + TypeCovered uint16 + Algorithm uint8 + Labels uint8 + OrigTtl uint32 + Expiration uint32 + Inception uint32 + KeyTag uint16 + SignerName string `dns:"domain-name"` + /* No Signature */ +} + +// Used for converting DNSKEY's rdata to wirefmt. +type dnskeyWireFmt struct { + Flags uint16 + Protocol uint8 + Algorithm uint8 + PublicKey string `dns:"base64"` + /* Nothing is left out */ +} + +func divRoundUp(a, b int) int { + return (a + b - 1) / b +} + +// KeyTag calculates the keytag (or key-id) of the DNSKEY. +func (k *DNSKEY) KeyTag() uint16 { + if k == nil { + return 0 + } + var keytag int + switch k.Algorithm { + case RSAMD5: + // Look at the bottom two bytes of the modules, which the last + // item in the pubkey. We could do this faster by looking directly + // at the base64 values. But I'm lazy. + modulus, _ := fromBase64([]byte(k.PublicKey)) + if len(modulus) > 1 { + x := binary.BigEndian.Uint16(modulus[len(modulus)-2:]) + keytag = int(x) + } + default: + keywire := new(dnskeyWireFmt) + keywire.Flags = k.Flags + keywire.Protocol = k.Protocol + keywire.Algorithm = k.Algorithm + keywire.PublicKey = k.PublicKey + wire := make([]byte, DefaultMsgSize) + n, err := packKeyWire(keywire, wire) + if err != nil { + return 0 + } + wire = wire[:n] + for i, v := range wire { + if i&1 != 0 { + keytag += int(v) // must be larger than uint32 + } else { + keytag += int(v) << 8 + } + } + keytag += (keytag >> 16) & 0xFFFF + keytag &= 0xFFFF + } + return uint16(keytag) +} + +// ToDS converts a DNSKEY record to a DS record. +func (k *DNSKEY) ToDS(h uint8) *DS { + if k == nil { + return nil + } + ds := new(DS) + ds.Hdr.Name = k.Hdr.Name + ds.Hdr.Class = k.Hdr.Class + ds.Hdr.Rrtype = TypeDS + ds.Hdr.Ttl = k.Hdr.Ttl + ds.Algorithm = k.Algorithm + ds.DigestType = h + ds.KeyTag = k.KeyTag() + + keywire := new(dnskeyWireFmt) + keywire.Flags = k.Flags + keywire.Protocol = k.Protocol + keywire.Algorithm = k.Algorithm + keywire.PublicKey = k.PublicKey + wire := make([]byte, DefaultMsgSize) + n, err := packKeyWire(keywire, wire) + if err != nil { + return nil + } + wire = wire[:n] + + owner := make([]byte, 255) + off, err1 := PackDomainName(strings.ToLower(k.Hdr.Name), owner, 0, nil, false) + if err1 != nil { + return nil + } + owner = owner[:off] + // RFC4034: + // digest = digest_algorithm( DNSKEY owner name | DNSKEY RDATA); + // "|" denotes concatenation + // DNSKEY RDATA = Flags | Protocol | Algorithm | Public Key. + + var hash crypto.Hash + switch h { + case SHA1: + hash = crypto.SHA1 + case SHA256: + hash = crypto.SHA256 + case SHA384: + hash = crypto.SHA384 + case SHA512: + hash = crypto.SHA512 + default: + return nil + } + + s := hash.New() + s.Write(owner) + s.Write(wire) + ds.Digest = hex.EncodeToString(s.Sum(nil)) + return ds +} + +// ToCDNSKEY converts a DNSKEY record to a CDNSKEY record. +func (k *DNSKEY) ToCDNSKEY() *CDNSKEY { + c := &CDNSKEY{DNSKEY: *k} + c.Hdr = *k.Hdr.copyHeader() + c.Hdr.Rrtype = TypeCDNSKEY + return c +} + +// ToCDS converts a DS record to a CDS record. +func (d *DS) ToCDS() *CDS { + c := &CDS{DS: *d} + c.Hdr = *d.Hdr.copyHeader() + c.Hdr.Rrtype = TypeCDS + return c +} + +// Sign signs an RRSet. The signature needs to be filled in with the values: +// Inception, Expiration, KeyTag, SignerName and Algorithm. The rest is copied +// from the RRset. Sign returns a non-nill error when the signing went OK. +// There is no check if RRSet is a proper (RFC 2181) RRSet. If OrigTTL is non +// zero, it is used as-is, otherwise the TTL of the RRset is used as the +// OrigTTL. +func (rr *RRSIG) Sign(k crypto.Signer, rrset []RR) error { + if k == nil { + return ErrPrivKey + } + // s.Inception and s.Expiration may be 0 (rollover etc.), the rest must be set + if rr.KeyTag == 0 || len(rr.SignerName) == 0 || rr.Algorithm == 0 { + return ErrKey + } + + rr.Hdr.Rrtype = TypeRRSIG + rr.Hdr.Name = rrset[0].Header().Name + rr.Hdr.Class = rrset[0].Header().Class + if rr.OrigTtl == 0 { // If set don't override + rr.OrigTtl = rrset[0].Header().Ttl + } + rr.TypeCovered = rrset[0].Header().Rrtype + rr.Labels = uint8(CountLabel(rrset[0].Header().Name)) + + if strings.HasPrefix(rrset[0].Header().Name, "*") { + rr.Labels-- // wildcard, remove from label count + } + + sigwire := new(rrsigWireFmt) + sigwire.TypeCovered = rr.TypeCovered + sigwire.Algorithm = rr.Algorithm + sigwire.Labels = rr.Labels + sigwire.OrigTtl = rr.OrigTtl + sigwire.Expiration = rr.Expiration + sigwire.Inception = rr.Inception + sigwire.KeyTag = rr.KeyTag + // For signing, lowercase this name + sigwire.SignerName = strings.ToLower(rr.SignerName) + + // Create the desired binary blob + signdata := make([]byte, DefaultMsgSize) + n, err := packSigWire(sigwire, signdata) + if err != nil { + return err + } + signdata = signdata[:n] + wire, err := rawSignatureData(rrset, rr) + if err != nil { + return err + } + + hash, ok := AlgorithmToHash[rr.Algorithm] + if !ok { + return ErrAlg + } + + switch rr.Algorithm { + case ED25519: + // ed25519 signs the raw message and performs hashing internally. + // All other supported signature schemes operate over the pre-hashed + // message, and thus ed25519 must be handled separately here. + // + // The raw message is passed directly into sign and crypto.Hash(0) is + // used to signal to the crypto.Signer that the data has not been hashed. + signature, err := sign(k, append(signdata, wire...), crypto.Hash(0), rr.Algorithm) + if err != nil { + return err + } + + rr.Signature = toBase64(signature) + default: + h := hash.New() + h.Write(signdata) + h.Write(wire) + + signature, err := sign(k, h.Sum(nil), hash, rr.Algorithm) + if err != nil { + return err + } + + rr.Signature = toBase64(signature) + } + + return nil +} + +func sign(k crypto.Signer, hashed []byte, hash crypto.Hash, alg uint8) ([]byte, error) { + signature, err := k.Sign(rand.Reader, hashed, hash) + if err != nil { + return nil, err + } + + switch alg { + case RSASHA1, RSASHA1NSEC3SHA1, RSASHA256, RSASHA512: + return signature, nil + + case ECDSAP256SHA256, ECDSAP384SHA384: + ecdsaSignature := &struct { + R, S *big.Int + }{} + if _, err := asn1.Unmarshal(signature, ecdsaSignature); err != nil { + return nil, err + } + + var intlen int + switch alg { + case ECDSAP256SHA256: + intlen = 32 + case ECDSAP384SHA384: + intlen = 48 + } + + signature := intToBytes(ecdsaSignature.R, intlen) + signature = append(signature, intToBytes(ecdsaSignature.S, intlen)...) + return signature, nil + + // There is no defined interface for what a DSA backed crypto.Signer returns + case DSA, DSANSEC3SHA1: + // t := divRoundUp(divRoundUp(p.PublicKey.Y.BitLen(), 8)-64, 8) + // signature := []byte{byte(t)} + // signature = append(signature, intToBytes(r1, 20)...) + // signature = append(signature, intToBytes(s1, 20)...) + // rr.Signature = signature + + case ED25519: + return signature, nil + } + + return nil, ErrAlg +} + +// Verify validates an RRSet with the signature and key. This is only the +// cryptographic test, the signature validity period must be checked separately. +// This function copies the rdata of some RRs (to lowercase domain names) for the validation to work. +func (rr *RRSIG) Verify(k *DNSKEY, rrset []RR) error { + // First the easy checks + if !IsRRset(rrset) { + return ErrRRset + } + if rr.KeyTag != k.KeyTag() { + return ErrKey + } + if rr.Hdr.Class != k.Hdr.Class { + return ErrKey + } + if rr.Algorithm != k.Algorithm { + return ErrKey + } + if strings.ToLower(rr.SignerName) != strings.ToLower(k.Hdr.Name) { + return ErrKey + } + if k.Protocol != 3 { + return ErrKey + } + + // IsRRset checked that we have at least one RR and that the RRs in + // the set have consistent type, class, and name. Also check that type and + // class matches the RRSIG record. + if rrset[0].Header().Class != rr.Hdr.Class { + return ErrRRset + } + if rrset[0].Header().Rrtype != rr.TypeCovered { + return ErrRRset + } + + // RFC 4035 5.3.2. Reconstructing the Signed Data + // Copy the sig, except the rrsig data + sigwire := new(rrsigWireFmt) + sigwire.TypeCovered = rr.TypeCovered + sigwire.Algorithm = rr.Algorithm + sigwire.Labels = rr.Labels + sigwire.OrigTtl = rr.OrigTtl + sigwire.Expiration = rr.Expiration + sigwire.Inception = rr.Inception + sigwire.KeyTag = rr.KeyTag + sigwire.SignerName = strings.ToLower(rr.SignerName) + // Create the desired binary blob + signeddata := make([]byte, DefaultMsgSize) + n, err := packSigWire(sigwire, signeddata) + if err != nil { + return err + } + signeddata = signeddata[:n] + wire, err := rawSignatureData(rrset, rr) + if err != nil { + return err + } + + sigbuf := rr.sigBuf() // Get the binary signature data + if rr.Algorithm == PRIVATEDNS { // PRIVATEOID + // TODO(miek) + // remove the domain name and assume its ours? + } + + hash, ok := AlgorithmToHash[rr.Algorithm] + if !ok { + return ErrAlg + } + + switch rr.Algorithm { + case RSASHA1, RSASHA1NSEC3SHA1, RSASHA256, RSASHA512, RSAMD5: + // TODO(mg): this can be done quicker, ie. cache the pubkey data somewhere?? + pubkey := k.publicKeyRSA() // Get the key + if pubkey == nil { + return ErrKey + } + + h := hash.New() + h.Write(signeddata) + h.Write(wire) + return rsa.VerifyPKCS1v15(pubkey, hash, h.Sum(nil), sigbuf) + + case ECDSAP256SHA256, ECDSAP384SHA384: + pubkey := k.publicKeyECDSA() + if pubkey == nil { + return ErrKey + } + + // Split sigbuf into the r and s coordinates + r := new(big.Int).SetBytes(sigbuf[:len(sigbuf)/2]) + s := new(big.Int).SetBytes(sigbuf[len(sigbuf)/2:]) + + h := hash.New() + h.Write(signeddata) + h.Write(wire) + if ecdsa.Verify(pubkey, h.Sum(nil), r, s) { + return nil + } + return ErrSig + + case ED25519: + pubkey := k.publicKeyED25519() + if pubkey == nil { + return ErrKey + } + + if ed25519.Verify(pubkey, append(signeddata, wire...), sigbuf) { + return nil + } + return ErrSig + + default: + return ErrAlg + } +} + +// ValidityPeriod uses RFC1982 serial arithmetic to calculate +// if a signature period is valid. If t is the zero time, the +// current time is taken other t is. Returns true if the signature +// is valid at the given time, otherwise returns false. +func (rr *RRSIG) ValidityPeriod(t time.Time) bool { + var utc int64 + if t.IsZero() { + utc = time.Now().UTC().Unix() + } else { + utc = t.UTC().Unix() + } + modi := (int64(rr.Inception) - utc) / year68 + mode := (int64(rr.Expiration) - utc) / year68 + ti := int64(rr.Inception) + (modi * year68) + te := int64(rr.Expiration) + (mode * year68) + return ti <= utc && utc <= te +} + +// Return the signatures base64 encodedig sigdata as a byte slice. +func (rr *RRSIG) sigBuf() []byte { + sigbuf, err := fromBase64([]byte(rr.Signature)) + if err != nil { + return nil + } + return sigbuf +} + +// publicKeyRSA returns the RSA public key from a DNSKEY record. +func (k *DNSKEY) publicKeyRSA() *rsa.PublicKey { + keybuf, err := fromBase64([]byte(k.PublicKey)) + if err != nil { + return nil + } + + // RFC 2537/3110, section 2. RSA Public KEY Resource Records + // Length is in the 0th byte, unless its zero, then it + // it in bytes 1 and 2 and its a 16 bit number + explen := uint16(keybuf[0]) + keyoff := 1 + if explen == 0 { + explen = uint16(keybuf[1])<<8 | uint16(keybuf[2]) + keyoff = 3 + } + pubkey := new(rsa.PublicKey) + + pubkey.N = big.NewInt(0) + shift := uint64((explen - 1) * 8) + expo := uint64(0) + for i := int(explen - 1); i > 0; i-- { + expo += uint64(keybuf[keyoff+i]) << shift + shift -= 8 + } + // Remainder + expo += uint64(keybuf[keyoff]) + if expo > (2<<31)+1 { + // Larger expo than supported. + // println("dns: F5 primes (or larger) are not supported") + return nil + } + pubkey.E = int(expo) + + pubkey.N.SetBytes(keybuf[keyoff+int(explen):]) + return pubkey +} + +// publicKeyECDSA returns the Curve public key from the DNSKEY record. +func (k *DNSKEY) publicKeyECDSA() *ecdsa.PublicKey { + keybuf, err := fromBase64([]byte(k.PublicKey)) + if err != nil { + return nil + } + pubkey := new(ecdsa.PublicKey) + switch k.Algorithm { + case ECDSAP256SHA256: + pubkey.Curve = elliptic.P256() + if len(keybuf) != 64 { + // wrongly encoded key + return nil + } + case ECDSAP384SHA384: + pubkey.Curve = elliptic.P384() + if len(keybuf) != 96 { + // Wrongly encoded key + return nil + } + } + pubkey.X = big.NewInt(0) + pubkey.X.SetBytes(keybuf[:len(keybuf)/2]) + pubkey.Y = big.NewInt(0) + pubkey.Y.SetBytes(keybuf[len(keybuf)/2:]) + return pubkey +} + +func (k *DNSKEY) publicKeyDSA() *dsa.PublicKey { + keybuf, err := fromBase64([]byte(k.PublicKey)) + if err != nil { + return nil + } + if len(keybuf) < 22 { + return nil + } + t, keybuf := int(keybuf[0]), keybuf[1:] + size := 64 + t*8 + q, keybuf := keybuf[:20], keybuf[20:] + if len(keybuf) != 3*size { + return nil + } + p, keybuf := keybuf[:size], keybuf[size:] + g, y := keybuf[:size], keybuf[size:] + pubkey := new(dsa.PublicKey) + pubkey.Parameters.Q = big.NewInt(0).SetBytes(q) + pubkey.Parameters.P = big.NewInt(0).SetBytes(p) + pubkey.Parameters.G = big.NewInt(0).SetBytes(g) + pubkey.Y = big.NewInt(0).SetBytes(y) + return pubkey +} + +func (k *DNSKEY) publicKeyED25519() ed25519.PublicKey { + keybuf, err := fromBase64([]byte(k.PublicKey)) + if err != nil { + return nil + } + if len(keybuf) != ed25519.PublicKeySize { + return nil + } + return keybuf +} + +type wireSlice [][]byte + +func (p wireSlice) Len() int { return len(p) } +func (p wireSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } +func (p wireSlice) Less(i, j int) bool { + _, ioff, _ := UnpackDomainName(p[i], 0) + _, joff, _ := UnpackDomainName(p[j], 0) + return bytes.Compare(p[i][ioff+10:], p[j][joff+10:]) < 0 +} + +// Return the raw signature data. +func rawSignatureData(rrset []RR, s *RRSIG) (buf []byte, err error) { + wires := make(wireSlice, len(rrset)) + for i, r := range rrset { + r1 := r.copy() + r1.Header().Ttl = s.OrigTtl + labels := SplitDomainName(r1.Header().Name) + // 6.2. Canonical RR Form. (4) - wildcards + if len(labels) > int(s.Labels) { + // Wildcard + r1.Header().Name = "*." + strings.Join(labels[len(labels)-int(s.Labels):], ".") + "." + } + // RFC 4034: 6.2. Canonical RR Form. (2) - domain name to lowercase + r1.Header().Name = strings.ToLower(r1.Header().Name) + // 6.2. Canonical RR Form. (3) - domain rdata to lowercase. + // NS, MD, MF, CNAME, SOA, MB, MG, MR, PTR, + // HINFO, MINFO, MX, RP, AFSDB, RT, SIG, PX, NXT, NAPTR, KX, + // SRV, DNAME, A6 + // + // RFC 6840 - Clarifications and Implementation Notes for DNS Security (DNSSEC): + // Section 6.2 of [RFC4034] also erroneously lists HINFO as a record + // that needs conversion to lowercase, and twice at that. Since HINFO + // records contain no domain names, they are not subject to case + // conversion. + switch x := r1.(type) { + case *NS: + x.Ns = strings.ToLower(x.Ns) + case *MD: + x.Md = strings.ToLower(x.Md) + case *MF: + x.Mf = strings.ToLower(x.Mf) + case *CNAME: + x.Target = strings.ToLower(x.Target) + case *SOA: + x.Ns = strings.ToLower(x.Ns) + x.Mbox = strings.ToLower(x.Mbox) + case *MB: + x.Mb = strings.ToLower(x.Mb) + case *MG: + x.Mg = strings.ToLower(x.Mg) + case *MR: + x.Mr = strings.ToLower(x.Mr) + case *PTR: + x.Ptr = strings.ToLower(x.Ptr) + case *MINFO: + x.Rmail = strings.ToLower(x.Rmail) + x.Email = strings.ToLower(x.Email) + case *MX: + x.Mx = strings.ToLower(x.Mx) + case *RP: + x.Mbox = strings.ToLower(x.Mbox) + x.Txt = strings.ToLower(x.Txt) + case *AFSDB: + x.Hostname = strings.ToLower(x.Hostname) + case *RT: + x.Host = strings.ToLower(x.Host) + case *SIG: + x.SignerName = strings.ToLower(x.SignerName) + case *PX: + x.Map822 = strings.ToLower(x.Map822) + x.Mapx400 = strings.ToLower(x.Mapx400) + case *NAPTR: + x.Replacement = strings.ToLower(x.Replacement) + case *KX: + x.Exchanger = strings.ToLower(x.Exchanger) + case *SRV: + x.Target = strings.ToLower(x.Target) + case *DNAME: + x.Target = strings.ToLower(x.Target) + } + // 6.2. Canonical RR Form. (5) - origTTL + wire := make([]byte, r1.len()+1) // +1 to be safe(r) + off, err1 := PackRR(r1, wire, 0, nil, false) + if err1 != nil { + return nil, err1 + } + wire = wire[:off] + wires[i] = wire + } + sort.Sort(wires) + for i, wire := range wires { + if i > 0 && bytes.Equal(wire, wires[i-1]) { + continue + } + buf = append(buf, wire...) + } + return buf, nil +} + +func packSigWire(sw *rrsigWireFmt, msg []byte) (int, error) { + // copied from zmsg.go RRSIG packing + off, err := packUint16(sw.TypeCovered, msg, 0) + if err != nil { + return off, err + } + off, err = packUint8(sw.Algorithm, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(sw.Labels, msg, off) + if err != nil { + return off, err + } + off, err = packUint32(sw.OrigTtl, msg, off) + if err != nil { + return off, err + } + off, err = packUint32(sw.Expiration, msg, off) + if err != nil { + return off, err + } + off, err = packUint32(sw.Inception, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(sw.KeyTag, msg, off) + if err != nil { + return off, err + } + off, err = PackDomainName(sw.SignerName, msg, off, nil, false) + if err != nil { + return off, err + } + return off, nil +} + +func packKeyWire(dw *dnskeyWireFmt, msg []byte) (int, error) { + // copied from zmsg.go DNSKEY packing + off, err := packUint16(dw.Flags, msg, 0) + if err != nil { + return off, err + } + off, err = packUint8(dw.Protocol, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(dw.Algorithm, msg, off) + if err != nil { + return off, err + } + off, err = packStringBase64(dw.PublicKey, msg, off) + if err != nil { + return off, err + } + return off, nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/dnssec_keygen.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/dnssec_keygen.go new file mode 100644 index 000000000..33e913ac5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/dnssec_keygen.go @@ -0,0 +1,178 @@ +package dns + +import ( + "crypto" + "crypto/dsa" + "crypto/ecdsa" + "crypto/elliptic" + "crypto/rand" + "crypto/rsa" + "math/big" + + "golang.org/x/crypto/ed25519" +) + +// Generate generates a DNSKEY of the given bit size. +// The public part is put inside the DNSKEY record. +// The Algorithm in the key must be set as this will define +// what kind of DNSKEY will be generated. +// The ECDSA algorithms imply a fixed keysize, in that case +// bits should be set to the size of the algorithm. +func (k *DNSKEY) Generate(bits int) (crypto.PrivateKey, error) { + switch k.Algorithm { + case DSA, DSANSEC3SHA1: + if bits != 1024 { + return nil, ErrKeySize + } + case RSAMD5, RSASHA1, RSASHA256, RSASHA1NSEC3SHA1: + if bits < 512 || bits > 4096 { + return nil, ErrKeySize + } + case RSASHA512: + if bits < 1024 || bits > 4096 { + return nil, ErrKeySize + } + case ECDSAP256SHA256: + if bits != 256 { + return nil, ErrKeySize + } + case ECDSAP384SHA384: + if bits != 384 { + return nil, ErrKeySize + } + case ED25519: + if bits != 256 { + return nil, ErrKeySize + } + } + + switch k.Algorithm { + case DSA, DSANSEC3SHA1: + params := new(dsa.Parameters) + if err := dsa.GenerateParameters(params, rand.Reader, dsa.L1024N160); err != nil { + return nil, err + } + priv := new(dsa.PrivateKey) + priv.PublicKey.Parameters = *params + err := dsa.GenerateKey(priv, rand.Reader) + if err != nil { + return nil, err + } + k.setPublicKeyDSA(params.Q, params.P, params.G, priv.PublicKey.Y) + return priv, nil + case RSAMD5, RSASHA1, RSASHA256, RSASHA512, RSASHA1NSEC3SHA1: + priv, err := rsa.GenerateKey(rand.Reader, bits) + if err != nil { + return nil, err + } + k.setPublicKeyRSA(priv.PublicKey.E, priv.PublicKey.N) + return priv, nil + case ECDSAP256SHA256, ECDSAP384SHA384: + var c elliptic.Curve + switch k.Algorithm { + case ECDSAP256SHA256: + c = elliptic.P256() + case ECDSAP384SHA384: + c = elliptic.P384() + } + priv, err := ecdsa.GenerateKey(c, rand.Reader) + if err != nil { + return nil, err + } + k.setPublicKeyECDSA(priv.PublicKey.X, priv.PublicKey.Y) + return priv, nil + case ED25519: + pub, priv, err := ed25519.GenerateKey(rand.Reader) + if err != nil { + return nil, err + } + k.setPublicKeyED25519(pub) + return priv, nil + default: + return nil, ErrAlg + } +} + +// Set the public key (the value E and N) +func (k *DNSKEY) setPublicKeyRSA(_E int, _N *big.Int) bool { + if _E == 0 || _N == nil { + return false + } + buf := exponentToBuf(_E) + buf = append(buf, _N.Bytes()...) + k.PublicKey = toBase64(buf) + return true +} + +// Set the public key for Elliptic Curves +func (k *DNSKEY) setPublicKeyECDSA(_X, _Y *big.Int) bool { + if _X == nil || _Y == nil { + return false + } + var intlen int + switch k.Algorithm { + case ECDSAP256SHA256: + intlen = 32 + case ECDSAP384SHA384: + intlen = 48 + } + k.PublicKey = toBase64(curveToBuf(_X, _Y, intlen)) + return true +} + +// Set the public key for DSA +func (k *DNSKEY) setPublicKeyDSA(_Q, _P, _G, _Y *big.Int) bool { + if _Q == nil || _P == nil || _G == nil || _Y == nil { + return false + } + buf := dsaToBuf(_Q, _P, _G, _Y) + k.PublicKey = toBase64(buf) + return true +} + +// Set the public key for Ed25519 +func (k *DNSKEY) setPublicKeyED25519(_K ed25519.PublicKey) bool { + if _K == nil { + return false + } + k.PublicKey = toBase64(_K) + return true +} + +// Set the public key (the values E and N) for RSA +// RFC 3110: Section 2. RSA Public KEY Resource Records +func exponentToBuf(_E int) []byte { + var buf []byte + i := big.NewInt(int64(_E)).Bytes() + if len(i) < 256 { + buf = make([]byte, 1, 1+len(i)) + buf[0] = uint8(len(i)) + } else { + buf = make([]byte, 3, 3+len(i)) + buf[0] = 0 + buf[1] = uint8(len(i) >> 8) + buf[2] = uint8(len(i)) + } + buf = append(buf, i...) + return buf +} + +// Set the public key for X and Y for Curve. The two +// values are just concatenated. +func curveToBuf(_X, _Y *big.Int, intlen int) []byte { + buf := intToBytes(_X, intlen) + buf = append(buf, intToBytes(_Y, intlen)...) + return buf +} + +// Set the public key for X and Y for Curve. The two +// values are just concatenated. +func dsaToBuf(_Q, _P, _G, _Y *big.Int) []byte { + t := divRoundUp(divRoundUp(_G.BitLen(), 8)-64, 8) + buf := []byte{byte(t)} + buf = append(buf, intToBytes(_Q, 20)...) + buf = append(buf, intToBytes(_P, 64+t*8)...) + buf = append(buf, intToBytes(_G, 64+t*8)...) + buf = append(buf, intToBytes(_Y, 64+t*8)...) + return buf +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/dnssec_keyscan.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/dnssec_keyscan.go new file mode 100644 index 000000000..e2d9d8f92 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/dnssec_keyscan.go @@ -0,0 +1,297 @@ +package dns + +import ( + "bytes" + "crypto" + "crypto/dsa" + "crypto/ecdsa" + "crypto/rsa" + "io" + "math/big" + "strconv" + "strings" + + "golang.org/x/crypto/ed25519" +) + +// NewPrivateKey returns a PrivateKey by parsing the string s. +// s should be in the same form of the BIND private key files. +func (k *DNSKEY) NewPrivateKey(s string) (crypto.PrivateKey, error) { + if s == "" || s[len(s)-1] != '\n' { // We need a closing newline + return k.ReadPrivateKey(strings.NewReader(s+"\n"), "") + } + return k.ReadPrivateKey(strings.NewReader(s), "") +} + +// ReadPrivateKey reads a private key from the io.Reader q. The string file is +// only used in error reporting. +// The public key must be known, because some cryptographic algorithms embed +// the public inside the privatekey. +func (k *DNSKEY) ReadPrivateKey(q io.Reader, file string) (crypto.PrivateKey, error) { + m, err := parseKey(q, file) + if m == nil { + return nil, err + } + if _, ok := m["private-key-format"]; !ok { + return nil, ErrPrivKey + } + if m["private-key-format"] != "v1.2" && m["private-key-format"] != "v1.3" { + return nil, ErrPrivKey + } + // TODO(mg): check if the pubkey matches the private key + algo, err := strconv.ParseUint(strings.SplitN(m["algorithm"], " ", 2)[0], 10, 8) + if err != nil { + return nil, ErrPrivKey + } + switch uint8(algo) { + case DSA: + priv, err := readPrivateKeyDSA(m) + if err != nil { + return nil, err + } + pub := k.publicKeyDSA() + if pub == nil { + return nil, ErrKey + } + priv.PublicKey = *pub + return priv, nil + case RSAMD5: + fallthrough + case RSASHA1: + fallthrough + case RSASHA1NSEC3SHA1: + fallthrough + case RSASHA256: + fallthrough + case RSASHA512: + priv, err := readPrivateKeyRSA(m) + if err != nil { + return nil, err + } + pub := k.publicKeyRSA() + if pub == nil { + return nil, ErrKey + } + priv.PublicKey = *pub + return priv, nil + case ECCGOST: + return nil, ErrPrivKey + case ECDSAP256SHA256: + fallthrough + case ECDSAP384SHA384: + priv, err := readPrivateKeyECDSA(m) + if err != nil { + return nil, err + } + pub := k.publicKeyECDSA() + if pub == nil { + return nil, ErrKey + } + priv.PublicKey = *pub + return priv, nil + case ED25519: + return readPrivateKeyED25519(m) + default: + return nil, ErrPrivKey + } +} + +// Read a private key (file) string and create a public key. Return the private key. +func readPrivateKeyRSA(m map[string]string) (*rsa.PrivateKey, error) { + p := new(rsa.PrivateKey) + p.Primes = []*big.Int{nil, nil} + for k, v := range m { + switch k { + case "modulus", "publicexponent", "privateexponent", "prime1", "prime2": + v1, err := fromBase64([]byte(v)) + if err != nil { + return nil, err + } + switch k { + case "modulus": + p.PublicKey.N = big.NewInt(0) + p.PublicKey.N.SetBytes(v1) + case "publicexponent": + i := big.NewInt(0) + i.SetBytes(v1) + p.PublicKey.E = int(i.Int64()) // int64 should be large enough + case "privateexponent": + p.D = big.NewInt(0) + p.D.SetBytes(v1) + case "prime1": + p.Primes[0] = big.NewInt(0) + p.Primes[0].SetBytes(v1) + case "prime2": + p.Primes[1] = big.NewInt(0) + p.Primes[1].SetBytes(v1) + } + case "exponent1", "exponent2", "coefficient": + // not used in Go (yet) + case "created", "publish", "activate": + // not used in Go (yet) + } + } + return p, nil +} + +func readPrivateKeyDSA(m map[string]string) (*dsa.PrivateKey, error) { + p := new(dsa.PrivateKey) + p.X = big.NewInt(0) + for k, v := range m { + switch k { + case "private_value(x)": + v1, err := fromBase64([]byte(v)) + if err != nil { + return nil, err + } + p.X.SetBytes(v1) + case "created", "publish", "activate": + /* not used in Go (yet) */ + } + } + return p, nil +} + +func readPrivateKeyECDSA(m map[string]string) (*ecdsa.PrivateKey, error) { + p := new(ecdsa.PrivateKey) + p.D = big.NewInt(0) + // TODO: validate that the required flags are present + for k, v := range m { + switch k { + case "privatekey": + v1, err := fromBase64([]byte(v)) + if err != nil { + return nil, err + } + p.D.SetBytes(v1) + case "created", "publish", "activate": + /* not used in Go (yet) */ + } + } + return p, nil +} + +func readPrivateKeyED25519(m map[string]string) (ed25519.PrivateKey, error) { + var p ed25519.PrivateKey + // TODO: validate that the required flags are present + for k, v := range m { + switch k { + case "privatekey": + p1, err := fromBase64([]byte(v)) + if err != nil { + return nil, err + } + if len(p1) != 32 { + return nil, ErrPrivKey + } + // RFC 8080 and Golang's x/crypto/ed25519 differ as to how the + // private keys are represented. RFC 8080 specifies that private + // keys be stored solely as the seed value (p1 above) while the + // ed25519 package represents them as the seed value concatenated + // to the public key, which is derived from the seed value. + // + // ed25519.GenerateKey reads exactly 32 bytes from the passed in + // io.Reader and uses them as the seed. It also derives the + // public key and produces a compatible private key. + _, p, err = ed25519.GenerateKey(bytes.NewReader(p1)) + if err != nil { + return nil, err + } + case "created", "publish", "activate": + /* not used in Go (yet) */ + } + } + return p, nil +} + +// parseKey reads a private key from r. It returns a map[string]string, +// with the key-value pairs, or an error when the file is not correct. +func parseKey(r io.Reader, file string) (map[string]string, error) { + s, cancel := scanInit(r) + m := make(map[string]string) + c := make(chan lex) + k := "" + defer func() { + cancel() + // zlexer can send up to two tokens, the next one and possibly 1 remainders. + // Do a non-blocking read. + _, ok := <-c + _, ok = <-c + if !ok { + // too bad + } + }() + // Start the lexer + go klexer(s, c) + for l := range c { + // It should alternate + switch l.value { + case zKey: + k = l.token + case zValue: + if k == "" { + return nil, &ParseError{file, "no private key seen", l} + } + //println("Setting", strings.ToLower(k), "to", l.token, "b") + m[strings.ToLower(k)] = l.token + k = "" + } + } + return m, nil +} + +// klexer scans the sourcefile and returns tokens on the channel c. +func klexer(s *scan, c chan lex) { + var l lex + str := "" // Hold the current read text + commt := false + key := true + x, err := s.tokenText() + defer close(c) + for err == nil { + l.column = s.position.Column + l.line = s.position.Line + switch x { + case ':': + if commt { + break + } + l.token = str + if key { + l.value = zKey + c <- l + // Next token is a space, eat it + s.tokenText() + key = false + str = "" + } else { + l.value = zValue + } + case ';': + commt = true + case '\n': + if commt { + // Reset a comment + commt = false + } + l.value = zValue + l.token = str + c <- l + str = "" + commt = false + key = true + default: + if commt { + break + } + str += string(x) + } + x, err = s.tokenText() + } + if len(str) > 0 { + // Send remainder + l.token = str + l.value = zValue + c <- l + } +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/dnssec_privkey.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/dnssec_privkey.go new file mode 100644 index 000000000..46f3215c8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/dnssec_privkey.go @@ -0,0 +1,93 @@ +package dns + +import ( + "crypto" + "crypto/dsa" + "crypto/ecdsa" + "crypto/rsa" + "math/big" + "strconv" + + "golang.org/x/crypto/ed25519" +) + +const format = "Private-key-format: v1.3\n" + +// PrivateKeyString converts a PrivateKey to a string. This string has the same +// format as the private-key-file of BIND9 (Private-key-format: v1.3). +// It needs some info from the key (the algorithm), so its a method of the DNSKEY +// It supports rsa.PrivateKey, ecdsa.PrivateKey and dsa.PrivateKey +func (r *DNSKEY) PrivateKeyString(p crypto.PrivateKey) string { + algorithm := strconv.Itoa(int(r.Algorithm)) + algorithm += " (" + AlgorithmToString[r.Algorithm] + ")" + + switch p := p.(type) { + case *rsa.PrivateKey: + modulus := toBase64(p.PublicKey.N.Bytes()) + e := big.NewInt(int64(p.PublicKey.E)) + publicExponent := toBase64(e.Bytes()) + privateExponent := toBase64(p.D.Bytes()) + prime1 := toBase64(p.Primes[0].Bytes()) + prime2 := toBase64(p.Primes[1].Bytes()) + // Calculate Exponent1/2 and Coefficient as per: http://en.wikipedia.org/wiki/RSA#Using_the_Chinese_remainder_algorithm + // and from: http://code.google.com/p/go/issues/detail?id=987 + one := big.NewInt(1) + p1 := big.NewInt(0).Sub(p.Primes[0], one) + q1 := big.NewInt(0).Sub(p.Primes[1], one) + exp1 := big.NewInt(0).Mod(p.D, p1) + exp2 := big.NewInt(0).Mod(p.D, q1) + coeff := big.NewInt(0).ModInverse(p.Primes[1], p.Primes[0]) + + exponent1 := toBase64(exp1.Bytes()) + exponent2 := toBase64(exp2.Bytes()) + coefficient := toBase64(coeff.Bytes()) + + return format + + "Algorithm: " + algorithm + "\n" + + "Modulus: " + modulus + "\n" + + "PublicExponent: " + publicExponent + "\n" + + "PrivateExponent: " + privateExponent + "\n" + + "Prime1: " + prime1 + "\n" + + "Prime2: " + prime2 + "\n" + + "Exponent1: " + exponent1 + "\n" + + "Exponent2: " + exponent2 + "\n" + + "Coefficient: " + coefficient + "\n" + + case *ecdsa.PrivateKey: + var intlen int + switch r.Algorithm { + case ECDSAP256SHA256: + intlen = 32 + case ECDSAP384SHA384: + intlen = 48 + } + private := toBase64(intToBytes(p.D, intlen)) + return format + + "Algorithm: " + algorithm + "\n" + + "PrivateKey: " + private + "\n" + + case *dsa.PrivateKey: + T := divRoundUp(divRoundUp(p.PublicKey.Parameters.G.BitLen(), 8)-64, 8) + prime := toBase64(intToBytes(p.PublicKey.Parameters.P, 64+T*8)) + subprime := toBase64(intToBytes(p.PublicKey.Parameters.Q, 20)) + base := toBase64(intToBytes(p.PublicKey.Parameters.G, 64+T*8)) + priv := toBase64(intToBytes(p.X, 20)) + pub := toBase64(intToBytes(p.PublicKey.Y, 64+T*8)) + return format + + "Algorithm: " + algorithm + "\n" + + "Prime(p): " + prime + "\n" + + "Subprime(q): " + subprime + "\n" + + "Base(g): " + base + "\n" + + "Private_value(x): " + priv + "\n" + + "Public_value(y): " + pub + "\n" + + case ed25519.PrivateKey: + private := toBase64(p[:32]) + return format + + "Algorithm: " + algorithm + "\n" + + "PrivateKey: " + private + "\n" + + default: + return "" + } +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/doc.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/doc.go new file mode 100644 index 000000000..1d8114744 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/doc.go @@ -0,0 +1,272 @@ +/* +Package dns implements a full featured interface to the Domain Name System. +Server- and client-side programming is supported. +The package allows complete control over what is sent out to the DNS. The package +API follows the less-is-more principle, by presenting a small, clean interface. + +The package dns supports (asynchronous) querying/replying, incoming/outgoing zone transfers, +TSIG, EDNS0, dynamic updates, notifies and DNSSEC validation/signing. +Note that domain names MUST be fully qualified, before sending them, unqualified +names in a message will result in a packing failure. + +Resource records are native types. They are not stored in wire format. +Basic usage pattern for creating a new resource record: + + r := new(dns.MX) + r.Hdr = dns.RR_Header{Name: "miek.nl.", Rrtype: dns.TypeMX, + Class: dns.ClassINET, Ttl: 3600} + r.Preference = 10 + r.Mx = "mx.miek.nl." + +Or directly from a string: + + mx, err := dns.NewRR("miek.nl. 3600 IN MX 10 mx.miek.nl.") + +Or when the default origin (.) and TTL (3600) and class (IN) suit you: + + mx, err := dns.NewRR("miek.nl MX 10 mx.miek.nl") + +Or even: + + mx, err := dns.NewRR("$ORIGIN nl.\nmiek 1H IN MX 10 mx.miek") + +In the DNS messages are exchanged, these messages contain resource +records (sets). Use pattern for creating a message: + + m := new(dns.Msg) + m.SetQuestion("miek.nl.", dns.TypeMX) + +Or when not certain if the domain name is fully qualified: + + m.SetQuestion(dns.Fqdn("miek.nl"), dns.TypeMX) + +The message m is now a message with the question section set to ask +the MX records for the miek.nl. zone. + +The following is slightly more verbose, but more flexible: + + m1 := new(dns.Msg) + m1.Id = dns.Id() + m1.RecursionDesired = true + m1.Question = make([]dns.Question, 1) + m1.Question[0] = dns.Question{"miek.nl.", dns.TypeMX, dns.ClassINET} + +After creating a message it can be sent. +Basic use pattern for synchronous querying the DNS at a +server configured on 127.0.0.1 and port 53: + + c := new(dns.Client) + in, rtt, err := c.Exchange(m1, "127.0.0.1:53") + +Suppressing multiple outstanding queries (with the same question, type and +class) is as easy as setting: + + c.SingleInflight = true + +More advanced options are available using a net.Dialer and the corresponding API. +For example it is possible to set a timeout, or to specify a source IP address +and port to use for the connection: + + c := new(dns.Client) + laddr := net.UDPAddr{ + IP: net.ParseIP("[::1]"), + Port: 12345, + Zone: "", + } + d := net.Dialer{ + Timeout: 200 * time.Millisecond, + LocalAddr: &laddr, + } + in, rtt, err := c.ExchangeWithDialer(&d, m1, "8.8.8.8:53") + +If these "advanced" features are not needed, a simple UDP query can be sent, +with: + + in, err := dns.Exchange(m1, "127.0.0.1:53") + +When this functions returns you will get dns message. A dns message consists +out of four sections. +The question section: in.Question, the answer section: in.Answer, +the authority section: in.Ns and the additional section: in.Extra. + +Each of these sections (except the Question section) contain a []RR. Basic +use pattern for accessing the rdata of a TXT RR as the first RR in +the Answer section: + + if t, ok := in.Answer[0].(*dns.TXT); ok { + // do something with t.Txt + } + +Domain Name and TXT Character String Representations + +Both domain names and TXT character strings are converted to presentation +form both when unpacked and when converted to strings. + +For TXT character strings, tabs, carriage returns and line feeds will be +converted to \t, \r and \n respectively. Back slashes and quotations marks +will be escaped. Bytes below 32 and above 127 will be converted to \DDD +form. + +For domain names, in addition to the above rules brackets, periods, +spaces, semicolons and the at symbol are escaped. + +DNSSEC + +DNSSEC (DNS Security Extension) adds a layer of security to the DNS. It +uses public key cryptography to sign resource records. The +public keys are stored in DNSKEY records and the signatures in RRSIG records. + +Requesting DNSSEC information for a zone is done by adding the DO (DNSSEC OK) bit +to a request. + + m := new(dns.Msg) + m.SetEdns0(4096, true) + +Signature generation, signature verification and key generation are all supported. + +DYNAMIC UPDATES + +Dynamic updates reuses the DNS message format, but renames three of +the sections. Question is Zone, Answer is Prerequisite, Authority is +Update, only the Additional is not renamed. See RFC 2136 for the gory details. + +You can set a rather complex set of rules for the existence of absence of +certain resource records or names in a zone to specify if resource records +should be added or removed. The table from RFC 2136 supplemented with the Go +DNS function shows which functions exist to specify the prerequisites. + + 3.2.4 - Table Of Metavalues Used In Prerequisite Section + + CLASS TYPE RDATA Meaning Function + -------------------------------------------------------------- + ANY ANY empty Name is in use dns.NameUsed + ANY rrset empty RRset exists (value indep) dns.RRsetUsed + NONE ANY empty Name is not in use dns.NameNotUsed + NONE rrset empty RRset does not exist dns.RRsetNotUsed + zone rrset rr RRset exists (value dep) dns.Used + +The prerequisite section can also be left empty. +If you have decided on the prerequisites you can tell what RRs should +be added or deleted. The next table shows the options you have and +what functions to call. + + 3.4.2.6 - Table Of Metavalues Used In Update Section + + CLASS TYPE RDATA Meaning Function + --------------------------------------------------------------- + ANY ANY empty Delete all RRsets from name dns.RemoveName + ANY rrset empty Delete an RRset dns.RemoveRRset + NONE rrset rr Delete an RR from RRset dns.Remove + zone rrset rr Add to an RRset dns.Insert + +TRANSACTION SIGNATURE + +An TSIG or transaction signature adds a HMAC TSIG record to each message sent. +The supported algorithms include: HmacMD5, HmacSHA1, HmacSHA256 and HmacSHA512. + +Basic use pattern when querying with a TSIG name "axfr." (note that these key names +must be fully qualified - as they are domain names) and the base64 secret +"so6ZGir4GPAqINNh9U5c3A==": + +If an incoming message contains a TSIG record it MUST be the last record in +the additional section (RFC2845 3.2). This means that you should make the +call to SetTsig last, right before executing the query. If you make any +changes to the RRset after calling SetTsig() the signature will be incorrect. + + c := new(dns.Client) + c.TsigSecret = map[string]string{"axfr.": "so6ZGir4GPAqINNh9U5c3A=="} + m := new(dns.Msg) + m.SetQuestion("miek.nl.", dns.TypeMX) + m.SetTsig("axfr.", dns.HmacMD5, 300, time.Now().Unix()) + ... + // When sending the TSIG RR is calculated and filled in before sending + +When requesting an zone transfer (almost all TSIG usage is when requesting zone transfers), with +TSIG, this is the basic use pattern. In this example we request an AXFR for +miek.nl. with TSIG key named "axfr." and secret "so6ZGir4GPAqINNh9U5c3A==" +and using the server 176.58.119.54: + + t := new(dns.Transfer) + m := new(dns.Msg) + t.TsigSecret = map[string]string{"axfr.": "so6ZGir4GPAqINNh9U5c3A=="} + m.SetAxfr("miek.nl.") + m.SetTsig("axfr.", dns.HmacMD5, 300, time.Now().Unix()) + c, err := t.In(m, "176.58.119.54:53") + for r := range c { ... } + +You can now read the records from the transfer as they come in. Each envelope is checked with TSIG. +If something is not correct an error is returned. + +Basic use pattern validating and replying to a message that has TSIG set. + + server := &dns.Server{Addr: ":53", Net: "udp"} + server.TsigSecret = map[string]string{"axfr.": "so6ZGir4GPAqINNh9U5c3A=="} + go server.ListenAndServe() + dns.HandleFunc(".", handleRequest) + + func handleRequest(w dns.ResponseWriter, r *dns.Msg) { + m := new(dns.Msg) + m.SetReply(r) + if r.IsTsig() != nil { + if w.TsigStatus() == nil { + // *Msg r has an TSIG record and it was validated + m.SetTsig("axfr.", dns.HmacMD5, 300, time.Now().Unix()) + } else { + // *Msg r has an TSIG records and it was not valided + } + } + w.WriteMsg(m) + } + +PRIVATE RRS + +RFC 6895 sets aside a range of type codes for private use. This range +is 65,280 - 65,534 (0xFF00 - 0xFFFE). When experimenting with new Resource Records these +can be used, before requesting an official type code from IANA. + +see http://miek.nl/2014/September/21/idn-and-private-rr-in-go-dns/ for more +information. + +EDNS0 + +EDNS0 is an extension mechanism for the DNS defined in RFC 2671 and updated +by RFC 6891. It defines an new RR type, the OPT RR, which is then completely +abused. +Basic use pattern for creating an (empty) OPT RR: + + o := new(dns.OPT) + o.Hdr.Name = "." // MUST be the root zone, per definition. + o.Hdr.Rrtype = dns.TypeOPT + +The rdata of an OPT RR consists out of a slice of EDNS0 (RFC 6891) +interfaces. Currently only a few have been standardized: EDNS0_NSID +(RFC 5001) and EDNS0_SUBNET (draft-vandergaast-edns-client-subnet-02). Note +that these options may be combined in an OPT RR. +Basic use pattern for a server to check if (and which) options are set: + + // o is a dns.OPT + for _, s := range o.Option { + switch e := s.(type) { + case *dns.EDNS0_NSID: + // do stuff with e.Nsid + case *dns.EDNS0_SUBNET: + // access e.Family, e.Address, etc. + } + } + +SIG(0) + +From RFC 2931: + + SIG(0) provides protection for DNS transactions and requests .... + ... protection for glue records, DNS requests, protection for message headers + on requests and responses, and protection of the overall integrity of a response. + +It works like TSIG, except that SIG(0) uses public key cryptography, instead of the shared +secret approach in TSIG. +Supported algorithms: DSA, ECDSAP256SHA256, ECDSAP384SHA384, RSASHA1, RSASHA256 and +RSASHA512. + +Signing subsequent messages in multi-message sessions is not implemented. +*/ +package dns diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/edns.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/edns.go new file mode 100644 index 000000000..6f9d2ea39 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/edns.go @@ -0,0 +1,627 @@ +package dns + +import ( + "encoding/binary" + "encoding/hex" + "errors" + "fmt" + "net" + "strconv" +) + +// EDNS0 Option codes. +const ( + EDNS0LLQ = 0x1 // long lived queries: http://tools.ietf.org/html/draft-sekar-dns-llq-01 + EDNS0UL = 0x2 // update lease draft: http://files.dns-sd.org/draft-sekar-dns-ul.txt + EDNS0NSID = 0x3 // nsid (See RFC 5001) + EDNS0DAU = 0x5 // DNSSEC Algorithm Understood + EDNS0DHU = 0x6 // DS Hash Understood + EDNS0N3U = 0x7 // NSEC3 Hash Understood + EDNS0SUBNET = 0x8 // client-subnet (See RFC 7871) + EDNS0EXPIRE = 0x9 // EDNS0 expire + EDNS0COOKIE = 0xa // EDNS0 Cookie + EDNS0TCPKEEPALIVE = 0xb // EDNS0 tcp keep alive (See RFC 7828) + EDNS0PADDING = 0xc // EDNS0 padding (See RFC 7830) + EDNS0LOCALSTART = 0xFDE9 // Beginning of range reserved for local/experimental use (See RFC 6891) + EDNS0LOCALEND = 0xFFFE // End of range reserved for local/experimental use (See RFC 6891) + _DO = 1 << 15 // DNSSEC OK +) + +// OPT is the EDNS0 RR appended to messages to convey extra (meta) information. +// See RFC 6891. +type OPT struct { + Hdr RR_Header + Option []EDNS0 `dns:"opt"` +} + +func (rr *OPT) String() string { + s := "\n;; OPT PSEUDOSECTION:\n; EDNS: version " + strconv.Itoa(int(rr.Version())) + "; " + if rr.Do() { + s += "flags: do; " + } else { + s += "flags: ; " + } + s += "udp: " + strconv.Itoa(int(rr.UDPSize())) + + for _, o := range rr.Option { + switch o.(type) { + case *EDNS0_NSID: + s += "\n; NSID: " + o.String() + h, e := o.pack() + var r string + if e == nil { + for _, c := range h { + r += "(" + string(c) + ")" + } + s += " " + r + } + case *EDNS0_SUBNET: + s += "\n; SUBNET: " + o.String() + case *EDNS0_COOKIE: + s += "\n; COOKIE: " + o.String() + case *EDNS0_UL: + s += "\n; UPDATE LEASE: " + o.String() + case *EDNS0_LLQ: + s += "\n; LONG LIVED QUERIES: " + o.String() + case *EDNS0_DAU: + s += "\n; DNSSEC ALGORITHM UNDERSTOOD: " + o.String() + case *EDNS0_DHU: + s += "\n; DS HASH UNDERSTOOD: " + o.String() + case *EDNS0_N3U: + s += "\n; NSEC3 HASH UNDERSTOOD: " + o.String() + case *EDNS0_LOCAL: + s += "\n; LOCAL OPT: " + o.String() + case *EDNS0_PADDING: + s += "\n; PADDING: " + o.String() + } + } + return s +} + +func (rr *OPT) len() int { + l := rr.Hdr.len() + for i := 0; i < len(rr.Option); i++ { + l += 4 // Account for 2-byte option code and 2-byte option length. + lo, _ := rr.Option[i].pack() + l += len(lo) + } + return l +} + +// return the old value -> delete SetVersion? + +// Version returns the EDNS version used. Only zero is defined. +func (rr *OPT) Version() uint8 { + return uint8((rr.Hdr.Ttl & 0x00FF0000) >> 16) +} + +// SetVersion sets the version of EDNS. This is usually zero. +func (rr *OPT) SetVersion(v uint8) { + rr.Hdr.Ttl = rr.Hdr.Ttl&0xFF00FFFF | (uint32(v) << 16) +} + +// ExtendedRcode returns the EDNS extended RCODE field (the upper 8 bits of the TTL). +func (rr *OPT) ExtendedRcode() int { + return int((rr.Hdr.Ttl & 0xFF000000) >> 24) +} + +// SetExtendedRcode sets the EDNS extended RCODE field. +func (rr *OPT) SetExtendedRcode(v uint8) { + rr.Hdr.Ttl = rr.Hdr.Ttl&0x00FFFFFF | (uint32(v) << 24) +} + +// UDPSize returns the UDP buffer size. +func (rr *OPT) UDPSize() uint16 { + return rr.Hdr.Class +} + +// SetUDPSize sets the UDP buffer size. +func (rr *OPT) SetUDPSize(size uint16) { + rr.Hdr.Class = size +} + +// Do returns the value of the DO (DNSSEC OK) bit. +func (rr *OPT) Do() bool { + return rr.Hdr.Ttl&_DO == _DO +} + +// SetDo sets the DO (DNSSEC OK) bit. +// If we pass an argument, set the DO bit to that value. +// It is possible to pass 2 or more arguments. Any arguments after the 1st is silently ignored. +func (rr *OPT) SetDo(do ...bool) { + if len(do) == 1 { + if do[0] { + rr.Hdr.Ttl |= _DO + } else { + rr.Hdr.Ttl &^= _DO + } + } else { + rr.Hdr.Ttl |= _DO + } +} + +// EDNS0 defines an EDNS0 Option. An OPT RR can have multiple options appended to it. +type EDNS0 interface { + // Option returns the option code for the option. + Option() uint16 + // pack returns the bytes of the option data. + pack() ([]byte, error) + // unpack sets the data as found in the buffer. Is also sets + // the length of the slice as the length of the option data. + unpack([]byte) error + // String returns the string representation of the option. + String() string +} + +// EDNS0_NSID option is used to retrieve a nameserver +// identifier. When sending a request Nsid must be set to the empty string +// The identifier is an opaque string encoded as hex. +// Basic use pattern for creating an nsid option: +// +// o := new(dns.OPT) +// o.Hdr.Name = "." +// o.Hdr.Rrtype = dns.TypeOPT +// e := new(dns.EDNS0_NSID) +// e.Code = dns.EDNS0NSID +// e.Nsid = "AA" +// o.Option = append(o.Option, e) +type EDNS0_NSID struct { + Code uint16 // Always EDNS0NSID + Nsid string // This string needs to be hex encoded +} + +func (e *EDNS0_NSID) pack() ([]byte, error) { + h, err := hex.DecodeString(e.Nsid) + if err != nil { + return nil, err + } + return h, nil +} + +// Option implements the EDNS0 interface. +func (e *EDNS0_NSID) Option() uint16 { return EDNS0NSID } // Option returns the option code. +func (e *EDNS0_NSID) unpack(b []byte) error { e.Nsid = hex.EncodeToString(b); return nil } +func (e *EDNS0_NSID) String() string { return string(e.Nsid) } + +// EDNS0_SUBNET is the subnet option that is used to give the remote nameserver +// an idea of where the client lives. See RFC 7871. It can then give back a different +// answer depending on the location or network topology. +// Basic use pattern for creating an subnet option: +// +// o := new(dns.OPT) +// o.Hdr.Name = "." +// o.Hdr.Rrtype = dns.TypeOPT +// e := new(dns.EDNS0_SUBNET) +// e.Code = dns.EDNS0SUBNET +// e.Family = 1 // 1 for IPv4 source address, 2 for IPv6 +// e.SourceNetmask = 32 // 32 for IPV4, 128 for IPv6 +// e.SourceScope = 0 +// e.Address = net.ParseIP("127.0.0.1").To4() // for IPv4 +// // e.Address = net.ParseIP("2001:7b8:32a::2") // for IPV6 +// o.Option = append(o.Option, e) +// +// This code will parse all the available bits when unpacking (up to optlen). +// When packing it will apply SourceNetmask. If you need more advanced logic, +// patches welcome and good luck. +type EDNS0_SUBNET struct { + Code uint16 // Always EDNS0SUBNET + Family uint16 // 1 for IP, 2 for IP6 + SourceNetmask uint8 + SourceScope uint8 + Address net.IP +} + +// Option implements the EDNS0 interface. +func (e *EDNS0_SUBNET) Option() uint16 { return EDNS0SUBNET } + +func (e *EDNS0_SUBNET) pack() ([]byte, error) { + b := make([]byte, 4) + binary.BigEndian.PutUint16(b[0:], e.Family) + b[2] = e.SourceNetmask + b[3] = e.SourceScope + switch e.Family { + case 0: + // "dig" sets AddressFamily to 0 if SourceNetmask is also 0 + // We might don't need to complain either + if e.SourceNetmask != 0 { + return nil, errors.New("dns: bad address family") + } + case 1: + if e.SourceNetmask > net.IPv4len*8 { + return nil, errors.New("dns: bad netmask") + } + if len(e.Address.To4()) != net.IPv4len { + return nil, errors.New("dns: bad address") + } + ip := e.Address.To4().Mask(net.CIDRMask(int(e.SourceNetmask), net.IPv4len*8)) + needLength := (e.SourceNetmask + 8 - 1) / 8 // division rounding up + b = append(b, ip[:needLength]...) + case 2: + if e.SourceNetmask > net.IPv6len*8 { + return nil, errors.New("dns: bad netmask") + } + if len(e.Address) != net.IPv6len { + return nil, errors.New("dns: bad address") + } + ip := e.Address.Mask(net.CIDRMask(int(e.SourceNetmask), net.IPv6len*8)) + needLength := (e.SourceNetmask + 8 - 1) / 8 // division rounding up + b = append(b, ip[:needLength]...) + default: + return nil, errors.New("dns: bad address family") + } + return b, nil +} + +func (e *EDNS0_SUBNET) unpack(b []byte) error { + if len(b) < 4 { + return ErrBuf + } + e.Family = binary.BigEndian.Uint16(b) + e.SourceNetmask = b[2] + e.SourceScope = b[3] + switch e.Family { + case 0: + // "dig" sets AddressFamily to 0 if SourceNetmask is also 0 + // It's okay to accept such a packet + if e.SourceNetmask != 0 { + return errors.New("dns: bad address family") + } + e.Address = net.IPv4(0, 0, 0, 0) + case 1: + if e.SourceNetmask > net.IPv4len*8 || e.SourceScope > net.IPv4len*8 { + return errors.New("dns: bad netmask") + } + addr := make([]byte, net.IPv4len) + for i := 0; i < net.IPv4len && 4+i < len(b); i++ { + addr[i] = b[4+i] + } + e.Address = net.IPv4(addr[0], addr[1], addr[2], addr[3]) + case 2: + if e.SourceNetmask > net.IPv6len*8 || e.SourceScope > net.IPv6len*8 { + return errors.New("dns: bad netmask") + } + addr := make([]byte, net.IPv6len) + for i := 0; i < net.IPv6len && 4+i < len(b); i++ { + addr[i] = b[4+i] + } + e.Address = net.IP{addr[0], addr[1], addr[2], addr[3], addr[4], + addr[5], addr[6], addr[7], addr[8], addr[9], addr[10], + addr[11], addr[12], addr[13], addr[14], addr[15]} + default: + return errors.New("dns: bad address family") + } + return nil +} + +func (e *EDNS0_SUBNET) String() (s string) { + if e.Address == nil { + s = "" + } else if e.Address.To4() != nil { + s = e.Address.String() + } else { + s = "[" + e.Address.String() + "]" + } + s += "/" + strconv.Itoa(int(e.SourceNetmask)) + "/" + strconv.Itoa(int(e.SourceScope)) + return +} + +// The EDNS0_COOKIE option is used to add a DNS Cookie to a message. +// +// o := new(dns.OPT) +// o.Hdr.Name = "." +// o.Hdr.Rrtype = dns.TypeOPT +// e := new(dns.EDNS0_COOKIE) +// e.Code = dns.EDNS0COOKIE +// e.Cookie = "24a5ac.." +// o.Option = append(o.Option, e) +// +// The Cookie field consists out of a client cookie (RFC 7873 Section 4), that is +// always 8 bytes. It may then optionally be followed by the server cookie. The server +// cookie is of variable length, 8 to a maximum of 32 bytes. In other words: +// +// cCookie := o.Cookie[:16] +// sCookie := o.Cookie[16:] +// +// There is no guarantee that the Cookie string has a specific length. +type EDNS0_COOKIE struct { + Code uint16 // Always EDNS0COOKIE + Cookie string // Hex-encoded cookie data +} + +func (e *EDNS0_COOKIE) pack() ([]byte, error) { + h, err := hex.DecodeString(e.Cookie) + if err != nil { + return nil, err + } + return h, nil +} + +// Option implements the EDNS0 interface. +func (e *EDNS0_COOKIE) Option() uint16 { return EDNS0COOKIE } +func (e *EDNS0_COOKIE) unpack(b []byte) error { e.Cookie = hex.EncodeToString(b); return nil } +func (e *EDNS0_COOKIE) String() string { return e.Cookie } + +// The EDNS0_UL (Update Lease) (draft RFC) option is used to tell the server to set +// an expiration on an update RR. This is helpful for clients that cannot clean +// up after themselves. This is a draft RFC and more information can be found at +// http://files.dns-sd.org/draft-sekar-dns-ul.txt +// +// o := new(dns.OPT) +// o.Hdr.Name = "." +// o.Hdr.Rrtype = dns.TypeOPT +// e := new(dns.EDNS0_UL) +// e.Code = dns.EDNS0UL +// e.Lease = 120 // in seconds +// o.Option = append(o.Option, e) +type EDNS0_UL struct { + Code uint16 // Always EDNS0UL + Lease uint32 +} + +// Option implements the EDNS0 interface. +func (e *EDNS0_UL) Option() uint16 { return EDNS0UL } +func (e *EDNS0_UL) String() string { return strconv.FormatUint(uint64(e.Lease), 10) } + +// Copied: http://golang.org/src/pkg/net/dnsmsg.go +func (e *EDNS0_UL) pack() ([]byte, error) { + b := make([]byte, 4) + binary.BigEndian.PutUint32(b, e.Lease) + return b, nil +} + +func (e *EDNS0_UL) unpack(b []byte) error { + if len(b) < 4 { + return ErrBuf + } + e.Lease = binary.BigEndian.Uint32(b) + return nil +} + +// EDNS0_LLQ stands for Long Lived Queries: http://tools.ietf.org/html/draft-sekar-dns-llq-01 +// Implemented for completeness, as the EDNS0 type code is assigned. +type EDNS0_LLQ struct { + Code uint16 // Always EDNS0LLQ + Version uint16 + Opcode uint16 + Error uint16 + Id uint64 + LeaseLife uint32 +} + +// Option implements the EDNS0 interface. +func (e *EDNS0_LLQ) Option() uint16 { return EDNS0LLQ } + +func (e *EDNS0_LLQ) pack() ([]byte, error) { + b := make([]byte, 18) + binary.BigEndian.PutUint16(b[0:], e.Version) + binary.BigEndian.PutUint16(b[2:], e.Opcode) + binary.BigEndian.PutUint16(b[4:], e.Error) + binary.BigEndian.PutUint64(b[6:], e.Id) + binary.BigEndian.PutUint32(b[14:], e.LeaseLife) + return b, nil +} + +func (e *EDNS0_LLQ) unpack(b []byte) error { + if len(b) < 18 { + return ErrBuf + } + e.Version = binary.BigEndian.Uint16(b[0:]) + e.Opcode = binary.BigEndian.Uint16(b[2:]) + e.Error = binary.BigEndian.Uint16(b[4:]) + e.Id = binary.BigEndian.Uint64(b[6:]) + e.LeaseLife = binary.BigEndian.Uint32(b[14:]) + return nil +} + +func (e *EDNS0_LLQ) String() string { + s := strconv.FormatUint(uint64(e.Version), 10) + " " + strconv.FormatUint(uint64(e.Opcode), 10) + + " " + strconv.FormatUint(uint64(e.Error), 10) + " " + strconv.FormatUint(uint64(e.Id), 10) + + " " + strconv.FormatUint(uint64(e.LeaseLife), 10) + return s +} + +// EDNS0_DUA implements the EDNS0 "DNSSEC Algorithm Understood" option. See RFC 6975. +type EDNS0_DAU struct { + Code uint16 // Always EDNS0DAU + AlgCode []uint8 +} + +// Option implements the EDNS0 interface. +func (e *EDNS0_DAU) Option() uint16 { return EDNS0DAU } +func (e *EDNS0_DAU) pack() ([]byte, error) { return e.AlgCode, nil } +func (e *EDNS0_DAU) unpack(b []byte) error { e.AlgCode = b; return nil } + +func (e *EDNS0_DAU) String() string { + s := "" + for i := 0; i < len(e.AlgCode); i++ { + if a, ok := AlgorithmToString[e.AlgCode[i]]; ok { + s += " " + a + } else { + s += " " + strconv.Itoa(int(e.AlgCode[i])) + } + } + return s +} + +// EDNS0_DHU implements the EDNS0 "DS Hash Understood" option. See RFC 6975. +type EDNS0_DHU struct { + Code uint16 // Always EDNS0DHU + AlgCode []uint8 +} + +// Option implements the EDNS0 interface. +func (e *EDNS0_DHU) Option() uint16 { return EDNS0DHU } +func (e *EDNS0_DHU) pack() ([]byte, error) { return e.AlgCode, nil } +func (e *EDNS0_DHU) unpack(b []byte) error { e.AlgCode = b; return nil } + +func (e *EDNS0_DHU) String() string { + s := "" + for i := 0; i < len(e.AlgCode); i++ { + if a, ok := HashToString[e.AlgCode[i]]; ok { + s += " " + a + } else { + s += " " + strconv.Itoa(int(e.AlgCode[i])) + } + } + return s +} + +// EDNS0_N3U implements the EDNS0 "NSEC3 Hash Understood" option. See RFC 6975. +type EDNS0_N3U struct { + Code uint16 // Always EDNS0N3U + AlgCode []uint8 +} + +// Option implements the EDNS0 interface. +func (e *EDNS0_N3U) Option() uint16 { return EDNS0N3U } +func (e *EDNS0_N3U) pack() ([]byte, error) { return e.AlgCode, nil } +func (e *EDNS0_N3U) unpack(b []byte) error { e.AlgCode = b; return nil } + +func (e *EDNS0_N3U) String() string { + // Re-use the hash map + s := "" + for i := 0; i < len(e.AlgCode); i++ { + if a, ok := HashToString[e.AlgCode[i]]; ok { + s += " " + a + } else { + s += " " + strconv.Itoa(int(e.AlgCode[i])) + } + } + return s +} + +// EDNS0_EXPIRE implementes the EDNS0 option as described in RFC 7314. +type EDNS0_EXPIRE struct { + Code uint16 // Always EDNS0EXPIRE + Expire uint32 +} + +// Option implements the EDNS0 interface. +func (e *EDNS0_EXPIRE) Option() uint16 { return EDNS0EXPIRE } +func (e *EDNS0_EXPIRE) String() string { return strconv.FormatUint(uint64(e.Expire), 10) } + +func (e *EDNS0_EXPIRE) pack() ([]byte, error) { + b := make([]byte, 4) + b[0] = byte(e.Expire >> 24) + b[1] = byte(e.Expire >> 16) + b[2] = byte(e.Expire >> 8) + b[3] = byte(e.Expire) + return b, nil +} + +func (e *EDNS0_EXPIRE) unpack(b []byte) error { + if len(b) < 4 { + return ErrBuf + } + e.Expire = binary.BigEndian.Uint32(b) + return nil +} + +// The EDNS0_LOCAL option is used for local/experimental purposes. The option +// code is recommended to be within the range [EDNS0LOCALSTART, EDNS0LOCALEND] +// (RFC6891), although any unassigned code can actually be used. The content of +// the option is made available in Data, unaltered. +// Basic use pattern for creating a local option: +// +// o := new(dns.OPT) +// o.Hdr.Name = "." +// o.Hdr.Rrtype = dns.TypeOPT +// e := new(dns.EDNS0_LOCAL) +// e.Code = dns.EDNS0LOCALSTART +// e.Data = []byte{72, 82, 74} +// o.Option = append(o.Option, e) +type EDNS0_LOCAL struct { + Code uint16 + Data []byte +} + +// Option implements the EDNS0 interface. +func (e *EDNS0_LOCAL) Option() uint16 { return e.Code } +func (e *EDNS0_LOCAL) String() string { + return strconv.FormatInt(int64(e.Code), 10) + ":0x" + hex.EncodeToString(e.Data) +} + +func (e *EDNS0_LOCAL) pack() ([]byte, error) { + b := make([]byte, len(e.Data)) + copied := copy(b, e.Data) + if copied != len(e.Data) { + return nil, ErrBuf + } + return b, nil +} + +func (e *EDNS0_LOCAL) unpack(b []byte) error { + e.Data = make([]byte, len(b)) + copied := copy(e.Data, b) + if copied != len(b) { + return ErrBuf + } + return nil +} + +// EDNS0_TCP_KEEPALIVE is an EDNS0 option that instructs the server to keep +// the TCP connection alive. See RFC 7828. +type EDNS0_TCP_KEEPALIVE struct { + Code uint16 // Always EDNSTCPKEEPALIVE + Length uint16 // the value 0 if the TIMEOUT is omitted, the value 2 if it is present; + Timeout uint16 // an idle timeout value for the TCP connection, specified in units of 100 milliseconds, encoded in network byte order. +} + +// Option implements the EDNS0 interface. +func (e *EDNS0_TCP_KEEPALIVE) Option() uint16 { return EDNS0TCPKEEPALIVE } + +func (e *EDNS0_TCP_KEEPALIVE) pack() ([]byte, error) { + if e.Timeout != 0 && e.Length != 2 { + return nil, errors.New("dns: timeout specified but length is not 2") + } + if e.Timeout == 0 && e.Length != 0 { + return nil, errors.New("dns: timeout not specified but length is not 0") + } + b := make([]byte, 4+e.Length) + binary.BigEndian.PutUint16(b[0:], e.Code) + binary.BigEndian.PutUint16(b[2:], e.Length) + if e.Length == 2 { + binary.BigEndian.PutUint16(b[4:], e.Timeout) + } + return b, nil +} + +func (e *EDNS0_TCP_KEEPALIVE) unpack(b []byte) error { + if len(b) < 4 { + return ErrBuf + } + e.Length = binary.BigEndian.Uint16(b[2:4]) + if e.Length != 0 && e.Length != 2 { + return errors.New("dns: length mismatch, want 0/2 but got " + strconv.FormatUint(uint64(e.Length), 10)) + } + if e.Length == 2 { + if len(b) < 6 { + return ErrBuf + } + e.Timeout = binary.BigEndian.Uint16(b[4:6]) + } + return nil +} + +func (e *EDNS0_TCP_KEEPALIVE) String() (s string) { + s = "use tcp keep-alive" + if e.Length == 0 { + s += ", timeout omitted" + } else { + s += fmt.Sprintf(", timeout %dms", e.Timeout*100) + } + return +} + +// EDNS0_PADDING option is used to add padding to a request/response. The default +// value of padding SHOULD be 0x0 but other values MAY be used, for instance if +// compression is applied before encryption which may break signatures. +type EDNS0_PADDING struct { + Padding []byte +} + +// Option implements the EDNS0 interface. +func (e *EDNS0_PADDING) Option() uint16 { return EDNS0PADDING } +func (e *EDNS0_PADDING) pack() ([]byte, error) { return e.Padding, nil } +func (e *EDNS0_PADDING) unpack(b []byte) error { e.Padding = b; return nil } +func (e *EDNS0_PADDING) String() string { return fmt.Sprintf("%0X", e.Padding) } diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/format.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/format.go new file mode 100644 index 000000000..3f5303c20 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/format.go @@ -0,0 +1,87 @@ +package dns + +import ( + "net" + "reflect" + "strconv" +) + +// NumField returns the number of rdata fields r has. +func NumField(r RR) int { + return reflect.ValueOf(r).Elem().NumField() - 1 // Remove RR_Header +} + +// Field returns the rdata field i as a string. Fields are indexed starting from 1. +// RR types that holds slice data, for instance the NSEC type bitmap will return a single +// string where the types are concatenated using a space. +// Accessing non existing fields will cause a panic. +func Field(r RR, i int) string { + if i == 0 { + return "" + } + d := reflect.ValueOf(r).Elem().Field(i) + switch k := d.Kind(); k { + case reflect.String: + return d.String() + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return strconv.FormatInt(d.Int(), 10) + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + return strconv.FormatUint(d.Uint(), 10) + case reflect.Slice: + switch reflect.ValueOf(r).Elem().Type().Field(i).Tag { + case `dns:"a"`: + // TODO(miek): Hmm store this as 16 bytes + if d.Len() < net.IPv6len { + return net.IPv4(byte(d.Index(0).Uint()), + byte(d.Index(1).Uint()), + byte(d.Index(2).Uint()), + byte(d.Index(3).Uint())).String() + } + return net.IPv4(byte(d.Index(12).Uint()), + byte(d.Index(13).Uint()), + byte(d.Index(14).Uint()), + byte(d.Index(15).Uint())).String() + case `dns:"aaaa"`: + return net.IP{ + byte(d.Index(0).Uint()), + byte(d.Index(1).Uint()), + byte(d.Index(2).Uint()), + byte(d.Index(3).Uint()), + byte(d.Index(4).Uint()), + byte(d.Index(5).Uint()), + byte(d.Index(6).Uint()), + byte(d.Index(7).Uint()), + byte(d.Index(8).Uint()), + byte(d.Index(9).Uint()), + byte(d.Index(10).Uint()), + byte(d.Index(11).Uint()), + byte(d.Index(12).Uint()), + byte(d.Index(13).Uint()), + byte(d.Index(14).Uint()), + byte(d.Index(15).Uint()), + }.String() + case `dns:"nsec"`: + if d.Len() == 0 { + return "" + } + s := Type(d.Index(0).Uint()).String() + for i := 1; i < d.Len(); i++ { + s += " " + Type(d.Index(i).Uint()).String() + } + return s + default: + // if it does not have a tag its a string slice + fallthrough + case `dns:"txt"`: + if d.Len() == 0 { + return "" + } + s := d.Index(0).String() + for i := 1; i < d.Len(); i++ { + s += " " + d.Index(i).String() + } + return s + } + } + return "" +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/fuzz.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/fuzz.go new file mode 100644 index 000000000..a8a09184d --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/fuzz.go @@ -0,0 +1,23 @@ +// +build fuzz + +package dns + +func Fuzz(data []byte) int { + msg := new(Msg) + + if err := msg.Unpack(data); err != nil { + return 0 + } + if _, err := msg.Pack(); err != nil { + return 0 + } + + return 1 +} + +func FuzzNewRR(data []byte) int { + if _, err := NewRR(string(data)); err != nil { + return 0 + } + return 1 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/generate.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/generate.go new file mode 100644 index 000000000..e4481a4b0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/generate.go @@ -0,0 +1,159 @@ +package dns + +import ( + "bytes" + "errors" + "fmt" + "strconv" + "strings" +) + +// Parse the $GENERATE statement as used in BIND9 zones. +// See http://www.zytrax.com/books/dns/ch8/generate.html for instance. +// We are called after '$GENERATE '. After which we expect: +// * the range (12-24/2) +// * lhs (ownername) +// * [[ttl][class]] +// * type +// * rhs (rdata) +// But we are lazy here, only the range is parsed *all* occurrences +// of $ after that are interpreted. +// Any error are returned as a string value, the empty string signals +// "no error". +func generate(l lex, c chan lex, t chan *Token, o string) string { + step := 1 + if i := strings.IndexAny(l.token, "/"); i != -1 { + if i+1 == len(l.token) { + return "bad step in $GENERATE range" + } + if s, err := strconv.Atoi(l.token[i+1:]); err == nil { + if s < 0 { + return "bad step in $GENERATE range" + } + step = s + } else { + return "bad step in $GENERATE range" + } + l.token = l.token[:i] + } + sx := strings.SplitN(l.token, "-", 2) + if len(sx) != 2 { + return "bad start-stop in $GENERATE range" + } + start, err := strconv.Atoi(sx[0]) + if err != nil { + return "bad start in $GENERATE range" + } + end, err := strconv.Atoi(sx[1]) + if err != nil { + return "bad stop in $GENERATE range" + } + if end < 0 || start < 0 || end < start { + return "bad range in $GENERATE range" + } + + <-c // _BLANK + // Create a complete new string, which we then parse again. + s := "" +BuildRR: + l = <-c + if l.value != zNewline && l.value != zEOF { + s += l.token + goto BuildRR + } + for i := start; i <= end; i += step { + var ( + escape bool + dom bytes.Buffer + mod string + err error + offset int + ) + + for j := 0; j < len(s); j++ { // No 'range' because we need to jump around + switch s[j] { + case '\\': + if escape { + dom.WriteByte('\\') + escape = false + continue + } + escape = true + case '$': + mod = "%d" + offset = 0 + if escape { + dom.WriteByte('$') + escape = false + continue + } + escape = false + if j+1 >= len(s) { // End of the string + dom.WriteString(fmt.Sprintf(mod, i+offset)) + continue + } else { + if s[j+1] == '$' { + dom.WriteByte('$') + j++ + continue + } + } + // Search for { and } + if s[j+1] == '{' { // Modifier block + sep := strings.Index(s[j+2:], "}") + if sep == -1 { + return "bad modifier in $GENERATE" + } + mod, offset, err = modToPrintf(s[j+2 : j+2+sep]) + if err != nil { + return err.Error() + } + j += 2 + sep // Jump to it + } + dom.WriteString(fmt.Sprintf(mod, i+offset)) + default: + if escape { // Pretty useless here + escape = false + continue + } + dom.WriteByte(s[j]) + } + } + // Re-parse the RR and send it on the current channel t + rx, err := NewRR("$ORIGIN " + o + "\n" + dom.String()) + if err != nil { + return err.Error() + } + t <- &Token{RR: rx} + // Its more efficient to first built the rrlist and then parse it in + // one go! But is this a problem? + } + return "" +} + +// Convert a $GENERATE modifier 0,0,d to something Printf can deal with. +func modToPrintf(s string) (string, int, error) { + xs := strings.SplitN(s, ",", 3) + if len(xs) != 3 { + return "", 0, errors.New("bad modifier in $GENERATE") + } + // xs[0] is offset, xs[1] is width, xs[2] is base + if xs[2] != "o" && xs[2] != "d" && xs[2] != "x" && xs[2] != "X" { + return "", 0, errors.New("bad base in $GENERATE") + } + offset, err := strconv.Atoi(xs[0]) + if err != nil || offset > 255 { + return "", 0, errors.New("bad offset in $GENERATE") + } + width, err := strconv.Atoi(xs[1]) + if err != nil || width > 255 { + return "", offset, errors.New("bad width in $GENERATE") + } + switch { + case width < 0: + return "", offset, errors.New("bad width in $GENERATE") + case width == 0: + return "%" + xs[1] + xs[2], offset, nil + } + return "%0" + xs[1] + xs[2], offset, nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/labels.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/labels.go new file mode 100644 index 000000000..760b89e71 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/labels.go @@ -0,0 +1,191 @@ +package dns + +// Holds a bunch of helper functions for dealing with labels. + +// SplitDomainName splits a name string into it's labels. +// www.miek.nl. returns []string{"www", "miek", "nl"} +// .www.miek.nl. returns []string{"", "www", "miek", "nl"}, +// The root label (.) returns nil. Note that using +// strings.Split(s) will work in most cases, but does not handle +// escaped dots (\.) for instance. +// s must be a syntactically valid domain name, see IsDomainName. +func SplitDomainName(s string) (labels []string) { + if len(s) == 0 { + return nil + } + fqdnEnd := 0 // offset of the final '.' or the length of the name + idx := Split(s) + begin := 0 + if s[len(s)-1] == '.' { + fqdnEnd = len(s) - 1 + } else { + fqdnEnd = len(s) + } + + switch len(idx) { + case 0: + return nil + case 1: + // no-op + default: + end := 0 + for i := 1; i < len(idx); i++ { + end = idx[i] + labels = append(labels, s[begin:end-1]) + begin = end + } + } + + labels = append(labels, s[begin:fqdnEnd]) + return labels +} + +// CompareDomainName compares the names s1 and s2 and +// returns how many labels they have in common starting from the *right*. +// The comparison stops at the first inequality. The names are downcased +// before the comparison. +// +// www.miek.nl. and miek.nl. have two labels in common: miek and nl +// www.miek.nl. and www.bla.nl. have one label in common: nl +// +// s1 and s2 must be syntactically valid domain names. +func CompareDomainName(s1, s2 string) (n int) { + // the first check: root label + if s1 == "." || s2 == "." { + return 0 + } + + l1 := Split(s1) + l2 := Split(s2) + + j1 := len(l1) - 1 // end + i1 := len(l1) - 2 // start + j2 := len(l2) - 1 + i2 := len(l2) - 2 + // the second check can be done here: last/only label + // before we fall through into the for-loop below + if equal(s1[l1[j1]:], s2[l2[j2]:]) { + n++ + } else { + return + } + for { + if i1 < 0 || i2 < 0 { + break + } + if equal(s1[l1[i1]:l1[j1]], s2[l2[i2]:l2[j2]]) { + n++ + } else { + break + } + j1-- + i1-- + j2-- + i2-- + } + return +} + +// CountLabel counts the the number of labels in the string s. +// s must be a syntactically valid domain name. +func CountLabel(s string) (labels int) { + if s == "." { + return + } + off := 0 + end := false + for { + off, end = NextLabel(s, off) + labels++ + if end { + return + } + } +} + +// Split splits a name s into its label indexes. +// www.miek.nl. returns []int{0, 4, 9}, www.miek.nl also returns []int{0, 4, 9}. +// The root name (.) returns nil. Also see SplitDomainName. +// s must be a syntactically valid domain name. +func Split(s string) []int { + if s == "." { + return nil + } + idx := make([]int, 1, 3) + off := 0 + end := false + + for { + off, end = NextLabel(s, off) + if end { + return idx + } + idx = append(idx, off) + } +} + +// NextLabel returns the index of the start of the next label in the +// string s starting at offset. +// The bool end is true when the end of the string has been reached. +// Also see PrevLabel. +func NextLabel(s string, offset int) (i int, end bool) { + quote := false + for i = offset; i < len(s)-1; i++ { + switch s[i] { + case '\\': + quote = !quote + default: + quote = false + case '.': + if quote { + quote = !quote + continue + } + return i + 1, false + } + } + return i + 1, true +} + +// PrevLabel returns the index of the label when starting from the right and +// jumping n labels to the left. +// The bool start is true when the start of the string has been overshot. +// Also see NextLabel. +func PrevLabel(s string, n int) (i int, start bool) { + if n == 0 { + return len(s), false + } + lab := Split(s) + if lab == nil { + return 0, true + } + if n > len(lab) { + return 0, true + } + return lab[len(lab)-n], false +} + +// equal compares a and b while ignoring case. It returns true when equal otherwise false. +func equal(a, b string) bool { + // might be lifted into API function. + la := len(a) + lb := len(b) + if la != lb { + return false + } + + for i := la - 1; i >= 0; i-- { + ai := a[i] + bi := b[i] + if ai >= 'A' && ai <= 'Z' { + ai |= ('a' - 'A') + } + if bi >= 'A' && bi <= 'Z' { + bi |= ('a' - 'A') + } + if ai != bi { + return false + } + } + return true +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/msg.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/msg.go new file mode 100644 index 000000000..975dde781 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/msg.go @@ -0,0 +1,1154 @@ +// DNS packet assembly, see RFC 1035. Converting from - Unpack() - +// and to - Pack() - wire format. +// All the packers and unpackers take a (msg []byte, off int) +// and return (off1 int, ok bool). If they return ok==false, they +// also return off1==len(msg), so that the next unpacker will +// also fail. This lets us avoid checks of ok until the end of a +// packing sequence. + +package dns + +//go:generate go run msg_generate.go +//go:generate go run compress_generate.go + +import ( + crand "crypto/rand" + "encoding/binary" + "fmt" + "math/big" + "math/rand" + "strconv" + "sync" +) + +const ( + maxCompressionOffset = 2 << 13 // We have 14 bits for the compression pointer + maxDomainNameWireOctets = 255 // See RFC 1035 section 2.3.4 +) + +// Errors defined in this package. +var ( + ErrAlg error = &Error{err: "bad algorithm"} // ErrAlg indicates an error with the (DNSSEC) algorithm. + ErrAuth error = &Error{err: "bad authentication"} // ErrAuth indicates an error in the TSIG authentication. + ErrBuf error = &Error{err: "buffer size too small"} // ErrBuf indicates that the buffer used is too small for the message. + ErrConnEmpty error = &Error{err: "conn has no connection"} // ErrConnEmpty indicates a connection is being used before it is initialized. + ErrExtendedRcode error = &Error{err: "bad extended rcode"} // ErrExtendedRcode ... + ErrFqdn error = &Error{err: "domain must be fully qualified"} // ErrFqdn indicates that a domain name does not have a closing dot. + ErrId error = &Error{err: "id mismatch"} // ErrId indicates there is a mismatch with the message's ID. + ErrKeyAlg error = &Error{err: "bad key algorithm"} // ErrKeyAlg indicates that the algorithm in the key is not valid. + ErrKey error = &Error{err: "bad key"} + ErrKeySize error = &Error{err: "bad key size"} + ErrLongDomain error = &Error{err: fmt.Sprintf("domain name exceeded %d wire-format octets", maxDomainNameWireOctets)} + ErrNoSig error = &Error{err: "no signature found"} + ErrPrivKey error = &Error{err: "bad private key"} + ErrRcode error = &Error{err: "bad rcode"} + ErrRdata error = &Error{err: "bad rdata"} + ErrRRset error = &Error{err: "bad rrset"} + ErrSecret error = &Error{err: "no secrets defined"} + ErrShortRead error = &Error{err: "short read"} + ErrSig error = &Error{err: "bad signature"} // ErrSig indicates that a signature can not be cryptographically validated. + ErrSoa error = &Error{err: "no SOA"} // ErrSOA indicates that no SOA RR was seen when doing zone transfers. + ErrTime error = &Error{err: "bad time"} // ErrTime indicates a timing error in TSIG authentication. + ErrTruncated error = &Error{err: "failed to unpack truncated message"} // ErrTruncated indicates that we failed to unpack a truncated message. We unpacked as much as we had so Msg can still be used, if desired. +) + +// Id by default, returns a 16 bits random number to be used as a +// message id. The random provided should be good enough. This being a +// variable the function can be reassigned to a custom function. +// For instance, to make it return a static value: +// +// dns.Id = func() uint16 { return 3 } +var Id = id + +var ( + idLock sync.Mutex + idRand *rand.Rand +) + +// id returns a 16 bits random number to be used as a +// message id. The random provided should be good enough. +func id() uint16 { + idLock.Lock() + + if idRand == nil { + // This (partially) works around + // https://github.com/golang/go/issues/11833 by only + // seeding idRand upon the first call to id. + + var seed int64 + var buf [8]byte + + if _, err := crand.Read(buf[:]); err == nil { + seed = int64(binary.LittleEndian.Uint64(buf[:])) + } else { + seed = rand.Int63() + } + + idRand = rand.New(rand.NewSource(seed)) + } + + // The call to idRand.Uint32 must be within the + // mutex lock because *rand.Rand is not safe for + // concurrent use. + // + // There is no added performance overhead to calling + // idRand.Uint32 inside a mutex lock over just + // calling rand.Uint32 as the global math/rand rng + // is internally protected by a sync.Mutex. + id := uint16(idRand.Uint32()) + + idLock.Unlock() + return id +} + +// MsgHdr is a a manually-unpacked version of (id, bits). +type MsgHdr struct { + Id uint16 + Response bool + Opcode int + Authoritative bool + Truncated bool + RecursionDesired bool + RecursionAvailable bool + Zero bool + AuthenticatedData bool + CheckingDisabled bool + Rcode int +} + +// Msg contains the layout of a DNS message. +type Msg struct { + MsgHdr + Compress bool `json:"-"` // If true, the message will be compressed when converted to wire format. + Question []Question // Holds the RR(s) of the question section. + Answer []RR // Holds the RR(s) of the answer section. + Ns []RR // Holds the RR(s) of the authority section. + Extra []RR // Holds the RR(s) of the additional section. +} + +// ClassToString is a maps Classes to strings for each CLASS wire type. +var ClassToString = map[uint16]string{ + ClassINET: "IN", + ClassCSNET: "CS", + ClassCHAOS: "CH", + ClassHESIOD: "HS", + ClassNONE: "NONE", + ClassANY: "ANY", +} + +// OpcodeToString maps Opcodes to strings. +var OpcodeToString = map[int]string{ + OpcodeQuery: "QUERY", + OpcodeIQuery: "IQUERY", + OpcodeStatus: "STATUS", + OpcodeNotify: "NOTIFY", + OpcodeUpdate: "UPDATE", +} + +// RcodeToString maps Rcodes to strings. +var RcodeToString = map[int]string{ + RcodeSuccess: "NOERROR", + RcodeFormatError: "FORMERR", + RcodeServerFailure: "SERVFAIL", + RcodeNameError: "NXDOMAIN", + RcodeNotImplemented: "NOTIMPL", + RcodeRefused: "REFUSED", + RcodeYXDomain: "YXDOMAIN", // See RFC 2136 + RcodeYXRrset: "YXRRSET", + RcodeNXRrset: "NXRRSET", + RcodeNotAuth: "NOTAUTH", + RcodeNotZone: "NOTZONE", + RcodeBadSig: "BADSIG", // Also known as RcodeBadVers, see RFC 6891 + // RcodeBadVers: "BADVERS", + RcodeBadKey: "BADKEY", + RcodeBadTime: "BADTIME", + RcodeBadMode: "BADMODE", + RcodeBadName: "BADNAME", + RcodeBadAlg: "BADALG", + RcodeBadTrunc: "BADTRUNC", + RcodeBadCookie: "BADCOOKIE", +} + +// Domain names are a sequence of counted strings +// split at the dots. They end with a zero-length string. + +// PackDomainName packs a domain name s into msg[off:]. +// If compression is wanted compress must be true and the compression +// map needs to hold a mapping between domain names and offsets +// pointing into msg. +func PackDomainName(s string, msg []byte, off int, compression map[string]int, compress bool) (off1 int, err error) { + off1, _, err = packDomainName(s, msg, off, compression, compress) + return +} + +func packDomainName(s string, msg []byte, off int, compression map[string]int, compress bool) (off1 int, labels int, err error) { + // special case if msg == nil + lenmsg := 256 + if msg != nil { + lenmsg = len(msg) + } + ls := len(s) + if ls == 0 { // Ok, for instance when dealing with update RR without any rdata. + return off, 0, nil + } + // If not fully qualified, error out, but only if msg == nil #ugly + switch { + case msg == nil: + if s[ls-1] != '.' { + s += "." + ls++ + } + case msg != nil: + if s[ls-1] != '.' { + return lenmsg, 0, ErrFqdn + } + } + // Each dot ends a segment of the name. + // We trade each dot byte for a length byte. + // Except for escaped dots (\.), which are normal dots. + // There is also a trailing zero. + + // Compression + nameoffset := -1 + pointer := -1 + // Emit sequence of counted strings, chopping at dots. + begin := 0 + bs := []byte(s) + roBs, bsFresh, escapedDot := s, true, false + for i := 0; i < ls; i++ { + if bs[i] == '\\' { + for j := i; j < ls-1; j++ { + bs[j] = bs[j+1] + } + ls-- + if off+1 > lenmsg { + return lenmsg, labels, ErrBuf + } + // check for \DDD + if i+2 < ls && isDigit(bs[i]) && isDigit(bs[i+1]) && isDigit(bs[i+2]) { + bs[i] = dddToByte(bs[i:]) + for j := i + 1; j < ls-2; j++ { + bs[j] = bs[j+2] + } + ls -= 2 + } + escapedDot = bs[i] == '.' + bsFresh = false + continue + } + + if bs[i] == '.' { + if i > 0 && bs[i-1] == '.' && !escapedDot { + // two dots back to back is not legal + return lenmsg, labels, ErrRdata + } + if i-begin >= 1<<6 { // top two bits of length must be clear + return lenmsg, labels, ErrRdata + } + // off can already (we're in a loop) be bigger than len(msg) + // this happens when a name isn't fully qualified + if off+1 > lenmsg { + return lenmsg, labels, ErrBuf + } + if msg != nil { + msg[off] = byte(i - begin) + } + offset := off + off++ + for j := begin; j < i; j++ { + if off+1 > lenmsg { + return lenmsg, labels, ErrBuf + } + if msg != nil { + msg[off] = bs[j] + } + off++ + } + if compress && !bsFresh { + roBs = string(bs) + bsFresh = true + } + // Don't try to compress '.' + // We should only compress when compress it true, but we should also still pick + // up names that can be used for *future* compression(s). + if compression != nil && roBs[begin:] != "." { + if p, ok := compression[roBs[begin:]]; !ok { + // Only offsets smaller than this can be used. + if offset < maxCompressionOffset { + compression[roBs[begin:]] = offset + } + } else { + // The first hit is the longest matching dname + // keep the pointer offset we get back and store + // the offset of the current name, because that's + // where we need to insert the pointer later + + // If compress is true, we're allowed to compress this dname + if pointer == -1 && compress { + pointer = p // Where to point to + nameoffset = offset // Where to point from + break + } + } + } + labels++ + begin = i + 1 + } + escapedDot = false + } + // Root label is special + if len(bs) == 1 && bs[0] == '.' { + return off, labels, nil + } + // If we did compression and we find something add the pointer here + if pointer != -1 { + // We have two bytes (14 bits) to put the pointer in + // if msg == nil, we will never do compression + binary.BigEndian.PutUint16(msg[nameoffset:], uint16(pointer^0xC000)) + off = nameoffset + 1 + goto End + } + if msg != nil && off < len(msg) { + msg[off] = 0 + } +End: + off++ + return off, labels, nil +} + +// Unpack a domain name. +// In addition to the simple sequences of counted strings above, +// domain names are allowed to refer to strings elsewhere in the +// packet, to avoid repeating common suffixes when returning +// many entries in a single domain. The pointers are marked +// by a length byte with the top two bits set. Ignoring those +// two bits, that byte and the next give a 14 bit offset from msg[0] +// where we should pick up the trail. +// Note that if we jump elsewhere in the packet, +// we return off1 == the offset after the first pointer we found, +// which is where the next record will start. +// In theory, the pointers are only allowed to jump backward. +// We let them jump anywhere and stop jumping after a while. + +// UnpackDomainName unpacks a domain name into a string. +func UnpackDomainName(msg []byte, off int) (string, int, error) { + s := make([]byte, 0, 64) + off1 := 0 + lenmsg := len(msg) + maxLen := maxDomainNameWireOctets + ptr := 0 // number of pointers followed +Loop: + for { + if off >= lenmsg { + return "", lenmsg, ErrBuf + } + c := int(msg[off]) + off++ + switch c & 0xC0 { + case 0x00: + if c == 0x00 { + // end of name + break Loop + } + // literal string + if off+c > lenmsg { + return "", lenmsg, ErrBuf + } + for j := off; j < off+c; j++ { + switch b := msg[j]; b { + case '.', '(', ')', ';', ' ', '@': + fallthrough + case '"', '\\': + s = append(s, '\\', b) + // presentation-format \X escapes add an extra byte + maxLen++ + default: + if b < 32 || b >= 127 { // unprintable, use \DDD + var buf [3]byte + bufs := strconv.AppendInt(buf[:0], int64(b), 10) + s = append(s, '\\') + for i := 0; i < 3-len(bufs); i++ { + s = append(s, '0') + } + for _, r := range bufs { + s = append(s, r) + } + // presentation-format \DDD escapes add 3 extra bytes + maxLen += 3 + } else { + s = append(s, b) + } + } + } + s = append(s, '.') + off += c + case 0xC0: + // pointer to somewhere else in msg. + // remember location after first ptr, + // since that's how many bytes we consumed. + // also, don't follow too many pointers -- + // maybe there's a loop. + if off >= lenmsg { + return "", lenmsg, ErrBuf + } + c1 := msg[off] + off++ + if ptr == 0 { + off1 = off + } + if ptr++; ptr > 10 { + return "", lenmsg, &Error{err: "too many compression pointers"} + } + // pointer should guarantee that it advances and points forwards at least + // but the condition on previous three lines guarantees that it's + // at least loop-free + off = (c^0xC0)<<8 | int(c1) + default: + // 0x80 and 0x40 are reserved + return "", lenmsg, ErrRdata + } + } + if ptr == 0 { + off1 = off + } + if len(s) == 0 { + s = []byte(".") + } else if len(s) >= maxLen { + // error if the name is too long, but don't throw it away + return string(s), lenmsg, ErrLongDomain + } + return string(s), off1, nil +} + +func packTxt(txt []string, msg []byte, offset int, tmp []byte) (int, error) { + if len(txt) == 0 { + if offset >= len(msg) { + return offset, ErrBuf + } + msg[offset] = 0 + return offset, nil + } + var err error + for i := range txt { + if len(txt[i]) > len(tmp) { + return offset, ErrBuf + } + offset, err = packTxtString(txt[i], msg, offset, tmp) + if err != nil { + return offset, err + } + } + return offset, nil +} + +func packTxtString(s string, msg []byte, offset int, tmp []byte) (int, error) { + lenByteOffset := offset + if offset >= len(msg) || len(s) > len(tmp) { + return offset, ErrBuf + } + offset++ + bs := tmp[:len(s)] + copy(bs, s) + for i := 0; i < len(bs); i++ { + if len(msg) <= offset { + return offset, ErrBuf + } + if bs[i] == '\\' { + i++ + if i == len(bs) { + break + } + // check for \DDD + if i+2 < len(bs) && isDigit(bs[i]) && isDigit(bs[i+1]) && isDigit(bs[i+2]) { + msg[offset] = dddToByte(bs[i:]) + i += 2 + } else { + msg[offset] = bs[i] + } + } else { + msg[offset] = bs[i] + } + offset++ + } + l := offset - lenByteOffset - 1 + if l > 255 { + return offset, &Error{err: "string exceeded 255 bytes in txt"} + } + msg[lenByteOffset] = byte(l) + return offset, nil +} + +func packOctetString(s string, msg []byte, offset int, tmp []byte) (int, error) { + if offset >= len(msg) || len(s) > len(tmp) { + return offset, ErrBuf + } + bs := tmp[:len(s)] + copy(bs, s) + for i := 0; i < len(bs); i++ { + if len(msg) <= offset { + return offset, ErrBuf + } + if bs[i] == '\\' { + i++ + if i == len(bs) { + break + } + // check for \DDD + if i+2 < len(bs) && isDigit(bs[i]) && isDigit(bs[i+1]) && isDigit(bs[i+2]) { + msg[offset] = dddToByte(bs[i:]) + i += 2 + } else { + msg[offset] = bs[i] + } + } else { + msg[offset] = bs[i] + } + offset++ + } + return offset, nil +} + +func unpackTxt(msg []byte, off0 int) (ss []string, off int, err error) { + off = off0 + var s string + for off < len(msg) && err == nil { + s, off, err = unpackTxtString(msg, off) + if err == nil { + ss = append(ss, s) + } + } + return +} + +func unpackTxtString(msg []byte, offset int) (string, int, error) { + if offset+1 > len(msg) { + return "", offset, &Error{err: "overflow unpacking txt"} + } + l := int(msg[offset]) + if offset+l+1 > len(msg) { + return "", offset, &Error{err: "overflow unpacking txt"} + } + s := make([]byte, 0, l) + for _, b := range msg[offset+1 : offset+1+l] { + switch b { + case '"', '\\': + s = append(s, '\\', b) + default: + if b < 32 || b > 127 { // unprintable + var buf [3]byte + bufs := strconv.AppendInt(buf[:0], int64(b), 10) + s = append(s, '\\') + for i := 0; i < 3-len(bufs); i++ { + s = append(s, '0') + } + for _, r := range bufs { + s = append(s, r) + } + } else { + s = append(s, b) + } + } + } + offset += 1 + l + return string(s), offset, nil +} + +// Helpers for dealing with escaped bytes +func isDigit(b byte) bool { return b >= '0' && b <= '9' } + +func dddToByte(s []byte) byte { + return byte((s[0]-'0')*100 + (s[1]-'0')*10 + (s[2] - '0')) +} + +// Helper function for packing and unpacking +func intToBytes(i *big.Int, length int) []byte { + buf := i.Bytes() + if len(buf) < length { + b := make([]byte, length) + copy(b[length-len(buf):], buf) + return b + } + return buf +} + +// PackRR packs a resource record rr into msg[off:]. +// See PackDomainName for documentation about the compression. +func PackRR(rr RR, msg []byte, off int, compression map[string]int, compress bool) (off1 int, err error) { + if rr == nil { + return len(msg), &Error{err: "nil rr"} + } + + off1, err = rr.pack(msg, off, compression, compress) + if err != nil { + return len(msg), err + } + // TODO(miek): Not sure if this is needed? If removed we can remove rawmsg.go as well. + if rawSetRdlength(msg, off, off1) { + return off1, nil + } + return off, ErrRdata +} + +// UnpackRR unpacks msg[off:] into an RR. +func UnpackRR(msg []byte, off int) (rr RR, off1 int, err error) { + h, off, msg, err := unpackHeader(msg, off) + if err != nil { + return nil, len(msg), err + } + end := off + int(h.Rdlength) + + if fn, known := typeToUnpack[h.Rrtype]; !known { + rr, off, err = unpackRFC3597(h, msg, off) + } else { + rr, off, err = fn(h, msg, off) + } + if off != end { + return &h, end, &Error{err: "bad rdlength"} + } + return rr, off, err +} + +// unpackRRslice unpacks msg[off:] into an []RR. +// If we cannot unpack the whole array, then it will return nil +func unpackRRslice(l int, msg []byte, off int) (dst1 []RR, off1 int, err error) { + var r RR + // Don't pre-allocate, l may be under attacker control + var dst []RR + for i := 0; i < l; i++ { + off1 := off + r, off, err = UnpackRR(msg, off) + if err != nil { + off = len(msg) + break + } + // If offset does not increase anymore, l is a lie + if off1 == off { + l = i + break + } + dst = append(dst, r) + } + if err != nil && off == len(msg) { + dst = nil + } + return dst, off, err +} + +// Convert a MsgHdr to a string, with dig-like headers: +// +//;; opcode: QUERY, status: NOERROR, id: 48404 +// +//;; flags: qr aa rd ra; +func (h *MsgHdr) String() string { + if h == nil { + return " MsgHdr" + } + + s := ";; opcode: " + OpcodeToString[h.Opcode] + s += ", status: " + RcodeToString[h.Rcode] + s += ", id: " + strconv.Itoa(int(h.Id)) + "\n" + + s += ";; flags:" + if h.Response { + s += " qr" + } + if h.Authoritative { + s += " aa" + } + if h.Truncated { + s += " tc" + } + if h.RecursionDesired { + s += " rd" + } + if h.RecursionAvailable { + s += " ra" + } + if h.Zero { // Hmm + s += " z" + } + if h.AuthenticatedData { + s += " ad" + } + if h.CheckingDisabled { + s += " cd" + } + + s += ";" + return s +} + +// Pack packs a Msg: it is converted to to wire format. +// If the dns.Compress is true the message will be in compressed wire format. +func (dns *Msg) Pack() (msg []byte, err error) { + return dns.PackBuffer(nil) +} + +// PackBuffer packs a Msg, using the given buffer buf. If buf is too small +// a new buffer is allocated. +func (dns *Msg) PackBuffer(buf []byte) (msg []byte, err error) { + // We use a similar function in tsig.go's stripTsig. + var ( + dh Header + compression map[string]int + ) + + if dns.Compress { + compression = make(map[string]int) // Compression pointer mappings + } + + if dns.Rcode < 0 || dns.Rcode > 0xFFF { + return nil, ErrRcode + } + if dns.Rcode > 0xF { + // Regular RCODE field is 4 bits + opt := dns.IsEdns0() + if opt == nil { + return nil, ErrExtendedRcode + } + opt.SetExtendedRcode(uint8(dns.Rcode >> 4)) + dns.Rcode &= 0xF + } + + // Convert convenient Msg into wire-like Header. + dh.Id = dns.Id + dh.Bits = uint16(dns.Opcode)<<11 | uint16(dns.Rcode) + if dns.Response { + dh.Bits |= _QR + } + if dns.Authoritative { + dh.Bits |= _AA + } + if dns.Truncated { + dh.Bits |= _TC + } + if dns.RecursionDesired { + dh.Bits |= _RD + } + if dns.RecursionAvailable { + dh.Bits |= _RA + } + if dns.Zero { + dh.Bits |= _Z + } + if dns.AuthenticatedData { + dh.Bits |= _AD + } + if dns.CheckingDisabled { + dh.Bits |= _CD + } + + // Prepare variable sized arrays. + question := dns.Question + answer := dns.Answer + ns := dns.Ns + extra := dns.Extra + + dh.Qdcount = uint16(len(question)) + dh.Ancount = uint16(len(answer)) + dh.Nscount = uint16(len(ns)) + dh.Arcount = uint16(len(extra)) + + // We need the uncompressed length here, because we first pack it and then compress it. + msg = buf + uncompressedLen := compressedLen(dns, false) + if packLen := uncompressedLen + 1; len(msg) < packLen { + msg = make([]byte, packLen) + } + + // Pack it in: header and then the pieces. + off := 0 + off, err = dh.pack(msg, off, compression, dns.Compress) + if err != nil { + return nil, err + } + for i := 0; i < len(question); i++ { + off, err = question[i].pack(msg, off, compression, dns.Compress) + if err != nil { + return nil, err + } + } + for i := 0; i < len(answer); i++ { + off, err = PackRR(answer[i], msg, off, compression, dns.Compress) + if err != nil { + return nil, err + } + } + for i := 0; i < len(ns); i++ { + off, err = PackRR(ns[i], msg, off, compression, dns.Compress) + if err != nil { + return nil, err + } + } + for i := 0; i < len(extra); i++ { + off, err = PackRR(extra[i], msg, off, compression, dns.Compress) + if err != nil { + return nil, err + } + } + return msg[:off], nil +} + +// Unpack unpacks a binary message to a Msg structure. +func (dns *Msg) Unpack(msg []byte) (err error) { + var ( + dh Header + off int + ) + if dh, off, err = unpackMsgHdr(msg, off); err != nil { + return err + } + + dns.Id = dh.Id + dns.Response = (dh.Bits & _QR) != 0 + dns.Opcode = int(dh.Bits>>11) & 0xF + dns.Authoritative = (dh.Bits & _AA) != 0 + dns.Truncated = (dh.Bits & _TC) != 0 + dns.RecursionDesired = (dh.Bits & _RD) != 0 + dns.RecursionAvailable = (dh.Bits & _RA) != 0 + dns.Zero = (dh.Bits & _Z) != 0 + dns.AuthenticatedData = (dh.Bits & _AD) != 0 + dns.CheckingDisabled = (dh.Bits & _CD) != 0 + dns.Rcode = int(dh.Bits & 0xF) + + // If we are at the end of the message we should return *just* the + // header. This can still be useful to the caller. 9.9.9.9 sends these + // when responding with REFUSED for instance. + if off == len(msg) { + // reset sections before returning + dns.Question, dns.Answer, dns.Ns, dns.Extra = nil, nil, nil, nil + return nil + } + + // Qdcount, Ancount, Nscount, Arcount can't be trusted, as they are + // attacker controlled. This means we can't use them to pre-allocate + // slices. + dns.Question = nil + for i := 0; i < int(dh.Qdcount); i++ { + off1 := off + var q Question + q, off, err = unpackQuestion(msg, off) + if err != nil { + // Even if Truncated is set, we only will set ErrTruncated if we + // actually got the questions + return err + } + if off1 == off { // Offset does not increase anymore, dh.Qdcount is a lie! + dh.Qdcount = uint16(i) + break + } + dns.Question = append(dns.Question, q) + } + + dns.Answer, off, err = unpackRRslice(int(dh.Ancount), msg, off) + // The header counts might have been wrong so we need to update it + dh.Ancount = uint16(len(dns.Answer)) + if err == nil { + dns.Ns, off, err = unpackRRslice(int(dh.Nscount), msg, off) + } + // The header counts might have been wrong so we need to update it + dh.Nscount = uint16(len(dns.Ns)) + if err == nil { + dns.Extra, off, err = unpackRRslice(int(dh.Arcount), msg, off) + } + // The header counts might have been wrong so we need to update it + dh.Arcount = uint16(len(dns.Extra)) + + if off != len(msg) { + // TODO(miek) make this an error? + // use PackOpt to let people tell how detailed the error reporting should be? + // println("dns: extra bytes in dns packet", off, "<", len(msg)) + } else if dns.Truncated { + // Whether we ran into a an error or not, we want to return that it + // was truncated + err = ErrTruncated + } + return err +} + +// Convert a complete message to a string with dig-like output. +func (dns *Msg) String() string { + if dns == nil { + return " MsgHdr" + } + s := dns.MsgHdr.String() + " " + s += "QUERY: " + strconv.Itoa(len(dns.Question)) + ", " + s += "ANSWER: " + strconv.Itoa(len(dns.Answer)) + ", " + s += "AUTHORITY: " + strconv.Itoa(len(dns.Ns)) + ", " + s += "ADDITIONAL: " + strconv.Itoa(len(dns.Extra)) + "\n" + if len(dns.Question) > 0 { + s += "\n;; QUESTION SECTION:\n" + for i := 0; i < len(dns.Question); i++ { + s += dns.Question[i].String() + "\n" + } + } + if len(dns.Answer) > 0 { + s += "\n;; ANSWER SECTION:\n" + for i := 0; i < len(dns.Answer); i++ { + if dns.Answer[i] != nil { + s += dns.Answer[i].String() + "\n" + } + } + } + if len(dns.Ns) > 0 { + s += "\n;; AUTHORITY SECTION:\n" + for i := 0; i < len(dns.Ns); i++ { + if dns.Ns[i] != nil { + s += dns.Ns[i].String() + "\n" + } + } + } + if len(dns.Extra) > 0 { + s += "\n;; ADDITIONAL SECTION:\n" + for i := 0; i < len(dns.Extra); i++ { + if dns.Extra[i] != nil { + s += dns.Extra[i].String() + "\n" + } + } + } + return s +} + +// Len returns the message length when in (un)compressed wire format. +// If dns.Compress is true compression it is taken into account. Len() +// is provided to be a faster way to get the size of the resulting packet, +// than packing it, measuring the size and discarding the buffer. +func (dns *Msg) Len() int { return compressedLen(dns, dns.Compress) } + +// compressedLen returns the message length when in compressed wire format +// when compress is true, otherwise the uncompressed length is returned. +func compressedLen(dns *Msg, compress bool) int { + // We always return one more than needed. + l := 12 // Message header is always 12 bytes + if compress { + compression := map[string]int{} + for _, r := range dns.Question { + l += r.len() + compressionLenHelper(compression, r.Name) + } + l += compressionLenSlice(compression, dns.Answer) + l += compressionLenSlice(compression, dns.Ns) + l += compressionLenSlice(compression, dns.Extra) + } else { + for _, r := range dns.Question { + l += r.len() + } + for _, r := range dns.Answer { + if r != nil { + l += r.len() + } + } + for _, r := range dns.Ns { + if r != nil { + l += r.len() + } + } + for _, r := range dns.Extra { + if r != nil { + l += r.len() + } + } + } + return l +} + +func compressionLenSlice(c map[string]int, rs []RR) int { + var l int + for _, r := range rs { + if r == nil { + continue + } + l += r.len() + k, ok := compressionLenSearch(c, r.Header().Name) + if ok { + l += 1 - k + } + compressionLenHelper(c, r.Header().Name) + k, ok = compressionLenSearchType(c, r) + if ok { + l += 1 - k + } + compressionLenHelperType(c, r) + } + return l +} + +// Put the parts of the name in the compression map. +func compressionLenHelper(c map[string]int, s string) { + pref := "" + lbs := Split(s) + for j := len(lbs) - 1; j >= 0; j-- { + pref = s[lbs[j]:] + if _, ok := c[pref]; !ok { + c[pref] = len(pref) + } + } +} + +// Look for each part in the compression map and returns its length, +// keep on searching so we get the longest match. +func compressionLenSearch(c map[string]int, s string) (int, bool) { + off := 0 + end := false + if s == "" { // don't bork on bogus data + return 0, false + } + for { + if _, ok := c[s[off:]]; ok { + return len(s[off:]), true + } + if end { + break + } + off, end = NextLabel(s, off) + } + return 0, false +} + +// Copy returns a new RR which is a deep-copy of r. +func Copy(r RR) RR { r1 := r.copy(); return r1 } + +// Len returns the length (in octets) of the uncompressed RR in wire format. +func Len(r RR) int { return r.len() } + +// Copy returns a new *Msg which is a deep-copy of dns. +func (dns *Msg) Copy() *Msg { return dns.CopyTo(new(Msg)) } + +// CopyTo copies the contents to the provided message using a deep-copy and returns the copy. +func (dns *Msg) CopyTo(r1 *Msg) *Msg { + r1.MsgHdr = dns.MsgHdr + r1.Compress = dns.Compress + + if len(dns.Question) > 0 { + r1.Question = make([]Question, len(dns.Question)) + copy(r1.Question, dns.Question) // TODO(miek): Question is an immutable value, ok to do a shallow-copy + } + + rrArr := make([]RR, len(dns.Answer)+len(dns.Ns)+len(dns.Extra)) + var rri int + + if len(dns.Answer) > 0 { + rrbegin := rri + for i := 0; i < len(dns.Answer); i++ { + rrArr[rri] = dns.Answer[i].copy() + rri++ + } + r1.Answer = rrArr[rrbegin:rri:rri] + } + + if len(dns.Ns) > 0 { + rrbegin := rri + for i := 0; i < len(dns.Ns); i++ { + rrArr[rri] = dns.Ns[i].copy() + rri++ + } + r1.Ns = rrArr[rrbegin:rri:rri] + } + + if len(dns.Extra) > 0 { + rrbegin := rri + for i := 0; i < len(dns.Extra); i++ { + rrArr[rri] = dns.Extra[i].copy() + rri++ + } + r1.Extra = rrArr[rrbegin:rri:rri] + } + + return r1 +} + +func (q *Question) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := PackDomainName(q.Name, msg, off, compression, compress) + if err != nil { + return off, err + } + off, err = packUint16(q.Qtype, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(q.Qclass, msg, off) + if err != nil { + return off, err + } + return off, nil +} + +func unpackQuestion(msg []byte, off int) (Question, int, error) { + var ( + q Question + err error + ) + q.Name, off, err = UnpackDomainName(msg, off) + if err != nil { + return q, off, err + } + if off == len(msg) { + return q, off, nil + } + q.Qtype, off, err = unpackUint16(msg, off) + if err != nil { + return q, off, err + } + if off == len(msg) { + return q, off, nil + } + q.Qclass, off, err = unpackUint16(msg, off) + if off == len(msg) { + return q, off, nil + } + return q, off, err +} + +func (dh *Header) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := packUint16(dh.Id, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(dh.Bits, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(dh.Qdcount, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(dh.Ancount, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(dh.Nscount, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(dh.Arcount, msg, off) + return off, err +} + +func unpackMsgHdr(msg []byte, off int) (Header, int, error) { + var ( + dh Header + err error + ) + dh.Id, off, err = unpackUint16(msg, off) + if err != nil { + return dh, off, err + } + dh.Bits, off, err = unpackUint16(msg, off) + if err != nil { + return dh, off, err + } + dh.Qdcount, off, err = unpackUint16(msg, off) + if err != nil { + return dh, off, err + } + dh.Ancount, off, err = unpackUint16(msg, off) + if err != nil { + return dh, off, err + } + dh.Nscount, off, err = unpackUint16(msg, off) + if err != nil { + return dh, off, err + } + dh.Arcount, off, err = unpackUint16(msg, off) + return dh, off, err +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/msg_generate.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/msg_generate.go new file mode 100644 index 000000000..8ba609f72 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/msg_generate.go @@ -0,0 +1,348 @@ +//+build ignore + +// msg_generate.go is meant to run with go generate. It will use +// go/{importer,types} to track down all the RR struct types. Then for each type +// it will generate pack/unpack methods based on the struct tags. The generated source is +// written to zmsg.go, and is meant to be checked into git. +package main + +import ( + "bytes" + "fmt" + "go/format" + "go/importer" + "go/types" + "log" + "os" + "strings" +) + +var packageHdr = ` +// Code generated by "go run msg_generate.go"; DO NOT EDIT. + +package dns + +` + +// getTypeStruct will take a type and the package scope, and return the +// (innermost) struct if the type is considered a RR type (currently defined as +// those structs beginning with a RR_Header, could be redefined as implementing +// the RR interface). The bool return value indicates if embedded structs were +// resolved. +func getTypeStruct(t types.Type, scope *types.Scope) (*types.Struct, bool) { + st, ok := t.Underlying().(*types.Struct) + if !ok { + return nil, false + } + if st.Field(0).Type() == scope.Lookup("RR_Header").Type() { + return st, false + } + if st.Field(0).Anonymous() { + st, _ := getTypeStruct(st.Field(0).Type(), scope) + return st, true + } + return nil, false +} + +func main() { + // Import and type-check the package + pkg, err := importer.Default().Import("github.com/miekg/dns") + fatalIfErr(err) + scope := pkg.Scope() + + // Collect actual types (*X) + var namedTypes []string + for _, name := range scope.Names() { + o := scope.Lookup(name) + if o == nil || !o.Exported() { + continue + } + if st, _ := getTypeStruct(o.Type(), scope); st == nil { + continue + } + if name == "PrivateRR" { + continue + } + + // Check if corresponding TypeX exists + if scope.Lookup("Type"+o.Name()) == nil && o.Name() != "RFC3597" { + log.Fatalf("Constant Type%s does not exist.", o.Name()) + } + + namedTypes = append(namedTypes, o.Name()) + } + + b := &bytes.Buffer{} + b.WriteString(packageHdr) + + fmt.Fprint(b, "// pack*() functions\n\n") + for _, name := range namedTypes { + o := scope.Lookup(name) + st, _ := getTypeStruct(o.Type(), scope) + + fmt.Fprintf(b, "func (rr *%s) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {\n", name) + fmt.Fprint(b, `off, err := rr.Hdr.pack(msg, off, compression, compress) +if err != nil { + return off, err +} +headerEnd := off +`) + for i := 1; i < st.NumFields(); i++ { + o := func(s string) { + fmt.Fprintf(b, s, st.Field(i).Name()) + fmt.Fprint(b, `if err != nil { +return off, err +} +`) + } + + if _, ok := st.Field(i).Type().(*types.Slice); ok { + switch st.Tag(i) { + case `dns:"-"`: // ignored + case `dns:"txt"`: + o("off, err = packStringTxt(rr.%s, msg, off)\n") + case `dns:"opt"`: + o("off, err = packDataOpt(rr.%s, msg, off)\n") + case `dns:"nsec"`: + o("off, err = packDataNsec(rr.%s, msg, off)\n") + case `dns:"domain-name"`: + o("off, err = packDataDomainNames(rr.%s, msg, off, compression, compress)\n") + default: + log.Fatalln(name, st.Field(i).Name(), st.Tag(i)) + } + continue + } + + switch { + case st.Tag(i) == `dns:"-"`: // ignored + case st.Tag(i) == `dns:"cdomain-name"`: + o("off, err = PackDomainName(rr.%s, msg, off, compression, compress)\n") + case st.Tag(i) == `dns:"domain-name"`: + o("off, err = PackDomainName(rr.%s, msg, off, compression, false)\n") + case st.Tag(i) == `dns:"a"`: + o("off, err = packDataA(rr.%s, msg, off)\n") + case st.Tag(i) == `dns:"aaaa"`: + o("off, err = packDataAAAA(rr.%s, msg, off)\n") + case st.Tag(i) == `dns:"uint48"`: + o("off, err = packUint48(rr.%s, msg, off)\n") + case st.Tag(i) == `dns:"txt"`: + o("off, err = packString(rr.%s, msg, off)\n") + + case strings.HasPrefix(st.Tag(i), `dns:"size-base32`): // size-base32 can be packed just like base32 + fallthrough + case st.Tag(i) == `dns:"base32"`: + o("off, err = packStringBase32(rr.%s, msg, off)\n") + + case strings.HasPrefix(st.Tag(i), `dns:"size-base64`): // size-base64 can be packed just like base64 + fallthrough + case st.Tag(i) == `dns:"base64"`: + o("off, err = packStringBase64(rr.%s, msg, off)\n") + + case strings.HasPrefix(st.Tag(i), `dns:"size-hex:SaltLength`): + // directly write instead of using o() so we get the error check in the correct place + field := st.Field(i).Name() + fmt.Fprintf(b, `// Only pack salt if value is not "-", i.e. empty +if rr.%s != "-" { + off, err = packStringHex(rr.%s, msg, off) + if err != nil { + return off, err + } +} +`, field, field) + continue + case strings.HasPrefix(st.Tag(i), `dns:"size-hex`): // size-hex can be packed just like hex + fallthrough + case st.Tag(i) == `dns:"hex"`: + o("off, err = packStringHex(rr.%s, msg, off)\n") + + case st.Tag(i) == `dns:"octet"`: + o("off, err = packStringOctet(rr.%s, msg, off)\n") + case st.Tag(i) == "": + switch st.Field(i).Type().(*types.Basic).Kind() { + case types.Uint8: + o("off, err = packUint8(rr.%s, msg, off)\n") + case types.Uint16: + o("off, err = packUint16(rr.%s, msg, off)\n") + case types.Uint32: + o("off, err = packUint32(rr.%s, msg, off)\n") + case types.Uint64: + o("off, err = packUint64(rr.%s, msg, off)\n") + case types.String: + o("off, err = packString(rr.%s, msg, off)\n") + default: + log.Fatalln(name, st.Field(i).Name()) + } + default: + log.Fatalln(name, st.Field(i).Name(), st.Tag(i)) + } + } + // We have packed everything, only now we know the rdlength of this RR + fmt.Fprintln(b, "rr.Header().Rdlength = uint16(off-headerEnd)") + fmt.Fprintln(b, "return off, nil }\n") + } + + fmt.Fprint(b, "// unpack*() functions\n\n") + for _, name := range namedTypes { + o := scope.Lookup(name) + st, _ := getTypeStruct(o.Type(), scope) + + fmt.Fprintf(b, "func unpack%s(h RR_Header, msg []byte, off int) (RR, int, error) {\n", name) + fmt.Fprintf(b, "rr := new(%s)\n", name) + fmt.Fprint(b, "rr.Hdr = h\n") + fmt.Fprint(b, `if noRdata(h) { +return rr, off, nil + } +var err error +rdStart := off +_ = rdStart + +`) + for i := 1; i < st.NumFields(); i++ { + o := func(s string) { + fmt.Fprintf(b, s, st.Field(i).Name()) + fmt.Fprint(b, `if err != nil { +return rr, off, err +} +`) + } + + // size-* are special, because they reference a struct member we should use for the length. + if strings.HasPrefix(st.Tag(i), `dns:"size-`) { + structMember := structMember(st.Tag(i)) + structTag := structTag(st.Tag(i)) + switch structTag { + case "hex": + fmt.Fprintf(b, "rr.%s, off, err = unpackStringHex(msg, off, off + int(rr.%s))\n", st.Field(i).Name(), structMember) + case "base32": + fmt.Fprintf(b, "rr.%s, off, err = unpackStringBase32(msg, off, off + int(rr.%s))\n", st.Field(i).Name(), structMember) + case "base64": + fmt.Fprintf(b, "rr.%s, off, err = unpackStringBase64(msg, off, off + int(rr.%s))\n", st.Field(i).Name(), structMember) + default: + log.Fatalln(name, st.Field(i).Name(), st.Tag(i)) + } + fmt.Fprint(b, `if err != nil { +return rr, off, err +} +`) + continue + } + + if _, ok := st.Field(i).Type().(*types.Slice); ok { + switch st.Tag(i) { + case `dns:"-"`: // ignored + case `dns:"txt"`: + o("rr.%s, off, err = unpackStringTxt(msg, off)\n") + case `dns:"opt"`: + o("rr.%s, off, err = unpackDataOpt(msg, off)\n") + case `dns:"nsec"`: + o("rr.%s, off, err = unpackDataNsec(msg, off)\n") + case `dns:"domain-name"`: + o("rr.%s, off, err = unpackDataDomainNames(msg, off, rdStart + int(rr.Hdr.Rdlength))\n") + default: + log.Fatalln(name, st.Field(i).Name(), st.Tag(i)) + } + continue + } + + switch st.Tag(i) { + case `dns:"-"`: // ignored + case `dns:"cdomain-name"`: + fallthrough + case `dns:"domain-name"`: + o("rr.%s, off, err = UnpackDomainName(msg, off)\n") + case `dns:"a"`: + o("rr.%s, off, err = unpackDataA(msg, off)\n") + case `dns:"aaaa"`: + o("rr.%s, off, err = unpackDataAAAA(msg, off)\n") + case `dns:"uint48"`: + o("rr.%s, off, err = unpackUint48(msg, off)\n") + case `dns:"txt"`: + o("rr.%s, off, err = unpackString(msg, off)\n") + case `dns:"base32"`: + o("rr.%s, off, err = unpackStringBase32(msg, off, rdStart + int(rr.Hdr.Rdlength))\n") + case `dns:"base64"`: + o("rr.%s, off, err = unpackStringBase64(msg, off, rdStart + int(rr.Hdr.Rdlength))\n") + case `dns:"hex"`: + o("rr.%s, off, err = unpackStringHex(msg, off, rdStart + int(rr.Hdr.Rdlength))\n") + case `dns:"octet"`: + o("rr.%s, off, err = unpackStringOctet(msg, off)\n") + case "": + switch st.Field(i).Type().(*types.Basic).Kind() { + case types.Uint8: + o("rr.%s, off, err = unpackUint8(msg, off)\n") + case types.Uint16: + o("rr.%s, off, err = unpackUint16(msg, off)\n") + case types.Uint32: + o("rr.%s, off, err = unpackUint32(msg, off)\n") + case types.Uint64: + o("rr.%s, off, err = unpackUint64(msg, off)\n") + case types.String: + o("rr.%s, off, err = unpackString(msg, off)\n") + default: + log.Fatalln(name, st.Field(i).Name()) + } + default: + log.Fatalln(name, st.Field(i).Name(), st.Tag(i)) + } + // If we've hit len(msg) we return without error. + if i < st.NumFields()-1 { + fmt.Fprintf(b, `if off == len(msg) { +return rr, off, nil + } +`) + } + } + fmt.Fprintf(b, "return rr, off, err }\n\n") + } + // Generate typeToUnpack map + fmt.Fprintln(b, "var typeToUnpack = map[uint16]func(RR_Header, []byte, int) (RR, int, error){") + for _, name := range namedTypes { + if name == "RFC3597" { + continue + } + fmt.Fprintf(b, "Type%s: unpack%s,\n", name, name) + } + fmt.Fprintln(b, "}\n") + + // gofmt + res, err := format.Source(b.Bytes()) + if err != nil { + b.WriteTo(os.Stderr) + log.Fatal(err) + } + + // write result + f, err := os.Create("zmsg.go") + fatalIfErr(err) + defer f.Close() + f.Write(res) +} + +// structMember will take a tag like dns:"size-base32:SaltLength" and return the last part of this string. +func structMember(s string) string { + fields := strings.Split(s, ":") + if len(fields) == 0 { + return "" + } + f := fields[len(fields)-1] + // f should have a closing " + if len(f) > 1 { + return f[:len(f)-1] + } + return f +} + +// structTag will take a tag like dns:"size-base32:SaltLength" and return base32. +func structTag(s string) string { + fields := strings.Split(s, ":") + if len(fields) < 2 { + return "" + } + return fields[1][len("\"size-"):] +} + +func fatalIfErr(err error) { + if err != nil { + log.Fatal(err) + } +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/msg_helpers.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/msg_helpers.go new file mode 100644 index 000000000..946d5acbf --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/msg_helpers.go @@ -0,0 +1,637 @@ +package dns + +import ( + "encoding/base32" + "encoding/base64" + "encoding/binary" + "encoding/hex" + "net" + "strconv" +) + +// helper functions called from the generated zmsg.go + +// These function are named after the tag to help pack/unpack, if there is no tag it is the name +// of the type they pack/unpack (string, int, etc). We prefix all with unpackData or packData, so packDataA or +// packDataDomainName. + +func unpackDataA(msg []byte, off int) (net.IP, int, error) { + if off+net.IPv4len > len(msg) { + return nil, len(msg), &Error{err: "overflow unpacking a"} + } + a := append(make(net.IP, 0, net.IPv4len), msg[off:off+net.IPv4len]...) + off += net.IPv4len + return a, off, nil +} + +func packDataA(a net.IP, msg []byte, off int) (int, error) { + // It must be a slice of 4, even if it is 16, we encode only the first 4 + if off+net.IPv4len > len(msg) { + return len(msg), &Error{err: "overflow packing a"} + } + switch len(a) { + case net.IPv4len, net.IPv6len: + copy(msg[off:], a.To4()) + off += net.IPv4len + case 0: + // Allowed, for dynamic updates. + default: + return len(msg), &Error{err: "overflow packing a"} + } + return off, nil +} + +func unpackDataAAAA(msg []byte, off int) (net.IP, int, error) { + if off+net.IPv6len > len(msg) { + return nil, len(msg), &Error{err: "overflow unpacking aaaa"} + } + aaaa := append(make(net.IP, 0, net.IPv6len), msg[off:off+net.IPv6len]...) + off += net.IPv6len + return aaaa, off, nil +} + +func packDataAAAA(aaaa net.IP, msg []byte, off int) (int, error) { + if off+net.IPv6len > len(msg) { + return len(msg), &Error{err: "overflow packing aaaa"} + } + + switch len(aaaa) { + case net.IPv6len: + copy(msg[off:], aaaa) + off += net.IPv6len + case 0: + // Allowed, dynamic updates. + default: + return len(msg), &Error{err: "overflow packing aaaa"} + } + return off, nil +} + +// unpackHeader unpacks an RR header, returning the offset to the end of the header and a +// re-sliced msg according to the expected length of the RR. +func unpackHeader(msg []byte, off int) (rr RR_Header, off1 int, truncmsg []byte, err error) { + hdr := RR_Header{} + if off == len(msg) { + return hdr, off, msg, nil + } + + hdr.Name, off, err = UnpackDomainName(msg, off) + if err != nil { + return hdr, len(msg), msg, err + } + hdr.Rrtype, off, err = unpackUint16(msg, off) + if err != nil { + return hdr, len(msg), msg, err + } + hdr.Class, off, err = unpackUint16(msg, off) + if err != nil { + return hdr, len(msg), msg, err + } + hdr.Ttl, off, err = unpackUint32(msg, off) + if err != nil { + return hdr, len(msg), msg, err + } + hdr.Rdlength, off, err = unpackUint16(msg, off) + if err != nil { + return hdr, len(msg), msg, err + } + msg, err = truncateMsgFromRdlength(msg, off, hdr.Rdlength) + return hdr, off, msg, err +} + +// pack packs an RR header, returning the offset to the end of the header. +// See PackDomainName for documentation about the compression. +func (hdr RR_Header) pack(msg []byte, off int, compression map[string]int, compress bool) (off1 int, err error) { + if off == len(msg) { + return off, nil + } + + off, err = PackDomainName(hdr.Name, msg, off, compression, compress) + if err != nil { + return len(msg), err + } + off, err = packUint16(hdr.Rrtype, msg, off) + if err != nil { + return len(msg), err + } + off, err = packUint16(hdr.Class, msg, off) + if err != nil { + return len(msg), err + } + off, err = packUint32(hdr.Ttl, msg, off) + if err != nil { + return len(msg), err + } + off, err = packUint16(hdr.Rdlength, msg, off) + if err != nil { + return len(msg), err + } + return off, nil +} + +// helper helper functions. + +// truncateMsgFromRdLength truncates msg to match the expected length of the RR. +// Returns an error if msg is smaller than the expected size. +func truncateMsgFromRdlength(msg []byte, off int, rdlength uint16) (truncmsg []byte, err error) { + lenrd := off + int(rdlength) + if lenrd > len(msg) { + return msg, &Error{err: "overflowing header size"} + } + return msg[:lenrd], nil +} + +func fromBase32(s []byte) (buf []byte, err error) { + for i, b := range s { + if b >= 'a' && b <= 'z' { + s[i] = b - 32 + } + } + buflen := base32.HexEncoding.DecodedLen(len(s)) + buf = make([]byte, buflen) + n, err := base32.HexEncoding.Decode(buf, s) + buf = buf[:n] + return +} + +func toBase32(b []byte) string { return base32.HexEncoding.EncodeToString(b) } + +func fromBase64(s []byte) (buf []byte, err error) { + buflen := base64.StdEncoding.DecodedLen(len(s)) + buf = make([]byte, buflen) + n, err := base64.StdEncoding.Decode(buf, s) + buf = buf[:n] + return +} + +func toBase64(b []byte) string { return base64.StdEncoding.EncodeToString(b) } + +// dynamicUpdate returns true if the Rdlength is zero. +func noRdata(h RR_Header) bool { return h.Rdlength == 0 } + +func unpackUint8(msg []byte, off int) (i uint8, off1 int, err error) { + if off+1 > len(msg) { + return 0, len(msg), &Error{err: "overflow unpacking uint8"} + } + return uint8(msg[off]), off + 1, nil +} + +func packUint8(i uint8, msg []byte, off int) (off1 int, err error) { + if off+1 > len(msg) { + return len(msg), &Error{err: "overflow packing uint8"} + } + msg[off] = byte(i) + return off + 1, nil +} + +func unpackUint16(msg []byte, off int) (i uint16, off1 int, err error) { + if off+2 > len(msg) { + return 0, len(msg), &Error{err: "overflow unpacking uint16"} + } + return binary.BigEndian.Uint16(msg[off:]), off + 2, nil +} + +func packUint16(i uint16, msg []byte, off int) (off1 int, err error) { + if off+2 > len(msg) { + return len(msg), &Error{err: "overflow packing uint16"} + } + binary.BigEndian.PutUint16(msg[off:], i) + return off + 2, nil +} + +func unpackUint32(msg []byte, off int) (i uint32, off1 int, err error) { + if off+4 > len(msg) { + return 0, len(msg), &Error{err: "overflow unpacking uint32"} + } + return binary.BigEndian.Uint32(msg[off:]), off + 4, nil +} + +func packUint32(i uint32, msg []byte, off int) (off1 int, err error) { + if off+4 > len(msg) { + return len(msg), &Error{err: "overflow packing uint32"} + } + binary.BigEndian.PutUint32(msg[off:], i) + return off + 4, nil +} + +func unpackUint48(msg []byte, off int) (i uint64, off1 int, err error) { + if off+6 > len(msg) { + return 0, len(msg), &Error{err: "overflow unpacking uint64 as uint48"} + } + // Used in TSIG where the last 48 bits are occupied, so for now, assume a uint48 (6 bytes) + i = (uint64(uint64(msg[off])<<40 | uint64(msg[off+1])<<32 | uint64(msg[off+2])<<24 | uint64(msg[off+3])<<16 | + uint64(msg[off+4])<<8 | uint64(msg[off+5]))) + off += 6 + return i, off, nil +} + +func packUint48(i uint64, msg []byte, off int) (off1 int, err error) { + if off+6 > len(msg) { + return len(msg), &Error{err: "overflow packing uint64 as uint48"} + } + msg[off] = byte(i >> 40) + msg[off+1] = byte(i >> 32) + msg[off+2] = byte(i >> 24) + msg[off+3] = byte(i >> 16) + msg[off+4] = byte(i >> 8) + msg[off+5] = byte(i) + off += 6 + return off, nil +} + +func unpackUint64(msg []byte, off int) (i uint64, off1 int, err error) { + if off+8 > len(msg) { + return 0, len(msg), &Error{err: "overflow unpacking uint64"} + } + return binary.BigEndian.Uint64(msg[off:]), off + 8, nil +} + +func packUint64(i uint64, msg []byte, off int) (off1 int, err error) { + if off+8 > len(msg) { + return len(msg), &Error{err: "overflow packing uint64"} + } + binary.BigEndian.PutUint64(msg[off:], i) + off += 8 + return off, nil +} + +func unpackString(msg []byte, off int) (string, int, error) { + if off+1 > len(msg) { + return "", off, &Error{err: "overflow unpacking txt"} + } + l := int(msg[off]) + if off+l+1 > len(msg) { + return "", off, &Error{err: "overflow unpacking txt"} + } + s := make([]byte, 0, l) + for _, b := range msg[off+1 : off+1+l] { + switch b { + case '"', '\\': + s = append(s, '\\', b) + default: + if b < 32 || b > 127 { // unprintable + var buf [3]byte + bufs := strconv.AppendInt(buf[:0], int64(b), 10) + s = append(s, '\\') + for i := 0; i < 3-len(bufs); i++ { + s = append(s, '0') + } + for _, r := range bufs { + s = append(s, r) + } + } else { + s = append(s, b) + } + } + } + off += 1 + l + return string(s), off, nil +} + +func packString(s string, msg []byte, off int) (int, error) { + txtTmp := make([]byte, 256*4+1) + off, err := packTxtString(s, msg, off, txtTmp) + if err != nil { + return len(msg), err + } + return off, nil +} + +func unpackStringBase32(msg []byte, off, end int) (string, int, error) { + if end > len(msg) { + return "", len(msg), &Error{err: "overflow unpacking base32"} + } + s := toBase32(msg[off:end]) + return s, end, nil +} + +func packStringBase32(s string, msg []byte, off int) (int, error) { + b32, err := fromBase32([]byte(s)) + if err != nil { + return len(msg), err + } + if off+len(b32) > len(msg) { + return len(msg), &Error{err: "overflow packing base32"} + } + copy(msg[off:off+len(b32)], b32) + off += len(b32) + return off, nil +} + +func unpackStringBase64(msg []byte, off, end int) (string, int, error) { + // Rest of the RR is base64 encoded value, so we don't need an explicit length + // to be set. Thus far all RR's that have base64 encoded fields have those as their + // last one. What we do need is the end of the RR! + if end > len(msg) { + return "", len(msg), &Error{err: "overflow unpacking base64"} + } + s := toBase64(msg[off:end]) + return s, end, nil +} + +func packStringBase64(s string, msg []byte, off int) (int, error) { + b64, err := fromBase64([]byte(s)) + if err != nil { + return len(msg), err + } + if off+len(b64) > len(msg) { + return len(msg), &Error{err: "overflow packing base64"} + } + copy(msg[off:off+len(b64)], b64) + off += len(b64) + return off, nil +} + +func unpackStringHex(msg []byte, off, end int) (string, int, error) { + // Rest of the RR is hex encoded value, so we don't need an explicit length + // to be set. NSEC and TSIG have hex fields with a length field. + // What we do need is the end of the RR! + if end > len(msg) { + return "", len(msg), &Error{err: "overflow unpacking hex"} + } + + s := hex.EncodeToString(msg[off:end]) + return s, end, nil +} + +func packStringHex(s string, msg []byte, off int) (int, error) { + h, err := hex.DecodeString(s) + if err != nil { + return len(msg), err + } + if off+(len(h)) > len(msg) { + return len(msg), &Error{err: "overflow packing hex"} + } + copy(msg[off:off+len(h)], h) + off += len(h) + return off, nil +} + +func unpackStringTxt(msg []byte, off int) ([]string, int, error) { + txt, off, err := unpackTxt(msg, off) + if err != nil { + return nil, len(msg), err + } + return txt, off, nil +} + +func packStringTxt(s []string, msg []byte, off int) (int, error) { + txtTmp := make([]byte, 256*4+1) // If the whole string consists out of \DDD we need this many. + off, err := packTxt(s, msg, off, txtTmp) + if err != nil { + return len(msg), err + } + return off, nil +} + +func unpackDataOpt(msg []byte, off int) ([]EDNS0, int, error) { + var edns []EDNS0 +Option: + code := uint16(0) + if off+4 > len(msg) { + return nil, len(msg), &Error{err: "overflow unpacking opt"} + } + code = binary.BigEndian.Uint16(msg[off:]) + off += 2 + optlen := binary.BigEndian.Uint16(msg[off:]) + off += 2 + if off+int(optlen) > len(msg) { + return nil, len(msg), &Error{err: "overflow unpacking opt"} + } + switch code { + case EDNS0NSID: + e := new(EDNS0_NSID) + if err := e.unpack(msg[off : off+int(optlen)]); err != nil { + return nil, len(msg), err + } + edns = append(edns, e) + off += int(optlen) + case EDNS0SUBNET: + e := new(EDNS0_SUBNET) + if err := e.unpack(msg[off : off+int(optlen)]); err != nil { + return nil, len(msg), err + } + edns = append(edns, e) + off += int(optlen) + case EDNS0COOKIE: + e := new(EDNS0_COOKIE) + if err := e.unpack(msg[off : off+int(optlen)]); err != nil { + return nil, len(msg), err + } + edns = append(edns, e) + off += int(optlen) + case EDNS0UL: + e := new(EDNS0_UL) + if err := e.unpack(msg[off : off+int(optlen)]); err != nil { + return nil, len(msg), err + } + edns = append(edns, e) + off += int(optlen) + case EDNS0LLQ: + e := new(EDNS0_LLQ) + if err := e.unpack(msg[off : off+int(optlen)]); err != nil { + return nil, len(msg), err + } + edns = append(edns, e) + off += int(optlen) + case EDNS0DAU: + e := new(EDNS0_DAU) + if err := e.unpack(msg[off : off+int(optlen)]); err != nil { + return nil, len(msg), err + } + edns = append(edns, e) + off += int(optlen) + case EDNS0DHU: + e := new(EDNS0_DHU) + if err := e.unpack(msg[off : off+int(optlen)]); err != nil { + return nil, len(msg), err + } + edns = append(edns, e) + off += int(optlen) + case EDNS0N3U: + e := new(EDNS0_N3U) + if err := e.unpack(msg[off : off+int(optlen)]); err != nil { + return nil, len(msg), err + } + edns = append(edns, e) + off += int(optlen) + case EDNS0PADDING: + e := new(EDNS0_PADDING) + if err := e.unpack(msg[off : off+int(optlen)]); err != nil { + return nil, len(msg), err + } + edns = append(edns, e) + off += int(optlen) + default: + e := new(EDNS0_LOCAL) + e.Code = code + if err := e.unpack(msg[off : off+int(optlen)]); err != nil { + return nil, len(msg), err + } + edns = append(edns, e) + off += int(optlen) + } + + if off < len(msg) { + goto Option + } + + return edns, off, nil +} + +func packDataOpt(options []EDNS0, msg []byte, off int) (int, error) { + for _, el := range options { + b, err := el.pack() + if err != nil || off+3 > len(msg) { + return len(msg), &Error{err: "overflow packing opt"} + } + binary.BigEndian.PutUint16(msg[off:], el.Option()) // Option code + binary.BigEndian.PutUint16(msg[off+2:], uint16(len(b))) // Length + off += 4 + if off+len(b) > len(msg) { + copy(msg[off:], b) + off = len(msg) + continue + } + // Actual data + copy(msg[off:off+len(b)], b) + off += len(b) + } + return off, nil +} + +func unpackStringOctet(msg []byte, off int) (string, int, error) { + s := string(msg[off:]) + return s, len(msg), nil +} + +func packStringOctet(s string, msg []byte, off int) (int, error) { + txtTmp := make([]byte, 256*4+1) + off, err := packOctetString(s, msg, off, txtTmp) + if err != nil { + return len(msg), err + } + return off, nil +} + +func unpackDataNsec(msg []byte, off int) ([]uint16, int, error) { + var nsec []uint16 + length, window, lastwindow := 0, 0, -1 + for off < len(msg) { + if off+2 > len(msg) { + return nsec, len(msg), &Error{err: "overflow unpacking nsecx"} + } + window = int(msg[off]) + length = int(msg[off+1]) + off += 2 + if window <= lastwindow { + // RFC 4034: Blocks are present in the NSEC RR RDATA in + // increasing numerical order. + return nsec, len(msg), &Error{err: "out of order NSEC block"} + } + if length == 0 { + // RFC 4034: Blocks with no types present MUST NOT be included. + return nsec, len(msg), &Error{err: "empty NSEC block"} + } + if length > 32 { + return nsec, len(msg), &Error{err: "NSEC block too long"} + } + if off+length > len(msg) { + return nsec, len(msg), &Error{err: "overflowing NSEC block"} + } + + // Walk the bytes in the window and extract the type bits + for j := 0; j < length; j++ { + b := msg[off+j] + // Check the bits one by one, and set the type + if b&0x80 == 0x80 { + nsec = append(nsec, uint16(window*256+j*8+0)) + } + if b&0x40 == 0x40 { + nsec = append(nsec, uint16(window*256+j*8+1)) + } + if b&0x20 == 0x20 { + nsec = append(nsec, uint16(window*256+j*8+2)) + } + if b&0x10 == 0x10 { + nsec = append(nsec, uint16(window*256+j*8+3)) + } + if b&0x8 == 0x8 { + nsec = append(nsec, uint16(window*256+j*8+4)) + } + if b&0x4 == 0x4 { + nsec = append(nsec, uint16(window*256+j*8+5)) + } + if b&0x2 == 0x2 { + nsec = append(nsec, uint16(window*256+j*8+6)) + } + if b&0x1 == 0x1 { + nsec = append(nsec, uint16(window*256+j*8+7)) + } + } + off += length + lastwindow = window + } + return nsec, off, nil +} + +func packDataNsec(bitmap []uint16, msg []byte, off int) (int, error) { + if len(bitmap) == 0 { + return off, nil + } + var lastwindow, lastlength uint16 + for j := 0; j < len(bitmap); j++ { + t := bitmap[j] + window := t / 256 + length := (t-window*256)/8 + 1 + if window > lastwindow && lastlength != 0 { // New window, jump to the new offset + off += int(lastlength) + 2 + lastlength = 0 + } + if window < lastwindow || length < lastlength { + return len(msg), &Error{err: "nsec bits out of order"} + } + if off+2+int(length) > len(msg) { + return len(msg), &Error{err: "overflow packing nsec"} + } + // Setting the window # + msg[off] = byte(window) + // Setting the octets length + msg[off+1] = byte(length) + // Setting the bit value for the type in the right octet + msg[off+1+int(length)] |= byte(1 << (7 - (t % 8))) + lastwindow, lastlength = window, length + } + off += int(lastlength) + 2 + return off, nil +} + +func unpackDataDomainNames(msg []byte, off, end int) ([]string, int, error) { + var ( + servers []string + s string + err error + ) + if end > len(msg) { + return nil, len(msg), &Error{err: "overflow unpacking domain names"} + } + for off < end { + s, off, err = UnpackDomainName(msg, off) + if err != nil { + return servers, len(msg), err + } + servers = append(servers, s) + } + return servers, off, nil +} + +func packDataDomainNames(names []string, msg []byte, off int, compression map[string]int, compress bool) (int, error) { + var err error + for j := 0; j < len(names); j++ { + off, err = PackDomainName(names[j], msg, off, compression, false && compress) + if err != nil { + return len(msg), err + } + } + return off, nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/nsecx.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/nsecx.go new file mode 100644 index 000000000..9b908c447 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/nsecx.go @@ -0,0 +1,106 @@ +package dns + +import ( + "crypto/sha1" + "hash" + "strings" +) + +type saltWireFmt struct { + Salt string `dns:"size-hex"` +} + +// HashName hashes a string (label) according to RFC 5155. It returns the hashed string in uppercase. +func HashName(label string, ha uint8, iter uint16, salt string) string { + saltwire := new(saltWireFmt) + saltwire.Salt = salt + wire := make([]byte, DefaultMsgSize) + n, err := packSaltWire(saltwire, wire) + if err != nil { + return "" + } + wire = wire[:n] + name := make([]byte, 255) + off, err := PackDomainName(strings.ToLower(label), name, 0, nil, false) + if err != nil { + return "" + } + name = name[:off] + var s hash.Hash + switch ha { + case SHA1: + s = sha1.New() + default: + return "" + } + + // k = 0 + s.Write(name) + s.Write(wire) + nsec3 := s.Sum(nil) + // k > 0 + for k := uint16(0); k < iter; k++ { + s.Reset() + s.Write(nsec3) + s.Write(wire) + nsec3 = s.Sum(nsec3[:0]) + } + return toBase32(nsec3) +} + +// Cover returns true if a name is covered by the NSEC3 record +func (rr *NSEC3) Cover(name string) bool { + nameHash := HashName(name, rr.Hash, rr.Iterations, rr.Salt) + owner := strings.ToUpper(rr.Hdr.Name) + labelIndices := Split(owner) + if len(labelIndices) < 2 { + return false + } + ownerHash := owner[:labelIndices[1]-1] + ownerZone := owner[labelIndices[1]:] + if !IsSubDomain(ownerZone, strings.ToUpper(name)) { // name is outside owner zone + return false + } + + nextHash := rr.NextDomain + if ownerHash == nextHash { // empty interval + return false + } + if ownerHash > nextHash { // end of zone + if nameHash > ownerHash { // covered since there is nothing after ownerHash + return true + } + return nameHash < nextHash // if nameHash is before beginning of zone it is covered + } + if nameHash < ownerHash { // nameHash is before ownerHash, not covered + return false + } + return nameHash < nextHash // if nameHash is before nextHash is it covered (between ownerHash and nextHash) +} + +// Match returns true if a name matches the NSEC3 record +func (rr *NSEC3) Match(name string) bool { + nameHash := HashName(name, rr.Hash, rr.Iterations, rr.Salt) + owner := strings.ToUpper(rr.Hdr.Name) + labelIndices := Split(owner) + if len(labelIndices) < 2 { + return false + } + ownerHash := owner[:labelIndices[1]-1] + ownerZone := owner[labelIndices[1]:] + if !IsSubDomain(ownerZone, strings.ToUpper(name)) { // name is outside owner zone + return false + } + if ownerHash == nameHash { + return true + } + return false +} + +func packSaltWire(sw *saltWireFmt, msg []byte) (int, error) { + off, err := packStringHex(sw.Salt, msg, 0) + if err != nil { + return off, err + } + return off, nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/privaterr.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/privaterr.go new file mode 100644 index 000000000..6b08e6e95 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/privaterr.go @@ -0,0 +1,149 @@ +package dns + +import ( + "fmt" + "strings" +) + +// PrivateRdata is an interface used for implementing "Private Use" RR types, see +// RFC 6895. This allows one to experiment with new RR types, without requesting an +// official type code. Also see dns.PrivateHandle and dns.PrivateHandleRemove. +type PrivateRdata interface { + // String returns the text presentaton of the Rdata of the Private RR. + String() string + // Parse parses the Rdata of the private RR. + Parse([]string) error + // Pack is used when packing a private RR into a buffer. + Pack([]byte) (int, error) + // Unpack is used when unpacking a private RR from a buffer. + // TODO(miek): diff. signature than Pack, see edns0.go for instance. + Unpack([]byte) (int, error) + // Copy copies the Rdata. + Copy(PrivateRdata) error + // Len returns the length in octets of the Rdata. + Len() int +} + +// PrivateRR represents an RR that uses a PrivateRdata user-defined type. +// It mocks normal RRs and implements dns.RR interface. +type PrivateRR struct { + Hdr RR_Header + Data PrivateRdata +} + +func mkPrivateRR(rrtype uint16) *PrivateRR { + // Panics if RR is not an instance of PrivateRR. + rrfunc, ok := TypeToRR[rrtype] + if !ok { + panic(fmt.Sprintf("dns: invalid operation with Private RR type %d", rrtype)) + } + + anyrr := rrfunc() + switch rr := anyrr.(type) { + case *PrivateRR: + return rr + } + panic(fmt.Sprintf("dns: RR is not a PrivateRR, TypeToRR[%d] generator returned %T", rrtype, anyrr)) +} + +// Header return the RR header of r. +func (r *PrivateRR) Header() *RR_Header { return &r.Hdr } + +func (r *PrivateRR) String() string { return r.Hdr.String() + r.Data.String() } + +// Private len and copy parts to satisfy RR interface. +func (r *PrivateRR) len() int { return r.Hdr.len() + r.Data.Len() } +func (r *PrivateRR) copy() RR { + // make new RR like this: + rr := mkPrivateRR(r.Hdr.Rrtype) + newh := r.Hdr.copyHeader() + rr.Hdr = *newh + + err := r.Data.Copy(rr.Data) + if err != nil { + panic("dns: got value that could not be used to copy Private rdata") + } + return rr +} +func (r *PrivateRR) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := r.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + n, err := r.Data.Pack(msg[off:]) + if err != nil { + return len(msg), err + } + off += n + r.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +// PrivateHandle registers a private resource record type. It requires +// string and numeric representation of private RR type and generator function as argument. +func PrivateHandle(rtypestr string, rtype uint16, generator func() PrivateRdata) { + rtypestr = strings.ToUpper(rtypestr) + + TypeToRR[rtype] = func() RR { return &PrivateRR{RR_Header{}, generator()} } + TypeToString[rtype] = rtypestr + StringToType[rtypestr] = rtype + + typeToUnpack[rtype] = func(h RR_Header, msg []byte, off int) (RR, int, error) { + if noRdata(h) { + return &h, off, nil + } + var err error + + rr := mkPrivateRR(h.Rrtype) + rr.Hdr = h + + off1, err := rr.Data.Unpack(msg[off:]) + off += off1 + if err != nil { + return rr, off, err + } + return rr, off, err + } + + setPrivateRR := func(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := mkPrivateRR(h.Rrtype) + rr.Hdr = h + + var l lex + text := make([]string, 0, 2) // could be 0..N elements, median is probably 1 + Fetch: + for { + // TODO(miek): we could also be returning _QUOTE, this might or might not + // be an issue (basically parsing TXT becomes hard) + switch l = <-c; l.value { + case zNewline, zEOF: + break Fetch + case zString: + text = append(text, l.token) + } + } + + err := rr.Data.Parse(text) + if err != nil { + return nil, &ParseError{f, err.Error(), l}, "" + } + + return rr, nil, "" + } + + typeToparserFunc[rtype] = parserFunc{setPrivateRR, true} +} + +// PrivateHandleRemove removes defenitions required to support private RR type. +func PrivateHandleRemove(rtype uint16) { + rtypestr, ok := TypeToString[rtype] + if ok { + delete(TypeToRR, rtype) + delete(TypeToString, rtype) + delete(typeToparserFunc, rtype) + delete(StringToType, rtypestr) + delete(typeToUnpack, rtype) + } + return +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/rawmsg.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/rawmsg.go new file mode 100644 index 000000000..6e21fba7e --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/rawmsg.go @@ -0,0 +1,49 @@ +package dns + +import "encoding/binary" + +// rawSetRdlength sets the rdlength in the header of +// the RR. The offset 'off' must be positioned at the +// start of the header of the RR, 'end' must be the +// end of the RR. +func rawSetRdlength(msg []byte, off, end int) bool { + l := len(msg) +Loop: + for { + if off+1 > l { + return false + } + c := int(msg[off]) + off++ + switch c & 0xC0 { + case 0x00: + if c == 0x00 { + // End of the domainname + break Loop + } + if off+c > l { + return false + } + off += c + + case 0xC0: + // pointer, next byte included, ends domainname + off++ + break Loop + } + } + // The domainname has been seen, we at the start of the fixed part in the header. + // Type is 2 bytes, class is 2 bytes, ttl 4 and then 2 bytes for the length. + off += 2 + 2 + 4 + if off+2 > l { + return false + } + //off+1 is the end of the header, 'end' is the end of the rr + //so 'end' - 'off+2' is the length of the rdata + rdatalen := end - (off + 2) + if rdatalen > 0xFFFF { + return false + } + binary.BigEndian.PutUint16(msg[off:], uint16(rdatalen)) + return true +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/reverse.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/reverse.go new file mode 100644 index 000000000..f6e7a47a6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/reverse.go @@ -0,0 +1,38 @@ +package dns + +// StringToType is the reverse of TypeToString, needed for string parsing. +var StringToType = reverseInt16(TypeToString) + +// StringToClass is the reverse of ClassToString, needed for string parsing. +var StringToClass = reverseInt16(ClassToString) + +// StringToOpcode is a map of opcodes to strings. +var StringToOpcode = reverseInt(OpcodeToString) + +// StringToRcode is a map of rcodes to strings. +var StringToRcode = reverseInt(RcodeToString) + +// Reverse a map +func reverseInt8(m map[uint8]string) map[string]uint8 { + n := make(map[string]uint8, len(m)) + for u, s := range m { + n[s] = u + } + return n +} + +func reverseInt16(m map[uint16]string) map[string]uint16 { + n := make(map[string]uint16, len(m)) + for u, s := range m { + n[s] = u + } + return n +} + +func reverseInt(m map[int]string) map[string]int { + n := make(map[string]int, len(m)) + for u, s := range m { + n[s] = u + } + return n +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/sanitize.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/sanitize.go new file mode 100644 index 000000000..c415bdd6c --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/sanitize.go @@ -0,0 +1,84 @@ +package dns + +// Dedup removes identical RRs from rrs. It preserves the original ordering. +// The lowest TTL of any duplicates is used in the remaining one. Dedup modifies +// rrs. +// m is used to store the RRs temporary. If it is nil a new map will be allocated. +func Dedup(rrs []RR, m map[string]RR) []RR { + if m == nil { + m = make(map[string]RR) + } + // Save the keys, so we don't have to call normalizedString twice. + keys := make([]*string, 0, len(rrs)) + + for _, r := range rrs { + key := normalizedString(r) + keys = append(keys, &key) + if _, ok := m[key]; ok { + // Shortest TTL wins. + if m[key].Header().Ttl > r.Header().Ttl { + m[key].Header().Ttl = r.Header().Ttl + } + continue + } + + m[key] = r + } + // If the length of the result map equals the amount of RRs we got, + // it means they were all different. We can then just return the original rrset. + if len(m) == len(rrs) { + return rrs + } + + j := 0 + for i, r := range rrs { + // If keys[i] lives in the map, we should copy and remove it. + if _, ok := m[*keys[i]]; ok { + delete(m, *keys[i]) + rrs[j] = r + j++ + } + + if len(m) == 0 { + break + } + } + + return rrs[:j] +} + +// normalizedString returns a normalized string from r. The TTL +// is removed and the domain name is lowercased. We go from this: +// DomainNameTTLCLASSTYPERDATA to: +// lowercasenameCLASSTYPE... +func normalizedString(r RR) string { + // A string Go DNS makes has: domainnameTTL... + b := []byte(r.String()) + + // find the first non-escaped tab, then another, so we capture where the TTL lives. + esc := false + ttlStart, ttlEnd := 0, 0 + for i := 0; i < len(b) && ttlEnd == 0; i++ { + switch { + case b[i] == '\\': + esc = !esc + case b[i] == '\t' && !esc: + if ttlStart == 0 { + ttlStart = i + continue + } + if ttlEnd == 0 { + ttlEnd = i + } + case b[i] >= 'A' && b[i] <= 'Z' && !esc: + b[i] += 32 + default: + esc = false + } + } + + // remove TTL. + copy(b[ttlStart:], b[ttlEnd:]) + cut := ttlEnd - ttlStart + return string(b[:len(b)-cut]) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/scan.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/scan.go new file mode 100644 index 000000000..f9cd47401 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/scan.go @@ -0,0 +1,1007 @@ +package dns + +import ( + "fmt" + "io" + "os" + "path/filepath" + "strconv" + "strings" +) + +const maxTok = 2048 // Largest token we can return. +const maxUint16 = 1<<16 - 1 + +// Tokinize a RFC 1035 zone file. The tokenizer will normalize it: +// * Add ownernames if they are left blank; +// * Suppress sequences of spaces; +// * Make each RR fit on one line (_NEWLINE is send as last) +// * Handle comments: ; +// * Handle braces - anywhere. +const ( + // Zonefile + zEOF = iota + zString + zBlank + zQuote + zNewline + zRrtpe + zOwner + zClass + zDirOrigin // $ORIGIN + zDirTTL // $TTL + zDirInclude // $INCLUDE + zDirGenerate // $GENERATE + + // Privatekey file + zValue + zKey + + zExpectOwnerDir // Ownername + zExpectOwnerBl // Whitespace after the ownername + zExpectAny // Expect rrtype, ttl or class + zExpectAnyNoClass // Expect rrtype or ttl + zExpectAnyNoClassBl // The whitespace after _EXPECT_ANY_NOCLASS + zExpectAnyNoTTL // Expect rrtype or class + zExpectAnyNoTTLBl // Whitespace after _EXPECT_ANY_NOTTL + zExpectRrtype // Expect rrtype + zExpectRrtypeBl // Whitespace BEFORE rrtype + zExpectRdata // The first element of the rdata + zExpectDirTTLBl // Space after directive $TTL + zExpectDirTTL // Directive $TTL + zExpectDirOriginBl // Space after directive $ORIGIN + zExpectDirOrigin // Directive $ORIGIN + zExpectDirIncludeBl // Space after directive $INCLUDE + zExpectDirInclude // Directive $INCLUDE + zExpectDirGenerate // Directive $GENERATE + zExpectDirGenerateBl // Space after directive $GENERATE +) + +// ParseError is a parsing error. It contains the parse error and the location in the io.Reader +// where the error occurred. +type ParseError struct { + file string + err string + lex lex +} + +func (e *ParseError) Error() (s string) { + if e.file != "" { + s = e.file + ": " + } + s += "dns: " + e.err + ": " + strconv.QuoteToASCII(e.lex.token) + " at line: " + + strconv.Itoa(e.lex.line) + ":" + strconv.Itoa(e.lex.column) + return +} + +type lex struct { + token string // text of the token + tokenUpper string // uppercase text of the token + length int // length of the token + err bool // when true, token text has lexer error + value uint8 // value: zString, _BLANK, etc. + line int // line in the file + column int // column in the file + torc uint16 // type or class as parsed in the lexer, we only need to look this up in the grammar + comment string // any comment text seen +} + +// Token holds the token that are returned when a zone file is parsed. +type Token struct { + // The scanned resource record when error is not nil. + RR + // When an error occurred, this has the error specifics. + Error *ParseError + // A potential comment positioned after the RR and on the same line. + Comment string +} + +// ttlState describes the state necessary to fill in an omitted RR TTL +type ttlState struct { + ttl uint32 // ttl is the current default TTL + isByDirective bool // isByDirective indicates whether ttl was set by a $TTL directive +} + +// NewRR reads the RR contained in the string s. Only the first RR is +// returned. If s contains no RR, return nil with no error. The class +// defaults to IN and TTL defaults to 3600. The full zone file syntax +// like $TTL, $ORIGIN, etc. is supported. All fields of the returned +// RR are set, except RR.Header().Rdlength which is set to 0. +func NewRR(s string) (RR, error) { + if len(s) > 0 && s[len(s)-1] != '\n' { // We need a closing newline + return ReadRR(strings.NewReader(s+"\n"), "") + } + return ReadRR(strings.NewReader(s), "") +} + +// ReadRR reads the RR contained in q. +// See NewRR for more documentation. +func ReadRR(q io.Reader, filename string) (RR, error) { + defttl := &ttlState{defaultTtl, false} + r := <-parseZoneHelper(q, ".", filename, defttl, 1) + if r == nil { + return nil, nil + } + + if r.Error != nil { + return nil, r.Error + } + return r.RR, nil +} + +// ParseZone reads a RFC 1035 style zonefile from r. It returns *Tokens on the +// returned channel, each consisting of either a parsed RR and optional comment +// or a nil RR and an error. The string file is only used +// in error reporting. The string origin is used as the initial origin, as +// if the file would start with an $ORIGIN directive. +// The directives $INCLUDE, $ORIGIN, $TTL and $GENERATE are supported. +// The channel t is closed by ParseZone when the end of r is reached. +// +// Basic usage pattern when reading from a string (z) containing the +// zone data: +// +// for x := range dns.ParseZone(strings.NewReader(z), "", "") { +// if x.Error != nil { +// // log.Println(x.Error) +// } else { +// // Do something with x.RR +// } +// } +// +// Comments specified after an RR (and on the same line!) are returned too: +// +// foo. IN A 10.0.0.1 ; this is a comment +// +// The text "; this is comment" is returned in Token.Comment. Comments inside the +// RR are discarded. Comments on a line by themselves are discarded too. +func ParseZone(r io.Reader, origin, file string) chan *Token { + return parseZoneHelper(r, origin, file, nil, 10000) +} + +func parseZoneHelper(r io.Reader, origin, file string, defttl *ttlState, chansize int) chan *Token { + t := make(chan *Token, chansize) + go parseZone(r, origin, file, defttl, t, 0) + return t +} + +func parseZone(r io.Reader, origin, f string, defttl *ttlState, t chan *Token, include int) { + defer func() { + if include == 0 { + close(t) + } + }() + s, cancel := scanInit(r) + c := make(chan lex) + // Start the lexer + go zlexer(s, c) + + defer func() { + cancel() + // zlexer can send up to three tokens, the next one and possibly 2 remainders. + // Do a non-blocking read. + _, ok := <-c + _, ok = <-c + _, ok = <-c + if !ok { + // too bad + } + }() + // 6 possible beginnings of a line, _ is a space + // 0. zRRTYPE -> all omitted until the rrtype + // 1. zOwner _ zRrtype -> class/ttl omitted + // 2. zOwner _ zString _ zRrtype -> class omitted + // 3. zOwner _ zString _ zClass _ zRrtype -> ttl/class + // 4. zOwner _ zClass _ zRrtype -> ttl omitted + // 5. zOwner _ zClass _ zString _ zRrtype -> class/ttl (reversed) + // After detecting these, we know the zRrtype so we can jump to functions + // handling the rdata for each of these types. + + if origin != "" { + origin = Fqdn(origin) + if _, ok := IsDomainName(origin); !ok { + t <- &Token{Error: &ParseError{f, "bad initial origin name", lex{}}} + return + } + } + + st := zExpectOwnerDir // initial state + var h RR_Header + var prevName string + for l := range c { + // Lexer spotted an error already + if l.err == true { + t <- &Token{Error: &ParseError{f, l.token, l}} + return + + } + switch st { + case zExpectOwnerDir: + // We can also expect a directive, like $TTL or $ORIGIN + if defttl != nil { + h.Ttl = defttl.ttl + } + h.Class = ClassINET + switch l.value { + case zNewline: + st = zExpectOwnerDir + case zOwner: + h.Name = l.token + name, ok := toAbsoluteName(l.token, origin) + if !ok { + t <- &Token{Error: &ParseError{f, "bad owner name", l}} + return + } + h.Name = name + prevName = h.Name + st = zExpectOwnerBl + case zDirTTL: + st = zExpectDirTTLBl + case zDirOrigin: + st = zExpectDirOriginBl + case zDirInclude: + st = zExpectDirIncludeBl + case zDirGenerate: + st = zExpectDirGenerateBl + case zRrtpe: + h.Name = prevName + h.Rrtype = l.torc + st = zExpectRdata + case zClass: + h.Name = prevName + h.Class = l.torc + st = zExpectAnyNoClassBl + case zBlank: + // Discard, can happen when there is nothing on the + // line except the RR type + case zString: + ttl, ok := stringToTTL(l.token) + if !ok { + t <- &Token{Error: &ParseError{f, "not a TTL", l}} + return + } + h.Ttl = ttl + if defttl == nil || !defttl.isByDirective { + defttl = &ttlState{ttl, false} + } + st = zExpectAnyNoTTLBl + + default: + t <- &Token{Error: &ParseError{f, "syntax error at beginning", l}} + return + } + case zExpectDirIncludeBl: + if l.value != zBlank { + t <- &Token{Error: &ParseError{f, "no blank after $INCLUDE-directive", l}} + return + } + st = zExpectDirInclude + case zExpectDirInclude: + if l.value != zString { + t <- &Token{Error: &ParseError{f, "expecting $INCLUDE value, not this...", l}} + return + } + neworigin := origin // There may be optionally a new origin set after the filename, if not use current one + switch l := <-c; l.value { + case zBlank: + l := <-c + if l.value == zString { + name, ok := toAbsoluteName(l.token, origin) + if !ok { + t <- &Token{Error: &ParseError{f, "bad origin name", l}} + return + } + neworigin = name + } + case zNewline, zEOF: + // Ok + default: + t <- &Token{Error: &ParseError{f, "garbage after $INCLUDE", l}} + return + } + // Start with the new file + includePath := l.token + if !filepath.IsAbs(includePath) { + includePath = filepath.Join(filepath.Dir(f), includePath) + } + r1, e1 := os.Open(includePath) + if e1 != nil { + msg := fmt.Sprintf("failed to open `%s'", l.token) + if !filepath.IsAbs(l.token) { + msg += fmt.Sprintf(" as `%s'", includePath) + } + t <- &Token{Error: &ParseError{f, msg, l}} + return + } + if include+1 > 7 { + t <- &Token{Error: &ParseError{f, "too deeply nested $INCLUDE", l}} + return + } + parseZone(r1, neworigin, includePath, defttl, t, include+1) + st = zExpectOwnerDir + case zExpectDirTTLBl: + if l.value != zBlank { + t <- &Token{Error: &ParseError{f, "no blank after $TTL-directive", l}} + return + } + st = zExpectDirTTL + case zExpectDirTTL: + if l.value != zString { + t <- &Token{Error: &ParseError{f, "expecting $TTL value, not this...", l}} + return + } + if e, _ := slurpRemainder(c, f); e != nil { + t <- &Token{Error: e} + return + } + ttl, ok := stringToTTL(l.token) + if !ok { + t <- &Token{Error: &ParseError{f, "expecting $TTL value, not this...", l}} + return + } + defttl = &ttlState{ttl, true} + st = zExpectOwnerDir + case zExpectDirOriginBl: + if l.value != zBlank { + t <- &Token{Error: &ParseError{f, "no blank after $ORIGIN-directive", l}} + return + } + st = zExpectDirOrigin + case zExpectDirOrigin: + if l.value != zString { + t <- &Token{Error: &ParseError{f, "expecting $ORIGIN value, not this...", l}} + return + } + if e, _ := slurpRemainder(c, f); e != nil { + t <- &Token{Error: e} + } + name, ok := toAbsoluteName(l.token, origin) + if !ok { + t <- &Token{Error: &ParseError{f, "bad origin name", l}} + return + } + origin = name + st = zExpectOwnerDir + case zExpectDirGenerateBl: + if l.value != zBlank { + t <- &Token{Error: &ParseError{f, "no blank after $GENERATE-directive", l}} + return + } + st = zExpectDirGenerate + case zExpectDirGenerate: + if l.value != zString { + t <- &Token{Error: &ParseError{f, "expecting $GENERATE value, not this...", l}} + return + } + if errMsg := generate(l, c, t, origin); errMsg != "" { + t <- &Token{Error: &ParseError{f, errMsg, l}} + return + } + st = zExpectOwnerDir + case zExpectOwnerBl: + if l.value != zBlank { + t <- &Token{Error: &ParseError{f, "no blank after owner", l}} + return + } + st = zExpectAny + case zExpectAny: + switch l.value { + case zRrtpe: + if defttl == nil { + t <- &Token{Error: &ParseError{f, "missing TTL with no previous value", l}} + return + } + h.Rrtype = l.torc + st = zExpectRdata + case zClass: + h.Class = l.torc + st = zExpectAnyNoClassBl + case zString: + ttl, ok := stringToTTL(l.token) + if !ok { + t <- &Token{Error: &ParseError{f, "not a TTL", l}} + return + } + h.Ttl = ttl + if defttl == nil || !defttl.isByDirective { + defttl = &ttlState{ttl, false} + } + st = zExpectAnyNoTTLBl + default: + t <- &Token{Error: &ParseError{f, "expecting RR type, TTL or class, not this...", l}} + return + } + case zExpectAnyNoClassBl: + if l.value != zBlank { + t <- &Token{Error: &ParseError{f, "no blank before class", l}} + return + } + st = zExpectAnyNoClass + case zExpectAnyNoTTLBl: + if l.value != zBlank { + t <- &Token{Error: &ParseError{f, "no blank before TTL", l}} + return + } + st = zExpectAnyNoTTL + case zExpectAnyNoTTL: + switch l.value { + case zClass: + h.Class = l.torc + st = zExpectRrtypeBl + case zRrtpe: + h.Rrtype = l.torc + st = zExpectRdata + default: + t <- &Token{Error: &ParseError{f, "expecting RR type or class, not this...", l}} + return + } + case zExpectAnyNoClass: + switch l.value { + case zString: + ttl, ok := stringToTTL(l.token) + if !ok { + t <- &Token{Error: &ParseError{f, "not a TTL", l}} + return + } + h.Ttl = ttl + if defttl == nil || !defttl.isByDirective { + defttl = &ttlState{ttl, false} + } + st = zExpectRrtypeBl + case zRrtpe: + h.Rrtype = l.torc + st = zExpectRdata + default: + t <- &Token{Error: &ParseError{f, "expecting RR type or TTL, not this...", l}} + return + } + case zExpectRrtypeBl: + if l.value != zBlank { + t <- &Token{Error: &ParseError{f, "no blank before RR type", l}} + return + } + st = zExpectRrtype + case zExpectRrtype: + if l.value != zRrtpe { + t <- &Token{Error: &ParseError{f, "unknown RR type", l}} + return + } + h.Rrtype = l.torc + st = zExpectRdata + case zExpectRdata: + r, e, c1 := setRR(h, c, origin, f) + if e != nil { + // If e.lex is nil than we have encounter a unknown RR type + // in that case we substitute our current lex token + if e.lex.token == "" && e.lex.value == 0 { + e.lex = l // Uh, dirty + } + t <- &Token{Error: e} + return + } + t <- &Token{RR: r, Comment: c1} + st = zExpectOwnerDir + } + } + // If we get here, we and the h.Rrtype is still zero, we haven't parsed anything, this + // is not an error, because an empty zone file is still a zone file. +} + +// zlexer scans the sourcefile and returns tokens on the channel c. +func zlexer(s *scan, c chan lex) { + var l lex + str := make([]byte, maxTok) // Should be enough for any token + stri := 0 // Offset in str (0 means empty) + com := make([]byte, maxTok) // Hold comment text + comi := 0 + quote := false + escape := false + space := false + commt := false + rrtype := false + owner := true + brace := 0 + x, err := s.tokenText() + defer close(c) + for err == nil { + l.column = s.position.Column + l.line = s.position.Line + if stri >= maxTok { + l.token = "token length insufficient for parsing" + l.err = true + c <- l + return + } + if comi >= maxTok { + l.token = "comment length insufficient for parsing" + l.err = true + c <- l + return + } + + switch x { + case ' ', '\t': + if escape { + escape = false + str[stri] = x + stri++ + break + } + if quote { + // Inside quotes this is legal + str[stri] = x + stri++ + break + } + if commt { + com[comi] = x + comi++ + break + } + if stri == 0 { + // Space directly in the beginning, handled in the grammar + } else if owner { + // If we have a string and its the first, make it an owner + l.value = zOwner + l.token = string(str[:stri]) + l.tokenUpper = strings.ToUpper(l.token) + l.length = stri + // escape $... start with a \ not a $, so this will work + switch l.tokenUpper { + case "$TTL": + l.value = zDirTTL + case "$ORIGIN": + l.value = zDirOrigin + case "$INCLUDE": + l.value = zDirInclude + case "$GENERATE": + l.value = zDirGenerate + } + c <- l + } else { + l.value = zString + l.token = string(str[:stri]) + l.tokenUpper = strings.ToUpper(l.token) + l.length = stri + if !rrtype { + if t, ok := StringToType[l.tokenUpper]; ok { + l.value = zRrtpe + l.torc = t + rrtype = true + } else { + if strings.HasPrefix(l.tokenUpper, "TYPE") { + t, ok := typeToInt(l.token) + if !ok { + l.token = "unknown RR type" + l.err = true + c <- l + return + } + l.value = zRrtpe + rrtype = true + l.torc = t + } + } + if t, ok := StringToClass[l.tokenUpper]; ok { + l.value = zClass + l.torc = t + } else { + if strings.HasPrefix(l.tokenUpper, "CLASS") { + t, ok := classToInt(l.token) + if !ok { + l.token = "unknown class" + l.err = true + c <- l + return + } + l.value = zClass + l.torc = t + } + } + } + c <- l + } + stri = 0 + + if !space && !commt { + l.value = zBlank + l.token = " " + l.length = 1 + c <- l + } + owner = false + space = true + case ';': + if escape { + escape = false + str[stri] = x + stri++ + break + } + if quote { + // Inside quotes this is legal + str[stri] = x + stri++ + break + } + if stri > 0 { + l.value = zString + l.token = string(str[:stri]) + l.tokenUpper = strings.ToUpper(l.token) + l.length = stri + c <- l + stri = 0 + } + commt = true + com[comi] = ';' + comi++ + case '\r': + escape = false + if quote { + str[stri] = x + stri++ + break + } + // discard if outside of quotes + case '\n': + escape = false + // Escaped newline + if quote { + str[stri] = x + stri++ + break + } + // inside quotes this is legal + if commt { + // Reset a comment + commt = false + rrtype = false + stri = 0 + // If not in a brace this ends the comment AND the RR + if brace == 0 { + owner = true + owner = true + l.value = zNewline + l.token = "\n" + l.tokenUpper = l.token + l.length = 1 + l.comment = string(com[:comi]) + c <- l + l.comment = "" + comi = 0 + break + } + com[comi] = ' ' // convert newline to space + comi++ + break + } + + if brace == 0 { + // If there is previous text, we should output it here + if stri != 0 { + l.value = zString + l.token = string(str[:stri]) + l.tokenUpper = strings.ToUpper(l.token) + + l.length = stri + if !rrtype { + if t, ok := StringToType[l.tokenUpper]; ok { + l.value = zRrtpe + l.torc = t + rrtype = true + } + } + c <- l + } + l.value = zNewline + l.token = "\n" + l.tokenUpper = l.token + l.length = 1 + c <- l + stri = 0 + commt = false + rrtype = false + owner = true + comi = 0 + } + case '\\': + // comments do not get escaped chars, everything is copied + if commt { + com[comi] = x + comi++ + break + } + // something already escaped must be in string + if escape { + str[stri] = x + stri++ + escape = false + break + } + // something escaped outside of string gets added to string + str[stri] = x + stri++ + escape = true + case '"': + if commt { + com[comi] = x + comi++ + break + } + if escape { + str[stri] = x + stri++ + escape = false + break + } + space = false + // send previous gathered text and the quote + if stri != 0 { + l.value = zString + l.token = string(str[:stri]) + l.tokenUpper = strings.ToUpper(l.token) + l.length = stri + + c <- l + stri = 0 + } + + // send quote itself as separate token + l.value = zQuote + l.token = "\"" + l.tokenUpper = l.token + l.length = 1 + c <- l + quote = !quote + case '(', ')': + if commt { + com[comi] = x + comi++ + break + } + if escape { + str[stri] = x + stri++ + escape = false + break + } + if quote { + str[stri] = x + stri++ + break + } + switch x { + case ')': + brace-- + if brace < 0 { + l.token = "extra closing brace" + l.tokenUpper = l.token + l.err = true + c <- l + return + } + case '(': + brace++ + } + default: + escape = false + if commt { + com[comi] = x + comi++ + break + } + str[stri] = x + stri++ + space = false + } + x, err = s.tokenText() + } + if stri > 0 { + // Send remainder + l.token = string(str[:stri]) + l.tokenUpper = strings.ToUpper(l.token) + l.length = stri + l.value = zString + c <- l + } + if brace != 0 { + l.token = "unbalanced brace" + l.tokenUpper = l.token + l.err = true + c <- l + } +} + +// Extract the class number from CLASSxx +func classToInt(token string) (uint16, bool) { + offset := 5 + if len(token) < offset+1 { + return 0, false + } + class, err := strconv.ParseUint(token[offset:], 10, 16) + if err != nil { + return 0, false + } + return uint16(class), true +} + +// Extract the rr number from TYPExxx +func typeToInt(token string) (uint16, bool) { + offset := 4 + if len(token) < offset+1 { + return 0, false + } + typ, err := strconv.ParseUint(token[offset:], 10, 16) + if err != nil { + return 0, false + } + return uint16(typ), true +} + +// stringToTTL parses things like 2w, 2m, etc, and returns the time in seconds. +func stringToTTL(token string) (uint32, bool) { + s := uint32(0) + i := uint32(0) + for _, c := range token { + switch c { + case 's', 'S': + s += i + i = 0 + case 'm', 'M': + s += i * 60 + i = 0 + case 'h', 'H': + s += i * 60 * 60 + i = 0 + case 'd', 'D': + s += i * 60 * 60 * 24 + i = 0 + case 'w', 'W': + s += i * 60 * 60 * 24 * 7 + i = 0 + case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9': + i *= 10 + i += uint32(c) - '0' + default: + return 0, false + } + } + return s + i, true +} + +// Parse LOC records' [.][mM] into a +// mantissa exponent format. Token should contain the entire +// string (i.e. no spaces allowed) +func stringToCm(token string) (e, m uint8, ok bool) { + if token[len(token)-1] == 'M' || token[len(token)-1] == 'm' { + token = token[0 : len(token)-1] + } + s := strings.SplitN(token, ".", 2) + var meters, cmeters, val int + var err error + switch len(s) { + case 2: + if cmeters, err = strconv.Atoi(s[1]); err != nil { + return + } + fallthrough + case 1: + if meters, err = strconv.Atoi(s[0]); err != nil { + return + } + case 0: + // huh? + return 0, 0, false + } + ok = true + if meters > 0 { + e = 2 + val = meters + } else { + e = 0 + val = cmeters + } + for val > 10 { + e++ + val /= 10 + } + if e > 9 { + ok = false + } + m = uint8(val) + return +} + +func toAbsoluteName(name, origin string) (absolute string, ok bool) { + // check for an explicit origin reference + if name == "@" { + // require a nonempty origin + if origin == "" { + return "", false + } + return origin, true + } + + // require a valid domain name + _, ok = IsDomainName(name) + if !ok || name == "" { + return "", false + } + + // check if name is already absolute + if name[len(name)-1] == '.' { + return name, true + } + + // require a nonempty origin + if origin == "" { + return "", false + } + return appendOrigin(name, origin), true +} + +func appendOrigin(name, origin string) string { + if origin == "." { + return name + origin + } + return name + "." + origin +} + +// LOC record helper function +func locCheckNorth(token string, latitude uint32) (uint32, bool) { + switch token { + case "n", "N": + return LOC_EQUATOR + latitude, true + case "s", "S": + return LOC_EQUATOR - latitude, true + } + return latitude, false +} + +// LOC record helper function +func locCheckEast(token string, longitude uint32) (uint32, bool) { + switch token { + case "e", "E": + return LOC_EQUATOR + longitude, true + case "w", "W": + return LOC_EQUATOR - longitude, true + } + return longitude, false +} + +// "Eat" the rest of the "line". Return potential comments +func slurpRemainder(c chan lex, f string) (*ParseError, string) { + l := <-c + com := "" + switch l.value { + case zBlank: + l = <-c + com = l.comment + if l.value != zNewline && l.value != zEOF { + return &ParseError{f, "garbage after rdata", l}, "" + } + case zNewline: + com = l.comment + case zEOF: + default: + return &ParseError{f, "garbage after rdata", l}, "" + } + return nil, com +} + +// Parse a 64 bit-like ipv6 address: "0014:4fff:ff20:ee64" +// Used for NID and L64 record. +func stringToNodeID(l lex) (uint64, *ParseError) { + if len(l.token) < 19 { + return 0, &ParseError{l.token, "bad NID/L64 NodeID/Locator64", l} + } + // There must be three colons at fixes postitions, if not its a parse error + if l.token[4] != ':' && l.token[9] != ':' && l.token[14] != ':' { + return 0, &ParseError{l.token, "bad NID/L64 NodeID/Locator64", l} + } + s := l.token[0:4] + l.token[5:9] + l.token[10:14] + l.token[15:19] + u, err := strconv.ParseUint(s, 16, 64) + if err != nil { + return 0, &ParseError{l.token, "bad NID/L64 NodeID/Locator64", l} + } + return u, nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/scan_rr.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/scan_rr.go new file mode 100644 index 000000000..f4ccc8424 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/scan_rr.go @@ -0,0 +1,2199 @@ +package dns + +import ( + "encoding/base64" + "net" + "strconv" + "strings" +) + +type parserFunc struct { + // Func defines the function that parses the tokens and returns the RR + // or an error. The last string contains any comments in the line as + // they returned by the lexer as well. + Func func(h RR_Header, c chan lex, origin string, file string) (RR, *ParseError, string) + // Signals if the RR ending is of variable length, like TXT or records + // that have Hexadecimal or Base64 as their last element in the Rdata. Records + // that have a fixed ending or for instance A, AAAA, SOA and etc. + Variable bool +} + +// Parse the rdata of each rrtype. +// All data from the channel c is either zString or zBlank. +// After the rdata there may come a zBlank and then a zNewline +// or immediately a zNewline. If this is not the case we flag +// an *ParseError: garbage after rdata. +func setRR(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + parserfunc, ok := typeToparserFunc[h.Rrtype] + if ok { + r, e, cm := parserfunc.Func(h, c, o, f) + if parserfunc.Variable { + return r, e, cm + } + if e != nil { + return nil, e, "" + } + e, cm = slurpRemainder(c, f) + if e != nil { + return nil, e, "" + } + return r, nil, cm + } + // RFC3957 RR (Unknown RR handling) + return setRFC3597(h, c, o, f) +} + +// A remainder of the rdata with embedded spaces, return the parsed string (sans the spaces) +// or an error +func endingToString(c chan lex, errstr, f string) (string, *ParseError, string) { + s := "" + l := <-c // zString + for l.value != zNewline && l.value != zEOF { + if l.err { + return s, &ParseError{f, errstr, l}, "" + } + switch l.value { + case zString: + s += l.token + case zBlank: // Ok + default: + return "", &ParseError{f, errstr, l}, "" + } + l = <-c + } + return s, nil, l.comment +} + +// A remainder of the rdata with embedded spaces, split on unquoted whitespace +// and return the parsed string slice or an error +func endingToTxtSlice(c chan lex, errstr, f string) ([]string, *ParseError, string) { + // Get the remaining data until we see a zNewline + l := <-c + if l.err { + return nil, &ParseError{f, errstr, l}, "" + } + + // Build the slice + s := make([]string, 0) + quote := false + empty := false + for l.value != zNewline && l.value != zEOF { + if l.err { + return nil, &ParseError{f, errstr, l}, "" + } + switch l.value { + case zString: + empty = false + if len(l.token) > 255 { + // split up tokens that are larger than 255 into 255-chunks + sx := []string{} + p, i := 0, 255 + for { + if i <= len(l.token) { + sx = append(sx, l.token[p:i]) + } else { + sx = append(sx, l.token[p:]) + break + + } + p, i = p+255, i+255 + } + s = append(s, sx...) + break + } + + s = append(s, l.token) + case zBlank: + if quote { + // zBlank can only be seen in between txt parts. + return nil, &ParseError{f, errstr, l}, "" + } + case zQuote: + if empty && quote { + s = append(s, "") + } + quote = !quote + empty = true + default: + return nil, &ParseError{f, errstr, l}, "" + } + l = <-c + } + if quote { + return nil, &ParseError{f, errstr, l}, "" + } + return s, nil, l.comment +} + +func setA(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(A) + rr.Hdr = h + + l := <-c + if l.length == 0 { // dynamic update rr. + return rr, nil, "" + } + + rr.A = net.ParseIP(l.token) + if rr.A == nil || l.err { + return nil, &ParseError{f, "bad A A", l}, "" + } + return rr, nil, "" +} + +func setAAAA(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(AAAA) + rr.Hdr = h + + l := <-c + if l.length == 0 { // dynamic update rr. + return rr, nil, "" + } + + rr.AAAA = net.ParseIP(l.token) + if rr.AAAA == nil || l.err { + return nil, &ParseError{f, "bad AAAA AAAA", l}, "" + } + return rr, nil, "" +} + +func setNS(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(NS) + rr.Hdr = h + + l := <-c + rr.Ns = l.token + if l.length == 0 { // dynamic update rr. + return rr, nil, "" + } + + name, nameOk := toAbsoluteName(l.token, o) + if l.err || !nameOk { + return nil, &ParseError{f, "bad NS Ns", l}, "" + } + rr.Ns = name + return rr, nil, "" +} + +func setPTR(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(PTR) + rr.Hdr = h + + l := <-c + rr.Ptr = l.token + if l.length == 0 { // dynamic update rr. + return rr, nil, "" + } + + name, nameOk := toAbsoluteName(l.token, o) + if l.err || !nameOk { + return nil, &ParseError{f, "bad PTR Ptr", l}, "" + } + rr.Ptr = name + return rr, nil, "" +} + +func setNSAPPTR(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(NSAPPTR) + rr.Hdr = h + + l := <-c + rr.Ptr = l.token + if l.length == 0 { // dynamic update rr. + return rr, nil, "" + } + + name, nameOk := toAbsoluteName(l.token, o) + if l.err || !nameOk { + return nil, &ParseError{f, "bad NSAP-PTR Ptr", l}, "" + } + rr.Ptr = name + return rr, nil, "" +} + +func setRP(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(RP) + rr.Hdr = h + + l := <-c + rr.Mbox = l.token + if l.length == 0 { // dynamic update rr. + return rr, nil, "" + } + + mbox, mboxOk := toAbsoluteName(l.token, o) + if l.err || !mboxOk { + return nil, &ParseError{f, "bad RP Mbox", l}, "" + } + rr.Mbox = mbox + + <-c // zBlank + l = <-c + rr.Txt = l.token + + txt, txtOk := toAbsoluteName(l.token, o) + if l.err || !txtOk { + return nil, &ParseError{f, "bad RP Txt", l}, "" + } + rr.Txt = txt + + return rr, nil, "" +} + +func setMR(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(MR) + rr.Hdr = h + + l := <-c + rr.Mr = l.token + if l.length == 0 { // dynamic update rr. + return rr, nil, "" + } + + name, nameOk := toAbsoluteName(l.token, o) + if l.err || !nameOk { + return nil, &ParseError{f, "bad MR Mr", l}, "" + } + rr.Mr = name + return rr, nil, "" +} + +func setMB(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(MB) + rr.Hdr = h + + l := <-c + rr.Mb = l.token + if l.length == 0 { // dynamic update rr. + return rr, nil, "" + } + + name, nameOk := toAbsoluteName(l.token, o) + if l.err || !nameOk { + return nil, &ParseError{f, "bad MB Mb", l}, "" + } + rr.Mb = name + return rr, nil, "" +} + +func setMG(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(MG) + rr.Hdr = h + + l := <-c + rr.Mg = l.token + if l.length == 0 { // dynamic update rr. + return rr, nil, "" + } + + name, nameOk := toAbsoluteName(l.token, o) + if l.err || !nameOk { + return nil, &ParseError{f, "bad MG Mg", l}, "" + } + rr.Mg = name + return rr, nil, "" +} + +func setHINFO(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(HINFO) + rr.Hdr = h + + chunks, e, c1 := endingToTxtSlice(c, "bad HINFO Fields", f) + if e != nil { + return nil, e, c1 + } + + if ln := len(chunks); ln == 0 { + return rr, nil, "" + } else if ln == 1 { + // Can we split it? + if out := strings.Fields(chunks[0]); len(out) > 1 { + chunks = out + } else { + chunks = append(chunks, "") + } + } + + rr.Cpu = chunks[0] + rr.Os = strings.Join(chunks[1:], " ") + + return rr, nil, "" +} + +func setMINFO(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(MINFO) + rr.Hdr = h + + l := <-c + rr.Rmail = l.token + if l.length == 0 { // dynamic update rr. + return rr, nil, "" + } + + rmail, rmailOk := toAbsoluteName(l.token, o) + if l.err || !rmailOk { + return nil, &ParseError{f, "bad MINFO Rmail", l}, "" + } + rr.Rmail = rmail + + <-c // zBlank + l = <-c + rr.Email = l.token + + email, emailOk := toAbsoluteName(l.token, o) + if l.err || !emailOk { + return nil, &ParseError{f, "bad MINFO Email", l}, "" + } + rr.Email = email + + return rr, nil, "" +} + +func setMF(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(MF) + rr.Hdr = h + + l := <-c + rr.Mf = l.token + if l.length == 0 { // dynamic update rr. + return rr, nil, "" + } + + name, nameOk := toAbsoluteName(l.token, o) + if l.err || !nameOk { + return nil, &ParseError{f, "bad MF Mf", l}, "" + } + rr.Mf = name + return rr, nil, "" +} + +func setMD(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(MD) + rr.Hdr = h + + l := <-c + rr.Md = l.token + if l.length == 0 { // dynamic update rr. + return rr, nil, "" + } + + name, nameOk := toAbsoluteName(l.token, o) + if l.err || !nameOk { + return nil, &ParseError{f, "bad MD Md", l}, "" + } + rr.Md = name + return rr, nil, "" +} + +func setMX(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(MX) + rr.Hdr = h + + l := <-c + if l.length == 0 { // dynamic update rr. + return rr, nil, "" + } + + i, e := strconv.ParseUint(l.token, 10, 16) + if e != nil || l.err { + return nil, &ParseError{f, "bad MX Pref", l}, "" + } + rr.Preference = uint16(i) + + <-c // zBlank + l = <-c // zString + rr.Mx = l.token + + name, nameOk := toAbsoluteName(l.token, o) + if l.err || !nameOk { + return nil, &ParseError{f, "bad MX Mx", l}, "" + } + rr.Mx = name + + return rr, nil, "" +} + +func setRT(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(RT) + rr.Hdr = h + + l := <-c + if l.length == 0 { // dynamic update rr. + return rr, nil, "" + } + + i, e := strconv.ParseUint(l.token, 10, 16) + if e != nil { + return nil, &ParseError{f, "bad RT Preference", l}, "" + } + rr.Preference = uint16(i) + + <-c // zBlank + l = <-c // zString + rr.Host = l.token + + name, nameOk := toAbsoluteName(l.token, o) + if l.err || !nameOk { + return nil, &ParseError{f, "bad RT Host", l}, "" + } + rr.Host = name + + return rr, nil, "" +} + +func setAFSDB(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(AFSDB) + rr.Hdr = h + + l := <-c + if l.length == 0 { // dynamic update rr. + return rr, nil, "" + } + + i, e := strconv.ParseUint(l.token, 10, 16) + if e != nil || l.err { + return nil, &ParseError{f, "bad AFSDB Subtype", l}, "" + } + rr.Subtype = uint16(i) + + <-c // zBlank + l = <-c // zString + rr.Hostname = l.token + + name, nameOk := toAbsoluteName(l.token, o) + if l.err || !nameOk { + return nil, &ParseError{f, "bad AFSDB Hostname", l}, "" + } + rr.Hostname = name + return rr, nil, "" +} + +func setX25(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(X25) + rr.Hdr = h + + l := <-c + if l.length == 0 { // dynamic update rr. + return rr, nil, "" + } + + if l.err { + return nil, &ParseError{f, "bad X25 PSDNAddress", l}, "" + } + rr.PSDNAddress = l.token + return rr, nil, "" +} + +func setKX(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(KX) + rr.Hdr = h + + l := <-c + if l.length == 0 { // dynamic update rr. + return rr, nil, "" + } + + i, e := strconv.ParseUint(l.token, 10, 16) + if e != nil || l.err { + return nil, &ParseError{f, "bad KX Pref", l}, "" + } + rr.Preference = uint16(i) + + <-c // zBlank + l = <-c // zString + rr.Exchanger = l.token + + name, nameOk := toAbsoluteName(l.token, o) + if l.err || !nameOk { + return nil, &ParseError{f, "bad KX Exchanger", l}, "" + } + rr.Exchanger = name + return rr, nil, "" +} + +func setCNAME(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(CNAME) + rr.Hdr = h + + l := <-c + rr.Target = l.token + if l.length == 0 { // dynamic update rr. + return rr, nil, "" + } + + name, nameOk := toAbsoluteName(l.token, o) + if l.err || !nameOk { + return nil, &ParseError{f, "bad CNAME Target", l}, "" + } + rr.Target = name + return rr, nil, "" +} + +func setDNAME(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(DNAME) + rr.Hdr = h + + l := <-c + rr.Target = l.token + if l.length == 0 { // dynamic update rr. + return rr, nil, "" + } + + name, nameOk := toAbsoluteName(l.token, o) + if l.err || !nameOk { + return nil, &ParseError{f, "bad DNAME Target", l}, "" + } + rr.Target = name + return rr, nil, "" +} + +func setSOA(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(SOA) + rr.Hdr = h + + l := <-c + rr.Ns = l.token + if l.length == 0 { // dynamic update rr. + return rr, nil, "" + } + + ns, nsOk := toAbsoluteName(l.token, o) + if l.err || !nsOk { + return nil, &ParseError{f, "bad SOA Ns", l}, "" + } + rr.Ns = ns + + <-c // zBlank + l = <-c + rr.Mbox = l.token + + mbox, mboxOk := toAbsoluteName(l.token, o) + if l.err || !mboxOk { + return nil, &ParseError{f, "bad SOA Mbox", l}, "" + } + rr.Mbox = mbox + + <-c // zBlank + + var ( + v uint32 + ok bool + ) + for i := 0; i < 5; i++ { + l = <-c + if l.err { + return nil, &ParseError{f, "bad SOA zone parameter", l}, "" + } + if j, e := strconv.ParseUint(l.token, 10, 32); e != nil { + if i == 0 { + // Serial must be a number + return nil, &ParseError{f, "bad SOA zone parameter", l}, "" + } + // We allow other fields to be unitful duration strings + if v, ok = stringToTTL(l.token); !ok { + return nil, &ParseError{f, "bad SOA zone parameter", l}, "" + + } + } else { + v = uint32(j) + } + switch i { + case 0: + rr.Serial = v + <-c // zBlank + case 1: + rr.Refresh = v + <-c // zBlank + case 2: + rr.Retry = v + <-c // zBlank + case 3: + rr.Expire = v + <-c // zBlank + case 4: + rr.Minttl = v + } + } + return rr, nil, "" +} + +func setSRV(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(SRV) + rr.Hdr = h + + l := <-c + if l.length == 0 { // dynamic update rr. + return rr, nil, "" + } + + i, e := strconv.ParseUint(l.token, 10, 16) + if e != nil || l.err { + return nil, &ParseError{f, "bad SRV Priority", l}, "" + } + rr.Priority = uint16(i) + + <-c // zBlank + l = <-c // zString + i, e = strconv.ParseUint(l.token, 10, 16) + if e != nil || l.err { + return nil, &ParseError{f, "bad SRV Weight", l}, "" + } + rr.Weight = uint16(i) + + <-c // zBlank + l = <-c // zString + i, e = strconv.ParseUint(l.token, 10, 16) + if e != nil || l.err { + return nil, &ParseError{f, "bad SRV Port", l}, "" + } + rr.Port = uint16(i) + + <-c // zBlank + l = <-c // zString + rr.Target = l.token + + name, nameOk := toAbsoluteName(l.token, o) + if l.err || !nameOk { + return nil, &ParseError{f, "bad SRV Target", l}, "" + } + rr.Target = name + return rr, nil, "" +} + +func setNAPTR(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(NAPTR) + rr.Hdr = h + + l := <-c + if l.length == 0 { // dynamic update rr. + return rr, nil, "" + } + + i, e := strconv.ParseUint(l.token, 10, 16) + if e != nil || l.err { + return nil, &ParseError{f, "bad NAPTR Order", l}, "" + } + rr.Order = uint16(i) + + <-c // zBlank + l = <-c // zString + i, e = strconv.ParseUint(l.token, 10, 16) + if e != nil || l.err { + return nil, &ParseError{f, "bad NAPTR Preference", l}, "" + } + rr.Preference = uint16(i) + + // Flags + <-c // zBlank + l = <-c // _QUOTE + if l.value != zQuote { + return nil, &ParseError{f, "bad NAPTR Flags", l}, "" + } + l = <-c // Either String or Quote + if l.value == zString { + rr.Flags = l.token + l = <-c // _QUOTE + if l.value != zQuote { + return nil, &ParseError{f, "bad NAPTR Flags", l}, "" + } + } else if l.value == zQuote { + rr.Flags = "" + } else { + return nil, &ParseError{f, "bad NAPTR Flags", l}, "" + } + + // Service + <-c // zBlank + l = <-c // _QUOTE + if l.value != zQuote { + return nil, &ParseError{f, "bad NAPTR Service", l}, "" + } + l = <-c // Either String or Quote + if l.value == zString { + rr.Service = l.token + l = <-c // _QUOTE + if l.value != zQuote { + return nil, &ParseError{f, "bad NAPTR Service", l}, "" + } + } else if l.value == zQuote { + rr.Service = "" + } else { + return nil, &ParseError{f, "bad NAPTR Service", l}, "" + } + + // Regexp + <-c // zBlank + l = <-c // _QUOTE + if l.value != zQuote { + return nil, &ParseError{f, "bad NAPTR Regexp", l}, "" + } + l = <-c // Either String or Quote + if l.value == zString { + rr.Regexp = l.token + l = <-c // _QUOTE + if l.value != zQuote { + return nil, &ParseError{f, "bad NAPTR Regexp", l}, "" + } + } else if l.value == zQuote { + rr.Regexp = "" + } else { + return nil, &ParseError{f, "bad NAPTR Regexp", l}, "" + } + + // After quote no space?? + <-c // zBlank + l = <-c // zString + rr.Replacement = l.token + + name, nameOk := toAbsoluteName(l.token, o) + if l.err || !nameOk { + return nil, &ParseError{f, "bad NAPTR Replacement", l}, "" + } + rr.Replacement = name + return rr, nil, "" +} + +func setTALINK(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(TALINK) + rr.Hdr = h + + l := <-c + rr.PreviousName = l.token + if l.length == 0 { // dynamic update rr. + return rr, nil, "" + } + + previousName, previousNameOk := toAbsoluteName(l.token, o) + if l.err || !previousNameOk { + return nil, &ParseError{f, "bad TALINK PreviousName", l}, "" + } + rr.PreviousName = previousName + + <-c // zBlank + l = <-c + rr.NextName = l.token + + nextName, nextNameOk := toAbsoluteName(l.token, o) + if l.err || !nextNameOk { + return nil, &ParseError{f, "bad TALINK NextName", l}, "" + } + rr.NextName = nextName + + return rr, nil, "" +} + +func setLOC(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(LOC) + rr.Hdr = h + // Non zero defaults for LOC record, see RFC 1876, Section 3. + rr.HorizPre = 165 // 10000 + rr.VertPre = 162 // 10 + rr.Size = 18 // 1 + ok := false + + // North + l := <-c + if l.length == 0 { // dynamic update rr. + return rr, nil, "" + } + i, e := strconv.ParseUint(l.token, 10, 32) + if e != nil || l.err { + return nil, &ParseError{f, "bad LOC Latitude", l}, "" + } + rr.Latitude = 1000 * 60 * 60 * uint32(i) + + <-c // zBlank + // Either number, 'N' or 'S' + l = <-c + if rr.Latitude, ok = locCheckNorth(l.token, rr.Latitude); ok { + goto East + } + i, e = strconv.ParseUint(l.token, 10, 32) + if e != nil || l.err { + return nil, &ParseError{f, "bad LOC Latitude minutes", l}, "" + } + rr.Latitude += 1000 * 60 * uint32(i) + + <-c // zBlank + l = <-c + if i, e := strconv.ParseFloat(l.token, 32); e != nil || l.err { + return nil, &ParseError{f, "bad LOC Latitude seconds", l}, "" + } else { + rr.Latitude += uint32(1000 * i) + } + <-c // zBlank + // Either number, 'N' or 'S' + l = <-c + if rr.Latitude, ok = locCheckNorth(l.token, rr.Latitude); ok { + goto East + } + // If still alive, flag an error + return nil, &ParseError{f, "bad LOC Latitude North/South", l}, "" + +East: + // East + <-c // zBlank + l = <-c + if i, e := strconv.ParseUint(l.token, 10, 32); e != nil || l.err { + return nil, &ParseError{f, "bad LOC Longitude", l}, "" + } else { + rr.Longitude = 1000 * 60 * 60 * uint32(i) + } + <-c // zBlank + // Either number, 'E' or 'W' + l = <-c + if rr.Longitude, ok = locCheckEast(l.token, rr.Longitude); ok { + goto Altitude + } + if i, e := strconv.ParseUint(l.token, 10, 32); e != nil || l.err { + return nil, &ParseError{f, "bad LOC Longitude minutes", l}, "" + } else { + rr.Longitude += 1000 * 60 * uint32(i) + } + <-c // zBlank + l = <-c + if i, e := strconv.ParseFloat(l.token, 32); e != nil || l.err { + return nil, &ParseError{f, "bad LOC Longitude seconds", l}, "" + } else { + rr.Longitude += uint32(1000 * i) + } + <-c // zBlank + // Either number, 'E' or 'W' + l = <-c + if rr.Longitude, ok = locCheckEast(l.token, rr.Longitude); ok { + goto Altitude + } + // If still alive, flag an error + return nil, &ParseError{f, "bad LOC Longitude East/West", l}, "" + +Altitude: + <-c // zBlank + l = <-c + if l.length == 0 || l.err { + return nil, &ParseError{f, "bad LOC Altitude", l}, "" + } + if l.token[len(l.token)-1] == 'M' || l.token[len(l.token)-1] == 'm' { + l.token = l.token[0 : len(l.token)-1] + } + if i, e := strconv.ParseFloat(l.token, 32); e != nil { + return nil, &ParseError{f, "bad LOC Altitude", l}, "" + } else { + rr.Altitude = uint32(i*100.0 + 10000000.0 + 0.5) + } + + // And now optionally the other values + l = <-c + count := 0 + for l.value != zNewline && l.value != zEOF { + switch l.value { + case zString: + switch count { + case 0: // Size + e, m, ok := stringToCm(l.token) + if !ok { + return nil, &ParseError{f, "bad LOC Size", l}, "" + } + rr.Size = (e & 0x0f) | (m << 4 & 0xf0) + case 1: // HorizPre + e, m, ok := stringToCm(l.token) + if !ok { + return nil, &ParseError{f, "bad LOC HorizPre", l}, "" + } + rr.HorizPre = (e & 0x0f) | (m << 4 & 0xf0) + case 2: // VertPre + e, m, ok := stringToCm(l.token) + if !ok { + return nil, &ParseError{f, "bad LOC VertPre", l}, "" + } + rr.VertPre = (e & 0x0f) | (m << 4 & 0xf0) + } + count++ + case zBlank: + // Ok + default: + return nil, &ParseError{f, "bad LOC Size, HorizPre or VertPre", l}, "" + } + l = <-c + } + return rr, nil, "" +} + +func setHIP(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(HIP) + rr.Hdr = h + + // HitLength is not represented + l := <-c + if l.length == 0 { // dynamic update rr. + return rr, nil, l.comment + } + + i, e := strconv.ParseUint(l.token, 10, 8) + if e != nil || l.err { + return nil, &ParseError{f, "bad HIP PublicKeyAlgorithm", l}, "" + } + rr.PublicKeyAlgorithm = uint8(i) + + <-c // zBlank + l = <-c // zString + if l.length == 0 || l.err { + return nil, &ParseError{f, "bad HIP Hit", l}, "" + } + rr.Hit = l.token // This can not contain spaces, see RFC 5205 Section 6. + rr.HitLength = uint8(len(rr.Hit)) / 2 + + <-c // zBlank + l = <-c // zString + if l.length == 0 || l.err { + return nil, &ParseError{f, "bad HIP PublicKey", l}, "" + } + rr.PublicKey = l.token // This cannot contain spaces + rr.PublicKeyLength = uint16(base64.StdEncoding.DecodedLen(len(rr.PublicKey))) + + // RendezvousServers (if any) + l = <-c + var xs []string + for l.value != zNewline && l.value != zEOF { + switch l.value { + case zString: + name, nameOk := toAbsoluteName(l.token, o) + if l.err || !nameOk { + return nil, &ParseError{f, "bad HIP RendezvousServers", l}, "" + } + xs = append(xs, name) + case zBlank: + // Ok + default: + return nil, &ParseError{f, "bad HIP RendezvousServers", l}, "" + } + l = <-c + } + rr.RendezvousServers = xs + return rr, nil, l.comment +} + +func setCERT(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(CERT) + rr.Hdr = h + + l := <-c + if l.length == 0 { // dynamic update rr. + return rr, nil, l.comment + } + + if v, ok := StringToCertType[l.token]; ok { + rr.Type = v + } else if i, e := strconv.ParseUint(l.token, 10, 16); e != nil { + return nil, &ParseError{f, "bad CERT Type", l}, "" + } else { + rr.Type = uint16(i) + } + <-c // zBlank + l = <-c // zString + i, e := strconv.ParseUint(l.token, 10, 16) + if e != nil || l.err { + return nil, &ParseError{f, "bad CERT KeyTag", l}, "" + } + rr.KeyTag = uint16(i) + <-c // zBlank + l = <-c // zString + if v, ok := StringToAlgorithm[l.token]; ok { + rr.Algorithm = v + } else if i, e := strconv.ParseUint(l.token, 10, 8); e != nil { + return nil, &ParseError{f, "bad CERT Algorithm", l}, "" + } else { + rr.Algorithm = uint8(i) + } + s, e1, c1 := endingToString(c, "bad CERT Certificate", f) + if e1 != nil { + return nil, e1, c1 + } + rr.Certificate = s + return rr, nil, c1 +} + +func setOPENPGPKEY(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(OPENPGPKEY) + rr.Hdr = h + + s, e, c1 := endingToString(c, "bad OPENPGPKEY PublicKey", f) + if e != nil { + return nil, e, c1 + } + rr.PublicKey = s + return rr, nil, c1 +} + +func setCSYNC(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(CSYNC) + rr.Hdr = h + + l := <-c + if l.length == 0 { // dynamic update rr. + return rr, nil, l.comment + } + j, e := strconv.ParseUint(l.token, 10, 32) + if e != nil { + // Serial must be a number + return nil, &ParseError{f, "bad CSYNC serial", l}, "" + } + rr.Serial = uint32(j) + + <-c // zBlank + + l = <-c + j, e = strconv.ParseUint(l.token, 10, 16) + if e != nil { + // Serial must be a number + return nil, &ParseError{f, "bad CSYNC flags", l}, "" + } + rr.Flags = uint16(j) + + rr.TypeBitMap = make([]uint16, 0) + var ( + k uint16 + ok bool + ) + l = <-c + for l.value != zNewline && l.value != zEOF { + switch l.value { + case zBlank: + // Ok + case zString: + if k, ok = StringToType[l.tokenUpper]; !ok { + if k, ok = typeToInt(l.tokenUpper); !ok { + return nil, &ParseError{f, "bad CSYNC TypeBitMap", l}, "" + } + } + rr.TypeBitMap = append(rr.TypeBitMap, k) + default: + return nil, &ParseError{f, "bad CSYNC TypeBitMap", l}, "" + } + l = <-c + } + return rr, nil, l.comment +} + +func setSIG(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + r, e, s := setRRSIG(h, c, o, f) + if r != nil { + return &SIG{*r.(*RRSIG)}, e, s + } + return nil, e, s +} + +func setRRSIG(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(RRSIG) + rr.Hdr = h + + l := <-c + if l.length == 0 { // dynamic update rr. + return rr, nil, l.comment + } + + if t, ok := StringToType[l.tokenUpper]; !ok { + if strings.HasPrefix(l.tokenUpper, "TYPE") { + t, ok = typeToInt(l.tokenUpper) + if !ok { + return nil, &ParseError{f, "bad RRSIG Typecovered", l}, "" + } + rr.TypeCovered = t + } else { + return nil, &ParseError{f, "bad RRSIG Typecovered", l}, "" + } + } else { + rr.TypeCovered = t + } + + <-c // zBlank + l = <-c + i, err := strconv.ParseUint(l.token, 10, 8) + if err != nil || l.err { + return nil, &ParseError{f, "bad RRSIG Algorithm", l}, "" + } + rr.Algorithm = uint8(i) + + <-c // zBlank + l = <-c + i, err = strconv.ParseUint(l.token, 10, 8) + if err != nil || l.err { + return nil, &ParseError{f, "bad RRSIG Labels", l}, "" + } + rr.Labels = uint8(i) + + <-c // zBlank + l = <-c + i, err = strconv.ParseUint(l.token, 10, 32) + if err != nil || l.err { + return nil, &ParseError{f, "bad RRSIG OrigTtl", l}, "" + } + rr.OrigTtl = uint32(i) + + <-c // zBlank + l = <-c + if i, err := StringToTime(l.token); err != nil { + // Try to see if all numeric and use it as epoch + if i, err := strconv.ParseInt(l.token, 10, 64); err == nil { + // TODO(miek): error out on > MAX_UINT32, same below + rr.Expiration = uint32(i) + } else { + return nil, &ParseError{f, "bad RRSIG Expiration", l}, "" + } + } else { + rr.Expiration = i + } + + <-c // zBlank + l = <-c + if i, err := StringToTime(l.token); err != nil { + if i, err := strconv.ParseInt(l.token, 10, 64); err == nil { + rr.Inception = uint32(i) + } else { + return nil, &ParseError{f, "bad RRSIG Inception", l}, "" + } + } else { + rr.Inception = i + } + + <-c // zBlank + l = <-c + i, err = strconv.ParseUint(l.token, 10, 16) + if err != nil || l.err { + return nil, &ParseError{f, "bad RRSIG KeyTag", l}, "" + } + rr.KeyTag = uint16(i) + + <-c // zBlank + l = <-c + rr.SignerName = l.token + name, nameOk := toAbsoluteName(l.token, o) + if l.err || !nameOk { + return nil, &ParseError{f, "bad RRSIG SignerName", l}, "" + } + rr.SignerName = name + + s, e, c1 := endingToString(c, "bad RRSIG Signature", f) + if e != nil { + return nil, e, c1 + } + rr.Signature = s + + return rr, nil, c1 +} + +func setNSEC(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(NSEC) + rr.Hdr = h + + l := <-c + rr.NextDomain = l.token + if l.length == 0 { // dynamic update rr. + return rr, nil, l.comment + } + + name, nameOk := toAbsoluteName(l.token, o) + if l.err || !nameOk { + return nil, &ParseError{f, "bad NSEC NextDomain", l}, "" + } + rr.NextDomain = name + + rr.TypeBitMap = make([]uint16, 0) + var ( + k uint16 + ok bool + ) + l = <-c + for l.value != zNewline && l.value != zEOF { + switch l.value { + case zBlank: + // Ok + case zString: + if k, ok = StringToType[l.tokenUpper]; !ok { + if k, ok = typeToInt(l.tokenUpper); !ok { + return nil, &ParseError{f, "bad NSEC TypeBitMap", l}, "" + } + } + rr.TypeBitMap = append(rr.TypeBitMap, k) + default: + return nil, &ParseError{f, "bad NSEC TypeBitMap", l}, "" + } + l = <-c + } + return rr, nil, l.comment +} + +func setNSEC3(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(NSEC3) + rr.Hdr = h + + l := <-c + if l.length == 0 { // dynamic update rr. + return rr, nil, l.comment + } + + i, e := strconv.ParseUint(l.token, 10, 8) + if e != nil || l.err { + return nil, &ParseError{f, "bad NSEC3 Hash", l}, "" + } + rr.Hash = uint8(i) + <-c // zBlank + l = <-c + i, e = strconv.ParseUint(l.token, 10, 8) + if e != nil || l.err { + return nil, &ParseError{f, "bad NSEC3 Flags", l}, "" + } + rr.Flags = uint8(i) + <-c // zBlank + l = <-c + i, e = strconv.ParseUint(l.token, 10, 16) + if e != nil || l.err { + return nil, &ParseError{f, "bad NSEC3 Iterations", l}, "" + } + rr.Iterations = uint16(i) + <-c + l = <-c + if len(l.token) == 0 || l.err { + return nil, &ParseError{f, "bad NSEC3 Salt", l}, "" + } + rr.SaltLength = uint8(len(l.token)) / 2 + rr.Salt = l.token + + <-c + l = <-c + if len(l.token) == 0 || l.err { + return nil, &ParseError{f, "bad NSEC3 NextDomain", l}, "" + } + rr.HashLength = 20 // Fix for NSEC3 (sha1 160 bits) + rr.NextDomain = l.token + + rr.TypeBitMap = make([]uint16, 0) + var ( + k uint16 + ok bool + ) + l = <-c + for l.value != zNewline && l.value != zEOF { + switch l.value { + case zBlank: + // Ok + case zString: + if k, ok = StringToType[l.tokenUpper]; !ok { + if k, ok = typeToInt(l.tokenUpper); !ok { + return nil, &ParseError{f, "bad NSEC3 TypeBitMap", l}, "" + } + } + rr.TypeBitMap = append(rr.TypeBitMap, k) + default: + return nil, &ParseError{f, "bad NSEC3 TypeBitMap", l}, "" + } + l = <-c + } + return rr, nil, l.comment +} + +func setNSEC3PARAM(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(NSEC3PARAM) + rr.Hdr = h + + l := <-c + if l.length == 0 { // dynamic update rr. + return rr, nil, "" + } + + i, e := strconv.ParseUint(l.token, 10, 8) + if e != nil || l.err { + return nil, &ParseError{f, "bad NSEC3PARAM Hash", l}, "" + } + rr.Hash = uint8(i) + <-c // zBlank + l = <-c + i, e = strconv.ParseUint(l.token, 10, 8) + if e != nil || l.err { + return nil, &ParseError{f, "bad NSEC3PARAM Flags", l}, "" + } + rr.Flags = uint8(i) + <-c // zBlank + l = <-c + i, e = strconv.ParseUint(l.token, 10, 16) + if e != nil || l.err { + return nil, &ParseError{f, "bad NSEC3PARAM Iterations", l}, "" + } + rr.Iterations = uint16(i) + <-c + l = <-c + rr.SaltLength = uint8(len(l.token)) + rr.Salt = l.token + return rr, nil, "" +} + +func setEUI48(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(EUI48) + rr.Hdr = h + + l := <-c + if l.length == 0 { // dynamic update rr. + return rr, nil, "" + } + + if l.length != 17 || l.err { + return nil, &ParseError{f, "bad EUI48 Address", l}, "" + } + addr := make([]byte, 12) + dash := 0 + for i := 0; i < 10; i += 2 { + addr[i] = l.token[i+dash] + addr[i+1] = l.token[i+1+dash] + dash++ + if l.token[i+1+dash] != '-' { + return nil, &ParseError{f, "bad EUI48 Address", l}, "" + } + } + addr[10] = l.token[15] + addr[11] = l.token[16] + + i, e := strconv.ParseUint(string(addr), 16, 48) + if e != nil { + return nil, &ParseError{f, "bad EUI48 Address", l}, "" + } + rr.Address = i + return rr, nil, "" +} + +func setEUI64(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(EUI64) + rr.Hdr = h + + l := <-c + if l.length == 0 { // dynamic update rr. + return rr, nil, "" + } + + if l.length != 23 || l.err { + return nil, &ParseError{f, "bad EUI64 Address", l}, "" + } + addr := make([]byte, 16) + dash := 0 + for i := 0; i < 14; i += 2 { + addr[i] = l.token[i+dash] + addr[i+1] = l.token[i+1+dash] + dash++ + if l.token[i+1+dash] != '-' { + return nil, &ParseError{f, "bad EUI64 Address", l}, "" + } + } + addr[14] = l.token[21] + addr[15] = l.token[22] + + i, e := strconv.ParseUint(string(addr), 16, 64) + if e != nil { + return nil, &ParseError{f, "bad EUI68 Address", l}, "" + } + rr.Address = uint64(i) + return rr, nil, "" +} + +func setSSHFP(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(SSHFP) + rr.Hdr = h + + l := <-c + if l.length == 0 { // dynamic update rr. + return rr, nil, "" + } + + i, e := strconv.ParseUint(l.token, 10, 8) + if e != nil || l.err { + return nil, &ParseError{f, "bad SSHFP Algorithm", l}, "" + } + rr.Algorithm = uint8(i) + <-c // zBlank + l = <-c + i, e = strconv.ParseUint(l.token, 10, 8) + if e != nil || l.err { + return nil, &ParseError{f, "bad SSHFP Type", l}, "" + } + rr.Type = uint8(i) + <-c // zBlank + s, e1, c1 := endingToString(c, "bad SSHFP Fingerprint", f) + if e1 != nil { + return nil, e1, c1 + } + rr.FingerPrint = s + return rr, nil, "" +} + +func setDNSKEYs(h RR_Header, c chan lex, o, f, typ string) (RR, *ParseError, string) { + rr := new(DNSKEY) + rr.Hdr = h + + l := <-c + if l.length == 0 { // dynamic update rr. + return rr, nil, l.comment + } + + i, e := strconv.ParseUint(l.token, 10, 16) + if e != nil || l.err { + return nil, &ParseError{f, "bad " + typ + " Flags", l}, "" + } + rr.Flags = uint16(i) + <-c // zBlank + l = <-c // zString + i, e = strconv.ParseUint(l.token, 10, 8) + if e != nil || l.err { + return nil, &ParseError{f, "bad " + typ + " Protocol", l}, "" + } + rr.Protocol = uint8(i) + <-c // zBlank + l = <-c // zString + i, e = strconv.ParseUint(l.token, 10, 8) + if e != nil || l.err { + return nil, &ParseError{f, "bad " + typ + " Algorithm", l}, "" + } + rr.Algorithm = uint8(i) + s, e1, c1 := endingToString(c, "bad "+typ+" PublicKey", f) + if e1 != nil { + return nil, e1, c1 + } + rr.PublicKey = s + return rr, nil, c1 +} + +func setKEY(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + r, e, s := setDNSKEYs(h, c, o, f, "KEY") + if r != nil { + return &KEY{*r.(*DNSKEY)}, e, s + } + return nil, e, s +} + +func setDNSKEY(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + r, e, s := setDNSKEYs(h, c, o, f, "DNSKEY") + return r, e, s +} + +func setCDNSKEY(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + r, e, s := setDNSKEYs(h, c, o, f, "CDNSKEY") + if r != nil { + return &CDNSKEY{*r.(*DNSKEY)}, e, s + } + return nil, e, s +} + +func setRKEY(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(RKEY) + rr.Hdr = h + + l := <-c + if l.length == 0 { // dynamic update rr. + return rr, nil, l.comment + } + + i, e := strconv.ParseUint(l.token, 10, 16) + if e != nil || l.err { + return nil, &ParseError{f, "bad RKEY Flags", l}, "" + } + rr.Flags = uint16(i) + <-c // zBlank + l = <-c // zString + i, e = strconv.ParseUint(l.token, 10, 8) + if e != nil || l.err { + return nil, &ParseError{f, "bad RKEY Protocol", l}, "" + } + rr.Protocol = uint8(i) + <-c // zBlank + l = <-c // zString + i, e = strconv.ParseUint(l.token, 10, 8) + if e != nil || l.err { + return nil, &ParseError{f, "bad RKEY Algorithm", l}, "" + } + rr.Algorithm = uint8(i) + s, e1, c1 := endingToString(c, "bad RKEY PublicKey", f) + if e1 != nil { + return nil, e1, c1 + } + rr.PublicKey = s + return rr, nil, c1 +} + +func setEID(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(EID) + rr.Hdr = h + s, e, c1 := endingToString(c, "bad EID Endpoint", f) + if e != nil { + return nil, e, c1 + } + rr.Endpoint = s + return rr, nil, c1 +} + +func setNIMLOC(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(NIMLOC) + rr.Hdr = h + s, e, c1 := endingToString(c, "bad NIMLOC Locator", f) + if e != nil { + return nil, e, c1 + } + rr.Locator = s + return rr, nil, c1 +} + +func setGPOS(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(GPOS) + rr.Hdr = h + + l := <-c + if l.length == 0 { // dynamic update rr. + return rr, nil, "" + } + + _, e := strconv.ParseFloat(l.token, 64) + if e != nil || l.err { + return nil, &ParseError{f, "bad GPOS Longitude", l}, "" + } + rr.Longitude = l.token + <-c // zBlank + l = <-c + _, e = strconv.ParseFloat(l.token, 64) + if e != nil || l.err { + return nil, &ParseError{f, "bad GPOS Latitude", l}, "" + } + rr.Latitude = l.token + <-c // zBlank + l = <-c + _, e = strconv.ParseFloat(l.token, 64) + if e != nil || l.err { + return nil, &ParseError{f, "bad GPOS Altitude", l}, "" + } + rr.Altitude = l.token + return rr, nil, "" +} + +func setDSs(h RR_Header, c chan lex, o, f, typ string) (RR, *ParseError, string) { + rr := new(DS) + rr.Hdr = h + + l := <-c + if l.length == 0 { // dynamic update rr. + return rr, nil, l.comment + } + + i, e := strconv.ParseUint(l.token, 10, 16) + if e != nil || l.err { + return nil, &ParseError{f, "bad " + typ + " KeyTag", l}, "" + } + rr.KeyTag = uint16(i) + <-c // zBlank + l = <-c + if i, e = strconv.ParseUint(l.token, 10, 8); e != nil { + i, ok := StringToAlgorithm[l.tokenUpper] + if !ok || l.err { + return nil, &ParseError{f, "bad " + typ + " Algorithm", l}, "" + } + rr.Algorithm = i + } else { + rr.Algorithm = uint8(i) + } + <-c // zBlank + l = <-c + i, e = strconv.ParseUint(l.token, 10, 8) + if e != nil || l.err { + return nil, &ParseError{f, "bad " + typ + " DigestType", l}, "" + } + rr.DigestType = uint8(i) + s, e1, c1 := endingToString(c, "bad "+typ+" Digest", f) + if e1 != nil { + return nil, e1, c1 + } + rr.Digest = s + return rr, nil, c1 +} + +func setDS(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + r, e, s := setDSs(h, c, o, f, "DS") + return r, e, s +} + +func setDLV(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + r, e, s := setDSs(h, c, o, f, "DLV") + if r != nil { + return &DLV{*r.(*DS)}, e, s + } + return nil, e, s +} + +func setCDS(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + r, e, s := setDSs(h, c, o, f, "CDS") + if r != nil { + return &CDS{*r.(*DS)}, e, s + } + return nil, e, s +} + +func setTA(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(TA) + rr.Hdr = h + + l := <-c + if l.length == 0 { // dynamic update rr. + return rr, nil, l.comment + } + + i, e := strconv.ParseUint(l.token, 10, 16) + if e != nil || l.err { + return nil, &ParseError{f, "bad TA KeyTag", l}, "" + } + rr.KeyTag = uint16(i) + <-c // zBlank + l = <-c + if i, e := strconv.ParseUint(l.token, 10, 8); e != nil { + i, ok := StringToAlgorithm[l.tokenUpper] + if !ok || l.err { + return nil, &ParseError{f, "bad TA Algorithm", l}, "" + } + rr.Algorithm = i + } else { + rr.Algorithm = uint8(i) + } + <-c // zBlank + l = <-c + i, e = strconv.ParseUint(l.token, 10, 8) + if e != nil || l.err { + return nil, &ParseError{f, "bad TA DigestType", l}, "" + } + rr.DigestType = uint8(i) + s, e, c1 := endingToString(c, "bad TA Digest", f) + if e != nil { + return nil, e.(*ParseError), c1 + } + rr.Digest = s + return rr, nil, c1 +} + +func setTLSA(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(TLSA) + rr.Hdr = h + + l := <-c + if l.length == 0 { // dynamic update rr. + return rr, nil, l.comment + } + + i, e := strconv.ParseUint(l.token, 10, 8) + if e != nil || l.err { + return nil, &ParseError{f, "bad TLSA Usage", l}, "" + } + rr.Usage = uint8(i) + <-c // zBlank + l = <-c + i, e = strconv.ParseUint(l.token, 10, 8) + if e != nil || l.err { + return nil, &ParseError{f, "bad TLSA Selector", l}, "" + } + rr.Selector = uint8(i) + <-c // zBlank + l = <-c + i, e = strconv.ParseUint(l.token, 10, 8) + if e != nil || l.err { + return nil, &ParseError{f, "bad TLSA MatchingType", l}, "" + } + rr.MatchingType = uint8(i) + // So this needs be e2 (i.e. different than e), because...??t + s, e2, c1 := endingToString(c, "bad TLSA Certificate", f) + if e2 != nil { + return nil, e2, c1 + } + rr.Certificate = s + return rr, nil, c1 +} + +func setSMIMEA(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(SMIMEA) + rr.Hdr = h + + l := <-c + if l.length == 0 { // dynamic update rr. + return rr, nil, l.comment + } + + i, e := strconv.ParseUint(l.token, 10, 8) + if e != nil || l.err { + return nil, &ParseError{f, "bad SMIMEA Usage", l}, "" + } + rr.Usage = uint8(i) + <-c // zBlank + l = <-c + i, e = strconv.ParseUint(l.token, 10, 8) + if e != nil || l.err { + return nil, &ParseError{f, "bad SMIMEA Selector", l}, "" + } + rr.Selector = uint8(i) + <-c // zBlank + l = <-c + i, e = strconv.ParseUint(l.token, 10, 8) + if e != nil || l.err { + return nil, &ParseError{f, "bad SMIMEA MatchingType", l}, "" + } + rr.MatchingType = uint8(i) + // So this needs be e2 (i.e. different than e), because...??t + s, e2, c1 := endingToString(c, "bad SMIMEA Certificate", f) + if e2 != nil { + return nil, e2, c1 + } + rr.Certificate = s + return rr, nil, c1 +} + +func setRFC3597(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(RFC3597) + rr.Hdr = h + + l := <-c + if l.token != "\\#" { + return nil, &ParseError{f, "bad RFC3597 Rdata", l}, "" + } + + <-c // zBlank + l = <-c + rdlength, e := strconv.Atoi(l.token) + if e != nil || l.err { + return nil, &ParseError{f, "bad RFC3597 Rdata ", l}, "" + } + + s, e1, c1 := endingToString(c, "bad RFC3597 Rdata", f) + if e1 != nil { + return nil, e1, c1 + } + if rdlength*2 != len(s) { + return nil, &ParseError{f, "bad RFC3597 Rdata", l}, "" + } + rr.Rdata = s + return rr, nil, c1 +} + +func setSPF(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(SPF) + rr.Hdr = h + + s, e, c1 := endingToTxtSlice(c, "bad SPF Txt", f) + if e != nil { + return nil, e, "" + } + rr.Txt = s + return rr, nil, c1 +} + +func setAVC(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(AVC) + rr.Hdr = h + + s, e, c1 := endingToTxtSlice(c, "bad AVC Txt", f) + if e != nil { + return nil, e, "" + } + rr.Txt = s + return rr, nil, c1 +} + +func setTXT(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(TXT) + rr.Hdr = h + + // no zBlank reading here, because all this rdata is TXT + s, e, c1 := endingToTxtSlice(c, "bad TXT Txt", f) + if e != nil { + return nil, e, "" + } + rr.Txt = s + return rr, nil, c1 +} + +// identical to setTXT +func setNINFO(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(NINFO) + rr.Hdr = h + + s, e, c1 := endingToTxtSlice(c, "bad NINFO ZSData", f) + if e != nil { + return nil, e, "" + } + rr.ZSData = s + return rr, nil, c1 +} + +func setURI(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(URI) + rr.Hdr = h + + l := <-c + if l.length == 0 { // dynamic update rr. + return rr, nil, "" + } + + i, e := strconv.ParseUint(l.token, 10, 16) + if e != nil || l.err { + return nil, &ParseError{f, "bad URI Priority", l}, "" + } + rr.Priority = uint16(i) + <-c // zBlank + l = <-c + i, e = strconv.ParseUint(l.token, 10, 16) + if e != nil || l.err { + return nil, &ParseError{f, "bad URI Weight", l}, "" + } + rr.Weight = uint16(i) + + <-c // zBlank + s, err, c1 := endingToTxtSlice(c, "bad URI Target", f) + if err != nil { + return nil, err, "" + } + if len(s) != 1 { + return nil, &ParseError{f, "bad URI Target", l}, "" + } + rr.Target = s[0] + return rr, nil, c1 +} + +func setDHCID(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + // awesome record to parse! + rr := new(DHCID) + rr.Hdr = h + + s, e, c1 := endingToString(c, "bad DHCID Digest", f) + if e != nil { + return nil, e, c1 + } + rr.Digest = s + return rr, nil, c1 +} + +func setNID(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(NID) + rr.Hdr = h + + l := <-c + if l.length == 0 { // dynamic update rr. + return rr, nil, "" + } + + i, e := strconv.ParseUint(l.token, 10, 16) + if e != nil || l.err { + return nil, &ParseError{f, "bad NID Preference", l}, "" + } + rr.Preference = uint16(i) + <-c // zBlank + l = <-c // zString + u, err := stringToNodeID(l) + if err != nil || l.err { + return nil, err, "" + } + rr.NodeID = u + return rr, nil, "" +} + +func setL32(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(L32) + rr.Hdr = h + + l := <-c + if l.length == 0 { // dynamic update rr. + return rr, nil, "" + } + + i, e := strconv.ParseUint(l.token, 10, 16) + if e != nil || l.err { + return nil, &ParseError{f, "bad L32 Preference", l}, "" + } + rr.Preference = uint16(i) + <-c // zBlank + l = <-c // zString + rr.Locator32 = net.ParseIP(l.token) + if rr.Locator32 == nil || l.err { + return nil, &ParseError{f, "bad L32 Locator", l}, "" + } + return rr, nil, "" +} + +func setLP(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(LP) + rr.Hdr = h + + l := <-c + if l.length == 0 { // dynamic update rr. + return rr, nil, "" + } + + i, e := strconv.ParseUint(l.token, 10, 16) + if e != nil || l.err { + return nil, &ParseError{f, "bad LP Preference", l}, "" + } + rr.Preference = uint16(i) + + <-c // zBlank + l = <-c // zString + rr.Fqdn = l.token + name, nameOk := toAbsoluteName(l.token, o) + if l.err || !nameOk { + return nil, &ParseError{f, "bad LP Fqdn", l}, "" + } + rr.Fqdn = name + + return rr, nil, "" +} + +func setL64(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(L64) + rr.Hdr = h + + l := <-c + if l.length == 0 { // dynamic update rr. + return rr, nil, "" + } + + i, e := strconv.ParseUint(l.token, 10, 16) + if e != nil || l.err { + return nil, &ParseError{f, "bad L64 Preference", l}, "" + } + rr.Preference = uint16(i) + <-c // zBlank + l = <-c // zString + u, err := stringToNodeID(l) + if err != nil || l.err { + return nil, err, "" + } + rr.Locator64 = u + return rr, nil, "" +} + +func setUID(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(UID) + rr.Hdr = h + + l := <-c + if l.length == 0 { // dynamic update rr. + return rr, nil, "" + } + + i, e := strconv.ParseUint(l.token, 10, 32) + if e != nil || l.err { + return nil, &ParseError{f, "bad UID Uid", l}, "" + } + rr.Uid = uint32(i) + return rr, nil, "" +} + +func setGID(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(GID) + rr.Hdr = h + + l := <-c + if l.length == 0 { // dynamic update rr. + return rr, nil, "" + } + + i, e := strconv.ParseUint(l.token, 10, 32) + if e != nil || l.err { + return nil, &ParseError{f, "bad GID Gid", l}, "" + } + rr.Gid = uint32(i) + return rr, nil, "" +} + +func setUINFO(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(UINFO) + rr.Hdr = h + + s, e, c1 := endingToTxtSlice(c, "bad UINFO Uinfo", f) + if e != nil { + return nil, e, c1 + } + if ln := len(s); ln == 0 { + return rr, nil, c1 + } + rr.Uinfo = s[0] // silently discard anything after the first character-string + return rr, nil, c1 +} + +func setPX(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(PX) + rr.Hdr = h + + l := <-c + if l.length == 0 { // dynamic update rr. + return rr, nil, "" + } + + i, e := strconv.ParseUint(l.token, 10, 16) + if e != nil || l.err { + return nil, &ParseError{f, "bad PX Preference", l}, "" + } + rr.Preference = uint16(i) + + <-c // zBlank + l = <-c // zString + rr.Map822 = l.token + map822, map822Ok := toAbsoluteName(l.token, o) + if l.err || !map822Ok { + return nil, &ParseError{f, "bad PX Map822", l}, "" + } + rr.Map822 = map822 + + <-c // zBlank + l = <-c // zString + rr.Mapx400 = l.token + mapx400, mapx400Ok := toAbsoluteName(l.token, o) + if l.err || !mapx400Ok { + return nil, &ParseError{f, "bad PX Mapx400", l}, "" + } + rr.Mapx400 = mapx400 + + return rr, nil, "" +} + +func setCAA(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(CAA) + rr.Hdr = h + + l := <-c + if l.length == 0 { // dynamic update rr. + return rr, nil, l.comment + } + + i, err := strconv.ParseUint(l.token, 10, 8) + if err != nil || l.err { + return nil, &ParseError{f, "bad CAA Flag", l}, "" + } + rr.Flag = uint8(i) + + <-c // zBlank + l = <-c // zString + if l.value != zString { + return nil, &ParseError{f, "bad CAA Tag", l}, "" + } + rr.Tag = l.token + + <-c // zBlank + s, e, c1 := endingToTxtSlice(c, "bad CAA Value", f) + if e != nil { + return nil, e, "" + } + if len(s) != 1 { + return nil, &ParseError{f, "bad CAA Value", l}, "" + } + rr.Value = s[0] + return rr, nil, c1 +} + +func setTKEY(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { + rr := new(TKEY) + rr.Hdr = h + + l := <-c + + // Algorithm + if l.value != zString { + return nil, &ParseError{f, "bad TKEY algorithm", l}, "" + } + rr.Algorithm = l.token + <-c // zBlank + + // Get the key length and key values + l = <-c + i, err := strconv.ParseUint(l.token, 10, 8) + if err != nil || l.err { + return nil, &ParseError{f, "bad TKEY key length", l}, "" + } + rr.KeySize = uint16(i) + <-c // zBlank + l = <-c + if l.value != zString { + return nil, &ParseError{f, "bad TKEY key", l}, "" + } + rr.Key = l.token + <-c // zBlank + + // Get the otherdata length and string data + l = <-c + i, err = strconv.ParseUint(l.token, 10, 8) + if err != nil || l.err { + return nil, &ParseError{f, "bad TKEY otherdata length", l}, "" + } + rr.OtherLen = uint16(i) + <-c // zBlank + l = <-c + if l.value != zString { + return nil, &ParseError{f, "bad TKEY otherday", l}, "" + } + rr.OtherData = l.token + + return rr, nil, "" +} + +var typeToparserFunc = map[uint16]parserFunc{ + TypeAAAA: {setAAAA, false}, + TypeAFSDB: {setAFSDB, false}, + TypeA: {setA, false}, + TypeCAA: {setCAA, true}, + TypeCDS: {setCDS, true}, + TypeCDNSKEY: {setCDNSKEY, true}, + TypeCERT: {setCERT, true}, + TypeCNAME: {setCNAME, false}, + TypeCSYNC: {setCSYNC, true}, + TypeDHCID: {setDHCID, true}, + TypeDLV: {setDLV, true}, + TypeDNAME: {setDNAME, false}, + TypeKEY: {setKEY, true}, + TypeDNSKEY: {setDNSKEY, true}, + TypeDS: {setDS, true}, + TypeEID: {setEID, true}, + TypeEUI48: {setEUI48, false}, + TypeEUI64: {setEUI64, false}, + TypeGID: {setGID, false}, + TypeGPOS: {setGPOS, false}, + TypeHINFO: {setHINFO, true}, + TypeHIP: {setHIP, true}, + TypeKX: {setKX, false}, + TypeL32: {setL32, false}, + TypeL64: {setL64, false}, + TypeLOC: {setLOC, true}, + TypeLP: {setLP, false}, + TypeMB: {setMB, false}, + TypeMD: {setMD, false}, + TypeMF: {setMF, false}, + TypeMG: {setMG, false}, + TypeMINFO: {setMINFO, false}, + TypeMR: {setMR, false}, + TypeMX: {setMX, false}, + TypeNAPTR: {setNAPTR, false}, + TypeNID: {setNID, false}, + TypeNIMLOC: {setNIMLOC, true}, + TypeNINFO: {setNINFO, true}, + TypeNSAPPTR: {setNSAPPTR, false}, + TypeNSEC3PARAM: {setNSEC3PARAM, false}, + TypeNSEC3: {setNSEC3, true}, + TypeNSEC: {setNSEC, true}, + TypeNS: {setNS, false}, + TypeOPENPGPKEY: {setOPENPGPKEY, true}, + TypePTR: {setPTR, false}, + TypePX: {setPX, false}, + TypeSIG: {setSIG, true}, + TypeRKEY: {setRKEY, true}, + TypeRP: {setRP, false}, + TypeRRSIG: {setRRSIG, true}, + TypeRT: {setRT, false}, + TypeSMIMEA: {setSMIMEA, true}, + TypeSOA: {setSOA, false}, + TypeSPF: {setSPF, true}, + TypeAVC: {setAVC, true}, + TypeSRV: {setSRV, false}, + TypeSSHFP: {setSSHFP, true}, + TypeTALINK: {setTALINK, false}, + TypeTA: {setTA, true}, + TypeTLSA: {setTLSA, true}, + TypeTXT: {setTXT, true}, + TypeUID: {setUID, false}, + TypeUINFO: {setUINFO, true}, + TypeURI: {setURI, true}, + TypeX25: {setX25, false}, + TypeTKEY: {setTKEY, true}, +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/scanner.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/scanner.go new file mode 100644 index 000000000..424e5af9f --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/scanner.go @@ -0,0 +1,56 @@ +package dns + +// Implement a simple scanner, return a byte stream from an io reader. + +import ( + "bufio" + "context" + "io" + "text/scanner" +) + +type scan struct { + src *bufio.Reader + position scanner.Position + eof bool // Have we just seen a eof + ctx context.Context +} + +func scanInit(r io.Reader) (*scan, context.CancelFunc) { + s := new(scan) + s.src = bufio.NewReader(r) + s.position.Line = 1 + + ctx, cancel := context.WithCancel(context.Background()) + s.ctx = ctx + + return s, cancel +} + +// tokenText returns the next byte from the input +func (s *scan) tokenText() (byte, error) { + c, err := s.src.ReadByte() + if err != nil { + return c, err + } + select { + case <-s.ctx.Done(): + return c, context.Canceled + default: + break + } + + // delay the newline handling until the next token is delivered, + // fixes off-by-one errors when reporting a parse error. + if s.eof == true { + s.position.Line++ + s.position.Column = 0 + s.eof = false + } + if c == '\n' { + s.eof = true + return c, nil + } + s.position.Column++ + return c, nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/server.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/server.go new file mode 100644 index 000000000..685753f43 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/server.go @@ -0,0 +1,719 @@ +// DNS server implementation. + +package dns + +import ( + "bytes" + "crypto/tls" + "encoding/binary" + "io" + "net" + "sync" + "time" +) + +// Maximum number of TCP queries before we close the socket. +const maxTCPQueries = 128 + +// Handler is implemented by any value that implements ServeDNS. +type Handler interface { + ServeDNS(w ResponseWriter, r *Msg) +} + +// A ResponseWriter interface is used by an DNS handler to +// construct an DNS response. +type ResponseWriter interface { + // LocalAddr returns the net.Addr of the server + LocalAddr() net.Addr + // RemoteAddr returns the net.Addr of the client that sent the current request. + RemoteAddr() net.Addr + // WriteMsg writes a reply back to the client. + WriteMsg(*Msg) error + // Write writes a raw buffer back to the client. + Write([]byte) (int, error) + // Close closes the connection. + Close() error + // TsigStatus returns the status of the Tsig. + TsigStatus() error + // TsigTimersOnly sets the tsig timers only boolean. + TsigTimersOnly(bool) + // Hijack lets the caller take over the connection. + // After a call to Hijack(), the DNS package will not do anything with the connection. + Hijack() +} + +type response struct { + hijacked bool // connection has been hijacked by handler + tsigStatus error + tsigTimersOnly bool + tsigRequestMAC string + tsigSecret map[string]string // the tsig secrets + udp *net.UDPConn // i/o connection if UDP was used + tcp net.Conn // i/o connection if TCP was used + udpSession *SessionUDP // oob data to get egress interface right + remoteAddr net.Addr // address of the client + writer Writer // writer to output the raw DNS bits +} + +// ServeMux is an DNS request multiplexer. It matches the +// zone name of each incoming request against a list of +// registered patterns add calls the handler for the pattern +// that most closely matches the zone name. ServeMux is DNSSEC aware, meaning +// that queries for the DS record are redirected to the parent zone (if that +// is also registered), otherwise the child gets the query. +// ServeMux is also safe for concurrent access from multiple goroutines. +type ServeMux struct { + z map[string]Handler + m *sync.RWMutex +} + +// NewServeMux allocates and returns a new ServeMux. +func NewServeMux() *ServeMux { return &ServeMux{z: make(map[string]Handler), m: new(sync.RWMutex)} } + +// DefaultServeMux is the default ServeMux used by Serve. +var DefaultServeMux = NewServeMux() + +// The HandlerFunc type is an adapter to allow the use of +// ordinary functions as DNS handlers. If f is a function +// with the appropriate signature, HandlerFunc(f) is a +// Handler object that calls f. +type HandlerFunc func(ResponseWriter, *Msg) + +// ServeDNS calls f(w, r). +func (f HandlerFunc) ServeDNS(w ResponseWriter, r *Msg) { + f(w, r) +} + +// HandleFailed returns a HandlerFunc that returns SERVFAIL for every request it gets. +func HandleFailed(w ResponseWriter, r *Msg) { + m := new(Msg) + m.SetRcode(r, RcodeServerFailure) + // does not matter if this write fails + w.WriteMsg(m) +} + +func failedHandler() Handler { return HandlerFunc(HandleFailed) } + +// ListenAndServe Starts a server on address and network specified Invoke handler +// for incoming queries. +func ListenAndServe(addr string, network string, handler Handler) error { + server := &Server{Addr: addr, Net: network, Handler: handler} + return server.ListenAndServe() +} + +// ListenAndServeTLS acts like http.ListenAndServeTLS, more information in +// http://golang.org/pkg/net/http/#ListenAndServeTLS +func ListenAndServeTLS(addr, certFile, keyFile string, handler Handler) error { + cert, err := tls.LoadX509KeyPair(certFile, keyFile) + if err != nil { + return err + } + + config := tls.Config{ + Certificates: []tls.Certificate{cert}, + } + + server := &Server{ + Addr: addr, + Net: "tcp-tls", + TLSConfig: &config, + Handler: handler, + } + + return server.ListenAndServe() +} + +// ActivateAndServe activates a server with a listener from systemd, +// l and p should not both be non-nil. +// If both l and p are not nil only p will be used. +// Invoke handler for incoming queries. +func ActivateAndServe(l net.Listener, p net.PacketConn, handler Handler) error { + server := &Server{Listener: l, PacketConn: p, Handler: handler} + return server.ActivateAndServe() +} + +func (mux *ServeMux) match(q string, t uint16) Handler { + mux.m.RLock() + defer mux.m.RUnlock() + var handler Handler + b := make([]byte, len(q)) // worst case, one label of length q + off := 0 + end := false + for { + l := len(q[off:]) + for i := 0; i < l; i++ { + b[i] = q[off+i] + if b[i] >= 'A' && b[i] <= 'Z' { + b[i] |= ('a' - 'A') + } + } + if h, ok := mux.z[string(b[:l])]; ok { // causes garbage, might want to change the map key + if t != TypeDS { + return h + } + // Continue for DS to see if we have a parent too, if so delegeate to the parent + handler = h + } + off, end = NextLabel(q, off) + if end { + break + } + } + // Wildcard match, if we have found nothing try the root zone as a last resort. + if h, ok := mux.z["."]; ok { + return h + } + return handler +} + +// Handle adds a handler to the ServeMux for pattern. +func (mux *ServeMux) Handle(pattern string, handler Handler) { + if pattern == "" { + panic("dns: invalid pattern " + pattern) + } + mux.m.Lock() + mux.z[Fqdn(pattern)] = handler + mux.m.Unlock() +} + +// HandleFunc adds a handler function to the ServeMux for pattern. +func (mux *ServeMux) HandleFunc(pattern string, handler func(ResponseWriter, *Msg)) { + mux.Handle(pattern, HandlerFunc(handler)) +} + +// HandleRemove deregistrars the handler specific for pattern from the ServeMux. +func (mux *ServeMux) HandleRemove(pattern string) { + if pattern == "" { + panic("dns: invalid pattern " + pattern) + } + mux.m.Lock() + delete(mux.z, Fqdn(pattern)) + mux.m.Unlock() +} + +// ServeDNS dispatches the request to the handler whose +// pattern most closely matches the request message. If DefaultServeMux +// is used the correct thing for DS queries is done: a possible parent +// is sought. +// If no handler is found a standard SERVFAIL message is returned +// If the request message does not have exactly one question in the +// question section a SERVFAIL is returned, unlesss Unsafe is true. +func (mux *ServeMux) ServeDNS(w ResponseWriter, request *Msg) { + var h Handler + if len(request.Question) < 1 { // allow more than one question + h = failedHandler() + } else { + if h = mux.match(request.Question[0].Name, request.Question[0].Qtype); h == nil { + h = failedHandler() + } + } + h.ServeDNS(w, request) +} + +// Handle registers the handler with the given pattern +// in the DefaultServeMux. The documentation for +// ServeMux explains how patterns are matched. +func Handle(pattern string, handler Handler) { DefaultServeMux.Handle(pattern, handler) } + +// HandleRemove deregisters the handle with the given pattern +// in the DefaultServeMux. +func HandleRemove(pattern string) { DefaultServeMux.HandleRemove(pattern) } + +// HandleFunc registers the handler function with the given pattern +// in the DefaultServeMux. +func HandleFunc(pattern string, handler func(ResponseWriter, *Msg)) { + DefaultServeMux.HandleFunc(pattern, handler) +} + +// Writer writes raw DNS messages; each call to Write should send an entire message. +type Writer interface { + io.Writer +} + +// Reader reads raw DNS messages; each call to ReadTCP or ReadUDP should return an entire message. +type Reader interface { + // ReadTCP reads a raw message from a TCP connection. Implementations may alter + // connection properties, for example the read-deadline. + ReadTCP(conn net.Conn, timeout time.Duration) ([]byte, error) + // ReadUDP reads a raw message from a UDP connection. Implementations may alter + // connection properties, for example the read-deadline. + ReadUDP(conn *net.UDPConn, timeout time.Duration) ([]byte, *SessionUDP, error) +} + +// defaultReader is an adapter for the Server struct that implements the Reader interface +// using the readTCP and readUDP func of the embedded Server. +type defaultReader struct { + *Server +} + +func (dr *defaultReader) ReadTCP(conn net.Conn, timeout time.Duration) ([]byte, error) { + return dr.readTCP(conn, timeout) +} + +func (dr *defaultReader) ReadUDP(conn *net.UDPConn, timeout time.Duration) ([]byte, *SessionUDP, error) { + return dr.readUDP(conn, timeout) +} + +// DecorateReader is a decorator hook for extending or supplanting the functionality of a Reader. +// Implementations should never return a nil Reader. +type DecorateReader func(Reader) Reader + +// DecorateWriter is a decorator hook for extending or supplanting the functionality of a Writer. +// Implementations should never return a nil Writer. +type DecorateWriter func(Writer) Writer + +// A Server defines parameters for running an DNS server. +type Server struct { + // Address to listen on, ":dns" if empty. + Addr string + // if "tcp" or "tcp-tls" (DNS over TLS) it will invoke a TCP listener, otherwise an UDP one + Net string + // TCP Listener to use, this is to aid in systemd's socket activation. + Listener net.Listener + // TLS connection configuration + TLSConfig *tls.Config + // UDP "Listener" to use, this is to aid in systemd's socket activation. + PacketConn net.PacketConn + // Handler to invoke, dns.DefaultServeMux if nil. + Handler Handler + // Default buffer size to use to read incoming UDP messages. If not set + // it defaults to MinMsgSize (512 B). + UDPSize int + // The net.Conn.SetReadTimeout value for new connections, defaults to 2 * time.Second. + ReadTimeout time.Duration + // The net.Conn.SetWriteTimeout value for new connections, defaults to 2 * time.Second. + WriteTimeout time.Duration + // TCP idle timeout for multiple queries, if nil, defaults to 8 * time.Second (RFC 5966). + IdleTimeout func() time.Duration + // Secret(s) for Tsig map[]. The zonename must be in canonical form (lowercase, fqdn, see RFC 4034 Section 6.2). + TsigSecret map[string]string + // Unsafe instructs the server to disregard any sanity checks and directly hand the message to + // the handler. It will specifically not check if the query has the QR bit not set. + Unsafe bool + // If NotifyStartedFunc is set it is called once the server has started listening. + NotifyStartedFunc func() + // DecorateReader is optional, allows customization of the process that reads raw DNS messages. + DecorateReader DecorateReader + // DecorateWriter is optional, allows customization of the process that writes raw DNS messages. + DecorateWriter DecorateWriter + + // Shutdown handling + lock sync.RWMutex + started bool +} + +// ListenAndServe starts a nameserver on the configured address in *Server. +func (srv *Server) ListenAndServe() error { + srv.lock.Lock() + defer srv.lock.Unlock() + if srv.started { + return &Error{err: "server already started"} + } + addr := srv.Addr + if addr == "" { + addr = ":domain" + } + if srv.UDPSize == 0 { + srv.UDPSize = MinMsgSize + } + switch srv.Net { + case "tcp", "tcp4", "tcp6": + a, err := net.ResolveTCPAddr(srv.Net, addr) + if err != nil { + return err + } + l, err := net.ListenTCP(srv.Net, a) + if err != nil { + return err + } + srv.Listener = l + srv.started = true + srv.lock.Unlock() + err = srv.serveTCP(l) + srv.lock.Lock() // to satisfy the defer at the top + return err + case "tcp-tls", "tcp4-tls", "tcp6-tls": + network := "tcp" + if srv.Net == "tcp4-tls" { + network = "tcp4" + } else if srv.Net == "tcp6-tls" { + network = "tcp6" + } + + l, err := tls.Listen(network, addr, srv.TLSConfig) + if err != nil { + return err + } + srv.Listener = l + srv.started = true + srv.lock.Unlock() + err = srv.serveTCP(l) + srv.lock.Lock() // to satisfy the defer at the top + return err + case "udp", "udp4", "udp6": + a, err := net.ResolveUDPAddr(srv.Net, addr) + if err != nil { + return err + } + l, err := net.ListenUDP(srv.Net, a) + if err != nil { + return err + } + if e := setUDPSocketOptions(l); e != nil { + return e + } + srv.PacketConn = l + srv.started = true + srv.lock.Unlock() + err = srv.serveUDP(l) + srv.lock.Lock() // to satisfy the defer at the top + return err + } + return &Error{err: "bad network"} +} + +// ActivateAndServe starts a nameserver with the PacketConn or Listener +// configured in *Server. Its main use is to start a server from systemd. +func (srv *Server) ActivateAndServe() error { + srv.lock.Lock() + defer srv.lock.Unlock() + if srv.started { + return &Error{err: "server already started"} + } + pConn := srv.PacketConn + l := srv.Listener + if pConn != nil { + if srv.UDPSize == 0 { + srv.UDPSize = MinMsgSize + } + // Check PacketConn interface's type is valid and value + // is not nil + if t, ok := pConn.(*net.UDPConn); ok && t != nil { + if e := setUDPSocketOptions(t); e != nil { + return e + } + srv.started = true + srv.lock.Unlock() + e := srv.serveUDP(t) + srv.lock.Lock() // to satisfy the defer at the top + return e + } + } + if l != nil { + srv.started = true + srv.lock.Unlock() + e := srv.serveTCP(l) + srv.lock.Lock() // to satisfy the defer at the top + return e + } + return &Error{err: "bad listeners"} +} + +// Shutdown shuts down a server. After a call to Shutdown, ListenAndServe and +// ActivateAndServe will return. +func (srv *Server) Shutdown() error { + srv.lock.Lock() + if !srv.started { + srv.lock.Unlock() + return &Error{err: "server not started"} + } + srv.started = false + srv.lock.Unlock() + + if srv.PacketConn != nil { + srv.PacketConn.Close() + } + if srv.Listener != nil { + srv.Listener.Close() + } + return nil +} + +// getReadTimeout is a helper func to use system timeout if server did not intend to change it. +func (srv *Server) getReadTimeout() time.Duration { + rtimeout := dnsTimeout + if srv.ReadTimeout != 0 { + rtimeout = srv.ReadTimeout + } + return rtimeout +} + +// serveTCP starts a TCP listener for the server. +// Each request is handled in a separate goroutine. +func (srv *Server) serveTCP(l net.Listener) error { + defer l.Close() + + if srv.NotifyStartedFunc != nil { + srv.NotifyStartedFunc() + } + + reader := Reader(&defaultReader{srv}) + if srv.DecorateReader != nil { + reader = srv.DecorateReader(reader) + } + + handler := srv.Handler + if handler == nil { + handler = DefaultServeMux + } + rtimeout := srv.getReadTimeout() + // deadline is not used here + for { + rw, err := l.Accept() + srv.lock.RLock() + if !srv.started { + srv.lock.RUnlock() + return nil + } + srv.lock.RUnlock() + if err != nil { + if neterr, ok := err.(net.Error); ok && neterr.Temporary() { + continue + } + return err + } + go func() { + m, err := reader.ReadTCP(rw, rtimeout) + if err != nil { + rw.Close() + return + } + srv.serve(rw.RemoteAddr(), handler, m, nil, nil, rw) + }() + } +} + +// serveUDP starts a UDP listener for the server. +// Each request is handled in a separate goroutine. +func (srv *Server) serveUDP(l *net.UDPConn) error { + defer l.Close() + + if srv.NotifyStartedFunc != nil { + srv.NotifyStartedFunc() + } + + reader := Reader(&defaultReader{srv}) + if srv.DecorateReader != nil { + reader = srv.DecorateReader(reader) + } + + handler := srv.Handler + if handler == nil { + handler = DefaultServeMux + } + rtimeout := srv.getReadTimeout() + // deadline is not used here + for { + m, s, err := reader.ReadUDP(l, rtimeout) + srv.lock.RLock() + if !srv.started { + srv.lock.RUnlock() + return nil + } + srv.lock.RUnlock() + if err != nil { + if netErr, ok := err.(net.Error); ok && netErr.Temporary() { + continue + } + return err + } + if len(m) < headerSize { + continue + } + go srv.serve(s.RemoteAddr(), handler, m, l, s, nil) + } +} + +// Serve a new connection. +func (srv *Server) serve(a net.Addr, h Handler, m []byte, u *net.UDPConn, s *SessionUDP, t net.Conn) { + w := &response{tsigSecret: srv.TsigSecret, udp: u, tcp: t, remoteAddr: a, udpSession: s} + if srv.DecorateWriter != nil { + w.writer = srv.DecorateWriter(w) + } else { + w.writer = w + } + + q := 0 // counter for the amount of TCP queries we get + + reader := Reader(&defaultReader{srv}) + if srv.DecorateReader != nil { + reader = srv.DecorateReader(reader) + } +Redo: + req := new(Msg) + err := req.Unpack(m) + if err != nil { // Send a FormatError back + x := new(Msg) + x.SetRcodeFormatError(req) + w.WriteMsg(x) + goto Exit + } + if !srv.Unsafe && req.Response { + goto Exit + } + + w.tsigStatus = nil + if w.tsigSecret != nil { + if t := req.IsTsig(); t != nil { + secret := t.Hdr.Name + if _, ok := w.tsigSecret[secret]; !ok { + w.tsigStatus = ErrKeyAlg + } + w.tsigStatus = TsigVerify(m, w.tsigSecret[secret], "", false) + w.tsigTimersOnly = false + w.tsigRequestMAC = req.Extra[len(req.Extra)-1].(*TSIG).MAC + } + } + h.ServeDNS(w, req) // Writes back to the client + +Exit: + if w.tcp == nil { + return + } + // TODO(miek): make this number configurable? + if q > maxTCPQueries { // close socket after this many queries + w.Close() + return + } + + if w.hijacked { + return // client calls Close() + } + if u != nil { // UDP, "close" and return + w.Close() + return + } + idleTimeout := tcpIdleTimeout + if srv.IdleTimeout != nil { + idleTimeout = srv.IdleTimeout() + } + m, err = reader.ReadTCP(w.tcp, idleTimeout) + if err == nil { + q++ + goto Redo + } + w.Close() + return +} + +func (srv *Server) readTCP(conn net.Conn, timeout time.Duration) ([]byte, error) { + conn.SetReadDeadline(time.Now().Add(timeout)) + l := make([]byte, 2) + n, err := conn.Read(l) + if err != nil || n != 2 { + if err != nil { + return nil, err + } + return nil, ErrShortRead + } + length := binary.BigEndian.Uint16(l) + if length == 0 { + return nil, ErrShortRead + } + m := make([]byte, int(length)) + n, err = conn.Read(m[:int(length)]) + if err != nil || n == 0 { + if err != nil { + return nil, err + } + return nil, ErrShortRead + } + i := n + for i < int(length) { + j, err := conn.Read(m[i:int(length)]) + if err != nil { + return nil, err + } + i += j + } + n = i + m = m[:n] + return m, nil +} + +func (srv *Server) readUDP(conn *net.UDPConn, timeout time.Duration) ([]byte, *SessionUDP, error) { + conn.SetReadDeadline(time.Now().Add(timeout)) + m := make([]byte, srv.UDPSize) + n, s, err := ReadFromSessionUDP(conn, m) + if err != nil { + return nil, nil, err + } + m = m[:n] + return m, s, nil +} + +// WriteMsg implements the ResponseWriter.WriteMsg method. +func (w *response) WriteMsg(m *Msg) (err error) { + var data []byte + if w.tsigSecret != nil { // if no secrets, dont check for the tsig (which is a longer check) + if t := m.IsTsig(); t != nil { + data, w.tsigRequestMAC, err = TsigGenerate(m, w.tsigSecret[t.Hdr.Name], w.tsigRequestMAC, w.tsigTimersOnly) + if err != nil { + return err + } + _, err = w.writer.Write(data) + return err + } + } + data, err = m.Pack() + if err != nil { + return err + } + _, err = w.writer.Write(data) + return err +} + +// Write implements the ResponseWriter.Write method. +func (w *response) Write(m []byte) (int, error) { + switch { + case w.udp != nil: + n, err := WriteToSessionUDP(w.udp, m, w.udpSession) + return n, err + case w.tcp != nil: + lm := len(m) + if lm < 2 { + return 0, io.ErrShortBuffer + } + if lm > MaxMsgSize { + return 0, &Error{err: "message too large"} + } + l := make([]byte, 2, 2+lm) + binary.BigEndian.PutUint16(l, uint16(lm)) + m = append(l, m...) + + n, err := io.Copy(w.tcp, bytes.NewReader(m)) + return int(n), err + } + panic("not reached") +} + +// LocalAddr implements the ResponseWriter.LocalAddr method. +func (w *response) LocalAddr() net.Addr { + if w.tcp != nil { + return w.tcp.LocalAddr() + } + return w.udp.LocalAddr() +} + +// RemoteAddr implements the ResponseWriter.RemoteAddr method. +func (w *response) RemoteAddr() net.Addr { return w.remoteAddr } + +// TsigStatus implements the ResponseWriter.TsigStatus method. +func (w *response) TsigStatus() error { return w.tsigStatus } + +// TsigTimersOnly implements the ResponseWriter.TsigTimersOnly method. +func (w *response) TsigTimersOnly(b bool) { w.tsigTimersOnly = b } + +// Hijack implements the ResponseWriter.Hijack method. +func (w *response) Hijack() { w.hijacked = true } + +// Close implements the ResponseWriter.Close method +func (w *response) Close() error { + // Can't close the udp conn, as that is actually the listener. + if w.tcp != nil { + e := w.tcp.Close() + w.tcp = nil + return e + } + return nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/sig0.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/sig0.go new file mode 100644 index 000000000..f31e9e684 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/sig0.go @@ -0,0 +1,218 @@ +package dns + +import ( + "crypto" + "crypto/dsa" + "crypto/ecdsa" + "crypto/rsa" + "encoding/binary" + "math/big" + "strings" + "time" +) + +// Sign signs a dns.Msg. It fills the signature with the appropriate data. +// The SIG record should have the SignerName, KeyTag, Algorithm, Inception +// and Expiration set. +func (rr *SIG) Sign(k crypto.Signer, m *Msg) ([]byte, error) { + if k == nil { + return nil, ErrPrivKey + } + if rr.KeyTag == 0 || len(rr.SignerName) == 0 || rr.Algorithm == 0 { + return nil, ErrKey + } + rr.Header().Rrtype = TypeSIG + rr.Header().Class = ClassANY + rr.Header().Ttl = 0 + rr.Header().Name = "." + rr.OrigTtl = 0 + rr.TypeCovered = 0 + rr.Labels = 0 + + buf := make([]byte, m.Len()+rr.len()) + mbuf, err := m.PackBuffer(buf) + if err != nil { + return nil, err + } + if &buf[0] != &mbuf[0] { + return nil, ErrBuf + } + off, err := PackRR(rr, buf, len(mbuf), nil, false) + if err != nil { + return nil, err + } + buf = buf[:off:cap(buf)] + + hash, ok := AlgorithmToHash[rr.Algorithm] + if !ok { + return nil, ErrAlg + } + + hasher := hash.New() + // Write SIG rdata + hasher.Write(buf[len(mbuf)+1+2+2+4+2:]) + // Write message + hasher.Write(buf[:len(mbuf)]) + + signature, err := sign(k, hasher.Sum(nil), hash, rr.Algorithm) + if err != nil { + return nil, err + } + + rr.Signature = toBase64(signature) + + buf = append(buf, signature...) + if len(buf) > int(^uint16(0)) { + return nil, ErrBuf + } + // Adjust sig data length + rdoff := len(mbuf) + 1 + 2 + 2 + 4 + rdlen := binary.BigEndian.Uint16(buf[rdoff:]) + rdlen += uint16(len(signature)) + binary.BigEndian.PutUint16(buf[rdoff:], rdlen) + // Adjust additional count + adc := binary.BigEndian.Uint16(buf[10:]) + adc++ + binary.BigEndian.PutUint16(buf[10:], adc) + return buf, nil +} + +// Verify validates the message buf using the key k. +// It's assumed that buf is a valid message from which rr was unpacked. +func (rr *SIG) Verify(k *KEY, buf []byte) error { + if k == nil { + return ErrKey + } + if rr.KeyTag == 0 || len(rr.SignerName) == 0 || rr.Algorithm == 0 { + return ErrKey + } + + var hash crypto.Hash + switch rr.Algorithm { + case DSA, RSASHA1: + hash = crypto.SHA1 + case RSASHA256, ECDSAP256SHA256: + hash = crypto.SHA256 + case ECDSAP384SHA384: + hash = crypto.SHA384 + case RSASHA512: + hash = crypto.SHA512 + default: + return ErrAlg + } + hasher := hash.New() + + buflen := len(buf) + qdc := binary.BigEndian.Uint16(buf[4:]) + anc := binary.BigEndian.Uint16(buf[6:]) + auc := binary.BigEndian.Uint16(buf[8:]) + adc := binary.BigEndian.Uint16(buf[10:]) + offset := 12 + var err error + for i := uint16(0); i < qdc && offset < buflen; i++ { + _, offset, err = UnpackDomainName(buf, offset) + if err != nil { + return err + } + // Skip past Type and Class + offset += 2 + 2 + } + for i := uint16(1); i < anc+auc+adc && offset < buflen; i++ { + _, offset, err = UnpackDomainName(buf, offset) + if err != nil { + return err + } + // Skip past Type, Class and TTL + offset += 2 + 2 + 4 + if offset+1 >= buflen { + continue + } + var rdlen uint16 + rdlen = binary.BigEndian.Uint16(buf[offset:]) + offset += 2 + offset += int(rdlen) + } + if offset >= buflen { + return &Error{err: "overflowing unpacking signed message"} + } + + // offset should be just prior to SIG + bodyend := offset + // owner name SHOULD be root + _, offset, err = UnpackDomainName(buf, offset) + if err != nil { + return err + } + // Skip Type, Class, TTL, RDLen + offset += 2 + 2 + 4 + 2 + sigstart := offset + // Skip Type Covered, Algorithm, Labels, Original TTL + offset += 2 + 1 + 1 + 4 + if offset+4+4 >= buflen { + return &Error{err: "overflow unpacking signed message"} + } + expire := binary.BigEndian.Uint32(buf[offset:]) + offset += 4 + incept := binary.BigEndian.Uint32(buf[offset:]) + offset += 4 + now := uint32(time.Now().Unix()) + if now < incept || now > expire { + return ErrTime + } + // Skip key tag + offset += 2 + var signername string + signername, offset, err = UnpackDomainName(buf, offset) + if err != nil { + return err + } + // If key has come from the DNS name compression might + // have mangled the case of the name + if strings.ToLower(signername) != strings.ToLower(k.Header().Name) { + return &Error{err: "signer name doesn't match key name"} + } + sigend := offset + hasher.Write(buf[sigstart:sigend]) + hasher.Write(buf[:10]) + hasher.Write([]byte{ + byte((adc - 1) << 8), + byte(adc - 1), + }) + hasher.Write(buf[12:bodyend]) + + hashed := hasher.Sum(nil) + sig := buf[sigend:] + switch k.Algorithm { + case DSA: + pk := k.publicKeyDSA() + sig = sig[1:] + r := big.NewInt(0) + r.SetBytes(sig[:len(sig)/2]) + s := big.NewInt(0) + s.SetBytes(sig[len(sig)/2:]) + if pk != nil { + if dsa.Verify(pk, hashed, r, s) { + return nil + } + return ErrSig + } + case RSASHA1, RSASHA256, RSASHA512: + pk := k.publicKeyRSA() + if pk != nil { + return rsa.VerifyPKCS1v15(pk, hash, hashed, sig) + } + case ECDSAP256SHA256, ECDSAP384SHA384: + pk := k.publicKeyECDSA() + r := big.NewInt(0) + r.SetBytes(sig[:len(sig)/2]) + s := big.NewInt(0) + s.SetBytes(sig[len(sig)/2:]) + if pk != nil { + if ecdsa.Verify(pk, hashed, r, s) { + return nil + } + return ErrSig + } + } + return ErrKeyAlg +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/singleinflight.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/singleinflight.go new file mode 100644 index 000000000..9573c7d0b --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/singleinflight.go @@ -0,0 +1,57 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Adapted for dns package usage by Miek Gieben. + +package dns + +import "sync" +import "time" + +// call is an in-flight or completed singleflight.Do call +type call struct { + wg sync.WaitGroup + val *Msg + rtt time.Duration + err error + dups int +} + +// singleflight represents a class of work and forms a namespace in +// which units of work can be executed with duplicate suppression. +type singleflight struct { + sync.Mutex // protects m + m map[string]*call // lazily initialized +} + +// Do executes and returns the results of the given function, making +// sure that only one execution is in-flight for a given key at a +// time. If a duplicate comes in, the duplicate caller waits for the +// original to complete and receives the same results. +// The return value shared indicates whether v was given to multiple callers. +func (g *singleflight) Do(key string, fn func() (*Msg, time.Duration, error)) (v *Msg, rtt time.Duration, err error, shared bool) { + g.Lock() + if g.m == nil { + g.m = make(map[string]*call) + } + if c, ok := g.m[key]; ok { + c.dups++ + g.Unlock() + c.wg.Wait() + return c.val, c.rtt, c.err, true + } + c := new(call) + c.wg.Add(1) + g.m[key] = c + g.Unlock() + + c.val, c.rtt, c.err = fn() + c.wg.Done() + + g.Lock() + delete(g.m, key) + g.Unlock() + + return c.val, c.rtt, c.err, c.dups > 0 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/smimea.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/smimea.go new file mode 100644 index 000000000..4e7ded4b3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/smimea.go @@ -0,0 +1,47 @@ +package dns + +import ( + "crypto/sha256" + "crypto/x509" + "encoding/hex" +) + +// Sign creates a SMIMEA record from an SSL certificate. +func (r *SMIMEA) Sign(usage, selector, matchingType int, cert *x509.Certificate) (err error) { + r.Hdr.Rrtype = TypeSMIMEA + r.Usage = uint8(usage) + r.Selector = uint8(selector) + r.MatchingType = uint8(matchingType) + + r.Certificate, err = CertificateToDANE(r.Selector, r.MatchingType, cert) + if err != nil { + return err + } + return nil +} + +// Verify verifies a SMIMEA record against an SSL certificate. If it is OK +// a nil error is returned. +func (r *SMIMEA) Verify(cert *x509.Certificate) error { + c, err := CertificateToDANE(r.Selector, r.MatchingType, cert) + if err != nil { + return err // Not also ErrSig? + } + if r.Certificate == c { + return nil + } + return ErrSig // ErrSig, really? +} + +// SMIMEAName returns the ownername of a SMIMEA resource record as per the +// format specified in RFC 'draft-ietf-dane-smime-12' Section 2 and 3 +func SMIMEAName(email, domain string) (string, error) { + hasher := sha256.New() + hasher.Write([]byte(email)) + + // RFC Section 3: "The local-part is hashed using the SHA2-256 + // algorithm with the hash truncated to 28 octets and + // represented in its hexadecimal representation to become the + // left-most label in the prepared domain name" + return hex.EncodeToString(hasher.Sum(nil)[:28]) + "." + "_smimecert." + domain, nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/tlsa.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/tlsa.go new file mode 100644 index 000000000..431e2fb5a --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/tlsa.go @@ -0,0 +1,47 @@ +package dns + +import ( + "crypto/x509" + "net" + "strconv" +) + +// Sign creates a TLSA record from an SSL certificate. +func (r *TLSA) Sign(usage, selector, matchingType int, cert *x509.Certificate) (err error) { + r.Hdr.Rrtype = TypeTLSA + r.Usage = uint8(usage) + r.Selector = uint8(selector) + r.MatchingType = uint8(matchingType) + + r.Certificate, err = CertificateToDANE(r.Selector, r.MatchingType, cert) + if err != nil { + return err + } + return nil +} + +// Verify verifies a TLSA record against an SSL certificate. If it is OK +// a nil error is returned. +func (r *TLSA) Verify(cert *x509.Certificate) error { + c, err := CertificateToDANE(r.Selector, r.MatchingType, cert) + if err != nil { + return err // Not also ErrSig? + } + if r.Certificate == c { + return nil + } + return ErrSig // ErrSig, really? +} + +// TLSAName returns the ownername of a TLSA resource record as per the +// rules specified in RFC 6698, Section 3. +func TLSAName(name, service, network string) (string, error) { + if !IsFqdn(name) { + return "", ErrFqdn + } + p, err := net.LookupPort(network, service) + if err != nil { + return "", err + } + return "_" + strconv.Itoa(p) + "._" + network + "." + name, nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/tsig.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/tsig.go new file mode 100644 index 000000000..4837b4ab1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/tsig.go @@ -0,0 +1,386 @@ +package dns + +import ( + "crypto/hmac" + "crypto/md5" + "crypto/sha1" + "crypto/sha256" + "crypto/sha512" + "encoding/binary" + "encoding/hex" + "hash" + "strconv" + "strings" + "time" +) + +// HMAC hashing codes. These are transmitted as domain names. +const ( + HmacMD5 = "hmac-md5.sig-alg.reg.int." + HmacSHA1 = "hmac-sha1." + HmacSHA256 = "hmac-sha256." + HmacSHA512 = "hmac-sha512." +) + +// TSIG is the RR the holds the transaction signature of a message. +// See RFC 2845 and RFC 4635. +type TSIG struct { + Hdr RR_Header + Algorithm string `dns:"domain-name"` + TimeSigned uint64 `dns:"uint48"` + Fudge uint16 + MACSize uint16 + MAC string `dns:"size-hex:MACSize"` + OrigId uint16 + Error uint16 + OtherLen uint16 + OtherData string `dns:"size-hex:OtherLen"` +} + +// TSIG has no official presentation format, but this will suffice. + +func (rr *TSIG) String() string { + s := "\n;; TSIG PSEUDOSECTION:\n" + s += rr.Hdr.String() + + " " + rr.Algorithm + + " " + tsigTimeToString(rr.TimeSigned) + + " " + strconv.Itoa(int(rr.Fudge)) + + " " + strconv.Itoa(int(rr.MACSize)) + + " " + strings.ToUpper(rr.MAC) + + " " + strconv.Itoa(int(rr.OrigId)) + + " " + strconv.Itoa(int(rr.Error)) + // BIND prints NOERROR + " " + strconv.Itoa(int(rr.OtherLen)) + + " " + rr.OtherData + return s +} + +// The following values must be put in wireformat, so that the MAC can be calculated. +// RFC 2845, section 3.4.2. TSIG Variables. +type tsigWireFmt struct { + // From RR_Header + Name string `dns:"domain-name"` + Class uint16 + Ttl uint32 + // Rdata of the TSIG + Algorithm string `dns:"domain-name"` + TimeSigned uint64 `dns:"uint48"` + Fudge uint16 + // MACSize, MAC and OrigId excluded + Error uint16 + OtherLen uint16 + OtherData string `dns:"size-hex:OtherLen"` +} + +// If we have the MAC use this type to convert it to wiredata. Section 3.4.3. Request MAC +type macWireFmt struct { + MACSize uint16 + MAC string `dns:"size-hex:MACSize"` +} + +// 3.3. Time values used in TSIG calculations +type timerWireFmt struct { + TimeSigned uint64 `dns:"uint48"` + Fudge uint16 +} + +// TsigGenerate fills out the TSIG record attached to the message. +// The message should contain +// a "stub" TSIG RR with the algorithm, key name (owner name of the RR), +// time fudge (defaults to 300 seconds) and the current time +// The TSIG MAC is saved in that Tsig RR. +// When TsigGenerate is called for the first time requestMAC is set to the empty string and +// timersOnly is false. +// If something goes wrong an error is returned, otherwise it is nil. +func TsigGenerate(m *Msg, secret, requestMAC string, timersOnly bool) ([]byte, string, error) { + if m.IsTsig() == nil { + panic("dns: TSIG not last RR in additional") + } + // If we barf here, the caller is to blame + rawsecret, err := fromBase64([]byte(secret)) + if err != nil { + return nil, "", err + } + + rr := m.Extra[len(m.Extra)-1].(*TSIG) + m.Extra = m.Extra[0 : len(m.Extra)-1] // kill the TSIG from the msg + mbuf, err := m.Pack() + if err != nil { + return nil, "", err + } + buf := tsigBuffer(mbuf, rr, requestMAC, timersOnly) + + t := new(TSIG) + var h hash.Hash + switch strings.ToLower(rr.Algorithm) { + case HmacMD5: + h = hmac.New(md5.New, []byte(rawsecret)) + case HmacSHA1: + h = hmac.New(sha1.New, []byte(rawsecret)) + case HmacSHA256: + h = hmac.New(sha256.New, []byte(rawsecret)) + case HmacSHA512: + h = hmac.New(sha512.New, []byte(rawsecret)) + default: + return nil, "", ErrKeyAlg + } + h.Write(buf) + t.MAC = hex.EncodeToString(h.Sum(nil)) + t.MACSize = uint16(len(t.MAC) / 2) // Size is half! + + t.Hdr = RR_Header{Name: rr.Hdr.Name, Rrtype: TypeTSIG, Class: ClassANY, Ttl: 0} + t.Fudge = rr.Fudge + t.TimeSigned = rr.TimeSigned + t.Algorithm = rr.Algorithm + t.OrigId = m.Id + + tbuf := make([]byte, t.len()) + if off, err := PackRR(t, tbuf, 0, nil, false); err == nil { + tbuf = tbuf[:off] // reset to actual size used + } else { + return nil, "", err + } + mbuf = append(mbuf, tbuf...) + // Update the ArCount directly in the buffer. + binary.BigEndian.PutUint16(mbuf[10:], uint16(len(m.Extra)+1)) + + return mbuf, t.MAC, nil +} + +// TsigVerify verifies the TSIG on a message. +// If the signature does not validate err contains the +// error, otherwise it is nil. +func TsigVerify(msg []byte, secret, requestMAC string, timersOnly bool) error { + rawsecret, err := fromBase64([]byte(secret)) + if err != nil { + return err + } + // Strip the TSIG from the incoming msg + stripped, tsig, err := stripTsig(msg) + if err != nil { + return err + } + + msgMAC, err := hex.DecodeString(tsig.MAC) + if err != nil { + return err + } + + buf := tsigBuffer(stripped, tsig, requestMAC, timersOnly) + + // Fudge factor works both ways. A message can arrive before it was signed because + // of clock skew. + now := uint64(time.Now().Unix()) + ti := now - tsig.TimeSigned + if now < tsig.TimeSigned { + ti = tsig.TimeSigned - now + } + if uint64(tsig.Fudge) < ti { + return ErrTime + } + + var h hash.Hash + switch strings.ToLower(tsig.Algorithm) { + case HmacMD5: + h = hmac.New(md5.New, rawsecret) + case HmacSHA1: + h = hmac.New(sha1.New, rawsecret) + case HmacSHA256: + h = hmac.New(sha256.New, rawsecret) + case HmacSHA512: + h = hmac.New(sha512.New, rawsecret) + default: + return ErrKeyAlg + } + h.Write(buf) + if !hmac.Equal(h.Sum(nil), msgMAC) { + return ErrSig + } + return nil +} + +// Create a wiredata buffer for the MAC calculation. +func tsigBuffer(msgbuf []byte, rr *TSIG, requestMAC string, timersOnly bool) []byte { + var buf []byte + if rr.TimeSigned == 0 { + rr.TimeSigned = uint64(time.Now().Unix()) + } + if rr.Fudge == 0 { + rr.Fudge = 300 // Standard (RFC) default. + } + + // Replace message ID in header with original ID from TSIG + binary.BigEndian.PutUint16(msgbuf[0:2], rr.OrigId) + + if requestMAC != "" { + m := new(macWireFmt) + m.MACSize = uint16(len(requestMAC) / 2) + m.MAC = requestMAC + buf = make([]byte, len(requestMAC)) // long enough + n, _ := packMacWire(m, buf) + buf = buf[:n] + } + + tsigvar := make([]byte, DefaultMsgSize) + if timersOnly { + tsig := new(timerWireFmt) + tsig.TimeSigned = rr.TimeSigned + tsig.Fudge = rr.Fudge + n, _ := packTimerWire(tsig, tsigvar) + tsigvar = tsigvar[:n] + } else { + tsig := new(tsigWireFmt) + tsig.Name = strings.ToLower(rr.Hdr.Name) + tsig.Class = ClassANY + tsig.Ttl = rr.Hdr.Ttl + tsig.Algorithm = strings.ToLower(rr.Algorithm) + tsig.TimeSigned = rr.TimeSigned + tsig.Fudge = rr.Fudge + tsig.Error = rr.Error + tsig.OtherLen = rr.OtherLen + tsig.OtherData = rr.OtherData + n, _ := packTsigWire(tsig, tsigvar) + tsigvar = tsigvar[:n] + } + + if requestMAC != "" { + x := append(buf, msgbuf...) + buf = append(x, tsigvar...) + } else { + buf = append(msgbuf, tsigvar...) + } + return buf +} + +// Strip the TSIG from the raw message. +func stripTsig(msg []byte) ([]byte, *TSIG, error) { + // Copied from msg.go's Unpack() Header, but modified. + var ( + dh Header + err error + ) + off, tsigoff := 0, 0 + + if dh, off, err = unpackMsgHdr(msg, off); err != nil { + return nil, nil, err + } + if dh.Arcount == 0 { + return nil, nil, ErrNoSig + } + + // Rcode, see msg.go Unpack() + if int(dh.Bits&0xF) == RcodeNotAuth { + return nil, nil, ErrAuth + } + + for i := 0; i < int(dh.Qdcount); i++ { + _, off, err = unpackQuestion(msg, off) + if err != nil { + return nil, nil, err + } + } + + _, off, err = unpackRRslice(int(dh.Ancount), msg, off) + if err != nil { + return nil, nil, err + } + _, off, err = unpackRRslice(int(dh.Nscount), msg, off) + if err != nil { + return nil, nil, err + } + + rr := new(TSIG) + var extra RR + for i := 0; i < int(dh.Arcount); i++ { + tsigoff = off + extra, off, err = UnpackRR(msg, off) + if err != nil { + return nil, nil, err + } + if extra.Header().Rrtype == TypeTSIG { + rr = extra.(*TSIG) + // Adjust Arcount. + arcount := binary.BigEndian.Uint16(msg[10:]) + binary.BigEndian.PutUint16(msg[10:], arcount-1) + break + } + } + if rr == nil { + return nil, nil, ErrNoSig + } + return msg[:tsigoff], rr, nil +} + +// Translate the TSIG time signed into a date. There is no +// need for RFC1982 calculations as this date is 48 bits. +func tsigTimeToString(t uint64) string { + ti := time.Unix(int64(t), 0).UTC() + return ti.Format("20060102150405") +} + +func packTsigWire(tw *tsigWireFmt, msg []byte) (int, error) { + // copied from zmsg.go TSIG packing + // RR_Header + off, err := PackDomainName(tw.Name, msg, 0, nil, false) + if err != nil { + return off, err + } + off, err = packUint16(tw.Class, msg, off) + if err != nil { + return off, err + } + off, err = packUint32(tw.Ttl, msg, off) + if err != nil { + return off, err + } + + off, err = PackDomainName(tw.Algorithm, msg, off, nil, false) + if err != nil { + return off, err + } + off, err = packUint48(tw.TimeSigned, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(tw.Fudge, msg, off) + if err != nil { + return off, err + } + + off, err = packUint16(tw.Error, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(tw.OtherLen, msg, off) + if err != nil { + return off, err + } + off, err = packStringHex(tw.OtherData, msg, off) + if err != nil { + return off, err + } + return off, nil +} + +func packMacWire(mw *macWireFmt, msg []byte) (int, error) { + off, err := packUint16(mw.MACSize, msg, 0) + if err != nil { + return off, err + } + off, err = packStringHex(mw.MAC, msg, off) + if err != nil { + return off, err + } + return off, nil +} + +func packTimerWire(tw *timerWireFmt, msg []byte) (int, error) { + off, err := packUint48(tw.TimeSigned, msg, 0) + if err != nil { + return off, err + } + off, err = packUint16(tw.Fudge, msg, off) + if err != nil { + return off, err + } + return off, nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/types.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/types.go new file mode 100644 index 000000000..a779ca8ab --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/types.go @@ -0,0 +1,1381 @@ +package dns + +import ( + "fmt" + "net" + "strconv" + "strings" + "time" +) + +type ( + // Type is a DNS type. + Type uint16 + // Class is a DNS class. + Class uint16 + // Name is a DNS domain name. + Name string +) + +// Packet formats + +// Wire constants and supported types. +const ( + // valid RR_Header.Rrtype and Question.qtype + + TypeNone uint16 = 0 + TypeA uint16 = 1 + TypeNS uint16 = 2 + TypeMD uint16 = 3 + TypeMF uint16 = 4 + TypeCNAME uint16 = 5 + TypeSOA uint16 = 6 + TypeMB uint16 = 7 + TypeMG uint16 = 8 + TypeMR uint16 = 9 + TypeNULL uint16 = 10 + TypePTR uint16 = 12 + TypeHINFO uint16 = 13 + TypeMINFO uint16 = 14 + TypeMX uint16 = 15 + TypeTXT uint16 = 16 + TypeRP uint16 = 17 + TypeAFSDB uint16 = 18 + TypeX25 uint16 = 19 + TypeISDN uint16 = 20 + TypeRT uint16 = 21 + TypeNSAPPTR uint16 = 23 + TypeSIG uint16 = 24 + TypeKEY uint16 = 25 + TypePX uint16 = 26 + TypeGPOS uint16 = 27 + TypeAAAA uint16 = 28 + TypeLOC uint16 = 29 + TypeNXT uint16 = 30 + TypeEID uint16 = 31 + TypeNIMLOC uint16 = 32 + TypeSRV uint16 = 33 + TypeATMA uint16 = 34 + TypeNAPTR uint16 = 35 + TypeKX uint16 = 36 + TypeCERT uint16 = 37 + TypeDNAME uint16 = 39 + TypeOPT uint16 = 41 // EDNS + TypeDS uint16 = 43 + TypeSSHFP uint16 = 44 + TypeRRSIG uint16 = 46 + TypeNSEC uint16 = 47 + TypeDNSKEY uint16 = 48 + TypeDHCID uint16 = 49 + TypeNSEC3 uint16 = 50 + TypeNSEC3PARAM uint16 = 51 + TypeTLSA uint16 = 52 + TypeSMIMEA uint16 = 53 + TypeHIP uint16 = 55 + TypeNINFO uint16 = 56 + TypeRKEY uint16 = 57 + TypeTALINK uint16 = 58 + TypeCDS uint16 = 59 + TypeCDNSKEY uint16 = 60 + TypeOPENPGPKEY uint16 = 61 + TypeCSYNC uint16 = 62 + TypeSPF uint16 = 99 + TypeUINFO uint16 = 100 + TypeUID uint16 = 101 + TypeGID uint16 = 102 + TypeUNSPEC uint16 = 103 + TypeNID uint16 = 104 + TypeL32 uint16 = 105 + TypeL64 uint16 = 106 + TypeLP uint16 = 107 + TypeEUI48 uint16 = 108 + TypeEUI64 uint16 = 109 + TypeURI uint16 = 256 + TypeCAA uint16 = 257 + TypeAVC uint16 = 258 + + TypeTKEY uint16 = 249 + TypeTSIG uint16 = 250 + + // valid Question.Qtype only + TypeIXFR uint16 = 251 + TypeAXFR uint16 = 252 + TypeMAILB uint16 = 253 + TypeMAILA uint16 = 254 + TypeANY uint16 = 255 + + TypeTA uint16 = 32768 + TypeDLV uint16 = 32769 + TypeReserved uint16 = 65535 + + // valid Question.Qclass + ClassINET = 1 + ClassCSNET = 2 + ClassCHAOS = 3 + ClassHESIOD = 4 + ClassNONE = 254 + ClassANY = 255 + + // Message Response Codes, see https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml + RcodeSuccess = 0 // NoError - No Error [DNS] + RcodeFormatError = 1 // FormErr - Format Error [DNS] + RcodeServerFailure = 2 // ServFail - Server Failure [DNS] + RcodeNameError = 3 // NXDomain - Non-Existent Domain [DNS] + RcodeNotImplemented = 4 // NotImp - Not Implemented [DNS] + RcodeRefused = 5 // Refused - Query Refused [DNS] + RcodeYXDomain = 6 // YXDomain - Name Exists when it should not [DNS Update] + RcodeYXRrset = 7 // YXRRSet - RR Set Exists when it should not [DNS Update] + RcodeNXRrset = 8 // NXRRSet - RR Set that should exist does not [DNS Update] + RcodeNotAuth = 9 // NotAuth - Server Not Authoritative for zone [DNS Update] + RcodeNotZone = 10 // NotZone - Name not contained in zone [DNS Update/TSIG] + RcodeBadSig = 16 // BADSIG - TSIG Signature Failure [TSIG] + RcodeBadVers = 16 // BADVERS - Bad OPT Version [EDNS0] + RcodeBadKey = 17 // BADKEY - Key not recognized [TSIG] + RcodeBadTime = 18 // BADTIME - Signature out of time window [TSIG] + RcodeBadMode = 19 // BADMODE - Bad TKEY Mode [TKEY] + RcodeBadName = 20 // BADNAME - Duplicate key name [TKEY] + RcodeBadAlg = 21 // BADALG - Algorithm not supported [TKEY] + RcodeBadTrunc = 22 // BADTRUNC - Bad Truncation [TSIG] + RcodeBadCookie = 23 // BADCOOKIE - Bad/missing Server Cookie [DNS Cookies] + + // Message Opcodes. There is no 3. + OpcodeQuery = 0 + OpcodeIQuery = 1 + OpcodeStatus = 2 + OpcodeNotify = 4 + OpcodeUpdate = 5 +) + +// Header is the wire format for the DNS packet header. +type Header struct { + Id uint16 + Bits uint16 + Qdcount, Ancount, Nscount, Arcount uint16 +} + +const ( + headerSize = 12 + + // Header.Bits + _QR = 1 << 15 // query/response (response=1) + _AA = 1 << 10 // authoritative + _TC = 1 << 9 // truncated + _RD = 1 << 8 // recursion desired + _RA = 1 << 7 // recursion available + _Z = 1 << 6 // Z + _AD = 1 << 5 // authticated data + _CD = 1 << 4 // checking disabled +) + +// Various constants used in the LOC RR, See RFC 1887. +const ( + LOC_EQUATOR = 1 << 31 // RFC 1876, Section 2. + LOC_PRIMEMERIDIAN = 1 << 31 // RFC 1876, Section 2. + LOC_HOURS = 60 * 1000 + LOC_DEGREES = 60 * LOC_HOURS + LOC_ALTITUDEBASE = 100000 +) + +// Different Certificate Types, see RFC 4398, Section 2.1 +const ( + CertPKIX = 1 + iota + CertSPKI + CertPGP + CertIPIX + CertISPKI + CertIPGP + CertACPKIX + CertIACPKIX + CertURI = 253 + CertOID = 254 +) + +// CertTypeToString converts the Cert Type to its string representation. +// See RFC 4398 and RFC 6944. +var CertTypeToString = map[uint16]string{ + CertPKIX: "PKIX", + CertSPKI: "SPKI", + CertPGP: "PGP", + CertIPIX: "IPIX", + CertISPKI: "ISPKI", + CertIPGP: "IPGP", + CertACPKIX: "ACPKIX", + CertIACPKIX: "IACPKIX", + CertURI: "URI", + CertOID: "OID", +} + +// StringToCertType is the reverseof CertTypeToString. +var StringToCertType = reverseInt16(CertTypeToString) + +//go:generate go run types_generate.go + +// Question holds a DNS question. There can be multiple questions in the +// question section of a message. Usually there is just one. +type Question struct { + Name string `dns:"cdomain-name"` // "cdomain-name" specifies encoding (and may be compressed) + Qtype uint16 + Qclass uint16 +} + +func (q *Question) len() int { + return len(q.Name) + 1 + 2 + 2 +} + +func (q *Question) String() (s string) { + // prefix with ; (as in dig) + s = ";" + sprintName(q.Name) + "\t" + s += Class(q.Qclass).String() + "\t" + s += " " + Type(q.Qtype).String() + return s +} + +// ANY is a wildcard record. See RFC 1035, Section 3.2.3. ANY +// is named "*" there. +type ANY struct { + Hdr RR_Header + // Does not have any rdata +} + +func (rr *ANY) String() string { return rr.Hdr.String() } + +// CNAME RR. See RFC 1034. +type CNAME struct { + Hdr RR_Header + Target string `dns:"cdomain-name"` +} + +func (rr *CNAME) String() string { return rr.Hdr.String() + sprintName(rr.Target) } + +// HINFO RR. See RFC 1034. +type HINFO struct { + Hdr RR_Header + Cpu string + Os string +} + +func (rr *HINFO) String() string { + return rr.Hdr.String() + sprintTxt([]string{rr.Cpu, rr.Os}) +} + +// MB RR. See RFC 1035. +type MB struct { + Hdr RR_Header + Mb string `dns:"cdomain-name"` +} + +func (rr *MB) String() string { return rr.Hdr.String() + sprintName(rr.Mb) } + +// MG RR. See RFC 1035. +type MG struct { + Hdr RR_Header + Mg string `dns:"cdomain-name"` +} + +func (rr *MG) String() string { return rr.Hdr.String() + sprintName(rr.Mg) } + +// MINFO RR. See RFC 1035. +type MINFO struct { + Hdr RR_Header + Rmail string `dns:"cdomain-name"` + Email string `dns:"cdomain-name"` +} + +func (rr *MINFO) String() string { + return rr.Hdr.String() + sprintName(rr.Rmail) + " " + sprintName(rr.Email) +} + +// MR RR. See RFC 1035. +type MR struct { + Hdr RR_Header + Mr string `dns:"cdomain-name"` +} + +func (rr *MR) String() string { + return rr.Hdr.String() + sprintName(rr.Mr) +} + +// MF RR. See RFC 1035. +type MF struct { + Hdr RR_Header + Mf string `dns:"cdomain-name"` +} + +func (rr *MF) String() string { + return rr.Hdr.String() + sprintName(rr.Mf) +} + +// MD RR. See RFC 1035. +type MD struct { + Hdr RR_Header + Md string `dns:"cdomain-name"` +} + +func (rr *MD) String() string { + return rr.Hdr.String() + sprintName(rr.Md) +} + +// MX RR. See RFC 1035. +type MX struct { + Hdr RR_Header + Preference uint16 + Mx string `dns:"cdomain-name"` +} + +func (rr *MX) String() string { + return rr.Hdr.String() + strconv.Itoa(int(rr.Preference)) + " " + sprintName(rr.Mx) +} + +// AFSDB RR. See RFC 1183. +type AFSDB struct { + Hdr RR_Header + Subtype uint16 + Hostname string `dns:"cdomain-name"` +} + +func (rr *AFSDB) String() string { + return rr.Hdr.String() + strconv.Itoa(int(rr.Subtype)) + " " + sprintName(rr.Hostname) +} + +// X25 RR. See RFC 1183, Section 3.1. +type X25 struct { + Hdr RR_Header + PSDNAddress string +} + +func (rr *X25) String() string { + return rr.Hdr.String() + rr.PSDNAddress +} + +// RT RR. See RFC 1183, Section 3.3. +type RT struct { + Hdr RR_Header + Preference uint16 + Host string `dns:"cdomain-name"` +} + +func (rr *RT) String() string { + return rr.Hdr.String() + strconv.Itoa(int(rr.Preference)) + " " + sprintName(rr.Host) +} + +// NS RR. See RFC 1035. +type NS struct { + Hdr RR_Header + Ns string `dns:"cdomain-name"` +} + +func (rr *NS) String() string { + return rr.Hdr.String() + sprintName(rr.Ns) +} + +// PTR RR. See RFC 1035. +type PTR struct { + Hdr RR_Header + Ptr string `dns:"cdomain-name"` +} + +func (rr *PTR) String() string { + return rr.Hdr.String() + sprintName(rr.Ptr) +} + +// RP RR. See RFC 1138, Section 2.2. +type RP struct { + Hdr RR_Header + Mbox string `dns:"domain-name"` + Txt string `dns:"domain-name"` +} + +func (rr *RP) String() string { + return rr.Hdr.String() + rr.Mbox + " " + sprintTxt([]string{rr.Txt}) +} + +// SOA RR. See RFC 1035. +type SOA struct { + Hdr RR_Header + Ns string `dns:"cdomain-name"` + Mbox string `dns:"cdomain-name"` + Serial uint32 + Refresh uint32 + Retry uint32 + Expire uint32 + Minttl uint32 +} + +func (rr *SOA) String() string { + return rr.Hdr.String() + sprintName(rr.Ns) + " " + sprintName(rr.Mbox) + + " " + strconv.FormatInt(int64(rr.Serial), 10) + + " " + strconv.FormatInt(int64(rr.Refresh), 10) + + " " + strconv.FormatInt(int64(rr.Retry), 10) + + " " + strconv.FormatInt(int64(rr.Expire), 10) + + " " + strconv.FormatInt(int64(rr.Minttl), 10) +} + +// TXT RR. See RFC 1035. +type TXT struct { + Hdr RR_Header + Txt []string `dns:"txt"` +} + +func (rr *TXT) String() string { return rr.Hdr.String() + sprintTxt(rr.Txt) } + +func sprintName(s string) string { + src := []byte(s) + dst := make([]byte, 0, len(src)) + for i := 0; i < len(src); { + if i+1 < len(src) && src[i] == '\\' && src[i+1] == '.' { + dst = append(dst, src[i:i+2]...) + i += 2 + } else { + b, n := nextByte(src, i) + if n == 0 { + i++ // dangling back slash + } else if b == '.' { + dst = append(dst, b) + } else { + dst = appendDomainNameByte(dst, b) + } + i += n + } + } + return string(dst) +} + +func sprintTxtOctet(s string) string { + src := []byte(s) + dst := make([]byte, 0, len(src)) + dst = append(dst, '"') + for i := 0; i < len(src); { + if i+1 < len(src) && src[i] == '\\' && src[i+1] == '.' { + dst = append(dst, src[i:i+2]...) + i += 2 + } else { + b, n := nextByte(src, i) + if n == 0 { + i++ // dangling back slash + } else if b == '.' { + dst = append(dst, b) + } else { + if b < ' ' || b > '~' { + dst = appendByte(dst, b) + } else { + dst = append(dst, b) + } + } + i += n + } + } + dst = append(dst, '"') + return string(dst) +} + +func sprintTxt(txt []string) string { + var out []byte + for i, s := range txt { + if i > 0 { + out = append(out, ` "`...) + } else { + out = append(out, '"') + } + bs := []byte(s) + for j := 0; j < len(bs); { + b, n := nextByte(bs, j) + if n == 0 { + break + } + out = appendTXTStringByte(out, b) + j += n + } + out = append(out, '"') + } + return string(out) +} + +func appendDomainNameByte(s []byte, b byte) []byte { + switch b { + case '.', ' ', '\'', '@', ';', '(', ')': // additional chars to escape + return append(s, '\\', b) + } + return appendTXTStringByte(s, b) +} + +func appendTXTStringByte(s []byte, b byte) []byte { + switch b { + case '"', '\\': + return append(s, '\\', b) + } + if b < ' ' || b > '~' { + return appendByte(s, b) + } + return append(s, b) +} + +func appendByte(s []byte, b byte) []byte { + var buf [3]byte + bufs := strconv.AppendInt(buf[:0], int64(b), 10) + s = append(s, '\\') + for i := 0; i < 3-len(bufs); i++ { + s = append(s, '0') + } + for _, r := range bufs { + s = append(s, r) + } + return s +} + +func nextByte(b []byte, offset int) (byte, int) { + if offset >= len(b) { + return 0, 0 + } + if b[offset] != '\\' { + // not an escape sequence + return b[offset], 1 + } + switch len(b) - offset { + case 1: // dangling escape + return 0, 0 + case 2, 3: // too short to be \ddd + default: // maybe \ddd + if isDigit(b[offset+1]) && isDigit(b[offset+2]) && isDigit(b[offset+3]) { + return dddToByte(b[offset+1:]), 4 + } + } + // not \ddd, just an RFC 1035 "quoted" character + return b[offset+1], 2 +} + +// SPF RR. See RFC 4408, Section 3.1.1. +type SPF struct { + Hdr RR_Header + Txt []string `dns:"txt"` +} + +func (rr *SPF) String() string { return rr.Hdr.String() + sprintTxt(rr.Txt) } + +// AVC RR. See https://www.iana.org/assignments/dns-parameters/AVC/avc-completed-template. +type AVC struct { + Hdr RR_Header + Txt []string `dns:"txt"` +} + +func (rr *AVC) String() string { return rr.Hdr.String() + sprintTxt(rr.Txt) } + +// SRV RR. See RFC 2782. +type SRV struct { + Hdr RR_Header + Priority uint16 + Weight uint16 + Port uint16 + Target string `dns:"domain-name"` +} + +func (rr *SRV) String() string { + return rr.Hdr.String() + + strconv.Itoa(int(rr.Priority)) + " " + + strconv.Itoa(int(rr.Weight)) + " " + + strconv.Itoa(int(rr.Port)) + " " + sprintName(rr.Target) +} + +// NAPTR RR. See RFC 2915. +type NAPTR struct { + Hdr RR_Header + Order uint16 + Preference uint16 + Flags string + Service string + Regexp string + Replacement string `dns:"domain-name"` +} + +func (rr *NAPTR) String() string { + return rr.Hdr.String() + + strconv.Itoa(int(rr.Order)) + " " + + strconv.Itoa(int(rr.Preference)) + " " + + "\"" + rr.Flags + "\" " + + "\"" + rr.Service + "\" " + + "\"" + rr.Regexp + "\" " + + rr.Replacement +} + +// CERT RR. See RFC 4398. +type CERT struct { + Hdr RR_Header + Type uint16 + KeyTag uint16 + Algorithm uint8 + Certificate string `dns:"base64"` +} + +func (rr *CERT) String() string { + var ( + ok bool + certtype, algorithm string + ) + if certtype, ok = CertTypeToString[rr.Type]; !ok { + certtype = strconv.Itoa(int(rr.Type)) + } + if algorithm, ok = AlgorithmToString[rr.Algorithm]; !ok { + algorithm = strconv.Itoa(int(rr.Algorithm)) + } + return rr.Hdr.String() + certtype + + " " + strconv.Itoa(int(rr.KeyTag)) + + " " + algorithm + + " " + rr.Certificate +} + +// DNAME RR. See RFC 2672. +type DNAME struct { + Hdr RR_Header + Target string `dns:"domain-name"` +} + +func (rr *DNAME) String() string { + return rr.Hdr.String() + sprintName(rr.Target) +} + +// A RR. See RFC 1035. +type A struct { + Hdr RR_Header + A net.IP `dns:"a"` +} + +func (rr *A) String() string { + if rr.A == nil { + return rr.Hdr.String() + } + return rr.Hdr.String() + rr.A.String() +} + +// AAAA RR. See RFC 3596. +type AAAA struct { + Hdr RR_Header + AAAA net.IP `dns:"aaaa"` +} + +func (rr *AAAA) String() string { + if rr.AAAA == nil { + return rr.Hdr.String() + } + return rr.Hdr.String() + rr.AAAA.String() +} + +// PX RR. See RFC 2163. +type PX struct { + Hdr RR_Header + Preference uint16 + Map822 string `dns:"domain-name"` + Mapx400 string `dns:"domain-name"` +} + +func (rr *PX) String() string { + return rr.Hdr.String() + strconv.Itoa(int(rr.Preference)) + " " + sprintName(rr.Map822) + " " + sprintName(rr.Mapx400) +} + +// GPOS RR. See RFC 1712. +type GPOS struct { + Hdr RR_Header + Longitude string + Latitude string + Altitude string +} + +func (rr *GPOS) String() string { + return rr.Hdr.String() + rr.Longitude + " " + rr.Latitude + " " + rr.Altitude +} + +// LOC RR. See RFC RFC 1876. +type LOC struct { + Hdr RR_Header + Version uint8 + Size uint8 + HorizPre uint8 + VertPre uint8 + Latitude uint32 + Longitude uint32 + Altitude uint32 +} + +// cmToM takes a cm value expressed in RFC1876 SIZE mantissa/exponent +// format and returns a string in m (two decimals for the cm) +func cmToM(m, e uint8) string { + if e < 2 { + if e == 1 { + m *= 10 + } + + return fmt.Sprintf("0.%02d", m) + } + + s := fmt.Sprintf("%d", m) + for e > 2 { + s += "0" + e-- + } + return s +} + +func (rr *LOC) String() string { + s := rr.Hdr.String() + + lat := rr.Latitude + ns := "N" + if lat > LOC_EQUATOR { + lat = lat - LOC_EQUATOR + } else { + ns = "S" + lat = LOC_EQUATOR - lat + } + h := lat / LOC_DEGREES + lat = lat % LOC_DEGREES + m := lat / LOC_HOURS + lat = lat % LOC_HOURS + s += fmt.Sprintf("%02d %02d %0.3f %s ", h, m, (float64(lat) / 1000), ns) + + lon := rr.Longitude + ew := "E" + if lon > LOC_PRIMEMERIDIAN { + lon = lon - LOC_PRIMEMERIDIAN + } else { + ew = "W" + lon = LOC_PRIMEMERIDIAN - lon + } + h = lon / LOC_DEGREES + lon = lon % LOC_DEGREES + m = lon / LOC_HOURS + lon = lon % LOC_HOURS + s += fmt.Sprintf("%02d %02d %0.3f %s ", h, m, (float64(lon) / 1000), ew) + + var alt = float64(rr.Altitude) / 100 + alt -= LOC_ALTITUDEBASE + if rr.Altitude%100 != 0 { + s += fmt.Sprintf("%.2fm ", alt) + } else { + s += fmt.Sprintf("%.0fm ", alt) + } + + s += cmToM((rr.Size&0xf0)>>4, rr.Size&0x0f) + "m " + s += cmToM((rr.HorizPre&0xf0)>>4, rr.HorizPre&0x0f) + "m " + s += cmToM((rr.VertPre&0xf0)>>4, rr.VertPre&0x0f) + "m" + + return s +} + +// SIG RR. See RFC 2535. The SIG RR is identical to RRSIG and nowadays only used for SIG(0), See RFC 2931. +type SIG struct { + RRSIG +} + +// RRSIG RR. See RFC 4034 and RFC 3755. +type RRSIG struct { + Hdr RR_Header + TypeCovered uint16 + Algorithm uint8 + Labels uint8 + OrigTtl uint32 + Expiration uint32 + Inception uint32 + KeyTag uint16 + SignerName string `dns:"domain-name"` + Signature string `dns:"base64"` +} + +func (rr *RRSIG) String() string { + s := rr.Hdr.String() + s += Type(rr.TypeCovered).String() + s += " " + strconv.Itoa(int(rr.Algorithm)) + + " " + strconv.Itoa(int(rr.Labels)) + + " " + strconv.FormatInt(int64(rr.OrigTtl), 10) + + " " + TimeToString(rr.Expiration) + + " " + TimeToString(rr.Inception) + + " " + strconv.Itoa(int(rr.KeyTag)) + + " " + sprintName(rr.SignerName) + + " " + rr.Signature + return s +} + +// NSEC RR. See RFC 4034 and RFC 3755. +type NSEC struct { + Hdr RR_Header + NextDomain string `dns:"domain-name"` + TypeBitMap []uint16 `dns:"nsec"` +} + +func (rr *NSEC) String() string { + s := rr.Hdr.String() + sprintName(rr.NextDomain) + for i := 0; i < len(rr.TypeBitMap); i++ { + s += " " + Type(rr.TypeBitMap[i]).String() + } + return s +} + +func (rr *NSEC) len() int { + l := rr.Hdr.len() + len(rr.NextDomain) + 1 + lastwindow := uint32(2 ^ 32 + 1) + for _, t := range rr.TypeBitMap { + window := t / 256 + if uint32(window) != lastwindow { + l += 1 + 32 + } + lastwindow = uint32(window) + } + return l +} + +// DLV RR. See RFC 4431. +type DLV struct{ DS } + +// CDS RR. See RFC 7344. +type CDS struct{ DS } + +// DS RR. See RFC 4034 and RFC 3658. +type DS struct { + Hdr RR_Header + KeyTag uint16 + Algorithm uint8 + DigestType uint8 + Digest string `dns:"hex"` +} + +func (rr *DS) String() string { + return rr.Hdr.String() + strconv.Itoa(int(rr.KeyTag)) + + " " + strconv.Itoa(int(rr.Algorithm)) + + " " + strconv.Itoa(int(rr.DigestType)) + + " " + strings.ToUpper(rr.Digest) +} + +// KX RR. See RFC 2230. +type KX struct { + Hdr RR_Header + Preference uint16 + Exchanger string `dns:"domain-name"` +} + +func (rr *KX) String() string { + return rr.Hdr.String() + strconv.Itoa(int(rr.Preference)) + + " " + sprintName(rr.Exchanger) +} + +// TA RR. See http://www.watson.org/~weiler/INI1999-19.pdf. +type TA struct { + Hdr RR_Header + KeyTag uint16 + Algorithm uint8 + DigestType uint8 + Digest string `dns:"hex"` +} + +func (rr *TA) String() string { + return rr.Hdr.String() + strconv.Itoa(int(rr.KeyTag)) + + " " + strconv.Itoa(int(rr.Algorithm)) + + " " + strconv.Itoa(int(rr.DigestType)) + + " " + strings.ToUpper(rr.Digest) +} + +// TALINK RR. See https://www.iana.org/assignments/dns-parameters/TALINK/talink-completed-template. +type TALINK struct { + Hdr RR_Header + PreviousName string `dns:"domain-name"` + NextName string `dns:"domain-name"` +} + +func (rr *TALINK) String() string { + return rr.Hdr.String() + + sprintName(rr.PreviousName) + " " + sprintName(rr.NextName) +} + +// SSHFP RR. See RFC RFC 4255. +type SSHFP struct { + Hdr RR_Header + Algorithm uint8 + Type uint8 + FingerPrint string `dns:"hex"` +} + +func (rr *SSHFP) String() string { + return rr.Hdr.String() + strconv.Itoa(int(rr.Algorithm)) + + " " + strconv.Itoa(int(rr.Type)) + + " " + strings.ToUpper(rr.FingerPrint) +} + +// KEY RR. See RFC RFC 2535. +type KEY struct { + DNSKEY +} + +// CDNSKEY RR. See RFC 7344. +type CDNSKEY struct { + DNSKEY +} + +// DNSKEY RR. See RFC 4034 and RFC 3755. +type DNSKEY struct { + Hdr RR_Header + Flags uint16 + Protocol uint8 + Algorithm uint8 + PublicKey string `dns:"base64"` +} + +func (rr *DNSKEY) String() string { + return rr.Hdr.String() + strconv.Itoa(int(rr.Flags)) + + " " + strconv.Itoa(int(rr.Protocol)) + + " " + strconv.Itoa(int(rr.Algorithm)) + + " " + rr.PublicKey +} + +// RKEY RR. See https://www.iana.org/assignments/dns-parameters/RKEY/rkey-completed-template. +type RKEY struct { + Hdr RR_Header + Flags uint16 + Protocol uint8 + Algorithm uint8 + PublicKey string `dns:"base64"` +} + +func (rr *RKEY) String() string { + return rr.Hdr.String() + strconv.Itoa(int(rr.Flags)) + + " " + strconv.Itoa(int(rr.Protocol)) + + " " + strconv.Itoa(int(rr.Algorithm)) + + " " + rr.PublicKey +} + +// NSAPPTR RR. See RFC 1348. +type NSAPPTR struct { + Hdr RR_Header + Ptr string `dns:"domain-name"` +} + +func (rr *NSAPPTR) String() string { return rr.Hdr.String() + sprintName(rr.Ptr) } + +// NSEC3 RR. See RFC 5155. +type NSEC3 struct { + Hdr RR_Header + Hash uint8 + Flags uint8 + Iterations uint16 + SaltLength uint8 + Salt string `dns:"size-hex:SaltLength"` + HashLength uint8 + NextDomain string `dns:"size-base32:HashLength"` + TypeBitMap []uint16 `dns:"nsec"` +} + +func (rr *NSEC3) String() string { + s := rr.Hdr.String() + s += strconv.Itoa(int(rr.Hash)) + + " " + strconv.Itoa(int(rr.Flags)) + + " " + strconv.Itoa(int(rr.Iterations)) + + " " + saltToString(rr.Salt) + + " " + rr.NextDomain + for i := 0; i < len(rr.TypeBitMap); i++ { + s += " " + Type(rr.TypeBitMap[i]).String() + } + return s +} + +func (rr *NSEC3) len() int { + l := rr.Hdr.len() + 6 + len(rr.Salt)/2 + 1 + len(rr.NextDomain) + 1 + lastwindow := uint32(2 ^ 32 + 1) + for _, t := range rr.TypeBitMap { + window := t / 256 + if uint32(window) != lastwindow { + l += 1 + 32 + } + lastwindow = uint32(window) + } + return l +} + +// NSEC3PARAM RR. See RFC 5155. +type NSEC3PARAM struct { + Hdr RR_Header + Hash uint8 + Flags uint8 + Iterations uint16 + SaltLength uint8 + Salt string `dns:"size-hex:SaltLength"` +} + +func (rr *NSEC3PARAM) String() string { + s := rr.Hdr.String() + s += strconv.Itoa(int(rr.Hash)) + + " " + strconv.Itoa(int(rr.Flags)) + + " " + strconv.Itoa(int(rr.Iterations)) + + " " + saltToString(rr.Salt) + return s +} + +// TKEY RR. See RFC 2930. +type TKEY struct { + Hdr RR_Header + Algorithm string `dns:"domain-name"` + Inception uint32 + Expiration uint32 + Mode uint16 + Error uint16 + KeySize uint16 + Key string `dns:"size-hex:KeySize"` + OtherLen uint16 + OtherData string `dns:"size-hex:OtherLen"` +} + +// TKEY has no official presentation format, but this will suffice. +func (rr *TKEY) String() string { + s := "\n;; TKEY PSEUDOSECTION:\n" + s += rr.Hdr.String() + " " + rr.Algorithm + " " + + strconv.Itoa(int(rr.KeySize)) + " " + rr.Key + " " + + strconv.Itoa(int(rr.OtherLen)) + " " + rr.OtherData + return s +} + +// RFC3597 represents an unknown/generic RR. See RFC 3597. +type RFC3597 struct { + Hdr RR_Header + Rdata string `dns:"hex"` +} + +func (rr *RFC3597) String() string { + // Let's call it a hack + s := rfc3597Header(rr.Hdr) + + s += "\\# " + strconv.Itoa(len(rr.Rdata)/2) + " " + rr.Rdata + return s +} + +func rfc3597Header(h RR_Header) string { + var s string + + s += sprintName(h.Name) + "\t" + s += strconv.FormatInt(int64(h.Ttl), 10) + "\t" + s += "CLASS" + strconv.Itoa(int(h.Class)) + "\t" + s += "TYPE" + strconv.Itoa(int(h.Rrtype)) + "\t" + return s +} + +// URI RR. See RFC 7553. +type URI struct { + Hdr RR_Header + Priority uint16 + Weight uint16 + Target string `dns:"octet"` +} + +func (rr *URI) String() string { + return rr.Hdr.String() + strconv.Itoa(int(rr.Priority)) + + " " + strconv.Itoa(int(rr.Weight)) + " " + sprintTxtOctet(rr.Target) +} + +// DHCID RR. See RFC 4701. +type DHCID struct { + Hdr RR_Header + Digest string `dns:"base64"` +} + +func (rr *DHCID) String() string { return rr.Hdr.String() + rr.Digest } + +// TLSA RR. See RFC 6698. +type TLSA struct { + Hdr RR_Header + Usage uint8 + Selector uint8 + MatchingType uint8 + Certificate string `dns:"hex"` +} + +func (rr *TLSA) String() string { + return rr.Hdr.String() + + strconv.Itoa(int(rr.Usage)) + + " " + strconv.Itoa(int(rr.Selector)) + + " " + strconv.Itoa(int(rr.MatchingType)) + + " " + rr.Certificate +} + +// SMIMEA RR. See RFC 8162. +type SMIMEA struct { + Hdr RR_Header + Usage uint8 + Selector uint8 + MatchingType uint8 + Certificate string `dns:"hex"` +} + +func (rr *SMIMEA) String() string { + s := rr.Hdr.String() + + strconv.Itoa(int(rr.Usage)) + + " " + strconv.Itoa(int(rr.Selector)) + + " " + strconv.Itoa(int(rr.MatchingType)) + + // Every Nth char needs a space on this output. If we output + // this as one giant line, we can't read it can in because in some cases + // the cert length overflows scan.maxTok (2048). + sx := splitN(rr.Certificate, 1024) // conservative value here + s += " " + strings.Join(sx, " ") + return s +} + +// HIP RR. See RFC 8005. +type HIP struct { + Hdr RR_Header + HitLength uint8 + PublicKeyAlgorithm uint8 + PublicKeyLength uint16 + Hit string `dns:"size-hex:HitLength"` + PublicKey string `dns:"size-base64:PublicKeyLength"` + RendezvousServers []string `dns:"domain-name"` +} + +func (rr *HIP) String() string { + s := rr.Hdr.String() + + strconv.Itoa(int(rr.PublicKeyAlgorithm)) + + " " + rr.Hit + + " " + rr.PublicKey + for _, d := range rr.RendezvousServers { + s += " " + sprintName(d) + } + return s +} + +// NINFO RR. See https://www.iana.org/assignments/dns-parameters/NINFO/ninfo-completed-template. +type NINFO struct { + Hdr RR_Header + ZSData []string `dns:"txt"` +} + +func (rr *NINFO) String() string { return rr.Hdr.String() + sprintTxt(rr.ZSData) } + +// NID RR. See RFC RFC 6742. +type NID struct { + Hdr RR_Header + Preference uint16 + NodeID uint64 +} + +func (rr *NID) String() string { + s := rr.Hdr.String() + strconv.Itoa(int(rr.Preference)) + node := fmt.Sprintf("%0.16x", rr.NodeID) + s += " " + node[0:4] + ":" + node[4:8] + ":" + node[8:12] + ":" + node[12:16] + return s +} + +// L32 RR, See RFC 6742. +type L32 struct { + Hdr RR_Header + Preference uint16 + Locator32 net.IP `dns:"a"` +} + +func (rr *L32) String() string { + if rr.Locator32 == nil { + return rr.Hdr.String() + strconv.Itoa(int(rr.Preference)) + } + return rr.Hdr.String() + strconv.Itoa(int(rr.Preference)) + + " " + rr.Locator32.String() +} + +// L64 RR, See RFC 6742. +type L64 struct { + Hdr RR_Header + Preference uint16 + Locator64 uint64 +} + +func (rr *L64) String() string { + s := rr.Hdr.String() + strconv.Itoa(int(rr.Preference)) + node := fmt.Sprintf("%0.16X", rr.Locator64) + s += " " + node[0:4] + ":" + node[4:8] + ":" + node[8:12] + ":" + node[12:16] + return s +} + +// LP RR. See RFC 6742. +type LP struct { + Hdr RR_Header + Preference uint16 + Fqdn string `dns:"domain-name"` +} + +func (rr *LP) String() string { + return rr.Hdr.String() + strconv.Itoa(int(rr.Preference)) + " " + sprintName(rr.Fqdn) +} + +// EUI48 RR. See RFC 7043. +type EUI48 struct { + Hdr RR_Header + Address uint64 `dns:"uint48"` +} + +func (rr *EUI48) String() string { return rr.Hdr.String() + euiToString(rr.Address, 48) } + +// EUI64 RR. See RFC 7043. +type EUI64 struct { + Hdr RR_Header + Address uint64 +} + +func (rr *EUI64) String() string { return rr.Hdr.String() + euiToString(rr.Address, 64) } + +// CAA RR. See RFC 6844. +type CAA struct { + Hdr RR_Header + Flag uint8 + Tag string + Value string `dns:"octet"` +} + +func (rr *CAA) String() string { + return rr.Hdr.String() + strconv.Itoa(int(rr.Flag)) + " " + rr.Tag + " " + sprintTxtOctet(rr.Value) +} + +// UID RR. Deprecated, IANA-Reserved. +type UID struct { + Hdr RR_Header + Uid uint32 +} + +func (rr *UID) String() string { return rr.Hdr.String() + strconv.FormatInt(int64(rr.Uid), 10) } + +// GID RR. Deprecated, IANA-Reserved. +type GID struct { + Hdr RR_Header + Gid uint32 +} + +func (rr *GID) String() string { return rr.Hdr.String() + strconv.FormatInt(int64(rr.Gid), 10) } + +// UINFO RR. Deprecated, IANA-Reserved. +type UINFO struct { + Hdr RR_Header + Uinfo string +} + +func (rr *UINFO) String() string { return rr.Hdr.String() + sprintTxt([]string{rr.Uinfo}) } + +// EID RR. See http://ana-3.lcs.mit.edu/~jnc/nimrod/dns.txt. +type EID struct { + Hdr RR_Header + Endpoint string `dns:"hex"` +} + +func (rr *EID) String() string { return rr.Hdr.String() + strings.ToUpper(rr.Endpoint) } + +// NIMLOC RR. See http://ana-3.lcs.mit.edu/~jnc/nimrod/dns.txt. +type NIMLOC struct { + Hdr RR_Header + Locator string `dns:"hex"` +} + +func (rr *NIMLOC) String() string { return rr.Hdr.String() + strings.ToUpper(rr.Locator) } + +// OPENPGPKEY RR. See RFC 7929. +type OPENPGPKEY struct { + Hdr RR_Header + PublicKey string `dns:"base64"` +} + +func (rr *OPENPGPKEY) String() string { return rr.Hdr.String() + rr.PublicKey } + +// CSYNC RR. See RFC 7477. +type CSYNC struct { + Hdr RR_Header + Serial uint32 + Flags uint16 + TypeBitMap []uint16 `dns:"nsec"` +} + +func (rr *CSYNC) String() string { + s := rr.Hdr.String() + strconv.FormatInt(int64(rr.Serial), 10) + " " + strconv.Itoa(int(rr.Flags)) + + for i := 0; i < len(rr.TypeBitMap); i++ { + s += " " + Type(rr.TypeBitMap[i]).String() + } + return s +} + +func (rr *CSYNC) len() int { + l := rr.Hdr.len() + 4 + 2 + lastwindow := uint32(2 ^ 32 + 1) + for _, t := range rr.TypeBitMap { + window := t / 256 + if uint32(window) != lastwindow { + l += 1 + 32 + } + lastwindow = uint32(window) + } + return l +} + +// TimeToString translates the RRSIG's incep. and expir. times to the +// string representation used when printing the record. +// It takes serial arithmetic (RFC 1982) into account. +func TimeToString(t uint32) string { + mod := ((int64(t) - time.Now().Unix()) / year68) - 1 + if mod < 0 { + mod = 0 + } + ti := time.Unix(int64(t)-(mod*year68), 0).UTC() + return ti.Format("20060102150405") +} + +// StringToTime translates the RRSIG's incep. and expir. times from +// string values like "20110403154150" to an 32 bit integer. +// It takes serial arithmetic (RFC 1982) into account. +func StringToTime(s string) (uint32, error) { + t, err := time.Parse("20060102150405", s) + if err != nil { + return 0, err + } + mod := (t.Unix() / year68) - 1 + if mod < 0 { + mod = 0 + } + return uint32(t.Unix() - (mod * year68)), nil +} + +// saltToString converts a NSECX salt to uppercase and returns "-" when it is empty. +func saltToString(s string) string { + if len(s) == 0 { + return "-" + } + return strings.ToUpper(s) +} + +func euiToString(eui uint64, bits int) (hex string) { + switch bits { + case 64: + hex = fmt.Sprintf("%16.16x", eui) + hex = hex[0:2] + "-" + hex[2:4] + "-" + hex[4:6] + "-" + hex[6:8] + + "-" + hex[8:10] + "-" + hex[10:12] + "-" + hex[12:14] + "-" + hex[14:16] + case 48: + hex = fmt.Sprintf("%12.12x", eui) + hex = hex[0:2] + "-" + hex[2:4] + "-" + hex[4:6] + "-" + hex[6:8] + + "-" + hex[8:10] + "-" + hex[10:12] + } + return +} + +// copyIP returns a copy of ip. +func copyIP(ip net.IP) net.IP { + p := make(net.IP, len(ip)) + copy(p, ip) + return p +} + +// SplitN splits a string into N sized string chunks. +// This might become an exported function once. +func splitN(s string, n int) []string { + if len(s) < n { + return []string{s} + } + sx := []string{} + p, i := 0, n + for { + if i <= len(s) { + sx = append(sx, s[p:i]) + } else { + sx = append(sx, s[p:]) + break + + } + p, i = p+n, i+n + } + + return sx +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/types_generate.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/types_generate.go new file mode 100644 index 000000000..8703cce64 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/types_generate.go @@ -0,0 +1,272 @@ +//+build ignore + +// types_generate.go is meant to run with go generate. It will use +// go/{importer,types} to track down all the RR struct types. Then for each type +// it will generate conversion tables (TypeToRR and TypeToString) and banal +// methods (len, Header, copy) based on the struct tags. The generated source is +// written to ztypes.go, and is meant to be checked into git. +package main + +import ( + "bytes" + "fmt" + "go/format" + "go/importer" + "go/types" + "log" + "os" + "strings" + "text/template" +) + +var skipLen = map[string]struct{}{ + "NSEC": {}, + "NSEC3": {}, + "OPT": {}, + "CSYNC": {}, +} + +var packageHdr = ` +// Code generated by "go run types_generate.go"; DO NOT EDIT. + +package dns + +import ( + "encoding/base64" + "net" +) + +` + +var TypeToRR = template.Must(template.New("TypeToRR").Parse(` +// TypeToRR is a map of constructors for each RR type. +var TypeToRR = map[uint16]func() RR{ +{{range .}}{{if ne . "RFC3597"}} Type{{.}}: func() RR { return new({{.}}) }, +{{end}}{{end}} } + +`)) + +var typeToString = template.Must(template.New("typeToString").Parse(` +// TypeToString is a map of strings for each RR type. +var TypeToString = map[uint16]string{ +{{range .}}{{if ne . "NSAPPTR"}} Type{{.}}: "{{.}}", +{{end}}{{end}} TypeNSAPPTR: "NSAP-PTR", +} + +`)) + +var headerFunc = template.Must(template.New("headerFunc").Parse(` +{{range .}} func (rr *{{.}}) Header() *RR_Header { return &rr.Hdr } +{{end}} + +`)) + +// getTypeStruct will take a type and the package scope, and return the +// (innermost) struct if the type is considered a RR type (currently defined as +// those structs beginning with a RR_Header, could be redefined as implementing +// the RR interface). The bool return value indicates if embedded structs were +// resolved. +func getTypeStruct(t types.Type, scope *types.Scope) (*types.Struct, bool) { + st, ok := t.Underlying().(*types.Struct) + if !ok { + return nil, false + } + if st.Field(0).Type() == scope.Lookup("RR_Header").Type() { + return st, false + } + if st.Field(0).Anonymous() { + st, _ := getTypeStruct(st.Field(0).Type(), scope) + return st, true + } + return nil, false +} + +func main() { + // Import and type-check the package + pkg, err := importer.Default().Import("github.com/miekg/dns") + fatalIfErr(err) + scope := pkg.Scope() + + // Collect constants like TypeX + var numberedTypes []string + for _, name := range scope.Names() { + o := scope.Lookup(name) + if o == nil || !o.Exported() { + continue + } + b, ok := o.Type().(*types.Basic) + if !ok || b.Kind() != types.Uint16 { + continue + } + if !strings.HasPrefix(o.Name(), "Type") { + continue + } + name := strings.TrimPrefix(o.Name(), "Type") + if name == "PrivateRR" { + continue + } + numberedTypes = append(numberedTypes, name) + } + + // Collect actual types (*X) + var namedTypes []string + for _, name := range scope.Names() { + o := scope.Lookup(name) + if o == nil || !o.Exported() { + continue + } + if st, _ := getTypeStruct(o.Type(), scope); st == nil { + continue + } + if name == "PrivateRR" { + continue + } + + // Check if corresponding TypeX exists + if scope.Lookup("Type"+o.Name()) == nil && o.Name() != "RFC3597" { + log.Fatalf("Constant Type%s does not exist.", o.Name()) + } + + namedTypes = append(namedTypes, o.Name()) + } + + b := &bytes.Buffer{} + b.WriteString(packageHdr) + + // Generate TypeToRR + fatalIfErr(TypeToRR.Execute(b, namedTypes)) + + // Generate typeToString + fatalIfErr(typeToString.Execute(b, numberedTypes)) + + // Generate headerFunc + fatalIfErr(headerFunc.Execute(b, namedTypes)) + + // Generate len() + fmt.Fprint(b, "// len() functions\n") + for _, name := range namedTypes { + if _, ok := skipLen[name]; ok { + continue + } + o := scope.Lookup(name) + st, isEmbedded := getTypeStruct(o.Type(), scope) + if isEmbedded { + continue + } + fmt.Fprintf(b, "func (rr *%s) len() int {\n", name) + fmt.Fprintf(b, "l := rr.Hdr.len()\n") + for i := 1; i < st.NumFields(); i++ { + o := func(s string) { fmt.Fprintf(b, s, st.Field(i).Name()) } + + if _, ok := st.Field(i).Type().(*types.Slice); ok { + switch st.Tag(i) { + case `dns:"-"`: + // ignored + case `dns:"cdomain-name"`, `dns:"domain-name"`, `dns:"txt"`: + o("for _, x := range rr.%s { l += len(x) + 1 }\n") + default: + log.Fatalln(name, st.Field(i).Name(), st.Tag(i)) + } + continue + } + + switch { + case st.Tag(i) == `dns:"-"`: + // ignored + case st.Tag(i) == `dns:"cdomain-name"`, st.Tag(i) == `dns:"domain-name"`: + o("l += len(rr.%s) + 1\n") + case st.Tag(i) == `dns:"octet"`: + o("l += len(rr.%s)\n") + case strings.HasPrefix(st.Tag(i), `dns:"size-base64`): + fallthrough + case st.Tag(i) == `dns:"base64"`: + o("l += base64.StdEncoding.DecodedLen(len(rr.%s))\n") + case strings.HasPrefix(st.Tag(i), `dns:"size-hex:`): // this has an extra field where the length is stored + o("l += len(rr.%s)/2\n") + case strings.HasPrefix(st.Tag(i), `dns:"size-hex`): + fallthrough + case st.Tag(i) == `dns:"hex"`: + o("l += len(rr.%s)/2 + 1\n") + case st.Tag(i) == `dns:"a"`: + o("l += net.IPv4len // %s\n") + case st.Tag(i) == `dns:"aaaa"`: + o("l += net.IPv6len // %s\n") + case st.Tag(i) == `dns:"txt"`: + o("for _, t := range rr.%s { l += len(t) + 1 }\n") + case st.Tag(i) == `dns:"uint48"`: + o("l += 6 // %s\n") + case st.Tag(i) == "": + switch st.Field(i).Type().(*types.Basic).Kind() { + case types.Uint8: + o("l++ // %s\n") + case types.Uint16: + o("l += 2 // %s\n") + case types.Uint32: + o("l += 4 // %s\n") + case types.Uint64: + o("l += 8 // %s\n") + case types.String: + o("l += len(rr.%s) + 1\n") + default: + log.Fatalln(name, st.Field(i).Name()) + } + default: + log.Fatalln(name, st.Field(i).Name(), st.Tag(i)) + } + } + fmt.Fprintf(b, "return l }\n") + } + + // Generate copy() + fmt.Fprint(b, "// copy() functions\n") + for _, name := range namedTypes { + o := scope.Lookup(name) + st, isEmbedded := getTypeStruct(o.Type(), scope) + if isEmbedded { + continue + } + fmt.Fprintf(b, "func (rr *%s) copy() RR {\n", name) + fields := []string{"*rr.Hdr.copyHeader()"} + for i := 1; i < st.NumFields(); i++ { + f := st.Field(i).Name() + if sl, ok := st.Field(i).Type().(*types.Slice); ok { + t := sl.Underlying().String() + t = strings.TrimPrefix(t, "[]") + if strings.Contains(t, ".") { + splits := strings.Split(t, ".") + t = splits[len(splits)-1] + } + fmt.Fprintf(b, "%s := make([]%s, len(rr.%s)); copy(%s, rr.%s)\n", + f, t, f, f, f) + fields = append(fields, f) + continue + } + if st.Field(i).Type().String() == "net.IP" { + fields = append(fields, "copyIP(rr."+f+")") + continue + } + fields = append(fields, "rr."+f) + } + fmt.Fprintf(b, "return &%s{%s}\n", name, strings.Join(fields, ",")) + fmt.Fprintf(b, "}\n") + } + + // gofmt + res, err := format.Source(b.Bytes()) + if err != nil { + b.WriteTo(os.Stderr) + log.Fatal(err) + } + + // write result + f, err := os.Create("ztypes.go") + fatalIfErr(err) + defer f.Close() + f.Write(res) +} + +func fatalIfErr(err error) { + if err != nil { + log.Fatal(err) + } +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/udp.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/udp.go new file mode 100644 index 000000000..f3f31a7ac --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/udp.go @@ -0,0 +1,89 @@ +// +build !windows + +package dns + +import ( + "net" + + "golang.org/x/net/ipv4" + "golang.org/x/net/ipv6" +) + +// SessionUDP holds the remote address and the associated +// out-of-band data. +type SessionUDP struct { + raddr *net.UDPAddr + context []byte +} + +// RemoteAddr returns the remote network address. +func (s *SessionUDP) RemoteAddr() net.Addr { return s.raddr } + +// ReadFromSessionUDP acts just like net.UDPConn.ReadFrom(), but returns a session object instead of a +// net.UDPAddr. +func ReadFromSessionUDP(conn *net.UDPConn, b []byte) (int, *SessionUDP, error) { + oob := make([]byte, 40) + n, oobn, _, raddr, err := conn.ReadMsgUDP(b, oob) + if err != nil { + return n, nil, err + } + return n, &SessionUDP{raddr, oob[:oobn]}, err +} + +// WriteToSessionUDP acts just like net.UDPConn.WriteTo(), but uses a *SessionUDP instead of a net.Addr. +func WriteToSessionUDP(conn *net.UDPConn, b []byte, session *SessionUDP) (int, error) { + oob := correctSource(session.context) + n, _, err := conn.WriteMsgUDP(b, oob, session.raddr) + return n, err +} + +func setUDPSocketOptions(conn *net.UDPConn) error { + // Try setting the flags for both families and ignore the errors unless they + // both error. + err6 := ipv6.NewPacketConn(conn).SetControlMessage(ipv6.FlagDst|ipv6.FlagInterface, true) + err4 := ipv4.NewPacketConn(conn).SetControlMessage(ipv4.FlagDst|ipv4.FlagInterface, true) + if err6 != nil && err4 != nil { + return err4 + } + return nil +} + +// parseDstFromOOB takes oob data and returns the destination IP. +func parseDstFromOOB(oob []byte) net.IP { + // Start with IPv6 and then fallback to IPv4 + // TODO(fastest963): Figure out a way to prefer one or the other. Looking at + // the lvl of the header for a 0 or 41 isn't cross-platform. + var dst net.IP + cm6 := new(ipv6.ControlMessage) + if cm6.Parse(oob) == nil { + dst = cm6.Dst + } + if dst == nil { + cm4 := new(ipv4.ControlMessage) + if cm4.Parse(oob) == nil { + dst = cm4.Dst + } + } + return dst +} + +// correctSource takes oob data and returns new oob data with the Src equal to the Dst +func correctSource(oob []byte) []byte { + dst := parseDstFromOOB(oob) + if dst == nil { + return nil + } + // If the dst is definitely an IPv6, then use ipv6's ControlMessage to + // respond otherwise use ipv4's because ipv6's marshal ignores ipv4 + // addresses. + if dst.To4() == nil { + cm := new(ipv6.ControlMessage) + cm.Src = dst + oob = cm.Marshal() + } else { + cm := new(ipv4.ControlMessage) + cm.Src = dst + oob = cm.Marshal() + } + return oob +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/udp_windows.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/udp_windows.go new file mode 100644 index 000000000..6778c3c6c --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/udp_windows.go @@ -0,0 +1,37 @@ +// +build windows + +package dns + +import "net" + +// SessionUDP holds the remote address +type SessionUDP struct { + raddr *net.UDPAddr +} + +// RemoteAddr returns the remote network address. +func (s *SessionUDP) RemoteAddr() net.Addr { return s.raddr } + +// ReadFromSessionUDP acts just like net.UDPConn.ReadFrom(), but returns a session object instead of a +// net.UDPAddr. +// TODO(fastest963): Once go1.10 is released, use ReadMsgUDP. +func ReadFromSessionUDP(conn *net.UDPConn, b []byte) (int, *SessionUDP, error) { + n, raddr, err := conn.ReadFrom(b) + if err != nil { + return n, nil, err + } + session := &SessionUDP{raddr.(*net.UDPAddr)} + return n, session, err +} + +// WriteToSessionUDP acts just like net.UDPConn.WriteTo(), but uses a *SessionUDP instead of a net.Addr. +// TODO(fastest963): Once go1.10 is released, use WriteMsgUDP. +func WriteToSessionUDP(conn *net.UDPConn, b []byte, session *SessionUDP) (int, error) { + n, err := conn.WriteTo(b, session.raddr) + return n, err +} + +// TODO(fastest963): Once go1.10 is released and we can use *MsgUDP methods +// use the standard method in udp.go for these. +func setUDPSocketOptions(*net.UDPConn) error { return nil } +func parseDstFromOOB([]byte, net.IP) net.IP { return nil } diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/update.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/update.go new file mode 100644 index 000000000..e90c5c968 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/update.go @@ -0,0 +1,106 @@ +package dns + +// NameUsed sets the RRs in the prereq section to +// "Name is in use" RRs. RFC 2136 section 2.4.4. +func (u *Msg) NameUsed(rr []RR) { + if u.Answer == nil { + u.Answer = make([]RR, 0, len(rr)) + } + for _, r := range rr { + u.Answer = append(u.Answer, &ANY{Hdr: RR_Header{Name: r.Header().Name, Ttl: 0, Rrtype: TypeANY, Class: ClassANY}}) + } +} + +// NameNotUsed sets the RRs in the prereq section to +// "Name is in not use" RRs. RFC 2136 section 2.4.5. +func (u *Msg) NameNotUsed(rr []RR) { + if u.Answer == nil { + u.Answer = make([]RR, 0, len(rr)) + } + for _, r := range rr { + u.Answer = append(u.Answer, &ANY{Hdr: RR_Header{Name: r.Header().Name, Ttl: 0, Rrtype: TypeANY, Class: ClassNONE}}) + } +} + +// Used sets the RRs in the prereq section to +// "RRset exists (value dependent -- with rdata)" RRs. RFC 2136 section 2.4.2. +func (u *Msg) Used(rr []RR) { + if len(u.Question) == 0 { + panic("dns: empty question section") + } + if u.Answer == nil { + u.Answer = make([]RR, 0, len(rr)) + } + for _, r := range rr { + r.Header().Class = u.Question[0].Qclass + u.Answer = append(u.Answer, r) + } +} + +// RRsetUsed sets the RRs in the prereq section to +// "RRset exists (value independent -- no rdata)" RRs. RFC 2136 section 2.4.1. +func (u *Msg) RRsetUsed(rr []RR) { + if u.Answer == nil { + u.Answer = make([]RR, 0, len(rr)) + } + for _, r := range rr { + u.Answer = append(u.Answer, &ANY{Hdr: RR_Header{Name: r.Header().Name, Ttl: 0, Rrtype: r.Header().Rrtype, Class: ClassANY}}) + } +} + +// RRsetNotUsed sets the RRs in the prereq section to +// "RRset does not exist" RRs. RFC 2136 section 2.4.3. +func (u *Msg) RRsetNotUsed(rr []RR) { + if u.Answer == nil { + u.Answer = make([]RR, 0, len(rr)) + } + for _, r := range rr { + u.Answer = append(u.Answer, &ANY{Hdr: RR_Header{Name: r.Header().Name, Ttl: 0, Rrtype: r.Header().Rrtype, Class: ClassNONE}}) + } +} + +// Insert creates a dynamic update packet that adds an complete RRset, see RFC 2136 section 2.5.1. +func (u *Msg) Insert(rr []RR) { + if len(u.Question) == 0 { + panic("dns: empty question section") + } + if u.Ns == nil { + u.Ns = make([]RR, 0, len(rr)) + } + for _, r := range rr { + r.Header().Class = u.Question[0].Qclass + u.Ns = append(u.Ns, r) + } +} + +// RemoveRRset creates a dynamic update packet that deletes an RRset, see RFC 2136 section 2.5.2. +func (u *Msg) RemoveRRset(rr []RR) { + if u.Ns == nil { + u.Ns = make([]RR, 0, len(rr)) + } + for _, r := range rr { + u.Ns = append(u.Ns, &ANY{Hdr: RR_Header{Name: r.Header().Name, Ttl: 0, Rrtype: r.Header().Rrtype, Class: ClassANY}}) + } +} + +// RemoveName creates a dynamic update packet that deletes all RRsets of a name, see RFC 2136 section 2.5.3 +func (u *Msg) RemoveName(rr []RR) { + if u.Ns == nil { + u.Ns = make([]RR, 0, len(rr)) + } + for _, r := range rr { + u.Ns = append(u.Ns, &ANY{Hdr: RR_Header{Name: r.Header().Name, Ttl: 0, Rrtype: TypeANY, Class: ClassANY}}) + } +} + +// Remove creates a dynamic update packet deletes RR from a RRSset, see RFC 2136 section 2.5.4 +func (u *Msg) Remove(rr []RR) { + if u.Ns == nil { + u.Ns = make([]RR, 0, len(rr)) + } + for _, r := range rr { + r.Header().Class = ClassNONE + r.Header().Ttl = 0 + u.Ns = append(u.Ns, r) + } +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/version.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/version.go new file mode 100644 index 000000000..e41d2b3ca --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/version.go @@ -0,0 +1,15 @@ +package dns + +import "fmt" + +// Version is current version of this library. +var Version = V{1, 0, 4} + +// V holds the version of this library. +type V struct { + Major, Minor, Patch int +} + +func (v V) String() string { + return fmt.Sprintf("%d.%d.%d", v.Major, v.Minor, v.Patch) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/xfr.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/xfr.go new file mode 100644 index 000000000..5d0ff5c8a --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/xfr.go @@ -0,0 +1,260 @@ +package dns + +import ( + "fmt" + "time" +) + +// Envelope is used when doing a zone transfer with a remote server. +type Envelope struct { + RR []RR // The set of RRs in the answer section of the xfr reply message. + Error error // If something went wrong, this contains the error. +} + +// A Transfer defines parameters that are used during a zone transfer. +type Transfer struct { + *Conn + DialTimeout time.Duration // net.DialTimeout, defaults to 2 seconds + ReadTimeout time.Duration // net.Conn.SetReadTimeout value for connections, defaults to 2 seconds + WriteTimeout time.Duration // net.Conn.SetWriteTimeout value for connections, defaults to 2 seconds + TsigSecret map[string]string // Secret(s) for Tsig map[], zonename must be in canonical form (lowercase, fqdn, see RFC 4034 Section 6.2) + tsigTimersOnly bool +} + +// Think we need to away to stop the transfer + +// In performs an incoming transfer with the server in a. +// If you would like to set the source IP, or some other attribute +// of a Dialer for a Transfer, you can do so by specifying the attributes +// in the Transfer.Conn: +// +// d := net.Dialer{LocalAddr: transfer_source} +// con, err := d.Dial("tcp", master) +// dnscon := &dns.Conn{Conn:con} +// transfer = &dns.Transfer{Conn: dnscon} +// channel, err := transfer.In(message, master) +// +func (t *Transfer) In(q *Msg, a string) (env chan *Envelope, err error) { + timeout := dnsTimeout + if t.DialTimeout != 0 { + timeout = t.DialTimeout + } + if t.Conn == nil { + t.Conn, err = DialTimeout("tcp", a, timeout) + if err != nil { + return nil, err + } + } + if err := t.WriteMsg(q); err != nil { + return nil, err + } + env = make(chan *Envelope) + go func() { + if q.Question[0].Qtype == TypeAXFR { + go t.inAxfr(q, env) + return + } + if q.Question[0].Qtype == TypeIXFR { + go t.inIxfr(q, env) + return + } + }() + return env, nil +} + +func (t *Transfer) inAxfr(q *Msg, c chan *Envelope) { + first := true + defer t.Close() + defer close(c) + timeout := dnsTimeout + if t.ReadTimeout != 0 { + timeout = t.ReadTimeout + } + for { + t.Conn.SetReadDeadline(time.Now().Add(timeout)) + in, err := t.ReadMsg() + if err != nil { + c <- &Envelope{nil, err} + return + } + if q.Id != in.Id { + c <- &Envelope{in.Answer, ErrId} + return + } + if first { + if in.Rcode != RcodeSuccess { + c <- &Envelope{in.Answer, &Error{err: fmt.Sprintf(errXFR, in.Rcode)}} + return + } + if !isSOAFirst(in) { + c <- &Envelope{in.Answer, ErrSoa} + return + } + first = !first + // only one answer that is SOA, receive more + if len(in.Answer) == 1 { + t.tsigTimersOnly = true + c <- &Envelope{in.Answer, nil} + continue + } + } + + if !first { + t.tsigTimersOnly = true // Subsequent envelopes use this. + if isSOALast(in) { + c <- &Envelope{in.Answer, nil} + return + } + c <- &Envelope{in.Answer, nil} + } + } +} + +func (t *Transfer) inIxfr(q *Msg, c chan *Envelope) { + serial := uint32(0) // The first serial seen is the current server serial + axfr := true + n := 0 + qser := q.Ns[0].(*SOA).Serial + defer t.Close() + defer close(c) + timeout := dnsTimeout + if t.ReadTimeout != 0 { + timeout = t.ReadTimeout + } + for { + t.SetReadDeadline(time.Now().Add(timeout)) + in, err := t.ReadMsg() + if err != nil { + c <- &Envelope{nil, err} + return + } + if q.Id != in.Id { + c <- &Envelope{in.Answer, ErrId} + return + } + if in.Rcode != RcodeSuccess { + c <- &Envelope{in.Answer, &Error{err: fmt.Sprintf(errXFR, in.Rcode)}} + return + } + if n == 0 { + // Check if the returned answer is ok + if !isSOAFirst(in) { + c <- &Envelope{in.Answer, ErrSoa} + return + } + // This serial is important + serial = in.Answer[0].(*SOA).Serial + // Check if there are no changes in zone + if qser >= serial { + c <- &Envelope{in.Answer, nil} + return + } + } + // Now we need to check each message for SOA records, to see what we need to do + t.tsigTimersOnly = true + for _, rr := range in.Answer { + if v, ok := rr.(*SOA); ok { + if v.Serial == serial { + n++ + // quit if it's a full axfr or the the servers' SOA is repeated the third time + if axfr && n == 2 || n == 3 { + c <- &Envelope{in.Answer, nil} + return + } + } else if axfr { + // it's an ixfr + axfr = false + } + } + } + c <- &Envelope{in.Answer, nil} + } +} + +// Out performs an outgoing transfer with the client connecting in w. +// Basic use pattern: +// +// ch := make(chan *dns.Envelope) +// tr := new(dns.Transfer) +// go tr.Out(w, r, ch) +// ch <- &dns.Envelope{RR: []dns.RR{soa, rr1, rr2, rr3, soa}} +// close(ch) +// w.Hijack() +// // w.Close() // Client closes connection +// +// The server is responsible for sending the correct sequence of RRs through the +// channel ch. +func (t *Transfer) Out(w ResponseWriter, q *Msg, ch chan *Envelope) error { + for x := range ch { + r := new(Msg) + // Compress? + r.SetReply(q) + r.Authoritative = true + // assume it fits TODO(miek): fix + r.Answer = append(r.Answer, x.RR...) + if err := w.WriteMsg(r); err != nil { + return err + } + } + w.TsigTimersOnly(true) + return nil +} + +// ReadMsg reads a message from the transfer connection t. +func (t *Transfer) ReadMsg() (*Msg, error) { + m := new(Msg) + p := make([]byte, MaxMsgSize) + n, err := t.Read(p) + if err != nil && n == 0 { + return nil, err + } + p = p[:n] + if err := m.Unpack(p); err != nil { + return nil, err + } + if ts := m.IsTsig(); ts != nil && t.TsigSecret != nil { + if _, ok := t.TsigSecret[ts.Hdr.Name]; !ok { + return m, ErrSecret + } + // Need to work on the original message p, as that was used to calculate the tsig. + err = TsigVerify(p, t.TsigSecret[ts.Hdr.Name], t.tsigRequestMAC, t.tsigTimersOnly) + t.tsigRequestMAC = ts.MAC + } + return m, err +} + +// WriteMsg writes a message through the transfer connection t. +func (t *Transfer) WriteMsg(m *Msg) (err error) { + var out []byte + if ts := m.IsTsig(); ts != nil && t.TsigSecret != nil { + if _, ok := t.TsigSecret[ts.Hdr.Name]; !ok { + return ErrSecret + } + out, t.tsigRequestMAC, err = TsigGenerate(m, t.TsigSecret[ts.Hdr.Name], t.tsigRequestMAC, t.tsigTimersOnly) + } else { + out, err = m.Pack() + } + if err != nil { + return err + } + if _, err = t.Write(out); err != nil { + return err + } + return nil +} + +func isSOAFirst(in *Msg) bool { + if len(in.Answer) > 0 { + return in.Answer[0].Header().Rrtype == TypeSOA + } + return false +} + +func isSOALast(in *Msg) bool { + if len(in.Answer) > 0 { + return in.Answer[len(in.Answer)-1].Header().Rrtype == TypeSOA + } + return false +} + +const errXFR = "bad xfr rcode: %d" diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/zcompress.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/zcompress.go new file mode 100644 index 000000000..c2503204d --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/zcompress.go @@ -0,0 +1,118 @@ +// Code generated by "go run compress_generate.go"; DO NOT EDIT. + +package dns + +func compressionLenHelperType(c map[string]int, r RR) { + switch x := r.(type) { + case *AFSDB: + compressionLenHelper(c, x.Hostname) + case *CNAME: + compressionLenHelper(c, x.Target) + case *DNAME: + compressionLenHelper(c, x.Target) + case *HIP: + for i := range x.RendezvousServers { + compressionLenHelper(c, x.RendezvousServers[i]) + } + case *KX: + compressionLenHelper(c, x.Exchanger) + case *LP: + compressionLenHelper(c, x.Fqdn) + case *MB: + compressionLenHelper(c, x.Mb) + case *MD: + compressionLenHelper(c, x.Md) + case *MF: + compressionLenHelper(c, x.Mf) + case *MG: + compressionLenHelper(c, x.Mg) + case *MINFO: + compressionLenHelper(c, x.Rmail) + compressionLenHelper(c, x.Email) + case *MR: + compressionLenHelper(c, x.Mr) + case *MX: + compressionLenHelper(c, x.Mx) + case *NAPTR: + compressionLenHelper(c, x.Replacement) + case *NS: + compressionLenHelper(c, x.Ns) + case *NSAPPTR: + compressionLenHelper(c, x.Ptr) + case *NSEC: + compressionLenHelper(c, x.NextDomain) + case *PTR: + compressionLenHelper(c, x.Ptr) + case *PX: + compressionLenHelper(c, x.Map822) + compressionLenHelper(c, x.Mapx400) + case *RP: + compressionLenHelper(c, x.Mbox) + compressionLenHelper(c, x.Txt) + case *RRSIG: + compressionLenHelper(c, x.SignerName) + case *RT: + compressionLenHelper(c, x.Host) + case *SIG: + compressionLenHelper(c, x.SignerName) + case *SOA: + compressionLenHelper(c, x.Ns) + compressionLenHelper(c, x.Mbox) + case *SRV: + compressionLenHelper(c, x.Target) + case *TALINK: + compressionLenHelper(c, x.PreviousName) + compressionLenHelper(c, x.NextName) + case *TKEY: + compressionLenHelper(c, x.Algorithm) + case *TSIG: + compressionLenHelper(c, x.Algorithm) + } +} + +func compressionLenSearchType(c map[string]int, r RR) (int, bool) { + switch x := r.(type) { + case *AFSDB: + k1, ok1 := compressionLenSearch(c, x.Hostname) + return k1, ok1 + case *CNAME: + k1, ok1 := compressionLenSearch(c, x.Target) + return k1, ok1 + case *MB: + k1, ok1 := compressionLenSearch(c, x.Mb) + return k1, ok1 + case *MD: + k1, ok1 := compressionLenSearch(c, x.Md) + return k1, ok1 + case *MF: + k1, ok1 := compressionLenSearch(c, x.Mf) + return k1, ok1 + case *MG: + k1, ok1 := compressionLenSearch(c, x.Mg) + return k1, ok1 + case *MINFO: + k1, ok1 := compressionLenSearch(c, x.Rmail) + k2, ok2 := compressionLenSearch(c, x.Email) + return k1 + k2, ok1 && ok2 + case *MR: + k1, ok1 := compressionLenSearch(c, x.Mr) + return k1, ok1 + case *MX: + k1, ok1 := compressionLenSearch(c, x.Mx) + return k1, ok1 + case *NS: + k1, ok1 := compressionLenSearch(c, x.Ns) + return k1, ok1 + case *PTR: + k1, ok1 := compressionLenSearch(c, x.Ptr) + return k1, ok1 + case *RT: + k1, ok1 := compressionLenSearch(c, x.Host) + return k1, ok1 + case *SOA: + k1, ok1 := compressionLenSearch(c, x.Ns) + k2, ok2 := compressionLenSearch(c, x.Mbox) + return k1 + k2, ok1 && ok2 + } + return 0, false +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/zmsg.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/zmsg.go new file mode 100644 index 000000000..0d1f6f4da --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/zmsg.go @@ -0,0 +1,3615 @@ +// Code generated by "go run msg_generate.go"; DO NOT EDIT. + +package dns + +// pack*() functions + +func (rr *A) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packDataA(rr.A, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *AAAA) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packDataAAAA(rr.AAAA, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *AFSDB) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint16(rr.Subtype, msg, off) + if err != nil { + return off, err + } + off, err = PackDomainName(rr.Hostname, msg, off, compression, compress) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *ANY) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *AVC) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packStringTxt(rr.Txt, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *CAA) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint8(rr.Flag, msg, off) + if err != nil { + return off, err + } + off, err = packString(rr.Tag, msg, off) + if err != nil { + return off, err + } + off, err = packStringOctet(rr.Value, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *CDNSKEY) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint16(rr.Flags, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.Protocol, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.Algorithm, msg, off) + if err != nil { + return off, err + } + off, err = packStringBase64(rr.PublicKey, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *CDS) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint16(rr.KeyTag, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.Algorithm, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.DigestType, msg, off) + if err != nil { + return off, err + } + off, err = packStringHex(rr.Digest, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *CERT) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint16(rr.Type, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(rr.KeyTag, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.Algorithm, msg, off) + if err != nil { + return off, err + } + off, err = packStringBase64(rr.Certificate, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *CNAME) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = PackDomainName(rr.Target, msg, off, compression, compress) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *CSYNC) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint32(rr.Serial, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(rr.Flags, msg, off) + if err != nil { + return off, err + } + off, err = packDataNsec(rr.TypeBitMap, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *DHCID) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packStringBase64(rr.Digest, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *DLV) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint16(rr.KeyTag, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.Algorithm, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.DigestType, msg, off) + if err != nil { + return off, err + } + off, err = packStringHex(rr.Digest, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *DNAME) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = PackDomainName(rr.Target, msg, off, compression, false) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *DNSKEY) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint16(rr.Flags, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.Protocol, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.Algorithm, msg, off) + if err != nil { + return off, err + } + off, err = packStringBase64(rr.PublicKey, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *DS) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint16(rr.KeyTag, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.Algorithm, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.DigestType, msg, off) + if err != nil { + return off, err + } + off, err = packStringHex(rr.Digest, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *EID) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packStringHex(rr.Endpoint, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *EUI48) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint48(rr.Address, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *EUI64) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint64(rr.Address, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *GID) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint32(rr.Gid, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *GPOS) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packString(rr.Longitude, msg, off) + if err != nil { + return off, err + } + off, err = packString(rr.Latitude, msg, off) + if err != nil { + return off, err + } + off, err = packString(rr.Altitude, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *HINFO) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packString(rr.Cpu, msg, off) + if err != nil { + return off, err + } + off, err = packString(rr.Os, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *HIP) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint8(rr.HitLength, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.PublicKeyAlgorithm, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(rr.PublicKeyLength, msg, off) + if err != nil { + return off, err + } + off, err = packStringHex(rr.Hit, msg, off) + if err != nil { + return off, err + } + off, err = packStringBase64(rr.PublicKey, msg, off) + if err != nil { + return off, err + } + off, err = packDataDomainNames(rr.RendezvousServers, msg, off, compression, compress) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *KEY) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint16(rr.Flags, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.Protocol, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.Algorithm, msg, off) + if err != nil { + return off, err + } + off, err = packStringBase64(rr.PublicKey, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *KX) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint16(rr.Preference, msg, off) + if err != nil { + return off, err + } + off, err = PackDomainName(rr.Exchanger, msg, off, compression, false) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *L32) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint16(rr.Preference, msg, off) + if err != nil { + return off, err + } + off, err = packDataA(rr.Locator32, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *L64) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint16(rr.Preference, msg, off) + if err != nil { + return off, err + } + off, err = packUint64(rr.Locator64, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *LOC) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint8(rr.Version, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.Size, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.HorizPre, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.VertPre, msg, off) + if err != nil { + return off, err + } + off, err = packUint32(rr.Latitude, msg, off) + if err != nil { + return off, err + } + off, err = packUint32(rr.Longitude, msg, off) + if err != nil { + return off, err + } + off, err = packUint32(rr.Altitude, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *LP) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint16(rr.Preference, msg, off) + if err != nil { + return off, err + } + off, err = PackDomainName(rr.Fqdn, msg, off, compression, false) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *MB) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = PackDomainName(rr.Mb, msg, off, compression, compress) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *MD) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = PackDomainName(rr.Md, msg, off, compression, compress) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *MF) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = PackDomainName(rr.Mf, msg, off, compression, compress) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *MG) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = PackDomainName(rr.Mg, msg, off, compression, compress) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *MINFO) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = PackDomainName(rr.Rmail, msg, off, compression, compress) + if err != nil { + return off, err + } + off, err = PackDomainName(rr.Email, msg, off, compression, compress) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *MR) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = PackDomainName(rr.Mr, msg, off, compression, compress) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *MX) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint16(rr.Preference, msg, off) + if err != nil { + return off, err + } + off, err = PackDomainName(rr.Mx, msg, off, compression, compress) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *NAPTR) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint16(rr.Order, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(rr.Preference, msg, off) + if err != nil { + return off, err + } + off, err = packString(rr.Flags, msg, off) + if err != nil { + return off, err + } + off, err = packString(rr.Service, msg, off) + if err != nil { + return off, err + } + off, err = packString(rr.Regexp, msg, off) + if err != nil { + return off, err + } + off, err = PackDomainName(rr.Replacement, msg, off, compression, false) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *NID) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint16(rr.Preference, msg, off) + if err != nil { + return off, err + } + off, err = packUint64(rr.NodeID, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *NIMLOC) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packStringHex(rr.Locator, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *NINFO) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packStringTxt(rr.ZSData, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *NS) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = PackDomainName(rr.Ns, msg, off, compression, compress) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *NSAPPTR) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = PackDomainName(rr.Ptr, msg, off, compression, false) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *NSEC) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = PackDomainName(rr.NextDomain, msg, off, compression, false) + if err != nil { + return off, err + } + off, err = packDataNsec(rr.TypeBitMap, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *NSEC3) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint8(rr.Hash, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.Flags, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(rr.Iterations, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.SaltLength, msg, off) + if err != nil { + return off, err + } + // Only pack salt if value is not "-", i.e. empty + if rr.Salt != "-" { + off, err = packStringHex(rr.Salt, msg, off) + if err != nil { + return off, err + } + } + off, err = packUint8(rr.HashLength, msg, off) + if err != nil { + return off, err + } + off, err = packStringBase32(rr.NextDomain, msg, off) + if err != nil { + return off, err + } + off, err = packDataNsec(rr.TypeBitMap, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *NSEC3PARAM) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint8(rr.Hash, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.Flags, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(rr.Iterations, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.SaltLength, msg, off) + if err != nil { + return off, err + } + // Only pack salt if value is not "-", i.e. empty + if rr.Salt != "-" { + off, err = packStringHex(rr.Salt, msg, off) + if err != nil { + return off, err + } + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *OPENPGPKEY) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packStringBase64(rr.PublicKey, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *OPT) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packDataOpt(rr.Option, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *PTR) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = PackDomainName(rr.Ptr, msg, off, compression, compress) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *PX) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint16(rr.Preference, msg, off) + if err != nil { + return off, err + } + off, err = PackDomainName(rr.Map822, msg, off, compression, false) + if err != nil { + return off, err + } + off, err = PackDomainName(rr.Mapx400, msg, off, compression, false) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *RFC3597) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packStringHex(rr.Rdata, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *RKEY) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint16(rr.Flags, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.Protocol, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.Algorithm, msg, off) + if err != nil { + return off, err + } + off, err = packStringBase64(rr.PublicKey, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *RP) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = PackDomainName(rr.Mbox, msg, off, compression, false) + if err != nil { + return off, err + } + off, err = PackDomainName(rr.Txt, msg, off, compression, false) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *RRSIG) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint16(rr.TypeCovered, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.Algorithm, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.Labels, msg, off) + if err != nil { + return off, err + } + off, err = packUint32(rr.OrigTtl, msg, off) + if err != nil { + return off, err + } + off, err = packUint32(rr.Expiration, msg, off) + if err != nil { + return off, err + } + off, err = packUint32(rr.Inception, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(rr.KeyTag, msg, off) + if err != nil { + return off, err + } + off, err = PackDomainName(rr.SignerName, msg, off, compression, false) + if err != nil { + return off, err + } + off, err = packStringBase64(rr.Signature, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *RT) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint16(rr.Preference, msg, off) + if err != nil { + return off, err + } + off, err = PackDomainName(rr.Host, msg, off, compression, compress) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *SIG) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint16(rr.TypeCovered, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.Algorithm, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.Labels, msg, off) + if err != nil { + return off, err + } + off, err = packUint32(rr.OrigTtl, msg, off) + if err != nil { + return off, err + } + off, err = packUint32(rr.Expiration, msg, off) + if err != nil { + return off, err + } + off, err = packUint32(rr.Inception, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(rr.KeyTag, msg, off) + if err != nil { + return off, err + } + off, err = PackDomainName(rr.SignerName, msg, off, compression, false) + if err != nil { + return off, err + } + off, err = packStringBase64(rr.Signature, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *SMIMEA) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint8(rr.Usage, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.Selector, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.MatchingType, msg, off) + if err != nil { + return off, err + } + off, err = packStringHex(rr.Certificate, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *SOA) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = PackDomainName(rr.Ns, msg, off, compression, compress) + if err != nil { + return off, err + } + off, err = PackDomainName(rr.Mbox, msg, off, compression, compress) + if err != nil { + return off, err + } + off, err = packUint32(rr.Serial, msg, off) + if err != nil { + return off, err + } + off, err = packUint32(rr.Refresh, msg, off) + if err != nil { + return off, err + } + off, err = packUint32(rr.Retry, msg, off) + if err != nil { + return off, err + } + off, err = packUint32(rr.Expire, msg, off) + if err != nil { + return off, err + } + off, err = packUint32(rr.Minttl, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *SPF) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packStringTxt(rr.Txt, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *SRV) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint16(rr.Priority, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(rr.Weight, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(rr.Port, msg, off) + if err != nil { + return off, err + } + off, err = PackDomainName(rr.Target, msg, off, compression, false) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *SSHFP) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint8(rr.Algorithm, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.Type, msg, off) + if err != nil { + return off, err + } + off, err = packStringHex(rr.FingerPrint, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *TA) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint16(rr.KeyTag, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.Algorithm, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.DigestType, msg, off) + if err != nil { + return off, err + } + off, err = packStringHex(rr.Digest, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *TALINK) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = PackDomainName(rr.PreviousName, msg, off, compression, false) + if err != nil { + return off, err + } + off, err = PackDomainName(rr.NextName, msg, off, compression, false) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *TKEY) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = PackDomainName(rr.Algorithm, msg, off, compression, false) + if err != nil { + return off, err + } + off, err = packUint32(rr.Inception, msg, off) + if err != nil { + return off, err + } + off, err = packUint32(rr.Expiration, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(rr.Mode, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(rr.Error, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(rr.KeySize, msg, off) + if err != nil { + return off, err + } + off, err = packStringHex(rr.Key, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(rr.OtherLen, msg, off) + if err != nil { + return off, err + } + off, err = packStringHex(rr.OtherData, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *TLSA) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint8(rr.Usage, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.Selector, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.MatchingType, msg, off) + if err != nil { + return off, err + } + off, err = packStringHex(rr.Certificate, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *TSIG) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = PackDomainName(rr.Algorithm, msg, off, compression, false) + if err != nil { + return off, err + } + off, err = packUint48(rr.TimeSigned, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(rr.Fudge, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(rr.MACSize, msg, off) + if err != nil { + return off, err + } + off, err = packStringHex(rr.MAC, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(rr.OrigId, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(rr.Error, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(rr.OtherLen, msg, off) + if err != nil { + return off, err + } + off, err = packStringHex(rr.OtherData, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *TXT) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packStringTxt(rr.Txt, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *UID) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint32(rr.Uid, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *UINFO) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packString(rr.Uinfo, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *URI) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint16(rr.Priority, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(rr.Weight, msg, off) + if err != nil { + return off, err + } + off, err = packStringOctet(rr.Target, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *X25) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packString(rr.PSDNAddress, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +// unpack*() functions + +func unpackA(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(A) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.A, off, err = unpackDataA(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackAAAA(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(AAAA) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.AAAA, off, err = unpackDataAAAA(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackAFSDB(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(AFSDB) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Subtype, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Hostname, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackANY(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(ANY) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + return rr, off, err +} + +func unpackAVC(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(AVC) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Txt, off, err = unpackStringTxt(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackCAA(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(CAA) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Flag, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Tag, off, err = unpackString(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Value, off, err = unpackStringOctet(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackCDNSKEY(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(CDNSKEY) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Flags, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Protocol, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Algorithm, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.PublicKey, off, err = unpackStringBase64(msg, off, rdStart+int(rr.Hdr.Rdlength)) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackCDS(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(CDS) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.KeyTag, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Algorithm, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.DigestType, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Digest, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength)) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackCERT(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(CERT) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Type, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.KeyTag, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Algorithm, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Certificate, off, err = unpackStringBase64(msg, off, rdStart+int(rr.Hdr.Rdlength)) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackCNAME(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(CNAME) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Target, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackCSYNC(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(CSYNC) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Serial, off, err = unpackUint32(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Flags, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.TypeBitMap, off, err = unpackDataNsec(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackDHCID(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(DHCID) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Digest, off, err = unpackStringBase64(msg, off, rdStart+int(rr.Hdr.Rdlength)) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackDLV(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(DLV) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.KeyTag, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Algorithm, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.DigestType, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Digest, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength)) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackDNAME(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(DNAME) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Target, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackDNSKEY(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(DNSKEY) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Flags, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Protocol, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Algorithm, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.PublicKey, off, err = unpackStringBase64(msg, off, rdStart+int(rr.Hdr.Rdlength)) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackDS(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(DS) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.KeyTag, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Algorithm, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.DigestType, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Digest, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength)) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackEID(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(EID) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Endpoint, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength)) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackEUI48(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(EUI48) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Address, off, err = unpackUint48(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackEUI64(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(EUI64) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Address, off, err = unpackUint64(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackGID(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(GID) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Gid, off, err = unpackUint32(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackGPOS(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(GPOS) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Longitude, off, err = unpackString(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Latitude, off, err = unpackString(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Altitude, off, err = unpackString(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackHINFO(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(HINFO) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Cpu, off, err = unpackString(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Os, off, err = unpackString(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackHIP(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(HIP) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.HitLength, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.PublicKeyAlgorithm, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.PublicKeyLength, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Hit, off, err = unpackStringHex(msg, off, off+int(rr.HitLength)) + if err != nil { + return rr, off, err + } + rr.PublicKey, off, err = unpackStringBase64(msg, off, off+int(rr.PublicKeyLength)) + if err != nil { + return rr, off, err + } + rr.RendezvousServers, off, err = unpackDataDomainNames(msg, off, rdStart+int(rr.Hdr.Rdlength)) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackKEY(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(KEY) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Flags, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Protocol, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Algorithm, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.PublicKey, off, err = unpackStringBase64(msg, off, rdStart+int(rr.Hdr.Rdlength)) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackKX(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(KX) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Preference, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Exchanger, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackL32(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(L32) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Preference, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Locator32, off, err = unpackDataA(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackL64(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(L64) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Preference, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Locator64, off, err = unpackUint64(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackLOC(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(LOC) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Version, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Size, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.HorizPre, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.VertPre, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Latitude, off, err = unpackUint32(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Longitude, off, err = unpackUint32(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Altitude, off, err = unpackUint32(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackLP(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(LP) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Preference, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Fqdn, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackMB(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(MB) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Mb, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackMD(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(MD) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Md, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackMF(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(MF) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Mf, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackMG(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(MG) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Mg, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackMINFO(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(MINFO) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Rmail, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Email, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackMR(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(MR) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Mr, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackMX(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(MX) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Preference, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Mx, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackNAPTR(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(NAPTR) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Order, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Preference, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Flags, off, err = unpackString(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Service, off, err = unpackString(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Regexp, off, err = unpackString(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Replacement, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackNID(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(NID) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Preference, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.NodeID, off, err = unpackUint64(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackNIMLOC(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(NIMLOC) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Locator, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength)) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackNINFO(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(NINFO) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.ZSData, off, err = unpackStringTxt(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackNS(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(NS) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Ns, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackNSAPPTR(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(NSAPPTR) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Ptr, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackNSEC(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(NSEC) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.NextDomain, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.TypeBitMap, off, err = unpackDataNsec(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackNSEC3(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(NSEC3) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Hash, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Flags, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Iterations, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.SaltLength, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Salt, off, err = unpackStringHex(msg, off, off+int(rr.SaltLength)) + if err != nil { + return rr, off, err + } + rr.HashLength, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.NextDomain, off, err = unpackStringBase32(msg, off, off+int(rr.HashLength)) + if err != nil { + return rr, off, err + } + rr.TypeBitMap, off, err = unpackDataNsec(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackNSEC3PARAM(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(NSEC3PARAM) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Hash, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Flags, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Iterations, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.SaltLength, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Salt, off, err = unpackStringHex(msg, off, off+int(rr.SaltLength)) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackOPENPGPKEY(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(OPENPGPKEY) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.PublicKey, off, err = unpackStringBase64(msg, off, rdStart+int(rr.Hdr.Rdlength)) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackOPT(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(OPT) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Option, off, err = unpackDataOpt(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackPTR(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(PTR) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Ptr, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackPX(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(PX) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Preference, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Map822, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Mapx400, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackRFC3597(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(RFC3597) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Rdata, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength)) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackRKEY(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(RKEY) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Flags, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Protocol, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Algorithm, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.PublicKey, off, err = unpackStringBase64(msg, off, rdStart+int(rr.Hdr.Rdlength)) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackRP(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(RP) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Mbox, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Txt, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackRRSIG(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(RRSIG) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.TypeCovered, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Algorithm, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Labels, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.OrigTtl, off, err = unpackUint32(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Expiration, off, err = unpackUint32(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Inception, off, err = unpackUint32(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.KeyTag, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.SignerName, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Signature, off, err = unpackStringBase64(msg, off, rdStart+int(rr.Hdr.Rdlength)) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackRT(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(RT) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Preference, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Host, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackSIG(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(SIG) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.TypeCovered, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Algorithm, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Labels, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.OrigTtl, off, err = unpackUint32(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Expiration, off, err = unpackUint32(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Inception, off, err = unpackUint32(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.KeyTag, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.SignerName, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Signature, off, err = unpackStringBase64(msg, off, rdStart+int(rr.Hdr.Rdlength)) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackSMIMEA(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(SMIMEA) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Usage, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Selector, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.MatchingType, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Certificate, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength)) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackSOA(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(SOA) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Ns, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Mbox, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Serial, off, err = unpackUint32(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Refresh, off, err = unpackUint32(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Retry, off, err = unpackUint32(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Expire, off, err = unpackUint32(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Minttl, off, err = unpackUint32(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackSPF(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(SPF) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Txt, off, err = unpackStringTxt(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackSRV(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(SRV) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Priority, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Weight, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Port, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Target, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackSSHFP(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(SSHFP) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Algorithm, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Type, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.FingerPrint, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength)) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackTA(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(TA) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.KeyTag, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Algorithm, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.DigestType, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Digest, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength)) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackTALINK(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(TALINK) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.PreviousName, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.NextName, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackTKEY(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(TKEY) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Algorithm, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Inception, off, err = unpackUint32(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Expiration, off, err = unpackUint32(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Mode, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Error, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.KeySize, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Key, off, err = unpackStringHex(msg, off, off+int(rr.KeySize)) + if err != nil { + return rr, off, err + } + rr.OtherLen, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.OtherData, off, err = unpackStringHex(msg, off, off+int(rr.OtherLen)) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackTLSA(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(TLSA) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Usage, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Selector, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.MatchingType, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Certificate, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength)) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackTSIG(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(TSIG) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Algorithm, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.TimeSigned, off, err = unpackUint48(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Fudge, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.MACSize, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.MAC, off, err = unpackStringHex(msg, off, off+int(rr.MACSize)) + if err != nil { + return rr, off, err + } + rr.OrigId, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Error, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.OtherLen, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.OtherData, off, err = unpackStringHex(msg, off, off+int(rr.OtherLen)) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackTXT(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(TXT) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Txt, off, err = unpackStringTxt(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackUID(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(UID) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Uid, off, err = unpackUint32(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackUINFO(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(UINFO) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Uinfo, off, err = unpackString(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackURI(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(URI) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Priority, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Weight, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Target, off, err = unpackStringOctet(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackX25(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(X25) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.PSDNAddress, off, err = unpackString(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +var typeToUnpack = map[uint16]func(RR_Header, []byte, int) (RR, int, error){ + TypeA: unpackA, + TypeAAAA: unpackAAAA, + TypeAFSDB: unpackAFSDB, + TypeANY: unpackANY, + TypeAVC: unpackAVC, + TypeCAA: unpackCAA, + TypeCDNSKEY: unpackCDNSKEY, + TypeCDS: unpackCDS, + TypeCERT: unpackCERT, + TypeCNAME: unpackCNAME, + TypeCSYNC: unpackCSYNC, + TypeDHCID: unpackDHCID, + TypeDLV: unpackDLV, + TypeDNAME: unpackDNAME, + TypeDNSKEY: unpackDNSKEY, + TypeDS: unpackDS, + TypeEID: unpackEID, + TypeEUI48: unpackEUI48, + TypeEUI64: unpackEUI64, + TypeGID: unpackGID, + TypeGPOS: unpackGPOS, + TypeHINFO: unpackHINFO, + TypeHIP: unpackHIP, + TypeKEY: unpackKEY, + TypeKX: unpackKX, + TypeL32: unpackL32, + TypeL64: unpackL64, + TypeLOC: unpackLOC, + TypeLP: unpackLP, + TypeMB: unpackMB, + TypeMD: unpackMD, + TypeMF: unpackMF, + TypeMG: unpackMG, + TypeMINFO: unpackMINFO, + TypeMR: unpackMR, + TypeMX: unpackMX, + TypeNAPTR: unpackNAPTR, + TypeNID: unpackNID, + TypeNIMLOC: unpackNIMLOC, + TypeNINFO: unpackNINFO, + TypeNS: unpackNS, + TypeNSAPPTR: unpackNSAPPTR, + TypeNSEC: unpackNSEC, + TypeNSEC3: unpackNSEC3, + TypeNSEC3PARAM: unpackNSEC3PARAM, + TypeOPENPGPKEY: unpackOPENPGPKEY, + TypeOPT: unpackOPT, + TypePTR: unpackPTR, + TypePX: unpackPX, + TypeRKEY: unpackRKEY, + TypeRP: unpackRP, + TypeRRSIG: unpackRRSIG, + TypeRT: unpackRT, + TypeSIG: unpackSIG, + TypeSMIMEA: unpackSMIMEA, + TypeSOA: unpackSOA, + TypeSPF: unpackSPF, + TypeSRV: unpackSRV, + TypeSSHFP: unpackSSHFP, + TypeTA: unpackTA, + TypeTALINK: unpackTALINK, + TypeTKEY: unpackTKEY, + TypeTLSA: unpackTLSA, + TypeTSIG: unpackTSIG, + TypeTXT: unpackTXT, + TypeUID: unpackUID, + TypeUINFO: unpackUINFO, + TypeURI: unpackURI, + TypeX25: unpackX25, +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/ztypes.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/ztypes.go new file mode 100644 index 000000000..abd75dd91 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/github.com/miekg/dns/ztypes.go @@ -0,0 +1,863 @@ +// Code generated by "go run types_generate.go"; DO NOT EDIT. + +package dns + +import ( + "encoding/base64" + "net" +) + +// TypeToRR is a map of constructors for each RR type. +var TypeToRR = map[uint16]func() RR{ + TypeA: func() RR { return new(A) }, + TypeAAAA: func() RR { return new(AAAA) }, + TypeAFSDB: func() RR { return new(AFSDB) }, + TypeANY: func() RR { return new(ANY) }, + TypeAVC: func() RR { return new(AVC) }, + TypeCAA: func() RR { return new(CAA) }, + TypeCDNSKEY: func() RR { return new(CDNSKEY) }, + TypeCDS: func() RR { return new(CDS) }, + TypeCERT: func() RR { return new(CERT) }, + TypeCNAME: func() RR { return new(CNAME) }, + TypeCSYNC: func() RR { return new(CSYNC) }, + TypeDHCID: func() RR { return new(DHCID) }, + TypeDLV: func() RR { return new(DLV) }, + TypeDNAME: func() RR { return new(DNAME) }, + TypeDNSKEY: func() RR { return new(DNSKEY) }, + TypeDS: func() RR { return new(DS) }, + TypeEID: func() RR { return new(EID) }, + TypeEUI48: func() RR { return new(EUI48) }, + TypeEUI64: func() RR { return new(EUI64) }, + TypeGID: func() RR { return new(GID) }, + TypeGPOS: func() RR { return new(GPOS) }, + TypeHINFO: func() RR { return new(HINFO) }, + TypeHIP: func() RR { return new(HIP) }, + TypeKEY: func() RR { return new(KEY) }, + TypeKX: func() RR { return new(KX) }, + TypeL32: func() RR { return new(L32) }, + TypeL64: func() RR { return new(L64) }, + TypeLOC: func() RR { return new(LOC) }, + TypeLP: func() RR { return new(LP) }, + TypeMB: func() RR { return new(MB) }, + TypeMD: func() RR { return new(MD) }, + TypeMF: func() RR { return new(MF) }, + TypeMG: func() RR { return new(MG) }, + TypeMINFO: func() RR { return new(MINFO) }, + TypeMR: func() RR { return new(MR) }, + TypeMX: func() RR { return new(MX) }, + TypeNAPTR: func() RR { return new(NAPTR) }, + TypeNID: func() RR { return new(NID) }, + TypeNIMLOC: func() RR { return new(NIMLOC) }, + TypeNINFO: func() RR { return new(NINFO) }, + TypeNS: func() RR { return new(NS) }, + TypeNSAPPTR: func() RR { return new(NSAPPTR) }, + TypeNSEC: func() RR { return new(NSEC) }, + TypeNSEC3: func() RR { return new(NSEC3) }, + TypeNSEC3PARAM: func() RR { return new(NSEC3PARAM) }, + TypeOPENPGPKEY: func() RR { return new(OPENPGPKEY) }, + TypeOPT: func() RR { return new(OPT) }, + TypePTR: func() RR { return new(PTR) }, + TypePX: func() RR { return new(PX) }, + TypeRKEY: func() RR { return new(RKEY) }, + TypeRP: func() RR { return new(RP) }, + TypeRRSIG: func() RR { return new(RRSIG) }, + TypeRT: func() RR { return new(RT) }, + TypeSIG: func() RR { return new(SIG) }, + TypeSMIMEA: func() RR { return new(SMIMEA) }, + TypeSOA: func() RR { return new(SOA) }, + TypeSPF: func() RR { return new(SPF) }, + TypeSRV: func() RR { return new(SRV) }, + TypeSSHFP: func() RR { return new(SSHFP) }, + TypeTA: func() RR { return new(TA) }, + TypeTALINK: func() RR { return new(TALINK) }, + TypeTKEY: func() RR { return new(TKEY) }, + TypeTLSA: func() RR { return new(TLSA) }, + TypeTSIG: func() RR { return new(TSIG) }, + TypeTXT: func() RR { return new(TXT) }, + TypeUID: func() RR { return new(UID) }, + TypeUINFO: func() RR { return new(UINFO) }, + TypeURI: func() RR { return new(URI) }, + TypeX25: func() RR { return new(X25) }, +} + +// TypeToString is a map of strings for each RR type. +var TypeToString = map[uint16]string{ + TypeA: "A", + TypeAAAA: "AAAA", + TypeAFSDB: "AFSDB", + TypeANY: "ANY", + TypeATMA: "ATMA", + TypeAVC: "AVC", + TypeAXFR: "AXFR", + TypeCAA: "CAA", + TypeCDNSKEY: "CDNSKEY", + TypeCDS: "CDS", + TypeCERT: "CERT", + TypeCNAME: "CNAME", + TypeCSYNC: "CSYNC", + TypeDHCID: "DHCID", + TypeDLV: "DLV", + TypeDNAME: "DNAME", + TypeDNSKEY: "DNSKEY", + TypeDS: "DS", + TypeEID: "EID", + TypeEUI48: "EUI48", + TypeEUI64: "EUI64", + TypeGID: "GID", + TypeGPOS: "GPOS", + TypeHINFO: "HINFO", + TypeHIP: "HIP", + TypeISDN: "ISDN", + TypeIXFR: "IXFR", + TypeKEY: "KEY", + TypeKX: "KX", + TypeL32: "L32", + TypeL64: "L64", + TypeLOC: "LOC", + TypeLP: "LP", + TypeMAILA: "MAILA", + TypeMAILB: "MAILB", + TypeMB: "MB", + TypeMD: "MD", + TypeMF: "MF", + TypeMG: "MG", + TypeMINFO: "MINFO", + TypeMR: "MR", + TypeMX: "MX", + TypeNAPTR: "NAPTR", + TypeNID: "NID", + TypeNIMLOC: "NIMLOC", + TypeNINFO: "NINFO", + TypeNS: "NS", + TypeNSEC: "NSEC", + TypeNSEC3: "NSEC3", + TypeNSEC3PARAM: "NSEC3PARAM", + TypeNULL: "NULL", + TypeNXT: "NXT", + TypeNone: "None", + TypeOPENPGPKEY: "OPENPGPKEY", + TypeOPT: "OPT", + TypePTR: "PTR", + TypePX: "PX", + TypeRKEY: "RKEY", + TypeRP: "RP", + TypeRRSIG: "RRSIG", + TypeRT: "RT", + TypeReserved: "Reserved", + TypeSIG: "SIG", + TypeSMIMEA: "SMIMEA", + TypeSOA: "SOA", + TypeSPF: "SPF", + TypeSRV: "SRV", + TypeSSHFP: "SSHFP", + TypeTA: "TA", + TypeTALINK: "TALINK", + TypeTKEY: "TKEY", + TypeTLSA: "TLSA", + TypeTSIG: "TSIG", + TypeTXT: "TXT", + TypeUID: "UID", + TypeUINFO: "UINFO", + TypeUNSPEC: "UNSPEC", + TypeURI: "URI", + TypeX25: "X25", + TypeNSAPPTR: "NSAP-PTR", +} + +func (rr *A) Header() *RR_Header { return &rr.Hdr } +func (rr *AAAA) Header() *RR_Header { return &rr.Hdr } +func (rr *AFSDB) Header() *RR_Header { return &rr.Hdr } +func (rr *ANY) Header() *RR_Header { return &rr.Hdr } +func (rr *AVC) Header() *RR_Header { return &rr.Hdr } +func (rr *CAA) Header() *RR_Header { return &rr.Hdr } +func (rr *CDNSKEY) Header() *RR_Header { return &rr.Hdr } +func (rr *CDS) Header() *RR_Header { return &rr.Hdr } +func (rr *CERT) Header() *RR_Header { return &rr.Hdr } +func (rr *CNAME) Header() *RR_Header { return &rr.Hdr } +func (rr *CSYNC) Header() *RR_Header { return &rr.Hdr } +func (rr *DHCID) Header() *RR_Header { return &rr.Hdr } +func (rr *DLV) Header() *RR_Header { return &rr.Hdr } +func (rr *DNAME) Header() *RR_Header { return &rr.Hdr } +func (rr *DNSKEY) Header() *RR_Header { return &rr.Hdr } +func (rr *DS) Header() *RR_Header { return &rr.Hdr } +func (rr *EID) Header() *RR_Header { return &rr.Hdr } +func (rr *EUI48) Header() *RR_Header { return &rr.Hdr } +func (rr *EUI64) Header() *RR_Header { return &rr.Hdr } +func (rr *GID) Header() *RR_Header { return &rr.Hdr } +func (rr *GPOS) Header() *RR_Header { return &rr.Hdr } +func (rr *HINFO) Header() *RR_Header { return &rr.Hdr } +func (rr *HIP) Header() *RR_Header { return &rr.Hdr } +func (rr *KEY) Header() *RR_Header { return &rr.Hdr } +func (rr *KX) Header() *RR_Header { return &rr.Hdr } +func (rr *L32) Header() *RR_Header { return &rr.Hdr } +func (rr *L64) Header() *RR_Header { return &rr.Hdr } +func (rr *LOC) Header() *RR_Header { return &rr.Hdr } +func (rr *LP) Header() *RR_Header { return &rr.Hdr } +func (rr *MB) Header() *RR_Header { return &rr.Hdr } +func (rr *MD) Header() *RR_Header { return &rr.Hdr } +func (rr *MF) Header() *RR_Header { return &rr.Hdr } +func (rr *MG) Header() *RR_Header { return &rr.Hdr } +func (rr *MINFO) Header() *RR_Header { return &rr.Hdr } +func (rr *MR) Header() *RR_Header { return &rr.Hdr } +func (rr *MX) Header() *RR_Header { return &rr.Hdr } +func (rr *NAPTR) Header() *RR_Header { return &rr.Hdr } +func (rr *NID) Header() *RR_Header { return &rr.Hdr } +func (rr *NIMLOC) Header() *RR_Header { return &rr.Hdr } +func (rr *NINFO) Header() *RR_Header { return &rr.Hdr } +func (rr *NS) Header() *RR_Header { return &rr.Hdr } +func (rr *NSAPPTR) Header() *RR_Header { return &rr.Hdr } +func (rr *NSEC) Header() *RR_Header { return &rr.Hdr } +func (rr *NSEC3) Header() *RR_Header { return &rr.Hdr } +func (rr *NSEC3PARAM) Header() *RR_Header { return &rr.Hdr } +func (rr *OPENPGPKEY) Header() *RR_Header { return &rr.Hdr } +func (rr *OPT) Header() *RR_Header { return &rr.Hdr } +func (rr *PTR) Header() *RR_Header { return &rr.Hdr } +func (rr *PX) Header() *RR_Header { return &rr.Hdr } +func (rr *RFC3597) Header() *RR_Header { return &rr.Hdr } +func (rr *RKEY) Header() *RR_Header { return &rr.Hdr } +func (rr *RP) Header() *RR_Header { return &rr.Hdr } +func (rr *RRSIG) Header() *RR_Header { return &rr.Hdr } +func (rr *RT) Header() *RR_Header { return &rr.Hdr } +func (rr *SIG) Header() *RR_Header { return &rr.Hdr } +func (rr *SMIMEA) Header() *RR_Header { return &rr.Hdr } +func (rr *SOA) Header() *RR_Header { return &rr.Hdr } +func (rr *SPF) Header() *RR_Header { return &rr.Hdr } +func (rr *SRV) Header() *RR_Header { return &rr.Hdr } +func (rr *SSHFP) Header() *RR_Header { return &rr.Hdr } +func (rr *TA) Header() *RR_Header { return &rr.Hdr } +func (rr *TALINK) Header() *RR_Header { return &rr.Hdr } +func (rr *TKEY) Header() *RR_Header { return &rr.Hdr } +func (rr *TLSA) Header() *RR_Header { return &rr.Hdr } +func (rr *TSIG) Header() *RR_Header { return &rr.Hdr } +func (rr *TXT) Header() *RR_Header { return &rr.Hdr } +func (rr *UID) Header() *RR_Header { return &rr.Hdr } +func (rr *UINFO) Header() *RR_Header { return &rr.Hdr } +func (rr *URI) Header() *RR_Header { return &rr.Hdr } +func (rr *X25) Header() *RR_Header { return &rr.Hdr } + +// len() functions +func (rr *A) len() int { + l := rr.Hdr.len() + l += net.IPv4len // A + return l +} +func (rr *AAAA) len() int { + l := rr.Hdr.len() + l += net.IPv6len // AAAA + return l +} +func (rr *AFSDB) len() int { + l := rr.Hdr.len() + l += 2 // Subtype + l += len(rr.Hostname) + 1 + return l +} +func (rr *ANY) len() int { + l := rr.Hdr.len() + return l +} +func (rr *AVC) len() int { + l := rr.Hdr.len() + for _, x := range rr.Txt { + l += len(x) + 1 + } + return l +} +func (rr *CAA) len() int { + l := rr.Hdr.len() + l++ // Flag + l += len(rr.Tag) + 1 + l += len(rr.Value) + return l +} +func (rr *CERT) len() int { + l := rr.Hdr.len() + l += 2 // Type + l += 2 // KeyTag + l++ // Algorithm + l += base64.StdEncoding.DecodedLen(len(rr.Certificate)) + return l +} +func (rr *CNAME) len() int { + l := rr.Hdr.len() + l += len(rr.Target) + 1 + return l +} +func (rr *DHCID) len() int { + l := rr.Hdr.len() + l += base64.StdEncoding.DecodedLen(len(rr.Digest)) + return l +} +func (rr *DNAME) len() int { + l := rr.Hdr.len() + l += len(rr.Target) + 1 + return l +} +func (rr *DNSKEY) len() int { + l := rr.Hdr.len() + l += 2 // Flags + l++ // Protocol + l++ // Algorithm + l += base64.StdEncoding.DecodedLen(len(rr.PublicKey)) + return l +} +func (rr *DS) len() int { + l := rr.Hdr.len() + l += 2 // KeyTag + l++ // Algorithm + l++ // DigestType + l += len(rr.Digest)/2 + 1 + return l +} +func (rr *EID) len() int { + l := rr.Hdr.len() + l += len(rr.Endpoint)/2 + 1 + return l +} +func (rr *EUI48) len() int { + l := rr.Hdr.len() + l += 6 // Address + return l +} +func (rr *EUI64) len() int { + l := rr.Hdr.len() + l += 8 // Address + return l +} +func (rr *GID) len() int { + l := rr.Hdr.len() + l += 4 // Gid + return l +} +func (rr *GPOS) len() int { + l := rr.Hdr.len() + l += len(rr.Longitude) + 1 + l += len(rr.Latitude) + 1 + l += len(rr.Altitude) + 1 + return l +} +func (rr *HINFO) len() int { + l := rr.Hdr.len() + l += len(rr.Cpu) + 1 + l += len(rr.Os) + 1 + return l +} +func (rr *HIP) len() int { + l := rr.Hdr.len() + l++ // HitLength + l++ // PublicKeyAlgorithm + l += 2 // PublicKeyLength + l += len(rr.Hit) / 2 + l += base64.StdEncoding.DecodedLen(len(rr.PublicKey)) + for _, x := range rr.RendezvousServers { + l += len(x) + 1 + } + return l +} +func (rr *KX) len() int { + l := rr.Hdr.len() + l += 2 // Preference + l += len(rr.Exchanger) + 1 + return l +} +func (rr *L32) len() int { + l := rr.Hdr.len() + l += 2 // Preference + l += net.IPv4len // Locator32 + return l +} +func (rr *L64) len() int { + l := rr.Hdr.len() + l += 2 // Preference + l += 8 // Locator64 + return l +} +func (rr *LOC) len() int { + l := rr.Hdr.len() + l++ // Version + l++ // Size + l++ // HorizPre + l++ // VertPre + l += 4 // Latitude + l += 4 // Longitude + l += 4 // Altitude + return l +} +func (rr *LP) len() int { + l := rr.Hdr.len() + l += 2 // Preference + l += len(rr.Fqdn) + 1 + return l +} +func (rr *MB) len() int { + l := rr.Hdr.len() + l += len(rr.Mb) + 1 + return l +} +func (rr *MD) len() int { + l := rr.Hdr.len() + l += len(rr.Md) + 1 + return l +} +func (rr *MF) len() int { + l := rr.Hdr.len() + l += len(rr.Mf) + 1 + return l +} +func (rr *MG) len() int { + l := rr.Hdr.len() + l += len(rr.Mg) + 1 + return l +} +func (rr *MINFO) len() int { + l := rr.Hdr.len() + l += len(rr.Rmail) + 1 + l += len(rr.Email) + 1 + return l +} +func (rr *MR) len() int { + l := rr.Hdr.len() + l += len(rr.Mr) + 1 + return l +} +func (rr *MX) len() int { + l := rr.Hdr.len() + l += 2 // Preference + l += len(rr.Mx) + 1 + return l +} +func (rr *NAPTR) len() int { + l := rr.Hdr.len() + l += 2 // Order + l += 2 // Preference + l += len(rr.Flags) + 1 + l += len(rr.Service) + 1 + l += len(rr.Regexp) + 1 + l += len(rr.Replacement) + 1 + return l +} +func (rr *NID) len() int { + l := rr.Hdr.len() + l += 2 // Preference + l += 8 // NodeID + return l +} +func (rr *NIMLOC) len() int { + l := rr.Hdr.len() + l += len(rr.Locator)/2 + 1 + return l +} +func (rr *NINFO) len() int { + l := rr.Hdr.len() + for _, x := range rr.ZSData { + l += len(x) + 1 + } + return l +} +func (rr *NS) len() int { + l := rr.Hdr.len() + l += len(rr.Ns) + 1 + return l +} +func (rr *NSAPPTR) len() int { + l := rr.Hdr.len() + l += len(rr.Ptr) + 1 + return l +} +func (rr *NSEC3PARAM) len() int { + l := rr.Hdr.len() + l++ // Hash + l++ // Flags + l += 2 // Iterations + l++ // SaltLength + l += len(rr.Salt) / 2 + return l +} +func (rr *OPENPGPKEY) len() int { + l := rr.Hdr.len() + l += base64.StdEncoding.DecodedLen(len(rr.PublicKey)) + return l +} +func (rr *PTR) len() int { + l := rr.Hdr.len() + l += len(rr.Ptr) + 1 + return l +} +func (rr *PX) len() int { + l := rr.Hdr.len() + l += 2 // Preference + l += len(rr.Map822) + 1 + l += len(rr.Mapx400) + 1 + return l +} +func (rr *RFC3597) len() int { + l := rr.Hdr.len() + l += len(rr.Rdata)/2 + 1 + return l +} +func (rr *RKEY) len() int { + l := rr.Hdr.len() + l += 2 // Flags + l++ // Protocol + l++ // Algorithm + l += base64.StdEncoding.DecodedLen(len(rr.PublicKey)) + return l +} +func (rr *RP) len() int { + l := rr.Hdr.len() + l += len(rr.Mbox) + 1 + l += len(rr.Txt) + 1 + return l +} +func (rr *RRSIG) len() int { + l := rr.Hdr.len() + l += 2 // TypeCovered + l++ // Algorithm + l++ // Labels + l += 4 // OrigTtl + l += 4 // Expiration + l += 4 // Inception + l += 2 // KeyTag + l += len(rr.SignerName) + 1 + l += base64.StdEncoding.DecodedLen(len(rr.Signature)) + return l +} +func (rr *RT) len() int { + l := rr.Hdr.len() + l += 2 // Preference + l += len(rr.Host) + 1 + return l +} +func (rr *SMIMEA) len() int { + l := rr.Hdr.len() + l++ // Usage + l++ // Selector + l++ // MatchingType + l += len(rr.Certificate)/2 + 1 + return l +} +func (rr *SOA) len() int { + l := rr.Hdr.len() + l += len(rr.Ns) + 1 + l += len(rr.Mbox) + 1 + l += 4 // Serial + l += 4 // Refresh + l += 4 // Retry + l += 4 // Expire + l += 4 // Minttl + return l +} +func (rr *SPF) len() int { + l := rr.Hdr.len() + for _, x := range rr.Txt { + l += len(x) + 1 + } + return l +} +func (rr *SRV) len() int { + l := rr.Hdr.len() + l += 2 // Priority + l += 2 // Weight + l += 2 // Port + l += len(rr.Target) + 1 + return l +} +func (rr *SSHFP) len() int { + l := rr.Hdr.len() + l++ // Algorithm + l++ // Type + l += len(rr.FingerPrint)/2 + 1 + return l +} +func (rr *TA) len() int { + l := rr.Hdr.len() + l += 2 // KeyTag + l++ // Algorithm + l++ // DigestType + l += len(rr.Digest)/2 + 1 + return l +} +func (rr *TALINK) len() int { + l := rr.Hdr.len() + l += len(rr.PreviousName) + 1 + l += len(rr.NextName) + 1 + return l +} +func (rr *TKEY) len() int { + l := rr.Hdr.len() + l += len(rr.Algorithm) + 1 + l += 4 // Inception + l += 4 // Expiration + l += 2 // Mode + l += 2 // Error + l += 2 // KeySize + l += len(rr.Key) / 2 + l += 2 // OtherLen + l += len(rr.OtherData) / 2 + return l +} +func (rr *TLSA) len() int { + l := rr.Hdr.len() + l++ // Usage + l++ // Selector + l++ // MatchingType + l += len(rr.Certificate)/2 + 1 + return l +} +func (rr *TSIG) len() int { + l := rr.Hdr.len() + l += len(rr.Algorithm) + 1 + l += 6 // TimeSigned + l += 2 // Fudge + l += 2 // MACSize + l += len(rr.MAC) / 2 + l += 2 // OrigId + l += 2 // Error + l += 2 // OtherLen + l += len(rr.OtherData) / 2 + return l +} +func (rr *TXT) len() int { + l := rr.Hdr.len() + for _, x := range rr.Txt { + l += len(x) + 1 + } + return l +} +func (rr *UID) len() int { + l := rr.Hdr.len() + l += 4 // Uid + return l +} +func (rr *UINFO) len() int { + l := rr.Hdr.len() + l += len(rr.Uinfo) + 1 + return l +} +func (rr *URI) len() int { + l := rr.Hdr.len() + l += 2 // Priority + l += 2 // Weight + l += len(rr.Target) + return l +} +func (rr *X25) len() int { + l := rr.Hdr.len() + l += len(rr.PSDNAddress) + 1 + return l +} + +// copy() functions +func (rr *A) copy() RR { + return &A{*rr.Hdr.copyHeader(), copyIP(rr.A)} +} +func (rr *AAAA) copy() RR { + return &AAAA{*rr.Hdr.copyHeader(), copyIP(rr.AAAA)} +} +func (rr *AFSDB) copy() RR { + return &AFSDB{*rr.Hdr.copyHeader(), rr.Subtype, rr.Hostname} +} +func (rr *ANY) copy() RR { + return &ANY{*rr.Hdr.copyHeader()} +} +func (rr *AVC) copy() RR { + Txt := make([]string, len(rr.Txt)) + copy(Txt, rr.Txt) + return &AVC{*rr.Hdr.copyHeader(), Txt} +} +func (rr *CAA) copy() RR { + return &CAA{*rr.Hdr.copyHeader(), rr.Flag, rr.Tag, rr.Value} +} +func (rr *CERT) copy() RR { + return &CERT{*rr.Hdr.copyHeader(), rr.Type, rr.KeyTag, rr.Algorithm, rr.Certificate} +} +func (rr *CNAME) copy() RR { + return &CNAME{*rr.Hdr.copyHeader(), rr.Target} +} +func (rr *CSYNC) copy() RR { + TypeBitMap := make([]uint16, len(rr.TypeBitMap)) + copy(TypeBitMap, rr.TypeBitMap) + return &CSYNC{*rr.Hdr.copyHeader(), rr.Serial, rr.Flags, TypeBitMap} +} +func (rr *DHCID) copy() RR { + return &DHCID{*rr.Hdr.copyHeader(), rr.Digest} +} +func (rr *DNAME) copy() RR { + return &DNAME{*rr.Hdr.copyHeader(), rr.Target} +} +func (rr *DNSKEY) copy() RR { + return &DNSKEY{*rr.Hdr.copyHeader(), rr.Flags, rr.Protocol, rr.Algorithm, rr.PublicKey} +} +func (rr *DS) copy() RR { + return &DS{*rr.Hdr.copyHeader(), rr.KeyTag, rr.Algorithm, rr.DigestType, rr.Digest} +} +func (rr *EID) copy() RR { + return &EID{*rr.Hdr.copyHeader(), rr.Endpoint} +} +func (rr *EUI48) copy() RR { + return &EUI48{*rr.Hdr.copyHeader(), rr.Address} +} +func (rr *EUI64) copy() RR { + return &EUI64{*rr.Hdr.copyHeader(), rr.Address} +} +func (rr *GID) copy() RR { + return &GID{*rr.Hdr.copyHeader(), rr.Gid} +} +func (rr *GPOS) copy() RR { + return &GPOS{*rr.Hdr.copyHeader(), rr.Longitude, rr.Latitude, rr.Altitude} +} +func (rr *HINFO) copy() RR { + return &HINFO{*rr.Hdr.copyHeader(), rr.Cpu, rr.Os} +} +func (rr *HIP) copy() RR { + RendezvousServers := make([]string, len(rr.RendezvousServers)) + copy(RendezvousServers, rr.RendezvousServers) + return &HIP{*rr.Hdr.copyHeader(), rr.HitLength, rr.PublicKeyAlgorithm, rr.PublicKeyLength, rr.Hit, rr.PublicKey, RendezvousServers} +} +func (rr *KX) copy() RR { + return &KX{*rr.Hdr.copyHeader(), rr.Preference, rr.Exchanger} +} +func (rr *L32) copy() RR { + return &L32{*rr.Hdr.copyHeader(), rr.Preference, copyIP(rr.Locator32)} +} +func (rr *L64) copy() RR { + return &L64{*rr.Hdr.copyHeader(), rr.Preference, rr.Locator64} +} +func (rr *LOC) copy() RR { + return &LOC{*rr.Hdr.copyHeader(), rr.Version, rr.Size, rr.HorizPre, rr.VertPre, rr.Latitude, rr.Longitude, rr.Altitude} +} +func (rr *LP) copy() RR { + return &LP{*rr.Hdr.copyHeader(), rr.Preference, rr.Fqdn} +} +func (rr *MB) copy() RR { + return &MB{*rr.Hdr.copyHeader(), rr.Mb} +} +func (rr *MD) copy() RR { + return &MD{*rr.Hdr.copyHeader(), rr.Md} +} +func (rr *MF) copy() RR { + return &MF{*rr.Hdr.copyHeader(), rr.Mf} +} +func (rr *MG) copy() RR { + return &MG{*rr.Hdr.copyHeader(), rr.Mg} +} +func (rr *MINFO) copy() RR { + return &MINFO{*rr.Hdr.copyHeader(), rr.Rmail, rr.Email} +} +func (rr *MR) copy() RR { + return &MR{*rr.Hdr.copyHeader(), rr.Mr} +} +func (rr *MX) copy() RR { + return &MX{*rr.Hdr.copyHeader(), rr.Preference, rr.Mx} +} +func (rr *NAPTR) copy() RR { + return &NAPTR{*rr.Hdr.copyHeader(), rr.Order, rr.Preference, rr.Flags, rr.Service, rr.Regexp, rr.Replacement} +} +func (rr *NID) copy() RR { + return &NID{*rr.Hdr.copyHeader(), rr.Preference, rr.NodeID} +} +func (rr *NIMLOC) copy() RR { + return &NIMLOC{*rr.Hdr.copyHeader(), rr.Locator} +} +func (rr *NINFO) copy() RR { + ZSData := make([]string, len(rr.ZSData)) + copy(ZSData, rr.ZSData) + return &NINFO{*rr.Hdr.copyHeader(), ZSData} +} +func (rr *NS) copy() RR { + return &NS{*rr.Hdr.copyHeader(), rr.Ns} +} +func (rr *NSAPPTR) copy() RR { + return &NSAPPTR{*rr.Hdr.copyHeader(), rr.Ptr} +} +func (rr *NSEC) copy() RR { + TypeBitMap := make([]uint16, len(rr.TypeBitMap)) + copy(TypeBitMap, rr.TypeBitMap) + return &NSEC{*rr.Hdr.copyHeader(), rr.NextDomain, TypeBitMap} +} +func (rr *NSEC3) copy() RR { + TypeBitMap := make([]uint16, len(rr.TypeBitMap)) + copy(TypeBitMap, rr.TypeBitMap) + return &NSEC3{*rr.Hdr.copyHeader(), rr.Hash, rr.Flags, rr.Iterations, rr.SaltLength, rr.Salt, rr.HashLength, rr.NextDomain, TypeBitMap} +} +func (rr *NSEC3PARAM) copy() RR { + return &NSEC3PARAM{*rr.Hdr.copyHeader(), rr.Hash, rr.Flags, rr.Iterations, rr.SaltLength, rr.Salt} +} +func (rr *OPENPGPKEY) copy() RR { + return &OPENPGPKEY{*rr.Hdr.copyHeader(), rr.PublicKey} +} +func (rr *OPT) copy() RR { + Option := make([]EDNS0, len(rr.Option)) + copy(Option, rr.Option) + return &OPT{*rr.Hdr.copyHeader(), Option} +} +func (rr *PTR) copy() RR { + return &PTR{*rr.Hdr.copyHeader(), rr.Ptr} +} +func (rr *PX) copy() RR { + return &PX{*rr.Hdr.copyHeader(), rr.Preference, rr.Map822, rr.Mapx400} +} +func (rr *RFC3597) copy() RR { + return &RFC3597{*rr.Hdr.copyHeader(), rr.Rdata} +} +func (rr *RKEY) copy() RR { + return &RKEY{*rr.Hdr.copyHeader(), rr.Flags, rr.Protocol, rr.Algorithm, rr.PublicKey} +} +func (rr *RP) copy() RR { + return &RP{*rr.Hdr.copyHeader(), rr.Mbox, rr.Txt} +} +func (rr *RRSIG) copy() RR { + return &RRSIG{*rr.Hdr.copyHeader(), rr.TypeCovered, rr.Algorithm, rr.Labels, rr.OrigTtl, rr.Expiration, rr.Inception, rr.KeyTag, rr.SignerName, rr.Signature} +} +func (rr *RT) copy() RR { + return &RT{*rr.Hdr.copyHeader(), rr.Preference, rr.Host} +} +func (rr *SMIMEA) copy() RR { + return &SMIMEA{*rr.Hdr.copyHeader(), rr.Usage, rr.Selector, rr.MatchingType, rr.Certificate} +} +func (rr *SOA) copy() RR { + return &SOA{*rr.Hdr.copyHeader(), rr.Ns, rr.Mbox, rr.Serial, rr.Refresh, rr.Retry, rr.Expire, rr.Minttl} +} +func (rr *SPF) copy() RR { + Txt := make([]string, len(rr.Txt)) + copy(Txt, rr.Txt) + return &SPF{*rr.Hdr.copyHeader(), Txt} +} +func (rr *SRV) copy() RR { + return &SRV{*rr.Hdr.copyHeader(), rr.Priority, rr.Weight, rr.Port, rr.Target} +} +func (rr *SSHFP) copy() RR { + return &SSHFP{*rr.Hdr.copyHeader(), rr.Algorithm, rr.Type, rr.FingerPrint} +} +func (rr *TA) copy() RR { + return &TA{*rr.Hdr.copyHeader(), rr.KeyTag, rr.Algorithm, rr.DigestType, rr.Digest} +} +func (rr *TALINK) copy() RR { + return &TALINK{*rr.Hdr.copyHeader(), rr.PreviousName, rr.NextName} +} +func (rr *TKEY) copy() RR { + return &TKEY{*rr.Hdr.copyHeader(), rr.Algorithm, rr.Inception, rr.Expiration, rr.Mode, rr.Error, rr.KeySize, rr.Key, rr.OtherLen, rr.OtherData} +} +func (rr *TLSA) copy() RR { + return &TLSA{*rr.Hdr.copyHeader(), rr.Usage, rr.Selector, rr.MatchingType, rr.Certificate} +} +func (rr *TSIG) copy() RR { + return &TSIG{*rr.Hdr.copyHeader(), rr.Algorithm, rr.TimeSigned, rr.Fudge, rr.MACSize, rr.MAC, rr.OrigId, rr.Error, rr.OtherLen, rr.OtherData} +} +func (rr *TXT) copy() RR { + Txt := make([]string, len(rr.Txt)) + copy(Txt, rr.Txt) + return &TXT{*rr.Hdr.copyHeader(), Txt} +} +func (rr *UID) copy() RR { + return &UID{*rr.Hdr.copyHeader(), rr.Uid} +} +func (rr *UINFO) copy() RR { + return &UINFO{*rr.Hdr.copyHeader(), rr.Uinfo} +} +func (rr *URI) copy() RR { + return &URI{*rr.Hdr.copyHeader(), rr.Priority, rr.Weight, rr.Target} +} +func (rr *X25) copy() RR { + return &X25{*rr.Hdr.copyHeader(), rr.PSDNAddress} +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/crypto/LICENSE b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/crypto/LICENSE new file mode 100644 index 000000000..6a66aea5e --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/crypto/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/crypto/PATENTS b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/crypto/PATENTS new file mode 100644 index 000000000..733099041 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/crypto/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/crypto/ed25519/ed25519.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/crypto/ed25519/ed25519.go new file mode 100644 index 000000000..4f26b49b6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/crypto/ed25519/ed25519.go @@ -0,0 +1,181 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package ed25519 implements the Ed25519 signature algorithm. See +// https://ed25519.cr.yp.to/. +// +// These functions are also compatible with the “Ed25519” function defined in +// RFC 8032. +package ed25519 + +// This code is a port of the public domain, “ref10” implementation of ed25519 +// from SUPERCOP. + +import ( + "bytes" + "crypto" + cryptorand "crypto/rand" + "crypto/sha512" + "errors" + "io" + "strconv" + + "golang.org/x/crypto/ed25519/internal/edwards25519" +) + +const ( + // PublicKeySize is the size, in bytes, of public keys as used in this package. + PublicKeySize = 32 + // PrivateKeySize is the size, in bytes, of private keys as used in this package. + PrivateKeySize = 64 + // SignatureSize is the size, in bytes, of signatures generated and verified by this package. + SignatureSize = 64 +) + +// PublicKey is the type of Ed25519 public keys. +type PublicKey []byte + +// PrivateKey is the type of Ed25519 private keys. It implements crypto.Signer. +type PrivateKey []byte + +// Public returns the PublicKey corresponding to priv. +func (priv PrivateKey) Public() crypto.PublicKey { + publicKey := make([]byte, PublicKeySize) + copy(publicKey, priv[32:]) + return PublicKey(publicKey) +} + +// Sign signs the given message with priv. +// Ed25519 performs two passes over messages to be signed and therefore cannot +// handle pre-hashed messages. Thus opts.HashFunc() must return zero to +// indicate the message hasn't been hashed. This can be achieved by passing +// crypto.Hash(0) as the value for opts. +func (priv PrivateKey) Sign(rand io.Reader, message []byte, opts crypto.SignerOpts) (signature []byte, err error) { + if opts.HashFunc() != crypto.Hash(0) { + return nil, errors.New("ed25519: cannot sign hashed message") + } + + return Sign(priv, message), nil +} + +// GenerateKey generates a public/private key pair using entropy from rand. +// If rand is nil, crypto/rand.Reader will be used. +func GenerateKey(rand io.Reader) (publicKey PublicKey, privateKey PrivateKey, err error) { + if rand == nil { + rand = cryptorand.Reader + } + + privateKey = make([]byte, PrivateKeySize) + publicKey = make([]byte, PublicKeySize) + _, err = io.ReadFull(rand, privateKey[:32]) + if err != nil { + return nil, nil, err + } + + digest := sha512.Sum512(privateKey[:32]) + digest[0] &= 248 + digest[31] &= 127 + digest[31] |= 64 + + var A edwards25519.ExtendedGroupElement + var hBytes [32]byte + copy(hBytes[:], digest[:]) + edwards25519.GeScalarMultBase(&A, &hBytes) + var publicKeyBytes [32]byte + A.ToBytes(&publicKeyBytes) + + copy(privateKey[32:], publicKeyBytes[:]) + copy(publicKey, publicKeyBytes[:]) + + return publicKey, privateKey, nil +} + +// Sign signs the message with privateKey and returns a signature. It will +// panic if len(privateKey) is not PrivateKeySize. +func Sign(privateKey PrivateKey, message []byte) []byte { + if l := len(privateKey); l != PrivateKeySize { + panic("ed25519: bad private key length: " + strconv.Itoa(l)) + } + + h := sha512.New() + h.Write(privateKey[:32]) + + var digest1, messageDigest, hramDigest [64]byte + var expandedSecretKey [32]byte + h.Sum(digest1[:0]) + copy(expandedSecretKey[:], digest1[:]) + expandedSecretKey[0] &= 248 + expandedSecretKey[31] &= 63 + expandedSecretKey[31] |= 64 + + h.Reset() + h.Write(digest1[32:]) + h.Write(message) + h.Sum(messageDigest[:0]) + + var messageDigestReduced [32]byte + edwards25519.ScReduce(&messageDigestReduced, &messageDigest) + var R edwards25519.ExtendedGroupElement + edwards25519.GeScalarMultBase(&R, &messageDigestReduced) + + var encodedR [32]byte + R.ToBytes(&encodedR) + + h.Reset() + h.Write(encodedR[:]) + h.Write(privateKey[32:]) + h.Write(message) + h.Sum(hramDigest[:0]) + var hramDigestReduced [32]byte + edwards25519.ScReduce(&hramDigestReduced, &hramDigest) + + var s [32]byte + edwards25519.ScMulAdd(&s, &hramDigestReduced, &expandedSecretKey, &messageDigestReduced) + + signature := make([]byte, SignatureSize) + copy(signature[:], encodedR[:]) + copy(signature[32:], s[:]) + + return signature +} + +// Verify reports whether sig is a valid signature of message by publicKey. It +// will panic if len(publicKey) is not PublicKeySize. +func Verify(publicKey PublicKey, message, sig []byte) bool { + if l := len(publicKey); l != PublicKeySize { + panic("ed25519: bad public key length: " + strconv.Itoa(l)) + } + + if len(sig) != SignatureSize || sig[63]&224 != 0 { + return false + } + + var A edwards25519.ExtendedGroupElement + var publicKeyBytes [32]byte + copy(publicKeyBytes[:], publicKey) + if !A.FromBytes(&publicKeyBytes) { + return false + } + edwards25519.FeNeg(&A.X, &A.X) + edwards25519.FeNeg(&A.T, &A.T) + + h := sha512.New() + h.Write(sig[:32]) + h.Write(publicKey[:]) + h.Write(message) + var digest [64]byte + h.Sum(digest[:0]) + + var hReduced [32]byte + edwards25519.ScReduce(&hReduced, &digest) + + var R edwards25519.ProjectiveGroupElement + var b [32]byte + copy(b[:], sig[32:]) + edwards25519.GeDoubleScalarMultVartime(&R, &hReduced, &A, &b) + + var checkR [32]byte + R.ToBytes(&checkR) + return bytes.Equal(sig[:32], checkR[:]) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/crypto/ed25519/internal/edwards25519/const.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/crypto/ed25519/internal/edwards25519/const.go new file mode 100644 index 000000000..e39f086c1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/crypto/ed25519/internal/edwards25519/const.go @@ -0,0 +1,1422 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package edwards25519 + +// These values are from the public domain, “ref10” implementation of ed25519 +// from SUPERCOP. + +// d is a constant in the Edwards curve equation. +var d = FieldElement{ + -10913610, 13857413, -15372611, 6949391, 114729, -8787816, -6275908, -3247719, -18696448, -12055116, +} + +// d2 is 2*d. +var d2 = FieldElement{ + -21827239, -5839606, -30745221, 13898782, 229458, 15978800, -12551817, -6495438, 29715968, 9444199, +} + +// SqrtM1 is the square-root of -1 in the field. +var SqrtM1 = FieldElement{ + -32595792, -7943725, 9377950, 3500415, 12389472, -272473, -25146209, -2005654, 326686, 11406482, +} + +// A is a constant in the Montgomery-form of curve25519. +var A = FieldElement{ + 486662, 0, 0, 0, 0, 0, 0, 0, 0, 0, +} + +// bi contains precomputed multiples of the base-point. See the Ed25519 paper +// for a discussion about how these values are used. +var bi = [8]PreComputedGroupElement{ + { + FieldElement{25967493, -14356035, 29566456, 3660896, -12694345, 4014787, 27544626, -11754271, -6079156, 2047605}, + FieldElement{-12545711, 934262, -2722910, 3049990, -727428, 9406986, 12720692, 5043384, 19500929, -15469378}, + FieldElement{-8738181, 4489570, 9688441, -14785194, 10184609, -12363380, 29287919, 11864899, -24514362, -4438546}, + }, + { + FieldElement{15636291, -9688557, 24204773, -7912398, 616977, -16685262, 27787600, -14772189, 28944400, -1550024}, + FieldElement{16568933, 4717097, -11556148, -1102322, 15682896, -11807043, 16354577, -11775962, 7689662, 11199574}, + FieldElement{30464156, -5976125, -11779434, -15670865, 23220365, 15915852, 7512774, 10017326, -17749093, -9920357}, + }, + { + FieldElement{10861363, 11473154, 27284546, 1981175, -30064349, 12577861, 32867885, 14515107, -15438304, 10819380}, + FieldElement{4708026, 6336745, 20377586, 9066809, -11272109, 6594696, -25653668, 12483688, -12668491, 5581306}, + FieldElement{19563160, 16186464, -29386857, 4097519, 10237984, -4348115, 28542350, 13850243, -23678021, -15815942}, + }, + { + FieldElement{5153746, 9909285, 1723747, -2777874, 30523605, 5516873, 19480852, 5230134, -23952439, -15175766}, + FieldElement{-30269007, -3463509, 7665486, 10083793, 28475525, 1649722, 20654025, 16520125, 30598449, 7715701}, + FieldElement{28881845, 14381568, 9657904, 3680757, -20181635, 7843316, -31400660, 1370708, 29794553, -1409300}, + }, + { + FieldElement{-22518993, -6692182, 14201702, -8745502, -23510406, 8844726, 18474211, -1361450, -13062696, 13821877}, + FieldElement{-6455177, -7839871, 3374702, -4740862, -27098617, -10571707, 31655028, -7212327, 18853322, -14220951}, + FieldElement{4566830, -12963868, -28974889, -12240689, -7602672, -2830569, -8514358, -10431137, 2207753, -3209784}, + }, + { + FieldElement{-25154831, -4185821, 29681144, 7868801, -6854661, -9423865, -12437364, -663000, -31111463, -16132436}, + FieldElement{25576264, -2703214, 7349804, -11814844, 16472782, 9300885, 3844789, 15725684, 171356, 6466918}, + FieldElement{23103977, 13316479, 9739013, -16149481, 817875, -15038942, 8965339, -14088058, -30714912, 16193877}, + }, + { + FieldElement{-33521811, 3180713, -2394130, 14003687, -16903474, -16270840, 17238398, 4729455, -18074513, 9256800}, + FieldElement{-25182317, -4174131, 32336398, 5036987, -21236817, 11360617, 22616405, 9761698, -19827198, 630305}, + FieldElement{-13720693, 2639453, -24237460, -7406481, 9494427, -5774029, -6554551, -15960994, -2449256, -14291300}, + }, + { + FieldElement{-3151181, -5046075, 9282714, 6866145, -31907062, -863023, -18940575, 15033784, 25105118, -7894876}, + FieldElement{-24326370, 15950226, -31801215, -14592823, -11662737, -5090925, 1573892, -2625887, 2198790, -15804619}, + FieldElement{-3099351, 10324967, -2241613, 7453183, -5446979, -2735503, -13812022, -16236442, -32461234, -12290683}, + }, +} + +// base contains precomputed multiples of the base-point. See the Ed25519 paper +// for a discussion about how these values are used. +var base = [32][8]PreComputedGroupElement{ + { + { + FieldElement{25967493, -14356035, 29566456, 3660896, -12694345, 4014787, 27544626, -11754271, -6079156, 2047605}, + FieldElement{-12545711, 934262, -2722910, 3049990, -727428, 9406986, 12720692, 5043384, 19500929, -15469378}, + FieldElement{-8738181, 4489570, 9688441, -14785194, 10184609, -12363380, 29287919, 11864899, -24514362, -4438546}, + }, + { + FieldElement{-12815894, -12976347, -21581243, 11784320, -25355658, -2750717, -11717903, -3814571, -358445, -10211303}, + FieldElement{-21703237, 6903825, 27185491, 6451973, -29577724, -9554005, -15616551, 11189268, -26829678, -5319081}, + FieldElement{26966642, 11152617, 32442495, 15396054, 14353839, -12752335, -3128826, -9541118, -15472047, -4166697}, + }, + { + FieldElement{15636291, -9688557, 24204773, -7912398, 616977, -16685262, 27787600, -14772189, 28944400, -1550024}, + FieldElement{16568933, 4717097, -11556148, -1102322, 15682896, -11807043, 16354577, -11775962, 7689662, 11199574}, + FieldElement{30464156, -5976125, -11779434, -15670865, 23220365, 15915852, 7512774, 10017326, -17749093, -9920357}, + }, + { + FieldElement{-17036878, 13921892, 10945806, -6033431, 27105052, -16084379, -28926210, 15006023, 3284568, -6276540}, + FieldElement{23599295, -8306047, -11193664, -7687416, 13236774, 10506355, 7464579, 9656445, 13059162, 10374397}, + FieldElement{7798556, 16710257, 3033922, 2874086, 28997861, 2835604, 32406664, -3839045, -641708, -101325}, + }, + { + FieldElement{10861363, 11473154, 27284546, 1981175, -30064349, 12577861, 32867885, 14515107, -15438304, 10819380}, + FieldElement{4708026, 6336745, 20377586, 9066809, -11272109, 6594696, -25653668, 12483688, -12668491, 5581306}, + FieldElement{19563160, 16186464, -29386857, 4097519, 10237984, -4348115, 28542350, 13850243, -23678021, -15815942}, + }, + { + FieldElement{-15371964, -12862754, 32573250, 4720197, -26436522, 5875511, -19188627, -15224819, -9818940, -12085777}, + FieldElement{-8549212, 109983, 15149363, 2178705, 22900618, 4543417, 3044240, -15689887, 1762328, 14866737}, + FieldElement{-18199695, -15951423, -10473290, 1707278, -17185920, 3916101, -28236412, 3959421, 27914454, 4383652}, + }, + { + FieldElement{5153746, 9909285, 1723747, -2777874, 30523605, 5516873, 19480852, 5230134, -23952439, -15175766}, + FieldElement{-30269007, -3463509, 7665486, 10083793, 28475525, 1649722, 20654025, 16520125, 30598449, 7715701}, + FieldElement{28881845, 14381568, 9657904, 3680757, -20181635, 7843316, -31400660, 1370708, 29794553, -1409300}, + }, + { + FieldElement{14499471, -2729599, -33191113, -4254652, 28494862, 14271267, 30290735, 10876454, -33154098, 2381726}, + FieldElement{-7195431, -2655363, -14730155, 462251, -27724326, 3941372, -6236617, 3696005, -32300832, 15351955}, + FieldElement{27431194, 8222322, 16448760, -3907995, -18707002, 11938355, -32961401, -2970515, 29551813, 10109425}, + }, + }, + { + { + FieldElement{-13657040, -13155431, -31283750, 11777098, 21447386, 6519384, -2378284, -1627556, 10092783, -4764171}, + FieldElement{27939166, 14210322, 4677035, 16277044, -22964462, -12398139, -32508754, 12005538, -17810127, 12803510}, + FieldElement{17228999, -15661624, -1233527, 300140, -1224870, -11714777, 30364213, -9038194, 18016357, 4397660}, + }, + { + FieldElement{-10958843, -7690207, 4776341, -14954238, 27850028, -15602212, -26619106, 14544525, -17477504, 982639}, + FieldElement{29253598, 15796703, -2863982, -9908884, 10057023, 3163536, 7332899, -4120128, -21047696, 9934963}, + FieldElement{5793303, 16271923, -24131614, -10116404, 29188560, 1206517, -14747930, 4559895, -30123922, -10897950}, + }, + { + FieldElement{-27643952, -11493006, 16282657, -11036493, 28414021, -15012264, 24191034, 4541697, -13338309, 5500568}, + FieldElement{12650548, -1497113, 9052871, 11355358, -17680037, -8400164, -17430592, 12264343, 10874051, 13524335}, + FieldElement{25556948, -3045990, 714651, 2510400, 23394682, -10415330, 33119038, 5080568, -22528059, 5376628}, + }, + { + FieldElement{-26088264, -4011052, -17013699, -3537628, -6726793, 1920897, -22321305, -9447443, 4535768, 1569007}, + FieldElement{-2255422, 14606630, -21692440, -8039818, 28430649, 8775819, -30494562, 3044290, 31848280, 12543772}, + FieldElement{-22028579, 2943893, -31857513, 6777306, 13784462, -4292203, -27377195, -2062731, 7718482, 14474653}, + }, + { + FieldElement{2385315, 2454213, -22631320, 46603, -4437935, -15680415, 656965, -7236665, 24316168, -5253567}, + FieldElement{13741529, 10911568, -33233417, -8603737, -20177830, -1033297, 33040651, -13424532, -20729456, 8321686}, + FieldElement{21060490, -2212744, 15712757, -4336099, 1639040, 10656336, 23845965, -11874838, -9984458, 608372}, + }, + { + FieldElement{-13672732, -15087586, -10889693, -7557059, -6036909, 11305547, 1123968, -6780577, 27229399, 23887}, + FieldElement{-23244140, -294205, -11744728, 14712571, -29465699, -2029617, 12797024, -6440308, -1633405, 16678954}, + FieldElement{-29500620, 4770662, -16054387, 14001338, 7830047, 9564805, -1508144, -4795045, -17169265, 4904953}, + }, + { + FieldElement{24059557, 14617003, 19037157, -15039908, 19766093, -14906429, 5169211, 16191880, 2128236, -4326833}, + FieldElement{-16981152, 4124966, -8540610, -10653797, 30336522, -14105247, -29806336, 916033, -6882542, -2986532}, + FieldElement{-22630907, 12419372, -7134229, -7473371, -16478904, 16739175, 285431, 2763829, 15736322, 4143876}, + }, + { + FieldElement{2379352, 11839345, -4110402, -5988665, 11274298, 794957, 212801, -14594663, 23527084, -16458268}, + FieldElement{33431127, -11130478, -17838966, -15626900, 8909499, 8376530, -32625340, 4087881, -15188911, -14416214}, + FieldElement{1767683, 7197987, -13205226, -2022635, -13091350, 448826, 5799055, 4357868, -4774191, -16323038}, + }, + }, + { + { + FieldElement{6721966, 13833823, -23523388, -1551314, 26354293, -11863321, 23365147, -3949732, 7390890, 2759800}, + FieldElement{4409041, 2052381, 23373853, 10530217, 7676779, -12885954, 21302353, -4264057, 1244380, -12919645}, + FieldElement{-4421239, 7169619, 4982368, -2957590, 30256825, -2777540, 14086413, 9208236, 15886429, 16489664}, + }, + { + FieldElement{1996075, 10375649, 14346367, 13311202, -6874135, -16438411, -13693198, 398369, -30606455, -712933}, + FieldElement{-25307465, 9795880, -2777414, 14878809, -33531835, 14780363, 13348553, 12076947, -30836462, 5113182}, + FieldElement{-17770784, 11797796, 31950843, 13929123, -25888302, 12288344, -30341101, -7336386, 13847711, 5387222}, + }, + { + FieldElement{-18582163, -3416217, 17824843, -2340966, 22744343, -10442611, 8763061, 3617786, -19600662, 10370991}, + FieldElement{20246567, -14369378, 22358229, -543712, 18507283, -10413996, 14554437, -8746092, 32232924, 16763880}, + FieldElement{9648505, 10094563, 26416693, 14745928, -30374318, -6472621, 11094161, 15689506, 3140038, -16510092}, + }, + { + FieldElement{-16160072, 5472695, 31895588, 4744994, 8823515, 10365685, -27224800, 9448613, -28774454, 366295}, + FieldElement{19153450, 11523972, -11096490, -6503142, -24647631, 5420647, 28344573, 8041113, 719605, 11671788}, + FieldElement{8678025, 2694440, -6808014, 2517372, 4964326, 11152271, -15432916, -15266516, 27000813, -10195553}, + }, + { + FieldElement{-15157904, 7134312, 8639287, -2814877, -7235688, 10421742, 564065, 5336097, 6750977, -14521026}, + FieldElement{11836410, -3979488, 26297894, 16080799, 23455045, 15735944, 1695823, -8819122, 8169720, 16220347}, + FieldElement{-18115838, 8653647, 17578566, -6092619, -8025777, -16012763, -11144307, -2627664, -5990708, -14166033}, + }, + { + FieldElement{-23308498, -10968312, 15213228, -10081214, -30853605, -11050004, 27884329, 2847284, 2655861, 1738395}, + FieldElement{-27537433, -14253021, -25336301, -8002780, -9370762, 8129821, 21651608, -3239336, -19087449, -11005278}, + FieldElement{1533110, 3437855, 23735889, 459276, 29970501, 11335377, 26030092, 5821408, 10478196, 8544890}, + }, + { + FieldElement{32173121, -16129311, 24896207, 3921497, 22579056, -3410854, 19270449, 12217473, 17789017, -3395995}, + FieldElement{-30552961, -2228401, -15578829, -10147201, 13243889, 517024, 15479401, -3853233, 30460520, 1052596}, + FieldElement{-11614875, 13323618, 32618793, 8175907, -15230173, 12596687, 27491595, -4612359, 3179268, -9478891}, + }, + { + FieldElement{31947069, -14366651, -4640583, -15339921, -15125977, -6039709, -14756777, -16411740, 19072640, -9511060}, + FieldElement{11685058, 11822410, 3158003, -13952594, 33402194, -4165066, 5977896, -5215017, 473099, 5040608}, + FieldElement{-20290863, 8198642, -27410132, 11602123, 1290375, -2799760, 28326862, 1721092, -19558642, -3131606}, + }, + }, + { + { + FieldElement{7881532, 10687937, 7578723, 7738378, -18951012, -2553952, 21820786, 8076149, -27868496, 11538389}, + FieldElement{-19935666, 3899861, 18283497, -6801568, -15728660, -11249211, 8754525, 7446702, -5676054, 5797016}, + FieldElement{-11295600, -3793569, -15782110, -7964573, 12708869, -8456199, 2014099, -9050574, -2369172, -5877341}, + }, + { + FieldElement{-22472376, -11568741, -27682020, 1146375, 18956691, 16640559, 1192730, -3714199, 15123619, 10811505}, + FieldElement{14352098, -3419715, -18942044, 10822655, 32750596, 4699007, -70363, 15776356, -28886779, -11974553}, + FieldElement{-28241164, -8072475, -4978962, -5315317, 29416931, 1847569, -20654173, -16484855, 4714547, -9600655}, + }, + { + FieldElement{15200332, 8368572, 19679101, 15970074, -31872674, 1959451, 24611599, -4543832, -11745876, 12340220}, + FieldElement{12876937, -10480056, 33134381, 6590940, -6307776, 14872440, 9613953, 8241152, 15370987, 9608631}, + FieldElement{-4143277, -12014408, 8446281, -391603, 4407738, 13629032, -7724868, 15866074, -28210621, -8814099}, + }, + { + FieldElement{26660628, -15677655, 8393734, 358047, -7401291, 992988, -23904233, 858697, 20571223, 8420556}, + FieldElement{14620715, 13067227, -15447274, 8264467, 14106269, 15080814, 33531827, 12516406, -21574435, -12476749}, + FieldElement{236881, 10476226, 57258, -14677024, 6472998, 2466984, 17258519, 7256740, 8791136, 15069930}, + }, + { + FieldElement{1276410, -9371918, 22949635, -16322807, -23493039, -5702186, 14711875, 4874229, -30663140, -2331391}, + FieldElement{5855666, 4990204, -13711848, 7294284, -7804282, 1924647, -1423175, -7912378, -33069337, 9234253}, + FieldElement{20590503, -9018988, 31529744, -7352666, -2706834, 10650548, 31559055, -11609587, 18979186, 13396066}, + }, + { + FieldElement{24474287, 4968103, 22267082, 4407354, 24063882, -8325180, -18816887, 13594782, 33514650, 7021958}, + FieldElement{-11566906, -6565505, -21365085, 15928892, -26158305, 4315421, -25948728, -3916677, -21480480, 12868082}, + FieldElement{-28635013, 13504661, 19988037, -2132761, 21078225, 6443208, -21446107, 2244500, -12455797, -8089383}, + }, + { + FieldElement{-30595528, 13793479, -5852820, 319136, -25723172, -6263899, 33086546, 8957937, -15233648, 5540521}, + FieldElement{-11630176, -11503902, -8119500, -7643073, 2620056, 1022908, -23710744, -1568984, -16128528, -14962807}, + FieldElement{23152971, 775386, 27395463, 14006635, -9701118, 4649512, 1689819, 892185, -11513277, -15205948}, + }, + { + FieldElement{9770129, 9586738, 26496094, 4324120, 1556511, -3550024, 27453819, 4763127, -19179614, 5867134}, + FieldElement{-32765025, 1927590, 31726409, -4753295, 23962434, -16019500, 27846559, 5931263, -29749703, -16108455}, + FieldElement{27461885, -2977536, 22380810, 1815854, -23033753, -3031938, 7283490, -15148073, -19526700, 7734629}, + }, + }, + { + { + FieldElement{-8010264, -9590817, -11120403, 6196038, 29344158, -13430885, 7585295, -3176626, 18549497, 15302069}, + FieldElement{-32658337, -6171222, -7672793, -11051681, 6258878, 13504381, 10458790, -6418461, -8872242, 8424746}, + FieldElement{24687205, 8613276, -30667046, -3233545, 1863892, -1830544, 19206234, 7134917, -11284482, -828919}, + }, + { + FieldElement{11334899, -9218022, 8025293, 12707519, 17523892, -10476071, 10243738, -14685461, -5066034, 16498837}, + FieldElement{8911542, 6887158, -9584260, -6958590, 11145641, -9543680, 17303925, -14124238, 6536641, 10543906}, + FieldElement{-28946384, 15479763, -17466835, 568876, -1497683, 11223454, -2669190, -16625574, -27235709, 8876771}, + }, + { + FieldElement{-25742899, -12566864, -15649966, -846607, -33026686, -796288, -33481822, 15824474, -604426, -9039817}, + FieldElement{10330056, 70051, 7957388, -9002667, 9764902, 15609756, 27698697, -4890037, 1657394, 3084098}, + FieldElement{10477963, -7470260, 12119566, -13250805, 29016247, -5365589, 31280319, 14396151, -30233575, 15272409}, + }, + { + FieldElement{-12288309, 3169463, 28813183, 16658753, 25116432, -5630466, -25173957, -12636138, -25014757, 1950504}, + FieldElement{-26180358, 9489187, 11053416, -14746161, -31053720, 5825630, -8384306, -8767532, 15341279, 8373727}, + FieldElement{28685821, 7759505, -14378516, -12002860, -31971820, 4079242, 298136, -10232602, -2878207, 15190420}, + }, + { + FieldElement{-32932876, 13806336, -14337485, -15794431, -24004620, 10940928, 8669718, 2742393, -26033313, -6875003}, + FieldElement{-1580388, -11729417, -25979658, -11445023, -17411874, -10912854, 9291594, -16247779, -12154742, 6048605}, + FieldElement{-30305315, 14843444, 1539301, 11864366, 20201677, 1900163, 13934231, 5128323, 11213262, 9168384}, + }, + { + FieldElement{-26280513, 11007847, 19408960, -940758, -18592965, -4328580, -5088060, -11105150, 20470157, -16398701}, + FieldElement{-23136053, 9282192, 14855179, -15390078, -7362815, -14408560, -22783952, 14461608, 14042978, 5230683}, + FieldElement{29969567, -2741594, -16711867, -8552442, 9175486, -2468974, 21556951, 3506042, -5933891, -12449708}, + }, + { + FieldElement{-3144746, 8744661, 19704003, 4581278, -20430686, 6830683, -21284170, 8971513, -28539189, 15326563}, + FieldElement{-19464629, 10110288, -17262528, -3503892, -23500387, 1355669, -15523050, 15300988, -20514118, 9168260}, + FieldElement{-5353335, 4488613, -23803248, 16314347, 7780487, -15638939, -28948358, 9601605, 33087103, -9011387}, + }, + { + FieldElement{-19443170, -15512900, -20797467, -12445323, -29824447, 10229461, -27444329, -15000531, -5996870, 15664672}, + FieldElement{23294591, -16632613, -22650781, -8470978, 27844204, 11461195, 13099750, -2460356, 18151676, 13417686}, + FieldElement{-24722913, -4176517, -31150679, 5988919, -26858785, 6685065, 1661597, -12551441, 15271676, -15452665}, + }, + }, + { + { + FieldElement{11433042, -13228665, 8239631, -5279517, -1985436, -725718, -18698764, 2167544, -6921301, -13440182}, + FieldElement{-31436171, 15575146, 30436815, 12192228, -22463353, 9395379, -9917708, -8638997, 12215110, 12028277}, + FieldElement{14098400, 6555944, 23007258, 5757252, -15427832, -12950502, 30123440, 4617780, -16900089, -655628}, + }, + { + FieldElement{-4026201, -15240835, 11893168, 13718664, -14809462, 1847385, -15819999, 10154009, 23973261, -12684474}, + FieldElement{-26531820, -3695990, -1908898, 2534301, -31870557, -16550355, 18341390, -11419951, 32013174, -10103539}, + FieldElement{-25479301, 10876443, -11771086, -14625140, -12369567, 1838104, 21911214, 6354752, 4425632, -837822}, + }, + { + FieldElement{-10433389, -14612966, 22229858, -3091047, -13191166, 776729, -17415375, -12020462, 4725005, 14044970}, + FieldElement{19268650, -7304421, 1555349, 8692754, -21474059, -9910664, 6347390, -1411784, -19522291, -16109756}, + FieldElement{-24864089, 12986008, -10898878, -5558584, -11312371, -148526, 19541418, 8180106, 9282262, 10282508}, + }, + { + FieldElement{-26205082, 4428547, -8661196, -13194263, 4098402, -14165257, 15522535, 8372215, 5542595, -10702683}, + FieldElement{-10562541, 14895633, 26814552, -16673850, -17480754, -2489360, -2781891, 6993761, -18093885, 10114655}, + FieldElement{-20107055, -929418, 31422704, 10427861, -7110749, 6150669, -29091755, -11529146, 25953725, -106158}, + }, + { + FieldElement{-4234397, -8039292, -9119125, 3046000, 2101609, -12607294, 19390020, 6094296, -3315279, 12831125}, + FieldElement{-15998678, 7578152, 5310217, 14408357, -33548620, -224739, 31575954, 6326196, 7381791, -2421839}, + FieldElement{-20902779, 3296811, 24736065, -16328389, 18374254, 7318640, 6295303, 8082724, -15362489, 12339664}, + }, + { + FieldElement{27724736, 2291157, 6088201, -14184798, 1792727, 5857634, 13848414, 15768922, 25091167, 14856294}, + FieldElement{-18866652, 8331043, 24373479, 8541013, -701998, -9269457, 12927300, -12695493, -22182473, -9012899}, + FieldElement{-11423429, -5421590, 11632845, 3405020, 30536730, -11674039, -27260765, 13866390, 30146206, 9142070}, + }, + { + FieldElement{3924129, -15307516, -13817122, -10054960, 12291820, -668366, -27702774, 9326384, -8237858, 4171294}, + FieldElement{-15921940, 16037937, 6713787, 16606682, -21612135, 2790944, 26396185, 3731949, 345228, -5462949}, + FieldElement{-21327538, 13448259, 25284571, 1143661, 20614966, -8849387, 2031539, -12391231, -16253183, -13582083}, + }, + { + FieldElement{31016211, -16722429, 26371392, -14451233, -5027349, 14854137, 17477601, 3842657, 28012650, -16405420}, + FieldElement{-5075835, 9368966, -8562079, -4600902, -15249953, 6970560, -9189873, 16292057, -8867157, 3507940}, + FieldElement{29439664, 3537914, 23333589, 6997794, -17555561, -11018068, -15209202, -15051267, -9164929, 6580396}, + }, + }, + { + { + FieldElement{-12185861, -7679788, 16438269, 10826160, -8696817, -6235611, 17860444, -9273846, -2095802, 9304567}, + FieldElement{20714564, -4336911, 29088195, 7406487, 11426967, -5095705, 14792667, -14608617, 5289421, -477127}, + FieldElement{-16665533, -10650790, -6160345, -13305760, 9192020, -1802462, 17271490, 12349094, 26939669, -3752294}, + }, + { + FieldElement{-12889898, 9373458, 31595848, 16374215, 21471720, 13221525, -27283495, -12348559, -3698806, 117887}, + FieldElement{22263325, -6560050, 3984570, -11174646, -15114008, -566785, 28311253, 5358056, -23319780, 541964}, + FieldElement{16259219, 3261970, 2309254, -15534474, -16885711, -4581916, 24134070, -16705829, -13337066, -13552195}, + }, + { + FieldElement{9378160, -13140186, -22845982, -12745264, 28198281, -7244098, -2399684, -717351, 690426, 14876244}, + FieldElement{24977353, -314384, -8223969, -13465086, 28432343, -1176353, -13068804, -12297348, -22380984, 6618999}, + FieldElement{-1538174, 11685646, 12944378, 13682314, -24389511, -14413193, 8044829, -13817328, 32239829, -5652762}, + }, + { + FieldElement{-18603066, 4762990, -926250, 8885304, -28412480, -3187315, 9781647, -10350059, 32779359, 5095274}, + FieldElement{-33008130, -5214506, -32264887, -3685216, 9460461, -9327423, -24601656, 14506724, 21639561, -2630236}, + FieldElement{-16400943, -13112215, 25239338, 15531969, 3987758, -4499318, -1289502, -6863535, 17874574, 558605}, + }, + { + FieldElement{-13600129, 10240081, 9171883, 16131053, -20869254, 9599700, 33499487, 5080151, 2085892, 5119761}, + FieldElement{-22205145, -2519528, -16381601, 414691, -25019550, 2170430, 30634760, -8363614, -31999993, -5759884}, + FieldElement{-6845704, 15791202, 8550074, -1312654, 29928809, -12092256, 27534430, -7192145, -22351378, 12961482}, + }, + { + FieldElement{-24492060, -9570771, 10368194, 11582341, -23397293, -2245287, 16533930, 8206996, -30194652, -5159638}, + FieldElement{-11121496, -3382234, 2307366, 6362031, -135455, 8868177, -16835630, 7031275, 7589640, 8945490}, + FieldElement{-32152748, 8917967, 6661220, -11677616, -1192060, -15793393, 7251489, -11182180, 24099109, -14456170}, + }, + { + FieldElement{5019558, -7907470, 4244127, -14714356, -26933272, 6453165, -19118182, -13289025, -6231896, -10280736}, + FieldElement{10853594, 10721687, 26480089, 5861829, -22995819, 1972175, -1866647, -10557898, -3363451, -6441124}, + FieldElement{-17002408, 5906790, 221599, -6563147, 7828208, -13248918, 24362661, -2008168, -13866408, 7421392}, + }, + { + FieldElement{8139927, -6546497, 32257646, -5890546, 30375719, 1886181, -21175108, 15441252, 28826358, -4123029}, + FieldElement{6267086, 9695052, 7709135, -16603597, -32869068, -1886135, 14795160, -7840124, 13746021, -1742048}, + FieldElement{28584902, 7787108, -6732942, -15050729, 22846041, -7571236, -3181936, -363524, 4771362, -8419958}, + }, + }, + { + { + FieldElement{24949256, 6376279, -27466481, -8174608, -18646154, -9930606, 33543569, -12141695, 3569627, 11342593}, + FieldElement{26514989, 4740088, 27912651, 3697550, 19331575, -11472339, 6809886, 4608608, 7325975, -14801071}, + FieldElement{-11618399, -14554430, -24321212, 7655128, -1369274, 5214312, -27400540, 10258390, -17646694, -8186692}, + }, + { + FieldElement{11431204, 15823007, 26570245, 14329124, 18029990, 4796082, -31446179, 15580664, 9280358, -3973687}, + FieldElement{-160783, -10326257, -22855316, -4304997, -20861367, -13621002, -32810901, -11181622, -15545091, 4387441}, + FieldElement{-20799378, 12194512, 3937617, -5805892, -27154820, 9340370, -24513992, 8548137, 20617071, -7482001}, + }, + { + FieldElement{-938825, -3930586, -8714311, 16124718, 24603125, -6225393, -13775352, -11875822, 24345683, 10325460}, + FieldElement{-19855277, -1568885, -22202708, 8714034, 14007766, 6928528, 16318175, -1010689, 4766743, 3552007}, + FieldElement{-21751364, -16730916, 1351763, -803421, -4009670, 3950935, 3217514, 14481909, 10988822, -3994762}, + }, + { + FieldElement{15564307, -14311570, 3101243, 5684148, 30446780, -8051356, 12677127, -6505343, -8295852, 13296005}, + FieldElement{-9442290, 6624296, -30298964, -11913677, -4670981, -2057379, 31521204, 9614054, -30000824, 12074674}, + FieldElement{4771191, -135239, 14290749, -13089852, 27992298, 14998318, -1413936, -1556716, 29832613, -16391035}, + }, + { + FieldElement{7064884, -7541174, -19161962, -5067537, -18891269, -2912736, 25825242, 5293297, -27122660, 13101590}, + FieldElement{-2298563, 2439670, -7466610, 1719965, -27267541, -16328445, 32512469, -5317593, -30356070, -4190957}, + FieldElement{-30006540, 10162316, -33180176, 3981723, -16482138, -13070044, 14413974, 9515896, 19568978, 9628812}, + }, + { + FieldElement{33053803, 199357, 15894591, 1583059, 27380243, -4580435, -17838894, -6106839, -6291786, 3437740}, + FieldElement{-18978877, 3884493, 19469877, 12726490, 15913552, 13614290, -22961733, 70104, 7463304, 4176122}, + FieldElement{-27124001, 10659917, 11482427, -16070381, 12771467, -6635117, -32719404, -5322751, 24216882, 5944158}, + }, + { + FieldElement{8894125, 7450974, -2664149, -9765752, -28080517, -12389115, 19345746, 14680796, 11632993, 5847885}, + FieldElement{26942781, -2315317, 9129564, -4906607, 26024105, 11769399, -11518837, 6367194, -9727230, 4782140}, + FieldElement{19916461, -4828410, -22910704, -11414391, 25606324, -5972441, 33253853, 8220911, 6358847, -1873857}, + }, + { + FieldElement{801428, -2081702, 16569428, 11065167, 29875704, 96627, 7908388, -4480480, -13538503, 1387155}, + FieldElement{19646058, 5720633, -11416706, 12814209, 11607948, 12749789, 14147075, 15156355, -21866831, 11835260}, + FieldElement{19299512, 1155910, 28703737, 14890794, 2925026, 7269399, 26121523, 15467869, -26560550, 5052483}, + }, + }, + { + { + FieldElement{-3017432, 10058206, 1980837, 3964243, 22160966, 12322533, -6431123, -12618185, 12228557, -7003677}, + FieldElement{32944382, 14922211, -22844894, 5188528, 21913450, -8719943, 4001465, 13238564, -6114803, 8653815}, + FieldElement{22865569, -4652735, 27603668, -12545395, 14348958, 8234005, 24808405, 5719875, 28483275, 2841751}, + }, + { + FieldElement{-16420968, -1113305, -327719, -12107856, 21886282, -15552774, -1887966, -315658, 19932058, -12739203}, + FieldElement{-11656086, 10087521, -8864888, -5536143, -19278573, -3055912, 3999228, 13239134, -4777469, -13910208}, + FieldElement{1382174, -11694719, 17266790, 9194690, -13324356, 9720081, 20403944, 11284705, -14013818, 3093230}, + }, + { + FieldElement{16650921, -11037932, -1064178, 1570629, -8329746, 7352753, -302424, 16271225, -24049421, -6691850}, + FieldElement{-21911077, -5927941, -4611316, -5560156, -31744103, -10785293, 24123614, 15193618, -21652117, -16739389}, + FieldElement{-9935934, -4289447, -25279823, 4372842, 2087473, 10399484, 31870908, 14690798, 17361620, 11864968}, + }, + { + FieldElement{-11307610, 6210372, 13206574, 5806320, -29017692, -13967200, -12331205, -7486601, -25578460, -16240689}, + FieldElement{14668462, -12270235, 26039039, 15305210, 25515617, 4542480, 10453892, 6577524, 9145645, -6443880}, + FieldElement{5974874, 3053895, -9433049, -10385191, -31865124, 3225009, -7972642, 3936128, -5652273, -3050304}, + }, + { + FieldElement{30625386, -4729400, -25555961, -12792866, -20484575, 7695099, 17097188, -16303496, -27999779, 1803632}, + FieldElement{-3553091, 9865099, -5228566, 4272701, -5673832, -16689700, 14911344, 12196514, -21405489, 7047412}, + FieldElement{20093277, 9920966, -11138194, -5343857, 13161587, 12044805, -32856851, 4124601, -32343828, -10257566}, + }, + { + FieldElement{-20788824, 14084654, -13531713, 7842147, 19119038, -13822605, 4752377, -8714640, -21679658, 2288038}, + FieldElement{-26819236, -3283715, 29965059, 3039786, -14473765, 2540457, 29457502, 14625692, -24819617, 12570232}, + FieldElement{-1063558, -11551823, 16920318, 12494842, 1278292, -5869109, -21159943, -3498680, -11974704, 4724943}, + }, + { + FieldElement{17960970, -11775534, -4140968, -9702530, -8876562, -1410617, -12907383, -8659932, -29576300, 1903856}, + FieldElement{23134274, -14279132, -10681997, -1611936, 20684485, 15770816, -12989750, 3190296, 26955097, 14109738}, + FieldElement{15308788, 5320727, -30113809, -14318877, 22902008, 7767164, 29425325, -11277562, 31960942, 11934971}, + }, + { + FieldElement{-27395711, 8435796, 4109644, 12222639, -24627868, 14818669, 20638173, 4875028, 10491392, 1379718}, + FieldElement{-13159415, 9197841, 3875503, -8936108, -1383712, -5879801, 33518459, 16176658, 21432314, 12180697}, + FieldElement{-11787308, 11500838, 13787581, -13832590, -22430679, 10140205, 1465425, 12689540, -10301319, -13872883}, + }, + }, + { + { + FieldElement{5414091, -15386041, -21007664, 9643570, 12834970, 1186149, -2622916, -1342231, 26128231, 6032912}, + FieldElement{-26337395, -13766162, 32496025, -13653919, 17847801, -12669156, 3604025, 8316894, -25875034, -10437358}, + FieldElement{3296484, 6223048, 24680646, -12246460, -23052020, 5903205, -8862297, -4639164, 12376617, 3188849}, + }, + { + FieldElement{29190488, -14659046, 27549113, -1183516, 3520066, -10697301, 32049515, -7309113, -16109234, -9852307}, + FieldElement{-14744486, -9309156, 735818, -598978, -20407687, -5057904, 25246078, -15795669, 18640741, -960977}, + FieldElement{-6928835, -16430795, 10361374, 5642961, 4910474, 12345252, -31638386, -494430, 10530747, 1053335}, + }, + { + FieldElement{-29265967, -14186805, -13538216, -12117373, -19457059, -10655384, -31462369, -2948985, 24018831, 15026644}, + FieldElement{-22592535, -3145277, -2289276, 5953843, -13440189, 9425631, 25310643, 13003497, -2314791, -15145616}, + FieldElement{-27419985, -603321, -8043984, -1669117, -26092265, 13987819, -27297622, 187899, -23166419, -2531735}, + }, + { + FieldElement{-21744398, -13810475, 1844840, 5021428, -10434399, -15911473, 9716667, 16266922, -5070217, 726099}, + FieldElement{29370922, -6053998, 7334071, -15342259, 9385287, 2247707, -13661962, -4839461, 30007388, -15823341}, + FieldElement{-936379, 16086691, 23751945, -543318, -1167538, -5189036, 9137109, 730663, 9835848, 4555336}, + }, + { + FieldElement{-23376435, 1410446, -22253753, -12899614, 30867635, 15826977, 17693930, 544696, -11985298, 12422646}, + FieldElement{31117226, -12215734, -13502838, 6561947, -9876867, -12757670, -5118685, -4096706, 29120153, 13924425}, + FieldElement{-17400879, -14233209, 19675799, -2734756, -11006962, -5858820, -9383939, -11317700, 7240931, -237388}, + }, + { + FieldElement{-31361739, -11346780, -15007447, -5856218, -22453340, -12152771, 1222336, 4389483, 3293637, -15551743}, + FieldElement{-16684801, -14444245, 11038544, 11054958, -13801175, -3338533, -24319580, 7733547, 12796905, -6335822}, + FieldElement{-8759414, -10817836, -25418864, 10783769, -30615557, -9746811, -28253339, 3647836, 3222231, -11160462}, + }, + { + FieldElement{18606113, 1693100, -25448386, -15170272, 4112353, 10045021, 23603893, -2048234, -7550776, 2484985}, + FieldElement{9255317, -3131197, -12156162, -1004256, 13098013, -9214866, 16377220, -2102812, -19802075, -3034702}, + FieldElement{-22729289, 7496160, -5742199, 11329249, 19991973, -3347502, -31718148, 9936966, -30097688, -10618797}, + }, + { + FieldElement{21878590, -5001297, 4338336, 13643897, -3036865, 13160960, 19708896, 5415497, -7360503, -4109293}, + FieldElement{27736861, 10103576, 12500508, 8502413, -3413016, -9633558, 10436918, -1550276, -23659143, -8132100}, + FieldElement{19492550, -12104365, -29681976, -852630, -3208171, 12403437, 30066266, 8367329, 13243957, 8709688}, + }, + }, + { + { + FieldElement{12015105, 2801261, 28198131, 10151021, 24818120, -4743133, -11194191, -5645734, 5150968, 7274186}, + FieldElement{2831366, -12492146, 1478975, 6122054, 23825128, -12733586, 31097299, 6083058, 31021603, -9793610}, + FieldElement{-2529932, -2229646, 445613, 10720828, -13849527, -11505937, -23507731, 16354465, 15067285, -14147707}, + }, + { + FieldElement{7840942, 14037873, -33364863, 15934016, -728213, -3642706, 21403988, 1057586, -19379462, -12403220}, + FieldElement{915865, -16469274, 15608285, -8789130, -24357026, 6060030, -17371319, 8410997, -7220461, 16527025}, + FieldElement{32922597, -556987, 20336074, -16184568, 10903705, -5384487, 16957574, 52992, 23834301, 6588044}, + }, + { + FieldElement{32752030, 11232950, 3381995, -8714866, 22652988, -10744103, 17159699, 16689107, -20314580, -1305992}, + FieldElement{-4689649, 9166776, -25710296, -10847306, 11576752, 12733943, 7924251, -2752281, 1976123, -7249027}, + FieldElement{21251222, 16309901, -2983015, -6783122, 30810597, 12967303, 156041, -3371252, 12331345, -8237197}, + }, + { + FieldElement{8651614, -4477032, -16085636, -4996994, 13002507, 2950805, 29054427, -5106970, 10008136, -4667901}, + FieldElement{31486080, 15114593, -14261250, 12951354, 14369431, -7387845, 16347321, -13662089, 8684155, -10532952}, + FieldElement{19443825, 11385320, 24468943, -9659068, -23919258, 2187569, -26263207, -6086921, 31316348, 14219878}, + }, + { + FieldElement{-28594490, 1193785, 32245219, 11392485, 31092169, 15722801, 27146014, 6992409, 29126555, 9207390}, + FieldElement{32382935, 1110093, 18477781, 11028262, -27411763, -7548111, -4980517, 10843782, -7957600, -14435730}, + FieldElement{2814918, 7836403, 27519878, -7868156, -20894015, -11553689, -21494559, 8550130, 28346258, 1994730}, + }, + { + FieldElement{-19578299, 8085545, -14000519, -3948622, 2785838, -16231307, -19516951, 7174894, 22628102, 8115180}, + FieldElement{-30405132, 955511, -11133838, -15078069, -32447087, -13278079, -25651578, 3317160, -9943017, 930272}, + FieldElement{-15303681, -6833769, 28856490, 1357446, 23421993, 1057177, 24091212, -1388970, -22765376, -10650715}, + }, + { + FieldElement{-22751231, -5303997, -12907607, -12768866, -15811511, -7797053, -14839018, -16554220, -1867018, 8398970}, + FieldElement{-31969310, 2106403, -4736360, 1362501, 12813763, 16200670, 22981545, -6291273, 18009408, -15772772}, + FieldElement{-17220923, -9545221, -27784654, 14166835, 29815394, 7444469, 29551787, -3727419, 19288549, 1325865}, + }, + { + FieldElement{15100157, -15835752, -23923978, -1005098, -26450192, 15509408, 12376730, -3479146, 33166107, -8042750}, + FieldElement{20909231, 13023121, -9209752, 16251778, -5778415, -8094914, 12412151, 10018715, 2213263, -13878373}, + FieldElement{32529814, -11074689, 30361439, -16689753, -9135940, 1513226, 22922121, 6382134, -5766928, 8371348}, + }, + }, + { + { + FieldElement{9923462, 11271500, 12616794, 3544722, -29998368, -1721626, 12891687, -8193132, -26442943, 10486144}, + FieldElement{-22597207, -7012665, 8587003, -8257861, 4084309, -12970062, 361726, 2610596, -23921530, -11455195}, + FieldElement{5408411, -1136691, -4969122, 10561668, 24145918, 14240566, 31319731, -4235541, 19985175, -3436086}, + }, + { + FieldElement{-13994457, 16616821, 14549246, 3341099, 32155958, 13648976, -17577068, 8849297, 65030, 8370684}, + FieldElement{-8320926, -12049626, 31204563, 5839400, -20627288, -1057277, -19442942, 6922164, 12743482, -9800518}, + FieldElement{-2361371, 12678785, 28815050, 4759974, -23893047, 4884717, 23783145, 11038569, 18800704, 255233}, + }, + { + FieldElement{-5269658, -1773886, 13957886, 7990715, 23132995, 728773, 13393847, 9066957, 19258688, -14753793}, + FieldElement{-2936654, -10827535, -10432089, 14516793, -3640786, 4372541, -31934921, 2209390, -1524053, 2055794}, + FieldElement{580882, 16705327, 5468415, -2683018, -30926419, -14696000, -7203346, -8994389, -30021019, 7394435}, + }, + { + FieldElement{23838809, 1822728, -15738443, 15242727, 8318092, -3733104, -21672180, -3492205, -4821741, 14799921}, + FieldElement{13345610, 9759151, 3371034, -16137791, 16353039, 8577942, 31129804, 13496856, -9056018, 7402518}, + FieldElement{2286874, -4435931, -20042458, -2008336, -13696227, 5038122, 11006906, -15760352, 8205061, 1607563}, + }, + { + FieldElement{14414086, -8002132, 3331830, -3208217, 22249151, -5594188, 18364661, -2906958, 30019587, -9029278}, + FieldElement{-27688051, 1585953, -10775053, 931069, -29120221, -11002319, -14410829, 12029093, 9944378, 8024}, + FieldElement{4368715, -3709630, 29874200, -15022983, -20230386, -11410704, -16114594, -999085, -8142388, 5640030}, + }, + { + FieldElement{10299610, 13746483, 11661824, 16234854, 7630238, 5998374, 9809887, -16694564, 15219798, -14327783}, + FieldElement{27425505, -5719081, 3055006, 10660664, 23458024, 595578, -15398605, -1173195, -18342183, 9742717}, + FieldElement{6744077, 2427284, 26042789, 2720740, -847906, 1118974, 32324614, 7406442, 12420155, 1994844}, + }, + { + FieldElement{14012521, -5024720, -18384453, -9578469, -26485342, -3936439, -13033478, -10909803, 24319929, -6446333}, + FieldElement{16412690, -4507367, 10772641, 15929391, -17068788, -4658621, 10555945, -10484049, -30102368, -4739048}, + FieldElement{22397382, -7767684, -9293161, -12792868, 17166287, -9755136, -27333065, 6199366, 21880021, -12250760}, + }, + { + FieldElement{-4283307, 5368523, -31117018, 8163389, -30323063, 3209128, 16557151, 8890729, 8840445, 4957760}, + FieldElement{-15447727, 709327, -6919446, -10870178, -29777922, 6522332, -21720181, 12130072, -14796503, 5005757}, + FieldElement{-2114751, -14308128, 23019042, 15765735, -25269683, 6002752, 10183197, -13239326, -16395286, -2176112}, + }, + }, + { + { + FieldElement{-19025756, 1632005, 13466291, -7995100, -23640451, 16573537, -32013908, -3057104, 22208662, 2000468}, + FieldElement{3065073, -1412761, -25598674, -361432, -17683065, -5703415, -8164212, 11248527, -3691214, -7414184}, + FieldElement{10379208, -6045554, 8877319, 1473647, -29291284, -12507580, 16690915, 2553332, -3132688, 16400289}, + }, + { + FieldElement{15716668, 1254266, -18472690, 7446274, -8448918, 6344164, -22097271, -7285580, 26894937, 9132066}, + FieldElement{24158887, 12938817, 11085297, -8177598, -28063478, -4457083, -30576463, 64452, -6817084, -2692882}, + FieldElement{13488534, 7794716, 22236231, 5989356, 25426474, -12578208, 2350710, -3418511, -4688006, 2364226}, + }, + { + FieldElement{16335052, 9132434, 25640582, 6678888, 1725628, 8517937, -11807024, -11697457, 15445875, -7798101}, + FieldElement{29004207, -7867081, 28661402, -640412, -12794003, -7943086, 31863255, -4135540, -278050, -15759279}, + FieldElement{-6122061, -14866665, -28614905, 14569919, -10857999, -3591829, 10343412, -6976290, -29828287, -10815811}, + }, + { + FieldElement{27081650, 3463984, 14099042, -4517604, 1616303, -6205604, 29542636, 15372179, 17293797, 960709}, + FieldElement{20263915, 11434237, -5765435, 11236810, 13505955, -10857102, -16111345, 6493122, -19384511, 7639714}, + FieldElement{-2830798, -14839232, 25403038, -8215196, -8317012, -16173699, 18006287, -16043750, 29994677, -15808121}, + }, + { + FieldElement{9769828, 5202651, -24157398, -13631392, -28051003, -11561624, -24613141, -13860782, -31184575, 709464}, + FieldElement{12286395, 13076066, -21775189, -1176622, -25003198, 4057652, -32018128, -8890874, 16102007, 13205847}, + FieldElement{13733362, 5599946, 10557076, 3195751, -5557991, 8536970, -25540170, 8525972, 10151379, 10394400}, + }, + { + FieldElement{4024660, -16137551, 22436262, 12276534, -9099015, -2686099, 19698229, 11743039, -33302334, 8934414}, + FieldElement{-15879800, -4525240, -8580747, -2934061, 14634845, -698278, -9449077, 3137094, -11536886, 11721158}, + FieldElement{17555939, -5013938, 8268606, 2331751, -22738815, 9761013, 9319229, 8835153, -9205489, -1280045}, + }, + { + FieldElement{-461409, -7830014, 20614118, 16688288, -7514766, -4807119, 22300304, 505429, 6108462, -6183415}, + FieldElement{-5070281, 12367917, -30663534, 3234473, 32617080, -8422642, 29880583, -13483331, -26898490, -7867459}, + FieldElement{-31975283, 5726539, 26934134, 10237677, -3173717, -605053, 24199304, 3795095, 7592688, -14992079}, + }, + { + FieldElement{21594432, -14964228, 17466408, -4077222, 32537084, 2739898, 6407723, 12018833, -28256052, 4298412}, + FieldElement{-20650503, -11961496, -27236275, 570498, 3767144, -1717540, 13891942, -1569194, 13717174, 10805743}, + FieldElement{-14676630, -15644296, 15287174, 11927123, 24177847, -8175568, -796431, 14860609, -26938930, -5863836}, + }, + }, + { + { + FieldElement{12962541, 5311799, -10060768, 11658280, 18855286, -7954201, 13286263, -12808704, -4381056, 9882022}, + FieldElement{18512079, 11319350, -20123124, 15090309, 18818594, 5271736, -22727904, 3666879, -23967430, -3299429}, + FieldElement{-6789020, -3146043, 16192429, 13241070, 15898607, -14206114, -10084880, -6661110, -2403099, 5276065}, + }, + { + FieldElement{30169808, -5317648, 26306206, -11750859, 27814964, 7069267, 7152851, 3684982, 1449224, 13082861}, + FieldElement{10342826, 3098505, 2119311, 193222, 25702612, 12233820, 23697382, 15056736, -21016438, -8202000}, + FieldElement{-33150110, 3261608, 22745853, 7948688, 19370557, -15177665, -26171976, 6482814, -10300080, -11060101}, + }, + { + FieldElement{32869458, -5408545, 25609743, 15678670, -10687769, -15471071, 26112421, 2521008, -22664288, 6904815}, + FieldElement{29506923, 4457497, 3377935, -9796444, -30510046, 12935080, 1561737, 3841096, -29003639, -6657642}, + FieldElement{10340844, -6630377, -18656632, -2278430, 12621151, -13339055, 30878497, -11824370, -25584551, 5181966}, + }, + { + FieldElement{25940115, -12658025, 17324188, -10307374, -8671468, 15029094, 24396252, -16450922, -2322852, -12388574}, + FieldElement{-21765684, 9916823, -1300409, 4079498, -1028346, 11909559, 1782390, 12641087, 20603771, -6561742}, + FieldElement{-18882287, -11673380, 24849422, 11501709, 13161720, -4768874, 1925523, 11914390, 4662781, 7820689}, + }, + { + FieldElement{12241050, -425982, 8132691, 9393934, 32846760, -1599620, 29749456, 12172924, 16136752, 15264020}, + FieldElement{-10349955, -14680563, -8211979, 2330220, -17662549, -14545780, 10658213, 6671822, 19012087, 3772772}, + FieldElement{3753511, -3421066, 10617074, 2028709, 14841030, -6721664, 28718732, -15762884, 20527771, 12988982}, + }, + { + FieldElement{-14822485, -5797269, -3707987, 12689773, -898983, -10914866, -24183046, -10564943, 3299665, -12424953}, + FieldElement{-16777703, -15253301, -9642417, 4978983, 3308785, 8755439, 6943197, 6461331, -25583147, 8991218}, + FieldElement{-17226263, 1816362, -1673288, -6086439, 31783888, -8175991, -32948145, 7417950, -30242287, 1507265}, + }, + { + FieldElement{29692663, 6829891, -10498800, 4334896, 20945975, -11906496, -28887608, 8209391, 14606362, -10647073}, + FieldElement{-3481570, 8707081, 32188102, 5672294, 22096700, 1711240, -33020695, 9761487, 4170404, -2085325}, + FieldElement{-11587470, 14855945, -4127778, -1531857, -26649089, 15084046, 22186522, 16002000, -14276837, -8400798}, + }, + { + FieldElement{-4811456, 13761029, -31703877, -2483919, -3312471, 7869047, -7113572, -9620092, 13240845, 10965870}, + FieldElement{-7742563, -8256762, -14768334, -13656260, -23232383, 12387166, 4498947, 14147411, 29514390, 4302863}, + FieldElement{-13413405, -12407859, 20757302, -13801832, 14785143, 8976368, -5061276, -2144373, 17846988, -13971927}, + }, + }, + { + { + FieldElement{-2244452, -754728, -4597030, -1066309, -6247172, 1455299, -21647728, -9214789, -5222701, 12650267}, + FieldElement{-9906797, -16070310, 21134160, 12198166, -27064575, 708126, 387813, 13770293, -19134326, 10958663}, + FieldElement{22470984, 12369526, 23446014, -5441109, -21520802, -9698723, -11772496, -11574455, -25083830, 4271862}, + }, + { + FieldElement{-25169565, -10053642, -19909332, 15361595, -5984358, 2159192, 75375, -4278529, -32526221, 8469673}, + FieldElement{15854970, 4148314, -8893890, 7259002, 11666551, 13824734, -30531198, 2697372, 24154791, -9460943}, + FieldElement{15446137, -15806644, 29759747, 14019369, 30811221, -9610191, -31582008, 12840104, 24913809, 9815020}, + }, + { + FieldElement{-4709286, -5614269, -31841498, -12288893, -14443537, 10799414, -9103676, 13438769, 18735128, 9466238}, + FieldElement{11933045, 9281483, 5081055, -5183824, -2628162, -4905629, -7727821, -10896103, -22728655, 16199064}, + FieldElement{14576810, 379472, -26786533, -8317236, -29426508, -10812974, -102766, 1876699, 30801119, 2164795}, + }, + { + FieldElement{15995086, 3199873, 13672555, 13712240, -19378835, -4647646, -13081610, -15496269, -13492807, 1268052}, + FieldElement{-10290614, -3659039, -3286592, 10948818, 23037027, 3794475, -3470338, -12600221, -17055369, 3565904}, + FieldElement{29210088, -9419337, -5919792, -4952785, 10834811, -13327726, -16512102, -10820713, -27162222, -14030531}, + }, + { + FieldElement{-13161890, 15508588, 16663704, -8156150, -28349942, 9019123, -29183421, -3769423, 2244111, -14001979}, + FieldElement{-5152875, -3800936, -9306475, -6071583, 16243069, 14684434, -25673088, -16180800, 13491506, 4641841}, + FieldElement{10813417, 643330, -19188515, -728916, 30292062, -16600078, 27548447, -7721242, 14476989, -12767431}, + }, + { + FieldElement{10292079, 9984945, 6481436, 8279905, -7251514, 7032743, 27282937, -1644259, -27912810, 12651324}, + FieldElement{-31185513, -813383, 22271204, 11835308, 10201545, 15351028, 17099662, 3988035, 21721536, -3148940}, + FieldElement{10202177, -6545839, -31373232, -9574638, -32150642, -8119683, -12906320, 3852694, 13216206, 14842320}, + }, + { + FieldElement{-15815640, -10601066, -6538952, -7258995, -6984659, -6581778, -31500847, 13765824, -27434397, 9900184}, + FieldElement{14465505, -13833331, -32133984, -14738873, -27443187, 12990492, 33046193, 15796406, -7051866, -8040114}, + FieldElement{30924417, -8279620, 6359016, -12816335, 16508377, 9071735, -25488601, 15413635, 9524356, -7018878}, + }, + { + FieldElement{12274201, -13175547, 32627641, -1785326, 6736625, 13267305, 5237659, -5109483, 15663516, 4035784}, + FieldElement{-2951309, 8903985, 17349946, 601635, -16432815, -4612556, -13732739, -15889334, -22258478, 4659091}, + FieldElement{-16916263, -4952973, -30393711, -15158821, 20774812, 15897498, 5736189, 15026997, -2178256, -13455585}, + }, + }, + { + { + FieldElement{-8858980, -2219056, 28571666, -10155518, -474467, -10105698, -3801496, 278095, 23440562, -290208}, + FieldElement{10226241, -5928702, 15139956, 120818, -14867693, 5218603, 32937275, 11551483, -16571960, -7442864}, + FieldElement{17932739, -12437276, -24039557, 10749060, 11316803, 7535897, 22503767, 5561594, -3646624, 3898661}, + }, + { + FieldElement{7749907, -969567, -16339731, -16464, -25018111, 15122143, -1573531, 7152530, 21831162, 1245233}, + FieldElement{26958459, -14658026, 4314586, 8346991, -5677764, 11960072, -32589295, -620035, -30402091, -16716212}, + FieldElement{-12165896, 9166947, 33491384, 13673479, 29787085, 13096535, 6280834, 14587357, -22338025, 13987525}, + }, + { + FieldElement{-24349909, 7778775, 21116000, 15572597, -4833266, -5357778, -4300898, -5124639, -7469781, -2858068}, + FieldElement{9681908, -6737123, -31951644, 13591838, -6883821, 386950, 31622781, 6439245, -14581012, 4091397}, + FieldElement{-8426427, 1470727, -28109679, -1596990, 3978627, -5123623, -19622683, 12092163, 29077877, -14741988}, + }, + { + FieldElement{5269168, -6859726, -13230211, -8020715, 25932563, 1763552, -5606110, -5505881, -20017847, 2357889}, + FieldElement{32264008, -15407652, -5387735, -1160093, -2091322, -3946900, 23104804, -12869908, 5727338, 189038}, + FieldElement{14609123, -8954470, -6000566, -16622781, -14577387, -7743898, -26745169, 10942115, -25888931, -14884697}, + }, + { + FieldElement{20513500, 5557931, -15604613, 7829531, 26413943, -2019404, -21378968, 7471781, 13913677, -5137875}, + FieldElement{-25574376, 11967826, 29233242, 12948236, -6754465, 4713227, -8940970, 14059180, 12878652, 8511905}, + FieldElement{-25656801, 3393631, -2955415, -7075526, -2250709, 9366908, -30223418, 6812974, 5568676, -3127656}, + }, + { + FieldElement{11630004, 12144454, 2116339, 13606037, 27378885, 15676917, -17408753, -13504373, -14395196, 8070818}, + FieldElement{27117696, -10007378, -31282771, -5570088, 1127282, 12772488, -29845906, 10483306, -11552749, -1028714}, + FieldElement{10637467, -5688064, 5674781, 1072708, -26343588, -6982302, -1683975, 9177853, -27493162, 15431203}, + }, + { + FieldElement{20525145, 10892566, -12742472, 12779443, -29493034, 16150075, -28240519, 14943142, -15056790, -7935931}, + FieldElement{-30024462, 5626926, -551567, -9981087, 753598, 11981191, 25244767, -3239766, -3356550, 9594024}, + FieldElement{-23752644, 2636870, -5163910, -10103818, 585134, 7877383, 11345683, -6492290, 13352335, -10977084}, + }, + { + FieldElement{-1931799, -5407458, 3304649, -12884869, 17015806, -4877091, -29783850, -7752482, -13215537, -319204}, + FieldElement{20239939, 6607058, 6203985, 3483793, -18386976, -779229, -20723742, 15077870, -22750759, 14523817}, + FieldElement{27406042, -6041657, 27423596, -4497394, 4996214, 10002360, -28842031, -4545494, -30172742, -4805667}, + }, + }, + { + { + FieldElement{11374242, 12660715, 17861383, -12540833, 10935568, 1099227, -13886076, -9091740, -27727044, 11358504}, + FieldElement{-12730809, 10311867, 1510375, 10778093, -2119455, -9145702, 32676003, 11149336, -26123651, 4985768}, + FieldElement{-19096303, 341147, -6197485, -239033, 15756973, -8796662, -983043, 13794114, -19414307, -15621255}, + }, + { + FieldElement{6490081, 11940286, 25495923, -7726360, 8668373, -8751316, 3367603, 6970005, -1691065, -9004790}, + FieldElement{1656497, 13457317, 15370807, 6364910, 13605745, 8362338, -19174622, -5475723, -16796596, -5031438}, + FieldElement{-22273315, -13524424, -64685, -4334223, -18605636, -10921968, -20571065, -7007978, -99853, -10237333}, + }, + { + FieldElement{17747465, 10039260, 19368299, -4050591, -20630635, -16041286, 31992683, -15857976, -29260363, -5511971}, + FieldElement{31932027, -4986141, -19612382, 16366580, 22023614, 88450, 11371999, -3744247, 4882242, -10626905}, + FieldElement{29796507, 37186, 19818052, 10115756, -11829032, 3352736, 18551198, 3272828, -5190932, -4162409}, + }, + { + FieldElement{12501286, 4044383, -8612957, -13392385, -32430052, 5136599, -19230378, -3529697, 330070, -3659409}, + FieldElement{6384877, 2899513, 17807477, 7663917, -2358888, 12363165, 25366522, -8573892, -271295, 12071499}, + FieldElement{-8365515, -4042521, 25133448, -4517355, -6211027, 2265927, -32769618, 1936675, -5159697, 3829363}, + }, + { + FieldElement{28425966, -5835433, -577090, -4697198, -14217555, 6870930, 7921550, -6567787, 26333140, 14267664}, + FieldElement{-11067219, 11871231, 27385719, -10559544, -4585914, -11189312, 10004786, -8709488, -21761224, 8930324}, + FieldElement{-21197785, -16396035, 25654216, -1725397, 12282012, 11008919, 1541940, 4757911, -26491501, -16408940}, + }, + { + FieldElement{13537262, -7759490, -20604840, 10961927, -5922820, -13218065, -13156584, 6217254, -15943699, 13814990}, + FieldElement{-17422573, 15157790, 18705543, 29619, 24409717, -260476, 27361681, 9257833, -1956526, -1776914}, + FieldElement{-25045300, -10191966, 15366585, 15166509, -13105086, 8423556, -29171540, 12361135, -18685978, 4578290}, + }, + { + FieldElement{24579768, 3711570, 1342322, -11180126, -27005135, 14124956, -22544529, 14074919, 21964432, 8235257}, + FieldElement{-6528613, -2411497, 9442966, -5925588, 12025640, -1487420, -2981514, -1669206, 13006806, 2355433}, + FieldElement{-16304899, -13605259, -6632427, -5142349, 16974359, -10911083, 27202044, 1719366, 1141648, -12796236}, + }, + { + FieldElement{-12863944, -13219986, -8318266, -11018091, -6810145, -4843894, 13475066, -3133972, 32674895, 13715045}, + FieldElement{11423335, -5468059, 32344216, 8962751, 24989809, 9241752, -13265253, 16086212, -28740881, -15642093}, + FieldElement{-1409668, 12530728, -6368726, 10847387, 19531186, -14132160, -11709148, 7791794, -27245943, 4383347}, + }, + }, + { + { + FieldElement{-28970898, 5271447, -1266009, -9736989, -12455236, 16732599, -4862407, -4906449, 27193557, 6245191}, + FieldElement{-15193956, 5362278, -1783893, 2695834, 4960227, 12840725, 23061898, 3260492, 22510453, 8577507}, + FieldElement{-12632451, 11257346, -32692994, 13548177, -721004, 10879011, 31168030, 13952092, -29571492, -3635906}, + }, + { + FieldElement{3877321, -9572739, 32416692, 5405324, -11004407, -13656635, 3759769, 11935320, 5611860, 8164018}, + FieldElement{-16275802, 14667797, 15906460, 12155291, -22111149, -9039718, 32003002, -8832289, 5773085, -8422109}, + FieldElement{-23788118, -8254300, 1950875, 8937633, 18686727, 16459170, -905725, 12376320, 31632953, 190926}, + }, + { + FieldElement{-24593607, -16138885, -8423991, 13378746, 14162407, 6901328, -8288749, 4508564, -25341555, -3627528}, + FieldElement{8884438, -5884009, 6023974, 10104341, -6881569, -4941533, 18722941, -14786005, -1672488, 827625}, + FieldElement{-32720583, -16289296, -32503547, 7101210, 13354605, 2659080, -1800575, -14108036, -24878478, 1541286}, + }, + { + FieldElement{2901347, -1117687, 3880376, -10059388, -17620940, -3612781, -21802117, -3567481, 20456845, -1885033}, + FieldElement{27019610, 12299467, -13658288, -1603234, -12861660, -4861471, -19540150, -5016058, 29439641, 15138866}, + FieldElement{21536104, -6626420, -32447818, -10690208, -22408077, 5175814, -5420040, -16361163, 7779328, 109896}, + }, + { + FieldElement{30279744, 14648750, -8044871, 6425558, 13639621, -743509, 28698390, 12180118, 23177719, -554075}, + FieldElement{26572847, 3405927, -31701700, 12890905, -19265668, 5335866, -6493768, 2378492, 4439158, -13279347}, + FieldElement{-22716706, 3489070, -9225266, -332753, 18875722, -1140095, 14819434, -12731527, -17717757, -5461437}, + }, + { + FieldElement{-5056483, 16566551, 15953661, 3767752, -10436499, 15627060, -820954, 2177225, 8550082, -15114165}, + FieldElement{-18473302, 16596775, -381660, 15663611, 22860960, 15585581, -27844109, -3582739, -23260460, -8428588}, + FieldElement{-32480551, 15707275, -8205912, -5652081, 29464558, 2713815, -22725137, 15860482, -21902570, 1494193}, + }, + { + FieldElement{-19562091, -14087393, -25583872, -9299552, 13127842, 759709, 21923482, 16529112, 8742704, 12967017}, + FieldElement{-28464899, 1553205, 32536856, -10473729, -24691605, -406174, -8914625, -2933896, -29903758, 15553883}, + FieldElement{21877909, 3230008, 9881174, 10539357, -4797115, 2841332, 11543572, 14513274, 19375923, -12647961}, + }, + { + FieldElement{8832269, -14495485, 13253511, 5137575, 5037871, 4078777, 24880818, -6222716, 2862653, 9455043}, + FieldElement{29306751, 5123106, 20245049, -14149889, 9592566, 8447059, -2077124, -2990080, 15511449, 4789663}, + FieldElement{-20679756, 7004547, 8824831, -9434977, -4045704, -3750736, -5754762, 108893, 23513200, 16652362}, + }, + }, + { + { + FieldElement{-33256173, 4144782, -4476029, -6579123, 10770039, -7155542, -6650416, -12936300, -18319198, 10212860}, + FieldElement{2756081, 8598110, 7383731, -6859892, 22312759, -1105012, 21179801, 2600940, -9988298, -12506466}, + FieldElement{-24645692, 13317462, -30449259, -15653928, 21365574, -10869657, 11344424, 864440, -2499677, -16710063}, + }, + { + FieldElement{-26432803, 6148329, -17184412, -14474154, 18782929, -275997, -22561534, 211300, 2719757, 4940997}, + FieldElement{-1323882, 3911313, -6948744, 14759765, -30027150, 7851207, 21690126, 8518463, 26699843, 5276295}, + FieldElement{-13149873, -6429067, 9396249, 365013, 24703301, -10488939, 1321586, 149635, -15452774, 7159369}, + }, + { + FieldElement{9987780, -3404759, 17507962, 9505530, 9731535, -2165514, 22356009, 8312176, 22477218, -8403385}, + FieldElement{18155857, -16504990, 19744716, 9006923, 15154154, -10538976, 24256460, -4864995, -22548173, 9334109}, + FieldElement{2986088, -4911893, 10776628, -3473844, 10620590, -7083203, -21413845, 14253545, -22587149, 536906}, + }, + { + FieldElement{4377756, 8115836, 24567078, 15495314, 11625074, 13064599, 7390551, 10589625, 10838060, -15420424}, + FieldElement{-19342404, 867880, 9277171, -3218459, -14431572, -1986443, 19295826, -15796950, 6378260, 699185}, + FieldElement{7895026, 4057113, -7081772, -13077756, -17886831, -323126, -716039, 15693155, -5045064, -13373962}, + }, + { + FieldElement{-7737563, -5869402, -14566319, -7406919, 11385654, 13201616, 31730678, -10962840, -3918636, -9669325}, + FieldElement{10188286, -15770834, -7336361, 13427543, 22223443, 14896287, 30743455, 7116568, -21786507, 5427593}, + FieldElement{696102, 13206899, 27047647, -10632082, 15285305, -9853179, 10798490, -4578720, 19236243, 12477404}, + }, + { + FieldElement{-11229439, 11243796, -17054270, -8040865, -788228, -8167967, -3897669, 11180504, -23169516, 7733644}, + FieldElement{17800790, -14036179, -27000429, -11766671, 23887827, 3149671, 23466177, -10538171, 10322027, 15313801}, + FieldElement{26246234, 11968874, 32263343, -5468728, 6830755, -13323031, -15794704, -101982, -24449242, 10890804}, + }, + { + FieldElement{-31365647, 10271363, -12660625, -6267268, 16690207, -13062544, -14982212, 16484931, 25180797, -5334884}, + FieldElement{-586574, 10376444, -32586414, -11286356, 19801893, 10997610, 2276632, 9482883, 316878, 13820577}, + FieldElement{-9882808, -4510367, -2115506, 16457136, -11100081, 11674996, 30756178, -7515054, 30696930, -3712849}, + }, + { + FieldElement{32988917, -9603412, 12499366, 7910787, -10617257, -11931514, -7342816, -9985397, -32349517, 7392473}, + FieldElement{-8855661, 15927861, 9866406, -3649411, -2396914, -16655781, -30409476, -9134995, 25112947, -2926644}, + FieldElement{-2504044, -436966, 25621774, -5678772, 15085042, -5479877, -24884878, -13526194, 5537438, -13914319}, + }, + }, + { + { + FieldElement{-11225584, 2320285, -9584280, 10149187, -33444663, 5808648, -14876251, -1729667, 31234590, 6090599}, + FieldElement{-9633316, 116426, 26083934, 2897444, -6364437, -2688086, 609721, 15878753, -6970405, -9034768}, + FieldElement{-27757857, 247744, -15194774, -9002551, 23288161, -10011936, -23869595, 6503646, 20650474, 1804084}, + }, + { + FieldElement{-27589786, 15456424, 8972517, 8469608, 15640622, 4439847, 3121995, -10329713, 27842616, -202328}, + FieldElement{-15306973, 2839644, 22530074, 10026331, 4602058, 5048462, 28248656, 5031932, -11375082, 12714369}, + FieldElement{20807691, -7270825, 29286141, 11421711, -27876523, -13868230, -21227475, 1035546, -19733229, 12796920}, + }, + { + FieldElement{12076899, -14301286, -8785001, -11848922, -25012791, 16400684, -17591495, -12899438, 3480665, -15182815}, + FieldElement{-32361549, 5457597, 28548107, 7833186, 7303070, -11953545, -24363064, -15921875, -33374054, 2771025}, + FieldElement{-21389266, 421932, 26597266, 6860826, 22486084, -6737172, -17137485, -4210226, -24552282, 15673397}, + }, + { + FieldElement{-20184622, 2338216, 19788685, -9620956, -4001265, -8740893, -20271184, 4733254, 3727144, -12934448}, + FieldElement{6120119, 814863, -11794402, -622716, 6812205, -15747771, 2019594, 7975683, 31123697, -10958981}, + FieldElement{30069250, -11435332, 30434654, 2958439, 18399564, -976289, 12296869, 9204260, -16432438, 9648165}, + }, + { + FieldElement{32705432, -1550977, 30705658, 7451065, -11805606, 9631813, 3305266, 5248604, -26008332, -11377501}, + FieldElement{17219865, 2375039, -31570947, -5575615, -19459679, 9219903, 294711, 15298639, 2662509, -16297073}, + FieldElement{-1172927, -7558695, -4366770, -4287744, -21346413, -8434326, 32087529, -1222777, 32247248, -14389861}, + }, + { + FieldElement{14312628, 1221556, 17395390, -8700143, -4945741, -8684635, -28197744, -9637817, -16027623, -13378845}, + FieldElement{-1428825, -9678990, -9235681, 6549687, -7383069, -468664, 23046502, 9803137, 17597934, 2346211}, + FieldElement{18510800, 15337574, 26171504, 981392, -22241552, 7827556, -23491134, -11323352, 3059833, -11782870}, + }, + { + FieldElement{10141598, 6082907, 17829293, -1947643, 9830092, 13613136, -25556636, -5544586, -33502212, 3592096}, + FieldElement{33114168, -15889352, -26525686, -13343397, 33076705, 8716171, 1151462, 1521897, -982665, -6837803}, + FieldElement{-32939165, -4255815, 23947181, -324178, -33072974, -12305637, -16637686, 3891704, 26353178, 693168}, + }, + { + FieldElement{30374239, 1595580, -16884039, 13186931, 4600344, 406904, 9585294, -400668, 31375464, 14369965}, + FieldElement{-14370654, -7772529, 1510301, 6434173, -18784789, -6262728, 32732230, -13108839, 17901441, 16011505}, + FieldElement{18171223, -11934626, -12500402, 15197122, -11038147, -15230035, -19172240, -16046376, 8764035, 12309598}, + }, + }, + { + { + FieldElement{5975908, -5243188, -19459362, -9681747, -11541277, 14015782, -23665757, 1228319, 17544096, -10593782}, + FieldElement{5811932, -1715293, 3442887, -2269310, -18367348, -8359541, -18044043, -15410127, -5565381, 12348900}, + FieldElement{-31399660, 11407555, 25755363, 6891399, -3256938, 14872274, -24849353, 8141295, -10632534, -585479}, + }, + { + FieldElement{-12675304, 694026, -5076145, 13300344, 14015258, -14451394, -9698672, -11329050, 30944593, 1130208}, + FieldElement{8247766, -6710942, -26562381, -7709309, -14401939, -14648910, 4652152, 2488540, 23550156, -271232}, + FieldElement{17294316, -3788438, 7026748, 15626851, 22990044, 113481, 2267737, -5908146, -408818, -137719}, + }, + { + FieldElement{16091085, -16253926, 18599252, 7340678, 2137637, -1221657, -3364161, 14550936, 3260525, -7166271}, + FieldElement{-4910104, -13332887, 18550887, 10864893, -16459325, -7291596, -23028869, -13204905, -12748722, 2701326}, + FieldElement{-8574695, 16099415, 4629974, -16340524, -20786213, -6005432, -10018363, 9276971, 11329923, 1862132}, + }, + { + FieldElement{14763076, -15903608, -30918270, 3689867, 3511892, 10313526, -21951088, 12219231, -9037963, -940300}, + FieldElement{8894987, -3446094, 6150753, 3013931, 301220, 15693451, -31981216, -2909717, -15438168, 11595570}, + FieldElement{15214962, 3537601, -26238722, -14058872, 4418657, -15230761, 13947276, 10730794, -13489462, -4363670}, + }, + { + FieldElement{-2538306, 7682793, 32759013, 263109, -29984731, -7955452, -22332124, -10188635, 977108, 699994}, + FieldElement{-12466472, 4195084, -9211532, 550904, -15565337, 12917920, 19118110, -439841, -30534533, -14337913}, + FieldElement{31788461, -14507657, 4799989, 7372237, 8808585, -14747943, 9408237, -10051775, 12493932, -5409317}, + }, + { + FieldElement{-25680606, 5260744, -19235809, -6284470, -3695942, 16566087, 27218280, 2607121, 29375955, 6024730}, + FieldElement{842132, -2794693, -4763381, -8722815, 26332018, -12405641, 11831880, 6985184, -9940361, 2854096}, + FieldElement{-4847262, -7969331, 2516242, -5847713, 9695691, -7221186, 16512645, 960770, 12121869, 16648078}, + }, + { + FieldElement{-15218652, 14667096, -13336229, 2013717, 30598287, -464137, -31504922, -7882064, 20237806, 2838411}, + FieldElement{-19288047, 4453152, 15298546, -16178388, 22115043, -15972604, 12544294, -13470457, 1068881, -12499905}, + FieldElement{-9558883, -16518835, 33238498, 13506958, 30505848, -1114596, -8486907, -2630053, 12521378, 4845654}, + }, + { + FieldElement{-28198521, 10744108, -2958380, 10199664, 7759311, -13088600, 3409348, -873400, -6482306, -12885870}, + FieldElement{-23561822, 6230156, -20382013, 10655314, -24040585, -11621172, 10477734, -1240216, -3113227, 13974498}, + FieldElement{12966261, 15550616, -32038948, -1615346, 21025980, -629444, 5642325, 7188737, 18895762, 12629579}, + }, + }, + { + { + FieldElement{14741879, -14946887, 22177208, -11721237, 1279741, 8058600, 11758140, 789443, 32195181, 3895677}, + FieldElement{10758205, 15755439, -4509950, 9243698, -4879422, 6879879, -2204575, -3566119, -8982069, 4429647}, + FieldElement{-2453894, 15725973, -20436342, -10410672, -5803908, -11040220, -7135870, -11642895, 18047436, -15281743}, + }, + { + FieldElement{-25173001, -11307165, 29759956, 11776784, -22262383, -15820455, 10993114, -12850837, -17620701, -9408468}, + FieldElement{21987233, 700364, -24505048, 14972008, -7774265, -5718395, 32155026, 2581431, -29958985, 8773375}, + FieldElement{-25568350, 454463, -13211935, 16126715, 25240068, 8594567, 20656846, 12017935, -7874389, -13920155}, + }, + { + FieldElement{6028182, 6263078, -31011806, -11301710, -818919, 2461772, -31841174, -5468042, -1721788, -2776725}, + FieldElement{-12278994, 16624277, 987579, -5922598, 32908203, 1248608, 7719845, -4166698, 28408820, 6816612}, + FieldElement{-10358094, -8237829, 19549651, -12169222, 22082623, 16147817, 20613181, 13982702, -10339570, 5067943}, + }, + { + FieldElement{-30505967, -3821767, 12074681, 13582412, -19877972, 2443951, -19719286, 12746132, 5331210, -10105944}, + FieldElement{30528811, 3601899, -1957090, 4619785, -27361822, -15436388, 24180793, -12570394, 27679908, -1648928}, + FieldElement{9402404, -13957065, 32834043, 10838634, -26580150, -13237195, 26653274, -8685565, 22611444, -12715406}, + }, + { + FieldElement{22190590, 1118029, 22736441, 15130463, -30460692, -5991321, 19189625, -4648942, 4854859, 6622139}, + FieldElement{-8310738, -2953450, -8262579, -3388049, -10401731, -271929, 13424426, -3567227, 26404409, 13001963}, + FieldElement{-31241838, -15415700, -2994250, 8939346, 11562230, -12840670, -26064365, -11621720, -15405155, 11020693}, + }, + { + FieldElement{1866042, -7949489, -7898649, -10301010, 12483315, 13477547, 3175636, -12424163, 28761762, 1406734}, + FieldElement{-448555, -1777666, 13018551, 3194501, -9580420, -11161737, 24760585, -4347088, 25577411, -13378680}, + FieldElement{-24290378, 4759345, -690653, -1852816, 2066747, 10693769, -29595790, 9884936, -9368926, 4745410}, + }, + { + FieldElement{-9141284, 6049714, -19531061, -4341411, -31260798, 9944276, -15462008, -11311852, 10931924, -11931931}, + FieldElement{-16561513, 14112680, -8012645, 4817318, -8040464, -11414606, -22853429, 10856641, -20470770, 13434654}, + FieldElement{22759489, -10073434, -16766264, -1871422, 13637442, -10168091, 1765144, -12654326, 28445307, -5364710}, + }, + { + FieldElement{29875063, 12493613, 2795536, -3786330, 1710620, 15181182, -10195717, -8788675, 9074234, 1167180}, + FieldElement{-26205683, 11014233, -9842651, -2635485, -26908120, 7532294, -18716888, -9535498, 3843903, 9367684}, + FieldElement{-10969595, -6403711, 9591134, 9582310, 11349256, 108879, 16235123, 8601684, -139197, 4242895}, + }, + }, + { + { + FieldElement{22092954, -13191123, -2042793, -11968512, 32186753, -11517388, -6574341, 2470660, -27417366, 16625501}, + FieldElement{-11057722, 3042016, 13770083, -9257922, 584236, -544855, -7770857, 2602725, -27351616, 14247413}, + FieldElement{6314175, -10264892, -32772502, 15957557, -10157730, 168750, -8618807, 14290061, 27108877, -1180880}, + }, + { + FieldElement{-8586597, -7170966, 13241782, 10960156, -32991015, -13794596, 33547976, -11058889, -27148451, 981874}, + FieldElement{22833440, 9293594, -32649448, -13618667, -9136966, 14756819, -22928859, -13970780, -10479804, -16197962}, + FieldElement{-7768587, 3326786, -28111797, 10783824, 19178761, 14905060, 22680049, 13906969, -15933690, 3797899}, + }, + { + FieldElement{21721356, -4212746, -12206123, 9310182, -3882239, -13653110, 23740224, -2709232, 20491983, -8042152}, + FieldElement{9209270, -15135055, -13256557, -6167798, -731016, 15289673, 25947805, 15286587, 30997318, -6703063}, + FieldElement{7392032, 16618386, 23946583, -8039892, -13265164, -1533858, -14197445, -2321576, 17649998, -250080}, + }, + { + FieldElement{-9301088, -14193827, 30609526, -3049543, -25175069, -1283752, -15241566, -9525724, -2233253, 7662146}, + FieldElement{-17558673, 1763594, -33114336, 15908610, -30040870, -12174295, 7335080, -8472199, -3174674, 3440183}, + FieldElement{-19889700, -5977008, -24111293, -9688870, 10799743, -16571957, 40450, -4431835, 4862400, 1133}, + }, + { + FieldElement{-32856209, -7873957, -5422389, 14860950, -16319031, 7956142, 7258061, 311861, -30594991, -7379421}, + FieldElement{-3773428, -1565936, 28985340, 7499440, 24445838, 9325937, 29727763, 16527196, 18278453, 15405622}, + FieldElement{-4381906, 8508652, -19898366, -3674424, -5984453, 15149970, -13313598, 843523, -21875062, 13626197}, + }, + { + FieldElement{2281448, -13487055, -10915418, -2609910, 1879358, 16164207, -10783882, 3953792, 13340839, 15928663}, + FieldElement{31727126, -7179855, -18437503, -8283652, 2875793, -16390330, -25269894, -7014826, -23452306, 5964753}, + FieldElement{4100420, -5959452, -17179337, 6017714, -18705837, 12227141, -26684835, 11344144, 2538215, -7570755}, + }, + { + FieldElement{-9433605, 6123113, 11159803, -2156608, 30016280, 14966241, -20474983, 1485421, -629256, -15958862}, + FieldElement{-26804558, 4260919, 11851389, 9658551, -32017107, 16367492, -20205425, -13191288, 11659922, -11115118}, + FieldElement{26180396, 10015009, -30844224, -8581293, 5418197, 9480663, 2231568, -10170080, 33100372, -1306171}, + }, + { + FieldElement{15121113, -5201871, -10389905, 15427821, -27509937, -15992507, 21670947, 4486675, -5931810, -14466380}, + FieldElement{16166486, -9483733, -11104130, 6023908, -31926798, -1364923, 2340060, -16254968, -10735770, -10039824}, + FieldElement{28042865, -3557089, -12126526, 12259706, -3717498, -6945899, 6766453, -8689599, 18036436, 5803270}, + }, + }, + { + { + FieldElement{-817581, 6763912, 11803561, 1585585, 10958447, -2671165, 23855391, 4598332, -6159431, -14117438}, + FieldElement{-31031306, -14256194, 17332029, -2383520, 31312682, -5967183, 696309, 50292, -20095739, 11763584}, + FieldElement{-594563, -2514283, -32234153, 12643980, 12650761, 14811489, 665117, -12613632, -19773211, -10713562}, + }, + { + FieldElement{30464590, -11262872, -4127476, -12734478, 19835327, -7105613, -24396175, 2075773, -17020157, 992471}, + FieldElement{18357185, -6994433, 7766382, 16342475, -29324918, 411174, 14578841, 8080033, -11574335, -10601610}, + FieldElement{19598397, 10334610, 12555054, 2555664, 18821899, -10339780, 21873263, 16014234, 26224780, 16452269}, + }, + { + FieldElement{-30223925, 5145196, 5944548, 16385966, 3976735, 2009897, -11377804, -7618186, -20533829, 3698650}, + FieldElement{14187449, 3448569, -10636236, -10810935, -22663880, -3433596, 7268410, -10890444, 27394301, 12015369}, + FieldElement{19695761, 16087646, 28032085, 12999827, 6817792, 11427614, 20244189, -1312777, -13259127, -3402461}, + }, + { + FieldElement{30860103, 12735208, -1888245, -4699734, -16974906, 2256940, -8166013, 12298312, -8550524, -10393462}, + FieldElement{-5719826, -11245325, -1910649, 15569035, 26642876, -7587760, -5789354, -15118654, -4976164, 12651793}, + FieldElement{-2848395, 9953421, 11531313, -5282879, 26895123, -12697089, -13118820, -16517902, 9768698, -2533218}, + }, + { + FieldElement{-24719459, 1894651, -287698, -4704085, 15348719, -8156530, 32767513, 12765450, 4940095, 10678226}, + FieldElement{18860224, 15980149, -18987240, -1562570, -26233012, -11071856, -7843882, 13944024, -24372348, 16582019}, + FieldElement{-15504260, 4970268, -29893044, 4175593, -20993212, -2199756, -11704054, 15444560, -11003761, 7989037}, + }, + { + FieldElement{31490452, 5568061, -2412803, 2182383, -32336847, 4531686, -32078269, 6200206, -19686113, -14800171}, + FieldElement{-17308668, -15879940, -31522777, -2831, -32887382, 16375549, 8680158, -16371713, 28550068, -6857132}, + FieldElement{-28126887, -5688091, 16837845, -1820458, -6850681, 12700016, -30039981, 4364038, 1155602, 5988841}, + }, + { + FieldElement{21890435, -13272907, -12624011, 12154349, -7831873, 15300496, 23148983, -4470481, 24618407, 8283181}, + FieldElement{-33136107, -10512751, 9975416, 6841041, -31559793, 16356536, 3070187, -7025928, 1466169, 10740210}, + FieldElement{-1509399, -15488185, -13503385, -10655916, 32799044, 909394, -13938903, -5779719, -32164649, -15327040}, + }, + { + FieldElement{3960823, -14267803, -28026090, -15918051, -19404858, 13146868, 15567327, 951507, -3260321, -573935}, + FieldElement{24740841, 5052253, -30094131, 8961361, 25877428, 6165135, -24368180, 14397372, -7380369, -6144105}, + FieldElement{-28888365, 3510803, -28103278, -1158478, -11238128, -10631454, -15441463, -14453128, -1625486, -6494814}, + }, + }, + { + { + FieldElement{793299, -9230478, 8836302, -6235707, -27360908, -2369593, 33152843, -4885251, -9906200, -621852}, + FieldElement{5666233, 525582, 20782575, -8038419, -24538499, 14657740, 16099374, 1468826, -6171428, -15186581}, + FieldElement{-4859255, -3779343, -2917758, -6748019, 7778750, 11688288, -30404353, -9871238, -1558923, -9863646}, + }, + { + FieldElement{10896332, -7719704, 824275, 472601, -19460308, 3009587, 25248958, 14783338, -30581476, -15757844}, + FieldElement{10566929, 12612572, -31944212, 11118703, -12633376, 12362879, 21752402, 8822496, 24003793, 14264025}, + FieldElement{27713862, -7355973, -11008240, 9227530, 27050101, 2504721, 23886875, -13117525, 13958495, -5732453}, + }, + { + FieldElement{-23481610, 4867226, -27247128, 3900521, 29838369, -8212291, -31889399, -10041781, 7340521, -15410068}, + FieldElement{4646514, -8011124, -22766023, -11532654, 23184553, 8566613, 31366726, -1381061, -15066784, -10375192}, + FieldElement{-17270517, 12723032, -16993061, 14878794, 21619651, -6197576, 27584817, 3093888, -8843694, 3849921}, + }, + { + FieldElement{-9064912, 2103172, 25561640, -15125738, -5239824, 9582958, 32477045, -9017955, 5002294, -15550259}, + FieldElement{-12057553, -11177906, 21115585, -13365155, 8808712, -12030708, 16489530, 13378448, -25845716, 12741426}, + FieldElement{-5946367, 10645103, -30911586, 15390284, -3286982, -7118677, 24306472, 15852464, 28834118, -7646072}, + }, + { + FieldElement{-17335748, -9107057, -24531279, 9434953, -8472084, -583362, -13090771, 455841, 20461858, 5491305}, + FieldElement{13669248, -16095482, -12481974, -10203039, -14569770, -11893198, -24995986, 11293807, -28588204, -9421832}, + FieldElement{28497928, 6272777, -33022994, 14470570, 8906179, -1225630, 18504674, -14165166, 29867745, -8795943}, + }, + { + FieldElement{-16207023, 13517196, -27799630, -13697798, 24009064, -6373891, -6367600, -13175392, 22853429, -4012011}, + FieldElement{24191378, 16712145, -13931797, 15217831, 14542237, 1646131, 18603514, -11037887, 12876623, -2112447}, + FieldElement{17902668, 4518229, -411702, -2829247, 26878217, 5258055, -12860753, 608397, 16031844, 3723494}, + }, + { + FieldElement{-28632773, 12763728, -20446446, 7577504, 33001348, -13017745, 17558842, -7872890, 23896954, -4314245}, + FieldElement{-20005381, -12011952, 31520464, 605201, 2543521, 5991821, -2945064, 7229064, -9919646, -8826859}, + FieldElement{28816045, 298879, -28165016, -15920938, 19000928, -1665890, -12680833, -2949325, -18051778, -2082915}, + }, + { + FieldElement{16000882, -344896, 3493092, -11447198, -29504595, -13159789, 12577740, 16041268, -19715240, 7847707}, + FieldElement{10151868, 10572098, 27312476, 7922682, 14825339, 4723128, -32855931, -6519018, -10020567, 3852848}, + FieldElement{-11430470, 15697596, -21121557, -4420647, 5386314, 15063598, 16514493, -15932110, 29330899, -15076224}, + }, + }, + { + { + FieldElement{-25499735, -4378794, -15222908, -6901211, 16615731, 2051784, 3303702, 15490, -27548796, 12314391}, + FieldElement{15683520, -6003043, 18109120, -9980648, 15337968, -5997823, -16717435, 15921866, 16103996, -3731215}, + FieldElement{-23169824, -10781249, 13588192, -1628807, -3798557, -1074929, -19273607, 5402699, -29815713, -9841101}, + }, + { + FieldElement{23190676, 2384583, -32714340, 3462154, -29903655, -1529132, -11266856, 8911517, -25205859, 2739713}, + FieldElement{21374101, -3554250, -33524649, 9874411, 15377179, 11831242, -33529904, 6134907, 4931255, 11987849}, + FieldElement{-7732, -2978858, -16223486, 7277597, 105524, -322051, -31480539, 13861388, -30076310, 10117930}, + }, + { + FieldElement{-29501170, -10744872, -26163768, 13051539, -25625564, 5089643, -6325503, 6704079, 12890019, 15728940}, + FieldElement{-21972360, -11771379, -951059, -4418840, 14704840, 2695116, 903376, -10428139, 12885167, 8311031}, + FieldElement{-17516482, 5352194, 10384213, -13811658, 7506451, 13453191, 26423267, 4384730, 1888765, -5435404}, + }, + { + FieldElement{-25817338, -3107312, -13494599, -3182506, 30896459, -13921729, -32251644, -12707869, -19464434, -3340243}, + FieldElement{-23607977, -2665774, -526091, 4651136, 5765089, 4618330, 6092245, 14845197, 17151279, -9854116}, + FieldElement{-24830458, -12733720, -15165978, 10367250, -29530908, -265356, 22825805, -7087279, -16866484, 16176525}, + }, + { + FieldElement{-23583256, 6564961, 20063689, 3798228, -4740178, 7359225, 2006182, -10363426, -28746253, -10197509}, + FieldElement{-10626600, -4486402, -13320562, -5125317, 3432136, -6393229, 23632037, -1940610, 32808310, 1099883}, + FieldElement{15030977, 5768825, -27451236, -2887299, -6427378, -15361371, -15277896, -6809350, 2051441, -15225865}, + }, + { + FieldElement{-3362323, -7239372, 7517890, 9824992, 23555850, 295369, 5148398, -14154188, -22686354, 16633660}, + FieldElement{4577086, -16752288, 13249841, -15304328, 19958763, -14537274, 18559670, -10759549, 8402478, -9864273}, + FieldElement{-28406330, -1051581, -26790155, -907698, -17212414, -11030789, 9453451, -14980072, 17983010, 9967138}, + }, + { + FieldElement{-25762494, 6524722, 26585488, 9969270, 24709298, 1220360, -1677990, 7806337, 17507396, 3651560}, + FieldElement{-10420457, -4118111, 14584639, 15971087, -15768321, 8861010, 26556809, -5574557, -18553322, -11357135}, + FieldElement{2839101, 14284142, 4029895, 3472686, 14402957, 12689363, -26642121, 8459447, -5605463, -7621941}, + }, + { + FieldElement{-4839289, -3535444, 9744961, 2871048, 25113978, 3187018, -25110813, -849066, 17258084, -7977739}, + FieldElement{18164541, -10595176, -17154882, -1542417, 19237078, -9745295, 23357533, -15217008, 26908270, 12150756}, + FieldElement{-30264870, -7647865, 5112249, -7036672, -1499807, -6974257, 43168, -5537701, -32302074, 16215819}, + }, + }, + { + { + FieldElement{-6898905, 9824394, -12304779, -4401089, -31397141, -6276835, 32574489, 12532905, -7503072, -8675347}, + FieldElement{-27343522, -16515468, -27151524, -10722951, 946346, 16291093, 254968, 7168080, 21676107, -1943028}, + FieldElement{21260961, -8424752, -16831886, -11920822, -23677961, 3968121, -3651949, -6215466, -3556191, -7913075}, + }, + { + FieldElement{16544754, 13250366, -16804428, 15546242, -4583003, 12757258, -2462308, -8680336, -18907032, -9662799}, + FieldElement{-2415239, -15577728, 18312303, 4964443, -15272530, -12653564, 26820651, 16690659, 25459437, -4564609}, + FieldElement{-25144690, 11425020, 28423002, -11020557, -6144921, -15826224, 9142795, -2391602, -6432418, -1644817}, + }, + { + FieldElement{-23104652, 6253476, 16964147, -3768872, -25113972, -12296437, -27457225, -16344658, 6335692, 7249989}, + FieldElement{-30333227, 13979675, 7503222, -12368314, -11956721, -4621693, -30272269, 2682242, 25993170, -12478523}, + FieldElement{4364628, 5930691, 32304656, -10044554, -8054781, 15091131, 22857016, -10598955, 31820368, 15075278}, + }, + { + FieldElement{31879134, -8918693, 17258761, 90626, -8041836, -4917709, 24162788, -9650886, -17970238, 12833045}, + FieldElement{19073683, 14851414, -24403169, -11860168, 7625278, 11091125, -19619190, 2074449, -9413939, 14905377}, + FieldElement{24483667, -11935567, -2518866, -11547418, -1553130, 15355506, -25282080, 9253129, 27628530, -7555480}, + }, + { + FieldElement{17597607, 8340603, 19355617, 552187, 26198470, -3176583, 4593324, -9157582, -14110875, 15297016}, + FieldElement{510886, 14337390, -31785257, 16638632, 6328095, 2713355, -20217417, -11864220, 8683221, 2921426}, + FieldElement{18606791, 11874196, 27155355, -5281482, -24031742, 6265446, -25178240, -1278924, 4674690, 13890525}, + }, + { + FieldElement{13609624, 13069022, -27372361, -13055908, 24360586, 9592974, 14977157, 9835105, 4389687, 288396}, + FieldElement{9922506, -519394, 13613107, 5883594, -18758345, -434263, -12304062, 8317628, 23388070, 16052080}, + FieldElement{12720016, 11937594, -31970060, -5028689, 26900120, 8561328, -20155687, -11632979, -14754271, -10812892}, + }, + { + FieldElement{15961858, 14150409, 26716931, -665832, -22794328, 13603569, 11829573, 7467844, -28822128, 929275}, + FieldElement{11038231, -11582396, -27310482, -7316562, -10498527, -16307831, -23479533, -9371869, -21393143, 2465074}, + FieldElement{20017163, -4323226, 27915242, 1529148, 12396362, 15675764, 13817261, -9658066, 2463391, -4622140}, + }, + { + FieldElement{-16358878, -12663911, -12065183, 4996454, -1256422, 1073572, 9583558, 12851107, 4003896, 12673717}, + FieldElement{-1731589, -15155870, -3262930, 16143082, 19294135, 13385325, 14741514, -9103726, 7903886, 2348101}, + FieldElement{24536016, -16515207, 12715592, -3862155, 1511293, 10047386, -3842346, -7129159, -28377538, 10048127}, + }, + }, + { + { + FieldElement{-12622226, -6204820, 30718825, 2591312, -10617028, 12192840, 18873298, -7297090, -32297756, 15221632}, + FieldElement{-26478122, -11103864, 11546244, -1852483, 9180880, 7656409, -21343950, 2095755, 29769758, 6593415}, + FieldElement{-31994208, -2907461, 4176912, 3264766, 12538965, -868111, 26312345, -6118678, 30958054, 8292160}, + }, + { + FieldElement{31429822, -13959116, 29173532, 15632448, 12174511, -2760094, 32808831, 3977186, 26143136, -3148876}, + FieldElement{22648901, 1402143, -22799984, 13746059, 7936347, 365344, -8668633, -1674433, -3758243, -2304625}, + FieldElement{-15491917, 8012313, -2514730, -12702462, -23965846, -10254029, -1612713, -1535569, -16664475, 8194478}, + }, + { + FieldElement{27338066, -7507420, -7414224, 10140405, -19026427, -6589889, 27277191, 8855376, 28572286, 3005164}, + FieldElement{26287124, 4821776, 25476601, -4145903, -3764513, -15788984, -18008582, 1182479, -26094821, -13079595}, + FieldElement{-7171154, 3178080, 23970071, 6201893, -17195577, -4489192, -21876275, -13982627, 32208683, -1198248}, + }, + { + FieldElement{-16657702, 2817643, -10286362, 14811298, 6024667, 13349505, -27315504, -10497842, -27672585, -11539858}, + FieldElement{15941029, -9405932, -21367050, 8062055, 31876073, -238629, -15278393, -1444429, 15397331, -4130193}, + FieldElement{8934485, -13485467, -23286397, -13423241, -32446090, 14047986, 31170398, -1441021, -27505566, 15087184}, + }, + { + FieldElement{-18357243, -2156491, 24524913, -16677868, 15520427, -6360776, -15502406, 11461896, 16788528, -5868942}, + FieldElement{-1947386, 16013773, 21750665, 3714552, -17401782, -16055433, -3770287, -10323320, 31322514, -11615635}, + FieldElement{21426655, -5650218, -13648287, -5347537, -28812189, -4920970, -18275391, -14621414, 13040862, -12112948}, + }, + { + FieldElement{11293895, 12478086, -27136401, 15083750, -29307421, 14748872, 14555558, -13417103, 1613711, 4896935}, + FieldElement{-25894883, 15323294, -8489791, -8057900, 25967126, -13425460, 2825960, -4897045, -23971776, -11267415}, + FieldElement{-15924766, -5229880, -17443532, 6410664, 3622847, 10243618, 20615400, 12405433, -23753030, -8436416}, + }, + { + FieldElement{-7091295, 12556208, -20191352, 9025187, -17072479, 4333801, 4378436, 2432030, 23097949, -566018}, + FieldElement{4565804, -16025654, 20084412, -7842817, 1724999, 189254, 24767264, 10103221, -18512313, 2424778}, + FieldElement{366633, -11976806, 8173090, -6890119, 30788634, 5745705, -7168678, 1344109, -3642553, 12412659}, + }, + { + FieldElement{-24001791, 7690286, 14929416, -168257, -32210835, -13412986, 24162697, -15326504, -3141501, 11179385}, + FieldElement{18289522, -14724954, 8056945, 16430056, -21729724, 7842514, -6001441, -1486897, -18684645, -11443503}, + FieldElement{476239, 6601091, -6152790, -9723375, 17503545, -4863900, 27672959, 13403813, 11052904, 5219329}, + }, + }, + { + { + FieldElement{20678546, -8375738, -32671898, 8849123, -5009758, 14574752, 31186971, -3973730, 9014762, -8579056}, + FieldElement{-13644050, -10350239, -15962508, 5075808, -1514661, -11534600, -33102500, 9160280, 8473550, -3256838}, + FieldElement{24900749, 14435722, 17209120, -15292541, -22592275, 9878983, -7689309, -16335821, -24568481, 11788948}, + }, + { + FieldElement{-3118155, -11395194, -13802089, 14797441, 9652448, -6845904, -20037437, 10410733, -24568470, -1458691}, + FieldElement{-15659161, 16736706, -22467150, 10215878, -9097177, 7563911, 11871841, -12505194, -18513325, 8464118}, + FieldElement{-23400612, 8348507, -14585951, -861714, -3950205, -6373419, 14325289, 8628612, 33313881, -8370517}, + }, + { + FieldElement{-20186973, -4967935, 22367356, 5271547, -1097117, -4788838, -24805667, -10236854, -8940735, -5818269}, + FieldElement{-6948785, -1795212, -32625683, -16021179, 32635414, -7374245, 15989197, -12838188, 28358192, -4253904}, + FieldElement{-23561781, -2799059, -32351682, -1661963, -9147719, 10429267, -16637684, 4072016, -5351664, 5596589}, + }, + { + FieldElement{-28236598, -3390048, 12312896, 6213178, 3117142, 16078565, 29266239, 2557221, 1768301, 15373193}, + FieldElement{-7243358, -3246960, -4593467, -7553353, -127927, -912245, -1090902, -4504991, -24660491, 3442910}, + FieldElement{-30210571, 5124043, 14181784, 8197961, 18964734, -11939093, 22597931, 7176455, -18585478, 13365930}, + }, + { + FieldElement{-7877390, -1499958, 8324673, 4690079, 6261860, 890446, 24538107, -8570186, -9689599, -3031667}, + FieldElement{25008904, -10771599, -4305031, -9638010, 16265036, 15721635, 683793, -11823784, 15723479, -15163481}, + FieldElement{-9660625, 12374379, -27006999, -7026148, -7724114, -12314514, 11879682, 5400171, 519526, -1235876}, + }, + { + FieldElement{22258397, -16332233, -7869817, 14613016, -22520255, -2950923, -20353881, 7315967, 16648397, 7605640}, + FieldElement{-8081308, -8464597, -8223311, 9719710, 19259459, -15348212, 23994942, -5281555, -9468848, 4763278}, + FieldElement{-21699244, 9220969, -15730624, 1084137, -25476107, -2852390, 31088447, -7764523, -11356529, 728112}, + }, + { + FieldElement{26047220, -11751471, -6900323, -16521798, 24092068, 9158119, -4273545, -12555558, -29365436, -5498272}, + FieldElement{17510331, -322857, 5854289, 8403524, 17133918, -3112612, -28111007, 12327945, 10750447, 10014012}, + FieldElement{-10312768, 3936952, 9156313, -8897683, 16498692, -994647, -27481051, -666732, 3424691, 7540221}, + }, + { + FieldElement{30322361, -6964110, 11361005, -4143317, 7433304, 4989748, -7071422, -16317219, -9244265, 15258046}, + FieldElement{13054562, -2779497, 19155474, 469045, -12482797, 4566042, 5631406, 2711395, 1062915, -5136345}, + FieldElement{-19240248, -11254599, -29509029, -7499965, -5835763, 13005411, -6066489, 12194497, 32960380, 1459310}, + }, + }, + { + { + FieldElement{19852034, 7027924, 23669353, 10020366, 8586503, -6657907, 394197, -6101885, 18638003, -11174937}, + FieldElement{31395534, 15098109, 26581030, 8030562, -16527914, -5007134, 9012486, -7584354, -6643087, -5442636}, + FieldElement{-9192165, -2347377, -1997099, 4529534, 25766844, 607986, -13222, 9677543, -32294889, -6456008}, + }, + { + FieldElement{-2444496, -149937, 29348902, 8186665, 1873760, 12489863, -30934579, -7839692, -7852844, -8138429}, + FieldElement{-15236356, -15433509, 7766470, 746860, 26346930, -10221762, -27333451, 10754588, -9431476, 5203576}, + FieldElement{31834314, 14135496, -770007, 5159118, 20917671, -16768096, -7467973, -7337524, 31809243, 7347066}, + }, + { + FieldElement{-9606723, -11874240, 20414459, 13033986, 13716524, -11691881, 19797970, -12211255, 15192876, -2087490}, + FieldElement{-12663563, -2181719, 1168162, -3804809, 26747877, -14138091, 10609330, 12694420, 33473243, -13382104}, + FieldElement{33184999, 11180355, 15832085, -11385430, -1633671, 225884, 15089336, -11023903, -6135662, 14480053}, + }, + { + FieldElement{31308717, -5619998, 31030840, -1897099, 15674547, -6582883, 5496208, 13685227, 27595050, 8737275}, + FieldElement{-20318852, -15150239, 10933843, -16178022, 8335352, -7546022, -31008351, -12610604, 26498114, 66511}, + FieldElement{22644454, -8761729, -16671776, 4884562, -3105614, -13559366, 30540766, -4286747, -13327787, -7515095}, + }, + { + FieldElement{-28017847, 9834845, 18617207, -2681312, -3401956, -13307506, 8205540, 13585437, -17127465, 15115439}, + FieldElement{23711543, -672915, 31206561, -8362711, 6164647, -9709987, -33535882, -1426096, 8236921, 16492939}, + FieldElement{-23910559, -13515526, -26299483, -4503841, 25005590, -7687270, 19574902, 10071562, 6708380, -6222424}, + }, + { + FieldElement{2101391, -4930054, 19702731, 2367575, -15427167, 1047675, 5301017, 9328700, 29955601, -11678310}, + FieldElement{3096359, 9271816, -21620864, -15521844, -14847996, -7592937, -25892142, -12635595, -9917575, 6216608}, + FieldElement{-32615849, 338663, -25195611, 2510422, -29213566, -13820213, 24822830, -6146567, -26767480, 7525079}, + }, + { + FieldElement{-23066649, -13985623, 16133487, -7896178, -3389565, 778788, -910336, -2782495, -19386633, 11994101}, + FieldElement{21691500, -13624626, -641331, -14367021, 3285881, -3483596, -25064666, 9718258, -7477437, 13381418}, + FieldElement{18445390, -4202236, 14979846, 11622458, -1727110, -3582980, 23111648, -6375247, 28535282, 15779576}, + }, + { + FieldElement{30098053, 3089662, -9234387, 16662135, -21306940, 11308411, -14068454, 12021730, 9955285, -16303356}, + FieldElement{9734894, -14576830, -7473633, -9138735, 2060392, 11313496, -18426029, 9924399, 20194861, 13380996}, + FieldElement{-26378102, -7965207, -22167821, 15789297, -18055342, -6168792, -1984914, 15707771, 26342023, 10146099}, + }, + }, + { + { + FieldElement{-26016874, -219943, 21339191, -41388, 19745256, -2878700, -29637280, 2227040, 21612326, -545728}, + FieldElement{-13077387, 1184228, 23562814, -5970442, -20351244, -6348714, 25764461, 12243797, -20856566, 11649658}, + FieldElement{-10031494, 11262626, 27384172, 2271902, 26947504, -15997771, 39944, 6114064, 33514190, 2333242}, + }, + { + FieldElement{-21433588, -12421821, 8119782, 7219913, -21830522, -9016134, -6679750, -12670638, 24350578, -13450001}, + FieldElement{-4116307, -11271533, -23886186, 4843615, -30088339, 690623, -31536088, -10406836, 8317860, 12352766}, + FieldElement{18200138, -14475911, -33087759, -2696619, -23702521, -9102511, -23552096, -2287550, 20712163, 6719373}, + }, + { + FieldElement{26656208, 6075253, -7858556, 1886072, -28344043, 4262326, 11117530, -3763210, 26224235, -3297458}, + FieldElement{-17168938, -14854097, -3395676, -16369877, -19954045, 14050420, 21728352, 9493610, 18620611, -16428628}, + FieldElement{-13323321, 13325349, 11432106, 5964811, 18609221, 6062965, -5269471, -9725556, -30701573, -16479657}, + }, + { + FieldElement{-23860538, -11233159, 26961357, 1640861, -32413112, -16737940, 12248509, -5240639, 13735342, 1934062}, + FieldElement{25089769, 6742589, 17081145, -13406266, 21909293, -16067981, -15136294, -3765346, -21277997, 5473616}, + FieldElement{31883677, -7961101, 1083432, -11572403, 22828471, 13290673, -7125085, 12469656, 29111212, -5451014}, + }, + { + FieldElement{24244947, -15050407, -26262976, 2791540, -14997599, 16666678, 24367466, 6388839, -10295587, 452383}, + FieldElement{-25640782, -3417841, 5217916, 16224624, 19987036, -4082269, -24236251, -5915248, 15766062, 8407814}, + FieldElement{-20406999, 13990231, 15495425, 16395525, 5377168, 15166495, -8917023, -4388953, -8067909, 2276718}, + }, + { + FieldElement{30157918, 12924066, -17712050, 9245753, 19895028, 3368142, -23827587, 5096219, 22740376, -7303417}, + FieldElement{2041139, -14256350, 7783687, 13876377, -25946985, -13352459, 24051124, 13742383, -15637599, 13295222}, + FieldElement{33338237, -8505733, 12532113, 7977527, 9106186, -1715251, -17720195, -4612972, -4451357, -14669444}, + }, + { + FieldElement{-20045281, 5454097, -14346548, 6447146, 28862071, 1883651, -2469266, -4141880, 7770569, 9620597}, + FieldElement{23208068, 7979712, 33071466, 8149229, 1758231, -10834995, 30945528, -1694323, -33502340, -14767970}, + FieldElement{1439958, -16270480, -1079989, -793782, 4625402, 10647766, -5043801, 1220118, 30494170, -11440799}, + }, + { + FieldElement{-5037580, -13028295, -2970559, -3061767, 15640974, -6701666, -26739026, 926050, -1684339, -13333647}, + FieldElement{13908495, -3549272, 30919928, -6273825, -21521863, 7989039, 9021034, 9078865, 3353509, 4033511}, + FieldElement{-29663431, -15113610, 32259991, -344482, 24295849, -12912123, 23161163, 8839127, 27485041, 7356032}, + }, + }, + { + { + FieldElement{9661027, 705443, 11980065, -5370154, -1628543, 14661173, -6346142, 2625015, 28431036, -16771834}, + FieldElement{-23839233, -8311415, -25945511, 7480958, -17681669, -8354183, -22545972, 14150565, 15970762, 4099461}, + FieldElement{29262576, 16756590, 26350592, -8793563, 8529671, -11208050, 13617293, -9937143, 11465739, 8317062}, + }, + { + FieldElement{-25493081, -6962928, 32500200, -9419051, -23038724, -2302222, 14898637, 3848455, 20969334, -5157516}, + FieldElement{-20384450, -14347713, -18336405, 13884722, -33039454, 2842114, -21610826, -3649888, 11177095, 14989547}, + FieldElement{-24496721, -11716016, 16959896, 2278463, 12066309, 10137771, 13515641, 2581286, -28487508, 9930240}, + }, + { + FieldElement{-17751622, -2097826, 16544300, -13009300, -15914807, -14949081, 18345767, -13403753, 16291481, -5314038}, + FieldElement{-33229194, 2553288, 32678213, 9875984, 8534129, 6889387, -9676774, 6957617, 4368891, 9788741}, + FieldElement{16660756, 7281060, -10830758, 12911820, 20108584, -8101676, -21722536, -8613148, 16250552, -11111103}, + }, + { + FieldElement{-19765507, 2390526, -16551031, 14161980, 1905286, 6414907, 4689584, 10604807, -30190403, 4782747}, + FieldElement{-1354539, 14736941, -7367442, -13292886, 7710542, -14155590, -9981571, 4383045, 22546403, 437323}, + FieldElement{31665577, -12180464, -16186830, 1491339, -18368625, 3294682, 27343084, 2786261, -30633590, -14097016}, + }, + { + FieldElement{-14467279, -683715, -33374107, 7448552, 19294360, 14334329, -19690631, 2355319, -19284671, -6114373}, + FieldElement{15121312, -15796162, 6377020, -6031361, -10798111, -12957845, 18952177, 15496498, -29380133, 11754228}, + FieldElement{-2637277, -13483075, 8488727, -14303896, 12728761, -1622493, 7141596, 11724556, 22761615, -10134141}, + }, + { + FieldElement{16918416, 11729663, -18083579, 3022987, -31015732, -13339659, -28741185, -12227393, 32851222, 11717399}, + FieldElement{11166634, 7338049, -6722523, 4531520, -29468672, -7302055, 31474879, 3483633, -1193175, -4030831}, + FieldElement{-185635, 9921305, 31456609, -13536438, -12013818, 13348923, 33142652, 6546660, -19985279, -3948376}, + }, + { + FieldElement{-32460596, 11266712, -11197107, -7899103, 31703694, 3855903, -8537131, -12833048, -30772034, -15486313}, + FieldElement{-18006477, 12709068, 3991746, -6479188, -21491523, -10550425, -31135347, -16049879, 10928917, 3011958}, + FieldElement{-6957757, -15594337, 31696059, 334240, 29576716, 14796075, -30831056, -12805180, 18008031, 10258577}, + }, + { + FieldElement{-22448644, 15655569, 7018479, -4410003, -30314266, -1201591, -1853465, 1367120, 25127874, 6671743}, + FieldElement{29701166, -14373934, -10878120, 9279288, -17568, 13127210, 21382910, 11042292, 25838796, 4642684}, + FieldElement{-20430234, 14955537, -24126347, 8124619, -5369288, -5990470, 30468147, -13900640, 18423289, 4177476}, + }, + }, +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/crypto/ed25519/internal/edwards25519/edwards25519.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/crypto/ed25519/internal/edwards25519/edwards25519.go new file mode 100644 index 000000000..5f8b99478 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/crypto/ed25519/internal/edwards25519/edwards25519.go @@ -0,0 +1,1771 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package edwards25519 + +// This code is a port of the public domain, “ref10” implementation of ed25519 +// from SUPERCOP. + +// FieldElement represents an element of the field GF(2^255 - 19). An element +// t, entries t[0]...t[9], represents the integer t[0]+2^26 t[1]+2^51 t[2]+2^77 +// t[3]+2^102 t[4]+...+2^230 t[9]. Bounds on each t[i] vary depending on +// context. +type FieldElement [10]int32 + +var zero FieldElement + +func FeZero(fe *FieldElement) { + copy(fe[:], zero[:]) +} + +func FeOne(fe *FieldElement) { + FeZero(fe) + fe[0] = 1 +} + +func FeAdd(dst, a, b *FieldElement) { + dst[0] = a[0] + b[0] + dst[1] = a[1] + b[1] + dst[2] = a[2] + b[2] + dst[3] = a[3] + b[3] + dst[4] = a[4] + b[4] + dst[5] = a[5] + b[5] + dst[6] = a[6] + b[6] + dst[7] = a[7] + b[7] + dst[8] = a[8] + b[8] + dst[9] = a[9] + b[9] +} + +func FeSub(dst, a, b *FieldElement) { + dst[0] = a[0] - b[0] + dst[1] = a[1] - b[1] + dst[2] = a[2] - b[2] + dst[3] = a[3] - b[3] + dst[4] = a[4] - b[4] + dst[5] = a[5] - b[5] + dst[6] = a[6] - b[6] + dst[7] = a[7] - b[7] + dst[8] = a[8] - b[8] + dst[9] = a[9] - b[9] +} + +func FeCopy(dst, src *FieldElement) { + copy(dst[:], src[:]) +} + +// Replace (f,g) with (g,g) if b == 1; +// replace (f,g) with (f,g) if b == 0. +// +// Preconditions: b in {0,1}. +func FeCMove(f, g *FieldElement, b int32) { + b = -b + f[0] ^= b & (f[0] ^ g[0]) + f[1] ^= b & (f[1] ^ g[1]) + f[2] ^= b & (f[2] ^ g[2]) + f[3] ^= b & (f[3] ^ g[3]) + f[4] ^= b & (f[4] ^ g[4]) + f[5] ^= b & (f[5] ^ g[5]) + f[6] ^= b & (f[6] ^ g[6]) + f[7] ^= b & (f[7] ^ g[7]) + f[8] ^= b & (f[8] ^ g[8]) + f[9] ^= b & (f[9] ^ g[9]) +} + +func load3(in []byte) int64 { + var r int64 + r = int64(in[0]) + r |= int64(in[1]) << 8 + r |= int64(in[2]) << 16 + return r +} + +func load4(in []byte) int64 { + var r int64 + r = int64(in[0]) + r |= int64(in[1]) << 8 + r |= int64(in[2]) << 16 + r |= int64(in[3]) << 24 + return r +} + +func FeFromBytes(dst *FieldElement, src *[32]byte) { + h0 := load4(src[:]) + h1 := load3(src[4:]) << 6 + h2 := load3(src[7:]) << 5 + h3 := load3(src[10:]) << 3 + h4 := load3(src[13:]) << 2 + h5 := load4(src[16:]) + h6 := load3(src[20:]) << 7 + h7 := load3(src[23:]) << 5 + h8 := load3(src[26:]) << 4 + h9 := (load3(src[29:]) & 8388607) << 2 + + FeCombine(dst, h0, h1, h2, h3, h4, h5, h6, h7, h8, h9) +} + +// FeToBytes marshals h to s. +// Preconditions: +// |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. +// +// Write p=2^255-19; q=floor(h/p). +// Basic claim: q = floor(2^(-255)(h + 19 2^(-25)h9 + 2^(-1))). +// +// Proof: +// Have |h|<=p so |q|<=1 so |19^2 2^(-255) q|<1/4. +// Also have |h-2^230 h9|<2^230 so |19 2^(-255)(h-2^230 h9)|<1/4. +// +// Write y=2^(-1)-19^2 2^(-255)q-19 2^(-255)(h-2^230 h9). +// Then 0> 25 + q = (h[0] + q) >> 26 + q = (h[1] + q) >> 25 + q = (h[2] + q) >> 26 + q = (h[3] + q) >> 25 + q = (h[4] + q) >> 26 + q = (h[5] + q) >> 25 + q = (h[6] + q) >> 26 + q = (h[7] + q) >> 25 + q = (h[8] + q) >> 26 + q = (h[9] + q) >> 25 + + // Goal: Output h-(2^255-19)q, which is between 0 and 2^255-20. + h[0] += 19 * q + // Goal: Output h-2^255 q, which is between 0 and 2^255-20. + + carry[0] = h[0] >> 26 + h[1] += carry[0] + h[0] -= carry[0] << 26 + carry[1] = h[1] >> 25 + h[2] += carry[1] + h[1] -= carry[1] << 25 + carry[2] = h[2] >> 26 + h[3] += carry[2] + h[2] -= carry[2] << 26 + carry[3] = h[3] >> 25 + h[4] += carry[3] + h[3] -= carry[3] << 25 + carry[4] = h[4] >> 26 + h[5] += carry[4] + h[4] -= carry[4] << 26 + carry[5] = h[5] >> 25 + h[6] += carry[5] + h[5] -= carry[5] << 25 + carry[6] = h[6] >> 26 + h[7] += carry[6] + h[6] -= carry[6] << 26 + carry[7] = h[7] >> 25 + h[8] += carry[7] + h[7] -= carry[7] << 25 + carry[8] = h[8] >> 26 + h[9] += carry[8] + h[8] -= carry[8] << 26 + carry[9] = h[9] >> 25 + h[9] -= carry[9] << 25 + // h10 = carry9 + + // Goal: Output h[0]+...+2^255 h10-2^255 q, which is between 0 and 2^255-20. + // Have h[0]+...+2^230 h[9] between 0 and 2^255-1; + // evidently 2^255 h10-2^255 q = 0. + // Goal: Output h[0]+...+2^230 h[9]. + + s[0] = byte(h[0] >> 0) + s[1] = byte(h[0] >> 8) + s[2] = byte(h[0] >> 16) + s[3] = byte((h[0] >> 24) | (h[1] << 2)) + s[4] = byte(h[1] >> 6) + s[5] = byte(h[1] >> 14) + s[6] = byte((h[1] >> 22) | (h[2] << 3)) + s[7] = byte(h[2] >> 5) + s[8] = byte(h[2] >> 13) + s[9] = byte((h[2] >> 21) | (h[3] << 5)) + s[10] = byte(h[3] >> 3) + s[11] = byte(h[3] >> 11) + s[12] = byte((h[3] >> 19) | (h[4] << 6)) + s[13] = byte(h[4] >> 2) + s[14] = byte(h[4] >> 10) + s[15] = byte(h[4] >> 18) + s[16] = byte(h[5] >> 0) + s[17] = byte(h[5] >> 8) + s[18] = byte(h[5] >> 16) + s[19] = byte((h[5] >> 24) | (h[6] << 1)) + s[20] = byte(h[6] >> 7) + s[21] = byte(h[6] >> 15) + s[22] = byte((h[6] >> 23) | (h[7] << 3)) + s[23] = byte(h[7] >> 5) + s[24] = byte(h[7] >> 13) + s[25] = byte((h[7] >> 21) | (h[8] << 4)) + s[26] = byte(h[8] >> 4) + s[27] = byte(h[8] >> 12) + s[28] = byte((h[8] >> 20) | (h[9] << 6)) + s[29] = byte(h[9] >> 2) + s[30] = byte(h[9] >> 10) + s[31] = byte(h[9] >> 18) +} + +func FeIsNegative(f *FieldElement) byte { + var s [32]byte + FeToBytes(&s, f) + return s[0] & 1 +} + +func FeIsNonZero(f *FieldElement) int32 { + var s [32]byte + FeToBytes(&s, f) + var x uint8 + for _, b := range s { + x |= b + } + x |= x >> 4 + x |= x >> 2 + x |= x >> 1 + return int32(x & 1) +} + +// FeNeg sets h = -f +// +// Preconditions: +// |f| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. +// +// Postconditions: +// |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. +func FeNeg(h, f *FieldElement) { + h[0] = -f[0] + h[1] = -f[1] + h[2] = -f[2] + h[3] = -f[3] + h[4] = -f[4] + h[5] = -f[5] + h[6] = -f[6] + h[7] = -f[7] + h[8] = -f[8] + h[9] = -f[9] +} + +func FeCombine(h *FieldElement, h0, h1, h2, h3, h4, h5, h6, h7, h8, h9 int64) { + var c0, c1, c2, c3, c4, c5, c6, c7, c8, c9 int64 + + /* + |h0| <= (1.1*1.1*2^52*(1+19+19+19+19)+1.1*1.1*2^50*(38+38+38+38+38)) + i.e. |h0| <= 1.2*2^59; narrower ranges for h2, h4, h6, h8 + |h1| <= (1.1*1.1*2^51*(1+1+19+19+19+19+19+19+19+19)) + i.e. |h1| <= 1.5*2^58; narrower ranges for h3, h5, h7, h9 + */ + + c0 = (h0 + (1 << 25)) >> 26 + h1 += c0 + h0 -= c0 << 26 + c4 = (h4 + (1 << 25)) >> 26 + h5 += c4 + h4 -= c4 << 26 + /* |h0| <= 2^25 */ + /* |h4| <= 2^25 */ + /* |h1| <= 1.51*2^58 */ + /* |h5| <= 1.51*2^58 */ + + c1 = (h1 + (1 << 24)) >> 25 + h2 += c1 + h1 -= c1 << 25 + c5 = (h5 + (1 << 24)) >> 25 + h6 += c5 + h5 -= c5 << 25 + /* |h1| <= 2^24; from now on fits into int32 */ + /* |h5| <= 2^24; from now on fits into int32 */ + /* |h2| <= 1.21*2^59 */ + /* |h6| <= 1.21*2^59 */ + + c2 = (h2 + (1 << 25)) >> 26 + h3 += c2 + h2 -= c2 << 26 + c6 = (h6 + (1 << 25)) >> 26 + h7 += c6 + h6 -= c6 << 26 + /* |h2| <= 2^25; from now on fits into int32 unchanged */ + /* |h6| <= 2^25; from now on fits into int32 unchanged */ + /* |h3| <= 1.51*2^58 */ + /* |h7| <= 1.51*2^58 */ + + c3 = (h3 + (1 << 24)) >> 25 + h4 += c3 + h3 -= c3 << 25 + c7 = (h7 + (1 << 24)) >> 25 + h8 += c7 + h7 -= c7 << 25 + /* |h3| <= 2^24; from now on fits into int32 unchanged */ + /* |h7| <= 2^24; from now on fits into int32 unchanged */ + /* |h4| <= 1.52*2^33 */ + /* |h8| <= 1.52*2^33 */ + + c4 = (h4 + (1 << 25)) >> 26 + h5 += c4 + h4 -= c4 << 26 + c8 = (h8 + (1 << 25)) >> 26 + h9 += c8 + h8 -= c8 << 26 + /* |h4| <= 2^25; from now on fits into int32 unchanged */ + /* |h8| <= 2^25; from now on fits into int32 unchanged */ + /* |h5| <= 1.01*2^24 */ + /* |h9| <= 1.51*2^58 */ + + c9 = (h9 + (1 << 24)) >> 25 + h0 += c9 * 19 + h9 -= c9 << 25 + /* |h9| <= 2^24; from now on fits into int32 unchanged */ + /* |h0| <= 1.8*2^37 */ + + c0 = (h0 + (1 << 25)) >> 26 + h1 += c0 + h0 -= c0 << 26 + /* |h0| <= 2^25; from now on fits into int32 unchanged */ + /* |h1| <= 1.01*2^24 */ + + h[0] = int32(h0) + h[1] = int32(h1) + h[2] = int32(h2) + h[3] = int32(h3) + h[4] = int32(h4) + h[5] = int32(h5) + h[6] = int32(h6) + h[7] = int32(h7) + h[8] = int32(h8) + h[9] = int32(h9) +} + +// FeMul calculates h = f * g +// Can overlap h with f or g. +// +// Preconditions: +// |f| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc. +// |g| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc. +// +// Postconditions: +// |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. +// +// Notes on implementation strategy: +// +// Using schoolbook multiplication. +// Karatsuba would save a little in some cost models. +// +// Most multiplications by 2 and 19 are 32-bit precomputations; +// cheaper than 64-bit postcomputations. +// +// There is one remaining multiplication by 19 in the carry chain; +// one *19 precomputation can be merged into this, +// but the resulting data flow is considerably less clean. +// +// There are 12 carries below. +// 10 of them are 2-way parallelizable and vectorizable. +// Can get away with 11 carries, but then data flow is much deeper. +// +// With tighter constraints on inputs, can squeeze carries into int32. +func FeMul(h, f, g *FieldElement) { + f0 := int64(f[0]) + f1 := int64(f[1]) + f2 := int64(f[2]) + f3 := int64(f[3]) + f4 := int64(f[4]) + f5 := int64(f[5]) + f6 := int64(f[6]) + f7 := int64(f[7]) + f8 := int64(f[8]) + f9 := int64(f[9]) + + f1_2 := int64(2 * f[1]) + f3_2 := int64(2 * f[3]) + f5_2 := int64(2 * f[5]) + f7_2 := int64(2 * f[7]) + f9_2 := int64(2 * f[9]) + + g0 := int64(g[0]) + g1 := int64(g[1]) + g2 := int64(g[2]) + g3 := int64(g[3]) + g4 := int64(g[4]) + g5 := int64(g[5]) + g6 := int64(g[6]) + g7 := int64(g[7]) + g8 := int64(g[8]) + g9 := int64(g[9]) + + g1_19 := int64(19 * g[1]) /* 1.4*2^29 */ + g2_19 := int64(19 * g[2]) /* 1.4*2^30; still ok */ + g3_19 := int64(19 * g[3]) + g4_19 := int64(19 * g[4]) + g5_19 := int64(19 * g[5]) + g6_19 := int64(19 * g[6]) + g7_19 := int64(19 * g[7]) + g8_19 := int64(19 * g[8]) + g9_19 := int64(19 * g[9]) + + h0 := f0*g0 + f1_2*g9_19 + f2*g8_19 + f3_2*g7_19 + f4*g6_19 + f5_2*g5_19 + f6*g4_19 + f7_2*g3_19 + f8*g2_19 + f9_2*g1_19 + h1 := f0*g1 + f1*g0 + f2*g9_19 + f3*g8_19 + f4*g7_19 + f5*g6_19 + f6*g5_19 + f7*g4_19 + f8*g3_19 + f9*g2_19 + h2 := f0*g2 + f1_2*g1 + f2*g0 + f3_2*g9_19 + f4*g8_19 + f5_2*g7_19 + f6*g6_19 + f7_2*g5_19 + f8*g4_19 + f9_2*g3_19 + h3 := f0*g3 + f1*g2 + f2*g1 + f3*g0 + f4*g9_19 + f5*g8_19 + f6*g7_19 + f7*g6_19 + f8*g5_19 + f9*g4_19 + h4 := f0*g4 + f1_2*g3 + f2*g2 + f3_2*g1 + f4*g0 + f5_2*g9_19 + f6*g8_19 + f7_2*g7_19 + f8*g6_19 + f9_2*g5_19 + h5 := f0*g5 + f1*g4 + f2*g3 + f3*g2 + f4*g1 + f5*g0 + f6*g9_19 + f7*g8_19 + f8*g7_19 + f9*g6_19 + h6 := f0*g6 + f1_2*g5 + f2*g4 + f3_2*g3 + f4*g2 + f5_2*g1 + f6*g0 + f7_2*g9_19 + f8*g8_19 + f9_2*g7_19 + h7 := f0*g7 + f1*g6 + f2*g5 + f3*g4 + f4*g3 + f5*g2 + f6*g1 + f7*g0 + f8*g9_19 + f9*g8_19 + h8 := f0*g8 + f1_2*g7 + f2*g6 + f3_2*g5 + f4*g4 + f5_2*g3 + f6*g2 + f7_2*g1 + f8*g0 + f9_2*g9_19 + h9 := f0*g9 + f1*g8 + f2*g7 + f3*g6 + f4*g5 + f5*g4 + f6*g3 + f7*g2 + f8*g1 + f9*g0 + + FeCombine(h, h0, h1, h2, h3, h4, h5, h6, h7, h8, h9) +} + +func feSquare(f *FieldElement) (h0, h1, h2, h3, h4, h5, h6, h7, h8, h9 int64) { + f0 := int64(f[0]) + f1 := int64(f[1]) + f2 := int64(f[2]) + f3 := int64(f[3]) + f4 := int64(f[4]) + f5 := int64(f[5]) + f6 := int64(f[6]) + f7 := int64(f[7]) + f8 := int64(f[8]) + f9 := int64(f[9]) + f0_2 := int64(2 * f[0]) + f1_2 := int64(2 * f[1]) + f2_2 := int64(2 * f[2]) + f3_2 := int64(2 * f[3]) + f4_2 := int64(2 * f[4]) + f5_2 := int64(2 * f[5]) + f6_2 := int64(2 * f[6]) + f7_2 := int64(2 * f[7]) + f5_38 := 38 * f5 // 1.31*2^30 + f6_19 := 19 * f6 // 1.31*2^30 + f7_38 := 38 * f7 // 1.31*2^30 + f8_19 := 19 * f8 // 1.31*2^30 + f9_38 := 38 * f9 // 1.31*2^30 + + h0 = f0*f0 + f1_2*f9_38 + f2_2*f8_19 + f3_2*f7_38 + f4_2*f6_19 + f5*f5_38 + h1 = f0_2*f1 + f2*f9_38 + f3_2*f8_19 + f4*f7_38 + f5_2*f6_19 + h2 = f0_2*f2 + f1_2*f1 + f3_2*f9_38 + f4_2*f8_19 + f5_2*f7_38 + f6*f6_19 + h3 = f0_2*f3 + f1_2*f2 + f4*f9_38 + f5_2*f8_19 + f6*f7_38 + h4 = f0_2*f4 + f1_2*f3_2 + f2*f2 + f5_2*f9_38 + f6_2*f8_19 + f7*f7_38 + h5 = f0_2*f5 + f1_2*f4 + f2_2*f3 + f6*f9_38 + f7_2*f8_19 + h6 = f0_2*f6 + f1_2*f5_2 + f2_2*f4 + f3_2*f3 + f7_2*f9_38 + f8*f8_19 + h7 = f0_2*f7 + f1_2*f6 + f2_2*f5 + f3_2*f4 + f8*f9_38 + h8 = f0_2*f8 + f1_2*f7_2 + f2_2*f6 + f3_2*f5_2 + f4*f4 + f9*f9_38 + h9 = f0_2*f9 + f1_2*f8 + f2_2*f7 + f3_2*f6 + f4_2*f5 + + return +} + +// FeSquare calculates h = f*f. Can overlap h with f. +// +// Preconditions: +// |f| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc. +// +// Postconditions: +// |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. +func FeSquare(h, f *FieldElement) { + h0, h1, h2, h3, h4, h5, h6, h7, h8, h9 := feSquare(f) + FeCombine(h, h0, h1, h2, h3, h4, h5, h6, h7, h8, h9) +} + +// FeSquare2 sets h = 2 * f * f +// +// Can overlap h with f. +// +// Preconditions: +// |f| bounded by 1.65*2^26,1.65*2^25,1.65*2^26,1.65*2^25,etc. +// +// Postconditions: +// |h| bounded by 1.01*2^25,1.01*2^24,1.01*2^25,1.01*2^24,etc. +// See fe_mul.c for discussion of implementation strategy. +func FeSquare2(h, f *FieldElement) { + h0, h1, h2, h3, h4, h5, h6, h7, h8, h9 := feSquare(f) + + h0 += h0 + h1 += h1 + h2 += h2 + h3 += h3 + h4 += h4 + h5 += h5 + h6 += h6 + h7 += h7 + h8 += h8 + h9 += h9 + + FeCombine(h, h0, h1, h2, h3, h4, h5, h6, h7, h8, h9) +} + +func FeInvert(out, z *FieldElement) { + var t0, t1, t2, t3 FieldElement + var i int + + FeSquare(&t0, z) // 2^1 + FeSquare(&t1, &t0) // 2^2 + for i = 1; i < 2; i++ { // 2^3 + FeSquare(&t1, &t1) + } + FeMul(&t1, z, &t1) // 2^3 + 2^0 + FeMul(&t0, &t0, &t1) // 2^3 + 2^1 + 2^0 + FeSquare(&t2, &t0) // 2^4 + 2^2 + 2^1 + FeMul(&t1, &t1, &t2) // 2^4 + 2^3 + 2^2 + 2^1 + 2^0 + FeSquare(&t2, &t1) // 5,4,3,2,1 + for i = 1; i < 5; i++ { // 9,8,7,6,5 + FeSquare(&t2, &t2) + } + FeMul(&t1, &t2, &t1) // 9,8,7,6,5,4,3,2,1,0 + FeSquare(&t2, &t1) // 10..1 + for i = 1; i < 10; i++ { // 19..10 + FeSquare(&t2, &t2) + } + FeMul(&t2, &t2, &t1) // 19..0 + FeSquare(&t3, &t2) // 20..1 + for i = 1; i < 20; i++ { // 39..20 + FeSquare(&t3, &t3) + } + FeMul(&t2, &t3, &t2) // 39..0 + FeSquare(&t2, &t2) // 40..1 + for i = 1; i < 10; i++ { // 49..10 + FeSquare(&t2, &t2) + } + FeMul(&t1, &t2, &t1) // 49..0 + FeSquare(&t2, &t1) // 50..1 + for i = 1; i < 50; i++ { // 99..50 + FeSquare(&t2, &t2) + } + FeMul(&t2, &t2, &t1) // 99..0 + FeSquare(&t3, &t2) // 100..1 + for i = 1; i < 100; i++ { // 199..100 + FeSquare(&t3, &t3) + } + FeMul(&t2, &t3, &t2) // 199..0 + FeSquare(&t2, &t2) // 200..1 + for i = 1; i < 50; i++ { // 249..50 + FeSquare(&t2, &t2) + } + FeMul(&t1, &t2, &t1) // 249..0 + FeSquare(&t1, &t1) // 250..1 + for i = 1; i < 5; i++ { // 254..5 + FeSquare(&t1, &t1) + } + FeMul(out, &t1, &t0) // 254..5,3,1,0 +} + +func fePow22523(out, z *FieldElement) { + var t0, t1, t2 FieldElement + var i int + + FeSquare(&t0, z) + for i = 1; i < 1; i++ { + FeSquare(&t0, &t0) + } + FeSquare(&t1, &t0) + for i = 1; i < 2; i++ { + FeSquare(&t1, &t1) + } + FeMul(&t1, z, &t1) + FeMul(&t0, &t0, &t1) + FeSquare(&t0, &t0) + for i = 1; i < 1; i++ { + FeSquare(&t0, &t0) + } + FeMul(&t0, &t1, &t0) + FeSquare(&t1, &t0) + for i = 1; i < 5; i++ { + FeSquare(&t1, &t1) + } + FeMul(&t0, &t1, &t0) + FeSquare(&t1, &t0) + for i = 1; i < 10; i++ { + FeSquare(&t1, &t1) + } + FeMul(&t1, &t1, &t0) + FeSquare(&t2, &t1) + for i = 1; i < 20; i++ { + FeSquare(&t2, &t2) + } + FeMul(&t1, &t2, &t1) + FeSquare(&t1, &t1) + for i = 1; i < 10; i++ { + FeSquare(&t1, &t1) + } + FeMul(&t0, &t1, &t0) + FeSquare(&t1, &t0) + for i = 1; i < 50; i++ { + FeSquare(&t1, &t1) + } + FeMul(&t1, &t1, &t0) + FeSquare(&t2, &t1) + for i = 1; i < 100; i++ { + FeSquare(&t2, &t2) + } + FeMul(&t1, &t2, &t1) + FeSquare(&t1, &t1) + for i = 1; i < 50; i++ { + FeSquare(&t1, &t1) + } + FeMul(&t0, &t1, &t0) + FeSquare(&t0, &t0) + for i = 1; i < 2; i++ { + FeSquare(&t0, &t0) + } + FeMul(out, &t0, z) +} + +// Group elements are members of the elliptic curve -x^2 + y^2 = 1 + d * x^2 * +// y^2 where d = -121665/121666. +// +// Several representations are used: +// ProjectiveGroupElement: (X:Y:Z) satisfying x=X/Z, y=Y/Z +// ExtendedGroupElement: (X:Y:Z:T) satisfying x=X/Z, y=Y/Z, XY=ZT +// CompletedGroupElement: ((X:Z),(Y:T)) satisfying x=X/Z, y=Y/T +// PreComputedGroupElement: (y+x,y-x,2dxy) + +type ProjectiveGroupElement struct { + X, Y, Z FieldElement +} + +type ExtendedGroupElement struct { + X, Y, Z, T FieldElement +} + +type CompletedGroupElement struct { + X, Y, Z, T FieldElement +} + +type PreComputedGroupElement struct { + yPlusX, yMinusX, xy2d FieldElement +} + +type CachedGroupElement struct { + yPlusX, yMinusX, Z, T2d FieldElement +} + +func (p *ProjectiveGroupElement) Zero() { + FeZero(&p.X) + FeOne(&p.Y) + FeOne(&p.Z) +} + +func (p *ProjectiveGroupElement) Double(r *CompletedGroupElement) { + var t0 FieldElement + + FeSquare(&r.X, &p.X) + FeSquare(&r.Z, &p.Y) + FeSquare2(&r.T, &p.Z) + FeAdd(&r.Y, &p.X, &p.Y) + FeSquare(&t0, &r.Y) + FeAdd(&r.Y, &r.Z, &r.X) + FeSub(&r.Z, &r.Z, &r.X) + FeSub(&r.X, &t0, &r.Y) + FeSub(&r.T, &r.T, &r.Z) +} + +func (p *ProjectiveGroupElement) ToBytes(s *[32]byte) { + var recip, x, y FieldElement + + FeInvert(&recip, &p.Z) + FeMul(&x, &p.X, &recip) + FeMul(&y, &p.Y, &recip) + FeToBytes(s, &y) + s[31] ^= FeIsNegative(&x) << 7 +} + +func (p *ExtendedGroupElement) Zero() { + FeZero(&p.X) + FeOne(&p.Y) + FeOne(&p.Z) + FeZero(&p.T) +} + +func (p *ExtendedGroupElement) Double(r *CompletedGroupElement) { + var q ProjectiveGroupElement + p.ToProjective(&q) + q.Double(r) +} + +func (p *ExtendedGroupElement) ToCached(r *CachedGroupElement) { + FeAdd(&r.yPlusX, &p.Y, &p.X) + FeSub(&r.yMinusX, &p.Y, &p.X) + FeCopy(&r.Z, &p.Z) + FeMul(&r.T2d, &p.T, &d2) +} + +func (p *ExtendedGroupElement) ToProjective(r *ProjectiveGroupElement) { + FeCopy(&r.X, &p.X) + FeCopy(&r.Y, &p.Y) + FeCopy(&r.Z, &p.Z) +} + +func (p *ExtendedGroupElement) ToBytes(s *[32]byte) { + var recip, x, y FieldElement + + FeInvert(&recip, &p.Z) + FeMul(&x, &p.X, &recip) + FeMul(&y, &p.Y, &recip) + FeToBytes(s, &y) + s[31] ^= FeIsNegative(&x) << 7 +} + +func (p *ExtendedGroupElement) FromBytes(s *[32]byte) bool { + var u, v, v3, vxx, check FieldElement + + FeFromBytes(&p.Y, s) + FeOne(&p.Z) + FeSquare(&u, &p.Y) + FeMul(&v, &u, &d) + FeSub(&u, &u, &p.Z) // y = y^2-1 + FeAdd(&v, &v, &p.Z) // v = dy^2+1 + + FeSquare(&v3, &v) + FeMul(&v3, &v3, &v) // v3 = v^3 + FeSquare(&p.X, &v3) + FeMul(&p.X, &p.X, &v) + FeMul(&p.X, &p.X, &u) // x = uv^7 + + fePow22523(&p.X, &p.X) // x = (uv^7)^((q-5)/8) + FeMul(&p.X, &p.X, &v3) + FeMul(&p.X, &p.X, &u) // x = uv^3(uv^7)^((q-5)/8) + + var tmpX, tmp2 [32]byte + + FeSquare(&vxx, &p.X) + FeMul(&vxx, &vxx, &v) + FeSub(&check, &vxx, &u) // vx^2-u + if FeIsNonZero(&check) == 1 { + FeAdd(&check, &vxx, &u) // vx^2+u + if FeIsNonZero(&check) == 1 { + return false + } + FeMul(&p.X, &p.X, &SqrtM1) + + FeToBytes(&tmpX, &p.X) + for i, v := range tmpX { + tmp2[31-i] = v + } + } + + if FeIsNegative(&p.X) != (s[31] >> 7) { + FeNeg(&p.X, &p.X) + } + + FeMul(&p.T, &p.X, &p.Y) + return true +} + +func (p *CompletedGroupElement) ToProjective(r *ProjectiveGroupElement) { + FeMul(&r.X, &p.X, &p.T) + FeMul(&r.Y, &p.Y, &p.Z) + FeMul(&r.Z, &p.Z, &p.T) +} + +func (p *CompletedGroupElement) ToExtended(r *ExtendedGroupElement) { + FeMul(&r.X, &p.X, &p.T) + FeMul(&r.Y, &p.Y, &p.Z) + FeMul(&r.Z, &p.Z, &p.T) + FeMul(&r.T, &p.X, &p.Y) +} + +func (p *PreComputedGroupElement) Zero() { + FeOne(&p.yPlusX) + FeOne(&p.yMinusX) + FeZero(&p.xy2d) +} + +func geAdd(r *CompletedGroupElement, p *ExtendedGroupElement, q *CachedGroupElement) { + var t0 FieldElement + + FeAdd(&r.X, &p.Y, &p.X) + FeSub(&r.Y, &p.Y, &p.X) + FeMul(&r.Z, &r.X, &q.yPlusX) + FeMul(&r.Y, &r.Y, &q.yMinusX) + FeMul(&r.T, &q.T2d, &p.T) + FeMul(&r.X, &p.Z, &q.Z) + FeAdd(&t0, &r.X, &r.X) + FeSub(&r.X, &r.Z, &r.Y) + FeAdd(&r.Y, &r.Z, &r.Y) + FeAdd(&r.Z, &t0, &r.T) + FeSub(&r.T, &t0, &r.T) +} + +func geSub(r *CompletedGroupElement, p *ExtendedGroupElement, q *CachedGroupElement) { + var t0 FieldElement + + FeAdd(&r.X, &p.Y, &p.X) + FeSub(&r.Y, &p.Y, &p.X) + FeMul(&r.Z, &r.X, &q.yMinusX) + FeMul(&r.Y, &r.Y, &q.yPlusX) + FeMul(&r.T, &q.T2d, &p.T) + FeMul(&r.X, &p.Z, &q.Z) + FeAdd(&t0, &r.X, &r.X) + FeSub(&r.X, &r.Z, &r.Y) + FeAdd(&r.Y, &r.Z, &r.Y) + FeSub(&r.Z, &t0, &r.T) + FeAdd(&r.T, &t0, &r.T) +} + +func geMixedAdd(r *CompletedGroupElement, p *ExtendedGroupElement, q *PreComputedGroupElement) { + var t0 FieldElement + + FeAdd(&r.X, &p.Y, &p.X) + FeSub(&r.Y, &p.Y, &p.X) + FeMul(&r.Z, &r.X, &q.yPlusX) + FeMul(&r.Y, &r.Y, &q.yMinusX) + FeMul(&r.T, &q.xy2d, &p.T) + FeAdd(&t0, &p.Z, &p.Z) + FeSub(&r.X, &r.Z, &r.Y) + FeAdd(&r.Y, &r.Z, &r.Y) + FeAdd(&r.Z, &t0, &r.T) + FeSub(&r.T, &t0, &r.T) +} + +func geMixedSub(r *CompletedGroupElement, p *ExtendedGroupElement, q *PreComputedGroupElement) { + var t0 FieldElement + + FeAdd(&r.X, &p.Y, &p.X) + FeSub(&r.Y, &p.Y, &p.X) + FeMul(&r.Z, &r.X, &q.yMinusX) + FeMul(&r.Y, &r.Y, &q.yPlusX) + FeMul(&r.T, &q.xy2d, &p.T) + FeAdd(&t0, &p.Z, &p.Z) + FeSub(&r.X, &r.Z, &r.Y) + FeAdd(&r.Y, &r.Z, &r.Y) + FeSub(&r.Z, &t0, &r.T) + FeAdd(&r.T, &t0, &r.T) +} + +func slide(r *[256]int8, a *[32]byte) { + for i := range r { + r[i] = int8(1 & (a[i>>3] >> uint(i&7))) + } + + for i := range r { + if r[i] != 0 { + for b := 1; b <= 6 && i+b < 256; b++ { + if r[i+b] != 0 { + if r[i]+(r[i+b]<= -15 { + r[i] -= r[i+b] << uint(b) + for k := i + b; k < 256; k++ { + if r[k] == 0 { + r[k] = 1 + break + } + r[k] = 0 + } + } else { + break + } + } + } + } + } +} + +// GeDoubleScalarMultVartime sets r = a*A + b*B +// where a = a[0]+256*a[1]+...+256^31 a[31]. +// and b = b[0]+256*b[1]+...+256^31 b[31]. +// B is the Ed25519 base point (x,4/5) with x positive. +func GeDoubleScalarMultVartime(r *ProjectiveGroupElement, a *[32]byte, A *ExtendedGroupElement, b *[32]byte) { + var aSlide, bSlide [256]int8 + var Ai [8]CachedGroupElement // A,3A,5A,7A,9A,11A,13A,15A + var t CompletedGroupElement + var u, A2 ExtendedGroupElement + var i int + + slide(&aSlide, a) + slide(&bSlide, b) + + A.ToCached(&Ai[0]) + A.Double(&t) + t.ToExtended(&A2) + + for i := 0; i < 7; i++ { + geAdd(&t, &A2, &Ai[i]) + t.ToExtended(&u) + u.ToCached(&Ai[i+1]) + } + + r.Zero() + + for i = 255; i >= 0; i-- { + if aSlide[i] != 0 || bSlide[i] != 0 { + break + } + } + + for ; i >= 0; i-- { + r.Double(&t) + + if aSlide[i] > 0 { + t.ToExtended(&u) + geAdd(&t, &u, &Ai[aSlide[i]/2]) + } else if aSlide[i] < 0 { + t.ToExtended(&u) + geSub(&t, &u, &Ai[(-aSlide[i])/2]) + } + + if bSlide[i] > 0 { + t.ToExtended(&u) + geMixedAdd(&t, &u, &bi[bSlide[i]/2]) + } else if bSlide[i] < 0 { + t.ToExtended(&u) + geMixedSub(&t, &u, &bi[(-bSlide[i])/2]) + } + + t.ToProjective(r) + } +} + +// equal returns 1 if b == c and 0 otherwise, assuming that b and c are +// non-negative. +func equal(b, c int32) int32 { + x := uint32(b ^ c) + x-- + return int32(x >> 31) +} + +// negative returns 1 if b < 0 and 0 otherwise. +func negative(b int32) int32 { + return (b >> 31) & 1 +} + +func PreComputedGroupElementCMove(t, u *PreComputedGroupElement, b int32) { + FeCMove(&t.yPlusX, &u.yPlusX, b) + FeCMove(&t.yMinusX, &u.yMinusX, b) + FeCMove(&t.xy2d, &u.xy2d, b) +} + +func selectPoint(t *PreComputedGroupElement, pos int32, b int32) { + var minusT PreComputedGroupElement + bNegative := negative(b) + bAbs := b - (((-bNegative) & b) << 1) + + t.Zero() + for i := int32(0); i < 8; i++ { + PreComputedGroupElementCMove(t, &base[pos][i], equal(bAbs, i+1)) + } + FeCopy(&minusT.yPlusX, &t.yMinusX) + FeCopy(&minusT.yMinusX, &t.yPlusX) + FeNeg(&minusT.xy2d, &t.xy2d) + PreComputedGroupElementCMove(t, &minusT, bNegative) +} + +// GeScalarMultBase computes h = a*B, where +// a = a[0]+256*a[1]+...+256^31 a[31] +// B is the Ed25519 base point (x,4/5) with x positive. +// +// Preconditions: +// a[31] <= 127 +func GeScalarMultBase(h *ExtendedGroupElement, a *[32]byte) { + var e [64]int8 + + for i, v := range a { + e[2*i] = int8(v & 15) + e[2*i+1] = int8((v >> 4) & 15) + } + + // each e[i] is between 0 and 15 and e[63] is between 0 and 7. + + carry := int8(0) + for i := 0; i < 63; i++ { + e[i] += carry + carry = (e[i] + 8) >> 4 + e[i] -= carry << 4 + } + e[63] += carry + // each e[i] is between -8 and 8. + + h.Zero() + var t PreComputedGroupElement + var r CompletedGroupElement + for i := int32(1); i < 64; i += 2 { + selectPoint(&t, i/2, int32(e[i])) + geMixedAdd(&r, h, &t) + r.ToExtended(h) + } + + var s ProjectiveGroupElement + + h.Double(&r) + r.ToProjective(&s) + s.Double(&r) + r.ToProjective(&s) + s.Double(&r) + r.ToProjective(&s) + s.Double(&r) + r.ToExtended(h) + + for i := int32(0); i < 64; i += 2 { + selectPoint(&t, i/2, int32(e[i])) + geMixedAdd(&r, h, &t) + r.ToExtended(h) + } +} + +// The scalars are GF(2^252 + 27742317777372353535851937790883648493). + +// Input: +// a[0]+256*a[1]+...+256^31*a[31] = a +// b[0]+256*b[1]+...+256^31*b[31] = b +// c[0]+256*c[1]+...+256^31*c[31] = c +// +// Output: +// s[0]+256*s[1]+...+256^31*s[31] = (ab+c) mod l +// where l = 2^252 + 27742317777372353535851937790883648493. +func ScMulAdd(s, a, b, c *[32]byte) { + a0 := 2097151 & load3(a[:]) + a1 := 2097151 & (load4(a[2:]) >> 5) + a2 := 2097151 & (load3(a[5:]) >> 2) + a3 := 2097151 & (load4(a[7:]) >> 7) + a4 := 2097151 & (load4(a[10:]) >> 4) + a5 := 2097151 & (load3(a[13:]) >> 1) + a6 := 2097151 & (load4(a[15:]) >> 6) + a7 := 2097151 & (load3(a[18:]) >> 3) + a8 := 2097151 & load3(a[21:]) + a9 := 2097151 & (load4(a[23:]) >> 5) + a10 := 2097151 & (load3(a[26:]) >> 2) + a11 := (load4(a[28:]) >> 7) + b0 := 2097151 & load3(b[:]) + b1 := 2097151 & (load4(b[2:]) >> 5) + b2 := 2097151 & (load3(b[5:]) >> 2) + b3 := 2097151 & (load4(b[7:]) >> 7) + b4 := 2097151 & (load4(b[10:]) >> 4) + b5 := 2097151 & (load3(b[13:]) >> 1) + b6 := 2097151 & (load4(b[15:]) >> 6) + b7 := 2097151 & (load3(b[18:]) >> 3) + b8 := 2097151 & load3(b[21:]) + b9 := 2097151 & (load4(b[23:]) >> 5) + b10 := 2097151 & (load3(b[26:]) >> 2) + b11 := (load4(b[28:]) >> 7) + c0 := 2097151 & load3(c[:]) + c1 := 2097151 & (load4(c[2:]) >> 5) + c2 := 2097151 & (load3(c[5:]) >> 2) + c3 := 2097151 & (load4(c[7:]) >> 7) + c4 := 2097151 & (load4(c[10:]) >> 4) + c5 := 2097151 & (load3(c[13:]) >> 1) + c6 := 2097151 & (load4(c[15:]) >> 6) + c7 := 2097151 & (load3(c[18:]) >> 3) + c8 := 2097151 & load3(c[21:]) + c9 := 2097151 & (load4(c[23:]) >> 5) + c10 := 2097151 & (load3(c[26:]) >> 2) + c11 := (load4(c[28:]) >> 7) + var carry [23]int64 + + s0 := c0 + a0*b0 + s1 := c1 + a0*b1 + a1*b0 + s2 := c2 + a0*b2 + a1*b1 + a2*b0 + s3 := c3 + a0*b3 + a1*b2 + a2*b1 + a3*b0 + s4 := c4 + a0*b4 + a1*b3 + a2*b2 + a3*b1 + a4*b0 + s5 := c5 + a0*b5 + a1*b4 + a2*b3 + a3*b2 + a4*b1 + a5*b0 + s6 := c6 + a0*b6 + a1*b5 + a2*b4 + a3*b3 + a4*b2 + a5*b1 + a6*b0 + s7 := c7 + a0*b7 + a1*b6 + a2*b5 + a3*b4 + a4*b3 + a5*b2 + a6*b1 + a7*b0 + s8 := c8 + a0*b8 + a1*b7 + a2*b6 + a3*b5 + a4*b4 + a5*b3 + a6*b2 + a7*b1 + a8*b0 + s9 := c9 + a0*b9 + a1*b8 + a2*b7 + a3*b6 + a4*b5 + a5*b4 + a6*b3 + a7*b2 + a8*b1 + a9*b0 + s10 := c10 + a0*b10 + a1*b9 + a2*b8 + a3*b7 + a4*b6 + a5*b5 + a6*b4 + a7*b3 + a8*b2 + a9*b1 + a10*b0 + s11 := c11 + a0*b11 + a1*b10 + a2*b9 + a3*b8 + a4*b7 + a5*b6 + a6*b5 + a7*b4 + a8*b3 + a9*b2 + a10*b1 + a11*b0 + s12 := a1*b11 + a2*b10 + a3*b9 + a4*b8 + a5*b7 + a6*b6 + a7*b5 + a8*b4 + a9*b3 + a10*b2 + a11*b1 + s13 := a2*b11 + a3*b10 + a4*b9 + a5*b8 + a6*b7 + a7*b6 + a8*b5 + a9*b4 + a10*b3 + a11*b2 + s14 := a3*b11 + a4*b10 + a5*b9 + a6*b8 + a7*b7 + a8*b6 + a9*b5 + a10*b4 + a11*b3 + s15 := a4*b11 + a5*b10 + a6*b9 + a7*b8 + a8*b7 + a9*b6 + a10*b5 + a11*b4 + s16 := a5*b11 + a6*b10 + a7*b9 + a8*b8 + a9*b7 + a10*b6 + a11*b5 + s17 := a6*b11 + a7*b10 + a8*b9 + a9*b8 + a10*b7 + a11*b6 + s18 := a7*b11 + a8*b10 + a9*b9 + a10*b8 + a11*b7 + s19 := a8*b11 + a9*b10 + a10*b9 + a11*b8 + s20 := a9*b11 + a10*b10 + a11*b9 + s21 := a10*b11 + a11*b10 + s22 := a11 * b11 + s23 := int64(0) + + carry[0] = (s0 + (1 << 20)) >> 21 + s1 += carry[0] + s0 -= carry[0] << 21 + carry[2] = (s2 + (1 << 20)) >> 21 + s3 += carry[2] + s2 -= carry[2] << 21 + carry[4] = (s4 + (1 << 20)) >> 21 + s5 += carry[4] + s4 -= carry[4] << 21 + carry[6] = (s6 + (1 << 20)) >> 21 + s7 += carry[6] + s6 -= carry[6] << 21 + carry[8] = (s8 + (1 << 20)) >> 21 + s9 += carry[8] + s8 -= carry[8] << 21 + carry[10] = (s10 + (1 << 20)) >> 21 + s11 += carry[10] + s10 -= carry[10] << 21 + carry[12] = (s12 + (1 << 20)) >> 21 + s13 += carry[12] + s12 -= carry[12] << 21 + carry[14] = (s14 + (1 << 20)) >> 21 + s15 += carry[14] + s14 -= carry[14] << 21 + carry[16] = (s16 + (1 << 20)) >> 21 + s17 += carry[16] + s16 -= carry[16] << 21 + carry[18] = (s18 + (1 << 20)) >> 21 + s19 += carry[18] + s18 -= carry[18] << 21 + carry[20] = (s20 + (1 << 20)) >> 21 + s21 += carry[20] + s20 -= carry[20] << 21 + carry[22] = (s22 + (1 << 20)) >> 21 + s23 += carry[22] + s22 -= carry[22] << 21 + + carry[1] = (s1 + (1 << 20)) >> 21 + s2 += carry[1] + s1 -= carry[1] << 21 + carry[3] = (s3 + (1 << 20)) >> 21 + s4 += carry[3] + s3 -= carry[3] << 21 + carry[5] = (s5 + (1 << 20)) >> 21 + s6 += carry[5] + s5 -= carry[5] << 21 + carry[7] = (s7 + (1 << 20)) >> 21 + s8 += carry[7] + s7 -= carry[7] << 21 + carry[9] = (s9 + (1 << 20)) >> 21 + s10 += carry[9] + s9 -= carry[9] << 21 + carry[11] = (s11 + (1 << 20)) >> 21 + s12 += carry[11] + s11 -= carry[11] << 21 + carry[13] = (s13 + (1 << 20)) >> 21 + s14 += carry[13] + s13 -= carry[13] << 21 + carry[15] = (s15 + (1 << 20)) >> 21 + s16 += carry[15] + s15 -= carry[15] << 21 + carry[17] = (s17 + (1 << 20)) >> 21 + s18 += carry[17] + s17 -= carry[17] << 21 + carry[19] = (s19 + (1 << 20)) >> 21 + s20 += carry[19] + s19 -= carry[19] << 21 + carry[21] = (s21 + (1 << 20)) >> 21 + s22 += carry[21] + s21 -= carry[21] << 21 + + s11 += s23 * 666643 + s12 += s23 * 470296 + s13 += s23 * 654183 + s14 -= s23 * 997805 + s15 += s23 * 136657 + s16 -= s23 * 683901 + s23 = 0 + + s10 += s22 * 666643 + s11 += s22 * 470296 + s12 += s22 * 654183 + s13 -= s22 * 997805 + s14 += s22 * 136657 + s15 -= s22 * 683901 + s22 = 0 + + s9 += s21 * 666643 + s10 += s21 * 470296 + s11 += s21 * 654183 + s12 -= s21 * 997805 + s13 += s21 * 136657 + s14 -= s21 * 683901 + s21 = 0 + + s8 += s20 * 666643 + s9 += s20 * 470296 + s10 += s20 * 654183 + s11 -= s20 * 997805 + s12 += s20 * 136657 + s13 -= s20 * 683901 + s20 = 0 + + s7 += s19 * 666643 + s8 += s19 * 470296 + s9 += s19 * 654183 + s10 -= s19 * 997805 + s11 += s19 * 136657 + s12 -= s19 * 683901 + s19 = 0 + + s6 += s18 * 666643 + s7 += s18 * 470296 + s8 += s18 * 654183 + s9 -= s18 * 997805 + s10 += s18 * 136657 + s11 -= s18 * 683901 + s18 = 0 + + carry[6] = (s6 + (1 << 20)) >> 21 + s7 += carry[6] + s6 -= carry[6] << 21 + carry[8] = (s8 + (1 << 20)) >> 21 + s9 += carry[8] + s8 -= carry[8] << 21 + carry[10] = (s10 + (1 << 20)) >> 21 + s11 += carry[10] + s10 -= carry[10] << 21 + carry[12] = (s12 + (1 << 20)) >> 21 + s13 += carry[12] + s12 -= carry[12] << 21 + carry[14] = (s14 + (1 << 20)) >> 21 + s15 += carry[14] + s14 -= carry[14] << 21 + carry[16] = (s16 + (1 << 20)) >> 21 + s17 += carry[16] + s16 -= carry[16] << 21 + + carry[7] = (s7 + (1 << 20)) >> 21 + s8 += carry[7] + s7 -= carry[7] << 21 + carry[9] = (s9 + (1 << 20)) >> 21 + s10 += carry[9] + s9 -= carry[9] << 21 + carry[11] = (s11 + (1 << 20)) >> 21 + s12 += carry[11] + s11 -= carry[11] << 21 + carry[13] = (s13 + (1 << 20)) >> 21 + s14 += carry[13] + s13 -= carry[13] << 21 + carry[15] = (s15 + (1 << 20)) >> 21 + s16 += carry[15] + s15 -= carry[15] << 21 + + s5 += s17 * 666643 + s6 += s17 * 470296 + s7 += s17 * 654183 + s8 -= s17 * 997805 + s9 += s17 * 136657 + s10 -= s17 * 683901 + s17 = 0 + + s4 += s16 * 666643 + s5 += s16 * 470296 + s6 += s16 * 654183 + s7 -= s16 * 997805 + s8 += s16 * 136657 + s9 -= s16 * 683901 + s16 = 0 + + s3 += s15 * 666643 + s4 += s15 * 470296 + s5 += s15 * 654183 + s6 -= s15 * 997805 + s7 += s15 * 136657 + s8 -= s15 * 683901 + s15 = 0 + + s2 += s14 * 666643 + s3 += s14 * 470296 + s4 += s14 * 654183 + s5 -= s14 * 997805 + s6 += s14 * 136657 + s7 -= s14 * 683901 + s14 = 0 + + s1 += s13 * 666643 + s2 += s13 * 470296 + s3 += s13 * 654183 + s4 -= s13 * 997805 + s5 += s13 * 136657 + s6 -= s13 * 683901 + s13 = 0 + + s0 += s12 * 666643 + s1 += s12 * 470296 + s2 += s12 * 654183 + s3 -= s12 * 997805 + s4 += s12 * 136657 + s5 -= s12 * 683901 + s12 = 0 + + carry[0] = (s0 + (1 << 20)) >> 21 + s1 += carry[0] + s0 -= carry[0] << 21 + carry[2] = (s2 + (1 << 20)) >> 21 + s3 += carry[2] + s2 -= carry[2] << 21 + carry[4] = (s4 + (1 << 20)) >> 21 + s5 += carry[4] + s4 -= carry[4] << 21 + carry[6] = (s6 + (1 << 20)) >> 21 + s7 += carry[6] + s6 -= carry[6] << 21 + carry[8] = (s8 + (1 << 20)) >> 21 + s9 += carry[8] + s8 -= carry[8] << 21 + carry[10] = (s10 + (1 << 20)) >> 21 + s11 += carry[10] + s10 -= carry[10] << 21 + + carry[1] = (s1 + (1 << 20)) >> 21 + s2 += carry[1] + s1 -= carry[1] << 21 + carry[3] = (s3 + (1 << 20)) >> 21 + s4 += carry[3] + s3 -= carry[3] << 21 + carry[5] = (s5 + (1 << 20)) >> 21 + s6 += carry[5] + s5 -= carry[5] << 21 + carry[7] = (s7 + (1 << 20)) >> 21 + s8 += carry[7] + s7 -= carry[7] << 21 + carry[9] = (s9 + (1 << 20)) >> 21 + s10 += carry[9] + s9 -= carry[9] << 21 + carry[11] = (s11 + (1 << 20)) >> 21 + s12 += carry[11] + s11 -= carry[11] << 21 + + s0 += s12 * 666643 + s1 += s12 * 470296 + s2 += s12 * 654183 + s3 -= s12 * 997805 + s4 += s12 * 136657 + s5 -= s12 * 683901 + s12 = 0 + + carry[0] = s0 >> 21 + s1 += carry[0] + s0 -= carry[0] << 21 + carry[1] = s1 >> 21 + s2 += carry[1] + s1 -= carry[1] << 21 + carry[2] = s2 >> 21 + s3 += carry[2] + s2 -= carry[2] << 21 + carry[3] = s3 >> 21 + s4 += carry[3] + s3 -= carry[3] << 21 + carry[4] = s4 >> 21 + s5 += carry[4] + s4 -= carry[4] << 21 + carry[5] = s5 >> 21 + s6 += carry[5] + s5 -= carry[5] << 21 + carry[6] = s6 >> 21 + s7 += carry[6] + s6 -= carry[6] << 21 + carry[7] = s7 >> 21 + s8 += carry[7] + s7 -= carry[7] << 21 + carry[8] = s8 >> 21 + s9 += carry[8] + s8 -= carry[8] << 21 + carry[9] = s9 >> 21 + s10 += carry[9] + s9 -= carry[9] << 21 + carry[10] = s10 >> 21 + s11 += carry[10] + s10 -= carry[10] << 21 + carry[11] = s11 >> 21 + s12 += carry[11] + s11 -= carry[11] << 21 + + s0 += s12 * 666643 + s1 += s12 * 470296 + s2 += s12 * 654183 + s3 -= s12 * 997805 + s4 += s12 * 136657 + s5 -= s12 * 683901 + s12 = 0 + + carry[0] = s0 >> 21 + s1 += carry[0] + s0 -= carry[0] << 21 + carry[1] = s1 >> 21 + s2 += carry[1] + s1 -= carry[1] << 21 + carry[2] = s2 >> 21 + s3 += carry[2] + s2 -= carry[2] << 21 + carry[3] = s3 >> 21 + s4 += carry[3] + s3 -= carry[3] << 21 + carry[4] = s4 >> 21 + s5 += carry[4] + s4 -= carry[4] << 21 + carry[5] = s5 >> 21 + s6 += carry[5] + s5 -= carry[5] << 21 + carry[6] = s6 >> 21 + s7 += carry[6] + s6 -= carry[6] << 21 + carry[7] = s7 >> 21 + s8 += carry[7] + s7 -= carry[7] << 21 + carry[8] = s8 >> 21 + s9 += carry[8] + s8 -= carry[8] << 21 + carry[9] = s9 >> 21 + s10 += carry[9] + s9 -= carry[9] << 21 + carry[10] = s10 >> 21 + s11 += carry[10] + s10 -= carry[10] << 21 + + s[0] = byte(s0 >> 0) + s[1] = byte(s0 >> 8) + s[2] = byte((s0 >> 16) | (s1 << 5)) + s[3] = byte(s1 >> 3) + s[4] = byte(s1 >> 11) + s[5] = byte((s1 >> 19) | (s2 << 2)) + s[6] = byte(s2 >> 6) + s[7] = byte((s2 >> 14) | (s3 << 7)) + s[8] = byte(s3 >> 1) + s[9] = byte(s3 >> 9) + s[10] = byte((s3 >> 17) | (s4 << 4)) + s[11] = byte(s4 >> 4) + s[12] = byte(s4 >> 12) + s[13] = byte((s4 >> 20) | (s5 << 1)) + s[14] = byte(s5 >> 7) + s[15] = byte((s5 >> 15) | (s6 << 6)) + s[16] = byte(s6 >> 2) + s[17] = byte(s6 >> 10) + s[18] = byte((s6 >> 18) | (s7 << 3)) + s[19] = byte(s7 >> 5) + s[20] = byte(s7 >> 13) + s[21] = byte(s8 >> 0) + s[22] = byte(s8 >> 8) + s[23] = byte((s8 >> 16) | (s9 << 5)) + s[24] = byte(s9 >> 3) + s[25] = byte(s9 >> 11) + s[26] = byte((s9 >> 19) | (s10 << 2)) + s[27] = byte(s10 >> 6) + s[28] = byte((s10 >> 14) | (s11 << 7)) + s[29] = byte(s11 >> 1) + s[30] = byte(s11 >> 9) + s[31] = byte(s11 >> 17) +} + +// Input: +// s[0]+256*s[1]+...+256^63*s[63] = s +// +// Output: +// s[0]+256*s[1]+...+256^31*s[31] = s mod l +// where l = 2^252 + 27742317777372353535851937790883648493. +func ScReduce(out *[32]byte, s *[64]byte) { + s0 := 2097151 & load3(s[:]) + s1 := 2097151 & (load4(s[2:]) >> 5) + s2 := 2097151 & (load3(s[5:]) >> 2) + s3 := 2097151 & (load4(s[7:]) >> 7) + s4 := 2097151 & (load4(s[10:]) >> 4) + s5 := 2097151 & (load3(s[13:]) >> 1) + s6 := 2097151 & (load4(s[15:]) >> 6) + s7 := 2097151 & (load3(s[18:]) >> 3) + s8 := 2097151 & load3(s[21:]) + s9 := 2097151 & (load4(s[23:]) >> 5) + s10 := 2097151 & (load3(s[26:]) >> 2) + s11 := 2097151 & (load4(s[28:]) >> 7) + s12 := 2097151 & (load4(s[31:]) >> 4) + s13 := 2097151 & (load3(s[34:]) >> 1) + s14 := 2097151 & (load4(s[36:]) >> 6) + s15 := 2097151 & (load3(s[39:]) >> 3) + s16 := 2097151 & load3(s[42:]) + s17 := 2097151 & (load4(s[44:]) >> 5) + s18 := 2097151 & (load3(s[47:]) >> 2) + s19 := 2097151 & (load4(s[49:]) >> 7) + s20 := 2097151 & (load4(s[52:]) >> 4) + s21 := 2097151 & (load3(s[55:]) >> 1) + s22 := 2097151 & (load4(s[57:]) >> 6) + s23 := (load4(s[60:]) >> 3) + + s11 += s23 * 666643 + s12 += s23 * 470296 + s13 += s23 * 654183 + s14 -= s23 * 997805 + s15 += s23 * 136657 + s16 -= s23 * 683901 + s23 = 0 + + s10 += s22 * 666643 + s11 += s22 * 470296 + s12 += s22 * 654183 + s13 -= s22 * 997805 + s14 += s22 * 136657 + s15 -= s22 * 683901 + s22 = 0 + + s9 += s21 * 666643 + s10 += s21 * 470296 + s11 += s21 * 654183 + s12 -= s21 * 997805 + s13 += s21 * 136657 + s14 -= s21 * 683901 + s21 = 0 + + s8 += s20 * 666643 + s9 += s20 * 470296 + s10 += s20 * 654183 + s11 -= s20 * 997805 + s12 += s20 * 136657 + s13 -= s20 * 683901 + s20 = 0 + + s7 += s19 * 666643 + s8 += s19 * 470296 + s9 += s19 * 654183 + s10 -= s19 * 997805 + s11 += s19 * 136657 + s12 -= s19 * 683901 + s19 = 0 + + s6 += s18 * 666643 + s7 += s18 * 470296 + s8 += s18 * 654183 + s9 -= s18 * 997805 + s10 += s18 * 136657 + s11 -= s18 * 683901 + s18 = 0 + + var carry [17]int64 + + carry[6] = (s6 + (1 << 20)) >> 21 + s7 += carry[6] + s6 -= carry[6] << 21 + carry[8] = (s8 + (1 << 20)) >> 21 + s9 += carry[8] + s8 -= carry[8] << 21 + carry[10] = (s10 + (1 << 20)) >> 21 + s11 += carry[10] + s10 -= carry[10] << 21 + carry[12] = (s12 + (1 << 20)) >> 21 + s13 += carry[12] + s12 -= carry[12] << 21 + carry[14] = (s14 + (1 << 20)) >> 21 + s15 += carry[14] + s14 -= carry[14] << 21 + carry[16] = (s16 + (1 << 20)) >> 21 + s17 += carry[16] + s16 -= carry[16] << 21 + + carry[7] = (s7 + (1 << 20)) >> 21 + s8 += carry[7] + s7 -= carry[7] << 21 + carry[9] = (s9 + (1 << 20)) >> 21 + s10 += carry[9] + s9 -= carry[9] << 21 + carry[11] = (s11 + (1 << 20)) >> 21 + s12 += carry[11] + s11 -= carry[11] << 21 + carry[13] = (s13 + (1 << 20)) >> 21 + s14 += carry[13] + s13 -= carry[13] << 21 + carry[15] = (s15 + (1 << 20)) >> 21 + s16 += carry[15] + s15 -= carry[15] << 21 + + s5 += s17 * 666643 + s6 += s17 * 470296 + s7 += s17 * 654183 + s8 -= s17 * 997805 + s9 += s17 * 136657 + s10 -= s17 * 683901 + s17 = 0 + + s4 += s16 * 666643 + s5 += s16 * 470296 + s6 += s16 * 654183 + s7 -= s16 * 997805 + s8 += s16 * 136657 + s9 -= s16 * 683901 + s16 = 0 + + s3 += s15 * 666643 + s4 += s15 * 470296 + s5 += s15 * 654183 + s6 -= s15 * 997805 + s7 += s15 * 136657 + s8 -= s15 * 683901 + s15 = 0 + + s2 += s14 * 666643 + s3 += s14 * 470296 + s4 += s14 * 654183 + s5 -= s14 * 997805 + s6 += s14 * 136657 + s7 -= s14 * 683901 + s14 = 0 + + s1 += s13 * 666643 + s2 += s13 * 470296 + s3 += s13 * 654183 + s4 -= s13 * 997805 + s5 += s13 * 136657 + s6 -= s13 * 683901 + s13 = 0 + + s0 += s12 * 666643 + s1 += s12 * 470296 + s2 += s12 * 654183 + s3 -= s12 * 997805 + s4 += s12 * 136657 + s5 -= s12 * 683901 + s12 = 0 + + carry[0] = (s0 + (1 << 20)) >> 21 + s1 += carry[0] + s0 -= carry[0] << 21 + carry[2] = (s2 + (1 << 20)) >> 21 + s3 += carry[2] + s2 -= carry[2] << 21 + carry[4] = (s4 + (1 << 20)) >> 21 + s5 += carry[4] + s4 -= carry[4] << 21 + carry[6] = (s6 + (1 << 20)) >> 21 + s7 += carry[6] + s6 -= carry[6] << 21 + carry[8] = (s8 + (1 << 20)) >> 21 + s9 += carry[8] + s8 -= carry[8] << 21 + carry[10] = (s10 + (1 << 20)) >> 21 + s11 += carry[10] + s10 -= carry[10] << 21 + + carry[1] = (s1 + (1 << 20)) >> 21 + s2 += carry[1] + s1 -= carry[1] << 21 + carry[3] = (s3 + (1 << 20)) >> 21 + s4 += carry[3] + s3 -= carry[3] << 21 + carry[5] = (s5 + (1 << 20)) >> 21 + s6 += carry[5] + s5 -= carry[5] << 21 + carry[7] = (s7 + (1 << 20)) >> 21 + s8 += carry[7] + s7 -= carry[7] << 21 + carry[9] = (s9 + (1 << 20)) >> 21 + s10 += carry[9] + s9 -= carry[9] << 21 + carry[11] = (s11 + (1 << 20)) >> 21 + s12 += carry[11] + s11 -= carry[11] << 21 + + s0 += s12 * 666643 + s1 += s12 * 470296 + s2 += s12 * 654183 + s3 -= s12 * 997805 + s4 += s12 * 136657 + s5 -= s12 * 683901 + s12 = 0 + + carry[0] = s0 >> 21 + s1 += carry[0] + s0 -= carry[0] << 21 + carry[1] = s1 >> 21 + s2 += carry[1] + s1 -= carry[1] << 21 + carry[2] = s2 >> 21 + s3 += carry[2] + s2 -= carry[2] << 21 + carry[3] = s3 >> 21 + s4 += carry[3] + s3 -= carry[3] << 21 + carry[4] = s4 >> 21 + s5 += carry[4] + s4 -= carry[4] << 21 + carry[5] = s5 >> 21 + s6 += carry[5] + s5 -= carry[5] << 21 + carry[6] = s6 >> 21 + s7 += carry[6] + s6 -= carry[6] << 21 + carry[7] = s7 >> 21 + s8 += carry[7] + s7 -= carry[7] << 21 + carry[8] = s8 >> 21 + s9 += carry[8] + s8 -= carry[8] << 21 + carry[9] = s9 >> 21 + s10 += carry[9] + s9 -= carry[9] << 21 + carry[10] = s10 >> 21 + s11 += carry[10] + s10 -= carry[10] << 21 + carry[11] = s11 >> 21 + s12 += carry[11] + s11 -= carry[11] << 21 + + s0 += s12 * 666643 + s1 += s12 * 470296 + s2 += s12 * 654183 + s3 -= s12 * 997805 + s4 += s12 * 136657 + s5 -= s12 * 683901 + s12 = 0 + + carry[0] = s0 >> 21 + s1 += carry[0] + s0 -= carry[0] << 21 + carry[1] = s1 >> 21 + s2 += carry[1] + s1 -= carry[1] << 21 + carry[2] = s2 >> 21 + s3 += carry[2] + s2 -= carry[2] << 21 + carry[3] = s3 >> 21 + s4 += carry[3] + s3 -= carry[3] << 21 + carry[4] = s4 >> 21 + s5 += carry[4] + s4 -= carry[4] << 21 + carry[5] = s5 >> 21 + s6 += carry[5] + s5 -= carry[5] << 21 + carry[6] = s6 >> 21 + s7 += carry[6] + s6 -= carry[6] << 21 + carry[7] = s7 >> 21 + s8 += carry[7] + s7 -= carry[7] << 21 + carry[8] = s8 >> 21 + s9 += carry[8] + s8 -= carry[8] << 21 + carry[9] = s9 >> 21 + s10 += carry[9] + s9 -= carry[9] << 21 + carry[10] = s10 >> 21 + s11 += carry[10] + s10 -= carry[10] << 21 + + out[0] = byte(s0 >> 0) + out[1] = byte(s0 >> 8) + out[2] = byte((s0 >> 16) | (s1 << 5)) + out[3] = byte(s1 >> 3) + out[4] = byte(s1 >> 11) + out[5] = byte((s1 >> 19) | (s2 << 2)) + out[6] = byte(s2 >> 6) + out[7] = byte((s2 >> 14) | (s3 << 7)) + out[8] = byte(s3 >> 1) + out[9] = byte(s3 >> 9) + out[10] = byte((s3 >> 17) | (s4 << 4)) + out[11] = byte(s4 >> 4) + out[12] = byte(s4 >> 12) + out[13] = byte((s4 >> 20) | (s5 << 1)) + out[14] = byte(s5 >> 7) + out[15] = byte((s5 >> 15) | (s6 << 6)) + out[16] = byte(s6 >> 2) + out[17] = byte(s6 >> 10) + out[18] = byte((s6 >> 18) | (s7 << 3)) + out[19] = byte(s7 >> 5) + out[20] = byte(s7 >> 13) + out[21] = byte(s8 >> 0) + out[22] = byte(s8 >> 8) + out[23] = byte((s8 >> 16) | (s9 << 5)) + out[24] = byte(s9 >> 3) + out[25] = byte(s9 >> 11) + out[26] = byte((s9 >> 19) | (s10 << 2)) + out[27] = byte(s10 >> 6) + out[28] = byte((s10 >> 14) | (s11 << 7)) + out[29] = byte(s11 >> 1) + out[30] = byte(s11 >> 9) + out[31] = byte(s11 >> 17) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/LICENSE b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/LICENSE new file mode 100644 index 000000000..6a66aea5e --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/PATENTS b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/PATENTS new file mode 100644 index 000000000..733099041 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/bpf/asm.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/bpf/asm.go new file mode 100644 index 000000000..15e21b181 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/bpf/asm.go @@ -0,0 +1,41 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package bpf + +import "fmt" + +// Assemble converts insts into raw instructions suitable for loading +// into a BPF virtual machine. +// +// Currently, no optimization is attempted, the assembled program flow +// is exactly as provided. +func Assemble(insts []Instruction) ([]RawInstruction, error) { + ret := make([]RawInstruction, len(insts)) + var err error + for i, inst := range insts { + ret[i], err = inst.Assemble() + if err != nil { + return nil, fmt.Errorf("assembling instruction %d: %s", i+1, err) + } + } + return ret, nil +} + +// Disassemble attempts to parse raw back into +// Instructions. Unrecognized RawInstructions are assumed to be an +// extension not implemented by this package, and are passed through +// unchanged to the output. The allDecoded value reports whether insts +// contains no RawInstructions. +func Disassemble(raw []RawInstruction) (insts []Instruction, allDecoded bool) { + insts = make([]Instruction, len(raw)) + allDecoded = true + for i, r := range raw { + insts[i] = r.Disassemble() + if _, ok := insts[i].(RawInstruction); ok { + allDecoded = false + } + } + return insts, allDecoded +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/bpf/constants.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/bpf/constants.go new file mode 100644 index 000000000..b89ca3523 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/bpf/constants.go @@ -0,0 +1,218 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package bpf + +// A Register is a register of the BPF virtual machine. +type Register uint16 + +const ( + // RegA is the accumulator register. RegA is always the + // destination register of ALU operations. + RegA Register = iota + // RegX is the indirection register, used by LoadIndirect + // operations. + RegX +) + +// An ALUOp is an arithmetic or logic operation. +type ALUOp uint16 + +// ALU binary operation types. +const ( + ALUOpAdd ALUOp = iota << 4 + ALUOpSub + ALUOpMul + ALUOpDiv + ALUOpOr + ALUOpAnd + ALUOpShiftLeft + ALUOpShiftRight + aluOpNeg // Not exported because it's the only unary ALU operation, and gets its own instruction type. + ALUOpMod + ALUOpXor +) + +// A JumpTest is a comparison operator used in conditional jumps. +type JumpTest uint16 + +// Supported operators for conditional jumps. +const ( + // K == A + JumpEqual JumpTest = iota + // K != A + JumpNotEqual + // K > A + JumpGreaterThan + // K < A + JumpLessThan + // K >= A + JumpGreaterOrEqual + // K <= A + JumpLessOrEqual + // K & A != 0 + JumpBitsSet + // K & A == 0 + JumpBitsNotSet +) + +// An Extension is a function call provided by the kernel that +// performs advanced operations that are expensive or impossible +// within the BPF virtual machine. +// +// Extensions are only implemented by the Linux kernel. +// +// TODO: should we prune this list? Some of these extensions seem +// either broken or near-impossible to use correctly, whereas other +// (len, random, ifindex) are quite useful. +type Extension int + +// Extension functions available in the Linux kernel. +const ( + // extOffset is the negative maximum number of instructions used + // to load instructions by overloading the K argument. + extOffset = -0x1000 + // ExtLen returns the length of the packet. + ExtLen Extension = 1 + // ExtProto returns the packet's L3 protocol type. + ExtProto Extension = 0 + // ExtType returns the packet's type (skb->pkt_type in the kernel) + // + // TODO: better documentation. How nice an API do we want to + // provide for these esoteric extensions? + ExtType Extension = 4 + // ExtPayloadOffset returns the offset of the packet payload, or + // the first protocol header that the kernel does not know how to + // parse. + ExtPayloadOffset Extension = 52 + // ExtInterfaceIndex returns the index of the interface on which + // the packet was received. + ExtInterfaceIndex Extension = 8 + // ExtNetlinkAttr returns the netlink attribute of type X at + // offset A. + ExtNetlinkAttr Extension = 12 + // ExtNetlinkAttrNested returns the nested netlink attribute of + // type X at offset A. + ExtNetlinkAttrNested Extension = 16 + // ExtMark returns the packet's mark value. + ExtMark Extension = 20 + // ExtQueue returns the packet's assigned hardware queue. + ExtQueue Extension = 24 + // ExtLinkLayerType returns the packet's hardware address type + // (e.g. Ethernet, Infiniband). + ExtLinkLayerType Extension = 28 + // ExtRXHash returns the packets receive hash. + // + // TODO: figure out what this rxhash actually is. + ExtRXHash Extension = 32 + // ExtCPUID returns the ID of the CPU processing the current + // packet. + ExtCPUID Extension = 36 + // ExtVLANTag returns the packet's VLAN tag. + ExtVLANTag Extension = 44 + // ExtVLANTagPresent returns non-zero if the packet has a VLAN + // tag. + // + // TODO: I think this might be a lie: it reads bit 0x1000 of the + // VLAN header, which changed meaning in recent revisions of the + // spec - this extension may now return meaningless information. + ExtVLANTagPresent Extension = 48 + // ExtVLANProto returns 0x8100 if the frame has a VLAN header, + // 0x88a8 if the frame has a "Q-in-Q" double VLAN header, or some + // other value if no VLAN information is present. + ExtVLANProto Extension = 60 + // ExtRand returns a uniformly random uint32. + ExtRand Extension = 56 +) + +// The following gives names to various bit patterns used in opcode construction. + +const ( + opMaskCls uint16 = 0x7 + // opClsLoad masks + opMaskLoadDest = 0x01 + opMaskLoadWidth = 0x18 + opMaskLoadMode = 0xe0 + // opClsALU + opMaskOperandSrc = 0x08 + opMaskOperator = 0xf0 + // opClsJump + opMaskJumpConst = 0x0f + opMaskJumpCond = 0xf0 +) + +const ( + // +---------------+-----------------+---+---+---+ + // | AddrMode (3b) | LoadWidth (2b) | 0 | 0 | 0 | + // +---------------+-----------------+---+---+---+ + opClsLoadA uint16 = iota + // +---------------+-----------------+---+---+---+ + // | AddrMode (3b) | LoadWidth (2b) | 0 | 0 | 1 | + // +---------------+-----------------+---+---+---+ + opClsLoadX + // +---+---+---+---+---+---+---+---+ + // | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | + // +---+---+---+---+---+---+---+---+ + opClsStoreA + // +---+---+---+---+---+---+---+---+ + // | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | + // +---+---+---+---+---+---+---+---+ + opClsStoreX + // +---------------+-----------------+---+---+---+ + // | Operator (4b) | OperandSrc (1b) | 1 | 0 | 0 | + // +---------------+-----------------+---+---+---+ + opClsALU + // +-----------------------------+---+---+---+---+ + // | TestOperator (4b) | 0 | 1 | 0 | 1 | + // +-----------------------------+---+---+---+---+ + opClsJump + // +---+-------------------------+---+---+---+---+ + // | 0 | 0 | 0 | RetSrc (1b) | 0 | 1 | 1 | 0 | + // +---+-------------------------+---+---+---+---+ + opClsReturn + // +---+-------------------------+---+---+---+---+ + // | 0 | 0 | 0 | TXAorTAX (1b) | 0 | 1 | 1 | 1 | + // +---+-------------------------+---+---+---+---+ + opClsMisc +) + +const ( + opAddrModeImmediate uint16 = iota << 5 + opAddrModeAbsolute + opAddrModeIndirect + opAddrModeScratch + opAddrModePacketLen // actually an extension, not an addressing mode. + opAddrModeMemShift +) + +const ( + opLoadWidth4 uint16 = iota << 3 + opLoadWidth2 + opLoadWidth1 +) + +// Operator defined by ALUOp* + +const ( + opALUSrcConstant uint16 = iota << 3 + opALUSrcX +) + +const ( + opJumpAlways = iota << 4 + opJumpEqual + opJumpGT + opJumpGE + opJumpSet +) + +const ( + opRetSrcConstant uint16 = iota << 4 + opRetSrcA +) + +const ( + opMiscTAX = 0x00 + opMiscTXA = 0x80 +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/bpf/doc.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/bpf/doc.go new file mode 100644 index 000000000..ae62feb53 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/bpf/doc.go @@ -0,0 +1,82 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +/* + +Package bpf implements marshaling and unmarshaling of programs for the +Berkeley Packet Filter virtual machine, and provides a Go implementation +of the virtual machine. + +BPF's main use is to specify a packet filter for network taps, so that +the kernel doesn't have to expensively copy every packet it sees to +userspace. However, it's been repurposed to other areas where running +user code in-kernel is needed. For example, Linux's seccomp uses BPF +to apply security policies to system calls. For simplicity, this +documentation refers only to packets, but other uses of BPF have their +own data payloads. + +BPF programs run in a restricted virtual machine. It has almost no +access to kernel functions, and while conditional branches are +allowed, they can only jump forwards, to guarantee that there are no +infinite loops. + +The virtual machine + +The BPF VM is an accumulator machine. Its main register, called +register A, is an implicit source and destination in all arithmetic +and logic operations. The machine also has 16 scratch registers for +temporary storage, and an indirection register (register X) for +indirect memory access. All registers are 32 bits wide. + +Each run of a BPF program is given one packet, which is placed in the +VM's read-only "main memory". LoadAbsolute and LoadIndirect +instructions can fetch up to 32 bits at a time into register A for +examination. + +The goal of a BPF program is to produce and return a verdict (uint32), +which tells the kernel what to do with the packet. In the context of +packet filtering, the returned value is the number of bytes of the +packet to forward to userspace, or 0 to ignore the packet. Other +contexts like seccomp define their own return values. + +In order to simplify programs, attempts to read past the end of the +packet terminate the program execution with a verdict of 0 (ignore +packet). This means that the vast majority of BPF programs don't need +to do any explicit bounds checking. + +In addition to the bytes of the packet, some BPF programs have access +to extensions, which are essentially calls to kernel utility +functions. Currently, the only extensions supported by this package +are the Linux packet filter extensions. + +Examples + +This packet filter selects all ARP packets. + + bpf.Assemble([]bpf.Instruction{ + // Load "EtherType" field from the ethernet header. + bpf.LoadAbsolute{Off: 12, Size: 2}, + // Skip over the next instruction if EtherType is not ARP. + bpf.JumpIf{Cond: bpf.JumpNotEqual, Val: 0x0806, SkipTrue: 1}, + // Verdict is "send up to 4k of the packet to userspace." + bpf.RetConstant{Val: 4096}, + // Verdict is "ignore packet." + bpf.RetConstant{Val: 0}, + }) + +This packet filter captures a random 1% sample of traffic. + + bpf.Assemble([]bpf.Instruction{ + // Get a 32-bit random number from the Linux kernel. + bpf.LoadExtension{Num: bpf.ExtRand}, + // 1% dice roll? + bpf.JumpIf{Cond: bpf.JumpLessThan, Val: 2^32/100, SkipFalse: 1}, + // Capture. + bpf.RetConstant{Val: 4096}, + // Ignore. + bpf.RetConstant{Val: 0}, + }) + +*/ +package bpf // import "golang.org/x/net/bpf" diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/bpf/instructions.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/bpf/instructions.go new file mode 100644 index 000000000..3b4fd0891 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/bpf/instructions.go @@ -0,0 +1,704 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package bpf + +import "fmt" + +// An Instruction is one instruction executed by the BPF virtual +// machine. +type Instruction interface { + // Assemble assembles the Instruction into a RawInstruction. + Assemble() (RawInstruction, error) +} + +// A RawInstruction is a raw BPF virtual machine instruction. +type RawInstruction struct { + // Operation to execute. + Op uint16 + // For conditional jump instructions, the number of instructions + // to skip if the condition is true/false. + Jt uint8 + Jf uint8 + // Constant parameter. The meaning depends on the Op. + K uint32 +} + +// Assemble implements the Instruction Assemble method. +func (ri RawInstruction) Assemble() (RawInstruction, error) { return ri, nil } + +// Disassemble parses ri into an Instruction and returns it. If ri is +// not recognized by this package, ri itself is returned. +func (ri RawInstruction) Disassemble() Instruction { + switch ri.Op & opMaskCls { + case opClsLoadA, opClsLoadX: + reg := Register(ri.Op & opMaskLoadDest) + sz := 0 + switch ri.Op & opMaskLoadWidth { + case opLoadWidth4: + sz = 4 + case opLoadWidth2: + sz = 2 + case opLoadWidth1: + sz = 1 + default: + return ri + } + switch ri.Op & opMaskLoadMode { + case opAddrModeImmediate: + if sz != 4 { + return ri + } + return LoadConstant{Dst: reg, Val: ri.K} + case opAddrModeScratch: + if sz != 4 || ri.K > 15 { + return ri + } + return LoadScratch{Dst: reg, N: int(ri.K)} + case opAddrModeAbsolute: + if ri.K > extOffset+0xffffffff { + return LoadExtension{Num: Extension(-extOffset + ri.K)} + } + return LoadAbsolute{Size: sz, Off: ri.K} + case opAddrModeIndirect: + return LoadIndirect{Size: sz, Off: ri.K} + case opAddrModePacketLen: + if sz != 4 { + return ri + } + return LoadExtension{Num: ExtLen} + case opAddrModeMemShift: + return LoadMemShift{Off: ri.K} + default: + return ri + } + + case opClsStoreA: + if ri.Op != opClsStoreA || ri.K > 15 { + return ri + } + return StoreScratch{Src: RegA, N: int(ri.K)} + + case opClsStoreX: + if ri.Op != opClsStoreX || ri.K > 15 { + return ri + } + return StoreScratch{Src: RegX, N: int(ri.K)} + + case opClsALU: + switch op := ALUOp(ri.Op & opMaskOperator); op { + case ALUOpAdd, ALUOpSub, ALUOpMul, ALUOpDiv, ALUOpOr, ALUOpAnd, ALUOpShiftLeft, ALUOpShiftRight, ALUOpMod, ALUOpXor: + if ri.Op&opMaskOperandSrc != 0 { + return ALUOpX{Op: op} + } + return ALUOpConstant{Op: op, Val: ri.K} + case aluOpNeg: + return NegateA{} + default: + return ri + } + + case opClsJump: + if ri.Op&opMaskJumpConst != opClsJump { + return ri + } + switch ri.Op & opMaskJumpCond { + case opJumpAlways: + return Jump{Skip: ri.K} + case opJumpEqual: + if ri.Jt == 0 { + return JumpIf{ + Cond: JumpNotEqual, + Val: ri.K, + SkipTrue: ri.Jf, + SkipFalse: 0, + } + } + return JumpIf{ + Cond: JumpEqual, + Val: ri.K, + SkipTrue: ri.Jt, + SkipFalse: ri.Jf, + } + case opJumpGT: + if ri.Jt == 0 { + return JumpIf{ + Cond: JumpLessOrEqual, + Val: ri.K, + SkipTrue: ri.Jf, + SkipFalse: 0, + } + } + return JumpIf{ + Cond: JumpGreaterThan, + Val: ri.K, + SkipTrue: ri.Jt, + SkipFalse: ri.Jf, + } + case opJumpGE: + if ri.Jt == 0 { + return JumpIf{ + Cond: JumpLessThan, + Val: ri.K, + SkipTrue: ri.Jf, + SkipFalse: 0, + } + } + return JumpIf{ + Cond: JumpGreaterOrEqual, + Val: ri.K, + SkipTrue: ri.Jt, + SkipFalse: ri.Jf, + } + case opJumpSet: + return JumpIf{ + Cond: JumpBitsSet, + Val: ri.K, + SkipTrue: ri.Jt, + SkipFalse: ri.Jf, + } + default: + return ri + } + + case opClsReturn: + switch ri.Op { + case opClsReturn | opRetSrcA: + return RetA{} + case opClsReturn | opRetSrcConstant: + return RetConstant{Val: ri.K} + default: + return ri + } + + case opClsMisc: + switch ri.Op { + case opClsMisc | opMiscTAX: + return TAX{} + case opClsMisc | opMiscTXA: + return TXA{} + default: + return ri + } + + default: + panic("unreachable") // switch is exhaustive on the bit pattern + } +} + +// LoadConstant loads Val into register Dst. +type LoadConstant struct { + Dst Register + Val uint32 +} + +// Assemble implements the Instruction Assemble method. +func (a LoadConstant) Assemble() (RawInstruction, error) { + return assembleLoad(a.Dst, 4, opAddrModeImmediate, a.Val) +} + +// String returns the the instruction in assembler notation. +func (a LoadConstant) String() string { + switch a.Dst { + case RegA: + return fmt.Sprintf("ld #%d", a.Val) + case RegX: + return fmt.Sprintf("ldx #%d", a.Val) + default: + return fmt.Sprintf("unknown instruction: %#v", a) + } +} + +// LoadScratch loads scratch[N] into register Dst. +type LoadScratch struct { + Dst Register + N int // 0-15 +} + +// Assemble implements the Instruction Assemble method. +func (a LoadScratch) Assemble() (RawInstruction, error) { + if a.N < 0 || a.N > 15 { + return RawInstruction{}, fmt.Errorf("invalid scratch slot %d", a.N) + } + return assembleLoad(a.Dst, 4, opAddrModeScratch, uint32(a.N)) +} + +// String returns the the instruction in assembler notation. +func (a LoadScratch) String() string { + switch a.Dst { + case RegA: + return fmt.Sprintf("ld M[%d]", a.N) + case RegX: + return fmt.Sprintf("ldx M[%d]", a.N) + default: + return fmt.Sprintf("unknown instruction: %#v", a) + } +} + +// LoadAbsolute loads packet[Off:Off+Size] as an integer value into +// register A. +type LoadAbsolute struct { + Off uint32 + Size int // 1, 2 or 4 +} + +// Assemble implements the Instruction Assemble method. +func (a LoadAbsolute) Assemble() (RawInstruction, error) { + return assembleLoad(RegA, a.Size, opAddrModeAbsolute, a.Off) +} + +// String returns the the instruction in assembler notation. +func (a LoadAbsolute) String() string { + switch a.Size { + case 1: // byte + return fmt.Sprintf("ldb [%d]", a.Off) + case 2: // half word + return fmt.Sprintf("ldh [%d]", a.Off) + case 4: // word + if a.Off > extOffset+0xffffffff { + return LoadExtension{Num: Extension(a.Off + 0x1000)}.String() + } + return fmt.Sprintf("ld [%d]", a.Off) + default: + return fmt.Sprintf("unknown instruction: %#v", a) + } +} + +// LoadIndirect loads packet[X+Off:X+Off+Size] as an integer value +// into register A. +type LoadIndirect struct { + Off uint32 + Size int // 1, 2 or 4 +} + +// Assemble implements the Instruction Assemble method. +func (a LoadIndirect) Assemble() (RawInstruction, error) { + return assembleLoad(RegA, a.Size, opAddrModeIndirect, a.Off) +} + +// String returns the the instruction in assembler notation. +func (a LoadIndirect) String() string { + switch a.Size { + case 1: // byte + return fmt.Sprintf("ldb [x + %d]", a.Off) + case 2: // half word + return fmt.Sprintf("ldh [x + %d]", a.Off) + case 4: // word + return fmt.Sprintf("ld [x + %d]", a.Off) + default: + return fmt.Sprintf("unknown instruction: %#v", a) + } +} + +// LoadMemShift multiplies the first 4 bits of the byte at packet[Off] +// by 4 and stores the result in register X. +// +// This instruction is mainly useful to load into X the length of an +// IPv4 packet header in a single instruction, rather than have to do +// the arithmetic on the header's first byte by hand. +type LoadMemShift struct { + Off uint32 +} + +// Assemble implements the Instruction Assemble method. +func (a LoadMemShift) Assemble() (RawInstruction, error) { + return assembleLoad(RegX, 1, opAddrModeMemShift, a.Off) +} + +// String returns the the instruction in assembler notation. +func (a LoadMemShift) String() string { + return fmt.Sprintf("ldx 4*([%d]&0xf)", a.Off) +} + +// LoadExtension invokes a linux-specific extension and stores the +// result in register A. +type LoadExtension struct { + Num Extension +} + +// Assemble implements the Instruction Assemble method. +func (a LoadExtension) Assemble() (RawInstruction, error) { + if a.Num == ExtLen { + return assembleLoad(RegA, 4, opAddrModePacketLen, 0) + } + return assembleLoad(RegA, 4, opAddrModeAbsolute, uint32(extOffset+a.Num)) +} + +// String returns the the instruction in assembler notation. +func (a LoadExtension) String() string { + switch a.Num { + case ExtLen: + return "ld #len" + case ExtProto: + return "ld #proto" + case ExtType: + return "ld #type" + case ExtPayloadOffset: + return "ld #poff" + case ExtInterfaceIndex: + return "ld #ifidx" + case ExtNetlinkAttr: + return "ld #nla" + case ExtNetlinkAttrNested: + return "ld #nlan" + case ExtMark: + return "ld #mark" + case ExtQueue: + return "ld #queue" + case ExtLinkLayerType: + return "ld #hatype" + case ExtRXHash: + return "ld #rxhash" + case ExtCPUID: + return "ld #cpu" + case ExtVLANTag: + return "ld #vlan_tci" + case ExtVLANTagPresent: + return "ld #vlan_avail" + case ExtVLANProto: + return "ld #vlan_tpid" + case ExtRand: + return "ld #rand" + default: + return fmt.Sprintf("unknown instruction: %#v", a) + } +} + +// StoreScratch stores register Src into scratch[N]. +type StoreScratch struct { + Src Register + N int // 0-15 +} + +// Assemble implements the Instruction Assemble method. +func (a StoreScratch) Assemble() (RawInstruction, error) { + if a.N < 0 || a.N > 15 { + return RawInstruction{}, fmt.Errorf("invalid scratch slot %d", a.N) + } + var op uint16 + switch a.Src { + case RegA: + op = opClsStoreA + case RegX: + op = opClsStoreX + default: + return RawInstruction{}, fmt.Errorf("invalid source register %v", a.Src) + } + + return RawInstruction{ + Op: op, + K: uint32(a.N), + }, nil +} + +// String returns the the instruction in assembler notation. +func (a StoreScratch) String() string { + switch a.Src { + case RegA: + return fmt.Sprintf("st M[%d]", a.N) + case RegX: + return fmt.Sprintf("stx M[%d]", a.N) + default: + return fmt.Sprintf("unknown instruction: %#v", a) + } +} + +// ALUOpConstant executes A = A Val. +type ALUOpConstant struct { + Op ALUOp + Val uint32 +} + +// Assemble implements the Instruction Assemble method. +func (a ALUOpConstant) Assemble() (RawInstruction, error) { + return RawInstruction{ + Op: opClsALU | opALUSrcConstant | uint16(a.Op), + K: a.Val, + }, nil +} + +// String returns the the instruction in assembler notation. +func (a ALUOpConstant) String() string { + switch a.Op { + case ALUOpAdd: + return fmt.Sprintf("add #%d", a.Val) + case ALUOpSub: + return fmt.Sprintf("sub #%d", a.Val) + case ALUOpMul: + return fmt.Sprintf("mul #%d", a.Val) + case ALUOpDiv: + return fmt.Sprintf("div #%d", a.Val) + case ALUOpMod: + return fmt.Sprintf("mod #%d", a.Val) + case ALUOpAnd: + return fmt.Sprintf("and #%d", a.Val) + case ALUOpOr: + return fmt.Sprintf("or #%d", a.Val) + case ALUOpXor: + return fmt.Sprintf("xor #%d", a.Val) + case ALUOpShiftLeft: + return fmt.Sprintf("lsh #%d", a.Val) + case ALUOpShiftRight: + return fmt.Sprintf("rsh #%d", a.Val) + default: + return fmt.Sprintf("unknown instruction: %#v", a) + } +} + +// ALUOpX executes A = A X +type ALUOpX struct { + Op ALUOp +} + +// Assemble implements the Instruction Assemble method. +func (a ALUOpX) Assemble() (RawInstruction, error) { + return RawInstruction{ + Op: opClsALU | opALUSrcX | uint16(a.Op), + }, nil +} + +// String returns the the instruction in assembler notation. +func (a ALUOpX) String() string { + switch a.Op { + case ALUOpAdd: + return "add x" + case ALUOpSub: + return "sub x" + case ALUOpMul: + return "mul x" + case ALUOpDiv: + return "div x" + case ALUOpMod: + return "mod x" + case ALUOpAnd: + return "and x" + case ALUOpOr: + return "or x" + case ALUOpXor: + return "xor x" + case ALUOpShiftLeft: + return "lsh x" + case ALUOpShiftRight: + return "rsh x" + default: + return fmt.Sprintf("unknown instruction: %#v", a) + } +} + +// NegateA executes A = -A. +type NegateA struct{} + +// Assemble implements the Instruction Assemble method. +func (a NegateA) Assemble() (RawInstruction, error) { + return RawInstruction{ + Op: opClsALU | uint16(aluOpNeg), + }, nil +} + +// String returns the the instruction in assembler notation. +func (a NegateA) String() string { + return fmt.Sprintf("neg") +} + +// Jump skips the following Skip instructions in the program. +type Jump struct { + Skip uint32 +} + +// Assemble implements the Instruction Assemble method. +func (a Jump) Assemble() (RawInstruction, error) { + return RawInstruction{ + Op: opClsJump | opJumpAlways, + K: a.Skip, + }, nil +} + +// String returns the the instruction in assembler notation. +func (a Jump) String() string { + return fmt.Sprintf("ja %d", a.Skip) +} + +// JumpIf skips the following Skip instructions in the program if A +// Val is true. +type JumpIf struct { + Cond JumpTest + Val uint32 + SkipTrue uint8 + SkipFalse uint8 +} + +// Assemble implements the Instruction Assemble method. +func (a JumpIf) Assemble() (RawInstruction, error) { + var ( + cond uint16 + flip bool + ) + switch a.Cond { + case JumpEqual: + cond = opJumpEqual + case JumpNotEqual: + cond, flip = opJumpEqual, true + case JumpGreaterThan: + cond = opJumpGT + case JumpLessThan: + cond, flip = opJumpGE, true + case JumpGreaterOrEqual: + cond = opJumpGE + case JumpLessOrEqual: + cond, flip = opJumpGT, true + case JumpBitsSet: + cond = opJumpSet + case JumpBitsNotSet: + cond, flip = opJumpSet, true + default: + return RawInstruction{}, fmt.Errorf("unknown JumpTest %v", a.Cond) + } + jt, jf := a.SkipTrue, a.SkipFalse + if flip { + jt, jf = jf, jt + } + return RawInstruction{ + Op: opClsJump | cond, + Jt: jt, + Jf: jf, + K: a.Val, + }, nil +} + +// String returns the the instruction in assembler notation. +func (a JumpIf) String() string { + switch a.Cond { + // K == A + case JumpEqual: + return conditionalJump(a, "jeq", "jneq") + // K != A + case JumpNotEqual: + return fmt.Sprintf("jneq #%d,%d", a.Val, a.SkipTrue) + // K > A + case JumpGreaterThan: + return conditionalJump(a, "jgt", "jle") + // K < A + case JumpLessThan: + return fmt.Sprintf("jlt #%d,%d", a.Val, a.SkipTrue) + // K >= A + case JumpGreaterOrEqual: + return conditionalJump(a, "jge", "jlt") + // K <= A + case JumpLessOrEqual: + return fmt.Sprintf("jle #%d,%d", a.Val, a.SkipTrue) + // K & A != 0 + case JumpBitsSet: + if a.SkipFalse > 0 { + return fmt.Sprintf("jset #%d,%d,%d", a.Val, a.SkipTrue, a.SkipFalse) + } + return fmt.Sprintf("jset #%d,%d", a.Val, a.SkipTrue) + // K & A == 0, there is no assembler instruction for JumpBitNotSet, use JumpBitSet and invert skips + case JumpBitsNotSet: + return JumpIf{Cond: JumpBitsSet, SkipTrue: a.SkipFalse, SkipFalse: a.SkipTrue, Val: a.Val}.String() + default: + return fmt.Sprintf("unknown instruction: %#v", a) + } +} + +func conditionalJump(inst JumpIf, positiveJump, negativeJump string) string { + if inst.SkipTrue > 0 { + if inst.SkipFalse > 0 { + return fmt.Sprintf("%s #%d,%d,%d", positiveJump, inst.Val, inst.SkipTrue, inst.SkipFalse) + } + return fmt.Sprintf("%s #%d,%d", positiveJump, inst.Val, inst.SkipTrue) + } + return fmt.Sprintf("%s #%d,%d", negativeJump, inst.Val, inst.SkipFalse) +} + +// RetA exits the BPF program, returning the value of register A. +type RetA struct{} + +// Assemble implements the Instruction Assemble method. +func (a RetA) Assemble() (RawInstruction, error) { + return RawInstruction{ + Op: opClsReturn | opRetSrcA, + }, nil +} + +// String returns the the instruction in assembler notation. +func (a RetA) String() string { + return fmt.Sprintf("ret a") +} + +// RetConstant exits the BPF program, returning a constant value. +type RetConstant struct { + Val uint32 +} + +// Assemble implements the Instruction Assemble method. +func (a RetConstant) Assemble() (RawInstruction, error) { + return RawInstruction{ + Op: opClsReturn | opRetSrcConstant, + K: a.Val, + }, nil +} + +// String returns the the instruction in assembler notation. +func (a RetConstant) String() string { + return fmt.Sprintf("ret #%d", a.Val) +} + +// TXA copies the value of register X to register A. +type TXA struct{} + +// Assemble implements the Instruction Assemble method. +func (a TXA) Assemble() (RawInstruction, error) { + return RawInstruction{ + Op: opClsMisc | opMiscTXA, + }, nil +} + +// String returns the the instruction in assembler notation. +func (a TXA) String() string { + return fmt.Sprintf("txa") +} + +// TAX copies the value of register A to register X. +type TAX struct{} + +// Assemble implements the Instruction Assemble method. +func (a TAX) Assemble() (RawInstruction, error) { + return RawInstruction{ + Op: opClsMisc | opMiscTAX, + }, nil +} + +// String returns the the instruction in assembler notation. +func (a TAX) String() string { + return fmt.Sprintf("tax") +} + +func assembleLoad(dst Register, loadSize int, mode uint16, k uint32) (RawInstruction, error) { + var ( + cls uint16 + sz uint16 + ) + switch dst { + case RegA: + cls = opClsLoadA + case RegX: + cls = opClsLoadX + default: + return RawInstruction{}, fmt.Errorf("invalid target register %v", dst) + } + switch loadSize { + case 1: + sz = opLoadWidth1 + case 2: + sz = opLoadWidth2 + case 4: + sz = opLoadWidth4 + default: + return RawInstruction{}, fmt.Errorf("invalid load byte length %d", sz) + } + return RawInstruction{ + Op: cls | sz | mode, + K: k, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/bpf/setter.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/bpf/setter.go new file mode 100644 index 000000000..43e35f0ac --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/bpf/setter.go @@ -0,0 +1,10 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package bpf + +// A Setter is a type which can attach a compiled BPF filter to itself. +type Setter interface { + SetBPF(filter []RawInstruction) error +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/bpf/vm.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/bpf/vm.go new file mode 100644 index 000000000..4c656f1e1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/bpf/vm.go @@ -0,0 +1,140 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package bpf + +import ( + "errors" + "fmt" +) + +// A VM is an emulated BPF virtual machine. +type VM struct { + filter []Instruction +} + +// NewVM returns a new VM using the input BPF program. +func NewVM(filter []Instruction) (*VM, error) { + if len(filter) == 0 { + return nil, errors.New("one or more Instructions must be specified") + } + + for i, ins := range filter { + check := len(filter) - (i + 1) + switch ins := ins.(type) { + // Check for out-of-bounds jumps in instructions + case Jump: + if check <= int(ins.Skip) { + return nil, fmt.Errorf("cannot jump %d instructions; jumping past program bounds", ins.Skip) + } + case JumpIf: + if check <= int(ins.SkipTrue) { + return nil, fmt.Errorf("cannot jump %d instructions in true case; jumping past program bounds", ins.SkipTrue) + } + if check <= int(ins.SkipFalse) { + return nil, fmt.Errorf("cannot jump %d instructions in false case; jumping past program bounds", ins.SkipFalse) + } + // Check for division or modulus by zero + case ALUOpConstant: + if ins.Val != 0 { + break + } + + switch ins.Op { + case ALUOpDiv, ALUOpMod: + return nil, errors.New("cannot divide by zero using ALUOpConstant") + } + // Check for unknown extensions + case LoadExtension: + switch ins.Num { + case ExtLen: + default: + return nil, fmt.Errorf("extension %d not implemented", ins.Num) + } + } + } + + // Make sure last instruction is a return instruction + switch filter[len(filter)-1].(type) { + case RetA, RetConstant: + default: + return nil, errors.New("BPF program must end with RetA or RetConstant") + } + + // Though our VM works using disassembled instructions, we + // attempt to assemble the input filter anyway to ensure it is compatible + // with an operating system VM. + _, err := Assemble(filter) + + return &VM{ + filter: filter, + }, err +} + +// Run runs the VM's BPF program against the input bytes. +// Run returns the number of bytes accepted by the BPF program, and any errors +// which occurred while processing the program. +func (v *VM) Run(in []byte) (int, error) { + var ( + // Registers of the virtual machine + regA uint32 + regX uint32 + regScratch [16]uint32 + + // OK is true if the program should continue processing the next + // instruction, or false if not, causing the loop to break + ok = true + ) + + // TODO(mdlayher): implement: + // - NegateA: + // - would require a change from uint32 registers to int32 + // registers + + // TODO(mdlayher): add interop tests that check signedness of ALU + // operations against kernel implementation, and make sure Go + // implementation matches behavior + + for i := 0; i < len(v.filter) && ok; i++ { + ins := v.filter[i] + + switch ins := ins.(type) { + case ALUOpConstant: + regA = aluOpConstant(ins, regA) + case ALUOpX: + regA, ok = aluOpX(ins, regA, regX) + case Jump: + i += int(ins.Skip) + case JumpIf: + jump := jumpIf(ins, regA) + i += jump + case LoadAbsolute: + regA, ok = loadAbsolute(ins, in) + case LoadConstant: + regA, regX = loadConstant(ins, regA, regX) + case LoadExtension: + regA = loadExtension(ins, in) + case LoadIndirect: + regA, ok = loadIndirect(ins, in, regX) + case LoadMemShift: + regX, ok = loadMemShift(ins, in) + case LoadScratch: + regA, regX = loadScratch(ins, regScratch, regA, regX) + case RetA: + return int(regA), nil + case RetConstant: + return int(ins.Val), nil + case StoreScratch: + regScratch = storeScratch(ins, regScratch, regA, regX) + case TAX: + regX = regA + case TXA: + regA = regX + default: + return 0, fmt.Errorf("unknown Instruction at index %d: %T", i, ins) + } + } + + return 0, nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/bpf/vm_instructions.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/bpf/vm_instructions.go new file mode 100644 index 000000000..516f9462b --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/bpf/vm_instructions.go @@ -0,0 +1,174 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package bpf + +import ( + "encoding/binary" + "fmt" +) + +func aluOpConstant(ins ALUOpConstant, regA uint32) uint32 { + return aluOpCommon(ins.Op, regA, ins.Val) +} + +func aluOpX(ins ALUOpX, regA uint32, regX uint32) (uint32, bool) { + // Guard against division or modulus by zero by terminating + // the program, as the OS BPF VM does + if regX == 0 { + switch ins.Op { + case ALUOpDiv, ALUOpMod: + return 0, false + } + } + + return aluOpCommon(ins.Op, regA, regX), true +} + +func aluOpCommon(op ALUOp, regA uint32, value uint32) uint32 { + switch op { + case ALUOpAdd: + return regA + value + case ALUOpSub: + return regA - value + case ALUOpMul: + return regA * value + case ALUOpDiv: + // Division by zero not permitted by NewVM and aluOpX checks + return regA / value + case ALUOpOr: + return regA | value + case ALUOpAnd: + return regA & value + case ALUOpShiftLeft: + return regA << value + case ALUOpShiftRight: + return regA >> value + case ALUOpMod: + // Modulus by zero not permitted by NewVM and aluOpX checks + return regA % value + case ALUOpXor: + return regA ^ value + default: + return regA + } +} + +func jumpIf(ins JumpIf, value uint32) int { + var ok bool + inV := uint32(ins.Val) + + switch ins.Cond { + case JumpEqual: + ok = value == inV + case JumpNotEqual: + ok = value != inV + case JumpGreaterThan: + ok = value > inV + case JumpLessThan: + ok = value < inV + case JumpGreaterOrEqual: + ok = value >= inV + case JumpLessOrEqual: + ok = value <= inV + case JumpBitsSet: + ok = (value & inV) != 0 + case JumpBitsNotSet: + ok = (value & inV) == 0 + } + + if ok { + return int(ins.SkipTrue) + } + + return int(ins.SkipFalse) +} + +func loadAbsolute(ins LoadAbsolute, in []byte) (uint32, bool) { + offset := int(ins.Off) + size := int(ins.Size) + + return loadCommon(in, offset, size) +} + +func loadConstant(ins LoadConstant, regA uint32, regX uint32) (uint32, uint32) { + switch ins.Dst { + case RegA: + regA = ins.Val + case RegX: + regX = ins.Val + } + + return regA, regX +} + +func loadExtension(ins LoadExtension, in []byte) uint32 { + switch ins.Num { + case ExtLen: + return uint32(len(in)) + default: + panic(fmt.Sprintf("unimplemented extension: %d", ins.Num)) + } +} + +func loadIndirect(ins LoadIndirect, in []byte, regX uint32) (uint32, bool) { + offset := int(ins.Off) + int(regX) + size := int(ins.Size) + + return loadCommon(in, offset, size) +} + +func loadMemShift(ins LoadMemShift, in []byte) (uint32, bool) { + offset := int(ins.Off) + + if !inBounds(len(in), offset, 0) { + return 0, false + } + + // Mask off high 4 bits and multiply low 4 bits by 4 + return uint32(in[offset]&0x0f) * 4, true +} + +func inBounds(inLen int, offset int, size int) bool { + return offset+size <= inLen +} + +func loadCommon(in []byte, offset int, size int) (uint32, bool) { + if !inBounds(len(in), offset, size) { + return 0, false + } + + switch size { + case 1: + return uint32(in[offset]), true + case 2: + return uint32(binary.BigEndian.Uint16(in[offset : offset+size])), true + case 4: + return uint32(binary.BigEndian.Uint32(in[offset : offset+size])), true + default: + panic(fmt.Sprintf("invalid load size: %d", size)) + } +} + +func loadScratch(ins LoadScratch, regScratch [16]uint32, regA uint32, regX uint32) (uint32, uint32) { + switch ins.Dst { + case RegA: + regA = regScratch[ins.N] + case RegX: + regX = regScratch[ins.N] + } + + return regA, regX +} + +func storeScratch(ins StoreScratch, regScratch [16]uint32, regA uint32, regX uint32) [16]uint32 { + switch ins.Src { + case RegA: + regScratch[ins.N] = regA + case RegX: + regScratch[ins.N] = regX + } + + return regScratch +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/iana/const.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/iana/const.go new file mode 100644 index 000000000..c9df24d95 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/iana/const.go @@ -0,0 +1,180 @@ +// go generate gen.go +// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// Package iana provides protocol number resources managed by the Internet Assigned Numbers Authority (IANA). +package iana // import "golang.org/x/net/internal/iana" + +// Differentiated Services Field Codepoints (DSCP), Updated: 2017-05-12 +const ( + DiffServCS0 = 0x0 // CS0 + DiffServCS1 = 0x20 // CS1 + DiffServCS2 = 0x40 // CS2 + DiffServCS3 = 0x60 // CS3 + DiffServCS4 = 0x80 // CS4 + DiffServCS5 = 0xa0 // CS5 + DiffServCS6 = 0xc0 // CS6 + DiffServCS7 = 0xe0 // CS7 + DiffServAF11 = 0x28 // AF11 + DiffServAF12 = 0x30 // AF12 + DiffServAF13 = 0x38 // AF13 + DiffServAF21 = 0x48 // AF21 + DiffServAF22 = 0x50 // AF22 + DiffServAF23 = 0x58 // AF23 + DiffServAF31 = 0x68 // AF31 + DiffServAF32 = 0x70 // AF32 + DiffServAF33 = 0x78 // AF33 + DiffServAF41 = 0x88 // AF41 + DiffServAF42 = 0x90 // AF42 + DiffServAF43 = 0x98 // AF43 + DiffServEF = 0xb8 // EF + DiffServVOICEADMIT = 0xb0 // VOICE-ADMIT +) + +// IPv4 TOS Byte and IPv6 Traffic Class Octet, Updated: 2001-09-06 +const ( + NotECNTransport = 0x0 // Not-ECT (Not ECN-Capable Transport) + ECNTransport1 = 0x1 // ECT(1) (ECN-Capable Transport(1)) + ECNTransport0 = 0x2 // ECT(0) (ECN-Capable Transport(0)) + CongestionExperienced = 0x3 // CE (Congestion Experienced) +) + +// Protocol Numbers, Updated: 2016-06-22 +const ( + ProtocolIP = 0 // IPv4 encapsulation, pseudo protocol number + ProtocolHOPOPT = 0 // IPv6 Hop-by-Hop Option + ProtocolICMP = 1 // Internet Control Message + ProtocolIGMP = 2 // Internet Group Management + ProtocolGGP = 3 // Gateway-to-Gateway + ProtocolIPv4 = 4 // IPv4 encapsulation + ProtocolST = 5 // Stream + ProtocolTCP = 6 // Transmission Control + ProtocolCBT = 7 // CBT + ProtocolEGP = 8 // Exterior Gateway Protocol + ProtocolIGP = 9 // any private interior gateway (used by Cisco for their IGRP) + ProtocolBBNRCCMON = 10 // BBN RCC Monitoring + ProtocolNVPII = 11 // Network Voice Protocol + ProtocolPUP = 12 // PUP + ProtocolEMCON = 14 // EMCON + ProtocolXNET = 15 // Cross Net Debugger + ProtocolCHAOS = 16 // Chaos + ProtocolUDP = 17 // User Datagram + ProtocolMUX = 18 // Multiplexing + ProtocolDCNMEAS = 19 // DCN Measurement Subsystems + ProtocolHMP = 20 // Host Monitoring + ProtocolPRM = 21 // Packet Radio Measurement + ProtocolXNSIDP = 22 // XEROX NS IDP + ProtocolTRUNK1 = 23 // Trunk-1 + ProtocolTRUNK2 = 24 // Trunk-2 + ProtocolLEAF1 = 25 // Leaf-1 + ProtocolLEAF2 = 26 // Leaf-2 + ProtocolRDP = 27 // Reliable Data Protocol + ProtocolIRTP = 28 // Internet Reliable Transaction + ProtocolISOTP4 = 29 // ISO Transport Protocol Class 4 + ProtocolNETBLT = 30 // Bulk Data Transfer Protocol + ProtocolMFENSP = 31 // MFE Network Services Protocol + ProtocolMERITINP = 32 // MERIT Internodal Protocol + ProtocolDCCP = 33 // Datagram Congestion Control Protocol + Protocol3PC = 34 // Third Party Connect Protocol + ProtocolIDPR = 35 // Inter-Domain Policy Routing Protocol + ProtocolXTP = 36 // XTP + ProtocolDDP = 37 // Datagram Delivery Protocol + ProtocolIDPRCMTP = 38 // IDPR Control Message Transport Proto + ProtocolTPPP = 39 // TP++ Transport Protocol + ProtocolIL = 40 // IL Transport Protocol + ProtocolIPv6 = 41 // IPv6 encapsulation + ProtocolSDRP = 42 // Source Demand Routing Protocol + ProtocolIPv6Route = 43 // Routing Header for IPv6 + ProtocolIPv6Frag = 44 // Fragment Header for IPv6 + ProtocolIDRP = 45 // Inter-Domain Routing Protocol + ProtocolRSVP = 46 // Reservation Protocol + ProtocolGRE = 47 // Generic Routing Encapsulation + ProtocolDSR = 48 // Dynamic Source Routing Protocol + ProtocolBNA = 49 // BNA + ProtocolESP = 50 // Encap Security Payload + ProtocolAH = 51 // Authentication Header + ProtocolINLSP = 52 // Integrated Net Layer Security TUBA + ProtocolNARP = 54 // NBMA Address Resolution Protocol + ProtocolMOBILE = 55 // IP Mobility + ProtocolTLSP = 56 // Transport Layer Security Protocol using Kryptonet key management + ProtocolSKIP = 57 // SKIP + ProtocolIPv6ICMP = 58 // ICMP for IPv6 + ProtocolIPv6NoNxt = 59 // No Next Header for IPv6 + ProtocolIPv6Opts = 60 // Destination Options for IPv6 + ProtocolCFTP = 62 // CFTP + ProtocolSATEXPAK = 64 // SATNET and Backroom EXPAK + ProtocolKRYPTOLAN = 65 // Kryptolan + ProtocolRVD = 66 // MIT Remote Virtual Disk Protocol + ProtocolIPPC = 67 // Internet Pluribus Packet Core + ProtocolSATMON = 69 // SATNET Monitoring + ProtocolVISA = 70 // VISA Protocol + ProtocolIPCV = 71 // Internet Packet Core Utility + ProtocolCPNX = 72 // Computer Protocol Network Executive + ProtocolCPHB = 73 // Computer Protocol Heart Beat + ProtocolWSN = 74 // Wang Span Network + ProtocolPVP = 75 // Packet Video Protocol + ProtocolBRSATMON = 76 // Backroom SATNET Monitoring + ProtocolSUNND = 77 // SUN ND PROTOCOL-Temporary + ProtocolWBMON = 78 // WIDEBAND Monitoring + ProtocolWBEXPAK = 79 // WIDEBAND EXPAK + ProtocolISOIP = 80 // ISO Internet Protocol + ProtocolVMTP = 81 // VMTP + ProtocolSECUREVMTP = 82 // SECURE-VMTP + ProtocolVINES = 83 // VINES + ProtocolTTP = 84 // Transaction Transport Protocol + ProtocolIPTM = 84 // Internet Protocol Traffic Manager + ProtocolNSFNETIGP = 85 // NSFNET-IGP + ProtocolDGP = 86 // Dissimilar Gateway Protocol + ProtocolTCF = 87 // TCF + ProtocolEIGRP = 88 // EIGRP + ProtocolOSPFIGP = 89 // OSPFIGP + ProtocolSpriteRPC = 90 // Sprite RPC Protocol + ProtocolLARP = 91 // Locus Address Resolution Protocol + ProtocolMTP = 92 // Multicast Transport Protocol + ProtocolAX25 = 93 // AX.25 Frames + ProtocolIPIP = 94 // IP-within-IP Encapsulation Protocol + ProtocolSCCSP = 96 // Semaphore Communications Sec. Pro. + ProtocolETHERIP = 97 // Ethernet-within-IP Encapsulation + ProtocolENCAP = 98 // Encapsulation Header + ProtocolGMTP = 100 // GMTP + ProtocolIFMP = 101 // Ipsilon Flow Management Protocol + ProtocolPNNI = 102 // PNNI over IP + ProtocolPIM = 103 // Protocol Independent Multicast + ProtocolARIS = 104 // ARIS + ProtocolSCPS = 105 // SCPS + ProtocolQNX = 106 // QNX + ProtocolAN = 107 // Active Networks + ProtocolIPComp = 108 // IP Payload Compression Protocol + ProtocolSNP = 109 // Sitara Networks Protocol + ProtocolCompaqPeer = 110 // Compaq Peer Protocol + ProtocolIPXinIP = 111 // IPX in IP + ProtocolVRRP = 112 // Virtual Router Redundancy Protocol + ProtocolPGM = 113 // PGM Reliable Transport Protocol + ProtocolL2TP = 115 // Layer Two Tunneling Protocol + ProtocolDDX = 116 // D-II Data Exchange (DDX) + ProtocolIATP = 117 // Interactive Agent Transfer Protocol + ProtocolSTP = 118 // Schedule Transfer Protocol + ProtocolSRP = 119 // SpectraLink Radio Protocol + ProtocolUTI = 120 // UTI + ProtocolSMP = 121 // Simple Message Protocol + ProtocolPTP = 123 // Performance Transparency Protocol + ProtocolISIS = 124 // ISIS over IPv4 + ProtocolFIRE = 125 // FIRE + ProtocolCRTP = 126 // Combat Radio Transport Protocol + ProtocolCRUDP = 127 // Combat Radio User Datagram + ProtocolSSCOPMCE = 128 // SSCOPMCE + ProtocolIPLT = 129 // IPLT + ProtocolSPS = 130 // Secure Packet Shield + ProtocolPIPE = 131 // Private IP Encapsulation within IP + ProtocolSCTP = 132 // Stream Control Transmission Protocol + ProtocolFC = 133 // Fibre Channel + ProtocolRSVPE2EIGNORE = 134 // RSVP-E2E-IGNORE + ProtocolMobilityHeader = 135 // Mobility Header + ProtocolUDPLite = 136 // UDPLite + ProtocolMPLSinIP = 137 // MPLS-in-IP + ProtocolMANET = 138 // MANET Protocols + ProtocolHIP = 139 // Host Identity Protocol + ProtocolShim6 = 140 // Shim6 Protocol + ProtocolWESP = 141 // Wrapped Encapsulating Security Payload + ProtocolROHC = 142 // Robust Header Compression + ProtocolReserved = 255 // Reserved +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/cmsghdr.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/cmsghdr.go new file mode 100644 index 000000000..1eb07d26d --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/cmsghdr.go @@ -0,0 +1,11 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd solaris + +package socket + +func (h *cmsghdr) len() int { return int(h.Len) } +func (h *cmsghdr) lvl() int { return int(h.Level) } +func (h *cmsghdr) typ() int { return int(h.Type) } diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/cmsghdr_bsd.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/cmsghdr_bsd.go new file mode 100644 index 000000000..d1d0c2de5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/cmsghdr_bsd.go @@ -0,0 +1,13 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd netbsd openbsd + +package socket + +func (h *cmsghdr) set(l, lvl, typ int) { + h.Len = uint32(l) + h.Level = int32(lvl) + h.Type = int32(typ) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/cmsghdr_linux_32bit.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/cmsghdr_linux_32bit.go new file mode 100644 index 000000000..bac66811d --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/cmsghdr_linux_32bit.go @@ -0,0 +1,14 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build arm mips mipsle 386 +// +build linux + +package socket + +func (h *cmsghdr) set(l, lvl, typ int) { + h.Len = uint32(l) + h.Level = int32(lvl) + h.Type = int32(typ) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/cmsghdr_linux_64bit.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/cmsghdr_linux_64bit.go new file mode 100644 index 000000000..63f0534fa --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/cmsghdr_linux_64bit.go @@ -0,0 +1,14 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build arm64 amd64 ppc64 ppc64le mips64 mips64le s390x +// +build linux + +package socket + +func (h *cmsghdr) set(l, lvl, typ int) { + h.Len = uint64(l) + h.Level = int32(lvl) + h.Type = int32(typ) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/cmsghdr_solaris_64bit.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/cmsghdr_solaris_64bit.go new file mode 100644 index 000000000..7dedd430e --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/cmsghdr_solaris_64bit.go @@ -0,0 +1,14 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build amd64 +// +build solaris + +package socket + +func (h *cmsghdr) set(l, lvl, typ int) { + h.Len = uint32(l) + h.Level = int32(lvl) + h.Type = int32(typ) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/cmsghdr_stub.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/cmsghdr_stub.go new file mode 100644 index 000000000..a4e71226f --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/cmsghdr_stub.go @@ -0,0 +1,17 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris + +package socket + +type cmsghdr struct{} + +const sizeofCmsghdr = 0 + +func (h *cmsghdr) len() int { return 0 } +func (h *cmsghdr) lvl() int { return 0 } +func (h *cmsghdr) typ() int { return 0 } + +func (h *cmsghdr) set(l, lvl, typ int) {} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/error_unix.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/error_unix.go new file mode 100644 index 000000000..93dff9180 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/error_unix.go @@ -0,0 +1,31 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd solaris + +package socket + +import "syscall" + +var ( + errEAGAIN error = syscall.EAGAIN + errEINVAL error = syscall.EINVAL + errENOENT error = syscall.ENOENT +) + +// errnoErr returns common boxed Errno values, to prevent allocations +// at runtime. +func errnoErr(errno syscall.Errno) error { + switch errno { + case 0: + return nil + case syscall.EAGAIN: + return errEAGAIN + case syscall.EINVAL: + return errEINVAL + case syscall.ENOENT: + return errENOENT + } + return errno +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/error_windows.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/error_windows.go new file mode 100644 index 000000000..6a6379a8b --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/error_windows.go @@ -0,0 +1,26 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package socket + +import "syscall" + +var ( + errERROR_IO_PENDING error = syscall.ERROR_IO_PENDING + errEINVAL error = syscall.EINVAL +) + +// errnoErr returns common boxed Errno values, to prevent allocations +// at runtime. +func errnoErr(errno syscall.Errno) error { + switch errno { + case 0: + return nil + case syscall.ERROR_IO_PENDING: + return errERROR_IO_PENDING + case syscall.EINVAL: + return errEINVAL + } + return errno +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/iovec_32bit.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/iovec_32bit.go new file mode 100644 index 000000000..05d6082d1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/iovec_32bit.go @@ -0,0 +1,19 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build arm mips mipsle 386 +// +build darwin dragonfly freebsd linux netbsd openbsd + +package socket + +import "unsafe" + +func (v *iovec) set(b []byte) { + l := len(b) + if l == 0 { + return + } + v.Base = (*byte)(unsafe.Pointer(&b[0])) + v.Len = uint32(l) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/iovec_64bit.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/iovec_64bit.go new file mode 100644 index 000000000..afb34ad58 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/iovec_64bit.go @@ -0,0 +1,19 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build arm64 amd64 ppc64 ppc64le mips64 mips64le s390x +// +build darwin dragonfly freebsd linux netbsd openbsd + +package socket + +import "unsafe" + +func (v *iovec) set(b []byte) { + l := len(b) + if l == 0 { + return + } + v.Base = (*byte)(unsafe.Pointer(&b[0])) + v.Len = uint64(l) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/iovec_solaris_64bit.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/iovec_solaris_64bit.go new file mode 100644 index 000000000..8d17a40c4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/iovec_solaris_64bit.go @@ -0,0 +1,19 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build amd64 +// +build solaris + +package socket + +import "unsafe" + +func (v *iovec) set(b []byte) { + l := len(b) + if l == 0 { + return + } + v.Base = (*int8)(unsafe.Pointer(&b[0])) + v.Len = uint64(l) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/iovec_stub.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/iovec_stub.go new file mode 100644 index 000000000..c87d2a933 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/iovec_stub.go @@ -0,0 +1,11 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris + +package socket + +type iovec struct{} + +func (v *iovec) set(b []byte) {} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/mmsghdr_stub.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/mmsghdr_stub.go new file mode 100644 index 000000000..2e80a9cb7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/mmsghdr_stub.go @@ -0,0 +1,21 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !linux,!netbsd + +package socket + +import "net" + +type mmsghdr struct{} + +type mmsghdrs []mmsghdr + +func (hs mmsghdrs) pack(ms []Message, parseFn func([]byte, string) (net.Addr, error), marshalFn func(net.Addr) []byte) error { + return nil +} + +func (hs mmsghdrs) unpack(ms []Message, parseFn func([]byte, string) (net.Addr, error), hint string) error { + return nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/mmsghdr_unix.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/mmsghdr_unix.go new file mode 100644 index 000000000..3c42ea7ad --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/mmsghdr_unix.go @@ -0,0 +1,42 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build linux netbsd + +package socket + +import "net" + +type mmsghdrs []mmsghdr + +func (hs mmsghdrs) pack(ms []Message, parseFn func([]byte, string) (net.Addr, error), marshalFn func(net.Addr) []byte) error { + for i := range hs { + vs := make([]iovec, len(ms[i].Buffers)) + var sa []byte + if parseFn != nil { + sa = make([]byte, sizeofSockaddrInet6) + } + if marshalFn != nil { + sa = marshalFn(ms[i].Addr) + } + hs[i].Hdr.pack(vs, ms[i].Buffers, ms[i].OOB, sa) + } + return nil +} + +func (hs mmsghdrs) unpack(ms []Message, parseFn func([]byte, string) (net.Addr, error), hint string) error { + for i := range hs { + ms[i].N = int(hs[i].Len) + ms[i].NN = hs[i].Hdr.controllen() + ms[i].Flags = hs[i].Hdr.flags() + if parseFn != nil { + var err error + ms[i].Addr, err = parseFn(hs[i].Hdr.name(), hint) + if err != nil { + return err + } + } + } + return nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/msghdr_bsd.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/msghdr_bsd.go new file mode 100644 index 000000000..5567afc88 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/msghdr_bsd.go @@ -0,0 +1,39 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd netbsd openbsd + +package socket + +import "unsafe" + +func (h *msghdr) pack(vs []iovec, bs [][]byte, oob []byte, sa []byte) { + for i := range vs { + vs[i].set(bs[i]) + } + h.setIov(vs) + if len(oob) > 0 { + h.Control = (*byte)(unsafe.Pointer(&oob[0])) + h.Controllen = uint32(len(oob)) + } + if sa != nil { + h.Name = (*byte)(unsafe.Pointer(&sa[0])) + h.Namelen = uint32(len(sa)) + } +} + +func (h *msghdr) name() []byte { + if h.Name != nil && h.Namelen > 0 { + return (*[sizeofSockaddrInet6]byte)(unsafe.Pointer(h.Name))[:h.Namelen] + } + return nil +} + +func (h *msghdr) controllen() int { + return int(h.Controllen) +} + +func (h *msghdr) flags() int { + return int(h.Flags) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/msghdr_bsdvar.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/msghdr_bsdvar.go new file mode 100644 index 000000000..b8c87b72b --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/msghdr_bsdvar.go @@ -0,0 +1,16 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd netbsd + +package socket + +func (h *msghdr) setIov(vs []iovec) { + l := len(vs) + if l == 0 { + return + } + h.Iov = &vs[0] + h.Iovlen = int32(l) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/msghdr_linux.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/msghdr_linux.go new file mode 100644 index 000000000..5a38798cc --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/msghdr_linux.go @@ -0,0 +1,36 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package socket + +import "unsafe" + +func (h *msghdr) pack(vs []iovec, bs [][]byte, oob []byte, sa []byte) { + for i := range vs { + vs[i].set(bs[i]) + } + h.setIov(vs) + if len(oob) > 0 { + h.setControl(oob) + } + if sa != nil { + h.Name = (*byte)(unsafe.Pointer(&sa[0])) + h.Namelen = uint32(len(sa)) + } +} + +func (h *msghdr) name() []byte { + if h.Name != nil && h.Namelen > 0 { + return (*[sizeofSockaddrInet6]byte)(unsafe.Pointer(h.Name))[:h.Namelen] + } + return nil +} + +func (h *msghdr) controllen() int { + return int(h.Controllen) +} + +func (h *msghdr) flags() int { + return int(h.Flags) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/msghdr_linux_32bit.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/msghdr_linux_32bit.go new file mode 100644 index 000000000..a7a5987c8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/msghdr_linux_32bit.go @@ -0,0 +1,24 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build arm mips mipsle 386 +// +build linux + +package socket + +import "unsafe" + +func (h *msghdr) setIov(vs []iovec) { + l := len(vs) + if l == 0 { + return + } + h.Iov = &vs[0] + h.Iovlen = uint32(l) +} + +func (h *msghdr) setControl(b []byte) { + h.Control = (*byte)(unsafe.Pointer(&b[0])) + h.Controllen = uint32(len(b)) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/msghdr_linux_64bit.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/msghdr_linux_64bit.go new file mode 100644 index 000000000..610fc4f3b --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/msghdr_linux_64bit.go @@ -0,0 +1,24 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build arm64 amd64 ppc64 ppc64le mips64 mips64le s390x +// +build linux + +package socket + +import "unsafe" + +func (h *msghdr) setIov(vs []iovec) { + l := len(vs) + if l == 0 { + return + } + h.Iov = &vs[0] + h.Iovlen = uint64(l) +} + +func (h *msghdr) setControl(b []byte) { + h.Control = (*byte)(unsafe.Pointer(&b[0])) + h.Controllen = uint64(len(b)) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/msghdr_openbsd.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/msghdr_openbsd.go new file mode 100644 index 000000000..71a69e251 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/msghdr_openbsd.go @@ -0,0 +1,14 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package socket + +func (h *msghdr) setIov(vs []iovec) { + l := len(vs) + if l == 0 { + return + } + h.Iov = &vs[0] + h.Iovlen = uint32(l) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/msghdr_solaris_64bit.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/msghdr_solaris_64bit.go new file mode 100644 index 000000000..6465b2073 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/msghdr_solaris_64bit.go @@ -0,0 +1,36 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build amd64 +// +build solaris + +package socket + +import "unsafe" + +func (h *msghdr) pack(vs []iovec, bs [][]byte, oob []byte, sa []byte) { + for i := range vs { + vs[i].set(bs[i]) + } + if len(vs) > 0 { + h.Iov = &vs[0] + h.Iovlen = int32(len(vs)) + } + if len(oob) > 0 { + h.Accrights = (*int8)(unsafe.Pointer(&oob[0])) + h.Accrightslen = int32(len(oob)) + } + if sa != nil { + h.Name = (*byte)(unsafe.Pointer(&sa[0])) + h.Namelen = uint32(len(sa)) + } +} + +func (h *msghdr) controllen() int { + return int(h.Accrightslen) +} + +func (h *msghdr) flags() int { + return int(NativeEndian.Uint32(h.Pad_cgo_2[:])) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/msghdr_stub.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/msghdr_stub.go new file mode 100644 index 000000000..64e817335 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/msghdr_stub.go @@ -0,0 +1,14 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris + +package socket + +type msghdr struct{} + +func (h *msghdr) pack(vs []iovec, bs [][]byte, oob []byte, sa []byte) {} +func (h *msghdr) name() []byte { return nil } +func (h *msghdr) controllen() int { return 0 } +func (h *msghdr) flags() int { return 0 } diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/rawconn.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/rawconn.go new file mode 100644 index 000000000..d6871d55f --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/rawconn.go @@ -0,0 +1,66 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build go1.9 + +package socket + +import ( + "errors" + "net" + "os" + "syscall" +) + +// A Conn represents a raw connection. +type Conn struct { + network string + c syscall.RawConn +} + +// NewConn returns a new raw connection. +func NewConn(c net.Conn) (*Conn, error) { + var err error + var cc Conn + switch c := c.(type) { + case *net.TCPConn: + cc.network = "tcp" + cc.c, err = c.SyscallConn() + case *net.UDPConn: + cc.network = "udp" + cc.c, err = c.SyscallConn() + case *net.IPConn: + cc.network = "ip" + cc.c, err = c.SyscallConn() + default: + return nil, errors.New("unknown connection type") + } + if err != nil { + return nil, err + } + return &cc, nil +} + +func (o *Option) get(c *Conn, b []byte) (int, error) { + var operr error + var n int + fn := func(s uintptr) { + n, operr = getsockopt(s, o.Level, o.Name, b) + } + if err := c.c.Control(fn); err != nil { + return 0, err + } + return n, os.NewSyscallError("getsockopt", operr) +} + +func (o *Option) set(c *Conn, b []byte) error { + var operr error + fn := func(s uintptr) { + operr = setsockopt(s, o.Level, o.Name, b) + } + if err := c.c.Control(fn); err != nil { + return err + } + return os.NewSyscallError("setsockopt", operr) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/rawconn_mmsg.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/rawconn_mmsg.go new file mode 100644 index 000000000..499164a3f --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/rawconn_mmsg.go @@ -0,0 +1,74 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build go1.9 +// +build linux + +package socket + +import ( + "net" + "os" + "syscall" +) + +func (c *Conn) recvMsgs(ms []Message, flags int) (int, error) { + hs := make(mmsghdrs, len(ms)) + var parseFn func([]byte, string) (net.Addr, error) + if c.network != "tcp" { + parseFn = parseInetAddr + } + if err := hs.pack(ms, parseFn, nil); err != nil { + return 0, err + } + var operr error + var n int + fn := func(s uintptr) bool { + n, operr = recvmmsg(s, hs, flags) + if operr == syscall.EAGAIN { + return false + } + return true + } + if err := c.c.Read(fn); err != nil { + return n, err + } + if operr != nil { + return n, os.NewSyscallError("recvmmsg", operr) + } + if err := hs[:n].unpack(ms[:n], parseFn, c.network); err != nil { + return n, err + } + return n, nil +} + +func (c *Conn) sendMsgs(ms []Message, flags int) (int, error) { + hs := make(mmsghdrs, len(ms)) + var marshalFn func(net.Addr) []byte + if c.network != "tcp" { + marshalFn = marshalInetAddr + } + if err := hs.pack(ms, nil, marshalFn); err != nil { + return 0, err + } + var operr error + var n int + fn := func(s uintptr) bool { + n, operr = sendmmsg(s, hs, flags) + if operr == syscall.EAGAIN { + return false + } + return true + } + if err := c.c.Write(fn); err != nil { + return n, err + } + if operr != nil { + return n, os.NewSyscallError("sendmmsg", operr) + } + if err := hs[:n].unpack(ms[:n], nil, ""); err != nil { + return n, err + } + return n, nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/rawconn_msg.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/rawconn_msg.go new file mode 100644 index 000000000..b21d2e641 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/rawconn_msg.go @@ -0,0 +1,77 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build go1.9 +// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows + +package socket + +import ( + "os" + "syscall" +) + +func (c *Conn) recvMsg(m *Message, flags int) error { + var h msghdr + vs := make([]iovec, len(m.Buffers)) + var sa []byte + if c.network != "tcp" { + sa = make([]byte, sizeofSockaddrInet6) + } + h.pack(vs, m.Buffers, m.OOB, sa) + var operr error + var n int + fn := func(s uintptr) bool { + n, operr = recvmsg(s, &h, flags) + if operr == syscall.EAGAIN { + return false + } + return true + } + if err := c.c.Read(fn); err != nil { + return err + } + if operr != nil { + return os.NewSyscallError("recvmsg", operr) + } + if c.network != "tcp" { + var err error + m.Addr, err = parseInetAddr(sa[:], c.network) + if err != nil { + return err + } + } + m.N = n + m.NN = h.controllen() + m.Flags = h.flags() + return nil +} + +func (c *Conn) sendMsg(m *Message, flags int) error { + var h msghdr + vs := make([]iovec, len(m.Buffers)) + var sa []byte + if m.Addr != nil { + sa = marshalInetAddr(m.Addr) + } + h.pack(vs, m.Buffers, m.OOB, sa) + var operr error + var n int + fn := func(s uintptr) bool { + n, operr = sendmsg(s, &h, flags) + if operr == syscall.EAGAIN { + return false + } + return true + } + if err := c.c.Write(fn); err != nil { + return err + } + if operr != nil { + return os.NewSyscallError("sendmsg", operr) + } + m.N = n + m.NN = len(m.OOB) + return nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/rawconn_nommsg.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/rawconn_nommsg.go new file mode 100644 index 000000000..f78832aa4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/rawconn_nommsg.go @@ -0,0 +1,18 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build go1.9 +// +build !linux + +package socket + +import "errors" + +func (c *Conn) recvMsgs(ms []Message, flags int) (int, error) { + return 0, errors.New("not implemented") +} + +func (c *Conn) sendMsgs(ms []Message, flags int) (int, error) { + return 0, errors.New("not implemented") +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/rawconn_nomsg.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/rawconn_nomsg.go new file mode 100644 index 000000000..96733cbe1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/rawconn_nomsg.go @@ -0,0 +1,18 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build go1.9 +// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows + +package socket + +import "errors" + +func (c *Conn) recvMsg(m *Message, flags int) error { + return errors.New("not implemented") +} + +func (c *Conn) sendMsg(m *Message, flags int) error { + return errors.New("not implemented") +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/rawconn_stub.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/rawconn_stub.go new file mode 100644 index 000000000..d2add1a0a --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/rawconn_stub.go @@ -0,0 +1,25 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !go1.9 + +package socket + +import "errors" + +func (c *Conn) recvMsg(m *Message, flags int) error { + return errors.New("not implemented") +} + +func (c *Conn) sendMsg(m *Message, flags int) error { + return errors.New("not implemented") +} + +func (c *Conn) recvMsgs(ms []Message, flags int) (int, error) { + return 0, errors.New("not implemented") +} + +func (c *Conn) sendMsgs(ms []Message, flags int) (int, error) { + return 0, errors.New("not implemented") +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/reflect.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/reflect.go new file mode 100644 index 000000000..bb179f11d --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/reflect.go @@ -0,0 +1,62 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !go1.9 + +package socket + +import ( + "errors" + "net" + "os" + "reflect" + "runtime" +) + +// A Conn represents a raw connection. +type Conn struct { + c net.Conn +} + +// NewConn returns a new raw connection. +func NewConn(c net.Conn) (*Conn, error) { + return &Conn{c: c}, nil +} + +func (o *Option) get(c *Conn, b []byte) (int, error) { + s, err := socketOf(c.c) + if err != nil { + return 0, err + } + n, err := getsockopt(s, o.Level, o.Name, b) + return n, os.NewSyscallError("getsockopt", err) +} + +func (o *Option) set(c *Conn, b []byte) error { + s, err := socketOf(c.c) + if err != nil { + return err + } + return os.NewSyscallError("setsockopt", setsockopt(s, o.Level, o.Name, b)) +} + +func socketOf(c net.Conn) (uintptr, error) { + switch c.(type) { + case *net.TCPConn, *net.UDPConn, *net.IPConn: + v := reflect.ValueOf(c) + switch e := v.Elem(); e.Kind() { + case reflect.Struct: + fd := e.FieldByName("conn").FieldByName("fd") + switch e := fd.Elem(); e.Kind() { + case reflect.Struct: + sysfd := e.FieldByName("sysfd") + if runtime.GOOS == "windows" { + return uintptr(sysfd.Uint()), nil + } + return uintptr(sysfd.Int()), nil + } + } + } + return 0, errors.New("invalid type") +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/socket.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/socket.go new file mode 100644 index 000000000..5f9730e6d --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/socket.go @@ -0,0 +1,285 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package socket provides a portable interface for socket system +// calls. +package socket // import "golang.org/x/net/internal/socket" + +import ( + "errors" + "net" + "unsafe" +) + +// An Option represents a sticky socket option. +type Option struct { + Level int // level + Name int // name; must be equal or greater than 1 + Len int // length of value in bytes; must be equal or greater than 1 +} + +// Get reads a value for the option from the kernel. +// It returns the number of bytes written into b. +func (o *Option) Get(c *Conn, b []byte) (int, error) { + if o.Name < 1 || o.Len < 1 { + return 0, errors.New("invalid option") + } + if len(b) < o.Len { + return 0, errors.New("short buffer") + } + return o.get(c, b) +} + +// GetInt returns an integer value for the option. +// +// The Len field of Option must be either 1 or 4. +func (o *Option) GetInt(c *Conn) (int, error) { + if o.Len != 1 && o.Len != 4 { + return 0, errors.New("invalid option") + } + var b []byte + var bb [4]byte + if o.Len == 1 { + b = bb[:1] + } else { + b = bb[:4] + } + n, err := o.get(c, b) + if err != nil { + return 0, err + } + if n != o.Len { + return 0, errors.New("invalid option length") + } + if o.Len == 1 { + return int(b[0]), nil + } + return int(NativeEndian.Uint32(b[:4])), nil +} + +// Set writes the option and value to the kernel. +func (o *Option) Set(c *Conn, b []byte) error { + if o.Name < 1 || o.Len < 1 { + return errors.New("invalid option") + } + if len(b) < o.Len { + return errors.New("short buffer") + } + return o.set(c, b) +} + +// SetInt writes the option and value to the kernel. +// +// The Len field of Option must be either 1 or 4. +func (o *Option) SetInt(c *Conn, v int) error { + if o.Len != 1 && o.Len != 4 { + return errors.New("invalid option") + } + var b []byte + if o.Len == 1 { + b = []byte{byte(v)} + } else { + var bb [4]byte + NativeEndian.PutUint32(bb[:o.Len], uint32(v)) + b = bb[:4] + } + return o.set(c, b) +} + +func controlHeaderLen() int { + return roundup(sizeofCmsghdr) +} + +func controlMessageLen(dataLen int) int { + return roundup(sizeofCmsghdr) + dataLen +} + +// ControlMessageSpace returns the whole length of control message. +func ControlMessageSpace(dataLen int) int { + return roundup(sizeofCmsghdr) + roundup(dataLen) +} + +// A ControlMessage represents the head message in a stream of control +// messages. +// +// A control message comprises of a header, data and a few padding +// fields to conform to the interface to the kernel. +// +// See RFC 3542 for further information. +type ControlMessage []byte + +// Data returns the data field of the control message at the head on +// m. +func (m ControlMessage) Data(dataLen int) []byte { + l := controlHeaderLen() + if len(m) < l || len(m) < l+dataLen { + return nil + } + return m[l : l+dataLen] +} + +// Next returns the control message at the next on m. +// +// Next works only for standard control messages. +func (m ControlMessage) Next(dataLen int) ControlMessage { + l := ControlMessageSpace(dataLen) + if len(m) < l { + return nil + } + return m[l:] +} + +// MarshalHeader marshals the header fields of the control message at +// the head on m. +func (m ControlMessage) MarshalHeader(lvl, typ, dataLen int) error { + if len(m) < controlHeaderLen() { + return errors.New("short message") + } + h := (*cmsghdr)(unsafe.Pointer(&m[0])) + h.set(controlMessageLen(dataLen), lvl, typ) + return nil +} + +// ParseHeader parses and returns the header fields of the control +// message at the head on m. +func (m ControlMessage) ParseHeader() (lvl, typ, dataLen int, err error) { + l := controlHeaderLen() + if len(m) < l { + return 0, 0, 0, errors.New("short message") + } + h := (*cmsghdr)(unsafe.Pointer(&m[0])) + return h.lvl(), h.typ(), int(uint64(h.len()) - uint64(l)), nil +} + +// Marshal marshals the control message at the head on m, and returns +// the next control message. +func (m ControlMessage) Marshal(lvl, typ int, data []byte) (ControlMessage, error) { + l := len(data) + if len(m) < ControlMessageSpace(l) { + return nil, errors.New("short message") + } + h := (*cmsghdr)(unsafe.Pointer(&m[0])) + h.set(controlMessageLen(l), lvl, typ) + if l > 0 { + copy(m.Data(l), data) + } + return m.Next(l), nil +} + +// Parse parses m as a single or multiple control messages. +// +// Parse works for both standard and compatible messages. +func (m ControlMessage) Parse() ([]ControlMessage, error) { + var ms []ControlMessage + for len(m) >= controlHeaderLen() { + h := (*cmsghdr)(unsafe.Pointer(&m[0])) + l := h.len() + if l <= 0 { + return nil, errors.New("invalid header length") + } + if uint64(l) < uint64(controlHeaderLen()) { + return nil, errors.New("invalid message length") + } + if uint64(l) > uint64(len(m)) { + return nil, errors.New("short buffer") + } + // On message reception: + // + // |<- ControlMessageSpace --------------->| + // |<- controlMessageLen ---------->| | + // |<- controlHeaderLen ->| | | + // +---------------+------+---------+------+ + // | Header | PadH | Data | PadD | + // +---------------+------+---------+------+ + // + // On compatible message reception: + // + // | ... |<- controlMessageLen ----------->| + // | ... |<- controlHeaderLen ->| | + // +-----+---------------+------+----------+ + // | ... | Header | PadH | Data | + // +-----+---------------+------+----------+ + ms = append(ms, ControlMessage(m[:l])) + ll := l - controlHeaderLen() + if len(m) >= ControlMessageSpace(ll) { + m = m[ControlMessageSpace(ll):] + } else { + m = m[controlMessageLen(ll):] + } + } + return ms, nil +} + +// NewControlMessage returns a new stream of control messages. +func NewControlMessage(dataLen []int) ControlMessage { + var l int + for i := range dataLen { + l += ControlMessageSpace(dataLen[i]) + } + return make([]byte, l) +} + +// A Message represents an IO message. +type Message struct { + // When writing, the Buffers field must contain at least one + // byte to write. + // When reading, the Buffers field will always contain a byte + // to read. + Buffers [][]byte + + // OOB contains protocol-specific control or miscellaneous + // ancillary data known as out-of-band data. + OOB []byte + + // Addr specifies a destination address when writing. + // It can be nil when the underlying protocol of the raw + // connection uses connection-oriented communication. + // After a successful read, it may contain the source address + // on the received packet. + Addr net.Addr + + N int // # of bytes read or written from/to Buffers + NN int // # of bytes read or written from/to OOB + Flags int // protocol-specific information on the received message +} + +// RecvMsg wraps recvmsg system call. +// +// The provided flags is a set of platform-dependent flags, such as +// syscall.MSG_PEEK. +func (c *Conn) RecvMsg(m *Message, flags int) error { + return c.recvMsg(m, flags) +} + +// SendMsg wraps sendmsg system call. +// +// The provided flags is a set of platform-dependent flags, such as +// syscall.MSG_DONTROUTE. +func (c *Conn) SendMsg(m *Message, flags int) error { + return c.sendMsg(m, flags) +} + +// RecvMsgs wraps recvmmsg system call. +// +// It returns the number of processed messages. +// +// The provided flags is a set of platform-dependent flags, such as +// syscall.MSG_PEEK. +// +// Only Linux supports this. +func (c *Conn) RecvMsgs(ms []Message, flags int) (int, error) { + return c.recvMsgs(ms, flags) +} + +// SendMsgs wraps sendmmsg system call. +// +// It returns the number of processed messages. +// +// The provided flags is a set of platform-dependent flags, such as +// syscall.MSG_DONTROUTE. +// +// Only Linux supports this. +func (c *Conn) SendMsgs(ms []Message, flags int) (int, error) { + return c.sendMsgs(ms, flags) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys.go new file mode 100644 index 000000000..4f0eead13 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys.go @@ -0,0 +1,33 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package socket + +import ( + "encoding/binary" + "unsafe" +) + +var ( + // NativeEndian is the machine native endian implementation of + // ByteOrder. + NativeEndian binary.ByteOrder + + kernelAlign int +) + +func init() { + i := uint32(1) + b := (*[4]byte)(unsafe.Pointer(&i)) + if b[0] == 1 { + NativeEndian = binary.LittleEndian + } else { + NativeEndian = binary.BigEndian + } + kernelAlign = probeProtocolStack() +} + +func roundup(l int) int { + return (l + kernelAlign - 1) & ^(kernelAlign - 1) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_bsd.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_bsd.go new file mode 100644 index 000000000..f13e14ff3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_bsd.go @@ -0,0 +1,17 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd openbsd + +package socket + +import "errors" + +func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) { + return 0, errors.New("not implemented") +} + +func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) { + return 0, errors.New("not implemented") +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_bsdvar.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_bsdvar.go new file mode 100644 index 000000000..f723fa36a --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_bsdvar.go @@ -0,0 +1,14 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build freebsd netbsd openbsd + +package socket + +import "unsafe" + +func probeProtocolStack() int { + var p uintptr + return int(unsafe.Sizeof(p)) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_darwin.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_darwin.go new file mode 100644 index 000000000..b17d223bf --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_darwin.go @@ -0,0 +1,7 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package socket + +func probeProtocolStack() int { return 4 } diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_dragonfly.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_dragonfly.go new file mode 100644 index 000000000..b17d223bf --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_dragonfly.go @@ -0,0 +1,7 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package socket + +func probeProtocolStack() int { return 4 } diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_linux.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_linux.go new file mode 100644 index 000000000..1559521e0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_linux.go @@ -0,0 +1,27 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build linux,!s390x,!386 + +package socket + +import ( + "syscall" + "unsafe" +) + +func probeProtocolStack() int { + var p uintptr + return int(unsafe.Sizeof(p)) +} + +func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) { + n, _, errno := syscall.Syscall6(sysRECVMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0) + return int(n), errnoErr(errno) +} + +func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) { + n, _, errno := syscall.Syscall6(sysSENDMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0) + return int(n), errnoErr(errno) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_linux_386.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_linux_386.go new file mode 100644 index 000000000..235b2cc08 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_linux_386.go @@ -0,0 +1,55 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package socket + +import ( + "syscall" + "unsafe" +) + +func probeProtocolStack() int { return 4 } + +const ( + sysSETSOCKOPT = 0xe + sysGETSOCKOPT = 0xf + sysSENDMSG = 0x10 + sysRECVMSG = 0x11 + sysRECVMMSG = 0x13 + sysSENDMMSG = 0x14 +) + +func socketcall(call, a0, a1, a2, a3, a4, a5 uintptr) (uintptr, syscall.Errno) +func rawsocketcall(call, a0, a1, a2, a3, a4, a5 uintptr) (uintptr, syscall.Errno) + +func getsockopt(s uintptr, level, name int, b []byte) (int, error) { + l := uint32(len(b)) + _, errno := socketcall(sysGETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(unsafe.Pointer(&l)), 0) + return int(l), errnoErr(errno) +} + +func setsockopt(s uintptr, level, name int, b []byte) error { + _, errno := socketcall(sysSETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(len(b)), 0) + return errnoErr(errno) +} + +func recvmsg(s uintptr, h *msghdr, flags int) (int, error) { + n, errno := socketcall(sysRECVMSG, s, uintptr(unsafe.Pointer(h)), uintptr(flags), 0, 0, 0) + return int(n), errnoErr(errno) +} + +func sendmsg(s uintptr, h *msghdr, flags int) (int, error) { + n, errno := socketcall(sysSENDMSG, s, uintptr(unsafe.Pointer(h)), uintptr(flags), 0, 0, 0) + return int(n), errnoErr(errno) +} + +func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) { + n, errno := socketcall(sysRECVMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0) + return int(n), errnoErr(errno) +} + +func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) { + n, errno := socketcall(sysSENDMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0) + return int(n), errnoErr(errno) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_linux_386.s b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_linux_386.s new file mode 100644 index 000000000..93e7d75ec --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_linux_386.s @@ -0,0 +1,11 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +#include "textflag.h" + +TEXT ·socketcall(SB),NOSPLIT,$0-36 + JMP syscall·socketcall(SB) + +TEXT ·rawsocketcall(SB),NOSPLIT,$0-36 + JMP syscall·rawsocketcall(SB) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_linux_amd64.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_linux_amd64.go new file mode 100644 index 000000000..9decee2e5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_linux_amd64.go @@ -0,0 +1,10 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package socket + +const ( + sysRECVMMSG = 0x12b + sysSENDMMSG = 0x133 +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_linux_arm.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_linux_arm.go new file mode 100644 index 000000000..d753b436d --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_linux_arm.go @@ -0,0 +1,10 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package socket + +const ( + sysRECVMMSG = 0x16d + sysSENDMMSG = 0x176 +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_linux_arm64.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_linux_arm64.go new file mode 100644 index 000000000..b67089436 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_linux_arm64.go @@ -0,0 +1,10 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package socket + +const ( + sysRECVMMSG = 0xf3 + sysSENDMMSG = 0x10d +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_linux_mips.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_linux_mips.go new file mode 100644 index 000000000..9c0d74014 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_linux_mips.go @@ -0,0 +1,10 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package socket + +const ( + sysRECVMMSG = 0x10ef + sysSENDMMSG = 0x10f7 +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_linux_mips64.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_linux_mips64.go new file mode 100644 index 000000000..071a4aba8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_linux_mips64.go @@ -0,0 +1,10 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package socket + +const ( + sysRECVMMSG = 0x14ae + sysSENDMMSG = 0x14b6 +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_linux_mips64le.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_linux_mips64le.go new file mode 100644 index 000000000..071a4aba8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_linux_mips64le.go @@ -0,0 +1,10 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package socket + +const ( + sysRECVMMSG = 0x14ae + sysSENDMMSG = 0x14b6 +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_linux_mipsle.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_linux_mipsle.go new file mode 100644 index 000000000..9c0d74014 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_linux_mipsle.go @@ -0,0 +1,10 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package socket + +const ( + sysRECVMMSG = 0x10ef + sysSENDMMSG = 0x10f7 +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_linux_ppc64.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_linux_ppc64.go new file mode 100644 index 000000000..21c1e3f00 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_linux_ppc64.go @@ -0,0 +1,10 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package socket + +const ( + sysRECVMMSG = 0x157 + sysSENDMMSG = 0x15d +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_linux_ppc64le.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_linux_ppc64le.go new file mode 100644 index 000000000..21c1e3f00 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_linux_ppc64le.go @@ -0,0 +1,10 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package socket + +const ( + sysRECVMMSG = 0x157 + sysSENDMMSG = 0x15d +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_linux_s390x.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_linux_s390x.go new file mode 100644 index 000000000..327979efb --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_linux_s390x.go @@ -0,0 +1,55 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package socket + +import ( + "syscall" + "unsafe" +) + +func probeProtocolStack() int { return 8 } + +const ( + sysSETSOCKOPT = 0xe + sysGETSOCKOPT = 0xf + sysSENDMSG = 0x10 + sysRECVMSG = 0x11 + sysRECVMMSG = 0x13 + sysSENDMMSG = 0x14 +) + +func socketcall(call, a0, a1, a2, a3, a4, a5 uintptr) (uintptr, syscall.Errno) +func rawsocketcall(call, a0, a1, a2, a3, a4, a5 uintptr) (uintptr, syscall.Errno) + +func getsockopt(s uintptr, level, name int, b []byte) (int, error) { + l := uint32(len(b)) + _, errno := socketcall(sysGETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(unsafe.Pointer(&l)), 0) + return int(l), errnoErr(errno) +} + +func setsockopt(s uintptr, level, name int, b []byte) error { + _, errno := socketcall(sysSETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(len(b)), 0) + return errnoErr(errno) +} + +func recvmsg(s uintptr, h *msghdr, flags int) (int, error) { + n, errno := socketcall(sysRECVMSG, s, uintptr(unsafe.Pointer(h)), uintptr(flags), 0, 0, 0) + return int(n), errnoErr(errno) +} + +func sendmsg(s uintptr, h *msghdr, flags int) (int, error) { + n, errno := socketcall(sysSENDMSG, s, uintptr(unsafe.Pointer(h)), uintptr(flags), 0, 0, 0) + return int(n), errnoErr(errno) +} + +func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) { + n, errno := socketcall(sysRECVMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0) + return int(n), errnoErr(errno) +} + +func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) { + n, errno := socketcall(sysSENDMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0) + return int(n), errnoErr(errno) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_linux_s390x.s b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_linux_s390x.s new file mode 100644 index 000000000..06d75628c --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_linux_s390x.s @@ -0,0 +1,11 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +#include "textflag.h" + +TEXT ·socketcall(SB),NOSPLIT,$0-72 + JMP syscall·socketcall(SB) + +TEXT ·rawsocketcall(SB),NOSPLIT,$0-72 + JMP syscall·rawsocketcall(SB) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_netbsd.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_netbsd.go new file mode 100644 index 000000000..431851c12 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_netbsd.go @@ -0,0 +1,25 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package socket + +import ( + "syscall" + "unsafe" +) + +const ( + sysRECVMMSG = 0x1db + sysSENDMMSG = 0x1dc +) + +func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) { + n, _, errno := syscall.Syscall6(sysRECVMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0) + return int(n), errnoErr(errno) +} + +func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) { + n, _, errno := syscall.Syscall6(sysSENDMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0) + return int(n), errnoErr(errno) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_posix.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_posix.go new file mode 100644 index 000000000..dc130c27e --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_posix.go @@ -0,0 +1,168 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build go1.9 +// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows + +package socket + +import ( + "encoding/binary" + "errors" + "net" + "runtime" + "strconv" + "sync" + "time" +) + +func marshalInetAddr(a net.Addr) []byte { + switch a := a.(type) { + case *net.TCPAddr: + return marshalSockaddr(a.IP, a.Port, a.Zone) + case *net.UDPAddr: + return marshalSockaddr(a.IP, a.Port, a.Zone) + case *net.IPAddr: + return marshalSockaddr(a.IP, 0, a.Zone) + default: + return nil + } +} + +func marshalSockaddr(ip net.IP, port int, zone string) []byte { + if ip4 := ip.To4(); ip4 != nil { + b := make([]byte, sizeofSockaddrInet) + switch runtime.GOOS { + case "android", "linux", "solaris", "windows": + NativeEndian.PutUint16(b[:2], uint16(sysAF_INET)) + default: + b[0] = sizeofSockaddrInet + b[1] = sysAF_INET + } + binary.BigEndian.PutUint16(b[2:4], uint16(port)) + copy(b[4:8], ip4) + return b + } + if ip6 := ip.To16(); ip6 != nil && ip.To4() == nil { + b := make([]byte, sizeofSockaddrInet6) + switch runtime.GOOS { + case "android", "linux", "solaris", "windows": + NativeEndian.PutUint16(b[:2], uint16(sysAF_INET6)) + default: + b[0] = sizeofSockaddrInet6 + b[1] = sysAF_INET6 + } + binary.BigEndian.PutUint16(b[2:4], uint16(port)) + copy(b[8:24], ip6) + if zone != "" { + NativeEndian.PutUint32(b[24:28], uint32(zoneCache.index(zone))) + } + return b + } + return nil +} + +func parseInetAddr(b []byte, network string) (net.Addr, error) { + if len(b) < 2 { + return nil, errors.New("invalid address") + } + var af int + switch runtime.GOOS { + case "android", "linux", "solaris", "windows": + af = int(NativeEndian.Uint16(b[:2])) + default: + af = int(b[1]) + } + var ip net.IP + var zone string + if af == sysAF_INET { + if len(b) < sizeofSockaddrInet { + return nil, errors.New("short address") + } + ip = make(net.IP, net.IPv4len) + copy(ip, b[4:8]) + } + if af == sysAF_INET6 { + if len(b) < sizeofSockaddrInet6 { + return nil, errors.New("short address") + } + ip = make(net.IP, net.IPv6len) + copy(ip, b[8:24]) + if id := int(NativeEndian.Uint32(b[24:28])); id > 0 { + zone = zoneCache.name(id) + } + } + switch network { + case "tcp", "tcp4", "tcp6": + return &net.TCPAddr{IP: ip, Port: int(binary.BigEndian.Uint16(b[2:4])), Zone: zone}, nil + case "udp", "udp4", "udp6": + return &net.UDPAddr{IP: ip, Port: int(binary.BigEndian.Uint16(b[2:4])), Zone: zone}, nil + default: + return &net.IPAddr{IP: ip, Zone: zone}, nil + } +} + +// An ipv6ZoneCache represents a cache holding partial network +// interface information. It is used for reducing the cost of IPv6 +// addressing scope zone resolution. +// +// Multiple names sharing the index are managed by first-come +// first-served basis for consistency. +type ipv6ZoneCache struct { + sync.RWMutex // guard the following + lastFetched time.Time // last time routing information was fetched + toIndex map[string]int // interface name to its index + toName map[int]string // interface index to its name +} + +var zoneCache = ipv6ZoneCache{ + toIndex: make(map[string]int), + toName: make(map[int]string), +} + +func (zc *ipv6ZoneCache) update(ift []net.Interface) { + zc.Lock() + defer zc.Unlock() + now := time.Now() + if zc.lastFetched.After(now.Add(-60 * time.Second)) { + return + } + zc.lastFetched = now + if len(ift) == 0 { + var err error + if ift, err = net.Interfaces(); err != nil { + return + } + } + zc.toIndex = make(map[string]int, len(ift)) + zc.toName = make(map[int]string, len(ift)) + for _, ifi := range ift { + zc.toIndex[ifi.Name] = ifi.Index + if _, ok := zc.toName[ifi.Index]; !ok { + zc.toName[ifi.Index] = ifi.Name + } + } +} + +func (zc *ipv6ZoneCache) name(zone int) string { + zoneCache.update(nil) + zoneCache.RLock() + defer zoneCache.RUnlock() + name, ok := zoneCache.toName[zone] + if !ok { + name = strconv.Itoa(zone) + } + return name +} + +func (zc *ipv6ZoneCache) index(zone string) int { + zoneCache.update(nil) + zoneCache.RLock() + defer zoneCache.RUnlock() + index, ok := zoneCache.toIndex[zone] + if !ok { + index, _ = strconv.Atoi(zone) + } + return index +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_solaris.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_solaris.go new file mode 100644 index 000000000..cced74e60 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_solaris.go @@ -0,0 +1,71 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package socket + +import ( + "errors" + "runtime" + "syscall" + "unsafe" +) + +func probeProtocolStack() int { + switch runtime.GOARCH { + case "amd64": + return 4 + default: + var p uintptr + return int(unsafe.Sizeof(p)) + } +} + +//go:cgo_import_dynamic libc___xnet_getsockopt __xnet_getsockopt "libsocket.so" +//go:cgo_import_dynamic libc_setsockopt setsockopt "libsocket.so" +//go:cgo_import_dynamic libc___xnet_recvmsg __xnet_recvmsg "libsocket.so" +//go:cgo_import_dynamic libc___xnet_sendmsg __xnet_sendmsg "libsocket.so" + +//go:linkname procGetsockopt libc___xnet_getsockopt +//go:linkname procSetsockopt libc_setsockopt +//go:linkname procRecvmsg libc___xnet_recvmsg +//go:linkname procSendmsg libc___xnet_sendmsg + +var ( + procGetsockopt uintptr + procSetsockopt uintptr + procRecvmsg uintptr + procSendmsg uintptr +) + +func sysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (uintptr, uintptr, syscall.Errno) +func rawSysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (uintptr, uintptr, syscall.Errno) + +func getsockopt(s uintptr, level, name int, b []byte) (int, error) { + l := uint32(len(b)) + _, _, errno := sysvicall6(uintptr(unsafe.Pointer(&procGetsockopt)), 5, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(unsafe.Pointer(&l)), 0) + return int(l), errnoErr(errno) +} + +func setsockopt(s uintptr, level, name int, b []byte) error { + _, _, errno := sysvicall6(uintptr(unsafe.Pointer(&procSetsockopt)), 5, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(len(b)), 0) + return errnoErr(errno) +} + +func recvmsg(s uintptr, h *msghdr, flags int) (int, error) { + n, _, errno := sysvicall6(uintptr(unsafe.Pointer(&procRecvmsg)), 3, s, uintptr(unsafe.Pointer(h)), uintptr(flags), 0, 0, 0) + return int(n), errnoErr(errno) +} + +func sendmsg(s uintptr, h *msghdr, flags int) (int, error) { + n, _, errno := sysvicall6(uintptr(unsafe.Pointer(&procSendmsg)), 3, s, uintptr(unsafe.Pointer(h)), uintptr(flags), 0, 0, 0) + return int(n), errnoErr(errno) +} + +func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) { + return 0, errors.New("not implemented") +} + +func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) { + return 0, errors.New("not implemented") +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_solaris_amd64.s b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_solaris_amd64.s new file mode 100644 index 000000000..a18ac5ed7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_solaris_amd64.s @@ -0,0 +1,11 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +#include "textflag.h" + +TEXT ·sysvicall6(SB),NOSPLIT,$0-88 + JMP syscall·sysvicall6(SB) + +TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88 + JMP syscall·rawSysvicall6(SB) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_stub.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_stub.go new file mode 100644 index 000000000..d9f06d00e --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_stub.go @@ -0,0 +1,64 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows + +package socket + +import ( + "errors" + "net" + "runtime" + "unsafe" +) + +const ( + sysAF_UNSPEC = 0x0 + sysAF_INET = 0x2 + sysAF_INET6 = 0xa + + sysSOCK_RAW = 0x3 +) + +func probeProtocolStack() int { + switch runtime.GOARCH { + case "amd64p32", "mips64p32": + return 4 + default: + var p uintptr + return int(unsafe.Sizeof(p)) + } +} + +func marshalInetAddr(ip net.IP, port int, zone string) []byte { + return nil +} + +func parseInetAddr(b []byte, network string) (net.Addr, error) { + return nil, errors.New("not implemented") +} + +func getsockopt(s uintptr, level, name int, b []byte) (int, error) { + return 0, errors.New("not implemented") +} + +func setsockopt(s uintptr, level, name int, b []byte) error { + return errors.New("not implemented") +} + +func recvmsg(s uintptr, h *msghdr, flags int) (int, error) { + return 0, errors.New("not implemented") +} + +func sendmsg(s uintptr, h *msghdr, flags int) (int, error) { + return 0, errors.New("not implemented") +} + +func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) { + return 0, errors.New("not implemented") +} + +func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) { + return 0, errors.New("not implemented") +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_unix.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_unix.go new file mode 100644 index 000000000..18eba3085 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_unix.go @@ -0,0 +1,33 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux,!s390x,!386 netbsd openbsd + +package socket + +import ( + "syscall" + "unsafe" +) + +func getsockopt(s uintptr, level, name int, b []byte) (int, error) { + l := uint32(len(b)) + _, _, errno := syscall.Syscall6(syscall.SYS_GETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(unsafe.Pointer(&l)), 0) + return int(l), errnoErr(errno) +} + +func setsockopt(s uintptr, level, name int, b []byte) error { + _, _, errno := syscall.Syscall6(syscall.SYS_SETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(len(b)), 0) + return errnoErr(errno) +} + +func recvmsg(s uintptr, h *msghdr, flags int) (int, error) { + n, _, errno := syscall.Syscall(syscall.SYS_RECVMSG, s, uintptr(unsafe.Pointer(h)), uintptr(flags)) + return int(n), errnoErr(errno) +} + +func sendmsg(s uintptr, h *msghdr, flags int) (int, error) { + n, _, errno := syscall.Syscall(syscall.SYS_SENDMSG, s, uintptr(unsafe.Pointer(h)), uintptr(flags)) + return int(n), errnoErr(errno) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_windows.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_windows.go new file mode 100644 index 000000000..54a470ebe --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/sys_windows.go @@ -0,0 +1,70 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package socket + +import ( + "errors" + "syscall" + "unsafe" +) + +func probeProtocolStack() int { + var p uintptr + return int(unsafe.Sizeof(p)) +} + +const ( + sysAF_UNSPEC = 0x0 + sysAF_INET = 0x2 + sysAF_INET6 = 0x17 + + sysSOCK_RAW = 0x3 +) + +type sockaddrInet struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]uint8 +} + +type sockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +const ( + sizeofSockaddrInet = 0x10 + sizeofSockaddrInet6 = 0x1c +) + +func getsockopt(s uintptr, level, name int, b []byte) (int, error) { + l := uint32(len(b)) + err := syscall.Getsockopt(syscall.Handle(s), int32(level), int32(name), (*byte)(unsafe.Pointer(&b[0])), (*int32)(unsafe.Pointer(&l))) + return int(l), err +} + +func setsockopt(s uintptr, level, name int, b []byte) error { + return syscall.Setsockopt(syscall.Handle(s), int32(level), int32(name), (*byte)(unsafe.Pointer(&b[0])), int32(len(b))) +} + +func recvmsg(s uintptr, h *msghdr, flags int) (int, error) { + return 0, errors.New("not implemented") +} + +func sendmsg(s uintptr, h *msghdr, flags int) (int, error) { + return 0, errors.New("not implemented") +} + +func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) { + return 0, errors.New("not implemented") +} + +func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) { + return 0, errors.New("not implemented") +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_darwin_386.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_darwin_386.go new file mode 100644 index 000000000..26f8feff3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_darwin_386.go @@ -0,0 +1,59 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_darwin.go + +package socket + +const ( + sysAF_UNSPEC = 0x0 + sysAF_INET = 0x2 + sysAF_INET6 = 0x1e + + sysSOCK_RAW = 0x3 +) + +type iovec struct { + Base *byte + Len uint32 +} + +type msghdr struct { + Name *byte + Namelen uint32 + Iov *iovec + Iovlen int32 + Control *byte + Controllen uint32 + Flags int32 +} + +type cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type sockaddrInet struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type sockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +const ( + sizeofIovec = 0x8 + sizeofMsghdr = 0x1c + sizeofCmsghdr = 0xc + + sizeofSockaddrInet = 0x10 + sizeofSockaddrInet6 = 0x1c +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_darwin_amd64.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_darwin_amd64.go new file mode 100644 index 000000000..e2987f7db --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_darwin_amd64.go @@ -0,0 +1,61 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_darwin.go + +package socket + +const ( + sysAF_UNSPEC = 0x0 + sysAF_INET = 0x2 + sysAF_INET6 = 0x1e + + sysSOCK_RAW = 0x3 +) + +type iovec struct { + Base *byte + Len uint64 +} + +type msghdr struct { + Name *byte + Namelen uint32 + Pad_cgo_0 [4]byte + Iov *iovec + Iovlen int32 + Pad_cgo_1 [4]byte + Control *byte + Controllen uint32 + Flags int32 +} + +type cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type sockaddrInet struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type sockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +const ( + sizeofIovec = 0x10 + sizeofMsghdr = 0x30 + sizeofCmsghdr = 0xc + + sizeofSockaddrInet = 0x10 + sizeofSockaddrInet6 = 0x1c +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_darwin_arm.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_darwin_arm.go new file mode 100644 index 000000000..26f8feff3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_darwin_arm.go @@ -0,0 +1,59 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_darwin.go + +package socket + +const ( + sysAF_UNSPEC = 0x0 + sysAF_INET = 0x2 + sysAF_INET6 = 0x1e + + sysSOCK_RAW = 0x3 +) + +type iovec struct { + Base *byte + Len uint32 +} + +type msghdr struct { + Name *byte + Namelen uint32 + Iov *iovec + Iovlen int32 + Control *byte + Controllen uint32 + Flags int32 +} + +type cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type sockaddrInet struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type sockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +const ( + sizeofIovec = 0x8 + sizeofMsghdr = 0x1c + sizeofCmsghdr = 0xc + + sizeofSockaddrInet = 0x10 + sizeofSockaddrInet6 = 0x1c +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_darwin_arm64.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_darwin_arm64.go new file mode 100644 index 000000000..e2987f7db --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_darwin_arm64.go @@ -0,0 +1,61 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_darwin.go + +package socket + +const ( + sysAF_UNSPEC = 0x0 + sysAF_INET = 0x2 + sysAF_INET6 = 0x1e + + sysSOCK_RAW = 0x3 +) + +type iovec struct { + Base *byte + Len uint64 +} + +type msghdr struct { + Name *byte + Namelen uint32 + Pad_cgo_0 [4]byte + Iov *iovec + Iovlen int32 + Pad_cgo_1 [4]byte + Control *byte + Controllen uint32 + Flags int32 +} + +type cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type sockaddrInet struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type sockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +const ( + sizeofIovec = 0x10 + sizeofMsghdr = 0x30 + sizeofCmsghdr = 0xc + + sizeofSockaddrInet = 0x10 + sizeofSockaddrInet6 = 0x1c +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_dragonfly_amd64.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_dragonfly_amd64.go new file mode 100644 index 000000000..c582abd57 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_dragonfly_amd64.go @@ -0,0 +1,61 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_dragonfly.go + +package socket + +const ( + sysAF_UNSPEC = 0x0 + sysAF_INET = 0x2 + sysAF_INET6 = 0x1c + + sysSOCK_RAW = 0x3 +) + +type iovec struct { + Base *byte + Len uint64 +} + +type msghdr struct { + Name *byte + Namelen uint32 + Pad_cgo_0 [4]byte + Iov *iovec + Iovlen int32 + Pad_cgo_1 [4]byte + Control *byte + Controllen uint32 + Flags int32 +} + +type cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type sockaddrInet struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type sockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +const ( + sizeofIovec = 0x10 + sizeofMsghdr = 0x30 + sizeofCmsghdr = 0xc + + sizeofSockaddrInet = 0x10 + sizeofSockaddrInet6 = 0x1c +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_freebsd_386.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_freebsd_386.go new file mode 100644 index 000000000..04a24886c --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_freebsd_386.go @@ -0,0 +1,59 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_freebsd.go + +package socket + +const ( + sysAF_UNSPEC = 0x0 + sysAF_INET = 0x2 + sysAF_INET6 = 0x1c + + sysSOCK_RAW = 0x3 +) + +type iovec struct { + Base *byte + Len uint32 +} + +type msghdr struct { + Name *byte + Namelen uint32 + Iov *iovec + Iovlen int32 + Control *byte + Controllen uint32 + Flags int32 +} + +type cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type sockaddrInet struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type sockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +const ( + sizeofIovec = 0x8 + sizeofMsghdr = 0x1c + sizeofCmsghdr = 0xc + + sizeofSockaddrInet = 0x10 + sizeofSockaddrInet6 = 0x1c +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_freebsd_amd64.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_freebsd_amd64.go new file mode 100644 index 000000000..35c7cb9c9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_freebsd_amd64.go @@ -0,0 +1,61 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_freebsd.go + +package socket + +const ( + sysAF_UNSPEC = 0x0 + sysAF_INET = 0x2 + sysAF_INET6 = 0x1c + + sysSOCK_RAW = 0x3 +) + +type iovec struct { + Base *byte + Len uint64 +} + +type msghdr struct { + Name *byte + Namelen uint32 + Pad_cgo_0 [4]byte + Iov *iovec + Iovlen int32 + Pad_cgo_1 [4]byte + Control *byte + Controllen uint32 + Flags int32 +} + +type cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type sockaddrInet struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type sockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +const ( + sizeofIovec = 0x10 + sizeofMsghdr = 0x30 + sizeofCmsghdr = 0xc + + sizeofSockaddrInet = 0x10 + sizeofSockaddrInet6 = 0x1c +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_freebsd_arm.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_freebsd_arm.go new file mode 100644 index 000000000..04a24886c --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_freebsd_arm.go @@ -0,0 +1,59 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_freebsd.go + +package socket + +const ( + sysAF_UNSPEC = 0x0 + sysAF_INET = 0x2 + sysAF_INET6 = 0x1c + + sysSOCK_RAW = 0x3 +) + +type iovec struct { + Base *byte + Len uint32 +} + +type msghdr struct { + Name *byte + Namelen uint32 + Iov *iovec + Iovlen int32 + Control *byte + Controllen uint32 + Flags int32 +} + +type cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type sockaddrInet struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type sockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +const ( + sizeofIovec = 0x8 + sizeofMsghdr = 0x1c + sizeofCmsghdr = 0xc + + sizeofSockaddrInet = 0x10 + sizeofSockaddrInet6 = 0x1c +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_linux_386.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_linux_386.go new file mode 100644 index 000000000..430206930 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_linux_386.go @@ -0,0 +1,63 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_linux.go + +package socket + +const ( + sysAF_UNSPEC = 0x0 + sysAF_INET = 0x2 + sysAF_INET6 = 0xa + + sysSOCK_RAW = 0x3 +) + +type iovec struct { + Base *byte + Len uint32 +} + +type msghdr struct { + Name *byte + Namelen uint32 + Iov *iovec + Iovlen uint32 + Control *byte + Controllen uint32 + Flags int32 +} + +type mmsghdr struct { + Hdr msghdr + Len uint32 +} + +type cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type sockaddrInet struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + X__pad [8]uint8 +} + +type sockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +const ( + sizeofIovec = 0x8 + sizeofMsghdr = 0x1c + sizeofMmsghdr = 0x20 + sizeofCmsghdr = 0xc + + sizeofSockaddrInet = 0x10 + sizeofSockaddrInet6 = 0x1c +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_linux_amd64.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_linux_amd64.go new file mode 100644 index 000000000..1502f6c55 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_linux_amd64.go @@ -0,0 +1,66 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_linux.go + +package socket + +const ( + sysAF_UNSPEC = 0x0 + sysAF_INET = 0x2 + sysAF_INET6 = 0xa + + sysSOCK_RAW = 0x3 +) + +type iovec struct { + Base *byte + Len uint64 +} + +type msghdr struct { + Name *byte + Namelen uint32 + Pad_cgo_0 [4]byte + Iov *iovec + Iovlen uint64 + Control *byte + Controllen uint64 + Flags int32 + Pad_cgo_1 [4]byte +} + +type mmsghdr struct { + Hdr msghdr + Len uint32 + Pad_cgo_0 [4]byte +} + +type cmsghdr struct { + Len uint64 + Level int32 + Type int32 +} + +type sockaddrInet struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + X__pad [8]uint8 +} + +type sockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +const ( + sizeofIovec = 0x10 + sizeofMsghdr = 0x38 + sizeofMmsghdr = 0x40 + sizeofCmsghdr = 0x10 + + sizeofSockaddrInet = 0x10 + sizeofSockaddrInet6 = 0x1c +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_linux_arm.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_linux_arm.go new file mode 100644 index 000000000..430206930 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_linux_arm.go @@ -0,0 +1,63 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_linux.go + +package socket + +const ( + sysAF_UNSPEC = 0x0 + sysAF_INET = 0x2 + sysAF_INET6 = 0xa + + sysSOCK_RAW = 0x3 +) + +type iovec struct { + Base *byte + Len uint32 +} + +type msghdr struct { + Name *byte + Namelen uint32 + Iov *iovec + Iovlen uint32 + Control *byte + Controllen uint32 + Flags int32 +} + +type mmsghdr struct { + Hdr msghdr + Len uint32 +} + +type cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type sockaddrInet struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + X__pad [8]uint8 +} + +type sockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +const ( + sizeofIovec = 0x8 + sizeofMsghdr = 0x1c + sizeofMmsghdr = 0x20 + sizeofCmsghdr = 0xc + + sizeofSockaddrInet = 0x10 + sizeofSockaddrInet6 = 0x1c +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_linux_arm64.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_linux_arm64.go new file mode 100644 index 000000000..1502f6c55 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_linux_arm64.go @@ -0,0 +1,66 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_linux.go + +package socket + +const ( + sysAF_UNSPEC = 0x0 + sysAF_INET = 0x2 + sysAF_INET6 = 0xa + + sysSOCK_RAW = 0x3 +) + +type iovec struct { + Base *byte + Len uint64 +} + +type msghdr struct { + Name *byte + Namelen uint32 + Pad_cgo_0 [4]byte + Iov *iovec + Iovlen uint64 + Control *byte + Controllen uint64 + Flags int32 + Pad_cgo_1 [4]byte +} + +type mmsghdr struct { + Hdr msghdr + Len uint32 + Pad_cgo_0 [4]byte +} + +type cmsghdr struct { + Len uint64 + Level int32 + Type int32 +} + +type sockaddrInet struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + X__pad [8]uint8 +} + +type sockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +const ( + sizeofIovec = 0x10 + sizeofMsghdr = 0x38 + sizeofMmsghdr = 0x40 + sizeofCmsghdr = 0x10 + + sizeofSockaddrInet = 0x10 + sizeofSockaddrInet6 = 0x1c +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_linux_mips.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_linux_mips.go new file mode 100644 index 000000000..430206930 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_linux_mips.go @@ -0,0 +1,63 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_linux.go + +package socket + +const ( + sysAF_UNSPEC = 0x0 + sysAF_INET = 0x2 + sysAF_INET6 = 0xa + + sysSOCK_RAW = 0x3 +) + +type iovec struct { + Base *byte + Len uint32 +} + +type msghdr struct { + Name *byte + Namelen uint32 + Iov *iovec + Iovlen uint32 + Control *byte + Controllen uint32 + Flags int32 +} + +type mmsghdr struct { + Hdr msghdr + Len uint32 +} + +type cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type sockaddrInet struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + X__pad [8]uint8 +} + +type sockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +const ( + sizeofIovec = 0x8 + sizeofMsghdr = 0x1c + sizeofMmsghdr = 0x20 + sizeofCmsghdr = 0xc + + sizeofSockaddrInet = 0x10 + sizeofSockaddrInet6 = 0x1c +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_linux_mips64.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_linux_mips64.go new file mode 100644 index 000000000..1502f6c55 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_linux_mips64.go @@ -0,0 +1,66 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_linux.go + +package socket + +const ( + sysAF_UNSPEC = 0x0 + sysAF_INET = 0x2 + sysAF_INET6 = 0xa + + sysSOCK_RAW = 0x3 +) + +type iovec struct { + Base *byte + Len uint64 +} + +type msghdr struct { + Name *byte + Namelen uint32 + Pad_cgo_0 [4]byte + Iov *iovec + Iovlen uint64 + Control *byte + Controllen uint64 + Flags int32 + Pad_cgo_1 [4]byte +} + +type mmsghdr struct { + Hdr msghdr + Len uint32 + Pad_cgo_0 [4]byte +} + +type cmsghdr struct { + Len uint64 + Level int32 + Type int32 +} + +type sockaddrInet struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + X__pad [8]uint8 +} + +type sockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +const ( + sizeofIovec = 0x10 + sizeofMsghdr = 0x38 + sizeofMmsghdr = 0x40 + sizeofCmsghdr = 0x10 + + sizeofSockaddrInet = 0x10 + sizeofSockaddrInet6 = 0x1c +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_linux_mips64le.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_linux_mips64le.go new file mode 100644 index 000000000..1502f6c55 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_linux_mips64le.go @@ -0,0 +1,66 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_linux.go + +package socket + +const ( + sysAF_UNSPEC = 0x0 + sysAF_INET = 0x2 + sysAF_INET6 = 0xa + + sysSOCK_RAW = 0x3 +) + +type iovec struct { + Base *byte + Len uint64 +} + +type msghdr struct { + Name *byte + Namelen uint32 + Pad_cgo_0 [4]byte + Iov *iovec + Iovlen uint64 + Control *byte + Controllen uint64 + Flags int32 + Pad_cgo_1 [4]byte +} + +type mmsghdr struct { + Hdr msghdr + Len uint32 + Pad_cgo_0 [4]byte +} + +type cmsghdr struct { + Len uint64 + Level int32 + Type int32 +} + +type sockaddrInet struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + X__pad [8]uint8 +} + +type sockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +const ( + sizeofIovec = 0x10 + sizeofMsghdr = 0x38 + sizeofMmsghdr = 0x40 + sizeofCmsghdr = 0x10 + + sizeofSockaddrInet = 0x10 + sizeofSockaddrInet6 = 0x1c +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_linux_mipsle.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_linux_mipsle.go new file mode 100644 index 000000000..430206930 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_linux_mipsle.go @@ -0,0 +1,63 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_linux.go + +package socket + +const ( + sysAF_UNSPEC = 0x0 + sysAF_INET = 0x2 + sysAF_INET6 = 0xa + + sysSOCK_RAW = 0x3 +) + +type iovec struct { + Base *byte + Len uint32 +} + +type msghdr struct { + Name *byte + Namelen uint32 + Iov *iovec + Iovlen uint32 + Control *byte + Controllen uint32 + Flags int32 +} + +type mmsghdr struct { + Hdr msghdr + Len uint32 +} + +type cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type sockaddrInet struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + X__pad [8]uint8 +} + +type sockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +const ( + sizeofIovec = 0x8 + sizeofMsghdr = 0x1c + sizeofMmsghdr = 0x20 + sizeofCmsghdr = 0xc + + sizeofSockaddrInet = 0x10 + sizeofSockaddrInet6 = 0x1c +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64.go new file mode 100644 index 000000000..1502f6c55 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64.go @@ -0,0 +1,66 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_linux.go + +package socket + +const ( + sysAF_UNSPEC = 0x0 + sysAF_INET = 0x2 + sysAF_INET6 = 0xa + + sysSOCK_RAW = 0x3 +) + +type iovec struct { + Base *byte + Len uint64 +} + +type msghdr struct { + Name *byte + Namelen uint32 + Pad_cgo_0 [4]byte + Iov *iovec + Iovlen uint64 + Control *byte + Controllen uint64 + Flags int32 + Pad_cgo_1 [4]byte +} + +type mmsghdr struct { + Hdr msghdr + Len uint32 + Pad_cgo_0 [4]byte +} + +type cmsghdr struct { + Len uint64 + Level int32 + Type int32 +} + +type sockaddrInet struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + X__pad [8]uint8 +} + +type sockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +const ( + sizeofIovec = 0x10 + sizeofMsghdr = 0x38 + sizeofMmsghdr = 0x40 + sizeofCmsghdr = 0x10 + + sizeofSockaddrInet = 0x10 + sizeofSockaddrInet6 = 0x1c +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64le.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64le.go new file mode 100644 index 000000000..1502f6c55 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64le.go @@ -0,0 +1,66 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_linux.go + +package socket + +const ( + sysAF_UNSPEC = 0x0 + sysAF_INET = 0x2 + sysAF_INET6 = 0xa + + sysSOCK_RAW = 0x3 +) + +type iovec struct { + Base *byte + Len uint64 +} + +type msghdr struct { + Name *byte + Namelen uint32 + Pad_cgo_0 [4]byte + Iov *iovec + Iovlen uint64 + Control *byte + Controllen uint64 + Flags int32 + Pad_cgo_1 [4]byte +} + +type mmsghdr struct { + Hdr msghdr + Len uint32 + Pad_cgo_0 [4]byte +} + +type cmsghdr struct { + Len uint64 + Level int32 + Type int32 +} + +type sockaddrInet struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + X__pad [8]uint8 +} + +type sockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +const ( + sizeofIovec = 0x10 + sizeofMsghdr = 0x38 + sizeofMmsghdr = 0x40 + sizeofCmsghdr = 0x10 + + sizeofSockaddrInet = 0x10 + sizeofSockaddrInet6 = 0x1c +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_linux_s390x.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_linux_s390x.go new file mode 100644 index 000000000..1502f6c55 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_linux_s390x.go @@ -0,0 +1,66 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_linux.go + +package socket + +const ( + sysAF_UNSPEC = 0x0 + sysAF_INET = 0x2 + sysAF_INET6 = 0xa + + sysSOCK_RAW = 0x3 +) + +type iovec struct { + Base *byte + Len uint64 +} + +type msghdr struct { + Name *byte + Namelen uint32 + Pad_cgo_0 [4]byte + Iov *iovec + Iovlen uint64 + Control *byte + Controllen uint64 + Flags int32 + Pad_cgo_1 [4]byte +} + +type mmsghdr struct { + Hdr msghdr + Len uint32 + Pad_cgo_0 [4]byte +} + +type cmsghdr struct { + Len uint64 + Level int32 + Type int32 +} + +type sockaddrInet struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + X__pad [8]uint8 +} + +type sockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +const ( + sizeofIovec = 0x10 + sizeofMsghdr = 0x38 + sizeofMmsghdr = 0x40 + sizeofCmsghdr = 0x10 + + sizeofSockaddrInet = 0x10 + sizeofSockaddrInet6 = 0x1c +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_netbsd_386.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_netbsd_386.go new file mode 100644 index 000000000..db60491fe --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_netbsd_386.go @@ -0,0 +1,65 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_netbsd.go + +package socket + +const ( + sysAF_UNSPEC = 0x0 + sysAF_INET = 0x2 + sysAF_INET6 = 0x18 + + sysSOCK_RAW = 0x3 +) + +type iovec struct { + Base *byte + Len uint32 +} + +type msghdr struct { + Name *byte + Namelen uint32 + Iov *iovec + Iovlen int32 + Control *byte + Controllen uint32 + Flags int32 +} + +type mmsghdr struct { + Hdr msghdr + Len uint32 +} + +type cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type sockaddrInet struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type sockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +const ( + sizeofIovec = 0x8 + sizeofMsghdr = 0x1c + sizeofMmsghdr = 0x20 + sizeofCmsghdr = 0xc + + sizeofSockaddrInet = 0x10 + sizeofSockaddrInet6 = 0x1c +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_netbsd_amd64.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_netbsd_amd64.go new file mode 100644 index 000000000..2a1a79985 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_netbsd_amd64.go @@ -0,0 +1,68 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_netbsd.go + +package socket + +const ( + sysAF_UNSPEC = 0x0 + sysAF_INET = 0x2 + sysAF_INET6 = 0x18 + + sysSOCK_RAW = 0x3 +) + +type iovec struct { + Base *byte + Len uint64 +} + +type msghdr struct { + Name *byte + Namelen uint32 + Pad_cgo_0 [4]byte + Iov *iovec + Iovlen int32 + Pad_cgo_1 [4]byte + Control *byte + Controllen uint32 + Flags int32 +} + +type mmsghdr struct { + Hdr msghdr + Len uint32 + Pad_cgo_0 [4]byte +} + +type cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type sockaddrInet struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type sockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +const ( + sizeofIovec = 0x10 + sizeofMsghdr = 0x30 + sizeofMmsghdr = 0x40 + sizeofCmsghdr = 0xc + + sizeofSockaddrInet = 0x10 + sizeofSockaddrInet6 = 0x1c +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_netbsd_arm.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_netbsd_arm.go new file mode 100644 index 000000000..206ea2d11 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_netbsd_arm.go @@ -0,0 +1,59 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_netbsd.go + +package socket + +const ( + sysAF_UNSPEC = 0x0 + sysAF_INET = 0x2 + sysAF_INET6 = 0x18 + + sysSOCK_RAW = 0x3 +) + +type iovec struct { + Base *byte + Len uint32 +} + +type msghdr struct { + Name *byte + Namelen uint32 + Iov *iovec + Iovlen int32 + Control *byte + Controllen uint32 + Flags int32 +} + +type cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type sockaddrInet struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type sockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +const ( + sizeofIovec = 0x8 + sizeofMsghdr = 0x1c + sizeofCmsghdr = 0xc + + sizeofSockaddrInet = 0x10 + sizeofSockaddrInet6 = 0x1c +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_openbsd_386.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_openbsd_386.go new file mode 100644 index 000000000..1c836361e --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_openbsd_386.go @@ -0,0 +1,59 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_openbsd.go + +package socket + +const ( + sysAF_UNSPEC = 0x0 + sysAF_INET = 0x2 + sysAF_INET6 = 0x18 + + sysSOCK_RAW = 0x3 +) + +type iovec struct { + Base *byte + Len uint32 +} + +type msghdr struct { + Name *byte + Namelen uint32 + Iov *iovec + Iovlen uint32 + Control *byte + Controllen uint32 + Flags int32 +} + +type cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type sockaddrInet struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type sockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +const ( + sizeofIovec = 0x8 + sizeofMsghdr = 0x1c + sizeofCmsghdr = 0xc + + sizeofSockaddrInet = 0x10 + sizeofSockaddrInet6 = 0x1c +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_openbsd_amd64.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_openbsd_amd64.go new file mode 100644 index 000000000..a6c0bf464 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_openbsd_amd64.go @@ -0,0 +1,61 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_openbsd.go + +package socket + +const ( + sysAF_UNSPEC = 0x0 + sysAF_INET = 0x2 + sysAF_INET6 = 0x18 + + sysSOCK_RAW = 0x3 +) + +type iovec struct { + Base *byte + Len uint64 +} + +type msghdr struct { + Name *byte + Namelen uint32 + Pad_cgo_0 [4]byte + Iov *iovec + Iovlen uint32 + Pad_cgo_1 [4]byte + Control *byte + Controllen uint32 + Flags int32 +} + +type cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type sockaddrInet struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type sockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +const ( + sizeofIovec = 0x10 + sizeofMsghdr = 0x30 + sizeofCmsghdr = 0xc + + sizeofSockaddrInet = 0x10 + sizeofSockaddrInet6 = 0x1c +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_openbsd_arm.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_openbsd_arm.go new file mode 100644 index 000000000..1c836361e --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_openbsd_arm.go @@ -0,0 +1,59 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_openbsd.go + +package socket + +const ( + sysAF_UNSPEC = 0x0 + sysAF_INET = 0x2 + sysAF_INET6 = 0x18 + + sysSOCK_RAW = 0x3 +) + +type iovec struct { + Base *byte + Len uint32 +} + +type msghdr struct { + Name *byte + Namelen uint32 + Iov *iovec + Iovlen uint32 + Control *byte + Controllen uint32 + Flags int32 +} + +type cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type sockaddrInet struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type sockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +const ( + sizeofIovec = 0x8 + sizeofMsghdr = 0x1c + sizeofCmsghdr = 0xc + + sizeofSockaddrInet = 0x10 + sizeofSockaddrInet6 = 0x1c +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_solaris_amd64.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_solaris_amd64.go new file mode 100644 index 000000000..327c63290 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/internal/socket/zsys_solaris_amd64.go @@ -0,0 +1,60 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_solaris.go + +package socket + +const ( + sysAF_UNSPEC = 0x0 + sysAF_INET = 0x2 + sysAF_INET6 = 0x1a + + sysSOCK_RAW = 0x4 +) + +type iovec struct { + Base *int8 + Len uint64 +} + +type msghdr struct { + Name *byte + Namelen uint32 + Pad_cgo_0 [4]byte + Iov *iovec + Iovlen int32 + Pad_cgo_1 [4]byte + Accrights *int8 + Accrightslen int32 + Pad_cgo_2 [4]byte +} + +type cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type sockaddrInet struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type sockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 + X__sin6_src_id uint32 +} + +const ( + sizeofIovec = 0x10 + sizeofMsghdr = 0x30 + sizeofCmsghdr = 0xc + + sizeofSockaddrInet = 0x10 + sizeofSockaddrInet6 = 0x20 +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/batch.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/batch.go new file mode 100644 index 000000000..b44549928 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/batch.go @@ -0,0 +1,191 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build go1.9 + +package ipv4 + +import ( + "net" + "runtime" + "syscall" + + "golang.org/x/net/internal/socket" +) + +// BUG(mikio): On Windows, the ReadBatch and WriteBatch methods of +// PacketConn are not implemented. + +// BUG(mikio): On Windows, the ReadBatch and WriteBatch methods of +// RawConn are not implemented. + +// A Message represents an IO message. +// +// type Message struct { +// Buffers [][]byte +// OOB []byte +// Addr net.Addr +// N int +// NN int +// Flags int +// } +// +// The Buffers fields represents a list of contiguous buffers, which +// can be used for vectored IO, for example, putting a header and a +// payload in each slice. +// When writing, the Buffers field must contain at least one byte to +// write. +// When reading, the Buffers field will always contain a byte to read. +// +// The OOB field contains protocol-specific control or miscellaneous +// ancillary data known as out-of-band data. +// It can be nil when not required. +// +// The Addr field specifies a destination address when writing. +// It can be nil when the underlying protocol of the endpoint uses +// connection-oriented communication. +// After a successful read, it may contain the source address on the +// received packet. +// +// The N field indicates the number of bytes read or written from/to +// Buffers. +// +// The NN field indicates the number of bytes read or written from/to +// OOB. +// +// The Flags field contains protocol-specific information on the +// received message. +type Message = socket.Message + +// ReadBatch reads a batch of messages. +// +// The provided flags is a set of platform-dependent flags, such as +// syscall.MSG_PEEK. +// +// On a successful read it returns the number of messages received, up +// to len(ms). +// +// On Linux, a batch read will be optimized. +// On other platforms, this method will read only a single message. +// +// Unlike the ReadFrom method, it doesn't strip the IPv4 header +// followed by option headers from the received IPv4 datagram when the +// underlying transport is net.IPConn. Each Buffers field of Message +// must be large enough to accommodate an IPv4 header and option +// headers. +func (c *payloadHandler) ReadBatch(ms []Message, flags int) (int, error) { + if !c.ok() { + return 0, syscall.EINVAL + } + switch runtime.GOOS { + case "linux": + n, err := c.RecvMsgs([]socket.Message(ms), flags) + if err != nil { + err = &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err} + } + return n, err + default: + n := 1 + err := c.RecvMsg(&ms[0], flags) + if err != nil { + n = 0 + err = &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err} + } + return n, err + } +} + +// WriteBatch writes a batch of messages. +// +// The provided flags is a set of platform-dependent flags, such as +// syscall.MSG_DONTROUTE. +// +// It returns the number of messages written on a successful write. +// +// On Linux, a batch write will be optimized. +// On other platforms, this method will write only a single message. +func (c *payloadHandler) WriteBatch(ms []Message, flags int) (int, error) { + if !c.ok() { + return 0, syscall.EINVAL + } + switch runtime.GOOS { + case "linux": + n, err := c.SendMsgs([]socket.Message(ms), flags) + if err != nil { + err = &net.OpError{Op: "write", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err} + } + return n, err + default: + n := 1 + err := c.SendMsg(&ms[0], flags) + if err != nil { + n = 0 + err = &net.OpError{Op: "write", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err} + } + return n, err + } +} + +// ReadBatch reads a batch of messages. +// +// The provided flags is a set of platform-dependent flags, such as +// syscall.MSG_PEEK. +// +// On a successful read it returns the number of messages received, up +// to len(ms). +// +// On Linux, a batch read will be optimized. +// On other platforms, this method will read only a single message. +func (c *packetHandler) ReadBatch(ms []Message, flags int) (int, error) { + if !c.ok() { + return 0, syscall.EINVAL + } + switch runtime.GOOS { + case "linux": + n, err := c.RecvMsgs([]socket.Message(ms), flags) + if err != nil { + err = &net.OpError{Op: "read", Net: c.IPConn.LocalAddr().Network(), Source: c.IPConn.LocalAddr(), Err: err} + } + return n, err + default: + n := 1 + err := c.RecvMsg(&ms[0], flags) + if err != nil { + n = 0 + err = &net.OpError{Op: "read", Net: c.IPConn.LocalAddr().Network(), Source: c.IPConn.LocalAddr(), Err: err} + } + return n, err + } +} + +// WriteBatch writes a batch of messages. +// +// The provided flags is a set of platform-dependent flags, such as +// syscall.MSG_DONTROUTE. +// +// It returns the number of messages written on a successful write. +// +// On Linux, a batch write will be optimized. +// On other platforms, this method will write only a single message. +func (c *packetHandler) WriteBatch(ms []Message, flags int) (int, error) { + if !c.ok() { + return 0, syscall.EINVAL + } + switch runtime.GOOS { + case "linux": + n, err := c.SendMsgs([]socket.Message(ms), flags) + if err != nil { + err = &net.OpError{Op: "write", Net: c.IPConn.LocalAddr().Network(), Source: c.IPConn.LocalAddr(), Err: err} + } + return n, err + default: + n := 1 + err := c.SendMsg(&ms[0], flags) + if err != nil { + n = 0 + err = &net.OpError{Op: "write", Net: c.IPConn.LocalAddr().Network(), Source: c.IPConn.LocalAddr(), Err: err} + } + return n, err + } +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/control.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/control.go new file mode 100644 index 000000000..a2b02ca95 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/control.go @@ -0,0 +1,144 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv4 + +import ( + "fmt" + "net" + "sync" + + "golang.org/x/net/internal/iana" + "golang.org/x/net/internal/socket" +) + +type rawOpt struct { + sync.RWMutex + cflags ControlFlags +} + +func (c *rawOpt) set(f ControlFlags) { c.cflags |= f } +func (c *rawOpt) clear(f ControlFlags) { c.cflags &^= f } +func (c *rawOpt) isset(f ControlFlags) bool { return c.cflags&f != 0 } + +type ControlFlags uint + +const ( + FlagTTL ControlFlags = 1 << iota // pass the TTL on the received packet + FlagSrc // pass the source address on the received packet + FlagDst // pass the destination address on the received packet + FlagInterface // pass the interface index on the received packet +) + +// A ControlMessage represents per packet basis IP-level socket options. +type ControlMessage struct { + // Receiving socket options: SetControlMessage allows to + // receive the options from the protocol stack using ReadFrom + // method of PacketConn or RawConn. + // + // Specifying socket options: ControlMessage for WriteTo + // method of PacketConn or RawConn allows to send the options + // to the protocol stack. + // + TTL int // time-to-live, receiving only + Src net.IP // source address, specifying only + Dst net.IP // destination address, receiving only + IfIndex int // interface index, must be 1 <= value when specifying +} + +func (cm *ControlMessage) String() string { + if cm == nil { + return "" + } + return fmt.Sprintf("ttl=%d src=%v dst=%v ifindex=%d", cm.TTL, cm.Src, cm.Dst, cm.IfIndex) +} + +// Marshal returns the binary encoding of cm. +func (cm *ControlMessage) Marshal() []byte { + if cm == nil { + return nil + } + var m socket.ControlMessage + if ctlOpts[ctlPacketInfo].name > 0 && (cm.Src.To4() != nil || cm.IfIndex > 0) { + m = socket.NewControlMessage([]int{ctlOpts[ctlPacketInfo].length}) + } + if len(m) > 0 { + ctlOpts[ctlPacketInfo].marshal(m, cm) + } + return m +} + +// Parse parses b as a control message and stores the result in cm. +func (cm *ControlMessage) Parse(b []byte) error { + ms, err := socket.ControlMessage(b).Parse() + if err != nil { + return err + } + for _, m := range ms { + lvl, typ, l, err := m.ParseHeader() + if err != nil { + return err + } + if lvl != iana.ProtocolIP { + continue + } + switch { + case typ == ctlOpts[ctlTTL].name && l >= ctlOpts[ctlTTL].length: + ctlOpts[ctlTTL].parse(cm, m.Data(l)) + case typ == ctlOpts[ctlDst].name && l >= ctlOpts[ctlDst].length: + ctlOpts[ctlDst].parse(cm, m.Data(l)) + case typ == ctlOpts[ctlInterface].name && l >= ctlOpts[ctlInterface].length: + ctlOpts[ctlInterface].parse(cm, m.Data(l)) + case typ == ctlOpts[ctlPacketInfo].name && l >= ctlOpts[ctlPacketInfo].length: + ctlOpts[ctlPacketInfo].parse(cm, m.Data(l)) + } + } + return nil +} + +// NewControlMessage returns a new control message. +// +// The returned message is large enough for options specified by cf. +func NewControlMessage(cf ControlFlags) []byte { + opt := rawOpt{cflags: cf} + var l int + if opt.isset(FlagTTL) && ctlOpts[ctlTTL].name > 0 { + l += socket.ControlMessageSpace(ctlOpts[ctlTTL].length) + } + if ctlOpts[ctlPacketInfo].name > 0 { + if opt.isset(FlagSrc | FlagDst | FlagInterface) { + l += socket.ControlMessageSpace(ctlOpts[ctlPacketInfo].length) + } + } else { + if opt.isset(FlagDst) && ctlOpts[ctlDst].name > 0 { + l += socket.ControlMessageSpace(ctlOpts[ctlDst].length) + } + if opt.isset(FlagInterface) && ctlOpts[ctlInterface].name > 0 { + l += socket.ControlMessageSpace(ctlOpts[ctlInterface].length) + } + } + var b []byte + if l > 0 { + b = make([]byte, l) + } + return b +} + +// Ancillary data socket options +const ( + ctlTTL = iota // header field + ctlSrc // header field + ctlDst // header field + ctlInterface // inbound or outbound interface + ctlPacketInfo // inbound or outbound packet path + ctlMax +) + +// A ctlOpt represents a binding for ancillary data socket option. +type ctlOpt struct { + name int // option name, must be equal or greater than 1 + length int // option length + marshal func([]byte, *ControlMessage) []byte + parse func(*ControlMessage, []byte) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/control_bsd.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/control_bsd.go new file mode 100644 index 000000000..77e7ad5be --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/control_bsd.go @@ -0,0 +1,40 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd netbsd openbsd + +package ipv4 + +import ( + "net" + "syscall" + "unsafe" + + "golang.org/x/net/internal/iana" + "golang.org/x/net/internal/socket" +) + +func marshalDst(b []byte, cm *ControlMessage) []byte { + m := socket.ControlMessage(b) + m.MarshalHeader(iana.ProtocolIP, sysIP_RECVDSTADDR, net.IPv4len) + return m.Next(net.IPv4len) +} + +func parseDst(cm *ControlMessage, b []byte) { + if len(cm.Dst) < net.IPv4len { + cm.Dst = make(net.IP, net.IPv4len) + } + copy(cm.Dst, b[:net.IPv4len]) +} + +func marshalInterface(b []byte, cm *ControlMessage) []byte { + m := socket.ControlMessage(b) + m.MarshalHeader(iana.ProtocolIP, sysIP_RECVIF, syscall.SizeofSockaddrDatalink) + return m.Next(syscall.SizeofSockaddrDatalink) +} + +func parseInterface(cm *ControlMessage, b []byte) { + sadl := (*syscall.SockaddrDatalink)(unsafe.Pointer(&b[0])) + cm.IfIndex = int(sadl.Index) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/control_pktinfo.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/control_pktinfo.go new file mode 100644 index 000000000..425338f35 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/control_pktinfo.go @@ -0,0 +1,39 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin linux solaris + +package ipv4 + +import ( + "net" + "unsafe" + + "golang.org/x/net/internal/iana" + "golang.org/x/net/internal/socket" +) + +func marshalPacketInfo(b []byte, cm *ControlMessage) []byte { + m := socket.ControlMessage(b) + m.MarshalHeader(iana.ProtocolIP, sysIP_PKTINFO, sizeofInetPktinfo) + if cm != nil { + pi := (*inetPktinfo)(unsafe.Pointer(&m.Data(sizeofInetPktinfo)[0])) + if ip := cm.Src.To4(); ip != nil { + copy(pi.Spec_dst[:], ip) + } + if cm.IfIndex > 0 { + pi.setIfindex(cm.IfIndex) + } + } + return m.Next(sizeofInetPktinfo) +} + +func parsePacketInfo(cm *ControlMessage, b []byte) { + pi := (*inetPktinfo)(unsafe.Pointer(&b[0])) + cm.IfIndex = int(pi.Ifindex) + if len(cm.Dst) < net.IPv4len { + cm.Dst = make(net.IP, net.IPv4len) + } + copy(cm.Dst, pi.Addr[:]) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/control_stub.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/control_stub.go new file mode 100644 index 000000000..5a2f7d8d3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/control_stub.go @@ -0,0 +1,13 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows + +package ipv4 + +import "golang.org/x/net/internal/socket" + +func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error { + return errOpNoSupport +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/control_unix.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/control_unix.go new file mode 100644 index 000000000..e1ae8167b --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/control_unix.go @@ -0,0 +1,73 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd solaris + +package ipv4 + +import ( + "unsafe" + + "golang.org/x/net/internal/iana" + "golang.org/x/net/internal/socket" +) + +func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error { + opt.Lock() + defer opt.Unlock() + if so, ok := sockOpts[ssoReceiveTTL]; ok && cf&FlagTTL != 0 { + if err := so.SetInt(c, boolint(on)); err != nil { + return err + } + if on { + opt.set(FlagTTL) + } else { + opt.clear(FlagTTL) + } + } + if so, ok := sockOpts[ssoPacketInfo]; ok { + if cf&(FlagSrc|FlagDst|FlagInterface) != 0 { + if err := so.SetInt(c, boolint(on)); err != nil { + return err + } + if on { + opt.set(cf & (FlagSrc | FlagDst | FlagInterface)) + } else { + opt.clear(cf & (FlagSrc | FlagDst | FlagInterface)) + } + } + } else { + if so, ok := sockOpts[ssoReceiveDst]; ok && cf&FlagDst != 0 { + if err := so.SetInt(c, boolint(on)); err != nil { + return err + } + if on { + opt.set(FlagDst) + } else { + opt.clear(FlagDst) + } + } + if so, ok := sockOpts[ssoReceiveInterface]; ok && cf&FlagInterface != 0 { + if err := so.SetInt(c, boolint(on)); err != nil { + return err + } + if on { + opt.set(FlagInterface) + } else { + opt.clear(FlagInterface) + } + } + } + return nil +} + +func marshalTTL(b []byte, cm *ControlMessage) []byte { + m := socket.ControlMessage(b) + m.MarshalHeader(iana.ProtocolIP, sysIP_RECVTTL, 1) + return m.Next(1) +} + +func parseTTL(cm *ControlMessage, b []byte) { + cm.TTL = int(*(*byte)(unsafe.Pointer(&b[:1][0]))) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/control_windows.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/control_windows.go new file mode 100644 index 000000000..ce55c6644 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/control_windows.go @@ -0,0 +1,16 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv4 + +import ( + "syscall" + + "golang.org/x/net/internal/socket" +) + +func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error { + // TODO(mikio): implement this + return syscall.EWINDOWS +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/dgramopt.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/dgramopt.go new file mode 100644 index 000000000..54d77d5fe --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/dgramopt.go @@ -0,0 +1,265 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv4 + +import ( + "net" + "syscall" + + "golang.org/x/net/bpf" +) + +// MulticastTTL returns the time-to-live field value for outgoing +// multicast packets. +func (c *dgramOpt) MulticastTTL() (int, error) { + if !c.ok() { + return 0, syscall.EINVAL + } + so, ok := sockOpts[ssoMulticastTTL] + if !ok { + return 0, errOpNoSupport + } + return so.GetInt(c.Conn) +} + +// SetMulticastTTL sets the time-to-live field value for future +// outgoing multicast packets. +func (c *dgramOpt) SetMulticastTTL(ttl int) error { + if !c.ok() { + return syscall.EINVAL + } + so, ok := sockOpts[ssoMulticastTTL] + if !ok { + return errOpNoSupport + } + return so.SetInt(c.Conn, ttl) +} + +// MulticastInterface returns the default interface for multicast +// packet transmissions. +func (c *dgramOpt) MulticastInterface() (*net.Interface, error) { + if !c.ok() { + return nil, syscall.EINVAL + } + so, ok := sockOpts[ssoMulticastInterface] + if !ok { + return nil, errOpNoSupport + } + return so.getMulticastInterface(c.Conn) +} + +// SetMulticastInterface sets the default interface for future +// multicast packet transmissions. +func (c *dgramOpt) SetMulticastInterface(ifi *net.Interface) error { + if !c.ok() { + return syscall.EINVAL + } + so, ok := sockOpts[ssoMulticastInterface] + if !ok { + return errOpNoSupport + } + return so.setMulticastInterface(c.Conn, ifi) +} + +// MulticastLoopback reports whether transmitted multicast packets +// should be copied and send back to the originator. +func (c *dgramOpt) MulticastLoopback() (bool, error) { + if !c.ok() { + return false, syscall.EINVAL + } + so, ok := sockOpts[ssoMulticastLoopback] + if !ok { + return false, errOpNoSupport + } + on, err := so.GetInt(c.Conn) + if err != nil { + return false, err + } + return on == 1, nil +} + +// SetMulticastLoopback sets whether transmitted multicast packets +// should be copied and send back to the originator. +func (c *dgramOpt) SetMulticastLoopback(on bool) error { + if !c.ok() { + return syscall.EINVAL + } + so, ok := sockOpts[ssoMulticastLoopback] + if !ok { + return errOpNoSupport + } + return so.SetInt(c.Conn, boolint(on)) +} + +// JoinGroup joins the group address group on the interface ifi. +// By default all sources that can cast data to group are accepted. +// It's possible to mute and unmute data transmission from a specific +// source by using ExcludeSourceSpecificGroup and +// IncludeSourceSpecificGroup. +// JoinGroup uses the system assigned multicast interface when ifi is +// nil, although this is not recommended because the assignment +// depends on platforms and sometimes it might require routing +// configuration. +func (c *dgramOpt) JoinGroup(ifi *net.Interface, group net.Addr) error { + if !c.ok() { + return syscall.EINVAL + } + so, ok := sockOpts[ssoJoinGroup] + if !ok { + return errOpNoSupport + } + grp := netAddrToIP4(group) + if grp == nil { + return errMissingAddress + } + return so.setGroup(c.Conn, ifi, grp) +} + +// LeaveGroup leaves the group address group on the interface ifi +// regardless of whether the group is any-source group or +// source-specific group. +func (c *dgramOpt) LeaveGroup(ifi *net.Interface, group net.Addr) error { + if !c.ok() { + return syscall.EINVAL + } + so, ok := sockOpts[ssoLeaveGroup] + if !ok { + return errOpNoSupport + } + grp := netAddrToIP4(group) + if grp == nil { + return errMissingAddress + } + return so.setGroup(c.Conn, ifi, grp) +} + +// JoinSourceSpecificGroup joins the source-specific group comprising +// group and source on the interface ifi. +// JoinSourceSpecificGroup uses the system assigned multicast +// interface when ifi is nil, although this is not recommended because +// the assignment depends on platforms and sometimes it might require +// routing configuration. +func (c *dgramOpt) JoinSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error { + if !c.ok() { + return syscall.EINVAL + } + so, ok := sockOpts[ssoJoinSourceGroup] + if !ok { + return errOpNoSupport + } + grp := netAddrToIP4(group) + if grp == nil { + return errMissingAddress + } + src := netAddrToIP4(source) + if src == nil { + return errMissingAddress + } + return so.setSourceGroup(c.Conn, ifi, grp, src) +} + +// LeaveSourceSpecificGroup leaves the source-specific group on the +// interface ifi. +func (c *dgramOpt) LeaveSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error { + if !c.ok() { + return syscall.EINVAL + } + so, ok := sockOpts[ssoLeaveSourceGroup] + if !ok { + return errOpNoSupport + } + grp := netAddrToIP4(group) + if grp == nil { + return errMissingAddress + } + src := netAddrToIP4(source) + if src == nil { + return errMissingAddress + } + return so.setSourceGroup(c.Conn, ifi, grp, src) +} + +// ExcludeSourceSpecificGroup excludes the source-specific group from +// the already joined any-source groups by JoinGroup on the interface +// ifi. +func (c *dgramOpt) ExcludeSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error { + if !c.ok() { + return syscall.EINVAL + } + so, ok := sockOpts[ssoBlockSourceGroup] + if !ok { + return errOpNoSupport + } + grp := netAddrToIP4(group) + if grp == nil { + return errMissingAddress + } + src := netAddrToIP4(source) + if src == nil { + return errMissingAddress + } + return so.setSourceGroup(c.Conn, ifi, grp, src) +} + +// IncludeSourceSpecificGroup includes the excluded source-specific +// group by ExcludeSourceSpecificGroup again on the interface ifi. +func (c *dgramOpt) IncludeSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error { + if !c.ok() { + return syscall.EINVAL + } + so, ok := sockOpts[ssoUnblockSourceGroup] + if !ok { + return errOpNoSupport + } + grp := netAddrToIP4(group) + if grp == nil { + return errMissingAddress + } + src := netAddrToIP4(source) + if src == nil { + return errMissingAddress + } + return so.setSourceGroup(c.Conn, ifi, grp, src) +} + +// ICMPFilter returns an ICMP filter. +// Currently only Linux supports this. +func (c *dgramOpt) ICMPFilter() (*ICMPFilter, error) { + if !c.ok() { + return nil, syscall.EINVAL + } + so, ok := sockOpts[ssoICMPFilter] + if !ok { + return nil, errOpNoSupport + } + return so.getICMPFilter(c.Conn) +} + +// SetICMPFilter deploys the ICMP filter. +// Currently only Linux supports this. +func (c *dgramOpt) SetICMPFilter(f *ICMPFilter) error { + if !c.ok() { + return syscall.EINVAL + } + so, ok := sockOpts[ssoICMPFilter] + if !ok { + return errOpNoSupport + } + return so.setICMPFilter(c.Conn, f) +} + +// SetBPF attaches a BPF program to the connection. +// +// Only supported on Linux. +func (c *dgramOpt) SetBPF(filter []bpf.RawInstruction) error { + if !c.ok() { + return syscall.EINVAL + } + so, ok := sockOpts[ssoAttachFilter] + if !ok { + return errOpNoSupport + } + return so.setBPF(c.Conn, filter) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/doc.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/doc.go new file mode 100644 index 000000000..b43935a5a --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/doc.go @@ -0,0 +1,244 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package ipv4 implements IP-level socket options for the Internet +// Protocol version 4. +// +// The package provides IP-level socket options that allow +// manipulation of IPv4 facilities. +// +// The IPv4 protocol and basic host requirements for IPv4 are defined +// in RFC 791 and RFC 1122. +// Host extensions for multicasting and socket interface extensions +// for multicast source filters are defined in RFC 1112 and RFC 3678. +// IGMPv1, IGMPv2 and IGMPv3 are defined in RFC 1112, RFC 2236 and RFC +// 3376. +// Source-specific multicast is defined in RFC 4607. +// +// +// Unicasting +// +// The options for unicasting are available for net.TCPConn, +// net.UDPConn and net.IPConn which are created as network connections +// that use the IPv4 transport. When a single TCP connection carrying +// a data flow of multiple packets needs to indicate the flow is +// important, Conn is used to set the type-of-service field on the +// IPv4 header for each packet. +// +// ln, err := net.Listen("tcp4", "0.0.0.0:1024") +// if err != nil { +// // error handling +// } +// defer ln.Close() +// for { +// c, err := ln.Accept() +// if err != nil { +// // error handling +// } +// go func(c net.Conn) { +// defer c.Close() +// +// The outgoing packets will be labeled DiffServ assured forwarding +// class 1 low drop precedence, known as AF11 packets. +// +// if err := ipv4.NewConn(c).SetTOS(0x28); err != nil { +// // error handling +// } +// if _, err := c.Write(data); err != nil { +// // error handling +// } +// }(c) +// } +// +// +// Multicasting +// +// The options for multicasting are available for net.UDPConn and +// net.IPconn which are created as network connections that use the +// IPv4 transport. A few network facilities must be prepared before +// you begin multicasting, at a minimum joining network interfaces and +// multicast groups. +// +// en0, err := net.InterfaceByName("en0") +// if err != nil { +// // error handling +// } +// en1, err := net.InterfaceByIndex(911) +// if err != nil { +// // error handling +// } +// group := net.IPv4(224, 0, 0, 250) +// +// First, an application listens to an appropriate address with an +// appropriate service port. +// +// c, err := net.ListenPacket("udp4", "0.0.0.0:1024") +// if err != nil { +// // error handling +// } +// defer c.Close() +// +// Second, the application joins multicast groups, starts listening to +// the groups on the specified network interfaces. Note that the +// service port for transport layer protocol does not matter with this +// operation as joining groups affects only network and link layer +// protocols, such as IPv4 and Ethernet. +// +// p := ipv4.NewPacketConn(c) +// if err := p.JoinGroup(en0, &net.UDPAddr{IP: group}); err != nil { +// // error handling +// } +// if err := p.JoinGroup(en1, &net.UDPAddr{IP: group}); err != nil { +// // error handling +// } +// +// The application might set per packet control message transmissions +// between the protocol stack within the kernel. When the application +// needs a destination address on an incoming packet, +// SetControlMessage of PacketConn is used to enable control message +// transmissions. +// +// if err := p.SetControlMessage(ipv4.FlagDst, true); err != nil { +// // error handling +// } +// +// The application could identify whether the received packets are +// of interest by using the control message that contains the +// destination address of the received packet. +// +// b := make([]byte, 1500) +// for { +// n, cm, src, err := p.ReadFrom(b) +// if err != nil { +// // error handling +// } +// if cm.Dst.IsMulticast() { +// if cm.Dst.Equal(group) { +// // joined group, do something +// } else { +// // unknown group, discard +// continue +// } +// } +// +// The application can also send both unicast and multicast packets. +// +// p.SetTOS(0x0) +// p.SetTTL(16) +// if _, err := p.WriteTo(data, nil, src); err != nil { +// // error handling +// } +// dst := &net.UDPAddr{IP: group, Port: 1024} +// for _, ifi := range []*net.Interface{en0, en1} { +// if err := p.SetMulticastInterface(ifi); err != nil { +// // error handling +// } +// p.SetMulticastTTL(2) +// if _, err := p.WriteTo(data, nil, dst); err != nil { +// // error handling +// } +// } +// } +// +// +// More multicasting +// +// An application that uses PacketConn or RawConn may join multiple +// multicast groups. For example, a UDP listener with port 1024 might +// join two different groups across over two different network +// interfaces by using: +// +// c, err := net.ListenPacket("udp4", "0.0.0.0:1024") +// if err != nil { +// // error handling +// } +// defer c.Close() +// p := ipv4.NewPacketConn(c) +// if err := p.JoinGroup(en0, &net.UDPAddr{IP: net.IPv4(224, 0, 0, 248)}); err != nil { +// // error handling +// } +// if err := p.JoinGroup(en0, &net.UDPAddr{IP: net.IPv4(224, 0, 0, 249)}); err != nil { +// // error handling +// } +// if err := p.JoinGroup(en1, &net.UDPAddr{IP: net.IPv4(224, 0, 0, 249)}); err != nil { +// // error handling +// } +// +// It is possible for multiple UDP listeners that listen on the same +// UDP port to join the same multicast group. The net package will +// provide a socket that listens to a wildcard address with reusable +// UDP port when an appropriate multicast address prefix is passed to +// the net.ListenPacket or net.ListenUDP. +// +// c1, err := net.ListenPacket("udp4", "224.0.0.0:1024") +// if err != nil { +// // error handling +// } +// defer c1.Close() +// c2, err := net.ListenPacket("udp4", "224.0.0.0:1024") +// if err != nil { +// // error handling +// } +// defer c2.Close() +// p1 := ipv4.NewPacketConn(c1) +// if err := p1.JoinGroup(en0, &net.UDPAddr{IP: net.IPv4(224, 0, 0, 248)}); err != nil { +// // error handling +// } +// p2 := ipv4.NewPacketConn(c2) +// if err := p2.JoinGroup(en0, &net.UDPAddr{IP: net.IPv4(224, 0, 0, 248)}); err != nil { +// // error handling +// } +// +// Also it is possible for the application to leave or rejoin a +// multicast group on the network interface. +// +// if err := p.LeaveGroup(en0, &net.UDPAddr{IP: net.IPv4(224, 0, 0, 248)}); err != nil { +// // error handling +// } +// if err := p.JoinGroup(en0, &net.UDPAddr{IP: net.IPv4(224, 0, 0, 250)}); err != nil { +// // error handling +// } +// +// +// Source-specific multicasting +// +// An application that uses PacketConn or RawConn on IGMPv3 supported +// platform is able to join source-specific multicast groups. +// The application may use JoinSourceSpecificGroup and +// LeaveSourceSpecificGroup for the operation known as "include" mode, +// +// ssmgroup := net.UDPAddr{IP: net.IPv4(232, 7, 8, 9)} +// ssmsource := net.UDPAddr{IP: net.IPv4(192, 168, 0, 1)}) +// if err := p.JoinSourceSpecificGroup(en0, &ssmgroup, &ssmsource); err != nil { +// // error handling +// } +// if err := p.LeaveSourceSpecificGroup(en0, &ssmgroup, &ssmsource); err != nil { +// // error handling +// } +// +// or JoinGroup, ExcludeSourceSpecificGroup, +// IncludeSourceSpecificGroup and LeaveGroup for the operation known +// as "exclude" mode. +// +// exclsource := net.UDPAddr{IP: net.IPv4(192, 168, 0, 254)} +// if err := p.JoinGroup(en0, &ssmgroup); err != nil { +// // error handling +// } +// if err := p.ExcludeSourceSpecificGroup(en0, &ssmgroup, &exclsource); err != nil { +// // error handling +// } +// if err := p.LeaveGroup(en0, &ssmgroup); err != nil { +// // error handling +// } +// +// Note that it depends on each platform implementation what happens +// when an application which runs on IGMPv3 unsupported platform uses +// JoinSourceSpecificGroup and LeaveSourceSpecificGroup. +// In general the platform tries to fall back to conversations using +// IGMPv1 or IGMPv2 and starts to listen to multicast traffic. +// In the fallback case, ExcludeSourceSpecificGroup and +// IncludeSourceSpecificGroup may return an error. +package ipv4 // import "golang.org/x/net/ipv4" + +// BUG(mikio): This package is not implemented on NaCl and Plan 9. diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/endpoint.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/endpoint.go new file mode 100644 index 000000000..2ab877363 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/endpoint.go @@ -0,0 +1,187 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv4 + +import ( + "net" + "syscall" + "time" + + "golang.org/x/net/internal/socket" +) + +// BUG(mikio): On Windows, the JoinSourceSpecificGroup, +// LeaveSourceSpecificGroup, ExcludeSourceSpecificGroup and +// IncludeSourceSpecificGroup methods of PacketConn and RawConn are +// not implemented. + +// A Conn represents a network endpoint that uses the IPv4 transport. +// It is used to control basic IP-level socket options such as TOS and +// TTL. +type Conn struct { + genericOpt +} + +type genericOpt struct { + *socket.Conn +} + +func (c *genericOpt) ok() bool { return c != nil && c.Conn != nil } + +// NewConn returns a new Conn. +func NewConn(c net.Conn) *Conn { + cc, _ := socket.NewConn(c) + return &Conn{ + genericOpt: genericOpt{Conn: cc}, + } +} + +// A PacketConn represents a packet network endpoint that uses the +// IPv4 transport. It is used to control several IP-level socket +// options including multicasting. It also provides datagram based +// network I/O methods specific to the IPv4 and higher layer protocols +// such as UDP. +type PacketConn struct { + genericOpt + dgramOpt + payloadHandler +} + +type dgramOpt struct { + *socket.Conn +} + +func (c *dgramOpt) ok() bool { return c != nil && c.Conn != nil } + +// SetControlMessage sets the per packet IP-level socket options. +func (c *PacketConn) SetControlMessage(cf ControlFlags, on bool) error { + if !c.payloadHandler.ok() { + return syscall.EINVAL + } + return setControlMessage(c.dgramOpt.Conn, &c.payloadHandler.rawOpt, cf, on) +} + +// SetDeadline sets the read and write deadlines associated with the +// endpoint. +func (c *PacketConn) SetDeadline(t time.Time) error { + if !c.payloadHandler.ok() { + return syscall.EINVAL + } + return c.payloadHandler.PacketConn.SetDeadline(t) +} + +// SetReadDeadline sets the read deadline associated with the +// endpoint. +func (c *PacketConn) SetReadDeadline(t time.Time) error { + if !c.payloadHandler.ok() { + return syscall.EINVAL + } + return c.payloadHandler.PacketConn.SetReadDeadline(t) +} + +// SetWriteDeadline sets the write deadline associated with the +// endpoint. +func (c *PacketConn) SetWriteDeadline(t time.Time) error { + if !c.payloadHandler.ok() { + return syscall.EINVAL + } + return c.payloadHandler.PacketConn.SetWriteDeadline(t) +} + +// Close closes the endpoint. +func (c *PacketConn) Close() error { + if !c.payloadHandler.ok() { + return syscall.EINVAL + } + return c.payloadHandler.PacketConn.Close() +} + +// NewPacketConn returns a new PacketConn using c as its underlying +// transport. +func NewPacketConn(c net.PacketConn) *PacketConn { + cc, _ := socket.NewConn(c.(net.Conn)) + p := &PacketConn{ + genericOpt: genericOpt{Conn: cc}, + dgramOpt: dgramOpt{Conn: cc}, + payloadHandler: payloadHandler{PacketConn: c, Conn: cc}, + } + return p +} + +// A RawConn represents a packet network endpoint that uses the IPv4 +// transport. It is used to control several IP-level socket options +// including IPv4 header manipulation. It also provides datagram +// based network I/O methods specific to the IPv4 and higher layer +// protocols that handle IPv4 datagram directly such as OSPF, GRE. +type RawConn struct { + genericOpt + dgramOpt + packetHandler +} + +// SetControlMessage sets the per packet IP-level socket options. +func (c *RawConn) SetControlMessage(cf ControlFlags, on bool) error { + if !c.packetHandler.ok() { + return syscall.EINVAL + } + return setControlMessage(c.dgramOpt.Conn, &c.packetHandler.rawOpt, cf, on) +} + +// SetDeadline sets the read and write deadlines associated with the +// endpoint. +func (c *RawConn) SetDeadline(t time.Time) error { + if !c.packetHandler.ok() { + return syscall.EINVAL + } + return c.packetHandler.IPConn.SetDeadline(t) +} + +// SetReadDeadline sets the read deadline associated with the +// endpoint. +func (c *RawConn) SetReadDeadline(t time.Time) error { + if !c.packetHandler.ok() { + return syscall.EINVAL + } + return c.packetHandler.IPConn.SetReadDeadline(t) +} + +// SetWriteDeadline sets the write deadline associated with the +// endpoint. +func (c *RawConn) SetWriteDeadline(t time.Time) error { + if !c.packetHandler.ok() { + return syscall.EINVAL + } + return c.packetHandler.IPConn.SetWriteDeadline(t) +} + +// Close closes the endpoint. +func (c *RawConn) Close() error { + if !c.packetHandler.ok() { + return syscall.EINVAL + } + return c.packetHandler.IPConn.Close() +} + +// NewRawConn returns a new RawConn using c as its underlying +// transport. +func NewRawConn(c net.PacketConn) (*RawConn, error) { + cc, err := socket.NewConn(c.(net.Conn)) + if err != nil { + return nil, err + } + r := &RawConn{ + genericOpt: genericOpt{Conn: cc}, + dgramOpt: dgramOpt{Conn: cc}, + packetHandler: packetHandler{IPConn: c.(*net.IPConn), Conn: cc}, + } + so, ok := sockOpts[ssoHeaderPrepend] + if !ok { + return nil, errOpNoSupport + } + if err := so.SetInt(r.dgramOpt.Conn, boolint(true)); err != nil { + return nil, err + } + return r, nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/genericopt.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/genericopt.go new file mode 100644 index 000000000..119bf841b --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/genericopt.go @@ -0,0 +1,57 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv4 + +import "syscall" + +// TOS returns the type-of-service field value for outgoing packets. +func (c *genericOpt) TOS() (int, error) { + if !c.ok() { + return 0, syscall.EINVAL + } + so, ok := sockOpts[ssoTOS] + if !ok { + return 0, errOpNoSupport + } + return so.GetInt(c.Conn) +} + +// SetTOS sets the type-of-service field value for future outgoing +// packets. +func (c *genericOpt) SetTOS(tos int) error { + if !c.ok() { + return syscall.EINVAL + } + so, ok := sockOpts[ssoTOS] + if !ok { + return errOpNoSupport + } + return so.SetInt(c.Conn, tos) +} + +// TTL returns the time-to-live field value for outgoing packets. +func (c *genericOpt) TTL() (int, error) { + if !c.ok() { + return 0, syscall.EINVAL + } + so, ok := sockOpts[ssoTTL] + if !ok { + return 0, errOpNoSupport + } + return so.GetInt(c.Conn) +} + +// SetTTL sets the time-to-live field value for future outgoing +// packets. +func (c *genericOpt) SetTTL(ttl int) error { + if !c.ok() { + return syscall.EINVAL + } + so, ok := sockOpts[ssoTTL] + if !ok { + return errOpNoSupport + } + return so.SetInt(c.Conn, ttl) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/header.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/header.go new file mode 100644 index 000000000..8bb0f0f4d --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/header.go @@ -0,0 +1,159 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv4 + +import ( + "encoding/binary" + "fmt" + "net" + "runtime" + "syscall" + + "golang.org/x/net/internal/socket" +) + +const ( + Version = 4 // protocol version + HeaderLen = 20 // header length without extension headers + maxHeaderLen = 60 // sensible default, revisit if later RFCs define new usage of version and header length fields +) + +type HeaderFlags int + +const ( + MoreFragments HeaderFlags = 1 << iota // more fragments flag + DontFragment // don't fragment flag +) + +// A Header represents an IPv4 header. +type Header struct { + Version int // protocol version + Len int // header length + TOS int // type-of-service + TotalLen int // packet total length + ID int // identification + Flags HeaderFlags // flags + FragOff int // fragment offset + TTL int // time-to-live + Protocol int // next protocol + Checksum int // checksum + Src net.IP // source address + Dst net.IP // destination address + Options []byte // options, extension headers +} + +func (h *Header) String() string { + if h == nil { + return "" + } + return fmt.Sprintf("ver=%d hdrlen=%d tos=%#x totallen=%d id=%#x flags=%#x fragoff=%#x ttl=%d proto=%d cksum=%#x src=%v dst=%v", h.Version, h.Len, h.TOS, h.TotalLen, h.ID, h.Flags, h.FragOff, h.TTL, h.Protocol, h.Checksum, h.Src, h.Dst) +} + +// Marshal returns the binary encoding of h. +func (h *Header) Marshal() ([]byte, error) { + if h == nil { + return nil, syscall.EINVAL + } + if h.Len < HeaderLen { + return nil, errHeaderTooShort + } + hdrlen := HeaderLen + len(h.Options) + b := make([]byte, hdrlen) + b[0] = byte(Version<<4 | (hdrlen >> 2 & 0x0f)) + b[1] = byte(h.TOS) + flagsAndFragOff := (h.FragOff & 0x1fff) | int(h.Flags<<13) + switch runtime.GOOS { + case "darwin", "dragonfly", "netbsd": + socket.NativeEndian.PutUint16(b[2:4], uint16(h.TotalLen)) + socket.NativeEndian.PutUint16(b[6:8], uint16(flagsAndFragOff)) + case "freebsd": + if freebsdVersion < 1100000 { + socket.NativeEndian.PutUint16(b[2:4], uint16(h.TotalLen)) + socket.NativeEndian.PutUint16(b[6:8], uint16(flagsAndFragOff)) + } else { + binary.BigEndian.PutUint16(b[2:4], uint16(h.TotalLen)) + binary.BigEndian.PutUint16(b[6:8], uint16(flagsAndFragOff)) + } + default: + binary.BigEndian.PutUint16(b[2:4], uint16(h.TotalLen)) + binary.BigEndian.PutUint16(b[6:8], uint16(flagsAndFragOff)) + } + binary.BigEndian.PutUint16(b[4:6], uint16(h.ID)) + b[8] = byte(h.TTL) + b[9] = byte(h.Protocol) + binary.BigEndian.PutUint16(b[10:12], uint16(h.Checksum)) + if ip := h.Src.To4(); ip != nil { + copy(b[12:16], ip[:net.IPv4len]) + } + if ip := h.Dst.To4(); ip != nil { + copy(b[16:20], ip[:net.IPv4len]) + } else { + return nil, errMissingAddress + } + if len(h.Options) > 0 { + copy(b[HeaderLen:], h.Options) + } + return b, nil +} + +// Parse parses b as an IPv4 header and sotres the result in h. +func (h *Header) Parse(b []byte) error { + if h == nil || len(b) < HeaderLen { + return errHeaderTooShort + } + hdrlen := int(b[0]&0x0f) << 2 + if hdrlen > len(b) { + return errBufferTooShort + } + h.Version = int(b[0] >> 4) + h.Len = hdrlen + h.TOS = int(b[1]) + h.ID = int(binary.BigEndian.Uint16(b[4:6])) + h.TTL = int(b[8]) + h.Protocol = int(b[9]) + h.Checksum = int(binary.BigEndian.Uint16(b[10:12])) + h.Src = net.IPv4(b[12], b[13], b[14], b[15]) + h.Dst = net.IPv4(b[16], b[17], b[18], b[19]) + switch runtime.GOOS { + case "darwin", "dragonfly", "netbsd": + h.TotalLen = int(socket.NativeEndian.Uint16(b[2:4])) + hdrlen + h.FragOff = int(socket.NativeEndian.Uint16(b[6:8])) + case "freebsd": + if freebsdVersion < 1100000 { + h.TotalLen = int(socket.NativeEndian.Uint16(b[2:4])) + if freebsdVersion < 1000000 { + h.TotalLen += hdrlen + } + h.FragOff = int(socket.NativeEndian.Uint16(b[6:8])) + } else { + h.TotalLen = int(binary.BigEndian.Uint16(b[2:4])) + h.FragOff = int(binary.BigEndian.Uint16(b[6:8])) + } + default: + h.TotalLen = int(binary.BigEndian.Uint16(b[2:4])) + h.FragOff = int(binary.BigEndian.Uint16(b[6:8])) + } + h.Flags = HeaderFlags(h.FragOff&0xe000) >> 13 + h.FragOff = h.FragOff & 0x1fff + optlen := hdrlen - HeaderLen + if optlen > 0 && len(b) >= hdrlen { + if cap(h.Options) < optlen { + h.Options = make([]byte, optlen) + } else { + h.Options = h.Options[:optlen] + } + copy(h.Options, b[HeaderLen:hdrlen]) + } + return nil +} + +// ParseHeader parses b as an IPv4 header. +func ParseHeader(b []byte) (*Header, error) { + h := new(Header) + if err := h.Parse(b); err != nil { + return nil, err + } + return h, nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/helper.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/helper.go new file mode 100644 index 000000000..a5052e324 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/helper.go @@ -0,0 +1,63 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv4 + +import ( + "errors" + "net" +) + +var ( + errMissingAddress = errors.New("missing address") + errMissingHeader = errors.New("missing header") + errHeaderTooShort = errors.New("header too short") + errBufferTooShort = errors.New("buffer too short") + errInvalidConnType = errors.New("invalid conn type") + errOpNoSupport = errors.New("operation not supported") + errNoSuchInterface = errors.New("no such interface") + errNoSuchMulticastInterface = errors.New("no such multicast interface") + + // See http://www.freebsd.org/doc/en/books/porters-handbook/freebsd-versions.html. + freebsdVersion uint32 +) + +func boolint(b bool) int { + if b { + return 1 + } + return 0 +} + +func netAddrToIP4(a net.Addr) net.IP { + switch v := a.(type) { + case *net.UDPAddr: + if ip := v.IP.To4(); ip != nil { + return ip + } + case *net.IPAddr: + if ip := v.IP.To4(); ip != nil { + return ip + } + } + return nil +} + +func opAddr(a net.Addr) net.Addr { + switch a.(type) { + case *net.TCPAddr: + if a == nil { + return nil + } + case *net.UDPAddr: + if a == nil { + return nil + } + case *net.IPAddr: + if a == nil { + return nil + } + } + return a +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/iana.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/iana.go new file mode 100644 index 000000000..be10c9488 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/iana.go @@ -0,0 +1,34 @@ +// go generate gen.go +// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +package ipv4 + +// Internet Control Message Protocol (ICMP) Parameters, Updated: 2013-04-19 +const ( + ICMPTypeEchoReply ICMPType = 0 // Echo Reply + ICMPTypeDestinationUnreachable ICMPType = 3 // Destination Unreachable + ICMPTypeRedirect ICMPType = 5 // Redirect + ICMPTypeEcho ICMPType = 8 // Echo + ICMPTypeRouterAdvertisement ICMPType = 9 // Router Advertisement + ICMPTypeRouterSolicitation ICMPType = 10 // Router Solicitation + ICMPTypeTimeExceeded ICMPType = 11 // Time Exceeded + ICMPTypeParameterProblem ICMPType = 12 // Parameter Problem + ICMPTypeTimestamp ICMPType = 13 // Timestamp + ICMPTypeTimestampReply ICMPType = 14 // Timestamp Reply + ICMPTypePhoturis ICMPType = 40 // Photuris +) + +// Internet Control Message Protocol (ICMP) Parameters, Updated: 2013-04-19 +var icmpTypes = map[ICMPType]string{ + 0: "echo reply", + 3: "destination unreachable", + 5: "redirect", + 8: "echo", + 9: "router advertisement", + 10: "router solicitation", + 11: "time exceeded", + 12: "parameter problem", + 13: "timestamp", + 14: "timestamp reply", + 40: "photuris", +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/icmp.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/icmp.go new file mode 100644 index 000000000..9902bb3d2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/icmp.go @@ -0,0 +1,57 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv4 + +import "golang.org/x/net/internal/iana" + +// An ICMPType represents a type of ICMP message. +type ICMPType int + +func (typ ICMPType) String() string { + s, ok := icmpTypes[typ] + if !ok { + return "" + } + return s +} + +// Protocol returns the ICMPv4 protocol number. +func (typ ICMPType) Protocol() int { + return iana.ProtocolICMP +} + +// An ICMPFilter represents an ICMP message filter for incoming +// packets. The filter belongs to a packet delivery path on a host and +// it cannot interact with forwarding packets or tunnel-outer packets. +// +// Note: RFC 8200 defines a reasonable role model and it works not +// only for IPv6 but IPv4. A node means a device that implements IP. +// A router means a node that forwards IP packets not explicitly +// addressed to itself, and a host means a node that is not a router. +type ICMPFilter struct { + icmpFilter +} + +// Accept accepts incoming ICMP packets including the type field value +// typ. +func (f *ICMPFilter) Accept(typ ICMPType) { + f.accept(typ) +} + +// Block blocks incoming ICMP packets including the type field value +// typ. +func (f *ICMPFilter) Block(typ ICMPType) { + f.block(typ) +} + +// SetAll sets the filter action to the filter. +func (f *ICMPFilter) SetAll(block bool) { + f.setAll(block) +} + +// WillBlock reports whether the ICMP type will be blocked. +func (f *ICMPFilter) WillBlock(typ ICMPType) bool { + return f.willBlock(typ) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/icmp_linux.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/icmp_linux.go new file mode 100644 index 000000000..6e1c5c80a --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/icmp_linux.go @@ -0,0 +1,25 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv4 + +func (f *icmpFilter) accept(typ ICMPType) { + f.Data &^= 1 << (uint32(typ) & 31) +} + +func (f *icmpFilter) block(typ ICMPType) { + f.Data |= 1 << (uint32(typ) & 31) +} + +func (f *icmpFilter) setAll(block bool) { + if block { + f.Data = 1<<32 - 1 + } else { + f.Data = 0 + } +} + +func (f *icmpFilter) willBlock(typ ICMPType) bool { + return f.Data&(1<<(uint32(typ)&31)) != 0 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/icmp_stub.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/icmp_stub.go new file mode 100644 index 000000000..21bb29ab3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/icmp_stub.go @@ -0,0 +1,25 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !linux + +package ipv4 + +const sizeofICMPFilter = 0x0 + +type icmpFilter struct { +} + +func (f *icmpFilter) accept(typ ICMPType) { +} + +func (f *icmpFilter) block(typ ICMPType) { +} + +func (f *icmpFilter) setAll(block bool) { +} + +func (f *icmpFilter) willBlock(typ ICMPType) bool { + return false +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/packet.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/packet.go new file mode 100644 index 000000000..f00f5b052 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/packet.go @@ -0,0 +1,69 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv4 + +import ( + "net" + "syscall" + + "golang.org/x/net/internal/socket" +) + +// BUG(mikio): On Windows, the ReadFrom and WriteTo methods of RawConn +// are not implemented. + +// A packetHandler represents the IPv4 datagram handler. +type packetHandler struct { + *net.IPConn + *socket.Conn + rawOpt +} + +func (c *packetHandler) ok() bool { return c != nil && c.IPConn != nil && c.Conn != nil } + +// ReadFrom reads an IPv4 datagram from the endpoint c, copying the +// datagram into b. It returns the received datagram as the IPv4 +// header h, the payload p and the control message cm. +func (c *packetHandler) ReadFrom(b []byte) (h *Header, p []byte, cm *ControlMessage, err error) { + if !c.ok() { + return nil, nil, nil, syscall.EINVAL + } + return c.readFrom(b) +} + +func slicePacket(b []byte) (h, p []byte, err error) { + if len(b) < HeaderLen { + return nil, nil, errHeaderTooShort + } + hdrlen := int(b[0]&0x0f) << 2 + return b[:hdrlen], b[hdrlen:], nil +} + +// WriteTo writes an IPv4 datagram through the endpoint c, copying the +// datagram from the IPv4 header h and the payload p. The control +// message cm allows the datagram path and the outgoing interface to be +// specified. Currently only Darwin and Linux support this. The cm +// may be nil if control of the outgoing datagram is not required. +// +// The IPv4 header h must contain appropriate fields that include: +// +// Version = +// Len = +// TOS = +// TotalLen = +// ID = platform sets an appropriate value if ID is zero +// FragOff = +// TTL = +// Protocol = +// Checksum = platform sets an appropriate value if Checksum is zero +// Src = platform sets an appropriate value if Src is nil +// Dst = +// Options = optional +func (c *packetHandler) WriteTo(h *Header, p []byte, cm *ControlMessage) error { + if !c.ok() { + return syscall.EINVAL + } + return c.writeTo(h, p, cm) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/packet_go1_8.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/packet_go1_8.go new file mode 100644 index 000000000..b47d18683 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/packet_go1_8.go @@ -0,0 +1,56 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !go1.9 + +package ipv4 + +import "net" + +func (c *packetHandler) readFrom(b []byte) (h *Header, p []byte, cm *ControlMessage, err error) { + c.rawOpt.RLock() + oob := NewControlMessage(c.rawOpt.cflags) + c.rawOpt.RUnlock() + n, nn, _, src, err := c.ReadMsgIP(b, oob) + if err != nil { + return nil, nil, nil, err + } + var hs []byte + if hs, p, err = slicePacket(b[:n]); err != nil { + return nil, nil, nil, err + } + if h, err = ParseHeader(hs); err != nil { + return nil, nil, nil, err + } + if nn > 0 { + cm = new(ControlMessage) + if err := cm.Parse(oob[:nn]); err != nil { + return nil, nil, nil, err + } + } + if src != nil && cm != nil { + cm.Src = src.IP + } + return +} + +func (c *packetHandler) writeTo(h *Header, p []byte, cm *ControlMessage) error { + oob := cm.Marshal() + wh, err := h.Marshal() + if err != nil { + return err + } + dst := new(net.IPAddr) + if cm != nil { + if ip := cm.Dst.To4(); ip != nil { + dst.IP = ip + } + } + if dst.IP == nil { + dst.IP = h.Dst + } + wh = append(wh, p...) + _, _, err = c.WriteMsgIP(wh, oob, dst) + return err +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/packet_go1_9.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/packet_go1_9.go new file mode 100644 index 000000000..082c36d73 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/packet_go1_9.go @@ -0,0 +1,67 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build go1.9 + +package ipv4 + +import ( + "net" + + "golang.org/x/net/internal/socket" +) + +func (c *packetHandler) readFrom(b []byte) (h *Header, p []byte, cm *ControlMessage, err error) { + c.rawOpt.RLock() + m := socket.Message{ + Buffers: [][]byte{b}, + OOB: NewControlMessage(c.rawOpt.cflags), + } + c.rawOpt.RUnlock() + if err := c.RecvMsg(&m, 0); err != nil { + return nil, nil, nil, &net.OpError{Op: "read", Net: c.IPConn.LocalAddr().Network(), Source: c.IPConn.LocalAddr(), Err: err} + } + var hs []byte + if hs, p, err = slicePacket(b[:m.N]); err != nil { + return nil, nil, nil, &net.OpError{Op: "read", Net: c.IPConn.LocalAddr().Network(), Source: c.IPConn.LocalAddr(), Err: err} + } + if h, err = ParseHeader(hs); err != nil { + return nil, nil, nil, &net.OpError{Op: "read", Net: c.IPConn.LocalAddr().Network(), Source: c.IPConn.LocalAddr(), Err: err} + } + if m.NN > 0 { + cm = new(ControlMessage) + if err := cm.Parse(m.OOB[:m.NN]); err != nil { + return nil, nil, nil, &net.OpError{Op: "read", Net: c.IPConn.LocalAddr().Network(), Source: c.IPConn.LocalAddr(), Err: err} + } + } + if src, ok := m.Addr.(*net.IPAddr); ok && cm != nil { + cm.Src = src.IP + } + return +} + +func (c *packetHandler) writeTo(h *Header, p []byte, cm *ControlMessage) error { + m := socket.Message{ + OOB: cm.Marshal(), + } + wh, err := h.Marshal() + if err != nil { + return err + } + m.Buffers = [][]byte{wh, p} + dst := new(net.IPAddr) + if cm != nil { + if ip := cm.Dst.To4(); ip != nil { + dst.IP = ip + } + } + if dst.IP == nil { + dst.IP = h.Dst + } + m.Addr = dst + if err := c.SendMsg(&m, 0); err != nil { + return &net.OpError{Op: "write", Net: c.IPConn.LocalAddr().Network(), Source: c.IPConn.LocalAddr(), Addr: opAddr(dst), Err: err} + } + return nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/payload.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/payload.go new file mode 100644 index 000000000..f95f811ac --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/payload.go @@ -0,0 +1,23 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv4 + +import ( + "net" + + "golang.org/x/net/internal/socket" +) + +// BUG(mikio): On Windows, the ControlMessage for ReadFrom and WriteTo +// methods of PacketConn is not implemented. + +// A payloadHandler represents the IPv4 datagram payload handler. +type payloadHandler struct { + net.PacketConn + *socket.Conn + rawOpt +} + +func (c *payloadHandler) ok() bool { return c != nil && c.PacketConn != nil && c.Conn != nil } diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/payload_cmsg.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/payload_cmsg.go new file mode 100644 index 000000000..3f06d7606 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/payload_cmsg.go @@ -0,0 +1,36 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !nacl,!plan9,!windows + +package ipv4 + +import ( + "net" + "syscall" +) + +// ReadFrom reads a payload of the received IPv4 datagram, from the +// endpoint c, copying the payload into b. It returns the number of +// bytes copied into b, the control message cm and the source address +// src of the received datagram. +func (c *payloadHandler) ReadFrom(b []byte) (n int, cm *ControlMessage, src net.Addr, err error) { + if !c.ok() { + return 0, nil, nil, syscall.EINVAL + } + return c.readFrom(b) +} + +// WriteTo writes a payload of the IPv4 datagram, to the destination +// address dst through the endpoint c, copying the payload from b. It +// returns the number of bytes written. The control message cm allows +// the datagram path and the outgoing interface to be specified. +// Currently only Darwin and Linux support this. The cm may be nil if +// control of the outgoing datagram is not required. +func (c *payloadHandler) WriteTo(b []byte, cm *ControlMessage, dst net.Addr) (n int, err error) { + if !c.ok() { + return 0, syscall.EINVAL + } + return c.writeTo(b, cm, dst) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/payload_cmsg_go1_8.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/payload_cmsg_go1_8.go new file mode 100644 index 000000000..d26ccd90c --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/payload_cmsg_go1_8.go @@ -0,0 +1,59 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !go1.9 +// +build !nacl,!plan9,!windows + +package ipv4 + +import "net" + +func (c *payloadHandler) readFrom(b []byte) (n int, cm *ControlMessage, src net.Addr, err error) { + c.rawOpt.RLock() + oob := NewControlMessage(c.rawOpt.cflags) + c.rawOpt.RUnlock() + var nn int + switch c := c.PacketConn.(type) { + case *net.UDPConn: + if n, nn, _, src, err = c.ReadMsgUDP(b, oob); err != nil { + return 0, nil, nil, err + } + case *net.IPConn: + nb := make([]byte, maxHeaderLen+len(b)) + if n, nn, _, src, err = c.ReadMsgIP(nb, oob); err != nil { + return 0, nil, nil, err + } + hdrlen := int(nb[0]&0x0f) << 2 + copy(b, nb[hdrlen:]) + n -= hdrlen + default: + return 0, nil, nil, &net.OpError{Op: "read", Net: c.LocalAddr().Network(), Source: c.LocalAddr(), Err: errInvalidConnType} + } + if nn > 0 { + cm = new(ControlMessage) + if err = cm.Parse(oob[:nn]); err != nil { + return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err} + } + } + if cm != nil { + cm.Src = netAddrToIP4(src) + } + return +} + +func (c *payloadHandler) writeTo(b []byte, cm *ControlMessage, dst net.Addr) (n int, err error) { + oob := cm.Marshal() + if dst == nil { + return 0, &net.OpError{Op: "write", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: errMissingAddress} + } + switch c := c.PacketConn.(type) { + case *net.UDPConn: + n, _, err = c.WriteMsgUDP(b, oob, dst.(*net.UDPAddr)) + case *net.IPConn: + n, _, err = c.WriteMsgIP(b, oob, dst.(*net.IPAddr)) + default: + return 0, &net.OpError{Op: "write", Net: c.LocalAddr().Network(), Source: c.LocalAddr(), Addr: opAddr(dst), Err: errInvalidConnType} + } + return +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/payload_cmsg_go1_9.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/payload_cmsg_go1_9.go new file mode 100644 index 000000000..2f1931183 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/payload_cmsg_go1_9.go @@ -0,0 +1,67 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build go1.9 +// +build !nacl,!plan9,!windows + +package ipv4 + +import ( + "net" + + "golang.org/x/net/internal/socket" +) + +func (c *payloadHandler) readFrom(b []byte) (int, *ControlMessage, net.Addr, error) { + c.rawOpt.RLock() + m := socket.Message{ + OOB: NewControlMessage(c.rawOpt.cflags), + } + c.rawOpt.RUnlock() + switch c.PacketConn.(type) { + case *net.UDPConn: + m.Buffers = [][]byte{b} + if err := c.RecvMsg(&m, 0); err != nil { + return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err} + } + case *net.IPConn: + h := make([]byte, HeaderLen) + m.Buffers = [][]byte{h, b} + if err := c.RecvMsg(&m, 0); err != nil { + return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err} + } + hdrlen := int(h[0]&0x0f) << 2 + if hdrlen > len(h) { + d := hdrlen - len(h) + copy(b, b[d:]) + m.N -= d + } else { + m.N -= hdrlen + } + default: + return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: errInvalidConnType} + } + var cm *ControlMessage + if m.NN > 0 { + cm = new(ControlMessage) + if err := cm.Parse(m.OOB[:m.NN]); err != nil { + return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err} + } + cm.Src = netAddrToIP4(m.Addr) + } + return m.N, cm, m.Addr, nil +} + +func (c *payloadHandler) writeTo(b []byte, cm *ControlMessage, dst net.Addr) (int, error) { + m := socket.Message{ + Buffers: [][]byte{b}, + OOB: cm.Marshal(), + Addr: dst, + } + err := c.SendMsg(&m, 0) + if err != nil { + err = &net.OpError{Op: "write", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Addr: opAddr(dst), Err: err} + } + return m.N, err +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/payload_nocmsg.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/payload_nocmsg.go new file mode 100644 index 000000000..3926de70b --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/payload_nocmsg.go @@ -0,0 +1,42 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build nacl plan9 windows + +package ipv4 + +import ( + "net" + "syscall" +) + +// ReadFrom reads a payload of the received IPv4 datagram, from the +// endpoint c, copying the payload into b. It returns the number of +// bytes copied into b, the control message cm and the source address +// src of the received datagram. +func (c *payloadHandler) ReadFrom(b []byte) (n int, cm *ControlMessage, src net.Addr, err error) { + if !c.ok() { + return 0, nil, nil, syscall.EINVAL + } + if n, src, err = c.PacketConn.ReadFrom(b); err != nil { + return 0, nil, nil, err + } + return +} + +// WriteTo writes a payload of the IPv4 datagram, to the destination +// address dst through the endpoint c, copying the payload from b. It +// returns the number of bytes written. The control message cm allows +// the datagram path and the outgoing interface to be specified. +// Currently only Darwin and Linux support this. The cm may be nil if +// control of the outgoing datagram is not required. +func (c *payloadHandler) WriteTo(b []byte, cm *ControlMessage, dst net.Addr) (n int, err error) { + if !c.ok() { + return 0, syscall.EINVAL + } + if dst == nil { + return 0, errMissingAddress + } + return c.PacketConn.WriteTo(b, dst) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sockopt.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sockopt.go new file mode 100644 index 000000000..22e90c039 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sockopt.go @@ -0,0 +1,44 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv4 + +import "golang.org/x/net/internal/socket" + +// Sticky socket options +const ( + ssoTOS = iota // header field for unicast packet + ssoTTL // header field for unicast packet + ssoMulticastTTL // header field for multicast packet + ssoMulticastInterface // outbound interface for multicast packet + ssoMulticastLoopback // loopback for multicast packet + ssoReceiveTTL // header field on received packet + ssoReceiveDst // header field on received packet + ssoReceiveInterface // inbound interface on received packet + ssoPacketInfo // incbound or outbound packet path + ssoHeaderPrepend // ipv4 header prepend + ssoStripHeader // strip ipv4 header + ssoICMPFilter // icmp filter + ssoJoinGroup // any-source multicast + ssoLeaveGroup // any-source multicast + ssoJoinSourceGroup // source-specific multicast + ssoLeaveSourceGroup // source-specific multicast + ssoBlockSourceGroup // any-source or source-specific multicast + ssoUnblockSourceGroup // any-source or source-specific multicast + ssoAttachFilter // attach BPF for filtering inbound traffic +) + +// Sticky socket option value types +const ( + ssoTypeIPMreq = iota + 1 + ssoTypeIPMreqn + ssoTypeGroupReq + ssoTypeGroupSourceReq +) + +// A sockOpt represents a binding for sticky socket option. +type sockOpt struct { + socket.Option + typ int // hint for option value type; optional +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sockopt_posix.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sockopt_posix.go new file mode 100644 index 000000000..e96955bc1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sockopt_posix.go @@ -0,0 +1,71 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows + +package ipv4 + +import ( + "net" + "unsafe" + + "golang.org/x/net/bpf" + "golang.org/x/net/internal/socket" +) + +func (so *sockOpt) getMulticastInterface(c *socket.Conn) (*net.Interface, error) { + switch so.typ { + case ssoTypeIPMreqn: + return so.getIPMreqn(c) + default: + return so.getMulticastIf(c) + } +} + +func (so *sockOpt) setMulticastInterface(c *socket.Conn, ifi *net.Interface) error { + switch so.typ { + case ssoTypeIPMreqn: + return so.setIPMreqn(c, ifi, nil) + default: + return so.setMulticastIf(c, ifi) + } +} + +func (so *sockOpt) getICMPFilter(c *socket.Conn) (*ICMPFilter, error) { + b := make([]byte, so.Len) + n, err := so.Get(c, b) + if err != nil { + return nil, err + } + if n != sizeofICMPFilter { + return nil, errOpNoSupport + } + return (*ICMPFilter)(unsafe.Pointer(&b[0])), nil +} + +func (so *sockOpt) setICMPFilter(c *socket.Conn, f *ICMPFilter) error { + b := (*[sizeofICMPFilter]byte)(unsafe.Pointer(f))[:sizeofICMPFilter] + return so.Set(c, b) +} + +func (so *sockOpt) setGroup(c *socket.Conn, ifi *net.Interface, grp net.IP) error { + switch so.typ { + case ssoTypeIPMreq: + return so.setIPMreq(c, ifi, grp) + case ssoTypeIPMreqn: + return so.setIPMreqn(c, ifi, grp) + case ssoTypeGroupReq: + return so.setGroupReq(c, ifi, grp) + default: + return errOpNoSupport + } +} + +func (so *sockOpt) setSourceGroup(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error { + return so.setGroupSourceReq(c, ifi, grp, src) +} + +func (so *sockOpt) setBPF(c *socket.Conn, f []bpf.RawInstruction) error { + return so.setAttachFilter(c, f) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sockopt_stub.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sockopt_stub.go new file mode 100644 index 000000000..23249b782 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sockopt_stub.go @@ -0,0 +1,42 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows + +package ipv4 + +import ( + "net" + + "golang.org/x/net/bpf" + "golang.org/x/net/internal/socket" +) + +func (so *sockOpt) getMulticastInterface(c *socket.Conn) (*net.Interface, error) { + return nil, errOpNoSupport +} + +func (so *sockOpt) setMulticastInterface(c *socket.Conn, ifi *net.Interface) error { + return errOpNoSupport +} + +func (so *sockOpt) getICMPFilter(c *socket.Conn) (*ICMPFilter, error) { + return nil, errOpNoSupport +} + +func (so *sockOpt) setICMPFilter(c *socket.Conn, f *ICMPFilter) error { + return errOpNoSupport +} + +func (so *sockOpt) setGroup(c *socket.Conn, ifi *net.Interface, grp net.IP) error { + return errOpNoSupport +} + +func (so *sockOpt) setSourceGroup(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error { + return errOpNoSupport +} + +func (so *sockOpt) setBPF(c *socket.Conn, f []bpf.RawInstruction) error { + return errOpNoSupport +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_asmreq.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_asmreq.go new file mode 100644 index 000000000..0388cba00 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_asmreq.go @@ -0,0 +1,119 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd netbsd openbsd solaris windows + +package ipv4 + +import ( + "net" + "unsafe" + + "golang.org/x/net/internal/socket" +) + +func (so *sockOpt) setIPMreq(c *socket.Conn, ifi *net.Interface, grp net.IP) error { + mreq := ipMreq{Multiaddr: [4]byte{grp[0], grp[1], grp[2], grp[3]}} + if err := setIPMreqInterface(&mreq, ifi); err != nil { + return err + } + b := (*[sizeofIPMreq]byte)(unsafe.Pointer(&mreq))[:sizeofIPMreq] + return so.Set(c, b) +} + +func (so *sockOpt) getMulticastIf(c *socket.Conn) (*net.Interface, error) { + var b [4]byte + if _, err := so.Get(c, b[:]); err != nil { + return nil, err + } + ifi, err := netIP4ToInterface(net.IPv4(b[0], b[1], b[2], b[3])) + if err != nil { + return nil, err + } + return ifi, nil +} + +func (so *sockOpt) setMulticastIf(c *socket.Conn, ifi *net.Interface) error { + ip, err := netInterfaceToIP4(ifi) + if err != nil { + return err + } + var b [4]byte + copy(b[:], ip) + return so.Set(c, b[:]) +} + +func setIPMreqInterface(mreq *ipMreq, ifi *net.Interface) error { + if ifi == nil { + return nil + } + ifat, err := ifi.Addrs() + if err != nil { + return err + } + for _, ifa := range ifat { + switch ifa := ifa.(type) { + case *net.IPAddr: + if ip := ifa.IP.To4(); ip != nil { + copy(mreq.Interface[:], ip) + return nil + } + case *net.IPNet: + if ip := ifa.IP.To4(); ip != nil { + copy(mreq.Interface[:], ip) + return nil + } + } + } + return errNoSuchInterface +} + +func netIP4ToInterface(ip net.IP) (*net.Interface, error) { + ift, err := net.Interfaces() + if err != nil { + return nil, err + } + for _, ifi := range ift { + ifat, err := ifi.Addrs() + if err != nil { + return nil, err + } + for _, ifa := range ifat { + switch ifa := ifa.(type) { + case *net.IPAddr: + if ip.Equal(ifa.IP) { + return &ifi, nil + } + case *net.IPNet: + if ip.Equal(ifa.IP) { + return &ifi, nil + } + } + } + } + return nil, errNoSuchInterface +} + +func netInterfaceToIP4(ifi *net.Interface) (net.IP, error) { + if ifi == nil { + return net.IPv4zero.To4(), nil + } + ifat, err := ifi.Addrs() + if err != nil { + return nil, err + } + for _, ifa := range ifat { + switch ifa := ifa.(type) { + case *net.IPAddr: + if ip := ifa.IP.To4(); ip != nil { + return ip, nil + } + case *net.IPNet: + if ip := ifa.IP.To4(); ip != nil { + return ip, nil + } + } + } + return nil, errNoSuchInterface +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_asmreq_stub.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_asmreq_stub.go new file mode 100644 index 000000000..f3919208b --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_asmreq_stub.go @@ -0,0 +1,25 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !darwin,!dragonfly,!freebsd,!netbsd,!openbsd,!solaris,!windows + +package ipv4 + +import ( + "net" + + "golang.org/x/net/internal/socket" +) + +func (so *sockOpt) setIPMreq(c *socket.Conn, ifi *net.Interface, grp net.IP) error { + return errOpNoSupport +} + +func (so *sockOpt) getMulticastIf(c *socket.Conn) (*net.Interface, error) { + return nil, errOpNoSupport +} + +func (so *sockOpt) setMulticastIf(c *socket.Conn, ifi *net.Interface) error { + return errOpNoSupport +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_asmreqn.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_asmreqn.go new file mode 100644 index 000000000..1f24f69f3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_asmreqn.go @@ -0,0 +1,42 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin freebsd linux + +package ipv4 + +import ( + "net" + "unsafe" + + "golang.org/x/net/internal/socket" +) + +func (so *sockOpt) getIPMreqn(c *socket.Conn) (*net.Interface, error) { + b := make([]byte, so.Len) + if _, err := so.Get(c, b); err != nil { + return nil, err + } + mreqn := (*ipMreqn)(unsafe.Pointer(&b[0])) + if mreqn.Ifindex == 0 { + return nil, nil + } + ifi, err := net.InterfaceByIndex(int(mreqn.Ifindex)) + if err != nil { + return nil, err + } + return ifi, nil +} + +func (so *sockOpt) setIPMreqn(c *socket.Conn, ifi *net.Interface, grp net.IP) error { + var mreqn ipMreqn + if ifi != nil { + mreqn.Ifindex = int32(ifi.Index) + } + if grp != nil { + mreqn.Multiaddr = [4]byte{grp[0], grp[1], grp[2], grp[3]} + } + b := (*[sizeofIPMreqn]byte)(unsafe.Pointer(&mreqn))[:sizeofIPMreqn] + return so.Set(c, b) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_asmreqn_stub.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_asmreqn_stub.go new file mode 100644 index 000000000..0711d3d78 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_asmreqn_stub.go @@ -0,0 +1,21 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !darwin,!freebsd,!linux + +package ipv4 + +import ( + "net" + + "golang.org/x/net/internal/socket" +) + +func (so *sockOpt) getIPMreqn(c *socket.Conn) (*net.Interface, error) { + return nil, errOpNoSupport +} + +func (so *sockOpt) setIPMreqn(c *socket.Conn, ifi *net.Interface, grp net.IP) error { + return errOpNoSupport +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_bpf.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_bpf.go new file mode 100644 index 000000000..9f30b7308 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_bpf.go @@ -0,0 +1,23 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build linux + +package ipv4 + +import ( + "unsafe" + + "golang.org/x/net/bpf" + "golang.org/x/net/internal/socket" +) + +func (so *sockOpt) setAttachFilter(c *socket.Conn, f []bpf.RawInstruction) error { + prog := sockFProg{ + Len: uint16(len(f)), + Filter: (*sockFilter)(unsafe.Pointer(&f[0])), + } + b := (*[sizeofSockFprog]byte)(unsafe.Pointer(&prog))[:sizeofSockFprog] + return so.Set(c, b) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_bpf_stub.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_bpf_stub.go new file mode 100644 index 000000000..9a2132093 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_bpf_stub.go @@ -0,0 +1,16 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !linux + +package ipv4 + +import ( + "golang.org/x/net/bpf" + "golang.org/x/net/internal/socket" +) + +func (so *sockOpt) setAttachFilter(c *socket.Conn, f []bpf.RawInstruction) error { + return errOpNoSupport +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_bsd.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_bsd.go new file mode 100644 index 000000000..58256dd9d --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_bsd.go @@ -0,0 +1,37 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build netbsd openbsd + +package ipv4 + +import ( + "net" + "syscall" + + "golang.org/x/net/internal/iana" + "golang.org/x/net/internal/socket" +) + +var ( + ctlOpts = [ctlMax]ctlOpt{ + ctlTTL: {sysIP_RECVTTL, 1, marshalTTL, parseTTL}, + ctlDst: {sysIP_RECVDSTADDR, net.IPv4len, marshalDst, parseDst}, + ctlInterface: {sysIP_RECVIF, syscall.SizeofSockaddrDatalink, marshalInterface, parseInterface}, + } + + sockOpts = map[int]*sockOpt{ + ssoTOS: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TOS, Len: 4}}, + ssoTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TTL, Len: 4}}, + ssoMulticastTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_TTL, Len: 1}}, + ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_IF, Len: 4}}, + ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_LOOP, Len: 1}}, + ssoReceiveTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVTTL, Len: 4}}, + ssoReceiveDst: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVDSTADDR, Len: 4}}, + ssoReceiveInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVIF, Len: 4}}, + ssoHeaderPrepend: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_HDRINCL, Len: 4}}, + ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_ADD_MEMBERSHIP, Len: sizeofIPMreq}, typ: ssoTypeIPMreq}, + ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_DROP_MEMBERSHIP, Len: sizeofIPMreq}, typ: ssoTypeIPMreq}, + } +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_darwin.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_darwin.go new file mode 100644 index 000000000..e8fb19169 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_darwin.go @@ -0,0 +1,93 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv4 + +import ( + "net" + "strconv" + "strings" + "syscall" + "unsafe" + + "golang.org/x/net/internal/iana" + "golang.org/x/net/internal/socket" +) + +var ( + ctlOpts = [ctlMax]ctlOpt{ + ctlTTL: {sysIP_RECVTTL, 1, marshalTTL, parseTTL}, + ctlDst: {sysIP_RECVDSTADDR, net.IPv4len, marshalDst, parseDst}, + ctlInterface: {sysIP_RECVIF, syscall.SizeofSockaddrDatalink, marshalInterface, parseInterface}, + } + + sockOpts = map[int]*sockOpt{ + ssoTOS: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TOS, Len: 4}}, + ssoTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TTL, Len: 4}}, + ssoMulticastTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_TTL, Len: 1}}, + ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_IF, Len: 4}}, + ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_LOOP, Len: 4}}, + ssoReceiveTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVTTL, Len: 4}}, + ssoReceiveDst: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVDSTADDR, Len: 4}}, + ssoReceiveInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVIF, Len: 4}}, + ssoHeaderPrepend: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_HDRINCL, Len: 4}}, + ssoStripHeader: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_STRIPHDR, Len: 4}}, + ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_ADD_MEMBERSHIP, Len: sizeofIPMreq}, typ: ssoTypeIPMreq}, + ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_DROP_MEMBERSHIP, Len: sizeofIPMreq}, typ: ssoTypeIPMreq}, + } +) + +func init() { + // Seems like kern.osreldate is veiled on latest OS X. We use + // kern.osrelease instead. + s, err := syscall.Sysctl("kern.osrelease") + if err != nil { + return + } + ss := strings.Split(s, ".") + if len(ss) == 0 { + return + } + // The IP_PKTINFO and protocol-independent multicast API were + // introduced in OS X 10.7 (Darwin 11). But it looks like + // those features require OS X 10.8 (Darwin 12) or above. + // See http://support.apple.com/kb/HT1633. + if mjver, err := strconv.Atoi(ss[0]); err != nil || mjver < 12 { + return + } + ctlOpts[ctlPacketInfo].name = sysIP_PKTINFO + ctlOpts[ctlPacketInfo].length = sizeofInetPktinfo + ctlOpts[ctlPacketInfo].marshal = marshalPacketInfo + ctlOpts[ctlPacketInfo].parse = parsePacketInfo + sockOpts[ssoPacketInfo] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVPKTINFO, Len: 4}} + sockOpts[ssoMulticastInterface] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_IF, Len: sizeofIPMreqn}, typ: ssoTypeIPMreqn} + sockOpts[ssoJoinGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_JOIN_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq} + sockOpts[ssoLeaveGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_LEAVE_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq} + sockOpts[ssoJoinSourceGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_JOIN_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq} + sockOpts[ssoLeaveSourceGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_LEAVE_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq} + sockOpts[ssoBlockSourceGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_BLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq} + sockOpts[ssoUnblockSourceGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_UNBLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq} +} + +func (pi *inetPktinfo) setIfindex(i int) { + pi.Ifindex = uint32(i) +} + +func (gr *groupReq) setGroup(grp net.IP) { + sa := (*sockaddrInet)(unsafe.Pointer(uintptr(unsafe.Pointer(gr)) + 4)) + sa.Len = sizeofSockaddrInet + sa.Family = syscall.AF_INET + copy(sa.Addr[:], grp) +} + +func (gsr *groupSourceReq) setSourceGroup(grp, src net.IP) { + sa := (*sockaddrInet)(unsafe.Pointer(uintptr(unsafe.Pointer(gsr)) + 4)) + sa.Len = sizeofSockaddrInet + sa.Family = syscall.AF_INET + copy(sa.Addr[:], grp) + sa = (*sockaddrInet)(unsafe.Pointer(uintptr(unsafe.Pointer(gsr)) + 132)) + sa.Len = sizeofSockaddrInet + sa.Family = syscall.AF_INET + copy(sa.Addr[:], src) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_dragonfly.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_dragonfly.go new file mode 100644 index 000000000..859764f33 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_dragonfly.go @@ -0,0 +1,35 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv4 + +import ( + "net" + "syscall" + + "golang.org/x/net/internal/iana" + "golang.org/x/net/internal/socket" +) + +var ( + ctlOpts = [ctlMax]ctlOpt{ + ctlTTL: {sysIP_RECVTTL, 1, marshalTTL, parseTTL}, + ctlDst: {sysIP_RECVDSTADDR, net.IPv4len, marshalDst, parseDst}, + ctlInterface: {sysIP_RECVIF, syscall.SizeofSockaddrDatalink, marshalInterface, parseInterface}, + } + + sockOpts = map[int]*sockOpt{ + ssoTOS: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TOS, Len: 4}}, + ssoTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TTL, Len: 4}}, + ssoMulticastTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_TTL, Len: 1}}, + ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_IF, Len: 4}}, + ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_LOOP, Len: 4}}, + ssoReceiveTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVTTL, Len: 4}}, + ssoReceiveDst: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVDSTADDR, Len: 4}}, + ssoReceiveInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVIF, Len: 4}}, + ssoHeaderPrepend: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_HDRINCL, Len: 4}}, + ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_ADD_MEMBERSHIP, Len: sizeofIPMreq}, typ: ssoTypeIPMreq}, + ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_DROP_MEMBERSHIP, Len: sizeofIPMreq}, typ: ssoTypeIPMreq}, + } +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_freebsd.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_freebsd.go new file mode 100644 index 000000000..b80032454 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_freebsd.go @@ -0,0 +1,76 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv4 + +import ( + "net" + "runtime" + "strings" + "syscall" + "unsafe" + + "golang.org/x/net/internal/iana" + "golang.org/x/net/internal/socket" +) + +var ( + ctlOpts = [ctlMax]ctlOpt{ + ctlTTL: {sysIP_RECVTTL, 1, marshalTTL, parseTTL}, + ctlDst: {sysIP_RECVDSTADDR, net.IPv4len, marshalDst, parseDst}, + ctlInterface: {sysIP_RECVIF, syscall.SizeofSockaddrDatalink, marshalInterface, parseInterface}, + } + + sockOpts = map[int]*sockOpt{ + ssoTOS: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TOS, Len: 4}}, + ssoTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TTL, Len: 4}}, + ssoMulticastTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_TTL, Len: 1}}, + ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_IF, Len: 4}}, + ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_LOOP, Len: 4}}, + ssoReceiveTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVTTL, Len: 4}}, + ssoReceiveDst: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVDSTADDR, Len: 4}}, + ssoReceiveInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVIF, Len: 4}}, + ssoHeaderPrepend: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_HDRINCL, Len: 4}}, + ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_JOIN_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq}, + ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_LEAVE_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq}, + ssoJoinSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_JOIN_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, + ssoLeaveSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_LEAVE_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, + ssoBlockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_BLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, + ssoUnblockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_UNBLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, + } +) + +func init() { + freebsdVersion, _ = syscall.SysctlUint32("kern.osreldate") + if freebsdVersion >= 1000000 { + sockOpts[ssoMulticastInterface] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_IF, Len: sizeofIPMreqn}, typ: ssoTypeIPMreqn} + } + if runtime.GOOS == "freebsd" && runtime.GOARCH == "386" { + archs, _ := syscall.Sysctl("kern.supported_archs") + for _, s := range strings.Fields(archs) { + if s == "amd64" { + freebsd32o64 = true + break + } + } + } +} + +func (gr *groupReq) setGroup(grp net.IP) { + sa := (*sockaddrInet)(unsafe.Pointer(&gr.Group)) + sa.Len = sizeofSockaddrInet + sa.Family = syscall.AF_INET + copy(sa.Addr[:], grp) +} + +func (gsr *groupSourceReq) setSourceGroup(grp, src net.IP) { + sa := (*sockaddrInet)(unsafe.Pointer(&gsr.Group)) + sa.Len = sizeofSockaddrInet + sa.Family = syscall.AF_INET + copy(sa.Addr[:], grp) + sa = (*sockaddrInet)(unsafe.Pointer(&gsr.Source)) + sa.Len = sizeofSockaddrInet + sa.Family = syscall.AF_INET + copy(sa.Addr[:], src) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_linux.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_linux.go new file mode 100644 index 000000000..60defe132 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_linux.go @@ -0,0 +1,59 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv4 + +import ( + "net" + "syscall" + "unsafe" + + "golang.org/x/net/internal/iana" + "golang.org/x/net/internal/socket" +) + +var ( + ctlOpts = [ctlMax]ctlOpt{ + ctlTTL: {sysIP_TTL, 1, marshalTTL, parseTTL}, + ctlPacketInfo: {sysIP_PKTINFO, sizeofInetPktinfo, marshalPacketInfo, parsePacketInfo}, + } + + sockOpts = map[int]*sockOpt{ + ssoTOS: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TOS, Len: 4}}, + ssoTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TTL, Len: 4}}, + ssoMulticastTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_TTL, Len: 4}}, + ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_IF, Len: sizeofIPMreqn}, typ: ssoTypeIPMreqn}, + ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_LOOP, Len: 4}}, + ssoReceiveTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVTTL, Len: 4}}, + ssoPacketInfo: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_PKTINFO, Len: 4}}, + ssoHeaderPrepend: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_HDRINCL, Len: 4}}, + ssoICMPFilter: {Option: socket.Option{Level: iana.ProtocolReserved, Name: sysICMP_FILTER, Len: sizeofICMPFilter}}, + ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_JOIN_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq}, + ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_LEAVE_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq}, + ssoJoinSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_JOIN_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, + ssoLeaveSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_LEAVE_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, + ssoBlockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_BLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, + ssoUnblockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_UNBLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, + ssoAttachFilter: {Option: socket.Option{Level: sysSOL_SOCKET, Name: sysSO_ATTACH_FILTER, Len: sizeofSockFprog}}, + } +) + +func (pi *inetPktinfo) setIfindex(i int) { + pi.Ifindex = int32(i) +} + +func (gr *groupReq) setGroup(grp net.IP) { + sa := (*sockaddrInet)(unsafe.Pointer(&gr.Group)) + sa.Family = syscall.AF_INET + copy(sa.Addr[:], grp) +} + +func (gsr *groupSourceReq) setSourceGroup(grp, src net.IP) { + sa := (*sockaddrInet)(unsafe.Pointer(&gsr.Group)) + sa.Family = syscall.AF_INET + copy(sa.Addr[:], grp) + sa = (*sockaddrInet)(unsafe.Pointer(&gsr.Source)) + sa.Family = syscall.AF_INET + copy(sa.Addr[:], src) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_solaris.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_solaris.go new file mode 100644 index 000000000..832fef1e2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_solaris.go @@ -0,0 +1,57 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv4 + +import ( + "net" + "syscall" + "unsafe" + + "golang.org/x/net/internal/iana" + "golang.org/x/net/internal/socket" +) + +var ( + ctlOpts = [ctlMax]ctlOpt{ + ctlTTL: {sysIP_RECVTTL, 4, marshalTTL, parseTTL}, + ctlPacketInfo: {sysIP_PKTINFO, sizeofInetPktinfo, marshalPacketInfo, parsePacketInfo}, + } + + sockOpts = map[int]sockOpt{ + ssoTOS: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TOS, Len: 4}}, + ssoTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TTL, Len: 4}}, + ssoMulticastTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_TTL, Len: 1}}, + ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_IF, Len: 4}}, + ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_LOOP, Len: 1}}, + ssoReceiveTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVTTL, Len: 4}}, + ssoPacketInfo: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVPKTINFO, Len: 4}}, + ssoHeaderPrepend: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_HDRINCL, Len: 4}}, + ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_JOIN_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq}, + ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_LEAVE_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq}, + ssoJoinSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_JOIN_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, + ssoLeaveSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_LEAVE_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, + ssoBlockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_BLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, + ssoUnblockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_UNBLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, + } +) + +func (pi *inetPktinfo) setIfindex(i int) { + pi.Ifindex = uint32(i) +} + +func (gr *groupReq) setGroup(grp net.IP) { + sa := (*sockaddrInet)(unsafe.Pointer(uintptr(unsafe.Pointer(gr)) + 4)) + sa.Family = syscall.AF_INET + copy(sa.Addr[:], grp) +} + +func (gsr *groupSourceReq) setSourceGroup(grp, src net.IP) { + sa := (*sockaddrInet)(unsafe.Pointer(uintptr(unsafe.Pointer(gsr)) + 4)) + sa.Family = syscall.AF_INET + copy(sa.Addr[:], grp) + sa = (*sockaddrInet)(unsafe.Pointer(uintptr(unsafe.Pointer(gsr)) + 260)) + sa.Family = syscall.AF_INET + copy(sa.Addr[:], src) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_ssmreq.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_ssmreq.go new file mode 100644 index 000000000..ae5704e77 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_ssmreq.go @@ -0,0 +1,54 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin freebsd linux solaris + +package ipv4 + +import ( + "net" + "unsafe" + + "golang.org/x/net/internal/socket" +) + +var freebsd32o64 bool + +func (so *sockOpt) setGroupReq(c *socket.Conn, ifi *net.Interface, grp net.IP) error { + var gr groupReq + if ifi != nil { + gr.Interface = uint32(ifi.Index) + } + gr.setGroup(grp) + var b []byte + if freebsd32o64 { + var d [sizeofGroupReq + 4]byte + s := (*[sizeofGroupReq]byte)(unsafe.Pointer(&gr)) + copy(d[:4], s[:4]) + copy(d[8:], s[4:]) + b = d[:] + } else { + b = (*[sizeofGroupReq]byte)(unsafe.Pointer(&gr))[:sizeofGroupReq] + } + return so.Set(c, b) +} + +func (so *sockOpt) setGroupSourceReq(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error { + var gsr groupSourceReq + if ifi != nil { + gsr.Interface = uint32(ifi.Index) + } + gsr.setSourceGroup(grp, src) + var b []byte + if freebsd32o64 { + var d [sizeofGroupSourceReq + 4]byte + s := (*[sizeofGroupSourceReq]byte)(unsafe.Pointer(&gsr)) + copy(d[:4], s[:4]) + copy(d[8:], s[4:]) + b = d[:] + } else { + b = (*[sizeofGroupSourceReq]byte)(unsafe.Pointer(&gsr))[:sizeofGroupSourceReq] + } + return so.Set(c, b) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_ssmreq_stub.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_ssmreq_stub.go new file mode 100644 index 000000000..e6b7623d0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_ssmreq_stub.go @@ -0,0 +1,21 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !darwin,!freebsd,!linux,!solaris + +package ipv4 + +import ( + "net" + + "golang.org/x/net/internal/socket" +) + +func (so *sockOpt) setGroupReq(c *socket.Conn, ifi *net.Interface, grp net.IP) error { + return errOpNoSupport +} + +func (so *sockOpt) setGroupSourceReq(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error { + return errOpNoSupport +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_stub.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_stub.go new file mode 100644 index 000000000..4f076473b --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_stub.go @@ -0,0 +1,13 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows + +package ipv4 + +var ( + ctlOpts = [ctlMax]ctlOpt{} + + sockOpts = map[int]*sockOpt{} +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_windows.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_windows.go new file mode 100644 index 000000000..b0913d539 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/sys_windows.go @@ -0,0 +1,67 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv4 + +import ( + "golang.org/x/net/internal/iana" + "golang.org/x/net/internal/socket" +) + +const ( + // See ws2tcpip.h. + sysIP_OPTIONS = 0x1 + sysIP_HDRINCL = 0x2 + sysIP_TOS = 0x3 + sysIP_TTL = 0x4 + sysIP_MULTICAST_IF = 0x9 + sysIP_MULTICAST_TTL = 0xa + sysIP_MULTICAST_LOOP = 0xb + sysIP_ADD_MEMBERSHIP = 0xc + sysIP_DROP_MEMBERSHIP = 0xd + sysIP_DONTFRAGMENT = 0xe + sysIP_ADD_SOURCE_MEMBERSHIP = 0xf + sysIP_DROP_SOURCE_MEMBERSHIP = 0x10 + sysIP_PKTINFO = 0x13 + + sizeofInetPktinfo = 0x8 + sizeofIPMreq = 0x8 + sizeofIPMreqSource = 0xc +) + +type inetPktinfo struct { + Addr [4]byte + Ifindex int32 +} + +type ipMreq struct { + Multiaddr [4]byte + Interface [4]byte +} + +type ipMreqSource struct { + Multiaddr [4]byte + Sourceaddr [4]byte + Interface [4]byte +} + +// See http://msdn.microsoft.com/en-us/library/windows/desktop/ms738586(v=vs.85).aspx +var ( + ctlOpts = [ctlMax]ctlOpt{} + + sockOpts = map[int]*sockOpt{ + ssoTOS: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TOS, Len: 4}}, + ssoTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TTL, Len: 4}}, + ssoMulticastTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_TTL, Len: 4}}, + ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_IF, Len: 4}}, + ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_LOOP, Len: 4}}, + ssoHeaderPrepend: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_HDRINCL, Len: 4}}, + ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_ADD_MEMBERSHIP, Len: sizeofIPMreq}, typ: ssoTypeIPMreq}, + ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_DROP_MEMBERSHIP, Len: sizeofIPMreq}, typ: ssoTypeIPMreq}, + } +) + +func (pi *inetPktinfo) setIfindex(i int) { + pi.Ifindex = int32(i) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_darwin.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_darwin.go new file mode 100644 index 000000000..c07cc883f --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_darwin.go @@ -0,0 +1,99 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_darwin.go + +package ipv4 + +const ( + sysIP_OPTIONS = 0x1 + sysIP_HDRINCL = 0x2 + sysIP_TOS = 0x3 + sysIP_TTL = 0x4 + sysIP_RECVOPTS = 0x5 + sysIP_RECVRETOPTS = 0x6 + sysIP_RECVDSTADDR = 0x7 + sysIP_RETOPTS = 0x8 + sysIP_RECVIF = 0x14 + sysIP_STRIPHDR = 0x17 + sysIP_RECVTTL = 0x18 + sysIP_BOUND_IF = 0x19 + sysIP_PKTINFO = 0x1a + sysIP_RECVPKTINFO = 0x1a + + sysIP_MULTICAST_IF = 0x9 + sysIP_MULTICAST_TTL = 0xa + sysIP_MULTICAST_LOOP = 0xb + sysIP_ADD_MEMBERSHIP = 0xc + sysIP_DROP_MEMBERSHIP = 0xd + sysIP_MULTICAST_VIF = 0xe + sysIP_MULTICAST_IFINDEX = 0x42 + sysIP_ADD_SOURCE_MEMBERSHIP = 0x46 + sysIP_DROP_SOURCE_MEMBERSHIP = 0x47 + sysIP_BLOCK_SOURCE = 0x48 + sysIP_UNBLOCK_SOURCE = 0x49 + sysMCAST_JOIN_GROUP = 0x50 + sysMCAST_LEAVE_GROUP = 0x51 + sysMCAST_JOIN_SOURCE_GROUP = 0x52 + sysMCAST_LEAVE_SOURCE_GROUP = 0x53 + sysMCAST_BLOCK_SOURCE = 0x54 + sysMCAST_UNBLOCK_SOURCE = 0x55 + + sizeofSockaddrStorage = 0x80 + sizeofSockaddrInet = 0x10 + sizeofInetPktinfo = 0xc + + sizeofIPMreq = 0x8 + sizeofIPMreqn = 0xc + sizeofIPMreqSource = 0xc + sizeofGroupReq = 0x84 + sizeofGroupSourceReq = 0x104 +) + +type sockaddrStorage struct { + Len uint8 + Family uint8 + X__ss_pad1 [6]int8 + X__ss_align int64 + X__ss_pad2 [112]int8 +} + +type sockaddrInet struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type inetPktinfo struct { + Ifindex uint32 + Spec_dst [4]byte /* in_addr */ + Addr [4]byte /* in_addr */ +} + +type ipMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type ipMreqn struct { + Multiaddr [4]byte /* in_addr */ + Address [4]byte /* in_addr */ + Ifindex int32 +} + +type ipMreqSource struct { + Multiaddr [4]byte /* in_addr */ + Sourceaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type groupReq struct { + Interface uint32 + Pad_cgo_0 [128]byte +} + +type groupSourceReq struct { + Interface uint32 + Pad_cgo_0 [128]byte + Pad_cgo_1 [128]byte +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_dragonfly.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_dragonfly.go new file mode 100644 index 000000000..c4365e9e7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_dragonfly.go @@ -0,0 +1,31 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_dragonfly.go + +package ipv4 + +const ( + sysIP_OPTIONS = 0x1 + sysIP_HDRINCL = 0x2 + sysIP_TOS = 0x3 + sysIP_TTL = 0x4 + sysIP_RECVOPTS = 0x5 + sysIP_RECVRETOPTS = 0x6 + sysIP_RECVDSTADDR = 0x7 + sysIP_RETOPTS = 0x8 + sysIP_RECVIF = 0x14 + sysIP_RECVTTL = 0x41 + + sysIP_MULTICAST_IF = 0x9 + sysIP_MULTICAST_TTL = 0xa + sysIP_MULTICAST_LOOP = 0xb + sysIP_MULTICAST_VIF = 0xe + sysIP_ADD_MEMBERSHIP = 0xc + sysIP_DROP_MEMBERSHIP = 0xd + + sizeofIPMreq = 0x8 +) + +type ipMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_freebsd_386.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_freebsd_386.go new file mode 100644 index 000000000..8c4aec94c --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_freebsd_386.go @@ -0,0 +1,93 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_freebsd.go + +package ipv4 + +const ( + sysIP_OPTIONS = 0x1 + sysIP_HDRINCL = 0x2 + sysIP_TOS = 0x3 + sysIP_TTL = 0x4 + sysIP_RECVOPTS = 0x5 + sysIP_RECVRETOPTS = 0x6 + sysIP_RECVDSTADDR = 0x7 + sysIP_SENDSRCADDR = 0x7 + sysIP_RETOPTS = 0x8 + sysIP_RECVIF = 0x14 + sysIP_ONESBCAST = 0x17 + sysIP_BINDANY = 0x18 + sysIP_RECVTTL = 0x41 + sysIP_MINTTL = 0x42 + sysIP_DONTFRAG = 0x43 + sysIP_RECVTOS = 0x44 + + sysIP_MULTICAST_IF = 0x9 + sysIP_MULTICAST_TTL = 0xa + sysIP_MULTICAST_LOOP = 0xb + sysIP_ADD_MEMBERSHIP = 0xc + sysIP_DROP_MEMBERSHIP = 0xd + sysIP_MULTICAST_VIF = 0xe + sysIP_ADD_SOURCE_MEMBERSHIP = 0x46 + sysIP_DROP_SOURCE_MEMBERSHIP = 0x47 + sysIP_BLOCK_SOURCE = 0x48 + sysIP_UNBLOCK_SOURCE = 0x49 + sysMCAST_JOIN_GROUP = 0x50 + sysMCAST_LEAVE_GROUP = 0x51 + sysMCAST_JOIN_SOURCE_GROUP = 0x52 + sysMCAST_LEAVE_SOURCE_GROUP = 0x53 + sysMCAST_BLOCK_SOURCE = 0x54 + sysMCAST_UNBLOCK_SOURCE = 0x55 + + sizeofSockaddrStorage = 0x80 + sizeofSockaddrInet = 0x10 + + sizeofIPMreq = 0x8 + sizeofIPMreqn = 0xc + sizeofIPMreqSource = 0xc + sizeofGroupReq = 0x84 + sizeofGroupSourceReq = 0x104 +) + +type sockaddrStorage struct { + Len uint8 + Family uint8 + X__ss_pad1 [6]int8 + X__ss_align int64 + X__ss_pad2 [112]int8 +} + +type sockaddrInet struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type ipMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type ipMreqn struct { + Multiaddr [4]byte /* in_addr */ + Address [4]byte /* in_addr */ + Ifindex int32 +} + +type ipMreqSource struct { + Multiaddr [4]byte /* in_addr */ + Sourceaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type groupReq struct { + Interface uint32 + Group sockaddrStorage +} + +type groupSourceReq struct { + Interface uint32 + Group sockaddrStorage + Source sockaddrStorage +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_freebsd_amd64.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_freebsd_amd64.go new file mode 100644 index 000000000..4b10b7c57 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_freebsd_amd64.go @@ -0,0 +1,95 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_freebsd.go + +package ipv4 + +const ( + sysIP_OPTIONS = 0x1 + sysIP_HDRINCL = 0x2 + sysIP_TOS = 0x3 + sysIP_TTL = 0x4 + sysIP_RECVOPTS = 0x5 + sysIP_RECVRETOPTS = 0x6 + sysIP_RECVDSTADDR = 0x7 + sysIP_SENDSRCADDR = 0x7 + sysIP_RETOPTS = 0x8 + sysIP_RECVIF = 0x14 + sysIP_ONESBCAST = 0x17 + sysIP_BINDANY = 0x18 + sysIP_RECVTTL = 0x41 + sysIP_MINTTL = 0x42 + sysIP_DONTFRAG = 0x43 + sysIP_RECVTOS = 0x44 + + sysIP_MULTICAST_IF = 0x9 + sysIP_MULTICAST_TTL = 0xa + sysIP_MULTICAST_LOOP = 0xb + sysIP_ADD_MEMBERSHIP = 0xc + sysIP_DROP_MEMBERSHIP = 0xd + sysIP_MULTICAST_VIF = 0xe + sysIP_ADD_SOURCE_MEMBERSHIP = 0x46 + sysIP_DROP_SOURCE_MEMBERSHIP = 0x47 + sysIP_BLOCK_SOURCE = 0x48 + sysIP_UNBLOCK_SOURCE = 0x49 + sysMCAST_JOIN_GROUP = 0x50 + sysMCAST_LEAVE_GROUP = 0x51 + sysMCAST_JOIN_SOURCE_GROUP = 0x52 + sysMCAST_LEAVE_SOURCE_GROUP = 0x53 + sysMCAST_BLOCK_SOURCE = 0x54 + sysMCAST_UNBLOCK_SOURCE = 0x55 + + sizeofSockaddrStorage = 0x80 + sizeofSockaddrInet = 0x10 + + sizeofIPMreq = 0x8 + sizeofIPMreqn = 0xc + sizeofIPMreqSource = 0xc + sizeofGroupReq = 0x88 + sizeofGroupSourceReq = 0x108 +) + +type sockaddrStorage struct { + Len uint8 + Family uint8 + X__ss_pad1 [6]int8 + X__ss_align int64 + X__ss_pad2 [112]int8 +} + +type sockaddrInet struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type ipMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type ipMreqn struct { + Multiaddr [4]byte /* in_addr */ + Address [4]byte /* in_addr */ + Ifindex int32 +} + +type ipMreqSource struct { + Multiaddr [4]byte /* in_addr */ + Sourceaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type groupReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group sockaddrStorage +} + +type groupSourceReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group sockaddrStorage + Source sockaddrStorage +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_freebsd_arm.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_freebsd_arm.go new file mode 100644 index 000000000..4b10b7c57 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_freebsd_arm.go @@ -0,0 +1,95 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_freebsd.go + +package ipv4 + +const ( + sysIP_OPTIONS = 0x1 + sysIP_HDRINCL = 0x2 + sysIP_TOS = 0x3 + sysIP_TTL = 0x4 + sysIP_RECVOPTS = 0x5 + sysIP_RECVRETOPTS = 0x6 + sysIP_RECVDSTADDR = 0x7 + sysIP_SENDSRCADDR = 0x7 + sysIP_RETOPTS = 0x8 + sysIP_RECVIF = 0x14 + sysIP_ONESBCAST = 0x17 + sysIP_BINDANY = 0x18 + sysIP_RECVTTL = 0x41 + sysIP_MINTTL = 0x42 + sysIP_DONTFRAG = 0x43 + sysIP_RECVTOS = 0x44 + + sysIP_MULTICAST_IF = 0x9 + sysIP_MULTICAST_TTL = 0xa + sysIP_MULTICAST_LOOP = 0xb + sysIP_ADD_MEMBERSHIP = 0xc + sysIP_DROP_MEMBERSHIP = 0xd + sysIP_MULTICAST_VIF = 0xe + sysIP_ADD_SOURCE_MEMBERSHIP = 0x46 + sysIP_DROP_SOURCE_MEMBERSHIP = 0x47 + sysIP_BLOCK_SOURCE = 0x48 + sysIP_UNBLOCK_SOURCE = 0x49 + sysMCAST_JOIN_GROUP = 0x50 + sysMCAST_LEAVE_GROUP = 0x51 + sysMCAST_JOIN_SOURCE_GROUP = 0x52 + sysMCAST_LEAVE_SOURCE_GROUP = 0x53 + sysMCAST_BLOCK_SOURCE = 0x54 + sysMCAST_UNBLOCK_SOURCE = 0x55 + + sizeofSockaddrStorage = 0x80 + sizeofSockaddrInet = 0x10 + + sizeofIPMreq = 0x8 + sizeofIPMreqn = 0xc + sizeofIPMreqSource = 0xc + sizeofGroupReq = 0x88 + sizeofGroupSourceReq = 0x108 +) + +type sockaddrStorage struct { + Len uint8 + Family uint8 + X__ss_pad1 [6]int8 + X__ss_align int64 + X__ss_pad2 [112]int8 +} + +type sockaddrInet struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type ipMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type ipMreqn struct { + Multiaddr [4]byte /* in_addr */ + Address [4]byte /* in_addr */ + Ifindex int32 +} + +type ipMreqSource struct { + Multiaddr [4]byte /* in_addr */ + Sourceaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type groupReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group sockaddrStorage +} + +type groupSourceReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group sockaddrStorage + Source sockaddrStorage +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_linux_386.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_linux_386.go new file mode 100644 index 000000000..c0260f0ce --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_linux_386.go @@ -0,0 +1,148 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_linux.go + +package ipv4 + +const ( + sysIP_TOS = 0x1 + sysIP_TTL = 0x2 + sysIP_HDRINCL = 0x3 + sysIP_OPTIONS = 0x4 + sysIP_ROUTER_ALERT = 0x5 + sysIP_RECVOPTS = 0x6 + sysIP_RETOPTS = 0x7 + sysIP_PKTINFO = 0x8 + sysIP_PKTOPTIONS = 0x9 + sysIP_MTU_DISCOVER = 0xa + sysIP_RECVERR = 0xb + sysIP_RECVTTL = 0xc + sysIP_RECVTOS = 0xd + sysIP_MTU = 0xe + sysIP_FREEBIND = 0xf + sysIP_TRANSPARENT = 0x13 + sysIP_RECVRETOPTS = 0x7 + sysIP_ORIGDSTADDR = 0x14 + sysIP_RECVORIGDSTADDR = 0x14 + sysIP_MINTTL = 0x15 + sysIP_NODEFRAG = 0x16 + sysIP_UNICAST_IF = 0x32 + + sysIP_MULTICAST_IF = 0x20 + sysIP_MULTICAST_TTL = 0x21 + sysIP_MULTICAST_LOOP = 0x22 + sysIP_ADD_MEMBERSHIP = 0x23 + sysIP_DROP_MEMBERSHIP = 0x24 + sysIP_UNBLOCK_SOURCE = 0x25 + sysIP_BLOCK_SOURCE = 0x26 + sysIP_ADD_SOURCE_MEMBERSHIP = 0x27 + sysIP_DROP_SOURCE_MEMBERSHIP = 0x28 + sysIP_MSFILTER = 0x29 + sysMCAST_JOIN_GROUP = 0x2a + sysMCAST_LEAVE_GROUP = 0x2d + sysMCAST_JOIN_SOURCE_GROUP = 0x2e + sysMCAST_LEAVE_SOURCE_GROUP = 0x2f + sysMCAST_BLOCK_SOURCE = 0x2b + sysMCAST_UNBLOCK_SOURCE = 0x2c + sysMCAST_MSFILTER = 0x30 + sysIP_MULTICAST_ALL = 0x31 + + sysICMP_FILTER = 0x1 + + sysSO_EE_ORIGIN_NONE = 0x0 + sysSO_EE_ORIGIN_LOCAL = 0x1 + sysSO_EE_ORIGIN_ICMP = 0x2 + sysSO_EE_ORIGIN_ICMP6 = 0x3 + sysSO_EE_ORIGIN_TXSTATUS = 0x4 + sysSO_EE_ORIGIN_TIMESTAMPING = 0x4 + + sysSOL_SOCKET = 0x1 + sysSO_ATTACH_FILTER = 0x1a + + sizeofKernelSockaddrStorage = 0x80 + sizeofSockaddrInet = 0x10 + sizeofInetPktinfo = 0xc + sizeofSockExtendedErr = 0x10 + + sizeofIPMreq = 0x8 + sizeofIPMreqn = 0xc + sizeofIPMreqSource = 0xc + sizeofGroupReq = 0x84 + sizeofGroupSourceReq = 0x104 + + sizeofICMPFilter = 0x4 + + sizeofSockFprog = 0x8 +) + +type kernelSockaddrStorage struct { + Family uint16 + X__data [126]int8 +} + +type sockaddrInet struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + X__pad [8]uint8 +} + +type inetPktinfo struct { + Ifindex int32 + Spec_dst [4]byte /* in_addr */ + Addr [4]byte /* in_addr */ +} + +type sockExtendedErr struct { + Errno uint32 + Origin uint8 + Type uint8 + Code uint8 + Pad uint8 + Info uint32 + Data uint32 +} + +type ipMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type ipMreqn struct { + Multiaddr [4]byte /* in_addr */ + Address [4]byte /* in_addr */ + Ifindex int32 +} + +type ipMreqSource struct { + Multiaddr uint32 + Interface uint32 + Sourceaddr uint32 +} + +type groupReq struct { + Interface uint32 + Group kernelSockaddrStorage +} + +type groupSourceReq struct { + Interface uint32 + Group kernelSockaddrStorage + Source kernelSockaddrStorage +} + +type icmpFilter struct { + Data uint32 +} + +type sockFProg struct { + Len uint16 + Pad_cgo_0 [2]byte + Filter *sockFilter +} + +type sockFilter struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_linux_amd64.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_linux_amd64.go new file mode 100644 index 000000000..9c967eaa6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_linux_amd64.go @@ -0,0 +1,150 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_linux.go + +package ipv4 + +const ( + sysIP_TOS = 0x1 + sysIP_TTL = 0x2 + sysIP_HDRINCL = 0x3 + sysIP_OPTIONS = 0x4 + sysIP_ROUTER_ALERT = 0x5 + sysIP_RECVOPTS = 0x6 + sysIP_RETOPTS = 0x7 + sysIP_PKTINFO = 0x8 + sysIP_PKTOPTIONS = 0x9 + sysIP_MTU_DISCOVER = 0xa + sysIP_RECVERR = 0xb + sysIP_RECVTTL = 0xc + sysIP_RECVTOS = 0xd + sysIP_MTU = 0xe + sysIP_FREEBIND = 0xf + sysIP_TRANSPARENT = 0x13 + sysIP_RECVRETOPTS = 0x7 + sysIP_ORIGDSTADDR = 0x14 + sysIP_RECVORIGDSTADDR = 0x14 + sysIP_MINTTL = 0x15 + sysIP_NODEFRAG = 0x16 + sysIP_UNICAST_IF = 0x32 + + sysIP_MULTICAST_IF = 0x20 + sysIP_MULTICAST_TTL = 0x21 + sysIP_MULTICAST_LOOP = 0x22 + sysIP_ADD_MEMBERSHIP = 0x23 + sysIP_DROP_MEMBERSHIP = 0x24 + sysIP_UNBLOCK_SOURCE = 0x25 + sysIP_BLOCK_SOURCE = 0x26 + sysIP_ADD_SOURCE_MEMBERSHIP = 0x27 + sysIP_DROP_SOURCE_MEMBERSHIP = 0x28 + sysIP_MSFILTER = 0x29 + sysMCAST_JOIN_GROUP = 0x2a + sysMCAST_LEAVE_GROUP = 0x2d + sysMCAST_JOIN_SOURCE_GROUP = 0x2e + sysMCAST_LEAVE_SOURCE_GROUP = 0x2f + sysMCAST_BLOCK_SOURCE = 0x2b + sysMCAST_UNBLOCK_SOURCE = 0x2c + sysMCAST_MSFILTER = 0x30 + sysIP_MULTICAST_ALL = 0x31 + + sysICMP_FILTER = 0x1 + + sysSO_EE_ORIGIN_NONE = 0x0 + sysSO_EE_ORIGIN_LOCAL = 0x1 + sysSO_EE_ORIGIN_ICMP = 0x2 + sysSO_EE_ORIGIN_ICMP6 = 0x3 + sysSO_EE_ORIGIN_TXSTATUS = 0x4 + sysSO_EE_ORIGIN_TIMESTAMPING = 0x4 + + sysSOL_SOCKET = 0x1 + sysSO_ATTACH_FILTER = 0x1a + + sizeofKernelSockaddrStorage = 0x80 + sizeofSockaddrInet = 0x10 + sizeofInetPktinfo = 0xc + sizeofSockExtendedErr = 0x10 + + sizeofIPMreq = 0x8 + sizeofIPMreqn = 0xc + sizeofIPMreqSource = 0xc + sizeofGroupReq = 0x88 + sizeofGroupSourceReq = 0x108 + + sizeofICMPFilter = 0x4 + + sizeofSockFprog = 0x10 +) + +type kernelSockaddrStorage struct { + Family uint16 + X__data [126]int8 +} + +type sockaddrInet struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + X__pad [8]uint8 +} + +type inetPktinfo struct { + Ifindex int32 + Spec_dst [4]byte /* in_addr */ + Addr [4]byte /* in_addr */ +} + +type sockExtendedErr struct { + Errno uint32 + Origin uint8 + Type uint8 + Code uint8 + Pad uint8 + Info uint32 + Data uint32 +} + +type ipMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type ipMreqn struct { + Multiaddr [4]byte /* in_addr */ + Address [4]byte /* in_addr */ + Ifindex int32 +} + +type ipMreqSource struct { + Multiaddr uint32 + Interface uint32 + Sourceaddr uint32 +} + +type groupReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group kernelSockaddrStorage +} + +type groupSourceReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group kernelSockaddrStorage + Source kernelSockaddrStorage +} + +type icmpFilter struct { + Data uint32 +} + +type sockFProg struct { + Len uint16 + Pad_cgo_0 [6]byte + Filter *sockFilter +} + +type sockFilter struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_linux_arm.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_linux_arm.go new file mode 100644 index 000000000..c0260f0ce --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_linux_arm.go @@ -0,0 +1,148 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_linux.go + +package ipv4 + +const ( + sysIP_TOS = 0x1 + sysIP_TTL = 0x2 + sysIP_HDRINCL = 0x3 + sysIP_OPTIONS = 0x4 + sysIP_ROUTER_ALERT = 0x5 + sysIP_RECVOPTS = 0x6 + sysIP_RETOPTS = 0x7 + sysIP_PKTINFO = 0x8 + sysIP_PKTOPTIONS = 0x9 + sysIP_MTU_DISCOVER = 0xa + sysIP_RECVERR = 0xb + sysIP_RECVTTL = 0xc + sysIP_RECVTOS = 0xd + sysIP_MTU = 0xe + sysIP_FREEBIND = 0xf + sysIP_TRANSPARENT = 0x13 + sysIP_RECVRETOPTS = 0x7 + sysIP_ORIGDSTADDR = 0x14 + sysIP_RECVORIGDSTADDR = 0x14 + sysIP_MINTTL = 0x15 + sysIP_NODEFRAG = 0x16 + sysIP_UNICAST_IF = 0x32 + + sysIP_MULTICAST_IF = 0x20 + sysIP_MULTICAST_TTL = 0x21 + sysIP_MULTICAST_LOOP = 0x22 + sysIP_ADD_MEMBERSHIP = 0x23 + sysIP_DROP_MEMBERSHIP = 0x24 + sysIP_UNBLOCK_SOURCE = 0x25 + sysIP_BLOCK_SOURCE = 0x26 + sysIP_ADD_SOURCE_MEMBERSHIP = 0x27 + sysIP_DROP_SOURCE_MEMBERSHIP = 0x28 + sysIP_MSFILTER = 0x29 + sysMCAST_JOIN_GROUP = 0x2a + sysMCAST_LEAVE_GROUP = 0x2d + sysMCAST_JOIN_SOURCE_GROUP = 0x2e + sysMCAST_LEAVE_SOURCE_GROUP = 0x2f + sysMCAST_BLOCK_SOURCE = 0x2b + sysMCAST_UNBLOCK_SOURCE = 0x2c + sysMCAST_MSFILTER = 0x30 + sysIP_MULTICAST_ALL = 0x31 + + sysICMP_FILTER = 0x1 + + sysSO_EE_ORIGIN_NONE = 0x0 + sysSO_EE_ORIGIN_LOCAL = 0x1 + sysSO_EE_ORIGIN_ICMP = 0x2 + sysSO_EE_ORIGIN_ICMP6 = 0x3 + sysSO_EE_ORIGIN_TXSTATUS = 0x4 + sysSO_EE_ORIGIN_TIMESTAMPING = 0x4 + + sysSOL_SOCKET = 0x1 + sysSO_ATTACH_FILTER = 0x1a + + sizeofKernelSockaddrStorage = 0x80 + sizeofSockaddrInet = 0x10 + sizeofInetPktinfo = 0xc + sizeofSockExtendedErr = 0x10 + + sizeofIPMreq = 0x8 + sizeofIPMreqn = 0xc + sizeofIPMreqSource = 0xc + sizeofGroupReq = 0x84 + sizeofGroupSourceReq = 0x104 + + sizeofICMPFilter = 0x4 + + sizeofSockFprog = 0x8 +) + +type kernelSockaddrStorage struct { + Family uint16 + X__data [126]int8 +} + +type sockaddrInet struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + X__pad [8]uint8 +} + +type inetPktinfo struct { + Ifindex int32 + Spec_dst [4]byte /* in_addr */ + Addr [4]byte /* in_addr */ +} + +type sockExtendedErr struct { + Errno uint32 + Origin uint8 + Type uint8 + Code uint8 + Pad uint8 + Info uint32 + Data uint32 +} + +type ipMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type ipMreqn struct { + Multiaddr [4]byte /* in_addr */ + Address [4]byte /* in_addr */ + Ifindex int32 +} + +type ipMreqSource struct { + Multiaddr uint32 + Interface uint32 + Sourceaddr uint32 +} + +type groupReq struct { + Interface uint32 + Group kernelSockaddrStorage +} + +type groupSourceReq struct { + Interface uint32 + Group kernelSockaddrStorage + Source kernelSockaddrStorage +} + +type icmpFilter struct { + Data uint32 +} + +type sockFProg struct { + Len uint16 + Pad_cgo_0 [2]byte + Filter *sockFilter +} + +type sockFilter struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_linux_arm64.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_linux_arm64.go new file mode 100644 index 000000000..9c967eaa6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_linux_arm64.go @@ -0,0 +1,150 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_linux.go + +package ipv4 + +const ( + sysIP_TOS = 0x1 + sysIP_TTL = 0x2 + sysIP_HDRINCL = 0x3 + sysIP_OPTIONS = 0x4 + sysIP_ROUTER_ALERT = 0x5 + sysIP_RECVOPTS = 0x6 + sysIP_RETOPTS = 0x7 + sysIP_PKTINFO = 0x8 + sysIP_PKTOPTIONS = 0x9 + sysIP_MTU_DISCOVER = 0xa + sysIP_RECVERR = 0xb + sysIP_RECVTTL = 0xc + sysIP_RECVTOS = 0xd + sysIP_MTU = 0xe + sysIP_FREEBIND = 0xf + sysIP_TRANSPARENT = 0x13 + sysIP_RECVRETOPTS = 0x7 + sysIP_ORIGDSTADDR = 0x14 + sysIP_RECVORIGDSTADDR = 0x14 + sysIP_MINTTL = 0x15 + sysIP_NODEFRAG = 0x16 + sysIP_UNICAST_IF = 0x32 + + sysIP_MULTICAST_IF = 0x20 + sysIP_MULTICAST_TTL = 0x21 + sysIP_MULTICAST_LOOP = 0x22 + sysIP_ADD_MEMBERSHIP = 0x23 + sysIP_DROP_MEMBERSHIP = 0x24 + sysIP_UNBLOCK_SOURCE = 0x25 + sysIP_BLOCK_SOURCE = 0x26 + sysIP_ADD_SOURCE_MEMBERSHIP = 0x27 + sysIP_DROP_SOURCE_MEMBERSHIP = 0x28 + sysIP_MSFILTER = 0x29 + sysMCAST_JOIN_GROUP = 0x2a + sysMCAST_LEAVE_GROUP = 0x2d + sysMCAST_JOIN_SOURCE_GROUP = 0x2e + sysMCAST_LEAVE_SOURCE_GROUP = 0x2f + sysMCAST_BLOCK_SOURCE = 0x2b + sysMCAST_UNBLOCK_SOURCE = 0x2c + sysMCAST_MSFILTER = 0x30 + sysIP_MULTICAST_ALL = 0x31 + + sysICMP_FILTER = 0x1 + + sysSO_EE_ORIGIN_NONE = 0x0 + sysSO_EE_ORIGIN_LOCAL = 0x1 + sysSO_EE_ORIGIN_ICMP = 0x2 + sysSO_EE_ORIGIN_ICMP6 = 0x3 + sysSO_EE_ORIGIN_TXSTATUS = 0x4 + sysSO_EE_ORIGIN_TIMESTAMPING = 0x4 + + sysSOL_SOCKET = 0x1 + sysSO_ATTACH_FILTER = 0x1a + + sizeofKernelSockaddrStorage = 0x80 + sizeofSockaddrInet = 0x10 + sizeofInetPktinfo = 0xc + sizeofSockExtendedErr = 0x10 + + sizeofIPMreq = 0x8 + sizeofIPMreqn = 0xc + sizeofIPMreqSource = 0xc + sizeofGroupReq = 0x88 + sizeofGroupSourceReq = 0x108 + + sizeofICMPFilter = 0x4 + + sizeofSockFprog = 0x10 +) + +type kernelSockaddrStorage struct { + Family uint16 + X__data [126]int8 +} + +type sockaddrInet struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + X__pad [8]uint8 +} + +type inetPktinfo struct { + Ifindex int32 + Spec_dst [4]byte /* in_addr */ + Addr [4]byte /* in_addr */ +} + +type sockExtendedErr struct { + Errno uint32 + Origin uint8 + Type uint8 + Code uint8 + Pad uint8 + Info uint32 + Data uint32 +} + +type ipMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type ipMreqn struct { + Multiaddr [4]byte /* in_addr */ + Address [4]byte /* in_addr */ + Ifindex int32 +} + +type ipMreqSource struct { + Multiaddr uint32 + Interface uint32 + Sourceaddr uint32 +} + +type groupReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group kernelSockaddrStorage +} + +type groupSourceReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group kernelSockaddrStorage + Source kernelSockaddrStorage +} + +type icmpFilter struct { + Data uint32 +} + +type sockFProg struct { + Len uint16 + Pad_cgo_0 [6]byte + Filter *sockFilter +} + +type sockFilter struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_linux_mips.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_linux_mips.go new file mode 100644 index 000000000..c0260f0ce --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_linux_mips.go @@ -0,0 +1,148 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_linux.go + +package ipv4 + +const ( + sysIP_TOS = 0x1 + sysIP_TTL = 0x2 + sysIP_HDRINCL = 0x3 + sysIP_OPTIONS = 0x4 + sysIP_ROUTER_ALERT = 0x5 + sysIP_RECVOPTS = 0x6 + sysIP_RETOPTS = 0x7 + sysIP_PKTINFO = 0x8 + sysIP_PKTOPTIONS = 0x9 + sysIP_MTU_DISCOVER = 0xa + sysIP_RECVERR = 0xb + sysIP_RECVTTL = 0xc + sysIP_RECVTOS = 0xd + sysIP_MTU = 0xe + sysIP_FREEBIND = 0xf + sysIP_TRANSPARENT = 0x13 + sysIP_RECVRETOPTS = 0x7 + sysIP_ORIGDSTADDR = 0x14 + sysIP_RECVORIGDSTADDR = 0x14 + sysIP_MINTTL = 0x15 + sysIP_NODEFRAG = 0x16 + sysIP_UNICAST_IF = 0x32 + + sysIP_MULTICAST_IF = 0x20 + sysIP_MULTICAST_TTL = 0x21 + sysIP_MULTICAST_LOOP = 0x22 + sysIP_ADD_MEMBERSHIP = 0x23 + sysIP_DROP_MEMBERSHIP = 0x24 + sysIP_UNBLOCK_SOURCE = 0x25 + sysIP_BLOCK_SOURCE = 0x26 + sysIP_ADD_SOURCE_MEMBERSHIP = 0x27 + sysIP_DROP_SOURCE_MEMBERSHIP = 0x28 + sysIP_MSFILTER = 0x29 + sysMCAST_JOIN_GROUP = 0x2a + sysMCAST_LEAVE_GROUP = 0x2d + sysMCAST_JOIN_SOURCE_GROUP = 0x2e + sysMCAST_LEAVE_SOURCE_GROUP = 0x2f + sysMCAST_BLOCK_SOURCE = 0x2b + sysMCAST_UNBLOCK_SOURCE = 0x2c + sysMCAST_MSFILTER = 0x30 + sysIP_MULTICAST_ALL = 0x31 + + sysICMP_FILTER = 0x1 + + sysSO_EE_ORIGIN_NONE = 0x0 + sysSO_EE_ORIGIN_LOCAL = 0x1 + sysSO_EE_ORIGIN_ICMP = 0x2 + sysSO_EE_ORIGIN_ICMP6 = 0x3 + sysSO_EE_ORIGIN_TXSTATUS = 0x4 + sysSO_EE_ORIGIN_TIMESTAMPING = 0x4 + + sysSOL_SOCKET = 0x1 + sysSO_ATTACH_FILTER = 0x1a + + sizeofKernelSockaddrStorage = 0x80 + sizeofSockaddrInet = 0x10 + sizeofInetPktinfo = 0xc + sizeofSockExtendedErr = 0x10 + + sizeofIPMreq = 0x8 + sizeofIPMreqn = 0xc + sizeofIPMreqSource = 0xc + sizeofGroupReq = 0x84 + sizeofGroupSourceReq = 0x104 + + sizeofICMPFilter = 0x4 + + sizeofSockFprog = 0x8 +) + +type kernelSockaddrStorage struct { + Family uint16 + X__data [126]int8 +} + +type sockaddrInet struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + X__pad [8]uint8 +} + +type inetPktinfo struct { + Ifindex int32 + Spec_dst [4]byte /* in_addr */ + Addr [4]byte /* in_addr */ +} + +type sockExtendedErr struct { + Errno uint32 + Origin uint8 + Type uint8 + Code uint8 + Pad uint8 + Info uint32 + Data uint32 +} + +type ipMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type ipMreqn struct { + Multiaddr [4]byte /* in_addr */ + Address [4]byte /* in_addr */ + Ifindex int32 +} + +type ipMreqSource struct { + Multiaddr uint32 + Interface uint32 + Sourceaddr uint32 +} + +type groupReq struct { + Interface uint32 + Group kernelSockaddrStorage +} + +type groupSourceReq struct { + Interface uint32 + Group kernelSockaddrStorage + Source kernelSockaddrStorage +} + +type icmpFilter struct { + Data uint32 +} + +type sockFProg struct { + Len uint16 + Pad_cgo_0 [2]byte + Filter *sockFilter +} + +type sockFilter struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_linux_mips64.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_linux_mips64.go new file mode 100644 index 000000000..9c967eaa6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_linux_mips64.go @@ -0,0 +1,150 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_linux.go + +package ipv4 + +const ( + sysIP_TOS = 0x1 + sysIP_TTL = 0x2 + sysIP_HDRINCL = 0x3 + sysIP_OPTIONS = 0x4 + sysIP_ROUTER_ALERT = 0x5 + sysIP_RECVOPTS = 0x6 + sysIP_RETOPTS = 0x7 + sysIP_PKTINFO = 0x8 + sysIP_PKTOPTIONS = 0x9 + sysIP_MTU_DISCOVER = 0xa + sysIP_RECVERR = 0xb + sysIP_RECVTTL = 0xc + sysIP_RECVTOS = 0xd + sysIP_MTU = 0xe + sysIP_FREEBIND = 0xf + sysIP_TRANSPARENT = 0x13 + sysIP_RECVRETOPTS = 0x7 + sysIP_ORIGDSTADDR = 0x14 + sysIP_RECVORIGDSTADDR = 0x14 + sysIP_MINTTL = 0x15 + sysIP_NODEFRAG = 0x16 + sysIP_UNICAST_IF = 0x32 + + sysIP_MULTICAST_IF = 0x20 + sysIP_MULTICAST_TTL = 0x21 + sysIP_MULTICAST_LOOP = 0x22 + sysIP_ADD_MEMBERSHIP = 0x23 + sysIP_DROP_MEMBERSHIP = 0x24 + sysIP_UNBLOCK_SOURCE = 0x25 + sysIP_BLOCK_SOURCE = 0x26 + sysIP_ADD_SOURCE_MEMBERSHIP = 0x27 + sysIP_DROP_SOURCE_MEMBERSHIP = 0x28 + sysIP_MSFILTER = 0x29 + sysMCAST_JOIN_GROUP = 0x2a + sysMCAST_LEAVE_GROUP = 0x2d + sysMCAST_JOIN_SOURCE_GROUP = 0x2e + sysMCAST_LEAVE_SOURCE_GROUP = 0x2f + sysMCAST_BLOCK_SOURCE = 0x2b + sysMCAST_UNBLOCK_SOURCE = 0x2c + sysMCAST_MSFILTER = 0x30 + sysIP_MULTICAST_ALL = 0x31 + + sysICMP_FILTER = 0x1 + + sysSO_EE_ORIGIN_NONE = 0x0 + sysSO_EE_ORIGIN_LOCAL = 0x1 + sysSO_EE_ORIGIN_ICMP = 0x2 + sysSO_EE_ORIGIN_ICMP6 = 0x3 + sysSO_EE_ORIGIN_TXSTATUS = 0x4 + sysSO_EE_ORIGIN_TIMESTAMPING = 0x4 + + sysSOL_SOCKET = 0x1 + sysSO_ATTACH_FILTER = 0x1a + + sizeofKernelSockaddrStorage = 0x80 + sizeofSockaddrInet = 0x10 + sizeofInetPktinfo = 0xc + sizeofSockExtendedErr = 0x10 + + sizeofIPMreq = 0x8 + sizeofIPMreqn = 0xc + sizeofIPMreqSource = 0xc + sizeofGroupReq = 0x88 + sizeofGroupSourceReq = 0x108 + + sizeofICMPFilter = 0x4 + + sizeofSockFprog = 0x10 +) + +type kernelSockaddrStorage struct { + Family uint16 + X__data [126]int8 +} + +type sockaddrInet struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + X__pad [8]uint8 +} + +type inetPktinfo struct { + Ifindex int32 + Spec_dst [4]byte /* in_addr */ + Addr [4]byte /* in_addr */ +} + +type sockExtendedErr struct { + Errno uint32 + Origin uint8 + Type uint8 + Code uint8 + Pad uint8 + Info uint32 + Data uint32 +} + +type ipMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type ipMreqn struct { + Multiaddr [4]byte /* in_addr */ + Address [4]byte /* in_addr */ + Ifindex int32 +} + +type ipMreqSource struct { + Multiaddr uint32 + Interface uint32 + Sourceaddr uint32 +} + +type groupReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group kernelSockaddrStorage +} + +type groupSourceReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group kernelSockaddrStorage + Source kernelSockaddrStorage +} + +type icmpFilter struct { + Data uint32 +} + +type sockFProg struct { + Len uint16 + Pad_cgo_0 [6]byte + Filter *sockFilter +} + +type sockFilter struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_linux_mips64le.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_linux_mips64le.go new file mode 100644 index 000000000..9c967eaa6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_linux_mips64le.go @@ -0,0 +1,150 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_linux.go + +package ipv4 + +const ( + sysIP_TOS = 0x1 + sysIP_TTL = 0x2 + sysIP_HDRINCL = 0x3 + sysIP_OPTIONS = 0x4 + sysIP_ROUTER_ALERT = 0x5 + sysIP_RECVOPTS = 0x6 + sysIP_RETOPTS = 0x7 + sysIP_PKTINFO = 0x8 + sysIP_PKTOPTIONS = 0x9 + sysIP_MTU_DISCOVER = 0xa + sysIP_RECVERR = 0xb + sysIP_RECVTTL = 0xc + sysIP_RECVTOS = 0xd + sysIP_MTU = 0xe + sysIP_FREEBIND = 0xf + sysIP_TRANSPARENT = 0x13 + sysIP_RECVRETOPTS = 0x7 + sysIP_ORIGDSTADDR = 0x14 + sysIP_RECVORIGDSTADDR = 0x14 + sysIP_MINTTL = 0x15 + sysIP_NODEFRAG = 0x16 + sysIP_UNICAST_IF = 0x32 + + sysIP_MULTICAST_IF = 0x20 + sysIP_MULTICAST_TTL = 0x21 + sysIP_MULTICAST_LOOP = 0x22 + sysIP_ADD_MEMBERSHIP = 0x23 + sysIP_DROP_MEMBERSHIP = 0x24 + sysIP_UNBLOCK_SOURCE = 0x25 + sysIP_BLOCK_SOURCE = 0x26 + sysIP_ADD_SOURCE_MEMBERSHIP = 0x27 + sysIP_DROP_SOURCE_MEMBERSHIP = 0x28 + sysIP_MSFILTER = 0x29 + sysMCAST_JOIN_GROUP = 0x2a + sysMCAST_LEAVE_GROUP = 0x2d + sysMCAST_JOIN_SOURCE_GROUP = 0x2e + sysMCAST_LEAVE_SOURCE_GROUP = 0x2f + sysMCAST_BLOCK_SOURCE = 0x2b + sysMCAST_UNBLOCK_SOURCE = 0x2c + sysMCAST_MSFILTER = 0x30 + sysIP_MULTICAST_ALL = 0x31 + + sysICMP_FILTER = 0x1 + + sysSO_EE_ORIGIN_NONE = 0x0 + sysSO_EE_ORIGIN_LOCAL = 0x1 + sysSO_EE_ORIGIN_ICMP = 0x2 + sysSO_EE_ORIGIN_ICMP6 = 0x3 + sysSO_EE_ORIGIN_TXSTATUS = 0x4 + sysSO_EE_ORIGIN_TIMESTAMPING = 0x4 + + sysSOL_SOCKET = 0x1 + sysSO_ATTACH_FILTER = 0x1a + + sizeofKernelSockaddrStorage = 0x80 + sizeofSockaddrInet = 0x10 + sizeofInetPktinfo = 0xc + sizeofSockExtendedErr = 0x10 + + sizeofIPMreq = 0x8 + sizeofIPMreqn = 0xc + sizeofIPMreqSource = 0xc + sizeofGroupReq = 0x88 + sizeofGroupSourceReq = 0x108 + + sizeofICMPFilter = 0x4 + + sizeofSockFprog = 0x10 +) + +type kernelSockaddrStorage struct { + Family uint16 + X__data [126]int8 +} + +type sockaddrInet struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + X__pad [8]uint8 +} + +type inetPktinfo struct { + Ifindex int32 + Spec_dst [4]byte /* in_addr */ + Addr [4]byte /* in_addr */ +} + +type sockExtendedErr struct { + Errno uint32 + Origin uint8 + Type uint8 + Code uint8 + Pad uint8 + Info uint32 + Data uint32 +} + +type ipMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type ipMreqn struct { + Multiaddr [4]byte /* in_addr */ + Address [4]byte /* in_addr */ + Ifindex int32 +} + +type ipMreqSource struct { + Multiaddr uint32 + Interface uint32 + Sourceaddr uint32 +} + +type groupReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group kernelSockaddrStorage +} + +type groupSourceReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group kernelSockaddrStorage + Source kernelSockaddrStorage +} + +type icmpFilter struct { + Data uint32 +} + +type sockFProg struct { + Len uint16 + Pad_cgo_0 [6]byte + Filter *sockFilter +} + +type sockFilter struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_linux_mipsle.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_linux_mipsle.go new file mode 100644 index 000000000..c0260f0ce --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_linux_mipsle.go @@ -0,0 +1,148 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_linux.go + +package ipv4 + +const ( + sysIP_TOS = 0x1 + sysIP_TTL = 0x2 + sysIP_HDRINCL = 0x3 + sysIP_OPTIONS = 0x4 + sysIP_ROUTER_ALERT = 0x5 + sysIP_RECVOPTS = 0x6 + sysIP_RETOPTS = 0x7 + sysIP_PKTINFO = 0x8 + sysIP_PKTOPTIONS = 0x9 + sysIP_MTU_DISCOVER = 0xa + sysIP_RECVERR = 0xb + sysIP_RECVTTL = 0xc + sysIP_RECVTOS = 0xd + sysIP_MTU = 0xe + sysIP_FREEBIND = 0xf + sysIP_TRANSPARENT = 0x13 + sysIP_RECVRETOPTS = 0x7 + sysIP_ORIGDSTADDR = 0x14 + sysIP_RECVORIGDSTADDR = 0x14 + sysIP_MINTTL = 0x15 + sysIP_NODEFRAG = 0x16 + sysIP_UNICAST_IF = 0x32 + + sysIP_MULTICAST_IF = 0x20 + sysIP_MULTICAST_TTL = 0x21 + sysIP_MULTICAST_LOOP = 0x22 + sysIP_ADD_MEMBERSHIP = 0x23 + sysIP_DROP_MEMBERSHIP = 0x24 + sysIP_UNBLOCK_SOURCE = 0x25 + sysIP_BLOCK_SOURCE = 0x26 + sysIP_ADD_SOURCE_MEMBERSHIP = 0x27 + sysIP_DROP_SOURCE_MEMBERSHIP = 0x28 + sysIP_MSFILTER = 0x29 + sysMCAST_JOIN_GROUP = 0x2a + sysMCAST_LEAVE_GROUP = 0x2d + sysMCAST_JOIN_SOURCE_GROUP = 0x2e + sysMCAST_LEAVE_SOURCE_GROUP = 0x2f + sysMCAST_BLOCK_SOURCE = 0x2b + sysMCAST_UNBLOCK_SOURCE = 0x2c + sysMCAST_MSFILTER = 0x30 + sysIP_MULTICAST_ALL = 0x31 + + sysICMP_FILTER = 0x1 + + sysSO_EE_ORIGIN_NONE = 0x0 + sysSO_EE_ORIGIN_LOCAL = 0x1 + sysSO_EE_ORIGIN_ICMP = 0x2 + sysSO_EE_ORIGIN_ICMP6 = 0x3 + sysSO_EE_ORIGIN_TXSTATUS = 0x4 + sysSO_EE_ORIGIN_TIMESTAMPING = 0x4 + + sysSOL_SOCKET = 0x1 + sysSO_ATTACH_FILTER = 0x1a + + sizeofKernelSockaddrStorage = 0x80 + sizeofSockaddrInet = 0x10 + sizeofInetPktinfo = 0xc + sizeofSockExtendedErr = 0x10 + + sizeofIPMreq = 0x8 + sizeofIPMreqn = 0xc + sizeofIPMreqSource = 0xc + sizeofGroupReq = 0x84 + sizeofGroupSourceReq = 0x104 + + sizeofICMPFilter = 0x4 + + sizeofSockFprog = 0x8 +) + +type kernelSockaddrStorage struct { + Family uint16 + X__data [126]int8 +} + +type sockaddrInet struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + X__pad [8]uint8 +} + +type inetPktinfo struct { + Ifindex int32 + Spec_dst [4]byte /* in_addr */ + Addr [4]byte /* in_addr */ +} + +type sockExtendedErr struct { + Errno uint32 + Origin uint8 + Type uint8 + Code uint8 + Pad uint8 + Info uint32 + Data uint32 +} + +type ipMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type ipMreqn struct { + Multiaddr [4]byte /* in_addr */ + Address [4]byte /* in_addr */ + Ifindex int32 +} + +type ipMreqSource struct { + Multiaddr uint32 + Interface uint32 + Sourceaddr uint32 +} + +type groupReq struct { + Interface uint32 + Group kernelSockaddrStorage +} + +type groupSourceReq struct { + Interface uint32 + Group kernelSockaddrStorage + Source kernelSockaddrStorage +} + +type icmpFilter struct { + Data uint32 +} + +type sockFProg struct { + Len uint16 + Pad_cgo_0 [2]byte + Filter *sockFilter +} + +type sockFilter struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_linux_ppc.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_linux_ppc.go new file mode 100644 index 000000000..f65bd9a7a --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_linux_ppc.go @@ -0,0 +1,148 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_linux.go + +package ipv4 + +const ( + sysIP_TOS = 0x1 + sysIP_TTL = 0x2 + sysIP_HDRINCL = 0x3 + sysIP_OPTIONS = 0x4 + sysIP_ROUTER_ALERT = 0x5 + sysIP_RECVOPTS = 0x6 + sysIP_RETOPTS = 0x7 + sysIP_PKTINFO = 0x8 + sysIP_PKTOPTIONS = 0x9 + sysIP_MTU_DISCOVER = 0xa + sysIP_RECVERR = 0xb + sysIP_RECVTTL = 0xc + sysIP_RECVTOS = 0xd + sysIP_MTU = 0xe + sysIP_FREEBIND = 0xf + sysIP_TRANSPARENT = 0x13 + sysIP_RECVRETOPTS = 0x7 + sysIP_ORIGDSTADDR = 0x14 + sysIP_RECVORIGDSTADDR = 0x14 + sysIP_MINTTL = 0x15 + sysIP_NODEFRAG = 0x16 + sysIP_UNICAST_IF = 0x32 + + sysIP_MULTICAST_IF = 0x20 + sysIP_MULTICAST_TTL = 0x21 + sysIP_MULTICAST_LOOP = 0x22 + sysIP_ADD_MEMBERSHIP = 0x23 + sysIP_DROP_MEMBERSHIP = 0x24 + sysIP_UNBLOCK_SOURCE = 0x25 + sysIP_BLOCK_SOURCE = 0x26 + sysIP_ADD_SOURCE_MEMBERSHIP = 0x27 + sysIP_DROP_SOURCE_MEMBERSHIP = 0x28 + sysIP_MSFILTER = 0x29 + sysMCAST_JOIN_GROUP = 0x2a + sysMCAST_LEAVE_GROUP = 0x2d + sysMCAST_JOIN_SOURCE_GROUP = 0x2e + sysMCAST_LEAVE_SOURCE_GROUP = 0x2f + sysMCAST_BLOCK_SOURCE = 0x2b + sysMCAST_UNBLOCK_SOURCE = 0x2c + sysMCAST_MSFILTER = 0x30 + sysIP_MULTICAST_ALL = 0x31 + + sysICMP_FILTER = 0x1 + + sysSO_EE_ORIGIN_NONE = 0x0 + sysSO_EE_ORIGIN_LOCAL = 0x1 + sysSO_EE_ORIGIN_ICMP = 0x2 + sysSO_EE_ORIGIN_ICMP6 = 0x3 + sysSO_EE_ORIGIN_TXSTATUS = 0x4 + sysSO_EE_ORIGIN_TIMESTAMPING = 0x4 + + sysSOL_SOCKET = 0x1 + sysSO_ATTACH_FILTER = 0x1a + + sizeofKernelSockaddrStorage = 0x80 + sizeofSockaddrInet = 0x10 + sizeofInetPktinfo = 0xc + sizeofSockExtendedErr = 0x10 + + sizeofIPMreq = 0x8 + sizeofIPMreqn = 0xc + sizeofIPMreqSource = 0xc + sizeofGroupReq = 0x84 + sizeofGroupSourceReq = 0x104 + + sizeofICMPFilter = 0x4 + + sizeofSockFprog = 0x8 +) + +type kernelSockaddrStorage struct { + Family uint16 + X__data [126]uint8 +} + +type sockaddrInet struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + X__pad [8]uint8 +} + +type inetPktinfo struct { + Ifindex int32 + Spec_dst [4]byte /* in_addr */ + Addr [4]byte /* in_addr */ +} + +type sockExtendedErr struct { + Errno uint32 + Origin uint8 + Type uint8 + Code uint8 + Pad uint8 + Info uint32 + Data uint32 +} + +type ipMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type ipMreqn struct { + Multiaddr [4]byte /* in_addr */ + Address [4]byte /* in_addr */ + Ifindex int32 +} + +type ipMreqSource struct { + Multiaddr uint32 + Interface uint32 + Sourceaddr uint32 +} + +type groupReq struct { + Interface uint32 + Group kernelSockaddrStorage +} + +type groupSourceReq struct { + Interface uint32 + Group kernelSockaddrStorage + Source kernelSockaddrStorage +} + +type icmpFilter struct { + Data uint32 +} + +type sockFProg struct { + Len uint16 + Pad_cgo_0 [2]byte + Filter *sockFilter +} + +type sockFilter struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_linux_ppc64.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_linux_ppc64.go new file mode 100644 index 000000000..9c967eaa6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_linux_ppc64.go @@ -0,0 +1,150 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_linux.go + +package ipv4 + +const ( + sysIP_TOS = 0x1 + sysIP_TTL = 0x2 + sysIP_HDRINCL = 0x3 + sysIP_OPTIONS = 0x4 + sysIP_ROUTER_ALERT = 0x5 + sysIP_RECVOPTS = 0x6 + sysIP_RETOPTS = 0x7 + sysIP_PKTINFO = 0x8 + sysIP_PKTOPTIONS = 0x9 + sysIP_MTU_DISCOVER = 0xa + sysIP_RECVERR = 0xb + sysIP_RECVTTL = 0xc + sysIP_RECVTOS = 0xd + sysIP_MTU = 0xe + sysIP_FREEBIND = 0xf + sysIP_TRANSPARENT = 0x13 + sysIP_RECVRETOPTS = 0x7 + sysIP_ORIGDSTADDR = 0x14 + sysIP_RECVORIGDSTADDR = 0x14 + sysIP_MINTTL = 0x15 + sysIP_NODEFRAG = 0x16 + sysIP_UNICAST_IF = 0x32 + + sysIP_MULTICAST_IF = 0x20 + sysIP_MULTICAST_TTL = 0x21 + sysIP_MULTICAST_LOOP = 0x22 + sysIP_ADD_MEMBERSHIP = 0x23 + sysIP_DROP_MEMBERSHIP = 0x24 + sysIP_UNBLOCK_SOURCE = 0x25 + sysIP_BLOCK_SOURCE = 0x26 + sysIP_ADD_SOURCE_MEMBERSHIP = 0x27 + sysIP_DROP_SOURCE_MEMBERSHIP = 0x28 + sysIP_MSFILTER = 0x29 + sysMCAST_JOIN_GROUP = 0x2a + sysMCAST_LEAVE_GROUP = 0x2d + sysMCAST_JOIN_SOURCE_GROUP = 0x2e + sysMCAST_LEAVE_SOURCE_GROUP = 0x2f + sysMCAST_BLOCK_SOURCE = 0x2b + sysMCAST_UNBLOCK_SOURCE = 0x2c + sysMCAST_MSFILTER = 0x30 + sysIP_MULTICAST_ALL = 0x31 + + sysICMP_FILTER = 0x1 + + sysSO_EE_ORIGIN_NONE = 0x0 + sysSO_EE_ORIGIN_LOCAL = 0x1 + sysSO_EE_ORIGIN_ICMP = 0x2 + sysSO_EE_ORIGIN_ICMP6 = 0x3 + sysSO_EE_ORIGIN_TXSTATUS = 0x4 + sysSO_EE_ORIGIN_TIMESTAMPING = 0x4 + + sysSOL_SOCKET = 0x1 + sysSO_ATTACH_FILTER = 0x1a + + sizeofKernelSockaddrStorage = 0x80 + sizeofSockaddrInet = 0x10 + sizeofInetPktinfo = 0xc + sizeofSockExtendedErr = 0x10 + + sizeofIPMreq = 0x8 + sizeofIPMreqn = 0xc + sizeofIPMreqSource = 0xc + sizeofGroupReq = 0x88 + sizeofGroupSourceReq = 0x108 + + sizeofICMPFilter = 0x4 + + sizeofSockFprog = 0x10 +) + +type kernelSockaddrStorage struct { + Family uint16 + X__data [126]int8 +} + +type sockaddrInet struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + X__pad [8]uint8 +} + +type inetPktinfo struct { + Ifindex int32 + Spec_dst [4]byte /* in_addr */ + Addr [4]byte /* in_addr */ +} + +type sockExtendedErr struct { + Errno uint32 + Origin uint8 + Type uint8 + Code uint8 + Pad uint8 + Info uint32 + Data uint32 +} + +type ipMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type ipMreqn struct { + Multiaddr [4]byte /* in_addr */ + Address [4]byte /* in_addr */ + Ifindex int32 +} + +type ipMreqSource struct { + Multiaddr uint32 + Interface uint32 + Sourceaddr uint32 +} + +type groupReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group kernelSockaddrStorage +} + +type groupSourceReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group kernelSockaddrStorage + Source kernelSockaddrStorage +} + +type icmpFilter struct { + Data uint32 +} + +type sockFProg struct { + Len uint16 + Pad_cgo_0 [6]byte + Filter *sockFilter +} + +type sockFilter struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_linux_ppc64le.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_linux_ppc64le.go new file mode 100644 index 000000000..9c967eaa6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_linux_ppc64le.go @@ -0,0 +1,150 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_linux.go + +package ipv4 + +const ( + sysIP_TOS = 0x1 + sysIP_TTL = 0x2 + sysIP_HDRINCL = 0x3 + sysIP_OPTIONS = 0x4 + sysIP_ROUTER_ALERT = 0x5 + sysIP_RECVOPTS = 0x6 + sysIP_RETOPTS = 0x7 + sysIP_PKTINFO = 0x8 + sysIP_PKTOPTIONS = 0x9 + sysIP_MTU_DISCOVER = 0xa + sysIP_RECVERR = 0xb + sysIP_RECVTTL = 0xc + sysIP_RECVTOS = 0xd + sysIP_MTU = 0xe + sysIP_FREEBIND = 0xf + sysIP_TRANSPARENT = 0x13 + sysIP_RECVRETOPTS = 0x7 + sysIP_ORIGDSTADDR = 0x14 + sysIP_RECVORIGDSTADDR = 0x14 + sysIP_MINTTL = 0x15 + sysIP_NODEFRAG = 0x16 + sysIP_UNICAST_IF = 0x32 + + sysIP_MULTICAST_IF = 0x20 + sysIP_MULTICAST_TTL = 0x21 + sysIP_MULTICAST_LOOP = 0x22 + sysIP_ADD_MEMBERSHIP = 0x23 + sysIP_DROP_MEMBERSHIP = 0x24 + sysIP_UNBLOCK_SOURCE = 0x25 + sysIP_BLOCK_SOURCE = 0x26 + sysIP_ADD_SOURCE_MEMBERSHIP = 0x27 + sysIP_DROP_SOURCE_MEMBERSHIP = 0x28 + sysIP_MSFILTER = 0x29 + sysMCAST_JOIN_GROUP = 0x2a + sysMCAST_LEAVE_GROUP = 0x2d + sysMCAST_JOIN_SOURCE_GROUP = 0x2e + sysMCAST_LEAVE_SOURCE_GROUP = 0x2f + sysMCAST_BLOCK_SOURCE = 0x2b + sysMCAST_UNBLOCK_SOURCE = 0x2c + sysMCAST_MSFILTER = 0x30 + sysIP_MULTICAST_ALL = 0x31 + + sysICMP_FILTER = 0x1 + + sysSO_EE_ORIGIN_NONE = 0x0 + sysSO_EE_ORIGIN_LOCAL = 0x1 + sysSO_EE_ORIGIN_ICMP = 0x2 + sysSO_EE_ORIGIN_ICMP6 = 0x3 + sysSO_EE_ORIGIN_TXSTATUS = 0x4 + sysSO_EE_ORIGIN_TIMESTAMPING = 0x4 + + sysSOL_SOCKET = 0x1 + sysSO_ATTACH_FILTER = 0x1a + + sizeofKernelSockaddrStorage = 0x80 + sizeofSockaddrInet = 0x10 + sizeofInetPktinfo = 0xc + sizeofSockExtendedErr = 0x10 + + sizeofIPMreq = 0x8 + sizeofIPMreqn = 0xc + sizeofIPMreqSource = 0xc + sizeofGroupReq = 0x88 + sizeofGroupSourceReq = 0x108 + + sizeofICMPFilter = 0x4 + + sizeofSockFprog = 0x10 +) + +type kernelSockaddrStorage struct { + Family uint16 + X__data [126]int8 +} + +type sockaddrInet struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + X__pad [8]uint8 +} + +type inetPktinfo struct { + Ifindex int32 + Spec_dst [4]byte /* in_addr */ + Addr [4]byte /* in_addr */ +} + +type sockExtendedErr struct { + Errno uint32 + Origin uint8 + Type uint8 + Code uint8 + Pad uint8 + Info uint32 + Data uint32 +} + +type ipMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type ipMreqn struct { + Multiaddr [4]byte /* in_addr */ + Address [4]byte /* in_addr */ + Ifindex int32 +} + +type ipMreqSource struct { + Multiaddr uint32 + Interface uint32 + Sourceaddr uint32 +} + +type groupReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group kernelSockaddrStorage +} + +type groupSourceReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group kernelSockaddrStorage + Source kernelSockaddrStorage +} + +type icmpFilter struct { + Data uint32 +} + +type sockFProg struct { + Len uint16 + Pad_cgo_0 [6]byte + Filter *sockFilter +} + +type sockFilter struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_linux_s390x.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_linux_s390x.go new file mode 100644 index 000000000..9c967eaa6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_linux_s390x.go @@ -0,0 +1,150 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_linux.go + +package ipv4 + +const ( + sysIP_TOS = 0x1 + sysIP_TTL = 0x2 + sysIP_HDRINCL = 0x3 + sysIP_OPTIONS = 0x4 + sysIP_ROUTER_ALERT = 0x5 + sysIP_RECVOPTS = 0x6 + sysIP_RETOPTS = 0x7 + sysIP_PKTINFO = 0x8 + sysIP_PKTOPTIONS = 0x9 + sysIP_MTU_DISCOVER = 0xa + sysIP_RECVERR = 0xb + sysIP_RECVTTL = 0xc + sysIP_RECVTOS = 0xd + sysIP_MTU = 0xe + sysIP_FREEBIND = 0xf + sysIP_TRANSPARENT = 0x13 + sysIP_RECVRETOPTS = 0x7 + sysIP_ORIGDSTADDR = 0x14 + sysIP_RECVORIGDSTADDR = 0x14 + sysIP_MINTTL = 0x15 + sysIP_NODEFRAG = 0x16 + sysIP_UNICAST_IF = 0x32 + + sysIP_MULTICAST_IF = 0x20 + sysIP_MULTICAST_TTL = 0x21 + sysIP_MULTICAST_LOOP = 0x22 + sysIP_ADD_MEMBERSHIP = 0x23 + sysIP_DROP_MEMBERSHIP = 0x24 + sysIP_UNBLOCK_SOURCE = 0x25 + sysIP_BLOCK_SOURCE = 0x26 + sysIP_ADD_SOURCE_MEMBERSHIP = 0x27 + sysIP_DROP_SOURCE_MEMBERSHIP = 0x28 + sysIP_MSFILTER = 0x29 + sysMCAST_JOIN_GROUP = 0x2a + sysMCAST_LEAVE_GROUP = 0x2d + sysMCAST_JOIN_SOURCE_GROUP = 0x2e + sysMCAST_LEAVE_SOURCE_GROUP = 0x2f + sysMCAST_BLOCK_SOURCE = 0x2b + sysMCAST_UNBLOCK_SOURCE = 0x2c + sysMCAST_MSFILTER = 0x30 + sysIP_MULTICAST_ALL = 0x31 + + sysICMP_FILTER = 0x1 + + sysSO_EE_ORIGIN_NONE = 0x0 + sysSO_EE_ORIGIN_LOCAL = 0x1 + sysSO_EE_ORIGIN_ICMP = 0x2 + sysSO_EE_ORIGIN_ICMP6 = 0x3 + sysSO_EE_ORIGIN_TXSTATUS = 0x4 + sysSO_EE_ORIGIN_TIMESTAMPING = 0x4 + + sysSOL_SOCKET = 0x1 + sysSO_ATTACH_FILTER = 0x1a + + sizeofKernelSockaddrStorage = 0x80 + sizeofSockaddrInet = 0x10 + sizeofInetPktinfo = 0xc + sizeofSockExtendedErr = 0x10 + + sizeofIPMreq = 0x8 + sizeofIPMreqn = 0xc + sizeofIPMreqSource = 0xc + sizeofGroupReq = 0x88 + sizeofGroupSourceReq = 0x108 + + sizeofICMPFilter = 0x4 + + sizeofSockFprog = 0x10 +) + +type kernelSockaddrStorage struct { + Family uint16 + X__data [126]int8 +} + +type sockaddrInet struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + X__pad [8]uint8 +} + +type inetPktinfo struct { + Ifindex int32 + Spec_dst [4]byte /* in_addr */ + Addr [4]byte /* in_addr */ +} + +type sockExtendedErr struct { + Errno uint32 + Origin uint8 + Type uint8 + Code uint8 + Pad uint8 + Info uint32 + Data uint32 +} + +type ipMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type ipMreqn struct { + Multiaddr [4]byte /* in_addr */ + Address [4]byte /* in_addr */ + Ifindex int32 +} + +type ipMreqSource struct { + Multiaddr uint32 + Interface uint32 + Sourceaddr uint32 +} + +type groupReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group kernelSockaddrStorage +} + +type groupSourceReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group kernelSockaddrStorage + Source kernelSockaddrStorage +} + +type icmpFilter struct { + Data uint32 +} + +type sockFProg struct { + Len uint16 + Pad_cgo_0 [6]byte + Filter *sockFilter +} + +type sockFilter struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_netbsd.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_netbsd.go new file mode 100644 index 000000000..fd3624d93 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_netbsd.go @@ -0,0 +1,30 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_netbsd.go + +package ipv4 + +const ( + sysIP_OPTIONS = 0x1 + sysIP_HDRINCL = 0x2 + sysIP_TOS = 0x3 + sysIP_TTL = 0x4 + sysIP_RECVOPTS = 0x5 + sysIP_RECVRETOPTS = 0x6 + sysIP_RECVDSTADDR = 0x7 + sysIP_RETOPTS = 0x8 + sysIP_RECVIF = 0x14 + sysIP_RECVTTL = 0x17 + + sysIP_MULTICAST_IF = 0x9 + sysIP_MULTICAST_TTL = 0xa + sysIP_MULTICAST_LOOP = 0xb + sysIP_ADD_MEMBERSHIP = 0xc + sysIP_DROP_MEMBERSHIP = 0xd + + sizeofIPMreq = 0x8 +) + +type ipMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_openbsd.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_openbsd.go new file mode 100644 index 000000000..12f36be75 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_openbsd.go @@ -0,0 +1,30 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_openbsd.go + +package ipv4 + +const ( + sysIP_OPTIONS = 0x1 + sysIP_HDRINCL = 0x2 + sysIP_TOS = 0x3 + sysIP_TTL = 0x4 + sysIP_RECVOPTS = 0x5 + sysIP_RECVRETOPTS = 0x6 + sysIP_RECVDSTADDR = 0x7 + sysIP_RETOPTS = 0x8 + sysIP_RECVIF = 0x1e + sysIP_RECVTTL = 0x1f + + sysIP_MULTICAST_IF = 0x9 + sysIP_MULTICAST_TTL = 0xa + sysIP_MULTICAST_LOOP = 0xb + sysIP_ADD_MEMBERSHIP = 0xc + sysIP_DROP_MEMBERSHIP = 0xd + + sizeofIPMreq = 0x8 +) + +type ipMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_solaris.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_solaris.go new file mode 100644 index 000000000..0a3875cc4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv4/zsys_solaris.go @@ -0,0 +1,100 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_solaris.go + +package ipv4 + +const ( + sysIP_OPTIONS = 0x1 + sysIP_HDRINCL = 0x2 + sysIP_TOS = 0x3 + sysIP_TTL = 0x4 + sysIP_RECVOPTS = 0x5 + sysIP_RECVRETOPTS = 0x6 + sysIP_RECVDSTADDR = 0x7 + sysIP_RETOPTS = 0x8 + sysIP_RECVIF = 0x9 + sysIP_RECVSLLA = 0xa + sysIP_RECVTTL = 0xb + + sysIP_MULTICAST_IF = 0x10 + sysIP_MULTICAST_TTL = 0x11 + sysIP_MULTICAST_LOOP = 0x12 + sysIP_ADD_MEMBERSHIP = 0x13 + sysIP_DROP_MEMBERSHIP = 0x14 + sysIP_BLOCK_SOURCE = 0x15 + sysIP_UNBLOCK_SOURCE = 0x16 + sysIP_ADD_SOURCE_MEMBERSHIP = 0x17 + sysIP_DROP_SOURCE_MEMBERSHIP = 0x18 + sysIP_NEXTHOP = 0x19 + + sysIP_PKTINFO = 0x1a + sysIP_RECVPKTINFO = 0x1a + sysIP_DONTFRAG = 0x1b + + sysIP_BOUND_IF = 0x41 + sysIP_UNSPEC_SRC = 0x42 + sysIP_BROADCAST_TTL = 0x43 + sysIP_DHCPINIT_IF = 0x45 + + sysIP_REUSEADDR = 0x104 + sysIP_DONTROUTE = 0x105 + sysIP_BROADCAST = 0x106 + + sysMCAST_JOIN_GROUP = 0x29 + sysMCAST_LEAVE_GROUP = 0x2a + sysMCAST_BLOCK_SOURCE = 0x2b + sysMCAST_UNBLOCK_SOURCE = 0x2c + sysMCAST_JOIN_SOURCE_GROUP = 0x2d + sysMCAST_LEAVE_SOURCE_GROUP = 0x2e + + sizeofSockaddrStorage = 0x100 + sizeofSockaddrInet = 0x10 + sizeofInetPktinfo = 0xc + + sizeofIPMreq = 0x8 + sizeofIPMreqSource = 0xc + sizeofGroupReq = 0x104 + sizeofGroupSourceReq = 0x204 +) + +type sockaddrStorage struct { + Family uint16 + X_ss_pad1 [6]int8 + X_ss_align float64 + X_ss_pad2 [240]int8 +} + +type sockaddrInet struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type inetPktinfo struct { + Ifindex uint32 + Spec_dst [4]byte /* in_addr */ + Addr [4]byte /* in_addr */ +} + +type ipMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type ipMreqSource struct { + Multiaddr [4]byte /* in_addr */ + Sourceaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type groupReq struct { + Interface uint32 + Pad_cgo_0 [256]byte +} + +type groupSourceReq struct { + Interface uint32 + Pad_cgo_0 [256]byte + Pad_cgo_1 [256]byte +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/batch.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/batch.go new file mode 100644 index 000000000..4f5fe683d --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/batch.go @@ -0,0 +1,119 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build go1.9 + +package ipv6 + +import ( + "net" + "runtime" + "syscall" + + "golang.org/x/net/internal/socket" +) + +// BUG(mikio): On Windows, the ReadBatch and WriteBatch methods of +// PacketConn are not implemented. + +// A Message represents an IO message. +// +// type Message struct { +// Buffers [][]byte +// OOB []byte +// Addr net.Addr +// N int +// NN int +// Flags int +// } +// +// The Buffers fields represents a list of contiguous buffers, which +// can be used for vectored IO, for example, putting a header and a +// payload in each slice. +// When writing, the Buffers field must contain at least one byte to +// write. +// When reading, the Buffers field will always contain a byte to read. +// +// The OOB field contains protocol-specific control or miscellaneous +// ancillary data known as out-of-band data. +// It can be nil when not required. +// +// The Addr field specifies a destination address when writing. +// It can be nil when the underlying protocol of the endpoint uses +// connection-oriented communication. +// After a successful read, it may contain the source address on the +// received packet. +// +// The N field indicates the number of bytes read or written from/to +// Buffers. +// +// The NN field indicates the number of bytes read or written from/to +// OOB. +// +// The Flags field contains protocol-specific information on the +// received message. +type Message = socket.Message + +// ReadBatch reads a batch of messages. +// +// The provided flags is a set of platform-dependent flags, such as +// syscall.MSG_PEEK. +// +// On a successful read it returns the number of messages received, up +// to len(ms). +// +// On Linux, a batch read will be optimized. +// On other platforms, this method will read only a single message. +func (c *payloadHandler) ReadBatch(ms []Message, flags int) (int, error) { + if !c.ok() { + return 0, syscall.EINVAL + } + switch runtime.GOOS { + case "linux": + n, err := c.RecvMsgs([]socket.Message(ms), flags) + if err != nil { + err = &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err} + } + return n, err + default: + n := 1 + err := c.RecvMsg(&ms[0], flags) + if err != nil { + n = 0 + err = &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err} + } + return n, err + } +} + +// WriteBatch writes a batch of messages. +// +// The provided flags is a set of platform-dependent flags, such as +// syscall.MSG_DONTROUTE. +// +// It returns the number of messages written on a successful write. +// +// On Linux, a batch write will be optimized. +// On other platforms, this method will write only a single message. +func (c *payloadHandler) WriteBatch(ms []Message, flags int) (int, error) { + if !c.ok() { + return 0, syscall.EINVAL + } + switch runtime.GOOS { + case "linux": + n, err := c.SendMsgs([]socket.Message(ms), flags) + if err != nil { + err = &net.OpError{Op: "write", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err} + } + return n, err + default: + n := 1 + err := c.SendMsg(&ms[0], flags) + if err != nil { + n = 0 + err = &net.OpError{Op: "write", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err} + } + return n, err + } +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/control.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/control.go new file mode 100644 index 000000000..2da644413 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/control.go @@ -0,0 +1,187 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv6 + +import ( + "fmt" + "net" + "sync" + + "golang.org/x/net/internal/iana" + "golang.org/x/net/internal/socket" +) + +// Note that RFC 3542 obsoletes RFC 2292 but OS X Snow Leopard and the +// former still support RFC 2292 only. Please be aware that almost +// all protocol implementations prohibit using a combination of RFC +// 2292 and RFC 3542 for some practical reasons. + +type rawOpt struct { + sync.RWMutex + cflags ControlFlags +} + +func (c *rawOpt) set(f ControlFlags) { c.cflags |= f } +func (c *rawOpt) clear(f ControlFlags) { c.cflags &^= f } +func (c *rawOpt) isset(f ControlFlags) bool { return c.cflags&f != 0 } + +// A ControlFlags represents per packet basis IP-level socket option +// control flags. +type ControlFlags uint + +const ( + FlagTrafficClass ControlFlags = 1 << iota // pass the traffic class on the received packet + FlagHopLimit // pass the hop limit on the received packet + FlagSrc // pass the source address on the received packet + FlagDst // pass the destination address on the received packet + FlagInterface // pass the interface index on the received packet + FlagPathMTU // pass the path MTU on the received packet path +) + +const flagPacketInfo = FlagDst | FlagInterface + +// A ControlMessage represents per packet basis IP-level socket +// options. +type ControlMessage struct { + // Receiving socket options: SetControlMessage allows to + // receive the options from the protocol stack using ReadFrom + // method of PacketConn. + // + // Specifying socket options: ControlMessage for WriteTo + // method of PacketConn allows to send the options to the + // protocol stack. + // + TrafficClass int // traffic class, must be 1 <= value <= 255 when specifying + HopLimit int // hop limit, must be 1 <= value <= 255 when specifying + Src net.IP // source address, specifying only + Dst net.IP // destination address, receiving only + IfIndex int // interface index, must be 1 <= value when specifying + NextHop net.IP // next hop address, specifying only + MTU int // path MTU, receiving only +} + +func (cm *ControlMessage) String() string { + if cm == nil { + return "" + } + return fmt.Sprintf("tclass=%#x hoplim=%d src=%v dst=%v ifindex=%d nexthop=%v mtu=%d", cm.TrafficClass, cm.HopLimit, cm.Src, cm.Dst, cm.IfIndex, cm.NextHop, cm.MTU) +} + +// Marshal returns the binary encoding of cm. +func (cm *ControlMessage) Marshal() []byte { + if cm == nil { + return nil + } + var l int + tclass := false + if ctlOpts[ctlTrafficClass].name > 0 && cm.TrafficClass > 0 { + tclass = true + l += socket.ControlMessageSpace(ctlOpts[ctlTrafficClass].length) + } + hoplimit := false + if ctlOpts[ctlHopLimit].name > 0 && cm.HopLimit > 0 { + hoplimit = true + l += socket.ControlMessageSpace(ctlOpts[ctlHopLimit].length) + } + pktinfo := false + if ctlOpts[ctlPacketInfo].name > 0 && (cm.Src.To16() != nil && cm.Src.To4() == nil || cm.IfIndex > 0) { + pktinfo = true + l += socket.ControlMessageSpace(ctlOpts[ctlPacketInfo].length) + } + nexthop := false + if ctlOpts[ctlNextHop].name > 0 && cm.NextHop.To16() != nil && cm.NextHop.To4() == nil { + nexthop = true + l += socket.ControlMessageSpace(ctlOpts[ctlNextHop].length) + } + var b []byte + if l > 0 { + b = make([]byte, l) + bb := b + if tclass { + bb = ctlOpts[ctlTrafficClass].marshal(bb, cm) + } + if hoplimit { + bb = ctlOpts[ctlHopLimit].marshal(bb, cm) + } + if pktinfo { + bb = ctlOpts[ctlPacketInfo].marshal(bb, cm) + } + if nexthop { + bb = ctlOpts[ctlNextHop].marshal(bb, cm) + } + } + return b +} + +// Parse parses b as a control message and stores the result in cm. +func (cm *ControlMessage) Parse(b []byte) error { + ms, err := socket.ControlMessage(b).Parse() + if err != nil { + return err + } + for _, m := range ms { + lvl, typ, l, err := m.ParseHeader() + if err != nil { + return err + } + if lvl != iana.ProtocolIPv6 { + continue + } + switch { + case typ == ctlOpts[ctlTrafficClass].name && l >= ctlOpts[ctlTrafficClass].length: + ctlOpts[ctlTrafficClass].parse(cm, m.Data(l)) + case typ == ctlOpts[ctlHopLimit].name && l >= ctlOpts[ctlHopLimit].length: + ctlOpts[ctlHopLimit].parse(cm, m.Data(l)) + case typ == ctlOpts[ctlPacketInfo].name && l >= ctlOpts[ctlPacketInfo].length: + ctlOpts[ctlPacketInfo].parse(cm, m.Data(l)) + case typ == ctlOpts[ctlPathMTU].name && l >= ctlOpts[ctlPathMTU].length: + ctlOpts[ctlPathMTU].parse(cm, m.Data(l)) + } + } + return nil +} + +// NewControlMessage returns a new control message. +// +// The returned message is large enough for options specified by cf. +func NewControlMessage(cf ControlFlags) []byte { + opt := rawOpt{cflags: cf} + var l int + if opt.isset(FlagTrafficClass) && ctlOpts[ctlTrafficClass].name > 0 { + l += socket.ControlMessageSpace(ctlOpts[ctlTrafficClass].length) + } + if opt.isset(FlagHopLimit) && ctlOpts[ctlHopLimit].name > 0 { + l += socket.ControlMessageSpace(ctlOpts[ctlHopLimit].length) + } + if opt.isset(flagPacketInfo) && ctlOpts[ctlPacketInfo].name > 0 { + l += socket.ControlMessageSpace(ctlOpts[ctlPacketInfo].length) + } + if opt.isset(FlagPathMTU) && ctlOpts[ctlPathMTU].name > 0 { + l += socket.ControlMessageSpace(ctlOpts[ctlPathMTU].length) + } + var b []byte + if l > 0 { + b = make([]byte, l) + } + return b +} + +// Ancillary data socket options +const ( + ctlTrafficClass = iota // header field + ctlHopLimit // header field + ctlPacketInfo // inbound or outbound packet path + ctlNextHop // nexthop + ctlPathMTU // path mtu + ctlMax +) + +// A ctlOpt represents a binding for ancillary data socket option. +type ctlOpt struct { + name int // option name, must be equal or greater than 1 + length int // option length + marshal func([]byte, *ControlMessage) []byte + parse func(*ControlMessage, []byte) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/control_rfc2292_unix.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/control_rfc2292_unix.go new file mode 100644 index 000000000..9fd9eb15e --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/control_rfc2292_unix.go @@ -0,0 +1,48 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin + +package ipv6 + +import ( + "unsafe" + + "golang.org/x/net/internal/iana" + "golang.org/x/net/internal/socket" +) + +func marshal2292HopLimit(b []byte, cm *ControlMessage) []byte { + m := socket.ControlMessage(b) + m.MarshalHeader(iana.ProtocolIPv6, sysIPV6_2292HOPLIMIT, 4) + if cm != nil { + socket.NativeEndian.PutUint32(m.Data(4), uint32(cm.HopLimit)) + } + return m.Next(4) +} + +func marshal2292PacketInfo(b []byte, cm *ControlMessage) []byte { + m := socket.ControlMessage(b) + m.MarshalHeader(iana.ProtocolIPv6, sysIPV6_2292PKTINFO, sizeofInet6Pktinfo) + if cm != nil { + pi := (*inet6Pktinfo)(unsafe.Pointer(&m.Data(sizeofInet6Pktinfo)[0])) + if ip := cm.Src.To16(); ip != nil && ip.To4() == nil { + copy(pi.Addr[:], ip) + } + if cm.IfIndex > 0 { + pi.setIfindex(cm.IfIndex) + } + } + return m.Next(sizeofInet6Pktinfo) +} + +func marshal2292NextHop(b []byte, cm *ControlMessage) []byte { + m := socket.ControlMessage(b) + m.MarshalHeader(iana.ProtocolIPv6, sysIPV6_2292NEXTHOP, sizeofSockaddrInet6) + if cm != nil { + sa := (*sockaddrInet6)(unsafe.Pointer(&m.Data(sizeofSockaddrInet6)[0])) + sa.setSockaddr(cm.NextHop, cm.IfIndex) + } + return m.Next(sizeofSockaddrInet6) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/control_rfc3542_unix.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/control_rfc3542_unix.go new file mode 100644 index 000000000..eec529c20 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/control_rfc3542_unix.go @@ -0,0 +1,94 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd solaris + +package ipv6 + +import ( + "net" + "unsafe" + + "golang.org/x/net/internal/iana" + "golang.org/x/net/internal/socket" +) + +func marshalTrafficClass(b []byte, cm *ControlMessage) []byte { + m := socket.ControlMessage(b) + m.MarshalHeader(iana.ProtocolIPv6, sysIPV6_TCLASS, 4) + if cm != nil { + socket.NativeEndian.PutUint32(m.Data(4), uint32(cm.TrafficClass)) + } + return m.Next(4) +} + +func parseTrafficClass(cm *ControlMessage, b []byte) { + cm.TrafficClass = int(socket.NativeEndian.Uint32(b[:4])) +} + +func marshalHopLimit(b []byte, cm *ControlMessage) []byte { + m := socket.ControlMessage(b) + m.MarshalHeader(iana.ProtocolIPv6, sysIPV6_HOPLIMIT, 4) + if cm != nil { + socket.NativeEndian.PutUint32(m.Data(4), uint32(cm.HopLimit)) + } + return m.Next(4) +} + +func parseHopLimit(cm *ControlMessage, b []byte) { + cm.HopLimit = int(socket.NativeEndian.Uint32(b[:4])) +} + +func marshalPacketInfo(b []byte, cm *ControlMessage) []byte { + m := socket.ControlMessage(b) + m.MarshalHeader(iana.ProtocolIPv6, sysIPV6_PKTINFO, sizeofInet6Pktinfo) + if cm != nil { + pi := (*inet6Pktinfo)(unsafe.Pointer(&m.Data(sizeofInet6Pktinfo)[0])) + if ip := cm.Src.To16(); ip != nil && ip.To4() == nil { + copy(pi.Addr[:], ip) + } + if cm.IfIndex > 0 { + pi.setIfindex(cm.IfIndex) + } + } + return m.Next(sizeofInet6Pktinfo) +} + +func parsePacketInfo(cm *ControlMessage, b []byte) { + pi := (*inet6Pktinfo)(unsafe.Pointer(&b[0])) + if len(cm.Dst) < net.IPv6len { + cm.Dst = make(net.IP, net.IPv6len) + } + copy(cm.Dst, pi.Addr[:]) + cm.IfIndex = int(pi.Ifindex) +} + +func marshalNextHop(b []byte, cm *ControlMessage) []byte { + m := socket.ControlMessage(b) + m.MarshalHeader(iana.ProtocolIPv6, sysIPV6_NEXTHOP, sizeofSockaddrInet6) + if cm != nil { + sa := (*sockaddrInet6)(unsafe.Pointer(&m.Data(sizeofSockaddrInet6)[0])) + sa.setSockaddr(cm.NextHop, cm.IfIndex) + } + return m.Next(sizeofSockaddrInet6) +} + +func parseNextHop(cm *ControlMessage, b []byte) { +} + +func marshalPathMTU(b []byte, cm *ControlMessage) []byte { + m := socket.ControlMessage(b) + m.MarshalHeader(iana.ProtocolIPv6, sysIPV6_PATHMTU, sizeofIPv6Mtuinfo) + return m.Next(sizeofIPv6Mtuinfo) +} + +func parsePathMTU(cm *ControlMessage, b []byte) { + mi := (*ipv6Mtuinfo)(unsafe.Pointer(&b[0])) + if len(cm.Dst) < net.IPv6len { + cm.Dst = make(net.IP, net.IPv6len) + } + copy(cm.Dst, mi.Addr.Addr[:]) + cm.IfIndex = int(mi.Addr.Scope_id) + cm.MTU = int(mi.Mtu) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/control_stub.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/control_stub.go new file mode 100644 index 000000000..a045f28f7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/control_stub.go @@ -0,0 +1,13 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows + +package ipv6 + +import "golang.org/x/net/internal/socket" + +func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error { + return errOpNoSupport +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/control_unix.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/control_unix.go new file mode 100644 index 000000000..66515060a --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/control_unix.go @@ -0,0 +1,55 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd solaris + +package ipv6 + +import "golang.org/x/net/internal/socket" + +func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error { + opt.Lock() + defer opt.Unlock() + if so, ok := sockOpts[ssoReceiveTrafficClass]; ok && cf&FlagTrafficClass != 0 { + if err := so.SetInt(c, boolint(on)); err != nil { + return err + } + if on { + opt.set(FlagTrafficClass) + } else { + opt.clear(FlagTrafficClass) + } + } + if so, ok := sockOpts[ssoReceiveHopLimit]; ok && cf&FlagHopLimit != 0 { + if err := so.SetInt(c, boolint(on)); err != nil { + return err + } + if on { + opt.set(FlagHopLimit) + } else { + opt.clear(FlagHopLimit) + } + } + if so, ok := sockOpts[ssoReceivePacketInfo]; ok && cf&flagPacketInfo != 0 { + if err := so.SetInt(c, boolint(on)); err != nil { + return err + } + if on { + opt.set(cf & flagPacketInfo) + } else { + opt.clear(cf & flagPacketInfo) + } + } + if so, ok := sockOpts[ssoReceivePathMTU]; ok && cf&FlagPathMTU != 0 { + if err := so.SetInt(c, boolint(on)); err != nil { + return err + } + if on { + opt.set(FlagPathMTU) + } else { + opt.clear(FlagPathMTU) + } + } + return nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/control_windows.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/control_windows.go new file mode 100644 index 000000000..ef2563b3f --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/control_windows.go @@ -0,0 +1,16 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv6 + +import ( + "syscall" + + "golang.org/x/net/internal/socket" +) + +func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error { + // TODO(mikio): implement this + return syscall.EWINDOWS +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/dgramopt.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/dgramopt.go new file mode 100644 index 000000000..703dafe84 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/dgramopt.go @@ -0,0 +1,302 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv6 + +import ( + "net" + "syscall" + + "golang.org/x/net/bpf" +) + +// MulticastHopLimit returns the hop limit field value for outgoing +// multicast packets. +func (c *dgramOpt) MulticastHopLimit() (int, error) { + if !c.ok() { + return 0, syscall.EINVAL + } + so, ok := sockOpts[ssoMulticastHopLimit] + if !ok { + return 0, errOpNoSupport + } + return so.GetInt(c.Conn) +} + +// SetMulticastHopLimit sets the hop limit field value for future +// outgoing multicast packets. +func (c *dgramOpt) SetMulticastHopLimit(hoplim int) error { + if !c.ok() { + return syscall.EINVAL + } + so, ok := sockOpts[ssoMulticastHopLimit] + if !ok { + return errOpNoSupport + } + return so.SetInt(c.Conn, hoplim) +} + +// MulticastInterface returns the default interface for multicast +// packet transmissions. +func (c *dgramOpt) MulticastInterface() (*net.Interface, error) { + if !c.ok() { + return nil, syscall.EINVAL + } + so, ok := sockOpts[ssoMulticastInterface] + if !ok { + return nil, errOpNoSupport + } + return so.getMulticastInterface(c.Conn) +} + +// SetMulticastInterface sets the default interface for future +// multicast packet transmissions. +func (c *dgramOpt) SetMulticastInterface(ifi *net.Interface) error { + if !c.ok() { + return syscall.EINVAL + } + so, ok := sockOpts[ssoMulticastInterface] + if !ok { + return errOpNoSupport + } + return so.setMulticastInterface(c.Conn, ifi) +} + +// MulticastLoopback reports whether transmitted multicast packets +// should be copied and send back to the originator. +func (c *dgramOpt) MulticastLoopback() (bool, error) { + if !c.ok() { + return false, syscall.EINVAL + } + so, ok := sockOpts[ssoMulticastLoopback] + if !ok { + return false, errOpNoSupport + } + on, err := so.GetInt(c.Conn) + if err != nil { + return false, err + } + return on == 1, nil +} + +// SetMulticastLoopback sets whether transmitted multicast packets +// should be copied and send back to the originator. +func (c *dgramOpt) SetMulticastLoopback(on bool) error { + if !c.ok() { + return syscall.EINVAL + } + so, ok := sockOpts[ssoMulticastLoopback] + if !ok { + return errOpNoSupport + } + return so.SetInt(c.Conn, boolint(on)) +} + +// JoinGroup joins the group address group on the interface ifi. +// By default all sources that can cast data to group are accepted. +// It's possible to mute and unmute data transmission from a specific +// source by using ExcludeSourceSpecificGroup and +// IncludeSourceSpecificGroup. +// JoinGroup uses the system assigned multicast interface when ifi is +// nil, although this is not recommended because the assignment +// depends on platforms and sometimes it might require routing +// configuration. +func (c *dgramOpt) JoinGroup(ifi *net.Interface, group net.Addr) error { + if !c.ok() { + return syscall.EINVAL + } + so, ok := sockOpts[ssoJoinGroup] + if !ok { + return errOpNoSupport + } + grp := netAddrToIP16(group) + if grp == nil { + return errMissingAddress + } + return so.setGroup(c.Conn, ifi, grp) +} + +// LeaveGroup leaves the group address group on the interface ifi +// regardless of whether the group is any-source group or +// source-specific group. +func (c *dgramOpt) LeaveGroup(ifi *net.Interface, group net.Addr) error { + if !c.ok() { + return syscall.EINVAL + } + so, ok := sockOpts[ssoLeaveGroup] + if !ok { + return errOpNoSupport + } + grp := netAddrToIP16(group) + if grp == nil { + return errMissingAddress + } + return so.setGroup(c.Conn, ifi, grp) +} + +// JoinSourceSpecificGroup joins the source-specific group comprising +// group and source on the interface ifi. +// JoinSourceSpecificGroup uses the system assigned multicast +// interface when ifi is nil, although this is not recommended because +// the assignment depends on platforms and sometimes it might require +// routing configuration. +func (c *dgramOpt) JoinSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error { + if !c.ok() { + return syscall.EINVAL + } + so, ok := sockOpts[ssoJoinSourceGroup] + if !ok { + return errOpNoSupport + } + grp := netAddrToIP16(group) + if grp == nil { + return errMissingAddress + } + src := netAddrToIP16(source) + if src == nil { + return errMissingAddress + } + return so.setSourceGroup(c.Conn, ifi, grp, src) +} + +// LeaveSourceSpecificGroup leaves the source-specific group on the +// interface ifi. +func (c *dgramOpt) LeaveSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error { + if !c.ok() { + return syscall.EINVAL + } + so, ok := sockOpts[ssoLeaveSourceGroup] + if !ok { + return errOpNoSupport + } + grp := netAddrToIP16(group) + if grp == nil { + return errMissingAddress + } + src := netAddrToIP16(source) + if src == nil { + return errMissingAddress + } + return so.setSourceGroup(c.Conn, ifi, grp, src) +} + +// ExcludeSourceSpecificGroup excludes the source-specific group from +// the already joined any-source groups by JoinGroup on the interface +// ifi. +func (c *dgramOpt) ExcludeSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error { + if !c.ok() { + return syscall.EINVAL + } + so, ok := sockOpts[ssoBlockSourceGroup] + if !ok { + return errOpNoSupport + } + grp := netAddrToIP16(group) + if grp == nil { + return errMissingAddress + } + src := netAddrToIP16(source) + if src == nil { + return errMissingAddress + } + return so.setSourceGroup(c.Conn, ifi, grp, src) +} + +// IncludeSourceSpecificGroup includes the excluded source-specific +// group by ExcludeSourceSpecificGroup again on the interface ifi. +func (c *dgramOpt) IncludeSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error { + if !c.ok() { + return syscall.EINVAL + } + so, ok := sockOpts[ssoUnblockSourceGroup] + if !ok { + return errOpNoSupport + } + grp := netAddrToIP16(group) + if grp == nil { + return errMissingAddress + } + src := netAddrToIP16(source) + if src == nil { + return errMissingAddress + } + return so.setSourceGroup(c.Conn, ifi, grp, src) +} + +// Checksum reports whether the kernel will compute, store or verify a +// checksum for both incoming and outgoing packets. If on is true, it +// returns an offset in bytes into the data of where the checksum +// field is located. +func (c *dgramOpt) Checksum() (on bool, offset int, err error) { + if !c.ok() { + return false, 0, syscall.EINVAL + } + so, ok := sockOpts[ssoChecksum] + if !ok { + return false, 0, errOpNoSupport + } + offset, err = so.GetInt(c.Conn) + if err != nil { + return false, 0, err + } + if offset < 0 { + return false, 0, nil + } + return true, offset, nil +} + +// SetChecksum enables the kernel checksum processing. If on is ture, +// the offset should be an offset in bytes into the data of where the +// checksum field is located. +func (c *dgramOpt) SetChecksum(on bool, offset int) error { + if !c.ok() { + return syscall.EINVAL + } + so, ok := sockOpts[ssoChecksum] + if !ok { + return errOpNoSupport + } + if !on { + offset = -1 + } + return so.SetInt(c.Conn, offset) +} + +// ICMPFilter returns an ICMP filter. +func (c *dgramOpt) ICMPFilter() (*ICMPFilter, error) { + if !c.ok() { + return nil, syscall.EINVAL + } + so, ok := sockOpts[ssoICMPFilter] + if !ok { + return nil, errOpNoSupport + } + return so.getICMPFilter(c.Conn) +} + +// SetICMPFilter deploys the ICMP filter. +func (c *dgramOpt) SetICMPFilter(f *ICMPFilter) error { + if !c.ok() { + return syscall.EINVAL + } + so, ok := sockOpts[ssoICMPFilter] + if !ok { + return errOpNoSupport + } + return so.setICMPFilter(c.Conn, f) +} + +// SetBPF attaches a BPF program to the connection. +// +// Only supported on Linux. +func (c *dgramOpt) SetBPF(filter []bpf.RawInstruction) error { + if !c.ok() { + return syscall.EINVAL + } + so, ok := sockOpts[ssoAttachFilter] + if !ok { + return errOpNoSupport + } + return so.setBPF(c.Conn, filter) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/doc.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/doc.go new file mode 100644 index 000000000..664a97dea --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/doc.go @@ -0,0 +1,243 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package ipv6 implements IP-level socket options for the Internet +// Protocol version 6. +// +// The package provides IP-level socket options that allow +// manipulation of IPv6 facilities. +// +// The IPv6 protocol is defined in RFC 8200. +// Socket interface extensions are defined in RFC 3493, RFC 3542 and +// RFC 3678. +// MLDv1 and MLDv2 are defined in RFC 2710 and RFC 3810. +// Source-specific multicast is defined in RFC 4607. +// +// On Darwin, this package requires OS X Mavericks version 10.9 or +// above, or equivalent. +// +// +// Unicasting +// +// The options for unicasting are available for net.TCPConn, +// net.UDPConn and net.IPConn which are created as network connections +// that use the IPv6 transport. When a single TCP connection carrying +// a data flow of multiple packets needs to indicate the flow is +// important, Conn is used to set the traffic class field on the IPv6 +// header for each packet. +// +// ln, err := net.Listen("tcp6", "[::]:1024") +// if err != nil { +// // error handling +// } +// defer ln.Close() +// for { +// c, err := ln.Accept() +// if err != nil { +// // error handling +// } +// go func(c net.Conn) { +// defer c.Close() +// +// The outgoing packets will be labeled DiffServ assured forwarding +// class 1 low drop precedence, known as AF11 packets. +// +// if err := ipv6.NewConn(c).SetTrafficClass(0x28); err != nil { +// // error handling +// } +// if _, err := c.Write(data); err != nil { +// // error handling +// } +// }(c) +// } +// +// +// Multicasting +// +// The options for multicasting are available for net.UDPConn and +// net.IPconn which are created as network connections that use the +// IPv6 transport. A few network facilities must be prepared before +// you begin multicasting, at a minimum joining network interfaces and +// multicast groups. +// +// en0, err := net.InterfaceByName("en0") +// if err != nil { +// // error handling +// } +// en1, err := net.InterfaceByIndex(911) +// if err != nil { +// // error handling +// } +// group := net.ParseIP("ff02::114") +// +// First, an application listens to an appropriate address with an +// appropriate service port. +// +// c, err := net.ListenPacket("udp6", "[::]:1024") +// if err != nil { +// // error handling +// } +// defer c.Close() +// +// Second, the application joins multicast groups, starts listening to +// the groups on the specified network interfaces. Note that the +// service port for transport layer protocol does not matter with this +// operation as joining groups affects only network and link layer +// protocols, such as IPv6 and Ethernet. +// +// p := ipv6.NewPacketConn(c) +// if err := p.JoinGroup(en0, &net.UDPAddr{IP: group}); err != nil { +// // error handling +// } +// if err := p.JoinGroup(en1, &net.UDPAddr{IP: group}); err != nil { +// // error handling +// } +// +// The application might set per packet control message transmissions +// between the protocol stack within the kernel. When the application +// needs a destination address on an incoming packet, +// SetControlMessage of PacketConn is used to enable control message +// transmissions. +// +// if err := p.SetControlMessage(ipv6.FlagDst, true); err != nil { +// // error handling +// } +// +// The application could identify whether the received packets are +// of interest by using the control message that contains the +// destination address of the received packet. +// +// b := make([]byte, 1500) +// for { +// n, rcm, src, err := p.ReadFrom(b) +// if err != nil { +// // error handling +// } +// if rcm.Dst.IsMulticast() { +// if rcm.Dst.Equal(group) { +// // joined group, do something +// } else { +// // unknown group, discard +// continue +// } +// } +// +// The application can also send both unicast and multicast packets. +// +// p.SetTrafficClass(0x0) +// p.SetHopLimit(16) +// if _, err := p.WriteTo(data[:n], nil, src); err != nil { +// // error handling +// } +// dst := &net.UDPAddr{IP: group, Port: 1024} +// wcm := ipv6.ControlMessage{TrafficClass: 0xe0, HopLimit: 1} +// for _, ifi := range []*net.Interface{en0, en1} { +// wcm.IfIndex = ifi.Index +// if _, err := p.WriteTo(data[:n], &wcm, dst); err != nil { +// // error handling +// } +// } +// } +// +// +// More multicasting +// +// An application that uses PacketConn may join multiple multicast +// groups. For example, a UDP listener with port 1024 might join two +// different groups across over two different network interfaces by +// using: +// +// c, err := net.ListenPacket("udp6", "[::]:1024") +// if err != nil { +// // error handling +// } +// defer c.Close() +// p := ipv6.NewPacketConn(c) +// if err := p.JoinGroup(en0, &net.UDPAddr{IP: net.ParseIP("ff02::1:114")}); err != nil { +// // error handling +// } +// if err := p.JoinGroup(en0, &net.UDPAddr{IP: net.ParseIP("ff02::2:114")}); err != nil { +// // error handling +// } +// if err := p.JoinGroup(en1, &net.UDPAddr{IP: net.ParseIP("ff02::2:114")}); err != nil { +// // error handling +// } +// +// It is possible for multiple UDP listeners that listen on the same +// UDP port to join the same multicast group. The net package will +// provide a socket that listens to a wildcard address with reusable +// UDP port when an appropriate multicast address prefix is passed to +// the net.ListenPacket or net.ListenUDP. +// +// c1, err := net.ListenPacket("udp6", "[ff02::]:1024") +// if err != nil { +// // error handling +// } +// defer c1.Close() +// c2, err := net.ListenPacket("udp6", "[ff02::]:1024") +// if err != nil { +// // error handling +// } +// defer c2.Close() +// p1 := ipv6.NewPacketConn(c1) +// if err := p1.JoinGroup(en0, &net.UDPAddr{IP: net.ParseIP("ff02::114")}); err != nil { +// // error handling +// } +// p2 := ipv6.NewPacketConn(c2) +// if err := p2.JoinGroup(en0, &net.UDPAddr{IP: net.ParseIP("ff02::114")}); err != nil { +// // error handling +// } +// +// Also it is possible for the application to leave or rejoin a +// multicast group on the network interface. +// +// if err := p.LeaveGroup(en0, &net.UDPAddr{IP: net.ParseIP("ff02::114")}); err != nil { +// // error handling +// } +// if err := p.JoinGroup(en0, &net.UDPAddr{IP: net.ParseIP("ff01::114")}); err != nil { +// // error handling +// } +// +// +// Source-specific multicasting +// +// An application that uses PacketConn on MLDv2 supported platform is +// able to join source-specific multicast groups. +// The application may use JoinSourceSpecificGroup and +// LeaveSourceSpecificGroup for the operation known as "include" mode, +// +// ssmgroup := net.UDPAddr{IP: net.ParseIP("ff32::8000:9")} +// ssmsource := net.UDPAddr{IP: net.ParseIP("fe80::cafe")} +// if err := p.JoinSourceSpecificGroup(en0, &ssmgroup, &ssmsource); err != nil { +// // error handling +// } +// if err := p.LeaveSourceSpecificGroup(en0, &ssmgroup, &ssmsource); err != nil { +// // error handling +// } +// +// or JoinGroup, ExcludeSourceSpecificGroup, +// IncludeSourceSpecificGroup and LeaveGroup for the operation known +// as "exclude" mode. +// +// exclsource := net.UDPAddr{IP: net.ParseIP("fe80::dead")} +// if err := p.JoinGroup(en0, &ssmgroup); err != nil { +// // error handling +// } +// if err := p.ExcludeSourceSpecificGroup(en0, &ssmgroup, &exclsource); err != nil { +// // error handling +// } +// if err := p.LeaveGroup(en0, &ssmgroup); err != nil { +// // error handling +// } +// +// Note that it depends on each platform implementation what happens +// when an application which runs on MLDv2 unsupported platform uses +// JoinSourceSpecificGroup and LeaveSourceSpecificGroup. +// In general the platform tries to fall back to conversations using +// MLDv1 and starts to listen to multicast traffic. +// In the fallback case, ExcludeSourceSpecificGroup and +// IncludeSourceSpecificGroup may return an error. +package ipv6 // import "golang.org/x/net/ipv6" + +// BUG(mikio): This package is not implemented on NaCl and Plan 9. diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/endpoint.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/endpoint.go new file mode 100644 index 000000000..0624c1740 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/endpoint.go @@ -0,0 +1,128 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv6 + +import ( + "net" + "syscall" + "time" + + "golang.org/x/net/internal/socket" +) + +// BUG(mikio): On Windows, the JoinSourceSpecificGroup, +// LeaveSourceSpecificGroup, ExcludeSourceSpecificGroup and +// IncludeSourceSpecificGroup methods of PacketConn are not +// implemented. + +// A Conn represents a network endpoint that uses IPv6 transport. +// It allows to set basic IP-level socket options such as traffic +// class and hop limit. +type Conn struct { + genericOpt +} + +type genericOpt struct { + *socket.Conn +} + +func (c *genericOpt) ok() bool { return c != nil && c.Conn != nil } + +// PathMTU returns a path MTU value for the destination associated +// with the endpoint. +func (c *Conn) PathMTU() (int, error) { + if !c.ok() { + return 0, syscall.EINVAL + } + so, ok := sockOpts[ssoPathMTU] + if !ok { + return 0, errOpNoSupport + } + _, mtu, err := so.getMTUInfo(c.Conn) + if err != nil { + return 0, err + } + return mtu, nil +} + +// NewConn returns a new Conn. +func NewConn(c net.Conn) *Conn { + cc, _ := socket.NewConn(c) + return &Conn{ + genericOpt: genericOpt{Conn: cc}, + } +} + +// A PacketConn represents a packet network endpoint that uses IPv6 +// transport. It is used to control several IP-level socket options +// including IPv6 header manipulation. It also provides datagram +// based network I/O methods specific to the IPv6 and higher layer +// protocols such as OSPF, GRE, and UDP. +type PacketConn struct { + genericOpt + dgramOpt + payloadHandler +} + +type dgramOpt struct { + *socket.Conn +} + +func (c *dgramOpt) ok() bool { return c != nil && c.Conn != nil } + +// SetControlMessage allows to receive the per packet basis IP-level +// socket options. +func (c *PacketConn) SetControlMessage(cf ControlFlags, on bool) error { + if !c.payloadHandler.ok() { + return syscall.EINVAL + } + return setControlMessage(c.dgramOpt.Conn, &c.payloadHandler.rawOpt, cf, on) +} + +// SetDeadline sets the read and write deadlines associated with the +// endpoint. +func (c *PacketConn) SetDeadline(t time.Time) error { + if !c.payloadHandler.ok() { + return syscall.EINVAL + } + return c.payloadHandler.SetDeadline(t) +} + +// SetReadDeadline sets the read deadline associated with the +// endpoint. +func (c *PacketConn) SetReadDeadline(t time.Time) error { + if !c.payloadHandler.ok() { + return syscall.EINVAL + } + return c.payloadHandler.SetReadDeadline(t) +} + +// SetWriteDeadline sets the write deadline associated with the +// endpoint. +func (c *PacketConn) SetWriteDeadline(t time.Time) error { + if !c.payloadHandler.ok() { + return syscall.EINVAL + } + return c.payloadHandler.SetWriteDeadline(t) +} + +// Close closes the endpoint. +func (c *PacketConn) Close() error { + if !c.payloadHandler.ok() { + return syscall.EINVAL + } + return c.payloadHandler.Close() +} + +// NewPacketConn returns a new PacketConn using c as its underlying +// transport. +func NewPacketConn(c net.PacketConn) *PacketConn { + cc, _ := socket.NewConn(c.(net.Conn)) + return &PacketConn{ + genericOpt: genericOpt{Conn: cc}, + dgramOpt: dgramOpt{Conn: cc}, + payloadHandler: payloadHandler{PacketConn: c, Conn: cc}, + } +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/genericopt.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/genericopt.go new file mode 100644 index 000000000..e9dbc2e18 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/genericopt.go @@ -0,0 +1,58 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv6 + +import "syscall" + +// TrafficClass returns the traffic class field value for outgoing +// packets. +func (c *genericOpt) TrafficClass() (int, error) { + if !c.ok() { + return 0, syscall.EINVAL + } + so, ok := sockOpts[ssoTrafficClass] + if !ok { + return 0, errOpNoSupport + } + return so.GetInt(c.Conn) +} + +// SetTrafficClass sets the traffic class field value for future +// outgoing packets. +func (c *genericOpt) SetTrafficClass(tclass int) error { + if !c.ok() { + return syscall.EINVAL + } + so, ok := sockOpts[ssoTrafficClass] + if !ok { + return errOpNoSupport + } + return so.SetInt(c.Conn, tclass) +} + +// HopLimit returns the hop limit field value for outgoing packets. +func (c *genericOpt) HopLimit() (int, error) { + if !c.ok() { + return 0, syscall.EINVAL + } + so, ok := sockOpts[ssoHopLimit] + if !ok { + return 0, errOpNoSupport + } + return so.GetInt(c.Conn) +} + +// SetHopLimit sets the hop limit field value for future outgoing +// packets. +func (c *genericOpt) SetHopLimit(hoplim int) error { + if !c.ok() { + return syscall.EINVAL + } + so, ok := sockOpts[ssoHopLimit] + if !ok { + return errOpNoSupport + } + return so.SetInt(c.Conn, hoplim) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/header.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/header.go new file mode 100644 index 000000000..e05cb08b2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/header.go @@ -0,0 +1,55 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv6 + +import ( + "encoding/binary" + "fmt" + "net" +) + +const ( + Version = 6 // protocol version + HeaderLen = 40 // header length +) + +// A Header represents an IPv6 base header. +type Header struct { + Version int // protocol version + TrafficClass int // traffic class + FlowLabel int // flow label + PayloadLen int // payload length + NextHeader int // next header + HopLimit int // hop limit + Src net.IP // source address + Dst net.IP // destination address +} + +func (h *Header) String() string { + if h == nil { + return "" + } + return fmt.Sprintf("ver=%d tclass=%#x flowlbl=%#x payloadlen=%d nxthdr=%d hoplim=%d src=%v dst=%v", h.Version, h.TrafficClass, h.FlowLabel, h.PayloadLen, h.NextHeader, h.HopLimit, h.Src, h.Dst) +} + +// ParseHeader parses b as an IPv6 base header. +func ParseHeader(b []byte) (*Header, error) { + if len(b) < HeaderLen { + return nil, errHeaderTooShort + } + h := &Header{ + Version: int(b[0]) >> 4, + TrafficClass: int(b[0]&0x0f)<<4 | int(b[1])>>4, + FlowLabel: int(b[1]&0x0f)<<16 | int(b[2])<<8 | int(b[3]), + PayloadLen: int(binary.BigEndian.Uint16(b[4:6])), + NextHeader: int(b[6]), + HopLimit: int(b[7]), + } + h.Src = make(net.IP, net.IPv6len) + copy(h.Src, b[8:24]) + h.Dst = make(net.IP, net.IPv6len) + copy(h.Dst, b[24:40]) + return h, nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/helper.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/helper.go new file mode 100644 index 000000000..259740132 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/helper.go @@ -0,0 +1,57 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv6 + +import ( + "errors" + "net" +) + +var ( + errMissingAddress = errors.New("missing address") + errHeaderTooShort = errors.New("header too short") + errInvalidConnType = errors.New("invalid conn type") + errOpNoSupport = errors.New("operation not supported") + errNoSuchInterface = errors.New("no such interface") +) + +func boolint(b bool) int { + if b { + return 1 + } + return 0 +} + +func netAddrToIP16(a net.Addr) net.IP { + switch v := a.(type) { + case *net.UDPAddr: + if ip := v.IP.To16(); ip != nil && ip.To4() == nil { + return ip + } + case *net.IPAddr: + if ip := v.IP.To16(); ip != nil && ip.To4() == nil { + return ip + } + } + return nil +} + +func opAddr(a net.Addr) net.Addr { + switch a.(type) { + case *net.TCPAddr: + if a == nil { + return nil + } + case *net.UDPAddr: + if a == nil { + return nil + } + case *net.IPAddr: + if a == nil { + return nil + } + } + return a +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/iana.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/iana.go new file mode 100644 index 000000000..3c6214fb6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/iana.go @@ -0,0 +1,82 @@ +// go generate gen.go +// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +package ipv6 + +// Internet Control Message Protocol version 6 (ICMPv6) Parameters, Updated: 2015-07-07 +const ( + ICMPTypeDestinationUnreachable ICMPType = 1 // Destination Unreachable + ICMPTypePacketTooBig ICMPType = 2 // Packet Too Big + ICMPTypeTimeExceeded ICMPType = 3 // Time Exceeded + ICMPTypeParameterProblem ICMPType = 4 // Parameter Problem + ICMPTypeEchoRequest ICMPType = 128 // Echo Request + ICMPTypeEchoReply ICMPType = 129 // Echo Reply + ICMPTypeMulticastListenerQuery ICMPType = 130 // Multicast Listener Query + ICMPTypeMulticastListenerReport ICMPType = 131 // Multicast Listener Report + ICMPTypeMulticastListenerDone ICMPType = 132 // Multicast Listener Done + ICMPTypeRouterSolicitation ICMPType = 133 // Router Solicitation + ICMPTypeRouterAdvertisement ICMPType = 134 // Router Advertisement + ICMPTypeNeighborSolicitation ICMPType = 135 // Neighbor Solicitation + ICMPTypeNeighborAdvertisement ICMPType = 136 // Neighbor Advertisement + ICMPTypeRedirect ICMPType = 137 // Redirect Message + ICMPTypeRouterRenumbering ICMPType = 138 // Router Renumbering + ICMPTypeNodeInformationQuery ICMPType = 139 // ICMP Node Information Query + ICMPTypeNodeInformationResponse ICMPType = 140 // ICMP Node Information Response + ICMPTypeInverseNeighborDiscoverySolicitation ICMPType = 141 // Inverse Neighbor Discovery Solicitation Message + ICMPTypeInverseNeighborDiscoveryAdvertisement ICMPType = 142 // Inverse Neighbor Discovery Advertisement Message + ICMPTypeVersion2MulticastListenerReport ICMPType = 143 // Version 2 Multicast Listener Report + ICMPTypeHomeAgentAddressDiscoveryRequest ICMPType = 144 // Home Agent Address Discovery Request Message + ICMPTypeHomeAgentAddressDiscoveryReply ICMPType = 145 // Home Agent Address Discovery Reply Message + ICMPTypeMobilePrefixSolicitation ICMPType = 146 // Mobile Prefix Solicitation + ICMPTypeMobilePrefixAdvertisement ICMPType = 147 // Mobile Prefix Advertisement + ICMPTypeCertificationPathSolicitation ICMPType = 148 // Certification Path Solicitation Message + ICMPTypeCertificationPathAdvertisement ICMPType = 149 // Certification Path Advertisement Message + ICMPTypeMulticastRouterAdvertisement ICMPType = 151 // Multicast Router Advertisement + ICMPTypeMulticastRouterSolicitation ICMPType = 152 // Multicast Router Solicitation + ICMPTypeMulticastRouterTermination ICMPType = 153 // Multicast Router Termination + ICMPTypeFMIPv6 ICMPType = 154 // FMIPv6 Messages + ICMPTypeRPLControl ICMPType = 155 // RPL Control Message + ICMPTypeILNPv6LocatorUpdate ICMPType = 156 // ILNPv6 Locator Update Message + ICMPTypeDuplicateAddressRequest ICMPType = 157 // Duplicate Address Request + ICMPTypeDuplicateAddressConfirmation ICMPType = 158 // Duplicate Address Confirmation + ICMPTypeMPLControl ICMPType = 159 // MPL Control Message +) + +// Internet Control Message Protocol version 6 (ICMPv6) Parameters, Updated: 2015-07-07 +var icmpTypes = map[ICMPType]string{ + 1: "destination unreachable", + 2: "packet too big", + 3: "time exceeded", + 4: "parameter problem", + 128: "echo request", + 129: "echo reply", + 130: "multicast listener query", + 131: "multicast listener report", + 132: "multicast listener done", + 133: "router solicitation", + 134: "router advertisement", + 135: "neighbor solicitation", + 136: "neighbor advertisement", + 137: "redirect message", + 138: "router renumbering", + 139: "icmp node information query", + 140: "icmp node information response", + 141: "inverse neighbor discovery solicitation message", + 142: "inverse neighbor discovery advertisement message", + 143: "version 2 multicast listener report", + 144: "home agent address discovery request message", + 145: "home agent address discovery reply message", + 146: "mobile prefix solicitation", + 147: "mobile prefix advertisement", + 148: "certification path solicitation message", + 149: "certification path advertisement message", + 151: "multicast router advertisement", + 152: "multicast router solicitation", + 153: "multicast router termination", + 154: "fmipv6 messages", + 155: "rpl control message", + 156: "ilnpv6 locator update message", + 157: "duplicate address request", + 158: "duplicate address confirmation", + 159: "mpl control message", +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/icmp.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/icmp.go new file mode 100644 index 000000000..b7f48e27b --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/icmp.go @@ -0,0 +1,60 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv6 + +import "golang.org/x/net/internal/iana" + +// BUG(mikio): On Windows, methods related to ICMPFilter are not +// implemented. + +// An ICMPType represents a type of ICMP message. +type ICMPType int + +func (typ ICMPType) String() string { + s, ok := icmpTypes[typ] + if !ok { + return "" + } + return s +} + +// Protocol returns the ICMPv6 protocol number. +func (typ ICMPType) Protocol() int { + return iana.ProtocolIPv6ICMP +} + +// An ICMPFilter represents an ICMP message filter for incoming +// packets. The filter belongs to a packet delivery path on a host and +// it cannot interact with forwarding packets or tunnel-outer packets. +// +// Note: RFC 8200 defines a reasonable role model. A node means a +// device that implements IP. A router means a node that forwards IP +// packets not explicitly addressed to itself, and a host means a node +// that is not a router. +type ICMPFilter struct { + icmpv6Filter +} + +// Accept accepts incoming ICMP packets including the type field value +// typ. +func (f *ICMPFilter) Accept(typ ICMPType) { + f.accept(typ) +} + +// Block blocks incoming ICMP packets including the type field value +// typ. +func (f *ICMPFilter) Block(typ ICMPType) { + f.block(typ) +} + +// SetAll sets the filter action to the filter. +func (f *ICMPFilter) SetAll(block bool) { + f.setAll(block) +} + +// WillBlock reports whether the ICMP type will be blocked. +func (f *ICMPFilter) WillBlock(typ ICMPType) bool { + return f.willBlock(typ) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/icmp_bsd.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/icmp_bsd.go new file mode 100644 index 000000000..e1a791de4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/icmp_bsd.go @@ -0,0 +1,29 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd netbsd openbsd + +package ipv6 + +func (f *icmpv6Filter) accept(typ ICMPType) { + f.Filt[typ>>5] |= 1 << (uint32(typ) & 31) +} + +func (f *icmpv6Filter) block(typ ICMPType) { + f.Filt[typ>>5] &^= 1 << (uint32(typ) & 31) +} + +func (f *icmpv6Filter) setAll(block bool) { + for i := range f.Filt { + if block { + f.Filt[i] = 0 + } else { + f.Filt[i] = 1<<32 - 1 + } + } +} + +func (f *icmpv6Filter) willBlock(typ ICMPType) bool { + return f.Filt[typ>>5]&(1<<(uint32(typ)&31)) == 0 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/icmp_linux.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/icmp_linux.go new file mode 100644 index 000000000..647f6b44f --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/icmp_linux.go @@ -0,0 +1,27 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv6 + +func (f *icmpv6Filter) accept(typ ICMPType) { + f.Data[typ>>5] &^= 1 << (uint32(typ) & 31) +} + +func (f *icmpv6Filter) block(typ ICMPType) { + f.Data[typ>>5] |= 1 << (uint32(typ) & 31) +} + +func (f *icmpv6Filter) setAll(block bool) { + for i := range f.Data { + if block { + f.Data[i] = 1<<32 - 1 + } else { + f.Data[i] = 0 + } + } +} + +func (f *icmpv6Filter) willBlock(typ ICMPType) bool { + return f.Data[typ>>5]&(1<<(uint32(typ)&31)) != 0 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/icmp_solaris.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/icmp_solaris.go new file mode 100644 index 000000000..7c23bb1cf --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/icmp_solaris.go @@ -0,0 +1,27 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv6 + +func (f *icmpv6Filter) accept(typ ICMPType) { + f.X__icmp6_filt[typ>>5] |= 1 << (uint32(typ) & 31) +} + +func (f *icmpv6Filter) block(typ ICMPType) { + f.X__icmp6_filt[typ>>5] &^= 1 << (uint32(typ) & 31) +} + +func (f *icmpv6Filter) setAll(block bool) { + for i := range f.X__icmp6_filt { + if block { + f.X__icmp6_filt[i] = 0 + } else { + f.X__icmp6_filt[i] = 1<<32 - 1 + } + } +} + +func (f *icmpv6Filter) willBlock(typ ICMPType) bool { + return f.X__icmp6_filt[typ>>5]&(1<<(uint32(typ)&31)) == 0 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/icmp_stub.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/icmp_stub.go new file mode 100644 index 000000000..c4b9be6db --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/icmp_stub.go @@ -0,0 +1,23 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows + +package ipv6 + +type icmpv6Filter struct { +} + +func (f *icmpv6Filter) accept(typ ICMPType) { +} + +func (f *icmpv6Filter) block(typ ICMPType) { +} + +func (f *icmpv6Filter) setAll(block bool) { +} + +func (f *icmpv6Filter) willBlock(typ ICMPType) bool { + return false +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/icmp_windows.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/icmp_windows.go new file mode 100644 index 000000000..443cd0736 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/icmp_windows.go @@ -0,0 +1,22 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv6 + +func (f *icmpv6Filter) accept(typ ICMPType) { + // TODO(mikio): implement this +} + +func (f *icmpv6Filter) block(typ ICMPType) { + // TODO(mikio): implement this +} + +func (f *icmpv6Filter) setAll(block bool) { + // TODO(mikio): implement this +} + +func (f *icmpv6Filter) willBlock(typ ICMPType) bool { + // TODO(mikio): implement this + return false +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/payload.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/payload.go new file mode 100644 index 000000000..a8197f169 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/payload.go @@ -0,0 +1,23 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv6 + +import ( + "net" + + "golang.org/x/net/internal/socket" +) + +// BUG(mikio): On Windows, the ControlMessage for ReadFrom and WriteTo +// methods of PacketConn is not implemented. + +// A payloadHandler represents the IPv6 datagram payload handler. +type payloadHandler struct { + net.PacketConn + *socket.Conn + rawOpt +} + +func (c *payloadHandler) ok() bool { return c != nil && c.PacketConn != nil && c.Conn != nil } diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/payload_cmsg.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/payload_cmsg.go new file mode 100644 index 000000000..4ee4b062c --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/payload_cmsg.go @@ -0,0 +1,35 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !nacl,!plan9,!windows + +package ipv6 + +import ( + "net" + "syscall" +) + +// ReadFrom reads a payload of the received IPv6 datagram, from the +// endpoint c, copying the payload into b. It returns the number of +// bytes copied into b, the control message cm and the source address +// src of the received datagram. +func (c *payloadHandler) ReadFrom(b []byte) (n int, cm *ControlMessage, src net.Addr, err error) { + if !c.ok() { + return 0, nil, nil, syscall.EINVAL + } + return c.readFrom(b) +} + +// WriteTo writes a payload of the IPv6 datagram, to the destination +// address dst through the endpoint c, copying the payload from b. It +// returns the number of bytes written. The control message cm allows +// the IPv6 header fields and the datagram path to be specified. The +// cm may be nil if control of the outgoing datagram is not required. +func (c *payloadHandler) WriteTo(b []byte, cm *ControlMessage, dst net.Addr) (n int, err error) { + if !c.ok() { + return 0, syscall.EINVAL + } + return c.writeTo(b, cm, dst) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/payload_cmsg_go1_8.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/payload_cmsg_go1_8.go new file mode 100644 index 000000000..fdc6c3994 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/payload_cmsg_go1_8.go @@ -0,0 +1,55 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !go1.9 +// +build !nacl,!plan9,!windows + +package ipv6 + +import "net" + +func (c *payloadHandler) readFrom(b []byte) (n int, cm *ControlMessage, src net.Addr, err error) { + c.rawOpt.RLock() + oob := NewControlMessage(c.rawOpt.cflags) + c.rawOpt.RUnlock() + var nn int + switch c := c.PacketConn.(type) { + case *net.UDPConn: + if n, nn, _, src, err = c.ReadMsgUDP(b, oob); err != nil { + return 0, nil, nil, err + } + case *net.IPConn: + if n, nn, _, src, err = c.ReadMsgIP(b, oob); err != nil { + return 0, nil, nil, err + } + default: + return 0, nil, nil, &net.OpError{Op: "read", Net: c.LocalAddr().Network(), Source: c.LocalAddr(), Err: errInvalidConnType} + } + if nn > 0 { + cm = new(ControlMessage) + if err = cm.Parse(oob[:nn]); err != nil { + return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err} + } + } + if cm != nil { + cm.Src = netAddrToIP16(src) + } + return +} + +func (c *payloadHandler) writeTo(b []byte, cm *ControlMessage, dst net.Addr) (n int, err error) { + oob := cm.Marshal() + if dst == nil { + return 0, &net.OpError{Op: "write", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: errMissingAddress} + } + switch c := c.PacketConn.(type) { + case *net.UDPConn: + n, _, err = c.WriteMsgUDP(b, oob, dst.(*net.UDPAddr)) + case *net.IPConn: + n, _, err = c.WriteMsgIP(b, oob, dst.(*net.IPAddr)) + default: + return 0, &net.OpError{Op: "write", Net: c.LocalAddr().Network(), Source: c.LocalAddr(), Addr: opAddr(dst), Err: errInvalidConnType} + } + return +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/payload_cmsg_go1_9.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/payload_cmsg_go1_9.go new file mode 100644 index 000000000..8f6d02e2f --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/payload_cmsg_go1_9.go @@ -0,0 +1,57 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build go1.9 +// +build !nacl,!plan9,!windows + +package ipv6 + +import ( + "net" + + "golang.org/x/net/internal/socket" +) + +func (c *payloadHandler) readFrom(b []byte) (int, *ControlMessage, net.Addr, error) { + c.rawOpt.RLock() + m := socket.Message{ + Buffers: [][]byte{b}, + OOB: NewControlMessage(c.rawOpt.cflags), + } + c.rawOpt.RUnlock() + switch c.PacketConn.(type) { + case *net.UDPConn: + if err := c.RecvMsg(&m, 0); err != nil { + return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err} + } + case *net.IPConn: + if err := c.RecvMsg(&m, 0); err != nil { + return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err} + } + default: + return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: errInvalidConnType} + } + var cm *ControlMessage + if m.NN > 0 { + cm = new(ControlMessage) + if err := cm.Parse(m.OOB[:m.NN]); err != nil { + return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err} + } + cm.Src = netAddrToIP16(m.Addr) + } + return m.N, cm, m.Addr, nil +} + +func (c *payloadHandler) writeTo(b []byte, cm *ControlMessage, dst net.Addr) (int, error) { + m := socket.Message{ + Buffers: [][]byte{b}, + OOB: cm.Marshal(), + Addr: dst, + } + err := c.SendMsg(&m, 0) + if err != nil { + err = &net.OpError{Op: "write", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Addr: opAddr(dst), Err: err} + } + return m.N, err +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/payload_nocmsg.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/payload_nocmsg.go new file mode 100644 index 000000000..99a43542b --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/payload_nocmsg.go @@ -0,0 +1,41 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build nacl plan9 windows + +package ipv6 + +import ( + "net" + "syscall" +) + +// ReadFrom reads a payload of the received IPv6 datagram, from the +// endpoint c, copying the payload into b. It returns the number of +// bytes copied into b, the control message cm and the source address +// src of the received datagram. +func (c *payloadHandler) ReadFrom(b []byte) (n int, cm *ControlMessage, src net.Addr, err error) { + if !c.ok() { + return 0, nil, nil, syscall.EINVAL + } + if n, src, err = c.PacketConn.ReadFrom(b); err != nil { + return 0, nil, nil, err + } + return +} + +// WriteTo writes a payload of the IPv6 datagram, to the destination +// address dst through the endpoint c, copying the payload from b. It +// returns the number of bytes written. The control message cm allows +// the IPv6 header fields and the datagram path to be specified. The +// cm may be nil if control of the outgoing datagram is not required. +func (c *payloadHandler) WriteTo(b []byte, cm *ControlMessage, dst net.Addr) (n int, err error) { + if !c.ok() { + return 0, syscall.EINVAL + } + if dst == nil { + return 0, errMissingAddress + } + return c.PacketConn.WriteTo(b, dst) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sockopt.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sockopt.go new file mode 100644 index 000000000..cc3907df3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sockopt.go @@ -0,0 +1,43 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv6 + +import "golang.org/x/net/internal/socket" + +// Sticky socket options +const ( + ssoTrafficClass = iota // header field for unicast packet, RFC 3542 + ssoHopLimit // header field for unicast packet, RFC 3493 + ssoMulticastInterface // outbound interface for multicast packet, RFC 3493 + ssoMulticastHopLimit // header field for multicast packet, RFC 3493 + ssoMulticastLoopback // loopback for multicast packet, RFC 3493 + ssoReceiveTrafficClass // header field on received packet, RFC 3542 + ssoReceiveHopLimit // header field on received packet, RFC 2292 or 3542 + ssoReceivePacketInfo // incbound or outbound packet path, RFC 2292 or 3542 + ssoReceivePathMTU // path mtu, RFC 3542 + ssoPathMTU // path mtu, RFC 3542 + ssoChecksum // packet checksum, RFC 2292 or 3542 + ssoICMPFilter // icmp filter, RFC 2292 or 3542 + ssoJoinGroup // any-source multicast, RFC 3493 + ssoLeaveGroup // any-source multicast, RFC 3493 + ssoJoinSourceGroup // source-specific multicast + ssoLeaveSourceGroup // source-specific multicast + ssoBlockSourceGroup // any-source or source-specific multicast + ssoUnblockSourceGroup // any-source or source-specific multicast + ssoAttachFilter // attach BPF for filtering inbound traffic +) + +// Sticky socket option value types +const ( + ssoTypeIPMreq = iota + 1 + ssoTypeGroupReq + ssoTypeGroupSourceReq +) + +// A sockOpt represents a binding for sticky socket option. +type sockOpt struct { + socket.Option + typ int // hint for option value type; optional +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sockopt_posix.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sockopt_posix.go new file mode 100644 index 000000000..0eac86eb8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sockopt_posix.go @@ -0,0 +1,87 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows + +package ipv6 + +import ( + "net" + "unsafe" + + "golang.org/x/net/bpf" + "golang.org/x/net/internal/socket" +) + +func (so *sockOpt) getMulticastInterface(c *socket.Conn) (*net.Interface, error) { + n, err := so.GetInt(c) + if err != nil { + return nil, err + } + return net.InterfaceByIndex(n) +} + +func (so *sockOpt) setMulticastInterface(c *socket.Conn, ifi *net.Interface) error { + var n int + if ifi != nil { + n = ifi.Index + } + return so.SetInt(c, n) +} + +func (so *sockOpt) getICMPFilter(c *socket.Conn) (*ICMPFilter, error) { + b := make([]byte, so.Len) + n, err := so.Get(c, b) + if err != nil { + return nil, err + } + if n != sizeofICMPv6Filter { + return nil, errOpNoSupport + } + return (*ICMPFilter)(unsafe.Pointer(&b[0])), nil +} + +func (so *sockOpt) setICMPFilter(c *socket.Conn, f *ICMPFilter) error { + b := (*[sizeofICMPv6Filter]byte)(unsafe.Pointer(f))[:sizeofICMPv6Filter] + return so.Set(c, b) +} + +func (so *sockOpt) getMTUInfo(c *socket.Conn) (*net.Interface, int, error) { + b := make([]byte, so.Len) + n, err := so.Get(c, b) + if err != nil { + return nil, 0, err + } + if n != sizeofIPv6Mtuinfo { + return nil, 0, errOpNoSupport + } + mi := (*ipv6Mtuinfo)(unsafe.Pointer(&b[0])) + if mi.Addr.Scope_id == 0 { + return nil, int(mi.Mtu), nil + } + ifi, err := net.InterfaceByIndex(int(mi.Addr.Scope_id)) + if err != nil { + return nil, 0, err + } + return ifi, int(mi.Mtu), nil +} + +func (so *sockOpt) setGroup(c *socket.Conn, ifi *net.Interface, grp net.IP) error { + switch so.typ { + case ssoTypeIPMreq: + return so.setIPMreq(c, ifi, grp) + case ssoTypeGroupReq: + return so.setGroupReq(c, ifi, grp) + default: + return errOpNoSupport + } +} + +func (so *sockOpt) setSourceGroup(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error { + return so.setGroupSourceReq(c, ifi, grp, src) +} + +func (so *sockOpt) setBPF(c *socket.Conn, f []bpf.RawInstruction) error { + return so.setAttachFilter(c, f) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sockopt_stub.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sockopt_stub.go new file mode 100644 index 000000000..1f4a273e4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sockopt_stub.go @@ -0,0 +1,46 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows + +package ipv6 + +import ( + "net" + + "golang.org/x/net/bpf" + "golang.org/x/net/internal/socket" +) + +func (so *sockOpt) getMulticastInterface(c *socket.Conn) (*net.Interface, error) { + return nil, errOpNoSupport +} + +func (so *sockOpt) setMulticastInterface(c *socket.Conn, ifi *net.Interface) error { + return errOpNoSupport +} + +func (so *sockOpt) getICMPFilter(c *socket.Conn) (*ICMPFilter, error) { + return nil, errOpNoSupport +} + +func (so *sockOpt) setICMPFilter(c *socket.Conn, f *ICMPFilter) error { + return errOpNoSupport +} + +func (so *sockOpt) getMTUInfo(c *socket.Conn) (*net.Interface, int, error) { + return nil, 0, errOpNoSupport +} + +func (so *sockOpt) setGroup(c *socket.Conn, ifi *net.Interface, grp net.IP) error { + return errOpNoSupport +} + +func (so *sockOpt) setSourceGroup(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error { + return errOpNoSupport +} + +func (so *sockOpt) setBPF(c *socket.Conn, f []bpf.RawInstruction) error { + return errOpNoSupport +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sys_asmreq.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sys_asmreq.go new file mode 100644 index 000000000..b0510c0b5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sys_asmreq.go @@ -0,0 +1,24 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows + +package ipv6 + +import ( + "net" + "unsafe" + + "golang.org/x/net/internal/socket" +) + +func (so *sockOpt) setIPMreq(c *socket.Conn, ifi *net.Interface, grp net.IP) error { + var mreq ipv6Mreq + copy(mreq.Multiaddr[:], grp) + if ifi != nil { + mreq.setIfindex(ifi.Index) + } + b := (*[sizeofIPv6Mreq]byte)(unsafe.Pointer(&mreq))[:sizeofIPv6Mreq] + return so.Set(c, b) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sys_asmreq_stub.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sys_asmreq_stub.go new file mode 100644 index 000000000..eece96187 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sys_asmreq_stub.go @@ -0,0 +1,17 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows + +package ipv6 + +import ( + "net" + + "golang.org/x/net/internal/socket" +) + +func (so *sockOpt) setIPMreq(c *socket.Conn, ifi *net.Interface, grp net.IP) error { + return errOpNoSupport +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sys_bpf.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sys_bpf.go new file mode 100644 index 000000000..b2dbcb2f2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sys_bpf.go @@ -0,0 +1,23 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build linux + +package ipv6 + +import ( + "unsafe" + + "golang.org/x/net/bpf" + "golang.org/x/net/internal/socket" +) + +func (so *sockOpt) setAttachFilter(c *socket.Conn, f []bpf.RawInstruction) error { + prog := sockFProg{ + Len: uint16(len(f)), + Filter: (*sockFilter)(unsafe.Pointer(&f[0])), + } + b := (*[sizeofSockFprog]byte)(unsafe.Pointer(&prog))[:sizeofSockFprog] + return so.Set(c, b) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sys_bpf_stub.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sys_bpf_stub.go new file mode 100644 index 000000000..676bea555 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sys_bpf_stub.go @@ -0,0 +1,16 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !linux + +package ipv6 + +import ( + "golang.org/x/net/bpf" + "golang.org/x/net/internal/socket" +) + +func (so *sockOpt) setAttachFilter(c *socket.Conn, f []bpf.RawInstruction) error { + return errOpNoSupport +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sys_bsd.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sys_bsd.go new file mode 100644 index 000000000..e416eaa1f --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sys_bsd.go @@ -0,0 +1,57 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build dragonfly netbsd openbsd + +package ipv6 + +import ( + "net" + "syscall" + + "golang.org/x/net/internal/iana" + "golang.org/x/net/internal/socket" +) + +var ( + ctlOpts = [ctlMax]ctlOpt{ + ctlTrafficClass: {sysIPV6_TCLASS, 4, marshalTrafficClass, parseTrafficClass}, + ctlHopLimit: {sysIPV6_HOPLIMIT, 4, marshalHopLimit, parseHopLimit}, + ctlPacketInfo: {sysIPV6_PKTINFO, sizeofInet6Pktinfo, marshalPacketInfo, parsePacketInfo}, + ctlNextHop: {sysIPV6_NEXTHOP, sizeofSockaddrInet6, marshalNextHop, parseNextHop}, + ctlPathMTU: {sysIPV6_PATHMTU, sizeofIPv6Mtuinfo, marshalPathMTU, parsePathMTU}, + } + + sockOpts = map[int]*sockOpt{ + ssoTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_TCLASS, Len: 4}}, + ssoHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_UNICAST_HOPS, Len: 4}}, + ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_IF, Len: 4}}, + ssoMulticastHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_HOPS, Len: 4}}, + ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_LOOP, Len: 4}}, + ssoReceiveTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVTCLASS, Len: 4}}, + ssoReceiveHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVHOPLIMIT, Len: 4}}, + ssoReceivePacketInfo: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVPKTINFO, Len: 4}}, + ssoReceivePathMTU: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVPATHMTU, Len: 4}}, + ssoPathMTU: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_PATHMTU, Len: sizeofIPv6Mtuinfo}}, + ssoChecksum: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_CHECKSUM, Len: 4}}, + ssoICMPFilter: {Option: socket.Option{Level: iana.ProtocolIPv6ICMP, Name: sysICMP6_FILTER, Len: sizeofICMPv6Filter}}, + ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_JOIN_GROUP, Len: sizeofIPv6Mreq}, typ: ssoTypeIPMreq}, + ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_LEAVE_GROUP, Len: sizeofIPv6Mreq}, typ: ssoTypeIPMreq}, + } +) + +func (sa *sockaddrInet6) setSockaddr(ip net.IP, i int) { + sa.Len = sizeofSockaddrInet6 + sa.Family = syscall.AF_INET6 + copy(sa.Addr[:], ip) + sa.Scope_id = uint32(i) +} + +func (pi *inet6Pktinfo) setIfindex(i int) { + pi.Ifindex = uint32(i) +} + +func (mreq *ipv6Mreq) setIfindex(i int) { + mreq.Interface = uint32(i) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sys_darwin.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sys_darwin.go new file mode 100644 index 000000000..e3d044392 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sys_darwin.go @@ -0,0 +1,106 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv6 + +import ( + "net" + "strconv" + "strings" + "syscall" + "unsafe" + + "golang.org/x/net/internal/iana" + "golang.org/x/net/internal/socket" +) + +var ( + ctlOpts = [ctlMax]ctlOpt{ + ctlHopLimit: {sysIPV6_2292HOPLIMIT, 4, marshal2292HopLimit, parseHopLimit}, + ctlPacketInfo: {sysIPV6_2292PKTINFO, sizeofInet6Pktinfo, marshal2292PacketInfo, parsePacketInfo}, + } + + sockOpts = map[int]*sockOpt{ + ssoHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_UNICAST_HOPS, Len: 4}}, + ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_IF, Len: 4}}, + ssoMulticastHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_HOPS, Len: 4}}, + ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_LOOP, Len: 4}}, + ssoReceiveHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_2292HOPLIMIT, Len: 4}}, + ssoReceivePacketInfo: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_2292PKTINFO, Len: 4}}, + ssoChecksum: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_CHECKSUM, Len: 4}}, + ssoICMPFilter: {Option: socket.Option{Level: iana.ProtocolIPv6ICMP, Name: sysICMP6_FILTER, Len: sizeofICMPv6Filter}}, + ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_JOIN_GROUP, Len: sizeofIPv6Mreq}, typ: ssoTypeIPMreq}, + ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_LEAVE_GROUP, Len: sizeofIPv6Mreq}, typ: ssoTypeIPMreq}, + } +) + +func init() { + // Seems like kern.osreldate is veiled on latest OS X. We use + // kern.osrelease instead. + s, err := syscall.Sysctl("kern.osrelease") + if err != nil { + return + } + ss := strings.Split(s, ".") + if len(ss) == 0 { + return + } + // The IP_PKTINFO and protocol-independent multicast API were + // introduced in OS X 10.7 (Darwin 11). But it looks like + // those features require OS X 10.8 (Darwin 12) or above. + // See http://support.apple.com/kb/HT1633. + if mjver, err := strconv.Atoi(ss[0]); err != nil || mjver < 12 { + return + } + ctlOpts[ctlTrafficClass] = ctlOpt{sysIPV6_TCLASS, 4, marshalTrafficClass, parseTrafficClass} + ctlOpts[ctlHopLimit] = ctlOpt{sysIPV6_HOPLIMIT, 4, marshalHopLimit, parseHopLimit} + ctlOpts[ctlPacketInfo] = ctlOpt{sysIPV6_PKTINFO, sizeofInet6Pktinfo, marshalPacketInfo, parsePacketInfo} + ctlOpts[ctlNextHop] = ctlOpt{sysIPV6_NEXTHOP, sizeofSockaddrInet6, marshalNextHop, parseNextHop} + ctlOpts[ctlPathMTU] = ctlOpt{sysIPV6_PATHMTU, sizeofIPv6Mtuinfo, marshalPathMTU, parsePathMTU} + sockOpts[ssoTrafficClass] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_TCLASS, Len: 4}} + sockOpts[ssoReceiveTrafficClass] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVTCLASS, Len: 4}} + sockOpts[ssoReceiveHopLimit] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVHOPLIMIT, Len: 4}} + sockOpts[ssoReceivePacketInfo] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVPKTINFO, Len: 4}} + sockOpts[ssoReceivePathMTU] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVPATHMTU, Len: 4}} + sockOpts[ssoPathMTU] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_PATHMTU, Len: sizeofIPv6Mtuinfo}} + sockOpts[ssoJoinGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_JOIN_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq} + sockOpts[ssoLeaveGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_LEAVE_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq} + sockOpts[ssoJoinSourceGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_JOIN_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq} + sockOpts[ssoLeaveSourceGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_LEAVE_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq} + sockOpts[ssoBlockSourceGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_BLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq} + sockOpts[ssoUnblockSourceGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_UNBLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq} +} + +func (sa *sockaddrInet6) setSockaddr(ip net.IP, i int) { + sa.Len = sizeofSockaddrInet6 + sa.Family = syscall.AF_INET6 + copy(sa.Addr[:], ip) + sa.Scope_id = uint32(i) +} + +func (pi *inet6Pktinfo) setIfindex(i int) { + pi.Ifindex = uint32(i) +} + +func (mreq *ipv6Mreq) setIfindex(i int) { + mreq.Interface = uint32(i) +} + +func (gr *groupReq) setGroup(grp net.IP) { + sa := (*sockaddrInet6)(unsafe.Pointer(uintptr(unsafe.Pointer(gr)) + 4)) + sa.Len = sizeofSockaddrInet6 + sa.Family = syscall.AF_INET6 + copy(sa.Addr[:], grp) +} + +func (gsr *groupSourceReq) setSourceGroup(grp, src net.IP) { + sa := (*sockaddrInet6)(unsafe.Pointer(uintptr(unsafe.Pointer(gsr)) + 4)) + sa.Len = sizeofSockaddrInet6 + sa.Family = syscall.AF_INET6 + copy(sa.Addr[:], grp) + sa = (*sockaddrInet6)(unsafe.Pointer(uintptr(unsafe.Pointer(gsr)) + 132)) + sa.Len = sizeofSockaddrInet6 + sa.Family = syscall.AF_INET6 + copy(sa.Addr[:], src) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sys_freebsd.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sys_freebsd.go new file mode 100644 index 000000000..e9349dc2c --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sys_freebsd.go @@ -0,0 +1,92 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv6 + +import ( + "net" + "runtime" + "strings" + "syscall" + "unsafe" + + "golang.org/x/net/internal/iana" + "golang.org/x/net/internal/socket" +) + +var ( + ctlOpts = [ctlMax]ctlOpt{ + ctlTrafficClass: {sysIPV6_TCLASS, 4, marshalTrafficClass, parseTrafficClass}, + ctlHopLimit: {sysIPV6_HOPLIMIT, 4, marshalHopLimit, parseHopLimit}, + ctlPacketInfo: {sysIPV6_PKTINFO, sizeofInet6Pktinfo, marshalPacketInfo, parsePacketInfo}, + ctlNextHop: {sysIPV6_NEXTHOP, sizeofSockaddrInet6, marshalNextHop, parseNextHop}, + ctlPathMTU: {sysIPV6_PATHMTU, sizeofIPv6Mtuinfo, marshalPathMTU, parsePathMTU}, + } + + sockOpts = map[int]sockOpt{ + ssoTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_TCLASS, Len: 4}}, + ssoHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_UNICAST_HOPS, Len: 4}}, + ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_IF, Len: 4}}, + ssoMulticastHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_HOPS, Len: 4}}, + ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_LOOP, Len: 4}}, + ssoReceiveTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVTCLASS, Len: 4}}, + ssoReceiveHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVHOPLIMIT, Len: 4}}, + ssoReceivePacketInfo: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVPKTINFO, Len: 4}}, + ssoReceivePathMTU: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVPATHMTU, Len: 4}}, + ssoPathMTU: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_PATHMTU, Len: sizeofIPv6Mtuinfo}}, + ssoChecksum: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_CHECKSUM, Len: 4}}, + ssoICMPFilter: {Option: socket.Option{Level: iana.ProtocolIPv6ICMP, Name: sysICMP6_FILTER, Len: sizeofICMPv6Filter}}, + ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_JOIN_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq}, + ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_LEAVE_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq}, + ssoJoinSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_JOIN_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, + ssoLeaveSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_LEAVE_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, + ssoBlockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_BLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, + ssoUnblockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_UNBLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, + } +) + +func init() { + if runtime.GOOS == "freebsd" && runtime.GOARCH == "386" { + archs, _ := syscall.Sysctl("kern.supported_archs") + for _, s := range strings.Fields(archs) { + if s == "amd64" { + freebsd32o64 = true + break + } + } + } +} + +func (sa *sockaddrInet6) setSockaddr(ip net.IP, i int) { + sa.Len = sizeofSockaddrInet6 + sa.Family = syscall.AF_INET6 + copy(sa.Addr[:], ip) + sa.Scope_id = uint32(i) +} + +func (pi *inet6Pktinfo) setIfindex(i int) { + pi.Ifindex = uint32(i) +} + +func (mreq *ipv6Mreq) setIfindex(i int) { + mreq.Interface = uint32(i) +} + +func (gr *groupReq) setGroup(grp net.IP) { + sa := (*sockaddrInet6)(unsafe.Pointer(&gr.Group)) + sa.Len = sizeofSockaddrInet6 + sa.Family = syscall.AF_INET6 + copy(sa.Addr[:], grp) +} + +func (gsr *groupSourceReq) setSourceGroup(grp, src net.IP) { + sa := (*sockaddrInet6)(unsafe.Pointer(&gsr.Group)) + sa.Len = sizeofSockaddrInet6 + sa.Family = syscall.AF_INET6 + copy(sa.Addr[:], grp) + sa = (*sockaddrInet6)(unsafe.Pointer(&gsr.Source)) + sa.Len = sizeofSockaddrInet6 + sa.Family = syscall.AF_INET6 + copy(sa.Addr[:], src) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sys_linux.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sys_linux.go new file mode 100644 index 000000000..bc218103c --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sys_linux.go @@ -0,0 +1,74 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv6 + +import ( + "net" + "syscall" + "unsafe" + + "golang.org/x/net/internal/iana" + "golang.org/x/net/internal/socket" +) + +var ( + ctlOpts = [ctlMax]ctlOpt{ + ctlTrafficClass: {sysIPV6_TCLASS, 4, marshalTrafficClass, parseTrafficClass}, + ctlHopLimit: {sysIPV6_HOPLIMIT, 4, marshalHopLimit, parseHopLimit}, + ctlPacketInfo: {sysIPV6_PKTINFO, sizeofInet6Pktinfo, marshalPacketInfo, parsePacketInfo}, + ctlPathMTU: {sysIPV6_PATHMTU, sizeofIPv6Mtuinfo, marshalPathMTU, parsePathMTU}, + } + + sockOpts = map[int]*sockOpt{ + ssoTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_TCLASS, Len: 4}}, + ssoHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_UNICAST_HOPS, Len: 4}}, + ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_IF, Len: 4}}, + ssoMulticastHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_HOPS, Len: 4}}, + ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_LOOP, Len: 4}}, + ssoReceiveTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVTCLASS, Len: 4}}, + ssoReceiveHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVHOPLIMIT, Len: 4}}, + ssoReceivePacketInfo: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVPKTINFO, Len: 4}}, + ssoReceivePathMTU: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVPATHMTU, Len: 4}}, + ssoPathMTU: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_PATHMTU, Len: sizeofIPv6Mtuinfo}}, + ssoChecksum: {Option: socket.Option{Level: iana.ProtocolReserved, Name: sysIPV6_CHECKSUM, Len: 4}}, + ssoICMPFilter: {Option: socket.Option{Level: iana.ProtocolIPv6ICMP, Name: sysICMPV6_FILTER, Len: sizeofICMPv6Filter}}, + ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_JOIN_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq}, + ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_LEAVE_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq}, + ssoJoinSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_JOIN_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, + ssoLeaveSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_LEAVE_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, + ssoBlockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_BLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, + ssoUnblockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_UNBLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, + ssoAttachFilter: {Option: socket.Option{Level: sysSOL_SOCKET, Name: sysSO_ATTACH_FILTER, Len: sizeofSockFprog}}, + } +) + +func (sa *sockaddrInet6) setSockaddr(ip net.IP, i int) { + sa.Family = syscall.AF_INET6 + copy(sa.Addr[:], ip) + sa.Scope_id = uint32(i) +} + +func (pi *inet6Pktinfo) setIfindex(i int) { + pi.Ifindex = int32(i) +} + +func (mreq *ipv6Mreq) setIfindex(i int) { + mreq.Ifindex = int32(i) +} + +func (gr *groupReq) setGroup(grp net.IP) { + sa := (*sockaddrInet6)(unsafe.Pointer(&gr.Group)) + sa.Family = syscall.AF_INET6 + copy(sa.Addr[:], grp) +} + +func (gsr *groupSourceReq) setSourceGroup(grp, src net.IP) { + sa := (*sockaddrInet6)(unsafe.Pointer(&gsr.Group)) + sa.Family = syscall.AF_INET6 + copy(sa.Addr[:], grp) + sa = (*sockaddrInet6)(unsafe.Pointer(&gsr.Source)) + sa.Family = syscall.AF_INET6 + copy(sa.Addr[:], src) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sys_solaris.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sys_solaris.go new file mode 100644 index 000000000..d348b5f6e --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sys_solaris.go @@ -0,0 +1,74 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv6 + +import ( + "net" + "syscall" + "unsafe" + + "golang.org/x/net/internal/iana" + "golang.org/x/net/internal/socket" +) + +var ( + ctlOpts = [ctlMax]ctlOpt{ + ctlTrafficClass: {sysIPV6_TCLASS, 4, marshalTrafficClass, parseTrafficClass}, + ctlHopLimit: {sysIPV6_HOPLIMIT, 4, marshalHopLimit, parseHopLimit}, + ctlPacketInfo: {sysIPV6_PKTINFO, sizeofInet6Pktinfo, marshalPacketInfo, parsePacketInfo}, + ctlNextHop: {sysIPV6_NEXTHOP, sizeofSockaddrInet6, marshalNextHop, parseNextHop}, + ctlPathMTU: {sysIPV6_PATHMTU, sizeofIPv6Mtuinfo, marshalPathMTU, parsePathMTU}, + } + + sockOpts = map[int]*sockOpt{ + ssoTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_TCLASS, Len: 4}}, + ssoHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_UNICAST_HOPS, Len: 4}}, + ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_IF, Len: 4}}, + ssoMulticastHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_HOPS, Len: 4}}, + ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_LOOP, Len: 4}}, + ssoReceiveTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVTCLASS, Len: 4}}, + ssoReceiveHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVHOPLIMIT, Len: 4}}, + ssoReceivePacketInfo: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVPKTINFO, Len: 4}}, + ssoReceivePathMTU: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVPATHMTU, Len: 4}}, + ssoPathMTU: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_PATHMTU, Len: sizeofIPv6Mtuinfo}}, + ssoChecksum: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_CHECKSUM, Len: 4}}, + ssoICMPFilter: {Option: socket.Option{Level: iana.ProtocolIPv6ICMP, Name: sysICMP6_FILTER, Len: sizeofICMPv6Filter}}, + ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_JOIN_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq}, + ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_LEAVE_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq}, + ssoJoinSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_JOIN_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, + ssoLeaveSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_LEAVE_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, + ssoBlockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_BLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, + ssoUnblockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_UNBLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, + } +) + +func (sa *sockaddrInet6) setSockaddr(ip net.IP, i int) { + sa.Family = syscall.AF_INET6 + copy(sa.Addr[:], ip) + sa.Scope_id = uint32(i) +} + +func (pi *inet6Pktinfo) setIfindex(i int) { + pi.Ifindex = uint32(i) +} + +func (mreq *ipv6Mreq) setIfindex(i int) { + mreq.Interface = uint32(i) +} + +func (gr *groupReq) setGroup(grp net.IP) { + sa := (*sockaddrInet6)(unsafe.Pointer(uintptr(unsafe.Pointer(gr)) + 4)) + sa.Family = syscall.AF_INET6 + copy(sa.Addr[:], grp) +} + +func (gsr *groupSourceReq) setSourceGroup(grp, src net.IP) { + sa := (*sockaddrInet6)(unsafe.Pointer(uintptr(unsafe.Pointer(gsr)) + 4)) + sa.Family = syscall.AF_INET6 + copy(sa.Addr[:], grp) + sa = (*sockaddrInet6)(unsafe.Pointer(uintptr(unsafe.Pointer(gsr)) + 260)) + sa.Family = syscall.AF_INET6 + copy(sa.Addr[:], src) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sys_ssmreq.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sys_ssmreq.go new file mode 100644 index 000000000..add8ccc0b --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sys_ssmreq.go @@ -0,0 +1,54 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin freebsd linux solaris + +package ipv6 + +import ( + "net" + "unsafe" + + "golang.org/x/net/internal/socket" +) + +var freebsd32o64 bool + +func (so *sockOpt) setGroupReq(c *socket.Conn, ifi *net.Interface, grp net.IP) error { + var gr groupReq + if ifi != nil { + gr.Interface = uint32(ifi.Index) + } + gr.setGroup(grp) + var b []byte + if freebsd32o64 { + var d [sizeofGroupReq + 4]byte + s := (*[sizeofGroupReq]byte)(unsafe.Pointer(&gr)) + copy(d[:4], s[:4]) + copy(d[8:], s[4:]) + b = d[:] + } else { + b = (*[sizeofGroupReq]byte)(unsafe.Pointer(&gr))[:sizeofGroupReq] + } + return so.Set(c, b) +} + +func (so *sockOpt) setGroupSourceReq(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error { + var gsr groupSourceReq + if ifi != nil { + gsr.Interface = uint32(ifi.Index) + } + gsr.setSourceGroup(grp, src) + var b []byte + if freebsd32o64 { + var d [sizeofGroupSourceReq + 4]byte + s := (*[sizeofGroupSourceReq]byte)(unsafe.Pointer(&gsr)) + copy(d[:4], s[:4]) + copy(d[8:], s[4:]) + b = d[:] + } else { + b = (*[sizeofGroupSourceReq]byte)(unsafe.Pointer(&gsr))[:sizeofGroupSourceReq] + } + return so.Set(c, b) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sys_ssmreq_stub.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sys_ssmreq_stub.go new file mode 100644 index 000000000..581ee490f --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sys_ssmreq_stub.go @@ -0,0 +1,21 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !darwin,!freebsd,!linux,!solaris + +package ipv6 + +import ( + "net" + + "golang.org/x/net/internal/socket" +) + +func (so *sockOpt) setGroupReq(c *socket.Conn, ifi *net.Interface, grp net.IP) error { + return errOpNoSupport +} + +func (so *sockOpt) setGroupSourceReq(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error { + return errOpNoSupport +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sys_stub.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sys_stub.go new file mode 100644 index 000000000..b845388ea --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sys_stub.go @@ -0,0 +1,13 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows + +package ipv6 + +var ( + ctlOpts = [ctlMax]ctlOpt{} + + sockOpts = map[int]*sockOpt{} +) diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sys_windows.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sys_windows.go new file mode 100644 index 000000000..fc36b018b --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/sys_windows.go @@ -0,0 +1,75 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ipv6 + +import ( + "net" + "syscall" + + "golang.org/x/net/internal/iana" + "golang.org/x/net/internal/socket" +) + +const ( + // See ws2tcpip.h. + sysIPV6_UNICAST_HOPS = 0x4 + sysIPV6_MULTICAST_IF = 0x9 + sysIPV6_MULTICAST_HOPS = 0xa + sysIPV6_MULTICAST_LOOP = 0xb + sysIPV6_JOIN_GROUP = 0xc + sysIPV6_LEAVE_GROUP = 0xd + sysIPV6_PKTINFO = 0x13 + + sizeofSockaddrInet6 = 0x1c + + sizeofIPv6Mreq = 0x14 + sizeofIPv6Mtuinfo = 0x20 + sizeofICMPv6Filter = 0 +) + +type sockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type ipv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type ipv6Mtuinfo struct { + Addr sockaddrInet6 + Mtu uint32 +} + +type icmpv6Filter struct { + // TODO(mikio): implement this +} + +var ( + ctlOpts = [ctlMax]ctlOpt{} + + sockOpts = map[int]*sockOpt{ + ssoHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_UNICAST_HOPS, Len: 4}}, + ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_IF, Len: 4}}, + ssoMulticastHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_HOPS, Len: 4}}, + ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_LOOP, Len: 4}}, + ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_JOIN_GROUP, Len: sizeofIPv6Mreq}, typ: ssoTypeIPMreq}, + ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_LEAVE_GROUP, Len: sizeofIPv6Mreq}, typ: ssoTypeIPMreq}, + } +) + +func (sa *sockaddrInet6) setSockaddr(ip net.IP, i int) { + sa.Family = syscall.AF_INET6 + copy(sa.Addr[:], ip) + sa.Scope_id = uint32(i) +} + +func (mreq *ipv6Mreq) setIfindex(i int) { + mreq.Interface = uint32(i) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_darwin.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_darwin.go new file mode 100644 index 000000000..6aab1dfab --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_darwin.go @@ -0,0 +1,131 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_darwin.go + +package ipv6 + +const ( + sysIPV6_UNICAST_HOPS = 0x4 + sysIPV6_MULTICAST_IF = 0x9 + sysIPV6_MULTICAST_HOPS = 0xa + sysIPV6_MULTICAST_LOOP = 0xb + sysIPV6_JOIN_GROUP = 0xc + sysIPV6_LEAVE_GROUP = 0xd + + sysIPV6_PORTRANGE = 0xe + sysICMP6_FILTER = 0x12 + sysIPV6_2292PKTINFO = 0x13 + sysIPV6_2292HOPLIMIT = 0x14 + sysIPV6_2292NEXTHOP = 0x15 + sysIPV6_2292HOPOPTS = 0x16 + sysIPV6_2292DSTOPTS = 0x17 + sysIPV6_2292RTHDR = 0x18 + + sysIPV6_2292PKTOPTIONS = 0x19 + + sysIPV6_CHECKSUM = 0x1a + sysIPV6_V6ONLY = 0x1b + + sysIPV6_IPSEC_POLICY = 0x1c + + sysIPV6_RECVTCLASS = 0x23 + sysIPV6_TCLASS = 0x24 + + sysIPV6_RTHDRDSTOPTS = 0x39 + + sysIPV6_RECVPKTINFO = 0x3d + + sysIPV6_RECVHOPLIMIT = 0x25 + sysIPV6_RECVRTHDR = 0x26 + sysIPV6_RECVHOPOPTS = 0x27 + sysIPV6_RECVDSTOPTS = 0x28 + + sysIPV6_USE_MIN_MTU = 0x2a + sysIPV6_RECVPATHMTU = 0x2b + + sysIPV6_PATHMTU = 0x2c + + sysIPV6_PKTINFO = 0x2e + sysIPV6_HOPLIMIT = 0x2f + sysIPV6_NEXTHOP = 0x30 + sysIPV6_HOPOPTS = 0x31 + sysIPV6_DSTOPTS = 0x32 + sysIPV6_RTHDR = 0x33 + + sysIPV6_AUTOFLOWLABEL = 0x3b + + sysIPV6_DONTFRAG = 0x3e + + sysIPV6_PREFER_TEMPADDR = 0x3f + + sysIPV6_MSFILTER = 0x4a + sysMCAST_JOIN_GROUP = 0x50 + sysMCAST_LEAVE_GROUP = 0x51 + sysMCAST_JOIN_SOURCE_GROUP = 0x52 + sysMCAST_LEAVE_SOURCE_GROUP = 0x53 + sysMCAST_BLOCK_SOURCE = 0x54 + sysMCAST_UNBLOCK_SOURCE = 0x55 + + sysIPV6_BOUND_IF = 0x7d + + sysIPV6_PORTRANGE_DEFAULT = 0x0 + sysIPV6_PORTRANGE_HIGH = 0x1 + sysIPV6_PORTRANGE_LOW = 0x2 + + sizeofSockaddrStorage = 0x80 + sizeofSockaddrInet6 = 0x1c + sizeofInet6Pktinfo = 0x14 + sizeofIPv6Mtuinfo = 0x20 + + sizeofIPv6Mreq = 0x14 + sizeofGroupReq = 0x84 + sizeofGroupSourceReq = 0x104 + + sizeofICMPv6Filter = 0x20 +) + +type sockaddrStorage struct { + Len uint8 + Family uint8 + X__ss_pad1 [6]int8 + X__ss_align int64 + X__ss_pad2 [112]int8 +} + +type sockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type ipv6Mtuinfo struct { + Addr sockaddrInet6 + Mtu uint32 +} + +type ipv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type icmpv6Filter struct { + Filt [8]uint32 +} + +type groupReq struct { + Interface uint32 + Pad_cgo_0 [128]byte +} + +type groupSourceReq struct { + Interface uint32 + Pad_cgo_0 [128]byte + Pad_cgo_1 [128]byte +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_dragonfly.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_dragonfly.go new file mode 100644 index 000000000..d2de804d8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_dragonfly.go @@ -0,0 +1,88 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_dragonfly.go + +package ipv6 + +const ( + sysIPV6_UNICAST_HOPS = 0x4 + sysIPV6_MULTICAST_IF = 0x9 + sysIPV6_MULTICAST_HOPS = 0xa + sysIPV6_MULTICAST_LOOP = 0xb + sysIPV6_JOIN_GROUP = 0xc + sysIPV6_LEAVE_GROUP = 0xd + sysIPV6_PORTRANGE = 0xe + sysICMP6_FILTER = 0x12 + + sysIPV6_CHECKSUM = 0x1a + sysIPV6_V6ONLY = 0x1b + + sysIPV6_IPSEC_POLICY = 0x1c + + sysIPV6_RTHDRDSTOPTS = 0x23 + sysIPV6_RECVPKTINFO = 0x24 + sysIPV6_RECVHOPLIMIT = 0x25 + sysIPV6_RECVRTHDR = 0x26 + sysIPV6_RECVHOPOPTS = 0x27 + sysIPV6_RECVDSTOPTS = 0x28 + + sysIPV6_USE_MIN_MTU = 0x2a + sysIPV6_RECVPATHMTU = 0x2b + + sysIPV6_PATHMTU = 0x2c + + sysIPV6_PKTINFO = 0x2e + sysIPV6_HOPLIMIT = 0x2f + sysIPV6_NEXTHOP = 0x30 + sysIPV6_HOPOPTS = 0x31 + sysIPV6_DSTOPTS = 0x32 + sysIPV6_RTHDR = 0x33 + + sysIPV6_RECVTCLASS = 0x39 + + sysIPV6_AUTOFLOWLABEL = 0x3b + + sysIPV6_TCLASS = 0x3d + sysIPV6_DONTFRAG = 0x3e + + sysIPV6_PREFER_TEMPADDR = 0x3f + + sysIPV6_PORTRANGE_DEFAULT = 0x0 + sysIPV6_PORTRANGE_HIGH = 0x1 + sysIPV6_PORTRANGE_LOW = 0x2 + + sizeofSockaddrInet6 = 0x1c + sizeofInet6Pktinfo = 0x14 + sizeofIPv6Mtuinfo = 0x20 + + sizeofIPv6Mreq = 0x14 + + sizeofICMPv6Filter = 0x20 +) + +type sockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type ipv6Mtuinfo struct { + Addr sockaddrInet6 + Mtu uint32 +} + +type ipv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type icmpv6Filter struct { + Filt [8]uint32 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_freebsd_386.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_freebsd_386.go new file mode 100644 index 000000000..919e572d4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_freebsd_386.go @@ -0,0 +1,122 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_freebsd.go + +package ipv6 + +const ( + sysIPV6_UNICAST_HOPS = 0x4 + sysIPV6_MULTICAST_IF = 0x9 + sysIPV6_MULTICAST_HOPS = 0xa + sysIPV6_MULTICAST_LOOP = 0xb + sysIPV6_JOIN_GROUP = 0xc + sysIPV6_LEAVE_GROUP = 0xd + sysIPV6_PORTRANGE = 0xe + sysICMP6_FILTER = 0x12 + + sysIPV6_CHECKSUM = 0x1a + sysIPV6_V6ONLY = 0x1b + + sysIPV6_IPSEC_POLICY = 0x1c + + sysIPV6_RTHDRDSTOPTS = 0x23 + + sysIPV6_RECVPKTINFO = 0x24 + sysIPV6_RECVHOPLIMIT = 0x25 + sysIPV6_RECVRTHDR = 0x26 + sysIPV6_RECVHOPOPTS = 0x27 + sysIPV6_RECVDSTOPTS = 0x28 + + sysIPV6_USE_MIN_MTU = 0x2a + sysIPV6_RECVPATHMTU = 0x2b + + sysIPV6_PATHMTU = 0x2c + + sysIPV6_PKTINFO = 0x2e + sysIPV6_HOPLIMIT = 0x2f + sysIPV6_NEXTHOP = 0x30 + sysIPV6_HOPOPTS = 0x31 + sysIPV6_DSTOPTS = 0x32 + sysIPV6_RTHDR = 0x33 + + sysIPV6_RECVTCLASS = 0x39 + + sysIPV6_AUTOFLOWLABEL = 0x3b + + sysIPV6_TCLASS = 0x3d + sysIPV6_DONTFRAG = 0x3e + + sysIPV6_PREFER_TEMPADDR = 0x3f + + sysIPV6_BINDANY = 0x40 + + sysIPV6_MSFILTER = 0x4a + + sysMCAST_JOIN_GROUP = 0x50 + sysMCAST_LEAVE_GROUP = 0x51 + sysMCAST_JOIN_SOURCE_GROUP = 0x52 + sysMCAST_LEAVE_SOURCE_GROUP = 0x53 + sysMCAST_BLOCK_SOURCE = 0x54 + sysMCAST_UNBLOCK_SOURCE = 0x55 + + sysIPV6_PORTRANGE_DEFAULT = 0x0 + sysIPV6_PORTRANGE_HIGH = 0x1 + sysIPV6_PORTRANGE_LOW = 0x2 + + sizeofSockaddrStorage = 0x80 + sizeofSockaddrInet6 = 0x1c + sizeofInet6Pktinfo = 0x14 + sizeofIPv6Mtuinfo = 0x20 + + sizeofIPv6Mreq = 0x14 + sizeofGroupReq = 0x84 + sizeofGroupSourceReq = 0x104 + + sizeofICMPv6Filter = 0x20 +) + +type sockaddrStorage struct { + Len uint8 + Family uint8 + X__ss_pad1 [6]int8 + X__ss_align int64 + X__ss_pad2 [112]int8 +} + +type sockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type ipv6Mtuinfo struct { + Addr sockaddrInet6 + Mtu uint32 +} + +type ipv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type groupReq struct { + Interface uint32 + Group sockaddrStorage +} + +type groupSourceReq struct { + Interface uint32 + Group sockaddrStorage + Source sockaddrStorage +} + +type icmpv6Filter struct { + Filt [8]uint32 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_freebsd_amd64.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_freebsd_amd64.go new file mode 100644 index 000000000..cb8141f9c --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_freebsd_amd64.go @@ -0,0 +1,124 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_freebsd.go + +package ipv6 + +const ( + sysIPV6_UNICAST_HOPS = 0x4 + sysIPV6_MULTICAST_IF = 0x9 + sysIPV6_MULTICAST_HOPS = 0xa + sysIPV6_MULTICAST_LOOP = 0xb + sysIPV6_JOIN_GROUP = 0xc + sysIPV6_LEAVE_GROUP = 0xd + sysIPV6_PORTRANGE = 0xe + sysICMP6_FILTER = 0x12 + + sysIPV6_CHECKSUM = 0x1a + sysIPV6_V6ONLY = 0x1b + + sysIPV6_IPSEC_POLICY = 0x1c + + sysIPV6_RTHDRDSTOPTS = 0x23 + + sysIPV6_RECVPKTINFO = 0x24 + sysIPV6_RECVHOPLIMIT = 0x25 + sysIPV6_RECVRTHDR = 0x26 + sysIPV6_RECVHOPOPTS = 0x27 + sysIPV6_RECVDSTOPTS = 0x28 + + sysIPV6_USE_MIN_MTU = 0x2a + sysIPV6_RECVPATHMTU = 0x2b + + sysIPV6_PATHMTU = 0x2c + + sysIPV6_PKTINFO = 0x2e + sysIPV6_HOPLIMIT = 0x2f + sysIPV6_NEXTHOP = 0x30 + sysIPV6_HOPOPTS = 0x31 + sysIPV6_DSTOPTS = 0x32 + sysIPV6_RTHDR = 0x33 + + sysIPV6_RECVTCLASS = 0x39 + + sysIPV6_AUTOFLOWLABEL = 0x3b + + sysIPV6_TCLASS = 0x3d + sysIPV6_DONTFRAG = 0x3e + + sysIPV6_PREFER_TEMPADDR = 0x3f + + sysIPV6_BINDANY = 0x40 + + sysIPV6_MSFILTER = 0x4a + + sysMCAST_JOIN_GROUP = 0x50 + sysMCAST_LEAVE_GROUP = 0x51 + sysMCAST_JOIN_SOURCE_GROUP = 0x52 + sysMCAST_LEAVE_SOURCE_GROUP = 0x53 + sysMCAST_BLOCK_SOURCE = 0x54 + sysMCAST_UNBLOCK_SOURCE = 0x55 + + sysIPV6_PORTRANGE_DEFAULT = 0x0 + sysIPV6_PORTRANGE_HIGH = 0x1 + sysIPV6_PORTRANGE_LOW = 0x2 + + sizeofSockaddrStorage = 0x80 + sizeofSockaddrInet6 = 0x1c + sizeofInet6Pktinfo = 0x14 + sizeofIPv6Mtuinfo = 0x20 + + sizeofIPv6Mreq = 0x14 + sizeofGroupReq = 0x88 + sizeofGroupSourceReq = 0x108 + + sizeofICMPv6Filter = 0x20 +) + +type sockaddrStorage struct { + Len uint8 + Family uint8 + X__ss_pad1 [6]int8 + X__ss_align int64 + X__ss_pad2 [112]int8 +} + +type sockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type ipv6Mtuinfo struct { + Addr sockaddrInet6 + Mtu uint32 +} + +type ipv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type groupReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group sockaddrStorage +} + +type groupSourceReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group sockaddrStorage + Source sockaddrStorage +} + +type icmpv6Filter struct { + Filt [8]uint32 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_freebsd_arm.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_freebsd_arm.go new file mode 100644 index 000000000..cb8141f9c --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_freebsd_arm.go @@ -0,0 +1,124 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_freebsd.go + +package ipv6 + +const ( + sysIPV6_UNICAST_HOPS = 0x4 + sysIPV6_MULTICAST_IF = 0x9 + sysIPV6_MULTICAST_HOPS = 0xa + sysIPV6_MULTICAST_LOOP = 0xb + sysIPV6_JOIN_GROUP = 0xc + sysIPV6_LEAVE_GROUP = 0xd + sysIPV6_PORTRANGE = 0xe + sysICMP6_FILTER = 0x12 + + sysIPV6_CHECKSUM = 0x1a + sysIPV6_V6ONLY = 0x1b + + sysIPV6_IPSEC_POLICY = 0x1c + + sysIPV6_RTHDRDSTOPTS = 0x23 + + sysIPV6_RECVPKTINFO = 0x24 + sysIPV6_RECVHOPLIMIT = 0x25 + sysIPV6_RECVRTHDR = 0x26 + sysIPV6_RECVHOPOPTS = 0x27 + sysIPV6_RECVDSTOPTS = 0x28 + + sysIPV6_USE_MIN_MTU = 0x2a + sysIPV6_RECVPATHMTU = 0x2b + + sysIPV6_PATHMTU = 0x2c + + sysIPV6_PKTINFO = 0x2e + sysIPV6_HOPLIMIT = 0x2f + sysIPV6_NEXTHOP = 0x30 + sysIPV6_HOPOPTS = 0x31 + sysIPV6_DSTOPTS = 0x32 + sysIPV6_RTHDR = 0x33 + + sysIPV6_RECVTCLASS = 0x39 + + sysIPV6_AUTOFLOWLABEL = 0x3b + + sysIPV6_TCLASS = 0x3d + sysIPV6_DONTFRAG = 0x3e + + sysIPV6_PREFER_TEMPADDR = 0x3f + + sysIPV6_BINDANY = 0x40 + + sysIPV6_MSFILTER = 0x4a + + sysMCAST_JOIN_GROUP = 0x50 + sysMCAST_LEAVE_GROUP = 0x51 + sysMCAST_JOIN_SOURCE_GROUP = 0x52 + sysMCAST_LEAVE_SOURCE_GROUP = 0x53 + sysMCAST_BLOCK_SOURCE = 0x54 + sysMCAST_UNBLOCK_SOURCE = 0x55 + + sysIPV6_PORTRANGE_DEFAULT = 0x0 + sysIPV6_PORTRANGE_HIGH = 0x1 + sysIPV6_PORTRANGE_LOW = 0x2 + + sizeofSockaddrStorage = 0x80 + sizeofSockaddrInet6 = 0x1c + sizeofInet6Pktinfo = 0x14 + sizeofIPv6Mtuinfo = 0x20 + + sizeofIPv6Mreq = 0x14 + sizeofGroupReq = 0x88 + sizeofGroupSourceReq = 0x108 + + sizeofICMPv6Filter = 0x20 +) + +type sockaddrStorage struct { + Len uint8 + Family uint8 + X__ss_pad1 [6]int8 + X__ss_align int64 + X__ss_pad2 [112]int8 +} + +type sockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type ipv6Mtuinfo struct { + Addr sockaddrInet6 + Mtu uint32 +} + +type ipv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type groupReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group sockaddrStorage +} + +type groupSourceReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group sockaddrStorage + Source sockaddrStorage +} + +type icmpv6Filter struct { + Filt [8]uint32 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_linux_386.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_linux_386.go new file mode 100644 index 000000000..73aa8c6df --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_linux_386.go @@ -0,0 +1,170 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_linux.go + +package ipv6 + +const ( + sysIPV6_ADDRFORM = 0x1 + sysIPV6_2292PKTINFO = 0x2 + sysIPV6_2292HOPOPTS = 0x3 + sysIPV6_2292DSTOPTS = 0x4 + sysIPV6_2292RTHDR = 0x5 + sysIPV6_2292PKTOPTIONS = 0x6 + sysIPV6_CHECKSUM = 0x7 + sysIPV6_2292HOPLIMIT = 0x8 + sysIPV6_NEXTHOP = 0x9 + sysIPV6_FLOWINFO = 0xb + + sysIPV6_UNICAST_HOPS = 0x10 + sysIPV6_MULTICAST_IF = 0x11 + sysIPV6_MULTICAST_HOPS = 0x12 + sysIPV6_MULTICAST_LOOP = 0x13 + sysIPV6_ADD_MEMBERSHIP = 0x14 + sysIPV6_DROP_MEMBERSHIP = 0x15 + sysMCAST_JOIN_GROUP = 0x2a + sysMCAST_LEAVE_GROUP = 0x2d + sysMCAST_JOIN_SOURCE_GROUP = 0x2e + sysMCAST_LEAVE_SOURCE_GROUP = 0x2f + sysMCAST_BLOCK_SOURCE = 0x2b + sysMCAST_UNBLOCK_SOURCE = 0x2c + sysMCAST_MSFILTER = 0x30 + sysIPV6_ROUTER_ALERT = 0x16 + sysIPV6_MTU_DISCOVER = 0x17 + sysIPV6_MTU = 0x18 + sysIPV6_RECVERR = 0x19 + sysIPV6_V6ONLY = 0x1a + sysIPV6_JOIN_ANYCAST = 0x1b + sysIPV6_LEAVE_ANYCAST = 0x1c + + sysIPV6_FLOWLABEL_MGR = 0x20 + sysIPV6_FLOWINFO_SEND = 0x21 + + sysIPV6_IPSEC_POLICY = 0x22 + sysIPV6_XFRM_POLICY = 0x23 + + sysIPV6_RECVPKTINFO = 0x31 + sysIPV6_PKTINFO = 0x32 + sysIPV6_RECVHOPLIMIT = 0x33 + sysIPV6_HOPLIMIT = 0x34 + sysIPV6_RECVHOPOPTS = 0x35 + sysIPV6_HOPOPTS = 0x36 + sysIPV6_RTHDRDSTOPTS = 0x37 + sysIPV6_RECVRTHDR = 0x38 + sysIPV6_RTHDR = 0x39 + sysIPV6_RECVDSTOPTS = 0x3a + sysIPV6_DSTOPTS = 0x3b + sysIPV6_RECVPATHMTU = 0x3c + sysIPV6_PATHMTU = 0x3d + sysIPV6_DONTFRAG = 0x3e + + sysIPV6_RECVTCLASS = 0x42 + sysIPV6_TCLASS = 0x43 + + sysIPV6_ADDR_PREFERENCES = 0x48 + + sysIPV6_PREFER_SRC_TMP = 0x1 + sysIPV6_PREFER_SRC_PUBLIC = 0x2 + sysIPV6_PREFER_SRC_PUBTMP_DEFAULT = 0x100 + sysIPV6_PREFER_SRC_COA = 0x4 + sysIPV6_PREFER_SRC_HOME = 0x400 + sysIPV6_PREFER_SRC_CGA = 0x8 + sysIPV6_PREFER_SRC_NONCGA = 0x800 + + sysIPV6_MINHOPCOUNT = 0x49 + + sysIPV6_ORIGDSTADDR = 0x4a + sysIPV6_RECVORIGDSTADDR = 0x4a + sysIPV6_TRANSPARENT = 0x4b + sysIPV6_UNICAST_IF = 0x4c + + sysICMPV6_FILTER = 0x1 + + sysICMPV6_FILTER_BLOCK = 0x1 + sysICMPV6_FILTER_PASS = 0x2 + sysICMPV6_FILTER_BLOCKOTHERS = 0x3 + sysICMPV6_FILTER_PASSONLY = 0x4 + + sysSOL_SOCKET = 0x1 + sysSO_ATTACH_FILTER = 0x1a + + sizeofKernelSockaddrStorage = 0x80 + sizeofSockaddrInet6 = 0x1c + sizeofInet6Pktinfo = 0x14 + sizeofIPv6Mtuinfo = 0x20 + sizeofIPv6FlowlabelReq = 0x20 + + sizeofIPv6Mreq = 0x14 + sizeofGroupReq = 0x84 + sizeofGroupSourceReq = 0x104 + + sizeofICMPv6Filter = 0x20 + + sizeofSockFprog = 0x8 +) + +type kernelSockaddrStorage struct { + Family uint16 + X__data [126]int8 +} + +type sockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex int32 +} + +type ipv6Mtuinfo struct { + Addr sockaddrInet6 + Mtu uint32 +} + +type ipv6FlowlabelReq struct { + Dst [16]byte /* in6_addr */ + Label uint32 + Action uint8 + Share uint8 + Flags uint16 + Expires uint16 + Linger uint16 + X__flr_pad uint32 +} + +type ipv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Ifindex int32 +} + +type groupReq struct { + Interface uint32 + Group kernelSockaddrStorage +} + +type groupSourceReq struct { + Interface uint32 + Group kernelSockaddrStorage + Source kernelSockaddrStorage +} + +type icmpv6Filter struct { + Data [8]uint32 +} + +type sockFProg struct { + Len uint16 + Pad_cgo_0 [2]byte + Filter *sockFilter +} + +type sockFilter struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_linux_amd64.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_linux_amd64.go new file mode 100644 index 000000000..b64f0157d --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_linux_amd64.go @@ -0,0 +1,172 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_linux.go + +package ipv6 + +const ( + sysIPV6_ADDRFORM = 0x1 + sysIPV6_2292PKTINFO = 0x2 + sysIPV6_2292HOPOPTS = 0x3 + sysIPV6_2292DSTOPTS = 0x4 + sysIPV6_2292RTHDR = 0x5 + sysIPV6_2292PKTOPTIONS = 0x6 + sysIPV6_CHECKSUM = 0x7 + sysIPV6_2292HOPLIMIT = 0x8 + sysIPV6_NEXTHOP = 0x9 + sysIPV6_FLOWINFO = 0xb + + sysIPV6_UNICAST_HOPS = 0x10 + sysIPV6_MULTICAST_IF = 0x11 + sysIPV6_MULTICAST_HOPS = 0x12 + sysIPV6_MULTICAST_LOOP = 0x13 + sysIPV6_ADD_MEMBERSHIP = 0x14 + sysIPV6_DROP_MEMBERSHIP = 0x15 + sysMCAST_JOIN_GROUP = 0x2a + sysMCAST_LEAVE_GROUP = 0x2d + sysMCAST_JOIN_SOURCE_GROUP = 0x2e + sysMCAST_LEAVE_SOURCE_GROUP = 0x2f + sysMCAST_BLOCK_SOURCE = 0x2b + sysMCAST_UNBLOCK_SOURCE = 0x2c + sysMCAST_MSFILTER = 0x30 + sysIPV6_ROUTER_ALERT = 0x16 + sysIPV6_MTU_DISCOVER = 0x17 + sysIPV6_MTU = 0x18 + sysIPV6_RECVERR = 0x19 + sysIPV6_V6ONLY = 0x1a + sysIPV6_JOIN_ANYCAST = 0x1b + sysIPV6_LEAVE_ANYCAST = 0x1c + + sysIPV6_FLOWLABEL_MGR = 0x20 + sysIPV6_FLOWINFO_SEND = 0x21 + + sysIPV6_IPSEC_POLICY = 0x22 + sysIPV6_XFRM_POLICY = 0x23 + + sysIPV6_RECVPKTINFO = 0x31 + sysIPV6_PKTINFO = 0x32 + sysIPV6_RECVHOPLIMIT = 0x33 + sysIPV6_HOPLIMIT = 0x34 + sysIPV6_RECVHOPOPTS = 0x35 + sysIPV6_HOPOPTS = 0x36 + sysIPV6_RTHDRDSTOPTS = 0x37 + sysIPV6_RECVRTHDR = 0x38 + sysIPV6_RTHDR = 0x39 + sysIPV6_RECVDSTOPTS = 0x3a + sysIPV6_DSTOPTS = 0x3b + sysIPV6_RECVPATHMTU = 0x3c + sysIPV6_PATHMTU = 0x3d + sysIPV6_DONTFRAG = 0x3e + + sysIPV6_RECVTCLASS = 0x42 + sysIPV6_TCLASS = 0x43 + + sysIPV6_ADDR_PREFERENCES = 0x48 + + sysIPV6_PREFER_SRC_TMP = 0x1 + sysIPV6_PREFER_SRC_PUBLIC = 0x2 + sysIPV6_PREFER_SRC_PUBTMP_DEFAULT = 0x100 + sysIPV6_PREFER_SRC_COA = 0x4 + sysIPV6_PREFER_SRC_HOME = 0x400 + sysIPV6_PREFER_SRC_CGA = 0x8 + sysIPV6_PREFER_SRC_NONCGA = 0x800 + + sysIPV6_MINHOPCOUNT = 0x49 + + sysIPV6_ORIGDSTADDR = 0x4a + sysIPV6_RECVORIGDSTADDR = 0x4a + sysIPV6_TRANSPARENT = 0x4b + sysIPV6_UNICAST_IF = 0x4c + + sysICMPV6_FILTER = 0x1 + + sysICMPV6_FILTER_BLOCK = 0x1 + sysICMPV6_FILTER_PASS = 0x2 + sysICMPV6_FILTER_BLOCKOTHERS = 0x3 + sysICMPV6_FILTER_PASSONLY = 0x4 + + sysSOL_SOCKET = 0x1 + sysSO_ATTACH_FILTER = 0x1a + + sizeofKernelSockaddrStorage = 0x80 + sizeofSockaddrInet6 = 0x1c + sizeofInet6Pktinfo = 0x14 + sizeofIPv6Mtuinfo = 0x20 + sizeofIPv6FlowlabelReq = 0x20 + + sizeofIPv6Mreq = 0x14 + sizeofGroupReq = 0x88 + sizeofGroupSourceReq = 0x108 + + sizeofICMPv6Filter = 0x20 + + sizeofSockFprog = 0x10 +) + +type kernelSockaddrStorage struct { + Family uint16 + X__data [126]int8 +} + +type sockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex int32 +} + +type ipv6Mtuinfo struct { + Addr sockaddrInet6 + Mtu uint32 +} + +type ipv6FlowlabelReq struct { + Dst [16]byte /* in6_addr */ + Label uint32 + Action uint8 + Share uint8 + Flags uint16 + Expires uint16 + Linger uint16 + X__flr_pad uint32 +} + +type ipv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Ifindex int32 +} + +type groupReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group kernelSockaddrStorage +} + +type groupSourceReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group kernelSockaddrStorage + Source kernelSockaddrStorage +} + +type icmpv6Filter struct { + Data [8]uint32 +} + +type sockFProg struct { + Len uint16 + Pad_cgo_0 [6]byte + Filter *sockFilter +} + +type sockFilter struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_linux_arm.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_linux_arm.go new file mode 100644 index 000000000..73aa8c6df --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_linux_arm.go @@ -0,0 +1,170 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_linux.go + +package ipv6 + +const ( + sysIPV6_ADDRFORM = 0x1 + sysIPV6_2292PKTINFO = 0x2 + sysIPV6_2292HOPOPTS = 0x3 + sysIPV6_2292DSTOPTS = 0x4 + sysIPV6_2292RTHDR = 0x5 + sysIPV6_2292PKTOPTIONS = 0x6 + sysIPV6_CHECKSUM = 0x7 + sysIPV6_2292HOPLIMIT = 0x8 + sysIPV6_NEXTHOP = 0x9 + sysIPV6_FLOWINFO = 0xb + + sysIPV6_UNICAST_HOPS = 0x10 + sysIPV6_MULTICAST_IF = 0x11 + sysIPV6_MULTICAST_HOPS = 0x12 + sysIPV6_MULTICAST_LOOP = 0x13 + sysIPV6_ADD_MEMBERSHIP = 0x14 + sysIPV6_DROP_MEMBERSHIP = 0x15 + sysMCAST_JOIN_GROUP = 0x2a + sysMCAST_LEAVE_GROUP = 0x2d + sysMCAST_JOIN_SOURCE_GROUP = 0x2e + sysMCAST_LEAVE_SOURCE_GROUP = 0x2f + sysMCAST_BLOCK_SOURCE = 0x2b + sysMCAST_UNBLOCK_SOURCE = 0x2c + sysMCAST_MSFILTER = 0x30 + sysIPV6_ROUTER_ALERT = 0x16 + sysIPV6_MTU_DISCOVER = 0x17 + sysIPV6_MTU = 0x18 + sysIPV6_RECVERR = 0x19 + sysIPV6_V6ONLY = 0x1a + sysIPV6_JOIN_ANYCAST = 0x1b + sysIPV6_LEAVE_ANYCAST = 0x1c + + sysIPV6_FLOWLABEL_MGR = 0x20 + sysIPV6_FLOWINFO_SEND = 0x21 + + sysIPV6_IPSEC_POLICY = 0x22 + sysIPV6_XFRM_POLICY = 0x23 + + sysIPV6_RECVPKTINFO = 0x31 + sysIPV6_PKTINFO = 0x32 + sysIPV6_RECVHOPLIMIT = 0x33 + sysIPV6_HOPLIMIT = 0x34 + sysIPV6_RECVHOPOPTS = 0x35 + sysIPV6_HOPOPTS = 0x36 + sysIPV6_RTHDRDSTOPTS = 0x37 + sysIPV6_RECVRTHDR = 0x38 + sysIPV6_RTHDR = 0x39 + sysIPV6_RECVDSTOPTS = 0x3a + sysIPV6_DSTOPTS = 0x3b + sysIPV6_RECVPATHMTU = 0x3c + sysIPV6_PATHMTU = 0x3d + sysIPV6_DONTFRAG = 0x3e + + sysIPV6_RECVTCLASS = 0x42 + sysIPV6_TCLASS = 0x43 + + sysIPV6_ADDR_PREFERENCES = 0x48 + + sysIPV6_PREFER_SRC_TMP = 0x1 + sysIPV6_PREFER_SRC_PUBLIC = 0x2 + sysIPV6_PREFER_SRC_PUBTMP_DEFAULT = 0x100 + sysIPV6_PREFER_SRC_COA = 0x4 + sysIPV6_PREFER_SRC_HOME = 0x400 + sysIPV6_PREFER_SRC_CGA = 0x8 + sysIPV6_PREFER_SRC_NONCGA = 0x800 + + sysIPV6_MINHOPCOUNT = 0x49 + + sysIPV6_ORIGDSTADDR = 0x4a + sysIPV6_RECVORIGDSTADDR = 0x4a + sysIPV6_TRANSPARENT = 0x4b + sysIPV6_UNICAST_IF = 0x4c + + sysICMPV6_FILTER = 0x1 + + sysICMPV6_FILTER_BLOCK = 0x1 + sysICMPV6_FILTER_PASS = 0x2 + sysICMPV6_FILTER_BLOCKOTHERS = 0x3 + sysICMPV6_FILTER_PASSONLY = 0x4 + + sysSOL_SOCKET = 0x1 + sysSO_ATTACH_FILTER = 0x1a + + sizeofKernelSockaddrStorage = 0x80 + sizeofSockaddrInet6 = 0x1c + sizeofInet6Pktinfo = 0x14 + sizeofIPv6Mtuinfo = 0x20 + sizeofIPv6FlowlabelReq = 0x20 + + sizeofIPv6Mreq = 0x14 + sizeofGroupReq = 0x84 + sizeofGroupSourceReq = 0x104 + + sizeofICMPv6Filter = 0x20 + + sizeofSockFprog = 0x8 +) + +type kernelSockaddrStorage struct { + Family uint16 + X__data [126]int8 +} + +type sockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex int32 +} + +type ipv6Mtuinfo struct { + Addr sockaddrInet6 + Mtu uint32 +} + +type ipv6FlowlabelReq struct { + Dst [16]byte /* in6_addr */ + Label uint32 + Action uint8 + Share uint8 + Flags uint16 + Expires uint16 + Linger uint16 + X__flr_pad uint32 +} + +type ipv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Ifindex int32 +} + +type groupReq struct { + Interface uint32 + Group kernelSockaddrStorage +} + +type groupSourceReq struct { + Interface uint32 + Group kernelSockaddrStorage + Source kernelSockaddrStorage +} + +type icmpv6Filter struct { + Data [8]uint32 +} + +type sockFProg struct { + Len uint16 + Pad_cgo_0 [2]byte + Filter *sockFilter +} + +type sockFilter struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_linux_arm64.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_linux_arm64.go new file mode 100644 index 000000000..b64f0157d --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_linux_arm64.go @@ -0,0 +1,172 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_linux.go + +package ipv6 + +const ( + sysIPV6_ADDRFORM = 0x1 + sysIPV6_2292PKTINFO = 0x2 + sysIPV6_2292HOPOPTS = 0x3 + sysIPV6_2292DSTOPTS = 0x4 + sysIPV6_2292RTHDR = 0x5 + sysIPV6_2292PKTOPTIONS = 0x6 + sysIPV6_CHECKSUM = 0x7 + sysIPV6_2292HOPLIMIT = 0x8 + sysIPV6_NEXTHOP = 0x9 + sysIPV6_FLOWINFO = 0xb + + sysIPV6_UNICAST_HOPS = 0x10 + sysIPV6_MULTICAST_IF = 0x11 + sysIPV6_MULTICAST_HOPS = 0x12 + sysIPV6_MULTICAST_LOOP = 0x13 + sysIPV6_ADD_MEMBERSHIP = 0x14 + sysIPV6_DROP_MEMBERSHIP = 0x15 + sysMCAST_JOIN_GROUP = 0x2a + sysMCAST_LEAVE_GROUP = 0x2d + sysMCAST_JOIN_SOURCE_GROUP = 0x2e + sysMCAST_LEAVE_SOURCE_GROUP = 0x2f + sysMCAST_BLOCK_SOURCE = 0x2b + sysMCAST_UNBLOCK_SOURCE = 0x2c + sysMCAST_MSFILTER = 0x30 + sysIPV6_ROUTER_ALERT = 0x16 + sysIPV6_MTU_DISCOVER = 0x17 + sysIPV6_MTU = 0x18 + sysIPV6_RECVERR = 0x19 + sysIPV6_V6ONLY = 0x1a + sysIPV6_JOIN_ANYCAST = 0x1b + sysIPV6_LEAVE_ANYCAST = 0x1c + + sysIPV6_FLOWLABEL_MGR = 0x20 + sysIPV6_FLOWINFO_SEND = 0x21 + + sysIPV6_IPSEC_POLICY = 0x22 + sysIPV6_XFRM_POLICY = 0x23 + + sysIPV6_RECVPKTINFO = 0x31 + sysIPV6_PKTINFO = 0x32 + sysIPV6_RECVHOPLIMIT = 0x33 + sysIPV6_HOPLIMIT = 0x34 + sysIPV6_RECVHOPOPTS = 0x35 + sysIPV6_HOPOPTS = 0x36 + sysIPV6_RTHDRDSTOPTS = 0x37 + sysIPV6_RECVRTHDR = 0x38 + sysIPV6_RTHDR = 0x39 + sysIPV6_RECVDSTOPTS = 0x3a + sysIPV6_DSTOPTS = 0x3b + sysIPV6_RECVPATHMTU = 0x3c + sysIPV6_PATHMTU = 0x3d + sysIPV6_DONTFRAG = 0x3e + + sysIPV6_RECVTCLASS = 0x42 + sysIPV6_TCLASS = 0x43 + + sysIPV6_ADDR_PREFERENCES = 0x48 + + sysIPV6_PREFER_SRC_TMP = 0x1 + sysIPV6_PREFER_SRC_PUBLIC = 0x2 + sysIPV6_PREFER_SRC_PUBTMP_DEFAULT = 0x100 + sysIPV6_PREFER_SRC_COA = 0x4 + sysIPV6_PREFER_SRC_HOME = 0x400 + sysIPV6_PREFER_SRC_CGA = 0x8 + sysIPV6_PREFER_SRC_NONCGA = 0x800 + + sysIPV6_MINHOPCOUNT = 0x49 + + sysIPV6_ORIGDSTADDR = 0x4a + sysIPV6_RECVORIGDSTADDR = 0x4a + sysIPV6_TRANSPARENT = 0x4b + sysIPV6_UNICAST_IF = 0x4c + + sysICMPV6_FILTER = 0x1 + + sysICMPV6_FILTER_BLOCK = 0x1 + sysICMPV6_FILTER_PASS = 0x2 + sysICMPV6_FILTER_BLOCKOTHERS = 0x3 + sysICMPV6_FILTER_PASSONLY = 0x4 + + sysSOL_SOCKET = 0x1 + sysSO_ATTACH_FILTER = 0x1a + + sizeofKernelSockaddrStorage = 0x80 + sizeofSockaddrInet6 = 0x1c + sizeofInet6Pktinfo = 0x14 + sizeofIPv6Mtuinfo = 0x20 + sizeofIPv6FlowlabelReq = 0x20 + + sizeofIPv6Mreq = 0x14 + sizeofGroupReq = 0x88 + sizeofGroupSourceReq = 0x108 + + sizeofICMPv6Filter = 0x20 + + sizeofSockFprog = 0x10 +) + +type kernelSockaddrStorage struct { + Family uint16 + X__data [126]int8 +} + +type sockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex int32 +} + +type ipv6Mtuinfo struct { + Addr sockaddrInet6 + Mtu uint32 +} + +type ipv6FlowlabelReq struct { + Dst [16]byte /* in6_addr */ + Label uint32 + Action uint8 + Share uint8 + Flags uint16 + Expires uint16 + Linger uint16 + X__flr_pad uint32 +} + +type ipv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Ifindex int32 +} + +type groupReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group kernelSockaddrStorage +} + +type groupSourceReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group kernelSockaddrStorage + Source kernelSockaddrStorage +} + +type icmpv6Filter struct { + Data [8]uint32 +} + +type sockFProg struct { + Len uint16 + Pad_cgo_0 [6]byte + Filter *sockFilter +} + +type sockFilter struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_linux_mips.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_linux_mips.go new file mode 100644 index 000000000..73aa8c6df --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_linux_mips.go @@ -0,0 +1,170 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_linux.go + +package ipv6 + +const ( + sysIPV6_ADDRFORM = 0x1 + sysIPV6_2292PKTINFO = 0x2 + sysIPV6_2292HOPOPTS = 0x3 + sysIPV6_2292DSTOPTS = 0x4 + sysIPV6_2292RTHDR = 0x5 + sysIPV6_2292PKTOPTIONS = 0x6 + sysIPV6_CHECKSUM = 0x7 + sysIPV6_2292HOPLIMIT = 0x8 + sysIPV6_NEXTHOP = 0x9 + sysIPV6_FLOWINFO = 0xb + + sysIPV6_UNICAST_HOPS = 0x10 + sysIPV6_MULTICAST_IF = 0x11 + sysIPV6_MULTICAST_HOPS = 0x12 + sysIPV6_MULTICAST_LOOP = 0x13 + sysIPV6_ADD_MEMBERSHIP = 0x14 + sysIPV6_DROP_MEMBERSHIP = 0x15 + sysMCAST_JOIN_GROUP = 0x2a + sysMCAST_LEAVE_GROUP = 0x2d + sysMCAST_JOIN_SOURCE_GROUP = 0x2e + sysMCAST_LEAVE_SOURCE_GROUP = 0x2f + sysMCAST_BLOCK_SOURCE = 0x2b + sysMCAST_UNBLOCK_SOURCE = 0x2c + sysMCAST_MSFILTER = 0x30 + sysIPV6_ROUTER_ALERT = 0x16 + sysIPV6_MTU_DISCOVER = 0x17 + sysIPV6_MTU = 0x18 + sysIPV6_RECVERR = 0x19 + sysIPV6_V6ONLY = 0x1a + sysIPV6_JOIN_ANYCAST = 0x1b + sysIPV6_LEAVE_ANYCAST = 0x1c + + sysIPV6_FLOWLABEL_MGR = 0x20 + sysIPV6_FLOWINFO_SEND = 0x21 + + sysIPV6_IPSEC_POLICY = 0x22 + sysIPV6_XFRM_POLICY = 0x23 + + sysIPV6_RECVPKTINFO = 0x31 + sysIPV6_PKTINFO = 0x32 + sysIPV6_RECVHOPLIMIT = 0x33 + sysIPV6_HOPLIMIT = 0x34 + sysIPV6_RECVHOPOPTS = 0x35 + sysIPV6_HOPOPTS = 0x36 + sysIPV6_RTHDRDSTOPTS = 0x37 + sysIPV6_RECVRTHDR = 0x38 + sysIPV6_RTHDR = 0x39 + sysIPV6_RECVDSTOPTS = 0x3a + sysIPV6_DSTOPTS = 0x3b + sysIPV6_RECVPATHMTU = 0x3c + sysIPV6_PATHMTU = 0x3d + sysIPV6_DONTFRAG = 0x3e + + sysIPV6_RECVTCLASS = 0x42 + sysIPV6_TCLASS = 0x43 + + sysIPV6_ADDR_PREFERENCES = 0x48 + + sysIPV6_PREFER_SRC_TMP = 0x1 + sysIPV6_PREFER_SRC_PUBLIC = 0x2 + sysIPV6_PREFER_SRC_PUBTMP_DEFAULT = 0x100 + sysIPV6_PREFER_SRC_COA = 0x4 + sysIPV6_PREFER_SRC_HOME = 0x400 + sysIPV6_PREFER_SRC_CGA = 0x8 + sysIPV6_PREFER_SRC_NONCGA = 0x800 + + sysIPV6_MINHOPCOUNT = 0x49 + + sysIPV6_ORIGDSTADDR = 0x4a + sysIPV6_RECVORIGDSTADDR = 0x4a + sysIPV6_TRANSPARENT = 0x4b + sysIPV6_UNICAST_IF = 0x4c + + sysICMPV6_FILTER = 0x1 + + sysICMPV6_FILTER_BLOCK = 0x1 + sysICMPV6_FILTER_PASS = 0x2 + sysICMPV6_FILTER_BLOCKOTHERS = 0x3 + sysICMPV6_FILTER_PASSONLY = 0x4 + + sysSOL_SOCKET = 0x1 + sysSO_ATTACH_FILTER = 0x1a + + sizeofKernelSockaddrStorage = 0x80 + sizeofSockaddrInet6 = 0x1c + sizeofInet6Pktinfo = 0x14 + sizeofIPv6Mtuinfo = 0x20 + sizeofIPv6FlowlabelReq = 0x20 + + sizeofIPv6Mreq = 0x14 + sizeofGroupReq = 0x84 + sizeofGroupSourceReq = 0x104 + + sizeofICMPv6Filter = 0x20 + + sizeofSockFprog = 0x8 +) + +type kernelSockaddrStorage struct { + Family uint16 + X__data [126]int8 +} + +type sockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex int32 +} + +type ipv6Mtuinfo struct { + Addr sockaddrInet6 + Mtu uint32 +} + +type ipv6FlowlabelReq struct { + Dst [16]byte /* in6_addr */ + Label uint32 + Action uint8 + Share uint8 + Flags uint16 + Expires uint16 + Linger uint16 + X__flr_pad uint32 +} + +type ipv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Ifindex int32 +} + +type groupReq struct { + Interface uint32 + Group kernelSockaddrStorage +} + +type groupSourceReq struct { + Interface uint32 + Group kernelSockaddrStorage + Source kernelSockaddrStorage +} + +type icmpv6Filter struct { + Data [8]uint32 +} + +type sockFProg struct { + Len uint16 + Pad_cgo_0 [2]byte + Filter *sockFilter +} + +type sockFilter struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_linux_mips64.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_linux_mips64.go new file mode 100644 index 000000000..b64f0157d --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_linux_mips64.go @@ -0,0 +1,172 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_linux.go + +package ipv6 + +const ( + sysIPV6_ADDRFORM = 0x1 + sysIPV6_2292PKTINFO = 0x2 + sysIPV6_2292HOPOPTS = 0x3 + sysIPV6_2292DSTOPTS = 0x4 + sysIPV6_2292RTHDR = 0x5 + sysIPV6_2292PKTOPTIONS = 0x6 + sysIPV6_CHECKSUM = 0x7 + sysIPV6_2292HOPLIMIT = 0x8 + sysIPV6_NEXTHOP = 0x9 + sysIPV6_FLOWINFO = 0xb + + sysIPV6_UNICAST_HOPS = 0x10 + sysIPV6_MULTICAST_IF = 0x11 + sysIPV6_MULTICAST_HOPS = 0x12 + sysIPV6_MULTICAST_LOOP = 0x13 + sysIPV6_ADD_MEMBERSHIP = 0x14 + sysIPV6_DROP_MEMBERSHIP = 0x15 + sysMCAST_JOIN_GROUP = 0x2a + sysMCAST_LEAVE_GROUP = 0x2d + sysMCAST_JOIN_SOURCE_GROUP = 0x2e + sysMCAST_LEAVE_SOURCE_GROUP = 0x2f + sysMCAST_BLOCK_SOURCE = 0x2b + sysMCAST_UNBLOCK_SOURCE = 0x2c + sysMCAST_MSFILTER = 0x30 + sysIPV6_ROUTER_ALERT = 0x16 + sysIPV6_MTU_DISCOVER = 0x17 + sysIPV6_MTU = 0x18 + sysIPV6_RECVERR = 0x19 + sysIPV6_V6ONLY = 0x1a + sysIPV6_JOIN_ANYCAST = 0x1b + sysIPV6_LEAVE_ANYCAST = 0x1c + + sysIPV6_FLOWLABEL_MGR = 0x20 + sysIPV6_FLOWINFO_SEND = 0x21 + + sysIPV6_IPSEC_POLICY = 0x22 + sysIPV6_XFRM_POLICY = 0x23 + + sysIPV6_RECVPKTINFO = 0x31 + sysIPV6_PKTINFO = 0x32 + sysIPV6_RECVHOPLIMIT = 0x33 + sysIPV6_HOPLIMIT = 0x34 + sysIPV6_RECVHOPOPTS = 0x35 + sysIPV6_HOPOPTS = 0x36 + sysIPV6_RTHDRDSTOPTS = 0x37 + sysIPV6_RECVRTHDR = 0x38 + sysIPV6_RTHDR = 0x39 + sysIPV6_RECVDSTOPTS = 0x3a + sysIPV6_DSTOPTS = 0x3b + sysIPV6_RECVPATHMTU = 0x3c + sysIPV6_PATHMTU = 0x3d + sysIPV6_DONTFRAG = 0x3e + + sysIPV6_RECVTCLASS = 0x42 + sysIPV6_TCLASS = 0x43 + + sysIPV6_ADDR_PREFERENCES = 0x48 + + sysIPV6_PREFER_SRC_TMP = 0x1 + sysIPV6_PREFER_SRC_PUBLIC = 0x2 + sysIPV6_PREFER_SRC_PUBTMP_DEFAULT = 0x100 + sysIPV6_PREFER_SRC_COA = 0x4 + sysIPV6_PREFER_SRC_HOME = 0x400 + sysIPV6_PREFER_SRC_CGA = 0x8 + sysIPV6_PREFER_SRC_NONCGA = 0x800 + + sysIPV6_MINHOPCOUNT = 0x49 + + sysIPV6_ORIGDSTADDR = 0x4a + sysIPV6_RECVORIGDSTADDR = 0x4a + sysIPV6_TRANSPARENT = 0x4b + sysIPV6_UNICAST_IF = 0x4c + + sysICMPV6_FILTER = 0x1 + + sysICMPV6_FILTER_BLOCK = 0x1 + sysICMPV6_FILTER_PASS = 0x2 + sysICMPV6_FILTER_BLOCKOTHERS = 0x3 + sysICMPV6_FILTER_PASSONLY = 0x4 + + sysSOL_SOCKET = 0x1 + sysSO_ATTACH_FILTER = 0x1a + + sizeofKernelSockaddrStorage = 0x80 + sizeofSockaddrInet6 = 0x1c + sizeofInet6Pktinfo = 0x14 + sizeofIPv6Mtuinfo = 0x20 + sizeofIPv6FlowlabelReq = 0x20 + + sizeofIPv6Mreq = 0x14 + sizeofGroupReq = 0x88 + sizeofGroupSourceReq = 0x108 + + sizeofICMPv6Filter = 0x20 + + sizeofSockFprog = 0x10 +) + +type kernelSockaddrStorage struct { + Family uint16 + X__data [126]int8 +} + +type sockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex int32 +} + +type ipv6Mtuinfo struct { + Addr sockaddrInet6 + Mtu uint32 +} + +type ipv6FlowlabelReq struct { + Dst [16]byte /* in6_addr */ + Label uint32 + Action uint8 + Share uint8 + Flags uint16 + Expires uint16 + Linger uint16 + X__flr_pad uint32 +} + +type ipv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Ifindex int32 +} + +type groupReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group kernelSockaddrStorage +} + +type groupSourceReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group kernelSockaddrStorage + Source kernelSockaddrStorage +} + +type icmpv6Filter struct { + Data [8]uint32 +} + +type sockFProg struct { + Len uint16 + Pad_cgo_0 [6]byte + Filter *sockFilter +} + +type sockFilter struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_linux_mips64le.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_linux_mips64le.go new file mode 100644 index 000000000..b64f0157d --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_linux_mips64le.go @@ -0,0 +1,172 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_linux.go + +package ipv6 + +const ( + sysIPV6_ADDRFORM = 0x1 + sysIPV6_2292PKTINFO = 0x2 + sysIPV6_2292HOPOPTS = 0x3 + sysIPV6_2292DSTOPTS = 0x4 + sysIPV6_2292RTHDR = 0x5 + sysIPV6_2292PKTOPTIONS = 0x6 + sysIPV6_CHECKSUM = 0x7 + sysIPV6_2292HOPLIMIT = 0x8 + sysIPV6_NEXTHOP = 0x9 + sysIPV6_FLOWINFO = 0xb + + sysIPV6_UNICAST_HOPS = 0x10 + sysIPV6_MULTICAST_IF = 0x11 + sysIPV6_MULTICAST_HOPS = 0x12 + sysIPV6_MULTICAST_LOOP = 0x13 + sysIPV6_ADD_MEMBERSHIP = 0x14 + sysIPV6_DROP_MEMBERSHIP = 0x15 + sysMCAST_JOIN_GROUP = 0x2a + sysMCAST_LEAVE_GROUP = 0x2d + sysMCAST_JOIN_SOURCE_GROUP = 0x2e + sysMCAST_LEAVE_SOURCE_GROUP = 0x2f + sysMCAST_BLOCK_SOURCE = 0x2b + sysMCAST_UNBLOCK_SOURCE = 0x2c + sysMCAST_MSFILTER = 0x30 + sysIPV6_ROUTER_ALERT = 0x16 + sysIPV6_MTU_DISCOVER = 0x17 + sysIPV6_MTU = 0x18 + sysIPV6_RECVERR = 0x19 + sysIPV6_V6ONLY = 0x1a + sysIPV6_JOIN_ANYCAST = 0x1b + sysIPV6_LEAVE_ANYCAST = 0x1c + + sysIPV6_FLOWLABEL_MGR = 0x20 + sysIPV6_FLOWINFO_SEND = 0x21 + + sysIPV6_IPSEC_POLICY = 0x22 + sysIPV6_XFRM_POLICY = 0x23 + + sysIPV6_RECVPKTINFO = 0x31 + sysIPV6_PKTINFO = 0x32 + sysIPV6_RECVHOPLIMIT = 0x33 + sysIPV6_HOPLIMIT = 0x34 + sysIPV6_RECVHOPOPTS = 0x35 + sysIPV6_HOPOPTS = 0x36 + sysIPV6_RTHDRDSTOPTS = 0x37 + sysIPV6_RECVRTHDR = 0x38 + sysIPV6_RTHDR = 0x39 + sysIPV6_RECVDSTOPTS = 0x3a + sysIPV6_DSTOPTS = 0x3b + sysIPV6_RECVPATHMTU = 0x3c + sysIPV6_PATHMTU = 0x3d + sysIPV6_DONTFRAG = 0x3e + + sysIPV6_RECVTCLASS = 0x42 + sysIPV6_TCLASS = 0x43 + + sysIPV6_ADDR_PREFERENCES = 0x48 + + sysIPV6_PREFER_SRC_TMP = 0x1 + sysIPV6_PREFER_SRC_PUBLIC = 0x2 + sysIPV6_PREFER_SRC_PUBTMP_DEFAULT = 0x100 + sysIPV6_PREFER_SRC_COA = 0x4 + sysIPV6_PREFER_SRC_HOME = 0x400 + sysIPV6_PREFER_SRC_CGA = 0x8 + sysIPV6_PREFER_SRC_NONCGA = 0x800 + + sysIPV6_MINHOPCOUNT = 0x49 + + sysIPV6_ORIGDSTADDR = 0x4a + sysIPV6_RECVORIGDSTADDR = 0x4a + sysIPV6_TRANSPARENT = 0x4b + sysIPV6_UNICAST_IF = 0x4c + + sysICMPV6_FILTER = 0x1 + + sysICMPV6_FILTER_BLOCK = 0x1 + sysICMPV6_FILTER_PASS = 0x2 + sysICMPV6_FILTER_BLOCKOTHERS = 0x3 + sysICMPV6_FILTER_PASSONLY = 0x4 + + sysSOL_SOCKET = 0x1 + sysSO_ATTACH_FILTER = 0x1a + + sizeofKernelSockaddrStorage = 0x80 + sizeofSockaddrInet6 = 0x1c + sizeofInet6Pktinfo = 0x14 + sizeofIPv6Mtuinfo = 0x20 + sizeofIPv6FlowlabelReq = 0x20 + + sizeofIPv6Mreq = 0x14 + sizeofGroupReq = 0x88 + sizeofGroupSourceReq = 0x108 + + sizeofICMPv6Filter = 0x20 + + sizeofSockFprog = 0x10 +) + +type kernelSockaddrStorage struct { + Family uint16 + X__data [126]int8 +} + +type sockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex int32 +} + +type ipv6Mtuinfo struct { + Addr sockaddrInet6 + Mtu uint32 +} + +type ipv6FlowlabelReq struct { + Dst [16]byte /* in6_addr */ + Label uint32 + Action uint8 + Share uint8 + Flags uint16 + Expires uint16 + Linger uint16 + X__flr_pad uint32 +} + +type ipv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Ifindex int32 +} + +type groupReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group kernelSockaddrStorage +} + +type groupSourceReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group kernelSockaddrStorage + Source kernelSockaddrStorage +} + +type icmpv6Filter struct { + Data [8]uint32 +} + +type sockFProg struct { + Len uint16 + Pad_cgo_0 [6]byte + Filter *sockFilter +} + +type sockFilter struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_linux_mipsle.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_linux_mipsle.go new file mode 100644 index 000000000..73aa8c6df --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_linux_mipsle.go @@ -0,0 +1,170 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_linux.go + +package ipv6 + +const ( + sysIPV6_ADDRFORM = 0x1 + sysIPV6_2292PKTINFO = 0x2 + sysIPV6_2292HOPOPTS = 0x3 + sysIPV6_2292DSTOPTS = 0x4 + sysIPV6_2292RTHDR = 0x5 + sysIPV6_2292PKTOPTIONS = 0x6 + sysIPV6_CHECKSUM = 0x7 + sysIPV6_2292HOPLIMIT = 0x8 + sysIPV6_NEXTHOP = 0x9 + sysIPV6_FLOWINFO = 0xb + + sysIPV6_UNICAST_HOPS = 0x10 + sysIPV6_MULTICAST_IF = 0x11 + sysIPV6_MULTICAST_HOPS = 0x12 + sysIPV6_MULTICAST_LOOP = 0x13 + sysIPV6_ADD_MEMBERSHIP = 0x14 + sysIPV6_DROP_MEMBERSHIP = 0x15 + sysMCAST_JOIN_GROUP = 0x2a + sysMCAST_LEAVE_GROUP = 0x2d + sysMCAST_JOIN_SOURCE_GROUP = 0x2e + sysMCAST_LEAVE_SOURCE_GROUP = 0x2f + sysMCAST_BLOCK_SOURCE = 0x2b + sysMCAST_UNBLOCK_SOURCE = 0x2c + sysMCAST_MSFILTER = 0x30 + sysIPV6_ROUTER_ALERT = 0x16 + sysIPV6_MTU_DISCOVER = 0x17 + sysIPV6_MTU = 0x18 + sysIPV6_RECVERR = 0x19 + sysIPV6_V6ONLY = 0x1a + sysIPV6_JOIN_ANYCAST = 0x1b + sysIPV6_LEAVE_ANYCAST = 0x1c + + sysIPV6_FLOWLABEL_MGR = 0x20 + sysIPV6_FLOWINFO_SEND = 0x21 + + sysIPV6_IPSEC_POLICY = 0x22 + sysIPV6_XFRM_POLICY = 0x23 + + sysIPV6_RECVPKTINFO = 0x31 + sysIPV6_PKTINFO = 0x32 + sysIPV6_RECVHOPLIMIT = 0x33 + sysIPV6_HOPLIMIT = 0x34 + sysIPV6_RECVHOPOPTS = 0x35 + sysIPV6_HOPOPTS = 0x36 + sysIPV6_RTHDRDSTOPTS = 0x37 + sysIPV6_RECVRTHDR = 0x38 + sysIPV6_RTHDR = 0x39 + sysIPV6_RECVDSTOPTS = 0x3a + sysIPV6_DSTOPTS = 0x3b + sysIPV6_RECVPATHMTU = 0x3c + sysIPV6_PATHMTU = 0x3d + sysIPV6_DONTFRAG = 0x3e + + sysIPV6_RECVTCLASS = 0x42 + sysIPV6_TCLASS = 0x43 + + sysIPV6_ADDR_PREFERENCES = 0x48 + + sysIPV6_PREFER_SRC_TMP = 0x1 + sysIPV6_PREFER_SRC_PUBLIC = 0x2 + sysIPV6_PREFER_SRC_PUBTMP_DEFAULT = 0x100 + sysIPV6_PREFER_SRC_COA = 0x4 + sysIPV6_PREFER_SRC_HOME = 0x400 + sysIPV6_PREFER_SRC_CGA = 0x8 + sysIPV6_PREFER_SRC_NONCGA = 0x800 + + sysIPV6_MINHOPCOUNT = 0x49 + + sysIPV6_ORIGDSTADDR = 0x4a + sysIPV6_RECVORIGDSTADDR = 0x4a + sysIPV6_TRANSPARENT = 0x4b + sysIPV6_UNICAST_IF = 0x4c + + sysICMPV6_FILTER = 0x1 + + sysICMPV6_FILTER_BLOCK = 0x1 + sysICMPV6_FILTER_PASS = 0x2 + sysICMPV6_FILTER_BLOCKOTHERS = 0x3 + sysICMPV6_FILTER_PASSONLY = 0x4 + + sysSOL_SOCKET = 0x1 + sysSO_ATTACH_FILTER = 0x1a + + sizeofKernelSockaddrStorage = 0x80 + sizeofSockaddrInet6 = 0x1c + sizeofInet6Pktinfo = 0x14 + sizeofIPv6Mtuinfo = 0x20 + sizeofIPv6FlowlabelReq = 0x20 + + sizeofIPv6Mreq = 0x14 + sizeofGroupReq = 0x84 + sizeofGroupSourceReq = 0x104 + + sizeofICMPv6Filter = 0x20 + + sizeofSockFprog = 0x8 +) + +type kernelSockaddrStorage struct { + Family uint16 + X__data [126]int8 +} + +type sockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex int32 +} + +type ipv6Mtuinfo struct { + Addr sockaddrInet6 + Mtu uint32 +} + +type ipv6FlowlabelReq struct { + Dst [16]byte /* in6_addr */ + Label uint32 + Action uint8 + Share uint8 + Flags uint16 + Expires uint16 + Linger uint16 + X__flr_pad uint32 +} + +type ipv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Ifindex int32 +} + +type groupReq struct { + Interface uint32 + Group kernelSockaddrStorage +} + +type groupSourceReq struct { + Interface uint32 + Group kernelSockaddrStorage + Source kernelSockaddrStorage +} + +type icmpv6Filter struct { + Data [8]uint32 +} + +type sockFProg struct { + Len uint16 + Pad_cgo_0 [2]byte + Filter *sockFilter +} + +type sockFilter struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_linux_ppc.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_linux_ppc.go new file mode 100644 index 000000000..c9bf6a87e --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_linux_ppc.go @@ -0,0 +1,170 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_linux.go + +package ipv6 + +const ( + sysIPV6_ADDRFORM = 0x1 + sysIPV6_2292PKTINFO = 0x2 + sysIPV6_2292HOPOPTS = 0x3 + sysIPV6_2292DSTOPTS = 0x4 + sysIPV6_2292RTHDR = 0x5 + sysIPV6_2292PKTOPTIONS = 0x6 + sysIPV6_CHECKSUM = 0x7 + sysIPV6_2292HOPLIMIT = 0x8 + sysIPV6_NEXTHOP = 0x9 + sysIPV6_FLOWINFO = 0xb + + sysIPV6_UNICAST_HOPS = 0x10 + sysIPV6_MULTICAST_IF = 0x11 + sysIPV6_MULTICAST_HOPS = 0x12 + sysIPV6_MULTICAST_LOOP = 0x13 + sysIPV6_ADD_MEMBERSHIP = 0x14 + sysIPV6_DROP_MEMBERSHIP = 0x15 + sysMCAST_JOIN_GROUP = 0x2a + sysMCAST_LEAVE_GROUP = 0x2d + sysMCAST_JOIN_SOURCE_GROUP = 0x2e + sysMCAST_LEAVE_SOURCE_GROUP = 0x2f + sysMCAST_BLOCK_SOURCE = 0x2b + sysMCAST_UNBLOCK_SOURCE = 0x2c + sysMCAST_MSFILTER = 0x30 + sysIPV6_ROUTER_ALERT = 0x16 + sysIPV6_MTU_DISCOVER = 0x17 + sysIPV6_MTU = 0x18 + sysIPV6_RECVERR = 0x19 + sysIPV6_V6ONLY = 0x1a + sysIPV6_JOIN_ANYCAST = 0x1b + sysIPV6_LEAVE_ANYCAST = 0x1c + + sysIPV6_FLOWLABEL_MGR = 0x20 + sysIPV6_FLOWINFO_SEND = 0x21 + + sysIPV6_IPSEC_POLICY = 0x22 + sysIPV6_XFRM_POLICY = 0x23 + + sysIPV6_RECVPKTINFO = 0x31 + sysIPV6_PKTINFO = 0x32 + sysIPV6_RECVHOPLIMIT = 0x33 + sysIPV6_HOPLIMIT = 0x34 + sysIPV6_RECVHOPOPTS = 0x35 + sysIPV6_HOPOPTS = 0x36 + sysIPV6_RTHDRDSTOPTS = 0x37 + sysIPV6_RECVRTHDR = 0x38 + sysIPV6_RTHDR = 0x39 + sysIPV6_RECVDSTOPTS = 0x3a + sysIPV6_DSTOPTS = 0x3b + sysIPV6_RECVPATHMTU = 0x3c + sysIPV6_PATHMTU = 0x3d + sysIPV6_DONTFRAG = 0x3e + + sysIPV6_RECVTCLASS = 0x42 + sysIPV6_TCLASS = 0x43 + + sysIPV6_ADDR_PREFERENCES = 0x48 + + sysIPV6_PREFER_SRC_TMP = 0x1 + sysIPV6_PREFER_SRC_PUBLIC = 0x2 + sysIPV6_PREFER_SRC_PUBTMP_DEFAULT = 0x100 + sysIPV6_PREFER_SRC_COA = 0x4 + sysIPV6_PREFER_SRC_HOME = 0x400 + sysIPV6_PREFER_SRC_CGA = 0x8 + sysIPV6_PREFER_SRC_NONCGA = 0x800 + + sysIPV6_MINHOPCOUNT = 0x49 + + sysIPV6_ORIGDSTADDR = 0x4a + sysIPV6_RECVORIGDSTADDR = 0x4a + sysIPV6_TRANSPARENT = 0x4b + sysIPV6_UNICAST_IF = 0x4c + + sysICMPV6_FILTER = 0x1 + + sysICMPV6_FILTER_BLOCK = 0x1 + sysICMPV6_FILTER_PASS = 0x2 + sysICMPV6_FILTER_BLOCKOTHERS = 0x3 + sysICMPV6_FILTER_PASSONLY = 0x4 + + sysSOL_SOCKET = 0x1 + sysSO_ATTACH_FILTER = 0x1a + + sizeofKernelSockaddrStorage = 0x80 + sizeofSockaddrInet6 = 0x1c + sizeofInet6Pktinfo = 0x14 + sizeofIPv6Mtuinfo = 0x20 + sizeofIPv6FlowlabelReq = 0x20 + + sizeofIPv6Mreq = 0x14 + sizeofGroupReq = 0x84 + sizeofGroupSourceReq = 0x104 + + sizeofICMPv6Filter = 0x20 + + sizeofSockFprog = 0x8 +) + +type kernelSockaddrStorage struct { + Family uint16 + X__data [126]uint8 +} + +type sockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex int32 +} + +type ipv6Mtuinfo struct { + Addr sockaddrInet6 + Mtu uint32 +} + +type ipv6FlowlabelReq struct { + Dst [16]byte /* in6_addr */ + Label uint32 + Action uint8 + Share uint8 + Flags uint16 + Expires uint16 + Linger uint16 + X__flr_pad uint32 +} + +type ipv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Ifindex int32 +} + +type groupReq struct { + Interface uint32 + Group kernelSockaddrStorage +} + +type groupSourceReq struct { + Interface uint32 + Group kernelSockaddrStorage + Source kernelSockaddrStorage +} + +type icmpv6Filter struct { + Data [8]uint32 +} + +type sockFProg struct { + Len uint16 + Pad_cgo_0 [2]byte + Filter *sockFilter +} + +type sockFilter struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_linux_ppc64.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_linux_ppc64.go new file mode 100644 index 000000000..b64f0157d --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_linux_ppc64.go @@ -0,0 +1,172 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_linux.go + +package ipv6 + +const ( + sysIPV6_ADDRFORM = 0x1 + sysIPV6_2292PKTINFO = 0x2 + sysIPV6_2292HOPOPTS = 0x3 + sysIPV6_2292DSTOPTS = 0x4 + sysIPV6_2292RTHDR = 0x5 + sysIPV6_2292PKTOPTIONS = 0x6 + sysIPV6_CHECKSUM = 0x7 + sysIPV6_2292HOPLIMIT = 0x8 + sysIPV6_NEXTHOP = 0x9 + sysIPV6_FLOWINFO = 0xb + + sysIPV6_UNICAST_HOPS = 0x10 + sysIPV6_MULTICAST_IF = 0x11 + sysIPV6_MULTICAST_HOPS = 0x12 + sysIPV6_MULTICAST_LOOP = 0x13 + sysIPV6_ADD_MEMBERSHIP = 0x14 + sysIPV6_DROP_MEMBERSHIP = 0x15 + sysMCAST_JOIN_GROUP = 0x2a + sysMCAST_LEAVE_GROUP = 0x2d + sysMCAST_JOIN_SOURCE_GROUP = 0x2e + sysMCAST_LEAVE_SOURCE_GROUP = 0x2f + sysMCAST_BLOCK_SOURCE = 0x2b + sysMCAST_UNBLOCK_SOURCE = 0x2c + sysMCAST_MSFILTER = 0x30 + sysIPV6_ROUTER_ALERT = 0x16 + sysIPV6_MTU_DISCOVER = 0x17 + sysIPV6_MTU = 0x18 + sysIPV6_RECVERR = 0x19 + sysIPV6_V6ONLY = 0x1a + sysIPV6_JOIN_ANYCAST = 0x1b + sysIPV6_LEAVE_ANYCAST = 0x1c + + sysIPV6_FLOWLABEL_MGR = 0x20 + sysIPV6_FLOWINFO_SEND = 0x21 + + sysIPV6_IPSEC_POLICY = 0x22 + sysIPV6_XFRM_POLICY = 0x23 + + sysIPV6_RECVPKTINFO = 0x31 + sysIPV6_PKTINFO = 0x32 + sysIPV6_RECVHOPLIMIT = 0x33 + sysIPV6_HOPLIMIT = 0x34 + sysIPV6_RECVHOPOPTS = 0x35 + sysIPV6_HOPOPTS = 0x36 + sysIPV6_RTHDRDSTOPTS = 0x37 + sysIPV6_RECVRTHDR = 0x38 + sysIPV6_RTHDR = 0x39 + sysIPV6_RECVDSTOPTS = 0x3a + sysIPV6_DSTOPTS = 0x3b + sysIPV6_RECVPATHMTU = 0x3c + sysIPV6_PATHMTU = 0x3d + sysIPV6_DONTFRAG = 0x3e + + sysIPV6_RECVTCLASS = 0x42 + sysIPV6_TCLASS = 0x43 + + sysIPV6_ADDR_PREFERENCES = 0x48 + + sysIPV6_PREFER_SRC_TMP = 0x1 + sysIPV6_PREFER_SRC_PUBLIC = 0x2 + sysIPV6_PREFER_SRC_PUBTMP_DEFAULT = 0x100 + sysIPV6_PREFER_SRC_COA = 0x4 + sysIPV6_PREFER_SRC_HOME = 0x400 + sysIPV6_PREFER_SRC_CGA = 0x8 + sysIPV6_PREFER_SRC_NONCGA = 0x800 + + sysIPV6_MINHOPCOUNT = 0x49 + + sysIPV6_ORIGDSTADDR = 0x4a + sysIPV6_RECVORIGDSTADDR = 0x4a + sysIPV6_TRANSPARENT = 0x4b + sysIPV6_UNICAST_IF = 0x4c + + sysICMPV6_FILTER = 0x1 + + sysICMPV6_FILTER_BLOCK = 0x1 + sysICMPV6_FILTER_PASS = 0x2 + sysICMPV6_FILTER_BLOCKOTHERS = 0x3 + sysICMPV6_FILTER_PASSONLY = 0x4 + + sysSOL_SOCKET = 0x1 + sysSO_ATTACH_FILTER = 0x1a + + sizeofKernelSockaddrStorage = 0x80 + sizeofSockaddrInet6 = 0x1c + sizeofInet6Pktinfo = 0x14 + sizeofIPv6Mtuinfo = 0x20 + sizeofIPv6FlowlabelReq = 0x20 + + sizeofIPv6Mreq = 0x14 + sizeofGroupReq = 0x88 + sizeofGroupSourceReq = 0x108 + + sizeofICMPv6Filter = 0x20 + + sizeofSockFprog = 0x10 +) + +type kernelSockaddrStorage struct { + Family uint16 + X__data [126]int8 +} + +type sockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex int32 +} + +type ipv6Mtuinfo struct { + Addr sockaddrInet6 + Mtu uint32 +} + +type ipv6FlowlabelReq struct { + Dst [16]byte /* in6_addr */ + Label uint32 + Action uint8 + Share uint8 + Flags uint16 + Expires uint16 + Linger uint16 + X__flr_pad uint32 +} + +type ipv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Ifindex int32 +} + +type groupReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group kernelSockaddrStorage +} + +type groupSourceReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group kernelSockaddrStorage + Source kernelSockaddrStorage +} + +type icmpv6Filter struct { + Data [8]uint32 +} + +type sockFProg struct { + Len uint16 + Pad_cgo_0 [6]byte + Filter *sockFilter +} + +type sockFilter struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_linux_ppc64le.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_linux_ppc64le.go new file mode 100644 index 000000000..b64f0157d --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_linux_ppc64le.go @@ -0,0 +1,172 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_linux.go + +package ipv6 + +const ( + sysIPV6_ADDRFORM = 0x1 + sysIPV6_2292PKTINFO = 0x2 + sysIPV6_2292HOPOPTS = 0x3 + sysIPV6_2292DSTOPTS = 0x4 + sysIPV6_2292RTHDR = 0x5 + sysIPV6_2292PKTOPTIONS = 0x6 + sysIPV6_CHECKSUM = 0x7 + sysIPV6_2292HOPLIMIT = 0x8 + sysIPV6_NEXTHOP = 0x9 + sysIPV6_FLOWINFO = 0xb + + sysIPV6_UNICAST_HOPS = 0x10 + sysIPV6_MULTICAST_IF = 0x11 + sysIPV6_MULTICAST_HOPS = 0x12 + sysIPV6_MULTICAST_LOOP = 0x13 + sysIPV6_ADD_MEMBERSHIP = 0x14 + sysIPV6_DROP_MEMBERSHIP = 0x15 + sysMCAST_JOIN_GROUP = 0x2a + sysMCAST_LEAVE_GROUP = 0x2d + sysMCAST_JOIN_SOURCE_GROUP = 0x2e + sysMCAST_LEAVE_SOURCE_GROUP = 0x2f + sysMCAST_BLOCK_SOURCE = 0x2b + sysMCAST_UNBLOCK_SOURCE = 0x2c + sysMCAST_MSFILTER = 0x30 + sysIPV6_ROUTER_ALERT = 0x16 + sysIPV6_MTU_DISCOVER = 0x17 + sysIPV6_MTU = 0x18 + sysIPV6_RECVERR = 0x19 + sysIPV6_V6ONLY = 0x1a + sysIPV6_JOIN_ANYCAST = 0x1b + sysIPV6_LEAVE_ANYCAST = 0x1c + + sysIPV6_FLOWLABEL_MGR = 0x20 + sysIPV6_FLOWINFO_SEND = 0x21 + + sysIPV6_IPSEC_POLICY = 0x22 + sysIPV6_XFRM_POLICY = 0x23 + + sysIPV6_RECVPKTINFO = 0x31 + sysIPV6_PKTINFO = 0x32 + sysIPV6_RECVHOPLIMIT = 0x33 + sysIPV6_HOPLIMIT = 0x34 + sysIPV6_RECVHOPOPTS = 0x35 + sysIPV6_HOPOPTS = 0x36 + sysIPV6_RTHDRDSTOPTS = 0x37 + sysIPV6_RECVRTHDR = 0x38 + sysIPV6_RTHDR = 0x39 + sysIPV6_RECVDSTOPTS = 0x3a + sysIPV6_DSTOPTS = 0x3b + sysIPV6_RECVPATHMTU = 0x3c + sysIPV6_PATHMTU = 0x3d + sysIPV6_DONTFRAG = 0x3e + + sysIPV6_RECVTCLASS = 0x42 + sysIPV6_TCLASS = 0x43 + + sysIPV6_ADDR_PREFERENCES = 0x48 + + sysIPV6_PREFER_SRC_TMP = 0x1 + sysIPV6_PREFER_SRC_PUBLIC = 0x2 + sysIPV6_PREFER_SRC_PUBTMP_DEFAULT = 0x100 + sysIPV6_PREFER_SRC_COA = 0x4 + sysIPV6_PREFER_SRC_HOME = 0x400 + sysIPV6_PREFER_SRC_CGA = 0x8 + sysIPV6_PREFER_SRC_NONCGA = 0x800 + + sysIPV6_MINHOPCOUNT = 0x49 + + sysIPV6_ORIGDSTADDR = 0x4a + sysIPV6_RECVORIGDSTADDR = 0x4a + sysIPV6_TRANSPARENT = 0x4b + sysIPV6_UNICAST_IF = 0x4c + + sysICMPV6_FILTER = 0x1 + + sysICMPV6_FILTER_BLOCK = 0x1 + sysICMPV6_FILTER_PASS = 0x2 + sysICMPV6_FILTER_BLOCKOTHERS = 0x3 + sysICMPV6_FILTER_PASSONLY = 0x4 + + sysSOL_SOCKET = 0x1 + sysSO_ATTACH_FILTER = 0x1a + + sizeofKernelSockaddrStorage = 0x80 + sizeofSockaddrInet6 = 0x1c + sizeofInet6Pktinfo = 0x14 + sizeofIPv6Mtuinfo = 0x20 + sizeofIPv6FlowlabelReq = 0x20 + + sizeofIPv6Mreq = 0x14 + sizeofGroupReq = 0x88 + sizeofGroupSourceReq = 0x108 + + sizeofICMPv6Filter = 0x20 + + sizeofSockFprog = 0x10 +) + +type kernelSockaddrStorage struct { + Family uint16 + X__data [126]int8 +} + +type sockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex int32 +} + +type ipv6Mtuinfo struct { + Addr sockaddrInet6 + Mtu uint32 +} + +type ipv6FlowlabelReq struct { + Dst [16]byte /* in6_addr */ + Label uint32 + Action uint8 + Share uint8 + Flags uint16 + Expires uint16 + Linger uint16 + X__flr_pad uint32 +} + +type ipv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Ifindex int32 +} + +type groupReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group kernelSockaddrStorage +} + +type groupSourceReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group kernelSockaddrStorage + Source kernelSockaddrStorage +} + +type icmpv6Filter struct { + Data [8]uint32 +} + +type sockFProg struct { + Len uint16 + Pad_cgo_0 [6]byte + Filter *sockFilter +} + +type sockFilter struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_linux_s390x.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_linux_s390x.go new file mode 100644 index 000000000..b64f0157d --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_linux_s390x.go @@ -0,0 +1,172 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_linux.go + +package ipv6 + +const ( + sysIPV6_ADDRFORM = 0x1 + sysIPV6_2292PKTINFO = 0x2 + sysIPV6_2292HOPOPTS = 0x3 + sysIPV6_2292DSTOPTS = 0x4 + sysIPV6_2292RTHDR = 0x5 + sysIPV6_2292PKTOPTIONS = 0x6 + sysIPV6_CHECKSUM = 0x7 + sysIPV6_2292HOPLIMIT = 0x8 + sysIPV6_NEXTHOP = 0x9 + sysIPV6_FLOWINFO = 0xb + + sysIPV6_UNICAST_HOPS = 0x10 + sysIPV6_MULTICAST_IF = 0x11 + sysIPV6_MULTICAST_HOPS = 0x12 + sysIPV6_MULTICAST_LOOP = 0x13 + sysIPV6_ADD_MEMBERSHIP = 0x14 + sysIPV6_DROP_MEMBERSHIP = 0x15 + sysMCAST_JOIN_GROUP = 0x2a + sysMCAST_LEAVE_GROUP = 0x2d + sysMCAST_JOIN_SOURCE_GROUP = 0x2e + sysMCAST_LEAVE_SOURCE_GROUP = 0x2f + sysMCAST_BLOCK_SOURCE = 0x2b + sysMCAST_UNBLOCK_SOURCE = 0x2c + sysMCAST_MSFILTER = 0x30 + sysIPV6_ROUTER_ALERT = 0x16 + sysIPV6_MTU_DISCOVER = 0x17 + sysIPV6_MTU = 0x18 + sysIPV6_RECVERR = 0x19 + sysIPV6_V6ONLY = 0x1a + sysIPV6_JOIN_ANYCAST = 0x1b + sysIPV6_LEAVE_ANYCAST = 0x1c + + sysIPV6_FLOWLABEL_MGR = 0x20 + sysIPV6_FLOWINFO_SEND = 0x21 + + sysIPV6_IPSEC_POLICY = 0x22 + sysIPV6_XFRM_POLICY = 0x23 + + sysIPV6_RECVPKTINFO = 0x31 + sysIPV6_PKTINFO = 0x32 + sysIPV6_RECVHOPLIMIT = 0x33 + sysIPV6_HOPLIMIT = 0x34 + sysIPV6_RECVHOPOPTS = 0x35 + sysIPV6_HOPOPTS = 0x36 + sysIPV6_RTHDRDSTOPTS = 0x37 + sysIPV6_RECVRTHDR = 0x38 + sysIPV6_RTHDR = 0x39 + sysIPV6_RECVDSTOPTS = 0x3a + sysIPV6_DSTOPTS = 0x3b + sysIPV6_RECVPATHMTU = 0x3c + sysIPV6_PATHMTU = 0x3d + sysIPV6_DONTFRAG = 0x3e + + sysIPV6_RECVTCLASS = 0x42 + sysIPV6_TCLASS = 0x43 + + sysIPV6_ADDR_PREFERENCES = 0x48 + + sysIPV6_PREFER_SRC_TMP = 0x1 + sysIPV6_PREFER_SRC_PUBLIC = 0x2 + sysIPV6_PREFER_SRC_PUBTMP_DEFAULT = 0x100 + sysIPV6_PREFER_SRC_COA = 0x4 + sysIPV6_PREFER_SRC_HOME = 0x400 + sysIPV6_PREFER_SRC_CGA = 0x8 + sysIPV6_PREFER_SRC_NONCGA = 0x800 + + sysIPV6_MINHOPCOUNT = 0x49 + + sysIPV6_ORIGDSTADDR = 0x4a + sysIPV6_RECVORIGDSTADDR = 0x4a + sysIPV6_TRANSPARENT = 0x4b + sysIPV6_UNICAST_IF = 0x4c + + sysICMPV6_FILTER = 0x1 + + sysICMPV6_FILTER_BLOCK = 0x1 + sysICMPV6_FILTER_PASS = 0x2 + sysICMPV6_FILTER_BLOCKOTHERS = 0x3 + sysICMPV6_FILTER_PASSONLY = 0x4 + + sysSOL_SOCKET = 0x1 + sysSO_ATTACH_FILTER = 0x1a + + sizeofKernelSockaddrStorage = 0x80 + sizeofSockaddrInet6 = 0x1c + sizeofInet6Pktinfo = 0x14 + sizeofIPv6Mtuinfo = 0x20 + sizeofIPv6FlowlabelReq = 0x20 + + sizeofIPv6Mreq = 0x14 + sizeofGroupReq = 0x88 + sizeofGroupSourceReq = 0x108 + + sizeofICMPv6Filter = 0x20 + + sizeofSockFprog = 0x10 +) + +type kernelSockaddrStorage struct { + Family uint16 + X__data [126]int8 +} + +type sockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex int32 +} + +type ipv6Mtuinfo struct { + Addr sockaddrInet6 + Mtu uint32 +} + +type ipv6FlowlabelReq struct { + Dst [16]byte /* in6_addr */ + Label uint32 + Action uint8 + Share uint8 + Flags uint16 + Expires uint16 + Linger uint16 + X__flr_pad uint32 +} + +type ipv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Ifindex int32 +} + +type groupReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group kernelSockaddrStorage +} + +type groupSourceReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group kernelSockaddrStorage + Source kernelSockaddrStorage +} + +type icmpv6Filter struct { + Data [8]uint32 +} + +type sockFProg struct { + Len uint16 + Pad_cgo_0 [6]byte + Filter *sockFilter +} + +type sockFilter struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_netbsd.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_netbsd.go new file mode 100644 index 000000000..bcada13b7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_netbsd.go @@ -0,0 +1,84 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_netbsd.go + +package ipv6 + +const ( + sysIPV6_UNICAST_HOPS = 0x4 + sysIPV6_MULTICAST_IF = 0x9 + sysIPV6_MULTICAST_HOPS = 0xa + sysIPV6_MULTICAST_LOOP = 0xb + sysIPV6_JOIN_GROUP = 0xc + sysIPV6_LEAVE_GROUP = 0xd + sysIPV6_PORTRANGE = 0xe + sysICMP6_FILTER = 0x12 + + sysIPV6_CHECKSUM = 0x1a + sysIPV6_V6ONLY = 0x1b + + sysIPV6_IPSEC_POLICY = 0x1c + + sysIPV6_RTHDRDSTOPTS = 0x23 + + sysIPV6_RECVPKTINFO = 0x24 + sysIPV6_RECVHOPLIMIT = 0x25 + sysIPV6_RECVRTHDR = 0x26 + sysIPV6_RECVHOPOPTS = 0x27 + sysIPV6_RECVDSTOPTS = 0x28 + + sysIPV6_USE_MIN_MTU = 0x2a + sysIPV6_RECVPATHMTU = 0x2b + sysIPV6_PATHMTU = 0x2c + + sysIPV6_PKTINFO = 0x2e + sysIPV6_HOPLIMIT = 0x2f + sysIPV6_NEXTHOP = 0x30 + sysIPV6_HOPOPTS = 0x31 + sysIPV6_DSTOPTS = 0x32 + sysIPV6_RTHDR = 0x33 + + sysIPV6_RECVTCLASS = 0x39 + + sysIPV6_TCLASS = 0x3d + sysIPV6_DONTFRAG = 0x3e + + sysIPV6_PORTRANGE_DEFAULT = 0x0 + sysIPV6_PORTRANGE_HIGH = 0x1 + sysIPV6_PORTRANGE_LOW = 0x2 + + sizeofSockaddrInet6 = 0x1c + sizeofInet6Pktinfo = 0x14 + sizeofIPv6Mtuinfo = 0x20 + + sizeofIPv6Mreq = 0x14 + + sizeofICMPv6Filter = 0x20 +) + +type sockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type ipv6Mtuinfo struct { + Addr sockaddrInet6 + Mtu uint32 +} + +type ipv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type icmpv6Filter struct { + Filt [8]uint32 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_openbsd.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_openbsd.go new file mode 100644 index 000000000..86cf3c637 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_openbsd.go @@ -0,0 +1,93 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_openbsd.go + +package ipv6 + +const ( + sysIPV6_UNICAST_HOPS = 0x4 + sysIPV6_MULTICAST_IF = 0x9 + sysIPV6_MULTICAST_HOPS = 0xa + sysIPV6_MULTICAST_LOOP = 0xb + sysIPV6_JOIN_GROUP = 0xc + sysIPV6_LEAVE_GROUP = 0xd + sysIPV6_PORTRANGE = 0xe + sysICMP6_FILTER = 0x12 + + sysIPV6_CHECKSUM = 0x1a + sysIPV6_V6ONLY = 0x1b + + sysIPV6_RTHDRDSTOPTS = 0x23 + + sysIPV6_RECVPKTINFO = 0x24 + sysIPV6_RECVHOPLIMIT = 0x25 + sysIPV6_RECVRTHDR = 0x26 + sysIPV6_RECVHOPOPTS = 0x27 + sysIPV6_RECVDSTOPTS = 0x28 + + sysIPV6_USE_MIN_MTU = 0x2a + sysIPV6_RECVPATHMTU = 0x2b + + sysIPV6_PATHMTU = 0x2c + + sysIPV6_PKTINFO = 0x2e + sysIPV6_HOPLIMIT = 0x2f + sysIPV6_NEXTHOP = 0x30 + sysIPV6_HOPOPTS = 0x31 + sysIPV6_DSTOPTS = 0x32 + sysIPV6_RTHDR = 0x33 + + sysIPV6_AUTH_LEVEL = 0x35 + sysIPV6_ESP_TRANS_LEVEL = 0x36 + sysIPV6_ESP_NETWORK_LEVEL = 0x37 + sysIPSEC6_OUTSA = 0x38 + sysIPV6_RECVTCLASS = 0x39 + + sysIPV6_AUTOFLOWLABEL = 0x3b + sysIPV6_IPCOMP_LEVEL = 0x3c + + sysIPV6_TCLASS = 0x3d + sysIPV6_DONTFRAG = 0x3e + sysIPV6_PIPEX = 0x3f + + sysIPV6_RTABLE = 0x1021 + + sysIPV6_PORTRANGE_DEFAULT = 0x0 + sysIPV6_PORTRANGE_HIGH = 0x1 + sysIPV6_PORTRANGE_LOW = 0x2 + + sizeofSockaddrInet6 = 0x1c + sizeofInet6Pktinfo = 0x14 + sizeofIPv6Mtuinfo = 0x20 + + sizeofIPv6Mreq = 0x14 + + sizeofICMPv6Filter = 0x20 +) + +type sockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type ipv6Mtuinfo struct { + Addr sockaddrInet6 + Mtu uint32 +} + +type ipv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type icmpv6Filter struct { + Filt [8]uint32 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_solaris.go b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_solaris.go new file mode 100644 index 000000000..cf1837dd2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/golang.org/x/net/ipv6/zsys_solaris.go @@ -0,0 +1,131 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_solaris.go + +package ipv6 + +const ( + sysIPV6_UNICAST_HOPS = 0x5 + sysIPV6_MULTICAST_IF = 0x6 + sysIPV6_MULTICAST_HOPS = 0x7 + sysIPV6_MULTICAST_LOOP = 0x8 + sysIPV6_JOIN_GROUP = 0x9 + sysIPV6_LEAVE_GROUP = 0xa + + sysIPV6_PKTINFO = 0xb + + sysIPV6_HOPLIMIT = 0xc + sysIPV6_NEXTHOP = 0xd + sysIPV6_HOPOPTS = 0xe + sysIPV6_DSTOPTS = 0xf + + sysIPV6_RTHDR = 0x10 + sysIPV6_RTHDRDSTOPTS = 0x11 + + sysIPV6_RECVPKTINFO = 0x12 + sysIPV6_RECVHOPLIMIT = 0x13 + sysIPV6_RECVHOPOPTS = 0x14 + + sysIPV6_RECVRTHDR = 0x16 + + sysIPV6_RECVRTHDRDSTOPTS = 0x17 + + sysIPV6_CHECKSUM = 0x18 + sysIPV6_RECVTCLASS = 0x19 + sysIPV6_USE_MIN_MTU = 0x20 + sysIPV6_DONTFRAG = 0x21 + sysIPV6_SEC_OPT = 0x22 + sysIPV6_SRC_PREFERENCES = 0x23 + sysIPV6_RECVPATHMTU = 0x24 + sysIPV6_PATHMTU = 0x25 + sysIPV6_TCLASS = 0x26 + sysIPV6_V6ONLY = 0x27 + + sysIPV6_RECVDSTOPTS = 0x28 + + sysMCAST_JOIN_GROUP = 0x29 + sysMCAST_LEAVE_GROUP = 0x2a + sysMCAST_BLOCK_SOURCE = 0x2b + sysMCAST_UNBLOCK_SOURCE = 0x2c + sysMCAST_JOIN_SOURCE_GROUP = 0x2d + sysMCAST_LEAVE_SOURCE_GROUP = 0x2e + + sysIPV6_PREFER_SRC_HOME = 0x1 + sysIPV6_PREFER_SRC_COA = 0x2 + sysIPV6_PREFER_SRC_PUBLIC = 0x4 + sysIPV6_PREFER_SRC_TMP = 0x8 + sysIPV6_PREFER_SRC_NONCGA = 0x10 + sysIPV6_PREFER_SRC_CGA = 0x20 + + sysIPV6_PREFER_SRC_MIPMASK = 0x3 + sysIPV6_PREFER_SRC_MIPDEFAULT = 0x1 + sysIPV6_PREFER_SRC_TMPMASK = 0xc + sysIPV6_PREFER_SRC_TMPDEFAULT = 0x4 + sysIPV6_PREFER_SRC_CGAMASK = 0x30 + sysIPV6_PREFER_SRC_CGADEFAULT = 0x10 + + sysIPV6_PREFER_SRC_MASK = 0x3f + + sysIPV6_PREFER_SRC_DEFAULT = 0x15 + + sysIPV6_BOUND_IF = 0x41 + sysIPV6_UNSPEC_SRC = 0x42 + + sysICMP6_FILTER = 0x1 + + sizeofSockaddrStorage = 0x100 + sizeofSockaddrInet6 = 0x20 + sizeofInet6Pktinfo = 0x14 + sizeofIPv6Mtuinfo = 0x24 + + sizeofIPv6Mreq = 0x14 + sizeofGroupReq = 0x104 + sizeofGroupSourceReq = 0x204 + + sizeofICMPv6Filter = 0x20 +) + +type sockaddrStorage struct { + Family uint16 + X_ss_pad1 [6]int8 + X_ss_align float64 + X_ss_pad2 [240]int8 +} + +type sockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 + X__sin6_src_id uint32 +} + +type inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type ipv6Mtuinfo struct { + Addr sockaddrInet6 + Mtu uint32 +} + +type ipv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type groupReq struct { + Interface uint32 + Pad_cgo_0 [256]byte +} + +type groupSourceReq struct { + Interface uint32 + Pad_cgo_0 [256]byte + Pad_cgo_1 [256]byte +} + +type icmpv6Filter struct { + X__icmp6_filt [8]uint32 +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/vendor.json b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/vendor.json new file mode 100644 index 000000000..55995f329 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/mdns/vendor/vendor.json @@ -0,0 +1,19 @@ +{ + "comment": "", + "ignore": "test", + "package": [ + {"path":"github.com/hashicorp/go.net/internal/iana","checksumSHA1":"vWTngSyR18lW99Dc7/PYzo4ki1U=","revision":"104dcad90073cd8d1e6828b2af19185b60cf3e29","revisionTime":"2015-10-06T20:33:46Z"}, + {"path":"github.com/hashicorp/go.net/ipv4","checksumSHA1":"GrzM6Y27ROBGp5PGnpmwD+UJkys=","revision":"104dcad90073cd8d1e6828b2af19185b60cf3e29","revisionTime":"2015-10-06T20:33:46Z"}, + {"path":"github.com/hashicorp/go.net/ipv6","checksumSHA1":"dqqbaM5psdihknQNCfQOWR2QRxo=","revision":"104dcad90073cd8d1e6828b2af19185b60cf3e29","revisionTime":"2015-10-06T20:33:46Z"}, + {"path":"github.com/hashicorp/mdns","checksumSHA1":"VsS1vJ8DIR9hu3J0dx7zWPUfabQ=","revision":"4e527d9d808175f132f949523e640c699e4253bb","revisionTime":"2017-02-21T17:29:40Z"}, + {"path":"github.com/miekg/dns","checksumSHA1":"XTeOihCDhjG6ltUKExoJ2uEzShk=","revision":"5364553f1ee9cddc7ac8b62dce148309c386695b","revisionTime":"2018-01-25T10:38:03Z"}, + {"path":"golang.org/x/crypto/ed25519","checksumSHA1":"1hwn8cgg4EVXhCpJIqmMbzqnUo0=","revision":"1875d0a70c90e57f11972aefd42276df65e895b9","revisionTime":"2018-01-27T19:02:20Z"}, + {"path":"golang.org/x/crypto/ed25519/internal/edwards25519","checksumSHA1":"LXFcVx8I587SnWmKycSDEq9yvK8=","revision":"1875d0a70c90e57f11972aefd42276df65e895b9","revisionTime":"2018-01-27T19:02:20Z"}, + {"path":"golang.org/x/net/bpf","checksumSHA1":"uX2McdP4VcQ6zkAF0Q4oyd0rFtU=","revision":"2fb46b16b8dda405028c50f7c7f0f9dd1fa6bfb1","revisionTime":"2018-02-02T11:17:09Z"}, + {"path":"golang.org/x/net/internal/iana","checksumSHA1":"5JWn/wMC+EWNDKI/AYE4JifQF54=","revision":"2fb46b16b8dda405028c50f7c7f0f9dd1fa6bfb1","revisionTime":"2018-02-02T11:17:09Z"}, + {"path":"golang.org/x/net/internal/socket","checksumSHA1":"WnI4058Oj6W4YSvyXAnK3qCKqvo=","revision":"2fb46b16b8dda405028c50f7c7f0f9dd1fa6bfb1","revisionTime":"2018-02-02T11:17:09Z"}, + {"path":"golang.org/x/net/ipv4","checksumSHA1":"zPTKyZ1C55w1fk1W+/qGE15jaek=","revision":"2fb46b16b8dda405028c50f7c7f0f9dd1fa6bfb1","revisionTime":"2018-02-02T11:17:09Z"}, + {"path":"golang.org/x/net/ipv6","checksumSHA1":"3L3n7qKMO9X8E1ibA5mExKvwbmI=","revision":"2fb46b16b8dda405028c50f7c7f0f9dd1fa6bfb1","revisionTime":"2018-02-02T11:17:09Z"} + ], + "rootPath": "github.com/hashicorp/go-discover/provider/mdns" +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/packet/packet_discover.go b/vendor/github.com/hashicorp/go-discover/provider/packet/packet_discover.go new file mode 100644 index 000000000..285697057 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/packet/packet_discover.go @@ -0,0 +1,147 @@ +package packet + +import ( + "fmt" + "log" + "os" + "strings" + + "github.com/packethost/packngo" +) + +const baseURL = "https://api.packet.net/" + +// Provider struct +type Provider struct { + userAgent string +} + +// SetUserAgent setter +func (p *Provider) SetUserAgent(s string) { + p.userAgent = s +} + +// Help function +func (p *Provider) Help() string { + return `Packet: + provider: "packet" + project: UUID of packet project. Required + auth_token: Packet authentication token. Required + url: Packet REST URL. Optional + address_type: "private_v4", "public_v4" or "public_v6". Defaults to "private_v4". Optional + facility: Filter for specific facility (Examples: "ewr1,ams1") + tag: Filter by tag (Examples: "tag1,tag2") + + Variables can also be provided by environmental variables: + export PACKET_PROJECT for project + export PACKET_URL for url + export PACKET_AUTH_TOKEN for auth_token +` +} + +// Addrs function +func (p *Provider) Addrs(args map[string]string, l *log.Logger) ([]string, error) { + authToken := argsOrEnv(args, "auth_token", "PACKET_AUTH_TOKEN") + projectID := argsOrEnv(args, "project", "PACKET_PROJECT") + packetURL := argsOrEnv(args, "url", "PACKET_URL") + addressType := args["address_type"] + packetFacilities := args["facility"] + packetTags := args["tag"] + + if addressType != "private_v4" && addressType != "public_v4" && addressType != "public_v6" { + l.Printf("[INFO] discover-packet: Address type %s is not supported. Valid values are {private_v4,public_v4,public_v6}. Falling back to 'private_v4'", addressType) + addressType = "private_v4" + } + + includeFacilities := includeArgs(packetFacilities) + includeTags := includeArgs(packetTags) + + c, err := client(p.userAgent, packetURL, authToken) + if err != nil { + return nil, fmt.Errorf("discover-packet: Initializing Packet client failed: %s", err) + } + + var devices []packngo.Device + + if projectID == "" { + return nil, fmt.Errorf("discover-packet: 'project' parameter must be provider") + } + + devices, _, err = c.Devices.List(projectID, nil) + if err != nil { + return nil, fmt.Errorf("discover-packet: Fetching Packet devices failed: %s", err) + } + + var addrs []string + for _, d := range devices { + + if len(includeFacilities) > 0 && !Include(includeFacilities, d.Facility.Code) { + continue + } + + if len(includeTags) > 0 && !Any(d.Tags, func(v string) bool { return Include(includeTags, v) }) { + continue + } + + addressFamily := 4 + if addressType == "public_v6" { + addressFamily = 6 + } + for _, n := range d.Network { + + if (n.Public == (addressType == "public_v4" || addressType == "public_v6")) && n.AddressFamily == addressFamily { + addrs = append(addrs, n.Address) + } + } + } + return addrs, nil +} + +func client(useragent, url, token string) (*packngo.Client, error) { + if url == "" { + url = baseURL + } + + return packngo.NewClientWithBaseURL(useragent, token, nil, url) +} +func argsOrEnv(args map[string]string, key, env string) string { + if value := args[key]; value != "" { + return value + } + return os.Getenv(env) +} + +func includeArgs(s string) []string { + var include []string + for _, localstring := range strings.Split(s, ",") { + if len(localstring) > 0 { + include = append(include, localstring) + } + } + return include +} + +// Index returns the first index of the target string t, or -1 if no match is found. +func Index(vs []string, t string) int { + for i, v := range vs { + if v == t { + return i + } + } + return -1 +} + +// Include returns true if the target string t is in the slice. +func Include(vs []string, t string) bool { + return Index(vs, t) >= 0 +} + +//Any returns true if one of the strings in the slice satisfies the predicate f. +func Any(vs []string, f func(string) bool) bool { + for _, v := range vs { + if f(v) { + return true + } + } + return false +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/CHANGELOG.md b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/CHANGELOG.md new file mode 100644 index 000000000..34e5d3114 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/CHANGELOG.md @@ -0,0 +1,54 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). +This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +This release contains a bunch of fixes to the package api after some more real +world use. There a few breaks in backwards compatibility, but we are tying to +minimize them and move towards a 1.0 release. + +### Added +- "acceptance" tests which run against production api (will incur charges) +- HardwareReservation to Device +- RootPassword to Device +- Spot market support +- Management and Manageable fields to discern between Elastic IPs and device unique IP +- Support for Volume attachments to Device and Volume +- Support for ProvisionEvents +- DoRequest sugar to Client +- Add ListProject function to the SSHKeys interface +- Operations for switching between Network Modes, aka "L2 support" + Support for Organization, Payment Method and Billing address resources + +### Fixed +- User.Emails json tag is fixed to match api response +- Single error object api response is now handled correctly + +### Changed +- IPService was split to DeviceIPService and ProjectIPService +- Renamed Device.IPXEScriptUrl -> Device.IPXEScriptURL +- Renamed DeviceCreateRequest.HostName -> DeviceCreateRequest.Hostname +- Renamed DeviceCreateRequest.IPXEScriptUrl -> DeviceCreateRequest.IPXEScriptURL +- Renamed DeviceUpdateRequest.HostName -> DeviceUpdateRequest.Hostname +- Renamed DeviceUpdateRequest.IPXEScriptUrl -> DeviceUpdateRequest.IPXEScriptURL +- Sync with packet.net api change to /projects/{id}/ips which no longer returns + the address in CIDR form +- Removed package level exported functions that should have never existed + +## [0.1.0] - 2017-08-17 + +Initial release, supports most of the api for interacting with: + +- Plans +- Users +- Emails +- SSH Keys +- Devices +- Projects +- Facilities +- Operating Systems +- IP Reservations +- Volumes diff --git a/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/LICENSE.txt b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/LICENSE.txt new file mode 100644 index 000000000..57c50110c --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/LICENSE.txt @@ -0,0 +1,56 @@ +Copyright (c) 2014 The packngo AUTHORS. All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +====================== +Portions of the client are based on code at: +https://github.com/google/go-github/ and +https://github.com/digitalocean/godo + +Copyright (c) 2013 The go-github AUTHORS. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + diff --git a/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/README.md b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/README.md new file mode 100644 index 000000000..a63faf5a9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/README.md @@ -0,0 +1,72 @@ +# packngo +Packet Go Api Client + +![](https://www.packet.net/media/images/xeiw-packettwitterprofilew.png) + + +Installation +------------ + +`go get github.com/packethost/packngo` + +Usage +----- + +To authenticate to the Packet API, you must have your API token exported in env var `PACKET_API_TOKEN`. + +This code snippet initializes Packet API client, and lists your Projects: + +```go +package main + +import ( + "log" + + "github.com/packethost/packngo" +) + +func main() { + c, err := packngo.NewClient() + if err != nil { + log.Fatal(err) + } + + ps, _, err := c.Projects.List(nil) + if err != nil { + log.Fatal(err) + } + for _, p := range ps { + log.Println(p.ID, p.Name) + } +} + +``` + +This lib is used by the official [terraform-provider-packet](https://github.com/terraform-providers/terraform-provider-packet). + +You can also learn a lot from the `*_test.go` sources. Almost all out tests touch the Packet API, so you can see how auth, querying and POSTing works. For example [devices_test.go](devices_test.go). + + + +Acceptance Tests +---------------- + +If you want to run tests against the actual Packet API, you must set envvar `PACKET_TEST_ACTUAL_API` to non-empty string for the `go test`. The device tests wait for the device creation, so it's best to run a few in parallel. + +To run a particular test, you can do + +``` +$ PACKNGO_TEST_ACTUAL_API=1 go test -v -run=TestAccDeviceBasic +``` + +If you want to see HTTP requests, set the `PACKNGO_DEBUG` env var to non-empty string, for example: + +``` +$ PACKNGO_DEBUG=1 PACKNGO_TEST_ACTUAL_API=1 go test -v -run=TestAccVolumeUpdate +``` + + +Committing +---------- + +Before committing, it's a good idea to run `gofmt -w *.go`. ([gofmt](https://golang.org/cmd/gofmt/)) diff --git a/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/billing_address.go b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/billing_address.go new file mode 100644 index 000000000..93255b322 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/billing_address.go @@ -0,0 +1,7 @@ +package packngo + +type BillingAddress struct { + StreetAddress string `json:"street_address,omitempty"` + PostalCode string `json:"postal_code,omitempty"` + CountryCode string `json:"country_code_alpha2,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/devices.go b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/devices.go new file mode 100644 index 000000000..b41bcf070 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/devices.go @@ -0,0 +1,257 @@ +package packngo + +import ( + "fmt" + "strings" +) + +const deviceBasePath = "/devices" + +// DeviceService interface defines available device methods +type DeviceService interface { + List(ProjectID string, listOpt *ListOptions) ([]Device, *Response, error) + Get(string) (*Device, *Response, error) + GetExtra(deviceID string, includes, excludes []string) (*Device, *Response, error) + Create(*DeviceCreateRequest) (*Device, *Response, error) + Update(string, *DeviceUpdateRequest) (*Device, *Response, error) + Delete(string) (*Response, error) + Reboot(string) (*Response, error) + PowerOff(string) (*Response, error) + PowerOn(string) (*Response, error) + Lock(string) (*Response, error) + Unlock(string) (*Response, error) +} + +type devicesRoot struct { + Devices []Device `json:"devices"` + Meta meta `json:"meta"` +} + +// Device represents a Packet device +type Device struct { + ID string `json:"id"` + Href string `json:"href,omitempty"` + Hostname string `json:"hostname,omitempty"` + State string `json:"state,omitempty"` + Created string `json:"created_at,omitempty"` + Updated string `json:"updated_at,omitempty"` + Locked bool `json:"locked,omitempty"` + BillingCycle string `json:"billing_cycle,omitempty"` + Storage map[string]interface{} `json:"storage,omitempty"` + Tags []string `json:"tags,omitempty"` + Network []*IPAddressAssignment `json:"ip_addresses"` + Volumes []*Volume `json:"volumes"` + OS *OS `json:"operating_system,omitempty"` + Plan *Plan `json:"plan,omitempty"` + Facility *Facility `json:"facility,omitempty"` + Project *Project `json:"project,omitempty"` + ProvisionEvents []*ProvisionEvent `json:"provisioning_events,omitempty"` + ProvisionPer float32 `json:"provisioning_percentage,omitempty"` + UserData string `json:"userdata,omitempty"` + RootPassword string `json:"root_password,omitempty"` + IPXEScriptURL string `json:"ipxe_script_url,omitempty"` + AlwaysPXE bool `json:"always_pxe,omitempty"` + HardwareReservation Href `json:"hardware_reservation,omitempty"` + SpotInstance bool `json:"spot_instance,omitempty"` + SpotPriceMax float64 `json:"spot_price_max,omitempty"` + TerminationTime *Timestamp `json:"termination_time,omitempty"` + NetworkPorts []Port `json:"network_ports,omitempty"` + CustomData map[string]interface{} `json:"customdata,omitempty"` +} + +type ProvisionEvent struct { + ID string `json:"id"` + Body string `json:"body"` + CreatedAt *Timestamp `json:"created_at,omitempty"` + Href string `json:"href"` + Interpolated string `json:"interpolated"` + Relationships []Href `json:"relationships"` + State string `json:"state"` + Type string `json:"type"` +} + +func (d Device) String() string { + return Stringify(d) +} + +// DeviceCreateRequest type used to create a Packet device +type DeviceCreateRequest struct { + Hostname string `json:"hostname"` + Plan string `json:"plan"` + Facility string `json:"facility"` + OS string `json:"operating_system"` + BillingCycle string `json:"billing_cycle"` + ProjectID string `json:"project_id"` + UserData string `json:"userdata"` + Storage string `json:"storage,omitempty"` + Tags []string `json:"tags"` + IPXEScriptURL string `json:"ipxe_script_url,omitempty"` + PublicIPv4SubnetSize int `json:"public_ipv4_subnet_size,omitempty"` + AlwaysPXE bool `json:"always_pxe,omitempty"` + HardwareReservationID string `json:"hardware_reservation_id,omitempty"` + SpotInstance bool `json:"spot_instance,omitempty"` + SpotPriceMax float64 `json:"spot_price_max,omitempty,string"` + TerminationTime *Timestamp `json:"termination_time,omitempty"` + CustomData string `json:"customdata,omitempty"` +} + +// DeviceUpdateRequest type used to update a Packet device +type DeviceUpdateRequest struct { + Hostname *string `json:"hostname,omitempty"` + Description *string `json:"description,omitempty"` + UserData *string `json:"userdata,omitempty"` + Locked *bool `json:"locked,omitempty"` + Tags *[]string `json:"tags,omitempty"` + AlwaysPXE *bool `json:"always_pxe,omitempty"` + IPXEScriptURL *string `json:"ipxe_script_url,omitempty"` + CustomData *string `json:"customdata,omitempty"` +} + +func (d DeviceCreateRequest) String() string { + return Stringify(d) +} + +// DeviceActionRequest type used to execute actions on devices +type DeviceActionRequest struct { + Type string `json:"type"` +} + +func (d DeviceActionRequest) String() string { + return Stringify(d) +} + +// DeviceServiceOp implements DeviceService +type DeviceServiceOp struct { + client *Client +} + +// List returns devices on a project +func (s *DeviceServiceOp) List(projectID string, listOpt *ListOptions) (devices []Device, resp *Response, err error) { + params := "include=facility" + if listOpt != nil { + params = listOpt.createURL() + } + path := fmt.Sprintf("%s/%s%s?%s", projectBasePath, projectID, deviceBasePath, params) + + for { + subset := new(devicesRoot) + + resp, err = s.client.DoRequest("GET", path, nil, subset) + if err != nil { + return nil, resp, err + } + + devices = append(devices, subset.Devices...) + + if subset.Meta.Next != nil && (listOpt == nil || listOpt.Page == 0) { + path = subset.Meta.Next.Href + if params != "" { + path = fmt.Sprintf("%s&%s", path, params) + } + continue + } + + return + } +} + +// Get returns a device by id +func (s *DeviceServiceOp) Get(deviceID string) (*Device, *Response, error) { + return s.GetExtra(deviceID, []string{"facility"}, nil) +} + +// GetExtra returns a device by id. Specifying either includes/excludes provides more or less desired +// detailed information about resources which would otherwise be represented with an href link +func (s *DeviceServiceOp) GetExtra(deviceID string, includes, excludes []string) (*Device, *Response, error) { + path := fmt.Sprintf("%s/%s", deviceBasePath, deviceID) + if includes != nil { + path += fmt.Sprintf("?include=%s", strings.Join(includes, ",")) + } else if excludes != nil { + path += fmt.Sprintf("?exclude=%s", strings.Join(excludes, ",")) + } + device := new(Device) + + resp, err := s.client.DoRequest("GET", path, nil, device) + if err != nil { + return nil, resp, err + } + + return device, resp, err +} + +// Create creates a new device +func (s *DeviceServiceOp) Create(createRequest *DeviceCreateRequest) (*Device, *Response, error) { + path := fmt.Sprintf("%s/%s%s", projectBasePath, createRequest.ProjectID, deviceBasePath) + device := new(Device) + + resp, err := s.client.DoRequest("POST", path, createRequest, device) + if err != nil { + return nil, resp, err + } + + return device, resp, err +} + +// Update updates an existing device +func (s *DeviceServiceOp) Update(deviceID string, updateRequest *DeviceUpdateRequest) (*Device, *Response, error) { + path := fmt.Sprintf("%s/%s?include=facility", deviceBasePath, deviceID) + device := new(Device) + + resp, err := s.client.DoRequest("PUT", path, updateRequest, device) + if err != nil { + return nil, resp, err + } + + return device, resp, err +} + +// Delete deletes a device +func (s *DeviceServiceOp) Delete(deviceID string) (*Response, error) { + path := fmt.Sprintf("%s/%s", deviceBasePath, deviceID) + + return s.client.DoRequest("DELETE", path, nil, nil) +} + +// Reboot reboots on a device +func (s *DeviceServiceOp) Reboot(deviceID string) (*Response, error) { + path := fmt.Sprintf("%s/%s/actions", deviceBasePath, deviceID) + action := &DeviceActionRequest{Type: "reboot"} + + return s.client.DoRequest("POST", path, action, nil) +} + +// PowerOff powers on a device +func (s *DeviceServiceOp) PowerOff(deviceID string) (*Response, error) { + path := fmt.Sprintf("%s/%s/actions", deviceBasePath, deviceID) + action := &DeviceActionRequest{Type: "power_off"} + + return s.client.DoRequest("POST", path, action, nil) +} + +// PowerOn powers on a device +func (s *DeviceServiceOp) PowerOn(deviceID string) (*Response, error) { + path := fmt.Sprintf("%s/%s/actions", deviceBasePath, deviceID) + action := &DeviceActionRequest{Type: "power_on"} + + return s.client.DoRequest("POST", path, action, nil) +} + +type lockType struct { + Locked bool `json:"locked"` +} + +// Lock sets a device to "locked" +func (s *DeviceServiceOp) Lock(deviceID string) (*Response, error) { + path := fmt.Sprintf("%s/%s", deviceBasePath, deviceID) + action := lockType{Locked: true} + + return s.client.DoRequest("PATCH", path, action, nil) +} + +// Unlock sets a device to "unlocked" +func (s *DeviceServiceOp) Unlock(deviceID string) (*Response, error) { + path := fmt.Sprintf("%s/%s", deviceBasePath, deviceID) + action := lockType{Locked: false} + + return s.client.DoRequest("PATCH", path, action, nil) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/email.go b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/email.go new file mode 100644 index 000000000..4c77d0f60 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/email.go @@ -0,0 +1,37 @@ +package packngo + +const emailBasePath = "/emails" + +// EmailService interface defines available email methods +type EmailService interface { + Get(string) (*Email, *Response, error) +} + +// Email represents a user's email address +type Email struct { + ID string `json:"id"` + Address string `json:"address"` + Default bool `json:"default,omitempty"` + URL string `json:"href,omitempty"` +} + +func (e Email) String() string { + return Stringify(e) +} + +// EmailServiceOp implements EmailService +type EmailServiceOp struct { + client *Client +} + +// Get retrieves an email by id +func (s *EmailServiceOp) Get(emailID string) (*Email, *Response, error) { + email := new(Email) + + resp, err := s.client.DoRequest("GET", emailBasePath, nil, email) + if err != nil { + return nil, resp, err + } + + return email, resp, err +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/facilities.go b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/facilities.go new file mode 100644 index 000000000..12aac9198 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/facilities.go @@ -0,0 +1,52 @@ +package packngo + +const facilityBasePath = "/facilities" + +// FacilityService interface defines available facility methods +type FacilityService interface { + List() ([]Facility, *Response, error) +} + +type facilityRoot struct { + Facilities []Facility `json:"facilities"` +} + +// Facility represents a Packet facility +type Facility struct { + ID string `json:"id"` + Name string `json:"name,omitempty"` + Code string `json:"code,omitempty"` + Features []string `json:"features,omitempty"` + Address *Address `json:"address,omitempty"` + URL string `json:"href,omitempty"` +} + +func (f Facility) String() string { + return Stringify(f) +} + +// Address - the physical address of the facility +type Address struct { + ID string `json:"id,omitempty"` +} + +func (a Address) String() string { + return Stringify(a) +} + +// FacilityServiceOp implements FacilityService +type FacilityServiceOp struct { + client *Client +} + +// List returns all available Packet facilities +func (s *FacilityServiceOp) List() ([]Facility, *Response, error) { + root := new(facilityRoot) + + resp, err := s.client.DoRequest("GET", facilityBasePath, nil, root) + if err != nil { + return nil, resp, err + } + + return root.Facilities, resp, err +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/ip.go b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/ip.go new file mode 100644 index 000000000..671eea60c --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/ip.go @@ -0,0 +1,194 @@ +package packngo + +import ( + "fmt" +) + +const ipBasePath = "/ips" + +// DeviceIPService handles assignment of addresses from reserved blocks to instances in a project. +type DeviceIPService interface { + Assign(deviceID string, assignRequest *AddressStruct) (*IPAddressAssignment, *Response, error) + Unassign(assignmentID string) (*Response, error) + Get(assignmentID string) (*IPAddressAssignment, *Response, error) +} + +// ProjectIPService handles reservation of IP address blocks for a project. +type ProjectIPService interface { + Get(reservationID string) (*IPAddressReservation, *Response, error) + List(projectID string) ([]IPAddressReservation, *Response, error) + Request(projectID string, ipReservationReq *IPReservationRequest) (*IPAddressReservation, *Response, error) + Remove(ipReservationID string) (*Response, error) + AvailableAddresses(ipReservationID string, r *AvailableRequest) ([]string, *Response, error) +} + +type ipAddressCommon struct { + ID string `json:"id"` + Address string `json:"address"` + Gateway string `json:"gateway"` + Network string `json:"network"` + AddressFamily int `json:"address_family"` + Netmask string `json:"netmask"` + Public bool `json:"public"` + CIDR int `json:"cidr"` + Created string `json:"created_at,omitempty"` + Updated string `json:"updated_at,omitempty"` + Href string `json:"href"` + Management bool `json:"management"` + Manageable bool `json:"manageable"` + Project Href `json:"project"` +} + +// IPAddressReservation is created when user sends IP reservation request for a project (considering it's within quota). +type IPAddressReservation struct { + ipAddressCommon + Assignments []Href `json:"assignments"` + Facility Facility `json:"facility,omitempty"` + Available string `json:"available"` + Addon bool `json:"addon"` + Bill bool `json:"bill"` +} + +// AvailableResponse is a type for listing of available addresses from a reserved block. +type AvailableResponse struct { + Available []string `json:"available"` +} + +// AvailableRequest is a type for listing available addresses from a reserved block. +type AvailableRequest struct { + CIDR int `json:"cidr"` +} + +// IPAddressAssignment is created when an IP address from reservation block is assigned to a device. +type IPAddressAssignment struct { + ipAddressCommon + AssignedTo Href `json:"assigned_to"` +} + +// IPReservationRequest represents the body of a reservation request. +type IPReservationRequest struct { + Type string `json:"type"` + Quantity int `json:"quantity"` + Comments string `json:"comments"` + Facility string `json:"facility"` +} + +// AddressStruct is a helper type for request/response with dict like {"address": ... } +type AddressStruct struct { + Address string `json:"address"` +} + +func deleteFromIP(client *Client, resourceID string) (*Response, error) { + path := fmt.Sprintf("%s/%s", ipBasePath, resourceID) + + return client.DoRequest("DELETE", path, nil, nil) +} + +func (i IPAddressReservation) String() string { + return Stringify(i) +} + +func (i IPAddressAssignment) String() string { + return Stringify(i) +} + +// DeviceIPServiceOp is interface for IP-address assignment methods. +type DeviceIPServiceOp struct { + client *Client +} + +// Unassign unassigns an IP address from the device to which it is currently assigned. +// This will remove the relationship between an IP and the device and will make the IP +// address available to be assigned to another device. +func (i *DeviceIPServiceOp) Unassign(assignmentID string) (*Response, error) { + return deleteFromIP(i.client, assignmentID) +} + +// Assign assigns an IP address to a device. +// The IP address must be in one of the IP ranges assigned to the device’s project. +func (i *DeviceIPServiceOp) Assign(deviceID string, assignRequest *AddressStruct) (*IPAddressAssignment, *Response, error) { + path := fmt.Sprintf("%s/%s%s", deviceBasePath, deviceID, ipBasePath) + ipa := new(IPAddressAssignment) + + resp, err := i.client.DoRequest("POST", path, assignRequest, ipa) + if err != nil { + return nil, resp, err + } + + return ipa, resp, err +} + +// Get returns assignment by ID. +func (i *DeviceIPServiceOp) Get(assignmentID string) (*IPAddressAssignment, *Response, error) { + path := fmt.Sprintf("%s/%s", ipBasePath, assignmentID) + ipa := new(IPAddressAssignment) + + resp, err := i.client.DoRequest("GET", path, nil, ipa) + if err != nil { + return nil, resp, err + } + + return ipa, resp, err +} + +// ProjectIPServiceOp is interface for IP assignment methods. +type ProjectIPServiceOp struct { + client *Client +} + +// Get returns reservation by ID. +func (i *ProjectIPServiceOp) Get(reservationID string) (*IPAddressReservation, *Response, error) { + path := fmt.Sprintf("%s/%s", ipBasePath, reservationID) + ipr := new(IPAddressReservation) + + resp, err := i.client.DoRequest("GET", path, nil, ipr) + if err != nil { + return nil, resp, err + } + + return ipr, resp, err +} + +// List provides a list of IP resevations for a single project. +func (i *ProjectIPServiceOp) List(projectID string) ([]IPAddressReservation, *Response, error) { + path := fmt.Sprintf("%s/%s%s", projectBasePath, projectID, ipBasePath) + reservations := new(struct { + Reservations []IPAddressReservation `json:"ip_addresses"` + }) + + resp, err := i.client.DoRequest("GET", path, nil, reservations) + if err != nil { + return nil, resp, err + } + return reservations.Reservations, resp, nil +} + +// Request requests more IP space for a project in order to have additional IP addresses to assign to devices. +func (i *ProjectIPServiceOp) Request(projectID string, ipReservationReq *IPReservationRequest) (*IPAddressReservation, *Response, error) { + path := fmt.Sprintf("%s/%s%s", projectBasePath, projectID, ipBasePath) + ipr := new(IPAddressReservation) + + resp, err := i.client.DoRequest("POST", path, ipReservationReq, ipr) + if err != nil { + return nil, resp, err + } + return ipr, resp, err +} + +// Remove removes an IP reservation from the project. +func (i *ProjectIPServiceOp) Remove(ipReservationID string) (*Response, error) { + return deleteFromIP(i.client, ipReservationID) +} + +// AvailableAddresses lists addresses available from a reserved block +func (i *ProjectIPServiceOp) AvailableAddresses(ipReservationID string, r *AvailableRequest) ([]string, *Response, error) { + path := fmt.Sprintf("%s/%s/available?cidr=%d", ipBasePath, ipReservationID, r.CIDR) + ar := new(AvailableResponse) + + resp, err := i.client.DoRequest("GET", path, r, ar) + if err != nil { + return nil, resp, err + } + return ar.Available, resp, nil + +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/operatingsystems.go b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/operatingsystems.go new file mode 100644 index 000000000..7fd7f27ad --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/operatingsystems.go @@ -0,0 +1,41 @@ +package packngo + +const osBasePath = "/operating-systems" + +// OSService interface defines available operating_systems methods +type OSService interface { + List() ([]OS, *Response, error) +} + +type osRoot struct { + OperatingSystems []OS `json:"operating_systems"` +} + +// OS represents a Packet operating system +type OS struct { + Name string `json:"name"` + Slug string `json:"slug"` + Distro string `json:"distro"` + Version string `json:"version"` +} + +func (o OS) String() string { + return Stringify(o) +} + +// OSServiceOp implements OSService +type OSServiceOp struct { + client *Client +} + +// List returns all available operating systems +func (s *OSServiceOp) List() ([]OS, *Response, error) { + root := new(osRoot) + + resp, err := s.client.DoRequest("GET", osBasePath, nil, root) + if err != nil { + return nil, resp, err + } + + return root.OperatingSystems, resp, err +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/organizations.go b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/organizations.go new file mode 100644 index 000000000..36e76f1a2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/organizations.go @@ -0,0 +1,147 @@ +package packngo + +import "fmt" + +// API documentation https://www.packet.net/developers/api/organizations/ +const organizationBasePath = "/organizations" + +// OrganizationService interface defines available organization methods +type OrganizationService interface { + List() ([]Organization, *Response, error) + Get(string) (*Organization, *Response, error) + Create(*OrganizationCreateRequest) (*Organization, *Response, error) + Update(string, *OrganizationUpdateRequest) (*Organization, *Response, error) + Delete(string) (*Response, error) + ListPaymentMethods(string) ([]PaymentMethod, *Response, error) +} + +type organizationsRoot struct { + Organizations []Organization `json:"organizations"` +} + +// Organization represents a Packet organization +type Organization struct { + ID string `json:"id"` + Name string `json:"name,omitempty"` + Description string `json:"description,omitempty"` + Website string `json:"website,omitempty"` + Twitter string `json:"twitter,omitempty"` + Created string `json:"created_at,omitempty"` + Updated string `json:"updated_at,omitempty"` + Address Address `json:"address,omitempty"` + TaxID string `json:"tax_id,omitempty"` + MainPhone string `json:"main_phone,omitempty"` + BillingPhone string `json:"billing_phone,omitempty"` + CreditAmount float64 `json:"credit_amount,omitempty"` + Logo string `json:"logo,omitempty"` + LogoThumb string `json:"logo_thumb,omitempty"` + Projects []Project `json:"projects,omitempty"` + URL string `json:"href,omitempty"` + Users []User `json:"members,omitempty"` + Owners []User `json:"owners,omitempty"` +} + +func (o Organization) String() string { + return Stringify(o) +} + +// OrganizationCreateRequest type used to create a Packet organization +type OrganizationCreateRequest struct { + Name string `json:"name"` + Description string `json:"description"` + Website string `json:"website"` + Twitter string `json:"twitter"` + Logo string `json:"logo"` +} + +func (o OrganizationCreateRequest) String() string { + return Stringify(o) +} + +// OrganizationUpdateRequest type used to update a Packet organization +type OrganizationUpdateRequest struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Website *string `json:"website,omitempty"` + Twitter *string `json:"twitter,omitempty"` + Logo *string `json:"logo,omitempty"` +} + +func (o OrganizationUpdateRequest) String() string { + return Stringify(o) +} + +// OrganizationServiceOp implements OrganizationService +type OrganizationServiceOp struct { + client *Client +} + +// List returns the user's organizations +func (s *OrganizationServiceOp) List() ([]Organization, *Response, error) { + root := new(organizationsRoot) + + resp, err := s.client.DoRequest("GET", organizationBasePath, nil, root) + if err != nil { + return nil, resp, err + } + + return root.Organizations, resp, err +} + +// Get returns a organization by id +func (s *OrganizationServiceOp) Get(organizationID string) (*Organization, *Response, error) { + path := fmt.Sprintf("%s/%s", organizationBasePath, organizationID) + organization := new(Organization) + + resp, err := s.client.DoRequest("GET", path, nil, organization) + if err != nil { + return nil, resp, err + } + + return organization, resp, err +} + +// Create creates a new organization +func (s *OrganizationServiceOp) Create(createRequest *OrganizationCreateRequest) (*Organization, *Response, error) { + organization := new(Organization) + + resp, err := s.client.DoRequest("POST", organizationBasePath, createRequest, organization) + if err != nil { + return nil, resp, err + } + + return organization, resp, err +} + +// Update updates an organization +func (s *OrganizationServiceOp) Update(id string, updateRequest *OrganizationUpdateRequest) (*Organization, *Response, error) { + path := fmt.Sprintf("%s/%s", organizationBasePath, id) + organization := new(Organization) + + resp, err := s.client.DoRequest("PATCH", path, updateRequest, organization) + if err != nil { + return nil, resp, err + } + + return organization, resp, err +} + +// Delete deletes an organizationID +func (s *OrganizationServiceOp) Delete(organizationID string) (*Response, error) { + path := fmt.Sprintf("%s/%s", organizationBasePath, organizationID) + + return s.client.DoRequest("DELETE", path, nil, nil) +} + +// ListPaymentMethods returns PaymentMethods for an organization +func (s *OrganizationServiceOp) ListPaymentMethods(organizationID string) ([]PaymentMethod, *Response, error) { + url := fmt.Sprintf("%s/%s%s", organizationBasePath, organizationID, paymentMethodBasePath) + root := new(paymentMethodsRoot) + + resp, err := s.client.DoRequest("GET", url, nil, root) + if err != nil { + return nil, resp, err + } + + return root.PaymentMethods, resp, err +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/packngo.go b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/packngo.go new file mode 100644 index 000000000..37b6c23a1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/packngo.go @@ -0,0 +1,306 @@ +package packngo + +import ( + "bytes" + "encoding/json" + "fmt" + "io" + "io/ioutil" + "log" + "net/http" + "net/http/httputil" + "net/url" + "os" + "strconv" + "strings" + "time" +) + +const ( + packetTokenEnvVar = "PACKET_AUTH_TOKEN" + libraryVersion = "0.1.0" + baseURL = "https://api.packet.net/" + userAgent = "packngo/" + libraryVersion + mediaType = "application/json" + debugEnvVar = "PACKNGO_DEBUG" + + headerRateLimit = "X-RateLimit-Limit" + headerRateRemaining = "X-RateLimit-Remaining" + headerRateReset = "X-RateLimit-Reset" +) + +// ListOptions specifies optional global API parameters +type ListOptions struct { + // for paginated result sets, page of results to retrieve + Page int `url:"page,omitempty"` + + // for paginated result sets, the number of results to return per page + PerPage int `url:"per_page,omitempty"` + + // specify which resources you want to return as collections instead of references + Includes string +} + +func (l *ListOptions) createURL() (url string) { + if l.Includes != "" { + url += fmt.Sprintf("include=%s", l.Includes) + } + + if l.Page != 0 { + if url != "" { + url += "&" + } + url += fmt.Sprintf("page=%d", l.Page) + } + + if l.PerPage != 0 { + if url != "" { + url += "&" + } + url += fmt.Sprintf("per_page=%d", l.PerPage) + } + + return +} + +// meta contains pagination information +type meta struct { + Self *Href `json:"self"` + First *Href `json:"first"` + Last *Href `json:"last"` + Previous *Href `json:"previous,omitempty"` + Next *Href `json:"next,omitempty"` + Total int `json:"total"` + CurrentPageNum int `json:"current_page"` + LastPageNum int `json:"last_page"` +} + +// Response is the http response from api calls +type Response struct { + *http.Response + Rate +} + +// Href is an API link +type Href struct { + Href string `json:"href"` +} + +func (r *Response) populateRate() { + // parse the rate limit headers and populate Response.Rate + if limit := r.Header.Get(headerRateLimit); limit != "" { + r.Rate.RequestLimit, _ = strconv.Atoi(limit) + } + if remaining := r.Header.Get(headerRateRemaining); remaining != "" { + r.Rate.RequestsRemaining, _ = strconv.Atoi(remaining) + } + if reset := r.Header.Get(headerRateReset); reset != "" { + if v, _ := strconv.ParseInt(reset, 10, 64); v != 0 { + r.Rate.Reset = Timestamp{time.Unix(v, 0)} + } + } +} + +// ErrorResponse is the http response used on errors +type ErrorResponse struct { + Response *http.Response + Errors []string `json:"errors"` + SingleError string `json:"error"` +} + +func (r *ErrorResponse) Error() string { + return fmt.Sprintf("%v %v: %d %v %v", + r.Response.Request.Method, r.Response.Request.URL, r.Response.StatusCode, strings.Join(r.Errors, ", "), r.SingleError) +} + +// Client is the base API Client +type Client struct { + client *http.Client + debug bool + + BaseURL *url.URL + + UserAgent string + ConsumerToken string + APIKey string + + RateLimit Rate + + // Packet Api Objects + Plans PlanService + Users UserService + Emails EmailService + SSHKeys SSHKeyService + Devices DeviceService + Projects ProjectService + Facilities FacilityService + OperatingSystems OSService + DeviceIPs DeviceIPService + DevicePorts DevicePortService + ProjectIPs ProjectIPService + ProjectVirtualNetworks ProjectVirtualNetworkService + Volumes VolumeService + VolumeAttachments VolumeAttachmentService + SpotMarket SpotMarketService + Organizations OrganizationService +} + +// NewRequest inits a new http request with the proper headers +func (c *Client) NewRequest(method, path string, body interface{}) (*http.Request, error) { + // relative path to append to the endpoint url, no leading slash please + rel, err := url.Parse(path) + if err != nil { + return nil, err + } + + u := c.BaseURL.ResolveReference(rel) + + // json encode the request body, if any + buf := new(bytes.Buffer) + if body != nil { + err := json.NewEncoder(buf).Encode(body) + if err != nil { + return nil, err + } + } + + req, err := http.NewRequest(method, u.String(), buf) + if err != nil { + return nil, err + } + + req.Close = true + + req.Header.Add("X-Auth-Token", c.APIKey) + req.Header.Add("X-Consumer-Token", c.ConsumerToken) + + req.Header.Add("Content-Type", mediaType) + req.Header.Add("Accept", mediaType) + req.Header.Add("User-Agent", userAgent) + return req, nil +} + +// Do executes the http request +func (c *Client) Do(req *http.Request, v interface{}) (*Response, error) { + resp, err := c.client.Do(req) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + response := Response{Response: resp} + response.populateRate() + if c.debug { + o, _ := httputil.DumpResponse(response.Response, true) + log.Printf("\n=======[RESPONSE]============\n%s\n\n", string(o)) + } + c.RateLimit = response.Rate + + err = checkResponse(resp) + // if the response is an error, return the ErrorResponse + if err != nil { + return &response, err + } + + if v != nil { + // if v implements the io.Writer interface, return the raw response + if w, ok := v.(io.Writer); ok { + io.Copy(w, resp.Body) + } else { + err = json.NewDecoder(resp.Body).Decode(v) + if err != nil { + return &response, err + } + } + } + + return &response, err +} + +// DoRequest is a convenience method, it calls NewRequest followed by Do +// v is the interface to unmarshal the response JSON into +func (c *Client) DoRequest(method, path string, body, v interface{}) (*Response, error) { + req, err := c.NewRequest(method, path, body) + if c.debug { + o, _ := httputil.DumpRequestOut(req, true) + log.Printf("\n=======[REQUEST]=============\n%s\n", string(o)) + } + if err != nil { + return nil, err + } + return c.Do(req, v) +} + +func NewClient() (*Client, error) { + apiToken := os.Getenv(packetTokenEnvVar) + if apiToken == "" { + return nil, fmt.Errorf("you must export %s.", packetTokenEnvVar) + } + c := NewClientWithAuth("packngo lib", apiToken, nil) + return c, nil + +} + +// NewClientWithAuth initializes and returns a Client, use this to get an API Client to operate on +// N.B.: Packet's API certificate requires Go 1.5+ to successfully parse. If you are using +// an older version of Go, pass in a custom http.Client with a custom TLS configuration +// that sets "InsecureSkipVerify" to "true" +func NewClientWithAuth(consumerToken string, apiKey string, httpClient *http.Client) *Client { + client, _ := NewClientWithBaseURL(consumerToken, apiKey, httpClient, baseURL) + return client +} + +// NewClientWithBaseURL returns a Client pointing to nonstandard API URL, e.g. +// for mocking the remote API +func NewClientWithBaseURL(consumerToken string, apiKey string, httpClient *http.Client, apiBaseURL string) (*Client, error) { + if httpClient == nil { + // Don't fall back on http.DefaultClient as it's not nice to adjust state + // implicitly. If the client wants to use http.DefaultClient, they can + // pass it in explicitly. + httpClient = &http.Client{} + } + + u, err := url.Parse(apiBaseURL) + if err != nil { + return nil, err + } + + c := &Client{client: httpClient, BaseURL: u, UserAgent: userAgent, ConsumerToken: consumerToken, APIKey: apiKey} + c.debug = os.Getenv(debugEnvVar) != "" + c.Plans = &PlanServiceOp{client: c} + c.Organizations = &OrganizationServiceOp{client: c} + c.Users = &UserServiceOp{client: c} + c.Emails = &EmailServiceOp{client: c} + c.SSHKeys = &SSHKeyServiceOp{client: c} + c.Devices = &DeviceServiceOp{client: c} + c.Projects = &ProjectServiceOp{client: c} + c.Facilities = &FacilityServiceOp{client: c} + c.OperatingSystems = &OSServiceOp{client: c} + c.DeviceIPs = &DeviceIPServiceOp{client: c} + c.DevicePorts = &DevicePortServiceOp{client: c} + c.ProjectVirtualNetworks = &ProjectVirtualNetworkServiceOp{client: c} + c.ProjectIPs = &ProjectIPServiceOp{client: c} + c.Volumes = &VolumeServiceOp{client: c} + c.VolumeAttachments = &VolumeAttachmentServiceOp{client: c} + c.SpotMarket = &SpotMarketServiceOp{client: c} + + return c, nil +} + +func checkResponse(r *http.Response) error { + // return if http status code is within 200 range + if c := r.StatusCode; c >= 200 && c <= 299 { + // response is good, return + return nil + } + + errorResponse := &ErrorResponse{Response: r} + data, err := ioutil.ReadAll(r.Body) + // if the response has a body, populate the message in errorResponse + if err == nil && len(data) > 0 { + json.Unmarshal(data, errorResponse) + } + + return errorResponse +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/payment_methods.go b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/payment_methods.go new file mode 100644 index 000000000..3479f0920 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/payment_methods.go @@ -0,0 +1,72 @@ +package packngo + +// API documentation https://www.packet.net/developers/api/paymentmethods/ +const paymentMethodBasePath = "/payment-methods" + +// ProjectService interface defines available project methods +type PaymentMethodService interface { + List() ([]PaymentMethod, *Response, error) + Get(string) (*PaymentMethod, *Response, error) + Create(*PaymentMethodCreateRequest) (*PaymentMethod, *Response, error) + Update(string, *PaymentMethodUpdateRequest) (*PaymentMethod, *Response, error) + Delete(string) (*Response, error) +} + +type paymentMethodsRoot struct { + PaymentMethods []PaymentMethod `json:"payment_methods"` +} + +// PaymentMethod represents a Packet payment method of an organization +type PaymentMethod struct { + ID string `json:"id"` + Name string `json:"name,omitempty"` + Created string `json:"created_at,omitempty"` + Updated string `json:"updated_at,omitempty"` + Nonce string `json:"nonce,omitempty"` + Default bool `json:"default,omitempty"` + Organization Organization `json:"organization,omitempty"` + Projects []Project `json:"projects,omitempty"` + Type string `json:"type,omitempty"` + CardholderName string `json:"cardholder_name,omitempty"` + ExpMonth string `json:"expiration_month,omitempty"` + ExpYear string `json:"expiration_year,omitempty"` + Last4 string `json:"last_4,omitempty"` + BillingAddress BillingAddress `json:"billing_address,omitempty"` + URL string `json:"href,omitempty"` +} + +func (pm PaymentMethod) String() string { + return Stringify(pm) +} + +// PaymentMethodCreateRequest type used to create a Packet payment method of an organization +type PaymentMethodCreateRequest struct { + Name string `json:"name"` + Nonce string `json:"name"` + CardholderName string `json:"cardholder_name,omitempty"` + ExpMonth string `json:"expiration_month,omitempty"` + ExpYear string `json:"expiration_year,omitempty"` + BillingAddress string `json:"billing_address,omitempty"` +} + +func (pm PaymentMethodCreateRequest) String() string { + return Stringify(pm) +} + +// PaymentMethodUpdateRequest type used to update a Packet payment method of an organization +type PaymentMethodUpdateRequest struct { + Name *string `json:"name,omitempty"` + CardholderName *string `json:"cardholder_name,omitempty"` + ExpMonth *string `json:"expiration_month,omitempty"` + ExpYear *string `json:"expiration_year,omitempty"` + BillingAddress *string `json:"billing_address,omitempty"` +} + +func (pm PaymentMethodUpdateRequest) String() string { + return Stringify(pm) +} + +// PaymentMethodServiceOp implements PaymentMethodService +type PaymentMethodServiceOp struct { + client *Client +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/plans.go b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/plans.go new file mode 100644 index 000000000..148a2a5ce --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/plans.go @@ -0,0 +1,117 @@ +package packngo + +const planBasePath = "/plans" + +// PlanService interface defines available plan methods +type PlanService interface { + List() ([]Plan, *Response, error) +} + +type planRoot struct { + Plans []Plan `json:"plans"` +} + +// Plan represents a Packet service plan +type Plan struct { + ID string `json:"id"` + Slug string `json:"slug,omitempty"` + Name string `json:"name,omitempty"` + Description string `json:"description,omitempty"` + Line string `json:"line,omitempty"` + Specs *Specs `json:"specs,omitempty"` + Pricing *Pricing `json:"pricing,omitempty"` +} + +func (p Plan) String() string { + return Stringify(p) +} + +// Specs - the server specs for a plan +type Specs struct { + Cpus []*Cpus `json:"cpus,omitempty"` + Memory *Memory `json:"memory,omitempty"` + Drives []*Drives `json:"drives,omitempty"` + Nics []*Nics `json:"nics,omitempty"` + Features *Features `json:"features,omitempty"` +} + +func (s Specs) String() string { + return Stringify(s) +} + +// Cpus - the CPU config details for specs on a plan +type Cpus struct { + Count int `json:"count,omitempty"` + Type string `json:"type,omitempty"` +} + +func (c Cpus) String() string { + return Stringify(c) +} + +// Memory - the RAM config details for specs on a plan +type Memory struct { + Total string `json:"total,omitempty"` +} + +func (m Memory) String() string { + return Stringify(m) +} + +// Drives - the storage config details for specs on a plan +type Drives struct { + Count int `json:"count,omitempty"` + Size string `json:"size,omitempty"` + Type string `json:"type,omitempty"` +} + +func (d Drives) String() string { + return Stringify(d) +} + +// Nics - the network hardware details for specs on a plan +type Nics struct { + Count int `json:"count,omitempty"` + Type string `json:"type,omitempty"` +} + +func (n Nics) String() string { + return Stringify(n) +} + +// Features - other features in the specs for a plan +type Features struct { + Raid bool `json:"raid,omitempty"` + Txt bool `json:"txt,omitempty"` +} + +func (f Features) String() string { + return Stringify(f) +} + +// Pricing - the pricing options on a plan +type Pricing struct { + Hourly float32 `json:"hourly,omitempty"` + Monthly float32 `json:"monthly,omitempty"` +} + +func (p Pricing) String() string { + return Stringify(p) +} + +// PlanServiceOp implements PlanService +type PlanServiceOp struct { + client *Client +} + +// List method returns all available plans +func (s *PlanServiceOp) List() ([]Plan, *Response, error) { + root := new(planRoot) + + resp, err := s.client.DoRequest("GET", planBasePath, nil, root) + if err != nil { + return nil, resp, err + } + + return root.Plans, resp, err +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/ports.go b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/ports.go new file mode 100644 index 000000000..c0f79d38e --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/ports.go @@ -0,0 +1,225 @@ +package packngo + +import ( + "fmt" +) + +const portBasePath = "/ports" + +type NetworkType int + +const ( + NetworkL3 NetworkType = iota + NetworkHybrid + NetworkL2Bonded + NetworkL2Individual + NetworkUnknown +) + +// DevicePortService handles operations on a port which belongs to a particular device +type DevicePortService interface { + Assign(*PortAssignRequest) (*Port, *Response, error) + Unassign(*PortAssignRequest) (*Port, *Response, error) + Bond(*BondRequest) (*Port, *Response, error) + Disbond(*DisbondRequest) (*Port, *Response, error) + PortToLayerTwo(string) (*Port, *Response, error) + PortToLayerThree(string) (*Port, *Response, error) + DeviceToLayerTwo(string) (*Device, error) + DeviceToLayerThree(string) (*Device, error) + DeviceNetworkType(string) (NetworkType, error) + GetBondPort(string) (*Port, error) + GetPortByName(string, string) (*Port, error) +} + +type PortData struct { + MAC string `json:"mac"` + Bonded bool `json:"bonded"` +} + +type Port struct { + ID string `json:"id"` + Type string `json:"type"` + Name string `json:"name"` + Data PortData `json:"data"` + AttachedVirtualNetworks []VirtualNetwork `json:"virtual_networks"` +} + +type AddressRequest struct { + AddressFamily int `json:"address_family"` + Public bool `json:"public"` +} + +type BackToL3Request struct { + RequestIPs []AddressRequest `json:"request_ips"` +} + +type DevicePortServiceOp struct { + client *Client +} + +type PortAssignRequest struct { + PortID string `json:"id"` + VirtualNetworkID string `json:"vnid"` +} + +type BondRequest struct { + PortID string `json:"id"` + BulkEnable bool `json:"bulk_enable"` +} + +type DisbondRequest struct { + PortID string `json:"id"` + BulkDisable bool `json:"bulk_disable"` +} + +func (i *DevicePortServiceOp) GetBondPort(deviceID string) (*Port, error) { + device, _, err := i.client.Devices.Get(deviceID) + if err != nil { + return nil, err + } + for _, port := range device.NetworkPorts { + if port.Type == "NetworkBondPort" { + return &port, nil + } + } + + return nil, fmt.Errorf("No bonded port found in device %s", deviceID) +} + +func (i *DevicePortServiceOp) GetPortByName(deviceID, name string) (*Port, error) { + device, _, err := i.client.Devices.Get(deviceID) + if err != nil { + return nil, err + } + for _, port := range device.NetworkPorts { + if port.Name == name { + return &port, nil + } + } + + return nil, fmt.Errorf("Port %s not found in device %s", name, deviceID) +} + +func (i *DevicePortServiceOp) Assign(par *PortAssignRequest) (*Port, *Response, error) { + path := fmt.Sprintf("%s/%s/assign", portBasePath, par.PortID) + return i.portAction(path, par) +} + +func (i *DevicePortServiceOp) Unassign(par *PortAssignRequest) (*Port, *Response, error) { + path := fmt.Sprintf("%s/%s/unassign", portBasePath, par.PortID) + return i.portAction(path, par) +} + +func (i *DevicePortServiceOp) Bond(br *BondRequest) (*Port, *Response, error) { + path := fmt.Sprintf("%s/%s/bond", portBasePath, br.PortID) + return i.portAction(path, br) +} + +func (i *DevicePortServiceOp) Disbond(dr *DisbondRequest) (*Port, *Response, error) { + path := fmt.Sprintf("%s/%s/disbond", portBasePath, dr.PortID) + return i.portAction(path, dr) +} + +func (i *DevicePortServiceOp) portAction(path string, req interface{}) (*Port, *Response, error) { + port := new(Port) + + resp, err := i.client.DoRequest("POST", path, req, port) + if err != nil { + return nil, resp, err + } + + return port, resp, err +} + +func (i *DevicePortServiceOp) PortToLayerTwo(portID string) (*Port, *Response, error) { + path := fmt.Sprintf("%s/%s/convert/layer-2", portBasePath, portID) + port := new(Port) + + resp, err := i.client.DoRequest("POST", path, nil, port) + if err != nil { + return nil, resp, err + } + + return port, resp, err +} + +func (i *DevicePortServiceOp) PortToLayerThree(portID string) (*Port, *Response, error) { + path := fmt.Sprintf("%s/%s/convert/layer-3", portBasePath, portID) + port := new(Port) + + req := BackToL3Request{ + RequestIPs: []AddressRequest{ + AddressRequest{AddressFamily: 4, Public: true}, + AddressRequest{AddressFamily: 4, Public: false}, + AddressRequest{AddressFamily: 6, Public: true}, + }, + } + + resp, err := i.client.DoRequest("POST", path, &req, port) + if err != nil { + return nil, resp, err + } + + return port, resp, err +} + +func (i *DevicePortServiceOp) DeviceNetworkType(deviceID string) (NetworkType, error) { + d, _, err := i.client.Devices.Get(deviceID) + if err != nil { + return NetworkUnknown, err + } + if d.Plan.Slug == "baremetal_0" || d.Plan.Slug == "baremetal_1" { + return NetworkL3, nil + } + if d.Plan.Slug == "baremetal_1e" { + return NetworkHybrid, nil + } + if len(d.NetworkPorts) < 1 { + // really? + return NetworkL2Individual, nil + } + if d.NetworkPorts[0].Data.Bonded { + if d.NetworkPorts[2].Data.Bonded { + for _, ip := range d.Network { + if ip.Management { + return NetworkL3, nil + } + } + return NetworkL2Bonded, nil + } else { + return NetworkHybrid, nil + } + } + return NetworkL2Individual, nil +} + +func (i *DevicePortServiceOp) DeviceToLayerThree(deviceID string) (*Device, error) { + // hopefull all the VLANs are unassigned at this point + bond0, err := i.client.DevicePorts.GetBondPort(deviceID) + if err != nil { + return nil, err + } + + bond0, _, err = i.client.DevicePorts.PortToLayerThree(bond0.ID) + if err != nil { + return nil, err + } + d, _, err := i.client.Devices.Get(deviceID) + return d, err +} + +// DeviceToLayerTwo converts device to L2 networking. Use bond0 to attach VLAN. +func (i *DevicePortServiceOp) DeviceToLayerTwo(deviceID string) (*Device, error) { + bond0, err := i.client.DevicePorts.GetBondPort(deviceID) + if err != nil { + return nil, err + } + + bond0, _, err = i.client.DevicePorts.PortToLayerTwo(bond0.ID) + if err != nil { + return nil, err + } + d, _, err := i.client.Devices.Get(deviceID) + return d, err + +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/projects.go b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/projects.go new file mode 100644 index 000000000..814b5e3c1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/projects.go @@ -0,0 +1,138 @@ +package packngo + +import "fmt" + +const projectBasePath = "/projects" + +// ProjectService interface defines available project methods +type ProjectService interface { + List(listOpt *ListOptions) ([]Project, *Response, error) + Get(string) (*Project, *Response, error) + Create(*ProjectCreateRequest) (*Project, *Response, error) + Update(string, *ProjectUpdateRequest) (*Project, *Response, error) + Delete(string) (*Response, error) +} + +type projectsRoot struct { + Projects []Project `json:"projects"` + Meta meta `json:"meta"` +} + +// Project represents a Packet project +type Project struct { + ID string `json:"id"` + Name string `json:"name,omitempty"` + Organization Organization `json:"organization,omitempty"` + Created string `json:"created_at,omitempty"` + Updated string `json:"updated_at,omitempty"` + Users []User `json:"members,omitempty"` + Devices []Device `json:"devices,omitempty"` + SSHKeys []SSHKey `json:"ssh_keys,omitempty"` + URL string `json:"href,omitempty"` + PaymentMethod PaymentMethod `json:"payment_method,omitempty"` +} + +func (p Project) String() string { + return Stringify(p) +} + +// ProjectCreateRequest type used to create a Packet project +type ProjectCreateRequest struct { + Name string `json:"name"` + PaymentMethodID string `json:"payment_method_id,omitempty"` + OrganizationID string `json:"organization_id,omitempty"` +} + +func (p ProjectCreateRequest) String() string { + return Stringify(p) +} + +// ProjectUpdateRequest type used to update a Packet project +type ProjectUpdateRequest struct { + Name *string `json:"name,omitempty"` + PaymentMethodID *string `json:"payment_method_id,omitempty"` +} + +func (p ProjectUpdateRequest) String() string { + return Stringify(p) +} + +// ProjectServiceOp implements ProjectService +type ProjectServiceOp struct { + client *Client +} + +// List returns the user's projects +func (s *ProjectServiceOp) List(listOpt *ListOptions) (projects []Project, resp *Response, err error) { + var params string + if listOpt != nil { + params = listOpt.createURL() + } + root := new(projectsRoot) + + path := fmt.Sprintf("%s?%s", projectBasePath, params) + + for { + resp, err = s.client.DoRequest("GET", path, nil, root) + if err != nil { + return nil, resp, err + } + + projects = append(projects, root.Projects...) + + if root.Meta.Next != nil && (listOpt == nil || listOpt.Page == 0) { + path = root.Meta.Next.Href + if params != "" { + path = fmt.Sprintf("%s&%s", path, params) + } + continue + } + + return + } +} + +// Get returns a project by id +func (s *ProjectServiceOp) Get(projectID string) (*Project, *Response, error) { + path := fmt.Sprintf("%s/%s", projectBasePath, projectID) + project := new(Project) + + resp, err := s.client.DoRequest("GET", path, nil, project) + if err != nil { + return nil, resp, err + } + + return project, resp, err +} + +// Create creates a new project +func (s *ProjectServiceOp) Create(createRequest *ProjectCreateRequest) (*Project, *Response, error) { + project := new(Project) + + resp, err := s.client.DoRequest("POST", projectBasePath, createRequest, project) + if err != nil { + return nil, resp, err + } + + return project, resp, err +} + +// Update updates a project +func (s *ProjectServiceOp) Update(id string, updateRequest *ProjectUpdateRequest) (*Project, *Response, error) { + path := fmt.Sprintf("%s/%s", projectBasePath, id) + project := new(Project) + + resp, err := s.client.DoRequest("PATCH", path, updateRequest, project) + if err != nil { + return nil, resp, err + } + + return project, resp, err +} + +// Delete deletes a project +func (s *ProjectServiceOp) Delete(projectID string) (*Response, error) { + path := fmt.Sprintf("%s/%s", projectBasePath, projectID) + + return s.client.DoRequest("DELETE", path, nil, nil) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/rate.go b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/rate.go new file mode 100644 index 000000000..965967d45 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/rate.go @@ -0,0 +1,12 @@ +package packngo + +// Rate provides the API request rate limit details +type Rate struct { + RequestLimit int `json:"request_limit"` + RequestsRemaining int `json:"requests_remaining"` + Reset Timestamp `json:"rate_reset"` +} + +func (r Rate) String() string { + return Stringify(r) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/spotmarket.go b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/spotmarket.go new file mode 100644 index 000000000..5dfb7d559 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/spotmarket.go @@ -0,0 +1,39 @@ +package packngo + +const spotMarketBasePath = "/market/spot/prices" + +// SpotMarketService expooses Spot Market methods +type SpotMarketService interface { + Prices() (PriceMap, *Response, error) +} + +// SpotMarketServiceOp implements SpotMarketService +type SpotMarketServiceOp struct { + client *Client +} + +// PriceMap is a map of [facility][plan]-> float Price +type PriceMap map[string]map[string]float64 + +// Prices gets current PriceMap from the API +func (s *SpotMarketServiceOp) Prices() (PriceMap, *Response, error) { + root := new(struct { + SMPs map[string]map[string]struct { + Price float64 `json:"price"` + } `json:"spot_market_prices"` + }) + + resp, err := s.client.DoRequest("GET", spotMarketBasePath, nil, root) + if err != nil { + return nil, resp, err + } + + prices := make(PriceMap) + for facility, planMap := range root.SMPs { + prices[facility] = map[string]float64{} + for plan, v := range planMap { + prices[facility][plan] = v.Price + } + } + return prices, resp, err +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/sshkeys.go b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/sshkeys.go new file mode 100644 index 000000000..260bf0876 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/sshkeys.go @@ -0,0 +1,138 @@ +package packngo + +import "fmt" + +const ( + sshKeyBasePath = "/ssh-keys" +) + +// SSHKeyService interface defines available device methods +type SSHKeyService interface { + List() ([]SSHKey, *Response, error) + ProjectList(string) ([]SSHKey, *Response, error) + Get(string) (*SSHKey, *Response, error) + Create(*SSHKeyCreateRequest) (*SSHKey, *Response, error) + Update(string, *SSHKeyUpdateRequest) (*SSHKey, *Response, error) + Delete(string) (*Response, error) +} + +type sshKeyRoot struct { + SSHKeys []SSHKey `json:"ssh_keys"` +} + +// SSHKey represents a user's ssh key +type SSHKey struct { + ID string `json:"id"` + Label string `json:"label"` + Key string `json:"key"` + FingerPrint string `json:"fingerprint"` + Created string `json:"created_at"` + Updated string `json:"updated_at"` + User User `json:"user,omitempty"` + URL string `json:"href,omitempty"` +} + +func (s SSHKey) String() string { + return Stringify(s) +} + +// SSHKeyCreateRequest type used to create an ssh key +type SSHKeyCreateRequest struct { + Label string `json:"label"` + Key string `json:"key"` + ProjectID string `json:"-"` +} + +func (s SSHKeyCreateRequest) String() string { + return Stringify(s) +} + +// SSHKeyUpdateRequest type used to update an ssh key +type SSHKeyUpdateRequest struct { + Label *string `json:"label,omitempty"` + Key *string `json:"key,omitempty"` +} + +func (s SSHKeyUpdateRequest) String() string { + return Stringify(s) +} + +// SSHKeyServiceOp implements SSHKeyService +type SSHKeyServiceOp struct { + client *Client +} + +func (s *SSHKeyServiceOp) list(url string) ([]SSHKey, *Response, error) { + root := new(sshKeyRoot) + + resp, err := s.client.DoRequest("GET", url, nil, root) + if err != nil { + return nil, resp, err + } + + return root.SSHKeys, resp, err +} + +// ProjectList lists ssh keys of a project +func (s *SSHKeyServiceOp) ProjectList(projectID string) ([]SSHKey, *Response, error) { + return s.list(fmt.Sprintf("%s/%s%s", projectBasePath, projectID, sshKeyBasePath)) + +} + +// List returns a user's ssh keys +func (s *SSHKeyServiceOp) List() ([]SSHKey, *Response, error) { + return s.list(sshKeyBasePath) +} + +// Get returns an ssh key by id +func (s *SSHKeyServiceOp) Get(sshKeyID string) (*SSHKey, *Response, error) { + path := fmt.Sprintf("%s/%s", sshKeyBasePath, sshKeyID) + sshKey := new(SSHKey) + + resp, err := s.client.DoRequest("GET", path, nil, sshKey) + if err != nil { + return nil, resp, err + } + + return sshKey, resp, err +} + +// Create creates a new ssh key +func (s *SSHKeyServiceOp) Create(createRequest *SSHKeyCreateRequest) (*SSHKey, *Response, error) { + path := sshKeyBasePath + if createRequest.ProjectID != "" { + path = fmt.Sprintf("%s/%s%s", projectBasePath, createRequest.ProjectID, sshKeyBasePath) + } + sshKey := new(SSHKey) + + resp, err := s.client.DoRequest("POST", path, createRequest, sshKey) + if err != nil { + return nil, resp, err + } + + return sshKey, resp, err +} + +// Update updates an ssh key +func (s *SSHKeyServiceOp) Update(id string, updateRequest *SSHKeyUpdateRequest) (*SSHKey, *Response, error) { + if updateRequest.Label == nil && updateRequest.Key == nil { + return nil, nil, fmt.Errorf("You must set either Label or Key string for SSH Key update") + } + path := fmt.Sprintf("%s/%s", sshKeyBasePath, id) + + sshKey := new(SSHKey) + + resp, err := s.client.DoRequest("PATCH", path, updateRequest, sshKey) + if err != nil { + return nil, resp, err + } + + return sshKey, resp, err +} + +// Delete deletes an ssh key +func (s *SSHKeyServiceOp) Delete(sshKeyID string) (*Response, error) { + path := fmt.Sprintf("%s/%s", sshKeyBasePath, sshKeyID) + + return s.client.DoRequest("DELETE", path, nil, nil) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/timestamp.go b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/timestamp.go new file mode 100644 index 000000000..c3320ed62 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/timestamp.go @@ -0,0 +1,35 @@ +package packngo + +import ( + "strconv" + "time" +) + +// Timestamp represents a time that can be unmarshalled from a JSON string +// formatted as either an RFC3339 or Unix timestamp. All +// exported methods of time.Time can be called on Timestamp. +type Timestamp struct { + time.Time +} + +func (t Timestamp) String() string { + return t.Time.String() +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +// Time is expected in RFC3339 or Unix format. +func (t *Timestamp) UnmarshalJSON(data []byte) (err error) { + str := string(data) + i, err := strconv.ParseInt(str, 10, 64) + if err == nil { + t.Time = time.Unix(i, 0) + } else { + t.Time, err = time.Parse(`"`+time.RFC3339+`"`, str) + } + return +} + +// Equal reports whether t and u are equal based on time.Equal +func (t Timestamp) Equal(u Timestamp) bool { + return t.Time.Equal(u.Time) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/user.go b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/user.go new file mode 100644 index 000000000..412db905e --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/user.go @@ -0,0 +1,64 @@ +package packngo + +const userBasePath = "/users" +const userPath = "/user" + +// UserService interface defines available user methods +type UserService interface { + Get(string) (*User, *Response, error) + Current() (*User, *Response, error) +} + +// User represents a Packet user +type User struct { + ID string `json:"id"` + FirstName string `json:"first_name,omitempty"` + LastName string `json:"last_name,omitempty"` + FullName string `json:"full_name,omitempty"` + Email string `json:"email,omitempty"` + TwoFactor string `json:"two_factor_auth,omitempty"` + DefaultOrganizationID string `json:"default_organization_id,omitempty"` + AvatarURL string `json:"avatar_url,omitempty"` + Facebook string `json:"twitter,omitempty"` + Twitter string `json:"facebook,omitempty"` + LinkedIn string `json:"linkedin,omitempty"` + Created string `json:"created_at,omitempty"` + Updated string `json:"updated_at,omitempty"` + TimeZone string `json:"timezone,omitempty"` + Emails []Email `json:"emails,omitempty"` + PhoneNumber string `json:"phone_number,omitempty"` + URL string `json:"href,omitempty"` +} + +func (u User) String() string { + return Stringify(u) +} + +// UserServiceOp implements UserService +type UserServiceOp struct { + client *Client +} + +// Get method gets a user by userID +func (s *UserServiceOp) Get(userID string) (*User, *Response, error) { + user := new(User) + + resp, err := s.client.DoRequest("GET", userBasePath, nil, user) + if err != nil { + return nil, resp, err + } + + return user, resp, err +} + +// Returns the user object for the currently logged-in user. +func (s *UserServiceOp) Current() (*User, *Response, error) { + user := new(User) + + resp, err := s.client.DoRequest("GET", userPath, nil, user) + if err != nil { + return nil, resp, err + } + + return user, resp, err +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/utils.go b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/utils.go new file mode 100644 index 000000000..57e5ef163 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/utils.go @@ -0,0 +1,91 @@ +package packngo + +import ( + "bytes" + "fmt" + "io" + "reflect" +) + +var timestampType = reflect.TypeOf(Timestamp{}) + +// Stringify creates a string representation of the provided message +func Stringify(message interface{}) string { + var buf bytes.Buffer + v := reflect.ValueOf(message) + stringifyValue(&buf, v) + return buf.String() +} + +// StreamToString converts a reader to a string +func StreamToString(stream io.Reader) string { + buf := new(bytes.Buffer) + buf.ReadFrom(stream) + return buf.String() +} + +// stringifyValue was graciously cargoculted from the goprotubuf library +func stringifyValue(w io.Writer, val reflect.Value) { + if val.Kind() == reflect.Ptr && val.IsNil() { + w.Write([]byte("")) + return + } + + v := reflect.Indirect(val) + + switch v.Kind() { + case reflect.String: + fmt.Fprintf(w, `"%s"`, v) + case reflect.Slice: + w.Write([]byte{'['}) + for i := 0; i < v.Len(); i++ { + if i > 0 { + w.Write([]byte{' '}) + } + + stringifyValue(w, v.Index(i)) + } + + w.Write([]byte{']'}) + return + case reflect.Struct: + if v.Type().Name() != "" { + w.Write([]byte(v.Type().String())) + } + + // special handling of Timestamp values + if v.Type() == timestampType { + fmt.Fprintf(w, "{%s}", v.Interface()) + return + } + + w.Write([]byte{'{'}) + + var sep bool + for i := 0; i < v.NumField(); i++ { + fv := v.Field(i) + if fv.Kind() == reflect.Ptr && fv.IsNil() { + continue + } + if fv.Kind() == reflect.Slice && fv.IsNil() { + continue + } + + if sep { + w.Write([]byte(", ")) + } else { + sep = true + } + + w.Write([]byte(v.Type().Field(i).Name)) + w.Write([]byte{':'}) + stringifyValue(w, fv) + } + + w.Write([]byte{'}'}) + default: + if v.CanInterface() { + fmt.Fprint(w, v.Interface()) + } + } +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/virtualnetworks.go b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/virtualnetworks.go new file mode 100644 index 000000000..ec0b9fc65 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/virtualnetworks.go @@ -0,0 +1,81 @@ +package packngo + +import ( + "fmt" +) + +const virtualNetworkBasePath = "/virtual-networks" + +// DevicePortService handles operations on a port which belongs to a particular device +type ProjectVirtualNetworkService interface { + List(projectID string) (*VirtualNetworkListResponse, *Response, error) + Create(*VirtualNetworkCreateRequest) (*VirtualNetwork, *Response, error) + Delete(virtualNetworkID string) (*Response, error) +} + +type VirtualNetwork struct { + ID string `json:"id"` + Description string `json:"description,omitempty"` + VXLAN int `json:"vxlan,omitempty"` + FacilityCode string `json:"facility_code,omitempty"` + CreatedAt string `json:"created_at,omitempty"` + Href string `json:"href"` +} + +type ProjectVirtualNetworkServiceOp struct { + client *Client +} + +type VirtualNetworkListResponse struct { + VirtualNetworks []VirtualNetwork `json:"virtual_networks"` +} + +func (i *ProjectVirtualNetworkServiceOp) List(projectID string) (*VirtualNetworkListResponse, *Response, error) { + path := fmt.Sprintf("%s/%s%s", projectBasePath, projectID, virtualNetworkBasePath) + output := new(VirtualNetworkListResponse) + + resp, err := i.client.DoRequest("GET", path, nil, output) + if err != nil { + return nil, nil, err + } + + return output, resp, nil +} + +type VirtualNetworkCreateRequest struct { + ProjectID string `json:"project_id"` + Description string `json:"description"` + Facility string `json:"facility"` + VXLAN int `json:"vxlan"` + VLAN int `json:"vlan"` +} + +type VirtualNetworkCreateResponse struct { + VirtualNetwork VirtualNetwork `json:"virtual_networks"` +} + +func (i *ProjectVirtualNetworkServiceOp) Create(input *VirtualNetworkCreateRequest) (*VirtualNetwork, *Response, error) { + // TODO: May need to add timestamp to output from 'post' request + // for the 'created_at' attribute of VirtualNetwork struct since + // API response doesn't include it + path := fmt.Sprintf("%s/%s%s", projectBasePath, input.ProjectID, virtualNetworkBasePath) + output := new(VirtualNetwork) + + resp, err := i.client.DoRequest("POST", path, input, output) + if err != nil { + return nil, nil, err + } + + return output, resp, nil +} + +func (i *ProjectVirtualNetworkServiceOp) Delete(virtualNetworkID string) (*Response, error) { + path := fmt.Sprintf("%s/%s", virtualNetworkBasePath, virtualNetworkID) + + resp, err := i.client.DoRequest("DELETE", path, nil, nil) + if err != nil { + return nil, err + } + + return resp, nil +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/volumes.go b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/volumes.go new file mode 100644 index 000000000..772672a37 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/github.com/packethost/packngo/volumes.go @@ -0,0 +1,239 @@ +package packngo + +import "fmt" + +const ( + volumeBasePath = "/storage" + attachmentsBasePath = "/attachments" +) + +// VolumeService interface defines available Volume methods +type VolumeService interface { + List(string, *ListOptions) ([]Volume, *Response, error) + Get(string) (*Volume, *Response, error) + Update(string, *VolumeUpdateRequest) (*Volume, *Response, error) + Delete(string) (*Response, error) + Create(*VolumeCreateRequest, string) (*Volume, *Response, error) + Lock(string) (*Response, error) + Unlock(string) (*Response, error) +} + +// VolumeAttachmentService defines attachment methdods +type VolumeAttachmentService interface { + Get(string) (*VolumeAttachment, *Response, error) + Create(string, string) (*VolumeAttachment, *Response, error) + Delete(string) (*Response, error) +} + +type volumesRoot struct { + Volumes []Volume `json:"volumes"` + Meta meta `json:"meta"` +} + +// Volume represents a volume +type Volume struct { + Attachments []*VolumeAttachment `json:"attachments,omitempty"` + BillingCycle string `json:"billing_cycle,omitempty"` + Created string `json:"created_at,omitempty"` + Description string `json:"description,omitempty"` + Facility *Facility `json:"facility,omitempty"` + Href string `json:"href,omitempty"` + ID string `json:"id"` + Locked bool `json:"locked,omitempty"` + Name string `json:"name,omitempty"` + Plan *Plan `json:"plan,omitempty"` + Project *Project `json:"project,omitempty"` + Size int `json:"size,omitempty"` + SnapshotPolicies []*SnapshotPolicy `json:"snapshot_policies,omitempty"` + State string `json:"state,omitempty"` + Updated string `json:"updated_at,omitempty"` +} + +// SnapshotPolicy used to execute actions on volume +type SnapshotPolicy struct { + ID string `json:"id"` + Href string `json:"href"` + SnapshotFrequency string `json:"snapshot_frequency,omitempty"` + SnapshotCount int `json:"snapshot_count,omitempty"` +} + +func (v Volume) String() string { + return Stringify(v) +} + +// VolumeCreateRequest type used to create a Packet volume +type VolumeCreateRequest struct { + BillingCycle string `json:"billing_cycle"` + Description string `json:"description,omitempty"` + Locked bool `json:"locked,omitempty"` + Size int `json:"size"` + PlanID string `json:"plan_id"` + FacilityID string `json:"facility_id"` + SnapshotPolicies []*SnapshotPolicy `json:"snapshot_policies,omitempty"` +} + +func (v VolumeCreateRequest) String() string { + return Stringify(v) +} + +// VolumeUpdateRequest type used to update a Packet volume +type VolumeUpdateRequest struct { + Description *string `json:"description,omitempty"` + PlanID *string `json:"plan_id,omitempty"` + Size *int `json:"size,omitempty"` + BillingCycle *string `json:"billing_cycle,omitempty"` +} + +// VolumeAttachment is a type from Packet API +type VolumeAttachment struct { + Href string `json:"href"` + ID string `json:"id"` + Volume Volume `json:"volume"` + Device Device `json:"device"` +} + +func (v VolumeUpdateRequest) String() string { + return Stringify(v) +} + +// VolumeAttachmentServiceOp implements VolumeService +type VolumeAttachmentServiceOp struct { + client *Client +} + +// VolumeServiceOp implements VolumeService +type VolumeServiceOp struct { + client *Client +} + +// List returns the volumes for a project +func (v *VolumeServiceOp) List(projectID string, listOpt *ListOptions) (volumes []Volume, resp *Response, err error) { + url := fmt.Sprintf("%s/%s%s", projectBasePath, projectID, volumeBasePath) + var params string + if listOpt != nil { + params = listOpt.createURL() + if params != "" { + url = fmt.Sprintf("%s?%s", url, params) + } + } + + for { + subset := new(volumesRoot) + + resp, err = v.client.DoRequest("GET", url, nil, subset) + if err != nil { + return nil, resp, err + } + + volumes = append(volumes, subset.Volumes...) + + if subset.Meta.Next != nil && (listOpt == nil || listOpt.Page == 0) { + url = subset.Meta.Next.Href + if params != "" { + url = fmt.Sprintf("%s&%s", url, params) + } + continue + } + + return + } +} + +// Get returns a volume by id +func (v *VolumeServiceOp) Get(volumeID string) (*Volume, *Response, error) { + path := fmt.Sprintf("%s/%s?include=facility,snapshot_policies,attachments.device", volumeBasePath, volumeID) + volume := new(Volume) + + resp, err := v.client.DoRequest("GET", path, nil, volume) + if err != nil { + return nil, resp, err + } + + return volume, resp, err +} + +// Update updates a volume +func (v *VolumeServiceOp) Update(id string, updateRequest *VolumeUpdateRequest) (*Volume, *Response, error) { + path := fmt.Sprintf("%s/%s", volumeBasePath, id) + volume := new(Volume) + + resp, err := v.client.DoRequest("PATCH", path, updateRequest, volume) + if err != nil { + return nil, resp, err + } + + return volume, resp, err +} + +// Delete deletes a volume +func (v *VolumeServiceOp) Delete(volumeID string) (*Response, error) { + path := fmt.Sprintf("%s/%s", volumeBasePath, volumeID) + + return v.client.DoRequest("DELETE", path, nil, nil) +} + +// Create creates a new volume for a project +func (v *VolumeServiceOp) Create(createRequest *VolumeCreateRequest, projectID string) (*Volume, *Response, error) { + url := fmt.Sprintf("%s/%s%s", projectBasePath, projectID, volumeBasePath) + volume := new(Volume) + + resp, err := v.client.DoRequest("POST", url, createRequest, volume) + if err != nil { + return nil, resp, err + } + + return volume, resp, err +} + +// Attachments + +// Create Attachment, i.e. attach volume to a device +func (v *VolumeAttachmentServiceOp) Create(volumeID, deviceID string) (*VolumeAttachment, *Response, error) { + url := fmt.Sprintf("%s/%s%s", volumeBasePath, volumeID, attachmentsBasePath) + volAttachParam := map[string]string{ + "device_id": deviceID, + } + volumeAttachment := new(VolumeAttachment) + + resp, err := v.client.DoRequest("POST", url, volAttachParam, volumeAttachment) + if err != nil { + return nil, resp, err + } + return volumeAttachment, resp, nil +} + +// Get gets attachment by id +func (v *VolumeAttachmentServiceOp) Get(attachmentID string) (*VolumeAttachment, *Response, error) { + path := fmt.Sprintf("%s%s/%s", volumeBasePath, attachmentsBasePath, attachmentID) + volumeAttachment := new(VolumeAttachment) + + resp, err := v.client.DoRequest("GET", path, nil, volumeAttachment) + if err != nil { + return nil, resp, err + } + + return volumeAttachment, resp, nil +} + +// Delete deletes attachment by id +func (v *VolumeAttachmentServiceOp) Delete(attachmentID string) (*Response, error) { + path := fmt.Sprintf("%s%s/%s", volumeBasePath, attachmentsBasePath, attachmentID) + + return v.client.DoRequest("DELETE", path, nil, nil) +} + +// Lock sets a volume to "locked" +func (s *VolumeServiceOp) Lock(id string) (*Response, error) { + path := fmt.Sprintf("%s/%s", volumeBasePath, id) + action := lockType{Locked: true} + + return s.client.DoRequest("PATCH", path, action, nil) +} + +// Unlock sets a volume to "unlocked" +func (s *VolumeServiceOp) Unlock(id string) (*Response, error) { + path := fmt.Sprintf("%s/%s", volumeBasePath, id) + action := lockType{Locked: false} + + return s.client.DoRequest("PATCH", path, action, nil) +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/vendor.json b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/vendor.json new file mode 100644 index 000000000..fca041e34 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/packet/vendor/vendor.json @@ -0,0 +1,13 @@ +{ + "comment": "", + "ignore": "test", + "package": [ + { + "checksumSHA1": "kItpnJu5G9MVC56waIyHLoQZt/s=", + "path": "github.com/packethost/packngo", + "revision": "b9cb5096f54c96687565b2f24be642483fb3fcf3", + "revisionTime": "2018-07-11T07:47:35Z" + } + ], + "rootPath": "github.com/hashicorp/go-discover/provider/packet" +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/tencentcloud/tencentcloud_discover.go b/vendor/github.com/hashicorp/go-discover/provider/tencentcloud/tencentcloud_discover.go new file mode 100644 index 000000000..57e195678 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/tencentcloud/tencentcloud_discover.go @@ -0,0 +1,134 @@ +// Package tencentcloud provides node discovery for TencentCloud. +package tencentcloud + +import ( + "fmt" + "io/ioutil" + "log" + + "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common" + "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile" + cvm "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312" +) + +type Provider struct { + userAgent string +} + +func (p *Provider) SetUserAgent(s string) { + p.userAgent = s +} + +func (p *Provider) Help() string { + return `TencentCloud: + + provider: "tencentcloud" + region: The TencentCloud region + tag_key: The tag key to filter on + tag_value: The tag value to filter on + address_type: "private_v4", "public_v4". (default: "private_v4") + access_key_id: The secret id of TencentCloud + access_key_secret: The secret key of TencentCloud + + This required permission to 'cvm:DescribeInstances'. + It is recommended you make a dedicated key used only for auto-joining. +` +} + +func (p *Provider) Addrs(args map[string]string, l *log.Logger) ([]string, error) { + if args["provider"] != "tencentcloud" { + return nil, fmt.Errorf("discover-tencentcloud: invalid provider " + args["provider"]) + } + + if l == nil { + l = log.New(ioutil.Discard, "", 0) + } + + region := args["region"] + tagKey := args["tag_key"] + tagValue := args["tag_value"] + addressType := args["address_type"] + accessKeyID := args["access_key_id"] + accessKeySecret := args["access_key_secret"] + + l.Printf("[DEBUG] discover-tencentcloud: Using region=%s, tag_key=%s, tag_value=%s", region, tagKey, tagValue) + if accessKeyID == "" { + l.Printf("[DEBUG] discover-tencentcloud: No static credentials provided") + } else { + l.Printf("[DEBUG] discover-tencentcloud: Static credentials provided") + } + + if region == "" { + l.Printf("[DEBUG] discover-tencentcloud: Region not provided") + return nil, fmt.Errorf("discover-tencentcloud: region missing") + } + l.Printf("[DEBUG] discover-tencentcloud: region is %s", region) + + if addressType == "" { + addressType = "private_v4" + } + + if addressType != "private_v4" && addressType != "public_v4" { + l.Printf("[DEBUG] discover-tencentcloud: Address type %s invalid", addressType) + return nil, fmt.Errorf("discover-tencentcloud: invalid address_type " + addressType) + } + l.Printf("[DEBUG] discover-tencentcloud: address type is %s", addressType) + + credential := common.NewCredential( + accessKeyID, + accessKeySecret, + ) + + cpf := profile.NewClientProfile() + cpf.HttpProfile.ReqMethod = "POST" + cpf.HttpProfile.ReqTimeout = 300 + cpf.Language = "en-US" + cvmClient, _ := cvm.NewClient(credential, region, cpf) + + l.Printf("[DEBUG] discover-tencentcloud: Filter instances with %s=%s", tagKey, tagValue) + request := cvm.NewDescribeInstancesRequest() + request.Filters = []*cvm.Filter{ + { + Name: stringToPointer("instance-state"), + Values: []*string{stringToPointer("RUNNING")}, + }, + { + Name: stringToPointer("tag:" + tagKey), + Values: []*string{stringToPointer(tagValue)}, + }, + } + + response, err := cvmClient.DescribeInstances(request) + if err != nil { + l.Printf("[DEBUG] discover-tencentcloud: DescribeInstances failed, %s", err) + return nil, fmt.Errorf("discover-tencentcloud: DescribeInstances failed, %s", err) + } + l.Printf("[DEBUG] discover-tencentcloud: Found %d instances", len(response.Response.InstanceSet)) + + var addrs []string + for _, v := range response.Response.InstanceSet { + switch addressType { + case "public_v4": + if len(v.PublicIpAddresses) == 0 { + l.Printf("[DEBUG] discover-tencentcloud: Instance %s has no public_v4", *v.InstanceId) + continue + } + l.Printf("[DEBUG] discover-tencentcloud: Instance %s has public_v4 %v", *v.InstanceId, *v.PublicIpAddresses[0]) + addrs = append(addrs, *v.PublicIpAddresses[0]) + case "private_v4": + if len(v.PrivateIpAddresses) == 0 { + l.Printf("[DEBUG] discover-tencentcloud: Instance %s has no private_v4", *v.InstanceId) + continue + } + l.Printf("[DEBUG] discover-tencentcloud: Instance %s has private_v4 %v", *v.InstanceId, *v.PrivateIpAddresses[0]) + addrs = append(addrs, *v.PrivateIpAddresses[0]) + } + } + + l.Printf("[DEBUG] discover-tencentcloud: Found address: %v", addrs) + return addrs, nil +} + +func stringToPointer(s string) *string { + return &s +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/tencentcloud/vendor/github.com/tencentcloud/tencentcloud-sdk-go/LICENSE b/vendor/github.com/hashicorp/go-discover/provider/tencentcloud/vendor/github.com/tencentcloud/tencentcloud-sdk-go/LICENSE new file mode 100644 index 000000000..efc75a225 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/tencentcloud/vendor/github.com/tencentcloud/tencentcloud-sdk-go/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright (c) 2017-2018 Tencent Ltd. + + 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. diff --git a/vendor/github.com/hashicorp/go-discover/provider/tencentcloud/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/client.go b/vendor/github.com/hashicorp/go-discover/provider/tencentcloud/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/client.go new file mode 100644 index 000000000..96a9644b1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/tencentcloud/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/client.go @@ -0,0 +1,264 @@ +package common + +import ( + "encoding/hex" + "encoding/json" + "fmt" + "log" + "net/http" + "net/http/httputil" + "strconv" + "strings" + "time" + + "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors" + tchttp "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http" + "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile" +) + +type Client struct { + region string + httpClient *http.Client + httpProfile *profile.HttpProfile + profile *profile.ClientProfile + credential *Credential + signMethod string + unsignedPayload bool + debug bool +} + +func (c *Client) Send(request tchttp.Request, response tchttp.Response) (err error) { + if request.GetDomain() == "" { + domain := c.httpProfile.Endpoint + if domain == "" { + domain = tchttp.GetServiceDomain(request.GetService()) + } + request.SetDomain(domain) + } + + if request.GetHttpMethod() == "" { + request.SetHttpMethod(c.httpProfile.ReqMethod) + } + + tchttp.CompleteCommonParams(request, c.GetRegion()) + + if c.signMethod == "HmacSHA1" || c.signMethod == "HmacSHA256" { + return c.sendWithSignatureV1(request, response) + } else { + return c.sendWithSignatureV3(request, response) + } +} + +func (c *Client) sendWithSignatureV1(request tchttp.Request, response tchttp.Response) (err error) { + // TODO: not an elegant way, it should be done in common params, but finally it need to refactor + request.GetParams()["Language"] = c.profile.Language + err = tchttp.ConstructParams(request) + if err != nil { + return err + } + err = signRequest(request, c.credential, c.signMethod) + if err != nil { + return err + } + httpRequest, err := http.NewRequest(request.GetHttpMethod(), request.GetUrl(), request.GetBodyReader()) + if err != nil { + return err + } + if request.GetHttpMethod() == "POST" { + httpRequest.Header["Content-Type"] = []string{"application/x-www-form-urlencoded"} + } + if c.debug { + outbytes, err := httputil.DumpRequest(httpRequest, true) + if err != nil { + log.Printf("[ERROR] dump request failed because %s", err) + return err + } + log.Printf("[DEBUG] http request = %s", outbytes) + } + httpResponse, err := c.httpClient.Do(httpRequest) + if err != nil { + msg := fmt.Sprintf("Fail to get response because %s", err) + return errors.NewTencentCloudSDKError("ClientError.NetworkError", msg, "") + } + err = tchttp.ParseFromHttpResponse(httpResponse, response) + return err +} + +func (c *Client) sendWithSignatureV3(request tchttp.Request, response tchttp.Response) (err error) { + headers := map[string]string{ + "Host": request.GetDomain(), + "X-TC-Action": request.GetAction(), + "X-TC-Version": request.GetVersion(), + "X-TC-Timestamp": request.GetParams()["Timestamp"], + "X-TC-RequestClient": request.GetParams()["RequestClient"], + "X-TC-Language": c.profile.Language, + } + if c.region != "" { + headers["X-TC-Region"] = c.region + } + if c.credential.Token != "" { + headers["X-TC-Token"] = c.credential.Token + } + if request.GetHttpMethod() == "GET" { + headers["Content-Type"] = "application/x-www-form-urlencoded" + } else { + headers["Content-Type"] = "application/json" + } + + // start signature v3 process + + // build canonical request string + httpRequestMethod := request.GetHttpMethod() + canonicalURI := "/" + canonicalQueryString := "" + if httpRequestMethod == "GET" { + err = tchttp.ConstructParams(request) + if err != nil { + return err + } + params := make(map[string]string) + for key, value := range request.GetParams() { + params[key] = value + } + delete(params, "Action") + delete(params, "Version") + delete(params, "Nonce") + delete(params, "Region") + delete(params, "RequestClient") + delete(params, "Timestamp") + canonicalQueryString = tchttp.GetUrlQueriesEncoded(params) + } + canonicalHeaders := fmt.Sprintf("content-type:%s\nhost:%s\n", headers["Content-Type"], headers["Host"]) + signedHeaders := "content-type;host" + requestPayload := "" + if httpRequestMethod == "POST" { + b, err := json.Marshal(request) + if err != nil { + return err + } + requestPayload = string(b) + } + hashedRequestPayload := "" + if c.unsignedPayload { + hashedRequestPayload = sha256hex("UNSIGNED-PAYLOAD") + headers["X-TC-Content-SHA256"] = "UNSIGNED-PAYLOAD" + } else { + hashedRequestPayload = sha256hex(requestPayload) + } + canonicalRequest := fmt.Sprintf("%s\n%s\n%s\n%s\n%s\n%s", + httpRequestMethod, + canonicalURI, + canonicalQueryString, + canonicalHeaders, + signedHeaders, + hashedRequestPayload) + //log.Println("canonicalRequest:", canonicalRequest) + + // build string to sign + algorithm := "TC3-HMAC-SHA256" + requestTimestamp := headers["X-TC-Timestamp"] + timestamp, _ := strconv.ParseInt(requestTimestamp, 10, 64) + t := time.Unix(timestamp, 0).UTC() + // must be the format 2006-01-02, ref to package time for more info + date := t.Format("2006-01-02") + credentialScope := fmt.Sprintf("%s/%s/tc3_request", date, request.GetService()) + hashedCanonicalRequest := sha256hex(canonicalRequest) + string2sign := fmt.Sprintf("%s\n%s\n%s\n%s", + algorithm, + requestTimestamp, + credentialScope, + hashedCanonicalRequest) + //log.Println("string2sign", string2sign) + + // sign string + secretDate := hmacsha256(date, "TC3"+c.credential.SecretKey) + secretService := hmacsha256(request.GetService(), secretDate) + secretKey := hmacsha256("tc3_request", secretService) + signature := hex.EncodeToString([]byte(hmacsha256(string2sign, secretKey))) + //log.Println("signature", signature) + + // build authorization + authorization := fmt.Sprintf("%s Credential=%s/%s, SignedHeaders=%s, Signature=%s", + algorithm, + c.credential.SecretId, + credentialScope, + signedHeaders, + signature) + //log.Println("authorization", authorization) + + headers["Authorization"] = authorization + url := "https://" + request.GetDomain() + request.GetPath() + if canonicalQueryString != "" { + url = url + "?" + canonicalQueryString + } + httpRequest, err := http.NewRequest(httpRequestMethod, url, strings.NewReader(requestPayload)) + if err != nil { + return err + } + for k, v := range headers { + httpRequest.Header[k] = []string{v} + } + if c.debug { + outbytes, err := httputil.DumpRequest(httpRequest, true) + if err != nil { + log.Printf("[ERROR] dump request failed because %s", err) + return err + } + log.Printf("[DEBUG] http request = %s", outbytes) + } + httpResponse, err := c.httpClient.Do(httpRequest) + if err != nil { + msg := fmt.Sprintf("Fail to get response because %s", err) + return errors.NewTencentCloudSDKError("ClientError.NetworkError", msg, "") + } + err = tchttp.ParseFromHttpResponse(httpResponse, response) + return err +} + +func (c *Client) GetRegion() string { + return c.region +} + +func (c *Client) Init(region string) *Client { + c.httpClient = &http.Client{} + c.region = region + c.signMethod = "TC3-HMAC-SHA256" + c.debug = false + log.SetFlags(log.LstdFlags | log.Lshortfile) + return c +} + +func (c *Client) WithSecretId(secretId, secretKey string) *Client { + c.credential = NewCredential(secretId, secretKey) + return c +} + +func (c *Client) WithCredential(cred *Credential) *Client { + c.credential = cred + return c +} + +func (c *Client) WithProfile(clientProfile *profile.ClientProfile) *Client { + c.profile = clientProfile + c.signMethod = clientProfile.SignMethod + c.unsignedPayload = clientProfile.UnsignedPayload + c.httpProfile = clientProfile.HttpProfile + c.httpClient.Timeout = time.Duration(c.httpProfile.ReqTimeout) * time.Second + return c +} + +func (c *Client) WithSignatureMethod(method string) *Client { + c.signMethod = method + return c +} + +func (c *Client) WithHttpTransport(transport http.RoundTripper) *Client { + c.httpClient.Transport = transport + return c +} + +func NewClientWithSecretId(secretId, secretKey, region string) (client *Client, err error) { + client = &Client{} + client.Init(region).WithSecretId(secretId, secretKey) + return +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/tencentcloud/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/credentials.go b/vendor/github.com/hashicorp/go-discover/provider/tencentcloud/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/credentials.go new file mode 100644 index 000000000..b734c1373 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/tencentcloud/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/credentials.go @@ -0,0 +1,58 @@ +package common + +type Credential struct { + SecretId string + SecretKey string + Token string +} + +func NewCredential(secretId, secretKey string) *Credential { + return &Credential{ + SecretId: secretId, + SecretKey: secretKey, + } +} + +func NewTokenCredential(secretId, secretKey, token string) *Credential { + return &Credential{ + SecretId: secretId, + SecretKey: secretKey, + Token: token, + } +} + +func (c *Credential) GetCredentialParams() map[string]string { + p := map[string]string{ + "SecretId": c.SecretId, + } + if c.Token != "" { + p["Token"] = c.Token + } + return p +} + +// Nowhere use them and we haven't well designed these structures and +// underlying method, which leads to the situation that it is hard to +// refactor it to interfaces. +// Hence they are removed and merged into Credential. + +//type TokenCredential struct { +// SecretId string +// SecretKey string +// Token string +//} + +//func NewTokenCredential(secretId, secretKey, token string) *TokenCredential { +// return &TokenCredential{ +// SecretId: secretId, +// SecretKey: secretKey, +// Token: token, +// } +//} + +//func (c *TokenCredential) GetCredentialParams() map[string]string { +// return map[string]string{ +// "SecretId": c.SecretId, +// "Token": c.Token, +// } +//} diff --git a/vendor/github.com/hashicorp/go-discover/provider/tencentcloud/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors/errors.go b/vendor/github.com/hashicorp/go-discover/provider/tencentcloud/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors/errors.go new file mode 100644 index 000000000..27589e59a --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/tencentcloud/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors/errors.go @@ -0,0 +1,35 @@ +package errors + +import ( + "fmt" +) + +type TencentCloudSDKError struct { + Code string + Message string + RequestId string +} + +func (e *TencentCloudSDKError) Error() string { + return fmt.Sprintf("[TencentCloudSDKError] Code=%s, Message=%s, RequestId=%s", e.Code, e.Message, e.RequestId) +} + +func NewTencentCloudSDKError(code, message, requestId string) error { + return &TencentCloudSDKError{ + Code: code, + Message: message, + RequestId: requestId, + } +} + +func (e *TencentCloudSDKError) GetCode() string { + return e.Code +} + +func (e *TencentCloudSDKError) GetMessage() string { + return e.Message +} + +func (e *TencentCloudSDKError) GetRequestId() string { + return e.RequestId +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/tencentcloud/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go b/vendor/github.com/hashicorp/go-discover/provider/tencentcloud/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go new file mode 100644 index 000000000..67943599c --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/tencentcloud/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go @@ -0,0 +1,233 @@ +package common + +import ( + "io" + //"log" + "math/rand" + "net/url" + "reflect" + "strconv" + "strings" + "time" +) + +const ( + POST = "POST" + GET = "GET" + + RootDomain = "tencentcloudapi.com" + Path = "/" +) + +type Request interface { + GetAction() string + GetBodyReader() io.Reader + GetDomain() string + GetHttpMethod() string + GetParams() map[string]string + GetPath() string + GetService() string + GetUrl() string + GetVersion() string + SetDomain(string) + SetHttpMethod(string) +} + +type BaseRequest struct { + httpMethod string + domain string + path string + params map[string]string + formParams map[string]string + + service string + version string + action string +} + +func (r *BaseRequest) GetAction() string { + return r.action +} + +func (r *BaseRequest) GetHttpMethod() string { + return r.httpMethod +} + +func (r *BaseRequest) GetParams() map[string]string { + return r.params +} + +func (r *BaseRequest) GetPath() string { + return r.path +} + +func (r *BaseRequest) GetDomain() string { + return r.domain +} + +func (r *BaseRequest) SetDomain(domain string) { + r.domain = domain +} + +func (r *BaseRequest) SetHttpMethod(method string) { + switch strings.ToUpper(method) { + case POST: + { + r.httpMethod = POST + } + case GET: + { + r.httpMethod = GET + } + default: + { + r.httpMethod = GET + } + } +} + +func (r *BaseRequest) GetService() string { + return r.service +} + +func (r *BaseRequest) GetUrl() string { + if r.httpMethod == GET { + return "https://" + r.domain + r.path + "?" + GetUrlQueriesEncoded(r.params) + } else if r.httpMethod == POST { + return "https://" + r.domain + r.path + } else { + return "" + } +} + +func (r *BaseRequest) GetVersion() string { + return r.version +} + +func GetUrlQueriesEncoded(params map[string]string) string { + values := url.Values{} + for key, value := range params { + if value != "" { + values.Add(key, value) + } + } + return values.Encode() +} + +func (r *BaseRequest) GetBodyReader() io.Reader { + if r.httpMethod == POST { + s := GetUrlQueriesEncoded(r.params) + return strings.NewReader(s) + } else { + return strings.NewReader("") + } +} + +func (r *BaseRequest) Init() *BaseRequest { + r.domain = "" + r.path = Path + r.params = make(map[string]string) + r.formParams = make(map[string]string) + return r +} + +func (r *BaseRequest) WithApiInfo(service, version, action string) *BaseRequest { + r.service = service + r.version = version + r.action = action + return r +} + +func GetServiceDomain(service string) (domain string) { + domain = service + "." + RootDomain + return +} + +func CompleteCommonParams(request Request, region string) { + params := request.GetParams() + params["Region"] = region + if request.GetVersion() != "" { + params["Version"] = request.GetVersion() + } + params["Action"] = request.GetAction() + params["Timestamp"] = strconv.FormatInt(time.Now().Unix(), 10) + params["Nonce"] = strconv.Itoa(rand.Int()) + params["RequestClient"] = "SDK_GO_3.0.84" +} + +func ConstructParams(req Request) (err error) { + value := reflect.ValueOf(req).Elem() + err = flatStructure(value, req, "") + //log.Printf("[DEBUG] params=%s", req.GetParams()) + return +} + +func flatStructure(value reflect.Value, request Request, prefix string) (err error) { + //log.Printf("[DEBUG] reflect value: %v", value.Type()) + valueType := value.Type() + for i := 0; i < valueType.NumField(); i++ { + tag := valueType.Field(i).Tag + nameTag, hasNameTag := tag.Lookup("name") + if !hasNameTag { + continue + } + field := value.Field(i) + kind := field.Kind() + if kind == reflect.Ptr && field.IsNil() { + continue + } + if kind == reflect.Ptr { + field = field.Elem() + kind = field.Kind() + } + key := prefix + nameTag + if kind == reflect.String { + s := field.String() + if s != "" { + request.GetParams()[key] = s + } + } else if kind == reflect.Bool { + request.GetParams()[key] = strconv.FormatBool(field.Bool()) + } else if kind == reflect.Int || kind == reflect.Int64 { + request.GetParams()[key] = strconv.FormatInt(field.Int(), 10) + } else if kind == reflect.Uint || kind == reflect.Uint64 { + request.GetParams()[key] = strconv.FormatUint(field.Uint(), 10) + } else if kind == reflect.Float64 { + request.GetParams()[key] = strconv.FormatFloat(field.Float(), 'f', -1, 64) + } else if kind == reflect.Slice { + list := value.Field(i) + for j := 0; j < list.Len(); j++ { + vj := list.Index(j) + key := prefix + nameTag + "." + strconv.Itoa(j) + kind = vj.Kind() + if kind == reflect.Ptr && vj.IsNil() { + continue + } + if kind == reflect.Ptr { + vj = vj.Elem() + kind = vj.Kind() + } + if kind == reflect.String { + request.GetParams()[key] = vj.String() + } else if kind == reflect.Bool { + request.GetParams()[key] = strconv.FormatBool(vj.Bool()) + } else if kind == reflect.Int || kind == reflect.Int64 { + request.GetParams()[key] = strconv.FormatInt(vj.Int(), 10) + } else if kind == reflect.Uint || kind == reflect.Uint64 { + request.GetParams()[key] = strconv.FormatUint(vj.Uint(), 10) + } else if kind == reflect.Float64 { + request.GetParams()[key] = strconv.FormatFloat(vj.Float(), 'f', -1, 64) + } else { + if err = flatStructure(vj, request, key+"."); err != nil { + return + } + } + } + } else { + if err = flatStructure(reflect.ValueOf(field.Interface()), request, prefix+nameTag+"."); err != nil { + return + } + } + } + return +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/tencentcloud/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/response.go b/vendor/github.com/hashicorp/go-discover/provider/tencentcloud/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/response.go new file mode 100644 index 000000000..288f21bdf --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/tencentcloud/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/response.go @@ -0,0 +1,81 @@ +package common + +import ( + "encoding/json" + "fmt" + "io/ioutil" + //"log" + "net/http" + + "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors" +) + +type Response interface { + ParseErrorFromHTTPResponse(body []byte) error +} + +type BaseResponse struct { +} + +type ErrorResponse struct { + Response struct { + Error struct { + Code string `json:"Code"` + Message string `json:"Message"` + } `json:"Error" omitempty` + RequestId string `json:"RequestId"` + } `json:"Response"` +} + +type DeprecatedAPIErrorResponse struct { + Code int `json:"code"` + Message string `json:"message"` + CodeDesc string `json:"codeDesc"` +} + +func (r *BaseResponse) ParseErrorFromHTTPResponse(body []byte) (err error) { + resp := &ErrorResponse{} + err = json.Unmarshal(body, resp) + if err != nil { + msg := fmt.Sprintf("Fail to parse json content: %s, because: %s", body, err) + return errors.NewTencentCloudSDKError("ClientError.ParseJsonError", msg, "") + } + if resp.Response.Error.Code != "" { + return errors.NewTencentCloudSDKError(resp.Response.Error.Code, resp.Response.Error.Message, resp.Response.RequestId) + } + + deprecated := &DeprecatedAPIErrorResponse{} + err = json.Unmarshal(body, deprecated) + if err != nil { + msg := fmt.Sprintf("Fail to parse json content: %s, because: %s", body, err) + return errors.NewTencentCloudSDKError("ClientError.ParseJsonError", msg, "") + } + if deprecated.Code != 0 { + return errors.NewTencentCloudSDKError(deprecated.CodeDesc, deprecated.Message, "") + } + return nil +} + +func ParseFromHttpResponse(hr *http.Response, response Response) (err error) { + defer hr.Body.Close() + body, err := ioutil.ReadAll(hr.Body) + if err != nil { + msg := fmt.Sprintf("Fail to read response body because %s", err) + return errors.NewTencentCloudSDKError("ClientError.IOError", msg, "") + } + if hr.StatusCode != 200 { + msg := fmt.Sprintf("Request fail with http status code: %s, with body: %s", hr.Status, body) + return errors.NewTencentCloudSDKError("ClientError.HttpStatusCodeError", msg, "") + } + //log.Printf("[DEBUG] Response Body=%s", body) + err = response.ParseErrorFromHTTPResponse(body) + if err != nil { + return + } + err = json.Unmarshal(body, &response) + if err != nil { + msg := fmt.Sprintf("Fail to parse json content: %s, because: %s", body, err) + return errors.NewTencentCloudSDKError("ClientError.ParseJsonError", msg, "") + } + return +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/tencentcloud/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile/client_profile.go b/vendor/github.com/hashicorp/go-discover/provider/tencentcloud/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile/client_profile.go new file mode 100644 index 000000000..21069ff99 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/tencentcloud/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile/client_profile.go @@ -0,0 +1,21 @@ +package profile + +type ClientProfile struct { + HttpProfile *HttpProfile + // Valid choices: HmacSHA1, HmacSHA256, TC3-HMAC-SHA256. + // Default value is TC3-HMAC-SHA256. + SignMethod string + UnsignedPayload bool + // Valid choices: zh-CN, en-US. + // Default value is zh-CN. + Language string +} + +func NewClientProfile() *ClientProfile { + return &ClientProfile{ + HttpProfile: NewHttpProfile(), + SignMethod: "TC3-HMAC-SHA256", + UnsignedPayload: false, + Language: "zh-CN", + } +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/tencentcloud/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile/http_profile.go b/vendor/github.com/hashicorp/go-discover/provider/tencentcloud/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile/http_profile.go new file mode 100644 index 000000000..8d4bf8f57 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/tencentcloud/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile/http_profile.go @@ -0,0 +1,17 @@ +package profile + +type HttpProfile struct { + ReqMethod string + ReqTimeout int + Endpoint string + Protocol string +} + +func NewHttpProfile() *HttpProfile { + return &HttpProfile{ + ReqMethod: "POST", + ReqTimeout: 60, + Endpoint: "", + Protocol: "HTTPS", + } +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/tencentcloud/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/sign.go b/vendor/github.com/hashicorp/go-discover/provider/tencentcloud/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/sign.go new file mode 100644 index 000000000..0aa7b7355 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/tencentcloud/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/sign.go @@ -0,0 +1,94 @@ +package common + +import ( + "bytes" + "crypto/hmac" + "crypto/sha1" + "crypto/sha256" + "encoding/base64" + "encoding/hex" + "sort" + + tchttp "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http" +) + +const ( + SHA256 = "HmacSHA256" + SHA1 = "HmacSHA1" +) + +func Sign(s, secretKey, method string) string { + hashed := hmac.New(sha1.New, []byte(secretKey)) + if method == SHA256 { + hashed = hmac.New(sha256.New, []byte(secretKey)) + } + hashed.Write([]byte(s)) + + return base64.StdEncoding.EncodeToString(hashed.Sum(nil)) +} + +func sha256hex(s string) string { + b := sha256.Sum256([]byte(s)) + return hex.EncodeToString(b[:]) +} + +func hmacsha256(s, key string) string { + hashed := hmac.New(sha256.New, []byte(key)) + hashed.Write([]byte(s)) + return string(hashed.Sum(nil)) +} + +func signRequest(request tchttp.Request, credential *Credential, method string) (err error) { + if method != SHA256 { + method = SHA1 + } + checkAuthParams(request, credential, method) + s := getStringToSign(request) + signature := Sign(s, credential.SecretKey, method) + request.GetParams()["Signature"] = signature + return +} + +func checkAuthParams(request tchttp.Request, credential *Credential, method string) { + params := request.GetParams() + credentialParams := credential.GetCredentialParams() + for key, value := range credentialParams { + params[key] = value + } + params["SignatureMethod"] = method + delete(params, "Signature") +} + +func getStringToSign(request tchttp.Request) string { + method := request.GetHttpMethod() + domain := request.GetDomain() + path := request.GetPath() + + var buf bytes.Buffer + buf.WriteString(method) + buf.WriteString(domain) + buf.WriteString(path) + buf.WriteString("?") + + params := request.GetParams() + // sort params + keys := make([]string, 0, len(params)) + for k, _ := range params { + keys = append(keys, k) + } + sort.Strings(keys) + + for i := range keys { + k := keys[i] + // TODO: check if server side allows empty value in url. + if params[k] == "" { + continue + } + buf.WriteString(k) + buf.WriteString("=") + buf.WriteString(params[k]) + buf.WriteString("&") + } + buf.Truncate(buf.Len() - 1) + return buf.String() +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/tencentcloud/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/types.go b/vendor/github.com/hashicorp/go-discover/provider/tencentcloud/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/types.go new file mode 100644 index 000000000..ec2c786db --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/tencentcloud/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/types.go @@ -0,0 +1,47 @@ +package common + +func IntPtr(v int) *int { + return &v +} + +func Int64Ptr(v int64) *int64 { + return &v +} + +func UintPtr(v uint) *uint { + return &v +} + +func Uint64Ptr(v uint64) *uint64 { + return &v +} + +func Float64Ptr(v float64) *float64 { + return &v +} + +func StringPtr(v string) *string { + return &v +} + +func StringValues(ptrs []*string) []string { + values := make([]string, len(ptrs)) + for i := 0; i < len(ptrs); i++ { + if ptrs[i] != nil { + values[i] = *ptrs[i] + } + } + return values +} + +func StringPtrs(vals []string) []*string { + ptrs := make([]*string, len(vals)) + for i := 0; i < len(vals); i++ { + ptrs[i] = &vals[i] + } + return ptrs +} + +func BoolPtr(v bool) *bool { + return &v +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/tencentcloud/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312/client.go b/vendor/github.com/hashicorp/go-discover/provider/tencentcloud/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312/client.go new file mode 100644 index 000000000..da06118ed --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/tencentcloud/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312/client.go @@ -0,0 +1,1758 @@ +// Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved. +// +// 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. + +package v20170312 + +import ( + "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common" + tchttp "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http" + "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile" +) + +const APIVersion = "2017-03-12" + +type Client struct { + common.Client +} + +// Deprecated +func NewClientWithSecretId(secretId, secretKey, region string) (client *Client, err error) { + cpf := profile.NewClientProfile() + client = &Client{} + client.Init(region).WithSecretId(secretId, secretKey).WithProfile(cpf) + return +} + +func NewClient(credential *common.Credential, region string, clientProfile *profile.ClientProfile) (client *Client, err error) { + client = &Client{} + client.Init(region). + WithCredential(credential). + WithProfile(clientProfile) + return +} + + +func NewAllocateHostsRequest() (request *AllocateHostsRequest) { + request = &AllocateHostsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "AllocateHosts") + return +} + +func NewAllocateHostsResponse() (response *AllocateHostsResponse) { + response = &AllocateHostsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口 (AllocateHosts) 用于创建一个或多个指定配置的CDH实例。 +// * 当HostChargeType为PREPAID时,必须指定HostChargePrepaid参数。 +func (c *Client) AllocateHosts(request *AllocateHostsRequest) (response *AllocateHostsResponse, err error) { + if request == nil { + request = NewAllocateHostsRequest() + } + response = NewAllocateHostsResponse() + err = c.Send(request, response) + return +} + +func NewAssociateInstancesKeyPairsRequest() (request *AssociateInstancesKeyPairsRequest) { + request = &AssociateInstancesKeyPairsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "AssociateInstancesKeyPairs") + return +} + +func NewAssociateInstancesKeyPairsResponse() (response *AssociateInstancesKeyPairsResponse) { + response = &AssociateInstancesKeyPairsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口 (AssociateInstancesKeyPairs) 用于将密钥绑定到实例上。 +// +// * 将密钥的公钥写入到实例的`SSH`配置当中,用户就可以通过该密钥的私钥来登录实例。 +// * 如果实例原来绑定过密钥,那么原来的密钥将失效。 +// * 如果实例原来是通过密码登录,绑定密钥后无法使用密码登录。 +// * 支持批量操作。每次请求批量实例的上限为100。如果批量实例存在不允许操作的实例,操作会以特定错误码返回。 +func (c *Client) AssociateInstancesKeyPairs(request *AssociateInstancesKeyPairsRequest) (response *AssociateInstancesKeyPairsResponse, err error) { + if request == nil { + request = NewAssociateInstancesKeyPairsRequest() + } + response = NewAssociateInstancesKeyPairsResponse() + err = c.Send(request, response) + return +} + +func NewAssociateSecurityGroupsRequest() (request *AssociateSecurityGroupsRequest) { + request = &AssociateSecurityGroupsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "AssociateSecurityGroups") + return +} + +func NewAssociateSecurityGroupsResponse() (response *AssociateSecurityGroupsResponse) { + response = &AssociateSecurityGroupsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口 (AssociateSecurityGroups) 用于绑定安全组到指定实例。 +func (c *Client) AssociateSecurityGroups(request *AssociateSecurityGroupsRequest) (response *AssociateSecurityGroupsResponse, err error) { + if request == nil { + request = NewAssociateSecurityGroupsRequest() + } + response = NewAssociateSecurityGroupsResponse() + err = c.Send(request, response) + return +} + +func NewCreateDisasterRecoverGroupRequest() (request *CreateDisasterRecoverGroupRequest) { + request = &CreateDisasterRecoverGroupRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "CreateDisasterRecoverGroup") + return +} + +func NewCreateDisasterRecoverGroupResponse() (response *CreateDisasterRecoverGroupResponse) { + response = &CreateDisasterRecoverGroupResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口 (CreateDisasterRecoverGroup)用于创建[分散置放群组](https://cloud.tencent.com/document/product/213/15486)。创建好的置放群组,可在[创建实例](https://cloud.tencent.com/document/api/213/15730)时指定。 +func (c *Client) CreateDisasterRecoverGroup(request *CreateDisasterRecoverGroupRequest) (response *CreateDisasterRecoverGroupResponse, err error) { + if request == nil { + request = NewCreateDisasterRecoverGroupRequest() + } + response = NewCreateDisasterRecoverGroupResponse() + err = c.Send(request, response) + return +} + +func NewCreateImageRequest() (request *CreateImageRequest) { + request = &CreateImageRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "CreateImage") + return +} + +func NewCreateImageResponse() (response *CreateImageResponse) { + response = &CreateImageResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口(CreateImage)用于将实例的系统盘制作为新镜像,创建后的镜像可以用于创建实例。 +func (c *Client) CreateImage(request *CreateImageRequest) (response *CreateImageResponse, err error) { + if request == nil { + request = NewCreateImageRequest() + } + response = NewCreateImageResponse() + err = c.Send(request, response) + return +} + +func NewCreateKeyPairRequest() (request *CreateKeyPairRequest) { + request = &CreateKeyPairRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "CreateKeyPair") + return +} + +func NewCreateKeyPairResponse() (response *CreateKeyPairResponse) { + response = &CreateKeyPairResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口 (CreateKeyPair) 用于创建一个 `OpenSSH RSA` 密钥对,可以用于登录 `Linux` 实例。 +// +// * 开发者只需指定密钥对名称,即可由系统自动创建密钥对,并返回所生成的密钥对的 `ID` 及其公钥、私钥的内容。 +// * 密钥对名称不能和已经存在的密钥对的名称重复。 +// * 私钥的内容可以保存到文件中作为 `SSH` 的一种认证方式。 +// * 腾讯云不会保存用户的私钥,请妥善保管。 +func (c *Client) CreateKeyPair(request *CreateKeyPairRequest) (response *CreateKeyPairResponse, err error) { + if request == nil { + request = NewCreateKeyPairRequest() + } + response = NewCreateKeyPairResponse() + err = c.Send(request, response) + return +} + +func NewDeleteDisasterRecoverGroupsRequest() (request *DeleteDisasterRecoverGroupsRequest) { + request = &DeleteDisasterRecoverGroupsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DeleteDisasterRecoverGroups") + return +} + +func NewDeleteDisasterRecoverGroupsResponse() (response *DeleteDisasterRecoverGroupsResponse) { + response = &DeleteDisasterRecoverGroupsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口 (DeleteDisasterRecoverGroups)用于删除[分散置放群组](https://cloud.tencent.com/document/product/213/15486)。只有空的置放群组才能被删除,非空的群组需要先销毁组内所有云主机,才能执行删除操作,不然会产生删除置放群组失败的错误。 +func (c *Client) DeleteDisasterRecoverGroups(request *DeleteDisasterRecoverGroupsRequest) (response *DeleteDisasterRecoverGroupsResponse, err error) { + if request == nil { + request = NewDeleteDisasterRecoverGroupsRequest() + } + response = NewDeleteDisasterRecoverGroupsResponse() + err = c.Send(request, response) + return +} + +func NewDeleteImagesRequest() (request *DeleteImagesRequest) { + request = &DeleteImagesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DeleteImages") + return +} + +func NewDeleteImagesResponse() (response *DeleteImagesResponse) { + response = &DeleteImagesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口(DeleteImages)用于删除一个或多个镜像。 +// +// * 当[镜像状态](https://cloud.tencent.com/document/api/213/9452#image_state)为`创建中`和`使用中`时, 不允许删除。镜像状态可以通过[DescribeImages](https://cloud.tencent.com/document/api/213/9418)获取。 +// * 每个地域最多只支持创建10个自定义镜像,删除镜像可以释放账户的配额。 +// * 当镜像正在被其它账户分享时,不允许删除。 +func (c *Client) DeleteImages(request *DeleteImagesRequest) (response *DeleteImagesResponse, err error) { + if request == nil { + request = NewDeleteImagesRequest() + } + response = NewDeleteImagesResponse() + err = c.Send(request, response) + return +} + +func NewDeleteKeyPairsRequest() (request *DeleteKeyPairsRequest) { + request = &DeleteKeyPairsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DeleteKeyPairs") + return +} + +func NewDeleteKeyPairsResponse() (response *DeleteKeyPairsResponse) { + response = &DeleteKeyPairsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口 (DeleteKeyPairs) 用于删除已在腾讯云托管的密钥对。 +// +// * 可以同时删除多个密钥对。 +// * 不能删除已被实例或镜像引用的密钥对,所以需要独立判断是否所有密钥对都被成功删除。 +func (c *Client) DeleteKeyPairs(request *DeleteKeyPairsRequest) (response *DeleteKeyPairsResponse, err error) { + if request == nil { + request = NewDeleteKeyPairsRequest() + } + response = NewDeleteKeyPairsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeDisasterRecoverGroupQuotaRequest() (request *DescribeDisasterRecoverGroupQuotaRequest) { + request = &DescribeDisasterRecoverGroupQuotaRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DescribeDisasterRecoverGroupQuota") + return +} + +func NewDescribeDisasterRecoverGroupQuotaResponse() (response *DescribeDisasterRecoverGroupQuotaResponse) { + response = &DescribeDisasterRecoverGroupQuotaResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口 (DescribeDisasterRecoverGroupQuota)用于查询[分散置放群组](https://cloud.tencent.com/document/product/213/15486)配额。 +func (c *Client) DescribeDisasterRecoverGroupQuota(request *DescribeDisasterRecoverGroupQuotaRequest) (response *DescribeDisasterRecoverGroupQuotaResponse, err error) { + if request == nil { + request = NewDescribeDisasterRecoverGroupQuotaRequest() + } + response = NewDescribeDisasterRecoverGroupQuotaResponse() + err = c.Send(request, response) + return +} + +func NewDescribeDisasterRecoverGroupsRequest() (request *DescribeDisasterRecoverGroupsRequest) { + request = &DescribeDisasterRecoverGroupsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DescribeDisasterRecoverGroups") + return +} + +func NewDescribeDisasterRecoverGroupsResponse() (response *DescribeDisasterRecoverGroupsResponse) { + response = &DescribeDisasterRecoverGroupsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口 (DescribeDisasterRecoverGroups)用于查询[分散置放群组](https://cloud.tencent.com/document/product/213/15486)信息。 +func (c *Client) DescribeDisasterRecoverGroups(request *DescribeDisasterRecoverGroupsRequest) (response *DescribeDisasterRecoverGroupsResponse, err error) { + if request == nil { + request = NewDescribeDisasterRecoverGroupsRequest() + } + response = NewDescribeDisasterRecoverGroupsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeHostsRequest() (request *DescribeHostsRequest) { + request = &DescribeHostsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DescribeHosts") + return +} + +func NewDescribeHostsResponse() (response *DescribeHostsResponse) { + response = &DescribeHostsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口 (DescribeHosts) 用于获取一个或多个CDH实例的详细信息。 +func (c *Client) DescribeHosts(request *DescribeHostsRequest) (response *DescribeHostsResponse, err error) { + if request == nil { + request = NewDescribeHostsRequest() + } + response = NewDescribeHostsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeImageQuotaRequest() (request *DescribeImageQuotaRequest) { + request = &DescribeImageQuotaRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DescribeImageQuota") + return +} + +func NewDescribeImageQuotaResponse() (response *DescribeImageQuotaResponse) { + response = &DescribeImageQuotaResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口(DescribeImageQuota)用于查询用户帐号的镜像配额。 +func (c *Client) DescribeImageQuota(request *DescribeImageQuotaRequest) (response *DescribeImageQuotaResponse, err error) { + if request == nil { + request = NewDescribeImageQuotaRequest() + } + response = NewDescribeImageQuotaResponse() + err = c.Send(request, response) + return +} + +func NewDescribeImageSharePermissionRequest() (request *DescribeImageSharePermissionRequest) { + request = &DescribeImageSharePermissionRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DescribeImageSharePermission") + return +} + +func NewDescribeImageSharePermissionResponse() (response *DescribeImageSharePermissionResponse) { + response = &DescribeImageSharePermissionResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口(DescribeImageSharePermission)用于查询镜像分享信息。 +func (c *Client) DescribeImageSharePermission(request *DescribeImageSharePermissionRequest) (response *DescribeImageSharePermissionResponse, err error) { + if request == nil { + request = NewDescribeImageSharePermissionRequest() + } + response = NewDescribeImageSharePermissionResponse() + err = c.Send(request, response) + return +} + +func NewDescribeImagesRequest() (request *DescribeImagesRequest) { + request = &DescribeImagesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DescribeImages") + return +} + +func NewDescribeImagesResponse() (response *DescribeImagesResponse) { + response = &DescribeImagesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口(DescribeImages) 用于查看镜像列表。 +// +// * 可以通过指定镜像ID来查询指定镜像的详细信息,或通过设定过滤器来查询满足过滤条件的镜像的详细信息。 +// * 指定偏移(Offset)和限制(Limit)来选择结果中的一部分,默认返回满足条件的前20个镜像信息。 +func (c *Client) DescribeImages(request *DescribeImagesRequest) (response *DescribeImagesResponse, err error) { + if request == nil { + request = NewDescribeImagesRequest() + } + response = NewDescribeImagesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeImportImageOsRequest() (request *DescribeImportImageOsRequest) { + request = &DescribeImportImageOsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DescribeImportImageOs") + return +} + +func NewDescribeImportImageOsResponse() (response *DescribeImportImageOsResponse) { + response = &DescribeImportImageOsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 查看可以导入的镜像操作系统信息。 +func (c *Client) DescribeImportImageOs(request *DescribeImportImageOsRequest) (response *DescribeImportImageOsResponse, err error) { + if request == nil { + request = NewDescribeImportImageOsRequest() + } + response = NewDescribeImportImageOsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeInstanceFamilyConfigsRequest() (request *DescribeInstanceFamilyConfigsRequest) { + request = &DescribeInstanceFamilyConfigsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DescribeInstanceFamilyConfigs") + return +} + +func NewDescribeInstanceFamilyConfigsResponse() (response *DescribeInstanceFamilyConfigsResponse) { + response = &DescribeInstanceFamilyConfigsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口(DescribeInstanceFamilyConfigs)查询当前用户和地域所支持的机型族列表信息。 +func (c *Client) DescribeInstanceFamilyConfigs(request *DescribeInstanceFamilyConfigsRequest) (response *DescribeInstanceFamilyConfigsResponse, err error) { + if request == nil { + request = NewDescribeInstanceFamilyConfigsRequest() + } + response = NewDescribeInstanceFamilyConfigsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeInstanceInternetBandwidthConfigsRequest() (request *DescribeInstanceInternetBandwidthConfigsRequest) { + request = &DescribeInstanceInternetBandwidthConfigsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DescribeInstanceInternetBandwidthConfigs") + return +} + +func NewDescribeInstanceInternetBandwidthConfigsResponse() (response *DescribeInstanceInternetBandwidthConfigsResponse) { + response = &DescribeInstanceInternetBandwidthConfigsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口 (DescribeInstanceInternetBandwidthConfigs) 用于查询实例带宽配置。 +// +// * 只支持查询`BANDWIDTH_PREPAID`计费模式的带宽配置。 +// * 接口返回实例的所有带宽配置信息(包含历史的带宽配置信息)。 +func (c *Client) DescribeInstanceInternetBandwidthConfigs(request *DescribeInstanceInternetBandwidthConfigsRequest) (response *DescribeInstanceInternetBandwidthConfigsResponse, err error) { + if request == nil { + request = NewDescribeInstanceInternetBandwidthConfigsRequest() + } + response = NewDescribeInstanceInternetBandwidthConfigsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeInstanceTypeConfigsRequest() (request *DescribeInstanceTypeConfigsRequest) { + request = &DescribeInstanceTypeConfigsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DescribeInstanceTypeConfigs") + return +} + +func NewDescribeInstanceTypeConfigsResponse() (response *DescribeInstanceTypeConfigsResponse) { + response = &DescribeInstanceTypeConfigsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口 (DescribeInstanceTypeConfigs) 用于查询实例机型配置。 +// +// * 可以根据`zone`、`instance-family`来查询实例机型配置。过滤条件详见过滤器`Filter`。 +// * 如果参数为空,返回指定地域的所有实例机型配置。 +func (c *Client) DescribeInstanceTypeConfigs(request *DescribeInstanceTypeConfigsRequest) (response *DescribeInstanceTypeConfigsResponse, err error) { + if request == nil { + request = NewDescribeInstanceTypeConfigsRequest() + } + response = NewDescribeInstanceTypeConfigsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeInstanceVncUrlRequest() (request *DescribeInstanceVncUrlRequest) { + request = &DescribeInstanceVncUrlRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DescribeInstanceVncUrl") + return +} + +func NewDescribeInstanceVncUrlResponse() (response *DescribeInstanceVncUrlResponse) { + response = &DescribeInstanceVncUrlResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口 ( DescribeInstanceVncUrl ) 用于查询实例管理终端地址。 +// +// * 处于 `STOPPED` 状态的机器无法使用此功能。 +// * 管理终端地址的有效期为 15 秒,调用接口成功后如果 15 秒内不使用该链接进行访问,管理终端地址自动失效,您需要重新查询。 +// * 管理终端地址一旦被访问,将自动失效,您需要重新查询。 +// * 如果连接断开,每分钟内重新连接的次数不能超过 30 次。 +// * 获取到 `InstanceVncUrl` 后,您需要在在链接 末尾加上参数 `InstanceVncUrl=xxxx` 。 +// - 参数 `InstanceVncUrl` :调用接口成功后会返回的 `InstanceVncUrl` 的值。 +// +// 最后组成的 URL 格式如下: +// +// ``` +// https://img.qcloud.com/qcloud/app/active_vnc/index.html?InstanceVncUrl=wss%3A%2F%2Fbjvnc.qcloud.com%3A26789%2Fvnc%3Fs%3DaHpjWnRVMFNhYmxKdDM5MjRHNlVTSVQwajNUSW0wb2tBbmFtREFCTmFrcy8vUUNPMG0wSHZNOUUxRm5PMmUzWmFDcWlOdDJIbUJxSTZDL0RXcHZxYnZZMmRkWWZWcEZia2lyb09XMzdKNmM9 +// ``` +func (c *Client) DescribeInstanceVncUrl(request *DescribeInstanceVncUrlRequest) (response *DescribeInstanceVncUrlResponse, err error) { + if request == nil { + request = NewDescribeInstanceVncUrlRequest() + } + response = NewDescribeInstanceVncUrlResponse() + err = c.Send(request, response) + return +} + +func NewDescribeInstancesRequest() (request *DescribeInstancesRequest) { + request = &DescribeInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DescribeInstances") + return +} + +func NewDescribeInstancesResponse() (response *DescribeInstancesResponse) { + response = &DescribeInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口 (DescribeInstances) 用于查询一个或多个实例的详细信息。 +// +// * 可以根据实例`ID`、实例名称或者实例计费模式等信息来查询实例的详细信息。过滤信息详细请见过滤器`Filter`。 +// * 如果参数为空,返回当前用户一定数量(`Limit`所指定的数量,默认为20)的实例。 +func (c *Client) DescribeInstances(request *DescribeInstancesRequest) (response *DescribeInstancesResponse, err error) { + if request == nil { + request = NewDescribeInstancesRequest() + } + response = NewDescribeInstancesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeInstancesOperationLimitRequest() (request *DescribeInstancesOperationLimitRequest) { + request = &DescribeInstancesOperationLimitRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DescribeInstancesOperationLimit") + return +} + +func NewDescribeInstancesOperationLimitResponse() (response *DescribeInstancesOperationLimitResponse) { + response = &DescribeInstancesOperationLimitResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口(DescribeInstancesOperationLimit)用于查询实例操作限制。 +// +// * 目前支持调整配置操作限制次数查询。 +func (c *Client) DescribeInstancesOperationLimit(request *DescribeInstancesOperationLimitRequest) (response *DescribeInstancesOperationLimitResponse, err error) { + if request == nil { + request = NewDescribeInstancesOperationLimitRequest() + } + response = NewDescribeInstancesOperationLimitResponse() + err = c.Send(request, response) + return +} + +func NewDescribeInstancesStatusRequest() (request *DescribeInstancesStatusRequest) { + request = &DescribeInstancesStatusRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DescribeInstancesStatus") + return +} + +func NewDescribeInstancesStatusResponse() (response *DescribeInstancesStatusResponse) { + response = &DescribeInstancesStatusResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口 (DescribeInstancesStatus) 用于查询一个或多个实例的状态。 +// +// * 可以根据实例`ID`来查询实例的状态。 +// * 如果参数为空,返回当前用户一定数量(Limit所指定的数量,默认为20)的实例状态。 +func (c *Client) DescribeInstancesStatus(request *DescribeInstancesStatusRequest) (response *DescribeInstancesStatusResponse, err error) { + if request == nil { + request = NewDescribeInstancesStatusRequest() + } + response = NewDescribeInstancesStatusResponse() + err = c.Send(request, response) + return +} + +func NewDescribeInternetChargeTypeConfigsRequest() (request *DescribeInternetChargeTypeConfigsRequest) { + request = &DescribeInternetChargeTypeConfigsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DescribeInternetChargeTypeConfigs") + return +} + +func NewDescribeInternetChargeTypeConfigsResponse() (response *DescribeInternetChargeTypeConfigsResponse) { + response = &DescribeInternetChargeTypeConfigsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口(DescribeInternetChargeTypeConfigs)用于查询网络的计费类型。 +func (c *Client) DescribeInternetChargeTypeConfigs(request *DescribeInternetChargeTypeConfigsRequest) (response *DescribeInternetChargeTypeConfigsResponse, err error) { + if request == nil { + request = NewDescribeInternetChargeTypeConfigsRequest() + } + response = NewDescribeInternetChargeTypeConfigsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeKeyPairsRequest() (request *DescribeKeyPairsRequest) { + request = &DescribeKeyPairsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DescribeKeyPairs") + return +} + +func NewDescribeKeyPairsResponse() (response *DescribeKeyPairsResponse) { + response = &DescribeKeyPairsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口 (DescribeKeyPairs) 用于查询密钥对信息。 +// +// * 密钥对是通过一种算法生成的一对密钥,在生成的密钥对中,一个向外界公开,称为公钥;另一个用户自己保留,称为私钥。密钥对的公钥内容可以通过这个接口查询,但私钥内容系统不保留。 +func (c *Client) DescribeKeyPairs(request *DescribeKeyPairsRequest) (response *DescribeKeyPairsResponse, err error) { + if request == nil { + request = NewDescribeKeyPairsRequest() + } + response = NewDescribeKeyPairsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeRegionsRequest() (request *DescribeRegionsRequest) { + request = &DescribeRegionsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DescribeRegions") + return +} + +func NewDescribeRegionsResponse() (response *DescribeRegionsResponse) { + response = &DescribeRegionsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口(DescribeRegions)用于查询地域信息。 +func (c *Client) DescribeRegions(request *DescribeRegionsRequest) (response *DescribeRegionsResponse, err error) { + if request == nil { + request = NewDescribeRegionsRequest() + } + response = NewDescribeRegionsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeZoneInstanceConfigInfosRequest() (request *DescribeZoneInstanceConfigInfosRequest) { + request = &DescribeZoneInstanceConfigInfosRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DescribeZoneInstanceConfigInfos") + return +} + +func NewDescribeZoneInstanceConfigInfosResponse() (response *DescribeZoneInstanceConfigInfosResponse) { + response = &DescribeZoneInstanceConfigInfosResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口(DescribeZoneInstanceConfigInfos) 获取可用区的机型信息。 +func (c *Client) DescribeZoneInstanceConfigInfos(request *DescribeZoneInstanceConfigInfosRequest) (response *DescribeZoneInstanceConfigInfosResponse, err error) { + if request == nil { + request = NewDescribeZoneInstanceConfigInfosRequest() + } + response = NewDescribeZoneInstanceConfigInfosResponse() + err = c.Send(request, response) + return +} + +func NewDescribeZonesRequest() (request *DescribeZonesRequest) { + request = &DescribeZonesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DescribeZones") + return +} + +func NewDescribeZonesResponse() (response *DescribeZonesResponse) { + response = &DescribeZonesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口(DescribeZones)用于查询可用区信息。 +func (c *Client) DescribeZones(request *DescribeZonesRequest) (response *DescribeZonesResponse, err error) { + if request == nil { + request = NewDescribeZonesRequest() + } + response = NewDescribeZonesResponse() + err = c.Send(request, response) + return +} + +func NewDisassociateInstancesKeyPairsRequest() (request *DisassociateInstancesKeyPairsRequest) { + request = &DisassociateInstancesKeyPairsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DisassociateInstancesKeyPairs") + return +} + +func NewDisassociateInstancesKeyPairsResponse() (response *DisassociateInstancesKeyPairsResponse) { + response = &DisassociateInstancesKeyPairsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口 (DisassociateInstancesKeyPairs) 用于解除实例的密钥绑定关系。 +// +// * 只支持[`STOPPED`](https://cloud.tencent.com/document/api/213/9452#INSTANCE_STATE)状态的`Linux`操作系统的实例。 +// * 解绑密钥后,实例可以通过原来设置的密码登录。 +// * 如果原来没有设置密码,解绑后将无法使用 `SSH` 登录。可以调用 [ResetInstancesPassword](https://cloud.tencent.com/document/api/213/15736) 接口来设置登录密码。 +// * 支持批量操作。每次请求批量实例的上限为100。如果批量实例存在不允许操作的实例,操作会以特定错误码返回。 +func (c *Client) DisassociateInstancesKeyPairs(request *DisassociateInstancesKeyPairsRequest) (response *DisassociateInstancesKeyPairsResponse, err error) { + if request == nil { + request = NewDisassociateInstancesKeyPairsRequest() + } + response = NewDisassociateInstancesKeyPairsResponse() + err = c.Send(request, response) + return +} + +func NewDisassociateSecurityGroupsRequest() (request *DisassociateSecurityGroupsRequest) { + request = &DisassociateSecurityGroupsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DisassociateSecurityGroups") + return +} + +func NewDisassociateSecurityGroupsResponse() (response *DisassociateSecurityGroupsResponse) { + response = &DisassociateSecurityGroupsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口 (DisassociateSecurityGroups) 用于解绑实例的指定安全组。 +func (c *Client) DisassociateSecurityGroups(request *DisassociateSecurityGroupsRequest) (response *DisassociateSecurityGroupsResponse, err error) { + if request == nil { + request = NewDisassociateSecurityGroupsRequest() + } + response = NewDisassociateSecurityGroupsResponse() + err = c.Send(request, response) + return +} + +func NewImportImageRequest() (request *ImportImageRequest) { + request = &ImportImageRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "ImportImage") + return +} + +func NewImportImageResponse() (response *ImportImageResponse) { + response = &ImportImageResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口(ImportImage)用于导入镜像,导入后的镜像可用于创建实例。 +func (c *Client) ImportImage(request *ImportImageRequest) (response *ImportImageResponse, err error) { + if request == nil { + request = NewImportImageRequest() + } + response = NewImportImageResponse() + err = c.Send(request, response) + return +} + +func NewImportKeyPairRequest() (request *ImportKeyPairRequest) { + request = &ImportKeyPairRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "ImportKeyPair") + return +} + +func NewImportKeyPairResponse() (response *ImportKeyPairResponse) { + response = &ImportKeyPairResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口 (ImportKeyPair) 用于导入密钥对。 +// +// * 本接口的功能是将密钥对导入到用户账户,并不会自动绑定到实例。如需绑定可以使用[AssociasteInstancesKeyPair](https://cloud.tencent.com/document/api/213/9404)接口。 +// * 需指定密钥对名称以及该密钥对的公钥文本。 +// * 如果用户只有私钥,可以通过 `SSL` 工具将私钥转换成公钥后再导入。 +func (c *Client) ImportKeyPair(request *ImportKeyPairRequest) (response *ImportKeyPairResponse, err error) { + if request == nil { + request = NewImportKeyPairRequest() + } + response = NewImportKeyPairResponse() + err = c.Send(request, response) + return +} + +func NewInquiryPriceModifyInstancesChargeTypeRequest() (request *InquiryPriceModifyInstancesChargeTypeRequest) { + request = &InquiryPriceModifyInstancesChargeTypeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "InquiryPriceModifyInstancesChargeType") + return +} + +func NewInquiryPriceModifyInstancesChargeTypeResponse() (response *InquiryPriceModifyInstancesChargeTypeResponse) { + response = &InquiryPriceModifyInstancesChargeTypeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口 (InquiryPriceModifyInstancesChargeType) 用于切换实例的计费模式询价。 +// +// * 只支持从 `POSTPAID_BY_HOUR` 计费模式切换为`PREPAID`计费模式。 +// * 关机不收费的实例、`BC1`和`BS1`机型族的实例、设置定时销毁的实例不支持该操作。 +func (c *Client) InquiryPriceModifyInstancesChargeType(request *InquiryPriceModifyInstancesChargeTypeRequest) (response *InquiryPriceModifyInstancesChargeTypeResponse, err error) { + if request == nil { + request = NewInquiryPriceModifyInstancesChargeTypeRequest() + } + response = NewInquiryPriceModifyInstancesChargeTypeResponse() + err = c.Send(request, response) + return +} + +func NewInquiryPriceRenewInstancesRequest() (request *InquiryPriceRenewInstancesRequest) { + request = &InquiryPriceRenewInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "InquiryPriceRenewInstances") + return +} + +func NewInquiryPriceRenewInstancesResponse() (response *InquiryPriceRenewInstancesResponse) { + response = &InquiryPriceRenewInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口 (InquiryPriceRenewInstances) 用于续费包年包月实例询价。 +// +// * 只支持查询包年包月实例的续费价格。 +func (c *Client) InquiryPriceRenewInstances(request *InquiryPriceRenewInstancesRequest) (response *InquiryPriceRenewInstancesResponse, err error) { + if request == nil { + request = NewInquiryPriceRenewInstancesRequest() + } + response = NewInquiryPriceRenewInstancesResponse() + err = c.Send(request, response) + return +} + +func NewInquiryPriceResetInstanceRequest() (request *InquiryPriceResetInstanceRequest) { + request = &InquiryPriceResetInstanceRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "InquiryPriceResetInstance") + return +} + +func NewInquiryPriceResetInstanceResponse() (response *InquiryPriceResetInstanceResponse) { + response = &InquiryPriceResetInstanceResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口 (InquiryPriceResetInstance) 用于重装实例询价。* 如果指定了`ImageId`参数,则使用指定的镜像进行重装询价;否则按照当前实例使用的镜像进行重装询价。* 目前只支持[系统盘类型](/document/api/213/9452#block_device)是`CLOUD_BASIC`、`CLOUD_PREMIUM`、`CLOUD_SSD`类型的实例使用该接口实现`Linux`和`Windows`操作系统切换的重装询价。* 目前不支持海外地域的实例使用该接口实现`Linux`和`Windows`操作系统切换的重装询价。 +func (c *Client) InquiryPriceResetInstance(request *InquiryPriceResetInstanceRequest) (response *InquiryPriceResetInstanceResponse, err error) { + if request == nil { + request = NewInquiryPriceResetInstanceRequest() + } + response = NewInquiryPriceResetInstanceResponse() + err = c.Send(request, response) + return +} + +func NewInquiryPriceResetInstancesInternetMaxBandwidthRequest() (request *InquiryPriceResetInstancesInternetMaxBandwidthRequest) { + request = &InquiryPriceResetInstancesInternetMaxBandwidthRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "InquiryPriceResetInstancesInternetMaxBandwidth") + return +} + +func NewInquiryPriceResetInstancesInternetMaxBandwidthResponse() (response *InquiryPriceResetInstancesInternetMaxBandwidthResponse) { + response = &InquiryPriceResetInstancesInternetMaxBandwidthResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口 (InquiryPriceResetInstancesInternetMaxBandwidth) 用于调整实例公网带宽上限询价。 +// +// * 不同机型带宽上限范围不一致,具体限制详见[购买网络带宽](https://cloud.tencent.com/document/product/213/509)。 +// * 对于`BANDWIDTH_PREPAID`计费方式的带宽,需要输入参数`StartTime`和`EndTime`,指定调整后的带宽的生效时间段。在这种场景下目前不支持调小带宽,会涉及扣费,请确保账户余额充足。可通过[`DescribeAccountBalance`](https://cloud.tencent.com/document/product/378/4397)接口查询账户余额。 +// * 对于 `TRAFFIC_POSTPAID_BY_HOUR`、 `BANDWIDTH_POSTPAID_BY_HOUR` 和 `BANDWIDTH_PACKAGE` 计费方式的带宽,使用该接口调整带宽上限是实时生效的,可以在带宽允许的范围内调大或者调小带宽,不支持输入参数 `StartTime` 和 `EndTime` 。 +// * 接口不支持调整`BANDWIDTH_POSTPAID_BY_MONTH`计费方式的带宽。 +// * 接口不支持批量调整 `BANDWIDTH_PREPAID` 和 `BANDWIDTH_POSTPAID_BY_HOUR` 计费方式的带宽。 +// * 接口不支持批量调整混合计费方式的带宽。例如不支持同时调整`TRAFFIC_POSTPAID_BY_HOUR`和`BANDWIDTH_PACKAGE`计费方式的带宽。 +func (c *Client) InquiryPriceResetInstancesInternetMaxBandwidth(request *InquiryPriceResetInstancesInternetMaxBandwidthRequest) (response *InquiryPriceResetInstancesInternetMaxBandwidthResponse, err error) { + if request == nil { + request = NewInquiryPriceResetInstancesInternetMaxBandwidthRequest() + } + response = NewInquiryPriceResetInstancesInternetMaxBandwidthResponse() + err = c.Send(request, response) + return +} + +func NewInquiryPriceResetInstancesTypeRequest() (request *InquiryPriceResetInstancesTypeRequest) { + request = &InquiryPriceResetInstancesTypeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "InquiryPriceResetInstancesType") + return +} + +func NewInquiryPriceResetInstancesTypeResponse() (response *InquiryPriceResetInstancesTypeResponse) { + response = &InquiryPriceResetInstancesTypeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口 (InquiryPriceResetInstancesType) 用于调整实例的机型询价。 +// +// * 目前只支持[系统盘类型](https://cloud.tencent.com/document/api/213/9452#block_device)是`CLOUD_BASIC`、`CLOUD_PREMIUM`、`CLOUD_SSD`类型的实例使用该接口进行调整机型询价。 +// * 目前不支持[CDH](https://cloud.tencent.com/document/product/416)实例使用该接口调整机型询价。 +// * 对于包年包月实例,使用该接口会涉及扣费,请确保账户余额充足。可通过[`DescribeAccountBalance`](https://cloud.tencent.com/document/product/378/4397)接口查询账户余额。 +func (c *Client) InquiryPriceResetInstancesType(request *InquiryPriceResetInstancesTypeRequest) (response *InquiryPriceResetInstancesTypeResponse, err error) { + if request == nil { + request = NewInquiryPriceResetInstancesTypeRequest() + } + response = NewInquiryPriceResetInstancesTypeResponse() + err = c.Send(request, response) + return +} + +func NewInquiryPriceResizeInstanceDisksRequest() (request *InquiryPriceResizeInstanceDisksRequest) { + request = &InquiryPriceResizeInstanceDisksRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "InquiryPriceResizeInstanceDisks") + return +} + +func NewInquiryPriceResizeInstanceDisksResponse() (response *InquiryPriceResizeInstanceDisksResponse) { + response = &InquiryPriceResizeInstanceDisksResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口 (InquiryPriceResizeInstanceDisks) 用于扩容实例的数据盘询价。 +// +// * 目前只支持扩容非弹性数据盘([`DescribeDisks`](https://cloud.tencent.com/document/api/362/16315)接口返回值中的`Portable`为`false`表示非弹性)询价,且[数据盘类型](/document/api/213/9452#block_device)为:`CLOUD_BASIC`、`CLOUD_PREMIUM`、`CLOUD_SSD`。 +// * 目前不支持[CDH](https://cloud.tencent.com/document/product/416)实例使用该接口扩容数据盘询价。* 仅支持包年包月实例随机器购买的数据盘。* 目前只支持扩容一块数据盘询价。 +func (c *Client) InquiryPriceResizeInstanceDisks(request *InquiryPriceResizeInstanceDisksRequest) (response *InquiryPriceResizeInstanceDisksResponse, err error) { + if request == nil { + request = NewInquiryPriceResizeInstanceDisksRequest() + } + response = NewInquiryPriceResizeInstanceDisksResponse() + err = c.Send(request, response) + return +} + +func NewInquiryPriceRunInstancesRequest() (request *InquiryPriceRunInstancesRequest) { + request = &InquiryPriceRunInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "InquiryPriceRunInstances") + return +} + +func NewInquiryPriceRunInstancesResponse() (response *InquiryPriceRunInstancesResponse) { + response = &InquiryPriceRunInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口(InquiryPriceRunInstances)用于创建实例询价。本接口仅允许针对购买限制范围内的实例配置进行询价, 详见:[创建实例](https://cloud.tencent.com/document/api/213/15730)。 +func (c *Client) InquiryPriceRunInstances(request *InquiryPriceRunInstancesRequest) (response *InquiryPriceRunInstancesResponse, err error) { + if request == nil { + request = NewInquiryPriceRunInstancesRequest() + } + response = NewInquiryPriceRunInstancesResponse() + err = c.Send(request, response) + return +} + +func NewModifyDisasterRecoverGroupAttributeRequest() (request *ModifyDisasterRecoverGroupAttributeRequest) { + request = &ModifyDisasterRecoverGroupAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "ModifyDisasterRecoverGroupAttribute") + return +} + +func NewModifyDisasterRecoverGroupAttributeResponse() (response *ModifyDisasterRecoverGroupAttributeResponse) { + response = &ModifyDisasterRecoverGroupAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口 (ModifyDisasterRecoverGroupAttribute)用于修改[分散置放群组](https://cloud.tencent.com/document/product/213/15486)属性。 +func (c *Client) ModifyDisasterRecoverGroupAttribute(request *ModifyDisasterRecoverGroupAttributeRequest) (response *ModifyDisasterRecoverGroupAttributeResponse, err error) { + if request == nil { + request = NewModifyDisasterRecoverGroupAttributeRequest() + } + response = NewModifyDisasterRecoverGroupAttributeResponse() + err = c.Send(request, response) + return +} + +func NewModifyHostsAttributeRequest() (request *ModifyHostsAttributeRequest) { + request = &ModifyHostsAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "ModifyHostsAttribute") + return +} + +func NewModifyHostsAttributeResponse() (response *ModifyHostsAttributeResponse) { + response = &ModifyHostsAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口(ModifyHostsAttribute)用于修改CDH实例的属性,如实例名称和续费标记等。参数HostName和RenewFlag必须设置其中一个,但不能同时设置。 +func (c *Client) ModifyHostsAttribute(request *ModifyHostsAttributeRequest) (response *ModifyHostsAttributeResponse, err error) { + if request == nil { + request = NewModifyHostsAttributeRequest() + } + response = NewModifyHostsAttributeResponse() + err = c.Send(request, response) + return +} + +func NewModifyImageAttributeRequest() (request *ModifyImageAttributeRequest) { + request = &ModifyImageAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "ModifyImageAttribute") + return +} + +func NewModifyImageAttributeResponse() (response *ModifyImageAttributeResponse) { + response = &ModifyImageAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口(ModifyImageAttribute)用于修改镜像属性。 +// +// * 已分享的镜像无法修改属性。 +func (c *Client) ModifyImageAttribute(request *ModifyImageAttributeRequest) (response *ModifyImageAttributeResponse, err error) { + if request == nil { + request = NewModifyImageAttributeRequest() + } + response = NewModifyImageAttributeResponse() + err = c.Send(request, response) + return +} + +func NewModifyImageSharePermissionRequest() (request *ModifyImageSharePermissionRequest) { + request = &ModifyImageSharePermissionRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "ModifyImageSharePermission") + return +} + +func NewModifyImageSharePermissionResponse() (response *ModifyImageSharePermissionResponse) { + response = &ModifyImageSharePermissionResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口(ModifyImageSharePermission)用于修改镜像分享信息。 +// +// * 分享镜像后,被分享账户可以通过该镜像创建实例。 +// * 每个自定义镜像最多可共享给50个账户。 +// * 分享镜像无法更改名称,描述,仅可用于创建实例。 +// * 只支持分享到对方账户相同地域。 +func (c *Client) ModifyImageSharePermission(request *ModifyImageSharePermissionRequest) (response *ModifyImageSharePermissionResponse, err error) { + if request == nil { + request = NewModifyImageSharePermissionRequest() + } + response = NewModifyImageSharePermissionResponse() + err = c.Send(request, response) + return +} + +func NewModifyInstancesAttributeRequest() (request *ModifyInstancesAttributeRequest) { + request = &ModifyInstancesAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "ModifyInstancesAttribute") + return +} + +func NewModifyInstancesAttributeResponse() (response *ModifyInstancesAttributeResponse) { + response = &ModifyInstancesAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口 (ModifyInstancesAttribute) 用于修改实例的属性(目前只支持修改实例的名称和关联的安全组)。 +// +// * “实例名称”仅为方便用户自己管理之用,腾讯云并不以此名称作为提交工单或是进行实例管理操作的依据。 +// * 支持批量操作。每次请求批量实例的上限为100。 +// * 修改关联安全组时,子机原来关联的安全组会被解绑。 +func (c *Client) ModifyInstancesAttribute(request *ModifyInstancesAttributeRequest) (response *ModifyInstancesAttributeResponse, err error) { + if request == nil { + request = NewModifyInstancesAttributeRequest() + } + response = NewModifyInstancesAttributeResponse() + err = c.Send(request, response) + return +} + +func NewModifyInstancesChargeTypeRequest() (request *ModifyInstancesChargeTypeRequest) { + request = &ModifyInstancesChargeTypeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "ModifyInstancesChargeType") + return +} + +func NewModifyInstancesChargeTypeResponse() (response *ModifyInstancesChargeTypeResponse) { + response = &ModifyInstancesChargeTypeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口 (ModifyInstancesChargeType) 用于切换实例的计费模式。 +// +// * 只支持从 `POSTPAID_BY_HOUR` 计费模式切换为`PREPAID`计费模式。 +// * 关机不收费的实例、`BC1`和`BS1`机型族的实例、设置定时销毁的实例不支持该操作。 +func (c *Client) ModifyInstancesChargeType(request *ModifyInstancesChargeTypeRequest) (response *ModifyInstancesChargeTypeResponse, err error) { + if request == nil { + request = NewModifyInstancesChargeTypeRequest() + } + response = NewModifyInstancesChargeTypeResponse() + err = c.Send(request, response) + return +} + +func NewModifyInstancesProjectRequest() (request *ModifyInstancesProjectRequest) { + request = &ModifyInstancesProjectRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "ModifyInstancesProject") + return +} + +func NewModifyInstancesProjectResponse() (response *ModifyInstancesProjectResponse) { + response = &ModifyInstancesProjectResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口 (ModifyInstancesProject) 用于修改实例所属项目。 +// +// * 项目为一个虚拟概念,用户可以在一个账户下面建立多个项目,每个项目中管理不同的资源;将多个不同实例分属到不同项目中,后续使用 [`DescribeInstances`](https://cloud.tencent.com/document/api/213/9388)接口查询实例,项目ID可用于过滤结果。 +// * 绑定负载均衡的实例不支持修改实例所属项目,请先使用[`DeregisterInstancesFromLoadBalancer`](https://cloud.tencent.com/document/api/214/1258)接口解绑负载均衡。 +// * 修改实例所属项目会自动解关联实例原来关联的安全组,修改完成后可能使用[`ModifySecurityGroupsOfInstance`](https://cloud.tencent.com/document/api/213/1367)接口关联安全组。 +// * 支持批量操作。每次请求批量实例的上限为100。 +func (c *Client) ModifyInstancesProject(request *ModifyInstancesProjectRequest) (response *ModifyInstancesProjectResponse, err error) { + if request == nil { + request = NewModifyInstancesProjectRequest() + } + response = NewModifyInstancesProjectResponse() + err = c.Send(request, response) + return +} + +func NewModifyInstancesRenewFlagRequest() (request *ModifyInstancesRenewFlagRequest) { + request = &ModifyInstancesRenewFlagRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "ModifyInstancesRenewFlag") + return +} + +func NewModifyInstancesRenewFlagResponse() (response *ModifyInstancesRenewFlagResponse) { + response = &ModifyInstancesRenewFlagResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口 (ModifyInstancesRenewFlag) 用于修改包年包月实例续费标识。 +// +// * 实例被标识为自动续费后,每次在实例到期时,会自动续费一个月。 +// * 支持批量操作。每次请求批量实例的上限为100。 +func (c *Client) ModifyInstancesRenewFlag(request *ModifyInstancesRenewFlagRequest) (response *ModifyInstancesRenewFlagResponse, err error) { + if request == nil { + request = NewModifyInstancesRenewFlagRequest() + } + response = NewModifyInstancesRenewFlagResponse() + err = c.Send(request, response) + return +} + +func NewModifyInstancesVpcAttributeRequest() (request *ModifyInstancesVpcAttributeRequest) { + request = &ModifyInstancesVpcAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "ModifyInstancesVpcAttribute") + return +} + +func NewModifyInstancesVpcAttributeResponse() (response *ModifyInstancesVpcAttributeResponse) { + response = &ModifyInstancesVpcAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口(ModifyInstancesVpcAttribute)用于修改实例vpc属性,如私有网络ip。 +// * 此操作默认会关闭实例,完成后再启动。 +// * 当指定私有网络ID和子网ID(子网必须在实例所在的可用区)与指定实例所在私有网络不一致时,会将实例迁移至指定的私有网络的子网下。执行此操作前请确保指定的实例上没有绑定[弹性网卡](https://cloud.tencent.com/document/product/576)和[负载均衡](https://cloud.tencent.com/document/product/214)。 +func (c *Client) ModifyInstancesVpcAttribute(request *ModifyInstancesVpcAttributeRequest) (response *ModifyInstancesVpcAttributeResponse, err error) { + if request == nil { + request = NewModifyInstancesVpcAttributeRequest() + } + response = NewModifyInstancesVpcAttributeResponse() + err = c.Send(request, response) + return +} + +func NewModifyKeyPairAttributeRequest() (request *ModifyKeyPairAttributeRequest) { + request = &ModifyKeyPairAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "ModifyKeyPairAttribute") + return +} + +func NewModifyKeyPairAttributeResponse() (response *ModifyKeyPairAttributeResponse) { + response = &ModifyKeyPairAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口 (ModifyKeyPairAttribute) 用于修改密钥对属性。 +// +// * 修改密钥对ID所指定的密钥对的名称和描述信息。 +// * 密钥对名称不能和已经存在的密钥对的名称重复。 +// * 密钥对ID是密钥对的唯一标识,不可修改。 +func (c *Client) ModifyKeyPairAttribute(request *ModifyKeyPairAttributeRequest) (response *ModifyKeyPairAttributeResponse, err error) { + if request == nil { + request = NewModifyKeyPairAttributeRequest() + } + response = NewModifyKeyPairAttributeResponse() + err = c.Send(request, response) + return +} + +func NewRebootInstancesRequest() (request *RebootInstancesRequest) { + request = &RebootInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "RebootInstances") + return +} + +func NewRebootInstancesResponse() (response *RebootInstancesResponse) { + response = &RebootInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口 (RebootInstances) 用于重启实例。 +// +// * 只有状态为`RUNNING`的实例才可以进行此操作。 +// * 接口调用成功时,实例会进入`REBOOTING`状态;重启实例成功时,实例会进入`RUNNING`状态。 +// * 支持强制重启。强制重启的效果等同于关闭物理计算机的电源开关再重新启动。强制重启可能会导致数据丢失或文件系统损坏,请仅在服务器不能正常重启时使用。 +// * 支持批量操作,每次请求批量实例的上限为100。 +func (c *Client) RebootInstances(request *RebootInstancesRequest) (response *RebootInstancesResponse, err error) { + if request == nil { + request = NewRebootInstancesRequest() + } + response = NewRebootInstancesResponse() + err = c.Send(request, response) + return +} + +func NewRenewHostsRequest() (request *RenewHostsRequest) { + request = &RenewHostsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "RenewHosts") + return +} + +func NewRenewHostsResponse() (response *RenewHostsResponse) { + response = &RenewHostsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口 (RenewHosts) 用于续费包年包月CDH实例。 +// +// * 只支持操作包年包月实例,否则操作会以特定[错误码](#4.-.E9.94.99.E8.AF.AF.E7.A0.81)返回。 +// * 续费时请确保账户余额充足。可通过[`DescribeAccountBalance`](https://cloud.tencent.com/document/product/378/4397)接口查询账户余额。 +func (c *Client) RenewHosts(request *RenewHostsRequest) (response *RenewHostsResponse, err error) { + if request == nil { + request = NewRenewHostsRequest() + } + response = NewRenewHostsResponse() + err = c.Send(request, response) + return +} + +func NewRenewInstancesRequest() (request *RenewInstancesRequest) { + request = &RenewInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "RenewInstances") + return +} + +func NewRenewInstancesResponse() (response *RenewInstancesResponse) { + response = &RenewInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口 (RenewInstances) 用于续费包年包月实例。 +// +// * 只支持操作包年包月实例。 +// * 续费时请确保账户余额充足。可通过[`DescribeAccountBalance`](https://cloud.tencent.com/document/product/378/4397)接口查询账户余额。 +func (c *Client) RenewInstances(request *RenewInstancesRequest) (response *RenewInstancesResponse, err error) { + if request == nil { + request = NewRenewInstancesRequest() + } + response = NewRenewInstancesResponse() + err = c.Send(request, response) + return +} + +func NewResetInstanceRequest() (request *ResetInstanceRequest) { + request = &ResetInstanceRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "ResetInstance") + return +} + +func NewResetInstanceResponse() (response *ResetInstanceResponse) { + response = &ResetInstanceResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口 (ResetInstance) 用于重装指定实例上的操作系统。 +// +// * 如果指定了`ImageId`参数,则使用指定的镜像重装;否则按照当前实例使用的镜像进行重装。 +// * 系统盘将会被格式化,并重置;请确保系统盘中无重要文件。 +// * `Linux`和`Windows`系统互相切换时,该实例系统盘`ID`将发生变化,系统盘关联快照将无法回滚、恢复数据。 +// * 密码不指定将会通过站内信下发随机密码。 +// * 目前只支持[系统盘类型](https://cloud.tencent.com/document/api/213/9452#block_device)是`CLOUD_BASIC`、`CLOUD_PREMIUM`、`CLOUD_SSD`类型的实例使用该接口实现`Linux`和`Windows`操作系统切换。 +// * 目前不支持海外地域的实例使用该接口实现`Linux`和`Windows`操作系统切换。 +func (c *Client) ResetInstance(request *ResetInstanceRequest) (response *ResetInstanceResponse, err error) { + if request == nil { + request = NewResetInstanceRequest() + } + response = NewResetInstanceResponse() + err = c.Send(request, response) + return +} + +func NewResetInstancesInternetMaxBandwidthRequest() (request *ResetInstancesInternetMaxBandwidthRequest) { + request = &ResetInstancesInternetMaxBandwidthRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "ResetInstancesInternetMaxBandwidth") + return +} + +func NewResetInstancesInternetMaxBandwidthResponse() (response *ResetInstancesInternetMaxBandwidthResponse) { + response = &ResetInstancesInternetMaxBandwidthResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口 (ResetInstancesInternetMaxBandwidth) 用于调整实例公网带宽上限。 +// +// * 不同机型带宽上限范围不一致,具体限制详见[购买网络带宽](https://cloud.tencent.com/document/product/213/509)。 +// * 对于 `BANDWIDTH_PREPAID` 计费方式的带宽,需要输入参数 `StartTime` 和 `EndTime` ,指定调整后的带宽的生效时间段。在这种场景下目前不支持调小带宽,会涉及扣费,请确保账户余额充足。可通过 [`DescribeAccountBalance`](https://cloud.tencent.com/document/product/378/4397) 接口查询账户余额。 +// * 对于 `TRAFFIC_POSTPAID_BY_HOUR` 、 `BANDWIDTH_POSTPAID_BY_HOUR` 和 `BANDWIDTH_PACKAGE` 计费方式的带宽,使用该接口调整带宽上限是实时生效的,可以在带宽允许的范围内调大或者调小带宽,不支持输入参数 `StartTime` 和 `EndTime` 。 +// * 接口不支持调整 `BANDWIDTH_POSTPAID_BY_MONTH` 计费方式的带宽。 +// * 接口不支持批量调整 `BANDWIDTH_PREPAID` 和 `BANDWIDTH_POSTPAID_BY_HOUR` 计费方式的带宽。 +// * 接口不支持批量调整混合计费方式的带宽。例如不支持同时调整 `TRAFFIC_POSTPAID_BY_HOUR` 和 `BANDWIDTH_PACKAGE` 计费方式的带宽。 +func (c *Client) ResetInstancesInternetMaxBandwidth(request *ResetInstancesInternetMaxBandwidthRequest) (response *ResetInstancesInternetMaxBandwidthResponse, err error) { + if request == nil { + request = NewResetInstancesInternetMaxBandwidthRequest() + } + response = NewResetInstancesInternetMaxBandwidthResponse() + err = c.Send(request, response) + return +} + +func NewResetInstancesPasswordRequest() (request *ResetInstancesPasswordRequest) { + request = &ResetInstancesPasswordRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "ResetInstancesPassword") + return +} + +func NewResetInstancesPasswordResponse() (response *ResetInstancesPasswordResponse) { + response = &ResetInstancesPasswordResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口 (ResetInstancesPassword) 用于将实例操作系统的密码重置为用户指定的密码。 +// +// * 只修改管理员帐号的密码。实例的操作系统不同,管理员帐号也会不一样(`Windows`为`Administrator`,`Ubuntu`为`ubuntu`,其它系统为`root`)。 +// * 重置处于运行中状态的实例,需要显式指定强制关机参数`ForceStop`。如果没有显式指定强制关机参数,则只有处于关机状态的实例才允许执行重置密码操作。 +// * 支持批量操作。将多个实例操作系统的密码重置为相同的密码。每次请求批量实例的上限为100。 +func (c *Client) ResetInstancesPassword(request *ResetInstancesPasswordRequest) (response *ResetInstancesPasswordResponse, err error) { + if request == nil { + request = NewResetInstancesPasswordRequest() + } + response = NewResetInstancesPasswordResponse() + err = c.Send(request, response) + return +} + +func NewResetInstancesTypeRequest() (request *ResetInstancesTypeRequest) { + request = &ResetInstancesTypeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "ResetInstancesType") + return +} + +func NewResetInstancesTypeResponse() (response *ResetInstancesTypeResponse) { + response = &ResetInstancesTypeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口 (ResetInstancesType) 用于调整实例的机型。 +// * 目前只支持[系统盘类型](/document/api/213/9452#block_device)是`CLOUD_BASIC`、`CLOUD_PREMIUM`、`CLOUD_SSD`类型的实例使用该接口进行机型调整。 +// * 目前不支持[CDH](https://cloud.tencent.com/document/product/416)实例使用该接口调整机型。对于包年包月实例,使用该接口会涉及扣费,请确保账户余额充足。可通过[`DescribeAccountBalance`](https://cloud.tencent.com/document/product/378/4397)接口查询账户余额。 +func (c *Client) ResetInstancesType(request *ResetInstancesTypeRequest) (response *ResetInstancesTypeResponse, err error) { + if request == nil { + request = NewResetInstancesTypeRequest() + } + response = NewResetInstancesTypeResponse() + err = c.Send(request, response) + return +} + +func NewResizeInstanceDisksRequest() (request *ResizeInstanceDisksRequest) { + request = &ResizeInstanceDisksRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "ResizeInstanceDisks") + return +} + +func NewResizeInstanceDisksResponse() (response *ResizeInstanceDisksResponse) { + response = &ResizeInstanceDisksResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口 (ResizeInstanceDisks) 用于扩容实例的数据盘。 +// +// * 目前只支持扩容非弹性数据盘([`DescribeDisks`](https://cloud.tencent.com/document/api/362/16315)接口返回值中的`Portable`为`false`表示非弹性),且[数据盘类型](/document/api/213/9452#block_device)为:`CLOUD_BASIC`、`CLOUD_PREMIUM`、`CLOUD_SSD`。 +// * 目前不支持[CDH](https://cloud.tencent.com/document/product/416)实例使用该接口扩容数据盘。 +// * 对于包年包月实例,使用该接口会涉及扣费,请确保账户余额充足。可通过[`DescribeAccountBalance`](https://cloud.tencent.com/document/product/378/4397)接口查询账户余额。 +// * 目前只支持扩容一块数据盘。 +func (c *Client) ResizeInstanceDisks(request *ResizeInstanceDisksRequest) (response *ResizeInstanceDisksResponse, err error) { + if request == nil { + request = NewResizeInstanceDisksRequest() + } + response = NewResizeInstanceDisksResponse() + err = c.Send(request, response) + return +} + +func NewRunInstancesRequest() (request *RunInstancesRequest) { + request = &RunInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "RunInstances") + return +} + +func NewRunInstancesResponse() (response *RunInstancesResponse) { + response = &RunInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口 (RunInstances) 用于创建一个或多个指定配置的实例。 +// +// * 实例创建成功后将自动开机启动,[实例状态](/document/api/213/9452#instance_state)变为“运行中”。 +// * 预付费实例的购买会预先扣除本次实例购买所需金额,按小时后付费实例购买会预先冻结本次实例购买一小时内所需金额,在调用本接口前请确保账户余额充足。 +// * 本接口允许购买的实例数量遵循[CVM实例购买限制](https://cloud.tencent.com/document/product/213/2664),所创建的实例和官网入口创建的实例共用配额。 +// * 本接口为异步接口,当创建请求下发成功后会返回一个实例`ID`列表,此时实例的创建并立即未完成。在此期间实例的状态将会处于“准备中”,可以通过调用 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728) 接口查询对应实例的状态,来判断创建有没有最终成功。如果实例的状态由“准备中”变为“运行中”,则为创建成功。 +func (c *Client) RunInstances(request *RunInstancesRequest) (response *RunInstancesResponse, err error) { + if request == nil { + request = NewRunInstancesRequest() + } + response = NewRunInstancesResponse() + err = c.Send(request, response) + return +} + +func NewStartInstancesRequest() (request *StartInstancesRequest) { + request = &StartInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "StartInstances") + return +} + +func NewStartInstancesResponse() (response *StartInstancesResponse) { + response = &StartInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口 (StartInstances) 用于启动一个或多个实例。 +// +// * 只有状态为`STOPPED`的实例才可以进行此操作。 +// * 接口调用成功时,实例会进入`STARTING`状态;启动实例成功时,实例会进入`RUNNING`状态。 +// * 支持批量操作。每次请求批量实例的上限为100。 +func (c *Client) StartInstances(request *StartInstancesRequest) (response *StartInstancesResponse, err error) { + if request == nil { + request = NewStartInstancesRequest() + } + response = NewStartInstancesResponse() + err = c.Send(request, response) + return +} + +func NewStopInstancesRequest() (request *StopInstancesRequest) { + request = &StopInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "StopInstances") + return +} + +func NewStopInstancesResponse() (response *StopInstancesResponse) { + response = &StopInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口 (StopInstances) 用于关闭一个或多个实例。 +// +// * 只有状态为`RUNNING`的实例才可以进行此操作。 +// * 接口调用成功时,实例会进入`STOPPING`状态;关闭实例成功时,实例会进入`STOPPED`状态。 +// * 支持强制关闭。强制关机的效果等同于关闭物理计算机的电源开关。强制关机可能会导致数据丢失或文件系统损坏,请仅在服务器不能正常关机时使用。 +// * 支持批量操作。每次请求批量实例的上限为100。 +func (c *Client) StopInstances(request *StopInstancesRequest) (response *StopInstancesResponse, err error) { + if request == nil { + request = NewStopInstancesRequest() + } + response = NewStopInstancesResponse() + err = c.Send(request, response) + return +} + +func NewSyncImagesRequest() (request *SyncImagesRequest) { + request = &SyncImagesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "SyncImages") + return +} + +func NewSyncImagesResponse() (response *SyncImagesResponse) { + response = &SyncImagesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口(SyncImages)用于将自定义镜像同步到其它地区。 +// +// * 该接口每次调用只支持同步一个镜像。 +// * 该接口支持多个同步地域。 +// * 单个帐号在每个地域最多支持存在10个自定义镜像。 +func (c *Client) SyncImages(request *SyncImagesRequest) (response *SyncImagesResponse, err error) { + if request == nil { + request = NewSyncImagesRequest() + } + response = NewSyncImagesResponse() + err = c.Send(request, response) + return +} + +func NewTerminateInstancesRequest() (request *TerminateInstancesRequest) { + request = &TerminateInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "TerminateInstances") + return +} + +func NewTerminateInstancesResponse() (response *TerminateInstancesResponse) { + response = &TerminateInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口 (TerminateInstances) 用于主动退还实例。 +// +// * 不再使用的实例,可通过本接口主动退还。 +// * 按量计费的实例通过本接口可直接退还;包年包月实例如符合[退还规则](https://cloud.tencent.com/document/product/213/9711),也可通过本接口主动退还。 +// * 支持批量操作,每次请求批量实例的上限为100。 +func (c *Client) TerminateInstances(request *TerminateInstancesRequest) (response *TerminateInstancesResponse, err error) { + if request == nil { + request = NewTerminateInstancesRequest() + } + response = NewTerminateInstancesResponse() + err = c.Send(request, response) + return +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/tencentcloud/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312/models.go b/vendor/github.com/hashicorp/go-discover/provider/tencentcloud/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312/models.go new file mode 100644 index 000000000..b985b8a7e --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/tencentcloud/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312/models.go @@ -0,0 +1,3490 @@ +// Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved. +// +// 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. + +package v20170312 + +import ( + "encoding/json" + + tchttp "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http" +) + +type ActionTimer struct { + + // 扩展数据 + Externals *Externals `json:"Externals,omitempty" name:"Externals"` + + // 定时器名称,目前仅支持销毁一个值:TerminateInstances。 + TimerAction *string `json:"TimerAction,omitempty" name:"TimerAction"` + + // 执行时间,格式形如:2018-5-29 11:26:40,执行时间必须大于当前时间5分钟。 + ActionTime *string `json:"ActionTime,omitempty" name:"ActionTime"` +} + +type AllocateHostsRequest struct { + *tchttp.BaseRequest + + // 实例所在的位置。通过该参数可以指定实例所属可用区,所属项目等属性。 + Placement *Placement `json:"Placement,omitempty" name:"Placement"` + + // 用于保证请求幂等性的字符串。 + ClientToken *string `json:"ClientToken,omitempty" name:"ClientToken"` + + // 预付费模式,即包年包月相关参数设置。通过该参数可以指定包年包月实例的购买时长、是否设置自动续费等属性。若指定实例的付费模式为预付费则该参数必传。 + HostChargePrepaid *ChargePrepaid `json:"HostChargePrepaid,omitempty" name:"HostChargePrepaid"` + + // 实例计费类型。目前仅支持:PREPAID(预付费,即包年包月模式)。 + HostChargeType *string `json:"HostChargeType,omitempty" name:"HostChargeType"` + + // CDH实例机型,默认为:'HS1'。 + HostType *string `json:"HostType,omitempty" name:"HostType"` + + // 购买CDH实例数量。 + HostCount *uint64 `json:"HostCount,omitempty" name:"HostCount"` + + // 标签描述列表。通过指定该参数可以同时绑定标签到相应的资源实例。 + TagSpecification []*TagSpecification `json:"TagSpecification,omitempty" name:"TagSpecification" list` +} + +func (r *AllocateHostsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *AllocateHostsRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type AllocateHostsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 新创建云子机的实例id列表。 + HostIdSet []*string `json:"HostIdSet,omitempty" name:"HostIdSet" list` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *AllocateHostsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *AllocateHostsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type AssociateInstancesKeyPairsRequest struct { + *tchttp.BaseRequest + + // 一个或多个待操作的实例ID,每次请求批量实例的上限为100。
可以通过以下方式获取可用的实例ID:
  • 通过登录[控制台](https://console.cloud.tencent.com/cvm/index)查询实例ID。
  • 通过调用接口 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728) ,取返回信息中的`InstanceId`获取实例ID。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds" list` + + // 一个或多个待操作的密钥对ID,每次请求批量密钥对的上限为100。密钥对ID形如:`skey-3glfot13`。
    可以通过以下方式获取可用的密钥ID:
  • 通过登录[控制台](https://console.cloud.tencent.com/cvm/sshkey)查询密钥ID。
  • 通过调用接口 [DescribeKeyPairs](https://cloud.tencent.com/document/api/213/15699) ,取返回信息中的`KeyId`获取密钥对ID。 + KeyIds []*string `json:"KeyIds,omitempty" name:"KeyIds" list` + + // 是否对运行中的实例选择强制关机。建议对运行中的实例先手动关机,然后再绑定密钥。取值范围:
  • TRUE:表示在正常关机失败后进行强制关机。
  • FALSE:表示在正常关机失败后不进行强制关机。
    默认取值:FALSE。 + ForceStop *bool `json:"ForceStop,omitempty" name:"ForceStop"` +} + +func (r *AssociateInstancesKeyPairsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *AssociateInstancesKeyPairsRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type AssociateInstancesKeyPairsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *AssociateInstancesKeyPairsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *AssociateInstancesKeyPairsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type AssociateSecurityGroupsRequest struct { + *tchttp.BaseRequest + + // 要绑定的`安全组ID`,类似sg-efil73jd,只支持绑定单个安全组。 + SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds" list` + + // 被绑定的`实例ID`,类似ins-lesecurk,支持指定多个实例。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds" list` +} + +func (r *AssociateSecurityGroupsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *AssociateSecurityGroupsRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type AssociateSecurityGroupsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *AssociateSecurityGroupsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *AssociateSecurityGroupsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ChargePrepaid struct { + + // 购买实例的时长,单位:月。取值范围:1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36。 + Period *uint64 `json:"Period,omitempty" name:"Period"` + + // 自动续费标识。取值范围:
  • NOTIFY_AND_AUTO_RENEW:通知过期且自动续费
  • NOTIFY_AND_MANUAL_RENEW:通知过期不自动续费
  • DISABLE_NOTIFY_AND_MANUAL_RENEW:不通知过期不自动续费

    默认取值:NOTIFY_AND_AUTO_RENEW。若该参数指定为NOTIFY_AND_AUTO_RENEW,在账户余额充足的情况下,实例到期后将按月自动续费。 + RenewFlag *string `json:"RenewFlag,omitempty" name:"RenewFlag"` +} + +type CreateDisasterRecoverGroupRequest struct { + *tchttp.BaseRequest + + // 分散置放群组名称,长度1-60个字符,支持中、英文。 + Name *string `json:"Name,omitempty" name:"Name"` + + // 分散置放群组类型,取值范围:
  • HOST:物理机
  • SW:交换机
  • RACK:机架 + Type *string `json:"Type,omitempty" name:"Type"` + + // 用于保证请求幂等性的字符串。该字符串由客户生成,需保证不同请求之间唯一,最大值不超过64个ASCII字符。若不指定该参数,则无法保证请求的幂等性。
    更多详细信息请参阅:如何保证幂等性。 + ClientToken *string `json:"ClientToken,omitempty" name:"ClientToken"` +} + +func (r *CreateDisasterRecoverGroupRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *CreateDisasterRecoverGroupRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateDisasterRecoverGroupResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 分散置放群组ID列表。 + DisasterRecoverGroupId *string `json:"DisasterRecoverGroupId,omitempty" name:"DisasterRecoverGroupId"` + + // 分散置放群组类型,取值范围:
  • HOST:物理机
  • SW:交换机
  • RACK:机架 + Type *string `json:"Type,omitempty" name:"Type"` + + // 分散置放群组名称,长度1-60个字符,支持中、英文。 + Name *string `json:"Name,omitempty" name:"Name"` + + // 置放群组内可容纳的云主机数量。 + CvmQuotaTotal *int64 `json:"CvmQuotaTotal,omitempty" name:"CvmQuotaTotal"` + + // 置放群组内已有的云主机数量。 + CurrentNum *int64 `json:"CurrentNum,omitempty" name:"CurrentNum"` + + // 置放群组创建时间。 + CreateTime *string `json:"CreateTime,omitempty" name:"CreateTime"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateDisasterRecoverGroupResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *CreateDisasterRecoverGroupResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateImageRequest struct { + *tchttp.BaseRequest + + // 镜像名称 + ImageName *string `json:"ImageName,omitempty" name:"ImageName"` + + // 需要制作镜像的实例ID + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 镜像描述 + ImageDescription *string `json:"ImageDescription,omitempty" name:"ImageDescription"` + + // 软关机失败时是否执行强制关机以制作镜像 + ForcePoweroff *string `json:"ForcePoweroff,omitempty" name:"ForcePoweroff"` + + // 创建Windows镜像时是否启用Sysprep + Sysprep *string `json:"Sysprep,omitempty" name:"Sysprep"` + + // 实例处于运行中时,是否允许关机执行制作镜像任务。 + Reboot *string `json:"Reboot,omitempty" name:"Reboot"` + + // 实例需要制作镜像的数据盘Id + DataDiskIds []*string `json:"DataDiskIds,omitempty" name:"DataDiskIds" list` + + // 需要制作镜像的快照Id,必须包含一个系统盘快照 + SnapshotIds []*string `json:"SnapshotIds,omitempty" name:"SnapshotIds" list` + + // 检测请求的合法性,但不会对操作的资源产生任何影响 + DryRun *bool `json:"DryRun,omitempty" name:"DryRun"` +} + +func (r *CreateImageRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *CreateImageRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateImageResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateImageResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *CreateImageResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateKeyPairRequest struct { + *tchttp.BaseRequest + + // 密钥对名称,可由数字,字母和下划线组成,长度不超过25个字符。 + KeyName *string `json:"KeyName,omitempty" name:"KeyName"` + + // 密钥对创建后所属的项目ID。 + // 可以通过以下方式获取项目ID: + //
  • 通过项目列表查询项目ID。 + //
  • 通过调用接口DescribeProject,取返回信息中的`projectId `获取项目ID。 + ProjectId *int64 `json:"ProjectId,omitempty" name:"ProjectId"` +} + +func (r *CreateKeyPairRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *CreateKeyPairRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateKeyPairResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 密钥对信息。 + KeyPair *KeyPair `json:"KeyPair,omitempty" name:"KeyPair"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateKeyPairResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *CreateKeyPairResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DataDisk struct { + + // 数据盘大小,单位:GB。最小调整步长为10G,不同数据盘类型取值范围不同,具体限制详见:[CVM实例配置](/document/product/213/2177)。默认值为0,表示不购买数据盘。更多限制详见产品文档。 + DiskSize *int64 `json:"DiskSize,omitempty" name:"DiskSize"` + + // 数据盘类型。数据盘类型限制详见[CVM实例配置](/document/product/213/2177)。取值范围:
  • LOCAL_BASIC:本地硬盘
  • LOCAL_SSD:本地SSD硬盘
  • CLOUD_BASIC:普通云硬盘
  • CLOUD_PREMIUM:高性能云硬盘
  • CLOUD_SSD:SSD云硬盘

    默认取值:LOCAL_BASIC。

    该参数对`ResizeInstanceDisk`接口无效。 + DiskType *string `json:"DiskType,omitempty" name:"DiskType"` + + // 数据盘ID。LOCAL_BASIC 和 LOCAL_SSD 类型没有ID。暂时不支持该参数。 + DiskId *string `json:"DiskId,omitempty" name:"DiskId"` + + // 数据盘是否随子机销毁。取值范围: + //
  • TRUE:子机销毁时,销毁数据盘,只支持按小时后付费云盘 + //
  • FALSE:子机销毁时,保留数据盘
    + // 默认取值:TRUE
    + // 该参数目前仅用于 `RunInstances` 接口。 + // 注意:此字段可能返回 null,表示取不到有效值。 + DeleteWithInstance *bool `json:"DeleteWithInstance,omitempty" name:"DeleteWithInstance"` + + // 数据盘快照ID。选择的数据盘快照大小需小于数据盘大小。 + // 注意:此字段可能返回 null,表示取不到有效值。 + SnapshotId *string `json:"SnapshotId,omitempty" name:"SnapshotId"` +} + +type DeleteDisasterRecoverGroupsRequest struct { + *tchttp.BaseRequest + + // 分散置放群组ID列表,可通过[DescribeDisasterRecoverGroups](https://cloud.tencent.com/document/api/213/17810)接口获取。 + DisasterRecoverGroupIds []*string `json:"DisasterRecoverGroupIds,omitempty" name:"DisasterRecoverGroupIds" list` +} + +func (r *DeleteDisasterRecoverGroupsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DeleteDisasterRecoverGroupsRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteDisasterRecoverGroupsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteDisasterRecoverGroupsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DeleteDisasterRecoverGroupsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteImagesRequest struct { + *tchttp.BaseRequest + + // 准备删除的镜像Id列表 + ImageIds []*string `json:"ImageIds,omitempty" name:"ImageIds" list` +} + +func (r *DeleteImagesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DeleteImagesRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteImagesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteImagesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DeleteImagesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteKeyPairsRequest struct { + *tchttp.BaseRequest + + // 一个或多个待操作的密钥对ID。每次请求批量密钥对的上限为100。
    可以通过以下方式获取可用的密钥ID:
  • 通过登录[控制台](https://console.cloud.tencent.com/cvm/sshkey)查询密钥ID。
  • 通过调用接口 [DescribeKeyPairs](https://cloud.tencent.com/document/api/213/15699) ,取返回信息中的 `KeyId` 获取密钥对ID。 + KeyIds []*string `json:"KeyIds,omitempty" name:"KeyIds" list` +} + +func (r *DeleteKeyPairsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DeleteKeyPairsRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteKeyPairsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteKeyPairsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DeleteKeyPairsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeDisasterRecoverGroupQuotaRequest struct { + *tchttp.BaseRequest +} + +func (r *DescribeDisasterRecoverGroupQuotaRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DescribeDisasterRecoverGroupQuotaRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeDisasterRecoverGroupQuotaResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 可创建置放群组数量的上限。 + GroupQuota *int64 `json:"GroupQuota,omitempty" name:"GroupQuota"` + + // 当前用户已经创建的置放群组数量。 + CurrentNum *int64 `json:"CurrentNum,omitempty" name:"CurrentNum"` + + // 物理机类型容灾组内实例的配额数。 + CvmInHostGroupQuota *int64 `json:"CvmInHostGroupQuota,omitempty" name:"CvmInHostGroupQuota"` + + // 交换机类型容灾组内实例的配额数。 + CvmInSwGroupQuota *int64 `json:"CvmInSwGroupQuota,omitempty" name:"CvmInSwGroupQuota"` + + // 机架类型容灾组内实例的配额数。 + CvmInRackGroupQuota *int64 `json:"CvmInRackGroupQuota,omitempty" name:"CvmInRackGroupQuota"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeDisasterRecoverGroupQuotaResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DescribeDisasterRecoverGroupQuotaResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeDisasterRecoverGroupsRequest struct { + *tchttp.BaseRequest + + // 分散置放群组ID列表。 + DisasterRecoverGroupIds []*string `json:"DisasterRecoverGroupIds,omitempty" name:"DisasterRecoverGroupIds" list` + + // 分散置放群组名称,支持模糊匹配。 + Name *string `json:"Name,omitempty" name:"Name"` + + // 偏移量,默认为0。关于`Offset`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Offset *int64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为20,最大值为100。关于`Limit`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Limit *int64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeDisasterRecoverGroupsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DescribeDisasterRecoverGroupsRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeDisasterRecoverGroupsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 分散置放群组信息列表。 + DisasterRecoverGroupSet []*DisasterRecoverGroup `json:"DisasterRecoverGroupSet,omitempty" name:"DisasterRecoverGroupSet" list` + + // 用户置放群组总量。 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeDisasterRecoverGroupsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DescribeDisasterRecoverGroupsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeHostsRequest struct { + *tchttp.BaseRequest + + // 过滤条件。 + //
  • zone - String - 是否必填:否 - (过滤条件)按照可用区过滤。
  • + //
  • project-id - Integer - 是否必填:否 - (过滤条件)按照项目ID过滤。可通过调用 DescribeProject 查询已创建的项目列表或登录控制台进行查看;也可以调用 AddProject 创建新的项目。
  • + //
  • host-id - String - 是否必填:否 - (过滤条件)按照CDH ID过滤。CDH ID形如:host-11112222。
  • + //
  • host-name - String - 是否必填:否 - (过滤条件)按照CDH实例名称过滤。
  • + //
  • host-state - String - 是否必填:否 - (过滤条件)按照CDH实例状态进行过滤。(PENDING:创建中|LAUNCH_FAILURE:创建失败|RUNNING:运行中|EXPIRED:已过期)
  • + Filters []*Filter `json:"Filters,omitempty" name:"Filters" list` + + // 偏移量,默认为0。 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为20,最大值为100。 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeHostsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DescribeHostsRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeHostsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合查询条件的cdh实例总数 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // cdh实例详细信息列表 + HostSet []*HostItem `json:"HostSet,omitempty" name:"HostSet" list` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeHostsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DescribeHostsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeImageQuotaRequest struct { + *tchttp.BaseRequest +} + +func (r *DescribeImageQuotaRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DescribeImageQuotaRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeImageQuotaResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 账户的镜像配额 + ImageNumQuota *int64 `json:"ImageNumQuota,omitempty" name:"ImageNumQuota"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeImageQuotaResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DescribeImageQuotaResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeImageSharePermissionRequest struct { + *tchttp.BaseRequest + + // 需要共享的镜像Id + ImageId *string `json:"ImageId,omitempty" name:"ImageId"` +} + +func (r *DescribeImageSharePermissionRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DescribeImageSharePermissionRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeImageSharePermissionResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 镜像共享信息 + SharePermissionSet []*SharePermission `json:"SharePermissionSet,omitempty" name:"SharePermissionSet" list` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeImageSharePermissionResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DescribeImageSharePermissionResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeImagesRequest struct { + *tchttp.BaseRequest + + // 镜像ID列表 。镜像ID如:`img-gvbnzy6f`。array型参数的格式可以参考[API简介](https://cloud.tencent.com/document/api/213/15688)。镜像ID可以通过如下方式获取:
  • 通过[DescribeImages](https://cloud.tencent.com/document/api/213/15715)接口返回的`ImageId`获取。
  • 通过[镜像控制台](https://console.cloud.tencent.com/cvm/image)获取。 + ImageIds []*string `json:"ImageIds,omitempty" name:"ImageIds" list` + + // 过滤条件,每次请求的`Filters`的上限为0,`Filters.Values`的上限为5。参数不可以同时指定`ImageIds`和`Filters`。详细的过滤条件如下: + //
  • image-id - String - 是否必填: 否 - (过滤条件)按照镜像ID进行过滤
  • + //
  • image-type - String - 是否必填: 否 - (过滤条件)按照镜像类型进行过滤。取值范围: + // PRIVATE_IMAGE: 私有镜像 (本帐户创建的镜像) + // PUBLIC_IMAGE: 公共镜像 (腾讯云官方镜像) + // MARKET_IMAGE: 服务市场 (服务市场提供的镜像) + // SHARED_IMAGE: 共享镜像(其他账户共享给本帐户的镜像) 。
  • + Filters []*Filter `json:"Filters,omitempty" name:"Filters" list` + + // 偏移量,默认为0。关于Offset详见[API简介](/document/api/213/568#.E8.BE.93.E5.85.A5.E5.8F.82.E6.95.B0.E4.B8.8E.E8.BF.94.E5.9B.9E.E5.8F.82.E6.95.B0.E9.87.8A.E4.B9.89)。 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 数量限制,默认为20,最大值为100。关于Limit详见[API简介](/document/api/213/568#.E8.BE.93.E5.85.A5.E5.8F.82.E6.95.B0.E4.B8.8E.E8.BF.94.E5.9B.9E.E5.8F.82.E6.95.B0.E9.87.8A.E4.B9.89)。 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` + + // 实例类型,如 `S1.SMALL1` + InstanceType *string `json:"InstanceType,omitempty" name:"InstanceType"` +} + +func (r *DescribeImagesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DescribeImagesRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeImagesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 一个关于镜像详细信息的结构体,主要包括镜像的主要状态与属性。 + ImageSet []*Image `json:"ImageSet,omitempty" name:"ImageSet" list` + + // 符合要求的镜像数量。 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeImagesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DescribeImagesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeImportImageOsRequest struct { + *tchttp.BaseRequest +} + +func (r *DescribeImportImageOsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DescribeImportImageOsRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeImportImageOsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 支持的导入镜像的操作系统类型。 + ImportImageOsListSupported *ImageOsList `json:"ImportImageOsListSupported,omitempty" name:"ImportImageOsListSupported"` + + // 支持的导入镜像的操作系统版本。 + ImportImageOsVersionSet []*OsVersion `json:"ImportImageOsVersionSet,omitempty" name:"ImportImageOsVersionSet" list` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeImportImageOsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DescribeImportImageOsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeInstanceFamilyConfigsRequest struct { + *tchttp.BaseRequest +} + +func (r *DescribeInstanceFamilyConfigsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DescribeInstanceFamilyConfigsRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeInstanceFamilyConfigsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 实例机型组配置的列表信息 + InstanceFamilyConfigSet []*InstanceFamilyConfig `json:"InstanceFamilyConfigSet,omitempty" name:"InstanceFamilyConfigSet" list` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeInstanceFamilyConfigsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DescribeInstanceFamilyConfigsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeInstanceInternetBandwidthConfigsRequest struct { + *tchttp.BaseRequest + + // 待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728)接口返回值中的`InstanceId`获取。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` +} + +func (r *DescribeInstanceInternetBandwidthConfigsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DescribeInstanceInternetBandwidthConfigsRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeInstanceInternetBandwidthConfigsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 带宽配置信息列表。 + InternetBandwidthConfigSet []*InternetBandwidthConfig `json:"InternetBandwidthConfigSet,omitempty" name:"InternetBandwidthConfigSet" list` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeInstanceInternetBandwidthConfigsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DescribeInstanceInternetBandwidthConfigsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeInstanceTypeConfigsRequest struct { + *tchttp.BaseRequest + + // 过滤条件。 + //
  • zone - String - 是否必填:否 -(过滤条件)按照[可用区](https://cloud.tencent.com/document/api/213/9452#zone)过滤。
  • + //
  • instance-family - String - 是否必填:否 -(过滤条件)按照实例机型系列过滤。实例机型系列形如:S1、I1、M1等。
  • + // 每次请求的`Filters`的上限为10,`Filter.Values`的上限为1。 + Filters []*Filter `json:"Filters,omitempty" name:"Filters" list` +} + +func (r *DescribeInstanceTypeConfigsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DescribeInstanceTypeConfigsRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeInstanceTypeConfigsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 实例机型配置列表。 + InstanceTypeConfigSet []*InstanceTypeConfig `json:"InstanceTypeConfigSet,omitempty" name:"InstanceTypeConfigSet" list` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeInstanceTypeConfigsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DescribeInstanceTypeConfigsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeInstanceVncUrlRequest struct { + *tchttp.BaseRequest + + // 一个操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728) API返回值中的`InstanceId`获取。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` +} + +func (r *DescribeInstanceVncUrlRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DescribeInstanceVncUrlRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeInstanceVncUrlResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 实例的管理终端地址。 + InstanceVncUrl *string `json:"InstanceVncUrl,omitempty" name:"InstanceVncUrl"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeInstanceVncUrlResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DescribeInstanceVncUrlResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeInstancesOperationLimitRequest struct { + *tchttp.BaseRequest + + // 按照一个或者多个实例ID查询,可通过[DescribeInstances](https://cloud.tencent.com/document/api/213/9388)API返回值中的InstanceId获取。实例ID形如:ins-xxxxxxxx。(此参数的具体格式可参考API[简介](https://cloud.tencent.com/document/api/213/15688)的id.N一节)。每次请求的实例的上限为100。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds" list` + + // 实例操作。 + //
  • INSTANCE_DEGRADE:实例降配操作
  • + Operation *string `json:"Operation,omitempty" name:"Operation"` +} + +func (r *DescribeInstancesOperationLimitRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DescribeInstancesOperationLimitRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeInstancesOperationLimitResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 该参数表示调整配置操作(降配)限制次数查询。 + InstanceOperationLimitSet []*OperationCountLimit `json:"InstanceOperationLimitSet,omitempty" name:"InstanceOperationLimitSet" list` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeInstancesOperationLimitResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DescribeInstancesOperationLimitResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeInstancesRequest struct { + *tchttp.BaseRequest + + // 按照一个或者多个实例ID查询。实例ID形如:`ins-xxxxxxxx`。(此参数的具体格式可参考API[简介](https://cloud.tencent.com/document/api/213/15688)的`id.N`一节)。每次请求的实例的上限为100。参数不支持同时指定`InstanceIds`和`Filters`。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds" list` + + // 过滤条件。 + //
  • zone - String - 是否必填:否 -(过滤条件)按照可用区过滤。
  • + //
  • project-id - Integer - 是否必填:否 -(过滤条件)按照项目ID过滤。可通过调用[DescribeProject](https://cloud.tencent.com/document/api/378/4400)查询已创建的项目列表或登录[控制台](https://console.cloud.tencent.com/cvm/index)进行查看;也可以调用[AddProject](https://cloud.tencent.com/document/api/378/4398)创建新的项目。
  • + //
  • host-id - String - 是否必填:否 - (过滤条件)按照[CDH](https://cloud.tencent.com/document/product/416) ID过滤。[CDH](https://cloud.tencent.com/document/product/416) ID形如:host-xxxxxxxx。
  • + //
  • vpc-id - String - 是否必填:否 - (过滤条件)按照VPC ID进行过滤。VPC ID形如:vpc-xxxxxxxx。
  • + //
  • subnet-id - String - 是否必填:否 - (过滤条件)按照子网ID进行过滤。子网ID形如:subnet-xxxxxxxx。
  • + //
  • instance-id - String - 是否必填:否 - (过滤条件)按照实例ID过滤。实例ID形如:ins-xxxxxxxx。
  • + //
  • security-group-id - String - 是否必填:否 - (过滤条件)按照安全组ID过滤,安全组ID形如: sg-8jlk3f3r。
  • + //
  • instance-name - String - 是否必填:否 - (过滤条件)按照实例名称过滤。
  • + //
  • instance-charge-type - String - 是否必填:否 -(过滤条件)按照实例计费模式过滤。 (PREPAID:表示预付费,即包年包月 | POSTPAID_BY_HOUR:表示后付费,即按量计费 | CDHPAID:表示[CDH](https://cloud.tencent.com/document/product/416)付费,即只对[CDH](https://cloud.tencent.com/document/product/416)计费,不对[CDH](https://cloud.tencent.com/document/product/416)上的实例计费。 )
  • + //
  • private-ip-address - String - 是否必填:否 - (过滤条件)按照实例主网卡的内网IP过滤。
  • + //
  • public-ip-address - String - 是否必填:否 - (过滤条件)按照实例主网卡的公网IP过滤,包含实例创建时自动分配的IP和实例创建后手动绑定的弹性IP。
  • + //
  • tag-key - String - 是否必填:否 - (过滤条件)按照标签键进行过滤。
  • + //
  • tag-value - String - 是否必填:否 - (过滤条件)按照标签值进行过滤。
  • + //
  • tag:tag-key - String - 是否必填:否 - (过滤条件)按照标签键值对进行过滤。 tag-key使用具体的标签键进行替换。使用请参考示例2。
  • + // 每次请求的`Filters`的上限为10,`Filter.Values`的上限为5。参数不支持同时指定`InstanceIds`和`Filters`。 + Filters []*Filter `json:"Filters,omitempty" name:"Filters" list` + + // 偏移量,默认为0。关于`Offset`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Offset *int64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为20,最大值为100。关于`Limit`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Limit *int64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DescribeInstancesRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的实例数量。 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 实例详细信息列表。 + InstanceSet []*Instance `json:"InstanceSet,omitempty" name:"InstanceSet" list` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeInstancesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DescribeInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeInstancesStatusRequest struct { + *tchttp.BaseRequest + + // 按照一个或者多个实例ID查询。实例ID形如:`ins-11112222`。此参数的具体格式可参考API[简介](https://cloud.tencent.com/document/api/213/15688)的`id.N`一节)。每次请求的实例的上限为100。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds" list` + + // 偏移量,默认为0。关于`Offset`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Offset *int64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为20,最大值为100。关于`Limit`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Limit *int64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeInstancesStatusRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DescribeInstancesStatusRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeInstancesStatusResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的实例状态数量。 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // [实例状态](https://cloud.tencent.com/document/api/213/15738) 列表。 + InstanceStatusSet []*InstanceStatus `json:"InstanceStatusSet,omitempty" name:"InstanceStatusSet" list` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeInstancesStatusResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DescribeInstancesStatusResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeInternetChargeTypeConfigsRequest struct { + *tchttp.BaseRequest +} + +func (r *DescribeInternetChargeTypeConfigsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DescribeInternetChargeTypeConfigsRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeInternetChargeTypeConfigsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 网络计费类型配置。 + InternetChargeTypeConfigSet []*InternetChargeTypeConfig `json:"InternetChargeTypeConfigSet,omitempty" name:"InternetChargeTypeConfigSet" list` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeInternetChargeTypeConfigsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DescribeInternetChargeTypeConfigsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeKeyPairsRequest struct { + *tchttp.BaseRequest + + // 密钥对ID,密钥对ID形如:`skey-11112222`(此接口支持同时传入多个ID进行过滤。此参数的具体格式可参考 API [简介](https://cloud.tencent.com/document/api/213/15688)的 `id.N` 一节)。参数不支持同时指定 `KeyIds` 和 `Filters`。密钥对ID可以通过登录[控制台](https://console.cloud.tencent.com/cvm/index)查询。 + KeyIds []*string `json:"KeyIds,omitempty" name:"KeyIds" list` + + // 过滤条件。 + //
  • project-id - Integer - 是否必填:否 -(过滤条件)按照项目ID过滤。可以通过[项目列表](https://console.cloud.tencent.com/project)查询项目ID,或者调用接口 [DescribeProject](https://cloud.tencent.com/document/api/378/4400),取返回信息中的projectId获取项目ID。
  • + //
  • key-name - String - 是否必填:否 -(过滤条件)按照密钥对名称过滤。
  • 参数不支持同时指定 `KeyIds` 和 `Filters`。 + Filters []*Filter `json:"Filters,omitempty" name:"Filters" list` + + // 偏移量,默认为0。关于 `Offset` 的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。返回数量,默认为20,最大值为100。关于 `Limit` 的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Offset *int64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为20,最大值为100。关于 `Limit` 的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Limit *int64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeKeyPairsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DescribeKeyPairsRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeKeyPairsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的密钥对数量。 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 密钥对详细信息列表。 + KeyPairSet []*KeyPair `json:"KeyPairSet,omitempty" name:"KeyPairSet" list` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeKeyPairsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DescribeKeyPairsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeRegionsRequest struct { + *tchttp.BaseRequest +} + +func (r *DescribeRegionsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DescribeRegionsRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeRegionsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 地域数量 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 地域列表信息 + RegionSet []*RegionInfo `json:"RegionSet,omitempty" name:"RegionSet" list` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeRegionsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DescribeRegionsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeZoneInstanceConfigInfosRequest struct { + *tchttp.BaseRequest + + // 过滤条件。 + // + //
  • zone - String - 是否必填:否 -(过滤条件)按照可用区过滤。
  • + // + //
  • instance-family String - 是否必填:否 -(过滤条件)按照机型系列过滤。按照实例机型系列过滤。实例机型系列形如:S1、I1、M1等。
  • + // + //
  • instance-type - String - 是否必填:否 - (过滤条件)按照机型过滤。按照实例机型过滤。不同实例机型指定了不同的资源规格,具体取值可通过调用接口 DescribeInstanceTypeConfigs 来获得最新的规格表或参见实例类型描述。若不指定该参数,则默认机型为S1.SMALL1。
  • + // + //
  • instance-charge-type - String - 是否必填:否 -(过滤条件)按照实例计费模式过滤。 (PREPAID:表示预付费,即包年包月 | POSTPAID_BY_HOUR:表示后付费,即按量计费 | CDHPAID:表示CDH付费,即只对CDH计费,不对CDH上的实例计费。 )
  • + Filters []*Filter `json:"Filters,omitempty" name:"Filters" list` +} + +func (r *DescribeZoneInstanceConfigInfosRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DescribeZoneInstanceConfigInfosRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeZoneInstanceConfigInfosResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 可用区机型配置列表。 + InstanceTypeQuotaSet []*InstanceTypeQuotaItem `json:"InstanceTypeQuotaSet,omitempty" name:"InstanceTypeQuotaSet" list` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeZoneInstanceConfigInfosResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DescribeZoneInstanceConfigInfosResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeZonesRequest struct { + *tchttp.BaseRequest +} + +func (r *DescribeZonesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DescribeZonesRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeZonesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 可用区数量。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 可用区列表信息。 + ZoneSet []*ZoneInfo `json:"ZoneSet,omitempty" name:"ZoneSet" list` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeZonesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DescribeZonesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DisassociateInstancesKeyPairsRequest struct { + *tchttp.BaseRequest + + // 一个或多个待操作的实例ID,每次请求批量实例的上限为100。

    可以通过以下方式获取可用的实例ID:
  • 通过登录[控制台](https://console.cloud.tencent.com/cvm/index)查询实例ID。
  • 通过调用接口 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728) ,取返回信息中的 `InstanceId` 获取实例ID。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds" list` + + // 密钥对ID列表,每次请求批量密钥对的上限为100。密钥对ID形如:`skey-11112222`。

    可以通过以下方式获取可用的密钥ID:
  • 通过登录[控制台](https://console.cloud.tencent.com/cvm/sshkey)查询密钥ID。
  • 通过调用接口 [DescribeKeyPairs](https://cloud.tencent.com/document/api/213/15699) ,取返回信息中的 `KeyId` 获取密钥对ID。 + KeyIds []*string `json:"KeyIds,omitempty" name:"KeyIds" list` + + // 是否对运行中的实例选择强制关机。建议对运行中的实例先手动关机,然后再解绑密钥。取值范围:
  • TRUE:表示在正常关机失败后进行强制关机。
  • FALSE:表示在正常关机失败后不进行强制关机。

    默认取值:FALSE。 + ForceStop *bool `json:"ForceStop,omitempty" name:"ForceStop"` +} + +func (r *DisassociateInstancesKeyPairsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DisassociateInstancesKeyPairsRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DisassociateInstancesKeyPairsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DisassociateInstancesKeyPairsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DisassociateInstancesKeyPairsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DisassociateSecurityGroupsRequest struct { + *tchttp.BaseRequest + + // 要解绑的`安全组ID`,类似sg-efil73jd,只支持解绑单个安全组。 + SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds" list` + + // 被解绑的`实例ID`,类似ins-lesecurk,支持指定多个实例 。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds" list` +} + +func (r *DisassociateSecurityGroupsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DisassociateSecurityGroupsRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DisassociateSecurityGroupsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DisassociateSecurityGroupsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DisassociateSecurityGroupsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DisasterRecoverGroup struct { + + // 分散置放群组id。 + DisasterRecoverGroupId *string `json:"DisasterRecoverGroupId,omitempty" name:"DisasterRecoverGroupId"` + + // 分散置放群组名称,长度1-60个字符。 + Name *string `json:"Name,omitempty" name:"Name"` + + // 分散置放群组类型,取值范围:
  • HOST:物理机
  • SW:交换机
  • RACK:机架 + Type *string `json:"Type,omitempty" name:"Type"` + + // 分散置放群组内最大容纳云主机数量。 + CvmQuotaTotal *int64 `json:"CvmQuotaTotal,omitempty" name:"CvmQuotaTotal"` + + // 分散置放群组内云主机当前数量。 + CurrentNum *int64 `json:"CurrentNum,omitempty" name:"CurrentNum"` + + // 分散置放群组内,云主机id列表。 + // 注意:此字段可能返回 null,表示取不到有效值。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds" list` + + // 分散置放群组创建时间。 + // 注意:此字段可能返回 null,表示取不到有效值。 + CreateTime *string `json:"CreateTime,omitempty" name:"CreateTime"` +} + +type EnhancedService struct { + + // 开启云安全服务。若不指定该参数,则默认开启云安全服务。 + SecurityService *RunSecurityServiceEnabled `json:"SecurityService,omitempty" name:"SecurityService"` + + // 开启云监控服务。若不指定该参数,则默认开启云监控服务。 + MonitorService *RunMonitorServiceEnabled `json:"MonitorService,omitempty" name:"MonitorService"` +} + +type Externals struct { + + // 释放地址 + // 注意:此字段可能返回 null,表示取不到有效值。 + ReleaseAddress *bool `json:"ReleaseAddress,omitempty" name:"ReleaseAddress"` + + // 不支持的网络类型 + // 注意:此字段可能返回 null,表示取不到有效值。 + UnsupportNetworks []*string `json:"UnsupportNetworks,omitempty" name:"UnsupportNetworks" list` + + // HDD本地存储属性 + // 注意:此字段可能返回 null,表示取不到有效值。 + StorageBlockAttr *StorageBlock `json:"StorageBlockAttr,omitempty" name:"StorageBlockAttr"` +} + +type Filter struct { + + // 需要过滤的字段。 + Name *string `json:"Name,omitempty" name:"Name"` + + // 字段的过滤值。 + Values []*string `json:"Values,omitempty" name:"Values" list` +} + +type HostItem struct { + + // cdh实例所在的位置。通过该参数可以指定实例所属可用区,所属项目等属性。 + Placement *Placement `json:"Placement,omitempty" name:"Placement"` + + // cdh实例id + HostId *string `json:"HostId,omitempty" name:"HostId"` + + // cdh实例类型 + HostType *string `json:"HostType,omitempty" name:"HostType"` + + // cdh实例名称 + HostName *string `json:"HostName,omitempty" name:"HostName"` + + // cdh实例付费模式 + HostChargeType *string `json:"HostChargeType,omitempty" name:"HostChargeType"` + + // cdh实例自动续费标记 + RenewFlag *string `json:"RenewFlag,omitempty" name:"RenewFlag"` + + // cdh实例创建时间 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` + + // cdh实例过期时间 + ExpiredTime *string `json:"ExpiredTime,omitempty" name:"ExpiredTime"` + + // cdh实例上已创建云子机的实例id列表 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds" list` + + // cdh实例状态 + HostState *string `json:"HostState,omitempty" name:"HostState"` + + // cdh实例ip + HostIp *string `json:"HostIp,omitempty" name:"HostIp"` + + // cdh实例资源信息 + HostResource *HostResource `json:"HostResource,omitempty" name:"HostResource"` + + // 专用宿主机所属的围笼ID。该字段仅对金融专区围笼内的专用宿主机有效。 + // 注意:此字段可能返回 null,表示取不到有效值。 + CageId *string `json:"CageId,omitempty" name:"CageId"` +} + +type HostResource struct { + + // cdh实例总cpu核数 + CpuTotal *uint64 `json:"CpuTotal,omitempty" name:"CpuTotal"` + + // cdh实例可用cpu核数 + CpuAvailable *uint64 `json:"CpuAvailable,omitempty" name:"CpuAvailable"` + + // cdh实例总内存大小(单位为:GiB) + MemTotal *float64 `json:"MemTotal,omitempty" name:"MemTotal"` + + // cdh实例可用内存大小(单位为:GiB) + MemAvailable *float64 `json:"MemAvailable,omitempty" name:"MemAvailable"` + + // cdh实例总磁盘大小(单位为:GiB) + DiskTotal *uint64 `json:"DiskTotal,omitempty" name:"DiskTotal"` + + // cdh实例可用磁盘大小(单位为:GiB) + DiskAvailable *uint64 `json:"DiskAvailable,omitempty" name:"DiskAvailable"` +} + +type Image struct { + + // 镜像ID + ImageId *string `json:"ImageId,omitempty" name:"ImageId"` + + // 镜像操作系统 + OsName *string `json:"OsName,omitempty" name:"OsName"` + + // 镜像类型 + ImageType *string `json:"ImageType,omitempty" name:"ImageType"` + + // 镜像创建时间 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` + + // 镜像名称 + ImageName *string `json:"ImageName,omitempty" name:"ImageName"` + + // 镜像描述 + ImageDescription *string `json:"ImageDescription,omitempty" name:"ImageDescription"` + + // 镜像大小 + ImageSize *int64 `json:"ImageSize,omitempty" name:"ImageSize"` + + // 镜像架构 + Architecture *string `json:"Architecture,omitempty" name:"Architecture"` + + // 镜像状态 + ImageState *string `json:"ImageState,omitempty" name:"ImageState"` + + // 镜像来源平台 + Platform *string `json:"Platform,omitempty" name:"Platform"` + + // 镜像创建者 + ImageCreator *string `json:"ImageCreator,omitempty" name:"ImageCreator"` + + // 镜像来源 + ImageSource *string `json:"ImageSource,omitempty" name:"ImageSource"` + + // 同步百分比 + // 注意:此字段可能返回 null,表示取不到有效值。 + SyncPercent *int64 `json:"SyncPercent,omitempty" name:"SyncPercent"` + + // 镜像是否支持cloud-init + // 注意:此字段可能返回 null,表示取不到有效值。 + IsSupportCloudinit *bool `json:"IsSupportCloudinit,omitempty" name:"IsSupportCloudinit"` + + // 镜像关联的快照信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + SnapshotSet []*Snapshot `json:"SnapshotSet,omitempty" name:"SnapshotSet" list` +} + +type ImageOsList struct { + + // 支持的windows操作系统。 + // 注意:此字段可能返回 null,表示取不到有效值。 + Windows []*string `json:"Windows,omitempty" name:"Windows" list` + + // 支持的linux操作系统 + // 注意:此字段可能返回 null,表示取不到有效值。 + Linux []*string `json:"Linux,omitempty" name:"Linux" list` +} + +type ImportImageRequest struct { + *tchttp.BaseRequest + + // 导入镜像的操作系统架构,`x86_64` 或 `i386` + Architecture *string `json:"Architecture,omitempty" name:"Architecture"` + + // 导入镜像的操作系统类型,通过`DescribeImportImageOs`获取 + OsType *string `json:"OsType,omitempty" name:"OsType"` + + // 导入镜像的操作系统版本,通过`DescribeImportImageOs`获取 + OsVersion *string `json:"OsVersion,omitempty" name:"OsVersion"` + + // 导入镜像存放的cos地址 + ImageUrl *string `json:"ImageUrl,omitempty" name:"ImageUrl"` + + // 镜像名称 + ImageName *string `json:"ImageName,omitempty" name:"ImageName"` + + // 镜像描述 + ImageDescription *string `json:"ImageDescription,omitempty" name:"ImageDescription"` + + // 只检查参数,不执行任务 + DryRun *bool `json:"DryRun,omitempty" name:"DryRun"` + + // 是否强制导入,参考[强制导入镜像](https://cloud.tencent.com/document/product/213/12849) + Force *bool `json:"Force,omitempty" name:"Force"` +} + +func (r *ImportImageRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *ImportImageRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ImportImageResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ImportImageResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *ImportImageResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ImportKeyPairRequest struct { + *tchttp.BaseRequest + + // 密钥对名称,可由数字,字母和下划线组成,长度不超过25个字符。 + KeyName *string `json:"KeyName,omitempty" name:"KeyName"` + + // 密钥对创建后所属的[项目](/document/product/378/10863)ID。

    可以通过以下方式获取项目ID:
  • 通过[项目列表](https://console.cloud.tencent.com/project)查询项目ID。
  • 通过调用接口 [DescribeProject](https://cloud.tencent.com/document/api/378/4400),取返回信息中的 `projectId ` 获取项目ID。 + // + // 如果是默认项目,直接填0就可以。 + ProjectId *int64 `json:"ProjectId,omitempty" name:"ProjectId"` + + // 密钥对的公钥内容,`OpenSSH RSA` 格式。 + PublicKey *string `json:"PublicKey,omitempty" name:"PublicKey"` +} + +func (r *ImportKeyPairRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *ImportKeyPairRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ImportKeyPairResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 密钥对ID。 + KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ImportKeyPairResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *ImportKeyPairResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type InquiryPriceModifyInstancesChargeTypeRequest struct { + *tchttp.BaseRequest + + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728)接口返回值中的`InstanceId`获取。每次请求批量实例的上限为100。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds" list` + + // 实例[计费类型](https://cloud.tencent.com/document/product/213/2180)。
  • PREPAID:预付费,即包年包月。 + InstanceChargeType *string `json:"InstanceChargeType,omitempty" name:"InstanceChargeType"` + + // 预付费模式,即包年包月相关参数设置。通过该参数可以指定包年包月实例的续费时长、是否设置自动续费等属性。 + InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid,omitempty" name:"InstanceChargePrepaid"` +} + +func (r *InquiryPriceModifyInstancesChargeTypeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *InquiryPriceModifyInstancesChargeTypeRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type InquiryPriceModifyInstancesChargeTypeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 该参数表示对应配置实例转换计费模式的价格。 + Price *Price `json:"Price,omitempty" name:"Price"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *InquiryPriceModifyInstancesChargeTypeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *InquiryPriceModifyInstancesChargeTypeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type InquiryPriceRenewInstancesRequest struct { + *tchttp.BaseRequest + + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728)接口返回值中的`InstanceId`获取。每次请求批量实例的上限为100。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds" list` + + // 预付费模式,即包年包月相关参数设置。通过该参数可以指定包年包月实例的续费时长、是否设置自动续费等属性。 + InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid,omitempty" name:"InstanceChargePrepaid"` + + // 试运行。 + DryRun *bool `json:"DryRun,omitempty" name:"DryRun"` + + // 是否续费弹性数据盘。取值范围:
  • TRUE:表示续费包年包月实例同时续费其挂载的弹性数据盘
  • FALSE:表示续费包年包月实例同时不再续费其挂载的弹性数据盘

    默认取值:TRUE。 + RenewPortableDataDisk *bool `json:"RenewPortableDataDisk,omitempty" name:"RenewPortableDataDisk"` +} + +func (r *InquiryPriceRenewInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *InquiryPriceRenewInstancesRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type InquiryPriceRenewInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 该参数表示对应配置实例的价格。 + Price *Price `json:"Price,omitempty" name:"Price"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *InquiryPriceRenewInstancesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *InquiryPriceRenewInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type InquiryPriceResetInstanceRequest struct { + *tchttp.BaseRequest + + // 实例ID。可通过 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728) API返回值中的`InstanceId`获取。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 指定有效的[镜像](/document/product/213/4940)ID,格式形如`img-xxx`。镜像类型分为四种:
  • 公共镜像
  • 自定义镜像
  • 共享镜像
  • 服务市场镜像

  • 可通过以下方式获取可用的镜像ID:
  • `公共镜像`、`自定义镜像`、`共享镜像`的镜像ID可通过登录[控制台](https://console.cloud.tencent.com/cvm/image?rid=1&imageType=PUBLIC_IMAGE)查询;`服务镜像市场`的镜像ID可通过[云市场](https://market.cloud.tencent.com/list)查询。
  • 通过调用接口 [DescribeImages](https://cloud.tencent.com/document/api/213/15715) ,取返回信息中的`ImageId`字段。
  • + ImageId *string `json:"ImageId,omitempty" name:"ImageId"` + + // 实例系统盘配置信息。系统盘为云盘的实例可以通过该参数指定重装后的系统盘大小来实现对系统盘的扩容操作,若不指定则默认系统盘大小保持不变。系统盘大小只支持扩容不支持缩容;重装只支持修改系统盘的大小,不能修改系统盘的类型。 + SystemDisk *SystemDisk `json:"SystemDisk,omitempty" name:"SystemDisk"` + + // 实例登录设置。通过该参数可以设置实例的登录方式密码、密钥或保持镜像的原始登录设置。默认情况下会随机生成密码,并以站内信方式知会到用户。 + LoginSettings *LoginSettings `json:"LoginSettings,omitempty" name:"LoginSettings"` + + // 增强服务。通过该参数可以指定是否开启云安全、云监控等服务。若不指定该参数,则默认开启云监控、云安全服务。 + EnhancedService *EnhancedService `json:"EnhancedService,omitempty" name:"EnhancedService"` +} + +func (r *InquiryPriceResetInstanceRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *InquiryPriceResetInstanceRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type InquiryPriceResetInstanceResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 该参数表示重装成对应配置实例的价格。 + Price *Price `json:"Price,omitempty" name:"Price"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *InquiryPriceResetInstanceResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *InquiryPriceResetInstanceResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type InquiryPriceResetInstancesInternetMaxBandwidthRequest struct { + *tchttp.BaseRequest + + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728)接口返回值中的`InstanceId`获取。每次请求批量实例的上限为100。当调整 `BANDWIDTH_PREPAID` 和 `BANDWIDTH_POSTPAID_BY_HOUR` 计费方式的带宽时,只支持一个实例。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds" list` + + // 公网出带宽配置。不同机型带宽上限范围不一致,具体限制详见带宽限制对账表。暂时只支持`InternetMaxBandwidthOut`参数。 + InternetAccessible *InternetAccessible `json:"InternetAccessible,omitempty" name:"InternetAccessible"` + + // 带宽生效的起始时间。格式:`YYYY-MM-DD`,例如:`2016-10-30`。起始时间不能早于当前时间。如果起始时间是今天则新设置的带宽立即生效。该参数只对包年包月带宽有效,其他模式带宽不支持该参数,否则接口会以相应错误码返回。 + StartTime *string `json:"StartTime,omitempty" name:"StartTime"` + + // 带宽生效的终止时间。格式:`YYYY-MM-DD`,例如:`2016-10-30`。新设置的带宽的有效期包含终止时间此日期。终止时间不能晚于包年包月实例的到期时间。实例的到期时间可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728)接口返回值中的`ExpiredTime`获取。该参数只对包年包月带宽有效,其他模式带宽不支持该参数,否则接口会以相应错误码返回。 + EndTime *string `json:"EndTime,omitempty" name:"EndTime"` +} + +func (r *InquiryPriceResetInstancesInternetMaxBandwidthRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *InquiryPriceResetInstancesInternetMaxBandwidthRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type InquiryPriceResetInstancesInternetMaxBandwidthResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 该参数表示带宽调整为对应大小之后的价格。 + Price *Price `json:"Price,omitempty" name:"Price"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *InquiryPriceResetInstancesInternetMaxBandwidthResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *InquiryPriceResetInstancesInternetMaxBandwidthResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type InquiryPriceResetInstancesTypeRequest struct { + *tchttp.BaseRequest + + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728)接口返回值中的`InstanceId`获取。每次请求批量实例的上限为1。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds" list` + + // 实例机型。不同实例机型指定了不同的资源规格,具体取值可参见附表实例资源规格对照表,也可以调用查询实例资源规格列表接口获得最新的规格表。 + InstanceType *string `json:"InstanceType,omitempty" name:"InstanceType"` +} + +func (r *InquiryPriceResetInstancesTypeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *InquiryPriceResetInstancesTypeRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type InquiryPriceResetInstancesTypeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 该参数表示调整成对应机型实例的价格。 + Price *Price `json:"Price,omitempty" name:"Price"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *InquiryPriceResetInstancesTypeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *InquiryPriceResetInstancesTypeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type InquiryPriceResizeInstanceDisksRequest struct { + *tchttp.BaseRequest + + // 待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728)接口返回值中的`InstanceId`获取。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 待扩容的数据盘配置信息。只支持扩容非弹性数据盘([`DescribeDisks`](https://cloud.tencent.com/document/api/362/16315)接口返回值中的`Portable`为`false`表示非弹性),且[数据盘类型](/document/api/213/9452#block_device)为:`CLOUD_BASIC`、`CLOUD_PREMIUM`、`CLOUD_SSD`。数据盘容量单位:GB。最小扩容步长:10G。关于数据盘类型的选择请参考硬盘产品简介。可选数据盘类型受到实例类型`InstanceType`限制。另外允许扩容的最大容量也因数据盘类型的不同而有所差异。 + DataDisks []*DataDisk `json:"DataDisks,omitempty" name:"DataDisks" list` + + // 是否对运行中的实例选择强制关机。建议对运行中的实例先手动关机,然后再重置用户密码。取值范围:
  • TRUE:表示在正常关机失败后进行强制关机
  • FALSE:表示在正常关机失败后不进行强制关机

    默认取值:FALSE。

    强制关机的效果等同于关闭物理计算机的电源开关。强制关机可能会导致数据丢失或文件系统损坏,请仅在服务器不能正常关机时使用。 + ForceStop *bool `json:"ForceStop,omitempty" name:"ForceStop"` +} + +func (r *InquiryPriceResizeInstanceDisksRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *InquiryPriceResizeInstanceDisksRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type InquiryPriceResizeInstanceDisksResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 该参数表示磁盘扩容成对应配置的价格。 + Price *Price `json:"Price,omitempty" name:"Price"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *InquiryPriceResizeInstanceDisksResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *InquiryPriceResizeInstanceDisksResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type InquiryPriceRunInstancesRequest struct { + *tchttp.BaseRequest + + // 实例所在的位置。通过该参数可以指定实例所属可用区,所属项目等属性。 + Placement *Placement `json:"Placement,omitempty" name:"Placement"` + + // 指定有效的[镜像](https://cloud.tencent.com/document/product/213/4940)ID,格式形如`img-xxx`。镜像类型分为四种:
  • 公共镜像
  • 自定义镜像
  • 共享镜像
  • 服务市场镜像

  • 可通过以下方式获取可用的镜像ID:
  • `公共镜像`、`自定义镜像`、`共享镜像`的镜像ID可通过登录[控制台](https://console.cloud.tencent.com/cvm/image?rid=1&imageType=PUBLIC_IMAGE)查询;`服务镜像市场`的镜像ID可通过[云市场](https://market.cloud.tencent.com/list)查询。
  • 通过调用接口 [DescribeImages](https://cloud.tencent.com/document/api/213/15715) ,取返回信息中的`ImageId`字段。
  • + ImageId *string `json:"ImageId,omitempty" name:"ImageId"` + + // 实例[计费类型](https://cloud.tencent.com/document/product/213/2180)。
  • PREPAID:预付费,即包年包月
  • POSTPAID_BY_HOUR:按小时后付费
    默认值:POSTPAID_BY_HOUR。 + InstanceChargeType *string `json:"InstanceChargeType,omitempty" name:"InstanceChargeType"` + + // 预付费模式,即包年包月相关参数设置。通过该参数可以指定包年包月实例的购买时长、是否设置自动续费等属性。若指定实例的付费模式为预付费则该参数必传。 + InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid,omitempty" name:"InstanceChargePrepaid"` + + // 实例机型。不同实例机型指定了不同的资源规格,具体取值可通过调用接口[DescribeInstanceTypeConfigs](https://cloud.tencent.com/document/api/213/15749)来获得最新的规格表或参见[CVM实例配置](https://cloud.tencent.com/document/product/213/2177)描述。若不指定该参数,则默认机型为S1.SMALL1。 + InstanceType *string `json:"InstanceType,omitempty" name:"InstanceType"` + + // 实例系统盘配置信息。若不指定该参数,则按照系统默认值进行分配。 + SystemDisk *SystemDisk `json:"SystemDisk,omitempty" name:"SystemDisk"` + + // 实例数据盘配置信息。若不指定该参数,则默认不购买数据盘。支持购买的时候指定11块数据盘,其中最多包含1块LOCAL_BASIC数据盘或者LOCAL_SSD数据盘,最多包含10块CLOUD_BASIC数据盘、CLOUD_PREMIUM数据盘或者CLOUD_SSD数据盘。 + DataDisks []*DataDisk `json:"DataDisks,omitempty" name:"DataDisks" list` + + // 私有网络相关信息配置。通过该参数可以指定私有网络的ID,子网ID等信息。若不指定该参数,则默认使用基础网络。若在此参数中指定了私有网络ip,那么InstanceCount参数只能为1。 + VirtualPrivateCloud *VirtualPrivateCloud `json:"VirtualPrivateCloud,omitempty" name:"VirtualPrivateCloud"` + + // 公网带宽相关信息设置。若不指定该参数,则默认公网带宽为0Mbps。 + InternetAccessible *InternetAccessible `json:"InternetAccessible,omitempty" name:"InternetAccessible"` + + // 购买实例数量。取值范围:[1,100]。默认取值:1。指定购买实例的数量不能超过用户所能购买的剩余配额数量,具体配额相关限制详见[CVM实例购买限制](https://cloud.tencent.com/document/product/213/2664)。 + InstanceCount *int64 `json:"InstanceCount,omitempty" name:"InstanceCount"` + + // 实例显示名称。
  • 不指定实例显示名称则默认显示‘未命名’。
  • 购买多台实例,如果指定模式串`{R:x}`,表示生成数字`[x, x+n-1]`,其中`n`表示购买实例的数量,例如`server_{R:3}`,购买1台时,实例显示名称为`server_3`;购买2台时,实例显示名称分别为`server_3`,`server_4`。支持指定多个模式串`{R:x}`。
  • 购买多台实例,如果不指定模式串,则在实例显示名称添加后缀`1、2...n`,其中`n`表示购买实例的数量,例如`server_`,购买2台时,实例显示名称分别为`server_1`,`server_2`。 + InstanceName *string `json:"InstanceName,omitempty" name:"InstanceName"` + + // 实例登录设置。通过该参数可以设置实例的登录方式密码、密钥或保持镜像的原始登录设置。默认情况下会随机生成密码,并以站内信方式知会到用户。 + LoginSettings *LoginSettings `json:"LoginSettings,omitempty" name:"LoginSettings"` + + // 实例所属安全组。该参数可以通过调用 [DescribeSecurityGroups](https://cloud.tencent.com/document/api/215/15808) 的返回值中的sgId字段来获取。若不指定该参数,则默认不绑定安全组。 + SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds" list` + + // 增强服务。通过该参数可以指定是否开启云安全、云监控等服务。若不指定该参数,则默认开启云监控、云安全服务。 + EnhancedService *EnhancedService `json:"EnhancedService,omitempty" name:"EnhancedService"` + + // 用于保证请求幂等性的字符串。该字符串由客户生成,需保证不同请求之间唯一,最大值不超过64个ASCII字符。若不指定该参数,则无法保证请求的幂等性。
    更多详细信息请参阅:如何保证幂等性。 + ClientToken *string `json:"ClientToken,omitempty" name:"ClientToken"` + + // 云服务器的主机名。
  • 点号(.)和短横线(-)不能作为 HostName 的首尾字符,不能连续使用。
  • Windows 实例:名字符长度为[2, 15],允许字母(不限制大小写)、数字和短横线(-)组成,不支持点号(.),不能全是数字。
  • 其他类型(Linux 等)实例:字符长度为[2, 30],允许支持多个点号,点之间为一段,每段允许字母(不限制大小写)、数字和短横线(-)组成。 + HostName *string `json:"HostName,omitempty" name:"HostName"` + + // 标签描述列表。通过指定该参数可以同时绑定标签到相应的资源实例,当前仅支持绑定标签到云主机实例。 + TagSpecification []*TagSpecification `json:"TagSpecification,omitempty" name:"TagSpecification" list` + + // 实例的市场相关选项,如竞价实例相关参数 + InstanceMarketOptions *InstanceMarketOptionsRequest `json:"InstanceMarketOptions,omitempty" name:"InstanceMarketOptions"` +} + +func (r *InquiryPriceRunInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *InquiryPriceRunInstancesRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type InquiryPriceRunInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 该参数表示对应配置实例的价格。 + Price *Price `json:"Price,omitempty" name:"Price"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *InquiryPriceRunInstancesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *InquiryPriceRunInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type Instance struct { + + // 实例所在的位置。 + Placement *Placement `json:"Placement,omitempty" name:"Placement"` + + // 实例`ID`。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 实例机型。 + InstanceType *string `json:"InstanceType,omitempty" name:"InstanceType"` + + // 实例的CPU核数,单位:核。 + CPU *int64 `json:"CPU,omitempty" name:"CPU"` + + // 实例内存容量,单位:`GB`。 + Memory *int64 `json:"Memory,omitempty" name:"Memory"` + + // 实例业务状态。取值范围:
  • NORMAL:表示正常状态的实例
  • EXPIRED:表示过期的实例
  • PROTECTIVELY_ISOLATED:表示被安全隔离的实例。 + RestrictState *string `json:"RestrictState,omitempty" name:"RestrictState"` + + // 实例名称。 + InstanceName *string `json:"InstanceName,omitempty" name:"InstanceName"` + + // 实例计费模式。取值范围:
  • `PREPAID`:表示预付费,即包年包月
  • `POSTPAID_BY_HOUR`:表示后付费,即按量计费
  • `CDHPAID`:`CDH`付费,即只对`CDH`计费,不对`CDH`上的实例计费。
  • `SPOTPAID`:表示竞价实例付费。 + InstanceChargeType *string `json:"InstanceChargeType,omitempty" name:"InstanceChargeType"` + + // 实例系统盘信息。 + SystemDisk *SystemDisk `json:"SystemDisk,omitempty" name:"SystemDisk"` + + // 实例数据盘信息。只包含随实例购买的数据盘。 + DataDisks []*DataDisk `json:"DataDisks,omitempty" name:"DataDisks" list` + + // 实例主网卡的内网`IP`列表。 + PrivateIpAddresses []*string `json:"PrivateIpAddresses,omitempty" name:"PrivateIpAddresses" list` + + // 实例主网卡的公网`IP`列表。 + // 注意:此字段可能返回 null,表示取不到有效值。 + PublicIpAddresses []*string `json:"PublicIpAddresses,omitempty" name:"PublicIpAddresses" list` + + // 实例带宽信息。 + InternetAccessible *InternetAccessible `json:"InternetAccessible,omitempty" name:"InternetAccessible"` + + // 实例所属虚拟私有网络信息。 + VirtualPrivateCloud *VirtualPrivateCloud `json:"VirtualPrivateCloud,omitempty" name:"VirtualPrivateCloud"` + + // 生产实例所使用的镜像`ID`。 + ImageId *string `json:"ImageId,omitempty" name:"ImageId"` + + // 自动续费标识。取值范围:
  • `NOTIFY_AND_MANUAL_RENEW`:表示通知即将过期,但不自动续费
  • `NOTIFY_AND_AUTO_RENEW`:表示通知即将过期,而且自动续费
  • `DISABLE_NOTIFY_AND_MANUAL_RENEW`:表示不通知即将过期,也不自动续费。 + RenewFlag *string `json:"RenewFlag,omitempty" name:"RenewFlag"` + + // 创建时间。按照`ISO8601`标准表示,并且使用`UTC`时间。格式为:`YYYY-MM-DDThh:mm:ssZ`。 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` + + // 到期时间。按照`ISO8601`标准表示,并且使用`UTC`时间。格式为:`YYYY-MM-DDThh:mm:ssZ`。 + ExpiredTime *string `json:"ExpiredTime,omitempty" name:"ExpiredTime"` + + // 操作系统名称。 + OsName *string `json:"OsName,omitempty" name:"OsName"` + + // 实例所属安全组。该参数可以通过调用 [DescribeSecurityGroups](https://cloud.tencent.com/document/api/215/15808) 的返回值中的sgId字段来获取。 + SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds" list` + + // 实例登录设置。目前只返回实例所关联的密钥。 + LoginSettings *LoginSettings `json:"LoginSettings,omitempty" name:"LoginSettings"` + + // 实例状态。取值范围:
  • PENDING:表示创建中
  • LAUNCH_FAILED:表示创建失败
  • RUNNING:表示运行中
  • STOPPED:表示关机
  • STARTING:表示开机中
  • STOPPING:表示关机中
  • REBOOTING:表示重启中
  • SHUTDOWN:表示停止待销毁
  • TERMINATING:表示销毁中。
  • + InstanceState *string `json:"InstanceState,omitempty" name:"InstanceState"` + + // 实例关联的标签列表。 + Tags []*Tag `json:"Tags,omitempty" name:"Tags" list` + + // 实例的关机计费模式。 + // 取值范围:
  • KEEP_CHARGING:关机继续收费
  • STOP_CHARGING:关机停止收费
  • NOT_APPLICABLE:实例处于非关机状态或者不适用关机停止计费的条件
    + StopChargingMode *string `json:"StopChargingMode,omitempty" name:"StopChargingMode"` +} + +type InstanceChargePrepaid struct { + + // 购买实例的时长,单位:月。取值范围:1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36。 + Period *int64 `json:"Period,omitempty" name:"Period"` + + // 自动续费标识。取值范围:
  • NOTIFY_AND_AUTO_RENEW:通知过期且自动续费
  • NOTIFY_AND_MANUAL_RENEW:通知过期不自动续费
  • DISABLE_NOTIFY_AND_MANUAL_RENEW:不通知过期不自动续费

    默认取值:NOTIFY_AND_MANUAL_RENEW。若该参数指定为NOTIFY_AND_AUTO_RENEW,在账户余额充足的情况下,实例到期后将按月自动续费。 + RenewFlag *string `json:"RenewFlag,omitempty" name:"RenewFlag"` +} + +type InstanceFamilyConfig struct { + + // 机型族名称的中文全称。 + InstanceFamilyName *string `json:"InstanceFamilyName,omitempty" name:"InstanceFamilyName"` + + // 机型族名称的英文简称。 + InstanceFamily *string `json:"InstanceFamily,omitempty" name:"InstanceFamily"` +} + +type InstanceMarketOptionsRequest struct { + *tchttp.BaseRequest + + // 竞价相关选项 + SpotOptions *SpotMarketOptions `json:"SpotOptions,omitempty" name:"SpotOptions"` + + // 市场选项类型,当前只支持取值:spot + MarketType *string `json:"MarketType,omitempty" name:"MarketType"` +} + +func (r *InstanceMarketOptionsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *InstanceMarketOptionsRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type InstanceStatus struct { + + // 实例`ID`。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // [实例状态](/document/api/213/9452#INSTANCE_STATE)。 + InstanceState *string `json:"InstanceState,omitempty" name:"InstanceState"` +} + +type InstanceTypeConfig struct { + + // 可用区。 + Zone *string `json:"Zone,omitempty" name:"Zone"` + + // 实例机型。 + InstanceType *string `json:"InstanceType,omitempty" name:"InstanceType"` + + // 实例机型系列。 + InstanceFamily *string `json:"InstanceFamily,omitempty" name:"InstanceFamily"` + + // GPU核数,单位:核。 + GPU *int64 `json:"GPU,omitempty" name:"GPU"` + + // CPU核数,单位:核。 + CPU *int64 `json:"CPU,omitempty" name:"CPU"` + + // 内存容量,单位:`GB`。 + Memory *int64 `json:"Memory,omitempty" name:"Memory"` +} + +type InstanceTypeQuotaItem struct { + + // 可用区。 + Zone *string `json:"Zone,omitempty" name:"Zone"` + + // 实例机型。 + InstanceType *string `json:"InstanceType,omitempty" name:"InstanceType"` + + // 实例计费模式。取值范围:
  • PREPAID:表示预付费,即包年包月
  • POSTPAID_BY_HOUR:表示后付费,即按量计费
  • CDHPAID:表示[CDH](https://cloud.tencent.com/document/product/416)付费,即只对CDH计费,不对CDH上的实例计费。
  • `SPOTPAID`:表示竞价实例付费。 + InstanceChargeType *string `json:"InstanceChargeType,omitempty" name:"InstanceChargeType"` + + // 网卡类型,例如:25代表25G网卡 + NetworkCard *int64 `json:"NetworkCard,omitempty" name:"NetworkCard"` + + // 扩展属性。 + // 注意:此字段可能返回 null,表示取不到有效值。 + Externals *Externals `json:"Externals,omitempty" name:"Externals"` + + // 实例的CPU核数,单位:核。 + Cpu *int64 `json:"Cpu,omitempty" name:"Cpu"` + + // 实例内存容量,单位:`GB`。 + Memory *int64 `json:"Memory,omitempty" name:"Memory"` + + // 实例机型系列。 + InstanceFamily *string `json:"InstanceFamily,omitempty" name:"InstanceFamily"` + + // 机型名称。 + TypeName *string `json:"TypeName,omitempty" name:"TypeName"` + + // 本地磁盘规格列表。当该参数返回为空值时,表示当前情况下无法创建本地盘。 + LocalDiskTypeList []*LocalDiskType `json:"LocalDiskTypeList,omitempty" name:"LocalDiskTypeList" list` + + // 实例是否售卖。取值范围:
  • SELL:表示实例可购买
  • SOLD_OUT:表示实例已售罄。 + Status *string `json:"Status,omitempty" name:"Status"` + + // 实例的售卖价格。 + Price *ItemPrice `json:"Price,omitempty" name:"Price"` +} + +type InternetAccessible struct { + + // 网络计费类型。取值范围:
  • BANDWIDTH_PREPAID:预付费按带宽结算
  • TRAFFIC_POSTPAID_BY_HOUR:流量按小时后付费
  • BANDWIDTH_POSTPAID_BY_HOUR:带宽按小时后付费
  • BANDWIDTH_PACKAGE:带宽包用户
    默认取值:非带宽包用户默认与子机付费类型保持一致。 + InternetChargeType *string `json:"InternetChargeType,omitempty" name:"InternetChargeType"` + + // 公网出带宽上限,单位:Mbps。默认值:0Mbps。不同机型带宽上限范围不一致,具体限制详见[购买网络带宽](/document/product/213/509)。 + InternetMaxBandwidthOut *int64 `json:"InternetMaxBandwidthOut,omitempty" name:"InternetMaxBandwidthOut"` + + // 是否分配公网IP。取值范围:
  • TRUE:表示分配公网IP
  • FALSE:表示不分配公网IP

    当公网带宽大于0Mbps时,可自由选择开通与否,默认开通公网IP;当公网带宽为0,则不允许分配公网IP。 + PublicIpAssigned *bool `json:"PublicIpAssigned,omitempty" name:"PublicIpAssigned"` + + // 带宽包ID。可通过[`DescribeBandwidthPackages`](https://cloud.tencent.com/document/api/215/19209)接口返回值中的`BandwidthPackageId`获取。 + BandwidthPackageId *string `json:"BandwidthPackageId,omitempty" name:"BandwidthPackageId"` +} + +type InternetBandwidthConfig struct { + + // 开始时间。按照`ISO8601`标准表示,并且使用`UTC`时间。格式为:`YYYY-MM-DDThh:mm:ssZ`。 + StartTime *string `json:"StartTime,omitempty" name:"StartTime"` + + // 结束时间。按照`ISO8601`标准表示,并且使用`UTC`时间。格式为:`YYYY-MM-DDThh:mm:ssZ`。 + EndTime *string `json:"EndTime,omitempty" name:"EndTime"` + + // 实例带宽信息。 + InternetAccessible *InternetAccessible `json:"InternetAccessible,omitempty" name:"InternetAccessible"` +} + +type InternetChargeTypeConfig struct { + + // 网络计费模式。 + InternetChargeType *string `json:"InternetChargeType,omitempty" name:"InternetChargeType"` + + // 网络计费模式描述信息。 + Description *string `json:"Description,omitempty" name:"Description"` +} + +type ItemPrice struct { + + // 后续单价,单位:元。 + // 注意:此字段可能返回 null,表示取不到有效值。 + UnitPrice *float64 `json:"UnitPrice,omitempty" name:"UnitPrice"` + + // 后续计价单元,可取值范围:
  • HOUR:表示计价单元是按每小时来计算。当前涉及该计价单元的场景有:实例按小时后付费(POSTPAID_BY_HOUR)、带宽按小时后付费(BANDWIDTH_POSTPAID_BY_HOUR):
  • GB:表示计价单元是按每GB来计算。当前涉及该计价单元的场景有:流量按小时后付费(TRAFFIC_POSTPAID_BY_HOUR)。 + // 注意:此字段可能返回 null,表示取不到有效值。 + ChargeUnit *string `json:"ChargeUnit,omitempty" name:"ChargeUnit"` + + // 预支费用的原价,单位:元。 + // 注意:此字段可能返回 null,表示取不到有效值。 + OriginalPrice *float64 `json:"OriginalPrice,omitempty" name:"OriginalPrice"` + + // 预支费用的折扣价,单位:元。 + // 注意:此字段可能返回 null,表示取不到有效值。 + DiscountPrice *float64 `json:"DiscountPrice,omitempty" name:"DiscountPrice"` +} + +type KeyPair struct { + + // 密钥对的`ID`,是密钥对的唯一标识。 + KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + + // 密钥对名称。 + KeyName *string `json:"KeyName,omitempty" name:"KeyName"` + + // 密钥对所属的项目`ID`。 + ProjectId *int64 `json:"ProjectId,omitempty" name:"ProjectId"` + + // 密钥对描述信息。 + Description *string `json:"Description,omitempty" name:"Description"` + + // 密钥对的纯文本公钥。 + PublicKey *string `json:"PublicKey,omitempty" name:"PublicKey"` + + // 密钥对的纯文本私钥。腾讯云不会保管私钥,请用户自行妥善保存。 + PrivateKey *string `json:"PrivateKey,omitempty" name:"PrivateKey"` + + // 密钥关联的实例`ID`列表。 + AssociatedInstanceIds []*string `json:"AssociatedInstanceIds,omitempty" name:"AssociatedInstanceIds" list` + + // 创建时间。按照`ISO8601`标准表示,并且使用`UTC`时间。格式为:`YYYY-MM-DDThh:mm:ssZ`。 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` +} + +type LocalDiskType struct { + + // 本地磁盘类型。 + Type *string `json:"Type,omitempty" name:"Type"` + + // 本地磁盘属性。 + PartitionType *string `json:"PartitionType,omitempty" name:"PartitionType"` + + // 本地磁盘最小值。 + MinSize *int64 `json:"MinSize,omitempty" name:"MinSize"` + + // 本地磁盘最大值。 + MaxSize *int64 `json:"MaxSize,omitempty" name:"MaxSize"` +} + +type LoginSettings struct { + + // 实例登录密码。不同操作系统类型密码复杂度限制不一样,具体如下:
  • Linux实例密码必须8到16位,至少包括两项[a-z,A-Z]、[0-9] 和 [( ) ` ~ ! @ # $ % ^ & * - + = | { } [ ] : ; ' , . ? / ]中的特殊符号。
  • Windows实例密码必须12到16位,至少包括三项[a-z],[A-Z],[0-9] 和 [( ) ` ~ ! @ # $ % ^ & * - + = { } [ ] : ; ' , . ? /]中的特殊符号。

    若不指定该参数,则由系统随机生成密码,并通过站内信方式通知到用户。 + // 注意:此字段可能返回 null,表示取不到有效值。 + Password *string `json:"Password,omitempty" name:"Password"` + + // 密钥ID列表。关联密钥后,就可以通过对应的私钥来访问实例;KeyId可通过接口DescribeKeyPairs获取,密钥与密码不能同时指定,同时Windows操作系统不支持指定密钥。当前仅支持购买的时候指定一个密钥。 + // 注意:此字段可能返回 null,表示取不到有效值。 + KeyIds []*string `json:"KeyIds,omitempty" name:"KeyIds" list` + + // 保持镜像的原始设置。该参数与Password或KeyIds.N不能同时指定。只有使用自定义镜像、共享镜像或外部导入镜像创建实例时才能指定该参数为TRUE。取值范围:
  • TRUE:表示保持镜像的登录设置
  • FALSE:表示不保持镜像的登录设置

    默认取值:FALSE。 + // 注意:此字段可能返回 null,表示取不到有效值。 + KeepImageLogin *string `json:"KeepImageLogin,omitempty" name:"KeepImageLogin"` +} + +type ModifyDisasterRecoverGroupAttributeRequest struct { + *tchttp.BaseRequest + + // 分散置放群组ID,可使用[DescribeDisasterRecoverGroups](https://cloud.tencent.com/document/api/213/17810)接口获取。 + DisasterRecoverGroupId *string `json:"DisasterRecoverGroupId,omitempty" name:"DisasterRecoverGroupId"` + + // 分散置放群组名称,长度1-60个字符,支持中、英文。 + Name *string `json:"Name,omitempty" name:"Name"` +} + +func (r *ModifyDisasterRecoverGroupAttributeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *ModifyDisasterRecoverGroupAttributeRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyDisasterRecoverGroupAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyDisasterRecoverGroupAttributeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *ModifyDisasterRecoverGroupAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyHostsAttributeRequest struct { + *tchttp.BaseRequest + + // 一个或多个待操作的CDH实例ID。 + HostIds []*string `json:"HostIds,omitempty" name:"HostIds" list` + + // CDH实例显示名称。可任意命名,但不得超过60个字符。 + HostName *string `json:"HostName,omitempty" name:"HostName"` + + // 自动续费标识。取值范围:
  • NOTIFY_AND_AUTO_RENEW:通知过期且自动续费
  • NOTIFY_AND_MANUAL_RENEW:通知过期不自动续费
  • DISABLE_NOTIFY_AND_MANUAL_RENEW:不通知过期不自动续费

    若该参数指定为NOTIFY_AND_AUTO_RENEW,在账户余额充足的情况下,实例到期后将按月自动续费。 + RenewFlag *string `json:"RenewFlag,omitempty" name:"RenewFlag"` +} + +func (r *ModifyHostsAttributeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *ModifyHostsAttributeRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyHostsAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyHostsAttributeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *ModifyHostsAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyImageAttributeRequest struct { + *tchttp.BaseRequest + + // 镜像ID,形如`img-gvbnzy6f`。镜像ID可以通过如下方式获取:
  • 通过[DescribeImages](https://cloud.tencent.com/document/api/213/15715)接口返回的`ImageId`获取。
  • 通过[镜像控制台](https://console.cloud.tencent.com/cvm/image)获取。 + ImageId *string `json:"ImageId,omitempty" name:"ImageId"` + + // 设置新的镜像名称;必须满足下列限制:
  • 不得超过20个字符。
  • 镜像名称不能与已有镜像重复。 + ImageName *string `json:"ImageName,omitempty" name:"ImageName"` + + // 设置新的镜像描述;必须满足下列限制:
  • 不得超过60个字符。 + ImageDescription *string `json:"ImageDescription,omitempty" name:"ImageDescription"` +} + +func (r *ModifyImageAttributeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *ModifyImageAttributeRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyImageAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyImageAttributeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *ModifyImageAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyImageSharePermissionRequest struct { + *tchttp.BaseRequest + + // 镜像ID,形如`img-gvbnzy6f`。镜像Id可以通过如下方式获取:
  • 通过[DescribeImages](https://cloud.tencent.com/document/api/213/15715)接口返回的`ImageId`获取。
  • 通过[镜像控制台](https://console.cloud.tencent.com/cvm/image)获取。
    镜像ID必须指定为状态为`NORMAL`的镜像。镜像状态请参考[镜像数据表](/document/api/213/9452#image_state)。 + ImageId *string `json:"ImageId,omitempty" name:"ImageId"` + + // 接收分享镜像的账号Id列表,array型参数的格式可以参考[API简介](/document/api/213/568)。帐号ID不同于QQ号,查询用户帐号ID请查看[帐号信息](https://console.cloud.tencent.com/developer)中的帐号ID栏。 + AccountIds []*string `json:"AccountIds,omitempty" name:"AccountIds" list` + + // 操作,包括 `SHARE`,`CANCEL`。其中`SHARE`代表分享操作,`CANCEL`代表取消分享操作。 + Permission *string `json:"Permission,omitempty" name:"Permission"` +} + +func (r *ModifyImageSharePermissionRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *ModifyImageSharePermissionRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyImageSharePermissionResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyImageSharePermissionResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *ModifyImageSharePermissionResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyInstancesAttributeRequest struct { + *tchttp.BaseRequest + + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/9388) API返回值中的`InstanceId`获取。每次请求允许操作的实例数量上限是100。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds" list` + + // 实例名称。可任意命名,但不得超过60个字符。 + InstanceName *string `json:"InstanceName,omitempty" name:"InstanceName"` + + // 指定实例的安全组Id列表,子机将重新关联指定列表的安全组,原本关联的安全组会被解绑。 + SecurityGroups []*string `json:"SecurityGroups,omitempty" name:"SecurityGroups" list` +} + +func (r *ModifyInstancesAttributeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *ModifyInstancesAttributeRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyInstancesAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyInstancesAttributeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *ModifyInstancesAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyInstancesChargeTypeRequest struct { + *tchttp.BaseRequest + + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/9388)接口返回值中的`InstanceId`获取。每次请求批量实例的上限为100。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds" list` + + // 实例[计费类型](https://cloud.tencent.com/document/product/213/2180)。
  • PREPAID:预付费,即包年包月。 + InstanceChargeType *string `json:"InstanceChargeType,omitempty" name:"InstanceChargeType"` + + // 预付费模式,即包年包月相关参数设置。通过该参数可以指定包年包月实例的购买时长、是否设置自动续费等属性。若指定实例的付费模式为预付费则该参数必传。 + InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid,omitempty" name:"InstanceChargePrepaid"` +} + +func (r *ModifyInstancesChargeTypeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *ModifyInstancesChargeTypeRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyInstancesChargeTypeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyInstancesChargeTypeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *ModifyInstancesChargeTypeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyInstancesProjectRequest struct { + *tchttp.BaseRequest + + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/9388) API返回值中的`InstanceId`获取。每次请求允许操作的实例数量上限是100。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds" list` + + // 项目ID。项目可以使用[AddProject](https://cloud.tencent.com/doc/api/403/4398)接口创建。后续使用[DescribeInstances](https://cloud.tencent.com/document/api/213/9388)接口查询实例时,项目ID可用于过滤结果。 + ProjectId *int64 `json:"ProjectId,omitempty" name:"ProjectId"` +} + +func (r *ModifyInstancesProjectRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *ModifyInstancesProjectRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyInstancesProjectResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyInstancesProjectResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *ModifyInstancesProjectResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyInstancesRenewFlagRequest struct { + *tchttp.BaseRequest + + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/9388) API返回值中的`InstanceId`获取。每次请求允许操作的实例数量上限是100。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds" list` + + // 自动续费标识。取值范围:
  • NOTIFY_AND_AUTO_RENEW:通知过期且自动续费
  • NOTIFY_AND_MANUAL_RENEW:通知过期不自动续费
  • DISABLE_NOTIFY_AND_MANUAL_RENEW:不通知过期不自动续费

    若该参数指定为NOTIFY_AND_AUTO_RENEW,在账户余额充足的情况下,实例到期后将按月自动续费。 + RenewFlag *string `json:"RenewFlag,omitempty" name:"RenewFlag"` +} + +func (r *ModifyInstancesRenewFlagRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *ModifyInstancesRenewFlagRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyInstancesRenewFlagResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyInstancesRenewFlagResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *ModifyInstancesRenewFlagResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyInstancesVpcAttributeRequest struct { + *tchttp.BaseRequest + + // 待操作的实例ID数组。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728)接口返回值中的`InstanceId`获取。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds" list` + + // 私有网络相关信息配置。通过该参数指定私有网络的ID,子网ID,私有网络ip等信息。当指定私有网络ID和子网ID(子网必须在实例所在的可用区)与指定实例所在私有网络不一致时,会将实例迁移至指定的私有网络的子网下。可通过`PrivateIpAddresses`指定私有网络子网IP,若需指定则所有已指定的实例均需要指定子网IP,此时`InstanceIds`与`PrivateIpAddresses`一一对应。不指定`PrivateIpAddresses`时随机分配私有网络子网IP。 + VirtualPrivateCloud *VirtualPrivateCloud `json:"VirtualPrivateCloud,omitempty" name:"VirtualPrivateCloud"` + + // 是否对运行中的实例选择强制关机。默认为TRUE。 + ForceStop *bool `json:"ForceStop,omitempty" name:"ForceStop"` + + // 是否保留主机名。默认为FALSE。 + ReserveHostName *bool `json:"ReserveHostName,omitempty" name:"ReserveHostName"` +} + +func (r *ModifyInstancesVpcAttributeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *ModifyInstancesVpcAttributeRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyInstancesVpcAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyInstancesVpcAttributeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *ModifyInstancesVpcAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyKeyPairAttributeRequest struct { + *tchttp.BaseRequest + + // 密钥对ID,密钥对ID形如:`skey-xxxxxxxx`。

    可以通过以下方式获取可用的密钥 ID:
  • 通过登录[控制台](https://console.cloud.tencent.com/cvm/sshkey)查询密钥 ID。
  • 通过调用接口 [DescribeKeyPairs](https://cloud.tencent.com/document/api/213/9403) ,取返回信息中的 `KeyId` 获取密钥对 ID。 + KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + + // 修改后的密钥对名称,可由数字,字母和下划线组成,长度不超过25个字符。 + KeyName *string `json:"KeyName,omitempty" name:"KeyName"` + + // 修改后的密钥对描述信息。可任意命名,但不得超过60个字符。 + Description *string `json:"Description,omitempty" name:"Description"` +} + +func (r *ModifyKeyPairAttributeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *ModifyKeyPairAttributeRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyKeyPairAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyKeyPairAttributeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *ModifyKeyPairAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type OperationCountLimit struct { + + // 实例操作。 + Operation *string `json:"Operation,omitempty" name:"Operation"` + + // 实例ID。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 当前已使用次数,如果返回值为-1表示该操作无次数限制。 + CurrentCount *int64 `json:"CurrentCount,omitempty" name:"CurrentCount"` + + // 操作次数最高额度,如果返回值为-1表示该操作无次数限制,如果返回值为0表示不支持调整配置。 + LimitCount *int64 `json:"LimitCount,omitempty" name:"LimitCount"` +} + +type OsVersion struct { + + // 操作系统类型 + OsName *string `json:"OsName,omitempty" name:"OsName"` + + // 支持的操作系统版本 + OsVersions []*string `json:"OsVersions,omitempty" name:"OsVersions" list` + + // 支持的操作系统架构 + Architecture []*string `json:"Architecture,omitempty" name:"Architecture" list` +} + +type Placement struct { + + // 实例所属的[可用区](/document/product/213/9452#zone)ID。该参数也可以通过调用 [DescribeZones](/document/api/213/9455) 的返回值中的Zone字段来获取。 + Zone *string `json:"Zone,omitempty" name:"Zone"` + + // 实例所属项目ID。该参数可以通过调用 [DescribeProject](/document/api/378/4400) 的返回值中的 projectId 字段来获取。不填为默认项目。 + ProjectId *int64 `json:"ProjectId,omitempty" name:"ProjectId"` + + // 实例所属的专用宿主机ID列表。如果您有购买专用宿主机并且指定了该参数,则您购买的实例就会随机的部署在这些专用宿主机上。 + HostIds []*string `json:"HostIds,omitempty" name:"HostIds" list` + + // 指定母机ip生产子机 + HostIps []*string `json:"HostIps,omitempty" name:"HostIps" list` +} + +type Price struct { + + // 描述了实例价格。 + InstancePrice *ItemPrice `json:"InstancePrice,omitempty" name:"InstancePrice"` + + // 描述了网络价格。 + BandwidthPrice *ItemPrice `json:"BandwidthPrice,omitempty" name:"BandwidthPrice"` +} + +type RebootInstancesRequest struct { + *tchttp.BaseRequest + + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/9388)接口返回值中的`InstanceId`获取。每次请求批量实例的上限为100。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds" list` + + // 是否在正常重启失败后选择强制重启实例。取值范围:
  • TRUE:表示在正常重启失败后进行强制重启
  • FALSE:表示在正常重启失败后不进行强制重启

    默认取值:FALSE。 + ForceReboot *bool `json:"ForceReboot,omitempty" name:"ForceReboot"` + + // 关机类型。取值范围:
  • SOFT:表示软关机
  • HARD:表示硬关机
  • SOFT_FIRST:表示优先软关机,失败再执行硬关机

    默认取值:SOFT。 + StopType *string `json:"StopType,omitempty" name:"StopType"` +} + +func (r *RebootInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *RebootInstancesRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type RebootInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *RebootInstancesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *RebootInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type RegionInfo struct { + + // 地域名称,例如,ap-guangzhou + Region *string `json:"Region,omitempty" name:"Region"` + + // 地域描述,例如,华南地区(广州) + RegionName *string `json:"RegionName,omitempty" name:"RegionName"` + + // 地域是否可用状态 + RegionState *string `json:"RegionState,omitempty" name:"RegionState"` +} + +type RenewHostsRequest struct { + *tchttp.BaseRequest + + // 一个或多个待操作的CDH实例ID。 + HostIds []*string `json:"HostIds,omitempty" name:"HostIds" list` + + // 预付费模式,即包年包月相关参数设置。通过该参数可以指定包年包月实例的购买时长、是否设置自动续费等属性。若指定实例的付费模式为预付费则该参数必传。 + HostChargePrepaid *ChargePrepaid `json:"HostChargePrepaid,omitempty" name:"HostChargePrepaid"` +} + +func (r *RenewHostsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *RenewHostsRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type RenewHostsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *RenewHostsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *RenewHostsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type RenewInstancesRequest struct { + *tchttp.BaseRequest + + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/9388)接口返回值中的`InstanceId`获取。每次请求批量实例的上限为100。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds" list` + + // 预付费模式,即包年包月相关参数设置。通过该参数可以指定包年包月实例的续费时长、是否设置自动续费等属性。包年包月实例该参数为必传参数。 + InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid,omitempty" name:"InstanceChargePrepaid"` + + // 是否续费弹性数据盘。取值范围:
  • TRUE:表示续费包年包月实例同时续费其挂载的弹性数据盘
  • FALSE:表示续费包年包月实例同时不再续费其挂载的弹性数据盘

    默认取值:TRUE。 + RenewPortableDataDisk *bool `json:"RenewPortableDataDisk,omitempty" name:"RenewPortableDataDisk"` +} + +func (r *RenewInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *RenewInstancesRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type RenewInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *RenewInstancesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *RenewInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ResetInstanceRequest struct { + *tchttp.BaseRequest + + // 实例ID。可通过 [DescribeInstances](https://cloud.tencent.com/document/api/213/9388) API返回值中的`InstanceId`获取。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 指定有效的[镜像](https://cloud.tencent.com/document/product/213/4940)ID,格式形如`img-xxx`。镜像类型分为四种:
  • 公共镜像
  • 自定义镜像
  • 共享镜像
  • 服务市场镜像

  • 可通过以下方式获取可用的镜像ID:
  • `公共镜像`、`自定义镜像`、`共享镜像`的镜像ID可通过登录[控制台](https://console.cloud.tencent.com/cvm/image?rid=1&imageType=PUBLIC_IMAGE)查询;`服务镜像市场`的镜像ID可通过[云市场](https://market.cloud.tencent.com/list)查询。
  • 通过调用接口 [DescribeImages](https://cloud.tencent.com/document/api/213/9418) ,取返回信息中的`ImageId`字段。
  • + //
    默认取值:默认使用当前镜像。 + ImageId *string `json:"ImageId,omitempty" name:"ImageId"` + + // 实例系统盘配置信息。系统盘为云盘的实例可以通过该参数指定重装后的系统盘大小来实现对系统盘的扩容操作,若不指定则默认系统盘大小保持不变。系统盘大小只支持扩容不支持缩容;重装只支持修改系统盘的大小,不能修改系统盘的类型。 + SystemDisk *SystemDisk `json:"SystemDisk,omitempty" name:"SystemDisk"` + + // 实例登录设置。通过该参数可以设置实例的登录方式密码、密钥或保持镜像的原始登录设置。默认情况下会随机生成密码,并以站内信方式知会到用户。 + LoginSettings *LoginSettings `json:"LoginSettings,omitempty" name:"LoginSettings"` + + // 增强服务。通过该参数可以指定是否开启云安全、云监控等服务。若不指定该参数,则默认开启云监控、云安全服务。 + EnhancedService *EnhancedService `json:"EnhancedService,omitempty" name:"EnhancedService"` + + // 重装系统时,可以指定修改实例的HostName。 + HostName *string `json:"HostName,omitempty" name:"HostName"` +} + +func (r *ResetInstanceRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *ResetInstanceRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ResetInstanceResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ResetInstanceResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *ResetInstanceResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ResetInstancesInternetMaxBandwidthRequest struct { + *tchttp.BaseRequest + + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/9388)接口返回值中的 `InstanceId` 获取。 每次请求批量实例的上限为100。当调整 `BANDWIDTH_PREPAID` 和 `BANDWIDTH_POSTPAID_BY_HOUR` 计费方式的带宽时,只支持一个实例。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds" list` + + // 公网出带宽配置。不同机型带宽上限范围不一致,具体限制详见带宽限制对账表。暂时只支持 `InternetMaxBandwidthOut` 参数。 + InternetAccessible *InternetAccessible `json:"InternetAccessible,omitempty" name:"InternetAccessible"` + + // 带宽生效的起始时间。格式:`YYYY-MM-DD`,例如:`2016-10-30`。起始时间不能早于当前时间。如果起始时间是今天则新设置的带宽立即生效。该参数只对包年包月带宽有效,其他模式带宽不支持该参数,否则接口会以相应错误码返回。 + StartTime *string `json:"StartTime,omitempty" name:"StartTime"` + + // 带宽生效的终止时间。格式: `YYYY-MM-DD` ,例如:`2016-10-30` 。新设置的带宽的有效期包含终止时间此日期。终止时间不能晚于包年包月实例的到期时间。实例的到期时间可通过 [`DescribeInstances`](https://cloud.tencent.com/document/api/213/9388)接口返回值中的`ExpiredTime`获取。该参数只对包年包月带宽有效,其他模式带宽不支持该参数,否则接口会以相应错误码返回。 + EndTime *string `json:"EndTime,omitempty" name:"EndTime"` +} + +func (r *ResetInstancesInternetMaxBandwidthRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *ResetInstancesInternetMaxBandwidthRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ResetInstancesInternetMaxBandwidthResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ResetInstancesInternetMaxBandwidthResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *ResetInstancesInternetMaxBandwidthResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ResetInstancesPasswordRequest struct { + *tchttp.BaseRequest + + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728) API返回值中的`InstanceId`获取。每次请求允许操作的实例数量上限是100。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds" list` + + // 实例登录密码。不同操作系统类型密码复杂度限制不一样,具体如下: + // Linux实例密码必须8-30位,推荐使用12位以上密码,不能以“/”开头,至少包含以下字符中的三种不同字符,字符种类:
  • 小写字母:[a-z]
  • 大写字母:[A-Z]
  • 数字:0-9
  • 特殊字符: ()\`~!@#$%^&\*-+=\_|{}[]:;'<>,.?/: + // Windows实例密码必须12~30位,不能以“/”开头且不包括用户名,至少包含以下字符中的三种不同字符
  • 小写字母:[a-z]
  • 大写字母:[A-Z]
  • 数字: 0-9
  • 特殊字符:()\`~!@#$%^&\*-+=\_|{}[]:;' <>,.?/:
  • 如果实例即包含`Linux`实例又包含`Windows`实例,则密码复杂度限制按照`Windows`实例的限制。 + Password *string `json:"Password,omitempty" name:"Password"` + + // 待重置密码的实例操作系统用户名。不得超过64个字符。 + UserName *string `json:"UserName,omitempty" name:"UserName"` + + // 是否对运行中的实例选择强制关机。建议对运行中的实例先手动关机,然后再重置用户密码。取值范围:
  • TRUE:表示在正常关机失败后进行强制关机
  • FALSE:表示在正常关机失败后不进行强制关机

    默认取值:FALSE。

    强制关机的效果等同于关闭物理计算机的电源开关。强制关机可能会导致数据丢失或文件系统损坏,请仅在服务器不能正常关机时使用。 + ForceStop *bool `json:"ForceStop,omitempty" name:"ForceStop"` +} + +func (r *ResetInstancesPasswordRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *ResetInstancesPasswordRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ResetInstancesPasswordResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ResetInstancesPasswordResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *ResetInstancesPasswordResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ResetInstancesTypeRequest struct { + *tchttp.BaseRequest + + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728)接口返回值中的`InstanceId`获取。每次请求批量实例的上限为1。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds" list` + + // 实例机型。不同实例机型指定了不同的资源规格,具体取值可通过调用接口[`DescribeInstanceTypeConfigs`](https://cloud.tencent.com/document/api/213/15749)来获得最新的规格表或参见[实例类型](https://cloud.tencent.com/document/product/213/11518)描述。 + InstanceType *string `json:"InstanceType,omitempty" name:"InstanceType"` + + // 是否对运行中的实例选择强制关机。建议对运行中的实例先手动关机,然后再重置用户密码。取值范围:
  • TRUE:表示在正常关机失败后进行强制关机
  • FALSE:表示在正常关机失败后不进行强制关机

    默认取值:FALSE。

    强制关机的效果等同于关闭物理计算机的电源开关。强制关机可能会导致数据丢失或文件系统损坏,请仅在服务器不能正常关机时使用。 + ForceStop *bool `json:"ForceStop,omitempty" name:"ForceStop"` +} + +func (r *ResetInstancesTypeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *ResetInstancesTypeRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ResetInstancesTypeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ResetInstancesTypeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *ResetInstancesTypeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ResizeInstanceDisksRequest struct { + *tchttp.BaseRequest + + // 待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728)接口返回值中的`InstanceId`获取。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 待扩容的数据盘配置信息。只支持扩容非弹性数据盘([`DescribeDisks`](https://cloud.tencent.com/document/api/362/16315)接口返回值中的`Portable`为`false`表示非弹性),且[数据盘类型](/document/api/213/9452#block_device)为:`CLOUD_BASIC`、`CLOUD_PREMIUM`、`CLOUD_SSD`。数据盘容量单位:GB。最小扩容步长:10G。关于数据盘类型的选择请参考硬盘产品简介。可选数据盘类型受到实例类型`InstanceType`限制。另外允许扩容的最大容量也因数据盘类型的不同而有所差异。 + DataDisks []*DataDisk `json:"DataDisks,omitempty" name:"DataDisks" list` + + // 是否对运行中的实例选择强制关机。建议对运行中的实例先手动关机,然后再重置用户密码。取值范围:
  • TRUE:表示在正常关机失败后进行强制关机
  • FALSE:表示在正常关机失败后不进行强制关机

    默认取值:FALSE。

    强制关机的效果等同于关闭物理计算机的电源开关。强制关机可能会导致数据丢失或文件系统损坏,请仅在服务器不能正常关机时使用。 + ForceStop *bool `json:"ForceStop,omitempty" name:"ForceStop"` +} + +func (r *ResizeInstanceDisksRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *ResizeInstanceDisksRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ResizeInstanceDisksResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ResizeInstanceDisksResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *ResizeInstanceDisksResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type RunInstancesRequest struct { + *tchttp.BaseRequest + + // 实例所在的位置。通过该参数可以指定实例所属可用区,所属项目,所属宿主机(在专用宿主机上创建子机时指定)等属性。 + Placement *Placement `json:"Placement,omitempty" name:"Placement"` + + // 指定有效的[镜像](https://cloud.tencent.com/document/product/213/4940)ID,格式形如`img-xxx`。镜像类型分为四种:
  • 公共镜像
  • 自定义镜像
  • 共享镜像
  • 服务市场镜像

  • 可通过以下方式获取可用的镜像ID:
  • `公共镜像`、`自定义镜像`、`共享镜像`的镜像ID可通过登录[控制台](https://console.cloud.tencent.com/cvm/image?rid=1&imageType=PUBLIC_IMAGE)查询;`服务镜像市场`的镜像ID可通过[云市场](https://market.cloud.tencent.com/list)查询。
  • 通过调用接口 [DescribeImages](https://cloud.tencent.com/document/api/213/15715) ,取返回信息中的`ImageId`字段。
  • + ImageId *string `json:"ImageId,omitempty" name:"ImageId"` + + // 实例[计费类型](https://cloud.tencent.com/document/product/213/2180)。
  • PREPAID:预付费,即包年包月
  • POSTPAID_BY_HOUR:按小时后付费
  • CDHPAID:独享子机(基于专用宿主机创建,宿主机部分的资源不收费)
  • SPOTPAID:竞价付费
    默认值:POSTPAID_BY_HOUR。 + InstanceChargeType *string `json:"InstanceChargeType,omitempty" name:"InstanceChargeType"` + + // 预付费模式,即包年包月相关参数设置。通过该参数可以指定包年包月实例的购买时长、是否设置自动续费等属性。若指定实例的付费模式为预付费则该参数必传。 + InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid,omitempty" name:"InstanceChargePrepaid"` + + // 实例机型。不同实例机型指定了不同的资源规格。 + //
  • 对于付费模式为PREPAID或POSTPAID\_BY\_HOUR的实例创建,具体取值可通过调用接口[DescribeInstanceTypeConfigs](https://cloud.tencent.com/document/api/213/15749)来获得最新的规格表或参见[实例类型](https://cloud.tencent.com/document/product/213/11518)描述。若不指定该参数,则默认机型为S1.SMALL1。
  • 对于付费模式为CDHPAID的实例创建,该参数以"CDH_"为前缀,根据cpu和内存配置生成,具体形式为:CDH_XCXG,例如对于创建cpu为1核,内存为1G大小的专用宿主机的实例,该参数应该为CDH_1C1G。 + InstanceType *string `json:"InstanceType,omitempty" name:"InstanceType"` + + // 实例系统盘配置信息。若不指定该参数,则按照系统默认值进行分配。 + SystemDisk *SystemDisk `json:"SystemDisk,omitempty" name:"SystemDisk"` + + // 实例数据盘配置信息。若不指定该参数,则默认不购买数据盘。支持购买的时候指定11块数据盘,其中最多包含1块LOCAL_BASIC数据盘或者LOCAL_SSD数据盘,最多包含10块CLOUD_BASIC数据盘、CLOUD_PREMIUM数据盘或者CLOUD_SSD数据盘。 + DataDisks []*DataDisk `json:"DataDisks,omitempty" name:"DataDisks" list` + + // 私有网络相关信息配置。通过该参数可以指定私有网络的ID,子网ID等信息。若不指定该参数,则默认使用基础网络。若在此参数中指定了私有网络ip,表示每个实例的主网卡ip,而且InstanceCount参数必须与私有网络ip的个数一致。 + VirtualPrivateCloud *VirtualPrivateCloud `json:"VirtualPrivateCloud,omitempty" name:"VirtualPrivateCloud"` + + // 公网带宽相关信息设置。若不指定该参数,则默认公网带宽为0Mbps。 + InternetAccessible *InternetAccessible `json:"InternetAccessible,omitempty" name:"InternetAccessible"` + + // 购买实例数量。包年包月实例取值范围:[1,300],按量计费实例取值范围:[1,100]。默认取值:1。指定购买实例的数量不能超过用户所能购买的剩余配额数量,具体配额相关限制详见[CVM实例购买限制](https://cloud.tencent.com/document/product/213/2664)。 + InstanceCount *int64 `json:"InstanceCount,omitempty" name:"InstanceCount"` + + // 实例显示名称。
  • 不指定实例显示名称则默认显示‘未命名’。
  • 购买多台实例,如果指定模式串`{R:x}`,表示生成数字`[x, x+n-1]`,其中`n`表示购买实例的数量,例如`server_{R:3}`,购买1台时,实例显示名称为`server_3`;购买2台时,实例显示名称分别为`server_3`,`server_4`。支持指定多个模式串`{R:x}`。
  • 购买多台实例,如果不指定模式串,则在实例显示名称添加后缀`1、2...n`,其中`n`表示购买实例的数量,例如`server_`,购买2台时,实例显示名称分别为`server_1`,`server_2`。 + InstanceName *string `json:"InstanceName,omitempty" name:"InstanceName"` + + // 实例登录设置。通过该参数可以设置实例的登录方式密码、密钥或保持镜像的原始登录设置。默认情况下会随机生成密码,并以站内信方式知会到用户。 + LoginSettings *LoginSettings `json:"LoginSettings,omitempty" name:"LoginSettings"` + + // 实例所属安全组。该参数可以通过调用 [DescribeSecurityGroups](https://cloud.tencent.com/document/api/215/15808) 的返回值中的sgId字段来获取。若不指定该参数,则绑定默认安全组。 + SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds" list` + + // 增强服务。通过该参数可以指定是否开启云安全、云监控等服务。若不指定该参数,则默认开启云监控、云安全服务。 + EnhancedService *EnhancedService `json:"EnhancedService,omitempty" name:"EnhancedService"` + + // 用于保证请求幂等性的字符串。该字符串由客户生成,需保证不同请求之间唯一,最大值不超过64个ASCII字符。若不指定该参数,则无法保证请求的幂等性。
    更多详细信息请参阅:如何保证幂等性。 + ClientToken *string `json:"ClientToken,omitempty" name:"ClientToken"` + + // 云服务器的主机名。
  • 点号(.)和短横线(-)不能作为 HostName 的首尾字符,不能连续使用。
  • Windows 实例:名字符长度为[2, 15],允许字母(不限制大小写)、数字和短横线(-)组成,不支持点号(.),不能全是数字。
  • 其他类型(Linux 等)实例:字符长度为[2, 60],允许支持多个点号,点之间为一段,每段允许字母(不限制大小写)、数字和短横线(-)组成。 + HostName *string `json:"HostName,omitempty" name:"HostName"` + + // 定时任务。通过该参数可以为实例指定定时任务,目前仅支持定时销毁。 + ActionTimer *ActionTimer `json:"ActionTimer,omitempty" name:"ActionTimer"` + + // 置放群组id,仅支持指定一个。 + DisasterRecoverGroupIds []*string `json:"DisasterRecoverGroupIds,omitempty" name:"DisasterRecoverGroupIds" list` + + // 标签描述列表。通过指定该参数可以同时绑定标签到相应的资源实例,当前仅支持绑定标签到云主机实例。 + TagSpecification []*TagSpecification `json:"TagSpecification,omitempty" name:"TagSpecification" list` + + // 实例的市场相关选项,如竞价实例相关参数,若指定实例的付费模式为竞价付费则该参数必传。 + InstanceMarketOptions *InstanceMarketOptionsRequest `json:"InstanceMarketOptions,omitempty" name:"InstanceMarketOptions"` + + // 提供给实例使用的用户数据,需要以 base64 方式编码,支持的最大数据大小为 16KB。关于获取此参数的详细介绍,请参阅[Windows](https://cloud.tencent.com/document/product/213/17526)和[Linux](https://cloud.tencent.com/document/product/213/17525)启动时运行命令。 + UserData *string `json:"UserData,omitempty" name:"UserData"` + + // 是否只预检此次请求。 + // true:发送检查请求,不会创建实例。检查项包括是否填写了必需参数,请求格式,业务限制和云服务器库存。 + // 如果检查不通过,则返回对应错误码; + // 如果检查通过,则返回RequestId. + // false(默认):发送正常请求,通过检查后直接创建实例 + DryRun *bool `json:"DryRun,omitempty" name:"DryRun"` +} + +func (r *RunInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *RunInstancesRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type RunInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 当通过本接口来创建实例时会返回该参数,表示一个或多个实例`ID`。返回实例`ID`列表并不代表实例创建成功,可根据 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728) 接口查询返回的InstancesSet中对应实例的`ID`的状态来判断创建是否完成;如果实例状态由“准备中”变为“正在运行”,则为创建成功。 + InstanceIdSet []*string `json:"InstanceIdSet,omitempty" name:"InstanceIdSet" list` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *RunInstancesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *RunInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type RunMonitorServiceEnabled struct { + + // 是否开启[云监控](/document/product/248)服务。取值范围:
  • TRUE:表示开启云监控服务
  • FALSE:表示不开启云监控服务

    默认取值:TRUE。 + Enabled *bool `json:"Enabled,omitempty" name:"Enabled"` +} + +type RunSecurityServiceEnabled struct { + + // 是否开启[云安全](/document/product/296)服务。取值范围:
  • TRUE:表示开启云安全服务
  • FALSE:表示不开启云安全服务

    默认取值:TRUE。 + Enabled *bool `json:"Enabled,omitempty" name:"Enabled"` +} + +type SharePermission struct { + + // 镜像分享时间 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` + + // 镜像分享的账户ID + AccountId *string `json:"AccountId,omitempty" name:"AccountId"` +} + +type Snapshot struct { + + // 快照Id。 + SnapshotId *string `json:"SnapshotId,omitempty" name:"SnapshotId"` + + // 创建此快照的云硬盘类型。取值范围: + // SYSTEM_DISK:系统盘 + // DATA_DISK:数据盘。 + DiskUsage *string `json:"DiskUsage,omitempty" name:"DiskUsage"` + + // 创建此快照的云硬盘大小,单位GB。 + DiskSize *int64 `json:"DiskSize,omitempty" name:"DiskSize"` +} + +type SpotMarketOptions struct { + + // 竞价出价 + MaxPrice *string `json:"MaxPrice,omitempty" name:"MaxPrice"` + + // 竞价请求类型,当前仅支持类型:one-time + SpotInstanceType *string `json:"SpotInstanceType,omitempty" name:"SpotInstanceType"` +} + +type StartInstancesRequest struct { + *tchttp.BaseRequest + + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728)接口返回值中的`InstanceId`获取。每次请求批量实例的上限为100。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds" list` +} + +func (r *StartInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *StartInstancesRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type StartInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *StartInstancesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *StartInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type StopInstancesRequest struct { + *tchttp.BaseRequest + + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728)接口返回值中的`InstanceId`获取。每次请求批量实例的上限为100。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds" list` + + // 是否在正常关闭失败后选择强制关闭实例。取值范围:
  • TRUE:表示在正常关闭失败后进行强制关闭
  • FALSE:表示在正常关闭失败后不进行强制关闭

    默认取值:FALSE。 + ForceStop *bool `json:"ForceStop,omitempty" name:"ForceStop"` + + // 实例的关闭模式。取值范围:
  • SOFT_FIRST:表示在正常关闭失败后进行强制关闭
  • HARD:直接强制关闭
  • SOFT:仅软关机
    默认取值:SOFT。 + StopType *string `json:"StopType,omitempty" name:"StopType"` + + // 按量计费实例关机收费模式。 + // 取值范围:
  • KEEP_CHARGING:关机继续收费
  • STOP_CHARGING:关机停止收费
    默认取值:KEEP_CHARGING。 + // 该参数只针对部分按量计费云硬盘实例生效,详情参考[按量计费实例关机不收费说明](https://cloud.tencent.com/document/product/213/19918) + StoppedMode *string `json:"StoppedMode,omitempty" name:"StoppedMode"` +} + +func (r *StopInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *StopInstancesRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type StopInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *StopInstancesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *StopInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type StorageBlock struct { + + // HDD本地存储类型,值为:LOCAL_PRO. + // 注意:此字段可能返回 null,表示取不到有效值。 + Type *string `json:"Type,omitempty" name:"Type"` + + // HDD本地存储的最小容量 + // 注意:此字段可能返回 null,表示取不到有效值。 + MinSize *int64 `json:"MinSize,omitempty" name:"MinSize"` + + // HDD本地存储的最大容量 + // 注意:此字段可能返回 null,表示取不到有效值。 + MaxSize *int64 `json:"MaxSize,omitempty" name:"MaxSize"` +} + +type SyncImagesRequest struct { + *tchttp.BaseRequest + + // 镜像ID列表 ,镜像ID可以通过如下方式获取:
  • 通过[DescribeImages](https://cloud.tencent.com/document/api/213/15715)接口返回的`ImageId`获取。
  • 通过[镜像控制台](https://console.cloud.tencent.com/cvm/image)获取。
    镜像ID必须满足限制:
  • 镜像ID对应的镜像状态必须为`NORMAL`。
  • 镜像大小小于50GB。
    镜像状态请参考[镜像数据表](/document/api/213/9452#image_state)。 + ImageIds []*string `json:"ImageIds,omitempty" name:"ImageIds" list` + + // 目的同步地域列表;必须满足限制:
  • 不能为源地域,
  • 必须是一个合法的Region。
  • 暂不支持部分地域同步。
    具体地域参数请参考[Region](https://cloud.tencent.com/document/product/213/6091)。 + DestinationRegions []*string `json:"DestinationRegions,omitempty" name:"DestinationRegions" list` +} + +func (r *SyncImagesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *SyncImagesRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type SyncImagesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *SyncImagesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *SyncImagesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type SystemDisk struct { + + // 系统盘类型。系统盘类型限制详见[CVM实例配置](/document/product/213/2177)。取值范围:
  • LOCAL_BASIC:本地硬盘
  • LOCAL_SSD:本地SSD硬盘
  • CLOUD_BASIC:普通云硬盘
  • CLOUD_SSD:SSD云硬盘
  • CLOUD_PREMIUM:高性能云硬盘

    默认取值:CLOUD_BASIC。 + DiskType *string `json:"DiskType,omitempty" name:"DiskType"` + + // 系统盘ID。LOCAL_BASIC 和 LOCAL_SSD 类型没有ID。暂时不支持该参数。 + DiskId *string `json:"DiskId,omitempty" name:"DiskId"` + + // 系统盘大小,单位:GB。默认值为 50 + DiskSize *int64 `json:"DiskSize,omitempty" name:"DiskSize"` +} + +type Tag struct { + + // 标签键 + Key *string `json:"Key,omitempty" name:"Key"` + + // 标签值 + Value *string `json:"Value,omitempty" name:"Value"` +} + +type TagSpecification struct { + + // 标签绑定的资源类型,当前支持类型:"instance"和"host" + ResourceType *string `json:"ResourceType,omitempty" name:"ResourceType"` + + // 标签对列表 + Tags []*Tag `json:"Tags,omitempty" name:"Tags" list` +} + +type TerminateInstancesRequest struct { + *tchttp.BaseRequest + + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728)接口返回值中的`InstanceId`获取。每次请求批量实例的上限为100。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds" list` +} + +func (r *TerminateInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *TerminateInstancesRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type TerminateInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *TerminateInstancesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *TerminateInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type VirtualPrivateCloud struct { + + // 私有网络ID,形如`vpc-xxx`。有效的VpcId可通过登录[控制台](https://console.cloud.tencent.com/vpc/vpc?rid=1)查询;也可以调用接口 [DescribeVpcEx](/document/api/215/1372) ,从接口返回中的`unVpcId`字段获取。若在创建子机时VpcId与SubnetId同时传入`DEFAULT`,则强制使用默认vpc网络。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 私有网络子网ID,形如`subnet-xxx`。有效的私有网络子网ID可通过登录[控制台](https://console.cloud.tencent.com/vpc/subnet?rid=1)查询;也可以调用接口 [DescribeSubnets](/document/api/215/15784) ,从接口返回中的`unSubnetId`字段获取。若在创建子机时SubnetId与VpcId同时传入`DEFAULT`,则强制使用默认vpc网络。 + SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` + + // 是否用作公网网关。公网网关只有在实例拥有公网IP以及处于私有网络下时才能正常使用。取值范围:
  • TRUE:表示用作公网网关
  • FALSE:表示不用作公网网关

    默认取值:FALSE。 + AsVpcGateway *bool `json:"AsVpcGateway,omitempty" name:"AsVpcGateway"` + + // 私有网络子网 IP 数组,在创建实例、修改实例vpc属性操作中可使用此参数。当前仅批量创建多台实例时支持传入相同子网的多个 IP。 + PrivateIpAddresses []*string `json:"PrivateIpAddresses,omitempty" name:"PrivateIpAddresses" list` +} + +type ZoneInfo struct { + + // 可用区名称,例如,ap-guangzhou-3 + // 全网可用区名称如下: + //
  • ap-chongqing-1
  • + //
  • ap-seoul-1
  • + //
  • ap-chengdu-1
  • + //
  • ap-chengdu-2
  • + //
  • ap-hongkong-1
  • + //
  • ap-hongkong-2
  • + //
  • ap-shenzhen-fsi-1
  • + //
  • ap-shenzhen-fsi-2
  • + //
  • ap-shenzhen-fsi-3
  • + //
  • ap-guangzhou-1(售罄)
  • + //
  • ap-guangzhou-2(售罄)
  • + //
  • ap-guangzhou-3
  • + //
  • ap-guangzhou-4
  • + //
  • ap-tokyo-1
  • + //
  • ap-singapore-1
  • + //
  • ap-shanghai-fsi-1
  • + //
  • ap-shanghai-fsi-2
  • + //
  • ap-shanghai-fsi-3
  • + //
  • ap-bangkok-1
  • + //
  • ap-shanghai-1(售罄)
  • + //
  • ap-shanghai-2
  • + //
  • ap-shanghai-3
  • + //
  • ap-shanghai-4
  • + //
  • ap-mumbai-1
  • + //
  • ap-mumbai-2
  • + //
  • eu-moscow-1
  • + //
  • ap-beijing-1
  • + //
  • ap-beijing-2
  • + //
  • ap-beijing-3
  • + //
  • ap-beijing-4
  • + //
  • na-siliconvalley-1
  • + //
  • na-siliconvalley-2
  • + //
  • eu-frankfurt-1
  • + //
  • na-toronto-1
  • + //
  • na-ashburn-1
  • + //
  • na-ashburn-2
  • + Zone *string `json:"Zone,omitempty" name:"Zone"` + + // 可用区描述,例如,广州三区 + ZoneName *string `json:"ZoneName,omitempty" name:"ZoneName"` + + // 可用区ID + ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"` + + // 可用区状态,包含AVAILABLE和UNAVAILABLE。AVAILABLE代表可用,UNAVAILABLE代表不可用。 + ZoneState *string `json:"ZoneState,omitempty" name:"ZoneState"` +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/tencentcloud/vendor/vendor.json b/vendor/github.com/hashicorp/go-discover/provider/tencentcloud/vendor/vendor.json new file mode 100644 index 000000000..2ffa3b52b --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/tencentcloud/vendor/vendor.json @@ -0,0 +1,37 @@ +{ + "comment": "", + "ignore": "test", + "package": [ + { + "checksumSHA1": "ifNJy64Rl23Bo9KMkQPTygEM1fQ=", + "path": "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common", + "revision": "7fbfcf6be3e322b2a3d35f4df9fc53c339d991a2", + "revisionTime": "2019-08-30T03:48:19Z" + }, + { + "checksumSHA1": "q+o6CYdmE6zUexIu50LJ8m5V9M8=", + "path": "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors", + "revision": "7fbfcf6be3e322b2a3d35f4df9fc53c339d991a2", + "revisionTime": "2019-08-30T03:48:19Z" + }, + { + "checksumSHA1": "HIMpmn/RgpifmKOFdOgh0/9vBtY=", + "path": "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http", + "revision": "7fbfcf6be3e322b2a3d35f4df9fc53c339d991a2", + "revisionTime": "2019-08-30T03:48:19Z" + }, + { + "checksumSHA1": "LjtkxgcL4JvLEuLUE71G1v2z3Bg=", + "path": "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile", + "revision": "7fbfcf6be3e322b2a3d35f4df9fc53c339d991a2", + "revisionTime": "2019-08-30T03:48:19Z" + }, + { + "checksumSHA1": "YPkw+lZhljqf2sgHchwD7yaNnoA=", + "path": "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312", + "revision": "7fbfcf6be3e322b2a3d35f4df9fc53c339d991a2", + "revisionTime": "2019-08-30T03:48:19Z" + } + ], + "rootPath": "github.com/hashicorp/go-discover/provider/tencentcloud" +} diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/hashicorp/vic/LICENSE b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/hashicorp/vic/LICENSE new file mode 100644 index 000000000..cc9a0c714 --- /dev/null +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/hashicorp/vic/LICENSE @@ -0,0 +1,24135 @@ +open_source_licenses.txt + +vSphere Integrated Containers Engine 1.5.2 GA + +====================================================================== + +Copyright (c) 2016-2019 VMware, Inc. All rights reserved. + +This product is licensed to you under the Apache License version 2.0 (the License). You may not use this product except in compliance with the License. + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, +and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by +the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all +other entities that control, are controlled by, or are under common +control with that entity. For the purposes of this definition, +"control" means (i) the power, direct or indirect, to cause the +direction or management of such entity, whether by contract or +otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity +exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, +including but not limited to software source code, documentation +source, and configuration files. + +"Object" form shall mean any form resulting from mechanical +transformation or translation of a Source form, including but +not limited to compiled object code, generated documentation, +and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or +Object form, made available under the License, as indicated by a +copyright notice that is included in or attached to the work +(an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object +form, that is based on (or derived from) the Work and for which the +editorial revisions, annotations, elaborations, or other modifications +represent, as a whole, an original work of authorship. For the purposes +of this License, Derivative Works shall not include works that remain +separable from, or merely link (or bind by name) to the interfaces of, +the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including +the original version of the Work and any modifications or additions +to that Work or Derivative Works thereof, that is intentionally +submitted to Licensor for inclusion in the Work by the copyright owner +or by an individual or Legal Entity authorized to submit on behalf of +the copyright owner. For the purposes of this definition, "submitted" +means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, +and issue tracking systems that are managed by, or on behalf of, the +Licensor for the purpose of discussing and improving the Work, but +excluding communication that is conspicuously marked or otherwise +designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity +on behalf of whom a Contribution has been received by Licensor and +subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of +this License, each Contributor hereby grants to You a perpetual, +worldwide, non-exclusive, no-charge, royalty-free, irrevocable +copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the +Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of +this License, each Contributor hereby grants to You a perpetual, +worldwide, non-exclusive, no-charge, royalty-free, irrevocable +(except as stated in this section) patent license to make, have made, +use, offer to sell, sell, import, and otherwise transfer the Work, +where such license applies only to those patent claims licensable +by such Contributor that are necessarily infringed by their +Contribution(s) alone or by combination of their Contribution(s) +with the Work to which such Contribution(s) was submitted. If You +institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work +or a Contribution incorporated within the Work constitutes direct +or contributory patent infringement, then any patent licenses +granted to You under this License for that Work shall terminate +as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the +Work or Derivative Works thereof in any medium, with or without +modifications, and in Source or Object form, provided that You +meet the following conditions: + +(a) You must give any other recipients of the Work or +Derivative Works a copy of this License; and + +(b) You must cause any modified files to carry prominent notices +stating that You changed the files; and + +(c) You must retain, in the Source form of any Derivative Works +that You distribute, all copyright, patent, trademark, and +attribution notices from the Source form of the Work, +excluding those notices that do not pertain to any part of +the Derivative Works; and + +(d) If the Work includes a "NOTICE" text file as part of its +distribution, then any Derivative Works that You distribute must +include a readable copy of the attribution notices contained +within such NOTICE file, excluding those notices that do not +pertain to any part of the Derivative Works, in at least one +of the following places: within a NOTICE text file distributed +as part of the Derivative Works; within the Source form or +documentation, if provided along with the Derivative Works; or, +within a display generated by the Derivative Works, if and +wherever such third-party notices normally appear. The contents +of the NOTICE file are for informational purposes only and +do not modify the License. You may add Your own attribution +notices within Derivative Works that You distribute, alongside +or as an addendum to the NOTICE text from the Work, provided +that such additional attribution notices cannot be construed +as modifying the License. + +You may add Your own copyright statement to Your modifications and +may provide additional or different license terms and conditions +for use, reproduction, or distribution of Your modifications, or +for any such Derivative Works as a whole, provided Your use, +reproduction, and distribution of the Work otherwise complies with +the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, +any Contribution intentionally submitted for inclusion in the Work +by You to the Licensor shall be under the terms and conditions of +this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify +the terms of any separate license agreement you may have executed +with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade +names, trademarks, service marks, or product names of the Licensor, +except as required for reasonable and customary use in describing the +origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or +agreed to in writing, Licensor provides the Work (and each +Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied, including, without limitation, any warranties or conditions +of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A +PARTICULAR PURPOSE. You are solely responsible for determining the +appropriateness of using or redistributing the Work and assume any +risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, +whether in tort (including negligence), contract, or otherwise, +unless required by applicable law (such as deliberate and grossly +negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, +incidental, or consequential damages of any character arising as a +result of this License or out of the use or inability to use the +Work (including but not limited to damages for loss of goodwill, +work stoppage, computer failure or malfunction, or any and all +other commercial damages or losses), even if such Contributor +has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing +the Work or Derivative Works thereof, You may choose to offer, +and charge a fee for, acceptance of support, warranty, indemnity, +or other liability obligations and/or rights consistent with this +License. However, in accepting such obligations, You may act only +on Your own behalf and on Your sole responsibility, not on behalf +of any other Contributor, and only if You agree to indemnify, +defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason +of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + +To apply the Apache License to your work, attach the following +boilerplate notice, with the fields enclosed by brackets "[]" +replaced with your own identifying information. (Don't include +the brackets!) The text should be enclosed in the appropriate +comment syntax for the file format. We also recommend that a +file or class name and description of purpose be included on the +same "printed page" as the copyright notice for easier +identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +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. + +====================================================================== + +vSphere Integrated Containers Engine v1.5.2 GA includes a number of +components with separate copyright notices and license terms. This +product does not necessarily use all the open source components referred +to below. Your use of the source code for these components is subject to +the terms and conditions of the following licenses. + +====================================================================== + +The following copyright statements and licenses apply to various open +source software packages (or portions thereof) that are distributed with +this VMware Product. + +The VMware Product may also include other VMware components, which may +contain additional open source software packages. One or more such +open_source_licenses.txt files may therefore accompany this VMware +Product. + +The VMware Product that includes this file does not necessarily use all +the open source software packages referred to below and may also only +use portions of a given package. + + +=============== TABLE OF CONTENTS ============================= + +The following is a listing of the open source components detailed in +this document. This list is provided for your convenience; please read +further if you wish to review the copyright notice(s) and the full text +of the license associated with each component. + +PART 1. VIRTUAL APPLIANCE: APPLICATION LAYER + + +SECTION 1: Apache License, V2.0 + + >>> appengine-ca59ef35f409df61fa4a5f8290ff289b37eccfb8 + >>> aws_aws-sdk-go_aws-master + >>> coreos_etcd_client-781196fa8746d6c34ace2a62898051af6dc46002 + >>> coreos_etcd_version-781196fa8746d6c34ace2a62898051af6dc46002 + >>> coreos_go-semver_semver-5e3acbb5668c4c3deb4842615c4098eb61fb6b1e + >>> docker_distribution-28602af35aceda2f8d571bad7ca37a54cf0250bc + >>> docker_go-events-aa2e3b613fbbfdddbe055a7b9e3ce271cfd83eca + >>> docker_libnetwork-fd27f22aaa35e3d57f88688f919d05b744f431fd + >>> docker_libtrust-9cbd2a1374f46905c68a4eb3694a130610adc62a + >>> go-openapi_analysis-d5a75b7d751ca3f11ad5d93cfe97405f2c3f6a47 + >>> go-openapi_errors-fc3f73a224499b047eda7191e5d22e1e9631e86f + >>> go-openapi_jsonpointer-779f45308c19820f1a69e9a4cd965f496e0da10f + >>> go-openapi_jsonreference-36d33bfe519efae5632669801b180bf1a245da3b + >>> go-openapi_loads-6bb6486231e079ea125c0f39994ed3d0c53399ed + >>> go-openapi_runtime-3b13ebb46790d871d74a6c2450fa4b1280f90854 + >>> go-openapi_spec-e072eb2390d3a03736a6eb617d30f48369160447 + >>> go-openapi_strfmt-0cb3db44c13bad3b3f567b762a66751972a310cc + >>> go-openapi_swag-96d7b9ebd181a1735a1c9ac87914f2b32fbf56c9 + >>> go-openapi_validate-035dcd74f1f61e83debe1c22950dc53556e7e4b2 + >>> go_compute_metadata-cd0da878c66091060d2e7403abd62192b3e387e0 + >>> go_internal-cd0da878c66091060d2e7403abd62192b3e387e0 + >>> golang_glog-23def4e6c14b4da8ac2ed8007337bc5eb5007998 + >>> golang_groupcache_lru-72d04f9fcdec7d3821820cc4a6f150eae553639a + >>> govmomi-v0.17.1 + >>> maruel_panicparse_stack-25bcac0d793cf4109483505a0d66e066a3a90a80 + >>> oxtoacart/bpool-4e1c5567d7c2dd59fa4c7c83d34c2f3528b025d6 + >>> syncutil_singleflight-7ce08ca145dbe0e66a127c447b80ee7914f3e4f9 + >>> vdemeester_shakers-24d7f1d6a71aa5d9cbe7390e4afb66b7eef9e1b3 + >>> vishvananda_netlink-482f7a52b758233521878cb6c5904b6bd63f3457 + >>> vishvananda_netns-604eaf189ee867d8c147fafc28def2394e878d25 + >>> yaml_v2-4c78c975fe7c825c6d1466c42be594d1d6f3aba6 + + +SECTION 2: BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES + + >>> agl_ed25519-master + >>> airbrake_gobrake_v2-c9d51adc624b5cc4c1bf8de730a09af4878ffe2d + >>> api_compute_v1-dfa61ae24628a06502b9c2805d983b57e89399b5 + >>> api_gensupport-dfa61ae24628a06502b9c2805d983b57e89399b5 + >>> api_googleapi-dfa61ae24628a06502b9c2805d983b57e89399b5 + >>> armon_go-metrics-f303b03b91d770a11a39677f1d3b55da4002bbcb + >>> armon_go-radix-4239b77079c7b5d1243b7b4736304ce8ddb6f0f2 + >>> asaskevich_govalidator-9699ab6b38bee2e02cd3fe8b99ecf67665395c96 + >>> azure_go-ansiterm-70b2c90b260171e829f1ebd7c17f600c11858dbe + >>> boltdb_bolt-b514920f8f2e0a68f857e5a12c774f385a59aef9 + >>> cenkalti_backoff-b02f2bbce11d7ea6b97f282ef1771b0fe2f65ef3 + >>> client9_misspell-9a1fc2456ac9e8c9b4cbe9d005b6e7adac0d357f + >>> codegangsta/inject-33e0aa1cb7c019ccc3fbe049a8262a6403d30504 + >>> codegangsta_cli-master + >>> cpuguy83_go-md2man_md2man-a65d4d2de4d5f7c74868dfa9b202a3c8be315aaa + >>> d2g_dhcp4-f0e4d29ff0231dce36e250b2ed9ff08412584bca + >>> deckarep_golang-set-1f0f4ff8d3fbef9328522993ce71c35890f67554 + >>> dustin_go-humanize-259d2a102b871d17f30e3cd9881a642961a1e486 + >>> gemnasium_logrus-airbrake-hook_v2-31e6fd4bd5a98d8ee7673d24bc54ec73c31810dd + >>> gizak_termui-798ffb9cbbe4073ef1f88e6069ca4a2c6aa6676b + >>> go-check_check-20d25e2804050c1cd24a7eea1e7a6447dd0e74ec + >>> go-martini/martini-22fa46961aabd2665cf3f1343b146d20028f5071 + >>> go-nfs-client-42fca177a36031d648551c751de1daf5f55dd4f0 + >>> godbus_dbus-230e4b23db2fd81c53eaa0073f76659d4849ce51 + >>> gogo_protobuf_gogoproto-6a92c871a8f5333cf106b2cdf937567208dbb2b7 + >>> gogo_protobuf_proto-6a92c871a8f5333cf106b2cdf937567208dbb2b7 + >>> gogo_protobuf_protoc-gen-gogo_descriptor-6a92c871a8f5333cf106b2cdf937567208dbb2b7 + >>> gogo_protobuf_sortkeys-6a92c871a8f5333cf106b2cdf937567208dbb2b7 + >>> gogo_protobuf_types-6a92c871a8f5333cf106b2cdf937567208dbb2b7 + >>> goji/param-d7f49fd7d1ed53fd562e737a8b5bbcc7e3d925e2 + >>> golang_lint-cb00e5669539f047b2f4c53a421a01b0c8e172c6 + >>> google_go-github_github-7a51fb928f52a196d5f31daefb8a489453ef54ff + >>> google_go-querystring_query-53e6ce116135b80d037921a7fdd5138cf32d7a8a + >>> google_uuid-f3f4b54b2fabcf1f11dcc939025bb0c109b00ed8 + >>> googleapis_gax-go-da06d194a00e19ce00d9011a13931c3f6f6887c7 + >>> gorilla_context-1c83b3eabd45b6d76072b66b746c20815fb2872d + >>> gorilla_mux-acf3be1b335c8ce30b2c8d51300984666f0ceefa + >>> gorilla_securecookie-fa5329f913702981df43dcb2a380bac429c810b5 + >>> gorilla_sessions-ca9ada44574153444b00d3fd9c8559e4cc95f896 + >>> gorilla_websocket-a91eba7f97777409bc2c443f5534d41dd20c5720 + >>> graylog2_go-gelf_gelf-master + >>> grpc-b1a2821ca5a4fd6b6e48ddfbb7d6d7584d839d21 + >>> hpcloud_tail-a30252cb686a21eb2d0b98132633053ec2f7f1e5 + >>> jessevdk_go-flags-97448c91aac742cbca3d020b3e769013a420a06f + >>> julienschmidt/httprouter-975b5c4c7c21c0e3d2764200bf2aa8e34657ae6e + >>> justinas/alice-1051eaf52fcafdd87ead59d28b065f1fcb8274ec + >>> kr_pty-f7ee69f31298ecbe5d2b349c711e2547a617d398 + >>> mailru_easyjson-99e922cf9de1bc0ab38310c277cff32c2147e747 + >>> martini-contrib/render-ec18f8345a1181146728238980606fb1d6f40e8c + >>> matryer_resync-d39c09a11215c84aab0b65e323fc47dd6e276af1 + >>> mattn_go-runewidth-14207d285c6c197daabb5c9793d63e7af9ab2d50 + >>> mdlayher/arp-7140e8e22da120cb3efc8e1096f299933624024e + >>> mdlayher/ethernet-e72cf8343052938936194daba1914fd1bb33d2fe + >>> mdlayher/raw-c83864e487652c25edc58048eafdc1dfa2f142c7 + >>> microsoft_go-winio-24a3e3d3fc7451805e09d11e11e95d9a0a4f205e + >>> microsoft_hcsshim-d327ca738085de7d617aa1df16d98fe7a64c2455 + >>> miekg_dns-ca336a1f95a6b89be9c250df26c7a41742eb4a6f + >>> mitchellh_go-wordwrap-ad45545899c7b13c020ea92b2072220eefad42b8 + >>> mitchellh_mapstructure-5a0325d7fafaac12dda6e7fb8bd222ec1b69875e + >>> mreiferson_go-httpclient-31f0106b4474f14bc441575c19d3a5fa21aa1f6c + >>> naoina_denco-9af2ba0e24214bac003821f4a501b131b2e04c75 + >>> nlopes_slack-f243c7602fdf906248fc1f165284daa4e4d2d09e + >>> nsf_termbox-go-91bae1bb5fa9ee504905ecbe7043fa30e92feaa3 + >>> opennota_urlesc-5fa9ff0392746aeae1c4b37fcc42c65afa7a9587 + >>> pkg_profile-8a808a6967b79da66deacfe508b26d398a69518f + >>> puerkitobio_purell-d69616f51cdfcd7514d6a380847a152dfc2a749d + >>> racksec_srslog-a974ba6f7fb527d2ddc73ee9c05d3e2ccc0af0dc + >>> rs/cors-8dd4211afb5d08dbb39a533b9bb9e4b486351df6 + >>> ryanuber_go-glob-256dc444b735e061061cf46c809487313d5b0065 + >>> sirupsen_logrus-d26492970760ca5d33129d2d799e34be5c4782eb + >>> smartystreets_assertions-287b4346dc4e71a038c346375a9d572453bc469b + >>> smartystreets_assertions_internal_oglematchers-287b4346dc4e71a038c346375a9d572453bc469b + >>> smartystreets_assertions_internal_oglemock-287b4346dc4e71a038c346375a9d572453bc469b + >>> smartystreets_assertions_internal_ogletest-287b4346dc4e71a038c346375a9d572453bc469b + >>> smartystreets_assertions_internal_reqtrace-287b4346dc4e71a038c346375a9d572453bc469b + >>> stretchr_objx-1a9d0bb9f541897e62256577b352fdbc1fb4fd94 + >>> tomb_v1-dd632973f1e7218eb1089048e0798ec9ae7dceb8 + >>> tylerb/graceful.v1-4654dfbb6ad53cb5e27f37d99b02e16c1872fbbb + >>> tylerb_graceful-d7d7a205e779a4738d38eda0671fff8bfc965f14 + >>> ugorji_go_codec-708a42d246822952f38190a8d8c4e6b16a0e600c + >>> urfave/negroni-ccc4a14984828dcb944e6f17fa4a967b18624f2b + >>> urfave_cli_v1-0bdeddeeb0f650497d603c4ad7b20cfe685682f6 + >>> x_crypto_acme-728b753d0135da6801d45a38e6f43ff55779c5c2 + >>> x_crypto_curve25519-728b753d0135da6801d45a38e6f43ff55779c5c2 + >>> x_crypto_ed25519-728b753d0135da6801d45a38e6f43ff55779c5c2 + >>> x_crypto_nacl_secretbox-728b753d0135da6801d45a38e6f43ff55779c5c2 + >>> x_crypto_poly1305-728b753d0135da6801d45a38e6f43ff55779c5c2 + >>> x_crypto_salsa20_salsa-728b753d0135da6801d45a38e6f43ff55779c5c2 + >>> x_crypto_ssh-728b753d0135da6801d45a38e6f43ff55779c5c2 + >>> x_net_context-a6577fac2d73be281a500b310739095313165611 + >>> x_net_http2-a6577fac2d73be281a500b310739095313165611 + >>> x_net_idna-a6577fac2d73be281a500b310739095313165611 + >>> x_net_internal_timeseries-a6577fac2d73be281a500b310739095313165611 + >>> x_net_lex_httplex-a6577fac2d73be281a500b310739095313165611 + >>> x_net_proxy-a6577fac2d73be281a500b310739095313165611 + >>> x_net_trace-a6577fac2d73be281a500b310739095313165611 + >>> x_net_websocket-a6577fac2d73be281a500b310739095313165611 + >>> x_oauth2-1611bb46e67abc64a71ecc5c3ae67f1cbbc2b921 + >>> x_sync_singleflight-5a06fca2c336a4b2b2fcb45702e8c47621b2aa2c + >>> x_sys_unix-99f16d856c9836c42d24e7ab64ea72916925fa97 + >>> x_sys_windows-99f16d856c9836c42d24e7ab64ea72916925fa97 + >>> x_text_internal-f28f36722d5ef2f9655ad3de1f248e3e52ad5ebd + >>> x_text_language-f28f36722d5ef2f9655ad3de1f248e3e52ad5ebd + >>> x_text_message-f28f36722d5ef2f9655ad3de1f248e3e52ad5ebd + >>> x_tools_go_ast_astutil-381149a2d6e5d8f319ccf04bfefc71e03a78b868 + >>> x_tools_go_buildutil-381149a2d6e5d8f319ccf04bfefc71e03a78b868 + >>> x_tools_go_gcexportdata-381149a2d6e5d8f319ccf04bfefc71e03a78b868 + >>> x_tools_go_gcimporter15-381149a2d6e5d8f319ccf04bfefc71e03a78b868 + >>> x_tools_go_loader-381149a2d6e5d8f319ccf04bfefc71e03a78b868 + >>> x_tools_imports-381149a2d6e5d8f319ccf04bfefc71e03a78b868 + >>> zenazn/goji-c05078ca81941f8e801bba3ddc0e6b86b7fdc893 + + +SECTION 3: Mozilla Public License, V2.0 + + >>> d2g_dhcp4client-master + >>> hashicorp_go-cleanhttp-875fb671b3ddc66f8e2f0acc33829c8cb989a38d + >>> hashicorp_memberlist-cef12ad58224d55cf26caa9e3d239c2fcb3432a2 + + +PART 2. VIRTUAL APPLIANCE: OPERATING SYSTEM LAYER + + +SECTION 1: Academic Free License, V2.1 + + >>> dbus-1.11.12-1.ph2 + + +SECTION 2: Apache License, V2.0 + + >>> photon-release-2.0-2.ph2 + + +SECTION 3: BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES + + >>> bzip2-1.0.6-8.ph2 + >>> curl-7.59.0-4.ph2 + >>> expat-2.2.4-1.ph2 + >>> iputils-20151218-4.ph2 + >>> krb5-1.16-2.ph2 + >>> libarchive-3.3.1-2.ph2 + >>> libcap-2.25-7.ph2 + >>> libdb-5.3.28-1.ph2 + >>> libffi-3.2.1-5.ph2 + >>> libsolv-0.6.26-3.ph2 + >>> libssh2-1.8.0-1.ph2 + >>> libtirpc-1.0.1-8.ph2 + >>> linux-pam-1.3.0-1.ph2 + >>> lsof-4.89-2.ph2 + >>> ncurses-6.0-14.ph2 + >>> openssh-7.5p1-11.ph2 + >>> openssl-1.0.2q-1.ph2 + >>> pcre-8.41-1.ph2 + >>> popt-1.16-5.ph2 + >>> shadow-4.2.1-16.ph2 + >>> sqlite-3.22.0-3.ph2 + >>> sudo-1.8.20p2-5.ph2 + >>> vim-8.0.0533-6.ph2 + >>> xz-5.2.3-2.ph2 + >>> zlib-1.2.11-1.ph2 + + +SECTION 4: GNU General Public License, V2.0 + + >>> e2fsprogs-1.43.4-2.ph2 + >>> gcc-6.3.0-7.ph2 + >>> iproute2-4.10.0-3.ph2 + >>> iptables-1.6.1-4.ph2 + >>> linux-esx-4.9.154-1.ph2 + >>> logrotate-3.11.0-3.ph2 + >>> mingetty-1.08-2.ph2 + >>> net-tools-1.60-11.ph2 + >>> procps-ng-3.3.15-2.ph2 + >>> rpm-4.13.0.2-1.ph2 + >>> tdnf-1.2.3-6.ph2 + >>> util-linux-2.32-1.ph2 + + +SECTION 5: GNU General Public License, V3.0 + + >>> bash-4.4.12-3.ph2 + >>> coreutils-8.27-3.ph2 + >>> elfutils-0.169-3.ph2 + >>> grep-3.0-4.ph2 + >>> gzip-1.8-1.ph2 + >>> haveged-1.9.1-4.ph2 + >>> readline-7.0-2.ph2 + + +SECTION 6: GNU Lesser General Public License, V2.1 + + >>> cracklib-2.9.6-8.ph2 + >>> glibc-2.26-13.ph2 + >>> hawkey-2017.1-6.ph2 + >>> kmod-24-3.ph2 + >>> libgcrypt-1.8.1-2.ph2 + >>> libgpg-error-1.27-1.ph2 + >>> systemd-233-18.ph2 + + +SECTION 7: GNU Lesser General Public License, V3.0 + + >>> gmp-6.1.2-2.ph2 + + +SECTION 8: GNU Library General Public License, V2.0 + + >>> glib-2.52.1-3.ph2 + + +SECTION 9: Mozilla Public License, V2.0 + + >>> ca-certificates-20180919-1.ph2 + >>> nspr-4.15-1.ph2 + >>> nss-3.31.1-1.ph2 + + +APPENDIX. Standard License Files + + >>> Apache License, V2.0 + + >>> GNU General Public License, V2.0 + + >>> GNU General Public License, V3.0 + + >>> GNU Library General Public License, V2.0 + + >>> GNU Lesser General Public License, V2.1 + + >>> GNU Lesser General Public License, V3.0 + + >>> Mozilla Public License, V2.0 + + >>> GNU General Public License, V1.0 + + >>> GNU Free Documentation License V1.1 + + >>> GNU Free Documentation License V1.2 + + >>> GNU Free Documentation License V1.3 + + >>> Artistic License, V1.0 + + >>> Artistic License, V2.0 + + >>> Microsoft Permissive Public License + + >>> Microsoft Limited Public License + + >>> Creative Commons Attribution License, V3.0 + + >>> Creative Commons Attribution 4.0 International + + >>> Creative Commons Attribution-ShareAlike, V4.0 + + >>> Creative Commons Attribution-ShareAlike, V3.0 + + >>> Academic Free License, V2.1 + + >>> SIL Open Font License, V1.1 + + >>> LaTeX Project Public License v1.3c + + >>> Open Software License 1.1 + + >>> Creative Commons Attribution Share Alike 2.0 Generic + + >>> LDP GENERAL PUBLIC LICENSE v1 + + + +====================PART 1. VIRTUAL APPLIANCE: APPLICATION LAYER ==================== + + +--------------- SECTION 1: Apache License, V2.0 ---------- + +Apache License, V2.0 is applicable to the following component(s). + + +>>> appengine-ca59ef35f409df61fa4a5f8290ff289b37eccfb8 + +Copyright 2015 Google Inc. All rights reserved. +Use of this source code is governed by the Apache 2.0 +license that can be found in the LICENSE file. + + +ADDITIONAL LICENSE INFORMATION: + +> BSD-Style + +appengine-ca59ef35f409df61fa4a5f8290ff289b37eccfb8.tar.gz\appengine-ca59ef35f409df61fa4a5f8290ff289b37eccfb8.tar\appengine-ca59ef35f409df61fa4a5f8290ff289b37eccfb8\cmd\aefix\typecheck.go + +Copyright 2011 The Go Authors. All rights reserved. +Use of this source code is governed by a BSD-style +license that can be found in the LICENSE file. + +>>> aws_aws-sdk-go_aws-master + +AWS SDK for Go +Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2014-2015 Stripe, Inc. +Copyright 2015 James Saryerwinnie + +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. + + +ADDITIONAL LICENSE INFORMATION: + +>BSD-2 + +aws-sdk-go-master.tar.gz\aws-sdk-go-master.tar\aws-sdk-go-master\awsmigrate\awsmigrate-renamer\vendor\golang.org\x\tools\LICENSE + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. +Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. + +>MIT + +aws-sdk-go-master.tar.gz\aws-sdk-go-master.tar\aws-sdk-go-master\doc-src\aws-godoc\templates\jquery.js + +jQuery v1.8.2 jquery.com | jquery.org/license + +>MIT + +[PLEASE NOTE: VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE MIT. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] + +aws-sdk-go-master.tar.gz\aws-sdk-go-master.tar\aws-sdk-go-master\doc-src\aws-godoc\templates\jquery.treeview.js + +http://bassistance.de/jquery-plugins/jquery-plugin-treeview/ +http://docs.jquery.com/Plugins/Treeview + +Copyright (c) 2007 Jörn Zaefferer + +Dual licensed under the MIT and GPL licenses: +http://www.opensource.org/licenses/mit-license.php +http://www.gnu.org/licenses/gpl.html + +>>> coreos_etcd_client-781196fa8746d6c34ace2a62898051af6dc46002 + +CoreOS Project +Copyright 2014 CoreOS, Inc + +This product includes software developed at CoreOS, Inc. +(http://www.coreos.com/). + +Copyright 2016 The etcd Authors + +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. + +ADDITIONAL LICENSE INFORMATION: + +> BSD + +etcd-781196fa8746d6c34ace2a62898051af6dc46002.tar.gz\etcd-781196fa8746d6c34ace2a62898051af6dc46002.tar\etcd-781196fa8746d6c34ace2a62898051af6dc46002\client\cancelreq.go + +Copyright 2015 The Go Authors. All rights reserved. +Use of this source code is governed by a BSD-style +license that can be found in the LICENSE file. + +> MIT + +etcd-781196fa8746d6c34ace2a62898051af6dc46002.tar.gz\etcd-781196fa8746d6c34ace2a62898051af6dc46002.tar\etcd-781196fa8746d6c34ace2a62898051af6dc46002\cmd\vendor\github.com\beorn7\perks\LICENSE + +Copyright (C) 2013 Blake Mizerany + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +> MIT-Style + +etcd-781196fa8746d6c34ace2a62898051af6dc46002.tar.gz\etcd-781196fa8746d6c34ace2a62898051af6dc46002.tar\etcd-781196fa8746d6c34ace2a62898051af6dc46002\cmd\vendor\github.com\davecgh\go-spew\spew\dump.go + +Copyright (c) 2013 Dave Collins + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +> BSD-3 Style + +etcd-781196fa8746d6c34ace2a62898051af6dc46002.tar.gz\etcd-781196fa8746d6c34ace2a62898051af6dc46002.tar\etcd-781196fa8746d6c34ace2a62898051af6dc46002\cmd\vendor\github.com\gogo\protobuf\proto\text_parser.go + +Copyright (c) 2013, The GoGo Authors. All rights reserved. +http://github.com/gogo/protobuf + +Go support for Protocol Buffers - Google's data interchange format + +Copyright 2010 The Go Authors. All rights reserved. +https://github.com/golang/protobuf + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. +Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +> BSD-2 Clause + +etcd-781196fa8746d6c34ace2a62898051af6dc46002.tar.gz\etcd-781196fa8746d6c34ace2a62898051af6dc46002.tar\etcd-781196fa8746d6c34ace2a62898051af6dc46002\cmd\vendor\github.com\gogo\protobuf\proto\text_gogo.go + +Copyright (c) 2013, The GoGo Authors. All rights reserved. +http://github.com/gogo/protobuf + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +> etcd-781196fa8746d6c34ace2a62898051af6dc46002.tar.gz\etcd-781196fa8746d6c34ace2a62898051af6dc46002.tar\etcd-781196fa8746d6c34ace2a62898051af6dc46002\cmd\vendor\github.com\prometheus\client_golang\NOTICE + +Prometheus instrumentation library for Go applications +Copyright 2012-2015 The Prometheus Authors + +This product includes software developed at +SoundCloud Ltd. (http://soundcloud.com/). + + +The following components are included in this product: + +perks - a fork of https://github.com/bmizerany/perks +https://github.com/beorn7/perks +Copyright 2013-2015 Blake Mizerany, Björn Rabenstein +See https://github.com/beorn7/perks/blob/master/README.md for license details. + +Go support for Protocol Buffers - Google's data interchange format +http://github.com/golang/protobuf/ +Copyright 2010 The Go Authors +See source code for license details. + +Support for streaming Protocol Buffer messages for the Go language (golang). +https://github.com/matttproud/golang_protobuf_extensions +Copyright 2013 Matt T. Proud +Licensed under the Apache License, Version 2.0 + +> BSD-3 (WITH GOOGLE PATENT) + +etcd-781196fa8746d6c34ace2a62898051af6dc46002.tar.gz\etcd-781196fa8746d6c34ace2a62898051af6dc46002.tar\etcd-781196fa8746d6c34ace2a62898051af6dc46002\cmd\vendor\golang.org\x\crypto\LICENSE + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. +Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. + +> LGPL 3.0 (WITH LINKING EXCEPTION) + +etcd-781196fa8746d6c34ace2a62898051af6dc46002.tar.gz\etcd-781196fa8746d6c34ace2a62898051af6dc46002.tar\etcd-781196fa8746d6c34ace2a62898051af6dc46002\cmd\vendor\gopkg.in\yaml.v2\LICENSE + +Copyright (c) 2011-2014 - Canonical Inc. + +This software is licensed under the LGPLv3, included below. + +As a special exception to the GNU Lesser General Public License version 3 +("LGPL3"), the copyright holders of this Library give you permission to +convey to a third party a Combined Work that links statically or dynamically +to this Library without providing any Minimal Corresponding Source or +Minimal Application Code as set out in 4d or providing the installation +information set out in section 4e, provided that you comply with the other +provisions of LGPL3 and provided that you meet, for the Application the +terms and conditions of the license(s) which apply to the Application. + +Except as stated in this special exception, the provisions of LGPL3 will +continue to comply in full to this Library. If you modify this Library, you +may apply this exception to your version of this Library, but you are not +obliged to do so. If you do not wish to do so, delete this exception +statement from your version. This exception does not (and cannot) modify any +license terms which apply to the Application, with which you must still +comply. + +>>> coreos_etcd_version-781196fa8746d6c34ace2a62898051af6dc46002 + +CoreOS Project +Copyright 2014 CoreOS, Inc + +This product includes software developed at CoreOS, Inc. +(http://www.coreos.com/). + +Copyright 2016 The etcd Authors + +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. + +ADDITIONAL LICENSE INFORMATION: + +> BSD + +etcd-781196fa8746d6c34ace2a62898051af6dc46002.tar.gz\etcd-781196fa8746d6c34ace2a62898051af6dc46002.tar\etcd-781196fa8746d6c34ace2a62898051af6dc46002\client\cancelreq.go + +Copyright 2015 The Go Authors. All rights reserved. +Use of this source code is governed by a BSD-style +license that can be found in the LICENSE file. + +> MIT + +etcd-781196fa8746d6c34ace2a62898051af6dc46002.tar.gz\etcd-781196fa8746d6c34ace2a62898051af6dc46002.tar\etcd-781196fa8746d6c34ace2a62898051af6dc46002\cmd\vendor\github.com\beorn7\perks\LICENSE + +Copyright (C) 2013 Blake Mizerany + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +> MIT-Style + +etcd-781196fa8746d6c34ace2a62898051af6dc46002.tar.gz\etcd-781196fa8746d6c34ace2a62898051af6dc46002.tar\etcd-781196fa8746d6c34ace2a62898051af6dc46002\cmd\vendor\github.com\davecgh\go-spew\spew\dump.go + +Copyright (c) 2013 Dave Collins + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +> BSD-3 Style + +etcd-781196fa8746d6c34ace2a62898051af6dc46002.tar.gz\etcd-781196fa8746d6c34ace2a62898051af6dc46002.tar\etcd-781196fa8746d6c34ace2a62898051af6dc46002\cmd\vendor\github.com\gogo\protobuf\proto\text_parser.go + +Copyright (c) 2013, The GoGo Authors. All rights reserved. +http://github.com/gogo/protobuf + +Go support for Protocol Buffers - Google's data interchange format + +Copyright 2010 The Go Authors. All rights reserved. +https://github.com/golang/protobuf + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. +Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +> BSD-2 Clause + +etcd-781196fa8746d6c34ace2a62898051af6dc46002.tar.gz\etcd-781196fa8746d6c34ace2a62898051af6dc46002.tar\etcd-781196fa8746d6c34ace2a62898051af6dc46002\cmd\vendor\github.com\gogo\protobuf\proto\text_gogo.go + +Copyright (c) 2013, The GoGo Authors. All rights reserved. +http://github.com/gogo/protobuf + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +> etcd-781196fa8746d6c34ace2a62898051af6dc46002.tar.gz\etcd-781196fa8746d6c34ace2a62898051af6dc46002.tar\etcd-781196fa8746d6c34ace2a62898051af6dc46002\cmd\vendor\github.com\prometheus\client_golang\NOTICE + +Prometheus instrumentation library for Go applications +Copyright 2012-2015 The Prometheus Authors + +This product includes software developed at +SoundCloud Ltd. (http://soundcloud.com/). + + +The following components are included in this product: + +perks - a fork of https://github.com/bmizerany/perks +https://github.com/beorn7/perks +Copyright 2013-2015 Blake Mizerany, Björn Rabenstein +See https://github.com/beorn7/perks/blob/master/README.md for license details. + +Go support for Protocol Buffers - Google's data interchange format +http://github.com/golang/protobuf/ +Copyright 2010 The Go Authors +See source code for license details. + +Support for streaming Protocol Buffer messages for the Go language (golang). +https://github.com/matttproud/golang_protobuf_extensions +Copyright 2013 Matt T. Proud +Licensed under the Apache License, Version 2.0 + +> BSD-3 (WITH GOOGLE PATENT) + +etcd-781196fa8746d6c34ace2a62898051af6dc46002.tar.gz\etcd-781196fa8746d6c34ace2a62898051af6dc46002.tar\etcd-781196fa8746d6c34ace2a62898051af6dc46002\cmd\vendor\golang.org\x\crypto\LICENSE + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. +Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. + +> LGPL 3.0 (WITH LINKING EXCEPTION) + +etcd-781196fa8746d6c34ace2a62898051af6dc46002.tar.gz\etcd-781196fa8746d6c34ace2a62898051af6dc46002.tar\etcd-781196fa8746d6c34ace2a62898051af6dc46002\cmd\vendor\gopkg.in\yaml.v2\LICENSE + +Copyright (c) 2011-2014 - Canonical Inc. + +This software is licensed under the LGPLv3, included below. + +As a special exception to the GNU Lesser General Public License version 3 +("LGPL3"), the copyright holders of this Library give you permission to +convey to a third party a Combined Work that links statically or dynamically +to this Library without providing any Minimal Corresponding Source or +Minimal Application Code as set out in 4d or providing the installation +information set out in section 4e, provided that you comply with the other +provisions of LGPL3 and provided that you meet, for the Application the +terms and conditions of the license(s) which apply to the Application. + +Except as stated in this special exception, the provisions of LGPL3 will +continue to comply in full to this Library. If you modify this Library, you +may apply this exception to your version of this Library, but you are not +obliged to do so. If you do not wish to do so, delete this exception +statement from your version. This exception does not (and cannot) modify any +license terms which apply to the Application, with which you must still +comply. + +>>> coreos_go-semver_semver-5e3acbb5668c4c3deb4842615c4098eb61fb6b1e + +Copyright 2013-2015 CoreOS, Inc. + +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. + +>>> docker_distribution-28602af35aceda2f8d571bad7ca37a54cf0250bc + +Copyright 2012 Gary Burd + +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. + +ADDITIONAL LICENSE INFORMATION: + + +> MIT + + +distribution-28602af35aceda2f8d571bad7ca37a54cf0250bc.tar.gz\distribution-28602af35aceda2f8d571bad7ca37a54cf0250bc.tar\distribution-28602af35aceda2f8d571bad7ca37a54cf0250bc\registry\storage\driver\s3-aws\s3_v2_signer.go + + +Copyright (c) 2013 Damien Le Berrigaud and Nick Wade + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +> MIT Style + + +distribution-28602af35aceda2f8d571bad7ca37a54cf0250bc.tar.gz\distribution-28602af35aceda2f8d571bad7ca37a54cf0250bc.tar\distribution-28602af35aceda2f8d571bad7ca37a54cf0250bc\vendor\github.com\bugsnag\osext\LICENSE + + +Copyright (c) 2012 Daniel Theophanes + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + + +> LGPL 3.0 (With linking exception) + + +distribution-28602af35aceda2f8d571bad7ca37a54cf0250bc.tar.gz\distribution-28602af35aceda2f8d571bad7ca37a54cf0250bc.tar\distribution-28602af35aceda2f8d571bad7ca37a54cf0250bc\vendor\github.com\docker\goamz\LICENSE + + +This software is licensed under the LGPLv3, included below. + +As a special exception to the GNU Lesser General Public License version 3 +("LGPL3"), the copyright holders of this Library give you permission to +convey to a third party a Combined Work that links statically or dynamically +to this Library without providing any Minimal Corresponding Source or +Minimal Application Code as set out in 4d or providing the installation +information set out in section 4e, provided that you comply with the other +provisions of LGPL3 and provided that you meet, for the Application the +terms and conditions of the license(s) which apply to the Application. + +Except as stated in this special exception, the provisions of LGPL3 will +continue to comply in full to this Library. If you modify this Library, you +may apply this exception to your version of this Library, but you are not +obliged to do so. If you do not wish to do so, delete this exception +statement from your version. This exception does not (and cannot) modify any +license terms which apply to the Application, with which you must still +comply. + + +> BSD 3 Clause + + +distribution-28602af35aceda2f8d571bad7ca37a54cf0250bc.tar.gz\distribution-28602af35aceda2f8d571bad7ca37a54cf0250bc.tar\distribution-28602af35aceda2f8d571bad7ca37a54cf0250bc\vendor\golang.org\x\crypto\LICENSE + + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. + + +> BSD 2 Clause + + +distribution-28602af35aceda2f8d571bad7ca37a54cf0250bc.tar.gz\distribution-28602af35aceda2f8d571bad7ca37a54cf0250bc.tar\distribution-28602af35aceda2f8d571bad7ca37a54cf0250bc\vendor\github.com\gorilla\handlers\LICENSE + + +Copyright (c) 2013 The Gorilla Handlers Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +>>> docker_go-events-aa2e3b613fbbfdddbe055a7b9e3ce271cfd83eca + +License: Apache 2.0 + +>>> docker_libnetwork-fd27f22aaa35e3d57f88688f919d05b744f431fd + +Copyright 2015 CoreOS, Inc. + +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.orglicensesLICENSE-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. + +ADDITIONAL LICENSE INFORMATION: + +> BSD 3 Clause + +libnetwork-fd27f22aaa35e3d57f88688f919d05b744f431fd.tar.gz\libnetwork-fd27f22aaa35e3d57f88688f919d05b744f431fd.tar\libnetwork-fd27f22aaa35e3d57f88688f919d05b744f431fd\client\mflag\LICENSE + +Copyright (c) 2014-2016 The Docker & Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation andor other materials provided with the +distribution. +* Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +> MIT + + +libnetwork-fd27f22aaa35e3d57f88688f919d05b744f431fd.tar.gz\libnetwork-fd27f22aaa35e3d57f88688f919d05b744f431fd.tar\libnetwork-fd27f22aaa35e3d57f88688f919d05b744f431fd\Godeps\_workspace\src\github.com\armon\go-metrics\LICENSE + +The MIT License (MIT) + +Copyright (c) 2013 Armon Dadgar + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, andor sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +> WTFPL(MIT Stle) + +libnetwork-fd27f22aaa35e3d57f88688f919d05b744f431fd.tar.gz\libnetwork-fd27f22aaa35e3d57f88688f919d05b744f431fd.tar\libnetwork-fd27f22aaa35e3d57f88688f919d05b744f431fd\Godeps\_workspace\src\github.com\BurntSushi\toml\COPYING + +DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE +Version 2, December 2004 + +Copyright (C) 2004 Sam Hocevar + +Everyone is permitted to copy and distribute verbatim or modified +copies of this license document, and changing it is allowed as long +as the name is changed. + +DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. You just DO WHAT THE FUCK YOU WANT TO. + +> BSD Style + +libnetwork-fd27f22aaa35e3d57f88688f919d05b744f431fd.tar.gz\libnetwork-fd27f22aaa35e3d57f88688f919d05b744f431fd.tar\libnetwork-fd27f22aaa35e3d57f88688f919d05b744f431fd\Godeps\_workspace\src\github.com\BurntSushi\toml\type_fields.go + +Copyright 2010 The Go Authors. All rights reserved. +Use of this source code is governed by a BSD-style +license that can be found in the Go distribution. + +> CC-Attribution share alike 4.0 + + +libnetwork-fd27f22aaa35e3d57f88688f919d05b744f431fd.tar.gz\libnetwork-fd27f22aaa35e3d57f88688f919d05b744f431fd.tar\libnetwork-fd27f22aaa35e3d57f88688f919d05b744f431fd\Godeps\_workspace\src\github.com\docker\go-units\README.md + +Copyright and license + +Copyright © 2015 Docker, Inc. All rights reserved, except as follows. Code +is released under the Apache 2.0 license. The README.md file, and files in the +"docs" folder are licensed under the Creative Commons Attribution 4.0 +International License under the terms and conditions set forth in the file +"LICENSE.docs". You may obtain a duplicate copy of the same license, titled +CC-BY-SA-4.0, at http:creativecommons.orglicensesby4.0. + +> BSD2 Clause + + +libnetwork-fd27f22aaa35e3d57f88688f919d05b744f431fd.tar.gz\libnetwork-fd27f22aaa35e3d57f88688f919d05b744f431fd.tar\libnetwork-fd27f22aaa35e3d57f88688f919d05b744f431fd\Godeps\_workspace\src\github.com\godbus\dbus\LICENSE + + +Copyright (c) 2013, Georg Reinke (), Google +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation andor other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +> MPL2.0 + + +libnetwork-fd27f22aaa35e3d57f88688f919d05b744f431fd.tar.gz\libnetwork-fd27f22aaa35e3d57f88688f919d05b744f431fd.tar\libnetwork-fd27f22aaa35e3d57f88688f919d05b744f431fd\Godeps\_workspace\src\github.com\hashicorp\consul\LICENSE + +License: MPL2.0 + + +> CC- Attribution 4.0 + +libnetwork-fd27f22aaa35e3d57f88688f919d05b744f431fd.tar.gz\libnetwork-fd27f22aaa35e3d57f88688f919d05b744f431fd.tar\libnetwork-fd27f22aaa35e3d57f88688f919d05b744f431fd\README.md + +Copyright and license +Code and documentation copyright 2015 Docker, inc. Code released under the Apache 2.0 license. Docs released under Creative commons. + + +> BSD 3 with IP Rights Grant + + +libnetwork-fd27f22aaa35e3d57f88688f919d05b744f431fd.tar.gz\libnetwork-fd27f22aaa35e3d57f88688f919d05b744f431fd.tar\libnetwork-fd27f22aaa35e3d57f88688f919d05b744f431fd\Godeps\_workspace\src\golang.org\x\net\LICENSE + + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. + +>>> docker_libtrust-9cbd2a1374f46905c68a4eb3694a130610adc62a + +License : Apache 2.0 + +>>> go-openapi_analysis-d5a75b7d751ca3f11ad5d93cfe97405f2c3f6a47 + +Copyright 2015 go-swagger maintainers + +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. + +>>> go-openapi_errors-fc3f73a224499b047eda7191e5d22e1e9631e86f + +Copyright 2015 go-swagger maintainers + +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. + +>>> go-openapi_jsonpointer-779f45308c19820f1a69e9a4cd965f496e0da10f + +Copyright 2013 sigu-399 ( https:github.com/sigu-399 ) + +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. + +>>> go-openapi_jsonreference-36d33bfe519efae5632669801b180bf1a245da3b + +Copyright 2013 sigu-399 ( https://github.com/sigu-399 ) + +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. + +>>> go-openapi_loads-6bb6486231e079ea125c0f39994ed3d0c53399ed + +Copyright 2015 go-swagger maintainers + + 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. + +>>> go-openapi_runtime-3b13ebb46790d871d74a6c2450fa4b1280f90854 + +Copyright 2015 go-swagger maintainers + +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. + +ADDITIONAL LICENSE INFORMATION: + +> MIT + +runtime-3b13ebb46790d871d74a6c2450fa4b1280f90854.tar.gz\runtime-3b13ebb46790d871d74a6c2450fa4b1280f90854.tar\runtime-3b13ebb46790d871d74a6c2450fa4b1280f90854\middleware\denco\LICENSE + +Copyright (c) 2014 Naoya Inada + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +> CC-Attribution 4.0 + +runtime-3b13ebb46790d871d74a6c2450fa4b1280f90854.tar.gz\runtime-3b13ebb46790d871d74a6c2450fa4b1280f90854.tar\runtime-3b13ebb46790d871d74a6c2450fa4b1280f90854\internal\testing\data.go + +License name: Creative Commons 4.0 International, +url: http://creativecommons.org/licenses/by/4.0/ + +> BSD-3 clause + +runtime-3b13ebb46790d871d74a6c2450fa4b1280f90854.tar.gz\runtime-3b13ebb46790d871d74a6c2450fa4b1280f90854.tar\runtime-3b13ebb46790d871d74a6c2450fa4b1280f90854\middleware\negotiate_test.go + +Copyright 2013 The Go Authors. All rights reserved. + +Use of this source code is governed by a BSD-style +license that can be found in the LICENSE file or at +https://developers.google.com/open-source/licenses/bsd. + +>>> go-openapi_spec-e072eb2390d3a03736a6eb617d30f48369160447 + +Copyright 2015 go-swagger maintainers + +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. + +ADDITIONAL LICENSE INFORMATION: + +> CC-Attribution 4.0 + +spec-e072eb2390d3a03736a6eb617d30f48369160447.tar.gz\spec-e072eb2390d3a03736a6eb617d30f48369160447.tar\spec-e072eb2390d3a03736a6eb617d30f48369160447\fixtures\expansion\invalid-refs.json + +license: +Creative Commons 4.0 International +http://creativecommons.org/licenses/by/4.0/ + +> MIT + +spec-e072eb2390d3a03736a6eb617d30f48369160447.tar.gz\spec-e072eb2390d3a03736a6eb617d30f48369160447.tar\spec-e072eb2390d3a03736a6eb617d30f48369160447\fixtures\expansion\all-the-things.json + +License: MIT + +>>> go-openapi_strfmt-0cb3db44c13bad3b3f567b762a66751972a310cc + +Copyright 2015 go-swagger maintainers + +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. + +>>> go-openapi_swag-96d7b9ebd181a1735a1c9ac87914f2b32fbf56c9 + +Copyright 2015 go-swagger maintainers + +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. + +>>> go-openapi_validate-035dcd74f1f61e83debe1c22950dc53556e7e4b2 + +Copyright 2015 go-swagger maintainers + +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. + +>>> go_compute_metadata-cd0da878c66091060d2e7403abd62192b3e387e0 + +Copyright 2015 go-swagger maintainers + + 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. + +>>> go_internal-cd0da878c66091060d2e7403abd62192b3e387e0 + +Copyright 2016 Google Inc. All Rights Reserved. + +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. + +>>> golang_glog-23def4e6c14b4da8ac2ed8007337bc5eb5007998 + +Go support for leveled logs, analogous to https:code.google.compgoogle-glog + +Copyright 2013 Google Inc. All Rights Reserved. + +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.orglicensesLICENSE-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. + +>>> golang_groupcache_lru-72d04f9fcdec7d3821820cc4a6f150eae553639a + +Copyright 2013 Google Inc. + +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. + +>>> govmomi-v0.17.1 + +Copyright (c) 2016 VMware, Inc. All Rights Reserved. + +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. + +ADDITIONAL LICENSE INFORMATION: + +> MIT- Style + +govmomi-0.17.1.tar.gz\govmomi-0.17.1.tar\govmomi-0.17.1\vendor\github.com\davecgh\go-xdr\LICENSE + +Copyright (c) 2012-2014 Dave Collins + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +> BSD- 3 Clause + +govmomi-0.17.1.tar.gz\govmomi-0.17.1.tar\govmomi-0.17.1\vim25\xml\LICENSE + +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +>>> maruel_panicparse_stack-25bcac0d793cf4109483505a0d66e066a3a90a80 + +Copyright 2015 Marc-Antoine Ruel. All rights reserved. +Use of this source code is governed under the Apache License, Version 2.0 +that can be found in the LICENSE file. + +ADDITIONAL LICENSE INFORMATION: + +> MIT + +panicparse-25bcac0d793cf4109483505a0d66e066a3a90a80.tar.gz\panicparse-25bcac0d793cf4109483505a0d66e066a3a90a80.tar\panicparse-25bcac0d793cf4109483505a0d66e066a3a90a80\vendor\github.com\kr\pretty\License + +The MIT License (MIT) + +Copyright 2012 Keith Rarick + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +> BSD-3 Clause + +panicparse-25bcac0d793cf4109483505a0d66e066a3a90a80.tar.gz\panicparse-25bcac0d793cf4109483505a0d66e066a3a90a80.tar\panicparse-25bcac0d793cf4109483505a0d66e066a3a90a80\vendor\github.com\pmezard\go-difflib\LICENSE + +Copyright (c) 2013, Patrick Mezard +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +The names of its contributors may not be used to endorse or promote +products derived from this software without specific prior written +permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +>>> oxtoacart/bpool-4e1c5567d7c2dd59fa4c7c83d34c2f3528b025d6 + +Copyright 2014 Percy Wegmann + +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. + +>>> syncutil_singleflight-7ce08ca145dbe0e66a127c447b80ee7914f3e4f9 + +Copyright 2014 The Camlistore Authors + +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. + + +ADDITIONAL LICENSE INFORMATION: + +> BSD-Style + +go4-7ce08ca145dbe0e66a127c447b80ee7914f3e4f9.tar.gz\go4-7ce08ca145dbe0e66a127c447b80ee7914f3e4f9.tar\go4-7ce08ca145dbe0e66a127c447b80ee7914f3e4f9\reflectutil\swapper_unsafe_15.go + +Copyright 2016 The Go Authors. All rights reserved. +Use of this source code is governed by a BSD-style +license that can be found in the LICENSE file. + +>>> vdemeester_shakers-24d7f1d6a71aa5d9cbe7390e4afb66b7eef9e1b3 + +License : Apache 2.0 + +>>> vishvananda_netlink-482f7a52b758233521878cb6c5904b6bd63f3457 + +License: Apache 2.0 + +>>> vishvananda_netns-604eaf189ee867d8c147fafc28def2394e878d25 + +Copyright 2014 Vishvananda Ishaya. +Copyright 2014 Docker, Inc. + +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. + +>>> yaml_v2-4c78c975fe7c825c6d1466c42be594d1d6f3aba6 + +Copyright 2011-2016 Canonical Ltd. + +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. + + +ADDITIONAL LICENSE INFORMATION: + + +> MIT + +yaml-4c78c975fe7c825c6d1466c42be594d1d6f3aba6.tar.gz\yaml-4c78c975fe7c825c6d1466c42be594d1d6f3aba6.tar\yaml-4c78c975fe7c825c6d1466c42be594d1d6f3aba6\LICENSE.libyaml + +The following files were ported to Go from C files of libyaml, and thus +are still covered by their original copyright and license: + + apic.go + emitterc.go + parserc.go + readerc.go + scannerc.go + writerc.go + yamlh.go + yamlprivateh.go + +Copyright (c) 2006 Kirill Simonov + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--------------- SECTION 2: BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES ---------- + +BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES are applicable to the following component(s). + + +>>> agl_ed25519-master + +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +>>> airbrake_gobrake_v2-c9d51adc624b5cc4c1bf8de730a09af4878ffe2d + +Copyright (c) 2014 The Gobrake Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +>>> api_compute_v1-dfa61ae24628a06502b9c2805d983b57e89399b5 + +Copyright (c) 2011 Google Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +>>> api_gensupport-dfa61ae24628a06502b9c2805d983b57e89399b5 + +Copyright (c) 2011 Google Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. +* Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +ADDITIONAL LICENSE INFORMATION: + +> Apache 2.0 + +google-api-go-client-dfa61ae24628a06502b9c2805d983b57e89399b5.tar.gz\google-api-go-client-dfa61ae24628a06502b9c2805d983b57e89399b5.tar\google-api-go-client-dfa61ae24628a06502b9c2805d983b57e89399b5\examples\pubsub.go + +Copyright 2017 Google Inc. All Rights Reserved. + +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. + +> BSD + +google-api-go-client-dfa61ae24628a06502b9c2805d983b57e89399b5.tar.gz\google-api-go-client-dfa61ae24628a06502b9c2805d983b57e89399b5.tar\google-api-go-client-dfa61ae24628a06502b9c2805d983b57e89399b5\examples\mapsengine.go + +Copyright 2014 The Go Authors. All rights reserved. +Use of this source code is governed by a BSD-style +license that can be found in the LICENSE file. + +> MIT + +google-api-go-client-dfa61ae24628a06502b9c2805d983b57e89399b5.tar.gz\google-api-go-client-dfa61ae24628a06502b9c2805d983b57e89399b5.tar\google-api-go-client-dfa61ae24628a06502b9c2805d983b57e89399b5\googleapi\internal\uritemplates\LICENSE + +Copyright (c) 2013 Joshua Tacoma + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +>>> api_googleapi-dfa61ae24628a06502b9c2805d983b57e89399b5 + +Copyright (c) 2011 Google Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. +* Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +ADDITIONAL LICENSE INFORMATION: + +> MIT + +google-api-go-client-dfa61ae24628a06502b9c2805d983b57e89399b5.tar.gz\google-api-go-client-dfa61ae24628a06502b9c2805d983b57e89399b5(1).tar\google-api-go-client-dfa61ae24628a06502b9c2805d983b57e89399b5\googleapi\internal\uritemplates\LICENSE + +Copyright (c) 2013 Joshua Tacoma + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +> Apache 2.0 + +google-api-go-client-dfa61ae24628a06502b9c2805d983b57e89399b5.tar.gz\google-api-go-client-dfa61ae24628a06502b9c2805d983b57e89399b5(1).tar\google-api-go-client-dfa61ae24628a06502b9c2805d983b57e89399b5\examples\compute.go + +Copyright 2017 Google Inc. All Rights Reserved. + +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. + +>>> armon_go-metrics-f303b03b91d770a11a39677f1d3b55da4002bbcb + +The MIT License (MIT) + +Copyright (c) 2013 Armon Dadgar + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +>>> armon_go-radix-4239b77079c7b5d1243b7b4736304ce8ddb6f0f2 + +The MIT License (MIT) + +Copyright (c) 2014 Armon Dadgar + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +>>> asaskevich_govalidator-9699ab6b38bee2e02cd3fe8b99ecf67665395c96 + +The MIT License (MIT) + +Copyright (c) 2014 Alex Saskevich + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +>>> azure_go-ansiterm-70b2c90b260171e829f1ebd7c17f600c11858dbe + +The MIT License (MIT) + +Copyright (c) 2015 Microsoft Corporation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +>>> boltdb_bolt-b514920f8f2e0a68f857e5a12c774f385a59aef9 + +The MIT License (MIT) + +Copyright (c) 2013 Ben Johnson + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +>>> cenkalti_backoff-b02f2bbce11d7ea6b97f282ef1771b0fe2f65ef3 + +The MIT License (MIT) + +Copyright (c) 2014 Cenk Alti + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +>>> client9_misspell-9a1fc2456ac9e8c9b4cbe9d005b6e7adac0d357f + +The MIT License (MIT) + +Copyright (c) 2015-2016 Nick Galbreath + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +ADDITIONAL LICENSE INFORMATION: + +> BSD-3 Clause + +misspell-9a1fc2456ac9e8c9b4cbe9d005b6e7adac0d357f.tar.gz\misspell-9a1fc2456ac9e8c9b4cbe9d005b6e7adac0d357f.tar\misspell-9a1fc2456ac9e8c9b4cbe9d005b6e7adac0d357f\stringreplacer\LICENSE + +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +>>> codegangsta/inject-33e0aa1cb7c019ccc3fbe049a8262a6403d30504 + +The MIT License (MIT) + +Copyright (c) 2013 Jeremy Saenz + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +>>> codegangsta_cli-master + +MIT License + +Copyright (c) 2016 Jeremy Saenz & Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +>>> cpuguy83_go-md2man_md2man-a65d4d2de4d5f7c74868dfa9b202a3c8be315aaa + +The MIT License (MIT) + +Copyright (c) 2014 Brian Goff + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +ADDITIONAL LICENSE INFORMATION: + +> BSD-2 + +go-md2man-a65d4d2de4d5f7c74868dfa9b202a3c8be315aaa.tar.gz\go-md2man-a65d4d2de4d5f7c74868dfa9b202a3c8be315aaa.tar\go-md2man-a65d4d2de4d5f7c74868dfa9b202a3c8be315aaa\vendor\github.com\russross\blackfriday\LICENSE.txt + +Copyright © 2011 Russ Ross +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following +disclaimer in the documentation and/or other materials provided with +the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +>>> d2g_dhcp4-f0e4d29ff0231dce36e250b2ed9ff08412584bca + +Copyright (c) 2013 Skagerrak Software Limited. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Skagerrak Software Limited nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +>>> deckarep_golang-set-1f0f4ff8d3fbef9328522993ce71c35890f67554 + +Open Source Initiative OSI - The MIT License (MIT):Licensing + +The MIT License (MIT) +Copyright (c) 2013 Ralph Caraveo (deckarep@gmail.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +>>> dustin_go-humanize-259d2a102b871d17f30e3cd9881a642961a1e486 + +Copyright (c) 2005-2008 Dustin Sallings + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + + +>>> gemnasium_logrus-airbrake-hook_v2-31e6fd4bd5a98d8ee7673d24bc54ec73c31810dd + +The MIT License (MIT) + +Copyright (c) 2015 Gemnasium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +>>> gizak_termui-798ffb9cbbe4073ef1f88e6069ca4a2c6aa6676b + +The MIT License (MIT) + +Copyright (c) 2015 Zack Guo + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +>>> go-check_check-20d25e2804050c1cd24a7eea1e7a6447dd0e74ec + +Gocheck - A rich testing framework for Go + +Copyright (c) 2010-2013 Gustavo Niemeyer + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +ADDITIONAL LICENSE INFORMATION: + +> BSD 3 + +check-20d25e2804050c1cd24a7eea1e7a6447dd0e74ec.tar.gz\check-20d25e2804050c1cd24a7eea1e7a6447dd0e74ec.tar\check-20d25e2804050c1cd24a7eea1e7a6447dd0e74ec\benchmark.go + + Copyright (c) 2012 The Go Authors. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +>>> go-martini/martini-22fa46961aabd2665cf3f1343b146d20028f5071 + +The MIT License (MIT) + +Copyright (c) 2015 Jeremy Saenz + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +>>> go-nfs-client-42fca177a36031d648551c751de1daf5f55dd4f0 + +Go-nfs-client version 0.1 + +Copyright © 2017 VMware, Inc. All rights reserved + +The BSD-2 license (the “License”) set forth below applies to all parts of the Go-nfs-client +project. You may not use this file except in compliance with the License. + +BSD-2 License + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +• Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +• Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +ADDITIONAL LICENSE INFORMATION: + +> Apache 2.0 + +go-nfs-client-42fca177a36031d648551c751de1daf5f55dd4f0.tar.gz\go-nfs-client-42fca177a36031d648551c751de1daf5f55dd4f0.tar\go-nfs-client-42fca177a36031d648551c751de1daf5f55dd4f0\nfs\util\log.go + + +Copyright © 2017 VMware, Inc. All Rights Reserved. +SPDX-License-Identifier: BSD-2-Clause + +Copyright 2016 VMware, Inc. All Rights Reserved. + +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. + +>>> godbus_dbus-230e4b23db2fd81c53eaa0073f76659d4849ce51 + +Copyright (c) 2013, Georg Reinke (), Google +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +>>> gogo_protobuf_gogoproto-6a92c871a8f5333cf106b2cdf937567208dbb2b7 + +Protocol Buffers for Go with Gadgets + +Copyright (c) 2013, The GoGo Authors. All rights reserved. +http:github.com/gogo/protobuf + +Go support for Protocol Buffers - Google's data interchange format + +Copyright 2010 The Go Authors. All rights reserved. +https:github.com/golang/protobuf + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +ADDITIONAL LICENSE INFORMATION: + +> BSD 2 + +protobuf-6a92c871a8f5333cf106b2cdf937567208dbb2b7.tar.gz\protobuf-6a92c871a8f5333cf106b2cdf937567208dbb2b7.tar\protobuf-6a92c871a8f5333cf106b2cdf937567208dbb2b7\vanity\test\proto3.proto + + Protocol Buffers for Go with Gadgets + + Copyright (c) 2015, The GoGo Authors. All rights reserved. + http:github.com/gogo/protobuf + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +>>> gogo_protobuf_proto-6a92c871a8f5333cf106b2cdf937567208dbb2b7 + +Protocol Buffers for Go with Gadgets + +Copyright (c) 2013, The GoGo Authors. All rights reserved. +http://github.com/gogo/protobuf + +Go support for Protocol Buffers - Google's data interchange format + +Copyright 2010 The Go Authors. All rights reserved. +https://github.com/golang/protobuf + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +ADDITIONAL LICENSE INFORMATION: + +> BSD-2 + +protobuf-6a92c871a8f5333cf106b2cdf937567208dbb2b7.tar.gz\protobuf-6a92c871a8f5333cf106b2cdf937567208dbb2b7.tar\protobuf-6a92c871a8f5333cf106b2cdf937567208dbb2b7\plugin\compare\compare.go + +Protocol Buffers for Go with Gadgets + +Copyright (c) 2013, The GoGo Authors. All rights reserved. +http:github.com/gogo/protobuf + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +>>> gogo_protobuf_protoc-gen-gogo_descriptor-6a92c871a8f5333cf106b2cdf937567208dbb2b7 + +Protocol Buffers for Go with Gadgets + +Copyright (c) 2013, The GoGo Authors. All rights reserved. +http:github.com/gogo/protobuf + +Go support for Protocol Buffers - Google's data interchange format + +Copyright 2010 The Go Authors. All rights reserved. +https:github.com/golang/protobuf + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. +* Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +ADDITIONAL LICENSE INFORMATION: + +> BSD-2 clause + +protobuf-6a92c871a8f5333cf106b2cdf937567208dbb2b7.tar.gz\protobuf-6a92c871a8f5333cf106b2cdf937567208dbb2b7.tar\protobuf-6a92c871a8f5333cf106b2cdf937567208dbb2b7\codec\codec.go + +Copyright (c) 2015, The GoGo Authors. All rights reserved. +http:github.com/gogo/protobuf + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +>>> gogo_protobuf_sortkeys-6a92c871a8f5333cf106b2cdf937567208dbb2b7 + +Protocol Buffers for Go with Gadgets + +Copyright (c) 2013, The GoGo Authors. All rights reserved. +http://github.com/gogo/protobuf + +Go support for Protocol Buffers - Google's data interchange format + +Copyright 2010 The Go Authors. All rights reserved. +https://github.com/golang/protobuf + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +ADDITIONAL LICNSE INFORMATION : + +> BSD-2 + +protobuf-6a92c871a8f5333cf106b2cdf937567208dbb2b7.tar.gz\protobuf-6a92c871a8f5333cf106b2cdf937567208dbb2b7.tar\protobuf-6a92c871a8f5333cf106b2cdf937567208dbb2b7\codec\codec.go + +Copyright (c) 2015, The GoGo Authors. All rights reserved. +http:github.com/gogo/protobuf + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +>>> gogo_protobuf_types-6a92c871a8f5333cf106b2cdf937567208dbb2b7 + +Protocol Buffers for Go with Gadgets + +Copyright (c) 2013, The GoGo Authors. All rights reserved. +http://github.com/gogo/protobuf + +Go support for Protocol Buffers - Google's data interchange format + +Copyright 2010 The Go Authors. All rights reserved. +https://github.com/golang/protobuf + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +ADDITIONAL LICENSE INFORMATION: + +> BSD-2 + +protobuf-6a92c871a8f5333cf106b2cdf937567208dbb2b7.tar.gz\protobuf-6a92c871a8f5333cf106b2cdf937567208dbb2b7.tar\protobuf-6a92c871a8f5333cf106b2cdf937567208dbb2b7\plugin\compare\compare.go + +Protocol Buffers for Go with Gadgets + +Copyright (c) 2013, The GoGo Authors. All rights reserved. +http:github.com/gogo/protobuf + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +>>> goji/param-d7f49fd7d1ed53fd562e737a8b5bbcc7e3d925e2 + +Copyright (c) 2014, 2015 Carl Jackson (carl@avtok.com) + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +>>> golang_lint-cb00e5669539f047b2f4c53a421a01b0c8e172c6 + +Copyright (c) 2013 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +>>> google_go-github_github-7a51fb928f52a196d5f31daefb8a489453ef54ff + +Copyright (c) 2013 The go-github AUTHORS. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +---------- + +Some documentation is taken from the GitHub Developer site +, which is available under the following Creative +Commons Attribution 3.0 License. This applies only to the go-github source +code and would not apply to any compiled binaries. + +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE +COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY +COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS +AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. + +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE +TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY +BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS +CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND +CONDITIONS. + +1. Definitions + + a. "Adaptation" means a work based upon the Work, or upon the Work and + other pre-existing works, such as a translation, adaptation, + derivative work, arrangement of music or other alterations of a + literary or artistic work, or phonogram or performance and includes + cinematographic adaptations or any other form in which the Work may be + recast, transformed, or adapted including in any form recognizably + derived from the original, except that a work that constitutes a + Collection will not be considered an Adaptation for the purpose of + this License. For the avoidance of doubt, where the Work is a musical + work, performance or phonogram, the synchronization of the Work in + timed-relation with a moving image ("synching") will be considered an + Adaptation for the purpose of this License. + b. "Collection" means a collection of literary or artistic works, such as + encyclopedias and anthologies, or performances, phonograms or + broadcasts, or other works or subject matter other than works listed + in Section 1(f) below, which, by reason of the selection and + arrangement of their contents, constitute intellectual creations, in + which the Work is included in its entirety in unmodified form along + with one or more other contributions, each constituting separate and + independent works in themselves, which together are assembled into a + collective whole. A work that constitutes a Collection will not be + considered an Adaptation (as defined above) for the purposes of this + License. + c. "Distribute" means to make available to the public the original and + copies of the Work or Adaptation, as appropriate, through sale or + other transfer of ownership. + d. "Licensor" means the individual, individuals, entity or entities that + offer(s) the Work under the terms of this License. + e. "Original Author" means, in the case of a literary or artistic work, + the individual, individuals, entity or entities who created the Work + or if no individual or entity can be identified, the publisher; and in + addition (i) in the case of a performance the actors, singers, + musicians, dancers, and other persons who act, sing, deliver, declaim, + play in, interpret or otherwise perform literary or artistic works or + expressions of folklore; (ii) in the case of a phonogram the producer + being the person or legal entity who first fixes the sounds of a + performance or other sounds; and, (iii) in the case of broadcasts, the + organization that transmits the broadcast. + f. "Work" means the literary and/or artistic work offered under the terms + of this License including without limitation any production in the + literary, scientific and artistic domain, whatever may be the mode or + form of its expression including digital form, such as a book, + pamphlet and other writing; a lecture, address, sermon or other work + of the same nature; a dramatic or dramatico-musical work; a + choreographic work or entertainment in dumb show; a musical + composition with or without words; a cinematographic work to which are + assimilated works expressed by a process analogous to cinematography; + a work of drawing, painting, architecture, sculpture, engraving or + lithography; a photographic work to which are assimilated works + expressed by a process analogous to photography; a work of applied + art; an illustration, map, plan, sketch or three-dimensional work + relative to geography, topography, architecture or science; a + performance; a broadcast; a phonogram; a compilation of data to the + extent it is protected as a copyrightable work; or a work performed by + a variety or circus performer to the extent it is not otherwise + considered a literary or artistic work. + g. "You" means an individual or entity exercising rights under this + License who has not previously violated the terms of this License with + respect to the Work, or who has received express permission from the + Licensor to exercise rights under this License despite a previous + violation. + h. "Publicly Perform" means to perform public recitations of the Work and + to communicate to the public those public recitations, by any means or + process, including by wire or wireless means or public digital + performances; to make available to the public Works in such a way that + members of the public may access these Works from a place and at a + place individually chosen by them; to perform the Work to the public + by any means or process and the communication to the public of the + performances of the Work, including by public digital performance; to + broadcast and rebroadcast the Work by any means including signs, + sounds or images. + i. "Reproduce" means to make copies of the Work by any means including + without limitation by sound or visual recordings and the right of + fixation and reproducing fixations of the Work, including storage of a + protected performance or phonogram in digital form or other electronic + medium. + +2. Fair Dealing Rights. Nothing in this License is intended to reduce, +limit, or restrict any uses free from copyright or rights arising from +limitations or exceptions that are provided for in connection with the +copyright protection under copyright law or other applicable laws. + +3. License Grant. Subject to the terms and conditions of this License, +Licensor hereby grants You a worldwide, royalty-free, non-exclusive, +perpetual (for the duration of the applicable copyright) license to +exercise the rights in the Work as stated below: + + a. to Reproduce the Work, to incorporate the Work into one or more + Collections, and to Reproduce the Work as incorporated in the + Collections; + b. to create and Reproduce Adaptations provided that any such Adaptation, + including any translation in any medium, takes reasonable steps to + clearly label, demarcate or otherwise identify that changes were made + to the original Work. For example, a translation could be marked "The + original work was translated from English to Spanish," or a + modification could indicate "The original work has been modified."; + c. to Distribute and Publicly Perform the Work including as incorporated + in Collections; and, + d. to Distribute and Publicly Perform Adaptations. + e. For the avoidance of doubt: + + i. Non-waivable Compulsory License Schemes. In those jurisdictions in + which the right to collect royalties through any statutory or + compulsory licensing scheme cannot be waived, the Licensor + reserves the exclusive right to collect such royalties for any + exercise by You of the rights granted under this License; + ii. Waivable Compulsory License Schemes. In those jurisdictions in + which the right to collect royalties through any statutory or + compulsory licensing scheme can be waived, the Licensor waives the + exclusive right to collect such royalties for any exercise by You + of the rights granted under this License; and, + iii. Voluntary License Schemes. The Licensor waives the right to + collect royalties, whether individually or, in the event that the + Licensor is a member of a collecting society that administers + voluntary licensing schemes, via that society, from any exercise + by You of the rights granted under this License. + +The above rights may be exercised in all media and formats whether now +known or hereafter devised. The above rights include the right to make +such modifications as are technically necessary to exercise the rights in +other media and formats. Subject to Section 8(f), all rights not expressly +granted by Licensor are hereby reserved. + +4. Restrictions. The license granted in Section 3 above is expressly made +subject to and limited by the following restrictions: + + a. You may Distribute or Publicly Perform the Work only under the terms + of this License. You must include a copy of, or the Uniform Resource + Identifier (URI) for, this License with every copy of the Work You + Distribute or Publicly Perform. You may not offer or impose any terms + on the Work that restrict the terms of this License or the ability of + the recipient of the Work to exercise the rights granted to that + recipient under the terms of the License. You may not sublicense the + Work. You must keep intact all notices that refer to this License and + to the disclaimer of warranties with every copy of the Work You + Distribute or Publicly Perform. When You Distribute or Publicly + Perform the Work, You may not impose any effective technological + measures on the Work that restrict the ability of a recipient of the + Work from You to exercise the rights granted to that recipient under + the terms of the License. This Section 4(a) applies to the Work as + incorporated in a Collection, but this does not require the Collection + apart from the Work itself to be made subject to the terms of this + License. If You create a Collection, upon notice from any Licensor You + must, to the extent practicable, remove from the Collection any credit + as required by Section 4(b), as requested. If You create an + Adaptation, upon notice from any Licensor You must, to the extent + practicable, remove from the Adaptation any credit as required by + Section 4(b), as requested. + b. If You Distribute, or Publicly Perform the Work or any Adaptations or + Collections, You must, unless a request has been made pursuant to + Section 4(a), keep intact all copyright notices for the Work and + provide, reasonable to the medium or means You are utilizing: (i) the + name of the Original Author (or pseudonym, if applicable) if supplied, + and/or if the Original Author and/or Licensor designate another party + or parties (e.g., a sponsor institute, publishing entity, journal) for + attribution ("Attribution Parties") in Licensor's copyright notice, + terms of service or by other reasonable means, the name of such party + or parties; (ii) the title of the Work if supplied; (iii) to the + extent reasonably practicable, the URI, if any, that Licensor + specifies to be associated with the Work, unless such URI does not + refer to the copyright notice or licensing information for the Work; + and (iv) , consistent with Section 3(b), in the case of an Adaptation, + a credit identifying the use of the Work in the Adaptation (e.g., + "French translation of the Work by Original Author," or "Screenplay + based on original Work by Original Author"). The credit required by + this Section 4 (b) may be implemented in any reasonable manner; + provided, however, that in the case of a Adaptation or Collection, at + a minimum such credit will appear, if a credit for all contributing + authors of the Adaptation or Collection appears, then as part of these + credits and in a manner at least as prominent as the credits for the + other contributing authors. For the avoidance of doubt, You may only + use the credit required by this Section for the purpose of attribution + in the manner set out above and, by exercising Your rights under this + License, You may not implicitly or explicitly assert or imply any + connection with, sponsorship or endorsement by the Original Author, + Licensor and/or Attribution Parties, as appropriate, of You or Your + use of the Work, without the separate, express prior written + permission of the Original Author, Licensor and/or Attribution + Parties. + c. Except as otherwise agreed in writing by the Licensor or as may be + otherwise permitted by applicable law, if You Reproduce, Distribute or + Publicly Perform the Work either by itself or as part of any + Adaptations or Collections, You must not distort, mutilate, modify or + take other derogatory action in relation to the Work which would be + prejudicial to the Original Author's honor or reputation. Licensor + agrees that in those jurisdictions (e.g. Japan), in which any exercise + of the right granted in Section 3(b) of this License (the right to + make Adaptations) would be deemed to be a distortion, mutilation, + modification or other derogatory action prejudicial to the Original + Author's honor and reputation, the Licensor will waive or not assert, + as appropriate, this Section, to the fullest extent permitted by the + applicable national law, to enable You to reasonably exercise Your + right under Section 3(b) of this License (right to make Adaptations) + but not otherwise. + +5. Representations, Warranties and Disclaimer + +UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR +OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY +KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, +INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, +FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF +LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, +WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION +OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. + +6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE +LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR +ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES +ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS +BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. Termination + + a. This License and the rights granted hereunder will terminate + automatically upon any breach by You of the terms of this License. + Individuals or entities who have received Adaptations or Collections + from You under this License, however, will not have their licenses + terminated provided such individuals or entities remain in full + compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will + survive any termination of this License. + b. Subject to the above terms and conditions, the license granted here is + perpetual (for the duration of the applicable copyright in the Work). + Notwithstanding the above, Licensor reserves the right to release the + Work under different license terms or to stop distributing the Work at + any time; provided, however that any such election will not serve to + withdraw this License (or any other license that has been, or is + required to be, granted under the terms of this License), and this + License will continue in full force and effect unless terminated as + stated above. + +8. Miscellaneous + + a. Each time You Distribute or Publicly Perform the Work or a Collection, + the Licensor offers to the recipient a license to the Work on the same + terms and conditions as the license granted to You under this License. + b. Each time You Distribute or Publicly Perform an Adaptation, Licensor + offers to the recipient a license to the original Work on the same + terms and conditions as the license granted to You under this License. + c. If any provision of this License is invalid or unenforceable under + applicable law, it shall not affect the validity or enforceability of + the remainder of the terms of this License, and without further action + by the parties to this agreement, such provision shall be reformed to + the minimum extent necessary to make such provision valid and + enforceable. + d. No term or provision of this License shall be deemed waived and no + breach consented to unless such waiver or consent shall be in writing + and signed by the party to be charged with such waiver or consent. + e. This License constitutes the entire agreement between the parties with + respect to the Work licensed here. There are no understandings, + agreements or representations with respect to the Work not specified + here. Licensor shall not be bound by any additional provisions that + may appear in any communication from You. This License may not be + modified without the mutual written agreement of the Licensor and You. + f. The rights granted under, and the subject matter referenced, in this + License were drafted utilizing the terminology of the Berne Convention + for the Protection of Literary and Artistic Works (as amended on + September 28, 1979), the Rome Convention of 1961, the WIPO Copyright + Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 + and the Universal Copyright Convention (as revised on July 24, 1971). + These rights and subject matter take effect in the relevant + jurisdiction in which the License terms are sought to be enforced + according to the corresponding provisions of the implementation of + those treaty provisions in the applicable national law. If the + standard suite of rights granted under applicable copyright law + includes additional rights not granted under this License, such + additional rights are deemed to be included in the License; this + License is not intended to restrict the license of any rights under + applicable law. + + +Creative Commons Notice + + Creative Commons is not a party to this License, and makes no warranty + whatsoever in connection with the Work. Creative Commons will not be + liable to You or any party on any legal theory for any damages + whatsoever, including without limitation any general, special, + incidental or consequential damages arising in connection to this + license. Notwithstanding the foregoing two (2) sentences, if Creative + Commons has expressly identified itself as the Licensor hereunder, it + shall have all rights and obligations of Licensor. + + Except for the limited purpose of indicating to the public that the + Work is licensed under the CCPL, Creative Commons does not authorize + the use by either party of the trademark "Creative Commons" or any + related trademark or logo of Creative Commons without the prior + written consent of Creative Commons. Any permitted use will be in + compliance with Creative Commons' then-current trademark usage + guidelines, as may be published on its website or otherwise made + available upon request from time to time. For the avoidance of doubt, + this trademark restriction does not form part of this License. + + Creative Commons may be contacted at http://creativecommons.org/. + +>>> google_go-querystring_query-53e6ce116135b80d037921a7fdd5138cf32d7a8a + +Copyright (c) 2013 Google. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +>>> google_uuid-f3f4b54b2fabcf1f11dcc939025bb0c109b00ed8 + +Copyright (c) 2009,2014 Google Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +ADDITIONAL LICENSE INFORMATION: + +> BSD Style + +uuid-f3f4b54b2fabcf1f11dcc939025bb0c109b00ed8.tar.gz\uuid-f3f4b54b2fabcf1f11dcc939025bb0c109b00ed8.tar\uuid-f3f4b54b2fabcf1f11dcc939025bb0c109b00ed8\dce.go + +Copyright 2016 Google Inc. All rights reserved. +Use of this source code is governed by a BSD-style +license that can be found in the LICENSE file. + +>>> googleapis_gax-go-da06d194a00e19ce00d9011a13931c3f6f6887c7 + +Copyright 2016, Google Inc. +All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. +* Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +>>> gorilla_context-1c83b3eabd45b6d76072b66b746c20815fb2872d + +Copyright (c) 2012 Rodrigo Moraes. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +>>> gorilla_mux-acf3be1b335c8ce30b2c8d51300984666f0ceefa + +Copyright (c) 2012 Rodrigo Moraes. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. +* Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +>>> gorilla_securecookie-fa5329f913702981df43dcb2a380bac429c810b5 + +Copyright (c) 2012 Rodrigo Moraes. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +>>> gorilla_sessions-ca9ada44574153444b00d3fd9c8559e4cc95f896 + +Copyright (c) 2012 Rodrigo Moraes. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +>>> gorilla_websocket-a91eba7f97777409bc2c443f5534d41dd20c5720 + +Copyright (c) 2013 The Gorilla WebSocket Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +>>> graylog2_go-gelf_gelf-master + +Copyright 2012 SocialCode + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +>>> grpc-b1a2821ca5a4fd6b6e48ddfbb7d6d7584d839d21 + +Copyright 2014, Google Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. +* Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the gRPC project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of gRPC, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of gRPC. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of gRPC or any code incorporated within this +implementation of gRPC constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of gRPC +shall terminate as of the date such litigation is filed. + +>>> hpcloud_tail-a30252cb686a21eb2d0b98132633053ec2f7f1e5 + +The MIT License (MIT) + +© Copyright 2015 Hewlett Packard Enterprise Development LP +Copyright (c) 2014 ActiveState + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +ADDITIONAL LICENSE INFORMATION: + +> BSD-3 clause + +tail-a30252cb686a21eb2d0b98132633053ec2f7f1e5.tar.gz\tail-a30252cb686a21eb2d0b98132633053ec2f7f1e5.tar\tail-a30252cb686a21eb2d0b98132633053ec2f7f1e5\vendor\gopkg.in\fsnotify.v1\LICENSE + +Copyright (c) 2012 The Go Authors. All rights reserved. +Copyright (c) 2012 fsnotify Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. +* Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +>>> jessevdk_go-flags-97448c91aac742cbca3d020b3e769013a420a06f + +Copyright (c) 2012 Jesse van den Kieboom. All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +>>> julienschmidt/httprouter-975b5c4c7c21c0e3d2764200bf2aa8e34657ae6e + +Copyright (c) 2013 Julien Schmidt. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: +Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +The names of the contributors may not be used to endorse or promote +products derived from this software without specific prior written +permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL JULIEN SCHMIDT BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +>>> justinas/alice-1051eaf52fcafdd87ead59d28b065f1fcb8274ec + +The MIT License (MIT) + +Copyright (c) 2014 Justinas Stankevicius + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +>>> kr_pty-f7ee69f31298ecbe5d2b349c711e2547a617d398 + +Copyright (c) 2011 Keith Rarick + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, +sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall +be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +>>> mailru_easyjson-99e922cf9de1bc0ab38310c277cff32c2147e747 + +Copyright (c) 2016 Mail.Ru Group + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +>>> martini-contrib/render-ec18f8345a1181146728238980606fb1d6f40e8c + +The MIT License (MIT) + +Copyright (c) 2013 Jeremy Saenz + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +>>> matryer_resync-d39c09a11215c84aab0b65e323fc47dd6e276af1 + +The MIT License (MIT) + +Copyright (c) 2016 Mat Ryer + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +>>> mattn_go-runewidth-14207d285c6c197daabb5c9793d63e7af9ab2d50 + +The MIT License (MIT) + +Copyright (c) 2016 Yasuhiro Matsumoto + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +>>> mdlayher/arp-7140e8e22da120cb3efc8e1096f299933624024e + +MIT License +=========== + +Copyright (C) 2015 Matt Layher + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +ADDITIONAL LICENSE INFORMATION: + +> BSD-3 Clause + +arp-master.zip\arp-master\client.go + +Copyright (c) 2012 The Go Authors. All rights reserved. +Source code in this file is based on src/net/interface_linux.go, +from the Go standard library. The Go license can be found here: +https://golang.org/LICENSE. + +>>> mdlayher/ethernet-e72cf8343052938936194daba1914fd1bb33d2fe + +MIT License +=========== + +Copyright (C) 2015 Matt Layher + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +>>> mdlayher/raw-c83864e487652c25edc58048eafdc1dfa2f142c7 + +MIT License +=========== + +Copyright (C) 2015 Matt Layher + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +ADDITIONAL LICENSE INFORMATION: + +> BSD- 3 Clause + +raw-master.zip\raw-master\raw.go + +Copyright (c) 2012 The Go Authors. All rights reserved. +Source code in this file is based on src/net/interface_linux.go, +from the Go standard library. The Go license can be found here: +https://golang.org/LICENSE. + +>>> microsoft_go-winio-24a3e3d3fc7451805e09d11e11e95d9a0a4f205e + +The MIT License (MIT) + +Copyright (c) 2015 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +ADDITIONAL LICENSE INFORMATION: + +> BSD-Style + +go-winio-24a3e3d3fc7451805e09d11e11e95d9a0a4f205e.tar.gz\go-winio-24a3e3d3fc7451805e09d11e11e95d9a0a4f205e.tar\go-winio-24a3e3d3fc7451805e09d11e11e95d9a0a4f205e\archive\tar\LICENSE + +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. +* Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +>>> microsoft_hcsshim-d327ca738085de7d617aa1df16d98fe7a64c2455 + +The MIT License (MIT) + +Copyright (c) 2015 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +>>> miekg_dns-ca336a1f95a6b89be9c250df26c7a41742eb4a6f + +Extensions of the original work are copyright (c) 2011 Miek Gieben + +As this is fork of the official Go code the same license applies: + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +>>> mitchellh_go-wordwrap-ad45545899c7b13c020ea92b2072220eefad42b8 + +The MIT License (MIT) + +Copyright (c) 2014 Mitchell Hashimoto + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +>>> mitchellh_mapstructure-5a0325d7fafaac12dda6e7fb8bd222ec1b69875e + +The MIT License (MIT) + +Copyright (c) 2013 Mitchell Hashimoto + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +>>> mreiferson_go-httpclient-31f0106b4474f14bc441575c19d3a5fa21aa1f6c + +The MIT License (MIT) + +Copyright (c) 2012 Matt Reiferson + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +>>> naoina_denco-9af2ba0e24214bac003821f4a501b131b2e04c75 + +Copyright (c) 2014 Naoya Inada + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +>>> nlopes_slack-f243c7602fdf906248fc1f165284daa4e4d2d09e + +Copyright (c) 2015, Norberto Lopes +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation and/or +other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +>>> nsf_termbox-go-91bae1bb5fa9ee504905ecbe7043fa30e92feaa3 + +Copyright (C) 2012 termbox-go authors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +>>> opennota_urlesc-5fa9ff0392746aeae1c4b37fcc42c65afa7a9587 + +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +>>> pkg_profile-8a808a6967b79da66deacfe508b26d398a69518f + +Copyright (c) 2013 Dave Cheney. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +>>> puerkitobio_purell-d69616f51cdfcd7514d6a380847a152dfc2a749d + +Copyright (c) 2012, Martin Angers +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +* Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +>>> racksec_srslog-a974ba6f7fb527d2ddc73ee9c05d3e2ccc0af0dc + +Copyright (c) 2015 Rackspace. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. +* Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +>>> rs/cors-8dd4211afb5d08dbb39a533b9bb9e4b486351df6 + +Copyright (c) 2014 Olivier Poitrey + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +>>> ryanuber_go-glob-256dc444b735e061061cf46c809487313d5b0065 + +The MIT License (MIT) + +Copyright (c) 2014 Ryan Uber + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +>>> sirupsen_logrus-d26492970760ca5d33129d2d799e34be5c4782eb + +The MIT License (MIT) + +Copyright (c) 2014 Simon Eskildsen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +ADDITIONAL LICENSE INFORMATION: + +>BSD – Style + +logrus-master.zip\logrus-master\terminal_notwindows.go + +Copyright 2011 The Go Authors. All rights reserved. +Use of this source code is governed by a BSD-style +license that can be found in the LICENSE file. + +>>> smartystreets_assertions-287b4346dc4e71a038c346375a9d572453bc469b + +Copyright (c) 2015 SmartyStreets, LLC + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +NOTE: Various optional and subordinate components carry their own licensing +requirements and restrictions. Use of those components is subject to the terms +and conditions outlined the respective license of each component. + +ADDITIONAL LICENSE INFORMATION: + +> Apache 2.0 + +assertions-287b4346dc4e71a038c346375a9d572453bc469b.tar.gz\assertions-287b4346dc4e71a038c346375a9d572453bc469b.tar\assertions-287b4346dc4e71a038c346375a9d572453bc469b\internal\reqtrace\reqtrace.go + + Copyright 2015 Google Inc. All Rights Reserved. + + 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. + +> BSD 3 + +assertions-287b4346dc4e71a038c346375a9d572453bc469b.tar.gz\assertions-287b4346dc4e71a038c346375a9d572453bc469b.tar\assertions-287b4346dc4e71a038c346375a9d572453bc469b\internal\go-render\LICENSE + + Copyright (c) 2015 The Chromium Authors. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +>>> smartystreets_assertions_internal_oglematchers-287b4346dc4e71a038c346375a9d572453bc469b + +Copyright (c) 2015 SmartyStreets, LLC + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +NOTE: Various optional and subordinate components carry their own licensing +requirements and restrictions. Use of those components is subject to the terms +and conditions outlined the respective license of each component. + + +ADDITIONAL LICENSE INFORMATION: + +> Apache 2.0 + +assertions-287b4346dc4e71a038c346375a9d572453bc469b.tar.gz\assertions-287b4346dc4e71a038c346375a9d572453bc469b.tar\assertions-287b4346dc4e71a038c346375a9d572453bc469b\internal\reqtrace\reqtrace.go + +Copyright 2015 Google Inc. All Rights Reserved. + +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. + + +> BSD-3 + +assertions-287b4346dc4e71a038c346375a9d572453bc469b.tar.gz\assertions-287b4346dc4e71a038c346375a9d572453bc469b.tar\assertions-287b4346dc4e71a038c346375a9d572453bc469b\internal\go-render\LICENSE + +Copyright (c) 2015 The Chromium Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. +* Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +>>> smartystreets_assertions_internal_oglemock-287b4346dc4e71a038c346375a9d572453bc469b + +Copyright (c) 2015 SmartyStreets, LLC + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +NOTE: Various optional and subordinate components carry their own licensing +requirements and restrictions. Use of those components is subject to the terms +and conditions outlined the respective license of each component. + + +ADDITIONAL LICENSE INFORMATION: + +> BSD-3 Clause + +assertions-287b4346dc4e71a038c346375a9d572453bc469b.tar.gz\assertions-287b4346dc4e71a038c346375a9d572453bc469b.tar\assertions-287b4346dc4e71a038c346375a9d572453bc469b\internal\go-render\LICENSE + + +Copyright (c) 2015 The Chromium Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. +* Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +> Apache 2.0 + +assertions-287b4346dc4e71a038c346375a9d572453bc469b.tar.gz\assertions-287b4346dc4e71a038c346375a9d572453bc469b.tar\assertions-287b4346dc4e71a038c346375a9d572453bc469b\internal\oglematchers\all_of.go + +Copyright 2011 Aaron Jacobs. All Rights Reserved. +Author: aaronjjacobs@gmail.com (Aaron Jacobs) + +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. + +>>> smartystreets_assertions_internal_ogletest-287b4346dc4e71a038c346375a9d572453bc469b + +Copyright (c) 2015 SmartyStreets, LLC + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +NOTE: Various optional and subordinate components carry their own licensing +requirements and restrictions. Use of those components is subject to the terms +and conditions outlined the respective license of each component. + + +ADDITIONAL LICENSE INFORMATION: + +> Apache 2.0 + +assertions-287b4346dc4e71a038c346375a9d572453bc469b.tar.gz\assertions-287b4346dc4e71a038c346375a9d572453bc469b.tar\assertions-287b4346dc4e71a038c346375a9d572453bc469b\internal\reqtrace\reqtrace.go + +Copyright 2015 Google Inc. All Rights Reserved. + +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. + + +> BSD-3 + +assertions-287b4346dc4e71a038c346375a9d572453bc469b.tar.gz\assertions-287b4346dc4e71a038c346375a9d572453bc469b.tar\assertions-287b4346dc4e71a038c346375a9d572453bc469b\internal\go-render\LICENSE + +Copyright (c) 2015 The Chromium Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. +* Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +>>> smartystreets_assertions_internal_reqtrace-287b4346dc4e71a038c346375a9d572453bc469b + +Copyright (c) 2015 SmartyStreets, LLC + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +NOTE: Various optional and subordinate components carry their own licensing +requirements and restrictions. Use of those components is subject to the terms +and conditions outlined the respective license of each component. + + +ADDITIONAL LICENSE INFORMATION: + +> BSD-3 + +assertions-287b4346dc4e71a038c346375a9d572453bc469b.tar.gz\assertions-287b4346dc4e71a038c346375a9d572453bc469b.tar\assertions-287b4346dc4e71a038c346375a9d572453bc469b\internal\go-render\LICENSE + +Copyright (c) 2015 The Chromium Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. +* Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +> Apache 2.0 + +assertions-287b4346dc4e71a038c346375a9d572453bc469b.tar.gz\assertions-287b4346dc4e71a038c346375a9d572453bc469b.tar\assertions-287b4346dc4e71a038c346375a9d572453bc469b\internal\oglematchers\transform_description.go + +Copyright 2011 Aaron Jacobs. All Rights Reserved. +Author: aaronjjacobs@gmail.com (Aaron Jacobs) + +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. + +>>> stretchr_objx-1a9d0bb9f541897e62256577b352fdbc1fb4fd94 + +objx - by Mat Ryer and Tyler Bunnell + +The MIT License (MIT) + +Copyright (c) 2014 Stretchr, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +>>> tomb_v1-dd632973f1e7218eb1089048e0798ec9ae7dceb8 + +tomb - support for clean goroutine termination in Go. + +Copyright (c) 2010-2011 - Gustavo Niemeyer + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +>>> tylerb/graceful.v1-4654dfbb6ad53cb5e27f37d99b02e16c1872fbbb + +The MIT License (MIT) + +Copyright (c) 2014 Tyler Bunnell + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +ADDITIONAL LICENSE INFORMATION: + +> Apache 2.0 + +graceful-1.2.15.zip\graceful-1.2.15\limit_listen.go + + +Copyright 2013 The etcd Authors + +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. + +>>> tylerb_graceful-d7d7a205e779a4738d38eda0671fff8bfc965f14 + +The MIT License (MIT) + +Copyright (c) 2014 Tyler Bunnell + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +ADDITIONAL LICENSE INFORMATION: + + + +> Apache 2.0 + + +graceful-d7d7a205e779a4738d38eda0671fff8bfc965f14.tar.gz\graceful-d7d7a205e779a4738d38eda0671fff8bfc965f14.tar\graceful-d7d7a205e779a4738d38eda0671fff8bfc965f14\limit_listen.go + + +Copyright 2013 The etcd Authors + +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. + +>>> ugorji_go_codec-708a42d246822952f38190a8d8c4e6b16a0e600c + +The MIT License (MIT) + +Copyright (c) 2012-2015 Ugorji Nwoke. +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +>>> urfave/negroni-ccc4a14984828dcb944e6f17fa4a967b18624f2b + +The MIT License (MIT) + +Copyright (c) 2014 Jeremy Saenz + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +>>> urfave_cli_v1-0bdeddeeb0f650497d603c4ad7b20cfe685682f6 + +MIT License + +Copyright (c) 2016 Jeremy Saenz & Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +>>> x_crypto_acme-728b753d0135da6801d45a38e6f43ff55779c5c2 + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. +* Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. + +ADDITIONAL LICENSE INFORMATION: + +> MIT + +crypto-728b753d0135da6801d45a38e6f43ff55779c5c2.tar.gz\crypto-728b753d0135da6801d45a38e6f43ff55779c5c2.tar\crypto-728b753d0135da6801d45a38e6f43ff55779c5c2\pkcs12\internal\rc2\rc2.go + +This code is licensed under the MIT license. + +>>> x_crypto_curve25519-728b753d0135da6801d45a38e6f43ff55779c5c2 + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. + + +ADDITIONAL LICENSE INFORMATION: + +> Public Domain + +crypto-728b753d0135da6801d45a38e6f43ff55779c5c2.tar.gz\crypto-728b753d0135da6801d45a38e6f43ff55779c5c2.tar\crypto-728b753d0135da6801d45a38e6f43ff55779c5c2\curve25519\square_amd64.s + +This code was translated into a form compatible with 6a from the public +domain sources in SUPERCOP: http://bench.cr.yp.to/supercop.html + + +> MIT + +crypto-728b753d0135da6801d45a38e6f43ff55779c5c2.tar.gz\crypto-728b753d0135da6801d45a38e6f43ff55779c5c2.tar\crypto-728b753d0135da6801d45a38e6f43ff55779c5c2\pkcs12\internal\rc2\rc2.go + +https://www.ietf.org/rfc/rfc2268.txt +http://people.csail.mit.edu/rivest/pubs/KRRR98.pdf + +This code is licensed under the MIT license. + +>>> x_crypto_ed25519-728b753d0135da6801d45a38e6f43ff55779c5c2 + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. +* Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. + +ADDITIONAL LICENSE INFORMATION: + +> MIT + +crypto-728b753d0135da6801d45a38e6f43ff55779c5c2.tar.gz\crypto-728b753d0135da6801d45a38e6f43ff55779c5c2.tar\crypto-728b753d0135da6801d45a38e6f43ff55779c5c2\pkcs12\internal\rc2\rc2.go + +This code is licensed under the MIT license. + + +> PUBLIC DOMAIN + +crypto-728b753d0135da6801d45a38e6f43ff55779c5c2.tar.gz\crypto-728b753d0135da6801d45a38e6f43ff55779c5c2.tar\crypto-728b753d0135da6801d45a38e6f43ff55779c5c2\twofish\twofish.go + +This code is a port of the LibTom C implementation. +See http://libtom.org/?page=features&newsitems=5&whatfile=crypt. +LibTomCrypt is free for all purposes under the public domain. +It was heavily inspired by the go blowfish package. + +>>> x_crypto_nacl_secretbox-728b753d0135da6801d45a38e6f43ff55779c5c2 + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. +* Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. + +ADDITIONAL LICENSE INFORMATION: + +> MIT + +crypto-728b753d0135da6801d45a38e6f43ff55779c5c2.tar.gz\crypto-728b753d0135da6801d45a38e6f43ff55779c5c2.tar\crypto-728b753d0135da6801d45a38e6f43ff55779c5c2\pkcs12\internal\rc2\rc2.go + +This code is licensed under the MIT license. + +>>> x_crypto_poly1305-728b753d0135da6801d45a38e6f43ff55779c5c2 + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. + + +ADDITIONAL LICENSE INFORMATION: + +> Public Domain + +crypto-728b753d0135da6801d45a38e6f43ff55779c5c2.tar.gz\crypto-728b753d0135da6801d45a38e6f43ff55779c5c2.tar\crypto-728b753d0135da6801d45a38e6f43ff55779c5c2\curve25519\square_amd64.s + +This code was translated into a form compatible with 6a from the public +domain sources in SUPERCOP: http://bench.cr.yp.to/supercop.html + + +> MIT + +crypto-728b753d0135da6801d45a38e6f43ff55779c5c2.tar.gz\crypto-728b753d0135da6801d45a38e6f43ff55779c5c2.tar\crypto-728b753d0135da6801d45a38e6f43ff55779c5c2\pkcs12\internal\rc2\rc2.go + +https://www.ietf.org/rfc/rfc2268.txt +http://people.csail.mit.edu/rivest/pubs/KRRR98.pdf + +This code is licensed under the MIT license. + +>>> x_crypto_salsa20_salsa-728b753d0135da6801d45a38e6f43ff55779c5c2 + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. + + + +ADDITIONAL LICENSE INFORMATION: + + +> Public Domain + +crypto-728b753d0135da6801d45a38e6f43ff55779c5c2.tar.gz\crypto-728b753d0135da6801d45a38e6f43ff55779c5c2.tar\crypto-728b753d0135da6801d45a38e6f43ff55779c5c2\ed25519\internal\edwards25519\const.go + + +These values are from the public domain + +>>> x_crypto_ssh-728b753d0135da6801d45a38e6f43ff55779c5c2 + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. + + +ADDITIONAL LICENSE INFORMATION: + +> Public Domain + +crypto-728b753d0135da6801d45a38e6f43ff55779c5c2.tar.gz\crypto-728b753d0135da6801d45a38e6f43ff55779c5c2.tar\crypto-728b753d0135da6801d45a38e6f43ff55779c5c2\curve25519\square_amd64.s + +This code was translated into a form compatible with 6a from the public +domain sources in SUPERCOP: http://bench.cr.yp.to/supercop.html + + +> MIT + +crypto-728b753d0135da6801d45a38e6f43ff55779c5c2.tar.gz\crypto-728b753d0135da6801d45a38e6f43ff55779c5c2.tar\crypto-728b753d0135da6801d45a38e6f43ff55779c5c2\pkcs12\internal\rc2\rc2.go + +https://www.ietf.org/rfc/rfc2268.txt +http://people.csail.mit.edu/rivest/pubs/KRRR98.pdf + +This code is licensed under the MIT license. + +>>> x_net_context-a6577fac2d73be281a500b310739095313165611 + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. + + + +ADDITIONAL LICENSE INFORMATION: + + +> BSD 2 Clause + +net-a6577fac2d73be281a500b310739095313165611.tar.gz\net-a6577fac2d73be281a500b310739095313165611.tar\net-a6577fac2d73be281a500b310739095313165611\html\testdata\webkit\README + + +The *.dat files in this directory are copied from The WebKit Open Source +Project, specifically $WEBKITROOT/LayoutTests/html5lib/resources. +WebKit is licensed under a BSD style license. +http://webkit.org/coding/bsd-license.html says: + +Copyright (C) 2009 Apple Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS "AS IS" AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +>>> x_net_http2-a6577fac2d73be281a500b310739095313165611 + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. + + + +ADDITIONAL LICENSE INFORMATION: + +> BSD2 + +net-a6577fac2d73be281a500b310739095313165611.tar.gz\net-a6577fac2d73be281a500b310739095313165611.tar\net-a6577fac2d73be281a500b310739095313165611\html\testdata\webkit\README + +Copyright (C) 2009 Apple Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS "AS IS" AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +>>> x_net_idna-a6577fac2d73be281a500b310739095313165611 + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. +* Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. + +ADDITIONAL LICENSE INFORMATION: + +> W3C 3-clause BSD License + +net-a6577fac2d73be281a500b310739095313165611.tar.gz\net-a6577fac2d73be281a500b310739095313165611.tar\net-a6577fac2d73be281a500b310739095313165611\html\charset\testdata\README + +[PLEASE NOTE: VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE W3C 3-clause BSD License. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] + +These test cases come from +http://www.w3.org/International/tests/repository/html5/the-input-byte-stream/results-basics + +Distributed under both the W3C Test Suite License +(http://www.w3.org/Consortium/Legal/2008/04-testsuite-license) +and the W3C 3-clause BSD License +(http://www.w3.org/Consortium/Legal/2008/03-bsd-license). +To contribute to a W3C Test Suite, see the policies and contribution +forms (http://www.w3.org/2004/10/27-testcases). + +> BSD-2 clause + +net-a6577fac2d73be281a500b310739095313165611.tar.gz\net-a6577fac2d73be281a500b310739095313165611.tar\net-a6577fac2d73be281a500b310739095313165611\html\testdata\webkit\README + +The *.dat files in this directory are copied from The WebKit Open Source +Project, specifically $WEBKITROOT/LayoutTests/html5lib/resources. +WebKit is licensed under a BSD style license. +http://webkit.org/coding/bsd-license.html says: + +Copyright (C) 2009 Apple Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS "AS IS" AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +>>> x_net_internal_timeseries-a6577fac2d73be281a500b310739095313165611 + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. + + +ADDITIONAL LICENSE INFORMATION: + +> BSD-2 + +net-a6577fac2d73be281a500b310739095313165611.tar.gz\net-a6577fac2d73be281a500b310739095313165611.tar\net-a6577fac2d73be281a500b310739095313165611\html\testdata\webkit\README + +The *.dat files in this directory are copied from The WebKit Open Source +Project, specifically $WEBKITROOT/LayoutTests/html5lib/resources. +WebKit is licensed under a BSD style license. +http://webkit.org/coding/bsd-license.html says: + +Copyright (C) 2009 Apple Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS "AS IS" AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +>>> x_net_lex_httplex-a6577fac2d73be281a500b310739095313165611 + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. + +>>> x_net_proxy-a6577fac2d73be281a500b310739095313165611 + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. + + + +ADDITIONAL LICENSE INFORMATION: + +> BSD-2 + +net-a6577fac2d73be281a500b310739095313165611.tar.gz\net-a6577fac2d73be281a500b310739095313165611.tar\net-a6577fac2d73be281a500b310739095313165611\html\testdata\webkit\README + +The *.dat files in this directory are copied from The WebKit Open Source +Project, specifically $WEBKITROOT/LayoutTests/html5lib/resources. +WebKit is licensed under a BSD style license. +http://webkit.org/coding/bsd-license.html says: + +Copyright (C) 2009 Apple Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS "AS IS" AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +>>> x_net_trace-a6577fac2d73be281a500b310739095313165611 + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. + +>>> x_net_websocket-a6577fac2d73be281a500b310739095313165611 + +License: BSD-3 clause with Google Patents + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. + +ADDITIONAL LICENSE INFORMATION: + +> BSD-2 clause + +net-a6577fac2d73be281a500b310739095313165611.tar.gz\net-a6577fac2d73be281a500b310739095313165611.tar\net-a6577fac2d73be281a500b310739095313165611\html\testdata\webkit\README + +Copyright (C) 2009 Apple Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS "AS IS" AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +>>> x_oauth2-1611bb46e67abc64a71ecc5c3ae67f1cbbc2b921 + +Copyright (c) 2009 The oauth2 Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +>>> x_sync_singleflight-5a06fca2c336a4b2b2fcb45702e8c47621b2aa2c + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. + +>>> x_sys_unix-99f16d856c9836c42d24e7ab64ea72916925fa97 + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. +* Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. + +>>> x_sys_windows-99f16d856c9836c42d24e7ab64ea72916925fa97 + +License: BSD-3 clause with Google Patents + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. +* Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. + +>>> x_text_internal-f28f36722d5ef2f9655ad3de1f248e3e52ad5ebd + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. + +>>> x_text_language-f28f36722d5ef2f9655ad3de1f248e3e52ad5ebd + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. + +>>> x_text_message-f28f36722d5ef2f9655ad3de1f248e3e52ad5ebd + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. +* Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. + +>>> x_tools_go_ast_astutil-381149a2d6e5d8f319ccf04bfefc71e03a78b868 + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. + + + +ADDITIONAL LICENSE INFORMATION: + +> MIT + +tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868.tar.gz\tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868.tar\tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868\cmd\goyacc\yacc.go + + Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved. + Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net) + Portions Copyright © 1997-1999 Vita Nuova Limited + Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com) + Portions Copyright © 2004,2006 Bruce Ellis + Portions Copyright © 2005-2007 C H Forsyth (forsyth@terzarima.net) + Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others + Portions Copyright © 2009 The Go Authors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +> MIT + +tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868.tar.gz\tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868.tar\tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868\godoc\static\jquery.treeview.js + +[PLEASE NOTE: VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE MIT LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] + +Copyright (c) 2007 Jörn Zaefferer + +Dual licensed under the MIT and GPL licenses: +http://www.opensource.org/licenses/mit-license.php +http://www.gnu.org/licenses/gpl.html + + +> Apache 2.0 + +tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868.tar.gz\tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868.tar\tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868\third_party\typescript\typescript.js + +Copyright (c) Microsoft Corporation. All rights reserved. +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 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. + +>>> x_tools_go_buildutil-381149a2d6e5d8f319ccf04bfefc71e03a78b868 + +License: BSD-3 clause with Google Patents + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. + +ADDITIONAL LICENSE INFORMATION: + +> MIT + +tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868.tar.gz\tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868.tar\tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868\third_party\moduleloader\ + +Copyright (c) 2013-2016 Guy Bedford, Luke Hoban, Addy Osmani + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +> Apache 2.0 + +tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868.tar.gz\tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868.tar\tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868\third_party\typescript\typescript.js + +Copyright (c) Microsoft Corporation. All rights reserved. +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 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. + +>>> x_tools_go_gcexportdata-381149a2d6e5d8f319ccf04bfefc71e03a78b868 + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. + + + +ADDITIONAL LICENSE INFORMATION: + +> MIT + +tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868.tar.gz\tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868.tar\tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868\cmd\goyacc\yacc.go + + Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved. + Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net) + Portions Copyright © 1997-1999 Vita Nuova Limited + Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com) + Portions Copyright © 2004,2006 Bruce Ellis + Portions Copyright © 2005-2007 C H Forsyth (forsyth@terzarima.net) + Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others + Portions Copyright © 2009 The Go Authors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +> MIT + +tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868.tar.gz\tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868.tar\tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868\godoc\static\jquery.treeview.js + +[PLEASE NOTE: VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE MIT LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] + +Copyright (c) 2007 Jörn Zaefferer + +Dual licensed under the MIT and GPL licenses: +http://www.opensource.org/licenses/mit-license.php +http://www.gnu.org/licenses/gpl.html + + +> Apache 2.0 + +tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868.tar.gz\tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868.tar\tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868\third_party\typescript\typescript.js + +Copyright (c) Microsoft Corporation. All rights reserved. +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 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. + +>>> x_tools_go_gcimporter15-381149a2d6e5d8f319ccf04bfefc71e03a78b868 + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. +* Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. + + +> MIT + + +tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868.tar.gz\tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868.tar\tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868\cmd\goyacc\yacc.go + + +Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved. +Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net) +Portions Copyright © 1997-1999 Vita Nuova Limited +Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com) +Portions Copyright © 2004,2006 Bruce Ellis +Portions Copyright © 2005-2007 C H Forsyth (forsyth@terzarima.net) +Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others +Portions Copyright © 2009 The Go Authors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +> CC Attribution 3.0 + + +tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868.tar.gz\tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868.tar\tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868\cmd\present\templates\dir.tmpl + + +Except as noted, +the content of this page is licensed under the +Creative Commons Attribution 3.0 License, +and code is licensed under a BSD license.
    +Terms of Service | +Privacy Policy + + + +> BSD + +tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868.tar.gz\tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868.tar\tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868\cmd\present\templates\dir.tmpl + +code is licensed under a BSD license.
    +Terms of Service | +Privacy Policy + + + +> Apache 2.0 + + +tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868.tar.gz\tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868.tar\tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868\godoc\short\short.go + + +Copyright 2015 The Go Authors. All rights reserved. +Use of this source code is governed by the Apache 2.0 +license that can be found in the LICENSE file. + ++build appengine + +Package short implements a simple URL shortener, serving an administrative +interface at /s and shortened urls from /s/key. +It is designed to run only on the instance of godoc that serves golang.org. +package short + + +> MIT + + +tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868.tar.gz\tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868.tar\tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868\godoc\static\jquery.treeview.js + +[PLEASE NOTE: VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE MIT LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] + + +Copyright (c) 2007 Jörn Zaefferer + +Dual licensed under the MIT and GPL licenses: +http://www.opensource.org/licenses/mit-license.php +http://www.gnu.org/licenses/gpl.html + +>>> x_tools_go_loader-381149a2d6e5d8f319ccf04bfefc71e03a78b868 + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. + + + +ADDITIONAL LICENSE INFORMATION: + +> MIT + +tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868.tar.gz\tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868.tar\tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868\cmd\goyacc\yacc.go + + Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved. + Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net) + Portions Copyright © 1997-1999 Vita Nuova Limited + Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com) + Portions Copyright © 2004,2006 Bruce Ellis + Portions Copyright © 2005-2007 C H Forsyth (forsyth@terzarima.net) + Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others + Portions Copyright © 2009 The Go Authors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +> MIT + +tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868.tar.gz\tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868.tar\tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868\godoc\static\jquery.treeview.js + +[PLEASE NOTE: VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE MIT LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] + +Copyright (c) 2007 Jörn Zaefferer + +Dual licensed under the MIT and GPL licenses: +http://www.opensource.org/licenses/mit-license.php +http://www.gnu.org/licenses/gpl.html + + +> Apache 2.0 + +tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868.tar.gz\tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868.tar\tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868\third_party\typescript\typescript.js + +Copyright (c) Microsoft Corporation. All rights reserved. +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 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. + +>>> x_tools_imports-381149a2d6e5d8f319ccf04bfefc71e03a78b868 + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. + +ADDITIONAL LICENSE INFORMATION: + + +> Apache 2.0 + +tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868.tar.gz\tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868.tar\tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868\third_party\typescript\typescript.js + +Copyright (c) Microsoft Corporation. All rights reserved. +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 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. + +> MIT + +tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868.tar.gz\tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868.tar\tools-381149a2d6e5d8f319ccf04bfefc71e03a78b868\third_party\moduleloader\LICENSE + +Copyright (c) 2013-2016 Guy Bedford, Luke Hoban, Addy Osmani + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +>>> zenazn/goji-c05078ca81941f8e801bba3ddc0e6b86b7fdc893 + +Copyright (c) 2014, 2015, 2016 Carl Jackson (carl@avtok.com) + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------- SECTION 3: Mozilla Public License, V2.0 ---------- + +Mozilla Public License, V2.0 is applicable to the following component(s). + + +>>> d2g_dhcp4client-master + +LICENSE: MPL 2.0 + +>>> hashicorp_go-cleanhttp-875fb671b3ddc66f8e2f0acc33829c8cb989a38d + +LICENSE: MPL 2.0 + +>>> hashicorp_memberlist-cef12ad58224d55cf26caa9e3d239c2fcb3432a2 + +License: MPL 2.0 + +====================PART 2. VIRTUAL APPLIANCE: OPERATING SYSTEM LAYER ==================== + + +--------------- SECTION 1: Academic Free License, V2.1 ---------- + +Academic Free License, V2.1 is applicable to the following component(s). + + +>>> dbus-1.11.12-1.ph2 + +[PLEASE NOTE: VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE AFL 2.1 LICENSE. PLEASE SEE APPENDIX FOR THE FULL TEXT OF THE AFL 2.1 LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] + +D-Bus is licensed to you under your choice of the Academic Free +License version 2.1, or the GNU General Public License version 2 +(or, at your option any later version). + +Both licenses are included here. Some of the standalone binaries are +under the GPL only; in particular, but not limited to, +tools/dbus-cleanup-sockets.c and test/decode-gcov.c. Each source code +file is marked with the proper copyright information - if you find a +file that isn't marked please bring it to our attention. + + +ADDITIONAL LICENSE INFORMATION: + +> BSD-3 + +dbus-1.11.12.tar.gz\dbus-1.11.12.tar\dbus-1.11.12\cmake\modules\COPYING-CMAKE-SCRIPTS + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +> Sun Microsystems License (MIT-Style) + +dbus-1.11.12.tar.gz\dbus-1.11.12.tar\dbus-1.11.12\dbus\dbus-hash.c + +Copyright (c) 1991-1993 The Regents of the University of California. +Copyright (c) 1994 Sun Microsystems, Inc. + +This software is copyrighted by the Regents of the University of +California, Sun Microsystems, Inc., Scriptics Corporation, and +other parties. The following terms apply to all files associated +with the software unless explicitly disclaimed in individual files. + +The authors hereby grant permission to use, copy, modify, +distribute, and license this software and its documentation for any +purpose, provided that existing copyright notices are retained in +all copies and that this notice is included verbatim in any +distributions. No written agreement, license, or royalty fee is +required for any of the authorized uses. Modifications to this +software may be copyrighted by their authors and need not follow +the licensing terms described here, provided that the new terms are +clearly indicated on the first page of each file where they apply. + +IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY +PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, +OR ANY DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. + +THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND +NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, +AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE +MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + +GOVERNMENT USE: If you are acquiring this software on behalf of the +U.S. government, the Government shall have only "Restricted Rights" +in the software and related documentation as defined in the Federal +Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you +are acquiring the software on behalf of the Department of Defense, +the software shall be classified as "Commercial Computer Software" +and the Government shall have only "Restricted Rights" as defined +in Clause 252.227-7013 (c) (1) of DFARs. Notwithstanding the +foregoing, the authors grant the U.S. Government and others acting +in its behalf permission to use and distribute the software in +accordance with the terms specified in this license. + + +> MIT + +dbus-1.11.12.tar.gz\dbus-1.11.12.tar\dbus-1.11.12\dbus\dbus-server-launchd.c + +Copyright (C) 2007, Tanner Lovelace +Copyright (C) 2008, Colin Walters +Copyright (C) 2008-2009, Benjamin Reed +Copyright (C) 2009, Jonas Bähr + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, copy, +modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + + +> GPL 2.0 + +dbus-1.11.12.tar.gz\dbus-1.11.12.tar\dbus-1.11.12\doc\introspect.dtd + +[PLEASE NOTE: VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE GPL 2.0 LICENSE. PLEASE SEE APPENDIX FOR THE FULL TEXT OF THE GPL 2.0 LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] + +(C) 2005-02-02 David A. Wheeler; released under the D-Bus licenses, +GNU GPL version 2 (or greater) and AFL 1.1 (or greater) + + +> LGPL 3.0 + +dbus-1.11.12.tar.gz\dbus-1.11.12.tar\dbus-1.11.12\tools\dbus-cleanup-sockets.c + +Copyright (C) 2003 Red Hat, Inc. +Copyright (C) 2002 Michael Meeks + +Note that this file is NOT licensed under the Academic Free License, +as it is based on linc-cleanup-sockets which is LGPL. + + +> GPL 2.0 + +dbus-1.11.12.tar.gz\dbus-1.11.12.tar\dbus-1.11.12\tools\dbus-echo.c + +Copyright © 2003 Philip Blundell +Copyright © 2011 Nokia Corporation +Copyright © 2014 Collabora Ltd. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--------------- SECTION 2: Apache License, V2.0 ---------- + +Apache License, V2.0 is applicable to the following component(s). + + +>>> photon-release-2.0-2.ph2 + +License: Apache License + +--------------- SECTION 3: BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES ---------- + +BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES are applicable to the following component(s). + + +>>> bzip2-1.0.6-8.ph2 + +This program, "bzip2", the associated library "libbzip2", and all +documentation, are copyright (C) 1996-2010 Julian R Seward. All +rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +2. The origin of this software must not be misrepresented; you must +not claim that you wrote the original software. If you use this +software in a product, an acknowledgment in the product +documentation would be appreciated but is not required. + +3. Altered source versions must be plainly marked as such, and must +not be misrepresented as being the original software. + +4. The name of the author may not be used to endorse or promote +products derived from this software without specific prior written +permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Julian Seward, jseward@bzip.org +bzip2/libbzip2 version 1.0.6 of 6 September 2010 + +ADDITIONAL LICENSE INFORMATION : + +> GPL 3.0 + +bzip2_1.0.6-1.debian.tar.bz2\bzip2_1.0.6-1.debian.tar\debian\copyright.in + +This package (bzip2) was created by Philippe Troin . +It is currently mantained by Anibal Monsalve Salazar . +This package is Copyright (C) 1999, 2000, 2001, 2002 Philippe Troin + and Copyright (C) 2004-2007 Anibal Monsalve Salazar. +It is licensed under the GNU General Public License which can be +found in /usr/share/common-licenses/GPL. + +It was downloaded from +http://www.bzip.org/downloads.html + +For more information about bzip2, please visit: +http://www.bzip.org/ + +>>> curl-7.59.0-4.ph2 + +COPYRIGHT AND PERMISSION NOTICE + +Copyright (c) 1996 - 2018, Daniel Stenberg, , and many +contributors, see the THANKS file. + +All rights reserved. + +Permission to use, copy, modify, and distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright +notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE +OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of a copyright holder shall not +be used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization of the copyright holder. + +ADDITIONAL LICENSE INFORMATION: + +> Openssl + +curl-7.59.0-4.ph2.src.rpm\curl-7.59.0-4.ph2.src.cpio\curl-7.59.0.tar.gz\curl-7.59.0.tar\curl-7.59.0\docs\examples\curlx.c + +Copyright (c) 2003 The OpenEvidence Project. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright +notice, this list of conditions, the following disclaimer, +and the original OpenSSL and SSLeay Licences below. + +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions, the following disclaimer +and the original OpenSSL and SSLeay Licences below in +the documentation and/or other materials provided with the +distribution. + +3. All advertising materials mentioning features or use of this +software must display the following acknowledgments: +"This product includes software developed by the Openevidence Project +for use in the OpenEvidence Toolkit. (http://www.openevidence.org/)" +This product includes software developed by the OpenSSL Project +for use in the OpenSSL Toolkit (https://www.openssl.org/)" +This product includes cryptographic software written by Eric Young +(eay@cryptsoft.com). This product includes software written by Tim +Hudson (tjh@cryptsoft.com)." + +4. The names "OpenEvidence Toolkit" and "OpenEvidence Project" must not be +used to endorse or promote products derived from this software without +prior written permission. For written permission, please contact +openevidence-core@openevidence.org. + +5. Products derived from this software may not be called "OpenEvidence" +nor may "OpenEvidence" appear in their names without prior written +permission of the OpenEvidence Project. + +6. Redistributions of any form whatsoever must retain the following +acknowledgments: +"This product includes software developed by the OpenEvidence Project +for use in the OpenEvidence Toolkit (http://www.openevidence.org/) +This product includes software developed by the OpenSSL Project +for use in the OpenSSL Toolkit (https://www.openssl.org/)" +This product includes cryptographic software written by Eric Young +(eay@cryptsoft.com). This product includes software written by Tim +Hudson (tjh@cryptsoft.com)." + +THIS SOFTWARE IS PROVIDED BY THE OpenEvidence PROJECT ``AS IS'' AND ANY +EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenEvidence PROJECT OR +ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. + +This product includes software developed by the OpenSSL Project +for use in the OpenSSL Toolkit (https://www.openssl.org/) +This product includes cryptographic software written by Eric Young +(eay@cryptsoft.com). This product includes software written by Tim +Hudson (tjh@cryptsoft.com). + +> BSD-3 + +curl-7.59.0-4.ph2.src.rpm\curl-7.59.0-4.ph2.src.cpio\curl-7.59.0.tar.gz\curl-7.59.0.tar\curl-7.59.0\docs\examples\fopen.c + +Copyright (c) 2003, 2017 Simtec Electronics + +Re-implemented by Vincent Sanders with extensive +reference to original curl example code + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products +derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +> Public Domain + +curl-7.59.0-4.ph2.src.rpm\curl-7.59.0-4.ph2.src.cpio\curl-7.59.0.tar.gz\curl-7.59.0.tar\curl-7.59.0\lib\md4.c + +Author: +Alexander Peslyak, better known as Solar Designer + +This software was written by Alexander Peslyak in 2001. No copyright is +claimed, and the software is hereby placed in the public domain. In case +this attempt to disclaim copyright and place the software in the public +domain is deemed null and void, then the software is Copyright (c) 2001 +Alexander Peslyak and it is hereby released to the general public under the +following terms: + +Redistribution and use in source and binary forms, with or without +modification, are permitted. + +There's ABSOLUTELY NO WARRANTY, express or implied. + +>>> expat-2.2.4-1.ph2 + +Copyright (c) 1997-2000 Thai Open Source Software Center Ltd + Copyright (c) 2000-2017 Expat development team + Licensed under the MIT license: + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to permit + persons to whom the Software is furnished to do so, subject to the + following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + USE OR OTHER DEALINGS IN THE SOFTWARE. + +>>> iputils-20151218-4.ph2 + +Copyright (c) 1989 The Regents of the University of California. +All rights reserved. + +This code is derived from software contributed to Berkeley by +Mike Muuss. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +3. All advertising materials mentioning features or use of this software +must display the following acknowledgement: +This product includes software developed by the University of +California, Berkeley and its contributors. +4. Neither the name of the University nor the names of its contributors +may be used to endorse or promote products derived from this software +without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +ADDITIONAL LICENSE INFORMATION: + + +> GPL 2.0 + +iputils-s20151218.tar.bz2\iputils-s20151218.tar\iputils-s20151218\arping.c + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version +2 of the License, or (at your option) any later version. + +Authors: Alexey Kuznetsov, +YOSHIFUJI Hideaki yoshfuji@linux-ipv6.org + + +> MIT-Style + +iputils-s20151218.tar.bz2\iputils-s20151218.tar\iputils-s20151218\rdisc.c + + +Rdisc (this program) was developed by Sun Microsystems, Inc. and is +provided for unrestricted use provided that this legend is included on +all tape media and as a part of the software program in whole or part. +Users may copy or modify Rdisc without charge, and they may freely +distribute it. + +RDISC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE +WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR +PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. + +Rdisc is provided with no support and without any obligation on the +part of Sun Microsystems, Inc. to assist in its use, correction, +modification or enhancement. + +SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE +INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY RDISC +OR ANY PART THEREOF. + +In no event will Sun Microsystems, Inc. be liable for any lost revenue +or profits or other special, indirect and consequential damages, even if +Sun has been advised of the possibility of such damages. + +Sun Microsystems, Inc. +2550 Garcia Avenue +Mountain View, California 94043. + +>>> krb5-1.16-2.ph2 + +Copyright (c) 2004 Sun Microsystems, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +ADDITIONAL LICENSE INFORMATION: + + +Copyright (C) 1985-2017 by the Massachusetts Institute of Technology. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Downloading of this software may constitute an export of cryptographic +software from the United States of America that is subject to the +United States Export Administration Regulations (EAR), 15 CFR 730-774. +Additional laws or regulations may apply. It is the responsibility of +the person or entity contemplating export to comply with all +applicable export laws and regulations, including obtaining any +required license from the U.S. government. + +The U.S. government prohibits export of encryption source code to +certain countries and individuals, including, but not limited to, the +countries of Cuba, Iran, North Korea, Sudan, Syria, and residents and +nationals of those countries. + +Documentation components of this software distribution are licensed +under a Creative Commons Attribution-ShareAlike 3.0 Unported License. +(http://creativecommons.org/licenses/by-sa/3.0/) + +Individual source code files are copyright MIT, Cygnus Support, +Novell, OpenVision Technologies, Oracle, Red Hat, Sun Microsystems, +FundsXpress, and others. + +Project Athena, Athena, Athena MUSE, Discuss, Hesiod, Kerberos, Moira, +and Zephyr are trademarks of the Massachusetts Institute of Technology +(MIT). No commercial use of these trademarks may be made without +prior written permission of MIT. + +"Commercial use" means use of a name in a product or other for-profit +manner. It does NOT prevent a commercial firm from referring to the +MIT trademarks in order to convey information (although in doing so, +recognition of their trademark status should be given). + +====================================================================== + +The following copyright and permission notice applies to the +OpenVision Kerberos Administration system located in "kadmin/create", +"kadmin/dbutil", "kadmin/passwd", "kadmin/server", "lib/kadm5", and +portions of "lib/rpc": + +Copyright, OpenVision Technologies, Inc., 1993-1996, All Rights +Reserved + +WARNING: Retrieving the OpenVision Kerberos Administration system +source code, as described below, indicates your acceptance of the +following terms. If you do not agree to the following terms, do +not retrieve the OpenVision Kerberos administration system. + +You may freely use and distribute the Source Code and Object Code +compiled from it, with or without modification, but this Source +Code is provided to you "AS IS" EXCLUSIVE OF ANY WARRANTY, +INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY OR +FITNESS FOR A PARTICULAR PURPOSE, OR ANY OTHER WARRANTY, WHETHER +EXPRESS OR IMPLIED. IN NO EVENT WILL OPENVISION HAVE ANY LIABILITY +FOR ANY LOST PROFITS, LOSS OF DATA OR COSTS OF PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES, OR FOR ANY SPECIAL, INDIRECT, OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, INCLUDING, +WITHOUT LIMITATION, THOSE RESULTING FROM THE USE OF THE SOURCE +CODE, OR THE FAILURE OF THE SOURCE CODE TO PERFORM, OR FOR ANY +OTHER REASON. + +OpenVision retains all copyrights in the donated Source Code. +OpenVision also retains copyright to derivative works of the Source +Code, whether created by OpenVision or by a third party. The +OpenVision copyright notice must be preserved if derivative works +are made based on the donated Source Code. + +OpenVision Technologies, Inc. has donated this Kerberos +Administration system to MIT for inclusion in the standard Kerberos +5 distribution. This donation underscores our commitment to +continuing Kerberos technology development and our gratitude for +the valuable work which has been performed by MIT and the Kerberos +community. + +====================================================================== + +Portions contributed by Matt Crawford "crawdad@fnal.gov" were work +performed at Fermi National Accelerator Laboratory, which is +operated by Universities Research Association, Inc., under contract +DE-AC02-76CHO3000 with the U.S. Department of Energy. + +====================================================================== + +Portions of "src/lib/crypto" have the following copyright: + +Copyright (C) 1998 by the FundsXpress, INC. + +All rights reserved. + +Export of this software from the United States of America may +require a specific license from the United States Government. +It is the responsibility of any person or organization +contemplating export to obtain such a license before exporting. + +WITHIN THAT CONSTRAINT, permission to use, copy, modify, and +distribute this software and its documentation for any purpose and +without fee is hereby granted, provided that the above copyright +notice appear in all copies and that both that copyright notice and +this permission notice appear in supporting documentation, and that +the name of FundsXpress. not be used in advertising or publicity +pertaining to distribution of the software without specific, +written prior permission. FundsXpress makes no representations +about the suitability of this software for any purpose. It is +provided "as is" without express or implied warranty. + +THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED +WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + +====================================================================== + +The implementation of the AES encryption algorithm in +"src/lib/crypto/builtin/aes" has the following copyright: + +Copyright (C) 2001, Dr Brian Gladman "brg@gladman.uk.net", Worcester, UK. +All rights reserved. + +LICENSE TERMS + +The free distribution and use of this software in both source and +binary form is allowed (with or without changes) provided that: + +1. distributions of this source code include the above copyright +notice, this list of conditions and the following disclaimer; + +2. distributions in binary form include the above copyright notice, +this list of conditions and the following disclaimer in the +documentation and/or other associated materials; + +3. the copyright holder's name is not used to endorse products +built using this software without specific written permission. + +DISCLAIMER + +This software is provided 'as is' with no explcit or implied +warranties in respect of any properties, including, but not limited +to, correctness and fitness for purpose. + +====================================================================== + +Portions contributed by Red Hat, including the pre-authentication +plug-in framework and the NSS crypto implementation, contain the +following copyright: + +Copyright (C) 2006 Red Hat, Inc. +Portions copyright (C) 2006 Massachusetts Institute of Technology +All Rights Reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in +the documentation and/or other materials provided with the +distribution. + +Neither the name of Red Hat, Inc., nor the names of its +contributors may be used to endorse or promote products derived +from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. + +====================================================================== + +The bundled verto source code is subject to the following license: + +Copyright 2011 Red Hat, Inc. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, copy, +modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +====================================================================== + +The MS-KKDCP client implementation has the following copyright: + +Copyright 2013,2014 Red Hat, Inc. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above +copyright notice, this list of conditions and the following +disclaimer. + +2. Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following +disclaimer in the documentation and/or other materials +provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. + +====================================================================== + +The implementations of GSSAPI mechglue in GSSAPI-SPNEGO in +"src/lib/gssapi", including the following files: + +lib/gssapi/generic/gssapi_err_generic.et +lib/gssapi/mechglue/g_accept_sec_context.c +lib/gssapi/mechglue/g_acquire_cred.c +lib/gssapi/mechglue/g_canon_name.c +lib/gssapi/mechglue/g_compare_name.c +lib/gssapi/mechglue/g_context_time.c +lib/gssapi/mechglue/g_delete_sec_context.c +lib/gssapi/mechglue/g_dsp_name.c +lib/gssapi/mechglue/g_dsp_status.c +lib/gssapi/mechglue/g_dup_name.c +lib/gssapi/mechglue/g_exp_sec_context.c +lib/gssapi/mechglue/g_export_name.c +lib/gssapi/mechglue/g_glue.c +lib/gssapi/mechglue/g_imp_name.c +lib/gssapi/mechglue/g_imp_sec_context.c +lib/gssapi/mechglue/g_init_sec_context.c +lib/gssapi/mechglue/g_initialize.c +lib/gssapi/mechglue/g_inquire_context.c +lib/gssapi/mechglue/g_inquire_cred.c +lib/gssapi/mechglue/g_inquire_names.c +lib/gssapi/mechglue/g_process_context.c +lib/gssapi/mechglue/g_rel_buffer.c +lib/gssapi/mechglue/g_rel_cred.c +lib/gssapi/mechglue/g_rel_name.c +lib/gssapi/mechglue/g_rel_oid_set.c +lib/gssapi/mechglue/g_seal.c +lib/gssapi/mechglue/g_sign.c +lib/gssapi/mechglue/g_store_cred.c +lib/gssapi/mechglue/g_unseal.c +lib/gssapi/mechglue/g_userok.c +lib/gssapi/mechglue/g_utils.c +lib/gssapi/mechglue/g_verify.c +lib/gssapi/mechglue/gssd_pname_to_uid.c +lib/gssapi/mechglue/mglueP.h +lib/gssapi/mechglue/oid_ops.c +lib/gssapi/spnego/gssapiP_spnego.h +lib/gssapi/spnego/spnego_mech.c + +and the initial implementation of incremental propagation, including +the following new or changed files: + +include/iprop_hdr.h +kadmin/server/ipropd_svc.c +lib/kdb/iprop.x +lib/kdb/kdb_convert.c +lib/kdb/kdb_log.c +lib/kdb/kdb_log.h +lib/krb5/error_tables/kdb5_err.et +slave/kpropd_rpc.c +slave/kproplog.c + +are subject to the following license: + +Copyright (C) 2004 Sun Microsystems, Inc. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, copy, +modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +====================================================================== + +Kerberos V5 includes documentation and software developed at the +University of California at Berkeley, which includes this copyright +notice: + +Copyright (C) 1983 Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following +disclaimer in the documentation and/or other materials provided +with the distribution. + +3. Neither the name of the University nor the names of its +contributors may be used to endorse or promote products derived +from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS +OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +====================================================================== + +Portions contributed by Novell, Inc., including the LDAP database +backend, are subject to the following license: + +Copyright (C) 2004-2005, Novell, Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in +the documentation and/or other materials provided with the +distribution. + +The copyright holder's name is not used to endorse or promote +products derived from this software without specific prior +written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. + +====================================================================== + +Portions funded by Sandia National Laboratory and developed by the +University of Michigan's Center for Information Technology +Integration, including the PKINIT implementation, are subject to the +following license: + +COPYRIGHT (C) 2006-2007 +THE REGENTS OF THE UNIVERSITY OF MICHIGAN +ALL RIGHTS RESERVED + +Permission is granted to use, copy, create derivative works and +redistribute this software and such derivative works for any +purpose, so long as the name of The University of Michigan is not +used in any advertising or publicity pertaining to the use of +distribution of this software without specific, written prior +authorization. If the above copyright notice or any other +identification of the University of Michigan is included in any +copy of any portion of this software, then the disclaimer below +must also be included. + +THIS SOFTWARE IS PROVIDED AS IS, WITHOUT REPRESENTATION FROM THE +UNIVERSITY OF MICHIGAN AS TO ITS FITNESS FOR ANY PURPOSE, AND +WITHOUT WARRANTY BY THE UNIVERSITY OF MICHIGAN OF ANY KIND, EITHER +EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +THE REGENTS OF THE UNIVERSITY OF MICHIGAN SHALL NOT BE LIABLE FOR +ANY DAMAGES, INCLUDING SPECIAL, INDIRECT, INCIDENTAL, OR +CONSEQUENTIAL DAMAGES, WITH RESPECT TO ANY CLAIM ARISING OUT OF OR +IN CONNECTION WITH THE USE OF THE SOFTWARE, EVEN IF IT HAS BEEN OR +IS HEREAFTER ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +====================================================================== + +The pkcs11.h file included in the PKINIT code has the following +license: + +Copyright 2006 g10 Code GmbH +Copyright 2006 Andreas Jellinghaus + +This file is free software; as a special exception the author gives +unlimited permission to copy and/or distribute it, with or without +modifications, as long as this notice is preserved. + +This file is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY, to the extent permitted by law; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +====================================================================== + +Portions contributed by Apple Inc. are subject to the following +license: + +Copyright 2004-2008 Apple Inc. All Rights Reserved. + +Export of this software from the United States of America may +require a specific license from the United States Government. +It is the responsibility of any person or organization +contemplating export to obtain such a license before exporting. + +WITHIN THAT CONSTRAINT, permission to use, copy, modify, and +distribute this software and its documentation for any purpose and +without fee is hereby granted, provided that the above copyright +notice appear in all copies and that both that copyright notice and +this permission notice appear in supporting documentation, and that +the name of Apple Inc. not be used in advertising or publicity +pertaining to distribution of the software without specific, +written prior permission. Apple Inc. makes no representations +about the suitability of this software for any purpose. It is +provided "as is" without express or implied warranty. + +THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED +WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + +====================================================================== + +The implementations of UTF-8 string handling in src/util/support and +src/lib/krb5/unicode are subject to the following copyright and +permission notice: + +The OpenLDAP Public License +Version 2.8, 17 August 2003 + +Redistribution and use of this software and associated +documentation ("Software"), with or without modification, are +permitted provided that the following conditions are met: + +1. Redistributions in source form must retain copyright statements +and notices, + +2. Redistributions in binary form must reproduce applicable +copyright statements and notices, this list of conditions, and +the following disclaimer in the documentation and/or other +materials provided with the distribution, and + +3. Redistributions must contain a verbatim copy of this document. + +The OpenLDAP Foundation may revise this license from time to time. +Each revision is distinguished by a version number. You may use +this Software under terms of this license revision or under the +terms of any subsequent revision of the license. + +THIS SOFTWARE IS PROVIDED BY THE OPENLDAP FOUNDATION AND ITS +CONTRIBUTORS "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE OPENLDAP FOUNDATION, ITS +CONTRIBUTORS, OR THE AUTHOR(S) OR OWNER(S) OF THE SOFTWARE BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT +OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. + +The names of the authors and copyright holders must not be used in +advertising or otherwise to promote the sale, use or other dealing +in this Software without specific, written prior permission. Title +to copyright in this Software shall at all times remain with +copyright holders. + +OpenLDAP is a registered trademark of the OpenLDAP Foundation. + +Copyright 1999-2003 The OpenLDAP Foundation, Redwood City, +California, USA. All Rights Reserved. Permission to copy and +distribute verbatim copies of this document is granted. + +====================================================================== + +Marked test programs in src/lib/krb5/krb have the following copyright: + +Copyright (C) 2006 Kungliga Tekniska Högskola +(Royal Institute of Technology, Stockholm, Sweden). +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following +disclaimer in the documentation and/or other materials provided +with the distribution. + +3. Neither the name of KTH nor the names of its contributors may be +used to endorse or promote products derived from this software +without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY KTH AND ITS CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KTH OR ITS +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +====================================================================== + +The KCM Mach RPC definition file used on macOS has the following +copyright: + +Copyright (C) 2009 Kungliga Tekniska Högskola +(Royal Institute of Technology, Stockholm, Sweden). +All rights reserved. + +Portions Copyright (C) 2009 Apple Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above +copyright notice, this list of conditions and the following +disclaimer. + +2. Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following +disclaimer in the documentation and/or other materials provided +with the distribution. + +3. Neither the name of the Institute nor the names of its +contributors may be used to endorse or promote products derived +from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE +OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +====================================================================== + +Portions of the RPC implementation in src/lib/rpc and +src/include/gssrpc have the following copyright and permission notice: + +Copyright (C) 2010, Oracle America, Inc. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following +disclaimer in the documentation and/or other materials provided +with the distribution. + +3. Neither the name of the "Oracle America, Inc." nor the names of +its contributors may be used to endorse or promote products +derived from this software without specific prior written +permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. + +====================================================================== + +Copyright (C) 2006,2007,2009 NTT (Nippon Telegraph and Telephone +Corporation). All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer as +the first lines of this file unmodified. + +2. Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following +disclaimer in the documentation and/or other materials provided +with the distribution. + +THIS SOFTWARE IS PROVIDED BY NTT "AS IS" AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL NTT BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. + +====================================================================== + +Copyright 2000 by Carnegie Mellon University + +All Rights Reserved + +Permission to use, copy, modify, and distribute this software and +its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that copyright notice and this permission +notice appear in supporting documentation, and that the name of +Carnegie Mellon University not be used in advertising or publicity +pertaining to distribution of the software without specific, +written prior permission. + +CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO +THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE +FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN +AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING +OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +====================================================================== + +Copyright (C) 2002 Naval Research Laboratory (NRL/CCS) + +Permission to use, copy, modify and distribute this software and +its documentation is hereby granted, provided that both the +copyright notice and this permission notice appear in all copies of +the software, derivative works or modified versions, and any +portions thereof. + +NRL ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" CONDITION AND +DISCLAIMS ANY LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER +RESULTING FROM THE USE OF THIS SOFTWARE. + +====================================================================== + +Portions extracted from Internet RFCs have the following copyright +notice: + +Copyright (C) The Internet Society (2006). + +This document is subject to the rights, licenses and restrictions +contained in BCP 78, and except as set forth therein, the authors +retain all their rights. + +This document and the information contained herein are provided on +an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE +REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND +THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT +THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR +ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A +PARTICULAR PURPOSE. + +====================================================================== + +Copyright (C) 1991, 1992, 1994 by Cygnus Support. + +Permission to use, copy, modify, and distribute this software and +its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that copyright notice and this permission +notice appear in supporting documentation. Cygnus Support makes no +representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied +warranty. + +====================================================================== + +Copyright (C) 2006 Secure Endpoints Inc. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, copy, +modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +====================================================================== + +Portions of the implementation of the Fortuna-like PRNG are subject to +the following notice: + +Copyright (C) 2005 Marko Kreen +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following +disclaimer in the documentation and/or other materials provided +with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +Copyright (C) 1994 by the University of Southern California + +EXPORT OF THIS SOFTWARE from the United States of America may +require a specific license from the United States Government. It +is the responsibility of any person or organization +contemplating export to obtain such a license before exporting. + +WITHIN THAT CONSTRAINT, permission to copy, modify, and distribute +this software and its documentation in source and binary forms is +hereby granted, provided that any documentation or other materials +related to such distribution or use acknowledge that the software +was developed by the University of Southern California. + +DISCLAIMER OF WARRANTY. THIS SOFTWARE IS PROVIDED "AS IS". The +University of Southern California MAKES NO REPRESENTATIONS OR +WARRANTIES, EXPRESS OR IMPLIED. By way of example, but not +limitation, the University of Southern California MAKES NO +REPRESENTATIONS OR WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY +PARTICULAR PURPOSE. The University of Southern California shall not +be held liable for any liability nor for any direct, indirect, or +consequential damages with respect to any claim by the user or +distributor of the ksu software. + +====================================================================== + +Copyright (C) 1995 +The President and Fellows of Harvard University + +This code is derived from software contributed to Harvard by Jeremy +Rassen. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following +disclaimer in the documentation and/or other materials provided +with the distribution. + +3. All advertising materials mentioning features or use of this +software must display the following acknowledgement: + +This product includes software developed by the University of +California, Berkeley and its contributors. + +4. Neither the name of the University nor the names of its +contributors may be used to endorse or promote products derived +from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS +OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +====================================================================== + +Copyright (C) 2008 by the Massachusetts Institute of Technology. +Copyright 1995 by Richard P. Basch. All Rights Reserved. +Copyright 1995 by Lehman Brothers, Inc. All Rights Reserved. + +Export of this software from the United States of America may +require a specific license from the United States Government. It +is the responsibility of any person or organization +contemplating export to obtain such a license before exporting. + +WITHIN THAT CONSTRAINT, permission to use, copy, modify, and +distribute this software and its documentation for any purpose and +without fee is hereby granted, provided that the above copyright +notice appear in all copies and that both that copyright notice and +this permission notice appear in supporting documentation, and that +the name of Richard P. Basch, Lehman Brothers and M.I.T. not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. Richard P. +Basch, Lehman Brothers and M.I.T. make no representations about the +suitability of this software for any purpose. It is provided "as +is" without express or implied warranty. + +====================================================================== + +The following notice applies to "src/lib/krb5/krb/strptime.c" and +"src/include/k5-queue.h". + +Copyright (C) 1997, 1998 The NetBSD Foundation, Inc. +All rights reserved. + +This code was contributed to The NetBSD Foundation by Klaus Klein. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following +disclaimer in the documentation and/or other materials provided +with the distribution. + +3. All advertising materials mentioning features or use of this +software must display the following acknowledgement: + +This product includes software developed by the NetBSD +Foundation, Inc. and its contributors. + +4. Neither the name of The NetBSD Foundation nor the names of its +contributors may be used to endorse or promote products derived +from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND +CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT +OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. + +====================================================================== + +The following notice applies to Unicode library files in +"src/lib/krb5/unicode": + +Copyright 1997, 1998, 1999 Computing Research Labs, +New Mexico State University + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, copy, +modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE COMPUTING RESEARCH LAB OR +NEW MEXICO STATE UNIVERSITY BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +====================================================================== + +The following notice applies to "src/util/support/strlcpy.c": + +Copyright (C) 1998 Todd C. Miller "Todd.Miller@courtesan.com" + +Permission to use, copy, modify, and distribute this software for +any purpose with or without fee is hereby granted, provided that +the above copyright notice and this permission notice appear in all +copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE +AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, +NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +====================================================================== + +The following notice applies to "src/util/profile/argv_parse.c" and +"src/util/profile/argv_parse.h": + +Copyright 1999 by Theodore Ts'o. + +Permission to use, copy, modify, and distribute this software for +any purpose with or without fee is hereby granted, provided that +the above copyright notice and this permission notice appear in all +copies. THE SOFTWARE IS PROVIDED "AS IS" AND THEODORE TS'O (THE +AUTHOR) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN +NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER +RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. (Isn't +it sick that the U.S. culture of lawsuit-happy lawyers requires +this kind of disclaimer?) + +====================================================================== + +The following notice applies to SWIG-generated code in +"src/util/profile/profile_tcl.c": + +Copyright (C) 1999-2000, The University of Chicago + +This file may be freely redistributed without license or fee +provided this copyright message remains intact. + +====================================================================== + +The following notice applies to portiions of "src/lib/rpc" and +"src/include/gssrpc": + +Copyright (C) 2000 The Regents of the University of Michigan. All +rights reserved. + +Copyright (C) 2000 Dug Song "dugsong@UMICH.EDU". All rights +reserved, all wrongs reversed. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following +disclaimer in the documentation and/or other materials provided +with the distribution. + +3. Neither the name of the University nor the names of its +contributors may be used to endorse or promote products derived +from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT +OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. + +====================================================================== + +Implementations of the MD4 algorithm are subject to the following +notice: + +Copyright (C) 1990, RSA Data Security, Inc. All rights reserved. + +License to copy and use this software is granted provided that it +is identified as the "RSA Data Security, Inc. MD4 Message Digest +Algorithm" in all material mentioning or referencing this software +or this function. + +License is also granted to make and use derivative works provided +that such works are identified as "derived from the RSA Data +Security, Inc. MD4 Message Digest Algorithm" in all material +mentioning or referencing the derived work. + +RSA Data Security, Inc. makes no representations concerning either +the merchantability of this software or the suitability of this +software for any particular purpose. It is provided "as is" +without express or implied warranty of any kind. + +These notices must be retained in any copies of any part of this +documentation and/or software. + +====================================================================== + +Implementations of the MD5 algorithm are subject to the following +notice: + +Copyright (C) 1990, RSA Data Security, Inc. All rights reserved. + +License to copy and use this software is granted provided that it +is identified as the "RSA Data Security, Inc. MD5 Message- Digest +Algorithm" in all material mentioning or referencing this software +or this function. + +License is also granted to make and use derivative works provided +that such works are identified as "derived from the RSA Data +Security, Inc. MD5 Message-Digest Algorithm" in all material +mentioning or referencing the derived work. + +RSA Data Security, Inc. makes no representations concerning either +the merchantability of this software or the suitability of this +software for any particular purpose. It is provided "as is" +without express or implied warranty of any kind. + +These notices must be retained in any copies of any part of this +documentation and/or software. + +====================================================================== + +The following notice applies to +"src/lib/crypto/crypto_tests/t_mddriver.c": + +Copyright (C) 1990-2, RSA Data Security, Inc. Created 1990. All +rights reserved. + +RSA Data Security, Inc. makes no representations concerning either +the merchantability of this software or the suitability of this +software for any particular purpose. It is provided "as is" without +express or implied warranty of any kind. + +These notices must be retained in any copies of any part of this +documentation and/or software. + +====================================================================== + +Portions of "src/lib/krb5" are subject to the following notice: + +Copyright (C) 1994 CyberSAFE Corporation. +Copyright 1990,1991,2007,2008 by the Massachusetts Institute of Technology. +All Rights Reserved. + +Export of this software from the United States of America may +require a specific license from the United States Government. It +is the responsibility of any person or organization +contemplating export to obtain such a license before exporting. + +WITHIN THAT CONSTRAINT, permission to use, copy, modify, and +distribute this software and its documentation for any purpose and +without fee is hereby granted, provided that the above copyright +notice appear in all copies and that both that copyright notice and +this permission notice appear in supporting documentation, and that +the name of M.I.T. not be used in advertising or publicity +pertaining to distribution of the software without specific, +written prior permission. Furthermore if you modify this software +you must label your software as modified software and not +distribute it in such a fashion that it might be confused with the +original M.I.T. software. Neither M.I.T., the Open Computing +Security Group, nor CyberSAFE Corporation make any representations +about the suitability of this software for any purpose. It is +provided "as is" without express or implied warranty. + +====================================================================== + +Portions contributed by PADL Software are subject to the following +license: + +Copyright (c) 2011, PADL Software Pty Ltd. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following +disclaimer in the documentation and/or other materials provided +with the distribution. + +3. Neither the name of PADL Software nor the names of its +contributors may be used to endorse or promote products derived +from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY PADL SOFTWARE AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL PADL SOFTWARE +OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +====================================================================== + +The bundled libev source code is subject to the following license: + +All files in libev are Copyright (C)2007,2008,2009 Marc Alexander +Lehmann. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in +the documentation and/or other materials provided with the +distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. + +Alternatively, the contents of this package may be used under the +terms of the GNU General Public License ("GPL") version 2 or any +later version, in which case the provisions of the GPL are +applicable instead of the above. If you wish to allow the use of +your version of this package only under the terms of the GPL and +not to allow others to use your version of this file under the BSD +license, indicate your decision by deleting the provisions above +and replace them with the notice and other provisions required by +the GPL in this and the other files of this package. If you do not +delete the provisions above, a recipient may use your version of +this file under either the BSD or the GPL. + +====================================================================== + +Files copied from the Intel AESNI Sample Library are subject to the +following license: + +Copyright (C) 2010, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following +disclaimer in the documentation and/or other materials +provided with the distribution. + +Neither the name of Intel Corporation nor the names of its +contributors may be used to endorse or promote products +derived from this software without specific prior written +permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. + +====================================================================== + +The following notice applies to +"src/ccapi/common/win/OldCC/autolock.hxx": + +Copyright (C) 1998 by Danilo Almeida. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following +disclaimer in the documentation and/or other materials provided +with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. + +ADDITIONAL LICENSE INFORMATION: + +> LPPL 1.3c + +krb5-1.16-2.ph2.src.rpm\krb5-1.16-2.ph2.src.cpio\krb5-1.16.tar.gz\krb5-1.16.tar\krb5-1.16\doc\pdf\tabulary.sty + + +Copyright (C) 1995 1996 2003 2008 David Carlisle +This file may be distributed under the terms of the LPPL. +See 00readme.txt for details. + + +> BSD- 4 Clause + + +krb5-1.16-2.ph2.src.rpm\krb5-1.16-2.ph2.src.cpio\krb5-1.16.tar.gz\krb5-1.16.tar\krb5-1.16\src\lib\apputils\daemon.c + + +Copyright (c) 1990 The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +3. All advertising materials mentioning features or use of this software +must display the following acknowledgement: +This product includes software developed by the University of +California, Berkeley and its contributors. +4. Neither the name of the University nor the names of its contributors +may be used to endorse or promote products derived from this software +without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +> Public Domain + +krb5-1.16-2.ph2.src.rpm\krb5-1.16-2.ph2.src.cpio\krb5-1.16.tar.gz\krb5-1.16.tar\krb5-1.16\src\lib\krb5\rcache\rc_base.c + +This file of the Kerberos V5 software is derived from public-domain code +contributed by Daniel J. Bernstein, . + +>>> libarchive-3.3.1-2.ph2 + +Copyright (c) 2003-2009 +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer +in this position and unchanged. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +ADDITIONAL LICENSE INFORMATION: + +>MIT Style + +libarchive-3.3.1.tar.gz\libarchive-3.3.1.tar\libarchive-3.3.1\build\autoconf\ax_require_defined.m4 + +Copyright (c) 2014 Mike Frysinger + +Copying and distribution of this file, with or without modification, are +permitted in any medium without royalty provided the copyright notice +and this notice are preserved. This file is offered as-is, without any +warranty. + +>Apache 2.0 + +libarchive-3.3.1.tar.gz\libarchive-3.3.1.tar\libarchive-3.3.1\contrib\android\Android.mk + +Copyright (C) 2014 Trevor Drake + +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. + +>BSD – 4Clause + +libarchive-3.3.1.tar.gz\libarchive-3.3.1.tar\libarchive-3.3.1\contrib\shar\shar.1 + +Copyright (c) 1990, 1993 +The Regents of the University of California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +3. All advertising materials mentioning features or use of this software +must display the following acknowledgement: +This product includes software developed by the University of +California, Berkeley and its contributors. +4. Neither the name of the University nor the names of its contributors +may be used to endorse or promote products derived from this software +without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +>MIT + +libarchive-3.3.1.tar.gz\libarchive-3.3.1.tar\libarchive-3.3.1\doc\mdoc2man.awk + +Copyright (c) 2003 Peter Stuge + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +>Public Domain + +libarchive-3.3.1.tar.gz\libarchive-3.3.1.tar\libarchive-3.3.1\libarchive\archive_getdate.c + +This code is in the public domain and has no copyright. + +This is a plain C recursive-descent translation of an old +public-domain YACC grammar that has been used for parsing dates in +very many open-source projects. + +Since the original authors were generous enough to donate their +work to the public domain, I feel compelled to match their +generosity. + +Tim Kientzle, February 2009. + +>BSD – 3Clause + +libarchive-3.3.1.tar.gz\libarchive-3.3.1.tar\libarchive-3.3.1\libarchive\mtree.5 + +Copyright (c) 1989, 1990, 1993 +The Regents of the University of California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +4. Neither the name of the University nor the names of its contributors +may be used to endorse or promote products derived from this software +without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +>>> libcap-2.25-7.ph2 + +[PLEASE NOTE: VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE BSD-3. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] + +Unless otherwise *explicitly* stated the following text describes the +licensed conditions under which the contents of this module release +may be distributed: + +------------------------------------------------------------------------- +Redistribution and use in source and binary forms of this module, with +or without modification, are permitted provided that the following +conditions are met: + +1. Redistributions of source code must retain any existing copyright + notice, and this entire permission notice in its entirety, + including the disclaimer of warranties. + +2. Redistributions in binary form must reproduce all prior and current + copyright notices, this list of conditions, and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + +3. The name of any author may not be used to endorse or promote + products derived from this software without their specific prior + written permission. + +ALTERNATIVELY, this product may be distributed under the terms of the +GNU Library General Public License, in which case the provisions of +the GNU LGPL are required INSTEAD OF the above restrictions. (This +clause is necessary due to a potential conflict between the GNU LGPL +and the restrictions contained in a BSD-style copyright.) + +THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR +TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. + +>>> libdb-5.3.28-1.ph2 + +The following is the license that applies to this copy of the Berkeley DB +software. For a license to use the Berkeley DB software under conditions +other than those described here, or to purchase support for this software, +please contact Oracle at berkeleydb-info_us@oracle.com. + +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +Copyright (c) 1990, 2013 Oracle and/or its affiliates. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +3. Redistributions in any form must be accompanied by information on +how to obtain complete source code for the DB software and any +accompanying software that uses the DB software. The source code +must either be included in the distribution or be available for no +more than the cost of distribution plus a nominal fee, and must be +freely redistributable under reasonable conditions. For an +executable file, complete source code means the source code for all +modules it contains. It does not include source code for modules or +files that typically accompany the major components of the operating +system on which the executable file runs. + +THIS SOFTWARE IS PROVIDED BY ORACLE ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR +NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL ORACLE BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +Copyright (c) 1990, 1993, 1994, 1995 +The Regents of the University of California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +3. Neither the name of the University nor the names of its contributors +may be used to endorse or promote products derived from this software +without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + + +Copyright (c) 1995, 1996 +The President and Fellows of Harvard University. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +3. Neither the name of the University nor the names of its contributors +may be used to endorse or promote products derived from this software +without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY HARVARD AND ITS CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL HARVARD OR ITS CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +ASM: a very small and fast Java bytecode manipulation framework +Copyright (c) 2000-2005 INRIA, France Telecom +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +3. Neither the name of the copyright holders nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +THE POSSIBILITY OF SUCH DAMAGE. + + +ADDITIONAL LICENSE INFORMATION: + +>BSD-4 + +libdb-5.3.28-1.ph2.src.rpm\libdb-5.3.28-1.ph2.src.cpio\db-5.3.28.tar.gz\db-5.3.28.tar\db-5.3.28\src\clib\atol.c + +Copyright (c) 1988, 1993 +The Regents of the University of California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +3. All advertising materials mentioning features or use of this software +must display the following acknowledgement: +This product includes software developed by the University of +California, Berkeley and its contributors. +4. Neither the name of the University nor the names of its contributors +may be used to endorse or promote products derived from this software +without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +>ARTISTIC 2.0 + +libdb-5.3.28-1.ph2.src.rpm\libdb-5.3.28-1.ph2.src.cpio\db-5.3.28.tar.gz\db-5.3.28.tar\db-5.3.28\src\crypto\mersenne\mt19937db.c + +This library is free software under the Artistic license: +see the file COPYING distributed together with this code. +For the verification of the code, its output sequence file +mt19937int.out is attached (2001/4/2) + +>PUBLIC DOMAIN + +libdb-5.3.28-1.ph2.src.rpm\libdb-5.3.28-1.ph2.src.cpio\db-5.3.28.tar.gz\db-5.3.28.tar\db-5.3.28\src\crypto\rijndael\rijndael-alg-fst.c + + +rijndael-alg-fst.c + +@version 3.0 (December 2000) + +Optimised ANSI C code for the Rijndael cipher (now AES) + +@author Vincent Rijmen +@author Antoon Bosselaers +@author Paulo Barreto + +This code is hereby placed in the public domain. + +THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +>PUBLIC DOMAIN + +libdb-5.3.28-1.ph2.src.rpm\libdb-5.3.28-1.ph2.src.cpio\db-5.3.28.tar.gz\db-5.3.28.tar\db-5.3.28\src\hmac\sha1.c + +SHA-1 in C +By Steve Reid +100% Public Domain +>MS-PL + + +libdb-5.3.28-1.ph2.src.rpm\libdb-5.3.28-1.ph2.src.cpio\db-5.3.28.tar.gz\db-5.3.28.tar\db-5.3.28\docs\csharp\TOC.js + + +Note : Copyright 2006-2009, Eric Woodruff, All rights reserved +Compiler: JavaScript + +This file contains the methods necessary to implement a simple tree view +for the table of content with a resizable splitter and Ajax support to +load tree nodes on demand. It also contains the script necessary to do +full-text searches. + +This code is published under the Microsoft Public License (Ms-PL). A copy +of the license should be distributed with the code. It can also be found +at the project website: http://SHFB.CodePlex.com. This notice, the +author's name, and all copyright notices must remain intact in all +applications, documentation, and source files. + +>MIT + +libdb-5.3.28-1.ph2.src.rpm\libdb-5.3.28-1.ph2.src.cpio\db-5.3.28.tar.gz\db-5.3.28.tar\db-5.3.28\dist\aclocal\ltoptions.m4 + +Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, +Inc. +Written by Gary V. Vaughan, 2004 + +This file is free software; the Free Software Foundation gives +unlimited permission to copy and/or distribute it, with or without +modifications, as long as this notice is preserved. + +>GPL 2.0 + +libdb-5.3.28-1.ph2.src.rpm\libdb-5.3.28-1.ph2.src.cpio\db-5.3.28.tar.gz\db-5.3.28.tar\db-5.3.28\lang\perl\BerkeleyDB\BerkeleyDB.pm + +[VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS SUBCOMPONENT UNDER THE TERMS OF THE GPL v2 LICENSE THE TEXT OF WHICH IS SET FORTH IN THE APPENDIX. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] + +Copyright (c) 1997-2011 Paul Marquess. All rights reserved. +This program is free software; you can redistribute it and/or +modify it under the same terms as Perl itself. + + +>APACHE 2.0 + +libdb-5.3.28-1.ph2.src.rpm\libdb-5.3.28-1.ph2.src.cpio\db-5.3.28.tar.gz\db-5.3.28.tar\db-5.3.28\lang\php_db4\db4.cpp + +Copyright (c) 2004, 2013 Oracle and/or its affiliates. All rights reserved. + +http://www.apache.org/licenses/LICENSE-2.0.txt + +authors: George Schlossnagle george@omniti.com + +>MIT STYLE + +libdb-5.3.28-1.ph2.src.rpm\libdb-5.3.28-1.ph2.src.cpio\db-5.3.28.tar.gz\db-5.3.28.tar\db-5.3.28\lang\sql\jdbc\license.terms + +This software is copyrighted by Christian Werner and others. +The following terms apply to all files associated with the software +unless explicitly disclaimed in individual files. + +The authors hereby grant permission to use, copy, modify, distribute, +and license this software and its documentation for any purpose, provided +that existing copyright notices are retained in all copies and that this +notice is included verbatim in any distributions. No written agreement, +license, or royalty fee is required for any of the authorized uses. +Modifications to this software may be copyrighted by their authors +and need not follow the licensing terms described here, provided that +the new terms are clearly indicated on the first page of each file where +they apply. + +IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY +FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES +ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY +DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE +IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE +NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR +MODIFICATIONS. + +>>> libffi-3.2.1-5.ph2 + +libffi - Copyright (c) 1996-2014 Anthony Green, Red Hat, Inc and others. +See source files for details. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +``Software''), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +ADDITIONAL LICENSE INFORMATION: + +> GPL 2.0 + +libffi-3.2.1.tar.gz\libffi-3.2.1.tar\libffi-3.2.1\libtool-ldflags + +Copyright (C) 2005 Free Software Foundation, Inc. + +This file is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +MA 02110-1301, USA. + + +> LGPL 2.1 + +libffi-3.2.1.tar.gz\libffi-3.2.1.tar\libffi-3.2.1\msvcc.sh + +[PLEASE NOTE: VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE LGPL 2.1 LICENSE. PLEASE SEE APPENDIX FOR THE FULL TEXT OF THE LGPL 2.1 LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] + +***** BEGIN LICENSE BLOCK ***** +Version: MPL 1.1/GPL 2.0/LGPL 2.1 + +The contents of this file are subject to the Mozilla Public License Version +1.1 (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.mozilla.org/MPL/ + +Software distributed under the License is distributed on an "AS IS" basis, +WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +for the specific language governing rights and limitations under the +License. + +The Original Code is the MSVC wrappificator. + +The Initial Developer of the Original Code is +Timothy Wall . +Portions created by the Initial Developer are Copyright (C) 2009 +the Initial Developer. All Rights Reserved. + +Contributor(s): +Daniel Witte + +Alternatively, the contents of this file may be used under the terms of +either the GNU General Public License Version 2 or later (the "GPL"), or +the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +in which case the provisions of the GPL or the LGPL are applicable instead +of those above. If you wish to allow use of your version of this file only +under the terms of either the GPL or the LGPL, and not to allow others to +use your version of this file under the terms of the MPL, indicate your +decision by deleting the provisions above and replace them with the notice +and other provisions required by the GPL or the LGPL. If you do not delete +the provisions above, a recipient may use your version of this file under +the terms of any one of the MPL, the GPL or the LGPL. + +***** END LICENSE BLOCK ***** + + +> Public Domain + +libffi-3.2.1.tar.gz\libffi-3.2.1.tar\libffi-3.2.1\src\dlmalloc.c + +This is a version (aka dlmalloc) of malloc/free/realloc written by +Doug Lea and released to the public domain, as explained at +http://creativecommons.org/licenses/publicdomain. Send questions, +comments, complaints, performance data, etc to dl@cs.oswego.edu + +>>> libsolv-0.6.26-3.ph2 + +Copyright (c) 2000-2001, Aaron D. Gifford +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +3. Neither the name of the copyright holder nor the names of contributors +may be used to endorse or promote products derived from this software +without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTOR(S) ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTOR(S) BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +ADDITIONAL LICENSE INFORMATION: + +> Public Domain + +libsolv-0.6.26.tar.gz\libsolv-0.6.26.tar\libsolv-0.6.26\src\sha1.h + +this file is in the public domain + +>>> libssh2-1.8.0-1.ph2 + +Copyright (c) 2004-2007 Sara Golemon + Copyright (c) 2005,2006 Mikhail Gusarov + Copyright (c) 2006-2007 The Written Word, Inc. + Copyright (c) 2007 Eli Fant + Copyright (c) 2009-2014 Daniel Stenberg + Copyright (C) 2008, 2009 Simon Josefsson + All rights reserved. + + Redistribution and use in source and binary forms, + with or without modification, are permitted provided + that the following conditions are met: + + Redistributions of source code must retain the above + copyright notice, this list of conditions and the + following disclaimer. + + Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials + provided with the distribution. + + Neither the name of the copyright holder nor the names + of any other contributors may be used to endorse or + promote products derived from this software without + specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE + USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + OF SUCH DAMAGE. + +>>> libtirpc-1.0.1-8.ph2 + +Copyright (c) Copyright (c) Bull S.A. 2005 All Rights Reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products +derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +ADDITIONAL LICENSE INFORMATION: + +>GPL 2.0 + +libtirpc-1.0.1\src\debug.h + +Copyright (C) 2014 Red Hat, Steve Dickson + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, +Boston, MA 02110-1301, USA. + +>LGPL 2.1 + +libtirpc-1.0.1\src\des_impl.c + +Copyright (C) 1992 Eric Young +Collected from libdes and modified for SECURE RPC by Martin Kuck 1994 +This file is distributed under the terms of the GNU Lesser General +Public License, version 2.1 or later - see the file COPYING.LIB for details. +If you did not receive a copy of the license with this program, please +see to obtain a copy. + +>Sun Microsystem (MIT-Style) + +libtirpc-1.0.1\tirpc\rpc\key_prot.h + +Sun RPC is a product of Sun Microsystems, Inc. and is provided for +unrestricted use provided that this legend is included on all tape +media and as a part of the software program in whole or part. Users +may copy or modify Sun RPC without charge, but are not authorized +to license or distribute it to anyone else except as part of a product or +program developed by the user. +SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE +WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR +PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. +Sun RPC is provided with no support and without any obligation on the +part of Sun Microsystems, Inc. to assist in its use, correction, +modification or enhancement. +SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE +INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC +OR ANY PART THEREOF. +In no event will Sun Microsystems, Inc. be liable for any lost revenue +or profits or other special, indirect and consequential damages, even if +Sun has been advised of the possibility of such damages. +Sun Microsystems, Inc. +2550 Garcia Avenue +Mountain View, California 94043. + +>>> linux-pam-1.3.0-1.ph2 + +[PLEASE NOTE: VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE BSD-3 LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] + +Unless otherwise *explicitly* stated the following text describes the +licensed conditions under which the contents of this Linux-PAM release +may be distributed: + +------------------------------------------------------------------------- +Redistribution and use in source and binary forms of Linux-PAM, with +or without modification, are permitted provided that the following +conditions are met: + +1. Redistributions of source code must retain any existing copyright + notice, and this entire permission notice in its entirety, + including the disclaimer of warranties. + +2. Redistributions in binary form must reproduce all prior and current + copyright notices, this list of conditions, and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + +3. The name of any author may not be used to endorse or promote + products derived from this software without their specific prior + written permission. + +ALTERNATIVELY, this product may be distributed under the terms of the +GNU General Public License, in which case the provisions of the GNU +GPL are required INSTEAD OF the above restrictions. (This clause is +necessary due to a potential conflict between the GNU GPL and the +restrictions contained in a BSD-style copyright.) + +THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR +TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. +------------------------------------------------------------------------- + + +ADDITIONAL LICENSE INFORMATION: + +> GPL 3.0 with Bison Parser Exception + +Linux-PAM-1.3.0.tar.bz2\Linux-PAM-1.3.0.tar\Linux-PAM-1.3.0\conf\pam_conv1\pam_conv_y.c + +Bison implementation for Yacc-like parsers in C + +Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . + +As a special exception, you may create a larger work that contains +part or all of the Bison parser skeleton and distribute that work +under terms of your choice, so long as that work isn't itself a +parser generator using the skeleton or a modified version thereof +as a parser skeleton. Alternatively, if you modify or redistribute +the parser skeleton itself, you may (at your option) remove this +special exception, which will cause the skeleton and the resulting +Bison output files to be licensed under the GNU General Public +License without this special exception. + +This special exception was added by the Free Software Foundation in +version 2.2 of Bison. + + +> BSD + +Linux-PAM-1.3.0.tar.bz2\Linux-PAM-1.3.0.tar\Linux-PAM-1.3.0\modules\pam_access\pam_access.c + +Copyright 1995 by Wietse Venema. All rights reserved. Individual files +may be covered by other copyrights (as noted in the file itself.) + +This material was originally written and compiled by Wietse Venema at +Eindhoven University of Technology, The Netherlands, in 1990, 1991, +1992, 1993, 1994 and 1995. + +Redistribution and use in source and binary forms are permitted +provided that this entire copyright notice is duplicated in all such +copies. + +This software is provided "as is" and without any expressed or implied +warranties, including, without limitation, the implied warranties of +merchantibility and fitness for any particular purpose. + + +> LGPL 2.0 + +Linux-PAM-1.3.0.tar.bz2\Linux-PAM-1.3.0.tar\Linux-PAM-1.3.0\modules\pam_issue\pam_issue.c + +Copyright 1999 by Ben Collins +Released under the GNU LGPL version 2 or later + + +> GPL 2.0 + +Linux-PAM-1.3.0.tar.bz2\Linux-PAM-1.3.0.tar\Linux-PAM-1.3.0\modules\pam_loginuid\pam_loginuid.c + +Copyright 2005 Red Hat Inc., Durham, North Carolina. +All Rights Reserved. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Suite 500 +Boston, MA 02110-1335 USA + + +> Public Domain + +Linux-PAM-1.3.0.tar.bz2\Linux-PAM-1.3.0.tar\Linux-PAM-1.3.0\modules\pam_namespace\md5.c + +This code implements the MD5 message-digest algorithm. +The algorithm is due to Ron Rivest. This code was +written by Colin Plumb in 1993, no copyright is claimed. +This code is in the public domain; do with it what you wish. + + +> MIT + +Linux-PAM-1.3.0.tar.bz2\Linux-PAM-1.3.0.tar\Linux-PAM-1.3.0\modules\pam_namespace\argv_parse.c + +Copyright 1999 by Theodore Ts'o. + +Permission to use, copy, modify, and distribute this software for +any purpose with or without fee is hereby granted, provided that +the above copyright notice and this permission notice appear in all +copies. THE SOFTWARE IS PROVIDED "AS IS" AND THEODORE TS'O (THE +AUTHOR) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER +RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +> BSD-3 + +Linux-PAM-1.3.0.tar.bz2\Linux-PAM-1.3.0.tar\Linux-PAM-1.3.0\modules\pam_tally2\pam_tally2.c + +Portions Copyright 2006, Red Hat, Inc. +Portions Copyright 1989 - 1993, Julianne Frances Haugh +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +3. Neither the name of Julianne F. Haugh nor the names of its contributors +may be used to endorse or promote products derived from this software +without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY JULIE HAUGH AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL JULIE HAUGH OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + + +> Beer-Ware License (MIT-Style) + +Linux-PAM-1.3.0.tar.bz2\Linux-PAM-1.3.0.tar\Linux-PAM-1.3.0\modules\pam_unix\md5_crypt.c + +"THE BEER-WARE LICENSE" (Revision 42): + wrote this file. As long as you retain this notice you +can do whatever you want with this stuff. If we meet some day, and you think +this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp + +>>> lsof-4.89-2.ph2 + +Copyright 1994 Purdue Research Foundation, West Lafayette, Indiana +47907. All rights reserved. + +Written by Victor A. Abell + +This software is not subject to any license of the American Telephone +and Telegraph Company or the Regents of the University of California. + +Permission is granted to anyone to use this software for any purpose on +any computer system, and to alter it and redistribute it freely, subject +to the following restrictions: + +1. Neither the authors nor Purdue University are responsible for any +consequences of the use of this software. + +2. The origin of this software must not be misrepresented, either by +explicit claim or by omission. Credit to the authors and Purdue +University must appear in documentation and sources. + +3. Altered versions must be plainly marked as such, and must not be +misrepresented as being the original software. + +4. This notice may not be removed or altered. + +ADDITIONAL LICENSE INFORMATION: + +> BSD + +lsof_4.89.tar.gz\lsof_4.89.tar\lsof_4.89\lsof_4.89_src.tar\lsof_4.89_src\dialects\freebsd\include\procfs\pfsnode.h + +Copyright (c) 1993 Paul Kranenburg +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +3. All advertising materials mentioning features or use of this software +must display the following acknowledgement: +This product includes software developed by Paul Kranenburg. +4. The name of the author may not be used to endorse or promote products +derived from this software withough specific prior written permission + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +> GPL 2.0 + +lsof_4.89.tar.gz\lsof_4.89.tar\lsof_4.89\lsof_4.89_src.tar\lsof_4.89_src\scripts\sort_res.perl5 + +Copyright (c) 2004, 2005 - Fabian Frederick + +This program/include file is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as published +by the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program/include file is distributed in the hope that it will be +useful, but WITHOUT ANY WARRANTY; without even the implied warranty +of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program (in the main directory of the Linux-NTFS +distribution in the file COPYING); if not, write to the Free Software +Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +>>> ncurses-6.0-14.ph2 + +Upstream source http://invisible-island.net/ncurses/ncurses-examples.html + +Current ncurses maintainer: Thomas Dickey + +------------------------------------------------------------------------------- +Files: * +Copyright: 1998-2016,2017 Free Software Foundation, Inc. +Licence: X11 + +Files: aclocal.m4 package +Copyright: 2010-2016,2017 by Thomas E. Dickey +Licence: X11 + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, distribute with modifications, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR + THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name(s) of the above copyright + holders shall not be used in advertising or otherwise to promote the + sale, use or other dealings in this Software without prior written + authorization. + +------------------------------------------------------------------------------- +Files: install-sh +Copyright: 1994 X Consortium +Licence: X11 + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- + TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name of the X Consortium shall not + be used in advertising or otherwise to promote the sale, use or other deal- + ings in this Software without prior written authorization from the X Consor- + tium. + + FSF changes to this file are in the public domain. + + Calling this script install-sh is preferred over install.sh, to prevent + `make' implicit rules from creating a file called install from it + when there is no Makefile. + + This script is compatible with the BSD install script, but was written + from scratch. It can only install one file at a time, a restriction + shared with many OS's install programs. + +On Debian systems, the complete text of the GNU General +Public License can be found in '/usr/share/common-licenses/GPL-2' + +-- vile: txtmode file-encoding=utf-8 + +>>> openssh-7.5p1-11.ph2 + +This file is part of the OpenSSH software. + +The licences which components of this software fall under are as +follows. First, we will summarize and say that all components +are under a BSD licence, or a licence more free than that. + +OpenSSH contains no GPL code. + +1) +Copyright (c) 1995 Tatu Ylonen , Espoo, Finland +All rights reserved + +As far as I am concerned, the code I have written for this software +can be used freely for any purpose. Any derived versions of this +software must be clearly marked as such, and if the derived work is +incompatible with the protocol description in the RFC file, it must be +called by a name other than "ssh" or "Secure Shell". + +[Tatu continues] +However, I am not implying to give any licenses to any patents or +copyrights held by third parties, and the software includes parts that +are not under my direct control. As far as I know, all included +source code is used in accordance with the relevant license agreements +and can be used freely for any purpose (the GNU license being the most +restrictive); see below for details. + +[However, none of that term is relevant at this point in time. All of +these restrictively licenced software components which he talks about +have been removed from OpenSSH, i.e., + +- RSA is no longer included, found in the OpenSSL library +- IDEA is no longer included, its use is deprecated +- DES is now external, in the OpenSSL library +- GMP is no longer used, and instead we call BN code from OpenSSL +- Zlib is now external, in a library +- The make-ssh-known-hosts script is no longer included +- TSS has been removed +- MD5 is now external, in the OpenSSL library +- RC4 support has been replaced with ARC4 support from OpenSSL +- Blowfish is now external, in the OpenSSL library + +[The licence continues] + +Note that any information and cryptographic algorithms used in this +software are publicly available on the Internet and at any major +bookstore, scientific library, and patent office worldwide. More +information can be found e.g. at "http://www.cs.hut.fi/crypto". + +The legal status of this program is some combination of all these +permissions and restrictions. Use only at your own responsibility. +You will be responsible for any legal consequences yourself; I am not +making any claims whether possessing or using this is legal or not in +your country, and I am not taking any responsibility on your behalf. + + +NO WARRANTY + +BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + +2) +The 32-bit CRC compensation attack detector in deattack.c was +contributed by CORE SDI S.A. under a BSD-style license. + +Cryptographic attack detector for ssh - source code + +Copyright (c) 1998 CORE SDI S.A., Buenos Aires, Argentina. + +All rights reserved. Redistribution and use in source and binary +forms, with or without modification, are permitted provided that +this copyright notice is retained. + +THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES ARE DISCLAIMED. IN NO EVENT SHALL CORE SDI S.A. BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY OR +CONSEQUENTIAL DAMAGES RESULTING FROM THE USE OR MISUSE OF THIS +SOFTWARE. + +Ariel Futoransky + + +3) +ssh-keyscan was contributed by David Mazieres under a BSD-style +license. + +Copyright 1995, 1996 by David Mazieres . + +Modification and redistribution in source and binary forms is +permitted provided that due credit is given to the author and the +OpenBSD project by leaving this copyright notice intact. + +4) +The Rijndael implementation by Vincent Rijmen, Antoon Bosselaers +and Paulo Barreto is in the public domain and distributed +with the following license: + +@version 3.0 (December 2000) + +Optimised ANSI C code for the Rijndael cipher (now AES) + +@author Vincent Rijmen +@author Antoon Bosselaers +@author Paulo Barreto + +This code is hereby placed in the public domain. + +THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +5) +One component of the ssh source code is under a 3-clause BSD license, +held by the University of California, since we pulled these parts from +original Berkeley code. + +Copyright (c) 1983, 1990, 1992, 1993, 1995 +The Regents of the University of California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +3. Neither the name of the University nor the names of its contributors +may be used to endorse or promote products derived from this software +without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +6) +Remaining components of the software are provided under a standard +2-term BSD licence with the following names as copyright holders: + +Markus Friedl +Theo de Raadt +Niels Provos +Dug Song +Aaron Campbell +Damien Miller +Kevin Steves +Daniel Kouril +Wesley Griffin +Per Allansson +Nils Nordman +Simon Wilkinson + +Portable OpenSSH additionally includes code from the following copyright +holders, also under the 2-term BSD license: + +Ben Lindstrom +Tim Rice +Andre Lucas +Chris Adams +Corinna Vinschen +Cray Inc. +Denis Parker +Gert Doering +Jakob Schlyter +Jason Downs +Juha Yrjölä +Michael Stone +Networks Associates Technology, Inc. +Solar Designer +Todd C. Miller +Wayne Schroeder +William Jones +Darren Tucker +Sun Microsystems +The SCO Group +Daniel Walsh +Red Hat, Inc +Simon Vallet / Genoscope + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +8) Portable OpenSSH contains the following additional licenses: + +a) md5crypt.c, md5crypt.h + +"THE BEER-WARE LICENSE" (Revision 42): + wrote this file. As long as you retain this +notice you can do whatever you want with this stuff. If we meet +some day, and you think this stuff is worth it, you can buy me a +beer in return. Poul-Henning Kamp + +b) snprintf replacement + +Copyright Patrick Powell 1995 +This code is based on code written by Patrick Powell +(papowell@astart.com) It may be used for any purpose as long as this +notice remains intact on all source code distributions + +c) Compatibility code (openbsd-compat) + +Apart from the previously mentioned licenses, various pieces of code +in the openbsd-compat/ subdirectory are licensed as follows: + +Some code is licensed under a 3-term BSD license, to the following +copyright holders: + +Todd C. Miller +Theo de Raadt +Damien Miller +Eric P. Allman +The Regents of the University of California +Constantin S. Svintsoff + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +3. Neither the name of the University nor the names of its contributors +may be used to endorse or promote products derived from this software +without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +Some code is licensed under an ISC-style license, to the following +copyright holders: + +Internet Software Consortium. +Todd C. Miller +Reyk Floeter +Chad Mynhier + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND TODD C. MILLER DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL TODD C. MILLER BE LIABLE +FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +Some code is licensed under a MIT-style license to the following +copyright holders: + +Free Software Foundation, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, distribute with modifications, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR +THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name(s) of the above copyright +holders shall not be used in advertising or otherwise to promote the +sale, use or other dealings in this Software without prior written +authorization. +------ +$OpenBSD: LICENCE,v 1.19 2004/08/30 09:18:08 markus Exp $ + +>>> openssl-1.0.2q-1.ph2 + +LICENSE ISSUES +============== + +The OpenSSL toolkit stays under a double license, i.e. both the conditions of +the OpenSSL License and the original SSLeay license apply to the toolkit. +See below for the actual license texts. Actually both licenses are BSD-style +Open Source licenses. In case of any license issues related to OpenSSL +please contact openssl-core@openssl.org. + +OpenSSL License +--------------- + +/ ==================================================================== +Copyright (c) 1998-2018 The OpenSSL Project. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in +the documentation and/or other materials provided with the +distribution. + +3. All advertising materials mentioning features or use of this +software must display the following acknowledgment: +"This product includes software developed by the OpenSSL Project +for use in the OpenSSL Toolkit. (http://www.openssl.org/)" + +4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to +endorse or promote products derived from this software without +prior written permission. For written permission, please contact +openssl-core@openssl.org. + +5. Products derived from this software may not be called "OpenSSL" +nor may "OpenSSL" appear in their names without prior written +permission of the OpenSSL Project. + +6. Redistributions of any form whatsoever must retain the following +acknowledgment: +"This product includes software developed by the OpenSSL Project +for use in the OpenSSL Toolkit (http://www.openssl.org/)" + +THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY +EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR +ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. +==================================================================== + +This product includes cryptographic software written by Eric Young +(eay@cryptsoft.com). This product includes software written by Tim +Hudson (tjh@cryptsoft.com). + +/ + +Original SSLeay License +----------------------- + +/ Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) +All rights reserved. + +This package is an SSL implementation written +by Eric Young (eay@cryptsoft.com). +The implementation was written so as to conform with Netscapes SSL. + +This library is free for commercial and non-commercial use as long as +the following conditions are aheared to. The following conditions +apply to all code found in this distribution, be it the RC4, RSA, +lhash, DES, etc., code; not just the SSL code. The SSL documentation +included with this distribution is covered by the same copyright terms +except that the holder is Tim Hudson (tjh@cryptsoft.com). + +Copyright remains Eric Young's, and as such any Copyright notices in +the code are not to be removed. +If this package is used in a product, Eric Young should be given attribution +as the author of the parts of the library used. +This can be in the form of a textual message at program startup or +in documentation (online or textual) provided with the package. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the copyright +notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +3. All advertising materials mentioning features or use of this software +must display the following acknowledgement: +"This product includes cryptographic software written by +Eric Young (eay@cryptsoft.com)" +The word 'cryptographic' can be left out if the rouines from the library +being used are not cryptographic related :-). +4. If you include any Windows specific code (or a derivative thereof) from +the apps directory (application code) you must include an acknowledgement: +"This product includes software written by Tim Hudson (tjh@cryptsoft.com)" + +THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +The licence and distribution terms for any publically available version or +derivative of this code cannot be changed. i.e. this code cannot simply be +copied and put under another distribution licence +[including the GNU Public Licence.] + + +ADDITIONAL LICENSE INFORMATION: + +> Public Domain + +openssl-1.0.2q.tar.gz\openssl-1.0.2q.tar\openssl-1.0.2q\crypto\aes\asm\vpaes-x86.pl + +By Mike Hamburg (Stanford University), 2009 +Public domain. + +For details see http://shiftleft.org/papers/vector_aes/ and +http://crypto.stanford.edu/vpaes/. + +> OpenSSL + +openssl-1.0.2m.tar.gz\openssl-1.0.2m.tar\openssl-1.0.2m\crypto\aes\asm\bsaes-armv7.pl + +[PLEASE NOTE: VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS SUBCOMPONENT UNDER THE TERMS OF THE OPENSSL LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] + +Written by Andy Polyakov for the OpenSSL +project. The module is, however, dual licensed under OpenSSL and +CRYPTOGAMS licenses depending on where you obtain it. For further +details see http://www.openssl.org/~appro/cryptogams/. + +Specific modes and adaptation for Linux kernel by Ard Biesheuvel +. Permission to use under GPL terms is +granted. + +> BSD + +openssl-1.0.2q.tar.gz\openssl-1.0.2q.tar\openssl-1.0.2q\crypto\camellia\asm\cmll-x86_64.pl + +[PLEASE NOTE: VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS SUBCOMPONENT UNDER THE TERMS OF THE BSD LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE] + +Copyright (c) 2008 Andy Polyakov + +This module may be used under the terms of either the GNU General +Public License version 2 or later, the GNU Lesser General Public +License version 2.1 or later, the Mozilla Public License version +1.1 or the BSD License. The exact terms of either license are +distributed along with this module. For further details see +http://www.openssl.org/~appro/camellia/. + +> Apache 2.0 + +openssl-1.0.2q.tar.gz\openssl-1.0.2q.tar\openssl-1.0.2q\crypto\ec\ecp_nistputil.c + +Copyright 2011 Google Inc. + +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. + +> MIT + +openssl-1.0.2q.tar.gz\openssl-1.0.2q.tar\openssl-1.0.2q\crypto\md5\asm\md5-ia64.S + +Copyright (c) 2005 Hewlett-Packard Development Company, L.P. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +> BSD-3 Clause + +openssl-1.0.2q.tar.gz\openssl-1.0.2q.tar\openssl-1.0.2q\crypto\x509v3\v3_pci.c + +Copyright (c) 2004 Kungliga Tekniska Högskolan +(Royal Institute of Technology, Stockholm, Sweden). +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +3. Neither the name of the Institute nor the names of its contributors +may be used to endorse or promote products derived from this software +without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +> BSD- Style + +openssl-1.0.2q.tar.gz\openssl-1.0.2q.tar\openssl-1.0.2q\demos\easy_tls\easy-tls.c + +[PLEASE NOTE: VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE BSD STYLE LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] + +Copyright 1999 Bodo Moeller. All rights reserved. + +This is free software; you can redistributed and/or modify it +unter the terms of either +- the GNU General Public License as published by the +Free Software Foundation, version 1, or (at your option) +any later version, +or +- the following license: +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that each of the following +conditions is met: + +1. Redistributions qualify as "freeware" or "Open Source Software" under +one of the following terms: + +(a) Redistributions are made at no charge beyond the reasonable cost of +materials and delivery. + +(b) Redistributions are accompanied by a copy of the Source Code +or by an irrevocable offer to provide a copy of the Source Code +for up to three years at the cost of materials and delivery. +Such redistributions must allow further use, modification, and +redistribution of the Source Code under substantially the same +terms as this license. + +2. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +3. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in +the documentation and/or other materials provided with the +distribution. + +4. All advertising materials mentioning features or use of this +software must display the following acknowledgment: +"This product includes software developed by Bodo Moeller." +(If available, substitute umlauted o for oe.) + +5. Redistributions of any form whatsoever must retain the following +acknowledgment: +"This product includes software developed by Bodo Moeller." + +THIS SOFTWARE IS PROVIDED BY BODO MOELLER ``AS IS'' AND ANY +EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BODO MOELLER OR +HIS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. + +> BSD- 2 Clause + +openssl-1.0.2q.tar.gz\openssl-1.0.2q.tar\openssl-1.0.2q\crypto\seed\seed.c + +Copyright (c) 2007 KISA(Korea Information Security Agency). All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +2. Neither the name of author nor the names of its contributors may +be used to endorse or promote products derived from this software +without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + + +> Creative Commons Attribution 4.0 + +openssl-1.0.2q.tar.gz\openssl-1.0.2q.tar\openssl-1.0.2q\ssl\heartbeat_test.c + +Creative Commons Attribution 4.0 International (CC By 4.0) +http://creativecommons.org/licenses/by/4.0/deed.en_US + +>>> pcre-8.41-1.ph2 + +PCRE LICENCE +------------ + +PCRE is a library of functions to support regular expressions whose syntax +and semantics are as close as possible to those of the Perl 5 language. + +Release 8 of PCRE is distributed under the terms of the "BSD" licence, as +specified below. The documentation for PCRE, supplied in the "doc" +directory, is distributed under the same terms as the software itself. The data +in the testdata directory is not copyrighted and is in the public domain. + +The basic library functions are written in C and are freestanding. Also +included in the distribution is a set of C++ wrapper functions, and a +just-in-time compiler that can be used to optimize pattern matching. These +are both optional features that can be omitted when the library is built. + + +THE BASIC LIBRARY FUNCTIONS +--------------------------- + +Written by: Philip Hazel +Email local part: ph10 +Email domain: cam.ac.uk + +University of Cambridge Computing Service, +Cambridge, England. + +Copyright (c) 1997-2017 University of Cambridge +All rights reserved. + + +PCRE JUST-IN-TIME COMPILATION SUPPORT +------------------------------------- + +Written by: Zoltan Herczeg +Email local part: hzmester +Emain domain: freemail.hu + +Copyright(c) 2010-2017 Zoltan Herczeg +All rights reserved. + + +STACK-LESS JUST-IN-TIME COMPILER +-------------------------------- + +Written by: Zoltan Herczeg +Email local part: hzmester +Emain domain: freemail.hu + +Copyright(c) 2009-2017 Zoltan Herczeg +All rights reserved. + + +THE C++ WRAPPER FUNCTIONS +------------------------- + +Contributed by: Google Inc. + +Copyright (c) 2007-2012, Google Inc. +All rights reserved. + + +THE "BSD" LICENCE +----------------- + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +Neither the name of the University of Cambridge nor the name of Google +Inc. nor the names of their contributors may be used to endorse or +promote products derived from this software without specific prior +written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +End + +ADDITIONAL LICENSE INFORMATION: + +> BSD 2 clause + +pcre-8.41.tar.bz2\pcre-8.41.tar\pcre-8.41\sljit\sljitConfigInternal.h + +Copyright Zoltan Herczeg (hzmester@freemail.hu). All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are +permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of +conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list +of conditions and the following disclaimer in the documentation and/or other materials +provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT +SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +>MIT STYLE + +pcre-8.41.tar.bz2\pcre-8.41.tar\pcre-8.41\aclocal.m4 + +Copyright (C) 1996-2014 Free Software Foundation, Inc. + +Copyright (C) 1996-2014 Free Software Foundation, Inc. + +This file is free software; the Free Software Foundation +gives unlimited permission to copy and/or distribute it, +with or without modifications, as long as this notice is preserved. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY, to the extent permitted by law; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. + +>>> popt-1.16-5.ph2 + +Copyright (c) 1998 Red Hat Software + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +>>> shadow-4.2.1-16.ph2 + +Copyright (c) 1991 - 1994, Julianne Frances Haugh +Copyright (c) 1996 - 2000, Marek Michalkiewicz +Copyright (c) 2000 - 2006, Tomasz Kloczko +Copyright (c) 2007 - 2011, Nicolas François +All rights reserved + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1 Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer +2 Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution +3 The name of the copyright holders or contributors may not be used to +endorse or promote products derived from this software without +specific prior written permission + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED IN NO EVENT SHALL THE COPYRIGHT +HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE + + +ADDITIONAL LICENSE INFORMATION: + +> GPL 2.0 + +shadow-421tarxz\shadow-421tar\shadow-421\src\vipwc + +Copyright (c) 1997 , Guy Maor +Copyright (c) 1999 - 2000, Marek Michalkiewicz +Copyright (c) 2002 - 2006, Tomasz Kloczko +Copyright (c) 2007 - 2013, Nicolas François +All rights reserved + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE See the GNU +General Public License for more details + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc, 51 Franklin Street, Fifth Floor, +Boston, MA 02110-1301, USA + + +udbachktgz + + +> BSD Style + +shadow-421tarxz\shadow-421tar\shadow-421\src\login_nopamc + +Copyright 1995 by Wietse Venema All rights reserved Individual files +may be covered by other copyrights (as noted in the file itself) + +This material was originally written and compiled by Wietse Venema at +Eindhoven University of Technology, The Netherlands, in 1990, 1991, +1992, 1993, 1994 and 1995 + +Redistribution and use in source and binary forms are permitted +provided that this entire copyright notice is duplicated in all such +copies + +This software is provided "as is" and without any expressed or implied +warranties, including, without limitation, the implied warranties of +merchantibility and fitness for any particular purpose + + +> Public Domain + +shadow-421tarxz\shadow-421tar\shadow-421\man\zh_TW\man1\newgrp1 + +Original author unknown This man page is in the public domain +Modified Sat Oct 9 17:46:48 1993 by faith@csuncedu +TH NEWGRP 1 "9 October 1993" "Linux 12" "Linux Programmer's Manual" + + +> GPL 3.0 + +shadow-421tarxz\shadow-421tar\shadow-421\man\tr\man1\chfn.1 + +chfn.1 -- change your finger information +(c) 1994 by salvatore valente +this program is free software. you can redistribute it and +modify it under the terms of the gnu general public license. +there is no warranty. + +> MIT-Style + +shadow-421tarxz\shadow-421tar\shadow-421\aclocalm4 + +Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, +Inc +This file is free software; the Free Software Foundation +gives unlimited permission to copy and/or distribute it, +with or without modifications, as long as this notice is preserved + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY, to the extent permitted by law; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE + + +> BSD + +[PLEASE NOTE: VMWARE, INC ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE BSD LICENSE THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE] + +shadow-421tarxz\shadow-421tar\shadow-421\man\tr\man1\passwd1 + +Copyright Red Hat, Inc, 1998, 1999, 2002 + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1 Redistributions of source code must retain the above copyright +notice, and the entire permission notice in its entirety, +including the disclaimer of warranties +2 Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution +3 The name of the author may not be used to endorse or promote +products derived from this software without specific prior +written permission + +ALTERNATIVELY, this product may be distributed under the terms of +the GNU Public License, in which case the provisions of the GPL are +required INSTEAD OF the above restrictions (This clause is +necessary due to a potential bad interaction between the GPL and +the restrictions contained in a BSD-style copyright) + +THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE + +Copyright (c) Cristian Gafton, 1998, + + + +> LDP General Public License 1.0 + +shadow-421tarxz\shadow-421tar\shadow-421\man\hu\man1\su1 + +You may copy, distribute and modify under the terms of the LDP General +Public License as specified in the LICENSE file that comes with the +gnumaniak distribution + +The author kindly requests that no comments regarding the "better" +suitability or up\-to\-date notices of any info documentation alternative +is added without contacting him first + +(C) 1999 Ragnar Hojland Espinosa + +GNU su man page +man pages are NOT obsolete! + +TH su 1 "18 August 1999" "GNU Shell Utilities 20" + +>>> sqlite-3.22.0-3.ph2 + +The author disclaims copyright to this source code. In place of +a legal notice, here is a blessing: + +May you do good and not evil. +May you find forgiveness for yourself and forgive others. +May you share freely, never taking more than you give. + +ADDITIONAL LICENSE INFORMATION: + +> MIT-Style + +sqlite-autoconf-3220000.tar.gz\sqlite-autoconf-3220000.tar\sqlite-autoconf-3220000\aclocal.m4 + +Copyright (C) 1996-2014 Free Software Foundation, Inc. + +This file is free software; the Free Software Foundation +gives unlimited permission to copy and/or distribute it, +with or without modifications, as long as this notice is preserved. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY, to the extent permitted by law; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. + +>>> sudo-1.8.20p2-5.ph2 + +Sudo is distributed under the following license: + +Copyright (c) 1994-1996, 1998-2017 +Todd C. Miller + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +Sponsored in part by the Defense Advanced Research Projects +Agency (DARPA) and Air Force Research Laboratory, Air Force +Materiel Command, USAF, under agreement number F39502-99-1-0512. + +The file redblack.c bears the following license: + +Copyright (c) 2001 Emin Martinian + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that neither the name of Emin +Martinian nor the names of any contributors are be used to endorse or +promote products derived from this software without specific prior +written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +The file reallocarray.c bears the following license: + +Copyright (c) 2008 Otto Moerbeek + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +The files getcwd.c, glob.c, glob.h, snprintf.c and sudo_queue.h bear the +following license: + +Copyright (c) 1989, 1990, 1991, 1993 +The Regents of the University of California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +3. Neither the name of the University nor the names of its contributors +may be used to endorse or promote products derived from this software +without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +The file fnmatch.c bears the following license: + +Copyright (c) 2011, VMware, Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: +Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +Neither the name of the VMware, Inc. nor the names of its contributors +may be used to endorse or promote products derived from this software +without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL VMWARE, INC. OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +The file getopt_long.c bears the following license: + + +Copyright (c) 2000 The NetBSD Foundation, Inc. +All rights reserved. + +This code is derived from software contributed to The NetBSD Foundation +by Dieter Baron and Thomas Klausner. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + + +The file inet_pton.c bears the following license: + +Copyright (c) 1996 by Internet Software Consortium. + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS +ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE +CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + + +The embedded copy of zlib bears the following license: + +Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not +claim that you wrote the original software. If you use this software +in a product, an acknowledgment in the product documentation would be +appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be +misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. + +Jean-loup Gailly Mark Adler +jloup@gzip.org madler@alumni.caltech.edu + +> PUBLIC DOMAIN + +sudo-1.8.20p2.tar.gz\sudo-1.8.20p2.tar\sudo-1.8.20p2\lib\util\regress\glob\globtest.c + +Public domain, 2008, Todd C. Miller Todd.Miller@courtesan.com + +>>> vim-8.0.0533-6.ph2 + +Vim is Charityware. You can use and copy it as much as you like, but you are +encouraged to make a donation to help orphans in Uganda. Please read the file +"runtime/doc/uganda.txt" for details (do ":help uganda" inside Vim). + +Summary of the license: There are no restrictions on using or distributing an +unmodified copy of Vim. Parts of Vim may also be distributed, but the license +text must always be included. For modified versions a few restrictions apply. +The license is GPL compatible, you may compile Vim with GPL libraries and +distribute it. + +ADDITIONAL LICENSE INFORMATION: + +>MIT + +vim-8.0.0533\runtime\autoload\netrwFileHandlers.vim + +Copyright (C) 1999-2012 Charles E. Campbell {{{1 +Permission is hereby granted to use and distribute this code, +with or without modifications, provided that this copyright +notice is copied with it. Like anything else that's free, +netrwFileHandlers.vim is provided *as is* and comes with no +warranty of any kind, either expressed or implied. In no +event will the copyright holder be liable for any damages +resulting from the use of this software. + +>GPL 3.0 + +vim-8.0.0533\runtime\plugin\tarPlugin.vim + +tarPlugin.vim -- a Vim plugin for browsing tarfiles +Original was copyright (c) 2002, Michael C. Toren +Modified by Charles E. Campbell +Distributed under the GNU General Public License. + +>GPL 2.0 + +vim-8.0.0533\runtime\tools\efm_perl.pl + +[PLEASE NOTE: VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE GPL 2.PLEASE SEE THE APPENDIX TO REVIEW THE FULL TEXT OF THE GPL 2.0. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] + +Copyright (c) 2001 by Joerg Ziefle +You may use and distribute this software under the same terms as Perl itself. + +>Public Domain + +vim-8.0.0533\src\tee\tee.c + +Copyright (c) 1996, Paul Slootman + +Author: Paul Slootman +(paul@wurtel.hobby.nl, paul@murphy.nl, paulS@toecompst.nl) +Modifications for MSVC: Yasuhiro Matsumoto + +This source code is released into the public domain. It is provided on an +as-is basis and no responsibility is accepted for its failure to perform +as expected. It is worth at least as much as you paid for it! + +>>> xz-5.2.3-2.ph2 + +Author: Lasse Collin +This file has been put into the public domain. +You can do whatever you want with this file. + +ADDITIONAL LICENSE INFORMATION: + +> GPL 2.0 + +xz-5.2.3.tar.xz\xz-5.2.3.tar\xz-5.2.3\src\scripts\xzmore.in + +Copyright (C) 2001, 2002, 2007 Free Software Foundation +Copyright (C) 1992, 1993 Jean-loup Gailly + +Modified for XZ Utils by Andrew Dudman and Lasse Collin. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +> MIT-Style + +xz-5.2.3.tar.xz\xz-5.2.3.tar\xz-5.2.3\m4\visibility.m4 + +Copyright (C) 2005, 2008-2010 Free Software Foundation, Inc. +This file is free software; the Free Software Foundation +gives unlimited permission to copy and/or distribute it, +with or without modifications, as long as this notice is preserved. + +> LGPL 2.1 + +xz-5.2.3.tar.xz\xz-5.2.3.tar\xz-5.2.3\lib\ getopt1.c + +Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98,2004,2006 +Free Software Foundation, Inc. +This file is part of the GNU C Library. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 2.1, or (at your option) +any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License along +with this program; if not, write to the Free Software Foundation, +Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +> GPL 3.0 + +xz-5.2.3.tar.xz\xz-5.2.3.tar\xz-5.2.3\COPYING.GPLv3 + +License: GPL 3.0 + +>>> zlib-1.2.11-1.ph2 + +Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not +claim that you wrote the original software. If you use this software +in a product, an acknowledgment in the product documentation would be +appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be +misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. + +Jean-loup Gailly Mark Adler +jloup@gzip.org madler@alumni.caltech.edu + +ADDITIONAL LICENSE INFORMATION: + +> GPL 2.0 + +zlib-1.2.11.tar.gz\zlib-1.2.11.tar\zlib-1.2.11\contrib\ada\zlib.ads + +Copyright (C) 20022004 Dmitriy Anisimkov + +This library is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or (at +your option) any later version. + +This library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this library; if not, write to the Free Software Foundation, +Inc., 59 Temple Place Suite 330, Boston, MA 021111307, USA. + +As a special exception, if other files instantiate generics from this +unit, or you link this unit with other files to produce an executable, +this unit does not by itself cause the resulting executable to be +covered by the GNU General Public License. This exception does not +however invalidate any other reasons why the executable file might be +covered by the GNU Public License. + +> BSD-Style + +zlib-1.2.11.tar.gz\zlib-1.2.11.tar\zlib-1.2.11\contrib\amd64\ amd64-match.S + +This is free software; you can redistribute it and/or modify it +under the terms of the BSD License. Use by owners of Che Guevarra +parafernalia is prohibited, where possible, and highly discouraged +elsewhere. + +> MIT-Style (Boost Software License) + +zlib-1.2.11.tar.gz\zlib-1.2.11.tar\zlib-1.2.11\contrib\dotzlib\LICENSE_1_0.txt + +Boost Software License - Version 1.0 - August 17th, 2003 + +Permission is hereby granted, free of charge, to any person or organization +obtaining a copy of the software and accompanying documentation covered by +this license (the "Software") to use, reproduce, display, distribute, +execute, and transmit the Software, and to prepare derivative works of the +Software, and to permit third-parties to whom the Software is furnished to +do so, all subject to the following: + +The copyright notices in the Software and this entire statement, including +the above license grant, this restriction and the following disclaimer, +must be included in all copies of the Software, in whole or in part, and +all derivative works of the Software, unless such copies or derivative +works are solely in the form of machine-executable object code generated by +a source language processor. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +> Public Domain + +zlib-1.2.11.tar.gz\zlib-1.2.11.tar\zlib-1.2.11\examples\ fitblk.c + +fitblk.c: example of fitting compressed output to a specified size +Not copyrighted -- provided to the public domain +Version 1.1 25 November 2004 Mark Adler + +--------------- SECTION 4: GNU General Public License, V2.0 ---------- + +GNU General Public License, V2.0 is applicable to the following component(s). + + +>>> e2fsprogs-1.43.4-2.ph2 + +Written by Theodore Ts'o, Copyright 2007, 2008, 2009. + +This file may be redistributed under the terms of the GNU Public License, version 2. + +ADDITIONAL LICENSE INFORMATION : + +> GPL 3.0 + +e2fsprogs-1.43.4.tar.gz\e2fsprogs-1.43.4.tar\e2fsprogs-1.43.4\contrib\fallocate.c + +Copyright (C) 2008 Red Hat, Inc. All rights reserved. +Written by Eric Sandeen + +cvtnum routine taken from xfsprogs, +Copyright (c) 2003-2005 Silicon Graphics, Inc. + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as +published by the Free Software Foundation. + +This program is distributed in the hope that it would be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software Foundation, +Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + +> Public Domain + +e2fsprogs-1.43.4.tar.gz\e2fsprogs-1.43.4.tar\e2fsprogs-1.43.4\config\mkinstalldirs + +mkinstalldirs --- make directory hierarchy +Author: Noah Friedman +Created: 1993-05-16 +Public domain. + +> LGPL 2.0 + +e2fsprogs-1.43.4.tar.gz\e2fsprogs-1.43.4.tar\e2fsprogs-1.43.4\e2fsck\mtrace.c + +Copyright (C) 1991, 1992 Free Software Foundation, Inc. +Written April 2, 1991 by John Gilmore of Cygnus Support. +Based on mcheck.c by Mike Haertel. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with this library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. + +> MIT-Style + +e2fsprogs-1.43.4.tar.gz\e2fsprogs-1.43.4.tar\e2fsprogs-1.43.4\aclocal.m4 + +Copyright (C) 1996-2013 Free Software Foundation, Inc. + +This file is free software; the Free Software Foundation +gives unlimited permission to copy and/or distribute it, +with or without modifications, as long as this notice is preserved. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY, to the extent permitted by law; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. + +> BSD-3 Clause + +e2fsprogs-1.43.4.tar.gz\e2fsprogs-1.43.4.tar\e2fsprogs-1.43.4\lib\uuid\COPYING + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, and the entire permission notice in its entirety, + including the disclaimer of warranties. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote + products derived from this software without specific prior + written permission. + +THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF +WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT +OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. + +> LGPL 3.0 + +e2fsprogs-1.43.4.tar.gz\e2fsprogs-1.43.4.tar\e2fsprogs-1.43.4\lib\blkid\blkid.h.in + +Copyright (C) 2001 Andreas Dilger +Copyright (C) 2003 Theodore Ts'o + +This file may be redistributed under the terms of the GNU Lesser General Public License. + +>>> gcc-6.3.0-7.ph2 + +Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GCC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GCC; see the file COPYING. If not, write to +the Free Software Foundation, 51 Franklin Street, Fifth Floor, +Boston MA 02110-1301, USA. + +ADDITIONAL LICENSE INFORMATION: + +> MIT-Style + +gcc-6.3.0.tar.bz2\gcc-6.3.0.tar\gcc-6.3.0\boehm-gc\cord\cordbscs.c + +Copyright (c) 1993-1994 by Xerox Corporation. All rights reserved. + +THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED +OR IMPLIED. ANY USE IS AT YOUR OWN RISK. + +Permission is hereby granted to use or copy this program +for any purpose, provided the above notices are retained on all copies. +Permission to modify the code and to distribute modified code is granted, +provided the above notices are retained, and a notice that the code was +modified is included with the above copyright notice. + +> GPL 3.0 + +gcc-6.3.0.tar.bz2\gcc-6.3.0.tar\gcc-6.3.0\boehm-gc\testsuite\boehm-gc.c\c.exp + +Copyright (C) 2011 Free Software Foundation, Inc. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; see the file COPYING3. If not see +. + +> GFDL 1.3 + +gcc-6.3.0.tar.bz2\gcc-6.3.0.tar\gcc-6.3.0\gcc\doc\gcov.texi + +Copyright (C) 1996-2013 Free Software Foundation, Inc. +This is part of the GCC manual. +For copying conditions, see the file gcc.texi. + +Copyright @copyright{} 1996-2013 Free Software Foundation, Inc. + +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 or +any later version published by the Free Software Foundation; with the +Invariant Sections being ``GNU General Public License'' and ``Funding +Free Software'', the Front-Cover texts being (a) (see below), and with +the Back-Cover Texts being (b) (see below). A copy of the license is +included in the gfdl(7) man page. + +> BSD with Patent grant + +gcc-6.3.0.tar.bz2\gcc-6.3.0.tar\gcc-6.3.0\gcc\go\gofrontend\LICENSE + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. +Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. + +> LGPL 2.1 + +gcc-6.3.0.tar.bz2\gcc-6.3.0.tar\gcc-6.3.0\gcc\testsuite\gcc.dg\compat\generate-random.h + +Copyright (C) 2004 Free Software Foundation + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with the GNU C Library; if not, write to the Free +Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +> LGPL 3.0 + +gcc-6.3.0.tar.bz2\gcc-6.3.0.tar\gcc-6.3.0\gcc\stab.def + +Table of DBX symbol codes for the GNU system. +Copyright (C) 1988-2013 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 3 of the +License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING3. If +not see . + +> LGPL 2.0 + +gcc-6.3.0.tar.bz2\gcc-6.3.0.tar\gcc-6.3.0\include\demangle.h + +Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, +2003, 2004, 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License +as published by the Free Software Foundation; either version 2, or +(at your option) any later version. + +In addition to the permissions in the GNU Library General Public +License, the Free Software Foundation gives you unlimited +permission to link the compiled version of this file into +combinations with other programs, and to distribute those +combinations without any restriction coming from the use of this +file. (The Library Public License restrictions do apply in other +respects; for example, they cover modification of the file, and +distribution when not linked into a combined executable.) + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +02110-1301, USA. + +> Public Domain + +gcc-6.3.0.tar.bz2\gcc-6.3.0.tar\gcc-6.3.0\libffi\src\dlmalloc.c + +This is a version (aka dlmalloc) of malloc/free/realloc written by +Doug Lea and released to the public domain, as explained at +http://creativecommons.org/licenses/publicdomain. Send questions, +comments, complaints, performance data, etc to dl@cs.oswego.edu. + +> MIT + +gcc-6.3.0.tar.bz2\gcc-6.3.0.tar\gcc-6.3.0\libffi\LICENSE + +Copyright (c) 1996-2014 Anthony Green, Red Hat, Inc and others. +See source files for details. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +``Software''), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +> LGPL 2.1 + +gcc-6.3.0.tar.bz2\gcc-6.3.0.tar\gcc-6.3.0\libffi\msvcc.sh + +[PLEASE NOTE: VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE LGPL 2.1 LICENSE THE TEXT OF WHICH IS SET FORTH IN THE APPENDIX. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] + +BEGIN LICENSE BLOCK +Version: MPL 1.1/GPL 2.0/LGPL 2.1 + +The contents of this file are subject to the Mozilla Public License Version +1.1 (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.mozilla.org/MPL/ + +Software distributed under the License is distributed on an "AS IS" basis, +WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +for the specific language governing rights and limitations under the +License. + +The Original Code is the MSVC wrappificator. + +The Initial Developer of the Original Code is +Timothy Wall . +Portions created by the Initial Developer are Copyright (C) 2009 +the Initial Developer. All Rights Reserved. + +Contributor(s): +Daniel Witte + +Alternatively, the contents of this file may be used under the terms of +either the GNU General Public License Version 2 or later (the "GPL"), or +the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +in which case the provisions of the GPL or the LGPL are applicable instead +of those above. If you wish to allow use of your version of this file only +under the terms of either the GPL or the LGPL, and not to allow others to +use your version of this file under the terms of the MPL, indicate your +decision by deleting the provisions above and replace them with the notice +and other provisions required by the GPL or the LGPL. If you do not delete +the provisions above, a recipient may use your version of this file under +the terms of any one of the MPL, the GPL or the LGPL. + +END LICENSE BLOCK + +> GPL 3.0 (with runtime library exception) + +gcc-6.3.0.tar.bz2\gcc-6.3.0.tar\gcc-6.3.0\libgcc\config\aarch64\crti.S + +Machine description for AArch64 architecture. +Copyright (C) 2009-2013 Free Software Foundation, Inc. +Contributed by ARM Ltd. + +This file is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 3, or (at your option) any +later version. + +This file is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +. + +> LGPL 2.1(with linking exception) + +gcc-6.3.0.tar.bz2\gcc-6.3.0.tar\gcc-6.3.0\libgcc\config\c6x\sfp-machine.h + +Copyright (C) 2010-2013 Free Software Foundation, Inc. + +This files is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +In addition to the permissions in the GNU Lesser General Public +License, the Free Software Foundation gives you unlimited +permission to link the compiled version of this file into +combinations with other programs, and to distribute those +combinations without any restriction coming from the use of this +file. (The Lesser General Public License restrictions do apply in +other respects; for example, they cover modification of the file, +and distribution when not linked into a combine executable.) + +This file is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with GCC; see the file COPYING.LIB. If not see +. + +> GPL 2.0 (with linking exception) + +gcc-6.3.0.tar.bz2\gcc-6.3.0.tar\gcc-6.3.0\libiberty\testsuite\test-expandargv.c + +Copyright (C) 2006 Free Software Foundation, Inc. +Written by Carlos O'Donell + +This file is part of the libiberty library, which is part of GCC. + +This file is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +In addition to the permissions in the GNU General Public License, the +Free Software Foundation gives you unlimited permission to link the +compiled version of this file into combinations with other programs, +and to distribute those combinations without any restriction coming +from the use of this file. (The General Public License restrictions +do apply in other respects; for example, they cover modification of +the file, and distribution when not linked into a combined +executable.) + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + +> MIT-Style + +gcc-6.3.0.tar.bz2\gcc-6.3.0.tar\gcc-6.3.0\libjava\classpath\external\jsr166\readme + +Copyright 2002-2004 Sun Microsystems, Inc. All rights reserved. Use is +subject to the following license terms. + +"Sun hereby grants you a non-exclusive, worldwide, non-transferrable +license to use and distribute the Java Software technologies as part +of a larger work in source and binary forms, with or without +modification, provided that the following conditions are met: + +-Neither the name of or trademarks of Sun may be used to endorse or +promote products derived from the Java Software technology without +specific prior written permission. + +-Redistributions of source or binary code must be accompanied by the +following notice and disclaimers: + +Portions copyright Sun Microsystems, Inc. Used with kind permission. + +This software is provided AS IS, without a warranty of any kind. ALL +EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND +WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PUPOSE OR +NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN +MICROSYSTEMS, INC. AND ITS LICENSORS SHALL NOT BE LIABLE +FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF +USING, MODIFYING OR DISTRIBUTING THE SOFTWARE OR ITS +DERIVATIVES. IN NO EVENT WILL SUN MICROSYSTEMS, INC. OR +ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR +DATA, OR FOR DIRECT, INDIRECT,CONSQUENTIAL, INCIDENTAL +OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF +THE THEORY OR LIABILITY, ARISING OUT OF THE USE OF OR +INABILITY TO USE SOFTWARE, EVEN IF SUN MICROSYSTEMS, INC. +HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +You acknowledge that Software is not designed, licensed or intended for +use in the design, construction, operation or maintenance of any nuclear +facility." + +> MIT + +gcc-6.3.0.tar.bz2\gcc-6.3.0.tar\gcc-6.3.0\libsanitizer\LICENSE.TXT + +[PLEASE NOTE: VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE MIT LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] + +============================================================================== +compiler_rt License +============================================================================== +The compiler_rt library is dual licensed under both the University of Illinois +"BSD-Like" license and the MIT license. As a user of this code you may choose +to use it under either license. As a contributor, you agree to allow your code +to be used under both. + +Full text of the relevant licenses is included below. +============================================================================== +University of Illinois/NCSA +Open Source License + +Copyright (c) 2009-2012 by the contributors listed in CREDITS.TXT + +All rights reserved. + +Developed by: + +LLVM Team + +University of Illinois at Urbana-Champaign + +http://llvm.org + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal with +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimers. + +Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimers in the +documentation and/or other materials provided with the distribution. + +Neither the names of the LLVM Team, University of Illinois at +Urbana-Champaign, nor the names of its contributors may be used to +endorse or promote products derived from this Software without specific +prior written permission. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE +SOFTWARE. +============================================================================== +Copyright (c) 2009-2012 by the contributors listed in CREDITS.TXT + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +============================================================================== +Copyrights and Licenses for Third Party Software Distributed with LLVM: +============================================================================== +The LLVM software contains code written by third parties. Such software will +have its own individual LICENSE.TXT file in the directory in which it appears. +This file will describe the copyrights, license, and restrictions which apply +to that code. + +The disclaimer of warranty in the University of Illinois Open Source License +applies to all code in the LLVM Distribution, and nothing in any of the +other licenses gives permission to use the names of the LLVM Team or the +University of Illinois to endorse or promote products derived from this +Software. + +The following pieces of software have additional or alternate copyrights, +licenses, and/or restrictions: + +Program Directory +------- --------- +mach_override lib/interception/mach_override + +> GFDL 1.2 + +gcc-6.3.0.tar.bz2\gcc-6.3.0.tar\gcc-6.3.0\libstdc++-v3\doc\html\index.html + +Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation +License, Version 1.2 or any later version published by the +Free Software Foundation; with no Invariant Sections, with no +Front-Cover Texts, and with no Back-Cover Texts. + +> Project Gutenberg license + +gcc-6.3.0.tar.bz2\gcc-6.3.0.tar\gcc-6.3.0\libgo\go\compress\testdata\Mark.Twain- +Tom.Sawyer.txt + +The Project Gutenberg EBook of The Adventures of Tom Sawyer, Complete +by Mark Twain (Samuel Clemens) + +This eBook is for the use of anyone anywhere at no cost and with +almost no restrictions whatsoever. You may copy it, give it away or +re-use it under the terms of the Project Gutenberg License included +with this eBook or online at www.gutenberg.net + +> BSD + +gcc-6.3.0.tar.bz2\gcc-6.3.0.tar\gcc-6.3.0\mkdep + +Copyright (c) 1987 Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms are permitted +provided that the above copyright notice and this paragraph are +duplicated in all such forms and that any documentation, +advertising materials, and other materials related to such +distribution and use acknowledge that the software was developed +by the University of California, Berkeley. The name of the +University may not be used to endorse or promote products derived +from this software without specific prior written permission. +THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED +WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + +>>> iproute2-4.10.0-3.ph2 + +Copyright (C) 1999 Pavel Golubev +Copyright (C) 2001-2004 Lubomir Bulej + +chkconfig: 2345 11 89 +description: sets up CBQ-based traffic control + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, see . + +ADDITIONAL LICENSE INFORMATION: + +> GPL 3.0 + +iproute2-4.10.0.tar.xz\iproute2-4.10.0.tar\iproute2-4.10.0\include\linux\if_bonding.h + +(c) Copyright 1999, Thomas Davis, tadavis@lbl.gov + +This software may be used and distributed according to the terms +of the GNU Public License, incorporated herein by reference. + +> BSD- 3 Clause + +iproute2-4.10.0.tar.xz\iproute2-4.10.0.tar\iproute2-4.10.0\include\linux\can.h + +[PLEASE NOTE: VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE BSD- 3 CLAUSE LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] + +Authors: Oliver Hartkopp +Urs Thuermann +Copyright (c) 2002-2007 Volkswagen Group Electronic Research +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +3. Neither the name of Volkswagen nor the names of its contributors +may be used to endorse or promote products derived from this software +without specific prior written permission. + +Alternatively, provided that this notice is retained in full, this +software may be distributed under the terms of the GNU General +Public License ("GPL") version 2, in which case the provisions of the +GPL apply INSTEAD OF those given above. + +The provided data structures and external interfaces from this code +are not restricted to be used by modules with a GPL compatible license. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. + +> BSD- 3 Clause + +iproute2-4.10.0.tar.xz\iproute2-4.10.0.tar\iproute2-4.10.0\include\netinet\tcp.h + +Copyright (c) 1982, 1986, 1993 +The Regents of the University of California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +4. Neither the name of the University nor the names of its contributors +may be used to endorse or promote products derived from this software +without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +> Public Domain + +iproute2-4.10.0.tar.xz\iproute2-4.10.0.tar\iproute2-4.10.0\ip\routel + +Script created by: Stephen R. van den Berg , 1999/04/18 +Donated to the public domain. + +>>> iptables-1.6.1-4.ph2 + +Copyright (C) 2000-2002 Joakim Axelsson +Patrick Schaaf +Martin Josefsson +Copyright (C) 2003-2011 Jozsef Kadlecsik + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License version 2 as +published by the Free Software Foundation. + +ADDITIONAL LICENSE INFORMATION: + +> GPL 3.0 + +iptables-1.6.1.tar.bz2\iptables-1.6.1.tar\iptables-1.6.1\extensions\libip6t_HL.c + +IPv6 Hop Limit Target module +Maciej Soltysiak +Based on HW's ttl target +This program is distributed under the terms of GNU GPL. + +> LGPL 2.0 + +iptables-1.6.1.tar.bz2\iptables-1.6.1.tar\iptables-1.6.1\iptables\getethertype.c + +This file was part of the NYS Library. + +The NYS Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +> Artistic 2.0 + +iptables-1.6.1.tar.bz2\iptables-1.6.1.tar\iptables-1.6.1\iptables\iptables-apply + +Copyright © Martin F. Krafft +Released under the terms of the Artistic Licence 2.0 + +> MIT + +iptables-1.6.1.tar.bz2\iptables-1.6.1.tar\iptables-1.6.1\utils\pf.os + +SYN signatures. Those signatures work for SYN packets only (duh!). + +(C) Copyright 2000-2003 by Michal Zalewski +(C) Copyright 2003 by Mike Frantzen + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +>>> linux-esx-4.9.154-1.ph2 + +Copyright (C) 2012 Red Hat, Inc. All Rights Reserved. +Written by David Howells (dhowells@redhat.com) + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public Licence +as published by the Free Software Foundation; either version +2 of the Licence, or (at your option) any later version. + +ADDITIONAL LICENSE INFORMATION: + +> MIT + +linux-esx-4.9.154-1.ph2.src.rpm\linux-esx-4.9.154-1.ph2.src.cpio\linux-4.9.154.tar.xz\linux-4.9.154.tar\arch\arm\boot\dts\arm-realview-pb1176.dts + +Copyright 2014 Linaro Ltd + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +> OpenSSL + +linux-esx-4.9.154-1.ph2.src.rpm\linux-esx-4.9.154-1.ph2.src.cpio\linux-4.9.154.tar.xz\linux-4.9.154.tar\linux-4.9.154\arch\arm\crypto\aes-armv4.S + +[PLEASE NOTE: VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE OPENSSL LICENSE.PLEASE SEE BELOW FOR THE FULL TEXT OF THE OPENSSL LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE]. + +Written by Andy Polyakov for the OpenSSL +project. The module is, however, dual licensed under OpenSSL and +CRYPTOGAMS licenses depending on where you obtain it. For further +details see http://www.openssl.org/~appro/cryptogams/. + + +> GPL 3.0 + +linux-esx-4.9.154-1.ph2.src.rpm\linux-esx-4.9.154-1.ph2.src.cpio\linux-4.9.154.tar.xz\linux-4.9.154.tar\linux-4.9.154\arch\arm\mach-imx\pm-imx27.c + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License. + +> LGPL 2.0 + +linux-esx-4.9.154-1.ph2.src.rpm\linux-esx-4.9.154-1.ph2.src.cpio\linux-4.9.154.tar.xz\linux-4.9.154.tar\linux-4.9.154\arch\arm\mach-orion5x\dns323-setup.c + +Copyright (C) 2010 Benjamin Herrenschmidt + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +> BSD- Style + +linux-esx-4.9.154-1.ph2.src.rpm\linux-esx-4.9.154-1.ph2.src.cpio\linux-4.9.154.tar.xz\linux-4.9.154.tar\arch\arm\nwfpe\milieu.h + +his C header file is part of the SoftFloat IEC/IEEE Floating-point +Arithmetic Package, Release 2. + +Written by John R. Hauser. This work was made possible in part by the +International Computer Science Institute, located at Suite 600, 1947 Center +Street, Berkeley, California 94704. Funding was partially provided by the +National Science Foundation under grant MIP-9311980. The original version +of this code was written as part of a project to build a fixed-point vector +processor in collaboration with the University of California at Berkeley, +overseen by Profs. Nelson Morgan and John Wawrzynek. More information +is available through the Web page +http://www.jhauser.us/arithmetic/SoftFloat-2b/SoftFloat-source.txt + +THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort +has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT +TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO +PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY +AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. + +Derivative works are acceptable, even for commercial purposes, so long as +(1) they include prominent notice that the work is derivative, and (2) they +include prominent notice akin to these three paragraphs for those parts of +this code that are retained. + +> BSD- 3 Clause + +linux-esx-4.9.154-1.ph2.src.rpm\linux-esx-4.9.154-1.ph2.src.cpio\linux-4.9.154.tar.xz\linux-4.9.154.tar\arch\blackfin\Clear_BSD.txt + +Copyright (c) 2012, Analog Devices, Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted (subject to the limitations in the +disclaimer below) provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the +distribution. + +* Neither the name of Analog Devices, Inc. nor the names of its +contributors may be used to endorse or promote products derived +from this software without specific prior written permission. + +NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE +GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT +HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +> BSD-3 Clause + +linux-esx-4.9.154-1.ph2.src.rpm\linux-esx-4.9.154-1.ph2.src.cpio\linux-4.9.154.tar.xz\linux-4.9.154.tar\arch\blackfin\include\asm\bfin_pfmon.h + +[PLEASE NOTE: VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE BSD- 3 CLAUSE LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] + +Copyright 2005-2011 Analog Devices Inc. + +Licensed under the Clear BSD license or GPL-2 (or later). + +> BSD- 2 Clause + +linux-esx-4.9.154-1.ph2.src.rpm\linux-esx-4.9.154-1.ph2.src.cpio\linux-4.9.154.tar.xz\linux-4.9.154.tar\arch\cris\arch-v10\lib\memset.c + +Copyright (C) 1999-2005 Axis Communications. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +2. Neither the name of Axis Communications nor the names of its +contributors may be used to endorse or promote products derived +from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY AXIS COMMUNICATIONS AND ITS CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL AXIS +COMMUNICATIONS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING +IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +ena_linux_1.1.3.tar.gz, linux-4.4.111.tar.xz + +> MIT- Style + +linux-esx-4.9.154-1.ph2.src.rpm\linux-esx-4.9.154-1.ph2.src.cpio\linux-4.9.154.tar.xz\linux-4.9.154.tar\arch\m68k\fpsp040\README + +M68040 Software Package Copyright (c) 1993, 1994 Motorola Inc. +All rights reserved. + +THE SOFTWARE is provided on an "AS IS" basis and without warranty. +To the maximum extent permitted by applicable law, +MOTOROLA DISCLAIMS ALL WARRANTIES WHETHER EXPRESS OR IMPLIED, +INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A +PARTICULAR PURPOSE and any warranty against infringement with +regard to the SOFTWARE (INCLUDING ANY MODIFIED VERSIONS THEREOF) +and any accompanying written materials. + +To the maximum extent permitted by applicable law, +IN NO EVENT SHALL MOTOROLA BE LIABLE FOR ANY DAMAGES WHATSOEVER +(INCLUDING WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS +PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR +OTHER PECUNIARY LOSS) ARISING OF THE USE OR INABILITY TO USE THE +SOFTWARE. Motorola assumes no responsibility for the maintenance +and support of the SOFTWARE. + +You are hereby granted a copyright license to use, modify, and +distribute the SOFTWARE so long as this entire notice is retained +without alteration in any modified and/or redistributed versions, +and that such modified versions are clearly identified as such. +No licenses are granted by implication, estoppel or otherwise +under any patents or trademarks of Motorola, Inc. + +> GPL 2.0 with Special Exception + +linux-esx-4.9.154-1.ph2.src.rpm\linux-esx-4.9.154-1.ph2.src.cpio\linux-4.9.154.tar.xz\linux-4.9.154.tar\arch\m68k\lib\divsi3.S + +Copyright (C) 1994, 1996, 1997, 1998 Free Software Foundation, Inc. + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 2, or (at your option) any +later version. + +In addition to the permissions in the GNU General Public License, the +Free Software Foundation gives you unlimited permission to link the +compiled version of this file with other programs, and to distribute +those programs without any restriction coming from the use of this +file. (The General Public License restrictions do apply in other +respects; for example, they cover modification of the file, and +distribution when not linked into another program.) + +This file is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; see the file COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. + +As a special exception, if you link this library with files +compiled with GCC to produce an executable, this does not cause +the resulting executable to be covered by the GNU General Public License. +This exception does not however invalidate any other reasons why +the executable file might be covered by the GNU General Public License. + +> MIT- Style + +linux-esx-4.9.154-1.ph2.src.rpm\linux-esx-4.9.154-1.ph2.src.cpio\linux-4.9.154.tar.xz\linux-4.9.154.tar\arch\m68k\math-emu\fp_log.c + +Copyright (c) 1998-1999 David Huggins-Daines / Roman Zippel. + +I hereby give permission, free of charge, to copy, modify, and +redistribute this software, in source or binary form, provided that +the above copyright notice and the following disclaimer are included +in all such copies. + +THIS SOFTWARE IS PROVIDED "AS IS", WITH ABSOLUTELY NO WARRANTY, REAL +OR IMPLIED. + +> Third Party + +linux-esx-4.9.154-1.ph2.src.rpm\linux-esx-4.9.154-1.ph2.src.cpio\linux-4.9.154.tar.xz\linux-4.9.154.tar\arch\microblaze\lib\memcpy.c + +Copyright (C) 2008-2009 Michal Simek +Copyright (C) 2008-2009 PetaLogix +Copyright (C) 2007 John Williams + +Reasonably optimised generic C-code for memcpy on Microblaze +This is generic C code to do efficient, alignment-aware memcpy. + +It is based on demo code originally Copyright 2001 by Intel Corp, taken from +http://www.embedded.com/showArticle.jhtml?articleID=19205567 + +Attempts were made, unsuccessfully, to contact the original +author of this code (Michael Morrow, Intel). Below is the original +copyright notice. + +This software has been developed by Intel Corporation. +Intel specifically disclaims all warranties, express or +implied, and all liability, including consequential and +other indirect damages, for the use of this program, including +liability for infringement of any proprietary rights, +and including the warranties of merchantability and fitness +for a particular purpose. Intel does not assume any +responsibility for and errors which may appear in this program +not any responsibility to update it. + +> BSD- 2 Clause + +linux-esx-4.9.154-1.ph2.src.rpm\linux-esx-4.9.154-1.ph2.src.cpio\linux-4.9.154.tar.xz\linux-4.9.154.tar\arch\mips\include\asm\netlogic\xlp-hal\bridge.h + +[PLEASE NOTE: VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE BSD- 2 CLAUSE LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] + +Copyright 2003-2011 NetLogic Microsystems, Inc. (NetLogic). All rights +reserved. + +This software is available to you under a choice of one of two +licenses. You may choose to be licensed under the terms of the GNU +General Public License (GPL) Version 2, available from the file +COPYING in the main directory of this source tree, or the NetLogic +license below: + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in +the documentation and/or other materials provided with the +distribution. + +THIS SOFTWARE IS PROVIDED BY NETLOGIC ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL NETLOGIC OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +> BSD + +linux-esx-4.9.154-1.ph2.src.rpm\linux-esx-4.9.154-1.ph2.src.cpio\linux-4.9.154.tar.xz\linux-4.9.154.tar\arch\mips\sgi-ip22\ip22-eisa.c + +[PLEASE NOTE: VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE BSD LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] + +(C) 2002 Pascal Dameme +and Marc Zyngier + +This code is released under both the GPL version 2 and BSD +licenses. Either license may be used. + +This code offers a very basic support for this EISA bus present in +the SGI Indigo-2. It currently only supports PIO (forget about DMA +for the time being). This is enough for a low-end ethernet card, +but forget about your favorite SCSI card... + +> LGPL 2.1 + +linux-esx-4.9.154-1.ph2.src.rpm\linux-esx-4.9.154-1.ph2.src.cpio\linux-4.9.154.tar.xz\linux-4.9.154.tar\linux-4.9.97\arch\parisc\lib\memset.c + +Copyright (C) 1991, 1997 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with the GNU C Library; if not, write to the Free +Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +> GPL 1.0 + +linux-esx-4.9.154-1.ph2.src.rpm\linux-esx-4.9.154-1.ph2.src.cpio\linux-4.9.154.tar.xz\linux-4.9.154.tar\arch\powerpc\xmon\ppc.h + +Copyright 1994, 1995, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +Free Software Foundation, Inc. +Written by Ian Lance Taylor, Cygnus Support + +This file is part of GDB, GAS, and the GNU binutils. + +GDB, GAS, and the GNU binutils are free software; you can redistribute +them and/or modify them under the terms of the GNU General Public +License as published by the Free Software Foundation; either version +1, or (at your option) any later version. + +GDB, GAS, and the GNU binutils are distributed in the hope that they +will be useful, but WITHOUT ANY WARRANTY; without even the implied +warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See +the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this file; see the file COPYING. If not, write to the Free +Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + +> BSD- 3 Clause + +linux-esx-4.9.154-1.ph2.src.rpm\linux-esx-4.9.154-1.ph2.src.cpio\linux-4.9.154.tar.xz\linux-4.9.154.tar\crypto\drbg.c + +[PLEASE NOTE: VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE BSD- 3 Clause LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] + +Copyright Stephan Mueller , 2014 + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright +notice, and the entire permission notice in its entirety, +including the disclaimer of warranties. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote +products derived from this software without specific prior +written permission. + +ALTERNATIVELY, this product may be distributed under the terms of +the GNU General Public License, in which case the provisions of the GPL are +required INSTEAD OF the above restrictions. (This clause is +necessary due to a potential bad interaction between the GPL and +the restrictions contained in a BSD-style copyright.) + +THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF +WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT +OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. + +> GFDL 1.1 + +linux-esx-4.9.154-1.ph2.src.rpm\linux-esx-4.9.154-1.ph2.src.cpio\linux-4.9.154.tar.xz\linux-4.9.154.tar\Documentation\DocBook\media_api.tmpl + +Copyright 2009-2012 +LinuxTV Developers + +Permission is granted to copy, distribute and/or modify +this document under the terms of the GNU Free Documentation License, +Version 1.1 or any later version published by the Free Software +Foundation. A copy of the license is included in the chapter entitled +"GNU Free Documentation License". + +> Open Software License1.1 + +linux-esx-4.9.154-1.ph2.src.rpm\linux-esx-4.9.154-1.ph2.src.cpio\linux-4.9.154.tar.xz\linux-4.9.154.tar\Documentation\DocBook\libata.tmpl + +[PLEASE NOTE: VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE OPEN SOFTWARE LICENSE1.1 LICENSE]. PLEASE SEE APPENDIX FOR THE FULL TEXT OF THE OPEN SOFTWARE LICENSE1.1 LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE] + +Copyright + +The contents of this file are subject to the Open Software License version 1.1 that can be found at +"http://fedoraproject.org/wiki/Licensing:OSL1.1" and is included herein by reference. + +Alternatively, the contents of this file may be used under the terms +of the GNU General Public License version 2 (the "GPL") as distributed +in the kernel source COPYING file, in which case the provisions of +the GPL are applicable instead of the above. If you wish to allow +the use of your version of this file only under the terms of the +GPL and not to allow others to use your version of this file under +the OSL, indicate your decision by deleting the provisions above and +replace them with the notice and other provisions required by the GPL. +If you do not delete the provisions above, a recipient may use your +version of this file under either the OSL or the GPL. + +> CC-Attribution-ShareAlike 2.0 + +linux-esx-4.9.154-1.ph2.src.rpm\linux-esx-4.9.154-1.ph2.src.cpio\linux-4.9.154.tar.xz\linux-4.9.154.tar\Documentation\PCI\pci.txt + +A more complete resource is the third edition of "Linux Device Drivers" +by Jonathan Corbet, Alessandro Rubini, and Greg Kroah-Hartman. +LDD3 is available for free (under Creative Commons License) from: + +http://lwn.net/Kernel/LDD3/ + +However, keep in mind that all documents are subject to "bit rot". +Refer to the source code if things are not working as described here. + +Please send questions/comments/patches about Linux PCI API to the +"Linux PCI" mailing list. + +> BSD- Style + +linux-esx-4.9.154-1.ph2.src.rpm\linux-esx-4.9.154-1.ph2.src.cpio\linux-4.9.154.tar.xz\linux-4.9.154.tar\Documentation\scsi\dpti.txt + +Redistribution and use in source form, with or without modification, are +permitted provided that redistributions of source code must retain the +above copyright notice, this list of conditions and the following disclaimer. + +This software is provided `as is' by Adaptec and +any express or implied warranties, including, but not limited to, the +implied warranties of merchantability and fitness for a particular purpose, +are disclaimed. In no event shall Adaptec be +liable for any direct, indirect, incidental, special, exemplary or +consequential damages (including, but not limited to, procurement of +substitute goods or services; loss of use, data, or profits; or business +interruptions) however caused and on any theory of liability, whether in +contract, strict liability, or tort (including negligence or otherwise) +arising in any way out of the use of this driver software, even if advised +of the possibility of such damage. + +> GFDL 1.2 + +linux-esx-4.9.154-1.ph2.src.rpm\linux-esx-4.9.154-1.ph2.src.cpio\linux-4.9.154.tar.xz\linux-4.9.154.tar\Documentation\trace\ftrace.txt + +[PLEASE NOTE: VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE GFDL 1.2 LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] + +Copyright 2008 Red Hat Inc. +Author: Steven Rostedt +License: The GNU Free Documentation License, Version 1.2 +(dual licensed under the GPL v2) + +> MS-LPL + +linux-esx-4.9.154-1.ph2.src.rpm\linux-esx-4.9.154-1.ph2.src.cpio\linux-4.9.154.tar.xz\linux-4.9.154.tar\Documentation\usb\linux-cdc-acm.inf + +Based on INF template which was: +Copyright (c) 2000 Microsoft Corporation +Copyright (c) 2007 Microchip Technology Inc. +likely to be covered by the MLPL as found at: + + +> Public Domain + +linux-esx-4.9.154-1.ph2.src.rpm\linux-esx-4.9.154-1.ph2.src.cpio\linux-4.9.154.tar.xz\linux-4.9.154.tar\Documentation\vDSO\parse_vdso.c + +Written by Andrew Lutomirski, 2011-2014. + +This code is meant to be linked in to various programs that run on Linux. +As such, it is available with as few restrictions as possible. This file +is licensed under the Creative Commons Zero License, version 1.0, +available at http://creativecommons.org/publicdomain/zero/1.0/legalcode + +> GPL 2.0 + +linux-esx-4.9.154-1.ph2.src.rpm\linux-esx-4.9.154-1.ph2.src.cpio\linux-4.9.154.tar.xz\linux-4.9.154.tar\drivers\ide\ide-cs.c + +[PLEASE NOTE: VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE GPL 2.0 LICENSE. PLEASE SEE APPENDIX FOR THE FULL TEXT OF THE GPL 2.0 LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] + +The contents of this file are subject to the Mozilla Public +License Version 1.1 (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.mozilla.org/MPL/ + +Software distributed under the License is distributed on an "AS +IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +implied. See the License for the specific language governing +rights and limitations under the License. + +The initial developer of the original code is David A. Hinds +. Portions created by David A. Hinds +are Copyright (C) 1999 David A. Hinds. All Rights Reserved. + +Alternatively, the contents of this file may be used under the +terms of the GNU General Public License version 2 (the "GPL"), in +which case the provisions of the GPL are applicable instead of the +above. If you wish to allow the use of your version of this file +only under the terms of the GPL and not to allow others to use +your version of this file under the MPL, indicate your decision +by deleting the provisions above and replace them with the notice +and other provisions required by the GPL. If you do not delete +the provisions above, a recipient may use your version of this +file under either the MPL or the GPL. + +> Apache 2.0 + +linux-esx-4.9.154-1.ph2.src.rpm\linux-esx-4.9.154-1.ph2.src.cpio\linux-4.9.154.tar.xz\linux-4.9.154.tar\drivers\staging\android\ashmem.h + +[PLEASE NOTE: VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE APACHE 2.0 LICENSE. PLEASE SEE APPENDIX FOR THE FULL TEXT OF THE APACHE 2.0 LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] + +Copyright 2008 Google Inc. +Author: Robert Love + +This file is dual licensed. It may be redistributed and/or modified +under the terms of the Apache 2.0 License OR version 2 of the GNU +General Public License. + +> BSD- 2 Clause + +linux-esx-4.9.154-1.ph2.src.rpm\linux-esx-4.9.154-1.ph2.src.cpio\linux-4.9.154.tar.xz\linux-4.9.154.tar\drivers\input\keyboard\hil_kbd.c + +[PLEASE NOTE: VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE BSD- 2 Clause LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] + +Copyright (c) 2001 Brian S. Julin +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright +notice, this list of conditions, and the following disclaimer, +without modification. +2. The name of the author may not be used to endorse or promote products +derived from this software without specific prior written permission. + +Alternatively, this software may be distributed under the terms of the +GNU General Public License ("GPL"). + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + +> BSD- 4 Clause + +linux-esx-4.9.154-1.ph2.src.rpm\linux-esx-4.9.154-1.ph2.src.cpio\linux-4.9.154.tar.xz\linux-4.9.154.tar\drivers\net\ppp\bsd_comp.c + +Copyright (c) 1985, 1986 The Regents of the University of California. +All rights reserved. + +This code is derived from software contributed to Berkeley by +James A. Woods, derived from original work by Spencer Thomas +and Joseph Orost. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +3. All advertising materials mentioning features or use of this software +must display the following acknowledgement: +This product includes software developed by the University of +California, Berkeley and its contributors. +4. Neither the name of the University nor the names of its contributors +may be used to endorse or promote products derived from this software +without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +> GPL 2.0 with Special Exception + +linux-esx-4.9.154-1.ph2.src.rpm\linux-esx-4.9.154-1.ph2.src.cpio\linux-4.9.154.tar.xz\linux-4.9.154.tar\fs\jffs2\LICENCE + +Copyright © 2001-2007 Red Hat, Inc. and others + +JFFS2 is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 2 or (at your option) any later +version. + +JFFS2 is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License along +with JFFS2; if not, write to the Free Software Foundation, Inc., +59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + +As a special exception, if other files instantiate templates or use +macros or inline functions from these files, or you compile these +files and link them with other works to produce a work based on these +files, these files do not by themselves cause the resulting work to be +covered by the GNU General Public License. However the source code for +these files must still be made available in accordance with section (3) +of the GNU General Public License. + +This exception does not invalidate any other reasons why a work based on +this file might be covered by the GNU General Public License. + +> MIT + +linux-esx-4.9.154-1.ph2.src.rpm\linux-esx-4.9.154-1.ph2.src.cpio\linux-4.9.154.tar.xz\linux-4.9.154.tar\include\dt-bindings\clock\sun4i-a10-pll2.h + +[PLEASE NOTE: VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE MIT LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] + +Copyright 2015 Maxime Ripard + +Maxime Ripard + +This file is dual-licensed: you can use it either under the terms +of the GPL or the X11 license, at your option. Note that this dual +licensing only applies to this file, and not this project as a +whole. + +a) This file is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +This file is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +Or, alternatively, + +b) Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +> LGPL 3.0 + +linux-esx-4.9.154-1.ph2.src.rpm\linux-esx-4.9.154-1.ph2.src.cpio\linux-4.9.154.tar.xz\linux-4.9.154.tar\include\uapi\linux\dm-ioctl.h + +Copyright (C) 2001 - 2003 Sistina Software (UK) Limited. +Copyright (C) 2004 - 2009 Red Hat, Inc. All rights reserved. + +This file is released under the LGPL. + +>>> logrotate-3.11.0-3.ph2 + +Copyright (c) 2006-2012 Novell, Inc. All Rights Reserved. + + +This program is free software; you can redistribute it and/or modify it under +the terms of version 2 of the GNU General Public License as published by the +Free Software Foundation. + +This program is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along with +this program; if not, contact Novell, Inc. + +To contact Novell about this file by physical or electronic mail, you may find +current contact information at www.novell.com. + +ADDITIONAL LICENSE INFORMATION: + +> BSD-3 + +logrotate-3.11.0-3.ph2.src-1.rpm\logrotate-3.11.0-3.ph2.src.cpio\logrotate-3.11.0.tar.gz\logrotate-3.11.0.tar\logrotate-3.11.0\queue.h + + +Copyright (c) 1991, 1993 +The Regents of the University of California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +3. Neither the name of the University nor the names of its contributors +may be used to endorse or promote products derived from this software +without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +> GPL 3.0 + +logrotate-3.11.0-3.ph2.src-1.rpm\logrotate-3.11.0-3.ph2.src.cpio\logrotate-3.11.0.tar.gz\logrotate-3.11.0.tar\logrotate-3.11.0\logrotate.c + + +Copyright (C) 1995-2001 Red Hat, Inc.\n"); +fprintf(stderr, +"This may be freely redistributed under the terms of " +"the GNU Public License + +>>> mingetty-1.08-2.ph2 + +Copyright (C) 1996 Florian La Roche +Copyright (C) 2002, 2003 Red Hat, Inc +This getty can only be used as a small console getty. Look at mgetty +for a real modem getty. + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version +2 of the License, or (at your option) any later version. + +>>> net-tools-1.60-11.ph2 + +Version: $Id: ax25_gr.c,v 1.4 1999/01/05 20:53:21 philip Exp $ + +Author: Bernd Eckenfels, +Copyright 1999 Bernd Eckenfels, Germany +base on Code from Jonathan Naylor + +This program is free software; you can redistribute it +and/or modify it under the terms of the GNU General +Public License as published by the Free Software +Foundation; either version 2 of the License, or (at +your option) any later version. + +>>> procps-ng-3.3.15-2.ph2 + +Copyright (C) 2010 Karel Zak +Copyright (C) 2010 Davidlohr Bueso + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + + +ADDITIONAL LICENSE INFORMATION: + +> Public Domain + +procps-ng-3.3.15.tar.xz\procps-ng-3.3.15.tar\procps-ng-3.3.15\mkinstalldirs + +mkinstalldirs --- make directory hierarchy +Author: Noah Friedman +Created: 1993-05-16 +Public domain + + +> LGPL 2.1 + +procps-ng-3.3.15.tar.xz\procps-ng-3.3.15.tar\procps-ng-3.3.15\pmap.c + +pmap.c - print process memory mapping +Copyright 2002 Albert Cahalan + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + +> LGPL 2.0 + +procps-ng-3.3.15.tar.xz\procps-ng-3.3.15.tar\procps-ng-3.3.15\proc\sig.h + +Copyright 1998-2003 by Albert Cahalan; all rights resered. +This file may be used subject to the terms and conditions of the +GNU Library General Public License Version 2, or any later version +at your option, as published by the Free Software Foundation. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Library General Public License for more details. + + +> GPL 3.0 + +procps-ng-3.3.15.tar.xz\procps-ng-3.3.15.tar\procps-ng-3.3.15\misc\git-version-gen + +Copyright (C) 2007-2011 Free Software Foundation, Inc. + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . + +>>> rpm-4.13.0.2-1.ph2 + +Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc. + +NOTE: The canonical source of this file is maintained with the GNU C Library. +Bugs can be reported to bug-glibc@prep.ai.mit.edu. + +This program is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 2, or (at your option) any +later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, +USA. + +ADDITIONAL LICENSE INFORMATION: + +> BSD-3 + +rpm-4.13.0.2-1.ph2.src.rpm\rpm-4.13.0.2-1.ph2.src.cpio\rpm-4.13.0.2-release.tar.gz\rpm-4.13.0.2-release.tar\rpm-rpm-4.13.0.2-release\misc\fts.h + +Copyright (c) 1989, 1993 +The Regents of the University of California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +4. Neither the name of the University nor the names of its contributors +may be used to endorse or promote products derived from this software +without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +> LGPL 2.1 + +rpm-4.13.0.2-1.ph2.src.rpm\rpm-4.13.0.2-1.ph2.src.cpio\rpm-4.13.0.2-release.tar.gz\rpm-4.13.0.2-release.tar\rpm-rpm-4.13.0.2-release\misc\fnmatch.h + +Copyright (C) 1991,92,93,96,97,98,99,2001 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with the GNU C Library; if not, write to the Free +Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +> LGPL 2.0 + +rpm-4.13.0.2-1.ph2.src.rpm\rpm-4.13.0.2-1.ph2.src.cpio\rpm-4.13.0.2-release.tar.gz\rpm-4.13.0.2-release.tar\rpm-rpm-4.13.0.2-release\misc\fnmatch.c + +Copyright (C) 1991-1993, 1996-1999, 2000 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with this library; see the file COPYING.LIB. If not, +write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. + +> GPL 3.0 + +rpm-4.13.0.2-1.ph2.src.rpm\rpm-4.13.0.2-1.ph2.src.cpio\rpm-4.13.0.2-release.tar.gz\rpm-4.13.0.2-release.tar\rpm-rpm-4.13.0.2-release\tools\sepdebugcrcfix.c + +Copyright (C) 2013 Free Software Foundation, Inc. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . + +> Public Domain + +rpm-4.13.0.2-1.ph2.src.rpm\rpm-4.13.0.2-1.ph2.src.cpio\rpm-4.13.0.2-release.tar.gz\rpm-4.13.0.2-release.tar\rpm-rpm-4.13.0.2-release\tools\mkinstalldirs + +Original author: Noah Friedman +Created: 1993-05-16 +Public domain. + +>>> tdnf-1.2.3-6.ph2 + +Copyright (C) 2015 VMware, Inc. All Rights Reserved. + +Licensed under the GNU General Public License v2 (the "License"); +you may not use this file except in compliance with the License. The terms +of the License are located in the COPYING file of this distribution. + +ADDITIONAL LICENSE INFORMATION: + +> LGPL2.1 + +tdnf-1.2.3.tar.gz\tdnf-1.2.3.tar\tdnf-1.2.3\tools\cli\lib\api.c + +Copyright (C) 2017 VMware, Inc. All Rights Reserved. + +Licensed under the GNU Lesser General Public License v2.1 (the "License"); +you may not use this file except in compliance with the License. The terms +of the License are located in the COPYING file of this distribution. + +>>> util-linux-2.32-1.ph2 + +Copyright (C) 2008, Karel Zak +Copyright (C) 2008, James Youngman + +This file is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This file is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + + +Based on scriptreplay.pl by Joey Hess + + +ADDITIONAL LICENSE INFORMATION: + +> GPL 3.0 + +util-linux-2.32-1.ph2.src.rpm\util-linux-2.32-1.ph2.src.cpio\util-linux-2.32.tar.xz\util-linux-2.32.tar\util-linux-2.32\tools\git-version-gen + +Copyright (C) 2007-2011 Free Software Foundation, Inc. + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . + +> BSD 4 + +util-linux-2.32-1.ph2.src.rpm\util-linux-2.32-1.ph2.src.cpio\util-linux-2.32.tar.xz\util-linux-2.32.tar\util-linux-2.32\text-utils\ul.c + +Copyright (c) 1980, 1993 +The Regents of the University of California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +3. All advertising materials mentioning features or use of this software +must display the following acknowledgement: +This product includes software developed by the University of +California, Berkeley and its contributors. +4. Neither the name of the University nor the names of its contributors +may be used to endorse or promote products derived from this software +without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +> PUBLIC DOMAIN + +util-linux-2.32-1.ph2.src.rpm\util-linux-2.32-1.ph2.src.cpio\util-linux-2.32.tar.xz\util-linux-2.32.tar\util-linux-2.32\text-utils\line.c + +line - read one line + +Gunnar Ritter, Freiburg i. Br., Germany, December 2000. + +Public Domain. + + +> BSD + +util-linux-2.32-1.ph2.src.rpm\util-linux-2.32-1.ph2.src.cpio\util-linux-2.32.tar.xz\util-linux-2.32.tar\util-linux-2.32\text-utils\more.c + +Copyright (C) 1980 The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms are permitted +provided that the above copyright notice and this paragraph are +duplicated in all such forms and that any documentation, +advertising materials, and other materials related to such +distribution and use acknowledge that the software was developed +by the University of California, Berkeley. The name of the +University may not be used to endorse or promote products derived +from this software without specific prior written permission. +THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED +WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + +> MIT + +util-linux-2.32-1.ph2.src.rpm\util-linux-2.32-1.ph2.src.cpio\util-linux-2.32.tar.xz\util-linux-2.32.tar\util-linux-2.32\sys-utils\flock.1 + +Copyright 2003-2006 H. Peter Anvin - All Rights Reserved + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall +be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +> BSD 3 + +util-linux-2.32-1.ph2.src.rpm\util-linux-2.32-1.ph2.src.cpio\util-linux-2.32.tar.xz\util-linux-2.32.tar\util-linux-2.32\misc-utils\uuidparse.c + +uuidparse.c --- Interpret uuid encoded information. This program +violates the UUID abstraction barrier by reaching into the +guts of a UUID. + +Based on libuuid/src/uuid_time.c +Copyright (C) 1998, 1999 Theodore Ts'o. + +All alterations (C) 2017 Sami Kerola +The 3-Clause BSD License + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright +notice, and the entire permission notice in its entirety, +including the disclaimer of warranties. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote +products derived from this software without specific prior +written permission. + +THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF +WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT +OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. + +> MIT STYLE + +util-linux-2.32-1.ph2.src.rpm\util-linux-2.32-1.ph2.src.cpio\util-linux-2.32.tar.xz\util-linux-2.32.tar\util-linux-2.32\m4\compiler.m4 + +Copyright (C) 2008-2011 Free Software Foundation, Inc. +This file is free software; the Free Software Foundation +gives unlimited permission to copy and/or distribute it, +with or without modifications, as long as this notice is preserved. + +From Simon Josefsson +-- derivated from coreutils m4/warnings.m4 + +> LGPL 2.0 + +util-linux-2.32-1.ph2.src.rpm\util-linux-2.32-1.ph2.src.cpio\util-linux-2.32.tar.xz\util-linux-2.32.tar\util-linux-2.32\login-utils\setpwnam.c +setpwnam.c -- edit an entry in a password database. + +(c) 1994 Salvatore Valente +This file is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +Edited 11/10/96 (DD/MM/YY ;-) by Nicolai Langfeldt (janl@math.uio.no) +to read /etc/passwd directly so that passwd, chsh and chfn can work on +machines that run NIS (previously YP). Changes will not be made to +usernames starting with +. + +This file is distributed with no warranty. + +Usage: +1) get a struct passwd from getpwnam(). +You should assume a struct passwd has an infinite number of fields, so +you should not try to create one from scratch. +2) edit the fields you want to edit. +3) call setpwnam() with the edited struct passwd. + +A _normal user_ program should never directly manipulate etc/passwd but +/use getpwnam() and (family, as well as) setpwnam(). + +But, setpwnam was made to _edit_ the password file. For use by chfn, +chsh and passwd. _I_ _HAVE_ to read and write /etc/passwd directly. Let +those who say nay be forever silent and think about how getpwnam (and +family) works on a machine running YP. + +Added checks for failure of malloc() and removed error reporting to +stderr, this is a library function and should not print on the screen, +but return appropriate error codes. +27-Jan-97 - poe@daimi.aau.dk + +Thanks to "two guys named Ian". + +$Author: poer $ +$Revision: 1.13 $ +$Date: 1997/06/23 08:26:29 $ + +> LGPL 2.1 + +util-linux-2.32-1.ph2.src.rpm\util-linux-2.32-1.ph2.src.cpio\util-linux-2.32.tar.xz\util-linux-2.32.tar\util-linux-2.32\libsmartcols\COPYING + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later +version. + +The complete text of the license is available in the +../Documentation/licenses/COPYING.LGPLv2.1 file. + +> LGPL 3.0 + +util-linux-2.32-1.ph2.src.rpm\util-linux-2.32-1.ph2.src.cpio\util-linux-2.32.tar.xz\util-linux-2.32.tar\util-linux-2.32\libmount\python\pylibmount.c + +Python bindings for the libmount library. + +Copyright (C) 2013, Red Hat, Inc. All rights reserved. +Written by Ondrej Oprala and Karel Zak + +This file is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 3 of the License, or (at your option) any later version. + +This file is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this file; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +> GPL 3.0 WITH BISON PARSER EXCEPTION + +util-linux-2.32-1.ph2.src.rpm\util-linux-2.32-1.ph2.src.cpio\util-linux-2.32.tar.xz\util-linux-2.32.tar\util-linux-2.32\lib\parse-date.c + +Bison implementation for Yacc-like parsers in C + +Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . + +As a special exception, you may create a larger work that contains +part or all of the Bison parser skeleton and distribute that work +under terms of your choice, so long as that work isn't itself a +parser generator using the skeleton or a modified version thereof +as a parser skeleton. Alternatively, if you modify or redistribute +the parser skeleton itself, you may (at your option) remove this +special exception, which will cause the skeleton and the resulting +Bison output files to be licensed under the GNU General Public +License without this special exception. + +This special exception was added by the Free Software Foundation in +version 2.2 of Bison. + +> GPL 1.0 + +util-linux-2.32-1.ph2.src.rpm\util-linux-2.32-1.ph2.src.cpio\util-linux-2.32.tar.xz\util-linux-2.32.tar\util-linux-2.32\disk-utils\fdisk.c + +Copyright (C) 1992 A. V. Le Blanc (LeBlanc@mcc.ac.uk) +Copyright (C) 2012 Davidlohr Bueso + +Copyright (C) 2007-2013 Karel Zak + +This program is free software. You can redistribute it and/or +modify it under the terms of the GNU General Public License as +published by the Free Software Foundation: either version 1 or +(at your option) any later version. + +> MIT STYLE + +util-linux-2.32-1.ph2.src.rpm\util-linux-2.32-1.ph2.src.cpio\util-linux-2.32.tar.xz\util-linux-2.32.tar\util-linux-2.32\disk-utils\cfdisk.8 + +Copyright 1994 Kevin E. Martin (martin@cs.unc.edu) +Copyright (C) 2014 Karel Zak + +Permission is granted to make and distribute verbatim copies of this +manual provided the copyright notice and this permission notice are +preserved on all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + +--------------- SECTION 5: GNU General Public License, V3.0 ---------- + +GNU General Public License, V3.0 is applicable to the following component(s). + + +>>> bash-4.4.12-3.ph2 + +error.c -- Functions for handling errors. + +Copyright (C) 1993-2009 Free Software Foundation, Inc. + +This file is part of GNU Bash, the Bourne Again SHell. + +Bash is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +Bash is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with Bash. If not, see . + + + +ADDITIONAL LICENSE INFORMATION: + + +>GPL 3.0 WITH BISON PARSER EXCEPTION + + +bash-4.4.tar.gz\bash-4.4.tar\bash-4.4\parser-built + + +A Bison parser, made by GNU Bison 3.0.4. + +Bison interface for Yacc-like parsers in C + +Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . + +As a special exception, you may create a larger work that contains +part or all of the Bison parser skeleton and distribute that work +under terms of your choice, so long as that work isn't itself a +parser generator using the skeleton or a modified version thereof +as a parser skeleton. Alternatively, if you modify or redistribute +the parser skeleton itself, you may (at your option) remove this +special exception, which will cause the skeleton and the resulting +Bison output files to be licensed under the GNU General Public +License without this special exception. + +This special exception was added by the Free Software Foundation in +version 2.2 of Bison. + + +>MIT STYLE + + +bash-4.4.tar.gz\bash-4.4.tar\bash-4.4\README + + +Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. This file is offered as-is, +without any warranty. + + +>GFDL 1.3 + + +bash-4.4.tar.gz\bash-4.4.tar\bash-4.4\doc\bashref.texi + + +Copyright @copyright{} 1988--2016 Free Software Foundation, Inc. + +@quotation +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 or +any later version published by the Free Software Foundation; with no +Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. +A copy of the license is included in the section entitled +``GNU Free Documentation License''. +@end quotation + + +>SIL OPEN FONT LICENSE 1.1 + +bash-4.4.tar.gz\bash-4.4.tar\bash-4.4\doc\bashref.ps + +Copyright: Copyright (c) 1997, 2009 American Mathematical Society +Copyright: (), with Reserved Font Name CMR9. +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is in the accompanying file OFL.txt, and is also +available with a FAQ at: http://scripts.sil.org/OFL. + + +>GPL 2.0 + + +bash-4.4.tar.gz\bash-4.4.tar\bash-4.4\examples\complete\complete-examples + + + +Copyright 2002 Chester Ramey + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +TThis program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software Foundation, +Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +>PUBLIC DOMAIN + + +bash-4.4.tar.gz\bash-4.4.tar\bash-4.4\support\mkinstalldirs + + +Author: Noah Friedman +Created: 1993-05-16 +Public domain + + +>BSD-4 + + +bash-4.4.tar.gz\bash-4.4.tar\bash-4.4\lib\sh\inet_aton.c + + +Copyright (c) 1983, 1990, 1993 +The Regents of the University of California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +3. All advertising materials mentioning features or use of this software +must display the following acknowledgement: +This product includes software developed by the University of +California, Berkeley and its contributors. +4. Neither the name of the University nor the names of its contributors +may be used to endorse or promote products derived from this software +without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. +- + + + +>BSD + + +bash-4.4.tar.gz\bash-4.4.tar\bash-4.4\lib\sh\inet_aton. + + +Portions Copyright (c) 1993 by Digital Equipment Corporation. + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies, and that +the name of Digital Equipment Corporation not be used in advertising or +publicity pertaining to distribution of the document or software without +specific, written prior permission. + +THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT +CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +- + +>>> coreutils-8.27-3.ph2 + +Copyright (C) 2003-2017 Free Software Foundation, Inc. + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . + +ADDITIONAL LICENSE INFORMATION: + +>GFDL 1.3 + +coreutils-8.27.tar.xz\coreutils-8.27.tar\coreutils-8.27\README + + +Copyright (C) 1998-2017 Free Software Foundation, Inc. + +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 or +any later version published by the Free Software Foundation; with no +Invariant Sections, with no Front-Cover Texts, and with no Back-Cover +Texts. A copy of the license is included in the "GNU Free +Documentation License" file as part of this distribution. + +>MIT + +coreutils-8.27.tar.xz\coreutils-8.27.tar\coreutils-8.27\gnulib-tests\inet_pton.c + + +Copyright (c) 1996,1999 by Internet Software Consortium. + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS +ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE +CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + + +>BSD-3 + +coreutils-8.27.tar.xz\coreutils-8.27.tar\coreutils-8.27\lib\fts.c + +Copyright (c) 1990, 1993, 1994 +The Regents of the University of California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +4. Neither the name of the University nor the names of its contributors +may be used to endorse or promote products derived from this software +without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + + +>GPL 3.0 WITH BISON PARSER EXCEPTION + + +coreutils-8.27.tar.xz\coreutils-8.27.tar\coreutils-8.27\lib\parse-datetime.c + +/ Bison implementation for Yacc-like parsers in C + +Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . / + +/ As a special exception, you may create a larger work that contains +part or all of the Bison parser skeleton and distribute that work +under terms of your choice, so long as that work isn't itself a +parser generator using the skeleton or a modified version thereof +as a parser skeleton. Alternatively, if you modify or redistribute +the parser skeleton itself, you may (at your option) remove this +special exception, which will cause the skeleton and the resulting +Bison output files to be licensed under the GNU General Public +License without this special exception. + +This special exception was added by the Free Software Foundation in +version 2.2 of Bison. / + +>PUBLIC DOMAIN + +coreutils-8.27.tar.xz\coreutils-8.27.tar\coreutils-8.27\lib\alloca.c + +(Mostly) portable public-domain implementation -- D A Gwyn + +This implementation of the PWB library alloca function, +which is used to allocate space off the run-time stack so +that it is automatically reclaimed upon procedure exit, +was inspired by discussions with J. Q. Johnson of Cornell. +J.Otto Tennant contributed the Cray support. + +There are some preprocessor constants that can +be defined when compiling for your specific system, for +improved efficiency; however, the defaults should be okay. + +The general concept of this implementation is to keep +track of all alloca-allocated blocks, and reclaim any +that are found to be deeper in the stack than the current +invocation. This heuristic does not reclaim storage as +soon as it becomes invalid, but it will do so eventually. + +>>> elfutils-0.169-3.ph2 + +Copyright (C) 2000, 2002, 2005 Red Hat, Inc. +This file is part of elfutils. +Written by Ulrich Drepper , 2000. + +This file is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. + +elfutils is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . + +ADDITIONAL LICENSE INFORMATION + +> LGPL 3.0 + +elfutils-0.169.tar.bz2\elfutils-0.169.tar\elfutils-0.169\lib\color.c + +[PLEASE NOTE: VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE LGPL 3.0 LICENSE. PLEASE SEE THE APPENDIX FOR THE FULL TEXT OF THE LGPL 3.0 LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] + +Copyright (C) 2008 Red Hat, Inc. + +This file is part of elfutils. + +This file is free software; you can redistribute it and/or modify +it under the terms of either + +the GNU Lesser General Public License as published by the Free +Software Foundation; either version 3 of the License, or (at +your option) any later version + +or + +the GNU General Public License as published by the Free +Software Foundation; either version 2 of the License, or (at +your option) any later version + +or both in parallel, as here. + +elfutils is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received copies of the GNU General Public License and +the GNU Lesser General Public License along with this program. If +not, see . + +> MIT-Style + +elfutils-0.169.tar.bz2\elfutils-0.169.tar\elfutils-0.169\aclocal.m4 + +Copyright (C) 1996-2013 Free Software Foundation, Inc. + +This file is free software; the Free Software Foundation +gives unlimited permission to copy and/or distribute it, +with or without modifications, as long as this notice is preserved. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY, to the extent permitted by law; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. + + +> LGPL 2.1 + +elfutils-0.169.tar.bz2\elfutils-0.169.tar\elfutils-0.169\libelf\elf.h + +Copyright (C) 1995-2014 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with the GNU C Library; if not, see +. + +>>> grep-3.0-4.ph2 + +Copyright (C) 2002-2017 Free Software Foundation, Inc. + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . + +ADDITIONAL LICENSE INFORMATION: + +> MIT- Style + +grep-3.0.tar.xz\grep-3.0.tar\grep-3.0\aclocal.m4 + +Copyright (C) 1996-2015 Free Software Foundation, Inc. + +This file is free software; the Free Software Foundation +gives unlimited permission to copy and/or distribute it, +with or without modifications, as long as this notice is preserved. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY, to the extent permitted by law; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. + +> GFDL 1.3 + +grep-3.0.tar.xz\grep-3.0.tar\grep-3.0\doc\grep.info + +Copyright © 1999-2002, 2005, 2008-2017 Free Software Foundation, Inc. + +Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, +Version 1.3 or any later version published by the Free Software +Foundation; with no Invariant Sections, with no Front-Cover Texts, +and with no Back-Cover Texts. A copy of the license is included in +the section entitled “GNU Free Documentation License”. + +> Public Domain + +grep-3.0.tar.xz\grep-3.0.tar\grep-3.0\lib\alloca.c + +alloca.c -- allocate automatically reclaimed memory +(Mostly) portable public-domain implementation -- D A Gwyn + +This implementation of the PWB library alloca function, +which is used to allocate space off the run-time stack so +that it is automatically reclaimed upon procedure exit, +was inspired by discussions with J. Q. Johnson of Cornell. +J.Otto Tennant contributed the Cray support. + +There are some preprocessor constants that can +be defined when compiling for your specific system, for +improved efficiency; however, the defaults should be okay. + +The general concept of this implementation is to keep +track of all alloca-allocated blocks, and reclaim any +that are found to be deeper in the stack than the current +invocation. This heuristic does not reclaim storage as +soon as it becomes invalid, but it will do so eventually. + +As a special case, alloca(0) reclaims storage without +allocating any. It is a good idea to use alloca(0) in +your main control loop, etc. to force garbage collection. + +> BSD- 3 Clause + +grep-3.0.tar.xz\grep-3.0.tar\grep-3.0\lib\fts.c + + +Copyright (c) 1990, 1993, 1994 +The Regents of the University of California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +4. Neither the name of the University nor the names of its contributors +may be used to endorse or promote products derived from this software +without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +>>> gzip-1.8-1.ph2 + +Copyright (C) 2010-2016 Free Software Foundation, Inc. + +This program is free software: you can redistribute it and/or modify it +under the terms of the GNU General Public License as published +by the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . + +ADDITIONAL LICENSE INFORMATION: + +> GFDL 1.3 + +gzip-1.8.tar.xz\gzip-1.8.tar\gzip-1.8\doc\gzip.info + +Copyright © 1992, 1993 Jean-loup Gailly + +Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, +Version 1.3 or any later version published by the Free Software +Foundation; with no Invariant Sections, with no Front-Cover Texts, +and with no Back-Cover Texts. A copy of the license is included in +the section entitled “GNU Free Documentation License”. + +> MIT-Style + +gzip-1.8.tar.xz\gzip-1.8.tar\gzip-1.8\zless.1 + +Copyright \(co 2006-2007, 2015-2016 Free Software Foundation, Inc. + +Copyright \(co 1992, 1993 Jean-loup Gailly + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. + +Permission is granted to process this file through troff and print the +results, provided the printed document carries copying permission +notice identical to this one except for the removal of this paragraph +(this paragraph not being relevant to the printed manual). + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the entire +resulting derived work is distributed under the terms of a permission +notice identical to this one. + +Permission is granted to copy and distribute translations of this manual +into another language, under the above conditions for modified versions, +except that this permission notice may be stated in a translation approved +by the Foundation. + +> Public Domain + +gzip-1.8.tar.xz\gzip-1.8.tar\gzip-1.8\unlzh.c + +The code in this file is directly derived from the public domain 'ar002' +written by Haruhiko Okumura. + +>>> haveged-1.9.1-4.ph2 + +Copyright 2009-2011 Gary Wuertz gary@issiweb.com +Copyright 2011 BenEleventh Consulting manolson@beneleventh.com + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . + + +ADDITIONAL LICENSE INFORMATION: + +> MIT-Style + +haveged-1.9.1.tar.gz\haveged-1.9.1.tar\haveged-1.9.1\aclocal.m4 + +Copyright (C) 1996-2012 Free Software Foundation, Inc. + +This file is free software; the Free Software Foundation +gives unlimited permission to copy and/or distribute it, +with or without modifications, as long as this notice is preserved. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY, to the extent permitted by law; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. + + +> LGPL 2.1 + +haveged-1.9.1.tar.gz\haveged-1.9.1.tar\haveged-1.9.1\src\oneiteration.h + +This source is an adaptation of work released as + +Copyright (C) 2006 - André Seznec - Olivier Rochecouste + +under version 2.1 of the GNU Lesser General Public License + +The original form is retained with minor variable renames for +more consistent macro itilization. See havegecollect.c for +details. + +>>> readline-7.0-2.ph2 + +Copyright (C) 1987-2015 Free Software Foundation, Inc. + +This file is part of the GNU Readline Library (Readline), a library +for reading lines of text with interactive input and history editing. + +Readline is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +Readline is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with Readline. If not, see . + +ADDITIONAL LICENSE INFORMATION: + +> GFDL 1.3 + +readline-7.0.tar.gz\readline-7.0.tar\readline-7.0\doc\history.info + +Copyright (C) 1988-2016 Free Software Foundation, Inc. + +Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, +Version 1.3 or any later version published by the Free Software +Foundation; with no Invariant Sections, no Front-Cover Texts, and +no Back-Cover Texts. A copy of the license is included in the +section entitled "GNU Free Documentation License". + + +> GPL 2.0 + +readline-7.0.tar.gz\readline-7.0.tar\readline-7.0\examples\rlfe\extern.h + +Copyright (c) 1993-2002 +Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de) +Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de) +Copyright (c) 1987 Oliver Laumann + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program (see the file COPYING); if not, write to the +Free Software Foundation, Inc., +59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + +rlwrap-0.30.tar.gz + +> LGPL 2.1 + +readline-7.0.tar.gz\readline-7.0.tar\readline-7.0\examples\rlwrap-0.30.tar.gz\rlwrap-0.30.tar\rlwrap-0.30\src\redblack.h + +Copyright (C) Damian Ivereigh 2000 + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 2.1 of the License, or +(at your option) any later version. See the file COPYING for details. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + +> Public Domain + +readline-7.0.tar.gz\readline-7.0.tar\readline-7.0\support\mkinstalldirs + +Author: Noah Friedman +Created: 1993-05-16 +Public domain + +readline-7.0.tar.gz + +> MIT + +readline-7.0.tar.gz\readline-7.0.tar\readline-7.0\support\wcwidth.c + +Markus Kuhn -- 2007-05-26 (Unicode 5.0) + +Permission to use, copy, modify, and distribute this software +for any purpose and without fee is hereby granted. The author +disclaims all warranties with regard to this software. + +Latest version: http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c + +--------------- SECTION 6: GNU Lesser General Public License, V2.1 ---------- + +GNU Lesser General Public License, V2.1 is applicable to the following component(s). + + +>>> cracklib-2.9.6-8.ph2 + +A Python binding for cracklib. + +Parts of this code are based on work Copyright (c) 2003 by Domenico +Andreoli. + +Copyright (c) 2008, 2009, 2012 Jan Dittberner + +This file is part of cracklib. + +This library is free software; you can redistribute it and/or modify it under +the terms of the GNU Lesser General Public License as published by the Free +Software Foundation; either version 2.1 of the License, or (at your option) +any later version. + +This library is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +details. + +You should have received a copy of the GNU Lesser General Public License +along with this library; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +ADDITIONAL LICENSE INFORMATION: + +> Public Domain + +cracklib-2.9.6.tar.gz\cracklib-2.9.6.tar\cracklib-2.9.6\po\es.po + +translation of cracklib.po to +This file is put in the public domain. +, 2003 + +>>> glibc-2.26-13.ph2 + +Copyright (C) 1991-2017 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with the GNU C Library; if not, see +. + + +ADDITIONAL LICENSE INFORMATION: + +> + +glibc-2.26.tar.xz\glibc-2.26.tar\glibc-2.26\LICENSES + +This file contains the copying permission notices for various files in the +GNU C Library distribution that have copyright owners other than the Free +Software Foundation. These notices all require that a copy of the notice +be included in the accompanying documentation and be distributed with +binary distributions of the code, so be sure to include this file along +with any binary distributions derived from the GNU C Library. +All code incorporated from 4.4 BSD is distributed under the following +license: + +Copyright (C) 1991 Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +3. [This condition was removed.] +4. Neither the name of the University nor the names of its contributors +may be used to endorse or promote products derived from this software +without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. +The DNS resolver code, taken from BIND 4.9.5, is copyrighted by UC +Berkeley, by Digital Equipment Corporation and by Internet Software +Consortium. The DEC portions are under the following license: + +Portions Copyright (C) 1993 by Digital Equipment Corporation. + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies, and +that the name of Digital Equipment Corporation not be used in +advertising or publicity pertaining to distribution of the document or +software without specific, written prior permission. + +THE SOFTWARE IS PROVIDED ``AS IS'' AND DIGITAL EQUIPMENT CORP. +DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL +DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING +FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, +NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION +WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +The ISC portions are under the following license: + +Portions Copyright (c) 1996-1999 by Internet Software Consortium. + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS +ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE +CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +The Sun RPC support (from rpcsrc-4.0) is covered by the following +license: + +Copyright (c) 2010, Oracle America, Inc. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following +disclaimer in the documentation and/or other materials +provided with the distribution. + +Neither the name of the "Oracle America, Inc." nor the names of its +contributors may be used to endorse or promote products derived +from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +The following CMU license covers some of the support code for Mach, +derived from Mach 3.0: + +Mach Operating System +Copyright (C) 1991,1990,1989 Carnegie Mellon University +All Rights Reserved. + +Permission to use, copy, modify and distribute this software and its +documentation is hereby granted, provided that both the copyright +notice and this permission notice appear in all copies of the +software, derivative works or modified versions, and any portions +thereof, and that both notices appear in supporting documentation. + +CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS ``AS IS'' +CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR +ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + +Carnegie Mellon requests users of this software to return to + +Software Distribution Coordinator +School of Computer Science +Carnegie Mellon University +Pittsburgh PA 15213-3890 + +or Software.Distribution@CS.CMU.EDU any improvements or +extensions that they make and grant Carnegie Mellon the rights to +redistribute these changes. +The file if_ppp.h is under the following CMU license: + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +3. Neither the name of the University nor the names of its contributors +may be used to endorse or promote products derived from this software +without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY AND +CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +The following license covers the files from Intel's "Highly Optimized +Mathematical Functions for Itanium" collection: + +Intel License Agreement + +Copyright (c) 2000, Intel Corporation + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +The name of Intel Corporation may not be used to endorse or promote +products derived from this software without specific prior written +permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +The files inet/getnameinfo.c and sysdeps/posix/getaddrinfo.c are copyright +(C) by Craig Metz and are distributed under the following license: + +/ The Inner Net License, Version 2.00 + +The author(s) grant permission for redistribution and use in source and +binary forms, with or without modification, of the software and documentation +provided that the following conditions are met: + +0. If you receive a version of the software that is specifically labelled +as not being for redistribution (check the version message and/or README), +you are not permitted to redistribute that version of the software in any +way or form. +1. All terms of the all other applicable copyrights and licenses must be +followed. +2. Redistributions of source code must retain the authors' copyright +notice(s), this list of conditions, and the following disclaimer. + +3. Redistributions in binary form must reproduce the authors' copyright +notice(s), this list of conditions, and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +4. [The copyright holder has authorized the removal of this clause.] + +5. Neither the name(s) of the author(s) nor the names of its contributors +may be used to endorse or promote products derived from this software +without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY ITS AUTHORS AND CONTRIBUTORS ``AS IS'' AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +If these license terms cause you a real problem, contact the author. / +The file sunrpc/des_impl.c is copyright Eric Young: + +Copyright (C) 1992 Eric Young + +Collected from libdes and modified for SECURE RPC by Martin Kuck 1994 +This file is distributed under the terms of the GNU Lesser General +Public License, version 2.1 or later - see the file COPYING.LIB for details. +If you did not receive a copy of the license with this program, please +see to obtain a copy. + +The libidn code is copyright Simon Josefsson, with portions copyright +The Internet Society, Tom Tromey and Red Hat, Inc.: + +Copyright (C) 2002, 2003, 2004, 2011 Simon Josefsson + +This file is part of GNU Libidn. + +GNU Libidn is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +GNU Libidn is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with GNU Libidn; if not, see . + +The following notice applies to portions of libidn/nfkc.c: + +This file contains functions from GLIB, including gutf8.c and +gunidecomp.c, all licensed under LGPL and copyright hold by: + +Copyright (C) 1999, 2000 Tom Tromey +Copyright 2000 Red Hat, Inc. + +The following applies to portions of libidn/punycode.c and +libidn/punycode.h: + +This file is derived from RFC 3492bis written by Adam M. Costello. + +Disclaimer and license: Regarding this entire document or any +portion of it (including the pseudocode and C code), the author +makes no guarantees and is not responsible for any damage resulting +from its use. The author grants irrevocable permission to anyone +to use, modify, and distribute it in any way that does not diminish +the rights of anyone else to use, modify, and distribute it, +provided that redistributed derivative works do not contain +misleading author or version information. Derivative works need +not be licensed under similar terms. +Copyright (C) The Internet Society (2003). All Rights Reserved. + +This document and translations of it may be copied and furnished to +others, and derivative works that comment on or otherwise explain it +or assist in its implementation may be prepared, copied, published +and distributed, in whole or in part, without restriction of any +kind, provided that the above copyright notice and this paragraph are +included on all such copies and derivative works. However, this +document itself may not be modified in any way, such as by removing +the copyright notice or references to the Internet Society or other +Internet organizations, except as needed for the purpose of +developing Internet standards in which case the procedures for +copyrights defined in the Internet Standards process must be +followed, or as required to translate it into languages other than +English. + +The limited permissions granted above are perpetual and will not be +revoked by the Internet Society or its successors or assigns. + +This document and the information contained herein is provided on an +"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING +TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING +BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION +HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF +MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. +The file inet/rcmd.c is under a UCB copyright and the following: + +Copyright (C) 1998 WIDE Project. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +3. Neither the name of the project nor the names of its contributors +may be used to endorse or promote products derived from this software +without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +The file posix/runtests.c is copyright Tom Lord: + +Copyright 1995 by Tom Lord + +All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of the copyright holder not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +Tom Lord DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL TOM LORD BE LIABLE FOR ANY SPECIAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF +USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + +The posix/rxspencer tests are copyright Henry Spencer: + +Copyright 1992, 1993, 1994, 1997 Henry Spencer. All rights reserved. +This software is not subject to any license of the American Telephone +and Telegraph Company or of the Regents of the University of California. + +Permission is granted to anyone to use this software for any purpose on +any computer system, and to alter it and redistribute it, subject +to the following restrictions: + +1. The author is not responsible for the consequences of use of this +software, no matter how awful, even if they arise from flaws in it. + +2. The origin of this software must not be misrepresented, either by +explicit claim or by omission. Since few users ever read sources, +credits must appear in the documentation. + +3. Altered versions must be plainly marked as such, and must not be +misrepresented as being the original software. Since few users +ever read sources, credits must appear in the documentation. + +4. This notice may not be removed or altered. + +The file posix/PCRE.tests is copyright University of Cambridge: + +Copyright (c) 1997-2003 University of Cambridge + +Permission is granted to anyone to use this software for any purpose on any +computer system, and to redistribute it freely, subject to the following +restrictions: + +1. This software is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +2. The origin of this software must not be misrepresented, either by +explicit claim or by omission. In practice, this means that if you use +PCRE in software that you distribute to others, commercially or +otherwise, you must put a sentence like this + +Regular expression support is provided by the PCRE library package, +which is open source software, written by Philip Hazel, and copyright +by the University of Cambridge, England. + +somewhere reasonably visible in your documentation and in any relevant +files or online help data or similar. A reference to the ftp site for +the source, that is, to + +ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ + +should also be given in the documentation. However, this condition is not +intended to apply to whole chains of software. If package A includes PCRE, +it must acknowledge it, but if package B is software that includes package +A, the condition is not imposed on package B (unless it uses PCRE +independently). + +3. Altered versions must be plainly marked as such, and must not be +misrepresented as being the original software. + +4. If PCRE is embedded in any software that is released under the GNU +General Purpose Licence (GPL), or Lesser General Purpose Licence (LGPL), +then the terms of that licence shall supersede any condition above with +which it is incompatible. + +Files from Sun fdlibm are copyright Sun Microsystems, Inc.: + +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. + +Part of stdio-common/tst-printf.c is copyright C E Chew: + +(C) Copyright C E Chew + +Feel free to copy, use and distribute this software provided: + +1. you do not pretend that you wrote it +2. you leave this copyright notice intact. + +Various long double libm functions are copyright Stephen L. Moshier: + +Copyright 2001 by Stephen L. Moshier + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, see +. / + +>LGPL 2.1 WITH SPECIAL EXCEPTION + +glibc-2.26.tar.xz\glibc-2.26.tar\glibc-2.26\wcsmbs\isoc99_vswscanf.c + +/ Copyright (C) 1993-2017 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with the GNU C Library; if not, see +. + +As a special exception, if you link the code in this file with +files compiled with a GNU compiler to produce an executable, +that does not cause the resulting executable to be covered by +the GNU Lesser General Public License. This exception does not +however invalidate any other reasons why the executable file +might be covered by the GNU Lesser General Public License. +This exception applies to code released by its copyright holders +in files containing the exception. + +>BSD-3 + +glibc-2.26.tar.xz\glibc-2.26.tar\glibc-2.26\termios\sys\ttychars.h + +Copyright (c) 1982, 1986, 1990, 1993 +The Regents of the University of California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +4. Neither the name of the University nor the names of its contributors +may be used to endorse or promote products derived from this software +without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + + +>GPL 2.0 + +glibc-2.26.tar.xz\glibc-2.26.tar\glibc-2.26\catgets\xopen-msg.awk + +Copyright (C) 2012-2017 Free Software Foundation, Inc. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, see . + +>GPL 3.0 WITH BISON PARSER EXCEPTION + +glibc-2.26.tar.xz\glibc-2.26.tar\glibc-2.26\intl\plural.c + +/ A Bison parser, made by GNU Bison 2.7. / + +/ Bison implementation for Yacc-like parsers in C + +Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . / + +/ As a special exception, you may create a larger work that contains +part or all of the Bison parser skeleton and distribute that work +under terms of your choice, so long as that work isn't itself a +parser generator using the skeleton or a modified version thereof +as a parser skeleton. Alternatively, if you modify or redistribute +the parser skeleton itself, you may (at your option) remove this +special exception, which will cause the skeleton and the resulting +Bison output files to be licensed under the GNU General Public +License without this special exception. + +This special exception was added by the Free Software Foundation in +version 2.2 of Bison. / + +>GFDL 1.3 + +glibc-2.26.tar.xz\glibc-2.26.tar\glibc-2.26\manual\fdl-1.3.texi + +LICENSE: GFDL 1.3 + + +>LGPL 2.0 + + +glibc-2.26.tar.xz\glibc-2.26.tar\glibc-2.26\sysdeps\powerpc\power5+\fpu\s_modf.c + + +Copyright (C) 2013-2017 Free Software Foundation, Inc. +This file is part of the GNU C Library + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, see . + + +> PUBLIC DOMAIN + +glibc-2.26.tar.xz\glibc-2.26.tar\glibc-2.26\timezone\zone.tab + +
    +@(#)zone.tab	8.28
    +This file is in the public domain, so clarified as of
    +2009-05-17 by Arthur David Olson.
    +
    +>>> hawkey-2017.1-6.ph2
    +
    +Copyright (C) 2014 Red Hat, Inc.
    +
    +Licensed under the GNU Lesser General Public License Version 2.1
    +
    +This library is free software; you can redistribute it and/or
    +modify it under the terms of the GNU Lesser General Public
    +License as published by the Free Software Foundation; either
    +version 2.1 of the License, or (at your option) any later version.
    +
    +This library is distributed in the hope that it will be useful,
    +but WITHOUT ANY WARRANTY; without even the implied warranty of
    +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    +Lesser General Public License for more details.
    +
    +You should have received a copy of the GNU Lesser General Public
    +License along with this library; if not, write to the Free Software
    +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
    +
    +ADDITIONAL LICENSE INFORMATION:
    +
    +> GPL 2.0
    +
    +hawkey-2017.1.tar.gz\hawkey-2017.1.tar\hawkey-hawkey-0.6.4-1\doc\changes.rst
    +
    +Copyright (C) 2014-2015  Red Hat, Inc.
    +
    +This copyrighted material is made available to anyone wishing to use,
    +modify, copy, or redistribute it subject to the terms and conditions of
    +the GNU General Public License v.2, or (at your option) any later version.
    +This program is distributed in the hope that it will be useful, but WITHOUT
    +ANY WARRANTY expressed or implied, including the implied warranties of
    +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
    +Public License for more details.  You should have received a copy of the
    +GNU General Public License along with this program; if not, write to the
    +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    +02110-1301, USA.  Any Red Hat trademarks that are incorporated in the
    +source code or documentation are not subject to the GNU General Public
    +License and may only be used or replicated with the express permission of
    +Red Hat, Inc.
    +
    +>>> kmod-24-3.ph2
    +
    +Copyright (C) 2012-2013  ProFUSION embedded systems
    +
    +This program is free software; you can redistribute it and/or
    +modify it under the terms of the GNU Lesser General Public
    +License as published by the Free Software Foundation; either
    +version 2.1 of the License, or (at your option) any later version.
    +
    +This program is distributed in the hope that it will be useful,
    +but WITHOUT ANY WARRANTY; without even the implied warranty of
    +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    +Lesser General Public License for more details.
    +
    +You should have received a copy of the GNU Lesser General Public
    +License along with this library; if not, see .
    +
    +
    +ADDITIONAL LICENSE INFORMATION:
    +
    +> GPL 2.0
    +
    +kmod-24.tar.xz\kmod-24.tar\kmod-24\tools\rmmod.c
    +
    +kmod-insert - insert a module into the kernel.
    +
    +Copyright (C) 2015 Intel Corporation. All rights reserved.
    +Copyright (C) 2011-2013  ProFUSION embedded systems
    +
    +This program is free software: you can redistribute it and/or modify
    +it under the terms of the GNU General Public License as published by
    +the Free Software Foundation, either version 2 of the License, or
    +(at your option) any later version.
    +
    +This program is distributed in the hope that it will be useful,
    +but WITHOUT ANY WARRANTY; without even the implied warranty of
    +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +GNU General Public License for more details.
    +
    +You should have received a copy of the GNU General Public License
    +along with this program.  If not, see .
    +
    +>>> libgcrypt-1.8.1-2.ph2
    +
    +Copyright (C) 2013 g10 Code GmbH
    +
    +This file is part of Libgcrypt.
    +
    +Libgcrypt is free software; you can redistribute it and/or modify
    +it under the terms of the GNU Lesser General Public License as
    +published by the Free Software Foundation; either version 2.1 of
    +the License, or (at your option) any later version.
    +
    +Libgcrypt is distributed in the hope that it will be useful,
    +but WITHOUT ANY WARRANTY; without even the implied warranty of
    +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +GNU Lesser General Public License for more details.
    +
    +You should have received a copy of the GNU Lesser General Public
    +License along with this program; if not, write to the Free Software
    +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
    +
    +ADDITIONAL LICENSE INFORMATION:
    +
    +>
    +
    +libgcrypt-1.8.1.tar.bz2\libgcrypt-1.8.1.tar\libgcrypt-1.8.1\LICENSES
    +
    +Additional license notices for Libgcrypt.                    -- org --
    +
    +This file contains the copying permission notices for various files in
    +the Libgcrypt distribution which are not covered by the GNU Lesser
    +General Public License (LGPL) or the GNU General Public License (GPL).
    +
    +These notices all require that a copy of the notice be included
    +in the accompanying documentation and be distributed with binary
    +distributions of the code, so be sure to include this file along
    +with any binary distributions derived from the GNU C Library.
    +
    +BSD_3Clause
    +
    +For files:
    +- cipher/sha256-avx-amd64.S
    +- cipher/sha256-avx2-bmi2-amd64.S
    +- cipher/sha256-ssse3-amd64.S
    +- cipher/sha512-avx-amd64.S
    +- cipher/sha512-avx2-bmi2-amd64.S
    +- cipher/sha512-ssse3-amd64.S
    +
    ++begin_quote
    +Copyright (c) 2012, Intel Corporation
    +
    +All rights reserved.
    +
    +Redistribution and use in source and binary forms, with or without
    +modification, are permitted provided that the following conditions are
    +met:
    +
    +Redistributions of source code must retain the above copyright
    +notice, this list of conditions and the following disclaimer.
    +
    +Redistributions in binary form must reproduce the above copyright
    +notice, this list of conditions and the following disclaimer in the
    +documentation and/or other materials provided with the
    +distribution.
    +
    +Neither the name of the Intel Corporation nor the names of its
    +contributors may be used to endorse or promote products derived from
    +this software without specific prior written permission.
    +
    +
    +THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" AND ANY
    +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION OR
    +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
    +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
    +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
    +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
    +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    ++end_quote
    +
    +
    +For files:
    +- random/jitterentropy-base.c
    +- random/jitterentropy.h
    +- random/rndjent.c (plus common Libgcrypt copyright holders)
    +
    ++begin_quote
    +Copyright Stephan Mueller , 2013
    +
    +[PLEASE NOTE:  VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE BSD LICENSE.  THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.]
    +
    +License
    +=======
    +
    +Redistribution and use in source and binary forms, with or without
    +modification, are permitted provided that the following conditions
    +are met:
    +1. Redistributions of source code must retain the above copyright
    +notice, and the entire permission notice in its entirety,
    +including the disclaimer of warranties.
    +2. Redistributions in binary form must reproduce the above copyright
    +notice, this list of conditions and the following disclaimer in the
    +documentation and/or other materials provided with the distribution.
    +3. The name of the author may not be used to endorse or promote
    +products derived from this software without specific prior
    +written permission.
    +
    +ALTERNATIVELY, this product may be distributed under the terms of
    +the GNU General Public License, in which case the provisions of the GPL are
    +required INSTEAD OF the above restrictions.  (This clause is
    +necessary due to a potential bad interaction between the GPL and
    +the restrictions contained in a BSD-style copyright.)
    +
    +THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
    +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
    +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
    +WHICH ARE HEREBY DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE
    +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
    +OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
    +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
    +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
    +USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
    +DAMAGE.
    ++end_quote
    +
    +X License
    +
    +For files:
    +- install.sh
    +
    ++begin_quote
    +Copyright (C) 1994 X Consortium
    +
    +Permission is hereby granted, free of charge, to any person obtaining a copy
    +of this software and associated documentation files (the "Software"), to
    +deal in the Software without restriction, including without limitation the
    +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
    +sell copies of the Software, and to permit persons to whom the Software is
    +furnished to do so, subject to the following conditions:
    +
    +The above copyright notice and this permission notice shall be included in
    +all copies or substantial portions of the Software.
    +
    +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
    +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
    +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
    +TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    +
    +Except as contained in this notice, the name of the X Consortium shall not
    +be used in advertising or otherwise to promote the sale, use or other deal-
    +ings in this Software without prior written authorization from the X Consor-
    +tium.
    ++end_quote
    +
    +Public domain
    +
    +For files:
    +- cipher/arcfour-amd64.S
    +
    ++begin_quote
    +Author: Marc Bevand 
    +Licence: I hereby disclaim the copyright on this code and place it
    +in the public domain.
    ++end_quote
    +
    +OCB license 1
    +
    +For files:
    +- cipher/cipher-ocb.c
    +
    ++begin_quote
    +OCB is covered by several patents but may be used freely by most
    +software.  See http://web.cs.ucdavis.edu/~rogaway/ocb/license.htm .
    +In particular license 1 is suitable for Libgcrypt: See
    +http://web.cs.ucdavis.edu/~rogaway/ocb/license1.pdf for the full
    +license document; it basically says:
    +
    +License 1 — License for Open-Source Software Implementations of OCB
    +(Jan 9, 2013)
    +
    +Under this license, you are authorized to make, use, and
    +distribute open-source software implementations of OCB. This
    +license terminates for you if you sue someone over their
    +open-source software implementation of OCB claiming that you have
    +a patent covering their implementation.
    +
    +
    +
    +License for Open Source Software Implementations of OCB
    +January 9, 2013
    +
    +1 Definitions
    +
    +1.1 “Licensor” means Phillip Rogaway.
    +
    +1.2 “Licensed Patents” means any patent that claims priority to United
    +States Patent Application No. 09/918,615 entitled “Method and Apparatus
    +for Facilitating Efficient Authenticated Encryption,” and any utility,
    +divisional, provisional, continuation, continuations-in-part, reexamination,
    +reissue, or foreign counterpart patents that may issue with respect to the
    +aforesaid patent application. This includes, but is not limited to, United
    +States Patent No. 7,046,802; United States Patent No. 7,200,227; United
    +States Patent No. 7,949,129; United States Patent No. 8,321,675 ; and any
    +patent that issues out of United States Patent Application No. 13/669,114.
    +
    +1.3 “Use” means any practice of any invention claimed in the Licensed Patents.
    +
    +1.4 “Software Implementation” means any practice of any invention
    +claimed in the Licensed Patents that takes the form of software executing on
    +a user-programmable, general-purpose computer or that takes the form of a
    +computer-readable medium storing such software. Software Implementation does
    +not include, for example, application-specific integrated circuits (ASICs),
    +field-programmable gate arrays (FPGAs), embedded systems, or IP cores.
    +
    +1.5 “Open Source Software” means software whose source code is published
    +and made available for inspection and use by anyone because either (a) the
    +source code is subject to a license that permits recipients to copy, modify,
    +and distribute the source code without payment of fees or royalties, or
    +(b) the source code is in the public domain, including code released for
    +public use through a CC0 waiver. All licenses certified by the Open Source
    +Initiative at opensource.org as of January 9, 2013 and all Creative Commons
    +licenses identified on the creativecommons.org website as of January 9,
    +2013, including the Public License Fallback of the CC0 waiver, satisfy these
    +requirements for the purposes of this license.
    +
    +1.6 “Open Source Software Implementation” means a Software
    +Implementation in which the software implicating the Licensed Patents is
    +Open Source Software. Open Source Software Implementation does not include
    +any Software Implementation in which the software implicating the Licensed
    +Patents is combined, so as to form a larger program, with software that is
    +not Open Source Software.
    +
    +2 License Grant
    +
    +2.1 License. Subject to your compliance with the term s of this license,
    +including the restriction set forth in Section 2.2, Licensor hereby
    +grants to you a perpetual, worldwide, non-exclusive, non-transferable,
    +non-sublicenseable, no-charge, royalty-free, irrevocable license to practice
    +any invention claimed in the Licensed Patents in any Open Source Software
    +Implementation.
    +
    +2.2 Restriction. If you or your affiliates institute patent litigation
    +(including, but not limited to, a cross-claim or counterclaim in a lawsuit)
    +against any entity alleging that any Use authorized by this license
    +infringes another patent, then any rights granted to you under this license
    +automatically terminate as of the date such litigation is filed.
    +
    +3 Disclaimer
    +YOUR USE OF THE LICENSED PATENTS IS AT YOUR OWN RISK AND UNLESS REQUIRED
    +BY APPLICABLE LAW, LICENSOR MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY
    +KIND CONCERNING THE LICENSED PATENTS OR ANY PRODUCT EMBODYING ANY LICENSED
    +PATENT, EXPRESS OR IMPLIED, STATUT ORY OR OTHERWISE, INCLUDING, WITHOUT
    +LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR
    +PURPOSE, OR NONINFRINGEMENT. IN NO EVENT WILL LICENSOR BE LIABLE FOR ANY
    +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
    +ARISING FROM OR RELATED TO ANY USE OF THE LICENSED PATENTS, INCLUDING,
    +WITHOUT LIMITATION, DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, PUNITIVE
    +OR SPECIAL DAMAGES, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF
    +SUCH DAMAGES PRIOR TO SUCH AN OCCURRENCE.
    ++end_quote
    +
    +
    +>MIT
    +
    +
    +Copyright 1997, 1998, 1999, 2001 Werner Koch (dd9jn)
    +Copyright 2013 g10 Code GmbH
    +
    +Permission is hereby granted, free of charge, to any person obtaining a
    +copy of this software and associated documentation files (the "Software"),
    +to deal in the Software without restriction, including without limitation
    +the rights to use, copy, modify, merge, publish, distribute, sublicense,
    +and/or sell copies of the Software, and to permit persons to whom the
    +Software is furnished to do so, subject to the following conditions:
    +
    +The above copyright notice and this permission notice shall be included in
    +all copies or substantial portions of the Software.
    +
    +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
    +WERNER KOCH BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
    +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
    +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    +
    +>GPL 2.0
    +
    +libgcrypt-1.8.1.tar.bz2\libgcrypt-1.8.1.tar\libgcrypt-1.8.1\doc\gpl.texi
    +
    +LICENSE: GPL 2.0
    +
    +
    +>GPL 3.0
    +
    +libgcrypt-1.8.1.tar.bz2\libgcrypt-1.8.1.tar\libgcrypt-1.8.1\doc\yat2m.c
    +
    +Copyright (C) 2005, 2013, 2015, 2016 g10 Code GmbH
    +Copyright (C) 2006, 2008, 2011 Free Software Foundation, Inc.
    +
    +This program is free software; you can redistribute it and/or modify
    +it under the terms of the GNU General Public License as published by
    +the Free Software Foundation; either version 3 of the License, or
    +(at your option) any later version.
    +
    +This program is distributed in the hope that it will be useful,
    +but WITHOUT ANY WARRANTY; without even the implied warranty of
    +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +GNU General Public License for more details.
    +
    +You should have received a copy of the GNU General Public License
    +along with this program; if not, see .
    +
    +>BSD-3
    +
    +[PLEASE NOTE:  VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE BSD LICENSE.  THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.]
    +
    +libgcrypt-1.8.1.tar.bz2\libgcrypt-1.8.1.tar\libgcrypt-1.8.1\random\jitterentropy-base.c
    +
    +Copyright Peter Gutmann, Paul Kendall, and Chris Wedgwood 1996-1999.
    +Heavily modified for GnuPG by Werner Koch
    +
    +
    +/
    +
    +/ This module is part of the cryptlib continuously seeded pseudorandom
    +number generator.  For usage conditions, see lib_rand.c
    +
    +[Here is the notice from lib_rand.c:]
    +
    +This module and the misc/rnd.c modules represent the cryptlib
    +continuously seeded pseudorandom number generator (CSPRNG) as described in
    +my 1998 Usenix Security Symposium paper "The generation of random numbers
    +for cryptographic purposes".
    +
    +The CSPRNG code is copyright Peter Gutmann (and various others) 1996,
    +1997, 1998, 1999, all rights reserved.  Redistribution of the CSPRNG
    +modules and use in source and binary forms, with or without modification,
    +are permitted provided that the following conditions are met:
    +
    +1. Redistributions of source code must retain the above copyright notice
    +and this permission notice in its entirety.
    +
    +2. Redistributions in binary form must reproduce the copyright notice in
    +the documentation and/or other materials provided with the distribution.
    +
    +3. A copy of any bugfixes or enhancements made must be provided to the
    +author,  to allow them to be added to the
    +baseline version of the code.
    +
    +ALTERNATIVELY, the code may be distributed under the terms of the
    +GNU Lesser General Public License, version 2.1 or any later version
    +published by the Free Software Foundation, in which case the
    +provisions of the GNU LGPL are required INSTEAD OF the above
    +restrictions.
    +
    +Although not required under the terms of the LGPL, it would still be
    +nice if you could make any changes available to the author to allow
    +a consistent code base to be maintained.  /
    +
    +>BSD-3
    +
    +[PLEASE NOTE:  VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE BSD LICENSE.  THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.]
    +
    +libgcrypt-1.8.1.tar.bz2\libgcrypt-1.8.1.tar\libgcrypt-1.8.1\random\random-drbg.c
    +
    +Copyright 2014 Stephan Mueller 
    +
    +DRBG: Deterministic Random Bits Generator
    +Based on NIST Recommended DRBG from NIST SP800-90A with the following
    +properties:
    +CTR DRBG with DF with AES-128, AES-192, AES-256 cores
    +Hash DRBG with DF with SHA-1, SHA-256, SHA-384, SHA-512 cores
    +HMAC DRBG with DF with SHA-1, SHA-256, SHA-384, SHA-512 cores
    +with and without prediction resistance
    +
    +Redistribution and use in source and binary forms, with or without
    +modification, are permitted provided that the following conditions
    +are met:
    +1. Redistributions of source code must retain the above copyright
    +notice, and the entire permission notice in its entirety,
    +including the disclaimer of warranties.
    +2. Redistributions in binary form must reproduce the above copyright
    +notice, this list of conditions and the following disclaimer in the
    +documentation and/or other materials provided with the distribution.
    +3. The name of the author may not be used to endorse or promote
    +products derived from this software without specific prior
    +written permission.
    +
    +ALTERNATIVELY, this product may be distributed under the terms of
    +LGPLv2+, in which case the provisions of the LGPL are
    +required INSTEAD OF the above restrictions.  (This clause is
    +necessary due to a potential bad interaction between the LGPL and
    +the restrictions contained in a BSD-style copyright.)
    +
    +THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
    +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
    +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
    +WHICH ARE HEREBY DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE
    +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
    +OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
    +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
    +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
    +USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
    +DAMAGE.
    +
    +>>> libgpg-error-1.27-1.ph2
    +
    +Copyright (C) 2003-2004, 2010, 2013-2016 g10 Code GmbH
    +
    +This file is part of libgpg-error.
    +
    +libgpg-error is free software; you can redistribute it and/or
    +modify it under the terms of the GNU Lesser General Public License
    +as published by the Free Software Foundation; either version 2.1 of
    +the License, or (at your option) any later version.
    +
    +libgpg-error is distributed in the hope that it will be useful, but
    +WITHOUT ANY WARRANTY; without even the implied warranty of
    +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    +Lesser General Public License for more details.
    +
    +You should have received a copy of the GNU Lesser General Public
    +License along with this program; if not, see .
    +
    +ADDITIONAL LICENSE INFORMATION:
    +
    +>GPL 2.0
    +
    +libgpg-error-1.27.tar.bz2\libgpg-error-1.27.tar\libgpg-error-1.27\doc\gpgrt.info
    +
    +Copyright (C) 2014 g10 Code GmbH
    +
    +Permission is granted to copy, distribute and/or modify this
    +document under the terms of the GNU General Public License as
    +published by the Free Software Foundation; either version 2 of the
    +License, or (at your option) any later version.  The text of the
    +license can be found in the section entitled "GNU General Public
    +License".
    +
    +>GPL 3.0
    +
    +libgpg-error-1.27.tar.bz2\libgpg-error-1.27.tar\libgpg-error-1.27\doc\yat2m.c
    +
    +Copyright (C) 2005, 2013, 2015, 2016 g10 Code GmbH
    +Copyright (C) 2006, 2008, 2011 Free Software Foundation, Inc.
    +
    +This program is free software; you can redistribute it and/or modify
    +it under the terms of the GNU General Public License as published by
    +the Free Software Foundation; either version 3 of the License, or
    +(at your option) any later version.
    +
    +This program is distributed in the hope that it will be useful,
    +but WITHOUT ANY WARRANTY; without even the implied warranty of
    +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +GNU General Public License for more details.
    +
    +You should have received a copy of the GNU General Public License
    +along with this program; if not, see .
    +
    +>MIT STYLE
    +
    +libgpg-error-1.27.tar.bz2\libgpg-error-1.27.tar\libgpg-error-1.27\src\mkheader.c
    +
    +Copyright (C) 2010 Free Software Foundation, Inc.
    +Copyright (C) 2014 g10 Code GmbH
    +
    +This file is free software; as a special exception the author gives
    +unlimited permission to copy and/or distribute it, with or without
    +modifications, as long as this notice is preserved.
    +
    +This file is distributed in the hope that it will be useful, but
    +WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
    +implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    +
    +>BSD-3 Clause
    +
    +[PLEASE NOTE:  VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE BSD-3 CLAUSE LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.]
    +
    +libgpg-error-1.27.tar.bz2\libgpg-error-1.27.tar\libgpg-error-1.27\src\mkheader.c
    +
    +estream.c - Extended Stream I/O Library
    +Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011,
    +2014, 2015, 2016, 2017 g10 Code GmbH
    +
    +This file is part of Libestream.
    +
    +Libestream is free software; you can redistribute it and/or modify
    +it under the terms of the GNU Lesser General Public License as
    +published by the Free Software Foundation; either version 2.1 of
    +the License, or (at your option) any later version.
    +
    +Libestream is distributed in the hope that it will be useful, but
    +WITHOUT ANY WARRANTY; without even the implied warranty of
    +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    +Lesser General Public License for more details.
    +
    +You should have received a copy of the GNU Lesser General Public
    +License along with Libestream; if not, see .
    +
    +ALTERNATIVELY, Libestream may be distributed under the terms of the
    +following license, in which case the provisions of this license are
    +required INSTEAD OF the GNU General Public License. If you wish to
    +allow use of your version of this file only under the terms of the
    +GNU General Public License, and not to allow others to use your
    +version of this file under the terms of the following license,
    +indicate your decision by deleting this paragraph and the license
    +below.
    +
    +Redistribution and use in source and binary forms, with or without
    +modification, are permitted provided that the following conditions
    +are met:
    +1. Redistributions of source code must retain the above copyright
    +notice, and the entire permission notice in its entirety,
    +including the disclaimer of warranties.
    +2. Redistributions in binary form must reproduce the above copyright
    +notice, this list of conditions and the following disclaimer in the
    +documentation and/or other materials provided with the distribution.
    +3. The name of the author may not be used to endorse or promote
    +products derived from this software without specific prior
    +written permission.
    +
    +THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
    +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
    +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
    +DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
    +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
    +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
    +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
    +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
    +OF THE POSSIBILITY OF SUCH DAMAGE.
    +
    +>LGPL 2.0
    +
    +libgpg-error-1.27.tar.bz2\libgpg-error-1.27.tar\libgpg-error-1.27\src\gettext.h
    +
    +Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc.
    +
    +This program is free software; you can redistribute it and/or modify it
    +under the terms of the GNU Library General Public License as published
    +by the Free Software Foundation; either version 2, or (at your option)
    +any later version.
    +
    +This program is distributed in the hope that it will be useful,
    +but WITHOUT ANY WARRANTY; without even the implied warranty of
    +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    +Library General Public License for more details.
    +
    +You should have received a copy of the GNU Library General Public
    +License along with this program; if not, write to the Free Software
    +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
    +USA.
    +
    +>>> systemd-233-18.ph2
    +
    +This file is part of systemd.
    +
    +Copyright 2008-2011 Kay Sievers
    +Copyright 2012 Lennart Poettering
    +
    +systemd is free software; you can redistribute it and/or modify it
    +under the terms of the GNU Lesser General Public License as published by
    +the Free Software Foundation; either version 2.1 of the License, or
    +(at your option) any later version.
    +
    +systemd is distributed in the hope that it will be useful, but
    +WITHOUT ANY WARRANTY; without even the implied warranty of
    +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    +Lesser General Public License for more details.
    +
    +You should have received a copy of the GNU Lesser General Public License
    +along with systemd; If not, see .
    +
    +ADDITIONAL LICENSE INFORMATION:
    +
    +> GPL 2.0
    +
    +systemd-233.tar.gz\systemd-233.tar\systemd-233\LICENSE.GPL2
    +
    +License: GPL 2.0
    +
    +> MIT
    +
    +systemd-233.tar.gz\systemd-233.tar\systemd-233\man\glib-event-glue.c
    +
    +Copyright 2014 Tom Gundersen
    +
    +Permission is hereby granted, free of charge, to any person
    +obtaining a copy of this software and associated documentation files
    +(the "Software"), to deal in the Software without restriction,
    +including without limitation the rights to use, copy, modify, merge,
    +publish, distribute, sublicense, and/or sell copies of the Software,
    +and to permit persons to whom the Software is furnished to do so,
    +subject to the following conditions:
    +
    +The above copyright notice and this permission notice shall be
    +included in all copies or substantial portions of the Software.
    +
    +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
    +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
    +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
    +BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
    +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
    +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    +SOFTWARE.
    +
    +> Public Domain
    +
    +systemd-233.tar.gz\systemd-233.tar\systemd-233\src\basic\MurmurHash2.c
    +
    +MurmurHash2 was written by Austin Appleby, and is placed in the public
    +domain. The author hereby disclaims copyright to this source code.
    +
    +> LGPL 2.0
    +
    +systemd-233.tar.gz\systemd-233.tar\systemd-233\src\basic\utf8.c
    +
    +Copyright (C) 1999 Tom Tromey
    +Copyright (C) 2000 Red Hat, Inc.
    +
    +This library is free software; you can redistribute it and/or
    +modify it under the terms of the GNU Library General Public
    +License as published by the Free Software Foundation; either
    +version 2 of the License, or (at your option) any later version.
    +
    +This library is distributed in the hope that it will be useful,
    +but WITHOUT ANY WARRANTY; without even the implied warranty of
    +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    +Library General Public License for more details.
    +
    +You should have received a copy of the GNU Library General Public
    +License along with this library; if not, write to the Free Software
    +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
    +
    +--------------- SECTION 7: GNU Lesser General Public License, V3.0 ----------
    +
    +GNU Lesser General Public License, V3.0 is applicable to the following component(s).
    +
    +
    +>>> gmp-6.1.2-2.ph2
    +
    +'[PLEASE NOTE:  VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE LGPL 3.0.  PLEASE SEE APPENDIX FOR THE FULL TEXT OF THE LGPL3.0.  THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.]
    +
    +Copyright 2000-2002, 2004 Free Software Foundation, Inc.
    +
    +This file is part of the GNU MP Library.
    +
    +The GNU MP Library is free software; you can redistribute it and/or modify
    +it under the terms of either:
    +
    +* the GNU Lesser General Public License as published by the Free
    +Software Foundation; either version 3 of the License, or (at your
    +option) any later version.
    +
    +or
    +
    +* the GNU General Public License as published by the Free Software
    +Foundation; either version 2 of the License, or (at your option) any
    +later version.
    +
    +or both in parallel, as here.
    +
    +The GNU MP Library is distributed in the hope that it will be useful, but
    +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
    +or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    +for more details.
    +
    +You should have received copies of the GNU General Public License and the
    +GNU Lesser General Public License along with the GNU MP Library.  If not,
    +see https://www.gnu.org/licenses/.
    +
    +ADDITIONAL LICENSE INFORMATION:
    +
    +> GPL3.0
    +
    +gmp-6.1.2.tar.xz\gmp-6.1.2.tar\gmp-6.1.2\demos\factorize.c
    +
    +Factoring with Pollard's rho method.
    +
    +Copyright 1995, 1997-2003, 2005, 2009, 2012, 2015 Free Software
    +Foundation, Inc.
    +
    +This program is free software; you can redistribute it and/or modify it under
    +the terms of the GNU General Public License as published by the Free Software
    +Foundation; either version 3 of the License, or (at your option) any later
    +version.
    +
    +This program is distributed in the hope that it will be useful, but WITHOUT ANY
    +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
    +PARTICULAR PURPOSE.  See the GNU General Public License for more details.
    +
    +You should have received a copy of the GNU General Public License along with
    +this program.  If not, see https://www.gnu.org/licenses/.
    +
    +> GPL3.0 with Bison Parser Exception
    +
    +gmp-6.1.2.tar.xz\gmp-6.1.2.tar\gmp-6.1.2\demos\calc\calc.c
    +
    +Bison implementation for Yacc-like parsers in C
    +
    +Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
    +
    +This program is free software: you can redistribute it and/or modify
    +it under the terms of the GNU General Public License as published by
    +the Free Software Foundation, either version 3 of the License, or
    +(at your option) any later version.
    +
    +This program is distributed in the hope that it will be useful,
    +but WITHOUT ANY WARRANTY; without even the implied warranty of
    +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +GNU General Public License for more details.
    +
    +You should have received a copy of the GNU General Public License
    +along with this program.  If not, see .  */
    +
    +/* As a special exception, you may create a larger work that contains
    +part or all of the Bison parser skeleton and distribute that work
    +under terms of your choice, so long as that work isn't itself a
    +parser generator using the skeleton or a modified version thereof
    +as a parser skeleton.  Alternatively, if you modify or redistribute
    +the parser skeleton itself, you may (at your option) remove this
    +special exception, which will cause the skeleton and the resulting
    +Bison output files to be licensed under the GNU General Public
    +License without this special exception.
    +
    +This special exception was added by the Free Software Foundation in
    +version 2.2 of Bison.
    +
    +> GFDL 1.3
    +
    +gmp-6.1.2.tar.xz\gmp-6.1.2.tar\gmp-6.1.2\doc\gmp.info
    +
    +Copyright 1991, 1993-2016 Free Software Foundation, Inc.
    +
    +Permission is granted to copy, distribute and/or modify this document
    +under the terms of the GNU Free Documentation License, Version 1.3 or
    +any later version published by the Free Software Foundation; with no
    +Invariant Sections, with the Front-Cover Texts being "A GNU Manual", and
    +with the Back-Cover Texts being "You have freedom to copy and modify
    +this GNU Manual, like GNU software".  A copy of the license is included
    +in *note GNU Free Documentation License::.
    +
    +> GPL2.0
    +
    +gmp-6.1.2.tar.xz\gmp-6.1.2.tar\gmp-6.1.2\mini-gmp\tests\run-tests
    +
    +Copyright (C) 2000-2002, 2004, 2005, 2011, 2012, 2016  Niels Möller
    +
    +This program is free software; you can redistribute it and/or modify
    +it under the terms of the GNU General Public License as published by
    +the Free Software Foundation; either version 2 of the License, or
    +(at your option) any later version.
    +
    +This program is distributed in the hope that it will be useful,
    +but WITHOUT ANY WARRANTY; without even the implied warranty of
    +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +GNU General Public License for more details.
    +
    +You should have received a copy of the GNU General Public License along
    +with this program; if not, write to the Free Software Foundation, Inc.,
    +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
    +
    +> MIT Style
    +
    +gmp-6.1.2.tar.xz\gmp-6.1.2.tar\gmp-6.1.2\aclocal.m4
    +
    +Copyright (C) 1996-2014 Free Software Foundation, Inc.
    +
    +This file is free software; the Free Software Foundation
    +gives unlimited permission to copy and/or distribute it,
    +with or without modifications, as long as this notice is preserved.
    +
    +This program is distributed in the hope that it will be useful,
    +but WITHOUT ANY WARRANTY, to the extent permitted by law; without
    +even the implied warranty of MERCHANTABILITY or FITNESS FOR A
    +PARTICULAR PURPOSE.
    +
    +--------------- SECTION 8: GNU Library General Public License, V2.0 ----------
    +
    +GNU Library General Public License, V2.0 is applicable to the following component(s).
    +
    +
    +>>> glib-2.52.1-3.ph2
    +
    +Copyright © 2015 Canonical Limited
    +
    +This library is free software; you can redistribute it and/or
    +modify it under the terms of the GNU Lesser General Public
    +License as published by the Free Software Foundation; either
    +version 2 of the License, or (at your option) any later version.
    +
    +This library is distributed in the hope that it will be useful,
    +but WITHOUT ANY WARRANTY; without even the implied warranty of
    +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    +Lesser General Public License for more details.
    +
    +You should have received a copy of the GNU Lesser General
    +Public License along with this library; if not, see .
    +
    +ADDITIONAL LICENSE INFORMATION:
    +
    +> Public Domain
    +
    +glib-2.52.1.tar.xz\glib-2.52.1.tar\glib-2.52.1\build\win32\dirent\dirent.h
    +
    +This file has no copyright assigned and is placed in the Public Domain.
    +This file is a part of the mingw-runtime package.
    +No warranty is given; refer to the file DISCLAIMER within the package.
    +
    +> LGPL 3.0
    +
    +glib-2.52.1.tar.xz\glib-2.52.1.tar\glib-2.52.1\docs\reference\glib\html\glib-resources.html
    +
    +If you develop a bugfix or enhancement for GLib, please file that in Bugzilla as well. Bugzilla allows you to attach files; please attach a patch generated by the utility, using the option to make the patch more readable. All patches must be offered under the terms of the GNU LGPL license, so be sure you are authorized to give us the patch under those terms.
    +
    +> MIT
    +
    +glib-2.52.1.tar.xz\glib-2.52.1.tar\glib-2.52.1\gio\kqueue\kqueue-sub.h
    +
    +Copyright (c) 2011, 2012 Dmitry Matveev 
    +
    +Permission is hereby granted, free of charge, to any person obtaining a copy
    +of this software and associated documentation files (the "Software"), to deal
    +in the Software without restriction, including without limitation the rights
    +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    +copies of the Software, and to permit persons to whom the Software is
    +furnished to do so, subject to the following conditions:
    +
    +The above copyright notice and this permission notice shall be included in
    +all copies or substantial portions of the Software.
    +
    +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    +THE SOFTWARE.
    +
    +> LGPL 2.0
    +
    +glib-2.52.1.tar.xz\glib-2.52.1.tar\glib-2.52.1\gio\xdgmime\xdgmimeparent.c
    +
    +[PLEASE NOTE:  VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE LGPL 2.0.  PLEASE SEE THE APPENDIX TO REVIEW THE FULL TEXT OF THE LGPL 2.0.  THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.]
    +
    +Copyright (C) 2004  Red Hat, Inc.
    +Copyright (C) 2004  Matthias Clasen 
    +
    +Licensed under the Academic Free License version 2.0
    +Or under the following terms:
    +
    +This library is free software; you can redistribute it and/or
    +modify it under the terms of the GNU Lesser General Public
    +License as published by the Free Software Foundation; either
    +version 2 of the License, or (at your option) any later version.
    +
    +This library is distributed in the hope that it will be useful,
    +but WITHOUT ANY WARRANTY; without even the implied warranty of
    +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
    +Lesser General Public License for more details.
    +
    +You should have received a copy of the GNU Lesser General Public
    +License along with this library; if not, see .
    +
    +> GPL 2.0
    +
    +glib-2.52.1.tar.xz\glib-2.52.1.tar\glib-2.52.1\glib\gen-unicode-tables.pl
    +
    +Copyright (C) 1998, 1999 Tom Tromey
    +Copyright (C) 2001 Red Hat Software
    +
    +This program is free software; you can redistribute it and/or modify
    +it under the terms of the GNU General Public License as published by
    +the Free Software Foundation; either version 2, or (at your option)
    +any later version.
    +
    +This program is distributed in the hope that it will be useful,
    +but WITHOUT ANY WARRANTY; without even the implied warranty of
    +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +GNU General Public License for more details.
    +
    +You should have received a copy of the GNU General Public License
    +along with this program; if not, see .
    +
    +> LGPL 2.1
    +
    +glib-2.52.1.tar.xz\glib-2.52.1.tar\glib-2.52.1\gio\win32\winhttp.h
    +
    +Copyright (C) 2007 Francois Gouget
    +
    +This library is free software; you can redistribute it and/or
    +modify it under the terms of the GNU Lesser General Public
    +License as published by the Free Software Foundation; either
    +version 2.1 of the License, or (at your option) any later version.
    +
    +This library is distributed in the hope that it will be useful,
    +but WITHOUT ANY WARRANTY; without even the implied warranty of
    +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    +Lesser General Public License for more details.
    +
    +You should have received a copy of the GNU Lesser General Public
    +License along with this library; if not, write to the Free Software
    +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
    +
    +> BSD-3 CLAUSE
    +
    +glib-2.52.1.tar.xz\glib-2.52.1.tar\glib-2.52.1\glib\pcre\pcre.h
    +
    +Copyright (c) 1997-2012 University of Cambridge
    +-----------------------------------------------------------------------------
    +Redistribution and use in source and binary forms, with or without
    +modification, are permitted provided that the following conditions are met:
    +
    +* Redistributions of source code must retain the above copyright notice,
    +this list of conditions and the following disclaimer.
    +
    +* Redistributions in binary form must reproduce the above copyright
    +notice, this list of conditions and the following disclaimer in the
    +documentation and/or other materials provided with the distribution.
    +
    +* Neither the name of the University of Cambridge nor the names of its
    +contributors may be used to endorse or promote products derived from
    +this software without specific prior written permission.
    +
    +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
    +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
    +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
    +POSSIBILITY OF SUCH DAMAGE.
    +
    +> BSD-4
    +
    +glib-2.52.1.tar.xz\glib-2.52.1.tar\glib-2.52.1\glib\valgrind.h
    +
    +   Notice that the following BSD-style license applies to this one
    +   file (valgrind.h) only.  The rest of Valgrind is licensed under the
    +   terms of the GNU General Public License, version 2, unless
    +   otherwise indicated.  See the COPYING file in the source
    +   distribution for details.
    +---------------------------------------------------------------
    +   This file is part of Valgrind, a dynamic binary instrumentation
    +   framework.
    +
    +   Copyright (C) 2000-2013 Julian Seward.  All rights reserved.
    +
    +   Redistribution and use in source and binary forms, with or without
    +   modification, are permitted provided that the following conditions
    +   are met:
    +
    +   1. Redistributions of source code must retain the above copyright
    +      notice, this list of conditions and the following disclaimer.
    +
    +   2. The origin of this software must not be misrepresented; you must 
    +      not claim that you wrote the original software.  If you use this 
    +      software in a product, an acknowledgment in the product 
    +      documentation would be appreciated but is not required.
    +
    +   3. Altered source versions must be plainly marked as such, and must
    +      not be misrepresented as being the original software.
    +
    +   4. The name of the author may not be used to endorse or promote 
    +      products derived from this software without specific prior written 
    +      permission.
    +
    +   THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
    +   OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
    +   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    +   ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
    +   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    +   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
    +   GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    +   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
    +   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
    +   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    +   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    +----------------------------------------------------------------
    +   Notice that the above BSD-style license applies to this one file
    +   (valgrind.h) only.  The entire rest of Valgrind is licensed under
    +   the terms of the GNU General Public License, version 2.  See the
    +   COPYING file in the source distribution for details.
    +
    +--------------- SECTION 9: Mozilla Public License, V2.0 ----------
    +
    +Mozilla Public License, V2.0 is applicable to the following component(s).
    +
    +
    +>>> ca-certificates-20180919-1.ph2
    +
    +This Source Code Form is subject to the terms of the Mozilla Public
    + License, v. 2.0. If a copy of the MPL was not distributed with this
    + file, You can obtain one at http://mozilla.org/MPL/2.0/.
    +
    +>>> nspr-4.15-1.ph2
    +
    +This Source Code Form is subject to the terms of the Mozilla Public
    +License, v. 2.0. If a copy of the MPL was not distributed with this
    +file, You can obtain one at http://mozilla.org/MPL/2.0/.
    +
    +ADDITIONAL LICENSE INFORMATION:
    +
    +> MPL 2.0
    +
    +[PLEASE NOTE:  VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE MPL 2.0.  PLEASE SEE THE APPENDIX TO REVIEW THE FULL TEXT OF THE MPL 2.0.  THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.]
    +
    +
    +nspr-4.15.tar.gz\..\stage\v4.15\src\nspr-4.15.tar\nspr-4.15\nspr\pkg\linux\sun-nspr.spec
    +
    +Under "MPL/GPL" license.
    +
    +>BEER-WARE LICENSE
    +
    +nspr-4.15.tar.gz\..\stage\v4.15\src\nspr-4.15.tar\nspr-4.15\nspr\pr\src\malloc\prmalloc.c
    +
    +"THE BEER-WARE LICENSE" (Revision 42):
    + wrote this file.  As long as you retain this notice you
    +can do whatever you want with this stuff. If we meet some day, and you think
    +this stuff is worth it, you can buy me a beer in return.   Poul-Henning
    +
    +>BSD-3
    +
    +nspr-4.15.tar.gz\..\stage\v4.15\src\nspr-4.15.tar\nspr-4.15\nspr\pr\src\misc\prcountr.c
    +
    +Copyright (c) 1983, 1990, 1993
    +The Regents of the University of California.  All rights reserved.
    +
    +Redistribution and use in source and binary forms, with or without
    +modification, are permitted provided that the following conditions
    +are met:
    +1. Redistributions of source code must retain the above copyright
    +notice, this list of conditions and the following disclaimer.
    +2. Redistributions in binary form must reproduce the above copyright
    +notice, this list of conditions and the following disclaimer in the
    +documentation and/or other materials provided with the distribution.
    +4. Neither the name of the University nor the names of its contributors
    +may be used to endorse or promote products derived from this software
    +without specific prior written permission.
    +
    +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
    +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    +ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
    +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
    +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    +SUCH DAMAGE.
    +
    +
    +>MIT
    +
    +
    +nspr-4.15.tar.gz\..\stage\v4.15\src\nspr-4.15.tar\nspr-4.15\nspr\pr\src\misc\prcountr.c
    +
    +Portions Copyright (c) 1993 by Digital Equipment Corporation.
    +
    +Permission to use, copy, modify, and distribute this software for any
    +purpose with or without fee is hereby granted, provided that the above
    +copyright notice and this permission notice appear in all copies, and that
    +the name of Digital Equipment Corporation not be used in advertising or
    +publicity pertaining to distribution of the document or software without
    +specific, written prior permission.
    +
    +THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
    +WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
    +OF MERCHANTABILITY AND FITNESS.   IN NO EVENT SHALL DIGITAL EQUIPMENT
    +CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
    +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
    +PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
    +ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
    +SOFTWARE.
    +
    +>>> nss-3.31.1-1.ph2
    +
    +This Source Code Form is subject to the terms of the Mozilla Public
    +License, v. 2.0. If a copy of the MPL was not distributed with this
    +file, You can obtain one at http://mozilla.org/MPL/2.0/.
    +
    +ADDITIONAL LICENSE INFORMATION:
    +
    +> BSD-2
    +
    +nss-3.31.1.tar.gz\..\stage\NSS_3_31_1_RTM\src\nss-3.31.1.tar\nss-3.31.1\nss\cmd\libpkix\pkix_pl\module\test_socket.c
    +
    +Test Socket Type
    +
    +Copyright 2004-2005 Sun Microsystems, Inc.  All rights reserved.
    +
    +Redistribution and use in source and binary forms, with or without
    +modification, are permitted provided that the following conditions are met:
    +
    +1. Redistribution of source code must retain the above copyright notice,
    +this list of conditions and the following disclaimer.
    +
    +2. Redistribution in binary form must reproduce the above copyright
    +notice, this list of conditions and the following disclaimer in the
    +documentation and/or other materials provided with the distribution.
    +
    +Neither the name of Sun Microsystems, Inc. or the names of contributors may
    +be used to endorse or promote products derived from this software without
    +specific prior written permission.
    +
    +This software is provided "AS IS," without a warranty of any kind. ALL
    +EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING
    +ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
    +OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN")
    +AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE
    +AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS
    +DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST
    +REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL,
    +INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY
    +OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
    +EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
    +
    +You acknowledge that this software is not designed or intended for use in
    +the design, construction, operation or maintenance of any nuclear facility.
    +
    +
    +> MIT
    +
    +nss-3.31.1.tar.gz\..\stage\NSS_3_31_1_RTM\src\nss-3.31.1.tar\nss-3.31.1\nss\coreconf\mkdepend\def.h
    +
    +Copyright (c) 1993, 1994, 1998 The Open Group.
    +
    +Permission to use, copy, modify, distribute, and sell this software and its
    +documentation for any purpose is hereby granted without fee, provided that
    +the above copyright notice appear in all copies and that both that
    +copyright notice and this permission notice appear in supporting
    +documentation.
    +
    +The above copyright notice and this permission notice shall be included in
    +all copies or substantial portions of the Software.
    +
    +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
    +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
    +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
    +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    +
    +> BSD-3
    +
    +nss-3.31.1.tar.gz\..\stage\NSS_3_31_1_RTM\src\nss-3.31.1.tar\nss-3.31.1\nss\gtests\google_test\gtest\include\gtest\internal\gtest-death-test-internal.h
    +
    +Copyright 2005, Google Inc.
    +All rights reserved.
    +
    +Redistribution and use in source and binary forms, with or without
    +modification, are permitted provided that the following conditions are
    +met:
    +Redistributions of source code must retain the above copyright
    +notice, this list of conditions and the following disclaimer.
    +Redistributions in binary form must reproduce the above
    +copyright notice, this list of conditions and the following disclaimer
    +in the documentation and/or other materials provided with the
    +distribution.
    +Neither the name of Google Inc. nor the names of its
    +contributors may be used to endorse or promote products derived from
    +this software without specific prior written permission.
    +
    +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
    +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    +
    +>Public Domain
    +
    +nss-3.31.1.tar.gz\..\stage\NSS_3_31_1_RTM\src\nss-3.31.1.tar\nss-3.31.1\nss\lib\dbm\src\dirent.h
    +
    +A public domain implementation of BSD directory routines for
    +MS-DOS.  Written by Michael Rendell ({uunet,utai}michael@garfield),
    +August 1897
    +
    +
    +> MIT- Style
    +
    +nss-3.31.1.tar.gz\..\stage\NSS_3_31_1_RTM\src\nss-3.31.1.tar\nss-3.31.1\nss\lib\jar\jzlib.h
    +
    +Copyright (C) 1995-1996 Jean-loup Gailly and Mark Adler
    +
    +This software is provided 'as-is', without any express or implied
    +warranty.  In no event will the authors be held liable for any damages
    +arising from the use of this software.
    +
    +Permission is granted to anyone to use this software for any purpose,
    +including commercial applications, and to alter it and redistribute it
    +freely, subject to the following restrictions:
    +
    +1. The origin of this software must not be misrepresented; you must not
    +claim that you wrote the original software. If you use this software
    +in a product, an acknowledgment in the product documentation would be
    +appreciated but is not required.
    +2. Altered source versions must be plainly marked as such, and must not be
    +misrepresented as being the original software.
    +3. This notice may not be removed or altered from any source distribution.
    +
    +Jean-loup Gailly        Mark Adler
    +gzip@prep.ai.mit.edu    madler@alumni.caltech.edu
    +
    +
    +>MPL 2.0
    +
    +[PLEASE NOTE:  VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE MPL 2.0.  PLEASE SEE THE APPENDIX TO REVIEW THE FULL TEXT OF THE MPL 2.0.  THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.]
    +
    +
    +nss-3.31.1.tar.gz\..\stage\NSS_3_31_1_RTM\src\nss-3.31.1.tar\nss-3.31.1\nss\pkg\linux\sun-nss.spec
    +
    +Under "MPL/GPL" license.
    +
    +
    +=============== APPENDIX. Standard License Files ============== 
    +
    +
    +--------------- SECTION 1: Apache License, V2.0 -----------
    +
    +Apache License 
    +
    +
    +
    +Version 2.0, January 2004 
    +
    +http://www.apache.org/licenses/ 
    +
    +
    +
    +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 
    +
    +
    +
    +1. Definitions.
    +
    +
    +
    +"License" shall mean the terms and conditions for use, reproduction,
    +
    +and distribution as defined by Sections 1 through 9 of this document.
    +
    +
    +
    +"Licensor" shall mean the copyright owner or entity authorized by the
    +
    +copyright owner that is granting the License.  
    +
    +
    +
    +"Legal Entity" shall mean the union of the acting entity and all other
    +
    +entities that control, are controlled by, or are under common control
    +
    +with that entity. For the purposes of this definition, "control" means
    +
    +(i) the power, direct or indirect, to cause the direction or management
    +
    +of such entity, whether by contract or otherwise, or (ii) ownership
    +
    +of fifty percent (50) or more of the outstanding shares, or (iii)
    +
    +beneficial ownership of such entity.
    +
    +
    +
    +"You" (or "Your") shall mean an individual or Legal Entity exercising
    +
    +permissions granted by this License.  
    +
    +
    +
    +"Source" form shall mean the preferred form for making modifications,
    +
    +including but not limited to software source code, documentation source,
    +
    +and configuration files.
    +
    +
    +
    +"Object" form shall mean any form resulting from mechanical transformation
    +
    +or translation of a Source form, including but not limited to compiled
    +
    +object code, generated documentation, and conversions to other media
    +
    +types.  
    +
    +
    +
    +"Work" shall mean the work of authorship, whether in Source or
    +
    +Object form, made available under the License, as indicated by a copyright
    +
    +notice that is included in or attached to the work (an example is provided
    +
    +in the Appendix below).  
    +
    +
    +
    +"Derivative Works" shall mean any work, whether in Source or Object form,
    +
    +that is based on (or derived from) the Work and for which the editorial
    +
    +revisions, annotations, elaborations, or other modifications represent,
    +
    +as a whole, an original work of authorship. For the purposes of this
    +
    +License, Derivative Works shall not include works that remain separable
    +
    +from, or merely link (or bind by name) to the interfaces of, the Work
    +
    +and Derivative Works thereof.
    +
    +
    +
    +"Contribution" shall mean any work of authorship, including the
    +
    +original version of the Work and any modifications or additions to
    +
    +that Work or Derivative Works thereof, that is intentionally submitted
    +
    +to Licensor for inclusion in the Work by the copyright owner or by an
    +
    +individual or Legal Entity authorized to submit on behalf of the copyright
    +
    +owner. For the purposes of this definition, "submitted" means any form of
    +
    +electronic, verbal, or written communication sent to the Licensor or its
    +
    +representatives, including but not limited to communication on electronic
    +
    +mailing lists, source code control systems, and issue tracking systems
    +
    +that are managed by, or on behalf of, the Licensor for the purpose of
    +
    +discussing and improving the Work, but excluding communication that is
    +
    +conspicuously marked or otherwise designated in writing by the copyright
    +
    +owner as "Not a Contribution."
    +
    +
    +
    +"Contributor" shall mean Licensor and any individual or Legal Entity
    +
    +on behalf of whom a Contribution has been received by Licensor and
    +
    +subsequently incorporated within the Work.
    +
    +
    +
    +2. Grant of Copyright License.
    +
    +Subject to the terms and conditions of this License, each Contributor
    +
    +hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
    +
    +royalty-free, irrevocable copyright license to reproduce, prepare
    +
    +Derivative Works of, publicly display, publicly perform, sublicense, and
    +
    +distribute the Work and such Derivative Works in Source or Object form.
    +
    +
    +
    +3. Grant of Patent License.
    +
    +Subject to the terms and conditions of this License, each Contributor
    +
    +hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
    +
    +royalty- free, irrevocable (except as stated in this section) patent
    +
    +license to make, have made, use, offer to sell, sell, import, and
    +
    +otherwise transfer the Work, where such license applies only to those
    +
    +patent claims licensable by such Contributor that are necessarily
    +
    +infringed by their Contribution(s) alone or by combination of
    +
    +their Contribution(s) with the Work to which such Contribution(s)
    +
    +was submitted. If You institute patent litigation against any entity
    +
    +(including a cross-claim or counterclaim in a lawsuit) alleging that the
    +
    +Work or a Contribution incorporated within the Work constitutes direct
    +
    +or contributory patent infringement, then any patent licenses granted
    +
    +to You under this License for that Work shall terminate as of the date
    +
    +such litigation is filed.
    +
    +
    +
    +4. Redistribution.
    +
    +You may reproduce and distribute copies of the Work or Derivative Works
    +
    +thereof in any medium, with or without modifications, and in Source or
    +
    +Object form, provided that You meet the following conditions:
    +
    +
    +
    +  a. You must give any other recipients of the Work or Derivative Works
    +
    +     a copy of this License; and
    +
    +
    +
    +  b. You must cause any modified files to carry prominent notices stating
    +
    +     that You changed the files; and
    +
    +
    +
    +  c. You must retain, in the Source form of any Derivative Works that
    +
    +     You distribute, all copyright, patent, trademark, and attribution
    +
    +     notices from the Source form of the Work, excluding those notices
    +
    +     that do not pertain to any part of the Derivative Works; and
    +
    +
    +
    +  d. If the Work includes a "NOTICE" text file as part of its
    +
    +     distribution, then any Derivative Works that You distribute must
    +
    +     include a readable copy of the attribution notices contained
    +
    +     within such NOTICE file, excluding those notices that do not
    +
    +     pertain to any part of the Derivative Works, in at least one of
    +
    +     the following places: within a NOTICE text file distributed as part
    +
    +     of the Derivative Works; within the Source form or documentation,
    +
    +     if provided along with the Derivative Works; or, within a display
    +
    +     generated by the Derivative Works, if and wherever such third-party
    +
    +     notices normally appear. The contents of the NOTICE file are for
    +
    +     informational purposes only and do not modify the License. You
    +
    +     may add Your own attribution notices within Derivative Works that
    +
    +     You distribute, alongside or as an addendum to the NOTICE text
    +
    +     from the Work, provided that such additional attribution notices
    +
    +     cannot be construed as modifying the License.  You may add Your own
    +
    +     copyright statement to Your modifications and may provide additional
    +
    +     or different license terms and conditions for use, reproduction, or
    +
    +     distribution of Your modifications, or for any such Derivative Works
    +
    +     as a whole, provided Your use, reproduction, and distribution of the
    +
    +     Work otherwise complies with the conditions stated in this License.
    +
    +
    +
    +5. Submission of Contributions.
    +
    +Unless You explicitly state otherwise, any Contribution intentionally
    +
    +submitted for inclusion in the Work by You to the Licensor shall be
    +
    +under the terms and conditions of this License, without any additional
    +
    +terms or conditions.  Notwithstanding the above, nothing herein shall
    +
    +supersede or modify the terms of any separate license agreement you may
    +
    +have executed with Licensor regarding such Contributions.
    +
    +
    +
    +6. Trademarks.
    +
    +This License does not grant permission to use the trade names, trademarks,
    +
    +service marks, or product names of the Licensor, except as required for
    +
    +reasonable and customary use in describing the origin of the Work and
    +
    +reproducing the content of the NOTICE file.
    +
    +
    +
    +7. Disclaimer of Warranty.
    +
    +Unless required by applicable law or agreed to in writing, Licensor
    +
    +provides the Work (and each Contributor provides its Contributions) on
    +
    +an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
    +
    +express or implied, including, without limitation, any warranties or
    +
    +conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR
    +
    +A PARTICULAR PURPOSE. You are solely responsible for determining the
    +
    +appropriateness of using or redistributing the Work and assume any risks
    +
    +associated with Your exercise of permissions under this License.
    +
    +
    +
    +8. Limitation of Liability.
    +
    +In no event and under no legal theory, whether in tort (including
    +
    +negligence), contract, or otherwise, unless required by applicable law
    +
    +(such as deliberate and grossly negligent acts) or agreed to in writing,
    +
    +shall any Contributor be liable to You for damages, including any direct,
    +
    +indirect, special, incidental, or consequential damages of any character
    +
    +arising as a result of this License or out of the use or inability to
    +
    +use the Work (including but not limited to damages for loss of goodwill,
    +
    +work stoppage, computer failure or malfunction, or any and all other
    +
    +commercial damages or losses), even if such Contributor has been advised
    +
    +of the possibility of such damages.
    +
    +
    +
    +9. Accepting Warranty or Additional Liability.
    +
    +While redistributing the Work or Derivative Works thereof, You may
    +
    +choose to offer, and charge a fee for, acceptance of support, warranty,
    +
    +indemnity, or other liability obligations and/or rights consistent with
    +
    +this License. However, in accepting such obligations, You may act only
    +
    +on Your own behalf and on Your sole responsibility, not on behalf of
    +
    +any other Contributor, and only if You agree to indemnify, defend, and
    +
    +hold each Contributor harmless for any liability incurred by, or claims
    +
    +asserted against, such Contributor by reason of your accepting any such
    +
    +warranty or additional liability.
    +
    +
    +
    +END OF TERMS AND CONDITIONS 
    +
    +
    +
    +--------------- SECTION 2: GNU General Public License, V2.0 -----------
    +
    +		    GNU GENERAL PUBLIC LICENSE
    +		       Version 2, June 1991
    +
    + Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
    + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
    + Everyone is permitted to copy and distribute verbatim copies
    + of this license document, but changing it is not allowed.
    +
    +			    Preamble
    +
    +  The licenses for most software are designed to take away your
    +freedom to share and change it.  By contrast, the GNU General Public
    +License is intended to guarantee your freedom to share and change free
    +software--to make sure the software is free for all its users.  This
    +General Public License applies to most of the Free Software
    +Foundation's software and to any other program whose authors commit to
    +using it.  (Some other Free Software Foundation software is covered by
    +the GNU Lesser General Public License instead.)  You can apply it to
    +your programs, too.
    +
    +  When we speak of free software, we are referring to freedom, not
    +price.  Our General Public Licenses are designed to make sure that you
    +have the freedom to distribute copies of free software (and charge for
    +this service if you wish), that you receive source code or can get it
    +if you want it, that you can change the software or use pieces of it
    +in new free programs; and that you know you can do these things.
    +
    +  To protect your rights, we need to make restrictions that forbid
    +anyone to deny you these rights or to ask you to surrender the rights.
    +These restrictions translate to certain responsibilities for you if you
    +distribute copies of the software, or if you modify it.
    +
    +  For example, if you distribute copies of such a program, whether
    +gratis or for a fee, you must give the recipients all the rights that
    +you have.  You must make sure that they, too, receive or can get the
    +source code.  And you must show them these terms so they know their
    +rights.
    +
    +  We protect your rights with two steps: (1) copyright the software, and
    +(2) offer you this license which gives you legal permission to copy,
    +distribute and/or modify the software.
    +
    +  Also, for each author's protection and ours, we want to make certain
    +that everyone understands that there is no warranty for this free
    +software.  If the software is modified by someone else and passed on, we
    +want its recipients to know that what they have is not the original, so
    +that any problems introduced by others will not reflect on the original
    +authors' reputations.
    +
    +  Finally, any free program is threatened constantly by software
    +patents.  We wish to avoid the danger that redistributors of a free
    +program will individually obtain patent licenses, in effect making the
    +program proprietary.  To prevent this, we have made it clear that any
    +patent must be licensed for everyone's free use or not licensed at all.
    +
    +  The precise terms and conditions for copying, distribution and
    +modification follow.
    +
    +		    GNU GENERAL PUBLIC LICENSE
    +   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
    +
    +  0. This License applies to any program or other work which contains
    +a notice placed by the copyright holder saying it may be distributed
    +under the terms of this General Public License.  The "Program", below,
    +refers to any such program or work, and a "work based on the Program"
    +means either the Program or any derivative work under copyright law:
    +that is to say, a work containing the Program or a portion of it,
    +either verbatim or with modifications and/or translated into another
    +language.  (Hereinafter, translation is included without limitation in
    +the term "modification".)  Each licensee is addressed as "you".
    +
    +Activities other than copying, distribution and modification are not
    +covered by this License; they are outside its scope.  The act of
    +running the Program is not restricted, and the output from the Program
    +is covered only if its contents constitute a work based on the
    +Program (independent of having been made by running the Program).
    +Whether that is true depends on what the Program does.
    +
    +  1. You may copy and distribute verbatim copies of the Program's
    +source code as you receive it, in any medium, provided that you
    +conspicuously and appropriately publish on each copy an appropriate
    +copyright notice and disclaimer of warranty; keep intact all the
    +notices that refer to this License and to the absence of any warranty;
    +and give any other recipients of the Program a copy of this License
    +along with the Program.
    +
    +You may charge a fee for the physical act of transferring a copy, and
    +you may at your option offer warranty protection in exchange for a fee.
    +
    +  2. You may modify your copy or copies of the Program or any portion
    +of it, thus forming a work based on the Program, and copy and
    +distribute such modifications or work under the terms of Section 1
    +above, provided that you also meet all of these conditions:
    +
    +    a) You must cause the modified files to carry prominent notices
    +    stating that you changed the files and the date of any change.
    +
    +    b) You must cause any work that you distribute or publish, that in
    +    whole or in part contains or is derived from the Program or any
    +    part thereof, to be licensed as a whole at no charge to all third
    +    parties under the terms of this License.
    +
    +    c) If the modified program normally reads commands interactively
    +    when run, you must cause it, when started running for such
    +    interactive use in the most ordinary way, to print or display an
    +    announcement including an appropriate copyright notice and a
    +    notice that there is no warranty (or else, saying that you provide
    +    a warranty) and that users may redistribute the program under
    +    these conditions, and telling the user how to view a copy of this
    +    License.  (Exception: if the Program itself is interactive but
    +    does not normally print such an announcement, your work based on
    +    the Program is not required to print an announcement.)
    +
    +These requirements apply to the modified work as a whole.  If
    +identifiable sections of that work are not derived from the Program,
    +and can be reasonably considered independent and separate works in
    +themselves, then this License, and its terms, do not apply to those
    +sections when you distribute them as separate works.  But when you
    +distribute the same sections as part of a whole which is a work based
    +on the Program, the distribution of the whole must be on the terms of
    +this License, whose permissions for other licensees extend to the
    +entire whole, and thus to each and every part regardless of who wrote it.
    +
    +Thus, it is not the intent of this section to claim rights or contest
    +your rights to work written entirely by you; rather, the intent is to
    +exercise the right to control the distribution of derivative or
    +collective works based on the Program.
    +
    +In addition, mere aggregation of another work not based on the Program
    +with the Program (or with a work based on the Program) on a volume of
    +a storage or distribution medium does not bring the other work under
    +the scope of this License.
    +
    +  3. You may copy and distribute the Program (or a work based on it,
    +under Section 2) in object code or executable form under the terms of
    +Sections 1 and 2 above provided that you also do one of the following:
    +
    +    a) Accompany it with the complete corresponding machine-readable
    +    source code, which must be distributed under the terms of Sections
    +    1 and 2 above on a medium customarily used for software interchange; or,
    +
    +    b) Accompany it with a written offer, valid for at least three
    +    years, to give any third party, for a charge no more than your
    +    cost of physically performing source distribution, a complete
    +    machine-readable copy of the corresponding source code, to be
    +    distributed under the terms of Sections 1 and 2 above on a medium
    +    customarily used for software interchange; or,
    +
    +    c) Accompany it with the information you received as to the offer
    +    to distribute corresponding source code.  (This alternative is
    +    allowed only for noncommercial distribution and only if you
    +    received the program in object code or executable form with such
    +    an offer, in accord with Subsection b above.)
    +
    +The source code for a work means the preferred form of the work for
    +making modifications to it.  For an executable work, complete source
    +code means all the source code for all modules it contains, plus any
    +associated interface definition files, plus the scripts used to
    +control compilation and installation of the executable.  However, as a
    +special exception, the source code distributed need not include
    +anything that is normally distributed (in either source or binary
    +form) with the major components (compiler, kernel, and so on) of the
    +operating system on which the executable runs, unless that component
    +itself accompanies the executable.
    +
    +If distribution of executable or object code is made by offering
    +access to copy from a designated place, then offering equivalent
    +access to copy the source code from the same place counts as
    +distribution of the source code, even though third parties are not
    +compelled to copy the source along with the object code.
    +
    +  4. You may not copy, modify, sublicense, or distribute the Program
    +except as expressly provided under this License.  Any attempt
    +otherwise to copy, modify, sublicense or distribute the Program is
    +void, and will automatically terminate your rights under this License.
    +However, parties who have received copies, or rights, from you under
    +this License will not have their licenses terminated so long as such
    +parties remain in full compliance.
    +
    +  5. You are not required to accept this License, since you have not
    +signed it.  However, nothing else grants you permission to modify or
    +distribute the Program or its derivative works.  These actions are
    +prohibited by law if you do not accept this License.  Therefore, by
    +modifying or distributing the Program (or any work based on the
    +Program), you indicate your acceptance of this License to do so, and
    +all its terms and conditions for copying, distributing or modifying
    +the Program or works based on it.
    +
    +  6. Each time you redistribute the Program (or any work based on the
    +Program), the recipient automatically receives a license from the
    +original licensor to copy, distribute or modify the Program subject to
    +these terms and conditions.  You may not impose any further
    +restrictions on the recipients' exercise of the rights granted herein.
    +You are not responsible for enforcing compliance by third parties to
    +this License.
    +
    +  7. If, as a consequence of a court judgment or allegation of patent
    +infringement or for any other reason (not limited to patent issues),
    +conditions are imposed on you (whether by court order, agreement or
    +otherwise) that contradict the conditions of this License, they do not
    +excuse you from the conditions of this License.  If you cannot
    +distribute so as to satisfy simultaneously your obligations under this
    +License and any other pertinent obligations, then as a consequence you
    +may not distribute the Program at all.  For example, if a patent
    +license would not permit royalty-free redistribution of the Program by
    +all those who receive copies directly or indirectly through you, then
    +the only way you could satisfy both it and this License would be to
    +refrain entirely from distribution of the Program.
    +
    +If any portion of this section is held invalid or unenforceable under
    +any particular circumstance, the balance of the section is intended to
    +apply and the section as a whole is intended to apply in other
    +circumstances.
    +
    +It is not the purpose of this section to induce you to infringe any
    +patents or other property right claims or to contest validity of any
    +such claims; this section has the sole purpose of protecting the
    +integrity of the free software distribution system, which is
    +implemented by public license practices.  Many people have made
    +generous contributions to the wide range of software distributed
    +through that system in reliance on consistent application of that
    +system; it is up to the author/donor to decide if he or she is willing
    +to distribute software through any other system and a licensee cannot
    +impose that choice.
    +
    +This section is intended to make thoroughly clear what is believed to
    +be a consequence of the rest of this License.
    +
    +  8. If the distribution and/or use of the Program is restricted in
    +certain countries either by patents or by copyrighted interfaces, the
    +original copyright holder who places the Program under this License
    +may add an explicit geographical distribution limitation excluding
    +those countries, so that distribution is permitted only in or among
    +countries not thus excluded.  In such case, this License incorporates
    +the limitation as if written in the body of this License.
    +
    +  9. The Free Software Foundation may publish revised and/or new versions
    +of the General Public License from time to time.  Such new versions will
    +be similar in spirit to the present version, but may differ in detail to
    +address new problems or concerns.
    +
    +Each version is given a distinguishing version number.  If the Program
    +specifies a version number of this License which applies to it and "any
    +later version", you have the option of following the terms and conditions
    +either of that version or of any later version published by the Free
    +Software Foundation.  If the Program does not specify a version number of
    +this License, you may choose any version ever published by the Free Software
    +Foundation.
    +
    +  10. If you wish to incorporate parts of the Program into other free
    +programs whose distribution conditions are different, write to the author
    +to ask for permission.  For software which is copyrighted by the Free
    +Software Foundation, write to the Free Software Foundation; we sometimes
    +make exceptions for this.  Our decision will be guided by the two goals
    +of preserving the free status of all derivatives of our free software and
    +of promoting the sharing and reuse of software generally.
    +
    +			    NO WARRANTY
    +
    +  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
    +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
    +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
    +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
    +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
    +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
    +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
    +REPAIR OR CORRECTION.
    +
    +  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
    +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
    +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
    +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
    +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
    +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
    +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
    +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
    +POSSIBILITY OF SUCH DAMAGES.
    +
    +		     END OF TERMS AND CONDITIONS
    +
    +	    How to Apply These Terms to Your New Programs
    +
    +  If you develop a new program, and you want it to be of the greatest
    +possible use to the public, the best way to achieve this is to make it
    +free software which everyone can redistribute and change under these terms.
    +
    +  To do so, attach the following notices to the program.  It is safest
    +to attach them to the start of each source file to most effectively
    +convey the exclusion of warranty; and each file should have at least
    +the "copyright" line and a pointer to where the full notice is found.
    +
    +    
    +    Copyright (C)   
    +
    +    This program is free software; you can redistribute it and/or modify
    +    it under the terms of the GNU General Public License as published by
    +    the Free Software Foundation; either version 2 of the License, or
    +    (at your option) any later version.
    +
    +    This program is distributed in the hope that it will be useful,
    +    but WITHOUT ANY WARRANTY; without even the implied warranty of
    +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +    GNU General Public License for more details.
    +
    +    You should have received a copy of the GNU General Public License along
    +    with this program; if not, write to the Free Software Foundation, Inc.,
    +    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
    +
    +Also add information on how to contact you by electronic and paper mail.
    +
    +If the program is interactive, make it output a short notice like this
    +when it starts in an interactive mode:
    +
    +    Gnomovision version 69, Copyright (C) year name of author
    +    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    +    This is free software, and you are welcome to redistribute it
    +    under certain conditions; type `show c' for details.
    +
    +The hypothetical commands `show w' and `show c' should show the appropriate
    +parts of the General Public License.  Of course, the commands you use may
    +be called something other than `show w' and `show c'; they could even be
    +mouse-clicks or menu items--whatever suits your program.
    +
    +You should also get your employer (if you work as a programmer) or your
    +school, if any, to sign a "copyright disclaimer" for the program, if
    +necessary.  Here is a sample; alter the names:
    +
    +  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
    +  `Gnomovision' (which makes passes at compilers) written by James Hacker.
    +
    +  , 1 April 1989
    +  Ty Coon, President of Vice
    +
    +This General Public License does not permit incorporating your program into
    +proprietary programs.  If your program is a subroutine library, you may
    +consider it more useful to permit linking proprietary applications with the
    +library.  If this is what you want to do, use the GNU Lesser General
    +Public License instead of this License.
    +
    +
    +
    +--------------- SECTION 3: GNU General Public License, V3.0 -----------
    +
    +                    GNU GENERAL PUBLIC LICENSE
    +
    +                       Version 3, 29 June 2007
    +
    +
    +
    + Copyright (C) 2007 Free Software Foundation, Inc. 
    +
    + Everyone is permitted to copy and distribute verbatim copies
    +
    + of this license document, but changing it is not allowed.
    +
    +
    +
    +                            Preamble
    +
    +
    +
    +  The GNU General Public License is a free, copyleft license for
    +
    +software and other kinds of works.
    +
    +
    +
    +  The licenses for most software and other practical works are designed
    +
    +to take away your freedom to share and change the works.  By contrast,
    +
    +the GNU General Public License is intended to guarantee your freedom to
    +
    +share and change all versions of a program--to make sure it remains free
    +
    +software for all its users.  We, the Free Software Foundation, use the
    +
    +GNU General Public License for most of our software; it applies also to
    +
    +any other work released this way by its authors.  You can apply it to
    +
    +your programs, too.
    +
    +
    +
    +  When we speak of free software, we are referring to freedom, not
    +
    +price.  Our General Public Licenses are designed to make sure that you
    +
    +have the freedom to distribute copies of free software (and charge for
    +
    +them if you wish), that you receive source code or can get it if you
    +
    +want it, that you can change the software or use pieces of it in new
    +
    +free programs, and that you know you can do these things.
    +
    +
    +
    +  To protect your rights, we need to prevent others from denying you
    +
    +these rights or asking you to surrender the rights.  Therefore, you have
    +
    +certain responsibilities if you distribute copies of the software, or if
    +
    +you modify it: responsibilities to respect the freedom of others.
    +
    +
    +
    +  For example, if you distribute copies of such a program, whether
    +
    +gratis or for a fee, you must pass on to the recipients the same
    +
    +freedoms that you received.  You must make sure that they, too, receive
    +
    +or can get the source code.  And you must show them these terms so they
    +
    +know their rights.
    +
    +
    +
    +  Developers that use the GNU GPL protect your rights with two steps:
    +
    +(1) assert copyright on the software, and (2) offer you this License
    +
    +giving you legal permission to copy, distribute and/or modify it.
    +
    +
    +
    +  For the developers' and authors' protection, the GPL clearly explains
    +
    +that there is no warranty for this free software.  For both users' and
    +
    +authors' sake, the GPL requires that modified versions be marked as
    +
    +changed, so that their problems will not be attributed erroneously to
    +
    +authors of previous versions.
    +
    +
    +
    +  Some devices are designed to deny users access to install or run
    +
    +modified versions of the software inside them, although the manufacturer
    +
    +can do so.  This is fundamentally incompatible with the aim of
    +
    +protecting users' freedom to change the software.  The systematic
    +
    +pattern of such abuse occurs in the area of products for individuals to
    +
    +use, which is precisely where it is most unacceptable.  Therefore, we
    +
    +have designed this version of the GPL to prohibit the practice for those
    +
    +products.  If such problems arise substantially in other domains, we
    +
    +stand ready to extend this provision to those domains in future versions
    +
    +of the GPL, as needed to protect the freedom of users.
    +
    +
    +
    +  Finally, every program is threatened constantly by software patents.
    +
    +States should not allow patents to restrict development and use of
    +
    +software on general-purpose computers, but in those that do, we wish to
    +
    +avoid the special danger that patents applied to a free program could
    +
    +make it effectively proprietary.  To prevent this, the GPL assures that
    +
    +patents cannot be used to render the program non-free.
    +
    +
    +
    +  The precise terms and conditions for copying, distribution and
    +
    +modification follow.
    +
    +
    +
    +                       TERMS AND CONDITIONS
    +
    +
    +
    +  0. Definitions.
    +
    +
    +
    +  "This License" refers to version 3 of the GNU General Public License.
    +
    +
    +
    +  "Copyright" also means copyright-like laws that apply to other kinds of
    +
    +works, such as semiconductor masks.
    +
    +
    +
    +  "The Program" refers to any copyrightable work licensed under this
    +
    +License.  Each licensee is addressed as "you".  "Licensees" and
    +
    +"recipients" may be individuals or organizations.
    +
    +
    +
    +  To "modify" a work means to copy from or adapt all or part of the work
    +
    +in a fashion requiring copyright permission, other than the making of an
    +
    +exact copy.  The resulting work is called a "modified version" of the
    +
    +earlier work or a work "based on" the earlier work.
    +
    +
    +
    +  A "covered work" means either the unmodified Program or a work based
    +
    +on the Program.
    +
    +
    +
    +  To "propagate" a work means to do anything with it that, without
    +
    +permission, would make you directly or secondarily liable for
    +
    +infringement under applicable copyright law, except executing it on a
    +
    +computer or modifying a private copy.  Propagation includes copying,
    +
    +distribution (with or without modification), making available to the
    +
    +public, and in some countries other activities as well.
    +
    +
    +
    +  To "convey" a work means any kind of propagation that enables other
    +
    +parties to make or receive copies.  Mere interaction with a user through
    +
    +a computer network, with no transfer of a copy, is not conveying.
    +
    +
    +
    +  An interactive user interface displays "Appropriate Legal Notices"
    +
    +to the extent that it includes a convenient and prominently visible
    +
    +feature that (1) displays an appropriate copyright notice, and (2)
    +
    +tells the user that there is no warranty for the work (except to the
    +
    +extent that warranties are provided), that licensees may convey the
    +
    +work under this License, and how to view a copy of this License.  If
    +
    +the interface presents a list of user commands or options, such as a
    +
    +menu, a prominent item in the list meets this criterion.
    +
    +
    +
    +  1. Source Code.
    +
    +
    +
    +  The "source code" for a work means the preferred form of the work
    +
    +for making modifications to it.  "Object code" means any non-source
    +
    +form of a work.
    +
    +
    +
    +  A "Standard Interface" means an interface that either is an official
    +
    +standard defined by a recognized standards body, or, in the case of
    +
    +interfaces specified for a particular programming language, one that
    +
    +is widely used among developers working in that language.
    +
    +
    +
    +  The "System Libraries" of an executable work include anything, other
    +
    +than the work as a whole, that (a) is included in the normal form of
    +
    +packaging a Major Component, but which is not part of that Major
    +
    +Component, and (b) serves only to enable use of the work with that
    +
    +Major Component, or to implement a Standard Interface for which an
    +
    +implementation is available to the public in source code form.  A
    +
    +"Major Component", in this context, means a major essential component
    +
    +(kernel, window system, and so on) of the specific operating system
    +
    +(if any) on which the executable work runs, or a compiler used to
    +
    +produce the work, or an object code interpreter used to run it.
    +
    +
    +
    +  The "Corresponding Source" for a work in object code form means all
    +
    +the source code needed to generate, install, and (for an executable
    +
    +work) run the object code and to modify the work, including scripts to
    +
    +control those activities.  However, it does not include the work's
    +
    +System Libraries, or general-purpose tools or generally available free
    +
    +programs which are used unmodified in performing those activities but
    +
    +which are not part of the work.  For example, Corresponding Source
    +
    +includes interface definition files associated with source files for
    +
    +the work, and the source code for shared libraries and dynamically
    +
    +linked subprograms that the work is specifically designed to require,
    +
    +such as by intimate data communication or control flow between those
    +
    +subprograms and other parts of the work.
    +
    +
    +
    +  The Corresponding Source need not include anything that users
    +
    +can regenerate automatically from other parts of the Corresponding
    +
    +Source.
    +
    +
    +
    +  The Corresponding Source for a work in source code form is that
    +
    +same work.
    +
    +
    +
    +  2. Basic Permissions.
    +
    +
    +
    +  All rights granted under this License are granted for the term of
    +
    +copyright on the Program, and are irrevocable provided the stated
    +
    +conditions are met.  This License explicitly affirms your unlimited
    +
    +permission to run the unmodified Program.  The output from running a
    +
    +covered work is covered by this License only if the output, given its
    +
    +content, constitutes a covered work.  This License acknowledges your
    +
    +rights of fair use or other equivalent, as provided by copyright law.
    +
    +
    +
    +  You may make, run and propagate covered works that you do not
    +
    +convey, without conditions so long as your license otherwise remains
    +
    +in force.  You may convey covered works to others for the sole purpose
    +
    +of having them make modifications exclusively for you, or provide you
    +
    +with facilities for running those works, provided that you comply with
    +
    +the terms of this License in conveying all material for which you do
    +
    +not control copyright.  Those thus making or running the covered works
    +
    +for you must do so exclusively on your behalf, under your direction
    +
    +and control, on terms that prohibit them from making any copies of
    +
    +your copyrighted material outside their relationship with you.
    +
    +
    +
    +  Conveying under any other circumstances is permitted solely under
    +
    +the conditions stated below.  Sublicensing is not allowed; section 10
    +
    +makes it unnecessary.
    +
    +
    +
    +  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
    +
    +
    +
    +  No covered work shall be deemed part of an effective technological
    +
    +measure under any applicable law fulfilling obligations under article
    +
    +11 of the WIPO copyright treaty adopted on 20 December 1996, or
    +
    +similar laws prohibiting or restricting circumvention of such
    +
    +measures.
    +
    +
    +
    +  When you convey a covered work, you waive any legal power to forbid
    +
    +circumvention of technological measures to the extent such circumvention
    +
    +is effected by exercising rights under this License with respect to
    +
    +the covered work, and you disclaim any intention to limit operation or
    +
    +modification of the work as a means of enforcing, against the work's
    +
    +users, your or third parties' legal rights to forbid circumvention of
    +
    +technological measures.
    +
    +
    +
    +  4. Conveying Verbatim Copies.
    +
    +
    +
    +  You may convey verbatim copies of the Program's source code as you
    +
    +receive it, in any medium, provided that you conspicuously and
    +
    +appropriately publish on each copy an appropriate copyright notice;
    +
    +keep intact all notices stating that this License and any
    +
    +non-permissive terms added in accord with section 7 apply to the code;
    +
    +keep intact all notices of the absence of any warranty; and give all
    +
    +recipients a copy of this License along with the Program.
    +
    +
    +
    +  You may charge any price or no price for each copy that you convey,
    +
    +and you may offer support or warranty protection for a fee.
    +
    +
    +
    +  5. Conveying Modified Source Versions.
    +
    +
    +
    +  You may convey a work based on the Program, or the modifications to
    +
    +produce it from the Program, in the form of source code under the
    +
    +terms of section 4, provided that you also meet all of these conditions:
    +
    +
    +
    +    a) The work must carry prominent notices stating that you modified
    +
    +    it, and giving a relevant date.
    +
    +
    +
    +    b) The work must carry prominent notices stating that it is
    +
    +    released under this License and any conditions added under section
    +
    +    7.  This requirement modifies the requirement in section 4 to
    +
    +    "keep intact all notices".
    +
    +
    +
    +    c) You must license the entire work, as a whole, under this
    +
    +    License to anyone who comes into possession of a copy.  This
    +
    +    License will therefore apply, along with any applicable section 7
    +
    +    additional terms, to the whole of the work, and all its parts,
    +
    +    regardless of how they are packaged.  This License gives no
    +
    +    permission to license the work in any other way, but it does not
    +
    +    invalidate such permission if you have separately received it.
    +
    +
    +
    +    d) If the work has interactive user interfaces, each must display
    +
    +    Appropriate Legal Notices; however, if the Program has interactive
    +
    +    interfaces that do not display Appropriate Legal Notices, your
    +
    +    work need not make them do so.
    +
    +
    +
    +  A compilation of a covered work with other separate and independent
    +
    +works, which are not by their nature extensions of the covered work,
    +
    +and which are not combined with it such as to form a larger program,
    +
    +in or on a volume of a storage or distribution medium, is called an
    +
    +"aggregate" if the compilation and its resulting copyright are not
    +
    +used to limit the access or legal rights of the compilation's users
    +
    +beyond what the individual works permit.  Inclusion of a covered work
    +
    +in an aggregate does not cause this License to apply to the other
    +
    +parts of the aggregate.
    +
    +
    +
    +  6. Conveying Non-Source Forms.
    +
    +
    +
    +  You may convey a covered work in object code form under the terms
    +
    +of sections 4 and 5, provided that you also convey the
    +
    +machine-readable Corresponding Source under the terms of this License,
    +
    +in one of these ways:
    +
    +
    +
    +    a) Convey the object code in, or embodied in, a physical product
    +
    +    (including a physical distribution medium), accompanied by the
    +
    +    Corresponding Source fixed on a durable physical medium
    +
    +    customarily used for software interchange.
    +
    +
    +
    +    b) Convey the object code in, or embodied in, a physical product
    +
    +    (including a physical distribution medium), accompanied by a
    +
    +    written offer, valid for at least three years and valid for as
    +
    +    long as you offer spare parts or customer support for that product
    +
    +    model, to give anyone who possesses the object code either (1) a
    +
    +    copy of the Corresponding Source for all the software in the
    +
    +    product that is covered by this License, on a durable physical
    +
    +    medium customarily used for software interchange, for a price no
    +
    +    more than your reasonable cost of physically performing this
    +
    +    conveying of source, or (2) access to copy the
    +
    +    Corresponding Source from a network server at no charge.
    +
    +
    +
    +    c) Convey individual copies of the object code with a copy of the
    +
    +    written offer to provide the Corresponding Source.  This
    +
    +    alternative is allowed only occasionally and noncommercially, and
    +
    +    only if you received the object code with such an offer, in accord
    +
    +    with subsection 6b.
    +
    +
    +
    +    d) Convey the object code by offering access from a designated
    +
    +    place (gratis or for a charge), and offer equivalent access to the
    +
    +    Corresponding Source in the same way through the same place at no
    +
    +    further charge.  You need not require recipients to copy the
    +
    +    Corresponding Source along with the object code.  If the place to
    +
    +    copy the object code is a network server, the Corresponding Source
    +
    +    may be on a different server (operated by you or a third party)
    +
    +    that supports equivalent copying facilities, provided you maintain
    +
    +    clear directions next to the object code saying where to find the
    +
    +    Corresponding Source.  Regardless of what server hosts the
    +
    +    Corresponding Source, you remain obligated to ensure that it is
    +
    +    available for as long as needed to satisfy these requirements.
    +
    +
    +
    +    e) Convey the object code using peer-to-peer transmission, provided
    +
    +    you inform other peers where the object code and Corresponding
    +
    +    Source of the work are being offered to the general public at no
    +
    +    charge under subsection 6d.
    +
    +
    +
    +  A separable portion of the object code, whose source code is excluded
    +
    +from the Corresponding Source as a System Library, need not be
    +
    +included in conveying the object code work.
    +
    +
    +
    +  A "User Product" is either (1) a "consumer product", which means any
    +
    +tangible personal property which is normally used for personal, family,
    +
    +or household purposes, or (2) anything designed or sold for incorporation
    +
    +into a dwelling.  In determining whether a product is a consumer product,
    +
    +doubtful cases shall be resolved in favor of coverage.  For a particular
    +
    +product received by a particular user, "normally used" refers to a
    +
    +typical or common use of that class of product, regardless of the status
    +
    +of the particular user or of the way in which the particular user
    +
    +actually uses, or expects or is expected to use, the product.  A product
    +
    +is a consumer product regardless of whether the product has substantial
    +
    +commercial, industrial or non-consumer uses, unless such uses represent
    +
    +the only significant mode of use of the product.
    +
    +
    +
    +  "Installation Information" for a User Product means any methods,
    +
    +procedures, authorization keys, or other information required to install
    +
    +and execute modified versions of a covered work in that User Product from
    +
    +a modified version of its Corresponding Source.  The information must
    +
    +suffice to ensure that the continued functioning of the modified object
    +
    +code is in no case prevented or interfered with solely because
    +
    +modification has been made.
    +
    +
    +
    +  If you convey an object code work under this section in, or with, or
    +
    +specifically for use in, a User Product, and the conveying occurs as
    +
    +part of a transaction in which the right of possession and use of the
    +
    +User Product is transferred to the recipient in perpetuity or for a
    +
    +fixed term (regardless of how the transaction is characterized), the
    +
    +Corresponding Source conveyed under this section must be accompanied
    +
    +by the Installation Information.  But this requirement does not apply
    +
    +if neither you nor any third party retains the ability to install
    +
    +modified object code on the User Product (for example, the work has
    +
    +been installed in ROM).
    +
    +
    +
    +  The requirement to provide Installation Information does not include a
    +
    +requirement to continue to provide support service, warranty, or updates
    +
    +for a work that has been modified or installed by the recipient, or for
    +
    +the User Product in which it has been modified or installed.  Access to a
    +
    +network may be denied when the modification itself materially and
    +
    +adversely affects the operation of the network or violates the rules and
    +
    +protocols for communication across the network.
    +
    +
    +
    +  Corresponding Source conveyed, and Installation Information provided,
    +
    +in accord with this section must be in a format that is publicly
    +
    +documented (and with an implementation available to the public in
    +
    +source code form), and must require no special password or key for
    +
    +unpacking, reading or copying.
    +
    +
    +
    +  7. Additional Terms.
    +
    +
    +
    +  "Additional permissions" are terms that supplement the terms of this
    +
    +License by making exceptions from one or more of its conditions.
    +
    +Additional permissions that are applicable to the entire Program shall
    +
    +be treated as though they were included in this License, to the extent
    +
    +that they are valid under applicable law.  If additional permissions
    +
    +apply only to part of the Program, that part may be used separately
    +
    +under those permissions, but the entire Program remains governed by
    +
    +this License without regard to the additional permissions.
    +
    +
    +
    +  When you convey a copy of a covered work, you may at your option
    +
    +remove any additional permissions from that copy, or from any part of
    +
    +it.  (Additional permissions may be written to require their own
    +
    +removal in certain cases when you modify the work.)  You may place
    +
    +additional permissions on material, added by you to a covered work,
    +
    +for which you have or can give appropriate copyright permission.
    +
    +
    +
    +  Notwithstanding any other provision of this License, for material you
    +
    +add to a covered work, you may (if authorized by the copyright holders of
    +
    +that material) supplement the terms of this License with terms:
    +
    +
    +
    +    a) Disclaiming warranty or limiting liability differently from the
    +
    +    terms of sections 15 and 16 of this License; or
    +
    +
    +
    +    b) Requiring preservation of specified reasonable legal notices or
    +
    +    author attributions in that material or in the Appropriate Legal
    +
    +    Notices displayed by works containing it; or
    +
    +
    +
    +    c) Prohibiting misrepresentation of the origin of that material, or
    +
    +    requiring that modified versions of such material be marked in
    +
    +    reasonable ways as different from the original version; or
    +
    +
    +
    +    d) Limiting the use for publicity purposes of names of licensors or
    +
    +    authors of the material; or
    +
    +
    +
    +    e) Declining to grant rights under trademark law for use of some
    +
    +    trade names, trademarks, or service marks; or
    +
    +
    +
    +    f) Requiring indemnification of licensors and authors of that
    +
    +    material by anyone who conveys the material (or modified versions of
    +
    +    it) with contractual assumptions of liability to the recipient, for
    +
    +    any liability that these contractual assumptions directly impose on
    +
    +    those licensors and authors.
    +
    +
    +
    +  All other non-permissive additional terms are considered "further
    +
    +restrictions" within the meaning of section 10.  If the Program as you
    +
    +received it, or any part of it, contains a notice stating that it is
    +
    +governed by this License along with a term that is a further
    +
    +restriction, you may remove that term.  If a license document contains
    +
    +a further restriction but permits relicensing or conveying under this
    +
    +License, you may add to a covered work material governed by the terms
    +
    +of that license document, provided that the further restriction does
    +
    +not survive such relicensing or conveying.
    +
    +
    +
    +  If you add terms to a covered work in accord with this section, you
    +
    +must place, in the relevant source files, a statement of the
    +
    +additional terms that apply to those files, or a notice indicating
    +
    +where to find the applicable terms.
    +
    +
    +
    +  Additional terms, permissive or non-permissive, may be stated in the
    +
    +form of a separately written license, or stated as exceptions;
    +
    +the above requirements apply either way.
    +
    +
    +
    +  8. Termination.
    +
    +
    +
    +  You may not propagate or modify a covered work except as expressly
    +
    +provided under this License.  Any attempt otherwise to propagate or
    +
    +modify it is void, and will automatically terminate your rights under
    +
    +this License (including any patent licenses granted under the third
    +
    +paragraph of section 11).
    +
    +
    +
    +  However, if you cease all violation of this License, then your
    +
    +license from a particular copyright holder is reinstated (a)
    +
    +provisionally, unless and until the copyright holder explicitly and
    +
    +finally terminates your license, and (b) permanently, if the copyright
    +
    +holder fails to notify you of the violation by some reasonable means
    +
    +prior to 60 days after the cessation.
    +
    +
    +
    +  Moreover, your license from a particular copyright holder is
    +
    +reinstated permanently if the copyright holder notifies you of the
    +
    +violation by some reasonable means, this is the first time you have
    +
    +received notice of violation of this License (for any work) from that
    +
    +copyright holder, and you cure the violation prior to 30 days after
    +
    +your receipt of the notice.
    +
    +
    +
    +  Termination of your rights under this section does not terminate the
    +
    +licenses of parties who have received copies or rights from you under
    +
    +this License.  If your rights have been terminated and not permanently
    +
    +reinstated, you do not qualify to receive new licenses for the same
    +
    +material under section 10.
    +
    +
    +
    +  9. Acceptance Not Required for Having Copies.
    +
    +
    +
    +  You are not required to accept this License in order to receive or
    +
    +run a copy of the Program.  Ancillary propagation of a covered work
    +
    +occurring solely as a consequence of using peer-to-peer transmission
    +
    +to receive a copy likewise does not require acceptance.  However,
    +
    +nothing other than this License grants you permission to propagate or
    +
    +modify any covered work.  These actions infringe copyright if you do
    +
    +not accept this License.  Therefore, by modifying or propagating a
    +
    +covered work, you indicate your acceptance of this License to do so.
    +
    +
    +
    +  10. Automatic Licensing of Downstream Recipients.
    +
    +
    +
    +  Each time you convey a covered work, the recipient automatically
    +
    +receives a license from the original licensors, to run, modify and
    +
    +propagate that work, subject to this License.  You are not responsible
    +
    +for enforcing compliance by third parties with this License.
    +
    +
    +
    +  An "entity transaction" is a transaction transferring control of an
    +
    +organization, or substantially all assets of one, or subdividing an
    +
    +organization, or merging organizations.  If propagation of a covered
    +
    +work results from an entity transaction, each party to that
    +
    +transaction who receives a copy of the work also receives whatever
    +
    +licenses to the work the party's predecessor in interest had or could
    +
    +give under the previous paragraph, plus a right to possession of the
    +
    +Corresponding Source of the work from the predecessor in interest, if
    +
    +the predecessor has it or can get it with reasonable efforts.
    +
    +
    +
    +  You may not impose any further restrictions on the exercise of the
    +
    +rights granted or affirmed under this License.  For example, you may
    +
    +not impose a license fee, royalty, or other charge for exercise of
    +
    +rights granted under this License, and you may not initiate litigation
    +
    +(including a cross-claim or counterclaim in a lawsuit) alleging that
    +
    +any patent claim is infringed by making, using, selling, offering for
    +
    +sale, or importing the Program or any portion of it.
    +
    +
    +
    +  11. Patents.
    +
    +
    +
    +  A "contributor" is a copyright holder who authorizes use under this
    +
    +License of the Program or a work on which the Program is based.  The
    +
    +work thus licensed is called the contributor's "contributor version".
    +
    +
    +
    +  A contributor's "essential patent claims" are all patent claims
    +
    +owned or controlled by the contributor, whether already acquired or
    +
    +hereafter acquired, that would be infringed by some manner, permitted
    +
    +by this License, of making, using, or selling its contributor version,
    +
    +but do not include claims that would be infringed only as a
    +
    +consequence of further modification of the contributor version.  For
    +
    +purposes of this definition, "control" includes the right to grant
    +
    +patent sublicenses in a manner consistent with the requirements of
    +
    +this License.
    +
    +
    +
    +  Each contributor grants you a non-exclusive, worldwide, royalty-free
    +
    +patent license under the contributor's essential patent claims, to
    +
    +make, use, sell, offer for sale, import and otherwise run, modify and
    +
    +propagate the contents of its contributor version.
    +
    +
    +
    +  In the following three paragraphs, a "patent license" is any express
    +
    +agreement or commitment, however denominated, not to enforce a patent
    +
    +(such as an express permission to practice a patent or covenant not to
    +
    +sue for patent infringement).  To "grant" such a patent license to a
    +
    +party means to make such an agreement or commitment not to enforce a
    +
    +patent against the party.
    +
    +
    +
    +  If you convey a covered work, knowingly relying on a patent license,
    +
    +and the Corresponding Source of the work is not available for anyone
    +
    +to copy, free of charge and under the terms of this License, through a
    +
    +publicly available network server or other readily accessible means,
    +
    +then you must either (1) cause the Corresponding Source to be so
    +
    +available, or (2) arrange to deprive yourself of the benefit of the
    +
    +patent license for this particular work, or (3) arrange, in a manner
    +
    +consistent with the requirements of this License, to extend the patent
    +
    +license to downstream recipients.  "Knowingly relying" means you have
    +
    +actual knowledge that, but for the patent license, your conveying the
    +
    +covered work in a country, or your recipient's use of the covered work
    +
    +in a country, would infringe one or more identifiable patents in that
    +
    +country that you have reason to believe are valid.
    +
    +
    +
    +  If, pursuant to or in connection with a single transaction or
    +
    +arrangement, you convey, or propagate by procuring conveyance of, a
    +
    +covered work, and grant a patent license to some of the parties
    +
    +receiving the covered work authorizing them to use, propagate, modify
    +
    +or convey a specific copy of the covered work, then the patent license
    +
    +you grant is automatically extended to all recipients of the covered
    +
    +work and works based on it.
    +
    +
    +
    +  A patent license is "discriminatory" if it does not include within
    +
    +the scope of its coverage, prohibits the exercise of, or is
    +
    +conditioned on the non-exercise of one or more of the rights that are
    +
    +specifically granted under this License.  You may not convey a covered
    +
    +work if you are a party to an arrangement with a third party that is
    +
    +in the business of distributing software, under which you make payment
    +
    +to the third party based on the extent of your activity of conveying
    +
    +the work, and under which the third party grants, to any of the
    +
    +parties who would receive the covered work from you, a discriminatory
    +
    +patent license (a) in connection with copies of the covered work
    +
    +conveyed by you (or copies made from those copies), or (b) primarily
    +
    +for and in connection with specific products or compilations that
    +
    +contain the covered work, unless you entered into that arrangement,
    +
    +or that patent license was granted, prior to 28 March 2007.
    +
    +
    +
    +  Nothing in this License shall be construed as excluding or limiting
    +
    +any implied license or other defenses to infringement that may
    +
    +otherwise be available to you under applicable patent law.
    +
    +
    +
    +  12. No Surrender of Others' Freedom.
    +
    +
    +
    +  If conditions are imposed on you (whether by court order, agreement or
    +
    +otherwise) that contradict the conditions of this License, they do not
    +
    +excuse you from the conditions of this License.  If you cannot convey a
    +
    +covered work so as to satisfy simultaneously your obligations under this
    +
    +License and any other pertinent obligations, then as a consequence you may
    +
    +not convey it at all.  For example, if you agree to terms that obligate you
    +
    +to collect a royalty for further conveying from those to whom you convey
    +
    +the Program, the only way you could satisfy both those terms and this
    +
    +License would be to refrain entirely from conveying the Program.
    +
    +
    +
    +  13. Use with the GNU Affero General Public License.
    +
    +
    +
    +  Notwithstanding any other provision of this License, you have
    +
    +permission to link or combine any covered work with a work licensed
    +
    +under version 3 of the GNU Affero General Public License into a single
    +
    +combined work, and to convey the resulting work.  The terms of this
    +
    +License will continue to apply to the part which is the covered work,
    +
    +but the special requirements of the GNU Affero General Public License,
    +
    +section 13, concerning interaction through a network will apply to the
    +
    +combination as such.
    +
    +
    +
    +  14. Revised Versions of this License.
    +
    +
    +
    +  The Free Software Foundation may publish revised and/or new versions of
    +
    +the GNU General Public License from time to time.  Such new versions will
    +
    +be similar in spirit to the present version, but may differ in detail to
    +
    +address new problems or concerns.
    +
    +
    +
    +  Each version is given a distinguishing version number.  If the
    +
    +Program specifies that a certain numbered version of the GNU General
    +
    +Public License "or any later version" applies to it, you have the
    +
    +option of following the terms and conditions either of that numbered
    +
    +version or of any later version published by the Free Software
    +
    +Foundation.  If the Program does not specify a version number of the
    +
    +GNU General Public License, you may choose any version ever published
    +
    +by the Free Software Foundation.
    +
    +
    +
    +  If the Program specifies that a proxy can decide which future
    +
    +versions of the GNU General Public License can be used, that proxy's
    +
    +public statement of acceptance of a version permanently authorizes you
    +
    +to choose that version for the Program.
    +
    +
    +
    +  Later license versions may give you additional or different
    +
    +permissions.  However, no additional obligations are imposed on any
    +
    +author or copyright holder as a result of your choosing to follow a
    +
    +later version.
    +
    +
    +
    +  15. Disclaimer of Warranty.
    +
    +
    +
    +  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
    +
    +APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
    +
    +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
    +
    +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
    +
    +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    +
    +PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
    +
    +IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
    +
    +ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
    +
    +
    +
    +  16. Limitation of Liability.
    +
    +
    +
    +  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
    +
    +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
    +
    +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
    +
    +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
    +
    +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
    +
    +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
    +
    +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
    +
    +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
    +
    +SUCH DAMAGES.
    +
    +
    +
    +  17. Interpretation of Sections 15 and 16.
    +
    +
    +
    +  If the disclaimer of warranty and limitation of liability provided
    +
    +above cannot be given local legal effect according to their terms,
    +
    +reviewing courts shall apply local law that most closely approximates
    +
    +an absolute waiver of all civil liability in connection with the
    +
    +Program, unless a warranty or assumption of liability accompanies a
    +
    +copy of the Program in return for a fee.
    +
    +
    +
    +                     END OF TERMS AND CONDITIONS
    +
    +
    +
    +            How to Apply These Terms to Your New Programs
    +
    +
    +
    +  If you develop a new program, and you want it to be of the greatest
    +
    +possible use to the public, the best way to achieve this is to make it
    +
    +free software which everyone can redistribute and change under these terms.
    +
    +
    +
    +  To do so, attach the following notices to the program.  It is safest
    +
    +to attach them to the start of each source file to most effectively
    +
    +state the exclusion of warranty; and each file should have at least
    +
    +the "copyright" line and a pointer to where the full notice is found.
    +
    +
    +
    +    
    +
    +    Copyright (C)   
    +
    +
    +
    +    This program is free software: you can redistribute it and/or modify
    +
    +    it under the terms of the GNU General Public License as published by
    +
    +    the Free Software Foundation, either version 3 of the License, or
    +
    +    (at your option) any later version.
    +
    +
    +
    +    This program is distributed in the hope that it will be useful,
    +
    +    but WITHOUT ANY WARRANTY; without even the implied warranty of
    +
    +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +
    +    GNU General Public License for more details.
    +
    +
    +
    +    You should have received a copy of the GNU General Public License
    +
    +    along with this program.  If not, see .
    +
    +
    +
    +Also add information on how to contact you by electronic and paper mail.
    +
    +
    +
    +  If the program does terminal interaction, make it output a short
    +
    +notice like this when it starts in an interactive mode:
    +
    +
    +
    +      Copyright (C)   
    +
    +    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    +
    +    This is free software, and you are welcome to redistribute it
    +
    +    under certain conditions; type `show c' for details.
    +
    +
    +
    +The hypothetical commands `show w' and `show c' should show the appropriate
    +
    +parts of the General Public License.  Of course, your program's commands
    +
    +might be different; for a GUI interface, you would use an "about box".
    +
    +
    +
    +  You should also get your employer (if you work as a programmer) or school,
    +
    +if any, to sign a "copyright disclaimer" for the program, if necessary.
    +
    +For more information on this, and how to apply and follow the GNU GPL, see
    +
    +.
    +
    +
    +
    +  The GNU General Public License does not permit incorporating your program
    +
    +into proprietary programs.  If your program is a subroutine library, you
    +
    +may consider it more useful to permit linking proprietary applications with
    +
    +the library.  If this is what you want to do, use the GNU Lesser General
    +
    +Public License instead of this License.  But first, please read
    +
    +.
    +
    +
    +
    +--------------- SECTION 4: GNU Library General Public License, V2.0 -----------
    +
    +		  GNU LIBRARY GENERAL PUBLIC LICENSE
    +		       Version 2, June 1991
    +
    + Copyright (C) 1991 Free Software Foundation, Inc.
    + 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
    + Everyone is permitted to copy and distribute verbatim copies
    + of this license document, but changing it is not allowed.
    +
    +[This is the first released version of the library GPL.  It is
    + numbered 2 because it goes with version 2 of the ordinary GPL.]
    +
    +			    Preamble
    +
    +  The licenses for most software are designed to take away your
    +freedom to share and change it.  By contrast, the GNU General Public
    +Licenses are intended to guarantee your freedom to share and change
    +free software--to make sure the software is free for all its users.
    +
    +  This license, the Library General Public License, applies to some
    +specially designated Free Software Foundation software, and to any
    +other libraries whose authors decide to use it.  You can use it for
    +your libraries, too.
    +
    +  When we speak of free software, we are referring to freedom, not
    +price.  Our General Public Licenses are designed to make sure that you
    +have the freedom to distribute copies of free software (and charge for
    +this service if you wish), that you receive source code or can get it
    +if you want it, that you can change the software or use pieces of it
    +in new free programs; and that you know you can do these things.
    +
    +  To protect your rights, we need to make restrictions that forbid
    +anyone to deny you these rights or to ask you to surrender the rights.
    +These restrictions translate to certain responsibilities for you if
    +you distribute copies of the library, or if you modify it.
    +
    +  For example, if you distribute copies of the library, whether gratis
    +or for a fee, you must give the recipients all the rights that we gave
    +you.  You must make sure that they, too, receive or can get the source
    +code.  If you link a program with the library, you must provide
    +complete object files to the recipients so that they can relink them
    +with the library, after making changes to the library and recompiling
    +it.  And you must show them these terms so they know their rights.
    +
    +  Our method of protecting your rights has two steps: (1) copyright
    +the library, and (2) offer you this license which gives you legal
    +permission to copy, distribute and/or modify the library.
    +
    +  Also, for each distributor's protection, we want to make certain
    +that everyone understands that there is no warranty for this free
    +library.  If the library is modified by someone else and passed on, we
    +want its recipients to know that what they have is not the original
    +version, so that any problems introduced by others will not reflect on
    +the original authors' reputations.
    +
    +  Finally, any free program is threatened constantly by software
    +patents.  We wish to avoid the danger that companies distributing free
    +software will individually obtain patent licenses, thus in effect
    +transforming the program into proprietary software.  To prevent this,
    +we have made it clear that any patent must be licensed for everyone's
    +free use or not licensed at all.
    +
    +  Most GNU software, including some libraries, is covered by the ordinary
    +GNU General Public License, which was designed for utility programs.  This
    +license, the GNU Library General Public License, applies to certain
    +designated libraries.  This license is quite different from the ordinary
    +one; be sure to read it in full, and don't assume that anything in it is
    +the same as in the ordinary license.
    +
    +  The reason we have a separate public license for some libraries is that
    +they blur the distinction we usually make between modifying or adding to a
    +program and simply using it.  Linking a program with a library, without
    +changing the library, is in some sense simply using the library, and is
    +analogous to running a utility program or application program.  However, in
    +a textual and legal sense, the linked executable is a combined work, a
    +derivative of the original library, and the ordinary General Public License
    +treats it as such.
    +
    +  Because of this blurred distinction, using the ordinary General
    +Public License for libraries did not effectively promote software
    +sharing, because most developers did not use the libraries.  We
    +concluded that weaker conditions might promote sharing better.
    +
    +  However, unrestricted linking of non-free programs would deprive the
    +users of those programs of all benefit from the free status of the
    +libraries themselves.  This Library General Public License is intended to
    +permit developers of non-free programs to use free libraries, while
    +preserving your freedom as a user of such programs to change the free
    +libraries that are incorporated in them.  (We have not seen how to achieve
    +this as regards changes in header files, but we have achieved it as regards
    +changes in the actual functions of the Library.)  The hope is that this
    +will lead to faster development of free libraries.
    +
    +  The precise terms and conditions for copying, distribution and
    +modification follow.  Pay close attention to the difference between a
    +"work based on the library" and a "work that uses the library".  The
    +former contains code derived from the library, while the latter only
    +works together with the library.
    +
    +  Note that it is possible for a library to be covered by the ordinary
    +General Public License rather than by this special one.
    +
    +		  GNU LIBRARY GENERAL PUBLIC LICENSE
    +   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
    +
    +  0. This License Agreement applies to any software library which
    +contains a notice placed by the copyright holder or other authorized
    +party saying it may be distributed under the terms of this Library
    +General Public License (also called "this License").  Each licensee is
    +addressed as "you".
    +
    +  A "library" means a collection of software functions and/or data
    +prepared so as to be conveniently linked with application programs
    +(which use some of those functions and data) to form executables.
    +
    +  The "Library", below, refers to any such software library or work
    +which has been distributed under these terms.  A "work based on the
    +Library" means either the Library or any derivative work under
    +copyright law: that is to say, a work containing the Library or a
    +portion of it, either verbatim or with modifications and/or translated
    +straightforwardly into another language.  (Hereinafter, translation is
    +included without limitation in the term "modification".)
    +
    +  "Source code" for a work means the preferred form of the work for
    +making modifications to it.  For a library, complete source code means
    +all the source code for all modules it contains, plus any associated
    +interface definition files, plus the scripts used to control compilation
    +and installation of the library.
    +
    +  Activities other than copying, distribution and modification are not
    +covered by this License; they are outside its scope.  The act of
    +running a program using the Library is not restricted, and output from
    +such a program is covered only if its contents constitute a work based
    +on the Library (independent of the use of the Library in a tool for
    +writing it).  Whether that is true depends on what the Library does
    +and what the program that uses the Library does.
    +  
    +  1. You may copy and distribute verbatim copies of the Library's
    +complete source code as you receive it, in any medium, provided that
    +you conspicuously and appropriately publish on each copy an
    +appropriate copyright notice and disclaimer of warranty; keep intact
    +all the notices that refer to this License and to the absence of any
    +warranty; and distribute a copy of this License along with the
    +Library.
    +
    +  You may charge a fee for the physical act of transferring a copy,
    +and you may at your option offer warranty protection in exchange for a
    +fee.
    +
    +  2. You may modify your copy or copies of the Library or any portion
    +of it, thus forming a work based on the Library, and copy and
    +distribute such modifications or work under the terms of Section 1
    +above, provided that you also meet all of these conditions:
    +
    +    a) The modified work must itself be a software library.
    +
    +    b) You must cause the files modified to carry prominent notices
    +    stating that you changed the files and the date of any change.
    +
    +    c) You must cause the whole of the work to be licensed at no
    +    charge to all third parties under the terms of this License.
    +
    +    d) If a facility in the modified Library refers to a function or a
    +    table of data to be supplied by an application program that uses
    +    the facility, other than as an argument passed when the facility
    +    is invoked, then you must make a good faith effort to ensure that,
    +    in the event an application does not supply such function or
    +    table, the facility still operates, and performs whatever part of
    +    its purpose remains meaningful.
    +
    +    (For example, a function in a library to compute square roots has
    +    a purpose that is entirely well-defined independent of the
    +    application.  Therefore, Subsection 2d requires that any
    +    application-supplied function or table used by this function must
    +    be optional: if the application does not supply it, the square
    +    root function must still compute square roots.)
    +
    +These requirements apply to the modified work as a whole.  If
    +identifiable sections of that work are not derived from the Library,
    +and can be reasonably considered independent and separate works in
    +themselves, then this License, and its terms, do not apply to those
    +sections when you distribute them as separate works.  But when you
    +distribute the same sections as part of a whole which is a work based
    +on the Library, the distribution of the whole must be on the terms of
    +this License, whose permissions for other licensees extend to the
    +entire whole, and thus to each and every part regardless of who wrote
    +it.
    +
    +Thus, it is not the intent of this section to claim rights or contest
    +your rights to work written entirely by you; rather, the intent is to
    +exercise the right to control the distribution of derivative or
    +collective works based on the Library.
    +
    +In addition, mere aggregation of another work not based on the Library
    +with the Library (or with a work based on the Library) on a volume of
    +a storage or distribution medium does not bring the other work under
    +the scope of this License.
    +
    +  3. You may opt to apply the terms of the ordinary GNU General Public
    +License instead of this License to a given copy of the Library.  To do
    +this, you must alter all the notices that refer to this License, so
    +that they refer to the ordinary GNU General Public License, version 2,
    +instead of to this License.  (If a newer version than version 2 of the
    +ordinary GNU General Public License has appeared, then you can specify
    +that version instead if you wish.)  Do not make any other change in
    +these notices.
    +
    +  Once this change is made in a given copy, it is irreversible for
    +that copy, so the ordinary GNU General Public License applies to all
    +subsequent copies and derivative works made from that copy.
    +
    +  This option is useful when you wish to copy part of the code of
    +the Library into a program that is not a library.
    +
    +  4. You may copy and distribute the Library (or a portion or
    +derivative of it, under Section 2) in object code or executable form
    +under the terms of Sections 1 and 2 above provided that you accompany
    +it with the complete corresponding machine-readable source code, which
    +must be distributed under the terms of Sections 1 and 2 above on a
    +medium customarily used for software interchange.
    +
    +  If distribution of object code is made by offering access to copy
    +from a designated place, then offering equivalent access to copy the
    +source code from the same place satisfies the requirement to
    +distribute the source code, even though third parties are not
    +compelled to copy the source along with the object code.
    +
    +  5. A program that contains no derivative of any portion of the
    +Library, but is designed to work with the Library by being compiled or
    +linked with it, is called a "work that uses the Library".  Such a
    +work, in isolation, is not a derivative work of the Library, and
    +therefore falls outside the scope of this License.
    +
    +  However, linking a "work that uses the Library" with the Library
    +creates an executable that is a derivative of the Library (because it
    +contains portions of the Library), rather than a "work that uses the
    +library".  The executable is therefore covered by this License.
    +Section 6 states terms for distribution of such executables.
    +
    +  When a "work that uses the Library" uses material from a header file
    +that is part of the Library, the object code for the work may be a
    +derivative work of the Library even though the source code is not.
    +Whether this is true is especially significant if the work can be
    +linked without the Library, or if the work is itself a library.  The
    +threshold for this to be true is not precisely defined by law.
    +
    +  If such an object file uses only numerical parameters, data
    +structure layouts and accessors, and small macros and small inline
    +functions (ten lines or less in length), then the use of the object
    +file is unrestricted, regardless of whether it is legally a derivative
    +work.  (Executables containing this object code plus portions of the
    +Library will still fall under Section 6.)
    +
    +  Otherwise, if the work is a derivative of the Library, you may
    +distribute the object code for the work under the terms of Section 6.
    +Any executables containing that work also fall under Section 6,
    +whether or not they are linked directly with the Library itself.
    +
    +  6. As an exception to the Sections above, you may also compile or
    +link a "work that uses the Library" with the Library to produce a
    +work containing portions of the Library, and distribute that work
    +under terms of your choice, provided that the terms permit
    +modification of the work for the customer's own use and reverse
    +engineering for debugging such modifications.
    +
    +  You must give prominent notice with each copy of the work that the
    +Library is used in it and that the Library and its use are covered by
    +this License.  You must supply a copy of this License.  If the work
    +during execution displays copyright notices, you must include the
    +copyright notice for the Library among them, as well as a reference
    +directing the user to the copy of this License.  Also, you must do one
    +of these things:
    +
    +    a) Accompany the work with the complete corresponding
    +    machine-readable source code for the Library including whatever
    +    changes were used in the work (which must be distributed under
    +    Sections 1 and 2 above); and, if the work is an executable linked
    +    with the Library, with the complete machine-readable "work that
    +    uses the Library", as object code and/or source code, so that the
    +    user can modify the Library and then relink to produce a modified
    +    executable containing the modified Library.  (It is understood
    +    that the user who changes the contents of definitions files in the
    +    Library will not necessarily be able to recompile the application
    +    to use the modified definitions.)
    +
    +    b) Accompany the work with a written offer, valid for at
    +    least three years, to give the same user the materials
    +    specified in Subsection 6a, above, for a charge no more
    +    than the cost of performing this distribution.
    +
    +    c) If distribution of the work is made by offering access to copy
    +    from a designated place, offer equivalent access to copy the above
    +    specified materials from the same place.
    +
    +    d) Verify that the user has already received a copy of these
    +    materials or that you have already sent this user a copy.
    +
    +  For an executable, the required form of the "work that uses the
    +Library" must include any data and utility programs needed for
    +reproducing the executable from it.  However, as a special exception,
    +the source code distributed need not include anything that is normally
    +distributed (in either source or binary form) with the major
    +components (compiler, kernel, and so on) of the operating system on
    +which the executable runs, unless that component itself accompanies
    +the executable.
    +
    +  It may happen that this requirement contradicts the license
    +restrictions of other proprietary libraries that do not normally
    +accompany the operating system.  Such a contradiction means you cannot
    +use both them and the Library together in an executable that you
    +distribute.
    +
    +  7. You may place library facilities that are a work based on the
    +Library side-by-side in a single library together with other library
    +facilities not covered by this License, and distribute such a combined
    +library, provided that the separate distribution of the work based on
    +the Library and of the other library facilities is otherwise
    +permitted, and provided that you do these two things:
    +
    +    a) Accompany the combined library with a copy of the same work
    +    based on the Library, uncombined with any other library
    +    facilities.  This must be distributed under the terms of the
    +    Sections above.
    +
    +    b) Give prominent notice with the combined library of the fact
    +    that part of it is a work based on the Library, and explaining
    +    where to find the accompanying uncombined form of the same work.
    +
    +  8. You may not copy, modify, sublicense, link with, or distribute
    +the Library except as expressly provided under this License.  Any
    +attempt otherwise to copy, modify, sublicense, link with, or
    +distribute the Library is void, and will automatically terminate your
    +rights under this License.  However, parties who have received copies,
    +or rights, from you under this License will not have their licenses
    +terminated so long as such parties remain in full compliance.
    +
    +  9. You are not required to accept this License, since you have not
    +signed it.  However, nothing else grants you permission to modify or
    +distribute the Library or its derivative works.  These actions are
    +prohibited by law if you do not accept this License.  Therefore, by
    +modifying or distributing the Library (or any work based on the
    +Library), you indicate your acceptance of this License to do so, and
    +all its terms and conditions for copying, distributing or modifying
    +the Library or works based on it.
    +
    +  10. Each time you redistribute the Library (or any work based on the
    +Library), the recipient automatically receives a license from the
    +original licensor to copy, distribute, link with or modify the Library
    +subject to these terms and conditions.  You may not impose any further
    +restrictions on the recipients' exercise of the rights granted herein.
    +You are not responsible for enforcing compliance by third parties to
    +this License.
    +
    +  11. If, as a consequence of a court judgment or allegation of patent
    +infringement or for any other reason (not limited to patent issues),
    +conditions are imposed on you (whether by court order, agreement or
    +otherwise) that contradict the conditions of this License, they do not
    +excuse you from the conditions of this License.  If you cannot
    +distribute so as to satisfy simultaneously your obligations under this
    +License and any other pertinent obligations, then as a consequence you
    +may not distribute the Library at all.  For example, if a patent
    +license would not permit royalty-free redistribution of the Library by
    +all those who receive copies directly or indirectly through you, then
    +the only way you could satisfy both it and this License would be to
    +refrain entirely from distribution of the Library.
    +
    +If any portion of this section is held invalid or unenforceable under any
    +particular circumstance, the balance of the section is intended to apply,
    +and the section as a whole is intended to apply in other circumstances.
    +
    +It is not the purpose of this section to induce you to infringe any
    +patents or other property right claims or to contest validity of any
    +such claims; this section has the sole purpose of protecting the
    +integrity of the free software distribution system which is
    +implemented by public license practices.  Many people have made
    +generous contributions to the wide range of software distributed
    +through that system in reliance on consistent application of that
    +system; it is up to the author/donor to decide if he or she is willing
    +to distribute software through any other system and a licensee cannot
    +impose that choice.
    +
    +This section is intended to make thoroughly clear what is believed to
    +be a consequence of the rest of this License.
    +
    +  12. If the distribution and/or use of the Library is restricted in
    +certain countries either by patents or by copyrighted interfaces, the
    +original copyright holder who places the Library under this License may add
    +an explicit geographical distribution limitation excluding those countries,
    +so that distribution is permitted only in or among countries not thus
    +excluded.  In such case, this License incorporates the limitation as if
    +written in the body of this License.
    +
    +  13. The Free Software Foundation may publish revised and/or new
    +versions of the Library General Public License from time to time.
    +Such new versions will be similar in spirit to the present version,
    +but may differ in detail to address new problems or concerns.
    +
    +Each version is given a distinguishing version number.  If the Library
    +specifies a version number of this License which applies to it and
    +"any later version", you have the option of following the terms and
    +conditions either of that version or of any later version published by
    +the Free Software Foundation.  If the Library does not specify a
    +license version number, you may choose any version ever published by
    +the Free Software Foundation.
    +
    +  14. If you wish to incorporate parts of the Library into other free
    +programs whose distribution conditions are incompatible with these,
    +write to the author to ask for permission.  For software which is
    +copyrighted by the Free Software Foundation, write to the Free
    +Software Foundation; we sometimes make exceptions for this.  Our
    +decision will be guided by the two goals of preserving the free status
    +of all derivatives of our free software and of promoting the sharing
    +and reuse of software generally.
    +
    +			    NO WARRANTY
    +
    +  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
    +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
    +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
    +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
    +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
    +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    +PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
    +LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
    +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
    +
    +  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
    +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
    +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
    +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
    +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
    +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
    +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
    +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
    +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
    +DAMAGES.
    +
    +		     END OF TERMS AND CONDITIONS
    +
    +           How to Apply These Terms to Your New Libraries
    +
    +  If you develop a new library, and you want it to be of the greatest
    +possible use to the public, we recommend making it free software that
    +everyone can redistribute and change.  You can do so by permitting
    +redistribution under these terms (or, alternatively, under the terms of the
    +ordinary General Public License).
    +
    +  To apply these terms, attach the following notices to the library.  It is
    +safest to attach them to the start of each source file to most effectively
    +convey the exclusion of warranty; and each file should have at least the
    +"copyright" line and a pointer to where the full notice is found.
    +
    +    
    +    Copyright (C)   
    +
    +    This library is free software; you can redistribute it and/or
    +    modify it under the terms of the GNU Library General Public
    +    License as published by the Free Software Foundation; either
    +    version 2 of the License, or (at your option) any later version.
    +
    +    This library is distributed in the hope that it will be useful,
    +    but WITHOUT ANY WARRANTY; without even the implied warranty of
    +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    +    Library General Public License for more details.
    +
    +    You should have received a copy of the GNU Library General Public
    +    License along with this library; if not, write to the Free
    +    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
    +
    +Also add information on how to contact you by electronic and paper mail.
    +
    +You should also get your employer (if you work as a programmer) or your
    +school, if any, to sign a "copyright disclaimer" for the library, if
    +necessary.  Here is a sample; alter the names:
    +
    +  Yoyodyne, Inc., hereby disclaims all copyright interest in the
    +  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
    +
    +  , 1 April 1990
    +  Ty Coon, President of Vice
    +
    +That's all there is to it!
    +
    +
    +
    +--------------- SECTION 5: GNU Lesser General Public License, V2.1 -----------
    +
    +		  GNU LESSER GENERAL PUBLIC LICENSE
    +		       Version 2.1, February 1999
    +
    + Copyright (C) 1991, 1999 Free Software Foundation, Inc.
    + 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
    + Everyone is permitted to copy and distribute verbatim copies
    + of this license document, but changing it is not allowed.
    +
    +[This is the first released version of the Lesser GPL.  It also counts
    + as the successor of the GNU Library Public License, version 2, hence
    + the version number 2.1.]
    +
    +			    Preamble
    +
    +  The licenses for most software are designed to take away your
    +freedom to share and change it.  By contrast, the GNU General Public
    +Licenses are intended to guarantee your freedom to share and change
    +free software--to make sure the software is free for all its users.
    +
    +  This license, the Lesser General Public License, applies to some
    +specially designated software packages--typically libraries--of the
    +Free Software Foundation and other authors who decide to use it.  You
    +can use it too, but we suggest you first think carefully about whether
    +this license or the ordinary General Public License is the better
    +strategy to use in any particular case, based on the explanations below.
    +
    +  When we speak of free software, we are referring to freedom of use,
    +not price.  Our General Public Licenses are designed to make sure that
    +you have the freedom to distribute copies of free software (and charge
    +for this service if you wish); that you receive source code or can get
    +it if you want it; that you can change the software and use pieces of
    +it in new free programs; and that you are informed that you can do
    +these things.
    +
    +  To protect your rights, we need to make restrictions that forbid
    +distributors to deny you these rights or to ask you to surrender these
    +rights.  These restrictions translate to certain responsibilities for
    +you if you distribute copies of the library or if you modify it.
    +
    +  For example, if you distribute copies of the library, whether gratis
    +or for a fee, you must give the recipients all the rights that we gave
    +you.  You must make sure that they, too, receive or can get the source
    +code.  If you link other code with the library, you must provide
    +complete object files to the recipients, so that they can relink them
    +with the library after making changes to the library and recompiling
    +it.  And you must show them these terms so they know their rights.
    +
    +  We protect your rights with a two-step method: (1) we copyright the
    +library, and (2) we offer you this license, which gives you legal
    +permission to copy, distribute and/or modify the library.
    +
    +  To protect each distributor, we want to make it very clear that
    +there is no warranty for the free library.  Also, if the library is
    +modified by someone else and passed on, the recipients should know
    +that what they have is not the original version, so that the original
    +author's reputation will not be affected by problems that might be
    +introduced by others.
    +
    +  Finally, software patents pose a constant threat to the existence of
    +any free program.  We wish to make sure that a company cannot
    +effectively restrict the users of a free program by obtaining a
    +restrictive license from a patent holder.  Therefore, we insist that
    +any patent license obtained for a version of the library must be
    +consistent with the full freedom of use specified in this license.
    +
    +  Most GNU software, including some libraries, is covered by the
    +ordinary GNU General Public License.  This license, the GNU Lesser
    +General Public License, applies to certain designated libraries, and
    +is quite different from the ordinary General Public License.  We use
    +this license for certain libraries in order to permit linking those
    +libraries into non-free programs.
    +
    +  When a program is linked with a library, whether statically or using
    +a shared library, the combination of the two is legally speaking a
    +combined work, a derivative of the original library.  The ordinary
    +General Public License therefore permits such linking only if the
    +entire combination fits its criteria of freedom.  The Lesser General
    +Public License permits more lax criteria for linking other code with
    +the library.
    +
    +  We call this license the "Lesser" General Public License because it
    +does Less to protect the user's freedom than the ordinary General
    +Public License.  It also provides other free software developers Less
    +of an advantage over competing non-free programs.  These disadvantages
    +are the reason we use the ordinary General Public License for many
    +libraries.  However, the Lesser license provides advantages in certain
    +special circumstances.
    +
    +  For example, on rare occasions, there may be a special need to
    +encourage the widest possible use of a certain library, so that it becomes
    +a de-facto standard.  To achieve this, non-free programs must be
    +allowed to use the library.  A more frequent case is that a free
    +library does the same job as widely used non-free libraries.  In this
    +case, there is little to gain by limiting the free library to free
    +software only, so we use the Lesser General Public License.
    +
    +  In other cases, permission to use a particular library in non-free
    +programs enables a greater number of people to use a large body of
    +free software.  For example, permission to use the GNU C Library in
    +non-free programs enables many more people to use the whole GNU
    +operating system, as well as its variant, the GNU/Linux operating
    +system.
    +
    +  Although the Lesser General Public License is Less protective of the
    +users' freedom, it does ensure that the user of a program that is
    +linked with the Library has the freedom and the wherewithal to run
    +that program using a modified version of the Library.
    +
    +  The precise terms and conditions for copying, distribution and
    +modification follow.  Pay close attention to the difference between a
    +"work based on the library" and a "work that uses the library".  The
    +former contains code derived from the library, whereas the latter must
    +be combined with the library in order to run.
    +
    +		  GNU LESSER GENERAL PUBLIC LICENSE
    +   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
    +
    +  0. This License Agreement applies to any software library or other
    +program which contains a notice placed by the copyright holder or
    +other authorized party saying it may be distributed under the terms of
    +this Lesser General Public License (also called "this License").
    +Each licensee is addressed as "you".
    +
    +  A "library" means a collection of software functions and/or data
    +prepared so as to be conveniently linked with application programs
    +(which use some of those functions and data) to form executables.
    +
    +  The "Library", below, refers to any such software library or work
    +which has been distributed under these terms.  A "work based on the
    +Library" means either the Library or any derivative work under
    +copyright law: that is to say, a work containing the Library or a
    +portion of it, either verbatim or with modifications and/or translated
    +straightforwardly into another language.  (Hereinafter, translation is
    +included without limitation in the term "modification".)
    +
    +  "Source code" for a work means the preferred form of the work for
    +making modifications to it.  For a library, complete source code means
    +all the source code for all modules it contains, plus any associated
    +interface definition files, plus the scripts used to control compilation
    +and installation of the library.
    +
    +  Activities other than copying, distribution and modification are not
    +covered by this License; they are outside its scope.  The act of
    +running a program using the Library is not restricted, and output from
    +such a program is covered only if its contents constitute a work based
    +on the Library (independent of the use of the Library in a tool for
    +writing it).  Whether that is true depends on what the Library does
    +and what the program that uses the Library does.
    +
    +  1. You may copy and distribute verbatim copies of the Library's
    +complete source code as you receive it, in any medium, provided that
    +you conspicuously and appropriately publish on each copy an
    +appropriate copyright notice and disclaimer of warranty; keep intact
    +all the notices that refer to this License and to the absence of any
    +warranty; and distribute a copy of this License along with the
    +Library.
    +
    +  You may charge a fee for the physical act of transferring a copy,
    +and you may at your option offer warranty protection in exchange for a
    +fee.
    +
    +  2. You may modify your copy or copies of the Library or any portion
    +of it, thus forming a work based on the Library, and copy and
    +distribute such modifications or work under the terms of Section 1
    +above, provided that you also meet all of these conditions:
    +
    +    a) The modified work must itself be a software library.
    +
    +    b) You must cause the files modified to carry prominent notices
    +    stating that you changed the files and the date of any change.
    +
    +    c) You must cause the whole of the work to be licensed at no
    +    charge to all third parties under the terms of this License.
    +
    +    d) If a facility in the modified Library refers to a function or a
    +    table of data to be supplied by an application program that uses
    +    the facility, other than as an argument passed when the facility
    +    is invoked, then you must make a good faith effort to ensure that,
    +    in the event an application does not supply such function or
    +    table, the facility still operates, and performs whatever part of
    +    its purpose remains meaningful.
    +
    +    (For example, a function in a library to compute square roots has
    +    a purpose that is entirely well-defined independent of the
    +    application.  Therefore, Subsection 2d requires that any
    +    application-supplied function or table used by this function must
    +    be optional: if the application does not supply it, the square
    +    root function must still compute square roots.)
    +
    +These requirements apply to the modified work as a whole.  If
    +identifiable sections of that work are not derived from the Library,
    +and can be reasonably considered independent and separate works in
    +themselves, then this License, and its terms, do not apply to those
    +sections when you distribute them as separate works.  But when you
    +distribute the same sections as part of a whole which is a work based
    +on the Library, the distribution of the whole must be on the terms of
    +this License, whose permissions for other licensees extend to the
    +entire whole, and thus to each and every part regardless of who wrote
    +it.
    +
    +Thus, it is not the intent of this section to claim rights or contest
    +your rights to work written entirely by you; rather, the intent is to
    +exercise the right to control the distribution of derivative or
    +collective works based on the Library.
    +
    +In addition, mere aggregation of another work not based on the Library
    +with the Library (or with a work based on the Library) on a volume of
    +a storage or distribution medium does not bring the other work under
    +the scope of this License.
    +
    +  3. You may opt to apply the terms of the ordinary GNU General Public
    +License instead of this License to a given copy of the Library.  To do
    +this, you must alter all the notices that refer to this License, so
    +that they refer to the ordinary GNU General Public License, version 2,
    +instead of to this License.  (If a newer version than version 2 of the
    +ordinary GNU General Public License has appeared, then you can specify
    +that version instead if you wish.)  Do not make any other change in
    +these notices.
    +
    +  Once this change is made in a given copy, it is irreversible for
    +that copy, so the ordinary GNU General Public License applies to all
    +subsequent copies and derivative works made from that copy.
    +
    +  This option is useful when you wish to copy part of the code of
    +the Library into a program that is not a library.
    +
    +  4. You may copy and distribute the Library (or a portion or
    +derivative of it, under Section 2) in object code or executable form
    +under the terms of Sections 1 and 2 above provided that you accompany
    +it with the complete corresponding machine-readable source code, which
    +must be distributed under the terms of Sections 1 and 2 above on a
    +medium customarily used for software interchange.
    +
    +  If distribution of object code is made by offering access to copy
    +from a designated place, then offering equivalent access to copy the
    +source code from the same place satisfies the requirement to
    +distribute the source code, even though third parties are not
    +compelled to copy the source along with the object code.
    +
    +  5. A program that contains no derivative of any portion of the
    +Library, but is designed to work with the Library by being compiled or
    +linked with it, is called a "work that uses the Library".  Such a
    +work, in isolation, is not a derivative work of the Library, and
    +therefore falls outside the scope of this License.
    +
    +  However, linking a "work that uses the Library" with the Library
    +creates an executable that is a derivative of the Library (because it
    +contains portions of the Library), rather than a "work that uses the
    +library".  The executable is therefore covered by this License.
    +Section 6 states terms for distribution of such executables.
    +
    +  When a "work that uses the Library" uses material from a header file
    +that is part of the Library, the object code for the work may be a
    +derivative work of the Library even though the source code is not.
    +Whether this is true is especially significant if the work can be
    +linked without the Library, or if the work is itself a library.  The
    +threshold for this to be true is not precisely defined by law.
    +
    +  If such an object file uses only numerical parameters, data
    +structure layouts and accessors, and small macros and small inline
    +functions (ten lines or less in length), then the use of the object
    +file is unrestricted, regardless of whether it is legally a derivative
    +work.  (Executables containing this object code plus portions of the
    +Library will still fall under Section 6.)
    +
    +  Otherwise, if the work is a derivative of the Library, you may
    +distribute the object code for the work under the terms of Section 6.
    +Any executables containing that work also fall under Section 6,
    +whether or not they are linked directly with the Library itself.
    +
    +  6. As an exception to the Sections above, you may also combine or
    +link a "work that uses the Library" with the Library to produce a
    +work containing portions of the Library, and distribute that work
    +under terms of your choice, provided that the terms permit
    +modification of the work for the customer's own use and reverse
    +engineering for debugging such modifications.
    +
    +  You must give prominent notice with each copy of the work that the
    +Library is used in it and that the Library and its use are covered by
    +this License.  You must supply a copy of this License.  If the work
    +during execution displays copyright notices, you must include the
    +copyright notice for the Library among them, as well as a reference
    +directing the user to the copy of this License.  Also, you must do one
    +of these things:
    +
    +    a) Accompany the work with the complete corresponding
    +    machine-readable source code for the Library including whatever
    +    changes were used in the work (which must be distributed under
    +    Sections 1 and 2 above); and, if the work is an executable linked
    +    with the Library, with the complete machine-readable "work that
    +    uses the Library", as object code and/or source code, so that the
    +    user can modify the Library and then relink to produce a modified
    +    executable containing the modified Library.  (It is understood
    +    that the user who changes the contents of definitions files in the
    +    Library will not necessarily be able to recompile the application
    +    to use the modified definitions.)
    +
    +    b) Use a suitable shared library mechanism for linking with the
    +    Library.  A suitable mechanism is one that (1) uses at run time a
    +    copy of the library already present on the user's computer system,
    +    rather than copying library functions into the executable, and (2)
    +    will operate properly with a modified version of the library, if
    +    the user installs one, as long as the modified version is
    +    interface-compatible with the version that the work was made with.
    +
    +    c) Accompany the work with a written offer, valid for at
    +    least three years, to give the same user the materials
    +    specified in Subsection 6a, above, for a charge no more
    +    than the cost of performing this distribution.
    +
    +    d) If distribution of the work is made by offering access to copy
    +    from a designated place, offer equivalent access to copy the above
    +    specified materials from the same place.
    +
    +    e) Verify that the user has already received a copy of these
    +    materials or that you have already sent this user a copy.
    +
    +  For an executable, the required form of the "work that uses the
    +Library" must include any data and utility programs needed for
    +reproducing the executable from it.  However, as a special exception,
    +the materials to be distributed need not include anything that is
    +normally distributed (in either source or binary form) with the major
    +components (compiler, kernel, and so on) of the operating system on
    +which the executable runs, unless that component itself accompanies
    +the executable.
    +
    +  It may happen that this requirement contradicts the license
    +restrictions of other proprietary libraries that do not normally
    +accompany the operating system.  Such a contradiction means you cannot
    +use both them and the Library together in an executable that you
    +distribute.
    +
    +  7. You may place library facilities that are a work based on the
    +Library side-by-side in a single library together with other library
    +facilities not covered by this License, and distribute such a combined
    +library, provided that the separate distribution of the work based on
    +the Library and of the other library facilities is otherwise
    +permitted, and provided that you do these two things:
    +
    +    a) Accompany the combined library with a copy of the same work
    +    based on the Library, uncombined with any other library
    +    facilities.  This must be distributed under the terms of the
    +    Sections above.
    +
    +    b) Give prominent notice with the combined library of the fact
    +    that part of it is a work based on the Library, and explaining
    +    where to find the accompanying uncombined form of the same work.
    +
    +  8. You may not copy, modify, sublicense, link with, or distribute
    +the Library except as expressly provided under this License.  Any
    +attempt otherwise to copy, modify, sublicense, link with, or
    +distribute the Library is void, and will automatically terminate your
    +rights under this License.  However, parties who have received copies,
    +or rights, from you under this License will not have their licenses
    +terminated so long as such parties remain in full compliance.
    +
    +  9. You are not required to accept this License, since you have not
    +signed it.  However, nothing else grants you permission to modify or
    +distribute the Library or its derivative works.  These actions are
    +prohibited by law if you do not accept this License.  Therefore, by
    +modifying or distributing the Library (or any work based on the
    +Library), you indicate your acceptance of this License to do so, and
    +all its terms and conditions for copying, distributing or modifying
    +the Library or works based on it.
    +
    +  10. Each time you redistribute the Library (or any work based on the
    +Library), the recipient automatically receives a license from the
    +original licensor to copy, distribute, link with or modify the Library
    +subject to these terms and conditions.  You may not impose any further
    +restrictions on the recipients' exercise of the rights granted herein.
    +You are not responsible for enforcing compliance by third parties with
    +this License.
    +
    +  11. If, as a consequence of a court judgment or allegation of patent
    +infringement or for any other reason (not limited to patent issues),
    +conditions are imposed on you (whether by court order, agreement or
    +otherwise) that contradict the conditions of this License, they do not
    +excuse you from the conditions of this License.  If you cannot
    +distribute so as to satisfy simultaneously your obligations under this
    +License and any other pertinent obligations, then as a consequence you
    +may not distribute the Library at all.  For example, if a patent
    +license would not permit royalty-free redistribution of the Library by
    +all those who receive copies directly or indirectly through you, then
    +the only way you could satisfy both it and this License would be to
    +refrain entirely from distribution of the Library.
    +
    +If any portion of this section is held invalid or unenforceable under any
    +particular circumstance, the balance of the section is intended to apply,
    +and the section as a whole is intended to apply in other circumstances.
    +
    +It is not the purpose of this section to induce you to infringe any
    +patents or other property right claims or to contest validity of any
    +such claims; this section has the sole purpose of protecting the
    +integrity of the free software distribution system which is
    +implemented by public license practices.  Many people have made
    +generous contributions to the wide range of software distributed
    +through that system in reliance on consistent application of that
    +system; it is up to the author/donor to decide if he or she is willing
    +to distribute software through any other system and a licensee cannot
    +impose that choice.
    +
    +This section is intended to make thoroughly clear what is believed to
    +be a consequence of the rest of this License.
    +
    +  12. If the distribution and/or use of the Library is restricted in
    +certain countries either by patents or by copyrighted interfaces, the
    +original copyright holder who places the Library under this License may add
    +an explicit geographical distribution limitation excluding those countries,
    +so that distribution is permitted only in or among countries not thus
    +excluded.  In such case, this License incorporates the limitation as if
    +written in the body of this License.
    +
    +  13. The Free Software Foundation may publish revised and/or new
    +versions of the Lesser General Public License from time to time.
    +Such new versions will be similar in spirit to the present version,
    +but may differ in detail to address new problems or concerns.
    +
    +Each version is given a distinguishing version number.  If the Library
    +specifies a version number of this License which applies to it and
    +"any later version", you have the option of following the terms and
    +conditions either of that version or of any later version published by
    +the Free Software Foundation.  If the Library does not specify a
    +license version number, you may choose any version ever published by
    +the Free Software Foundation.
    +
    +  14. If you wish to incorporate parts of the Library into other free
    +programs whose distribution conditions are incompatible with these,
    +write to the author to ask for permission.  For software which is
    +copyrighted by the Free Software Foundation, write to the Free
    +Software Foundation; we sometimes make exceptions for this.  Our
    +decision will be guided by the two goals of preserving the free status
    +of all derivatives of our free software and of promoting the sharing
    +and reuse of software generally.
    +
    +			    NO WARRANTY
    +
    +  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
    +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
    +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
    +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
    +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
    +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    +PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
    +LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
    +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
    +
    +  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
    +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
    +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
    +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
    +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
    +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
    +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
    +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
    +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
    +DAMAGES.
    +
    +		     END OF TERMS AND CONDITIONS
    +
    +           How to Apply These Terms to Your New Libraries
    +
    +  If you develop a new library, and you want it to be of the greatest
    +possible use to the public, we recommend making it free software that
    +everyone can redistribute and change.  You can do so by permitting
    +redistribution under these terms (or, alternatively, under the terms of the
    +ordinary General Public License).
    +
    +  To apply these terms, attach the following notices to the library.  It is
    +safest to attach them to the start of each source file to most effectively
    +convey the exclusion of warranty; and each file should have at least the
    +"copyright" line and a pointer to where the full notice is found.
    +
    +    
    +    Copyright (C)   
    +
    +    This library is free software; you can redistribute it and/or
    +    modify it under the terms of the GNU Lesser General Public
    +    License as published by the Free Software Foundation; either
    +    version 2.1 of the License, or (at your option) any later version.
    +
    +    This library is distributed in the hope that it will be useful,
    +    but WITHOUT ANY WARRANTY; without even the implied warranty of
    +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    +    Lesser General Public License for more details.
    +
    +    You should have received a copy of the GNU Lesser General Public
    +    License along with this library; if not, write to the Free Software
    +    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
    +
    +Also add information on how to contact you by electronic and paper mail.
    +
    +You should also get your employer (if you work as a programmer) or your
    +school, if any, to sign a "copyright disclaimer" for the library, if
    +necessary.  Here is a sample; alter the names:
    +
    +  Yoyodyne, Inc., hereby disclaims all copyright interest in the
    +  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
    +
    +  , 1 April 1990
    +  Ty Coon, President of Vice
    +
    +That's all there is to it!
    +
    +
    +
    +--------------- SECTION 6: GNU Lesser General Public License, V3.0 -----------
    +
    +		   GNU LESSER GENERAL PUBLIC LICENSE
    +
    +                       Version 3, 29 June 2007
    +
    +
    +
    + Copyright (C) 2007 Free Software Foundation, Inc. 
    +
    + Everyone is permitted to copy and distribute verbatim copies
    +
    + of this license document, but changing it is not allowed.
    +
    +
    +
    +
    +
    +  This version of the GNU Lesser General Public License incorporates
    +
    +the terms and conditions of version 3 of the GNU General Public
    +
    +License, supplemented by the additional permissions listed below.
    +
    +
    +
    +  0. Additional Definitions.
    +
    +
    +
    +  As used herein, "this License" refers to version 3 of the GNU Lesser
    +
    +General Public License, and the "GNU GPL" refers to version 3 of the GNU
    +
    +General Public License.
    +
    +
    +
    +  "The Library" refers to a covered work governed by this License,
    +
    +other than an Application or a Combined Work as defined below.
    +
    +
    +
    +  An "Application" is any work that makes use of an interface provided
    +
    +by the Library, but which is not otherwise based on the Library.
    +
    +Defining a subclass of a class defined by the Library is deemed a mode
    +
    +of using an interface provided by the Library.
    +
    +
    +
    +  A "Combined Work" is a work produced by combining or linking an
    +
    +Application with the Library.  The particular version of the Library
    +
    +with which the Combined Work was made is also called the "Linked
    +
    +Version".
    +
    +
    +
    +  The "Minimal Corresponding Source" for a Combined Work means the
    +
    +Corresponding Source for the Combined Work, excluding any source code
    +
    +for portions of the Combined Work that, considered in isolation, are
    +
    +based on the Application, and not on the Linked Version.
    +
    +
    +
    +  The "Corresponding Application Code" for a Combined Work means the
    +
    +object code and/or source code for the Application, including any data
    +
    +and utility programs needed for reproducing the Combined Work from the
    +
    +Application, but excluding the System Libraries of the Combined Work.
    +
    +
    +
    +  1. Exception to Section 3 of the GNU GPL.
    +
    +
    +
    +  You may convey a covered work under sections 3 and 4 of this License
    +
    +without being bound by section 3 of the GNU GPL.
    +
    +
    +
    +  2. Conveying Modified Versions.
    +
    +
    +
    +  If you modify a copy of the Library, and, in your modifications, a
    +
    +facility refers to a function or data to be supplied by an Application
    +
    +that uses the facility (other than as an argument passed when the
    +
    +facility is invoked), then you may convey a copy of the modified
    +
    +version:
    +
    +
    +
    +   a) under this License, provided that you make a good faith effort to
    +
    +   ensure that, in the event an Application does not supply the
    +
    +   function or data, the facility still operates, and performs
    +
    +   whatever part of its purpose remains meaningful, or
    +
    +
    +
    +   b) under the GNU GPL, with none of the additional permissions of
    +
    +   this License applicable to that copy.
    +
    +
    +
    +  3. Object Code Incorporating Material from Library Header Files.
    +
    +
    +
    +  The object code form of an Application may incorporate material from
    +
    +a header file that is part of the Library.  You may convey such object
    +
    +code under terms of your choice, provided that, if the incorporated
    +
    +material is not limited to numerical parameters, data structure
    +
    +layouts and accessors, or small macros, inline functions and templates
    +
    +(ten or fewer lines in length), you do both of the following:
    +
    +
    +
    +   a) Give prominent notice with each copy of the object code that the
    +
    +   Library is used in it and that the Library and its use are
    +
    +   covered by this License.
    +
    +
    +
    +   b) Accompany the object code with a copy of the GNU GPL and this license
    +
    +   document.
    +
    +
    +
    +  4. Combined Works.
    +
    +
    +
    +  You may convey a Combined Work under terms of your choice that,
    +
    +taken together, effectively do not restrict modification of the
    +
    +portions of the Library contained in the Combined Work and reverse
    +
    +engineering for debugging such modifications, if you also do each of
    +
    +the following:
    +
    +
    +
    +   a) Give prominent notice with each copy of the Combined Work that
    +
    +   the Library is used in it and that the Library and its use are
    +
    +   covered by this License.
    +
    +
    +
    +   b) Accompany the Combined Work with a copy of the GNU GPL and this license
    +
    +   document.
    +
    +
    +
    +   c) For a Combined Work that displays copyright notices during
    +
    +   execution, include the copyright notice for the Library among
    +
    +   these notices, as well as a reference directing the user to the
    +
    +   copies of the GNU GPL and this license document.
    +
    +
    +
    +   d) Do one of the following:
    +
    +
    +
    +       0) Convey the Minimal Corresponding Source under the terms of this
    +
    +       License, and the Corresponding Application Code in a form
    +
    +       suitable for, and under terms that permit, the user to
    +
    +       recombine or relink the Application with a modified version of
    +
    +       the Linked Version to produce a modified Combined Work, in the
    +
    +       manner specified by section 6 of the GNU GPL for conveying
    +
    +       Corresponding Source.
    +
    +
    +
    +       1) Use a suitable shared library mechanism for linking with the
    +
    +       Library.  A suitable mechanism is one that (a) uses at run time
    +
    +       a copy of the Library already present on the user's computer
    +
    +       system, and (b) will operate properly with a modified version
    +
    +       of the Library that is interface-compatible with the Linked
    +
    +       Version.
    +
    +
    +
    +   e) Provide Installation Information, but only if you would otherwise
    +
    +   be required to provide such information under section 6 of the
    +
    +   GNU GPL, and only to the extent that such information is
    +
    +   necessary to install and execute a modified version of the
    +
    +   Combined Work produced by recombining or relinking the
    +
    +   Application with a modified version of the Linked Version. (If
    +
    +   you use option 4d0, the Installation Information must accompany
    +
    +   the Minimal Corresponding Source and Corresponding Application
    +
    +   Code. If you use option 4d1, you must provide the Installation
    +
    +   Information in the manner specified by section 6 of the GNU GPL
    +
    +   for conveying Corresponding Source.)
    +
    +
    +
    +  5. Combined Libraries.
    +
    +
    +
    +  You may place library facilities that are a work based on the
    +
    +Library side by side in a single library together with other library
    +
    +facilities that are not Applications and are not covered by this
    +
    +License, and convey such a combined library under terms of your
    +
    +choice, if you do both of the following:
    +
    +
    +
    +   a) Accompany the combined library with a copy of the same work based
    +
    +   on the Library, uncombined with any other library facilities,
    +
    +   conveyed under the terms of this License.
    +
    +
    +
    +   b) Give prominent notice with the combined library that part of it
    +
    +   is a work based on the Library, and explaining where to find the
    +
    +   accompanying uncombined form of the same work.
    +
    +
    +
    +  6. Revised Versions of the GNU Lesser General Public License.
    +
    +
    +
    +  The Free Software Foundation may publish revised and/or new versions
    +
    +of the GNU Lesser General Public License from time to time. Such new
    +
    +versions will be similar in spirit to the present version, but may
    +
    +differ in detail to address new problems or concerns.
    +
    +
    +
    +  Each version is given a distinguishing version number. If the
    +
    +Library as you received it specifies that a certain numbered version
    +
    +of the GNU Lesser General Public License "or any later version"
    +
    +applies to it, you have the option of following the terms and
    +
    +conditions either of that published version or of any later version
    +
    +published by the Free Software Foundation. If the Library as you
    +
    +received it does not specify a version number of the GNU Lesser
    +
    +General Public License, you may choose any version of the GNU Lesser
    +
    +General Public License ever published by the Free Software Foundation.
    +
    +
    +
    +  If the Library as you received it specifies that a proxy can decide
    +
    +whether future versions of the GNU Lesser General Public License shall
    +
    +apply, that proxy's public statement of acceptance of any version is
    +
    +permanent authorization for you to choose that version for the
    +
    +Library.
    +
    +
    +
    +--------------- SECTION 7: Mozilla Public License, V2.0 -----------
    +
    +Mozilla Public License
    +
    +Version 2.0
    +
    +
    +
    +1. Definitions
    +
    +
    +
    +1.1. “Contributor”
    +
    +means each individual or legal entity that creates, contributes to the creation of, or owns Covered Software.
    +
    +
    +
    +1.2. “Contributor Version”
    +
    +means the combination of the Contributions of others (if any) used by a Contributor and that particular Contributor’s Contribution.
    +
    +
    +
    +1.3. “Contribution”
    +
    +means Covered Software of a particular Contributor.
    +
    +
    +
    +1.4. “Covered Software”
    +
    +means Source Code Form to which the initial Contributor has attached the notice in Exhibit A, the Executable Form of such Source Code Form, and Modifications of such Source Code Form, in each case including portions thereof.
    +
    +
    +
    +1.5. “Incompatible With Secondary Licenses”
    +
    +means
    +
    +
    +
    +that the initial Contributor has attached the notice described in Exhibit B to the Covered Software; or
    +
    +
    +
    +that the Covered Software was made available under the terms of version 1.1 or earlier of the License, but not also under the terms of a Secondary License.
    +
    +
    +
    +1.6. “Executable Form”
    +
    +means any form of the work other than Source Code Form.
    +
    +
    +
    +1.7. “Larger Work”
    +
    +means a work that combines Covered Software with other material, in a separate file or files, that is not Covered Software.
    +
    +
    +
    +1.8. “License”
    +
    +means this document.
    +
    +
    +
    +1.9. “Licensable”
    +
    +means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently, any and all of the rights conveyed by this License.
    +
    +
    +
    +1.10. “Modifications”
    +
    +means any of the following:
    +
    +
    +
    +any file in Source Code Form that results from an addition to, deletion from, or modification of the contents of Covered Software; or
    +
    +
    +
    +any new file in Source Code Form that contains any Covered Software.
    +
    +
    +
    +1.11. “Patent Claims” of a Contributor
    +
    +means any patent claim(s), including without limitation, method, process, and apparatus claims, in any patent Licensable by such Contributor that would be infringed, but for the grant of the License, by the making, using, selling, offering for sale, having made, import, or transfer of either its Contributions or its Contributor Version.
    +
    +
    +
    +1.12. “Secondary License”
    +
    +means either the GNU General Public License, Version 2.0, the GNU Lesser General Public License, Version 2.1, the GNU Affero General Public License, Version 3.0, or any later versions of those licenses.
    +
    +
    +
    +1.13. “Source Code Form”
    +
    +means the form of the work preferred for making modifications.
    +
    +
    +
    +1.14. “You” (or “Your”)
    +
    +means an individual or a legal entity exercising rights under this License. For legal entities, “You” includes any entity that controls, is controlled by, or is under common control with You. For purposes of this definition, “control” means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50) of the outstanding shares or beneficial ownership of such entity.
    +
    +
    +
    +2. License Grants and Conditions
    +
    +
    +
    +2.1. Grants
    +
    +
    +
    +Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license:
    +
    +
    +
    +under intellectual property rights (other than patent or trademark) Licensable by such Contributor to use, reproduce, make available, modify, display, perform, distribute, and otherwise exploit its Contributions, either on an unmodified basis, with Modifications, or as part of a Larger Work; and
    +
    +
    +
    +under Patent Claims of such Contributor to make, use, sell, offer for sale, have made, import, and otherwise transfer either its Contributions or its Contributor Version.
    +
    +
    +
    +2.2. Effective Date
    +
    +
    +
    +The licenses granted in Section 2.1 with respect to any Contribution become effective for each Contribution on the date the Contributor first distributes such Contribution.
    +
    +
    +
    +2.3. Limitations on Grant Scope
    +
    +
    +
    +The licenses granted in this Section 2 are the only rights granted under this License. No additional rights or licenses will be implied from the distribution or licensing of Covered Software under this License. Notwithstanding Section 2.1(b) above, no patent license is granted by a Contributor:
    +
    +
    +
    +for any code that a Contributor has removed from Covered Software; or
    +
    +
    +
    +for infringements caused by: (i) Your and any other third party’s modifications of Covered Software, or (ii) the combination of its Contributions with other software (except as part of its Contributor Version); or
    +
    +
    +
    +under Patent Claims infringed by Covered Software in the absence of its Contributions.
    +
    +
    +
    +This License does not grant any rights in the trademarks, service marks, or logos of any Contributor (except as may be necessary to comply with the notice requirements in Section 3.4).
    +
    +
    +
    +2.4. Subsequent Licenses
    +
    +
    +
    +No Contributor makes additional grants as a result of Your choice to distribute the Covered Software under a subsequent version of this License (see Section 10.2) or under the terms of a Secondary License (if permitted under the terms of Section 3.3).
    +
    +
    +
    +2.5. Representation
    +
    +
    +
    +Each Contributor represents that the Contributor believes its Contributions are its original creation(s) or it has sufficient rights to grant the rights to its Contributions conveyed by this License.
    +
    +
    +
    +2.6. Fair Use
    +
    +
    +
    +This License is not intended to limit any rights You have under applicable copyright doctrines of fair use, fair dealing, or other equivalents.
    +
    +
    +
    +2.7. Conditions
    +
    +
    +
    +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in Section 2.1.
    +
    +
    +
    +3. Responsibilities
    +
    +
    +
    +3.1. Distribution of Source Form
    +
    +
    +
    +All distribution of Covered Software in Source Code Form, including any Modifications that You create or to which You contribute, must be under the terms of this License. You must inform recipients that the Source Code Form of the Covered Software is governed by the terms of this License, and how they can obtain a copy of this License. You may not attempt to alter or restrict the recipients’ rights in the Source Code Form.
    +
    +
    +
    +3.2. Distribution of Executable Form
    +
    +
    +
    +If You distribute Covered Software in Executable Form then:
    +
    +
    +
    +such Covered Software must also be made available in Source Code Form, as described in Section 3.1, and You must inform recipients of the Executable Form how they can obtain a copy of such Source Code Form by reasonable means in a timely manner, at a charge no more than the cost of distribution to the recipient; and
    +
    +
    +
    +You may distribute such Executable Form under the terms of this License, or sublicense it under different terms, provided that the license for the Executable Form does not attempt to limit or alter the recipients’ rights in the Source Code Form under this License.
    +
    +
    +
    +3.3. Distribution of a Larger Work
    +
    +
    +
    +You may create and distribute a Larger Work under terms of Your choice, provided that You also comply with the requirements of this License for the Covered Software. If the Larger Work is a combination of Covered Software with a work governed by one or more Secondary Licenses, and the Covered Software is not Incompatible With Secondary Licenses, this License permits You to additionally distribute such Covered Software under the terms of such Secondary License(s), so that the recipient of the Larger Work may, at their option, further distribute the Covered Software under the terms of either this License or such Secondary License(s).
    +
    +
    +
    +3.4. Notices
    +
    +
    +
    +You may not remove or alter the substance of any license notices (including copyright notices, patent notices, disclaimers of warranty, or limitations of liability) contained within the Source Code Form of the Covered Software, except that You may alter any license notices to the extent required to remedy known factual inaccuracies.
    +
    +
    +
    +3.5. Application of Additional Terms
    +
    +
    +
    +You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, You may do so only on Your own behalf, and not on behalf of any Contributor. You must make it absolutely clear that any such warranty, support, indemnity, or liability obligation is offered by You alone, and You hereby agree to indemnify every Contributor for any liability incurred by such Contributor as a result of warranty, support, indemnity or liability terms You offer. You may include additional disclaimers of warranty and limitations of liability specific to any jurisdiction.
    +
    +
    +
    +4. Inability to Comply Due to Statute or Regulation
    +
    +
    +
    +If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Software due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be placed in a text file included with all distributions of the Covered Software under this License. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it.
    +
    +
    +
    +5. Termination
    +
    +
    +
    +5.1. The rights granted under this License will terminate automatically if You fail to comply with any of its terms. However, if You become compliant, then the rights granted under this License from a particular Contributor are reinstated (a) provisionally, unless and until such Contributor explicitly and finally terminates Your grants, and (b) on an ongoing basis, if such Contributor fails to notify You of the non-compliance by some reasonable means prior to 60 days after You have come back into compliance. Moreover, Your grants from a particular Contributor are reinstated on an ongoing basis if such Contributor notifies You of the non-compliance by some reasonable means, this is the first time You have received notice of non-compliance with this License from such Contributor, and You become compliant prior to 30 days after Your receipt of the notice.
    +
    +
    +
    +5.2. If You initiate litigation against any entity by asserting a patent infringement claim (excluding declaratory judgment actions, counter-claims, and cross-claims) alleging that a Contributor Version directly or indirectly infringes any patent, then the rights granted to You by any and all Contributors for the Covered Software under Section 2.1 of this License shall terminate.
    +
    +
    +
    +5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or Your distributors under this License prior to termination shall survive termination.
    +
    +
    +
    +6. Disclaimer of Warranty
    +
    +
    +
    +Covered Software is provided under this License on an “as is” basis, without warranty of any kind, either expressed, implied, or statutory, including, without limitation, warranties that the Covered Software is free of defects, merchantable, fit for a particular purpose or non-infringing. The entire risk as to the quality and performance of the Covered Software is with You. Should any Covered Software prove defective in any respect, You (not any Contributor) assume the cost of any necessary servicing, repair, or correction. This disclaimer of warranty constitutes an essential part of this License. No use of any Covered Software is authorized under this License except under this disclaimer.
    +
    +
    +
    +7. Limitation of Liability
    +
    +
    +
    +Under no circumstances and under no legal theory, whether tort (including negligence), contract, or otherwise, shall any Contributor, or anyone who distributes Covered Software as permitted above, be liable to You for any direct, indirect, special, incidental, or consequential damages of any character including, without limitation, damages for lost profits, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses, even if such party shall have been informed of the possibility of such damages. This limitation of liability shall not apply to liability for death or personal injury resulting from such party’s negligence to the extent applicable law prohibits such limitation. Some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so this exclusion and limitation may not apply to You.
    +
    +
    +
    +8. Litigation
    +
    +
    +
    +Any litigation relating to this License may be brought only in the courts of a jurisdiction where the defendant maintains its principal place of business and such litigation shall be governed by laws of that jurisdiction, without reference to its conflict-of-law provisions. Nothing in this Section shall prevent a party’s ability to bring cross-claims or counter-claims.
    +
    +
    +
    +9. Miscellaneous
    +
    +
    +
    +This License represents the complete agreement concerning the subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not be used to construe this License against a Contributor.
    +
    +
    +
    +10. Versions of the License
    +
    +
    +
    +10.1. New Versions
    +
    +
    +
    +Mozilla Foundation is the license steward. Except as provided in Section 10.3, no one other than the license steward has the right to modify or publish new versions of this License. Each version will be given a distinguishing version number.
    +
    +
    +
    +10.2. Effect of New Versions
    +
    +
    +
    +You may distribute the Covered Software under the terms of the version of the License under which You originally received the Covered Software, or under the terms of any subsequent version published by the license steward.
    +
    +
    +
    +10.3. Modified Versions
    +
    +
    +
    +If you create software not governed by this License, and you want to create a new license for such software, you may create and use a modified version of this License if you rename the license and remove any references to the name of the license steward (except to note that such modified license differs from this License).
    +
    +
    +
    +10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses
    +
    +
    +
    +If You choose to distribute Source Code Form that is Incompatible With Secondary Licenses under the terms of this version of the License, the notice described in Exhibit B of this License must be attached.
    +
    +
    +
    +Exhibit A - Source Code Form License Notice
    +
    +
    +
    +This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
    +
    +
    +
    +If it is not possible or desirable to put the notice in a particular file, then You may include the notice in a location (such as a LICENSE file in a relevant directory) where a recipient would be likely to look for such a notice.
    +
    +
    +
    +You may add additional accurate notices of copyright ownership.
    +
    +
    +
    +Exhibit B - “Incompatible With Secondary Licenses” Notice
    +
    +
    +
    +This Source Code Form is “Incompatible With Secondary Licenses”, as defined by the Mozilla Public License, v. 2.0.
    +
    +
    +
    +--------------- SECTION 8: GNU General Public License, V1.0 -----------
    +
    +
    +		    GNU GENERAL PUBLIC LICENSE
    +		     Version 1, February 1989
    +
    + Copyright (C) 1989 Free Software Foundation, Inc.
    + Everyone is permitted to copy and distribute verbatim copies
    + of this license document, but changing it is not allowed.
    +
    +			    Preamble
    +
    +  The license agreements of most software companies try to keep users
    +at the mercy of those companies.  By contrast, our General Public
    +License is intended to guarantee your freedom to share and change free
    +software--to make sure the software is free for all its users.  The
    +General Public License applies to the Free Software Foundation's
    +software and to any other program whose authors commit to using it.
    +You can use it for your programs, too.
    +
    +  When we speak of free software, we are referring to freedom, not
    +price.  Specifically, the General Public License is designed to make
    +sure that you have the freedom to give away or sell copies of free
    +software, that you receive source code or can get it if you want it,
    +that you can change the software or use pieces of it in new free
    +programs; and that you know you can do these things.
    +
    +  To protect your rights, we need to make restrictions that forbid
    +anyone to deny you these rights or to ask you to surrender the rights.
    +These restrictions translate to certain responsibilities for you if you
    +distribute copies of the software, or if you modify it.
    +
    +  For example, if you distribute copies of a such a program, whether
    +gratis or for a fee, you must give the recipients all the rights that
    +you have.  You must make sure that they, too, receive or can get the
    +source code.  And you must tell them their rights.
    +
    +  We protect your rights with two steps: (1) copyright the software, and
    +(2) offer you this license which gives you legal permission to copy,
    +distribute and/or modify the software.
    +
    +  Also, for each author's protection and ours, we want to make certain
    +that everyone understands that there is no warranty for this free
    +software.  If the software is modified by someone else and passed on, we
    +want its recipients to know that what they have is not the original, so
    +that any problems introduced by others will not reflect on the original
    +authors' reputations.
    +
    +  The precise terms and conditions for copying, distribution and
    +modification follow.
    +
    +		    GNU GENERAL PUBLIC LICENSE
    +   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
    +
    +  0. This License Agreement applies to any program or other work which
    +contains a notice placed by the copyright holder saying it may be
    +distributed under the terms of this General Public License.  The
    +"Program", below, refers to any such program or work, and a "work based
    +on the Program" means either the Program or any work containing the
    +Program or a portion of it, either verbatim or with modifications.  Each
    +licensee is addressed as "you".
    +
    +  1. You may copy and distribute verbatim copies of the Program's source
    +code as you receive it, in any medium, provided that you conspicuously and
    +appropriately publish on each copy an appropriate copyright notice and
    +disclaimer of warranty; keep intact all the notices that refer to this
    +General Public License and to the absence of any warranty; and give any
    +other recipients of the Program a copy of this General Public License
    +along with the Program.  You may charge a fee for the physical act of
    +transferring a copy.
    +
    +  2. You may modify your copy or copies of the Program or any portion of
    +it, and copy and distribute such modifications under the terms of Paragraph
    +1 above, provided that you also do the following:
    +
    +    a) cause the modified files to carry prominent notices stating that
    +    you changed the files and the date of any change; and
    +
    +    b) cause the whole of any work that you distribute or publish, that
    +    in whole or in part contains the Program or any part thereof, either
    +    with or without modifications, to be licensed at no charge to all
    +    third parties under the terms of this General Public License (except
    +    that you may choose to grant warranty protection to some or all
    +    third parties, at your option).
    +
    +    c) If the modified program normally reads commands interactively when
    +    run, you must cause it, when started running for such interactive use
    +    in the simplest and most usual way, to print or display an
    +    announcement including an appropriate copyright notice and a notice
    +    that there is no warranty (or else, saying that you provide a
    +    warranty) and that users may redistribute the program under these
    +    conditions, and telling the user how to view a copy of this General
    +    Public License.
    +
    +    d) You may charge a fee for the physical act of transferring a
    +    copy, and you may at your option offer warranty protection in
    +    exchange for a fee.
    +
    +Mere aggregation of another independent work with the Program (or its
    +derivative) on a volume of a storage or distribution medium does not bring
    +the other work under the scope of these terms.
    +
    +  3. You may copy and distribute the Program (or a portion or derivative of
    +it, under Paragraph 2) in object code or executable form under the terms of
    +Paragraphs 1 and 2 above provided that you also do one of the following:
    +
    +    a) accompany it with the complete corresponding machine-readable
    +    source code, which must be distributed under the terms of
    +    Paragraphs 1 and 2 above; or,
    +
    +    b) accompany it with a written offer, valid for at least three
    +    years, to give any third party free (except for a nominal charge
    +    for the cost of distribution) a complete machine-readable copy of the
    +    corresponding source code, to be distributed under the terms of
    +    Paragraphs 1 and 2 above; or,
    +
    +    c) accompany it with the information you received as to where the
    +    corresponding source code may be obtained.  (This alternative is
    +    allowed only for noncommercial distribution and only if you
    +    received the program in object code or executable form alone.)
    +
    +Source code for a work means the preferred form of the work for making
    +modifications to it.  For an executable file, complete source code means
    +all the source code for all modules it contains; but, as a special
    +exception, it need not include source code for modules which are standard
    +libraries that accompany the operating system on which the executable
    +file runs, or for standard header files or definitions files that
    +accompany that operating system.
    +
    +  4. You may not copy, modify, sublicense, distribute or transfer the
    +Program except as expressly provided under this General Public License.
    +Any attempt otherwise to copy, modify, sublicense, distribute or transfer
    +the Program is void, and will automatically terminate your rights to use
    +the Program under this License.  However, parties who have received
    +copies, or rights to use copies, from you under this General Public
    +License will not have their licenses terminated so long as such parties
    +remain in full compliance.
    +
    +  5. By copying, distributing or modifying the Program (or any work based
    +on the Program) you indicate your acceptance of this license to do so,
    +and all its terms and conditions.
    +
    +  6. Each time you redistribute the Program (or any work based on the
    +Program), the recipient automatically receives a license from the original
    +licensor to copy, distribute or modify the Program subject to these
    +terms and conditions.  You may not impose any further restrictions on the
    +recipients' exercise of the rights granted herein.
    +
    +  7. The Free Software Foundation may publish revised and/or new versions
    +of the General Public License from time to time.  Such new versions will
    +be similar in spirit to the present version, but may differ in detail to
    +address new problems or concerns.
    +
    +Each version is given a distinguishing version number.  If the Program
    +specifies a version number of the license which applies to it and "any
    +later version", you have the option of following the terms and conditions
    +either of that version or of any later version published by the Free
    +Software Foundation.  If the Program does not specify a version number of
    +the license, you may choose any version ever published by the Free Software
    +Foundation.
    +
    +  8. If you wish to incorporate parts of the Program into other free
    +programs whose distribution conditions are different, write to the author
    +to ask for permission.  For software which is copyrighted by the Free
    +Software Foundation, write to the Free Software Foundation; we sometimes
    +make exceptions for this.  Our decision will be guided by the two goals
    +of preserving the free status of all derivatives of our free software and
    +of promoting the sharing and reuse of software generally.
    +
    +			    NO WARRANTY
    +
    +  9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
    +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
    +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
    +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
    +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
    +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
    +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
    +REPAIR OR CORRECTION.
    +
    +  10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
    +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
    +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
    +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
    +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
    +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
    +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
    +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
    +POSSIBILITY OF SUCH DAMAGES.
    +
    +		     END OF TERMS AND CONDITIONS
    +
    +	Appendix: How to Apply These Terms to Your New Programs
    +
    +  If you develop a new program, and you want it to be of the greatest
    +possible use to humanity, the best way to achieve this is to make it
    +free software which everyone can redistribute and change under these
    +terms.
    +
    +  To do so, attach the following notices to the program.  It is safest to
    +attach them to the start of each source file to most effectively convey
    +the exclusion of warranty; and each file should have at least the
    +"copyright" line and a pointer to where the full notice is found.
    +
    +    
    +    Copyright (C) 19yy  
    +
    +    This program is free software; you can redistribute it and/or modify
    +    it under the terms of the GNU General Public License as published by
    +    the Free Software Foundation; either version 1, or (at your option)
    +    any later version.
    +
    +    This program is distributed in the hope that it will be useful,
    +    but WITHOUT ANY WARRANTY; without even the implied warranty of
    +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +    GNU General Public License for more details.
    +
    +    You should have received a copy of the GNU General Public License
    +    along with this program; if not, write to the Free Software
    +    Foundation, Inc.
    +
    +Also add information on how to contact you by electronic and paper mail.
    +
    +If the program is interactive, make it output a short notice like this
    +when it starts in an interactive mode:
    +
    +    Gnomovision version 69, Copyright (C) 19xx name of author
    +    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    +    This is free software, and you are welcome to redistribute it
    +    under certain conditions; type `show c' for details.
    +
    +The hypothetical commands `show w' and `show c' should show the
    +appropriate parts of the General Public License.  Of course, the
    +commands you use may be called something other than `show w' and `show
    +c'; they could even be mouse-clicks or menu items--whatever suits your
    +program.
    +
    +You should also get your employer (if you work as a programmer) or your
    +school, if any, to sign a "copyright disclaimer" for the program, if
    +necessary.  Here a sample; alter the names:
    +
    +  Yoyodyne, Inc., hereby disclaims all copyright interest in the
    +  program `Gnomovision' (a program to direct compilers to make passes
    +  at assemblers) written by James Hacker.
    +
    +  , 1 April 1989
    +  Ty Coon, President of Vice
    +
    +That's all there is to it!
    +
    +
    +
    +--------------- SECTION 9: GNU Free Documentation License V1.1 -----------
    +
    +
    +		GNU Free Documentation License
    +		   Version 1.1, March 2000
    +
    + Copyright (C) 2000  Free Software Foundation, Inc.
    +     51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    + Everyone is permitted to copy and distribute verbatim copies
    + of this license document, but changing it is not allowed.
    +
    +
    +0. PREAMBLE
    +
    +The purpose of this License is to make a manual, textbook, or other
    +written document "free" in the sense of freedom: to assure everyone
    +the effective freedom to copy and redistribute it, with or without
    +modifying it, either commercially or noncommercially.  Secondarily,
    +this License preserves for the author and publisher a way to get
    +credit for their work, while not being considered responsible for
    +modifications made by others.
    +
    +This License is a kind of "copyleft", which means that derivative
    +works of the document must themselves be free in the same sense.  It
    +complements the GNU General Public License, which is a copyleft
    +license designed for free software.
    +
    +We have designed this License in order to use it for manuals for free
    +software, because free software needs free documentation: a free
    +program should come with manuals providing the same freedoms that the
    +software does.  But this License is not limited to software manuals;
    +it can be used for any textual work, regardless of subject matter or
    +whether it is published as a printed book.  We recommend this License
    +principally for works whose purpose is instruction or reference.
    +
    +
    +1. APPLICABILITY AND DEFINITIONS
    +
    +This License applies to any manual or other work that contains a
    +notice placed by the copyright holder saying it can be distributed
    +under the terms of this License.  The "Document", below, refers to any
    +such manual or work.  Any member of the public is a licensee, and is
    +addressed as "you".
    +
    +A "Modified Version" of the Document means any work containing the
    +Document or a portion of it, either copied verbatim, or with
    +modifications and/or translated into another language.
    +
    +A "Secondary Section" is a named appendix or a front-matter section of
    +the Document that deals exclusively with the relationship of the
    +publishers or authors of the Document to the Document's overall subject
    +(or to related matters) and contains nothing that could fall directly
    +within that overall subject.  (For example, if the Document is in part a
    +textbook of mathematics, a Secondary Section may not explain any
    +mathematics.)  The relationship could be a matter of historical
    +connection with the subject or with related matters, or of legal,
    +commercial, philosophical, ethical or political position regarding
    +them.
    +
    +The "Invariant Sections" are certain Secondary Sections whose titles
    +are designated, as being those of Invariant Sections, in the notice
    +that says that the Document is released under this License.
    +
    +The "Cover Texts" are certain short passages of text that are listed,
    +as Front-Cover Texts or Back-Cover Texts, in the notice that says that
    +the Document is released under this License.
    +
    +A "Transparent" copy of the Document means a machine-readable copy,
    +represented in a format whose specification is available to the
    +general public, whose contents can be viewed and edited directly and
    +straightforwardly with generic text editors or (for images composed of
    +pixels) generic paint programs or (for drawings) some widely available
    +drawing editor, and that is suitable for input to text formatters or
    +for automatic translation to a variety of formats suitable for input
    +to text formatters.  A copy made in an otherwise Transparent file
    +format whose markup has been designed to thwart or discourage
    +subsequent modification by readers is not Transparent.  A copy that is
    +not "Transparent" is called "Opaque".
    +
    +Examples of suitable formats for Transparent copies include plain
    +ASCII without markup, Texinfo input format, LaTeX input format, SGML
    +or XML using a publicly available DTD, and standard-conforming simple
    +HTML designed for human modification.  Opaque formats include
    +PostScript, PDF, proprietary formats that can be read and edited only
    +by proprietary word processors, SGML or XML for which the DTD and/or
    +processing tools are not generally available, and the
    +machine-generated HTML produced by some word processors for output
    +purposes only.
    +
    +The "Title Page" means, for a printed book, the title page itself,
    +plus such following pages as are needed to hold, legibly, the material
    +this License requires to appear in the title page.  For works in
    +formats which do not have any title page as such, "Title Page" means
    +the text near the most prominent appearance of the work's title,
    +preceding the beginning of the body of the text.
    +
    +
    +2. VERBATIM COPYING
    +
    +You may copy and distribute the Document in any medium, either
    +commercially or noncommercially, provided that this License, the
    +copyright notices, and the license notice saying this License applies
    +to the Document are reproduced in all copies, and that you add no other
    +conditions whatsoever to those of this License.  You may not use
    +technical measures to obstruct or control the reading or further
    +copying of the copies you make or distribute.  However, you may accept
    +compensation in exchange for copies.  If you distribute a large enough
    +number of copies you must also follow the conditions in section 3.
    +
    +You may also lend copies, under the same conditions stated above, and
    +you may publicly display copies.
    +
    +
    +3. COPYING IN QUANTITY
    +
    +If you publish printed copies of the Document numbering more than 100,
    +and the Document's license notice requires Cover Texts, you must enclose
    +the copies in covers that carry, clearly and legibly, all these Cover
    +Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
    +the back cover.  Both covers must also clearly and legibly identify
    +you as the publisher of these copies.  The front cover must present
    +the full title with all words of the title equally prominent and
    +visible.  You may add other material on the covers in addition.
    +Copying with changes limited to the covers, as long as they preserve
    +the title of the Document and satisfy these conditions, can be treated
    +as verbatim copying in other respects.
    +
    +If the required texts for either cover are too voluminous to fit
    +legibly, you should put the first ones listed (as many as fit
    +reasonably) on the actual cover, and continue the rest onto adjacent
    +pages.
    +
    +If you publish or distribute Opaque copies of the Document numbering
    +more than 100, you must either include a machine-readable Transparent
    +copy along with each Opaque copy, or state in or with each Opaque copy
    +a publicly-accessible computer-network location containing a complete
    +Transparent copy of the Document, free of added material, which the
    +general network-using public has access to download anonymously at no
    +charge using public-standard network protocols.  If you use the latter
    +option, you must take reasonably prudent steps, when you begin
    +distribution of Opaque copies in quantity, to ensure that this
    +Transparent copy will remain thus accessible at the stated location
    +until at least one year after the last time you distribute an Opaque
    +copy (directly or through your agents or retailers) of that edition to
    +the public.
    +
    +It is requested, but not required, that you contact the authors of the
    +Document well before redistributing any large number of copies, to give
    +them a chance to provide you with an updated version of the Document.
    +
    +
    +4. MODIFICATIONS
    +
    +You may copy and distribute a Modified Version of the Document under
    +the conditions of sections 2 and 3 above, provided that you release
    +the Modified Version under precisely this License, with the Modified
    +Version filling the role of the Document, thus licensing distribution
    +and modification of the Modified Version to whoever possesses a copy
    +of it.  In addition, you must do these things in the Modified Version:
    +
    +A. Use in the Title Page (and on the covers, if any) a title distinct
    +   from that of the Document, and from those of previous versions
    +   (which should, if there were any, be listed in the History section
    +   of the Document).  You may use the same title as a previous version
    +   if the original publisher of that version gives permission.
    +B. List on the Title Page, as authors, one or more persons or entities
    +   responsible for authorship of the modifications in the Modified
    +   Version, together with at least five of the principal authors of the
    +   Document (all of its principal authors, if it has less than five).
    +C. State on the Title page the name of the publisher of the
    +   Modified Version, as the publisher.
    +D. Preserve all the copyright notices of the Document.
    +E. Add an appropriate copyright notice for your modifications
    +   adjacent to the other copyright notices.
    +F. Include, immediately after the copyright notices, a license notice
    +   giving the public permission to use the Modified Version under the
    +   terms of this License, in the form shown in the Addendum below.
    +G. Preserve in that license notice the full lists of Invariant Sections
    +   and required Cover Texts given in the Document's license notice.
    +H. Include an unaltered copy of this License.
    +I. Preserve the section entitled "History", and its title, and add to
    +   it an item stating at least the title, year, new authors, and
    +   publisher of the Modified Version as given on the Title Page.  If
    +   there is no section entitled "History" in the Document, create one
    +   stating the title, year, authors, and publisher of the Document as
    +   given on its Title Page, then add an item describing the Modified
    +   Version as stated in the previous sentence.
    +J. Preserve the network location, if any, given in the Document for
    +   public access to a Transparent copy of the Document, and likewise
    +   the network locations given in the Document for previous versions
    +   it was based on.  These may be placed in the "History" section.
    +   You may omit a network location for a work that was published at
    +   least four years before the Document itself, or if the original
    +   publisher of the version it refers to gives permission.
    +K. In any section entitled "Acknowledgements" or "Dedications",
    +   preserve the section's title, and preserve in the section all the
    +   substance and tone of each of the contributor acknowledgements
    +   and/or dedications given therein.
    +L. Preserve all the Invariant Sections of the Document,
    +   unaltered in their text and in their titles.  Section numbers
    +   or the equivalent are not considered part of the section titles.
    +M. Delete any section entitled "Endorsements".  Such a section
    +   may not be included in the Modified Version.
    +N. Do not retitle any existing section as "Endorsements"
    +   or to conflict in title with any Invariant Section.
    +
    +If the Modified Version includes new front-matter sections or
    +appendices that qualify as Secondary Sections and contain no material
    +copied from the Document, you may at your option designate some or all
    +of these sections as invariant.  To do this, add their titles to the
    +list of Invariant Sections in the Modified Version's license notice.
    +These titles must be distinct from any other section titles.
    +
    +You may add a section entitled "Endorsements", provided it contains
    +nothing but endorsements of your Modified Version by various
    +parties--for example, statements of peer review or that the text has
    +been approved by an organization as the authoritative definition of a
    +standard.
    +
    +You may add a passage of up to five words as a Front-Cover Text, and a
    +passage of up to 25 words as a Back-Cover Text, to the end of the list
    +of Cover Texts in the Modified Version.  Only one passage of
    +Front-Cover Text and one of Back-Cover Text may be added by (or
    +through arrangements made by) any one entity.  If the Document already
    +includes a cover text for the same cover, previously added by you or
    +by arrangement made by the same entity you are acting on behalf of,
    +you may not add another; but you may replace the old one, on explicit
    +permission from the previous publisher that added the old one.
    +
    +The author(s) and publisher(s) of the Document do not by this License
    +give permission to use their names for publicity for or to assert or
    +imply endorsement of any Modified Version.
    +
    +
    +5. COMBINING DOCUMENTS
    +
    +You may combine the Document with other documents released under this
    +License, under the terms defined in section 4 above for modified
    +versions, provided that you include in the combination all of the
    +Invariant Sections of all of the original documents, unmodified, and
    +list them all as Invariant Sections of your combined work in its
    +license notice.
    +
    +The combined work need only contain one copy of this License, and
    +multiple identical Invariant Sections may be replaced with a single
    +copy.  If there are multiple Invariant Sections with the same name but
    +different contents, make the title of each such section unique by
    +adding at the end of it, in parentheses, the name of the original
    +author or publisher of that section if known, or else a unique number.
    +Make the same adjustment to the section titles in the list of
    +Invariant Sections in the license notice of the combined work.
    +
    +In the combination, you must combine any sections entitled "History"
    +in the various original documents, forming one section entitled
    +"History"; likewise combine any sections entitled "Acknowledgements",
    +and any sections entitled "Dedications".  You must delete all sections
    +entitled "Endorsements."
    +
    +
    +6. COLLECTIONS OF DOCUMENTS
    +
    +You may make a collection consisting of the Document and other documents
    +released under this License, and replace the individual copies of this
    +License in the various documents with a single copy that is included in
    +the collection, provided that you follow the rules of this License for
    +verbatim copying of each of the documents in all other respects.
    +
    +You may extract a single document from such a collection, and distribute
    +it individually under this License, provided you insert a copy of this
    +License into the extracted document, and follow this License in all
    +other respects regarding verbatim copying of that document.
    +
    +
    +7. AGGREGATION WITH INDEPENDENT WORKS
    +
    +A compilation of the Document or its derivatives with other separate
    +and independent documents or works, in or on a volume of a storage or
    +distribution medium, does not as a whole count as a Modified Version
    +of the Document, provided no compilation copyright is claimed for the
    +compilation.  Such a compilation is called an "aggregate", and this
    +License does not apply to the other self-contained works thus compiled
    +with the Document, on account of their being thus compiled, if they
    +are not themselves derivative works of the Document.
    +
    +If the Cover Text requirement of section 3 is applicable to these
    +copies of the Document, then if the Document is less than one quarter
    +of the entire aggregate, the Document's Cover Texts may be placed on
    +covers that surround only the Document within the aggregate.
    +Otherwise they must appear on covers around the whole aggregate.
    +
    +
    +8. TRANSLATION
    +
    +Translation is considered a kind of modification, so you may
    +distribute translations of the Document under the terms of section 4.
    +Replacing Invariant Sections with translations requires special
    +permission from their copyright holders, but you may include
    +translations of some or all Invariant Sections in addition to the
    +original versions of these Invariant Sections.  You may include a
    +translation of this License provided that you also include the
    +original English version of this License.  In case of a disagreement
    +between the translation and the original English version of this
    +License, the original English version will prevail.
    +
    +
    +9. TERMINATION
    +
    +You may not copy, modify, sublicense, or distribute the Document except
    +as expressly provided for under this License.  Any other attempt to
    +copy, modify, sublicense or distribute the Document is void, and will
    +automatically terminate your rights under this License.  However,
    +parties who have received copies, or rights, from you under this
    +License will not have their licenses terminated so long as such
    +parties remain in full compliance.
    +
    +
    +10. FUTURE REVISIONS OF THIS LICENSE
    +
    +The Free Software Foundation may publish new, revised versions
    +of the GNU Free Documentation License from time to time.  Such new
    +versions will be similar in spirit to the present version, but may
    +differ in detail to address new problems or concerns.  See
    +http://www.gnu.org/copyleft/.
    +
    +Each version of the License is given a distinguishing version number.
    +If the Document specifies that a particular numbered version of this
    +License "or any later version" applies to it, you have the option of
    +following the terms and conditions either of that specified version or
    +of any later version that has been published (not as a draft) by the
    +Free Software Foundation.  If the Document does not specify a version
    +number of this License, you may choose any version ever published (not
    +as a draft) by the Free Software Foundation.
    +
    +
    +ADDENDUM: How to use this License for your documents
    +
    +To use this License in a document you have written, include a copy of
    +the License in the document and put the following copyright and
    +license notices just after the title page:
    +
    +      Copyright (c)  YEAR  YOUR NAME.
    +      Permission is granted to copy, distribute and/or modify this document
    +      under the terms of the GNU Free Documentation License, Version 1.1
    +      or any later version published by the Free Software Foundation;
    +      with the Invariant Sections being LIST THEIR TITLES, with the
    +      Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
    +      A copy of the license is included in the section entitled "GNU
    +      Free Documentation License".
    +
    +If you have no Invariant Sections, write "with no Invariant Sections"
    +instead of saying which ones are invariant.  If you have no
    +Front-Cover Texts, write "no Front-Cover Texts" instead of
    +"Front-Cover Texts being LIST"; likewise for Back-Cover Texts.
    +
    +If your document contains nontrivial examples of program code, we
    +recommend releasing these examples in parallel under your choice of
    +free software license, such as the GNU General Public License,
    +to permit their use in free software.
    +
    +
    +
    +--------------- SECTION 10: GNU Free Documentation License V1.2 -----------
    +
    +
    +                GNU Free Documentation License
    +                  Version 1.2, November 2002
    +
    +
    + Copyright (C) 2000,2001,2002  Free Software Foundation, Inc.
    +     51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    + Everyone is permitted to copy and distribute verbatim copies
    + of this license document, but changing it is not allowed.
    +
    +
    +0. PREAMBLE
    +
    +The purpose of this License is to make a manual, textbook, or other
    +functional and useful document "free" in the sense of freedom: to
    +assure everyone the effective freedom to copy and redistribute it,
    +with or without modifying it, either commercially or noncommercially.
    +Secondarily, this License preserves for the author and publisher a way
    +to get credit for their work, while not being considered responsible
    +for modifications made by others.
    +
    +This License is a kind of "copyleft", which means that derivative
    +works of the document must themselves be free in the same sense.  It
    +complements the GNU General Public License, which is a copyleft
    +license designed for free software.
    +
    +We have designed this License in order to use it for manuals for free
    +software, because free software needs free documentation: a free
    +program should come with manuals providing the same freedoms that the
    +software does.  But this License is not limited to software manuals;
    +it can be used for any textual work, regardless of subject matter or
    +whether it is published as a printed book.  We recommend this License
    +principally for works whose purpose is instruction or reference.
    +
    +
    +1. APPLICABILITY AND DEFINITIONS
    +
    +This License applies to any manual or other work, in any medium, that
    +contains a notice placed by the copyright holder saying it can be
    +distributed under the terms of this License.  Such a notice grants a
    +world-wide, royalty-free license, unlimited in duration, to use that
    +work under the conditions stated herein.  The "Document", below,
    +refers to any such manual or work.  Any member of the public is a
    +licensee, and is addressed as "you".  You accept the license if you
    +copy, modify or distribute the work in a way requiring permission
    +under copyright law.
    +
    +A "Modified Version" of the Document means any work containing the
    +Document or a portion of it, either copied verbatim, or with
    +modifications and/or translated into another language.
    +
    +A "Secondary Section" is a named appendix or a front-matter section of
    +the Document that deals exclusively with the relationship of the
    +publishers or authors of the Document to the Document's overall subject
    +(or to related matters) and contains nothing that could fall directly
    +within that overall subject.  (Thus, if the Document is in part a
    +textbook of mathematics, a Secondary Section may not explain any
    +mathematics.)  The relationship could be a matter of historical
    +connection with the subject or with related matters, or of legal,
    +commercial, philosophical, ethical or political position regarding
    +them.
    +
    +The "Invariant Sections" are certain Secondary Sections whose titles
    +are designated, as being those of Invariant Sections, in the notice
    +that says that the Document is released under this License.  If a
    +section does not fit the above definition of Secondary then it is not
    +allowed to be designated as Invariant.  The Document may contain zero
    +Invariant Sections.  If the Document does not identify any Invariant
    +Sections then there are none.
    +
    +The "Cover Texts" are certain short passages of text that are listed,
    +as Front-Cover Texts or Back-Cover Texts, in the notice that says that
    +the Document is released under this License.  A Front-Cover Text may
    +be at most 5 words, and a Back-Cover Text may be at most 25 words.
    +
    +A "Transparent" copy of the Document means a machine-readable copy,
    +represented in a format whose specification is available to the
    +general public, that is suitable for revising the document
    +straightforwardly with generic text editors or (for images composed of
    +pixels) generic paint programs or (for drawings) some widely available
    +drawing editor, and that is suitable for input to text formatters or
    +for automatic translation to a variety of formats suitable for input
    +to text formatters.  A copy made in an otherwise Transparent file
    +format whose markup, or absence of markup, has been arranged to thwart
    +or discourage subsequent modification by readers is not Transparent.
    +An image format is not Transparent if used for any substantial amount
    +of text.  A copy that is not "Transparent" is called "Opaque".
    +
    +Examples of suitable formats for Transparent copies include plain
    +ASCII without markup, Texinfo input format, LaTeX input format, SGML
    +or XML using a publicly available DTD, and standard-conforming simple
    +HTML, PostScript or PDF designed for human modification.  Examples of
    +transparent image formats include PNG, XCF and JPG.  Opaque formats
    +include proprietary formats that can be read and edited only by
    +proprietary word processors, SGML or XML for which the DTD and/or
    +processing tools are not generally available, and the
    +machine-generated HTML, PostScript or PDF produced by some word
    +processors for output purposes only.
    +
    +The "Title Page" means, for a printed book, the title page itself,
    +plus such following pages as are needed to hold, legibly, the material
    +this License requires to appear in the title page.  For works in
    +formats which do not have any title page as such, "Title Page" means
    +the text near the most prominent appearance of the work's title,
    +preceding the beginning of the body of the text.
    +
    +A section "Entitled XYZ" means a named subunit of the Document whose
    +title either is precisely XYZ or contains XYZ in parentheses following
    +text that translates XYZ in another language.  (Here XYZ stands for a
    +specific section name mentioned below, such as "Acknowledgements",
    +"Dedications", "Endorsements", or "History".)  To "Preserve the Title"
    +of such a section when you modify the Document means that it remains a
    +section "Entitled XYZ" according to this definition.
    +
    +The Document may include Warranty Disclaimers next to the notice which
    +states that this License applies to the Document.  These Warranty
    +Disclaimers are considered to be included by reference in this
    +License, but only as regards disclaiming warranties: any other
    +implication that these Warranty Disclaimers may have is void and has
    +no effect on the meaning of this License.
    +
    +
    +2. VERBATIM COPYING
    +
    +You may copy and distribute the Document in any medium, either
    +commercially or noncommercially, provided that this License, the
    +copyright notices, and the license notice saying this License applies
    +to the Document are reproduced in all copies, and that you add no other
    +conditions whatsoever to those of this License.  You may not use
    +technical measures to obstruct or control the reading or further
    +copying of the copies you make or distribute.  However, you may accept
    +compensation in exchange for copies.  If you distribute a large enough
    +number of copies you must also follow the conditions in section 3.
    +
    +You may also lend copies, under the same conditions stated above, and
    +you may publicly display copies.
    +
    +
    +3. COPYING IN QUANTITY
    +
    +If you publish printed copies (or copies in media that commonly have
    +printed covers) of the Document, numbering more than 100, and the
    +Document's license notice requires Cover Texts, you must enclose the
    +copies in covers that carry, clearly and legibly, all these Cover
    +Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
    +the back cover.  Both covers must also clearly and legibly identify
    +you as the publisher of these copies.  The front cover must present
    +the full title with all words of the title equally prominent and
    +visible.  You may add other material on the covers in addition.
    +Copying with changes limited to the covers, as long as they preserve
    +the title of the Document and satisfy these conditions, can be treated
    +as verbatim copying in other respects.
    +
    +If the required texts for either cover are too voluminous to fit
    +legibly, you should put the first ones listed (as many as fit
    +reasonably) on the actual cover, and continue the rest onto adjacent
    +pages.
    +
    +If you publish or distribute Opaque copies of the Document numbering
    +more than 100, you must either include a machine-readable Transparent
    +copy along with each Opaque copy, or state in or with each Opaque copy
    +a computer-network location from which the general network-using
    +public has access to download using public-standard network protocols
    +a complete Transparent copy of the Document, free of added material.
    +If you use the latter option, you must take reasonably prudent steps,
    +when you begin distribution of Opaque copies in quantity, to ensure
    +that this Transparent copy will remain thus accessible at the stated
    +location until at least one year after the last time you distribute an
    +Opaque copy (directly or through your agents or retailers) of that
    +edition to the public.
    +
    +It is requested, but not required, that you contact the authors of the
    +Document well before redistributing any large number of copies, to give
    +them a chance to provide you with an updated version of the Document.
    +
    +
    +4. MODIFICATIONS
    +
    +You may copy and distribute a Modified Version of the Document under
    +the conditions of sections 2 and 3 above, provided that you release
    +the Modified Version under precisely this License, with the Modified
    +Version filling the role of the Document, thus licensing distribution
    +and modification of the Modified Version to whoever possesses a copy
    +of it.  In addition, you must do these things in the Modified Version:
    +
    +A. Use in the Title Page (and on the covers, if any) a title distinct
    +   from that of the Document, and from those of previous versions
    +   (which should, if there were any, be listed in the History section
    +   of the Document).  You may use the same title as a previous version
    +   if the original publisher of that version gives permission.
    +B. List on the Title Page, as authors, one or more persons or entities
    +   responsible for authorship of the modifications in the Modified
    +   Version, together with at least five of the principal authors of the
    +   Document (all of its principal authors, if it has fewer than five),
    +   unless they release you from this requirement.
    +C. State on the Title page the name of the publisher of the
    +   Modified Version, as the publisher.
    +D. Preserve all the copyright notices of the Document.
    +E. Add an appropriate copyright notice for your modifications
    +   adjacent to the other copyright notices.
    +F. Include, immediately after the copyright notices, a license notice
    +   giving the public permission to use the Modified Version under the
    +   terms of this License, in the form shown in the Addendum below.
    +G. Preserve in that license notice the full lists of Invariant Sections
    +   and required Cover Texts given in the Document's license notice.
    +H. Include an unaltered copy of this License.
    +I. Preserve the section Entitled "History", Preserve its Title, and add
    +   to it an item stating at least the title, year, new authors, and
    +   publisher of the Modified Version as given on the Title Page.  If
    +   there is no section Entitled "History" in the Document, create one
    +   stating the title, year, authors, and publisher of the Document as
    +   given on its Title Page, then add an item describing the Modified
    +   Version as stated in the previous sentence.
    +J. Preserve the network location, if any, given in the Document for
    +   public access to a Transparent copy of the Document, and likewise
    +   the network locations given in the Document for previous versions
    +   it was based on.  These may be placed in the "History" section.
    +   You may omit a network location for a work that was published at
    +   least four years before the Document itself, or if the original
    +   publisher of the version it refers to gives permission.
    +K. For any section Entitled "Acknowledgements" or "Dedications",
    +   Preserve the Title of the section, and preserve in the section all
    +   the substance and tone of each of the contributor acknowledgements
    +   and/or dedications given therein.
    +L. Preserve all the Invariant Sections of the Document,
    +   unaltered in their text and in their titles.  Section numbers
    +   or the equivalent are not considered part of the section titles.
    +M. Delete any section Entitled "Endorsements".  Such a section
    +   may not be included in the Modified Version.
    +N. Do not retitle any existing section to be Entitled "Endorsements"
    +   or to conflict in title with any Invariant Section.
    +O. Preserve any Warranty Disclaimers.
    +
    +If the Modified Version includes new front-matter sections or
    +appendices that qualify as Secondary Sections and contain no material
    +copied from the Document, you may at your option designate some or all
    +of these sections as invariant.  To do this, add their titles to the
    +list of Invariant Sections in the Modified Version's license notice.
    +These titles must be distinct from any other section titles.
    +
    +You may add a section Entitled "Endorsements", provided it contains
    +nothing but endorsements of your Modified Version by various
    +parties--for example, statements of peer review or that the text has
    +been approved by an organization as the authoritative definition of a
    +standard.
    +
    +You may add a passage of up to five words as a Front-Cover Text, and a
    +passage of up to 25 words as a Back-Cover Text, to the end of the list
    +of Cover Texts in the Modified Version.  Only one passage of
    +Front-Cover Text and one of Back-Cover Text may be added by (or
    +through arrangements made by) any one entity.  If the Document already
    +includes a cover text for the same cover, previously added by you or
    +by arrangement made by the same entity you are acting on behalf of,
    +you may not add another; but you may replace the old one, on explicit
    +permission from the previous publisher that added the old one.
    +
    +The author(s) and publisher(s) of the Document do not by this License
    +give permission to use their names for publicity for or to assert or
    +imply endorsement of any Modified Version.
    +
    +
    +5. COMBINING DOCUMENTS
    +
    +You may combine the Document with other documents released under this
    +License, under the terms defined in section 4 above for modified
    +versions, provided that you include in the combination all of the
    +Invariant Sections of all of the original documents, unmodified, and
    +list them all as Invariant Sections of your combined work in its
    +license notice, and that you preserve all their Warranty Disclaimers.
    +
    +The combined work need only contain one copy of this License, and
    +multiple identical Invariant Sections may be replaced with a single
    +copy.  If there are multiple Invariant Sections with the same name but
    +different contents, make the title of each such section unique by
    +adding at the end of it, in parentheses, the name of the original
    +author or publisher of that section if known, or else a unique number.
    +Make the same adjustment to the section titles in the list of
    +Invariant Sections in the license notice of the combined work.
    +
    +In the combination, you must combine any sections Entitled "History"
    +in the various original documents, forming one section Entitled
    +"History"; likewise combine any sections Entitled "Acknowledgements",
    +and any sections Entitled "Dedications".  You must delete all sections
    +Entitled "Endorsements".
    +
    +
    +6. COLLECTIONS OF DOCUMENTS
    +
    +You may make a collection consisting of the Document and other documents
    +released under this License, and replace the individual copies of this
    +License in the various documents with a single copy that is included in
    +the collection, provided that you follow the rules of this License for
    +verbatim copying of each of the documents in all other respects.
    +
    +You may extract a single document from such a collection, and distribute
    +it individually under this License, provided you insert a copy of this
    +License into the extracted document, and follow this License in all
    +other respects regarding verbatim copying of that document.
    +
    +
    +7. AGGREGATION WITH INDEPENDENT WORKS
    +
    +A compilation of the Document or its derivatives with other separate
    +and independent documents or works, in or on a volume of a storage or
    +distribution medium, is called an "aggregate" if the copyright
    +resulting from the compilation is not used to limit the legal rights
    +of the compilation's users beyond what the individual works permit.
    +When the Document is included in an aggregate, this License does not
    +apply to the other works in the aggregate which are not themselves
    +derivative works of the Document.
    +
    +If the Cover Text requirement of section 3 is applicable to these
    +copies of the Document, then if the Document is less than one half of
    +the entire aggregate, the Document's Cover Texts may be placed on
    +covers that bracket the Document within the aggregate, or the
    +electronic equivalent of covers if the Document is in electronic form.
    +Otherwise they must appear on printed covers that bracket the whole
    +aggregate.
    +
    +
    +8. TRANSLATION
    +
    +Translation is considered a kind of modification, so you may
    +distribute translations of the Document under the terms of section 4.
    +Replacing Invariant Sections with translations requires special
    +permission from their copyright holders, but you may include
    +translations of some or all Invariant Sections in addition to the
    +original versions of these Invariant Sections.  You may include a
    +translation of this License, and all the license notices in the
    +Document, and any Warranty Disclaimers, provided that you also include
    +the original English version of this License and the original versions
    +of those notices and disclaimers.  In case of a disagreement between
    +the translation and the original version of this License or a notice
    +or disclaimer, the original version will prevail.
    +
    +If a section in the Document is Entitled "Acknowledgements",
    +"Dedications", or "History", the requirement (section 4) to Preserve
    +its Title (section 1) will typically require changing the actual
    +title.
    +
    +
    +9. TERMINATION
    +
    +You may not copy, modify, sublicense, or distribute the Document except
    +as expressly provided for under this License.  Any other attempt to
    +copy, modify, sublicense or distribute the Document is void, and will
    +automatically terminate your rights under this License.  However,
    +parties who have received copies, or rights, from you under this
    +License will not have their licenses terminated so long as such
    +parties remain in full compliance.
    +
    +
    +10. FUTURE REVISIONS OF THIS LICENSE
    +
    +The Free Software Foundation may publish new, revised versions
    +of the GNU Free Documentation License from time to time.  Such new
    +versions will be similar in spirit to the present version, but may
    +differ in detail to address new problems or concerns.  See
    +http://www.gnu.org/copyleft/.
    +
    +Each version of the License is given a distinguishing version number.
    +If the Document specifies that a particular numbered version of this
    +License "or any later version" applies to it, you have the option of
    +following the terms and conditions either of that specified version or
    +of any later version that has been published (not as a draft) by the
    +Free Software Foundation.  If the Document does not specify a version
    +number of this License, you may choose any version ever published (not
    +as a draft) by the Free Software Foundation.
    +
    +
    +ADDENDUM: How to use this License for your documents
    +
    +To use this License in a document you have written, include a copy of
    +the License in the document and put the following copyright and
    +license notices just after the title page:
    +
    +    Copyright (c)  YEAR  YOUR NAME.
    +    Permission is granted to copy, distribute and/or modify this document
    +    under the terms of the GNU Free Documentation License, Version 1.2
    +    or any later version published by the Free Software Foundation;
    +    with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
    +    A copy of the license is included in the section entitled "GNU
    +    Free Documentation License".
    +
    +If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
    +replace the "with...Texts." line with this:
    +
    +    with the Invariant Sections being LIST THEIR TITLES, with the
    +    Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
    +
    +If you have Invariant Sections without Cover Texts, or some other
    +combination of the three, merge those two alternatives to suit the
    +situation.
    +
    +If your document contains nontrivial examples of program code, we
    +recommend releasing these examples in parallel under your choice of
    +free software license, such as the GNU General Public License,
    +to permit their use in free software.
    +
    +
    +
    +--------------- SECTION 11: GNU Free Documentation License V1.3 -----------
    +
    +
    +GNU Free Documentation License
    +
    +Version 1.3, 3 November 2008
    +
    +Copyright (c) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. 
    +
    +Everyone is permitted to copy and distribute verbatim copies of this
    +license document, but changing it is not allowed.
    +
    +0. PREAMBLE
    +
    +The purpose of this License is to make a manual, textbook, or other
    +functional and useful document "free" in the sense of freedom: to assure
    +everyone the effective freedom to copy and redistribute it, with or
    +without modifying it, either commercially or noncommercially. Secondarily,
    +this License preserves for the author and publisher a way to get credit
    +for their work, while not being considered responsible for modifications
    +made by others.
    +
    +This License is a kind of "copyleft", which means that derivative works
    +of the document must themselves be free in the same sense. It complements
    +the GNU General Public License, which is a copyleft license designed
    +for free software.
    +
    +We have designed this License in order to use it for manuals for free
    +software, because free software needs free documentation: a free program
    +should come with manuals providing the same freedoms that the software
    +does. But this License is not limited to software manuals; it can be
    +used for any textual work, regardless of subject matter or whether it
    +is published as a printed book. We recommend this License principally
    +for works whose purpose is instruction or reference.
    +
    +1. APPLICABILITY AND DEFINITIONS
    +
    +This License applies to any manual or other work, in any medium,
    +that contains a notice placed by the copyright holder saying it can
    +be distributed under the terms of this License. Such a notice grants
    +a world-wide, royalty-free license, unlimited in duration, to use that
    +work under the conditions stated herein. The "Document", below, refers
    +to any such manual or work. Any member of the public is a licensee,
    +and is addressed as "you". You accept the license if you copy, modify
    +or distribute the work in a way requiring permission under copyright law.
    +
    +A "Modified Version" of the Document means any work containing the
    +Document or a portion of it, either copied verbatim, or with modifications
    +and/or translated into another language.
    +
    +A "Secondary Section" is a named appendix or a front-matter section
    +of the Document that deals exclusively with the relationship of the
    +publishers or authors of the Document to the Document's overall subject
    +(or to related matters) and contains nothing that could fall directly
    +within that overall subject. (Thus, if the Document is in part a textbook
    +of mathematics, a Secondary Section may not explain any mathematics.) The
    +relationship could be a matter of historical connection with the subject
    +or with related matters, or of legal, commercial, philosophical, ethical
    +or political position regarding them.
    +
    +The "Invariant Sections" are certain Secondary Sections whose titles are
    +designated, as being those of Invariant Sections, in the notice that
    +says that the Document is released under this License. If a section
    +does not fit the above definition of Secondary then it is not allowed
    +to be designated as Invariant. The Document may contain zero Invariant
    +Sections. If the Document does not identify any Invariant Sections then
    +there are none.
    +
    +The "Cover Texts" are certain short passages of text that are listed,
    +as Front-Cover Texts or Back-Cover Texts, in the notice that says that
    +the Document is released under this License. A Front-Cover Text may be
    +at most 5 words, and a Back-Cover Text may be at most 25 words.
    +
    +A "Transparent" copy of the Document means a machine-readable copy,
    +represented in a format whose specification is available to the general
    +public, that is suitable for revising the document straightforwardly with
    +generic text editors or (for images composed of pixels) generic paint
    +programs or (for drawings) some widely available drawing editor, and that
    +is suitable for input to text formatters or for automatic translation to a
    +variety of formats suitable for input to text formatters. A copy made in
    +an otherwise Transparent file format whose markup, or absence of markup,
    +has been arranged to thwart or discourage subsequent modification by
    +readers is not Transparent. An image format is not Transparent if used
    +for any substantial amount of text. A copy that is not "Transparent"
    +is called "Opaque".
    +
    +Examples of suitable formats for Transparent copies include plain ASCII
    +without markup, Texinfo input format, LaTeX input format, SGML or XML
    +using a publicly available DTD, and standard-conforming simple HTML,
    +PostScript or PDF designed for human modification. Examples of transparent
    +image formats include PNG, XCF and JPG. Opaque formats include proprietary
    +formats that can be read and edited only by proprietary word processors,
    +SGML or XML for which the DTD and/or processing tools are not generally
    +available, and the machine-generated HTML, PostScript or PDF produced
    +by some word processors for output purposes only.
    +
    +The "Title Page" means, for a printed book, the title page itself,
    +plus such following pages as are needed to hold, legibly, the material
    +this License requires to appear in the title page. For works in formats
    +which do not have any title page as such, "Title Page" means the text
    +near the most prominent appearance of the work's title, preceding the
    +beginning of the body of the text.
    +
    +The "publisher" means any person or entity that distributes copies of
    +the Document to the public.
    +
    +A section "Entitled XYZ" means a named subunit of the Document whose
    +title either is precisely XYZ or contains XYZ in parentheses following
    +text that translates XYZ in another language. (Here XYZ stands for
    +a specific section name mentioned below, such as "Acknowledgements",
    +"Dedications", "Endorsements", or "History".) To "Preserve the Title"
    +of such a section when you modify the Document means that it remains a
    +section "Entitled XYZ" according to this definition.
    +
    +The Document may include Warranty Disclaimers next to the notice
    +which states that this License applies to the Document. These Warranty
    +Disclaimers are considered to be included by reference in this License,
    +but only as regards disclaiming warranties: any other implication that
    +these Warranty Disclaimers may have is void and has no effect on the
    +meaning of this License.
    +
    +2. VERBATIM COPYING
    +
    +You may copy and distribute the Document in any medium, either
    +commercially or noncommercially, provided that this License, the
    +copyright notices, and the license notice saying this License applies
    +to the Document are reproduced in all copies, and that you add no other
    +conditions whatsoever to those of this License. You may not use technical
    +measures to obstruct or control the reading or further copying of the
    +copies you make or distribute. However, you may accept compensation in
    +exchange for copies. If you distribute a large enough number of copies
    +you must also follow the conditions in section 3.
    +
    +You may also lend copies, under the same conditions stated above, and
    +you may publicly display copies.
    +
    +3. COPYING IN QUANTITY
    +
    +If you publish printed copies (or copies in media that commonly have
    +printed covers) of the Document, numbering more than 100, and the
    +Document's license notice requires Cover Texts, you must enclose the
    +copies in covers that carry, clearly and legibly, all these Cover Texts:
    +Front-Cover Texts on the front cover, and Back-Cover Texts on the back
    +cover. Both covers must also clearly and legibly identify you as the
    +publisher of these copies. The front cover must present the full title
    +with all words of the title equally prominent and visible. You may add
    +other material on the covers in addition. Copying with changes limited to
    +the covers, as long as they preserve the title of the Document and satisfy
    +these conditions, can be treated as verbatim copying in other respects.
    +
    +If the required texts for either cover are too voluminous to fit legibly,
    +you should put the first ones listed (as many as fit reasonably) on the
    +actual cover, and continue the rest onto adjacent pages.
    +
    +If you publish or distribute Opaque copies of the Document numbering
    +more than 100, you must either include a machine-readable Transparent
    +copy along with each Opaque copy, or state in or with each Opaque copy
    +a computer-network location from which the general network-using public
    +has access to download using public-standard network protocols a complete
    +Transparent copy of the Document, free of added material. If you use the
    +latter option, you must take reasonably prudent steps, when you begin
    +distribution of Opaque copies in quantity, to ensure that this Transparent
    +copy will remain thus accessible at the stated location until at least
    +one year after the last time you distribute an Opaque copy (directly or
    +through your agents or retailers) of that edition to the public.
    +
    +It is requested, but not required, that you contact the authors of the
    +Document well before redistributing any large number of copies, to give
    +them a chance to provide you with an updated version of the Document.
    +
    +4. MODIFICATIONS
    +
    +You may copy and distribute a Modified Version of the Document under
    +the conditions of sections 2 and 3 above, provided that you release
    +the Modified Version under precisely this License, with the Modified
    +Version filling the role of the Document, thus licensing distribution
    +and modification of the Modified Version to whoever possesses a copy of
    +it. In addition, you must do these things in the Modified Version:
    +
    +    * A. Use in the Title Page (and on the covers, if any) a title
    +    distinct from that of the Document, and from those of previous
    +    versions (which should, if there were any, be listed in the History
    +    section of the Document). You may use the same title as a previous
    +    version if the original publisher of that version gives permission.
    +
    +    * B. List on the Title Page, as authors, one or more persons or
    +    entities responsible for authorship of the modifications in the
    +    Modified Version, together with at least five of the principal authors
    +    of the Document (all of its principal authors, if it has fewer than
    +    five), unless they release you from this requirement.
    +
    +    * C. State on the Title page the name of the publisher of the Modified
    +    Version, as the publisher.
    +
    +    * D. Preserve all the copyright notices of the Document.
    +
    +    * E. Add an appropriate copyright notice for your modifications
    +    adjacent to the other copyright notices.
    +
    +    * F. Include, immediately after the copyright notices, a license
    +    notice giving the public permission to use the Modified Version under
    +    the terms of this License, in the form shown in the Addendum below.
    +
    +    * G. Preserve in that license notice the full lists of Invariant
    +    Sections and required Cover Texts given in the Document's license
    +    notice.
    +
    +    * H. Include an unaltered copy of this License.
    +
    +    * I. Preserve the section Entitled "History", Preserve its Title,
    +    and add to it an item stating at least the title, year, new authors,
    +    and publisher of the Modified Version as given on the Title Page. If
    +    there is no section Entitled "History" in the Document, create one
    +    stating the title, year, authors, and publisher of the Document as
    +    given on its Title Page, then add an item describing the Modified
    +    Version as stated in the previous sentence.
    +
    +    * J. Preserve the network location, if any, given in the Document for
    +    public access to a Transparent copy of the Document, and likewise
    +    the network locations given in the Document for previous versions
    +    it was based on. These may be placed in the "History" section. You
    +    may omit a network location for a work that was published at least
    +    four years before the Document itself, or if the original publisher
    +    of the version it refers to gives permission.
    +
    +    * K. For any section Entitled "Acknowledgements" or "Dedications",
    +    Preserve the Title of the section, and preserve in the section all
    +    the substance and tone of each of the contributor acknowledgements
    +    and/or dedications given therein.
    +
    +    * L. Preserve all the Invariant Sections of the Document, unaltered
    +    in their text and in their titles. Section numbers or the equivalent
    +    are not considered part of the section titles.
    +
    +    * M. Delete any section Entitled "Endorsements". Such a section may
    +    not be included in the Modified Version.
    +
    +    * N. Do not retitle any existing section to be Entitled "Endorsements"
    +    or to conflict in title with any Invariant Section.
    +
    +    * O. Preserve any Warranty Disclaimers.
    +
    +If the Modified Version includes new front-matter sections or appendices
    +that qualify as Secondary Sections and contain no material copied
    +from the Document, you may at your option designate some or all of
    +these sections as invariant. To do this, add their titles to the list
    +of Invariant Sections in the Modified Version's license notice. These
    +titles must be distinct from any other section titles.
    +
    +You may add a section Entitled "Endorsements", provided it contains
    +nothing but endorsements of your Modified Version by various parties, for
    +example, statements of peer review or that the text has been approved
    +by an organization as the authoritative definition of a standard.
    +
    +You may add a passage of up to five words as a Front-Cover Text, and a
    +passage of up to 25 words as a Back-Cover Text, to the end of the list
    +of Cover Texts in the Modified Version. Only one passage of Front-Cover
    +Text and one of Back-Cover Text may be added by (or through arrangements
    +made by) any one entity. If the Document already includes a cover text
    +for the same cover, previously added by you or by arrangement made by
    +the same entity you are acting on behalf of, you may not add another;
    +but you may replace the old one, on explicit permission from the previous
    +publisher that added the old one.
    +
    +The author(s) and publisher(s) of the Document do not by this License
    +give permission to use their names for publicity for or to assert or
    +imply endorsement of any Modified Version.
    +
    +5. COMBINING DOCUMENTS
    +
    +You may combine the Document with other documents released under this
    +License, under the terms defined in section 4 above for modified versions,
    +provided that you include in the combination all of the Invariant
    +Sections of all of the original documents, unmodified, and list them
    +all as Invariant Sections of your combined work in its license notice,
    +and that you preserve all their Warranty Disclaimers.
    +
    +The combined work need only contain one copy of this License, and multiple
    +identical Invariant Sections may be replaced with a single copy. If there
    +are multiple Invariant Sections with the same name but different contents,
    +make the title of each such section unique by adding at the end of it,
    +in parentheses, the name of the original author or publisher of that
    +section if known, or else a unique number. Make the same adjustment
    +to the section titles in the list of Invariant Sections in the license
    +notice of the combined work.
    +
    +In the combination, you must combine any sections Entitled "History" in
    +the various original documents, forming one section Entitled "History";
    +likewise combine any sections Entitled "Acknowledgements", and any
    +sections Entitled "Dedications". You must delete all sections Entitled
    +"Endorsements".
    +
    +6. COLLECTIONS OF DOCUMENTS
    +
    +You may make a collection consisting of the Document and other documents
    +released under this License, and replace the individual copies of this
    +License in the various documents with a single copy that is included in
    +the collection, provided that you follow the rules of this License for
    +verbatim copying of each of the documents in all other respects.
    +
    +You may extract a single document from such a collection, and distribute
    +it individually under this License, provided you insert a copy of this
    +License into the extracted document, and follow this License in all
    +other respects regarding verbatim copying of that document.
    +
    +7. AGGREGATION WITH INDEPENDENT WORKS
    +
    +A compilation of the Document or its derivatives with other separate
    +and independent documents or works, in or on a volume of a storage
    +or distribution medium, is called an "aggregate" if the copyright
    +resulting from the compilation is not used to limit the legal rights of
    +the compilation's users beyond what the individual works permit. When
    +the Document is included in an aggregate, this License does not apply
    +to the other works in the aggregate which are not themselves derivative
    +works of the Document.
    +
    +If the Cover Text requirement of section 3 is applicable to these copies
    +of the Document, then if the Document is less than one half of the
    +entire aggregate, the Document's Cover Texts may be placed on covers that
    +bracket the Document within the aggregate, or the electronic equivalent
    +of covers if the Document is in electronic form. Otherwise they must
    +appear on printed covers that bracket the whole aggregate.
    +
    +8. TRANSLATION
    +
    +Translation is considered a kind of modification, so you may distribute
    +translations of the Document under the terms of section 4. Replacing
    +Invariant Sections with translations requires special permission from
    +their copyright holders, but you may include translations of some or all
    +Invariant Sections in addition to the original versions of these Invariant
    +Sections. You may include a translation of this License, and all the
    +license notices in the Document, and any Warranty Disclaimers, provided
    +that you also include the original English version of this License and
    +the original versions of those notices and disclaimers. In case of a
    +disagreement between the translation and the original version of this
    +License or a notice or disclaimer, the original version will prevail.
    +
    +If a section in the Document is Entitled "Acknowledgements",
    +"Dedications", or "History", the requirement (section 4) to Preserve
    +its Title (section 1) will typically require changing the actual title.
    +
    +9. TERMINATION
    +
    +You may not copy, modify, sublicense, or distribute the Document except
    +as expressly provided under this License. Any attempt otherwise to copy,
    +modify, sublicense, or distribute it is void, and will automatically
    +terminate your rights under this License.
    +
    +However, if you cease all violation of this License, then your license
    +from a particular copyright holder is reinstated (a) provisionally,
    +unless and until the copyright holder explicitly and finally terminates
    +your license, and (b) permanently, if the copyright holder fails to
    +notify you of the violation by some reasonable means prior to 60 days
    +after the cessation.
    +
    +Moreover, your license from a particular copyright holder is reinstated
    +permanently if the copyright holder notifies you of the violation by
    +some reasonable means, this is the first time you have received notice of
    +violation of this License (for any work) from that copyright holder, and
    +you cure the violation prior to 30 days after your receipt of the notice.
    +
    +Termination of your rights under this section does not terminate the
    +licenses of parties who have received copies or rights from you under
    +this License. If your rights have been terminated and not permanently
    +reinstated, receipt of a copy of some or all of the same material does
    +not give you any rights to use it.
    +
    +10. FUTURE REVISIONS OF THIS LICENSE
    +
    +The Free Software Foundation may publish new, revised versions of the
    +GNU Free Documentation License from time to time. Such new versions will
    +be similar in spirit to the present version, but may differ in detail
    +to address new problems or concerns. See http://www.gnu.org/copyleft/.
    +
    +Each version of the License is given a distinguishing version number. If
    +the Document specifies that a particular numbered version of this License
    +"or any later version" applies to it, you have the option of following
    +the terms and conditions either of that specified version or of any later
    +version that has been published (not as a draft) by the Free Software
    +Foundation. If the Document does not specify a version number of this
    +License, you may choose any version ever published (not as a draft) by
    +the Free Software Foundation. If the Document specifies that a proxy can
    +decide which future versions of this License can be used, that proxy's
    +public statement of acceptance of a version permanently authorizes you
    +to choose that version for the Document.
    +
    +11. RELICENSING
    +
    +"Massive Multiauthor Collaboration Site" (or "MMC Site") means any
    +World Wide Web server that publishes copyrightable works and also
    +provides prominent facilities for anybody to edit those works. A public
    +wiki that anybody can edit is an example of such a server. A "Massive
    +Multiauthor Collaboration" (or "MMC") contained in the site means any
    +set of copyrightable works thus published on the MMC site.
    +
    +"CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 license
    +published by Creative Commons Corporation, a not-for-profit corporation
    +with a principal place of business in San Francisco, California, as
    +well as future copyleft versions of that license published by that same
    +organization.
    +
    +"Incorporate" means to publish or republish a Document, in whole or in
    +part, as part of another Document.
    +
    +An MMC is "eligible for relicensing" if it is licensed under this License,
    +and if all works that were first published under this License somewhere
    +other than this MMC, and subsequently incorporated in whole or in part
    +into the MMC, (1) had no cover texts or invariant sections, and (2)
    +were thus incorporated prior to November 1, 2008.
    +
    +The operator of an MMC Site may republish an MMC contained in the site
    +under CC-BY-SA on the same site at any time before August 1, 2009,
    +provided the MMC is eligible for relicensing.
    +
    +ADDENDUM: How to use this License for your documents
    +
    +To use this License in a document you have written, include a copy of
    +the License in the document and put the following copyright and license
    +notices just after the title page:
    +
    +    Copyright (C)  YEAR  YOUR NAME.
    +    Permission is granted to copy, distribute and/or modify this document
    +    under the terms of the GNU Free Documentation License, Version 1.3
    +    or any later version published by the Free Software Foundation;
    +    with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
    +    A copy of the license is included in the section entitled "GNU
    +    Free Documentation License".
    +
    +If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
    +replace the "with ... Texts." line with this:
    +
    +    with the Invariant Sections being LIST THEIR TITLES, with the
    +    Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
    +
    +If you have Invariant Sections without Cover Texts, or some other
    +combination of the three, merge those two alternatives to suit the
    +situation.
    +
    +If your document contains nontrivial examples of program code, we
    +recommend releasing these examples in parallel under your choice of
    +free software license, such as the GNU General Public License, to permit
    +their use in free software.
    +
    +
    +
    +--------------- SECTION 12: Artistic License, V1.0 -----------
    +
    +
    +The Artistic License
    +
    +Preamble
    +
    +The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications.
    +
    +Definitions:
    +
    +"Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification.
    +
    +"Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder.
    +
    +"Copyright Holder" is whoever is named in the copyright or copyrights for the package.
    +
    +"You" is you, if you're thinking about copying or distributing this Package.
    +
    +"Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.)
    +
    +"Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it.
    +
    +1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers.
    +
    +2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version.
    +
    +3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following:
    +
    +a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as ftp.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package.
    +
    +b) use the modified Package only within your corporation or organization.
    +
    +c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version.
    +
    +d) make other distribution arrangements with the Copyright Holder.
    +
    +4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following:
    +
    +a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version.
    +
    +b) accompany the distribution with the machine-readable source of the Package with your modifications.
    +
    +c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version.
    +
    +d) make other distribution arrangements with the Copyright Holder.
    +
    +5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own.
    +
    +6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package.
    +
    +7. C or perl subroutines supplied by you and linked into this Package shall not be considered part of this Package.
    +
    +8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission.
    +
    +9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
    +
    +The End
    +
    +
    +
    +--------------- SECTION 13: Artistic License, V2.0 -----------
    +
    +
    +Artistic License 2.0
    +
    +Copyright (c) 2000-2006, The Perl Foundation.
    +
    +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
    +
    +Preamble
    +This license establishes the terms under which a given free software Package may be copied, modified, distributed, and/or redistributed. The intent is that the Copyright Holder maintains some artistic control over the development of that Package while still keeping the Package available as open source and free software.
    +
    +You are always permitted to make arrangements wholly outside of this license directly with the Copyright Holder of a given Package. If the terms of this license do not permit the full use that you propose to make of the Package, you should contact the Copyright Holder and seek a different licensing arrangement.
    +
    +Definitions
    +
    +"Copyright Holder" means the individual(s) or organization(s) named in the copyright notice for the entire Package.
    +
    +"Contributor" means any party that has contributed code or other material to the Package, in accordance with the Copyright Holder's procedures.
    +
    +"You" and "your" means any person who would like to copy, distribute, or modify the Package.
    +
    +"Package" means the collection of files distributed by the Copyright Holder, and derivatives of that collection and/or of those files. A given Package may consist of either the Standard Version, or a Modified Version.
    +
    +"Distribute" means providing a copy of the Package or making it accessible to anyone else, or in the case of a company or organization, to others outside of your company or organization.
    +
    +"Distributor Fee" means any fee that you charge for Distributing this Package or providing support for this Package to another party. It does not mean licensing fees.
    +
    +"Standard Version" refers to the Package if it has not been modified, or has been modified only in ways explicitly requested by the Copyright Holder.
    +
    +"Modified Version" means the Package, if it has been changed, and such changes were not explicitly requested by the Copyright Holder.
    +
    +"Original License" means this Artistic License as Distributed with the Standard Version of the Package, in its current version or as it may be modified by The Perl Foundation in the future.
    +
    +"Source" form means the source code, documentation source, and configuration files for the Package.
    +
    +"Compiled" form means the compiled bytecode, object code, binary, or any other form resulting from mechanical transformation or translation of the Source form.
    +Permission for Use and Modification Without Distribution
    +
    +(1) You are permitted to use the Standard Version and create and use Modified Versions for any purpose without restriction, provided that you do not Distribute the Modified Version.
    +
    +Permissions for Redistribution of the Standard Version
    +
    +(2) You may Distribute verbatim copies of the Source form of the Standard Version of this Package in any medium without restriction, either gratis or for a Distributor Fee, provided that you duplicate all of the original copyright notices and associated disclaimers. At your discretion, such verbatim copies may or may not include a Compiled form of the Package.
    +
    +(3) You may apply any bug fixes, portability changes, and other modifications made available from the Copyright Holder. The resulting Package will still be considered the Standard Version, and as such will be subject to the Original License.
    +
    +Distribution of Modified Versions of the Package as Source
    +
    +(4) You may Distribute your Modified Version as Source (either gratis or for a Distributor Fee, and with or without a Compiled form of the Modified Version) provided that you clearly document how it differs from the Standard Version, including, but not limited to, documenting any non-standard features, executables, or modules, and provided that you do at least ONE of 
    +the following:
    +
    +(a) make the Modified Version available to the Copyright Holder of the Standard Version, under the Original License, so that the Copyright Holder may include your modifications in the Standard Version. 
    +
    +(b) ensure that installation of your Modified Version does not prevent the user installing or running the Standard Version. In addition, the Modified Version must bear a name that is different from the name of the Standard Version. 
    +
    +(c) allow anyone who receives a copy of the Modified Version to make the Source form of the Modified Version available to others under 
    +
    +(i) the Original License or 
    +(ii) a license that permits the licensee to freely copy, modify and redistribute the Modified Version using the same licensing terms that apply to the copy that the licensee received, and requires that the Source form of the Modified Version, and of any works derived from it, be made freely available in that license fees are prohibited but Distributor Fees are allowed.
    +
    +Distribution of Compiled Forms of the Standard Version or Modified Versions 
    +without the Source
    +
    +(5) You may Distribute Compiled forms of the Standard Version without the Source, provided that you include complete instructions on how to get the Source of the Standard Version. Such instructions must be valid at the time of your distribution. If these instructions, at any time while you are carrying out such distribution, become invalid, you must provide new instructions on demand or cease further distribution. If you provide valid instructions or cease distribution within thirty days after you become aware that the instructions are invalid, then you do not forfeit any of your rights under this license.
    +
    +(6) You may Distribute a Modified Version in Compiled form without the Source, provided that you comply with Section 4 with respect to the Source of the Modified Version.
    +
    +Aggregating or Linking the Package
    +
    +(7) You may aggregate the Package (either the Standard Version or Modified Version) with other packages and Distribute the resulting aggregation provided that you do not charge a licensing fee for the Package. Distributor Fees are permitted, and licensing fees for other components in the aggregation are permitted. The terms of this license apply to the use and Distribution of the Standard or Modified Versions as included in the aggregation.
    +
    +(8) You are permitted to link Modified and Standard Versions with other works, to embed the Package in a larger work of your own, or to build stand-alone binary or bytecode versions of applications that include the Package, and Distribute the result without restriction, provided the result does not expose a direct interface to the Package.
    +
    +Items That are Not Considered Part of a Modified Version
    +
    +(9) Works (including, but not limited to, modules and scripts) that merely extend or make use of the Package, do not, by themselves, cause the Package to be a Modified Version. In addition, such works are not considered parts of the Package itself, and are not subject to the terms of this license.
    +
    +General Provisions
    +
    +(10) Any use, modification, and distribution of the Standard or Modified Versions is governed by this Artistic License. By using, modifying or distributing the Package, you accept this license. Do not use, modify, or distribute the Package, if you do not accept this license.
    +
    +(11) If your Modified Version has been derived from a Modified Version made by someone other than you, you are nevertheless required to ensure that your Modified Version complies with the requirements of this license.
    +
    +(12) This license does not grant you the right to use any trademark, service mark, tradename, or logo of the Copyright Holder.
    +
    +(13) This license includes the non-exclusive, worldwide, free-of-charge patent license to make, have made, use, offer to sell, sell, import and otherwise transfer the Package with respect to any patent claims licensable by the Copyright Holder that are necessarily infringed by the Package. 
    +
    +If you institute patent litigation (including a cross-claim or counterclaim) against any party alleging that the Package constitutes direct or contributory patent infringement, then this Artistic License to you shall terminate on the date that such litigation is filed.
    +
    +(14) Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER 
    +AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED 
    +WARRANTIES. THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 
    +PARTICULAR PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT 
    +PERMITTED BY YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT 
    +HOLDER OR CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, 
    +INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE 
    +USE OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    +
    +
    +
    +--------------- SECTION 14: Microsoft Permissive Public License -----------
    +
    +
    +Microsoft Public License (Ms-PL)
    +
    +This license governs use of the accompanying software. If you use the
    +software, you accept this license. If you do not accept the license,
    +do not use the software.
    +
    +1. Definitions
    +
    +The terms "reproduce," "reproduction," "derivative works," and
    +"distribution" have the same meaning here as under U.S. copyright law.
    +
    +A "contribution" is the original software, or any additions or changes
    +to the software.
    +
    +A "contributor" is any person that distributes its contribution under
    +this license.
    +
    +"Licensed patents" are a contributor's patent claims that read directly
    +on its contribution.
    +
    +2. Grant of Rights
    +
    +(A) Copyright Grant- Subject to the terms of this license, including
    +the license conditions and limitations in section 3, each contributor
    +grants you a non-exclusive, worldwide, royalty-free copyright license to
    +reproduce its contribution, prepare derivative works of its contribution,
    +and distribute its contribution or any derivative works that you create.
    +
    +(B) Patent Grant- Subject to the terms of this license, including the
    +license conditions and limitations in section 3, each contributor grants
    +you a non-exclusive, worldwide, royalty-free license under its licensed
    +patents to make, have made, use, sell, offer for sale, import, and/or
    +otherwise dispose of its contribution in the software or derivative
    +works of the contribution in the software.
    +
    +3. Conditions and Limitations
    +
    +(A) No Trademark License- This license does not grant you rights to use
    +any contributors' name, logo, or trademarks.
    +
    +(B) If you bring a patent claim against any contributor over patents
    +that you claim are infringed by the software, your patent license from
    +such contributor to the software ends automatically.
    +
    +(C) If you distribute any portion of the software, you must retain all
    +copyright, patent, trademark, and attribution notices that are present
    +in the software.
    +
    +(D) If you distribute any portion of the software in source code form,
    +you may do so only under this license by including a complete copy of
    +this license with your distribution. If you distribute any portion of
    +the software in compiled or object code form, you may only do so under
    +a license that complies with this license.
    +
    +(E) The software is licensed "as-is." You bear the risk of using it. The
    +contributors give no express warranties, guarantees or conditions. You
    +may have additional consumer rights under your local laws which this
    +license cannot change. To the extent permitted under your local laws,
    +the contributors exclude the implied warranties of merchantability,
    +fitness for a particular purpose and non-infringement.
    +
    +
    +
    +--------------- SECTION 15: Microsoft Limited Public License -----------
    +
    +
    +Microsoft Limited Public License (Ms-LPL)
    +Published: October 12, 2006
    +
    +This license governs use of the accompanying software. If you use the
    +software, you accept this license. If you do not accept the license,
    +do not use the software.
    +
    +1. Definitions
    +
    +The terms "reproduce," "reproduction," "derivative works," and
    +"distribution" have the same meaning here as under U.S. copyright law.
    +
    +A "contribution" is the original software, or any additions or changes
    +to the software.
    +
    +A "contributor" is any person that distributes its contribution under
    +this license.
    +
    +"Licensed patents" are a contributor's patent claims that read directly
    +on its contribution.
    +
    +Top of pageTop of page
    +2. Grant of Rights
    +
    +(A) Copyright Grant- Subject to the terms of this license, including
    +the license conditions and limitations in section 3, each contributor
    +grants you a non-exclusive, worldwide, royalty-free copyright license to
    +reproduce its contribution, prepare derivative works of its contribution,
    +and distribute its contribution or any derivative works that you create.
    +
    +(B) Patent Grant- Subject to the terms of this license, including the
    +license conditions and limitations in section 3, each contributor grants
    +you a non-exclusive, worldwide, royalty-free license under its licensed
    +patents to make, have made, use, sell, offer for sale, import, and/or
    +otherwise dispose of its contribution in the software or derivative
    +works of the contribution in the software.  Top of pageTop of page
    +
    +3. Conditions and Limitations
    +
    +(A) No Trademark License- This license does not grant you rights to use
    +any contributors' name, logo, or trademarks.
    +
    +(B) If you bring a patent claim against any contributor over patents
    +that you claim are infringed by the software, your patent license from
    +such contributor to the software ends automatically.
    +
    +(C) If you distribute any portion of the software, you must retain all
    +copyright, patent, trademark, and attribution notices that are present
    +in the software.
    +
    +(D) If you distribute any portion of the software in source code form,
    +you may do so only under this license by including a complete copy of
    +this license with your distribution. If you distribute any portion of
    +the software in compiled or object code form, you may only do so under
    +a license that complies with this license.
    +
    +(E) The software is licensed "as-is." You bear the risk of using it. The
    +contributors give no express warranties, guarantees or conditions. You
    +may have additional consumer rights under your local laws which this
    +license cannot change. To the extent permitted under your local laws,
    +the contributors exclude the implied warranties of merchantability,
    +fitness for a particular purpose and non-infringement.
    +
    +(F) Platform Limitation- The licenses granted in sections 2(A) & 2(B)
    +extend only to the software or derivative works that you create that
    +run on a Microsoft Windows operating system product.
    +
    +
    +
    +--------------- SECTION 16: Creative Commons Attribution License, V3.0 -----------
    +
    +
    +Creative Commons Attribution 3.0 Unported
    +
    +CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL
    +SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT
    +RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS"
    +BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION
    +PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE.
    +
    +License
    +
    +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE
    +COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY
    +COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN
    +AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
    +
    +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE
    +TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE
    +MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS
    +CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND
    +CONDITIONS.
    +
    +1. Definitions
    +
    +   a. "Adaptation" means a work based upon the Work, or upon the Work
    +   and other pre-existing works, such as a translation, adaptation,
    +   derivative work, arrangement of music or other alterations of a
    +   literary or artistic work, or phonogram or performance and includes
    +   cinematographic adaptations or any other form in which the Work may
    +   be recast, transformed, or adapted including in any form recognizably
    +   derived from the original, except that a work that constitutes a
    +   Collection will not be considered an Adaptation for the purpose of
    +   this License. For the avoidance of doubt, where the Work is a musical
    +   work, performance or phonogram, the synchronization of the Work in
    +   timed-relation with a moving image ("synching") will be considered
    +   an Adaptation for the purpose of this License.
    +
    +   b. "Collection" means a collection of literary or artistic works,
    +   such as encyclopedias and anthologies, or performances, phonograms or
    +   broadcasts, or other works or subject matter other than works listed in
    +   Section 1(f) below, which, by reason of the selection and arrangement
    +   of their contents, constitute intellectual creations, in which the
    +   Work is included in its entirety in unmodified form along with one or
    +   more other contributions, each constituting separate and independent
    +   works in themselves, which together are assembled into a collective
    +   whole. A work that constitutes a Collection will not be considered
    +   an Adaptation (as defined above) for the purposes of this License.
    +
    +   c. "Distribute" means to make available to the public the original
    +   and copies of the Work or Adaptation, as appropriate, through sale
    +   or other transfer of ownership.
    +
    +   d. "Licensor" means the individual, individuals, entity or entities
    +   that offer(s) the Work under the terms of this License.
    +
    +   e. "Original Author" means, in the case of a literary or artistic
    +   work, the individual, individuals, entity or entities who created the
    +   Work or if no individual or entity can be identified, the publisher;
    +   and in addition (i) in the case of a performance the actors, singers,
    +   musicians, dancers, and other persons who act, sing, deliver, declaim,
    +   play in, interpret or otherwise perform literary or artistic works or
    +   expressions of folklore; (ii) in the case of a phonogram the producer
    +   being the person or legal entity who first fixes the sounds of a
    +   performance or other sounds; and, (iii) in the case of broadcasts,
    +   the organization that transmits the broadcast.
    +
    +   f. "Work" means the literary and/or artistic work offered under the
    +   terms of this License including without limitation any production
    +   in the literary, scientific and artistic domain, whatever may be
    +   the mode or form of its expression including digital form, such
    +   as a book, pamphlet and other writing; a lecture, address, sermon
    +   or other work of the same nature; a dramatic or dramatico-musical
    +   work; a choreographic work or entertainment in dumb show; a musical
    +   composition with or without words; a cinematographic work to which are
    +   assimilated works expressed by a process analogous to cinematography;
    +   a work of drawing, painting, architecture, sculpture, engraving
    +   or lithography; a photographic work to which are assimilated works
    +   expressed by a process analogous to photography; a work of applied art;
    +   an illustration, map, plan, sketch or three-dimensional work relative
    +   to geography, topography, architecture or science; a performance;
    +   a broadcast; a phonogram; a compilation of data to the extent it is
    +   protected as a copyrightable work; or a work performed by a variety
    +   or circus performer to the extent it is not otherwise considered a
    +   literary or artistic work.
    +
    +   g. "You" means an individual or entity exercising rights under this
    +   License who has not previously violated the terms of this License
    +   with respect to the Work, or who has received express permission
    +   from the Licensor to exercise rights under this License despite a
    +   previous violation.
    +
    +   h. "Publicly Perform" means to perform public recitations of the
    +   Work and to communicate to the public those public recitations, by
    +   any means or process, including by wire or wireless means or public
    +   digital performances; to make available to the public Works in such
    +   a way that members of the public may access these Works from a place
    +   and at a place individually chosen by them; to perform the Work to the
    +   public by any means or process and the communication to the public of
    +   the performances of the Work, including by public digital performance;
    +   to broadcast and rebroadcast the Work by any means including signs,
    +   sounds or images.
    +
    +   i. "Reproduce" means to make copies of the Work by any means including
    +   without limitation by sound or visual recordings and the right of
    +   fixation and reproducing fixations of the Work, including storage
    +   of a protected performance or phonogram in digital form or other
    +   electronic medium.
    +
    +2. Fair Dealing Rights. Nothing in this License is intended to reduce,
    +limit, or restrict any uses free from copyright or rights arising from
    +limitations or exceptions that are provided for in connection with the
    +copyright protection under copyright law or other applicable laws.
    +
    +3. License Grant. Subject to the terms and conditions of this License,
    +Licensor hereby grants You a worldwide, royalty-free, non-exclusive,
    +perpetual (for the duration of the applicable copyright) license to
    +exercise the rights in the Work as stated below:
    +
    +   a. to Reproduce the Work, to incorporate the Work into one or
    +   more Collections, and to Reproduce the Work as incorporated in the
    +   Collections;
    +
    +   b. to create and Reproduce Adaptations provided that any such
    +   Adaptation, including any translation in any medium, takes reasonable
    +   steps to clearly label, demarcate or otherwise identify that changes
    +   were made to the original Work. For example, a translation could be
    +   marked "The original work was translated from English to Spanish," or
    +   a modification could indicate "The original work has been modified.";
    +
    +   c. to Distribute and Publicly Perform the Work including as
    +   incorporated in Collections; and,
    +
    +   d. to Distribute and Publicly Perform Adaptations.
    +
    +   e. For the avoidance of doubt:
    +
    +      i. Non-waivable Compulsory License Schemes. In those jurisdictions
    +      in which the right to collect royalties through any statutory or
    +      compulsory licensing scheme cannot be waived, the Licensor reserves
    +      the exclusive right to collect such royalties for any exercise by
    +      You of the rights granted under this License;
    +
    +      ii. Waivable Compulsory License Schemes. In those jurisdictions
    +      in which the right to collect royalties through any statutory or
    +      compulsory licensing scheme can be waived, the Licensor waives the
    +      exclusive right to collect such royalties for any exercise by You
    +      of the rights granted under this License; and,
    +
    +      iii. Voluntary License Schemes. The Licensor waives the right
    +      to collect royalties, whether individually or, in the event that
    +      the Licensor is a member of a collecting society that administers
    +      voluntary licensing schemes, via that society, from any exercise
    +      by You of the rights granted under this License.  The above rights
    +      may be exercised in all media and formats whether now known or
    +      hereafter devised. The above rights include the right to make such
    +      modifications as are technically necessary to exercise the rights
    +      in other media and formats. Subject to Section 8(f), all rights
    +      not expressly granted by Licensor are hereby reserved.
    +
    +4. Restrictions. The license granted in Section 3 above is expressly
    +made subject to and limited by the following restrictions:
    +
    +   a. You may Distribute or Publicly Perform the Work only under the
    +   terms of this License.  You must include a copy of, or the Uniform
    +   Resource Identifier (URI) for, this License with every copy of the
    +   Work You Distribute or Publicly Perform. You may not offer or impose
    +   any terms on the Work that restrict the terms of this License or the
    +   ability of the recipient of the Work to exercise the rights granted to
    +   that recipient under the terms of the License. You may not sublicense
    +   the Work. You must keep intact all notices that refer to this License
    +   and to the disclaimer of warranties with every copy of the Work You
    +   Distribute or Publicly Perform. When You Distribute or Publicly Perform
    +   the Work, You may not impose any effective technological measures on
    +   the Work that restrict the ability of a recipient of the Work from
    +   You to exercise the rights granted to that recipient under the terms
    +   of the License. This Section 4(a) applies to the Work as incorporated
    +   in a Collection, but this does not require the Collection apart from
    +   the Work itself to be made subject to the terms of this License. If
    +   You create a Collection, upon notice from any Licensor You must,
    +   to the extent practicable, remove from the Collection any credit as
    +   required by Section 4(b), as requested. If You create an Adaptation,
    +   upon notice from any Licensor You must, to the extent practicable,
    +   remove from the Adaptation any credit as required by Section 4(b),
    +   as requested.
    +
    +   b. If You Distribute, or Publicly Perform the Work or any Adaptations
    +   or Collections, You must, unless a request has been made pursuant
    +   to Section 4(a), keep intact all copyright notices for the Work and
    +   provide, reasonable to the medium or means You are utilizing: (i) the
    +   name of the Original Author (or pseudonym, if applicable) if supplied,
    +   and/or if the Original Author and/or Licensor designate another party
    +   or parties (e.g., a sponsor institute, publishing entity, journal)
    +   for attribution ("Attribution Parties") in Licensor's copyright
    +   notice, terms of service or by other reasonable means, the name of
    +   such party or parties; (ii) the title of the Work if supplied; (iii)
    +   to the extent reasonably practicable, the URI, if any, that Licensor
    +   specifies to be associated with the Work, unless such URI does not
    +   refer to the copyright notice or licensing information for the Work;
    +   and (iv) , consistent with Section 3(b), in the case of an Adaptation,
    +   a credit identifying the use of the Work in the Adaptation (e.g.,
    +   "French translation of the Work by Original Author," or "Screenplay
    +   based on original Work by Original Author"). The credit required
    +   by this Section 4 (b) may be implemented in any reasonable manner;
    +   provided, however, that in the case of a Adaptation or Collection, at
    +   a minimum such credit will appear, if a credit for all contributing
    +   authors of the Adaptation or Collection appears, then as part of
    +   these credits and in a manner at least as prominent as the credits
    +   for the other contributing authors. For the avoidance of doubt, You
    +   may only use the credit required by this Section for the purpose of
    +   attribution in the manner set out above and, by exercising Your rights
    +   under this License, You may not implicitly or explicitly assert or
    +   imply any connection with, sponsorship or endorsement by the Original
    +   Author, Licensor and/or Attribution Parties, as appropriate, of You
    +   or Your use of the Work, without the separate, express prior written
    +   permission of the Original Author, Licensor and/or Attribution Parties.
    +
    +   c. Except as otherwise agreed in writing by the Licensor or as may be
    +   otherwise permitted by applicable law, if You Reproduce, Distribute
    +   or Publicly Perform the Work either by itself or as part of any
    +   Adaptations or Collections, You must not distort, mutilate, modify
    +   or take other derogatory action in relation to the Work which would
    +   be prejudicial to the Original Author's honor or reputation. Licensor
    +   agrees that in those jurisdictions (e.g. Japan), in which any exercise
    +   of the right granted in Section 3(b) of this License (the right to
    +   make Adaptations) would be deemed to be a distortion, mutilation,
    +   modification or other derogatory action prejudicial to the Original
    +   Author's honor and reputation, the Licensor will waive or not assert,
    +   as appropriate, this Section, to the fullest extent permitted by the
    +   applicable national law, to enable You to reasonably exercise Your
    +   right under Section 3(b) of this License (right to make Adaptations)
    +   but not otherwise.
    +
    +5. Representations, Warranties and Disclaimer
    +UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR
    +OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY
    +KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE,
    +INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY,
    +FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF
    +LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS,
    +WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION
    +OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.
    +
    +6. Limitation on Liability.
    +EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR
    +BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL,
    +CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS
    +LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF
    +THE POSSIBILITY OF SUCH DAMAGES.
    +
    +7. Termination
    +
    +   a. This License and the rights granted hereunder will terminate
    +   automatically upon any breach by You of the terms of this
    +   License. Individuals or entities who have received Adaptations or
    +   Collections from You under this License, however, will not have their
    +   licenses terminated provided such individuals or entities remain in
    +   full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8
    +   will survive any termination of this License.
    +
    +   b. Subject to the above terms and conditions, the license granted
    +   here is perpetual (for the duration of the applicable copyright in
    +   the Work). Notwithstanding the above, Licensor reserves the right to
    +   release the Work under different license terms or to stop distributing
    +   the Work at any time; provided, however that any such election will not
    +   serve to withdraw this License (or any other license that has been,
    +   or is required to be, granted under the terms of this License), and
    +   this License will continue in full force and effect unless terminated
    +   as stated above.
    +
    +8. Miscellaneous
    +
    +   a. Each time You Distribute or Publicly Perform the Work or a
    +   Collection, the Licensor offers to the recipient a license to the
    +   Work on the same terms and conditions as the license granted to You
    +   under this License.
    +
    +   b. Each time You Distribute or Publicly Perform an Adaptation, Licensor
    +   offers to the recipient a license to the original Work on the same
    +   terms and conditions as the license granted to You under this License.
    +
    +   c. If any provision of this License is invalid or unenforceable under
    +   applicable law, it shall not affect the validity or enforceability
    +   of the remainder of the terms of this License, and without further
    +   action by the parties to this agreement, such provision shall be
    +   reformed to the minimum extent necessary to make such provision valid
    +   and enforceable.
    +
    +   d. No term or provision of this License shall be deemed waived and no
    +   breach consented to unless such waiver or consent shall be in writing
    +   and signed by the party to be charged with such waiver or consent.
    +
    +   e. This License constitutes the entire agreement between the parties
    +   with respect to the Work licensed here. There are no understandings,
    +   agreements or representations with respect to the Work not specified
    +   here. Licensor shall not be bound by any additional provisions that
    +   may appear in any communication from You. This License may not be
    +   modified without the mutual written agreement of the Licensor and You.
    +
    +   f. The rights granted under, and the subject matter referenced, in this
    +   License were drafted utilizing the terminology of the Berne Convention
    +   for the Protection of Literary and Artistic Works (as amended on
    +   September 28, 1979), the Rome Convention of 1961, the WIPO Copyright
    +   Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and
    +   the Universal Copyright Convention (as revised on July 24, 1971). These
    +   rights and subject matter take effect in the relevant jurisdiction
    +   in which the License terms are sought to be enforced according to
    +   the corresponding provisions of the implementation of those treaty
    +   provisions in the applicable national law. If the standard suite of
    +   rights granted under applicable copyright law includes additional
    +   rights not granted under this License, such additional rights are
    +   deemed to be included in the License; this License is not intended
    +   to restrict the license of any rights under applicable law.
    +
    +
    +
    +--------------- SECTION 17: Creative Commons Attribution 4.0 International -----------
    +
    +
    +Creative Commons Corporation (“Creative Commons”) is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an “as-is” basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible.
    +
    +Using Creative Commons Public Licenses
    +
    +Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses.
    +
    +Considerations for licensors: Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC-licensed material, or material used under an exception or limitation to copyright. More considerations for licensors.
    +
    +Considerations for the public: By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor’s permission is not necessary for any reason–for example, because of any applicable exception or limitation to copyright–then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. More considerations for the public.
    +
    +Creative Commons Attribution 4.0 International Public License
    +
    +By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.
    +
    +Section 1 – Definitions.
    +
    +Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image.
    +Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License.
    +Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
    +Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements.
    +Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material.
    +Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License.
    +Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license.
    +Licensor means the individual(s) or entity(ies) granting rights under this Public License.
    +Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them.
    +Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world.
    +You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning.
    +
    +Section 2 – Scope.
    +
    +License grant.
    +Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to:
    +reproduce and Share the Licensed Material, in whole or in part; and
    +produce, reproduce, and Share Adapted Material.
    +Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions.
    +Term. The term of this Public License is specified in Section 6(a).
    +Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material.
    +Downstream recipients.
    +Offer from the Licensor – Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License.
    +No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material.
    +No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i).
    +
    +Other rights.
    +Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise.
    +Patent and trademark rights are not licensed under this Public License.
    +To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties.
    +
    +Section 3 – License Conditions.
    +
    +Your exercise of the Licensed Rights is expressly made subject to the following conditions.
    +
    +Attribution.
    +
    +If You Share the Licensed Material (including in modified form), You must:
    +retain the following if it is supplied by the Licensor with the Licensed Material:
    +identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated);
    +a copyright notice;
    +a notice that refers to this Public License;
    +a notice that refers to the disclaimer of warranties;
    +a URI or hyperlink to the Licensed Material to the extent reasonably practicable;
    +indicate if You modified the Licensed Material and retain an indication of any previous modifications; and
    +indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License.
    +You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information.
    +If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable.
    +If You Share Adapted Material You produce, the Adapter's License You apply must not prevent recipients of the Adapted Material from complying with this Public License.
    +
    +Section 4 – Sui Generis Database Rights.
    +
    +Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:
    +
    +for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database;
    +if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material; and
    +You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database.
    +
    +For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights.
    +
    +Section 5 – Disclaimer of Warranties and Limitation of Liability.
    +
    +Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.
    +To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.
    +
    +The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.
    +
    +Section 6 – Term and Termination.
    +
    +This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically.
    +
    +Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:
    +automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or
    +upon express reinstatement by the Licensor.
    +For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License.
    +For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License.
    +Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
    +
    +Section 7 – Other Terms and Conditions.
    +
    +The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed.
    +Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License.
    +
    +Section 8 – Interpretation.
    +
    +For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License.
    +To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions.
    +No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor.
    +Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority.
    +
    +Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark “Creative Commons” or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses.
    +
    +Creative Commons may be contacted at creativecommons.org.
    +
    +
    +
    +--------------- SECTION 18: Creative Commons Attribution-ShareAlike, V4.0 -----------
    +
    +
    +Creative Commons Attribution-ShareAlike 4.0 International Public License
    +
    +Creative Commons Corporation (“Creative Commons”) is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an “as-is” basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible.
    +
    +Using Creative Commons Public Licenses
    +
    +Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses.
    +
    +    Considerations for licensors: Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC-licensed material, or material used under an exception or limitation to copyright. More considerations for licensors.
    +
    +    Considerations for the public: By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor’s permission is not necessary for any reason–for example, because of any applicable exception or limitation to copyright–then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. More considerations for the public.
    +
    +Creative Commons Attribution-ShareAlike 4.0 International Public License
    +
    +By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.
    +
    +Section 1 – Definitions.
    +
    +    Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image.
    +    Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License.
    +    BY-SA Compatible License means a license listed at creativecommons.org/compatiblelicenses, approved by Creative Commons as essentially the equivalent of this Public License.
    +    Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
    +    Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements.
    +    Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material.
    +    License Elements means the license attributes listed in the name of a Creative Commons Public License. The License Elements of this Public License are Attribution and ShareAlike.
    +    Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License.
    +    Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license.
    +    Licensor means the individual(s) or entity(ies) granting rights under this Public License.
    +    Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them.
    +    Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world.
    +    You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning.
    +
    +Section 2 – Scope.
    +
    +    License grant.
    +        Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to:
    +            reproduce and Share the Licensed Material, in whole or in part; and
    +            produce, reproduce, and Share Adapted Material.
    +        Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions.
    +        Term. The term of this Public License is specified in Section 6(a).
    +        Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material.
    +        Downstream recipients.
    +            Offer from the Licensor – Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License.
    +            Additional offer from the Licensor – Adapted Material. Every recipient of Adapted Material from You automatically receives an offer from the Licensor to exercise the Licensed Rights in the Adapted Material under the conditions of the Adapter’s License You apply.
    +            No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material.
    +        No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i).
    +
    +    Other rights.
    +        Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise.
    +        Patent and trademark rights are not licensed under this Public License.
    +        To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties.
    +
    +Section 3 – License Conditions.
    +
    +Your exercise of the Licensed Rights is expressly made subject to the following conditions.
    +
    +    Attribution.
    +
    +        If You Share the Licensed Material (including in modified form), You must:
    +            retain the following if it is supplied by the Licensor with the Licensed Material:
    +                identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated);
    +                a copyright notice;
    +                a notice that refers to this Public License;
    +                a notice that refers to the disclaimer of warranties;
    +                a URI or hyperlink to the Licensed Material to the extent reasonably practicable;
    +            indicate if You modified the Licensed Material and retain an indication of any previous modifications; and
    +            indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License.
    +        You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information.
    +        If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable.
    +    ShareAlike.
    +
    +    In addition to the conditions in Section 3(a), if You Share Adapted Material You produce, the following conditions also apply.
    +        The Adapter’s License You apply must be a Creative Commons license with the same License Elements, this version or later, or a BY-SA Compatible License.
    +        You must include the text of, or the URI or hyperlink to, the Adapter's License You apply. You may satisfy this condition in any reasonable manner based on the medium, means, and context in which You Share Adapted Material.
    +        You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, Adapted Material that restrict exercise of the rights granted under the Adapter's License You apply.
    +
    +Section 4 – Sui Generis Database Rights.
    +
    +Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:
    +
    +    for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database;
    +    if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material, including for purposes of Section 3(b); and
    +    You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database.
    +
    +For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights.
    +
    +Section 5 – Disclaimer of Warranties and Limitation of Liability.
    +
    +    Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.
    +    To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.
    +
    +    The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.
    +
    +Section 6 – Term and Termination.
    +
    +    This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically.
    +
    +    Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:
    +        automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or
    +        upon express reinstatement by the Licensor.
    +    For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License.
    +    For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License.
    +    Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
    +
    +Section 7 – Other Terms and Conditions.
    +
    +    The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed.
    +    Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License.
    +
    +Section 8 – Interpretation.
    +
    +    For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License.
    +    To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions.
    +    No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor.
    +    Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority.
    +
    +Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” The text of the Creative Commons public licenses is dedicated to the public domain under the CC0 Public Domain Dedication. Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark “Creative Commons” or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses.
    +
    +Creative Commons may be contacted at creativecommons.org.
    +
    +
    +
    +--------------- SECTION 19: Creative Commons Attribution-ShareAlike, V3.0 -----------
    +
    +
    +Creative Commons Attribution-ShareAlike 3.0 Unported
    +
    +CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL
    +SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT
    +RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS"
    +BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION
    +PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE.
    +
    +License
    +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE
    +COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED
    +BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER
    +THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
    +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE
    +TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE
    +MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS
    +CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND
    +CONDITIONS.
    +
    +1. Definitions
    +
    +   a. "Adaptation" means a work based upon the Work, or upon the Work
    +   and other pre-existing works, such as a translation, adaptation,
    +   derivative work, arrangement of music or other alterations of a
    +   literary or artistic work, or phonogram or performance and includes
    +   cinematographic adaptations or any other form in which the Work may
    +   be recast, transformed, or adapted including in any form recognizably
    +   derived from the original, except that a work that constitutes a
    +   Collection will not be considered an Adaptation for the purpose of
    +   this License. For the avoidance of doubt, where the Work is a musical
    +   work, performance or phonogram, the synchronization of the Work in
    +   timed-relation with a moving image ("synching") will be considered
    +   an Adaptation for the purpose of this License.
    +
    +   b. "Collection" means a collection of literary or artistic works,
    +   such as encyclopedias and anthologies, or performances, phonograms or
    +   broadcasts, or other works or subject matter other than works listed in
    +   Section 1(f) below, which, by reason of the selection and arrangement
    +   of their contents, constitute intellectual creations, in which the
    +   Work is included in its entirety in unmodified form along with one or
    +   more other contributions, each constituting separate and independent
    +   works in themselves, which together are assembled into a collective
    +   whole. A work that constitutes a Collection will not be considered
    +   an Adaptation (as defined below) for the purposes of this License.
    +
    +   c. "Creative Commons Compatible License" means a license that is
    +   listed at http://creativecommons.org/compatiblelicenses that has
    +   been approved by Creative Commons as being essentially equivalent
    +   to this License, including, at a minimum, because that license: (i)
    +   contains terms that have the same purpose, meaning and effect as the
    +   License Elements of this License; and, (ii) explicitly permits the
    +   relicensing of adaptations of works made available under that license
    +   under this License or a Creative Commons jurisdiction license with
    +   the same License Elements as this License.
    +
    +   d. "Distribute" means to make available to the public the original
    +   and copies of the Work or Adaptation, as appropriate, through sale
    +   or other transfer of ownership.
    +
    +   e. "License Elements" means the following high-level license attributes
    +   as selected by Licensor and indicated in the title of this License:
    +   Attribution, ShareAlike.
    +
    +   f. "Licensor" means the individual, individuals, entity or entities
    +   that offer(s) the Work under the terms of this License.
    +
    +   g. "Original Author" means, in the case of a literary or artistic
    +   work, the individual, individuals, entity or entities who created the
    +   Work or if no individual or entity can be identified, the publisher;
    +   and in addition (i) in the case of a performance the actors, singers,
    +   musicians, dancers, and other persons who act, sing, deliver, declaim,
    +   play in, interpret or otherwise perform literary or artistic works or
    +   expressions of folklore; (ii) in the case of a phonogram the producer
    +   being the person or legal entity who first fixes the sounds of a
    +   performance or other sounds; and, (iii) in the case of broadcasts,
    +   the organization that transmits the broadcast.
    +
    +   h. "Work" means the literary and/or artistic work offered under the
    +   terms of this License including without limitation any production
    +   in the literary, scientific and artistic domain, whatever may be
    +   the mode or form of its expression including digital form, such
    +   as a book, pamphlet and other writing; a lecture, address, sermon
    +   or other work of the same nature; a dramatic or dramatico-musical
    +   work; a choreographic work or entertainment in dumb show; a musical
    +   composition with or without words; a cinematographic work to which are
    +   assimilated works expressed by a process analogous to cinematography;
    +   a work of drawing, painting, architecture, sculpture, engraving
    +   or lithography; a photographic work to which are assimilated works
    +   expressed by a process analogous to photography; a work of applied art;
    +   an illustration, map, plan, sketch or three-dimensional work relative
    +   to geography, topography, architecture or science; a performance;
    +   a broadcast; a phonogram; a compilation of data to the extent it is
    +   protected as a copyrightable work; or a work performed by a variety
    +   or circus performer to the extent it is not otherwise considered a
    +   literary or artistic work.
    +
    +   i. "You" means an individual or entity exercising rights under this
    +   License who has not previously violated the terms of this License
    +   with respect to the Work, or who has received express permission
    +   from the Licensor to exercise rights under this License despite a
    +   previous violation.
    +
    +   j. "Publicly Perform" means to perform public recitations of the
    +   Work and to communicate to the public those public recitations, by
    +   any means or process, including by wire or wireless means or public
    +   digital performances; to make available to the public Works in such
    +   a way that members of the public may access these Works from a place
    +   and at a place individually chosen by them; to perform the Work to the
    +   public by any means or process and the communication to the public of
    +   the performances of the Work, including by public digital performance;
    +   to broadcast and rebroadcast the Work by any means including signs,
    +   sounds or images.
    +
    +   k. "Reproduce" means to make copies of the Work by any means including
    +   without limitation by sound or visual recordings and the right of
    +   fixation and reproducing fixations of the Work, including storage
    +   of a protected performance or phonogram in digital form or other
    +   electronic medium.
    +
    +2. Fair Dealing Rights.
    +Nothing in this License is intended to reduce, limit, or restrict any
    +uses free from copyright or rights arising from limitations or exceptions
    +that are provided for in connection with the copyright protection under
    +copyright law or other applicable laws.
    +
    +3. License Grant.
    +Subject to the terms and conditions of this License, Licensor hereby
    +grants You a worldwide, royalty-free, non-exclusive, perpetual (for the
    +duration of the applicable copyright) license to exercise the rights in
    +the Work as stated below:
    +
    +   a. to Reproduce the Work, to incorporate the Work into one or
    +   more Collections, and to Reproduce the Work as incorporated in the
    +   Collections;
    +
    +   b. to create and Reproduce Adaptations provided that any such
    +   Adaptation, including any translation in any medium, takes reasonable
    +   steps to clearly label, demarcate or otherwise identify that changes
    +   were made to the original Work. For example, a translation could be
    +   marked "The original work was translated from English to Spanish," or
    +   a modification could indicate "The original work has been modified.";
    +
    +   c. to Distribute and Publicly Perform the Work including as
    +   incorporated in Collections; and,
    +
    +   d. to Distribute and Publicly Perform Adaptations.
    +
    +   e. For the avoidance of doubt:
    +
    +      i. Non-waivable Compulsory License Schemes. In those jurisdictions
    +      in which the right to collect royalties through any statutory or
    +      compulsory licensing scheme cannot be waived, the Licensor reserves
    +      the exclusive right to collect such royalties for any exercise by
    +      You of the rights granted under this License;
    +
    +      ii. Waivable Compulsory License Schemes. In those jurisdictions
    +      in which the right to collect royalties through any statutory or
    +      compulsory licensing scheme can be waived, the Licensor waives the
    +      exclusive right to collect such royalties for any exercise by You
    +      of the rights granted under this License; and,
    +
    +      iii. Voluntary License Schemes. The Licensor waives the right
    +      to collect royalties, whether individually or, in the event that
    +      the Licensor is a member of a collecting society that administers
    +      voluntary licensing schemes, via that society, from any exercise
    +      by You of the rights granted under this License.  The above rights
    +      may be exercised in all media and formats whether now known or
    +      hereafter devised. The above rights include the right to make such
    +      modifications as are technically necessary to exercise the rights
    +      in other media and formats. Subject to Section 8(f), all rights
    +      not expressly granted by Licensor are hereby reserved.
    +
    +4. Restrictions.
    +The license granted in Section 3 above is expressly made subject to and
    +limited by the following restrictions:
    +
    +   a. You may Distribute or Publicly Perform the Work only under the
    +   terms of this License.  You must include a copy of, or the Uniform
    +   Resource Identifier (URI) for, this License with every copy of the
    +   Work You Distribute or Publicly Perform. You may not offer or impose
    +   any terms on the Work that restrict the terms of this License or the
    +   ability of the recipient of the Work to exercise the rights granted to
    +   that recipient under the terms of the License. You may not sublicense
    +   the Work. You must keep intact all notices that refer to this License
    +   and to the disclaimer of warranties with every copy of the Work You
    +   Distribute or Publicly Perform. When You Distribute or Publicly Perform
    +   the Work, You may not impose any effective technological measures on
    +   the Work that restrict the ability of a recipient of the Work from
    +   You to exercise the rights granted to that recipient under the terms
    +   of the License. This Section 4(a) applies to the Work as incorporated
    +   in a Collection, but this does not require the Collection apart from
    +   the Work itself to be made subject to the terms of this License. If
    +   You create a Collection, upon notice from any Licensor You must,
    +   to the extent practicable, remove from the Collection any credit as
    +   required by Section 4(c), as requested. If You create an Adaptation,
    +   upon notice from any Licensor You must, to the extent practicable,
    +   remove from the Adaptation any credit as required by Section 4(c),
    +   as requested.
    +
    +   b. You may Distribute or Publicly Perform an Adaptation only under the
    +   terms of: (i) this License; (ii) a later version of this License with
    +   the same License Elements as this License; (iii) a Creative Commons
    +   jurisdiction license (either this or a later license version) that
    +   contains the same License Elements as this License (e.g., Attribution-
    +   ShareAlike 3.0 US)); (iv) a Creative Commons Compatible License. If
    +   you license the Adaptation under one of the licenses mentioned in
    +   (iv), you must comply with the terms of that license. If you license
    +   the Adaptation under the terms of any of the licenses mentioned in
    +   (i), (ii) or (iii) (the "Applicable License"), you must comply with
    +   the terms of the Applicable License generally and the following
    +   provisions: (I) You must include a copy of, or the URI for, the
    +   Applicable License with every copy of each Adaptation You Distribute
    +   or Publicly Perform; (II) You may not offer or impose any terms on
    +   the Adaptation that restrict the terms of the Applicable License or
    +   the ability of the recipient of the Adaptation to exercise the rights
    +   granted to that recipient under the terms of the Applicable License;
    +   (III) You must keep intact all notices that refer to the Applicable
    +   License and to the disclaimer of warranties with every copy of the
    +   Work as included in the Adaptation You Distribute or Publicly Perform;
    +   (IV) when You Distribute or Publicly Perform the Adaptation, You may
    +   not impose any effective technological measures on the Adaptation
    +   that restrict the ability of a recipient of the Adaptation from You
    +   to exercise the rights granted to that recipient under the terms of
    +   the Applicable License. This Section 4(b) applies to the Adaptation as
    +   incorporated in a Collection, but this does not require the Collection
    +   apart from the Adaptation itself to be made subject to the terms of
    +   the Applicable License.
    +
    +   c. If You Distribute, or Publicly Perform the Work or any Adaptations
    +   or Collections, You must, unless a request has been made pursuant
    +   to Section 4(a), keep intact all copyright notices for the Work and
    +   provide, reasonable to the medium or means You are utilizing: (i) the
    +   name of the Original Author (or pseudonym, if applicable) if supplied,
    +   and/or if the Original Author and/or Licensor designate another party
    +   or parties (e.g., a sponsor institute, publishing entity, journal)
    +   for attribution ("Attribution Parties") in Licensor's copyright
    +   notice, terms of service or by other reasonable means, the name of
    +   such party or parties; (ii) the title of the Work if supplied; (iii)
    +   to the extent reasonably practicable, the URI, if any, that Licensor
    +   specifies to be associated with the Work, unless such URI does not
    +   refer to the copyright notice or licensing information for the Work;
    +   and (iv) , consistent with Ssection 3(b), in the case of an Adaptation,
    +   a credit identifying the use of the Work in the Adaptation (e.g.,
    +   "French translation of the Work by Original Author," or "Screenplay
    +   based on original Work by Original Author"). The credit required
    +   by this Section 4(c) may be implemented in any reasonable manner;
    +   provided, however, that in the case of a Adaptation or Collection, at
    +   a minimum such credit will appear, if a credit for all contributing
    +   authors of the Adaptation or Collection appears, then as part of
    +   these credits and in a manner at least as prominent as the credits
    +   for the other contributing authors. For the avoidance of doubt, You
    +   may only use the credit required by this Section for the purpose of
    +   attribution in the manner set out above and, by exercising Your rights
    +   under this License, You may not implicitly or explicitly assert or
    +   imply any connection with, sponsorship or endorsement by the Original
    +   Author, Licensor and/or Attribution Parties, as appropriate, of You
    +   or Your use of the Work, without the separate, express prior written
    +   permission of the Original Author, Licensor and/or Attribution Parties.
    +
    +   d. Except as otherwise agreed in writing by the Licensor or as may be
    +   otherwise permitted by applicable law, if You Reproduce, Distribute
    +   or Publicly Perform the Work either by itself or as part of any
    +   Adaptations or Collections, You must not distort, mutilate, modify
    +   or take other derogatory action in relation to the Work which would
    +   be prejudicial to the Original Author's honor or reputation. Licensor
    +   agrees that in those jurisdictions (e.g. Japan), in which any exercise
    +   of the right granted in Section 3(b) of this License (the right to
    +   make Adaptations) would be deemed to be a distortion, mutilation,
    +   modification or other derogatory action prejudicial to the Original
    +   Author's honor and reputation, the Licensor will waive or not assert,
    +   as appropriate, this Section, to the fullest extent permitted by the
    +   applicable national law, to enable You to reasonably exercise Your
    +   right under Section 3(b) of this License (right to make Adaptations)
    +   but not otherwise.
    +
    +5. Representations, Warranties and Disclaimer
    +UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR
    +OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY
    +KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE,
    +INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY,
    +FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF
    +LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS,
    +WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION
    +OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.
    +
    +6. Limitation on Liability.
    +EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR
    +BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL,
    +CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS
    +LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF
    +THE POSSIBILITY OF SUCH DAMAGES.
    +
    +7. Termination
    +
    +   a. This License and the rights granted hereunder will terminate
    +   automatically upon any breach by You of the terms of this
    +   License. Individuals or entities who have received Adaptations or
    +   Collections from You under this License, however, will not have their
    +   licenses terminated provided such individuals or entities remain in
    +   full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8
    +   will survive any termination of this License.
    +
    +   b. Subject to the above terms and conditions, the license granted
    +   here is perpetual (for the duration of the applicable copyright in
    +   the Work). Notwithstanding the above, Licensor reserves the right to
    +   release the Work under different license terms or to stop distributing
    +   the Work at any time; provided, however that any such election will not
    +   serve to withdraw this License (or any other license that has been,
    +   or is required to be, granted under the terms of this License), and
    +   this License will continue in full force and effect unless terminated
    +   as stated above.
    +
    +8. Miscellaneous
    +
    +   a. Each time You Distribute or Publicly Perform the Work or a
    +   Collection, the Licensor offers to the recipient a license to the
    +   Work on the same terms and conditions as the license granted to You
    +   under this License.
    +
    +   b. Each time You Distribute or Publicly Perform an Adaptation, Licensor
    +   offers to the recipient a license to the original Work on the same
    +   terms and conditions as the license granted to You under this License.
    +
    +   c. If any provision of this License is invalid or unenforceable under
    +   applicable law, it shall not affect the validity or enforceability
    +   of the remainder of the terms of this License, and without further
    +   action by the parties to this agreement, such provision shall be
    +   reformed to the minimum extent necessary to make such provision valid
    +   and enforceable.
    +
    +   d. No term or provision of this License shall be deemed waived and no
    +   breach consented to unless such waiver or consent shall be in writing
    +   and signed by the party to be charged with such waiver or consent.
    +
    +   e. This License constitutes the entire agreement between the parties
    +   with respect to the Work licensed here. There are no understandings,
    +   agreements or representations with respect to the Work not specified
    +   here. Licensor shall not be bound by any additional provisions that
    +   may appear in any communication from You. This License may not be
    +   modified without the mutual written agreement of the Licensor and You.
    +
    +   f. The rights granted under, and the subject matter referenced, in this
    +   License were drafted utilizing the terminology of the Berne Convention
    +   for the Protection of Literary and Artistic Works (as amended on
    +   September 28, 1979), the Rome Convention of 1961, the WIPO Copyright
    +   Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and
    +   the Universal Copyright Convention (as revised on July 24, 1971). These
    +   rights and subject matter take effect in the relevant jurisdiction
    +   in which the License terms are sought to be enforced according to
    +   the corresponding provisions of the implementation of those treaty
    +   provisions in the applicable national law. If the standard suite of
    +   rights granted under applicable copyright law includes additional
    +   rights not granted under this License, such additional rights are
    +   deemed to be included in the License; this License is not intended
    +   to restrict the license of any rights under applicable law.
    +
    +
    +
    +--------------- SECTION 20: Academic Free License, V2.1 -----------
    +
    +The Academic Free License v. 2.1
    +
    +This Academic Free License (the "License") applies to any original work of 
    +authorship (the "Original Work") whose owner (the "Licensor") has placed the 
    +following notice immediately following the copyright notice for the Original 
    +Work:
    +
    +Licensed under the Academic Free License version 2.1
    +
    +1) Grant of Copyright License.
    +Licensor hereby grants You a world-wide, royalty-free, non-exclusive,
    +perpetual, sublicenseable license to do the following:
    +
    +  a) to reproduce the Original Work in copies;
    +
    +  b) to prepare derivative works ("Derivative Works") based upon the
    +     Original Work;
    +
    +  c) to distribute copies of the Original Work and Derivative Works to
    +     the public;
    +
    +  d) to perform the Original Work publicly; and
    +
    +  e) to display the Original Work publicly.
    +
    +2) Grant of Patent License.
    +Licensor hereby grants You a world-wide, royalty- free, non-exclusive,
    +perpetual, sublicenseable license, under patent claims owned or controlled
    +by the Licensor that are embodied in the Original Work as furnished by
    +the Licensor, to make, use, sell and offer for sale the Original Work
    +and Derivative Works.
    +
    +3) Grant of Source Code License.
    +The term "Source Code" means the preferred form of the Original Work for
    +making modifications to it and all available documentation describing
    +how to modify the Original Work. Licensor hereby agrees to provide a
    +machine-readable copy of the Source Code of the Original Work along with
    +each copy of the Original Work that Licensor distributes.  Licensor
    +reserves the right to satisfy this obligation by placing a machine-
    +readable copy of the Source Code in an information repository reasonably
    +calculated to permit inexpensive and convenient access by You for as long
    +as Licensor continues to distribute the Original Work, and by publishing
    +the address of that information repository in a notice immediately
    +following the copyright notice that applies to the Original Work.
    +
    +4) Exclusions From License Grant.
    +Neither the names of Licensor, nor the names of any contributors to the
    +Original Work, nor any of their trademarks or service marks, may be used
    +to endorse or promote products derived from this Original Work without
    +express prior written permission of the Licensor.  Nothing in this
    +License shall be deemed to grant any rights to trademarks, copyrights,
    +patents, trade secrets or any other intellectual property of Licensor
    +except as expressly stated herein. No patent license is granted to make,
    +use, sell or offer to sell embodiments of any patent claims other than
    +the licensed claims defined in Section 2. No right is granted to the
    +trademarks of Licensor even if such marks are included in the Original
    +Work.  Nothing in this License shall be interpreted to prohibit Licensor
    +from licensing under different terms from this License any Original Work
    +that Licensor otherwise would have a right to license.
    +
    +5) This section intentionally omitted.
    +
    +6) Attribution Rights.
    +You must retain, in the Source Code of any Derivative Works that You
    +create, all copyright, patent or trademark notices from the Source
    +Code of the Original Work, as well as any notices of licensing and any
    +descriptive text identified therein as an "Attribution Notice." You must
    +cause the Source Code for any Derivative Works that You create to carry
    +a prominent Attribution Notice reasonably calculated to inform recipients
    +that You have modified the Original Work.
    +
    +7) Warranty of Provenance and Disclaimer of Warranty.
    +Licensor warrants that the copyright in and to the Original Work and the
    +patent rights granted herein by Licensor are owned by the Licensor or are
    +sublicensed to You under the terms of this License with the permission
    +of the contributor(s) of those copyrights and patent rights. Except as
    +expressly stated in the immediately proceeding sentence, the Original
    +Work is provided under this License on an "AS IS" BASIS and WITHOUT
    +WARRANTY, either express or implied, including, without limitation,
    +the warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A
    +PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL
    +WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential
    +part of this License. No license to Original Work is granted hereunder
    +except under this disclaimer.
    +
    +8) Limitation of Liability.
    +Under no circumstances and under no legal theory, whether in tort
    +(including negligence), contract, or otherwise, shall the Licensor be
    +liable to any person for any direct, indirect, special, incidental, or
    +consequential damages of any character arising as a result of this License
    +or the use of the Original Work including, without limitation, damages
    +for loss of goodwill, work stoppage, computer failure or malfunction,
    +or any and all other commercial damages or losses. This limitation of
    +liability shall not apply to liability for death or personal injury
    +resulting from Licensor's negligence to the extent applicable law
    +prohibits such limitation. Some jurisdictions do not allow the exclusion
    +or limitation of incidental or consequential damages, so this exclusion
    +and limitation may not apply to You.
    +
    +9) Acceptance and Termination.
    +If You distribute copies of the Original Work or a Derivative Work,
    +You must make a reasonable effort under the circumstances to obtain the
    +express assent of recipients to the terms of this License. Nothing else
    +but this License (or another written agreement between Licensor and You)
    +grants You permission to create Derivative Works based upon the Original
    +Work or to exercise any of the rights granted in Section 1 herein, and
    +any attempt to do so except under the terms of this License (or another
    +written agreement between Licensor and You) is expressly prohibited
    +by U.S. copyright law, the equivalent laws of other countries, and by
    +international treaty. Therefore, by exercising any of the rights granted
    +to You in Section 1 herein, You indicate Your acceptance of this License
    +and all of its terms and conditions.
    +
    +10) Termination for Patent Action.
    +This License shall terminate automatically and You may no longer exercise
    +any of the rights granted to You by this License as of the date You
    +commence an action, including a cross-claim or counterclaim, against
    +Licensor or any licensee alleging that the Original Work infringes
    +a patent. This termination provision shall not apply for an action
    +alleging patent infringement by combinations of the Original Work with
    +other software or hardware.
    +
    +11) Jurisdiction, Venue and Governing Law.
    +Any action or suit relating to this License may be brought only in
    +the courts of a jurisdiction wherein the Licensor resides or in which
    +Licensor conducts its primary business, and under the laws of that
    +jurisdiction excluding its conflict-of-law provisions. The application
    +of the United Nations Convention on Contracts for the International Sale
    +of Goods is expressly excluded. Any use of the Original Work outside
    +the scope of this License or after its termination shall be subject
    +to the requirements and penalties of the U.S. Copyright Act, 17 U.S.C.
    +§ 101 et seq., the equivalent laws of other countries, and international
    +treaty. This section shall survive the termination of this License.
    +
    +12) Attorneys Fees.
    +In any action to enforce the terms of this License or seeking damages
    +relating thereto, the prevailing party shall be entitled to recover its
    +costs and expenses, including, without limitation, reasonable attorneys'
    +fees and costs incurred in connection with such action, including any
    +appeal of such action. This section shall survive the termination of
    +this License.
    +
    +13) Miscellaneous.
    +This License represents the complete agreement concerning the
    +subject matter hereof. If any provision of this License is held to
    +be unenforceable, such provision shall be reformed only to the extent
    +necessary to make it enforceable.
    +
    +14) Definition of "You" in This License.
    +"You" throughout this License, whether in upper or lower case, means an
    +individual or a legal entity exercising rights under, and complying with
    +all of the terms of, this License.  For legal entities, "You" includes
    +any entity that controls, is controlled by, or is under common control
    +with you. For purposes of this definition, "control" means (i) the power,
    +direct or indirect, to cause the direction or management of such entity,
    +whether by contract or otherwise, or (ii) ownership of fifty percent
    +(50%) or more of the outstanding shares, or (iii) beneficial ownership
    +of such entity.
    +
    +15) Right to Use.
    +You may use the Original Work in all ways not otherwise restricted or
    +conditioned by this License or by law, and Licensor promises not to
    +interfere with or be responsible for such uses by You.
    +
    +This license is Copyright (C) 2003-2004 Lawrence E. Rosen. All rights
    +reserved. Permission is hereby granted to copy and distribute this
    +license without modification. This license may not be modified without
    +the express written permission of its copyright owner.
    +
    +
    +
    +--------------- SECTION 21: SIL Open Font License, V1.1 -----------
    +
    +
    +SIL OPEN FONT LICENSE
    +
    +Version 1.1 - 26 February 2007
    +PREAMBLE
    +
    +The goals of the Open Font License (OFL) are to stimulate worldwide
    +development of collaborative font projects, to support the font creation
    +efforts of academic and linguistic communities, and to provide a free and
    +open framework in which fonts may be shared and improved in partnership
    +with others.
    +
    +The OFL allows the licensed fonts to be used, studied, modified and
    +redistributed freely as long as they are not sold by themselves. The
    +fonts, including any derivative works, can be bundled, embedded,
    +redistributed and/or sold with any software provided that any reserved
    +names are not used by derivative works. The fonts and derivatives,
    +however, cannot be released under any other type of license. The
    +requirement for fonts to remain under this license does not apply
    +to any document created using the fonts or their derivatives.
    +DEFINITIONS
    +
    +"Font Software" refers to the set of files released by the Copyright
    +Holder(s) under this license and clearly marked as such. This may
    +include source files, build scripts and documentation.
    +
    +"Reserved Font Name" refers to any names specified as such after the
    +copyright statement(s).
    +
    +"Original Version" refers to the collection of Font Software components as
    +distributed by the Copyright Holder(s).
    +
    +"Modified Version" refers to any derivative made by adding to, deleting,
    +or substituting - in part or in whole - any of the components of the
    +Original Version, by changing formats or by porting the Font Software to a
    +new environment.
    +
    +"Author" refers to any designer, engineer, programmer, technical
    +writer or other person who contributed to the Font Software.
    +PERMISSION & CONDITIONS
    +
    +Permission is hereby granted, free of charge, to any person obtaining
    +a copy of the Font Software, to use, study, copy, merge, embed, modify,
    +redistribute, and sell modified and unmodified copies of the Font
    +Software, subject to the following conditions:
    +
    +1) Neither the Font Software nor any of its individual components,
    +in Original or Modified Versions, may be sold by itself.
    +
    +2) Original or Modified Versions of the Font Software may be bundled,
    +redistributed and/or sold with any software, provided that each copy
    +contains the above copyright notice and this license. These can be
    +included either as stand-alone text files, human-readable headers or
    +in the appropriate machine-readable metadata fields within text or
    +binary files as long as those fields can be easily viewed by the user.
    +
    +3) No Modified Version of the Font Software may use the Reserved Font
    +Name(s) unless explicit written permission is granted by the corresponding
    +Copyright Holder. This restriction only applies to the primary font name as
    +presented to the users.
    +
    +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
    +Software shall not be used to promote, endorse or advertise any
    +Modified Version, except to acknowledge the contribution(s) of the
    +Copyright Holder(s) and the Author(s) or with their explicit written
    +permission.
    +
    +5) The Font Software, modified or unmodified, in part or in whole,
    +must be distributed entirely under this license, and must not be
    +distributed under any other license. The requirement for fonts to
    +remain under this license does not apply to any document created
    +using the Font Software.
    +TERMINATION
    +
    +This license becomes null and void if any of the above conditions are
    +not met.
    +DISCLAIMER
    +
    +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
    +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
    +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
    +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
    +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
    +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
    +OTHER DEALINGS IN THE FONT SOFTWARE.
    +
    +
    +
    +--------------- SECTION 22: LaTeX Project Public License v1.3c -----------
    +
    +
    +The LaTeX Project Public License 
    +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- 
    +LPPL Version 1.3c 2008-05-04
    +Copyright 1999 2002-2008 LaTeX3 Project
    +Everyone is allowed to distribute verbatim copies of this license document, but modification of it is not allowed.
    +PREAMBLE 
    +======== 
    +The LaTeX Project Public License (LPPL) is the primary license under which the LaTeX kernel and the base LaTeX packages are distributed.
    +You may use this license for any work of which you hold the copyright and which you wish to distribute. This license may be particularly suitable if your work is TeX-related (such as a LaTeX package), but it is written in such a way that you can use it even if your work is unrelated to TeX.
    +The section `WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE', below, gives instructions, examples, and recommendations for authors who are considering distributing their works under this license.
    +This license gives conditions under which a work may be distributed and modified, as well as conditions under which modified versions of that work may be distributed.
    +We, the LaTeX3 Project, believe that the conditions below give you the freedom to make and distribute modified versions of your work that conform with whatever technical specifications you wish while maintaining the availability, integrity, and reliability of that work. If you do not see how to achieve your goal while meeting these conditions, then read the document `cfgguide.tex' and `modguide.tex' in the base LaTeX distribution for suggestions.
    +DEFINITIONS 
    +=========== 
    +In this license document the following terms are used:
    +`Work' Any work being distributed under this License. `Derived Work' Any work that under any applicable law is derived from the Work.
    +`Modification' Any procedure that produces a Derived Work under any applicable law -- for example, the production of a file containing an original file associated with the Work or a significant portion of such a file, either verbatim or with modifications and/or translated into another language.
    +`Modify' To apply any procedure that produces a Derived Work under any applicable law. `Distribution' Making copies of the Work available from one person to another, in whole or in part. Distribution includes (but is not limited to) making any electronic components of the Work accessible by file transfer protocols such as FTP or HTTP or by shared file systems such as Sun's Network File System (NFS).
    +`Compiled Work' A version of the Work that has been processed into a form where it is directly usable on a computer system. This processing may include using installation facilities provided by the Work, transformations of the Work, copying of components of the Work, or other activities. Note that modification of any installation facilities provided by the Work constitutes modification of the Work.
    +`Current Maintainer' A person or persons nominated as such within the Work. If there is no such explicit nomination then it is the `Copyright Holder' under any applicable law.
    +`Base Interpreter' A program or process that is normally needed for running or interpreting a part or the whole of the Work.
    +A Base Interpreter may depend on external components but these are not considered part of the Base Interpreter provided that each external component clearly identifies itself whenever it is used interactively. Unless explicitly specified when applying the license to the Work, the only applicable Base Interpreter is a `LaTeX-Format' or in the case of files belonging to the `LaTeX-format' a program implementing the `TeX language'.
    +CONDITIONS ON DISTRIBUTION AND MODIFICATION 
    +=========================================== 
    +	1. Activities other than distribution and/or modification of the Work are not covered by this license; they are outside its scope. In particular, the act of running the Work is not restricted and no requirements are made concerning any offers of support for the Work. 
    +	2. You may distribute a complete, unmodified copy of the Work as you received it. Distribution of only part of the Work is considered modification of the Work, and no right to distribute such a Derived Work may be assumed under the terms of this clause. 
    +	3. You may distribute a Compiled Work that has been generated from a complete, unmodified copy of the Work as distributed under Clause 2 above, as long as that Compiled Work is distributed in such a way that the recipients may install the Compiled Work on their system exactly as it would have been installed if they generated a Compiled Work directly from the Work. 
    +	4. If you are the Current Maintainer of the Work, you may, without restriction, modify the Work, thus creating a Derived Work. You may also distribute the Derived Work without restriction, including Compiled Works generated from the Derived Work. Derived Works distributed in this manner by the Current Maintainer are considered to be updated versions of the Work. 
    +	5. If you are not the Current Maintainer of the Work, you may modify your copy of the Work, thus creating a Derived Work based on the Work, and compile this Derived Work, thus creating a Compiled Work based on the Derived Work. 
    +	6. If you are not the Current Maintainer of the Work, you may distribute a Derived Work provided the following conditions are met for every component of the Work unless that component clearly states in the copyright notice that it is exempt from that condition. Only the Current Maintainer is allowed to add such statements of exemption to a component of the Work. 
    +	a. If a component of this Derived Work can be a direct replacement for a component of the Work when that component is used with the Base Interpreter, then, wherever this component of the Work identifies itself to the user when used interactively with that Base Interpreter, the replacement component of this Derived Work clearly and unambiguously identifies itself as a modified version of this component to the user when used interactively with that Base Interpreter. 
    +	b. Every component of the Derived Work contains prominent notices detailing the nature of the changes to that component, or a prominent reference to another file that is distributed as part of the Derived Work and that contains a complete and accurate log of the changes. 
    +	c. No information in the Derived Work implies that any persons, including (but not limited to) the authors of the original version of the Work, provide any support, including (but not limited to) the reporting and handling of errors, to recipients of the Derived Work unless those persons have stated explicitly that they do provide such support for the Derived Work. 
    +	d. You distribute at least one of the following with the Derived Work: 
    +	1. A complete, unmodified copy of the Work; if your distribution of a modified component is made by offering access to copy the modified component from a designated place, then offering equivalent access to copy the Work from the same or some similar place meets this condition, even though third parties are not compelled to copy the Work along with the modified component; 
    +	2. Information that is sufficient to obtain a complete, unmodified copy of the Work. 
    +	7. If you are not the Current Maintainer of the Work, you may distribute a Compiled Work generated from a Derived Work, as long as the Derived Work is distributed to all recipients of the Compiled Work, and as long as the conditions of Clause 6, above, are met with regard to the Derived Work. 
    +	8. The conditions above are not intended to prohibit, and hence do not apply to, the modification, by any method, of any component so that it becomes identical to an updated version of that component of the Work as it is distributed by the Current Maintainer under Clause 4, above. 
    +	9. Distribution of the Work or any Derived Work in an alternative format, where the Work or that Derived Work (in whole or in part) is then produced by applying some process to that format, does not relax or nullify any sections of this license as they pertain to the results of applying that process. 
    +	10. 
    +	a. A Derived Work may be distributed under a different license provided that license itself honors the conditions listed in Clause 6 above, in regard to the Work, though it does not have to honor the rest of the conditions in this license. 
    +	b. If a Derived Work is distributed under a different license, that Derived Work must provide sufficient documentation as part of itself to allow each recipient of that Derived Work to honor the restrictions in Clause 6 above, concerning changes from the Work. 
    +	11. This license places no restrictions on works that are unrelated to the Work, nor does this license place any restrictions on aggregating such works with the Work by any means. 
    +	12. Nothing in this license is intended to, or may be used to, prevent complete compliance by all parties with all applicable laws. 
    +NO WARRANTY 
    +=========== 
    +There is no warranty for the Work. Except when otherwise stated in writing, the Copyright Holder provides the Work `as is', without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The entire risk as to the quality and performance of the Work is with you. Should the Work prove defective, you assume the cost of all necessary servicing, repair, or correction.
    +In no event unless required by applicable law or agreed to in writing will The Copyright Holder, or any author named in the components of the Work, or any other party who may distribute and/or modify the Work as permitted above, be liable to you for damages, including any general, special, incidental or consequential damages arising out of any use of the Work or out of inability to use the Work (including, but not limited to, loss of data, data being rendered inaccurate, or losses sustained by anyone as a result of any failure of the Work to operate with any other programs), even if the Copyright Holder or said author or said other party has been advised of the possibility of such damages.
    +MAINTENANCE OF THE WORK 
    +======================= 
    +The Work has the status `author-maintained' if the Copyright Holder explicitly and prominently states near the primary copyright notice in the Work that the Work can only be maintained by the Copyright Holder or simply that it is `author-maintained'.
    +The Work has the status `maintained' if there is a Current Maintainer who has indicated in the Work that they are willing to receive error reports for the Work (for example, by supplying a valid e-mail address). It is not required for the Current Maintainer to acknowledge or act upon these error reports.
    +The Work changes from status `maintained' to `unmaintained' if there is no Current Maintainer, or the person stated to be Current Maintainer of the work cannot be reached through the indicated means of communication for a period of six months, and there are no other significant signs of active maintenance.
    +You can become the Current Maintainer of the Work by agreement with any existing Current Maintainer to take over this role.
    +If the Work is unmaintained, you can become the Current Maintainer of the Work through the following steps:
    +	1. Make a reasonable attempt to trace the Current Maintainer (and the Copyright Holder, if the two differ) through the means of an Internet or similar search. 
    +	2. If this search is successful, then enquire whether the Work is still maintained. 
    +	a. If it is being maintained, then ask the Current Maintainer to update their communication data within one month. 
    +	b. If the search is unsuccessful or no action to resume active maintenance is taken by the Current Maintainer, then announce within the pertinent community your intention to take over maintenance. (If the Work is a LaTeX work, this could be done, for example, by posting to comp.text.tex.) 
    +	3a. If the Current Maintainer is reachable and agrees to pass maintenance of the Work to you, then this takes effect immediately upon announcement. 
    +	b. If the Current Maintainer is not reachable and the Copyright Holder agrees that maintenance of the Work be passed to you, then this takes effect immediately upon announcement. 
    +	4. If you make an `intention announcement' as described in 2b. above and after three months your intention is challenged neither by the Current Maintainer nor by the Copyright Holder nor by other people, then you may arrange for the Work to be changed so as to name you as the (new) Current Maintainer. 
    +	5. If the previously unreachable Current Maintainer becomes reachable once more within three months of a change completed under the terms of 3b) or 4), then that Current Maintainer must become or remain the Current Maintainer upon request provided they then update their communication data within one month. 
    +A change in the Current Maintainer does not, of itself, alter the fact that the Work is distributed under the LPPL license.
    +If you become the Current Maintainer of the Work, you should immediately provide, within the Work, a prominent and unambiguous statement of your status as Current Maintainer. You should also announce your new status to the same pertinent community as in 2b) above.
    +WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE 
    +====================================================== 
    +This section contains important instructions, examples, and recommendations for authors who are considering distributing their works under this license. These authors are addressed as `you' in this section.
    +Choosing This License or Another License 
    +---------------------------------------- 
    +If for any part of your work you want or need to use *distribution* conditions that differ significantly from those in this license, then do not refer to this license anywhere in your work but, instead, distribute your work under a different license. You may use the text of this license as a model for your own license, but your license should not refer to the LPPL or otherwise give the impression that your work is distributed under the LPPL.
    +The document `modguide.tex' in the base LaTeX distribution explains the motivation behind the conditions of this license. It explains, for example, why distributing LaTeX under the GNU General Public License (GPL) was considered inappropriate. Even if your work is unrelated to LaTeX, the discussion in `modguide.tex' may still be relevant, and authors intending to distribute their works under any license are encouraged to read it.
    +A Recommendation on Modification Without Distribution 
    +----------------------------------------------------- 
    +It is wise never to modify a component of the Work, even for your own personal use, without also meeting the above conditions for distributing the modified component. While you might intend that such modifications will never be distributed, often this will happen by accident -- you may forget that you have modified that component; or it may not occur to you when allowing others to access the modified version that you are thus distributing it and violating the conditions of this license in ways that could have legal implications and, worse, cause problems for the community. It is therefore usually in your best interest to keep your copy of the Work identical with the public one. Many works provide ways to control the behavior of that work without altering any of its licensed components.
    +How to Use This License 
    +----------------------- 
    +To use this license, place in each of the components of your work both an explicit copyright notice including your name and the year the work was authored and/or last substantially modified. Include also a statement that the distribution and/or modification of that component is constrained by the conditions in this license.
    +Here is an example of such a notice and statement:
    + pig.dtx 
    + Copyright 2005 M. Y. Name 
    + 
    + This work may be distributed and/or modified under the 
    + conditions of the LaTeX Project Public License, either version 1.3 
    + of this license or (at your option) any later version. 
    + The latest version of this license is in 
    + http://www.latex-project.org/lppl.txt 
    + and version 1.3 or later is part of all distributions of LaTeX 
    + version 2005/12/01 or later. 
    + 
    + This work has the LPPL maintenance status " maintained". 
    + 
    + The Current Maintainer of this work is M. Y. Name. 
    + 
    + This work consists of the files pig.dtx and pig.ins 
    + and the derived file pig.sty. 
    +Given such a notice and statement in a file, the conditions given in this license document would apply, with the `Work' referring to the three files `pig.dtx', `pig.ins', and `pig.sty' (the last being generated from `pig.dtx' using `pig.ins'), the `Base Interpreter' referring to any `LaTeX-Format', and both `Copyright Holder' and `Current Maintainer' referring to the person `M. Y. Name'.
    +If you do not want the Maintenance section of LPPL to apply to your Work, change `maintained' above into `author-maintained'. However, we recommend that you use `maintained', as the Maintenance section was added in order to ensure that your Work remains useful to the community even when you can no longer maintain and support it yourself.
    +Derived Works That Are Not Replacements 
    +--------------------------------------- 
    +Several clauses of the LPPL specify means to provide reliability and stability for the user community. They therefore concern themselves with the case that a Derived Work is intended to be used as a (compatible or incompatible) replacement of the original Work. If this is not the case (e.g., if a few lines of code are reused for a completely different task), then clauses 6b and 6d shall not apply.
    +Important Recommendations 
    +------------------------- 
    +Defining What Constitutes the Work
    +The LPPL requires that distributions of the Work contain all the files of the Work. It is therefore important that you provide a way for the licensee to determine which files constitute the Work. This could, for example, be achieved by explicitly listing all the files of the Work near the copyright notice of each file or by using a line such as:
    + This work consists of all files listed in manifest.txt.
    +in that place. In the absence of an unequivocal list it might be impossible for the licensee to determine what is considered by you to comprise the Work and, in such a case, the licensee would be entitled to make reasonable conjectures as to which files comprise the Work.
    +
    +
    +
    +--------------- SECTION 23: Open Software License 1.1 -----------
    +
    +
    +The Open Software License v. 1.1
    +This Open Software License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following notice immediately following the copyright notice for the Original Work:
    +Licensed under the Open Software License version 1.1
    +	1) Grant of Copyright License. Licensor hereby grants You a world-wide, royalty-free, non-exclusive, perpetual, non-sublicenseable license to do the following: 
    +	a) to reproduce the Original Work in copies; 
    +	b) to prepare derivative works ("Derivative Works") based upon the Original Work; 
    +	c) to distribute copies of the Original Work and Derivative Works to the public, with the proviso that copies of Original Work or Derivative Works that You distribute shall be licensed under the Open Software License; 
    +	d) to perform the Original Work publicly; and 
    +	e) to display the Original Work publicly. 
    +	2) Grant of Patent License. Licensor hereby grants You a world-wide, royalty-free, non-exclusive, perpetual, non-sublicenseable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor ("Licensed Claims") to make, use, sell and offer for sale the Original Work. Licensor hereby grants You a world-wide, royalty-free, non-exclusive, perpetual, non-sublicenseable license under the Licensed Claims to make, use, sell and offer for sale Derivative Works. 
    +	3) Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor hereby agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work, and by publishing the address of that information repository in a notice immediately following the copyright notice that applies to the Original Work. 
    +	4) Exclusions From License Grant. Nothing in this License shall be deemed to grant any rights to trademarks, copyrights, patents, trade secrets or any other intellectual property of Licensor except as expressly stated herein. No patent license is granted to make, use, sell or offer to sell embodiments of any patent claims other than the Licensed Claims defined in Section 2. No right is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under different terms from this License any Original Work that Licensor otherwise would have a right to license. 
    +	5) External Deployment. The term "External Deployment" means the use or distribution of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether the Original Work or Derivative Works are distributed to those persons or made available as an application intended for use over a computer network. As an express condition for the grants of license hereunder, You agree that any External Deployment by You of a Derivative Work shall be deemed a distribution and shall be licensed to all under the terms of this License, as prescribed in section 1(c) herein. 
    +	6) Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work. 
    +	7) Warranty and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work is owned by the Licensor or that the Original Work is distributed by Licensor under a valid current license from the copyright owner. Except as expressly stated in the immediately proceeding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to Original Work is granted hereunder except under this disclaimer. 
    +	8) Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to any person for any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to liability for death or personal injury resulting from Licensor's negligence to the extent applicable law prohibits such limitation. Some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so this exclusion and limitation may not apply to You. 
    +	9) Acceptance and Termination. If You distribute copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express and volitional assent of recipients to the terms of this License. Nothing else but this License (or another written agreement between Licensor and You) grants You permission to create Derivative Works based upon the Original Work or to exercise any of the rights granted in Sections 1 herein, and any attempt to do so except under the terms of this License (or another written agreement between Licensor and You) is expressly prohibited by U.S. copyright law, the equivalent laws of other countries, and by international treaty. Therefore, by exercising any of the rights granted to You in Sections 1 herein, You indicate Your acceptance of this License and all of its terms and conditions. This License shall terminate immediately and you may no longer exercise any of the rights granted to You by this License upon Your failure to honor the proviso in Section 1(c) herein. 
    +	10) Mutual Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License if You file a lawsuit in any court alleging that any OSI Certified open source software that is licensed under any license containing this "Mutual Termination for Patent Action" clause infringes any patent claims that are essential to use that software. 
    +	11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of the U.S. Copyright Act, 17 U.S.C. å¤ 101 et seq., the equivalent laws of other countries, and international treaty. This section shall survive the termination of this License. 
    +	12) Attorneys Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License. 
    +	13) Miscellaneous. This License represents the complete agreement concerning the subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. 
    +	14) Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. 
    +	15) Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You. 
    +This license is Copyright (C) 2002 Lawrence E. Rosen. All rights reserved. Permission is hereby granted to copy and distribute this license without modification. This license may not be modified without the express written permission of its copyright owner.
    +
    +
    +
    +--------------- SECTION 24: Creative Commons Attribution Share Alike 2.0 Generic -----------
    +
    +
    +Creative Commons Attribution-ShareAlike 2.0
    +CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE.
    +License
    +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
    +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.
    +	1. Definitions 
    +	a. "Collective Work" means a work, such as a periodical issue, anthology or encyclopedia, in which the Work in its entirety in unmodified form, along with a number of other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this License. 
    +	b. "Derivative Work" means a work based upon the Work or upon the Work and other pre-existing works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this License. For the avoidance of doubt, where the Work is a musical composition or sound recording, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered a Derivative Work for the purpose of this License. 
    +	c. "Licensor" means the individual or entity that offers the Work under the terms of this License. 
    +	d. "Original Author" means the individual or entity who created the Work. 
    +	e. "Work" means the copyrightable work of authorship offered under the terms of this License. 
    +	f. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. 
    +	g. "License Elements" means the following high-level license attributes as selected by Licensor and indicated in the title of this License: Attribution, ShareAlike. 
    +	2. Fair Use Rights. Nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws. 
    +	3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: 
    +	a. to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works; 
    +	b. to create and reproduce Derivative Works; 
    +	c. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works; 
    +	d. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission Derivative Works. 
    +	e. For the avoidance of doubt, where the work is a musical composition: 
    +	i. Performance Royalties Under Blanket Licenses. Licensor waives the exclusive right to collect, whether individually or via a performance rights society (e.g. ASCAP, BMI, SESAC), royalties for the public performance or public digital performance (e.g. webcast) of the Work. 
    +	ii. Mechanical Rights and Statutory Royalties. Licensor waives the exclusive right to collect, whether individually or via a music rights society or designated agent (e.g. Harry Fox Agency), royalties for any phonorecord You create from the Work ("cover version") and distribute, subject to the compulsory license created by 17 USC Section 115 of the US Copyright Act (or the equivalent in other jurisdictions). 
    +	f. Webcasting Rights and Statutory Royalties. For the avoidance of doubt, where the Work is a sound recording, Licensor waives the exclusive right to collect, whether individually or via a performance-rights society (e.g. SoundExchange), royalties for the public digital performance (e.g. webcast) of the Work, subject to the compulsory license created by 17 USC Section 114 of the US Copyright Act (or the equivalent in other jurisdictions). 
    +The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. All rights not expressly granted by Licensor are hereby reserved.
    +	4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: 
    +	a. You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Work itself to be made subject to the terms of this License. If You create a Collective Work, upon notice from any Licensor You must, to the extent practicable, remove from the Collective Work any reference to such Licensor or the Original Author, as requested. If You create a Derivative Work, upon notice from any Licensor You must, to the extent practicable, remove from the Derivative Work any reference to such Licensor or the Original Author, as requested. 
    +	b. You may distribute, publicly display, publicly perform, or publicly digitally perform a Derivative Work only under the terms of this License, a later version of this License with the same License Elements as this License, or a Creative Commons iCommons license that contains the same License Elements as this License (e.g. Attribution-ShareAlike 2.0 Japan). You must include a copy of, or the Uniform Resource Identifier for, this License or other license specified in the previous sentence with every copy or phonorecord of each Derivative Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Derivative Works that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder, and You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Derivative Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Derivative Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Derivative Work itself to be made subject to the terms of this License. 
    +	c. If you distribute, publicly display, publicly perform, or publicly digitally perform the Work or any Derivative Works or Collective Works, You must keep intact all copyright notices for the Work and give the Original Author credit reasonable to the medium or means You are utilizing by conveying the name (or pseudonym if applicable) of the Original Author if supplied; the title of the Work if supplied; to the extent reasonably practicable, the Uniform Resource Identifier, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and in the case of a Derivative Work, a credit identifying the use of the Work in the Derivative Work (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). Such credit may be implemented in any reasonable manner; provided, however, that in the case of a Derivative Work or Collective Work, at a minimum such credit will appear where any other comparable authorship credit appears and in a manner at least as prominent as such other comparable authorship credit. 
    +	5. Representations, Warranties and Disclaimer 
    +UNLESS OTHERWISE AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE MATERIALS, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.
    +	6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 
    +	7. Termination 
    +	a. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Derivative Works or Collective Works from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. 
    +	b. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. 
    +	8. Miscellaneous 
    +	a. Each time You distribute or publicly digitally perform the Work or a Collective Work, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. 
    +	b. Each time You distribute or publicly digitally perform a Derivative Work, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License. 
    +	c. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. 
    +	d. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. 
    +	e. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. 
    +Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor.
    +Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, neither party will use the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time.
    +Creative Commons may be contacted at http://creativecommons.org/.
    +
    +
    +
    +--------------- SECTION 25:  LDP GENERAL PUBLIC LICENSE v1 -----------
    +
    +
    +  LDP GENERAL PUBLIC LICENSE
    +                   Version 1, September 1998
    +
    +   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
    +
    +  0. This License applies to any document which contains a notice
    +placed by the copyright holder saying it may be distributed
    +under the terms of this LDP General Public License.
    +The "Document" below refers to any such document, and
    +"work based on the Document" means either the Document
    +or any derivative work under copyright law: that is to say,
    +a work containing the Document or part of it, either verbatim
    +or with modifications and/or translated into another language.
    +(Hereinafter, translation is included without limitation in
    +the term "modification".)  Each licensee is addressed as "you".
    +
    +Activities other than copying, distribution and modification are not
    +covered by this License; they are outside its scope.
    +
    +  1. You may copy and distribute verbatim copies of the Document's
    +source code as you receive it, in any medium, provided that you
    +appropriately publish on each copy an appropriate copyright notice
    +and disclaimer of warranty; keep intact all the notices that refer
    +to this License and to the absence of any warranty; and give any
    +other recipients of the Document a copy of this License along with
    +the Document.
    +
    +You may charge a fee for the physical act of producing or transferring
    +a copy.
    +
    +  2. You may modify your copy or copies of the Document or any portion
    +of it, thus forming a work based on the Document, and copy and
    +distribute such modifications or work under the terms of Section 1
    +above, provided that you also meet all of these conditions:
    +
    +    a) You must cause the modified files to carry notices
    +    stating that you changed the files and the date of any change.
    +
    +    b) You must cause any work that you distribute or publish, that in
    +    whole or in part contains or is derived from the Document or any
    +    part thereof, to be licensed as a whole at no charge to all third
    +    parties under the terms of this License.
    +
    +    c) You must not add notes to the Document implying that the
    +    reader had better read something produced using Texinfo.
    +
    +  3. You may copy and distribute the Document (or a work based on it,
    +under Section 2) in any form under the terms of Sections 1 and 2 above
    +provided that you also either accompany it with the complete corresponding
    +machine-readable source code, or provide an URL, valid for at least
    +three months, where this complete corresponding machine-readable source code
    +is available, and can be retrieved by any anonymous user.
    +
    +  4. You may not copy, modify, sublicense, or distribute the Document
    +except as expressly provided under this License.
    +
    +  5. Each time you redistribute the Document (or any work based on the
    +Document), the recipient automatically receives a license from the
    +original licensor to copy, distribute or modify the Document subject to
    +these terms and conditions.  You may not impose any further
    +restrictions on the recipients' exercise of the rights granted herein.
    +
    +
    +
    +======================================================================
    +
    +To the extent any open source components are licensed under the GPL
    +and/or LGPL, or other similar licenses that require the source code
    +and/or modifications to source code to be made available (as would be
    +noted above), you may obtain a copy of the source code corresponding to
    +the binaries for such open source components and modifications thereto,
    +if any, (the "Source Files"), by downloading the Source Files from
    +VMware's github site, or by sending a request, with your name and address to: 
    +VMware, Inc., 3401 Hillview Avenue, Palo Alto, CA 94304, United States of America. 
    +All such requests should clearly specify: OPEN SOURCE FILES REQUEST, Attention General Counsel. 
    +VMware shall mail a copy of the Source Files to you on a CD or equivalent physical medium. 
    +This offer to obtain a copy of the Source Files is valid for three years from the date you acquired this Software product. 
    +
    +[VIC152GAMS030419]
    \ No newline at end of file
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/hashicorp/vic/pkg/vsphere/tags/categories.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/hashicorp/vic/pkg/vsphere/tags/categories.go
    new file mode 100644
    index 000000000..8d5e6fd60
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/hashicorp/vic/pkg/vsphere/tags/categories.go
    @@ -0,0 +1,212 @@
    +// Copyright 2017 VMware, Inc. All Rights Reserved.
    +//
    +// 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.
    +
    +package tags
    +
    +import (
    +	"context"
    +	"encoding/json"
    +	"fmt"
    +	"net/http"
    +	"strings"
    +
    +	"github.com/pkg/errors"
    +)
    +
    +const (
    +	CategoryURL      = "/com/vmware/cis/tagging/category"
    +	ErrAlreadyExists = "already_exists"
    +)
    +
    +type CategoryCreateSpec struct {
    +	CreateSpec CategoryCreate `json:"create_spec"`
    +}
    +
    +type CategoryUpdateSpec struct {
    +	UpdateSpec CategoryUpdate `json:"update_spec"`
    +}
    +
    +type CategoryCreate struct {
    +	AssociableTypes []string `json:"associable_types"`
    +	Cardinality     string   `json:"cardinality"`
    +	Description     string   `json:"description"`
    +	Name            string   `json:"name"`
    +}
    +
    +type CategoryUpdate struct {
    +	AssociableTypes []string `json:"associable_types"`
    +	Cardinality     string   `json:"cardinality"`
    +	Description     string   `json:"description"`
    +	Name            string   `json:"name"`
    +}
    +
    +type Category struct {
    +	ID              string   `json:"id"`
    +	Description     string   `json:"description"`
    +	Name            string   `json:"name"`
    +	Cardinality     string   `json:"cardinality"`
    +	AssociableTypes []string `json:"associable_types"`
    +	UsedBy          []string `json:"used_by"`
    +}
    +
    +func (c *RestClient) CreateCategoryIfNotExist(ctx context.Context, name string, description string, categoryType string, multiValue bool) (*string, error) {
    +	categories, err := c.GetCategoriesByName(ctx, name)
    +	if err != nil {
    +		return nil, errors.Wrapf(err, "failed to query category for %s", name)
    +	}
    +
    +	if categories == nil {
    +		var multiValueStr string
    +		if multiValue {
    +			multiValueStr = "MULTIPLE"
    +		} else {
    +			multiValueStr = "SINGLE"
    +		}
    +		categoryCreate := CategoryCreate{[]string{categoryType}, multiValueStr, description, name}
    +		spec := CategoryCreateSpec{categoryCreate}
    +		id, err := c.CreateCategory(ctx, &spec)
    +		if err != nil {
    +			// in case there are two docker daemon try to create inventory category, query the category once again
    +			if strings.Contains(err.Error(), "ErrAlreadyExists") {
    +				if categories, err = c.GetCategoriesByName(ctx, name); err != nil {
    +					Logger.Debugf("Failed to get inventory category for %s", errors.WithStack(err))
    +					return nil, errors.Wrap(err, "create inventory category failed")
    +				}
    +			} else {
    +				Logger.Debugf("Failed to create inventory category for %s", errors.WithStack(err))
    +				return nil, errors.Wrap(err, "create inventory category failed")
    +			}
    +		} else {
    +			return id, nil
    +		}
    +	}
    +	if categories != nil {
    +		return &categories[0].ID, nil
    +	}
    +	// should not happen
    +	Logger.Debugf("Failed to create inventory for it's existed, but could not query back. Please check system")
    +	return nil, errors.Errorf("Failed to create inventory for it's existed, but could not query back. Please check system")
    +}
    +
    +func (c *RestClient) CreateCategory(ctx context.Context, spec *CategoryCreateSpec) (*string, error) {
    +	Logger.Debugf("Create category %v", spec)
    +	stream, _, status, err := c.call(ctx, "POST", CategoryURL, spec, nil)
    +
    +	Logger.Debugf("Get status code: %d", status)
    +	if status != http.StatusOK || err != nil {
    +		Logger.Debugf("Create category failed with status code: %d, error message: %s", status, errors.WithStack(err))
    +		return nil, errors.Wrapf(err, "Status code: %d", status)
    +	}
    +
    +	type RespValue struct {
    +		Value string
    +	}
    +
    +	var pID RespValue
    +	if err := json.NewDecoder(stream).Decode(&pID); err != nil {
    +		Logger.Debugf("Decode response body failed for: %s", errors.WithStack(err))
    +		return nil, errors.Wrap(err, "create category failed")
    +	}
    +	return &(pID.Value), nil
    +}
    +
    +func (c *RestClient) GetCategory(ctx context.Context, id string) (*Category, error) {
    +	Logger.Debugf("Get category %s", id)
    +
    +	stream, _, status, err := c.call(ctx, "GET", fmt.Sprintf("%s/id:%s", CategoryURL, id), nil, nil)
    +
    +	if status != http.StatusOK || err != nil {
    +		Logger.Debugf("Get category failed with status code: %s, error message: %s", status, errors.WithStack(err))
    +		return nil, errors.Errorf("Status code: %d, error: %s", status, err)
    +	}
    +
    +	type RespValue struct {
    +		Value Category
    +	}
    +
    +	var pCategory RespValue
    +	if err := json.NewDecoder(stream).Decode(&pCategory); err != nil {
    +		Logger.Debugf("Decode response body failed for: %s", errors.WithStack(err))
    +		return nil, errors.Wrapf(err, "get category %s failed", id)
    +	}
    +	return &(pCategory.Value), nil
    +}
    +
    +func (c *RestClient) UpdateCategory(ctx context.Context, id string, spec *CategoryUpdateSpec) error {
    +	Logger.Debugf("Update category %v", spec)
    +	_, _, status, err := c.call(ctx, "PATCH", fmt.Sprintf("%s/id:%s", CategoryURL, id), spec, nil)
    +
    +	Logger.Debugf("Get status code: %d", status)
    +	if status != http.StatusOK || err != nil {
    +		Logger.Debugf("Update category failed with status code: %d, error message: %s", status, errors.WithStack(err))
    +		return errors.Wrapf(err, "Status code: %d", status)
    +	}
    +
    +	return nil
    +}
    +
    +func (c *RestClient) DeleteCategory(ctx context.Context, id string) error {
    +	Logger.Debugf("Delete category %s", id)
    +
    +	_, _, status, err := c.call(ctx, "DELETE", fmt.Sprintf("%s/id:%s", CategoryURL, id), nil, nil)
    +
    +	if status != http.StatusOK || err != nil {
    +		Logger.Debugf("Delete category failed with status code: %s, error message: %s", status, errors.WithStack(err))
    +		return errors.Errorf("Status code: %d, error: %s", status, err)
    +	}
    +	return nil
    +}
    +
    +func (c *RestClient) ListCategories(ctx context.Context) ([]string, error) {
    +	Logger.Debugf("List all categories")
    +
    +	stream, _, status, err := c.call(ctx, "GET", CategoryURL, nil, nil)
    +
    +	if status != http.StatusOK || err != nil {
    +		Logger.Debugf("Get categories failed with status code: %s, error message: %s", status, errors.WithStack(err))
    +		return nil, errors.Errorf("Status code: %d, error: %s", status, err)
    +	}
    +
    +	type Categories struct {
    +		Value []string
    +	}
    +
    +	var pCategories Categories
    +	if err := json.NewDecoder(stream).Decode(&pCategories); err != nil {
    +		Logger.Debugf("Decode response body failed for: %s", errors.WithStack(err))
    +		return nil, errors.Wrap(err, "list categories failed")
    +	}
    +	return pCategories.Value, nil
    +}
    +
    +func (c *RestClient) GetCategoriesByName(ctx context.Context, name string) ([]Category, error) {
    +	Logger.Debugf("Get category %s", name)
    +	categoryIds, err := c.ListCategories(ctx)
    +	if err != nil {
    +		Logger.Debugf("Get category failed for: %s", errors.WithStack(err))
    +		return nil, errors.Wrapf(err, "get categories by name %s failed", name)
    +	}
    +
    +	var categories []Category
    +	for _, cID := range categoryIds {
    +		category, err := c.GetCategory(ctx, cID)
    +		if err != nil {
    +			Logger.Debugf("Get category %s failed for %s", cID, errors.WithStack(err))
    +		}
    +		if category.Name == name {
    +			categories = append(categories, *category)
    +		}
    +	}
    +	return categories, nil
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/hashicorp/vic/pkg/vsphere/tags/rest_client.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/hashicorp/vic/pkg/vsphere/tags/rest_client.go
    new file mode 100644
    index 000000000..d2fd972d6
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/hashicorp/vic/pkg/vsphere/tags/rest_client.go
    @@ -0,0 +1,278 @@
    +// Copyright 2017 VMware, Inc. All Rights Reserved.
    +//
    +// 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.
    +
    +package tags
    +
    +import (
    +	"bytes"
    +	"context"
    +	"encoding/json"
    +	"io"
    +	"io/ioutil"
    +	"net/http"
    +	"net/url"
    +	"strings"
    +	"sync"
    +
    +	"github.com/pkg/errors"
    +
    +	"github.com/vmware/govmomi/vim25/soap"
    +)
    +
    +const (
    +	RestPrefix          = "/rest"
    +	loginURL            = "/com/vmware/cis/session"
    +	sessionIDCookieName = "vmware-api-session-id"
    +)
    +
    +type RestClient struct {
    +	mu       sync.Mutex
    +	host     string
    +	scheme   string
    +	endpoint *url.URL
    +	user     *url.Userinfo
    +	HTTP     *http.Client
    +	cookies  []*http.Cookie
    +}
    +
    +func NewClient(u *url.URL, insecure bool, thumbprint string) *RestClient {
    +	endpoint := &url.URL{}
    +	*endpoint = *u
    +	Logger.Debugf("Create rest client")
    +	endpoint.Path = RestPrefix
    +
    +	sc := soap.NewClient(endpoint, insecure)
    +	if thumbprint != "" {
    +		sc.SetThumbprint(endpoint.Host, thumbprint)
    +	}
    +
    +	user := endpoint.User
    +	endpoint.User = nil
    +
    +	return &RestClient{
    +		endpoint: endpoint,
    +		user:     user,
    +		host:     endpoint.Host,
    +		scheme:   endpoint.Scheme,
    +		HTTP:     &sc.Client,
    +	}
    +}
    +
    +// NewClientWithSessionID creates a new REST client with a supplied session ID
    +// to re-connect to existing sessions.
    +//
    +// Note that the session is not checked for validity - to check for a valid
    +// session after creating the client, use the Valid method. If the session is
    +// no longer valid and the session needs to be re-saved, Login should be called
    +// again before calling SessionID to extract the new session ID. Clients
    +// created with this function function work in the exact same way as clients
    +// created with NewClient, including supporting re-login on invalid sessions on
    +// all SDK calls.
    +func NewClientWithSessionID(u *url.URL, insecure bool, thumbprint string, sessionID string) *RestClient {
    +	c := NewClient(u, insecure, thumbprint)
    +	c.setSessionID(sessionID)
    +
    +	return c
    +}
    +
    +func (c *RestClient) encodeData(data interface{}) (*bytes.Buffer, error) {
    +	params := bytes.NewBuffer(nil)
    +	if data != nil {
    +		if err := json.NewEncoder(params).Encode(data); err != nil {
    +			return nil, errors.Wrap(err, "failed to encode json data")
    +		}
    +	}
    +	return params, nil
    +}
    +
    +func (c *RestClient) call(ctx context.Context, method, path string, data interface{}, headers map[string][]string) (io.ReadCloser, http.Header, int, error) {
    +	//	Logger.Debugf("%s: %s, headers: %+v", method, path, headers)
    +	params, err := c.encodeData(data)
    +	if err != nil {
    +		return nil, nil, -1, errors.Wrap(err, "call failed")
    +	}
    +
    +	if data != nil {
    +		if headers == nil {
    +			headers = make(map[string][]string)
    +		}
    +		headers["Content-Type"] = []string{"application/json"}
    +	}
    +
    +	body, hdr, statusCode, err := c.clientRequest(ctx, method, path, params, headers)
    +	if statusCode == http.StatusUnauthorized && strings.Contains(err.Error(), "This method requires authentication") {
    +		c.Login(ctx)
    +		Logger.Debugf("Rerun request after login")
    +		return c.clientRequest(ctx, method, path, params, headers)
    +	}
    +
    +	return body, hdr, statusCode, errors.Wrap(err, "call failed")
    +}
    +
    +func (c *RestClient) clientRequest(ctx context.Context, method, path string, in io.Reader, headers map[string][]string) (io.ReadCloser, http.Header, int, error) {
    +	expectedPayload := (method == "POST" || method == "PUT")
    +	if expectedPayload && in == nil {
    +		in = bytes.NewReader([]byte{})
    +	}
    +
    +	req, err := c.newRequest(method, path, in)
    +	if err != nil {
    +		return nil, nil, -1, errors.Wrap(err, "failed to create request")
    +	}
    +
    +	req = req.WithContext(ctx)
    +	c.mu.Lock()
    +	if c.cookies != nil {
    +		req.AddCookie(c.cookies[0])
    +	}
    +	c.mu.Unlock()
    +
    +	if headers != nil {
    +		for k, v := range headers {
    +			req.Header[k] = v
    +		}
    +	}
    +
    +	if expectedPayload && req.Header.Get("Content-Type") == "" {
    +		req.Header.Set("Content-Type", "application/json")
    +	}
    +	req.Header.Set("Accept", "application/json")
    +
    +	resp, err := c.HTTP.Do(req)
    +	return c.handleResponse(resp, err)
    +}
    +
    +func (c *RestClient) handleResponse(resp *http.Response, err error) (io.ReadCloser, http.Header, int, error) {
    +	statusCode := -1
    +	if resp != nil {
    +		statusCode = resp.StatusCode
    +	}
    +	if err != nil {
    +		if strings.Contains(err.Error(), "connection refused") {
    +			return nil, nil, statusCode, errors.Errorf("Cannot connect to endpoint %s. Is vCloud Suite API running on this server?", c.host)
    +		}
    +		return nil, nil, statusCode, errors.Wrap(err, "error occurred trying to connect")
    +	}
    +
    +	if statusCode < http.StatusOK || statusCode >= http.StatusBadRequest {
    +		body, err := ioutil.ReadAll(resp.Body)
    +		resp.Body.Close()
    +		if err != nil {
    +			return nil, nil, statusCode, errors.Wrap(err, "error reading response")
    +		}
    +		if len(body) == 0 {
    +			return nil, nil, statusCode, errors.Errorf("Error: request returned %s", http.StatusText(statusCode))
    +		}
    +		Logger.Debugf("Error response: %s", bytes.TrimSpace(body))
    +		return nil, nil, statusCode, errors.Errorf("Error response from vCloud Suite API: %s", bytes.TrimSpace(body))
    +	}
    +
    +	return resp.Body, resp.Header, statusCode, nil
    +}
    +
    +func (c *RestClient) Login(ctx context.Context) error {
    +	c.mu.Lock()
    +	defer c.mu.Unlock()
    +
    +	Logger.Debugf("Login to %s through rest API.", c.host)
    +
    +	request, err := c.newRequest("POST", loginURL, nil)
    +	if err != nil {
    +		return errors.Wrap(err, "login failed")
    +	}
    +	if c.user != nil {
    +		password, _ := c.user.Password()
    +		request.SetBasicAuth(c.user.Username(), password)
    +	}
    +	resp, err := c.HTTP.Do(request)
    +	if err != nil {
    +		return errors.Wrap(err, "login failed")
    +	}
    +	if resp == nil {
    +		return errors.New("response is nil in Login")
    +	}
    +	if resp.StatusCode != http.StatusOK {
    +		// #nosec: Errors unhandled.
    +		body, _ := ioutil.ReadAll(resp.Body)
    +		resp.Body.Close()
    +		return errors.Errorf("Login failed: body: %s, status: %s", bytes.TrimSpace(body), resp.Status)
    +	}
    +
    +	c.cookies = resp.Cookies()
    +
    +	Logger.Debugf("Login succeeded")
    +	return nil
    +}
    +
    +func (c *RestClient) newRequest(method, urlStr string, body io.Reader) (*http.Request, error) {
    +	return http.NewRequest(method, c.endpoint.String()+urlStr, body)
    +}
    +
    +// SessionID returns the current session ID of the REST client. An empty string
    +// means there was no session cookie currently loaded.
    +func (c *RestClient) SessionID() string {
    +	for _, cookie := range c.cookies {
    +		if cookie.Name == sessionIDCookieName {
    +			return cookie.Value
    +		}
    +	}
    +	return ""
    +}
    +
    +// setSessionID sets the session cookie with the supplied session ID.
    +//
    +// This does not necessarily mean the session is valid. The session should be
    +// checked with Valid before proceeding, and logged back in if it has expired.
    +//
    +// This function will overwrite any existing session.
    +func (c *RestClient) setSessionID(sessionID string) {
    +	Logger.Debugf("Setting existing session ID %q", sessionID)
    +	idx := -1
    +	for i, cookie := range c.cookies {
    +		if cookie.Name == sessionIDCookieName {
    +			idx = i
    +		}
    +	}
    +	sessionCookie := &http.Cookie{
    +		Name:  sessionIDCookieName,
    +		Value: sessionID,
    +		Path:  RestPrefix,
    +	}
    +	if idx > -1 {
    +		c.cookies[idx] = sessionCookie
    +	} else {
    +		c.cookies = append(c.cookies, sessionCookie)
    +	}
    +}
    +
    +// Valid checks to see if the session cookies in a REST client are still valid.
    +// This should be used when restoring a session to determine if a new login is
    +// necessary.
    +func (c *RestClient) Valid(ctx context.Context) bool {
    +	sessionID := c.SessionID()
    +	Logger.Debugf("Checking if session ID %q is still valid", sessionID)
    +
    +	_, _, statusCode, err := c.clientRequest(ctx, "POST", loginURL+"?~action=get", nil, nil)
    +	if err != nil {
    +		Logger.Debugf("Error getting current session information for ID %q - session is invalid (%d - %s)", sessionID, statusCode, err)
    +	}
    +
    +	if statusCode == http.StatusOK {
    +		Logger.Debugf("Session ID %q is valid", sessionID)
    +		return true
    +	}
    +
    +	Logger.Debugf("Session is invalid for %v (%d)", sessionID, statusCode)
    +	return false
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/hashicorp/vic/pkg/vsphere/tags/tag_association.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/hashicorp/vic/pkg/vsphere/tags/tag_association.go
    new file mode 100644
    index 000000000..4eb0cd50b
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/hashicorp/vic/pkg/vsphere/tags/tag_association.go
    @@ -0,0 +1,135 @@
    +// Copyright 2017 VMware, Inc. All Rights Reserved.
    +//
    +// 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.
    +
    +package tags
    +
    +import (
    +	"context"
    +	"encoding/json"
    +	"fmt"
    +	"net/http"
    +
    +	"github.com/pkg/errors"
    +)
    +
    +const (
    +	TagAssociationURL = "/com/vmware/cis/tagging/tag-association"
    +)
    +
    +type AssociatedObject struct {
    +	ID   *string `json:"id"`
    +	Type *string `json:"type"`
    +}
    +
    +type TagAssociationSpec struct {
    +	ObjectID *AssociatedObject `json:"object_id,omitempty"`
    +	TagID    *string           `json:"tag_id,omitempty"`
    +}
    +
    +func (c *RestClient) getAssociatedObject(objID *string, objType *string) *AssociatedObject {
    +	if objID == nil && objType == nil {
    +		return nil
    +	}
    +	object := AssociatedObject{
    +		ID:   objID,
    +		Type: objType,
    +	}
    +	return &object
    +}
    +
    +func (c *RestClient) getAssociationSpec(tagID *string, objID *string, objType *string) *TagAssociationSpec {
    +	object := c.getAssociatedObject(objID, objType)
    +	spec := TagAssociationSpec{
    +		TagID:    tagID,
    +		ObjectID: object,
    +	}
    +	return &spec
    +}
    +
    +func (c *RestClient) AttachTagToObject(ctx context.Context, tagID string, objID string, objType string) error {
    +	Logger.Debugf("Attach Tag %s to object id: %s, type: %s", tagID, objID, objType)
    +
    +	spec := c.getAssociationSpec(&tagID, &objID, &objType)
    +	_, _, status, err := c.call(ctx, "POST", fmt.Sprintf("%s?~action=attach", TagAssociationURL), *spec, nil)
    +
    +	Logger.Debugf("Get status code: %d", status)
    +	if status != http.StatusOK || err != nil {
    +		Logger.Debugf("Attach tag failed with status code: %d, error message: %s", status, errors.WithStack(err))
    +		return errors.Wrapf(err, "Get unexpected status code: %d", status)
    +	}
    +	return nil
    +}
    +
    +func (c *RestClient) DetachTagFromObject(ctx context.Context, tagID string, objID string, objType string) error {
    +	Logger.Debugf("Detach Tag %s to object id: %s, type: %s", tagID, objID, objType)
    +
    +	spec := c.getAssociationSpec(&tagID, &objID, &objType)
    +	_, _, status, err := c.call(ctx, "POST", fmt.Sprintf("%s?~action=detach", TagAssociationURL), *spec, nil)
    +
    +	Logger.Debugf("Get status code: %d", status)
    +	if status != http.StatusOK || err != nil {
    +		Logger.Debugf("Detach tag failed with status code: %d, error message: %s", status, errors.WithStack(err))
    +		return errors.Wrapf(err, "Get unexpected status code: %d", status)
    +	}
    +	return nil
    +}
    +
    +func (c *RestClient) ListAttachedTags(ctx context.Context, objID string, objType string) ([]string, error) {
    +	Logger.Debugf("List attached tags of object id: %s, type: %s", objID, objType)
    +
    +	spec := c.getAssociationSpec(nil, &objID, &objType)
    +	stream, _, status, err := c.call(ctx, "POST", fmt.Sprintf("%s?~action=list-attached-tags", TagAssociationURL), *spec, nil)
    +
    +	Logger.Debugf("Get status code: %d", status)
    +	if status != http.StatusOK || err != nil {
    +		Logger.Debugf("Detach tag failed with status code: %d, error message: %s", status, errors.WithStack(err))
    +		return nil, errors.Wrapf(err, "Get unexpected status code: %d", status)
    +	}
    +
    +	type RespValue struct {
    +		Value []string
    +	}
    +
    +	var pTag RespValue
    +	if err := json.NewDecoder(stream).Decode(&pTag); err != nil {
    +		Logger.Debugf("Decode response body failed for: %s", errors.WithStack(err))
    +		return nil, errors.Wrap(err, "list attached tags failed")
    +	}
    +	return pTag.Value, nil
    +}
    +
    +func (c *RestClient) ListAttachedObjects(ctx context.Context, tagID string) ([]AssociatedObject, error) {
    +	Logger.Debugf("List attached objects of tag: %s", tagID)
    +
    +	spec := c.getAssociationSpec(&tagID, nil, nil)
    +	Logger.Debugf("List attached objects for tag %v", *spec)
    +	//	stream, _, status, err := c.call("POST", fmt.Sprintf("%s?~action=list-attached-objects", TagAssociationURL), *spec, nil)
    +	stream, _, status, err := c.call(ctx, "POST", fmt.Sprintf("%s?~action=list-attached-objects", TagAssociationURL), *spec, nil)
    +	Logger.Debugf("Get status code: %d", status)
    +	if status != http.StatusOK || err != nil {
    +		Logger.Debugf("List object failed with status code: %d, error message: %s", status, errors.WithStack(err))
    +		return nil, errors.Wrapf(err, "Get unexpected status code: %d", status)
    +	}
    +
    +	type RespValue struct {
    +		Value []AssociatedObject
    +	}
    +
    +	var pTag RespValue
    +	if err := json.NewDecoder(stream).Decode(&pTag); err != nil {
    +		Logger.Debugf("Decode response body failed for: %s", errors.WithStack(err))
    +		return nil, errors.Wrap(err, "list attached tags failed")
    +	}
    +	return pTag.Value, nil
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/hashicorp/vic/pkg/vsphere/tags/tags.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/hashicorp/vic/pkg/vsphere/tags/tags.go
    new file mode 100644
    index 000000000..6e0c60fd9
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/hashicorp/vic/pkg/vsphere/tags/tags.go
    @@ -0,0 +1,255 @@
    +// Copyright 2017 VMware, Inc. All Rights Reserved.
    +//
    +// 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.
    +
    +package tags
    +
    +import (
    +	"context"
    +	"encoding/json"
    +	"fmt"
    +	"io"
    +	"net/http"
    +	"regexp"
    +	"strings"
    +
    +	"github.com/sirupsen/logrus"
    +	"github.com/pkg/errors"
    +)
    +
    +const (
    +	TagURL = "/com/vmware/cis/tagging/tag"
    +)
    +
    +type TagCreateSpec struct {
    +	CreateSpec TagCreate `json:"create_spec"`
    +}
    +
    +type TagCreate struct {
    +	CategoryID  string `json:"category_id"`
    +	Description string `json:"description"`
    +	Name        string `json:"name"`
    +}
    +
    +type TagUpdateSpec struct {
    +	UpdateSpec TagUpdate `json:"update_spec"`
    +}
    +
    +type TagUpdate struct {
    +	Description string `json:"description"`
    +	Name        string `json:"name"`
    +}
    +
    +type Tag struct {
    +	ID          string   `json:"id"`
    +	Description string   `json:"description"`
    +	Name        string   `json:"name"`
    +	CategoryID  string   `json:"category_id"`
    +	UsedBy      []string `json:"used_by"`
    +}
    +
    +var Logger = logrus.New()
    +
    +func (c *RestClient) CreateTagIfNotExist(ctx context.Context, name string, description string, categoryID string) (*string, error) {
    +	tagCreate := TagCreate{categoryID, description, name}
    +	spec := TagCreateSpec{tagCreate}
    +	id, err := c.CreateTag(ctx, &spec)
    +	if err == nil {
    +		return id, nil
    +	}
    +	Logger.Debugf("Created tag %s failed for %s", errors.WithStack(err))
    +	// if already exists, query back
    +	if strings.Contains(err.Error(), ErrAlreadyExists) {
    +		tagObjs, err := c.GetTagByNameForCategory(ctx, name, categoryID)
    +		if err != nil {
    +			return nil, errors.Wrapf(err, "failed to query tag %s for category %s", name, categoryID)
    +		}
    +		if tagObjs != nil {
    +			return &tagObjs[0].ID, nil
    +		}
    +
    +		// should not happen
    +		return nil, errors.New("Failed to create tag for it's existed, but could not query back. Please check system")
    +	}
    +
    +	return nil, errors.Wrap(err, "failed to create tag")
    +}
    +
    +func (c *RestClient) DeleteTagIfNoObjectAttached(ctx context.Context, id string) error {
    +	objs, err := c.ListAttachedObjects(ctx, id)
    +	if err != nil {
    +		return errors.Wrap(err, "failed to delete tag")
    +	}
    +	if objs != nil && len(objs) > 0 {
    +		Logger.Debugf("tag %s related objects is not empty, do not delete it.", id)
    +		return nil
    +	}
    +	return c.DeleteTag(ctx, id)
    +}
    +
    +func (c *RestClient) CreateTag(ctx context.Context, spec *TagCreateSpec) (*string, error) {
    +	Logger.Debugf("Create Tag %v", spec)
    +	stream, _, status, err := c.call(ctx, "POST", TagURL, spec, nil)
    +
    +	Logger.Debugf("Get status code: %d", status)
    +	if status != http.StatusOK || err != nil {
    +		Logger.Debugf("Create tag failed with status code: %d, error message: %s", status, errors.WithStack(err))
    +		return nil, errors.Wrapf(err, "Status code: %d", status)
    +	}
    +
    +	type RespValue struct {
    +		Value string
    +	}
    +
    +	var pID RespValue
    +	if err := json.NewDecoder(stream).Decode(&pID); err != nil {
    +		Logger.Debugf("Decode response body failed for: %s", errors.WithStack(err))
    +		return nil, errors.Wrap(err, "create tag failed")
    +	}
    +	return &pID.Value, nil
    +}
    +
    +func (c *RestClient) GetTag(ctx context.Context, id string) (*Tag, error) {
    +	Logger.Debugf("Get tag %s", id)
    +
    +	stream, _, status, err := c.call(ctx, "GET", fmt.Sprintf("%s/id:%s", TagURL, id), nil, nil)
    +
    +	if status != http.StatusOK || err != nil {
    +		Logger.Debugf("Get tag failed with status code: %s, error message: %s", status, errors.WithStack(err))
    +		return nil, errors.Wrapf(err, "Status code: %d", status)
    +	}
    +
    +	type RespValue struct {
    +		Value Tag
    +	}
    +
    +	var pTag RespValue
    +	if err := json.NewDecoder(stream).Decode(&pTag); err != nil {
    +		Logger.Debugf("Decode response body failed for: %s", errors.WithStack(err))
    +		return nil, errors.Wrapf(err, "failed to get tag %s", id)
    +	}
    +	return &(pTag.Value), nil
    +}
    +
    +func (c *RestClient) UpdateTag(ctx context.Context, id string, spec *TagUpdateSpec) error {
    +	Logger.Debugf("Update tag %v", spec)
    +	_, _, status, err := c.call(ctx, "PATCH", fmt.Sprintf("%s/id:%s", TagURL, id), spec, nil)
    +
    +	Logger.Debugf("Get status code: %d", status)
    +	if status != http.StatusOK || err != nil {
    +		Logger.Debugf("Update tag failed with status code: %d, error message: %s", status, errors.WithStack(err))
    +		return errors.Wrapf(err, "Status code: %d", status)
    +	}
    +
    +	return nil
    +}
    +
    +func (c *RestClient) DeleteTag(ctx context.Context, id string) error {
    +	Logger.Debugf("Delete tag %s", id)
    +
    +	_, _, status, err := c.call(ctx, "DELETE", fmt.Sprintf("%s/id:%s", TagURL, id), nil, nil)
    +
    +	if status != http.StatusOK || err != nil {
    +		Logger.Debugf("Delete tag failed with status code: %s, error message: %s", status, errors.WithStack(err))
    +		return errors.Wrapf(err, "Status code: %d", status)
    +	}
    +	return nil
    +}
    +
    +func (c *RestClient) ListTags(ctx context.Context) ([]string, error) {
    +	Logger.Debugf("List all tags")
    +
    +	stream, _, status, err := c.call(ctx, "GET", TagURL, nil, nil)
    +
    +	if status != http.StatusOK || err != nil {
    +		Logger.Debugf("Get tags failed with status code: %s, error message: %s", status, errors.WithStack(err))
    +		return nil, errors.Wrapf(err, "Status code: %d", status)
    +	}
    +
    +	return c.handleTagIDList(stream)
    +}
    +
    +func (c *RestClient) ListTagsForCategory(ctx context.Context, id string) ([]string, error) {
    +	Logger.Debugf("List tags for category: %s", id)
    +
    +	type PostCategory struct {
    +		CId string `json:"category_id"`
    +	}
    +	spec := PostCategory{id}
    +	stream, _, status, err := c.call(ctx, "POST", fmt.Sprintf("%s/id:%s?~action=list-tags-for-category", TagURL, id), spec, nil)
    +
    +	if status != http.StatusOK || err != nil {
    +		Logger.Debugf("List tags for category failed with status code: %s, error message: %s", status, errors.WithStack(err))
    +		return nil, errors.Wrapf(err, "Status code: %d", status)
    +	}
    +
    +	return c.handleTagIDList(stream)
    +}
    +
    +func (c *RestClient) handleTagIDList(stream io.ReadCloser) ([]string, error) {
    +	type Tags struct {
    +		Value []string
    +	}
    +
    +	var pTags Tags
    +	if err := json.NewDecoder(stream).Decode(&pTags); err != nil {
    +		Logger.Debugf("Decode response body failed for: %s", errors.WithStack(err))
    +		return nil, errors.Wrap(err, "failed to decode json")
    +	}
    +	return pTags.Value, nil
    +}
    +
    +// Get tag through tag name and category id
    +func (c *RestClient) GetTagByNameForCategory(ctx context.Context, name string, id string) ([]Tag, error) {
    +	Logger.Debugf("Get tag %s for category %s", name, id)
    +	tagIds, err := c.ListTagsForCategory(ctx, id)
    +	if err != nil {
    +		Logger.Debugf("Get tag failed for %s", errors.WithStack(err))
    +		return nil, errors.Wrapf(err, "get tag failed for name %s category %s", name, id)
    +	}
    +
    +	var tags []Tag
    +	for _, tID := range tagIds {
    +		tag, err := c.GetTag(ctx, tID)
    +		if err != nil {
    +			Logger.Debugf("Get tag %s failed for %s", tID, errors.WithStack(err))
    +			return nil, errors.Wrapf(err, "get tag failed for name %s category %s", name, id)
    +		}
    +		if tag.Name == name {
    +			tags = append(tags, *tag)
    +		}
    +	}
    +	return tags, nil
    +}
    +
    +// Get attached tags through tag name pattern
    +func (c *RestClient) GetAttachedTagsByNamePattern(ctx context.Context, namePattern string, objID string, objType string) ([]Tag, error) {
    +	tagIds, err := c.ListAttachedTags(ctx, objID, objType)
    +	if err != nil {
    +		Logger.Debugf("Get attached tags failed for %s", errors.WithStack(err))
    +		return nil, errors.Wrap(err, "get attached tags failed")
    +	}
    +
    +	var validName = regexp.MustCompile(namePattern)
    +	var tags []Tag
    +	for _, tID := range tagIds {
    +		tag, err := c.GetTag(ctx, tID)
    +		if err != nil {
    +			Logger.Debugf("Get tag %s failed for %s", tID, errors.WithStack(err))
    +		}
    +		if validName.MatchString(tag.Name) {
    +			tags = append(tags, *tag)
    +		}
    +	}
    +	return tags, nil
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/pkg/errors/LICENSE b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/pkg/errors/LICENSE
    new file mode 100644
    index 000000000..835ba3e75
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/pkg/errors/LICENSE
    @@ -0,0 +1,23 @@
    +Copyright (c) 2015, Dave Cheney 
    +All rights reserved.
    +
    +Redistribution and use in source and binary forms, with or without
    +modification, are permitted provided that the following conditions are met:
    +
    +* Redistributions of source code must retain the above copyright notice, this
    +  list of conditions and the following disclaimer.
    +
    +* Redistributions in binary form must reproduce the above copyright notice,
    +  this list of conditions and the following disclaimer in the documentation
    +  and/or other materials provided with the distribution.
    +
    +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
    +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
    +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
    +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
    +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/pkg/errors/README.md b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/pkg/errors/README.md
    new file mode 100644
    index 000000000..6483ba2af
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/pkg/errors/README.md
    @@ -0,0 +1,52 @@
    +# errors [![Travis-CI](https://travis-ci.org/pkg/errors.svg)](https://travis-ci.org/pkg/errors) [![AppVeyor](https://ci.appveyor.com/api/projects/status/b98mptawhudj53ep/branch/master?svg=true)](https://ci.appveyor.com/project/davecheney/errors/branch/master) [![GoDoc](https://godoc.org/github.com/pkg/errors?status.svg)](http://godoc.org/github.com/pkg/errors) [![Report card](https://goreportcard.com/badge/github.com/pkg/errors)](https://goreportcard.com/report/github.com/pkg/errors) [![Sourcegraph](https://sourcegraph.com/github.com/pkg/errors/-/badge.svg)](https://sourcegraph.com/github.com/pkg/errors?badge)
    +
    +Package errors provides simple error handling primitives.
    +
    +`go get github.com/pkg/errors`
    +
    +The traditional error handling idiom in Go is roughly akin to
    +```go
    +if err != nil {
    +        return err
    +}
    +```
    +which applied recursively up the call stack results in error reports without context or debugging information. The errors package allows programmers to add context to the failure path in their code in a way that does not destroy the original value of the error.
    +
    +## Adding context to an error
    +
    +The errors.Wrap function returns a new error that adds context to the original error. For example
    +```go
    +_, err := ioutil.ReadAll(r)
    +if err != nil {
    +        return errors.Wrap(err, "read failed")
    +}
    +```
    +## Retrieving the cause of an error
    +
    +Using `errors.Wrap` constructs a stack of errors, adding context to the preceding error. Depending on the nature of the error it may be necessary to reverse the operation of errors.Wrap to retrieve the original error for inspection. Any error value which implements this interface can be inspected by `errors.Cause`.
    +```go
    +type causer interface {
    +        Cause() error
    +}
    +```
    +`errors.Cause` will recursively retrieve the topmost error which does not implement `causer`, which is assumed to be the original cause. For example:
    +```go
    +switch err := errors.Cause(err).(type) {
    +case *MyError:
    +        // handle specifically
    +default:
    +        // unknown error
    +}
    +```
    +
    +[Read the package documentation for more information](https://godoc.org/github.com/pkg/errors).
    +
    +## Contributing
    +
    +We welcome pull requests, bug fixes and issue reports. With that said, the bar for adding new symbols to this package is intentionally set high.
    +
    +Before proposing a change, please discuss your change by raising an issue.
    +
    +## License
    +
    +BSD-2-Clause
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/pkg/errors/appveyor.yml b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/pkg/errors/appveyor.yml
    new file mode 100644
    index 000000000..a932eade0
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/pkg/errors/appveyor.yml
    @@ -0,0 +1,32 @@
    +version: build-{build}.{branch}
    +
    +clone_folder: C:\gopath\src\github.com\pkg\errors
    +shallow_clone: true # for startup speed
    +
    +environment:
    +  GOPATH: C:\gopath
    +
    +platform:
    +  - x64
    +
    +# http://www.appveyor.com/docs/installed-software
    +install:
    +  # some helpful output for debugging builds
    +  - go version
    +  - go env
    +  # pre-installed MinGW at C:\MinGW is 32bit only
    +  # but MSYS2 at C:\msys64 has mingw64
    +  - set PATH=C:\msys64\mingw64\bin;%PATH%
    +  - gcc --version
    +  - g++ --version
    +
    +build_script:
    +  - go install -v ./...
    +
    +test_script:
    +  - set PATH=C:\gopath\bin;%PATH%
    +  - go test -v ./...
    +
    +#artifacts:
    +#  - path: '%GOPATH%\bin\*.exe'
    +deploy: off
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/pkg/errors/errors.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/pkg/errors/errors.go
    new file mode 100644
    index 000000000..842ee8045
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/pkg/errors/errors.go
    @@ -0,0 +1,269 @@
    +// Package errors provides simple error handling primitives.
    +//
    +// The traditional error handling idiom in Go is roughly akin to
    +//
    +//     if err != nil {
    +//             return err
    +//     }
    +//
    +// which applied recursively up the call stack results in error reports
    +// without context or debugging information. The errors package allows
    +// programmers to add context to the failure path in their code in a way
    +// that does not destroy the original value of the error.
    +//
    +// Adding context to an error
    +//
    +// The errors.Wrap function returns a new error that adds context to the
    +// original error by recording a stack trace at the point Wrap is called,
    +// and the supplied message. For example
    +//
    +//     _, err := ioutil.ReadAll(r)
    +//     if err != nil {
    +//             return errors.Wrap(err, "read failed")
    +//     }
    +//
    +// If additional control is required the errors.WithStack and errors.WithMessage
    +// functions destructure errors.Wrap into its component operations of annotating
    +// an error with a stack trace and an a message, respectively.
    +//
    +// Retrieving the cause of an error
    +//
    +// Using errors.Wrap constructs a stack of errors, adding context to the
    +// preceding error. Depending on the nature of the error it may be necessary
    +// to reverse the operation of errors.Wrap to retrieve the original error
    +// for inspection. Any error value which implements this interface
    +//
    +//     type causer interface {
    +//             Cause() error
    +//     }
    +//
    +// can be inspected by errors.Cause. errors.Cause will recursively retrieve
    +// the topmost error which does not implement causer, which is assumed to be
    +// the original cause. For example:
    +//
    +//     switch err := errors.Cause(err).(type) {
    +//     case *MyError:
    +//             // handle specifically
    +//     default:
    +//             // unknown error
    +//     }
    +//
    +// causer interface is not exported by this package, but is considered a part
    +// of stable public API.
    +//
    +// Formatted printing of errors
    +//
    +// All error values returned from this package implement fmt.Formatter and can
    +// be formatted by the fmt package. The following verbs are supported
    +//
    +//     %s    print the error. If the error has a Cause it will be
    +//           printed recursively
    +//     %v    see %s
    +//     %+v   extended format. Each Frame of the error's StackTrace will
    +//           be printed in detail.
    +//
    +// Retrieving the stack trace of an error or wrapper
    +//
    +// New, Errorf, Wrap, and Wrapf record a stack trace at the point they are
    +// invoked. This information can be retrieved with the following interface.
    +//
    +//     type stackTracer interface {
    +//             StackTrace() errors.StackTrace
    +//     }
    +//
    +// Where errors.StackTrace is defined as
    +//
    +//     type StackTrace []Frame
    +//
    +// The Frame type represents a call site in the stack trace. Frame supports
    +// the fmt.Formatter interface that can be used for printing information about
    +// the stack trace of this error. For example:
    +//
    +//     if err, ok := err.(stackTracer); ok {
    +//             for _, f := range err.StackTrace() {
    +//                     fmt.Printf("%+s:%d", f)
    +//             }
    +//     }
    +//
    +// stackTracer interface is not exported by this package, but is considered a part
    +// of stable public API.
    +//
    +// See the documentation for Frame.Format for more details.
    +package errors
    +
    +import (
    +	"fmt"
    +	"io"
    +)
    +
    +// New returns an error with the supplied message.
    +// New also records the stack trace at the point it was called.
    +func New(message string) error {
    +	return &fundamental{
    +		msg:   message,
    +		stack: callers(),
    +	}
    +}
    +
    +// Errorf formats according to a format specifier and returns the string
    +// as a value that satisfies error.
    +// Errorf also records the stack trace at the point it was called.
    +func Errorf(format string, args ...interface{}) error {
    +	return &fundamental{
    +		msg:   fmt.Sprintf(format, args...),
    +		stack: callers(),
    +	}
    +}
    +
    +// fundamental is an error that has a message and a stack, but no caller.
    +type fundamental struct {
    +	msg string
    +	*stack
    +}
    +
    +func (f *fundamental) Error() string { return f.msg }
    +
    +func (f *fundamental) Format(s fmt.State, verb rune) {
    +	switch verb {
    +	case 'v':
    +		if s.Flag('+') {
    +			io.WriteString(s, f.msg)
    +			f.stack.Format(s, verb)
    +			return
    +		}
    +		fallthrough
    +	case 's':
    +		io.WriteString(s, f.msg)
    +	case 'q':
    +		fmt.Fprintf(s, "%q", f.msg)
    +	}
    +}
    +
    +// WithStack annotates err with a stack trace at the point WithStack was called.
    +// If err is nil, WithStack returns nil.
    +func WithStack(err error) error {
    +	if err == nil {
    +		return nil
    +	}
    +	return &withStack{
    +		err,
    +		callers(),
    +	}
    +}
    +
    +type withStack struct {
    +	error
    +	*stack
    +}
    +
    +func (w *withStack) Cause() error { return w.error }
    +
    +func (w *withStack) Format(s fmt.State, verb rune) {
    +	switch verb {
    +	case 'v':
    +		if s.Flag('+') {
    +			fmt.Fprintf(s, "%+v", w.Cause())
    +			w.stack.Format(s, verb)
    +			return
    +		}
    +		fallthrough
    +	case 's':
    +		io.WriteString(s, w.Error())
    +	case 'q':
    +		fmt.Fprintf(s, "%q", w.Error())
    +	}
    +}
    +
    +// Wrap returns an error annotating err with a stack trace
    +// at the point Wrap is called, and the supplied message.
    +// If err is nil, Wrap returns nil.
    +func Wrap(err error, message string) error {
    +	if err == nil {
    +		return nil
    +	}
    +	err = &withMessage{
    +		cause: err,
    +		msg:   message,
    +	}
    +	return &withStack{
    +		err,
    +		callers(),
    +	}
    +}
    +
    +// Wrapf returns an error annotating err with a stack trace
    +// at the point Wrapf is call, and the format specifier.
    +// If err is nil, Wrapf returns nil.
    +func Wrapf(err error, format string, args ...interface{}) error {
    +	if err == nil {
    +		return nil
    +	}
    +	err = &withMessage{
    +		cause: err,
    +		msg:   fmt.Sprintf(format, args...),
    +	}
    +	return &withStack{
    +		err,
    +		callers(),
    +	}
    +}
    +
    +// WithMessage annotates err with a new message.
    +// If err is nil, WithMessage returns nil.
    +func WithMessage(err error, message string) error {
    +	if err == nil {
    +		return nil
    +	}
    +	return &withMessage{
    +		cause: err,
    +		msg:   message,
    +	}
    +}
    +
    +type withMessage struct {
    +	cause error
    +	msg   string
    +}
    +
    +func (w *withMessage) Error() string { return w.msg + ": " + w.cause.Error() }
    +func (w *withMessage) Cause() error  { return w.cause }
    +
    +func (w *withMessage) Format(s fmt.State, verb rune) {
    +	switch verb {
    +	case 'v':
    +		if s.Flag('+') {
    +			fmt.Fprintf(s, "%+v\n", w.Cause())
    +			io.WriteString(s, w.msg)
    +			return
    +		}
    +		fallthrough
    +	case 's', 'q':
    +		io.WriteString(s, w.Error())
    +	}
    +}
    +
    +// Cause returns the underlying cause of the error, if possible.
    +// An error value has a cause if it implements the following
    +// interface:
    +//
    +//     type causer interface {
    +//            Cause() error
    +//     }
    +//
    +// If the error does not implement Cause, the original error will
    +// be returned. If the error is nil, nil will be returned without further
    +// investigation.
    +func Cause(err error) error {
    +	type causer interface {
    +		Cause() error
    +	}
    +
    +	for err != nil {
    +		cause, ok := err.(causer)
    +		if !ok {
    +			break
    +		}
    +		err = cause.Cause()
    +	}
    +	return err
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/pkg/errors/stack.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/pkg/errors/stack.go
    new file mode 100644
    index 000000000..2874a048c
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/pkg/errors/stack.go
    @@ -0,0 +1,147 @@
    +package errors
    +
    +import (
    +	"fmt"
    +	"io"
    +	"path"
    +	"runtime"
    +	"strings"
    +)
    +
    +// Frame represents a program counter inside a stack frame.
    +type Frame uintptr
    +
    +// pc returns the program counter for this frame;
    +// multiple frames may have the same PC value.
    +func (f Frame) pc() uintptr { return uintptr(f) - 1 }
    +
    +// file returns the full path to the file that contains the
    +// function for this Frame's pc.
    +func (f Frame) file() string {
    +	fn := runtime.FuncForPC(f.pc())
    +	if fn == nil {
    +		return "unknown"
    +	}
    +	file, _ := fn.FileLine(f.pc())
    +	return file
    +}
    +
    +// line returns the line number of source code of the
    +// function for this Frame's pc.
    +func (f Frame) line() int {
    +	fn := runtime.FuncForPC(f.pc())
    +	if fn == nil {
    +		return 0
    +	}
    +	_, line := fn.FileLine(f.pc())
    +	return line
    +}
    +
    +// Format formats the frame according to the fmt.Formatter interface.
    +//
    +//    %s    source file
    +//    %d    source line
    +//    %n    function name
    +//    %v    equivalent to %s:%d
    +//
    +// Format accepts flags that alter the printing of some verbs, as follows:
    +//
    +//    %+s   function name and path of source file relative to the compile time
    +//          GOPATH separated by \n\t (\n\t)
    +//    %+v   equivalent to %+s:%d
    +func (f Frame) Format(s fmt.State, verb rune) {
    +	switch verb {
    +	case 's':
    +		switch {
    +		case s.Flag('+'):
    +			pc := f.pc()
    +			fn := runtime.FuncForPC(pc)
    +			if fn == nil {
    +				io.WriteString(s, "unknown")
    +			} else {
    +				file, _ := fn.FileLine(pc)
    +				fmt.Fprintf(s, "%s\n\t%s", fn.Name(), file)
    +			}
    +		default:
    +			io.WriteString(s, path.Base(f.file()))
    +		}
    +	case 'd':
    +		fmt.Fprintf(s, "%d", f.line())
    +	case 'n':
    +		name := runtime.FuncForPC(f.pc()).Name()
    +		io.WriteString(s, funcname(name))
    +	case 'v':
    +		f.Format(s, 's')
    +		io.WriteString(s, ":")
    +		f.Format(s, 'd')
    +	}
    +}
    +
    +// StackTrace is stack of Frames from innermost (newest) to outermost (oldest).
    +type StackTrace []Frame
    +
    +// Format formats the stack of Frames according to the fmt.Formatter interface.
    +//
    +//    %s	lists source files for each Frame in the stack
    +//    %v	lists the source file and line number for each Frame in the stack
    +//
    +// Format accepts flags that alter the printing of some verbs, as follows:
    +//
    +//    %+v   Prints filename, function, and line number for each Frame in the stack.
    +func (st StackTrace) Format(s fmt.State, verb rune) {
    +	switch verb {
    +	case 'v':
    +		switch {
    +		case s.Flag('+'):
    +			for _, f := range st {
    +				fmt.Fprintf(s, "\n%+v", f)
    +			}
    +		case s.Flag('#'):
    +			fmt.Fprintf(s, "%#v", []Frame(st))
    +		default:
    +			fmt.Fprintf(s, "%v", []Frame(st))
    +		}
    +	case 's':
    +		fmt.Fprintf(s, "%s", []Frame(st))
    +	}
    +}
    +
    +// stack represents a stack of program counters.
    +type stack []uintptr
    +
    +func (s *stack) Format(st fmt.State, verb rune) {
    +	switch verb {
    +	case 'v':
    +		switch {
    +		case st.Flag('+'):
    +			for _, pc := range *s {
    +				f := Frame(pc)
    +				fmt.Fprintf(st, "\n%+v", f)
    +			}
    +		}
    +	}
    +}
    +
    +func (s *stack) StackTrace() StackTrace {
    +	f := make([]Frame, len(*s))
    +	for i := 0; i < len(f); i++ {
    +		f[i] = Frame((*s)[i])
    +	}
    +	return f
    +}
    +
    +func callers() *stack {
    +	const depth = 32
    +	var pcs [depth]uintptr
    +	n := runtime.Callers(3, pcs[:])
    +	var st stack = pcs[0:n]
    +	return &st
    +}
    +
    +// funcname removes the path prefix component of a function's name reported by func.Name().
    +func funcname(name string) string {
    +	i := strings.LastIndex(name, "/")
    +	name = name[i+1:]
    +	i = strings.Index(name, ".")
    +	return name[i+1:]
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/CHANGELOG.md b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/CHANGELOG.md
    new file mode 100644
    index 000000000..1bd1deb29
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/CHANGELOG.md
    @@ -0,0 +1,123 @@
    +# 1.0.5
    +
    +* Fix hooks race (#707)
    +* Fix panic deadlock (#695)
    +
    +# 1.0.4
    +
    +* Fix race when adding hooks (#612)
    +* Fix terminal check in AppEngine (#635)
    +
    +# 1.0.3
    +
    +* Replace example files with testable examples
    +
    +# 1.0.2
    +
    +* bug: quote non-string values in text formatter (#583)
    +* Make (*Logger) SetLevel a public method
    +
    +# 1.0.1
    +
    +* bug: fix escaping in text formatter (#575)
    +
    +# 1.0.0
    +
    +* Officially changed name to lower-case
    +* bug: colors on Windows 10 (#541)
    +* bug: fix race in accessing level (#512)
    +
    +# 0.11.5
    +
    +* feature: add writer and writerlevel to entry (#372)
    +
    +# 0.11.4
    +
    +* bug: fix undefined variable on solaris (#493)
    +
    +# 0.11.3
    +
    +* formatter: configure quoting of empty values (#484)
    +* formatter: configure quoting character (default is `"`) (#484)
    +* bug: fix not importing io correctly in non-linux environments (#481)
    +
    +# 0.11.2
    +
    +* bug: fix windows terminal detection (#476)
    +
    +# 0.11.1
    +
    +* bug: fix tty detection with custom out (#471)
    +
    +# 0.11.0
    +
    +* performance: Use bufferpool to allocate (#370)
    +* terminal: terminal detection for app-engine (#343)
    +* feature: exit handler (#375)
    +
    +# 0.10.0
    +
    +* feature: Add a test hook (#180)
    +* feature: `ParseLevel` is now case-insensitive (#326)
    +* feature: `FieldLogger` interface that generalizes `Logger` and `Entry` (#308)
    +* performance: avoid re-allocations on `WithFields` (#335)
    +
    +# 0.9.0
    +
    +* logrus/text_formatter: don't emit empty msg
    +* logrus/hooks/airbrake: move out of main repository
    +* logrus/hooks/sentry: move out of main repository
    +* logrus/hooks/papertrail: move out of main repository
    +* logrus/hooks/bugsnag: move out of main repository
    +* logrus/core: run tests with `-race`
    +* logrus/core: detect TTY based on `stderr`
    +* logrus/core: support `WithError` on logger
    +* logrus/core: Solaris support
    +
    +# 0.8.7
    +
    +* logrus/core: fix possible race (#216)
    +* logrus/doc: small typo fixes and doc improvements
    +
    +
    +# 0.8.6
    +
    +* hooks/raven: allow passing an initialized client
    +
    +# 0.8.5
    +
    +* logrus/core: revert #208
    +
    +# 0.8.4
    +
    +* formatter/text: fix data race (#218)
    +
    +# 0.8.3
    +
    +* logrus/core: fix entry log level (#208)
    +* logrus/core: improve performance of text formatter by 40%
    +* logrus/core: expose `LevelHooks` type
    +* logrus/core: add support for DragonflyBSD and NetBSD
    +* formatter/text: print structs more verbosely
    +
    +# 0.8.2
    +
    +* logrus: fix more Fatal family functions
    +
    +# 0.8.1
    +
    +* logrus: fix not exiting on `Fatalf` and `Fatalln`
    +
    +# 0.8.0
    +
    +* logrus: defaults to stderr instead of stdout
    +* hooks/sentry: add special field for `*http.Request`
    +* formatter/text: ignore Windows for colors
    +
    +# 0.7.3
    +
    +* formatter/\*: allow configuration of timestamp layout
    +
    +# 0.7.2
    +
    +* formatter/text: Add configuration option for time format (#158)
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/LICENSE b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/LICENSE
    new file mode 100644
    index 000000000..f090cb42f
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/LICENSE
    @@ -0,0 +1,21 @@
    +The MIT License (MIT)
    +
    +Copyright (c) 2014 Simon Eskildsen
    +
    +Permission is hereby granted, free of charge, to any person obtaining a copy
    +of this software and associated documentation files (the "Software"), to deal
    +in the Software without restriction, including without limitation the rights
    +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    +copies of the Software, and to permit persons to whom the Software is
    +furnished to do so, subject to the following conditions:
    +
    +The above copyright notice and this permission notice shall be included in
    +all copies or substantial portions of the Software.
    +
    +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    +THE SOFTWARE.
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/README.md b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/README.md
    new file mode 100644
    index 000000000..072e99be3
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/README.md
    @@ -0,0 +1,461 @@
    +# Logrus :walrus: [![Build Status](https://travis-ci.org/sirupsen/logrus.svg?branch=master)](https://travis-ci.org/sirupsen/logrus) [![GoDoc](https://godoc.org/github.com/sirupsen/logrus?status.svg)](https://godoc.org/github.com/sirupsen/logrus)
    +
    +Logrus is a structured logger for Go (golang), completely API compatible with
    +the standard library logger.
    +
    +**Seeing weird case-sensitive problems?** It's in the past been possible to
    +import Logrus as both upper- and lower-case. Due to the Go package environment,
    +this caused issues in the community and we needed a standard. Some environments
    +experienced problems with the upper-case variant, so the lower-case was decided.
    +Everything using `logrus` will need to use the lower-case:
    +`github.com/sirupsen/logrus`. Any package that isn't, should be changed.
    +
    +To fix Glide, see [these
    +comments](https://github.com/sirupsen/logrus/issues/553#issuecomment-306591437).
    +For an in-depth explanation of the casing issue, see [this
    +comment](https://github.com/sirupsen/logrus/issues/570#issuecomment-313933276).
    +
    +**Are you interested in assisting in maintaining Logrus?** Currently I have a
    +lot of obligations, and I am unable to provide Logrus with the maintainership it
    +needs. If you'd like to help, please reach out to me at `simon at author's
    +username dot com`.
    +
    +Nicely color-coded in development (when a TTY is attached, otherwise just
    +plain text):
    +
    +![Colored](http://i.imgur.com/PY7qMwd.png)
    +
    +With `log.SetFormatter(&log.JSONFormatter{})`, for easy parsing by logstash
    +or Splunk:
    +
    +```json
    +{"animal":"walrus","level":"info","msg":"A group of walrus emerges from the
    +ocean","size":10,"time":"2014-03-10 19:57:38.562264131 -0400 EDT"}
    +
    +{"level":"warning","msg":"The group's number increased tremendously!",
    +"number":122,"omg":true,"time":"2014-03-10 19:57:38.562471297 -0400 EDT"}
    +
    +{"animal":"walrus","level":"info","msg":"A giant walrus appears!",
    +"size":10,"time":"2014-03-10 19:57:38.562500591 -0400 EDT"}
    +
    +{"animal":"walrus","level":"info","msg":"Tremendously sized cow enters the ocean.",
    +"size":9,"time":"2014-03-10 19:57:38.562527896 -0400 EDT"}
    +
    +{"level":"fatal","msg":"The ice breaks!","number":100,"omg":true,
    +"time":"2014-03-10 19:57:38.562543128 -0400 EDT"}
    +```
    +
    +With the default `log.SetFormatter(&log.TextFormatter{})` when a TTY is not
    +attached, the output is compatible with the
    +[logfmt](http://godoc.org/github.com/kr/logfmt) format:
    +
    +```text
    +time="2015-03-26T01:27:38-04:00" level=debug msg="Started observing beach" animal=walrus number=8
    +time="2015-03-26T01:27:38-04:00" level=info msg="A group of walrus emerges from the ocean" animal=walrus size=10
    +time="2015-03-26T01:27:38-04:00" level=warning msg="The group's number increased tremendously!" number=122 omg=true
    +time="2015-03-26T01:27:38-04:00" level=debug msg="Temperature changes" temperature=-4
    +time="2015-03-26T01:27:38-04:00" level=panic msg="It's over 9000!" animal=orca size=9009
    +time="2015-03-26T01:27:38-04:00" level=fatal msg="The ice breaks!" err=&{0x2082280c0 map[animal:orca size:9009] 2015-03-26 01:27:38.441574009 -0400 EDT panic It's over 9000!} number=100 omg=true
    +exit status 1
    +```
    +
    +#### Case-sensitivity
    +
    +The organization's name was changed to lower-case--and this will not be changed
    +back. If you are getting import conflicts due to case sensitivity, please use
    +the lower-case import: `github.com/sirupsen/logrus`.
    +
    +#### Example
    +
    +The simplest way to use Logrus is simply the package-level exported logger:
    +
    +```go
    +package main
    +
    +import (
    +  log "github.com/sirupsen/logrus"
    +)
    +
    +func main() {
    +  log.WithFields(log.Fields{
    +    "animal": "walrus",
    +  }).Info("A walrus appears")
    +}
    +```
    +
    +Note that it's completely api-compatible with the stdlib logger, so you can
    +replace your `log` imports everywhere with `log "github.com/sirupsen/logrus"`
    +and you'll now have the flexibility of Logrus. You can customize it all you
    +want:
    +
    +```go
    +package main
    +
    +import (
    +  "os"
    +  log "github.com/sirupsen/logrus"
    +)
    +
    +func init() {
    +  // Log as JSON instead of the default ASCII formatter.
    +  log.SetFormatter(&log.JSONFormatter{})
    +
    +  // Output to stdout instead of the default stderr
    +  // Can be any io.Writer, see below for File example
    +  log.SetOutput(os.Stdout)
    +
    +  // Only log the warning severity or above.
    +  log.SetLevel(log.WarnLevel)
    +}
    +
    +func main() {
    +  log.WithFields(log.Fields{
    +    "animal": "walrus",
    +    "size":   10,
    +  }).Info("A group of walrus emerges from the ocean")
    +
    +  log.WithFields(log.Fields{
    +    "omg":    true,
    +    "number": 122,
    +  }).Warn("The group's number increased tremendously!")
    +
    +  log.WithFields(log.Fields{
    +    "omg":    true,
    +    "number": 100,
    +  }).Fatal("The ice breaks!")
    +
    +  // A common pattern is to re-use fields between logging statements by re-using
    +  // the logrus.Entry returned from WithFields()
    +  contextLogger := log.WithFields(log.Fields{
    +    "common": "this is a common field",
    +    "other": "I also should be logged always",
    +  })
    +
    +  contextLogger.Info("I'll be logged with common and other field")
    +  contextLogger.Info("Me too")
    +}
    +```
    +
    +For more advanced usage such as logging to multiple locations from the same
    +application, you can also create an instance of the `logrus` Logger:
    +
    +```go
    +package main
    +
    +import (
    +  "os"
    +  "github.com/sirupsen/logrus"
    +)
    +
    +// Create a new instance of the logger. You can have any number of instances.
    +var log = logrus.New()
    +
    +func main() {
    +  // The API for setting attributes is a little different than the package level
    +  // exported logger. See Godoc.
    +  log.Out = os.Stdout
    +
    +  // You could set this to any `io.Writer` such as a file
    +  // file, err := os.OpenFile("logrus.log", os.O_CREATE|os.O_WRONLY, 0666)
    +  // if err == nil {
    +  //  log.Out = file
    +  // } else {
    +  //  log.Info("Failed to log to file, using default stderr")
    +  // }
    +
    +  log.WithFields(logrus.Fields{
    +    "animal": "walrus",
    +    "size":   10,
    +  }).Info("A group of walrus emerges from the ocean")
    +}
    +```
    +
    +#### Fields
    +
    +Logrus encourages careful, structured logging through logging fields instead of
    +long, unparseable error messages. For example, instead of: `log.Fatalf("Failed
    +to send event %s to topic %s with key %d")`, you should log the much more
    +discoverable:
    +
    +```go
    +log.WithFields(log.Fields{
    +  "event": event,
    +  "topic": topic,
    +  "key": key,
    +}).Fatal("Failed to send event")
    +```
    +
    +We've found this API forces you to think about logging in a way that produces
    +much more useful logging messages. We've been in countless situations where just
    +a single added field to a log statement that was already there would've saved us
    +hours. The `WithFields` call is optional.
    +
    +In general, with Logrus using any of the `printf`-family functions should be
    +seen as a hint you should add a field, however, you can still use the
    +`printf`-family functions with Logrus.
    +
    +#### Default Fields
    +
    +Often it's helpful to have fields _always_ attached to log statements in an
    +application or parts of one. For example, you may want to always log the
    +`request_id` and `user_ip` in the context of a request. Instead of writing
    +`log.WithFields(log.Fields{"request_id": request_id, "user_ip": user_ip})` on
    +every line, you can create a `logrus.Entry` to pass around instead:
    +
    +```go
    +requestLogger := log.WithFields(log.Fields{"request_id": request_id, "user_ip": user_ip})
    +requestLogger.Info("something happened on that request") # will log request_id and user_ip
    +requestLogger.Warn("something not great happened")
    +```
    +
    +#### Hooks
    +
    +You can add hooks for logging levels. For example to send errors to an exception
    +tracking service on `Error`, `Fatal` and `Panic`, info to StatsD or log to
    +multiple places simultaneously, e.g. syslog.
    +
    +Logrus comes with [built-in hooks](hooks/). Add those, or your custom hook, in
    +`init`:
    +
    +```go
    +import (
    +  log "github.com/sirupsen/logrus"
    +  "gopkg.in/gemnasium/logrus-airbrake-hook.v2" // the package is named "airbrake"
    +  logrus_syslog "github.com/sirupsen/logrus/hooks/syslog"
    +  "log/syslog"
    +)
    +
    +func init() {
    +
    +  // Use the Airbrake hook to report errors that have Error severity or above to
    +  // an exception tracker. You can create custom hooks, see the Hooks section.
    +  log.AddHook(airbrake.NewHook(123, "xyz", "production"))
    +
    +  hook, err := logrus_syslog.NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "")
    +  if err != nil {
    +    log.Error("Unable to connect to local syslog daemon")
    +  } else {
    +    log.AddHook(hook)
    +  }
    +}
    +```
    +Note: Syslog hook also support connecting to local syslog (Ex. "/dev/log" or "/var/run/syslog" or "/var/run/log"). For the detail, please check the [syslog hook README](hooks/syslog/README.md).
    +
    +A list of currently known of service hook can be found in this wiki [page](https://github.com/sirupsen/logrus/wiki/Hooks)
    +
    +
    +#### Level logging
    +
    +Logrus has six logging levels: Debug, Info, Warning, Error, Fatal and Panic.
    +
    +```go
    +log.Debug("Useful debugging information.")
    +log.Info("Something noteworthy happened!")
    +log.Warn("You should probably take a look at this.")
    +log.Error("Something failed but I'm not quitting.")
    +// Calls os.Exit(1) after logging
    +log.Fatal("Bye.")
    +// Calls panic() after logging
    +log.Panic("I'm bailing.")
    +```
    +
    +You can set the logging level on a `Logger`, then it will only log entries with
    +that severity or anything above it:
    +
    +```go
    +// Will log anything that is info or above (warn, error, fatal, panic). Default.
    +log.SetLevel(log.InfoLevel)
    +```
    +
    +It may be useful to set `log.Level = logrus.DebugLevel` in a debug or verbose
    +environment if your application has that.
    +
    +#### Entries
    +
    +Besides the fields added with `WithField` or `WithFields` some fields are
    +automatically added to all logging events:
    +
    +1. `time`. The timestamp when the entry was created.
    +2. `msg`. The logging message passed to `{Info,Warn,Error,Fatal,Panic}` after
    +   the `AddFields` call. E.g. `Failed to send event.`
    +3. `level`. The logging level. E.g. `info`.
    +
    +#### Environments
    +
    +Logrus has no notion of environment.
    +
    +If you wish for hooks and formatters to only be used in specific environments,
    +you should handle that yourself. For example, if your application has a global
    +variable `Environment`, which is a string representation of the environment you
    +could do:
    +
    +```go
    +import (
    +  log "github.com/sirupsen/logrus"
    +)
    +
    +init() {
    +  // do something here to set environment depending on an environment variable
    +  // or command-line flag
    +  if Environment == "production" {
    +    log.SetFormatter(&log.JSONFormatter{})
    +  } else {
    +    // The TextFormatter is default, you don't actually have to do this.
    +    log.SetFormatter(&log.TextFormatter{})
    +  }
    +}
    +```
    +
    +This configuration is how `logrus` was intended to be used, but JSON in
    +production is mostly only useful if you do log aggregation with tools like
    +Splunk or Logstash.
    +
    +#### Formatters
    +
    +The built-in logging formatters are:
    +
    +* `logrus.TextFormatter`. Logs the event in colors if stdout is a tty, otherwise
    +  without colors.
    +  * *Note:* to force colored output when there is no TTY, set the `ForceColors`
    +    field to `true`.  To force no colored output even if there is a TTY  set the
    +    `DisableColors` field to `true`. For Windows, see
    +    [github.com/mattn/go-colorable](https://github.com/mattn/go-colorable).
    +  * When colors are enabled, levels are truncated to 4 characters by default. To disable
    +    truncation set the `DisableLevelTruncation` field to `true`.
    +  * All options are listed in the [generated docs](https://godoc.org/github.com/sirupsen/logrus#TextFormatter).
    +* `logrus.JSONFormatter`. Logs fields as JSON.
    +  * All options are listed in the [generated docs](https://godoc.org/github.com/sirupsen/logrus#JSONFormatter).
    +
    +Third party logging formatters:
    +
    +* [`FluentdFormatter`](https://github.com/joonix/log). Formats entries that can be parsed by Kubernetes and Google Container Engine.
    +* [`logstash`](https://github.com/bshuster-repo/logrus-logstash-hook). Logs fields as [Logstash](http://logstash.net) Events.
    +* [`prefixed`](https://github.com/x-cray/logrus-prefixed-formatter). Displays log entry source along with alternative layout.
    +* [`zalgo`](https://github.com/aybabtme/logzalgo). Invoking the P͉̫o̳̼̊w̖͈̰͎e̬͔̭͂r͚̼̹̲ ̫͓͉̳͈ō̠͕͖̚f̝͍̠ ͕̲̞͖͑Z̖̫̤̫ͪa͉̬͈̗l͖͎g̳̥o̰̥̅!̣͔̲̻͊̄ ̙̘̦̹̦.
    +
    +You can define your formatter by implementing the `Formatter` interface,
    +requiring a `Format` method. `Format` takes an `*Entry`. `entry.Data` is a
    +`Fields` type (`map[string]interface{}`) with all your fields as well as the
    +default ones (see Entries section above):
    +
    +```go
    +type MyJSONFormatter struct {
    +}
    +
    +log.SetFormatter(new(MyJSONFormatter))
    +
    +func (f *MyJSONFormatter) Format(entry *Entry) ([]byte, error) {
    +  // Note this doesn't include Time, Level and Message which are available on
    +  // the Entry. Consult `godoc` on information about those fields or read the
    +  // source of the official loggers.
    +  serialized, err := json.Marshal(entry.Data)
    +    if err != nil {
    +      return nil, fmt.Errorf("Failed to marshal fields to JSON, %v", err)
    +    }
    +  return append(serialized, '\n'), nil
    +}
    +```
    +
    +#### Logger as an `io.Writer`
    +
    +Logrus can be transformed into an `io.Writer`. That writer is the end of an `io.Pipe` and it is your responsibility to close it.
    +
    +```go
    +w := logger.Writer()
    +defer w.Close()
    +
    +srv := http.Server{
    +    // create a stdlib log.Logger that writes to
    +    // logrus.Logger.
    +    ErrorLog: log.New(w, "", 0),
    +}
    +```
    +
    +Each line written to that writer will be printed the usual way, using formatters
    +and hooks. The level for those entries is `info`.
    +
    +This means that we can override the standard library logger easily:
    +
    +```go
    +logger := logrus.New()
    +logger.Formatter = &logrus.JSONFormatter{}
    +
    +// Use logrus for standard log output
    +// Note that `log` here references stdlib's log
    +// Not logrus imported under the name `log`.
    +log.SetOutput(logger.Writer())
    +```
    +
    +#### Rotation
    +
    +Log rotation is not provided with Logrus. Log rotation should be done by an
    +external program (like `logrotate(8)`) that can compress and delete old log
    +entries. It should not be a feature of the application-level logger.
    +
    +#### Tools
    +
    +| Tool | Description |
    +| ---- | ----------- |
    +|[Logrus Mate](https://github.com/gogap/logrus_mate)|Logrus mate is a tool for Logrus to manage loggers, you can initial logger's level, hook and formatter by config file, the logger will generated with different config at different environment.|
    +|[Logrus Viper Helper](https://github.com/heirko/go-contrib/tree/master/logrusHelper)|An Helper around Logrus to wrap with spf13/Viper to load configuration with fangs! And to simplify Logrus configuration use some behavior of [Logrus Mate](https://github.com/gogap/logrus_mate). [sample](https://github.com/heirko/iris-contrib/blob/master/middleware/logrus-logger/example) |
    +
    +#### Testing
    +
    +Logrus has a built in facility for asserting the presence of log messages. This is implemented through the `test` hook and provides:
    +
    +* decorators for existing logger (`test.NewLocal` and `test.NewGlobal`) which basically just add the `test` hook
    +* a test logger (`test.NewNullLogger`) that just records log messages (and does not output any):
    +
    +```go
    +import(
    +  "github.com/sirupsen/logrus"
    +  "github.com/sirupsen/logrus/hooks/test"
    +  "github.com/stretchr/testify/assert"
    +  "testing"
    +)
    +
    +func TestSomething(t*testing.T){
    +  logger, hook := test.NewNullLogger()
    +  logger.Error("Helloerror")
    +
    +  assert.Equal(t, 1, len(hook.Entries))
    +  assert.Equal(t, logrus.ErrorLevel, hook.LastEntry().Level)
    +  assert.Equal(t, "Helloerror", hook.LastEntry().Message)
    +
    +  hook.Reset()
    +  assert.Nil(t, hook.LastEntry())
    +}
    +```
    +
    +#### Fatal handlers
    +
    +Logrus can register one or more functions that will be called when any `fatal`
    +level message is logged. The registered handlers will be executed before
    +logrus performs a `os.Exit(1)`. This behavior may be helpful if callers need
    +to gracefully shutdown. Unlike a `panic("Something went wrong...")` call which can be intercepted with a deferred `recover` a call to `os.Exit(1)` can not be intercepted.
    +
    +```
    +...
    +handler := func() {
    +  // gracefully shutdown something...
    +}
    +logrus.RegisterExitHandler(handler)
    +...
    +```
    +
    +#### Thread safety
    +
    +By default, Logger is protected by a mutex for concurrent writes. The mutex is held when calling hooks and writing logs.
    +If you are sure such locking is not needed, you can call logger.SetNoLock() to disable the locking.
    +
    +Situation when locking is not needed includes:
    +
    +* You have no hooks registered, or hooks calling is already thread-safe.
    +
    +* Writing to logger.Out is already thread-safe, for example:
    +
    +  1) logger.Out is protected by locks.
    +
    +  2) logger.Out is a os.File handler opened with `O_APPEND` flag, and every write is smaller than 4k. (This allow multi-thread/multi-process writing)
    +
    +     (Refer to http://www.notthewizard.com/2014/06/17/are-files-appends-really-atomic/)
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/alt_exit.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/alt_exit.go
    new file mode 100644
    index 000000000..8af90637a
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/alt_exit.go
    @@ -0,0 +1,64 @@
    +package logrus
    +
    +// The following code was sourced and modified from the
    +// https://github.com/tebeka/atexit package governed by the following license:
    +//
    +// Copyright (c) 2012 Miki Tebeka .
    +//
    +// Permission is hereby granted, free of charge, to any person obtaining a copy of
    +// this software and associated documentation files (the "Software"), to deal in
    +// the Software without restriction, including without limitation the rights to
    +// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
    +// the Software, and to permit persons to whom the Software is furnished to do so,
    +// subject to the following conditions:
    +//
    +// The above copyright notice and this permission notice shall be included in all
    +// copies or substantial portions of the Software.
    +//
    +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
    +// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
    +// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
    +// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
    +// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    +
    +import (
    +	"fmt"
    +	"os"
    +)
    +
    +var handlers = []func(){}
    +
    +func runHandler(handler func()) {
    +	defer func() {
    +		if err := recover(); err != nil {
    +			fmt.Fprintln(os.Stderr, "Error: Logrus exit handler error:", err)
    +		}
    +	}()
    +
    +	handler()
    +}
    +
    +func runHandlers() {
    +	for _, handler := range handlers {
    +		runHandler(handler)
    +	}
    +}
    +
    +// Exit runs all the Logrus atexit handlers and then terminates the program using os.Exit(code)
    +func Exit(code int) {
    +	runHandlers()
    +	os.Exit(code)
    +}
    +
    +// RegisterExitHandler adds a Logrus Exit handler, call logrus.Exit to invoke
    +// all handlers. The handlers will also be invoked when any Fatal log entry is
    +// made.
    +//
    +// This method is useful when a caller wishes to use logrus to log a fatal
    +// message but also needs to gracefully shutdown. An example usecase could be
    +// closing database connections, or sending a alert that the application is
    +// closing.
    +func RegisterExitHandler(handler func()) {
    +	handlers = append(handlers, handler)
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/appveyor.yml b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/appveyor.yml
    new file mode 100644
    index 000000000..96c2ce15f
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/appveyor.yml
    @@ -0,0 +1,14 @@
    +version: "{build}"
    +platform: x64
    +clone_folder: c:\gopath\src\github.com\sirupsen\logrus
    +environment:  
    +  GOPATH: c:\gopath
    +branches:  
    +  only:
    +    - master
    +install:  
    +  - set PATH=%GOPATH%\bin;c:\go\bin;%PATH%
    +  - go version
    +build_script:  
    +  - go get -t
    +  - go test
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/doc.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/doc.go
    new file mode 100644
    index 000000000..da67aba06
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/doc.go
    @@ -0,0 +1,26 @@
    +/*
    +Package logrus is a structured logger for Go, completely API compatible with the standard library logger.
    +
    +
    +The simplest way to use Logrus is simply the package-level exported logger:
    +
    +  package main
    +
    +  import (
    +    log "github.com/sirupsen/logrus"
    +  )
    +
    +  func main() {
    +    log.WithFields(log.Fields{
    +      "animal": "walrus",
    +      "number": 1,
    +      "size":   10,
    +    }).Info("A walrus appears")
    +  }
    +
    +Output:
    +  time="2015-09-07T08:48:33Z" level=info msg="A walrus appears" animal=walrus number=1 size=10
    +
    +For a full guide visit https://github.com/sirupsen/logrus
    +*/
    +package logrus
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/entry.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/entry.go
    new file mode 100644
    index 000000000..473bd1a0d
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/entry.go
    @@ -0,0 +1,300 @@
    +package logrus
    +
    +import (
    +	"bytes"
    +	"fmt"
    +	"os"
    +	"sync"
    +	"time"
    +)
    +
    +var bufferPool *sync.Pool
    +
    +func init() {
    +	bufferPool = &sync.Pool{
    +		New: func() interface{} {
    +			return new(bytes.Buffer)
    +		},
    +	}
    +}
    +
    +// Defines the key when adding errors using WithError.
    +var ErrorKey = "error"
    +
    +// An entry is the final or intermediate Logrus logging entry. It contains all
    +// the fields passed with WithField{,s}. It's finally logged when Debug, Info,
    +// Warn, Error, Fatal or Panic is called on it. These objects can be reused and
    +// passed around as much as you wish to avoid field duplication.
    +type Entry struct {
    +	Logger *Logger
    +
    +	// Contains all the fields set by the user.
    +	Data Fields
    +
    +	// Time at which the log entry was created
    +	Time time.Time
    +
    +	// Level the log entry was logged at: Debug, Info, Warn, Error, Fatal or Panic
    +	// This field will be set on entry firing and the value will be equal to the one in Logger struct field.
    +	Level Level
    +
    +	// Message passed to Debug, Info, Warn, Error, Fatal or Panic
    +	Message string
    +
    +	// When formatter is called in entry.log(), an Buffer may be set to entry
    +	Buffer *bytes.Buffer
    +}
    +
    +func NewEntry(logger *Logger) *Entry {
    +	return &Entry{
    +		Logger: logger,
    +		// Default is five fields, give a little extra room
    +		Data: make(Fields, 5),
    +	}
    +}
    +
    +// Returns the string representation from the reader and ultimately the
    +// formatter.
    +func (entry *Entry) String() (string, error) {
    +	serialized, err := entry.Logger.Formatter.Format(entry)
    +	if err != nil {
    +		return "", err
    +	}
    +	str := string(serialized)
    +	return str, nil
    +}
    +
    +// Add an error as single field (using the key defined in ErrorKey) to the Entry.
    +func (entry *Entry) WithError(err error) *Entry {
    +	return entry.WithField(ErrorKey, err)
    +}
    +
    +// Add a single field to the Entry.
    +func (entry *Entry) WithField(key string, value interface{}) *Entry {
    +	return entry.WithFields(Fields{key: value})
    +}
    +
    +// Add a map of fields to the Entry.
    +func (entry *Entry) WithFields(fields Fields) *Entry {
    +	data := make(Fields, len(entry.Data)+len(fields))
    +	for k, v := range entry.Data {
    +		data[k] = v
    +	}
    +	for k, v := range fields {
    +		data[k] = v
    +	}
    +	return &Entry{Logger: entry.Logger, Data: data, Time: entry.Time}
    +}
    +
    +// Overrides the time of the Entry.
    +func (entry *Entry) WithTime(t time.Time) *Entry {
    +	return &Entry{Logger: entry.Logger, Data: entry.Data, Time: t}
    +}
    +
    +// This function is not declared with a pointer value because otherwise
    +// race conditions will occur when using multiple goroutines
    +func (entry Entry) log(level Level, msg string) {
    +	var buffer *bytes.Buffer
    +
    +	// Default to now, but allow users to override if they want.
    +	//
    +	// We don't have to worry about polluting future calls to Entry#log()
    +	// with this assignment because this function is declared with a
    +	// non-pointer receiver.
    +	if entry.Time.IsZero() {
    +		entry.Time = time.Now()
    +	}
    +
    +	entry.Level = level
    +	entry.Message = msg
    +
    +	entry.fireHooks()
    +
    +	buffer = bufferPool.Get().(*bytes.Buffer)
    +	buffer.Reset()
    +	defer bufferPool.Put(buffer)
    +	entry.Buffer = buffer
    +
    +	entry.write()
    +
    +	entry.Buffer = nil
    +
    +	// To avoid Entry#log() returning a value that only would make sense for
    +	// panic() to use in Entry#Panic(), we avoid the allocation by checking
    +	// directly here.
    +	if level <= PanicLevel {
    +		panic(&entry)
    +	}
    +}
    +
    +func (entry *Entry) fireHooks() {
    +	entry.Logger.mu.Lock()
    +	defer entry.Logger.mu.Unlock()
    +	err := entry.Logger.Hooks.Fire(entry.Level, entry)
    +	if err != nil {
    +		fmt.Fprintf(os.Stderr, "Failed to fire hook: %v\n", err)
    +	}
    +}
    +
    +func (entry *Entry) write() {
    +	serialized, err := entry.Logger.Formatter.Format(entry)
    +	entry.Logger.mu.Lock()
    +	defer entry.Logger.mu.Unlock()
    +	if err != nil {
    +		fmt.Fprintf(os.Stderr, "Failed to obtain reader, %v\n", err)
    +	} else {
    +		_, err = entry.Logger.Out.Write(serialized)
    +		if err != nil {
    +			fmt.Fprintf(os.Stderr, "Failed to write to log, %v\n", err)
    +		}
    +	}
    +}
    +
    +func (entry *Entry) Debug(args ...interface{}) {
    +	if entry.Logger.level() >= DebugLevel {
    +		entry.log(DebugLevel, fmt.Sprint(args...))
    +	}
    +}
    +
    +func (entry *Entry) Print(args ...interface{}) {
    +	entry.Info(args...)
    +}
    +
    +func (entry *Entry) Info(args ...interface{}) {
    +	if entry.Logger.level() >= InfoLevel {
    +		entry.log(InfoLevel, fmt.Sprint(args...))
    +	}
    +}
    +
    +func (entry *Entry) Warn(args ...interface{}) {
    +	if entry.Logger.level() >= WarnLevel {
    +		entry.log(WarnLevel, fmt.Sprint(args...))
    +	}
    +}
    +
    +func (entry *Entry) Warning(args ...interface{}) {
    +	entry.Warn(args...)
    +}
    +
    +func (entry *Entry) Error(args ...interface{}) {
    +	if entry.Logger.level() >= ErrorLevel {
    +		entry.log(ErrorLevel, fmt.Sprint(args...))
    +	}
    +}
    +
    +func (entry *Entry) Fatal(args ...interface{}) {
    +	if entry.Logger.level() >= FatalLevel {
    +		entry.log(FatalLevel, fmt.Sprint(args...))
    +	}
    +	Exit(1)
    +}
    +
    +func (entry *Entry) Panic(args ...interface{}) {
    +	if entry.Logger.level() >= PanicLevel {
    +		entry.log(PanicLevel, fmt.Sprint(args...))
    +	}
    +	panic(fmt.Sprint(args...))
    +}
    +
    +// Entry Printf family functions
    +
    +func (entry *Entry) Debugf(format string, args ...interface{}) {
    +	if entry.Logger.level() >= DebugLevel {
    +		entry.Debug(fmt.Sprintf(format, args...))
    +	}
    +}
    +
    +func (entry *Entry) Infof(format string, args ...interface{}) {
    +	if entry.Logger.level() >= InfoLevel {
    +		entry.Info(fmt.Sprintf(format, args...))
    +	}
    +}
    +
    +func (entry *Entry) Printf(format string, args ...interface{}) {
    +	entry.Infof(format, args...)
    +}
    +
    +func (entry *Entry) Warnf(format string, args ...interface{}) {
    +	if entry.Logger.level() >= WarnLevel {
    +		entry.Warn(fmt.Sprintf(format, args...))
    +	}
    +}
    +
    +func (entry *Entry) Warningf(format string, args ...interface{}) {
    +	entry.Warnf(format, args...)
    +}
    +
    +func (entry *Entry) Errorf(format string, args ...interface{}) {
    +	if entry.Logger.level() >= ErrorLevel {
    +		entry.Error(fmt.Sprintf(format, args...))
    +	}
    +}
    +
    +func (entry *Entry) Fatalf(format string, args ...interface{}) {
    +	if entry.Logger.level() >= FatalLevel {
    +		entry.Fatal(fmt.Sprintf(format, args...))
    +	}
    +	Exit(1)
    +}
    +
    +func (entry *Entry) Panicf(format string, args ...interface{}) {
    +	if entry.Logger.level() >= PanicLevel {
    +		entry.Panic(fmt.Sprintf(format, args...))
    +	}
    +}
    +
    +// Entry Println family functions
    +
    +func (entry *Entry) Debugln(args ...interface{}) {
    +	if entry.Logger.level() >= DebugLevel {
    +		entry.Debug(entry.sprintlnn(args...))
    +	}
    +}
    +
    +func (entry *Entry) Infoln(args ...interface{}) {
    +	if entry.Logger.level() >= InfoLevel {
    +		entry.Info(entry.sprintlnn(args...))
    +	}
    +}
    +
    +func (entry *Entry) Println(args ...interface{}) {
    +	entry.Infoln(args...)
    +}
    +
    +func (entry *Entry) Warnln(args ...interface{}) {
    +	if entry.Logger.level() >= WarnLevel {
    +		entry.Warn(entry.sprintlnn(args...))
    +	}
    +}
    +
    +func (entry *Entry) Warningln(args ...interface{}) {
    +	entry.Warnln(args...)
    +}
    +
    +func (entry *Entry) Errorln(args ...interface{}) {
    +	if entry.Logger.level() >= ErrorLevel {
    +		entry.Error(entry.sprintlnn(args...))
    +	}
    +}
    +
    +func (entry *Entry) Fatalln(args ...interface{}) {
    +	if entry.Logger.level() >= FatalLevel {
    +		entry.Fatal(entry.sprintlnn(args...))
    +	}
    +	Exit(1)
    +}
    +
    +func (entry *Entry) Panicln(args ...interface{}) {
    +	if entry.Logger.level() >= PanicLevel {
    +		entry.Panic(entry.sprintlnn(args...))
    +	}
    +}
    +
    +// Sprintlnn => Sprint no newline. This is to get the behavior of how
    +// fmt.Sprintln where spaces are always added between operands, regardless of
    +// their type. Instead of vendoring the Sprintln implementation to spare a
    +// string allocation, we do the simplest thing.
    +func (entry *Entry) sprintlnn(args ...interface{}) string {
    +	msg := fmt.Sprintln(args...)
    +	return msg[:len(msg)-1]
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/exported.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/exported.go
    new file mode 100644
    index 000000000..eb612a6f3
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/exported.go
    @@ -0,0 +1,201 @@
    +package logrus
    +
    +import (
    +	"io"
    +	"time"
    +)
    +
    +var (
    +	// std is the name of the standard logger in stdlib `log`
    +	std = New()
    +)
    +
    +func StandardLogger() *Logger {
    +	return std
    +}
    +
    +// SetOutput sets the standard logger output.
    +func SetOutput(out io.Writer) {
    +	std.SetOutput(out)
    +}
    +
    +// SetFormatter sets the standard logger formatter.
    +func SetFormatter(formatter Formatter) {
    +	std.mu.Lock()
    +	defer std.mu.Unlock()
    +	std.Formatter = formatter
    +}
    +
    +// SetLevel sets the standard logger level.
    +func SetLevel(level Level) {
    +	std.mu.Lock()
    +	defer std.mu.Unlock()
    +	std.SetLevel(level)
    +}
    +
    +// GetLevel returns the standard logger level.
    +func GetLevel() Level {
    +	std.mu.Lock()
    +	defer std.mu.Unlock()
    +	return std.level()
    +}
    +
    +// AddHook adds a hook to the standard logger hooks.
    +func AddHook(hook Hook) {
    +	std.mu.Lock()
    +	defer std.mu.Unlock()
    +	std.Hooks.Add(hook)
    +}
    +
    +// WithError creates an entry from the standard logger and adds an error to it, using the value defined in ErrorKey as key.
    +func WithError(err error) *Entry {
    +	return std.WithField(ErrorKey, err)
    +}
    +
    +// WithField creates an entry from the standard logger and adds a field to
    +// it. If you want multiple fields, use `WithFields`.
    +//
    +// Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal
    +// or Panic on the Entry it returns.
    +func WithField(key string, value interface{}) *Entry {
    +	return std.WithField(key, value)
    +}
    +
    +// WithFields creates an entry from the standard logger and adds multiple
    +// fields to it. This is simply a helper for `WithField`, invoking it
    +// once for each field.
    +//
    +// Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal
    +// or Panic on the Entry it returns.
    +func WithFields(fields Fields) *Entry {
    +	return std.WithFields(fields)
    +}
    +
    +// WithTime creats an entry from the standard logger and overrides the time of
    +// logs generated with it.
    +//
    +// Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal
    +// or Panic on the Entry it returns.
    +func WithTime(t time.Time) *Entry {
    +	return std.WithTime(t)
    +}
    +
    +// Debug logs a message at level Debug on the standard logger.
    +func Debug(args ...interface{}) {
    +	std.Debug(args...)
    +}
    +
    +// Print logs a message at level Info on the standard logger.
    +func Print(args ...interface{}) {
    +	std.Print(args...)
    +}
    +
    +// Info logs a message at level Info on the standard logger.
    +func Info(args ...interface{}) {
    +	std.Info(args...)
    +}
    +
    +// Warn logs a message at level Warn on the standard logger.
    +func Warn(args ...interface{}) {
    +	std.Warn(args...)
    +}
    +
    +// Warning logs a message at level Warn on the standard logger.
    +func Warning(args ...interface{}) {
    +	std.Warning(args...)
    +}
    +
    +// Error logs a message at level Error on the standard logger.
    +func Error(args ...interface{}) {
    +	std.Error(args...)
    +}
    +
    +// Panic logs a message at level Panic on the standard logger.
    +func Panic(args ...interface{}) {
    +	std.Panic(args...)
    +}
    +
    +// Fatal logs a message at level Fatal on the standard logger then the process will exit with status set to 1.
    +func Fatal(args ...interface{}) {
    +	std.Fatal(args...)
    +}
    +
    +// Debugf logs a message at level Debug on the standard logger.
    +func Debugf(format string, args ...interface{}) {
    +	std.Debugf(format, args...)
    +}
    +
    +// Printf logs a message at level Info on the standard logger.
    +func Printf(format string, args ...interface{}) {
    +	std.Printf(format, args...)
    +}
    +
    +// Infof logs a message at level Info on the standard logger.
    +func Infof(format string, args ...interface{}) {
    +	std.Infof(format, args...)
    +}
    +
    +// Warnf logs a message at level Warn on the standard logger.
    +func Warnf(format string, args ...interface{}) {
    +	std.Warnf(format, args...)
    +}
    +
    +// Warningf logs a message at level Warn on the standard logger.
    +func Warningf(format string, args ...interface{}) {
    +	std.Warningf(format, args...)
    +}
    +
    +// Errorf logs a message at level Error on the standard logger.
    +func Errorf(format string, args ...interface{}) {
    +	std.Errorf(format, args...)
    +}
    +
    +// Panicf logs a message at level Panic on the standard logger.
    +func Panicf(format string, args ...interface{}) {
    +	std.Panicf(format, args...)
    +}
    +
    +// Fatalf logs a message at level Fatal on the standard logger then the process will exit with status set to 1.
    +func Fatalf(format string, args ...interface{}) {
    +	std.Fatalf(format, args...)
    +}
    +
    +// Debugln logs a message at level Debug on the standard logger.
    +func Debugln(args ...interface{}) {
    +	std.Debugln(args...)
    +}
    +
    +// Println logs a message at level Info on the standard logger.
    +func Println(args ...interface{}) {
    +	std.Println(args...)
    +}
    +
    +// Infoln logs a message at level Info on the standard logger.
    +func Infoln(args ...interface{}) {
    +	std.Infoln(args...)
    +}
    +
    +// Warnln logs a message at level Warn on the standard logger.
    +func Warnln(args ...interface{}) {
    +	std.Warnln(args...)
    +}
    +
    +// Warningln logs a message at level Warn on the standard logger.
    +func Warningln(args ...interface{}) {
    +	std.Warningln(args...)
    +}
    +
    +// Errorln logs a message at level Error on the standard logger.
    +func Errorln(args ...interface{}) {
    +	std.Errorln(args...)
    +}
    +
    +// Panicln logs a message at level Panic on the standard logger.
    +func Panicln(args ...interface{}) {
    +	std.Panicln(args...)
    +}
    +
    +// Fatalln logs a message at level Fatal on the standard logger then the process will exit with status set to 1.
    +func Fatalln(args ...interface{}) {
    +	std.Fatalln(args...)
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/formatter.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/formatter.go
    new file mode 100644
    index 000000000..83c74947b
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/formatter.go
    @@ -0,0 +1,51 @@
    +package logrus
    +
    +import "time"
    +
    +const defaultTimestampFormat = time.RFC3339
    +
    +// The Formatter interface is used to implement a custom Formatter. It takes an
    +// `Entry`. It exposes all the fields, including the default ones:
    +//
    +// * `entry.Data["msg"]`. The message passed from Info, Warn, Error ..
    +// * `entry.Data["time"]`. The timestamp.
    +// * `entry.Data["level"]. The level the entry was logged at.
    +//
    +// Any additional fields added with `WithField` or `WithFields` are also in
    +// `entry.Data`. Format is expected to return an array of bytes which are then
    +// logged to `logger.Out`.
    +type Formatter interface {
    +	Format(*Entry) ([]byte, error)
    +}
    +
    +// This is to not silently overwrite `time`, `msg` and `level` fields when
    +// dumping it. If this code wasn't there doing:
    +//
    +//  logrus.WithField("level", 1).Info("hello")
    +//
    +// Would just silently drop the user provided level. Instead with this code
    +// it'll logged as:
    +//
    +//  {"level": "info", "fields.level": 1, "msg": "hello", "time": "..."}
    +//
    +// It's not exported because it's still using Data in an opinionated way. It's to
    +// avoid code duplication between the two default formatters.
    +func prefixFieldClashes(data Fields, fieldMap FieldMap) {
    +	timeKey := fieldMap.resolve(FieldKeyTime)
    +	if t, ok := data[timeKey]; ok {
    +		data["fields."+timeKey] = t
    +		delete(data, timeKey)
    +	}
    +
    +	msgKey := fieldMap.resolve(FieldKeyMsg)
    +	if m, ok := data[msgKey]; ok {
    +		data["fields."+msgKey] = m
    +		delete(data, msgKey)
    +	}
    +
    +	levelKey := fieldMap.resolve(FieldKeyLevel)
    +	if l, ok := data[levelKey]; ok {
    +		data["fields."+levelKey] = l
    +		delete(data, levelKey)
    +	}
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/hooks.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/hooks.go
    new file mode 100644
    index 000000000..3f151cdc3
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/hooks.go
    @@ -0,0 +1,34 @@
    +package logrus
    +
    +// A hook to be fired when logging on the logging levels returned from
    +// `Levels()` on your implementation of the interface. Note that this is not
    +// fired in a goroutine or a channel with workers, you should handle such
    +// functionality yourself if your call is non-blocking and you don't wish for
    +// the logging calls for levels returned from `Levels()` to block.
    +type Hook interface {
    +	Levels() []Level
    +	Fire(*Entry) error
    +}
    +
    +// Internal type for storing the hooks on a logger instance.
    +type LevelHooks map[Level][]Hook
    +
    +// Add a hook to an instance of logger. This is called with
    +// `log.Hooks.Add(new(MyHook))` where `MyHook` implements the `Hook` interface.
    +func (hooks LevelHooks) Add(hook Hook) {
    +	for _, level := range hook.Levels() {
    +		hooks[level] = append(hooks[level], hook)
    +	}
    +}
    +
    +// Fire all the hooks for the passed level. Used by `entry.log` to fire
    +// appropriate hooks for a log entry.
    +func (hooks LevelHooks) Fire(level Level, entry *Entry) error {
    +	for _, hook := range hooks[level] {
    +		if err := hook.Fire(entry); err != nil {
    +			return err
    +		}
    +	}
    +
    +	return nil
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/json_formatter.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/json_formatter.go
    new file mode 100644
    index 000000000..dab17610f
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/json_formatter.go
    @@ -0,0 +1,89 @@
    +package logrus
    +
    +import (
    +	"encoding/json"
    +	"fmt"
    +)
    +
    +type fieldKey string
    +
    +// FieldMap allows customization of the key names for default fields.
    +type FieldMap map[fieldKey]string
    +
    +// Default key names for the default fields
    +const (
    +	FieldKeyMsg   = "msg"
    +	FieldKeyLevel = "level"
    +	FieldKeyTime  = "time"
    +)
    +
    +func (f FieldMap) resolve(key fieldKey) string {
    +	if k, ok := f[key]; ok {
    +		return k
    +	}
    +
    +	return string(key)
    +}
    +
    +// JSONFormatter formats logs into parsable json
    +type JSONFormatter struct {
    +	// TimestampFormat sets the format used for marshaling timestamps.
    +	TimestampFormat string
    +
    +	// DisableTimestamp allows disabling automatic timestamps in output
    +	DisableTimestamp bool
    +
    +	// DataKey allows users to put all the log entry parameters into a nested dictionary at a given key.
    +	DataKey string
    +
    +	// FieldMap allows users to customize the names of keys for default fields.
    +	// As an example:
    +	// formatter := &JSONFormatter{
    +	//   	FieldMap: FieldMap{
    +	// 		 FieldKeyTime: "@timestamp",
    +	// 		 FieldKeyLevel: "@level",
    +	// 		 FieldKeyMsg: "@message",
    +	//    },
    +	// }
    +	FieldMap FieldMap
    +}
    +
    +// Format renders a single log entry
    +func (f *JSONFormatter) Format(entry *Entry) ([]byte, error) {
    +	data := make(Fields, len(entry.Data)+3)
    +	for k, v := range entry.Data {
    +		switch v := v.(type) {
    +		case error:
    +			// Otherwise errors are ignored by `encoding/json`
    +			// https://github.com/sirupsen/logrus/issues/137
    +			data[k] = v.Error()
    +		default:
    +			data[k] = v
    +		}
    +	}
    +
    +	if f.DataKey != "" {
    +		newData := make(Fields, 4)
    +		newData[f.DataKey] = data
    +		data = newData
    +	}
    +
    +	prefixFieldClashes(data, f.FieldMap)
    +
    +	timestampFormat := f.TimestampFormat
    +	if timestampFormat == "" {
    +		timestampFormat = defaultTimestampFormat
    +	}
    +
    +	if !f.DisableTimestamp {
    +		data[f.FieldMap.resolve(FieldKeyTime)] = entry.Time.Format(timestampFormat)
    +	}
    +	data[f.FieldMap.resolve(FieldKeyMsg)] = entry.Message
    +	data[f.FieldMap.resolve(FieldKeyLevel)] = entry.Level.String()
    +
    +	serialized, err := json.Marshal(data)
    +	if err != nil {
    +		return nil, fmt.Errorf("Failed to marshal fields to JSON, %v", err)
    +	}
    +	return append(serialized, '\n'), nil
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/logger.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/logger.go
    new file mode 100644
    index 000000000..342f7977d
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/logger.go
    @@ -0,0 +1,337 @@
    +package logrus
    +
    +import (
    +	"io"
    +	"os"
    +	"sync"
    +	"sync/atomic"
    +	"time"
    +)
    +
    +type Logger struct {
    +	// The logs are `io.Copy`'d to this in a mutex. It's common to set this to a
    +	// file, or leave it default which is `os.Stderr`. You can also set this to
    +	// something more adventorous, such as logging to Kafka.
    +	Out io.Writer
    +	// Hooks for the logger instance. These allow firing events based on logging
    +	// levels and log entries. For example, to send errors to an error tracking
    +	// service, log to StatsD or dump the core on fatal errors.
    +	Hooks LevelHooks
    +	// All log entries pass through the formatter before logged to Out. The
    +	// included formatters are `TextFormatter` and `JSONFormatter` for which
    +	// TextFormatter is the default. In development (when a TTY is attached) it
    +	// logs with colors, but to a file it wouldn't. You can easily implement your
    +	// own that implements the `Formatter` interface, see the `README` or included
    +	// formatters for examples.
    +	Formatter Formatter
    +	// The logging level the logger should log at. This is typically (and defaults
    +	// to) `logrus.Info`, which allows Info(), Warn(), Error() and Fatal() to be
    +	// logged.
    +	Level Level
    +	// Used to sync writing to the log. Locking is enabled by Default
    +	mu MutexWrap
    +	// Reusable empty entry
    +	entryPool sync.Pool
    +}
    +
    +type MutexWrap struct {
    +	lock     sync.Mutex
    +	disabled bool
    +}
    +
    +func (mw *MutexWrap) Lock() {
    +	if !mw.disabled {
    +		mw.lock.Lock()
    +	}
    +}
    +
    +func (mw *MutexWrap) Unlock() {
    +	if !mw.disabled {
    +		mw.lock.Unlock()
    +	}
    +}
    +
    +func (mw *MutexWrap) Disable() {
    +	mw.disabled = true
    +}
    +
    +// Creates a new logger. Configuration should be set by changing `Formatter`,
    +// `Out` and `Hooks` directly on the default logger instance. You can also just
    +// instantiate your own:
    +//
    +//    var log = &Logger{
    +//      Out: os.Stderr,
    +//      Formatter: new(JSONFormatter),
    +//      Hooks: make(LevelHooks),
    +//      Level: logrus.DebugLevel,
    +//    }
    +//
    +// It's recommended to make this a global instance called `log`.
    +func New() *Logger {
    +	return &Logger{
    +		Out:       os.Stderr,
    +		Formatter: new(TextFormatter),
    +		Hooks:     make(LevelHooks),
    +		Level:     InfoLevel,
    +	}
    +}
    +
    +func (logger *Logger) newEntry() *Entry {
    +	entry, ok := logger.entryPool.Get().(*Entry)
    +	if ok {
    +		return entry
    +	}
    +	return NewEntry(logger)
    +}
    +
    +func (logger *Logger) releaseEntry(entry *Entry) {
    +	logger.entryPool.Put(entry)
    +}
    +
    +// Adds a field to the log entry, note that it doesn't log until you call
    +// Debug, Print, Info, Warn, Error, Fatal or Panic. It only creates a log entry.
    +// If you want multiple fields, use `WithFields`.
    +func (logger *Logger) WithField(key string, value interface{}) *Entry {
    +	entry := logger.newEntry()
    +	defer logger.releaseEntry(entry)
    +	return entry.WithField(key, value)
    +}
    +
    +// Adds a struct of fields to the log entry. All it does is call `WithField` for
    +// each `Field`.
    +func (logger *Logger) WithFields(fields Fields) *Entry {
    +	entry := logger.newEntry()
    +	defer logger.releaseEntry(entry)
    +	return entry.WithFields(fields)
    +}
    +
    +// Add an error as single field to the log entry.  All it does is call
    +// `WithError` for the given `error`.
    +func (logger *Logger) WithError(err error) *Entry {
    +	entry := logger.newEntry()
    +	defer logger.releaseEntry(entry)
    +	return entry.WithError(err)
    +}
    +
    +// Overrides the time of the log entry.
    +func (logger *Logger) WithTime(t time.Time) *Entry {
    +	entry := logger.newEntry()
    +	defer logger.releaseEntry(entry)
    +	return entry.WithTime(t)
    +}
    +
    +func (logger *Logger) Debugf(format string, args ...interface{}) {
    +	if logger.level() >= DebugLevel {
    +		entry := logger.newEntry()
    +		entry.Debugf(format, args...)
    +		logger.releaseEntry(entry)
    +	}
    +}
    +
    +func (logger *Logger) Infof(format string, args ...interface{}) {
    +	if logger.level() >= InfoLevel {
    +		entry := logger.newEntry()
    +		entry.Infof(format, args...)
    +		logger.releaseEntry(entry)
    +	}
    +}
    +
    +func (logger *Logger) Printf(format string, args ...interface{}) {
    +	entry := logger.newEntry()
    +	entry.Printf(format, args...)
    +	logger.releaseEntry(entry)
    +}
    +
    +func (logger *Logger) Warnf(format string, args ...interface{}) {
    +	if logger.level() >= WarnLevel {
    +		entry := logger.newEntry()
    +		entry.Warnf(format, args...)
    +		logger.releaseEntry(entry)
    +	}
    +}
    +
    +func (logger *Logger) Warningf(format string, args ...interface{}) {
    +	if logger.level() >= WarnLevel {
    +		entry := logger.newEntry()
    +		entry.Warnf(format, args...)
    +		logger.releaseEntry(entry)
    +	}
    +}
    +
    +func (logger *Logger) Errorf(format string, args ...interface{}) {
    +	if logger.level() >= ErrorLevel {
    +		entry := logger.newEntry()
    +		entry.Errorf(format, args...)
    +		logger.releaseEntry(entry)
    +	}
    +}
    +
    +func (logger *Logger) Fatalf(format string, args ...interface{}) {
    +	if logger.level() >= FatalLevel {
    +		entry := logger.newEntry()
    +		entry.Fatalf(format, args...)
    +		logger.releaseEntry(entry)
    +	}
    +	Exit(1)
    +}
    +
    +func (logger *Logger) Panicf(format string, args ...interface{}) {
    +	if logger.level() >= PanicLevel {
    +		entry := logger.newEntry()
    +		entry.Panicf(format, args...)
    +		logger.releaseEntry(entry)
    +	}
    +}
    +
    +func (logger *Logger) Debug(args ...interface{}) {
    +	if logger.level() >= DebugLevel {
    +		entry := logger.newEntry()
    +		entry.Debug(args...)
    +		logger.releaseEntry(entry)
    +	}
    +}
    +
    +func (logger *Logger) Info(args ...interface{}) {
    +	if logger.level() >= InfoLevel {
    +		entry := logger.newEntry()
    +		entry.Info(args...)
    +		logger.releaseEntry(entry)
    +	}
    +}
    +
    +func (logger *Logger) Print(args ...interface{}) {
    +	entry := logger.newEntry()
    +	entry.Info(args...)
    +	logger.releaseEntry(entry)
    +}
    +
    +func (logger *Logger) Warn(args ...interface{}) {
    +	if logger.level() >= WarnLevel {
    +		entry := logger.newEntry()
    +		entry.Warn(args...)
    +		logger.releaseEntry(entry)
    +	}
    +}
    +
    +func (logger *Logger) Warning(args ...interface{}) {
    +	if logger.level() >= WarnLevel {
    +		entry := logger.newEntry()
    +		entry.Warn(args...)
    +		logger.releaseEntry(entry)
    +	}
    +}
    +
    +func (logger *Logger) Error(args ...interface{}) {
    +	if logger.level() >= ErrorLevel {
    +		entry := logger.newEntry()
    +		entry.Error(args...)
    +		logger.releaseEntry(entry)
    +	}
    +}
    +
    +func (logger *Logger) Fatal(args ...interface{}) {
    +	if logger.level() >= FatalLevel {
    +		entry := logger.newEntry()
    +		entry.Fatal(args...)
    +		logger.releaseEntry(entry)
    +	}
    +	Exit(1)
    +}
    +
    +func (logger *Logger) Panic(args ...interface{}) {
    +	if logger.level() >= PanicLevel {
    +		entry := logger.newEntry()
    +		entry.Panic(args...)
    +		logger.releaseEntry(entry)
    +	}
    +}
    +
    +func (logger *Logger) Debugln(args ...interface{}) {
    +	if logger.level() >= DebugLevel {
    +		entry := logger.newEntry()
    +		entry.Debugln(args...)
    +		logger.releaseEntry(entry)
    +	}
    +}
    +
    +func (logger *Logger) Infoln(args ...interface{}) {
    +	if logger.level() >= InfoLevel {
    +		entry := logger.newEntry()
    +		entry.Infoln(args...)
    +		logger.releaseEntry(entry)
    +	}
    +}
    +
    +func (logger *Logger) Println(args ...interface{}) {
    +	entry := logger.newEntry()
    +	entry.Println(args...)
    +	logger.releaseEntry(entry)
    +}
    +
    +func (logger *Logger) Warnln(args ...interface{}) {
    +	if logger.level() >= WarnLevel {
    +		entry := logger.newEntry()
    +		entry.Warnln(args...)
    +		logger.releaseEntry(entry)
    +	}
    +}
    +
    +func (logger *Logger) Warningln(args ...interface{}) {
    +	if logger.level() >= WarnLevel {
    +		entry := logger.newEntry()
    +		entry.Warnln(args...)
    +		logger.releaseEntry(entry)
    +	}
    +}
    +
    +func (logger *Logger) Errorln(args ...interface{}) {
    +	if logger.level() >= ErrorLevel {
    +		entry := logger.newEntry()
    +		entry.Errorln(args...)
    +		logger.releaseEntry(entry)
    +	}
    +}
    +
    +func (logger *Logger) Fatalln(args ...interface{}) {
    +	if logger.level() >= FatalLevel {
    +		entry := logger.newEntry()
    +		entry.Fatalln(args...)
    +		logger.releaseEntry(entry)
    +	}
    +	Exit(1)
    +}
    +
    +func (logger *Logger) Panicln(args ...interface{}) {
    +	if logger.level() >= PanicLevel {
    +		entry := logger.newEntry()
    +		entry.Panicln(args...)
    +		logger.releaseEntry(entry)
    +	}
    +}
    +
    +//When file is opened with appending mode, it's safe to
    +//write concurrently to a file (within 4k message on Linux).
    +//In these cases user can choose to disable the lock.
    +func (logger *Logger) SetNoLock() {
    +	logger.mu.Disable()
    +}
    +
    +func (logger *Logger) level() Level {
    +	return Level(atomic.LoadUint32((*uint32)(&logger.Level)))
    +}
    +
    +func (logger *Logger) SetLevel(level Level) {
    +	atomic.StoreUint32((*uint32)(&logger.Level), uint32(level))
    +}
    +
    +func (logger *Logger) SetOutput(out io.Writer) {
    +	logger.mu.Lock()
    +	defer logger.mu.Unlock()
    +	logger.Out = out
    +}
    +
    +func (logger *Logger) AddHook(hook Hook) {
    +	logger.mu.Lock()
    +	defer logger.mu.Unlock()
    +	logger.Hooks.Add(hook)
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/logrus.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/logrus.go
    new file mode 100644
    index 000000000..dd3899974
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/logrus.go
    @@ -0,0 +1,143 @@
    +package logrus
    +
    +import (
    +	"fmt"
    +	"log"
    +	"strings"
    +)
    +
    +// Fields type, used to pass to `WithFields`.
    +type Fields map[string]interface{}
    +
    +// Level type
    +type Level uint32
    +
    +// Convert the Level to a string. E.g. PanicLevel becomes "panic".
    +func (level Level) String() string {
    +	switch level {
    +	case DebugLevel:
    +		return "debug"
    +	case InfoLevel:
    +		return "info"
    +	case WarnLevel:
    +		return "warning"
    +	case ErrorLevel:
    +		return "error"
    +	case FatalLevel:
    +		return "fatal"
    +	case PanicLevel:
    +		return "panic"
    +	}
    +
    +	return "unknown"
    +}
    +
    +// ParseLevel takes a string level and returns the Logrus log level constant.
    +func ParseLevel(lvl string) (Level, error) {
    +	switch strings.ToLower(lvl) {
    +	case "panic":
    +		return PanicLevel, nil
    +	case "fatal":
    +		return FatalLevel, nil
    +	case "error":
    +		return ErrorLevel, nil
    +	case "warn", "warning":
    +		return WarnLevel, nil
    +	case "info":
    +		return InfoLevel, nil
    +	case "debug":
    +		return DebugLevel, nil
    +	}
    +
    +	var l Level
    +	return l, fmt.Errorf("not a valid logrus Level: %q", lvl)
    +}
    +
    +// A constant exposing all logging levels
    +var AllLevels = []Level{
    +	PanicLevel,
    +	FatalLevel,
    +	ErrorLevel,
    +	WarnLevel,
    +	InfoLevel,
    +	DebugLevel,
    +}
    +
    +// These are the different logging levels. You can set the logging level to log
    +// on your instance of logger, obtained with `logrus.New()`.
    +const (
    +	// PanicLevel level, highest level of severity. Logs and then calls panic with the
    +	// message passed to Debug, Info, ...
    +	PanicLevel Level = iota
    +	// FatalLevel level. Logs and then calls `os.Exit(1)`. It will exit even if the
    +	// logging level is set to Panic.
    +	FatalLevel
    +	// ErrorLevel level. Logs. Used for errors that should definitely be noted.
    +	// Commonly used for hooks to send errors to an error tracking service.
    +	ErrorLevel
    +	// WarnLevel level. Non-critical entries that deserve eyes.
    +	WarnLevel
    +	// InfoLevel level. General operational entries about what's going on inside the
    +	// application.
    +	InfoLevel
    +	// DebugLevel level. Usually only enabled when debugging. Very verbose logging.
    +	DebugLevel
    +)
    +
    +// Won't compile if StdLogger can't be realized by a log.Logger
    +var (
    +	_ StdLogger = &log.Logger{}
    +	_ StdLogger = &Entry{}
    +	_ StdLogger = &Logger{}
    +)
    +
    +// StdLogger is what your logrus-enabled library should take, that way
    +// it'll accept a stdlib logger and a logrus logger. There's no standard
    +// interface, this is the closest we get, unfortunately.
    +type StdLogger interface {
    +	Print(...interface{})
    +	Printf(string, ...interface{})
    +	Println(...interface{})
    +
    +	Fatal(...interface{})
    +	Fatalf(string, ...interface{})
    +	Fatalln(...interface{})
    +
    +	Panic(...interface{})
    +	Panicf(string, ...interface{})
    +	Panicln(...interface{})
    +}
    +
    +// The FieldLogger interface generalizes the Entry and Logger types
    +type FieldLogger interface {
    +	WithField(key string, value interface{}) *Entry
    +	WithFields(fields Fields) *Entry
    +	WithError(err error) *Entry
    +
    +	Debugf(format string, args ...interface{})
    +	Infof(format string, args ...interface{})
    +	Printf(format string, args ...interface{})
    +	Warnf(format string, args ...interface{})
    +	Warningf(format string, args ...interface{})
    +	Errorf(format string, args ...interface{})
    +	Fatalf(format string, args ...interface{})
    +	Panicf(format string, args ...interface{})
    +
    +	Debug(args ...interface{})
    +	Info(args ...interface{})
    +	Print(args ...interface{})
    +	Warn(args ...interface{})
    +	Warning(args ...interface{})
    +	Error(args ...interface{})
    +	Fatal(args ...interface{})
    +	Panic(args ...interface{})
    +
    +	Debugln(args ...interface{})
    +	Infoln(args ...interface{})
    +	Println(args ...interface{})
    +	Warnln(args ...interface{})
    +	Warningln(args ...interface{})
    +	Errorln(args ...interface{})
    +	Fatalln(args ...interface{})
    +	Panicln(args ...interface{})
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/terminal_bsd.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/terminal_bsd.go
    new file mode 100644
    index 000000000..4880d13d2
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/terminal_bsd.go
    @@ -0,0 +1,10 @@
    +// +build darwin freebsd openbsd netbsd dragonfly
    +// +build !appengine,!gopherjs
    +
    +package logrus
    +
    +import "golang.org/x/sys/unix"
    +
    +const ioctlReadTermios = unix.TIOCGETA
    +
    +type Termios unix.Termios
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/terminal_check_appengine.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/terminal_check_appengine.go
    new file mode 100644
    index 000000000..3de08e802
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/terminal_check_appengine.go
    @@ -0,0 +1,11 @@
    +// +build appengine gopherjs
    +
    +package logrus
    +
    +import (
    +	"io"
    +)
    +
    +func checkIfTerminal(w io.Writer) bool {
    +	return true
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go
    new file mode 100644
    index 000000000..067047a12
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go
    @@ -0,0 +1,19 @@
    +// +build !appengine,!gopherjs
    +
    +package logrus
    +
    +import (
    +	"io"
    +	"os"
    +
    +	"golang.org/x/crypto/ssh/terminal"
    +)
    +
    +func checkIfTerminal(w io.Writer) bool {
    +	switch v := w.(type) {
    +	case *os.File:
    +		return terminal.IsTerminal(int(v.Fd()))
    +	default:
    +		return false
    +	}
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/terminal_linux.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/terminal_linux.go
    new file mode 100644
    index 000000000..f29a0097c
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/terminal_linux.go
    @@ -0,0 +1,14 @@
    +// Based on ssh/terminal:
    +// Copyright 2013 The Go Authors. All rights reserved.
    +// Use of this source code is governed by a BSD-style
    +// license that can be found in the LICENSE file.
    +
    +// +build !appengine,!gopherjs
    +
    +package logrus
    +
    +import "golang.org/x/sys/unix"
    +
    +const ioctlReadTermios = unix.TCGETS
    +
    +type Termios unix.Termios
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/text_formatter.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/text_formatter.go
    new file mode 100644
    index 000000000..3e5504030
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/text_formatter.go
    @@ -0,0 +1,195 @@
    +package logrus
    +
    +import (
    +	"bytes"
    +	"fmt"
    +	"sort"
    +	"strings"
    +	"sync"
    +	"time"
    +)
    +
    +const (
    +	nocolor = 0
    +	red     = 31
    +	green   = 32
    +	yellow  = 33
    +	blue    = 36
    +	gray    = 37
    +)
    +
    +var (
    +	baseTimestamp time.Time
    +	emptyFieldMap FieldMap
    +)
    +
    +func init() {
    +	baseTimestamp = time.Now()
    +}
    +
    +// TextFormatter formats logs into text
    +type TextFormatter struct {
    +	// Set to true to bypass checking for a TTY before outputting colors.
    +	ForceColors bool
    +
    +	// Force disabling colors.
    +	DisableColors bool
    +
    +	// Disable timestamp logging. useful when output is redirected to logging
    +	// system that already adds timestamps.
    +	DisableTimestamp bool
    +
    +	// Enable logging the full timestamp when a TTY is attached instead of just
    +	// the time passed since beginning of execution.
    +	FullTimestamp bool
    +
    +	// TimestampFormat to use for display when a full timestamp is printed
    +	TimestampFormat string
    +
    +	// The fields are sorted by default for a consistent output. For applications
    +	// that log extremely frequently and don't use the JSON formatter this may not
    +	// be desired.
    +	DisableSorting bool
    +
    +	// Disables the truncation of the level text to 4 characters.
    +	DisableLevelTruncation bool
    +
    +	// QuoteEmptyFields will wrap empty fields in quotes if true
    +	QuoteEmptyFields bool
    +
    +	// Whether the logger's out is to a terminal
    +	isTerminal bool
    +
    +	// FieldMap allows users to customize the names of keys for default fields.
    +	// As an example:
    +	// formatter := &TextFormatter{
    +	//     FieldMap: FieldMap{
    +	//         FieldKeyTime:  "@timestamp",
    +	//         FieldKeyLevel: "@level",
    +	//         FieldKeyMsg:   "@message"}}
    +	FieldMap FieldMap
    +
    +	sync.Once
    +}
    +
    +func (f *TextFormatter) init(entry *Entry) {
    +	if entry.Logger != nil {
    +		f.isTerminal = checkIfTerminal(entry.Logger.Out)
    +	}
    +}
    +
    +// Format renders a single log entry
    +func (f *TextFormatter) Format(entry *Entry) ([]byte, error) {
    +	prefixFieldClashes(entry.Data, f.FieldMap)
    +
    +	keys := make([]string, 0, len(entry.Data))
    +	for k := range entry.Data {
    +		keys = append(keys, k)
    +	}
    +
    +	if !f.DisableSorting {
    +		sort.Strings(keys)
    +	}
    +
    +	var b *bytes.Buffer
    +	if entry.Buffer != nil {
    +		b = entry.Buffer
    +	} else {
    +		b = &bytes.Buffer{}
    +	}
    +
    +	f.Do(func() { f.init(entry) })
    +
    +	isColored := (f.ForceColors || f.isTerminal) && !f.DisableColors
    +
    +	timestampFormat := f.TimestampFormat
    +	if timestampFormat == "" {
    +		timestampFormat = defaultTimestampFormat
    +	}
    +	if isColored {
    +		f.printColored(b, entry, keys, timestampFormat)
    +	} else {
    +		if !f.DisableTimestamp {
    +			f.appendKeyValue(b, f.FieldMap.resolve(FieldKeyTime), entry.Time.Format(timestampFormat))
    +		}
    +		f.appendKeyValue(b, f.FieldMap.resolve(FieldKeyLevel), entry.Level.String())
    +		if entry.Message != "" {
    +			f.appendKeyValue(b, f.FieldMap.resolve(FieldKeyMsg), entry.Message)
    +		}
    +		for _, key := range keys {
    +			f.appendKeyValue(b, key, entry.Data[key])
    +		}
    +	}
    +
    +	b.WriteByte('\n')
    +	return b.Bytes(), nil
    +}
    +
    +func (f *TextFormatter) printColored(b *bytes.Buffer, entry *Entry, keys []string, timestampFormat string) {
    +	var levelColor int
    +	switch entry.Level {
    +	case DebugLevel:
    +		levelColor = gray
    +	case WarnLevel:
    +		levelColor = yellow
    +	case ErrorLevel, FatalLevel, PanicLevel:
    +		levelColor = red
    +	default:
    +		levelColor = blue
    +	}
    +
    +	levelText := strings.ToUpper(entry.Level.String())
    +	if !f.DisableLevelTruncation {
    +		levelText = levelText[0:4]
    +	}
    +
    +	if f.DisableTimestamp {
    +		fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m %-44s ", levelColor, levelText, entry.Message)
    +	} else if !f.FullTimestamp {
    +		fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m[%04d] %-44s ", levelColor, levelText, int(entry.Time.Sub(baseTimestamp)/time.Second), entry.Message)
    +	} else {
    +		fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m[%s] %-44s ", levelColor, levelText, entry.Time.Format(timestampFormat), entry.Message)
    +	}
    +	for _, k := range keys {
    +		v := entry.Data[k]
    +		fmt.Fprintf(b, " \x1b[%dm%s\x1b[0m=", levelColor, k)
    +		f.appendValue(b, v)
    +	}
    +}
    +
    +func (f *TextFormatter) needsQuoting(text string) bool {
    +	if f.QuoteEmptyFields && len(text) == 0 {
    +		return true
    +	}
    +	for _, ch := range text {
    +		if !((ch >= 'a' && ch <= 'z') ||
    +			(ch >= 'A' && ch <= 'Z') ||
    +			(ch >= '0' && ch <= '9') ||
    +			ch == '-' || ch == '.' || ch == '_' || ch == '/' || ch == '@' || ch == '^' || ch == '+') {
    +			return true
    +		}
    +	}
    +	return false
    +}
    +
    +func (f *TextFormatter) appendKeyValue(b *bytes.Buffer, key string, value interface{}) {
    +	if b.Len() > 0 {
    +		b.WriteByte(' ')
    +	}
    +	b.WriteString(key)
    +	b.WriteByte('=')
    +	f.appendValue(b, value)
    +}
    +
    +func (f *TextFormatter) appendValue(b *bytes.Buffer, value interface{}) {
    +	stringVal, ok := value.(string)
    +	if !ok {
    +		stringVal = fmt.Sprint(value)
    +	}
    +
    +	if !f.needsQuoting(stringVal) {
    +		b.WriteString(stringVal)
    +	} else {
    +		b.WriteString(fmt.Sprintf("%q", stringVal))
    +	}
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/writer.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/writer.go
    new file mode 100644
    index 000000000..7bdebedc6
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/sirupsen/logrus/writer.go
    @@ -0,0 +1,62 @@
    +package logrus
    +
    +import (
    +	"bufio"
    +	"io"
    +	"runtime"
    +)
    +
    +func (logger *Logger) Writer() *io.PipeWriter {
    +	return logger.WriterLevel(InfoLevel)
    +}
    +
    +func (logger *Logger) WriterLevel(level Level) *io.PipeWriter {
    +	return NewEntry(logger).WriterLevel(level)
    +}
    +
    +func (entry *Entry) Writer() *io.PipeWriter {
    +	return entry.WriterLevel(InfoLevel)
    +}
    +
    +func (entry *Entry) WriterLevel(level Level) *io.PipeWriter {
    +	reader, writer := io.Pipe()
    +
    +	var printFunc func(args ...interface{})
    +
    +	switch level {
    +	case DebugLevel:
    +		printFunc = entry.Debug
    +	case InfoLevel:
    +		printFunc = entry.Info
    +	case WarnLevel:
    +		printFunc = entry.Warn
    +	case ErrorLevel:
    +		printFunc = entry.Error
    +	case FatalLevel:
    +		printFunc = entry.Fatal
    +	case PanicLevel:
    +		printFunc = entry.Panic
    +	default:
    +		printFunc = entry.Print
    +	}
    +
    +	go entry.writerScanner(reader, printFunc)
    +	runtime.SetFinalizer(writer, writerFinalizer)
    +
    +	return writer
    +}
    +
    +func (entry *Entry) writerScanner(reader *io.PipeReader, printFunc func(args ...interface{})) {
    +	scanner := bufio.NewScanner(reader)
    +	for scanner.Scan() {
    +		printFunc(scanner.Text())
    +	}
    +	if err := scanner.Err(); err != nil {
    +		entry.Errorf("Error while reading from Writer: %s", err)
    +	}
    +	reader.Close()
    +}
    +
    +func writerFinalizer(writer *io.PipeWriter) {
    +	writer.Close()
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/CHANGELOG.md b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/CHANGELOG.md
    new file mode 100644
    index 000000000..1e0c1618b
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/CHANGELOG.md
    @@ -0,0 +1,313 @@
    +# changelog
    +
    +### 0.18.0 (2018-05-24)
    +
    +* Add VirtualDiskManager wrapper to set UUID
    +
    +* Add vmxnet2, pcnet32 and sriov to VirtualDeviceList.EthernetCardTypes
    +
    +* Add new vSphere 6.7 APIs
    +
    +* Decrease LoginExtensionByCertificate tunnel usage
    +
    +* SAML token authentication support via SessionManager.LoginByToken
    +
    +* New SSO admin client for managing users
    +
    +* New STS client for issuing and renewing SAML tokens
    +
    +* New Lookup Service client for discovering endpoints such as STS and ssoadmin
    +
    +* Switch from gvt to go dep for managing dependencies
    +
    +### 0.17.1 (2018-03-19)
    +
    +* vcsim: add Destroy method for Folder and Datacenter types
    +
    +* In progress.Reader emit final report on EOF.
    +
    +* vcsim: add EventManager.QueryEvents
    +
    +### 0.17.0 (2018-02-28)
    +
    +* Add HostStorageSystem.AttachScsiLun method
    +
    +* Avoid possible panic in Datastore.Stat (#969)
    +
    +* Destroy event history collectors (#962)
    +
    +* Add VirtualDiskManager.CreateChildDisk method
    +
    +### 0.16.0 (2017-11-08)
    +
    +* Add support for SOAP request operation ID header
    +
    +* Moved ovf helpers from govc import.ovf command to ovf and nfc packages
    +
    +* Added guest/toolbox (client) package
    +
    +* Added toolbox package and toolbox command
    +
    +* Added simulator package and vcsim command
    +
    +### 0.15.0 (2017-06-19)
    +
    +* WaitOptions.MaxWaitSeconds is now optional
    +
    +* Support removal of ExtraConfig entries
    +
    +* GuestPosixFileAttributes OwnerId and GroupId fields are now pointers,
    +  rather than omitempty ints to allow chown with root uid:gid
    +
    +* Updated examples/ using view package
    +
    +* Add DatastoreFile.TailFunc method
    +
    +* Export VirtualMachine.FindSnapshot method
    +
    +* Add AuthorizationManager {Enable,Disable}Methods
    +
    +* Add PBM client
    +
    +### 0.14.0 (2017-04-08)
    +
    +* Add view.ContainerView type and methods
    +
    +* Add Collector.RetrieveWithFilter method
    +
    +* Add property.Filter type
    +
    +* Implement EthernetCardBackingInfo for OpaqueNetwork
    +
    +* Finder: support changing object root in find mode
    +
    +* Add VirtualDiskManager.QueryVirtualDiskInfo
    +
    +* Add performance.Manager APIs
    +
    +### 0.13.0 (2017-03-02)
    +
    +* Add DatastoreFileManager API wrapper
    +
    +* Add HostVsanInternalSystem API wrappers
    +
    +* Add Container support to view package
    +
    +* Finder supports Folder recursion without specifying a path
    +
    +* Add VirtualMachine.QueryConfigTarget method
    +
    +* Add device option to VirtualMachine.WaitForNetIP
    +
    +* Remove _Task suffix from vapp methods
    +
    +### 0.12.1 (2016-12-19)
    +
    +* Add DiagnosticLog helper
    +
    +* Add DatastorePath helper
    +
    +### 0.12.0 (2016-12-01)
    +
    +* Disable use of service ticket for datastore HTTP access by default
    +
    +* Attach context to HTTP requests for cancellations
    +
    +* Update to vim25/6.5 API
    +
    +### 0.11.4 (2016-11-15)
    +
    +* Add object.AuthorizationManager methods: RetrieveRolePermissions, RetrieveAllPermissions, AddRole, RemoveRole, UpdateRole
    +
    +### 0.11.3 (2016-11-08)
    +
    +* Allow DatastoreFile.Follow reader to drain current body after stopping
    +
    +### 0.11.2 (2016-11-01)
    +
    +* Avoid possible NPE in VirtualMachine.Device method
    +
    +* Add support for OpaqueNetwork type to Finder
    +
    +* Add HostConfigManager.AccountManager support for ESX 5.5
    +
    +### 0.11.1 (2016-10-27)
    +
    +* Add Finder.ResourcePoolListAll method
    +
    +### 0.11.0 (2016-10-25)
    +
    +* Add object.DistributedVirtualPortgroup.Reconfigure method
    +
    +### 0.10.0 (2016-10-20)
    +
    +* Add option to set soap.Client.UserAgent
    +
    +* Add service ticket thumbprint validation
    +
    +* Update use of http.DefaultTransport fields to 1.7
    +
    +* Set default locale to en_US (override with GOVMOMI_LOCALE env var)
    +
    +* Add object.HostCertificateInfo (types.HostCertificateManagerCertificateInfo helpers)
    +
    +* Add object.HostCertificateManager type and HostConfigManager.CertificateManager method
    +
    +* Add soap.Client SetRootCAs and SetDialTLS methods
    +
    +### 0.9.0 (2016-09-09)
    +
    +* Add object.DatastoreFile helpers for streaming and tailing datastore files
    +
    +* Add object VirtualMachine.Unregister method
    +
    +* Add object.ListView methods: Add, Remove, Reset
    +
    +* Update to Go 1.7 - using stdlib's context package
    +
    +### 0.8.0 (2016-06-30)
    +
    +* Add session.Manager.AcquireLocalTicket
    +
    +* Include StoragePod in Finder.FolderList
    +
    +* Add Finder methods for finding by ManagedObjectReference: Element, ObjectReference
    +
    +* Add mo.ManagedObjectReference methods: Reference, String, FromString
    +
    +* Add support using SessionManagerGenericServiceTicket.HostName for Datastore HTTP access
    +
    +### 0.7.1 (2016-06-03)
    +
    +* Fix object.ObjectName method
    +
    +### 0.7.0 (2016-06-02)
    +
    +* Move InventoryPath field to object.Common
    +
    +* Add HostDatastoreSystem.CreateLocalDatastore method
    +
    +* Add DatastoreNamespaceManager methods: CreateDirectory, DeleteDirectory
    +
    +* Add HostServiceSystem
    +
    +* Add HostStorageSystem methods: MarkAsSdd, MarkAsNonSdd, MarkAsLocal, MarkAsNonLocal
    +
    +* Add HostStorageSystem.RescanAllHba method
    +
    +### 0.6.2 (2016-05-11)
    +
    +* Get complete file details in Datastore.Stat
    +
    +* SOAP decoding fixes
    +
    +* Add VirtualMachine.RemoveAllSnapshot
    +
    +### 0.6.1 (2016-04-30)
    +
    +* Fix mo.Entity interface
    +
    +### 0.6.0 (2016-04-29)
    +
    +* Add Common.Rename method
    +
    +* Add mo.Entity interface
    +
    +* Add OptionManager
    +
    +* Add Finder.FolderList method
    +
    +* Add VirtualMachine.WaitForNetIP method
    +
    +* Add VirtualMachine.RevertToSnapshot method
    +
    +* Add Datastore.Download method
    +
    +### 0.5.0 (2016-03-30)
    +
    +Generated fields using xsd type 'int' change to Go type 'int32'
    +
    +VirtualDevice.UnitNumber field changed to pointer type
    +
    +### 0.4.0 (2016-02-26)
    +
    +* Add method to convert virtual device list to array with virtual device
    +  changes that can be used in the VirtualMachineConfigSpec.
    +
    +* Make datastore cluster traversable in lister
    +
    +* Add finder.DatastoreCluster methods (also known as storage pods)
    +
    +* Add Drone CI check
    +
    +* Add object.Datastore Type and AttachedClusterHosts methods
    +
    +* Add finder.*OrDefault methods
    +
    +### 0.3.0 (2016-01-16)
    +
    +* Add object.VirtualNicManager wrapper
    +
    +* Add object.HostVsanSystem wrapper
    +
    +* Add object.HostSystem methods: EnterMaintenanceMode, ExitMaintenanceMode, Disconnect, Reconnect
    +
    +* Add finder.Folder method
    +
    +* Add object.Common.Destroy method
    +
    +* Add object.ComputeResource.Reconfigure method
    +
    +* Add license.AssignmentManager wrapper
    +
    +* Add object.HostFirewallSystem wrapper
    +
    +* Add object.DiagnosticManager wrapper
    +
    +* Add LoginExtensionByCertificate support
    +
    +* Add object.ExtensionManager
    +
    +...
    +
    +### 0.2.0 (2015-09-15)
    +
    +* Update to vim25/6.0 API
    +
    +* Stop returning children from `ManagedObjectList`
    +
    +    Change the `ManagedObjectList` function in the `find` package to only
    +    return the managed objects specified by the path argument and not their
    +    children. The original behavior was used by govc's `ls` command and is
    +    now available in the newly added function `ManagedObjectListChildren`.
    +
    +* Add retry functionality to vim25 package
    +
    +* Change finder functions to no longer take varargs
    +
    +    The `find` package had functions to return a list of objects, given a
    +    variable number of patterns. This makes it impossible to distinguish which
    +    patterns produced results and which ones didn't.
    +
    +    In particular for govc, where multiple arguments can be passed from the
    +    command line, it is useful to let the user know which ones produce results
    +    and which ones don't.
    +
    +    To evaluate multiple patterns, the user should call the find functions
    +    multiple times (either serially or in parallel).
    +
    +* Make optional boolean fields pointers (`vim25/types`).
    +
    +    False is the zero value of a boolean field, which means they are not serialized
    +    if the field is marked "omitempty". If the field is a pointer instead, the zero
    +    value will be the nil pointer, and both true and false values are serialized.
    +
    +### 0.1.0 (2015-03-17)
    +
    +Prior to this version the API of this library was in flux.
    +
    +Notable changes w.r.t. the state of this library before March 2015 are:
    +
    +* All functions that may execute a request take a `context.Context` parameter.
    +* The `vim25` package contains a minimal client implementation.
    +* The property collector and its convenience functions live in the `property` package.
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/CONTRIBUTING.md b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/CONTRIBUTING.md
    new file mode 100644
    index 000000000..f6645cbf4
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/CONTRIBUTING.md
    @@ -0,0 +1,101 @@
    +# Contributing to govmomi
    +
    +## Getting started
    +
    +First, fork the repository on GitHub to your personal account.
    +
    +Note that _GOPATH_ can be any directory, the example below uses _$HOME/govmomi_.
    +Change _$USER_ below to your github username if they are not the same.
    +
    +``` shell
    +export GOPATH=$HOME/govmomi
    +go get github.com/vmware/govmomi
    +cd $GOPATH/src/github.com/vmware/govmomi
    +git config push.default nothing # anything to avoid pushing to vmware/govmomi by default
    +git remote rename origin vmware
    +git remote add $USER git@github.com:$USER/govmomi.git
    +git fetch $USER
    +```
    +
    +## Installing from source
    +
    +Compile the govmomi libraries and install govc using:
    +
    +``` shell
    +go install -v github.com/vmware/govmomi/govc
    +```
    +
    +Note that **govc/build.sh** is only used for building release binaries.
    +
    +## Contribution flow
    +
    +This is a rough outline of what a contributor's workflow looks like:
    +
    +- Create a topic branch from where you want to base your work.
    +- Make commits of logical units.
    +- Make sure your commit messages are in the proper format (see below).
    +- Update CHANGELOG.md and/or govc/CHANGELOG.md when appropriate.
    +- Push your changes to a topic branch in your fork of the repository.
    +- Submit a pull request to vmware/govmomi.
    +
    +Example:
    +
    +``` shell
    +git checkout -b my-new-feature vmware/master
    +git commit -a
    +git push $USER my-new-feature
    +```
    +
    +### Stay in sync with upstream
    +
    +When your branch gets out of sync with the vmware/master branch, use the following to update:
    +
    +``` shell
    +git checkout my-new-feature
    +git fetch -a
    +git rebase vmware/master
    +git push --force-with-lease $USER my-new-feature
    +```
    +
    +### Updating pull requests
    +
    +If your PR fails to pass CI or needs changes based on code review, you'll most likely want to squash these changes into
    +existing commits.
    +
    +If your pull request contains a single commit or your changes are related to the most recent commit, you can simply
    +amend the commit.
    +
    +``` shell
    +git add .
    +git commit --amend
    +git push --force-with-lease $USER my-new-feature
    +```
    +
    +If you need to squash changes into an earlier commit, you can use:
    +
    +``` shell
    +git add .
    +git commit --fixup 
    +git rebase -i --autosquash vmware/master
    +git push --force-with-lease $USER my-new-feature
    +```
    +
    +Be sure to add a comment to the PR indicating your new changes are ready to review, as github does not generate a
    +notification when you git push.
    +
    +### Code style
    +
    +The coding style suggested by the Golang community is used in govmomi. See the
    +[style doc](https://github.com/golang/go/wiki/CodeReviewComments) for details.
    +
    +Try to limit column width to 120 characters for both code and markdown documents such as this one.
    +
    +### Format of the Commit Message
    +
    +We follow the conventions on [How to Write a Git Commit Message](http://chris.beams.io/posts/git-commit/).
    +
    +Be sure to include any related GitHub issue references in the commit message.
    +
    +## Reporting Bugs and Creating Issues
    +
    +When opening a new issue, try to roughly follow the commit message format conventions above.
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/CONTRIBUTORS b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/CONTRIBUTORS
    new file mode 100644
    index 000000000..1fd37b609
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/CONTRIBUTORS
    @@ -0,0 +1,83 @@
    +# People who can (and typically have) contributed to this repository.
    +#
    +# This script is generated by contributors.sh
    +#
    +
    +Abhijeet Kasurde 
    +abrarshivani 
    +Adam Shannon 
    +akutz 
    +Alessandro Cortiana 
    +Alex Bozhenko 
    +Alvaro Miranda 
    +amandahla 
    +Amanda H. L. de Andrade 
    +Amit Bathla 
    +amit bezalel 
    +Andrew Chin 
    +Anfernee Yongkun Gui 
    +aniketGslab 
    +Arran Walker 
    +Aryeh Weinreb 
    +Austin Parker 
    +Balu Dontu 
    +bastienbc 
    +Bob Killen 
    +Brad Fitzpatrick 
    +Bruce Downs 
    +Cédric Blomart 
    +Chris Marchesi 
    +Christian Höltje 
    +Clint Greenwood 
    +Danny Lockard 
    +Dave Tucker 
    +Davide Agnello 
    +David Stark 
    +Deric Crago 
    +Doug MacEachern 
    +Eloy Coto 
    +Eric Gray 
    +Eric Yutao 
    +Erik Hollensbe 
    +Fabio Rapposelli 
    +Faiyaz Ahmed 
    +forkbomber 
    +Gavin Gray 
    +Gavrie Philipson 
    +George Hicken 
    +Gerrit Renker 
    +gthombare 
    +Hasan Mahmood 
    +Henrik Hodne 
    +Isaac Rodman 
    +Ivan Porto Carrero 
    +Jason Kincl 
    +Jeremy Canady 
    +jeremy-clerc 
    +João Pereira 
    +Jorge Sevilla 
    +leslie-qiwa 
    +Louie Jiang 
    +Marc Carmier 
    +Matthew Cosgrove 
    +Mevan Samaratunga 
    +Nicolas Lamirault 
    +Omar Kohl 
    +Parham Alvani 
    +Pieter Noordhuis 
    +runner.mei 
    +S.Çağlar Onur 
    +Sergey Ignatov 
    +Steve Purcell 
    +Takaaki Furukawa 
    +tanishi 
    +Ted Zlatanov 
    +Thibaut Ackermann 
    +Trevor Dawe 
    +Vadim Egorov 
    +Volodymyr Bobyr 
    +Witold Krecicki 
    +Yang Yang 
    +Yuya Kusakabe 
    +Zach Tucker 
    +Zee Yang 
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/Dockerfile b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/Dockerfile
    new file mode 100644
    index 000000000..4f84fadaa
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/Dockerfile
    @@ -0,0 +1,4 @@
    +FROM scratch
    +LABEL maintainer="fabio@vmware.com"
    +COPY govc /
    +ENTRYPOINT [ "/govc" ]
    \ No newline at end of file
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/Gopkg.lock b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/Gopkg.lock
    new file mode 100644
    index 000000000..0f9a8f8c2
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/Gopkg.lock
    @@ -0,0 +1,44 @@
    +# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
    +
    +
    +[[projects]]
    +  branch = "improvements"
    +  name = "github.com/davecgh/go-xdr"
    +  packages = ["xdr2"]
    +  revision = "4930550ba2e22f87187498acfd78348b15f4e7a8"
    +  source = "https://github.com/rasky/go-xdr"
    +
    +[[projects]]
    +  name = "github.com/google/uuid"
    +  packages = ["."]
    +  revision = "6a5e28554805e78ea6141142aba763936c4761c0"
    +
    +[[projects]]
    +  branch = "govmomi"
    +  name = "github.com/kr/pretty"
    +  packages = ["."]
    +  revision = "2ee9d7453c02ef7fa518a83ae23644eb8872186a"
    +  source = "https://github.com/dougm/pretty"
    +
    +[[projects]]
    +  branch = "master"
    +  name = "github.com/kr/text"
    +  packages = ["."]
    +  revision = "7cafcd837844e784b526369c9bce262804aebc60"
    +
    +[[projects]]
    +  branch = "master"
    +  name = "github.com/vmware/vmw-guestinfo"
    +  packages = [
    +    "bdoor",
    +    "message",
    +    "vmcheck"
    +  ]
    +  revision = "25eff159a728be87e103a0b8045e08273f4dbec4"
    +
    +[solve-meta]
    +  analyzer-name = "dep"
    +  analyzer-version = 1
    +  inputs-digest = "376638fa6c0621cbd980caf8fc53494d880886f100663da8de47ecb6e596e439"
    +  solver-name = "gps-cdcl"
    +  solver-version = 1
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/Gopkg.toml b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/Gopkg.toml
    new file mode 100644
    index 000000000..4c4d6765e
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/Gopkg.toml
    @@ -0,0 +1,19 @@
    +# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
    +# for detailed Gopkg.toml documentation.
    +#
    +# Refer to https://github.com/toml-lang/toml for detailed TOML docs.
    +
    +[prune]
    +  non-go = true
    +  go-tests = true
    +  unused-packages = true
    +
    +[[constraint]]
    +  branch = "improvements"
    +  name = "github.com/davecgh/go-xdr"
    +  source = "https://github.com/rasky/go-xdr"
    +
    +[[constraint]]
    +  branch = "govmomi"
    +  name = "github.com/kr/pretty"
    +  source = "https://github.com/dougm/pretty"
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/LICENSE.txt b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/LICENSE.txt
    new file mode 100644
    index 000000000..d64569567
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/LICENSE.txt
    @@ -0,0 +1,202 @@
    +
    +                                 Apache License
    +                           Version 2.0, January 2004
    +                        http://www.apache.org/licenses/
    +
    +   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
    +
    +   1. Definitions.
    +
    +      "License" shall mean the terms and conditions for use, reproduction,
    +      and distribution as defined by Sections 1 through 9 of this document.
    +
    +      "Licensor" shall mean the copyright owner or entity authorized by
    +      the copyright owner that is granting the License.
    +
    +      "Legal Entity" shall mean the union of the acting entity and all
    +      other entities that control, are controlled by, or are under common
    +      control with that entity. For the purposes of this definition,
    +      "control" means (i) the power, direct or indirect, to cause the
    +      direction or management of such entity, whether by contract or
    +      otherwise, or (ii) ownership of fifty percent (50%) or more of the
    +      outstanding shares, or (iii) beneficial ownership of such entity.
    +
    +      "You" (or "Your") shall mean an individual or Legal Entity
    +      exercising permissions granted by this License.
    +
    +      "Source" form shall mean the preferred form for making modifications,
    +      including but not limited to software source code, documentation
    +      source, and configuration files.
    +
    +      "Object" form shall mean any form resulting from mechanical
    +      transformation or translation of a Source form, including but
    +      not limited to compiled object code, generated documentation,
    +      and conversions to other media types.
    +
    +      "Work" shall mean the work of authorship, whether in Source or
    +      Object form, made available under the License, as indicated by a
    +      copyright notice that is included in or attached to the work
    +      (an example is provided in the Appendix below).
    +
    +      "Derivative Works" shall mean any work, whether in Source or Object
    +      form, that is based on (or derived from) the Work and for which the
    +      editorial revisions, annotations, elaborations, or other modifications
    +      represent, as a whole, an original work of authorship. For the purposes
    +      of this License, Derivative Works shall not include works that remain
    +      separable from, or merely link (or bind by name) to the interfaces of,
    +      the Work and Derivative Works thereof.
    +
    +      "Contribution" shall mean any work of authorship, including
    +      the original version of the Work and any modifications or additions
    +      to that Work or Derivative Works thereof, that is intentionally
    +      submitted to Licensor for inclusion in the Work by the copyright owner
    +      or by an individual or Legal Entity authorized to submit on behalf of
    +      the copyright owner. For the purposes of this definition, "submitted"
    +      means any form of electronic, verbal, or written communication sent
    +      to the Licensor or its representatives, including but not limited to
    +      communication on electronic mailing lists, source code control systems,
    +      and issue tracking systems that are managed by, or on behalf of, the
    +      Licensor for the purpose of discussing and improving the Work, but
    +      excluding communication that is conspicuously marked or otherwise
    +      designated in writing by the copyright owner as "Not a Contribution."
    +
    +      "Contributor" shall mean Licensor and any individual or Legal Entity
    +      on behalf of whom a Contribution has been received by Licensor and
    +      subsequently incorporated within the Work.
    +
    +   2. Grant of Copyright License. Subject to the terms and conditions of
    +      this License, each Contributor hereby grants to You a perpetual,
    +      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
    +      copyright license to reproduce, prepare Derivative Works of,
    +      publicly display, publicly perform, sublicense, and distribute the
    +      Work and such Derivative Works in Source or Object form.
    +
    +   3. Grant of Patent License. Subject to the terms and conditions of
    +      this License, each Contributor hereby grants to You a perpetual,
    +      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
    +      (except as stated in this section) patent license to make, have made,
    +      use, offer to sell, sell, import, and otherwise transfer the Work,
    +      where such license applies only to those patent claims licensable
    +      by such Contributor that are necessarily infringed by their
    +      Contribution(s) alone or by combination of their Contribution(s)
    +      with the Work to which such Contribution(s) was submitted. If You
    +      institute patent litigation against any entity (including a
    +      cross-claim or counterclaim in a lawsuit) alleging that the Work
    +      or a Contribution incorporated within the Work constitutes direct
    +      or contributory patent infringement, then any patent licenses
    +      granted to You under this License for that Work shall terminate
    +      as of the date such litigation is filed.
    +
    +   4. Redistribution. You may reproduce and distribute copies of the
    +      Work or Derivative Works thereof in any medium, with or without
    +      modifications, and in Source or Object form, provided that You
    +      meet the following conditions:
    +
    +      (a) You must give any other recipients of the Work or
    +          Derivative Works a copy of this License; and
    +
    +      (b) You must cause any modified files to carry prominent notices
    +          stating that You changed the files; and
    +
    +      (c) You must retain, in the Source form of any Derivative Works
    +          that You distribute, all copyright, patent, trademark, and
    +          attribution notices from the Source form of the Work,
    +          excluding those notices that do not pertain to any part of
    +          the Derivative Works; and
    +
    +      (d) If the Work includes a "NOTICE" text file as part of its
    +          distribution, then any Derivative Works that You distribute must
    +          include a readable copy of the attribution notices contained
    +          within such NOTICE file, excluding those notices that do not
    +          pertain to any part of the Derivative Works, in at least one
    +          of the following places: within a NOTICE text file distributed
    +          as part of the Derivative Works; within the Source form or
    +          documentation, if provided along with the Derivative Works; or,
    +          within a display generated by the Derivative Works, if and
    +          wherever such third-party notices normally appear. The contents
    +          of the NOTICE file are for informational purposes only and
    +          do not modify the License. You may add Your own attribution
    +          notices within Derivative Works that You distribute, alongside
    +          or as an addendum to the NOTICE text from the Work, provided
    +          that such additional attribution notices cannot be construed
    +          as modifying the License.
    +
    +      You may add Your own copyright statement to Your modifications and
    +      may provide additional or different license terms and conditions
    +      for use, reproduction, or distribution of Your modifications, or
    +      for any such Derivative Works as a whole, provided Your use,
    +      reproduction, and distribution of the Work otherwise complies with
    +      the conditions stated in this License.
    +
    +   5. Submission of Contributions. Unless You explicitly state otherwise,
    +      any Contribution intentionally submitted for inclusion in the Work
    +      by You to the Licensor shall be under the terms and conditions of
    +      this License, without any additional terms or conditions.
    +      Notwithstanding the above, nothing herein shall supersede or modify
    +      the terms of any separate license agreement you may have executed
    +      with Licensor regarding such Contributions.
    +
    +   6. Trademarks. This License does not grant permission to use the trade
    +      names, trademarks, service marks, or product names of the Licensor,
    +      except as required for reasonable and customary use in describing the
    +      origin of the Work and reproducing the content of the NOTICE file.
    +
    +   7. Disclaimer of Warranty. Unless required by applicable law or
    +      agreed to in writing, Licensor provides the Work (and each
    +      Contributor provides its Contributions) on an "AS IS" BASIS,
    +      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
    +      implied, including, without limitation, any warranties or conditions
    +      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
    +      PARTICULAR PURPOSE. You are solely responsible for determining the
    +      appropriateness of using or redistributing the Work and assume any
    +      risks associated with Your exercise of permissions under this License.
    +
    +   8. Limitation of Liability. In no event and under no legal theory,
    +      whether in tort (including negligence), contract, or otherwise,
    +      unless required by applicable law (such as deliberate and grossly
    +      negligent acts) or agreed to in writing, shall any Contributor be
    +      liable to You for damages, including any direct, indirect, special,
    +      incidental, or consequential damages of any character arising as a
    +      result of this License or out of the use or inability to use the
    +      Work (including but not limited to damages for loss of goodwill,
    +      work stoppage, computer failure or malfunction, or any and all
    +      other commercial damages or losses), even if such Contributor
    +      has been advised of the possibility of such damages.
    +
    +   9. Accepting Warranty or Additional Liability. While redistributing
    +      the Work or Derivative Works thereof, You may choose to offer,
    +      and charge a fee for, acceptance of support, warranty, indemnity,
    +      or other liability obligations and/or rights consistent with this
    +      License. However, in accepting such obligations, You may act only
    +      on Your own behalf and on Your sole responsibility, not on behalf
    +      of any other Contributor, and only if You agree to indemnify,
    +      defend, and hold each Contributor harmless for any liability
    +      incurred by, or claims asserted against, such Contributor by reason
    +      of your accepting any such warranty or additional liability.
    +
    +   END OF TERMS AND CONDITIONS
    +
    +   APPENDIX: How to apply the Apache License to your work.
    +
    +      To apply the Apache License to your work, attach the following
    +      boilerplate notice, with the fields enclosed by brackets "[]"
    +      replaced with your own identifying information. (Don't include
    +      the brackets!)  The text should be enclosed in the appropriate
    +      comment syntax for the file format. We also recommend that a
    +      file or class name and description of purpose be included on the
    +      same "printed page" as the copyright notice for easier
    +      identification within third-party archives.
    +
    +   Copyright [yyyy] [name of copyright owner]
    +
    +   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.
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/Makefile b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/Makefile
    new file mode 100644
    index 000000000..e0e03ecd3
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/Makefile
    @@ -0,0 +1,29 @@
    +.PHONY: test
    +
    +all: check test
    +
    +check: goimports govet
    +
    +goimports:
    +	@echo checking go imports...
    +	@go get golang.org/x/tools/cmd/goimports
    +	@! goimports -d . 2>&1 | egrep -v '^$$'
    +
    +govet:
    +	@echo checking go vet...
    +	@go tool vet -structtags=false -methods=false $$(find . -mindepth 1 -maxdepth 1 -type d -not -name vendor)
    +
    +install:
    +	go install -v github.com/vmware/govmomi/govc
    +	go install -v github.com/vmware/govmomi/vcsim
    +
    +go-test:
    +	go test -race -v $(TEST_OPTS) ./...
    +
    +govc-test: install
    +	(cd govc/test && ./vendor/github.com/sstephenson/bats/libexec/bats -t .)
    +
    +test: go-test govc-test
    +
    +doc: install
    +	./govc/usage.sh > ./govc/USAGE.md
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/README.md b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/README.md
    new file mode 100644
    index 000000000..08bc8df80
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/README.md
    @@ -0,0 +1,86 @@
    +[![Build Status](https://travis-ci.org/vmware/govmomi.png?branch=master)](https://travis-ci.org/vmware/govmomi)
    +[![Go Report Card](https://goreportcard.com/badge/github.com/vmware/govmomi)](https://goreportcard.com/report/github.com/vmware/govmomi)
    +
    +# govmomi
    +
    +A Go library for interacting with VMware vSphere APIs (ESXi and/or vCenter).
    +
    +In addition to the vSphere API client, this repository includes:
    +
    +* [govc](./govc) - vSphere CLI
    +
    +* [vcsim](./vcsim) - vSphere API mock framework
    +
    +* [toolbox](./toolbox) - VM guest tools framework
    +
    +## Compatibility
    +
    +This library is built for and tested against ESXi and vCenter 6.0, 6.5 and 6.7.
    +
    +It may work with versions 5.5 and 5.1, but neither are officially supported.
    +
    +## Documentation
    +
    +The APIs exposed by this library very closely follow the API described in the [VMware vSphere API Reference Documentation][apiref].
    +Refer to this document to become familiar with the upstream API.
    +
    +The code in the `govmomi` package is a wrapper for the code that is generated from the vSphere API description.
    +It primarily provides convenience functions for working with the vSphere API.
    +See [godoc.org][godoc] for documentation.
    +
    +[apiref]:http://pubs.vmware.com/vsphere-6-5/index.jsp#com.vmware.wssdk.apiref.doc/right-pane.html
    +[godoc]:http://godoc.org/github.com/vmware/govmomi
    +
    +## Installation
    +
    +```sh
    +go get -u github.com/vmware/govmomi
    +```
    +
    +## Discussion
    +
    +Contributors and users are encouraged to collaborate using GitHub issues and/or
    +[Slack](https://vmwarecode.slack.com/messages/govmomi).
    +Access to Slack requires a [VMware {code} membership](https://code.vmware.com/join/).
    +
    +## Status
    +
    +Changes to the API are subject to [semantic versioning](http://semver.org).
    +
    +Refer to the [CHANGELOG](CHANGELOG.md) for version to version changes.
    +
    +## Projects using govmomi
    +
    +* [Docker Machine](https://github.com/docker/machine/tree/master/drivers/vmwarevsphere)
    +
    +* [Docker InfraKit](https://github.com/docker/infrakit/tree/master/pkg/provider/vsphere)
    +
    +* [Docker LinuxKit](https://github.com/linuxkit/linuxkit/tree/master/src/cmd/linuxkit)
    +
    +* [Kubernetes](https://github.com/kubernetes/kubernetes/tree/master/pkg/cloudprovider/providers/vsphere)
    +
    +* [Kubernetes kops](https://github.com/kubernetes/kops/tree/master/upup/pkg/fi/cloudup/vsphere)
    +
    +* [Terraform](https://github.com/terraform-providers/terraform-provider-vsphere)
    +
    +* [Packer](https://github.com/jetbrains-infra/packer-builder-vsphere)
    +
    +* [VMware VIC Engine](https://github.com/vmware/vic)
    +
    +* [Travis CI](https://github.com/travis-ci/jupiter-brain)
    +
    +* [collectd-vsphere](https://github.com/travis-ci/collectd-vsphere)
    +
    +* [Gru](https://github.com/dnaeon/gru)
    +
    +* [Libretto](https://github.com/apcera/libretto/tree/master/virtualmachine/vsphere)
    +
    +## Related projects
    +
    +* [rbvmomi](https://github.com/vmware/rbvmomi)
    +
    +* [pyvmomi](https://github.com/vmware/pyvmomi)
    +
    +## License
    +
    +govmomi is available under the [Apache 2 license](LICENSE).
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/client.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/client.go
    new file mode 100644
    index 000000000..ad49fe6bf
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/client.go
    @@ -0,0 +1,136 @@
    +/*
    +Copyright (c) 2014-2016 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +/*
    +This package is the root package of the govmomi library.
    +
    +The library is structured as follows:
    +
    +Package vim25
    +
    +The minimal usable functionality is available through the vim25 package.
    +It contains subpackages that contain generated types, managed objects, and all
    +available methods. The vim25 package is entirely independent of the other
    +packages in the govmomi tree -- it has no dependencies on its peers.
    +
    +The vim25 package itself contains a client structure that is
    +passed around throughout the entire library. It abstracts a session and its
    +immutable state. See the vim25 package for more information.
    +
    +Package session
    +
    +The session package contains an abstraction for the session manager that allows
    +a user to login and logout. It also provides access to the current session
    +(i.e. to determine if the user is in fact logged in)
    +
    +Package object
    +
    +The object package contains wrappers for a selection of managed objects. The
    +constructors of these objects all take a *vim25.Client, which they pass along
    +to derived objects, if applicable.
    +
    +Package govc
    +
    +The govc package contains the govc CLI. The code in this tree is not intended
    +to be used as a library. Any functionality that govc contains that _could_ be
    +used as a library function but isn't, _should_ live in a root level package.
    +
    +Other packages
    +
    +Other packages, such as "event", "guest", or "license", provide wrappers for
    +the respective subsystems. They are typically not needed in normal workflows so
    +are kept outside the object package.
    +*/
    +package govmomi
    +
    +import (
    +	"context"
    +	"net/url"
    +
    +	"github.com/vmware/govmomi/property"
    +	"github.com/vmware/govmomi/session"
    +	"github.com/vmware/govmomi/vim25"
    +	"github.com/vmware/govmomi/vim25/soap"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +type Client struct {
    +	*vim25.Client
    +
    +	SessionManager *session.Manager
    +}
    +
    +// NewClient creates a new client from a URL. The client authenticates with the
    +// server with username/password before returning if the URL contains user information.
    +func NewClient(ctx context.Context, u *url.URL, insecure bool) (*Client, error) {
    +	soapClient := soap.NewClient(u, insecure)
    +	vimClient, err := vim25.NewClient(ctx, soapClient)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	c := &Client{
    +		Client:         vimClient,
    +		SessionManager: session.NewManager(vimClient),
    +	}
    +
    +	// Only login if the URL contains user information.
    +	if u.User != nil {
    +		err = c.Login(ctx, u.User)
    +		if err != nil {
    +			return nil, err
    +		}
    +	}
    +
    +	return c, nil
    +}
    +
    +// Login dispatches to the SessionManager.
    +func (c *Client) Login(ctx context.Context, u *url.Userinfo) error {
    +	return c.SessionManager.Login(ctx, u)
    +}
    +
    +// Logout dispatches to the SessionManager.
    +func (c *Client) Logout(ctx context.Context) error {
    +	// Close any idle connections after logging out.
    +	defer c.Client.CloseIdleConnections()
    +	return c.SessionManager.Logout(ctx)
    +}
    +
    +// PropertyCollector returns the session's default property collector.
    +func (c *Client) PropertyCollector() *property.Collector {
    +	return property.DefaultCollector(c.Client)
    +}
    +
    +// RetrieveOne dispatches to the Retrieve function on the default property collector.
    +func (c *Client) RetrieveOne(ctx context.Context, obj types.ManagedObjectReference, p []string, dst interface{}) error {
    +	return c.PropertyCollector().RetrieveOne(ctx, obj, p, dst)
    +}
    +
    +// Retrieve dispatches to the Retrieve function on the default property collector.
    +func (c *Client) Retrieve(ctx context.Context, objs []types.ManagedObjectReference, p []string, dst interface{}) error {
    +	return c.PropertyCollector().Retrieve(ctx, objs, p, dst)
    +}
    +
    +// Wait dispatches to property.Wait.
    +func (c *Client) Wait(ctx context.Context, obj types.ManagedObjectReference, ps []string, f func([]types.PropertyChange) bool) error {
    +	return property.Wait(ctx, c.PropertyCollector(), obj, ps, f)
    +}
    +
    +// IsVC returns true if we are connected to a vCenter
    +func (c *Client) IsVC() bool {
    +	return c.Client.IsVC()
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/find/doc.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/find/doc.go
    new file mode 100644
    index 000000000..0c8acee01
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/find/doc.go
    @@ -0,0 +1,37 @@
    +/*
    +Copyright (c) 2014-2017 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +/*
    +Package find implements inventory listing and searching.
    +
    +The Finder is an alternative to the object.SearchIndex FindByInventoryPath() and FindChild() methods.
    +SearchIndex.FindByInventoryPath requires an absolute path, whereas the Finder also supports relative paths
    +and patterns via path.Match.
    +SearchIndex.FindChild requires a parent to find the child, whereas the Finder also supports an ancestor via
    +recursive object traversal.
    +
    +The various Finder methods accept a "path" argument, which can absolute or relative to the Folder for the object type.
    +The Finder supports two modes, "list" and "find".  The "list" mode behaves like the "ls" command, only searching within
    +the immediate path.  The "find" mode behaves like the "find" command, with the search starting at the immediate path but
    +also recursing into sub Folders relative to the Datacenter.  The default mode is "list" if the given path contains a "/",
    +otherwise "find" mode is used.
    +
    +The exception is to use a "..." wildcard with a path to find all objects recursively underneath any root object.
    +For example: VirtualMachineList("/DC1/...")
    +
    +See also: https://github.com/vmware/govmomi/blob/master/govc/README.md#usage
    +*/
    +package find
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/find/error.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/find/error.go
    new file mode 100644
    index 000000000..684526dab
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/find/error.go
    @@ -0,0 +1,64 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package find
    +
    +import "fmt"
    +
    +type NotFoundError struct {
    +	kind string
    +	path string
    +}
    +
    +func (e *NotFoundError) Error() string {
    +	return fmt.Sprintf("%s '%s' not found", e.kind, e.path)
    +}
    +
    +type MultipleFoundError struct {
    +	kind string
    +	path string
    +}
    +
    +func (e *MultipleFoundError) Error() string {
    +	return fmt.Sprintf("path '%s' resolves to multiple %ss", e.path, e.kind)
    +}
    +
    +type DefaultNotFoundError struct {
    +	kind string
    +}
    +
    +func (e *DefaultNotFoundError) Error() string {
    +	return fmt.Sprintf("no default %s found", e.kind)
    +}
    +
    +type DefaultMultipleFoundError struct {
    +	kind string
    +}
    +
    +func (e DefaultMultipleFoundError) Error() string {
    +	return fmt.Sprintf("default %s resolves to multiple instances, please specify", e.kind)
    +}
    +
    +func toDefaultError(err error) error {
    +	switch e := err.(type) {
    +	case *NotFoundError:
    +		return &DefaultNotFoundError{e.kind}
    +	case *MultipleFoundError:
    +		return &DefaultMultipleFoundError{e.kind}
    +	default:
    +		return err
    +	}
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/find/finder.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/find/finder.go
    new file mode 100644
    index 000000000..70a2b5359
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/find/finder.go
    @@ -0,0 +1,1042 @@
    +/*
    +Copyright (c) 2014-2017 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package find
    +
    +import (
    +	"context"
    +	"errors"
    +	"path"
    +	"strings"
    +
    +	"github.com/vmware/govmomi/list"
    +	"github.com/vmware/govmomi/object"
    +	"github.com/vmware/govmomi/property"
    +	"github.com/vmware/govmomi/vim25"
    +	"github.com/vmware/govmomi/vim25/mo"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +type Finder struct {
    +	client  *vim25.Client
    +	r       recurser
    +	dc      *object.Datacenter
    +	si      *object.SearchIndex
    +	folders *object.DatacenterFolders
    +}
    +
    +func NewFinder(client *vim25.Client, all bool) *Finder {
    +	f := &Finder{
    +		client: client,
    +		si:     object.NewSearchIndex(client),
    +		r: recurser{
    +			Collector: property.DefaultCollector(client),
    +			All:       all,
    +		},
    +	}
    +
    +	return f
    +}
    +
    +func (f *Finder) SetDatacenter(dc *object.Datacenter) *Finder {
    +	f.dc = dc
    +	f.folders = nil
    +	return f
    +}
    +
    +// findRoot makes it possible to use "find" mode with a different root path.
    +// Example: ResourcePoolList("/dc1/host/cluster1/...")
    +func (f *Finder) findRoot(ctx context.Context, root *list.Element, parts []string) bool {
    +	if len(parts) == 0 {
    +		return false
    +	}
    +
    +	ix := len(parts) - 1
    +
    +	if parts[ix] != "..." {
    +		return false
    +	}
    +
    +	if ix == 0 {
    +		return true // We already have the Object for root.Path
    +	}
    +
    +	// Lookup the Object for the new root.Path
    +	rootPath := path.Join(root.Path, path.Join(parts[:ix]...))
    +
    +	ref, err := f.si.FindByInventoryPath(ctx, rootPath)
    +	if err != nil || ref == nil {
    +		// If we get an error or fail to match, fall through to find() with the original root and path
    +		return false
    +	}
    +
    +	root.Path = rootPath
    +	root.Object = ref
    +
    +	return true
    +}
    +
    +func (f *Finder) find(ctx context.Context, arg string, s *spec) ([]list.Element, error) {
    +	isPath := strings.Contains(arg, "/")
    +
    +	root := list.Element{
    +		Path:   "/",
    +		Object: object.NewRootFolder(f.client),
    +	}
    +
    +	parts := list.ToParts(arg)
    +
    +	if len(parts) > 0 {
    +		switch parts[0] {
    +		case "..": // Not supported; many edge case, little value
    +			return nil, errors.New("cannot traverse up a tree")
    +		case ".": // Relative to whatever
    +			pivot, err := s.Relative(ctx)
    +			if err != nil {
    +				return nil, err
    +			}
    +
    +			mes, err := mo.Ancestors(ctx, f.client, f.client.ServiceContent.PropertyCollector, pivot.Reference())
    +			if err != nil {
    +				return nil, err
    +			}
    +
    +			for _, me := range mes {
    +				// Skip root entity in building inventory path.
    +				if me.Parent == nil {
    +					continue
    +				}
    +				root.Path = path.Join(root.Path, me.Name)
    +			}
    +
    +			root.Object = pivot
    +			parts = parts[1:]
    +		}
    +	}
    +
    +	if s.listMode(isPath) {
    +		if f.findRoot(ctx, &root, parts) {
    +			parts = []string{"*"}
    +		} else {
    +			return f.r.List(ctx, s, root, parts)
    +		}
    +	}
    +
    +	s.Parents = append(s.Parents, s.Nested...)
    +
    +	return f.r.Find(ctx, s, root, parts)
    +}
    +
    +func (f *Finder) datacenter() (*object.Datacenter, error) {
    +	if f.dc == nil {
    +		return nil, errors.New("please specify a datacenter")
    +	}
    +
    +	return f.dc, nil
    +}
    +
    +// datacenterPath returns the absolute path to the Datacenter containing the given ref
    +func (f *Finder) datacenterPath(ctx context.Context, ref types.ManagedObjectReference) (string, error) {
    +	mes, err := mo.Ancestors(ctx, f.client, f.client.ServiceContent.PropertyCollector, ref)
    +	if err != nil {
    +		return "", err
    +	}
    +
    +	// Chop leaves under the Datacenter
    +	for i := len(mes) - 1; i > 0; i-- {
    +		if mes[i].Self.Type == "Datacenter" {
    +			break
    +		}
    +		mes = mes[:i]
    +	}
    +
    +	var p string
    +
    +	for _, me := range mes {
    +		// Skip root entity in building inventory path.
    +		if me.Parent == nil {
    +			continue
    +		}
    +
    +		p = p + "/" + me.Name
    +	}
    +
    +	return p, nil
    +}
    +
    +func (f *Finder) dcFolders(ctx context.Context) (*object.DatacenterFolders, error) {
    +	if f.folders != nil {
    +		return f.folders, nil
    +	}
    +
    +	dc, err := f.datacenter()
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	folders, err := dc.Folders(ctx)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	f.folders = folders
    +
    +	return f.folders, nil
    +}
    +
    +func (f *Finder) dcReference(_ context.Context) (object.Reference, error) {
    +	dc, err := f.datacenter()
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return dc, nil
    +}
    +
    +func (f *Finder) vmFolder(ctx context.Context) (object.Reference, error) {
    +	folders, err := f.dcFolders(ctx)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return folders.VmFolder, nil
    +}
    +
    +func (f *Finder) hostFolder(ctx context.Context) (object.Reference, error) {
    +	folders, err := f.dcFolders(ctx)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return folders.HostFolder, nil
    +}
    +
    +func (f *Finder) datastoreFolder(ctx context.Context) (object.Reference, error) {
    +	folders, err := f.dcFolders(ctx)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return folders.DatastoreFolder, nil
    +}
    +
    +func (f *Finder) networkFolder(ctx context.Context) (object.Reference, error) {
    +	folders, err := f.dcFolders(ctx)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return folders.NetworkFolder, nil
    +}
    +
    +func (f *Finder) rootFolder(_ context.Context) (object.Reference, error) {
    +	return object.NewRootFolder(f.client), nil
    +}
    +
    +func (f *Finder) managedObjectList(ctx context.Context, path string, tl bool, include []string) ([]list.Element, error) {
    +	fn := f.rootFolder
    +
    +	if f.dc != nil {
    +		fn = f.dcReference
    +	}
    +
    +	if len(path) == 0 {
    +		path = "."
    +	}
    +
    +	s := &spec{
    +		Relative: fn,
    +		Parents:  []string{"ComputeResource", "ClusterComputeResource", "HostSystem", "VirtualApp", "StoragePod"},
    +		Include:  include,
    +	}
    +
    +	if tl {
    +		s.Contents = true
    +		s.ListMode = types.NewBool(true)
    +	}
    +
    +	return f.find(ctx, path, s)
    +}
    +
    +// Element returns an Element for the given ManagedObjectReference
    +// This method is only useful for looking up the InventoryPath of a ManagedObjectReference.
    +func (f *Finder) Element(ctx context.Context, ref types.ManagedObjectReference) (*list.Element, error) {
    +	rl := func(_ context.Context) (object.Reference, error) {
    +		return ref, nil
    +	}
    +
    +	s := &spec{
    +		Relative: rl,
    +	}
    +
    +	e, err := f.find(ctx, "./", s)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	if len(e) == 0 {
    +		return nil, &NotFoundError{ref.Type, ref.Value}
    +	}
    +
    +	if len(e) > 1 {
    +		panic("ManagedObjectReference must be unique")
    +	}
    +
    +	return &e[0], nil
    +}
    +
    +// ObjectReference converts the given ManagedObjectReference to a type from the object package via object.NewReference
    +// with the object.Common.InventoryPath field set.
    +func (f *Finder) ObjectReference(ctx context.Context, ref types.ManagedObjectReference) (object.Reference, error) {
    +	e, err := f.Element(ctx, ref)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	r := object.NewReference(f.client, ref)
    +
    +	type common interface {
    +		SetInventoryPath(string)
    +	}
    +
    +	r.(common).SetInventoryPath(e.Path)
    +
    +	if f.dc != nil {
    +		if ds, ok := r.(*object.Datastore); ok {
    +			ds.DatacenterPath = f.dc.InventoryPath
    +		}
    +	}
    +
    +	return r, nil
    +}
    +
    +func (f *Finder) ManagedObjectList(ctx context.Context, path string, include ...string) ([]list.Element, error) {
    +	return f.managedObjectList(ctx, path, false, include)
    +}
    +
    +func (f *Finder) ManagedObjectListChildren(ctx context.Context, path string, include ...string) ([]list.Element, error) {
    +	return f.managedObjectList(ctx, path, true, include)
    +}
    +
    +func (f *Finder) DatacenterList(ctx context.Context, path string) ([]*object.Datacenter, error) {
    +	s := &spec{
    +		Relative: f.rootFolder,
    +		Include:  []string{"Datacenter"},
    +	}
    +
    +	es, err := f.find(ctx, path, s)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	var dcs []*object.Datacenter
    +	for _, e := range es {
    +		ref := e.Object.Reference()
    +		if ref.Type == "Datacenter" {
    +			dc := object.NewDatacenter(f.client, ref)
    +			dc.InventoryPath = e.Path
    +			dcs = append(dcs, dc)
    +		}
    +	}
    +
    +	if len(dcs) == 0 {
    +		return nil, &NotFoundError{"datacenter", path}
    +	}
    +
    +	return dcs, nil
    +}
    +
    +func (f *Finder) Datacenter(ctx context.Context, path string) (*object.Datacenter, error) {
    +	dcs, err := f.DatacenterList(ctx, path)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	if len(dcs) > 1 {
    +		return nil, &MultipleFoundError{"datacenter", path}
    +	}
    +
    +	return dcs[0], nil
    +}
    +
    +func (f *Finder) DefaultDatacenter(ctx context.Context) (*object.Datacenter, error) {
    +	dc, err := f.Datacenter(ctx, "*")
    +	if err != nil {
    +		return nil, toDefaultError(err)
    +	}
    +
    +	return dc, nil
    +}
    +
    +func (f *Finder) DatacenterOrDefault(ctx context.Context, path string) (*object.Datacenter, error) {
    +	if path != "" {
    +		dc, err := f.Datacenter(ctx, path)
    +		if err != nil {
    +			return nil, err
    +		}
    +		return dc, nil
    +	}
    +
    +	return f.DefaultDatacenter(ctx)
    +}
    +
    +func (f *Finder) DatastoreList(ctx context.Context, path string) ([]*object.Datastore, error) {
    +	s := &spec{
    +		Relative: f.datastoreFolder,
    +		Parents:  []string{"StoragePod"},
    +	}
    +
    +	es, err := f.find(ctx, path, s)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	var dss []*object.Datastore
    +	for _, e := range es {
    +		ref := e.Object.Reference()
    +		if ref.Type == "Datastore" {
    +			ds := object.NewDatastore(f.client, ref)
    +			ds.InventoryPath = e.Path
    +
    +			if f.dc == nil {
    +				// In this case SetDatacenter was not called and path is absolute
    +				ds.DatacenterPath, err = f.datacenterPath(ctx, ref)
    +				if err != nil {
    +					return nil, err
    +				}
    +			} else {
    +				ds.DatacenterPath = f.dc.InventoryPath
    +			}
    +
    +			dss = append(dss, ds)
    +		}
    +	}
    +
    +	if len(dss) == 0 {
    +		return nil, &NotFoundError{"datastore", path}
    +	}
    +
    +	return dss, nil
    +}
    +
    +func (f *Finder) Datastore(ctx context.Context, path string) (*object.Datastore, error) {
    +	dss, err := f.DatastoreList(ctx, path)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	if len(dss) > 1 {
    +		return nil, &MultipleFoundError{"datastore", path}
    +	}
    +
    +	return dss[0], nil
    +}
    +
    +func (f *Finder) DefaultDatastore(ctx context.Context) (*object.Datastore, error) {
    +	ds, err := f.Datastore(ctx, "*")
    +	if err != nil {
    +		return nil, toDefaultError(err)
    +	}
    +
    +	return ds, nil
    +}
    +
    +func (f *Finder) DatastoreOrDefault(ctx context.Context, path string) (*object.Datastore, error) {
    +	if path != "" {
    +		ds, err := f.Datastore(ctx, path)
    +		if err != nil {
    +			return nil, err
    +		}
    +		return ds, nil
    +	}
    +
    +	return f.DefaultDatastore(ctx)
    +}
    +
    +func (f *Finder) DatastoreClusterList(ctx context.Context, path string) ([]*object.StoragePod, error) {
    +	s := &spec{
    +		Relative: f.datastoreFolder,
    +	}
    +
    +	es, err := f.find(ctx, path, s)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	var sps []*object.StoragePod
    +	for _, e := range es {
    +		ref := e.Object.Reference()
    +		if ref.Type == "StoragePod" {
    +			sp := object.NewStoragePod(f.client, ref)
    +			sp.InventoryPath = e.Path
    +			sps = append(sps, sp)
    +		}
    +	}
    +
    +	if len(sps) == 0 {
    +		return nil, &NotFoundError{"datastore cluster", path}
    +	}
    +
    +	return sps, nil
    +}
    +
    +func (f *Finder) DatastoreCluster(ctx context.Context, path string) (*object.StoragePod, error) {
    +	sps, err := f.DatastoreClusterList(ctx, path)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	if len(sps) > 1 {
    +		return nil, &MultipleFoundError{"datastore cluster", path}
    +	}
    +
    +	return sps[0], nil
    +}
    +
    +func (f *Finder) DefaultDatastoreCluster(ctx context.Context) (*object.StoragePod, error) {
    +	sp, err := f.DatastoreCluster(ctx, "*")
    +	if err != nil {
    +		return nil, toDefaultError(err)
    +	}
    +
    +	return sp, nil
    +}
    +
    +func (f *Finder) DatastoreClusterOrDefault(ctx context.Context, path string) (*object.StoragePod, error) {
    +	if path != "" {
    +		sp, err := f.DatastoreCluster(ctx, path)
    +		if err != nil {
    +			return nil, err
    +		}
    +		return sp, nil
    +	}
    +
    +	return f.DefaultDatastoreCluster(ctx)
    +}
    +
    +func (f *Finder) ComputeResourceList(ctx context.Context, path string) ([]*object.ComputeResource, error) {
    +	s := &spec{
    +		Relative: f.hostFolder,
    +	}
    +
    +	es, err := f.find(ctx, path, s)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	var crs []*object.ComputeResource
    +	for _, e := range es {
    +		var cr *object.ComputeResource
    +
    +		switch o := e.Object.(type) {
    +		case mo.ComputeResource, mo.ClusterComputeResource:
    +			cr = object.NewComputeResource(f.client, o.Reference())
    +		default:
    +			continue
    +		}
    +
    +		cr.InventoryPath = e.Path
    +		crs = append(crs, cr)
    +	}
    +
    +	if len(crs) == 0 {
    +		return nil, &NotFoundError{"compute resource", path}
    +	}
    +
    +	return crs, nil
    +}
    +
    +func (f *Finder) ComputeResource(ctx context.Context, path string) (*object.ComputeResource, error) {
    +	crs, err := f.ComputeResourceList(ctx, path)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	if len(crs) > 1 {
    +		return nil, &MultipleFoundError{"compute resource", path}
    +	}
    +
    +	return crs[0], nil
    +}
    +
    +func (f *Finder) DefaultComputeResource(ctx context.Context) (*object.ComputeResource, error) {
    +	cr, err := f.ComputeResource(ctx, "*")
    +	if err != nil {
    +		return nil, toDefaultError(err)
    +	}
    +
    +	return cr, nil
    +}
    +
    +func (f *Finder) ComputeResourceOrDefault(ctx context.Context, path string) (*object.ComputeResource, error) {
    +	if path != "" {
    +		cr, err := f.ComputeResource(ctx, path)
    +		if err != nil {
    +			return nil, err
    +		}
    +		return cr, nil
    +	}
    +
    +	return f.DefaultComputeResource(ctx)
    +}
    +
    +func (f *Finder) ClusterComputeResourceList(ctx context.Context, path string) ([]*object.ClusterComputeResource, error) {
    +	s := &spec{
    +		Relative: f.hostFolder,
    +	}
    +
    +	es, err := f.find(ctx, path, s)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	var ccrs []*object.ClusterComputeResource
    +	for _, e := range es {
    +		var ccr *object.ClusterComputeResource
    +
    +		switch o := e.Object.(type) {
    +		case mo.ClusterComputeResource:
    +			ccr = object.NewClusterComputeResource(f.client, o.Reference())
    +		default:
    +			continue
    +		}
    +
    +		ccr.InventoryPath = e.Path
    +		ccrs = append(ccrs, ccr)
    +	}
    +
    +	if len(ccrs) == 0 {
    +		return nil, &NotFoundError{"cluster", path}
    +	}
    +
    +	return ccrs, nil
    +}
    +
    +func (f *Finder) DefaultClusterComputeResource(ctx context.Context) (*object.ClusterComputeResource, error) {
    +	cr, err := f.ClusterComputeResource(ctx, "*")
    +	if err != nil {
    +		return nil, toDefaultError(err)
    +	}
    +
    +	return cr, nil
    +}
    +
    +func (f *Finder) ClusterComputeResource(ctx context.Context, path string) (*object.ClusterComputeResource, error) {
    +	ccrs, err := f.ClusterComputeResourceList(ctx, path)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	if len(ccrs) > 1 {
    +		return nil, &MultipleFoundError{"cluster", path}
    +	}
    +
    +	return ccrs[0], nil
    +}
    +
    +func (f *Finder) ClusterComputeResourceOrDefault(ctx context.Context, path string) (*object.ClusterComputeResource, error) {
    +	if path != "" {
    +		cr, err := f.ClusterComputeResource(ctx, path)
    +		if err != nil {
    +			return nil, err
    +		}
    +		return cr, nil
    +	}
    +
    +	return f.DefaultClusterComputeResource(ctx)
    +}
    +
    +func (f *Finder) HostSystemList(ctx context.Context, path string) ([]*object.HostSystem, error) {
    +	s := &spec{
    +		Relative: f.hostFolder,
    +		Parents:  []string{"ComputeResource", "ClusterComputeResource"},
    +		Include:  []string{"HostSystem"},
    +	}
    +
    +	es, err := f.find(ctx, path, s)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	var hss []*object.HostSystem
    +	for _, e := range es {
    +		var hs *object.HostSystem
    +
    +		switch o := e.Object.(type) {
    +		case mo.HostSystem:
    +			hs = object.NewHostSystem(f.client, o.Reference())
    +
    +			hs.InventoryPath = e.Path
    +			hss = append(hss, hs)
    +		case mo.ComputeResource, mo.ClusterComputeResource:
    +			cr := object.NewComputeResource(f.client, o.Reference())
    +
    +			cr.InventoryPath = e.Path
    +
    +			hosts, err := cr.Hosts(ctx)
    +			if err != nil {
    +				return nil, err
    +			}
    +
    +			hss = append(hss, hosts...)
    +		}
    +	}
    +
    +	if len(hss) == 0 {
    +		return nil, &NotFoundError{"host", path}
    +	}
    +
    +	return hss, nil
    +}
    +
    +func (f *Finder) HostSystem(ctx context.Context, path string) (*object.HostSystem, error) {
    +	hss, err := f.HostSystemList(ctx, path)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	if len(hss) > 1 {
    +		return nil, &MultipleFoundError{"host", path}
    +	}
    +
    +	return hss[0], nil
    +}
    +
    +func (f *Finder) DefaultHostSystem(ctx context.Context) (*object.HostSystem, error) {
    +	hs, err := f.HostSystem(ctx, "*")
    +	if err != nil {
    +		return nil, toDefaultError(err)
    +	}
    +
    +	return hs, nil
    +}
    +
    +func (f *Finder) HostSystemOrDefault(ctx context.Context, path string) (*object.HostSystem, error) {
    +	if path != "" {
    +		hs, err := f.HostSystem(ctx, path)
    +		if err != nil {
    +			return nil, err
    +		}
    +		return hs, nil
    +	}
    +
    +	return f.DefaultHostSystem(ctx)
    +}
    +
    +func (f *Finder) NetworkList(ctx context.Context, path string) ([]object.NetworkReference, error) {
    +	s := &spec{
    +		Relative: f.networkFolder,
    +	}
    +
    +	es, err := f.find(ctx, path, s)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	var ns []object.NetworkReference
    +	for _, e := range es {
    +		ref := e.Object.Reference()
    +		switch ref.Type {
    +		case "Network":
    +			r := object.NewNetwork(f.client, ref)
    +			r.InventoryPath = e.Path
    +			ns = append(ns, r)
    +		case "OpaqueNetwork":
    +			r := object.NewOpaqueNetwork(f.client, ref)
    +			r.InventoryPath = e.Path
    +			ns = append(ns, r)
    +		case "DistributedVirtualPortgroup":
    +			r := object.NewDistributedVirtualPortgroup(f.client, ref)
    +			r.InventoryPath = e.Path
    +			ns = append(ns, r)
    +		case "DistributedVirtualSwitch", "VmwareDistributedVirtualSwitch":
    +			r := object.NewDistributedVirtualSwitch(f.client, ref)
    +			r.InventoryPath = e.Path
    +			ns = append(ns, r)
    +		}
    +	}
    +
    +	if len(ns) == 0 {
    +		return nil, &NotFoundError{"network", path}
    +	}
    +
    +	return ns, nil
    +}
    +
    +func (f *Finder) Network(ctx context.Context, path string) (object.NetworkReference, error) {
    +	networks, err := f.NetworkList(ctx, path)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	if len(networks) > 1 {
    +		return nil, &MultipleFoundError{"network", path}
    +	}
    +
    +	return networks[0], nil
    +}
    +
    +func (f *Finder) DefaultNetwork(ctx context.Context) (object.NetworkReference, error) {
    +	network, err := f.Network(ctx, "*")
    +	if err != nil {
    +		return nil, toDefaultError(err)
    +	}
    +
    +	return network, nil
    +}
    +
    +func (f *Finder) NetworkOrDefault(ctx context.Context, path string) (object.NetworkReference, error) {
    +	if path != "" {
    +		network, err := f.Network(ctx, path)
    +		if err != nil {
    +			return nil, err
    +		}
    +		return network, nil
    +	}
    +
    +	return f.DefaultNetwork(ctx)
    +}
    +
    +func (f *Finder) ResourcePoolList(ctx context.Context, path string) ([]*object.ResourcePool, error) {
    +	s := &spec{
    +		Relative: f.hostFolder,
    +		Parents:  []string{"ComputeResource", "ClusterComputeResource", "VirtualApp"},
    +		Nested:   []string{"ResourcePool"},
    +		Contents: true,
    +	}
    +
    +	es, err := f.find(ctx, path, s)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	var rps []*object.ResourcePool
    +	for _, e := range es {
    +		var rp *object.ResourcePool
    +
    +		switch o := e.Object.(type) {
    +		case mo.ResourcePool:
    +			rp = object.NewResourcePool(f.client, o.Reference())
    +			rp.InventoryPath = e.Path
    +			rps = append(rps, rp)
    +		}
    +	}
    +
    +	if len(rps) == 0 {
    +		return nil, &NotFoundError{"resource pool", path}
    +	}
    +
    +	return rps, nil
    +}
    +
    +func (f *Finder) ResourcePool(ctx context.Context, path string) (*object.ResourcePool, error) {
    +	rps, err := f.ResourcePoolList(ctx, path)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	if len(rps) > 1 {
    +		return nil, &MultipleFoundError{"resource pool", path}
    +	}
    +
    +	return rps[0], nil
    +}
    +
    +func (f *Finder) DefaultResourcePool(ctx context.Context) (*object.ResourcePool, error) {
    +	rp, err := f.ResourcePool(ctx, "*/Resources")
    +	if err != nil {
    +		return nil, toDefaultError(err)
    +	}
    +
    +	return rp, nil
    +}
    +
    +func (f *Finder) ResourcePoolOrDefault(ctx context.Context, path string) (*object.ResourcePool, error) {
    +	if path != "" {
    +		rp, err := f.ResourcePool(ctx, path)
    +		if err != nil {
    +			return nil, err
    +		}
    +		return rp, nil
    +	}
    +
    +	return f.DefaultResourcePool(ctx)
    +}
    +
    +// ResourcePoolListAll combines ResourcePoolList and VirtualAppList
    +// VirtualAppList is only called if ResourcePoolList does not find any pools with the given path.
    +func (f *Finder) ResourcePoolListAll(ctx context.Context, path string) ([]*object.ResourcePool, error) {
    +	pools, err := f.ResourcePoolList(ctx, path)
    +	if err != nil {
    +		if _, ok := err.(*NotFoundError); !ok {
    +			return nil, err
    +		}
    +
    +		vapps, _ := f.VirtualAppList(ctx, path)
    +
    +		if len(vapps) == 0 {
    +			return nil, err
    +		}
    +
    +		for _, vapp := range vapps {
    +			pools = append(pools, vapp.ResourcePool)
    +		}
    +	}
    +
    +	return pools, nil
    +}
    +
    +func (f *Finder) DefaultFolder(ctx context.Context) (*object.Folder, error) {
    +	ref, err := f.vmFolder(ctx)
    +	if err != nil {
    +		return nil, toDefaultError(err)
    +	}
    +	folder := object.NewFolder(f.client, ref.Reference())
    +
    +	return folder, nil
    +}
    +
    +func (f *Finder) FolderOrDefault(ctx context.Context, path string) (*object.Folder, error) {
    +	if path != "" {
    +		folder, err := f.Folder(ctx, path)
    +		if err != nil {
    +			return nil, err
    +		}
    +		return folder, nil
    +	}
    +	return f.DefaultFolder(ctx)
    +}
    +
    +func (f *Finder) VirtualMachineList(ctx context.Context, path string) ([]*object.VirtualMachine, error) {
    +	s := &spec{
    +		Relative: f.vmFolder,
    +		Parents:  []string{"VirtualApp"},
    +	}
    +
    +	es, err := f.find(ctx, path, s)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	var vms []*object.VirtualMachine
    +	for _, e := range es {
    +		switch o := e.Object.(type) {
    +		case mo.VirtualMachine:
    +			vm := object.NewVirtualMachine(f.client, o.Reference())
    +			vm.InventoryPath = e.Path
    +			vms = append(vms, vm)
    +		}
    +	}
    +
    +	if len(vms) == 0 {
    +		return nil, &NotFoundError{"vm", path}
    +	}
    +
    +	return vms, nil
    +}
    +
    +func (f *Finder) VirtualMachine(ctx context.Context, path string) (*object.VirtualMachine, error) {
    +	vms, err := f.VirtualMachineList(ctx, path)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	if len(vms) > 1 {
    +		return nil, &MultipleFoundError{"vm", path}
    +	}
    +
    +	return vms[0], nil
    +}
    +
    +func (f *Finder) VirtualAppList(ctx context.Context, path string) ([]*object.VirtualApp, error) {
    +	s := &spec{
    +		Relative: f.vmFolder,
    +	}
    +
    +	es, err := f.find(ctx, path, s)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	var apps []*object.VirtualApp
    +	for _, e := range es {
    +		switch o := e.Object.(type) {
    +		case mo.VirtualApp:
    +			app := object.NewVirtualApp(f.client, o.Reference())
    +			app.InventoryPath = e.Path
    +			apps = append(apps, app)
    +		}
    +	}
    +
    +	if len(apps) == 0 {
    +		return nil, &NotFoundError{"app", path}
    +	}
    +
    +	return apps, nil
    +}
    +
    +func (f *Finder) VirtualApp(ctx context.Context, path string) (*object.VirtualApp, error) {
    +	apps, err := f.VirtualAppList(ctx, path)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	if len(apps) > 1 {
    +		return nil, &MultipleFoundError{"app", path}
    +	}
    +
    +	return apps[0], nil
    +}
    +
    +func (f *Finder) FolderList(ctx context.Context, path string) ([]*object.Folder, error) {
    +	es, err := f.ManagedObjectList(ctx, path)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	var folders []*object.Folder
    +
    +	for _, e := range es {
    +		switch o := e.Object.(type) {
    +		case mo.Folder, mo.StoragePod:
    +			folder := object.NewFolder(f.client, o.Reference())
    +			folder.InventoryPath = e.Path
    +			folders = append(folders, folder)
    +		case *object.Folder:
    +			// RootFolder
    +			folders = append(folders, o)
    +		}
    +	}
    +
    +	if len(folders) == 0 {
    +		return nil, &NotFoundError{"folder", path}
    +	}
    +
    +	return folders, nil
    +}
    +
    +func (f *Finder) Folder(ctx context.Context, path string) (*object.Folder, error) {
    +	folders, err := f.FolderList(ctx, path)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	if len(folders) > 1 {
    +		return nil, &MultipleFoundError{"folder", path}
    +	}
    +
    +	return folders[0], nil
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/find/recurser.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/find/recurser.go
    new file mode 100644
    index 000000000..80d958a26
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/find/recurser.go
    @@ -0,0 +1,253 @@
    +/*
    +Copyright (c) 2014-2017 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package find
    +
    +import (
    +	"context"
    +	"os"
    +	"path"
    +	"strings"
    +
    +	"github.com/vmware/govmomi/list"
    +	"github.com/vmware/govmomi/object"
    +	"github.com/vmware/govmomi/property"
    +	"github.com/vmware/govmomi/vim25/mo"
    +)
    +
    +// spec is used to specify per-search configuration, independent of the Finder instance.
    +type spec struct {
    +	// Relative returns the root object to resolve Relative paths (starts with ".")
    +	Relative func(ctx context.Context) (object.Reference, error)
    +
    +	// ListMode can be used to optionally force "ls" behavior, rather than "find" behavior
    +	ListMode *bool
    +
    +	// Contents configures the Recurser to list the Contents of traversable leaf nodes.
    +	// This is typically set to true when used from the ls command, where listing
    +	// a folder means listing its Contents. This is typically set to false for
    +	// commands that take managed entities that are not folders as input.
    +	Contents bool
    +
    +	// Parents specifies the types which can contain the child types being searched for.
    +	// for example, when searching for a HostSystem, parent types can be
    +	// "ComputeResource" or "ClusterComputeResource".
    +	Parents []string
    +
    +	// Include specifies which types to be included in the results, used only in "find" mode.
    +	Include []string
    +
    +	// Nested should be set to types that can be Nested, used only in "find" mode.
    +	Nested []string
    +
    +	// ChildType avoids traversing into folders that can't contain the Include types, used only in "find" mode.
    +	ChildType []string
    +}
    +
    +func (s *spec) traversable(o mo.Reference) bool {
    +	ref := o.Reference()
    +
    +	switch ref.Type {
    +	case "Datacenter":
    +		if len(s.Include) == 1 && s.Include[0] == "Datacenter" {
    +			// No point in traversing deeper as Datacenters cannot be nested
    +			return false
    +		}
    +		return true
    +	case "Folder":
    +		if f, ok := o.(mo.Folder); ok {
    +			// TODO: Not making use of this yet, but here we can optimize when searching the entire
    +			// inventory across Datacenters for specific types, for example: 'govc ls -t VirtualMachine /**'
    +			// should not traverse into a Datacenter's host, network or datatore folders.
    +			if !s.traversableChildType(f.ChildType) {
    +				return false
    +			}
    +		}
    +
    +		return true
    +	}
    +
    +	for _, kind := range s.Parents {
    +		if kind == ref.Type {
    +			return true
    +		}
    +	}
    +
    +	return false
    +}
    +
    +func (s *spec) traversableChildType(ctypes []string) bool {
    +	if len(s.ChildType) == 0 {
    +		return true
    +	}
    +
    +	for _, t := range ctypes {
    +		for _, c := range s.ChildType {
    +			if t == c {
    +				return true
    +			}
    +		}
    +	}
    +
    +	return false
    +}
    +
    +func (s *spec) wanted(e list.Element) bool {
    +	if len(s.Include) == 0 {
    +		return true
    +	}
    +
    +	w := e.Object.Reference().Type
    +
    +	for _, kind := range s.Include {
    +		if w == kind {
    +			return true
    +		}
    +	}
    +
    +	return false
    +}
    +
    +// listMode is a global option to revert to the original Finder behavior,
    +// disabling the newer "find" mode.
    +var listMode = os.Getenv("GOVMOMI_FINDER_LIST_MODE") == "true"
    +
    +func (s *spec) listMode(isPath bool) bool {
    +	if listMode {
    +		return true
    +	}
    +
    +	if s.ListMode != nil {
    +		return *s.ListMode
    +	}
    +
    +	return isPath
    +}
    +
    +type recurser struct {
    +	Collector *property.Collector
    +
    +	// All configures the recurses to fetch complete objects for leaf nodes.
    +	All bool
    +}
    +
    +func (r recurser) List(ctx context.Context, s *spec, root list.Element, parts []string) ([]list.Element, error) {
    +	if len(parts) == 0 {
    +		// Include non-traversable leaf elements in result. For example, consider
    +		// the pattern "./vm/my-vm-*", where the pattern should match the VMs and
    +		// not try to traverse them.
    +		//
    +		// Include traversable leaf elements in result, if the contents
    +		// field is set to false.
    +		//
    +		if !s.Contents || !s.traversable(root.Object.Reference()) {
    +			return []list.Element{root}, nil
    +		}
    +	}
    +
    +	k := list.Lister{
    +		Collector: r.Collector,
    +		Reference: root.Object.Reference(),
    +		Prefix:    root.Path,
    +	}
    +
    +	if r.All && len(parts) < 2 {
    +		k.All = true
    +	}
    +
    +	in, err := k.List(ctx)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	// This folder is a leaf as far as the glob goes.
    +	if len(parts) == 0 {
    +		return in, nil
    +	}
    +
    +	all := parts
    +	pattern := parts[0]
    +	parts = parts[1:]
    +
    +	var out []list.Element
    +	for _, e := range in {
    +		matched, err := path.Match(pattern, path.Base(e.Path))
    +		if err != nil {
    +			return nil, err
    +		}
    +
    +		if !matched {
    +			matched = strings.HasSuffix(e.Path, "/"+path.Join(all...))
    +			if matched {
    +				// name contains a '/'
    +				out = append(out, e)
    +			}
    +
    +			continue
    +		}
    +
    +		nres, err := r.List(ctx, s, e, parts)
    +		if err != nil {
    +			return nil, err
    +		}
    +
    +		out = append(out, nres...)
    +	}
    +
    +	return out, nil
    +}
    +
    +func (r recurser) Find(ctx context.Context, s *spec, root list.Element, parts []string) ([]list.Element, error) {
    +	var out []list.Element
    +
    +	if len(parts) > 0 {
    +		pattern := parts[0]
    +		matched, err := path.Match(pattern, path.Base(root.Path))
    +		if err != nil {
    +			return nil, err
    +		}
    +
    +		if matched && s.wanted(root) {
    +			out = append(out, root)
    +		}
    +	}
    +
    +	if !s.traversable(root.Object) {
    +		return out, nil
    +	}
    +
    +	k := list.Lister{
    +		Collector: r.Collector,
    +		Reference: root.Object.Reference(),
    +		Prefix:    root.Path,
    +	}
    +
    +	in, err := k.List(ctx)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	for _, e := range in {
    +		nres, err := r.Find(ctx, s, e, parts)
    +		if err != nil {
    +			return nil, err
    +		}
    +
    +		out = append(out, nres...)
    +	}
    +
    +	return out, nil
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/list/lister.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/list/lister.go
    new file mode 100644
    index 000000000..2ee32e6bc
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/list/lister.go
    @@ -0,0 +1,563 @@
    +/*
    +Copyright (c) 2014-2016 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package list
    +
    +import (
    +	"context"
    +	"fmt"
    +	"path"
    +	"reflect"
    +
    +	"github.com/vmware/govmomi/property"
    +	"github.com/vmware/govmomi/vim25/mo"
    +	"github.com/vmware/govmomi/vim25/soap"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +type Element struct {
    +	Path   string
    +	Object mo.Reference
    +}
    +
    +func (e Element) String() string {
    +	return fmt.Sprintf("%s @ %s", e.Object.Reference(), e.Path)
    +}
    +
    +func ToElement(r mo.Reference, prefix string) Element {
    +	var name string
    +
    +	// Comments about types to be expected in folders copied from the
    +	// documentation of the Folder managed object:
    +	// http://pubs.vmware.com/vsphere-55/topic/com.vmware.wssdk.apiref.doc/vim.Folder.html
    +	switch m := r.(type) {
    +	case mo.Folder:
    +		name = m.Name
    +	case mo.StoragePod:
    +		name = m.Name
    +
    +	// { "vim.Datacenter" } - Identifies the root folder and its descendant
    +	// folders. Data center folders can contain child data center folders and
    +	// Datacenter managed objects. Datacenter objects contain virtual machine,
    +	// compute resource, network entity, and datastore folders.
    +	case mo.Datacenter:
    +		name = m.Name
    +
    +	// { "vim.Virtualmachine", "vim.VirtualApp" } - Identifies a virtual machine
    +	// folder. A virtual machine folder may contain child virtual machine
    +	// folders. It also can contain VirtualMachine managed objects, templates,
    +	// and VirtualApp managed objects.
    +	case mo.VirtualMachine:
    +		name = m.Name
    +	case mo.VirtualApp:
    +		name = m.Name
    +
    +	// { "vim.ComputeResource" } - Identifies a compute resource
    +	// folder, which contains child compute resource folders and ComputeResource
    +	// hierarchies.
    +	case mo.ComputeResource:
    +		name = m.Name
    +	case mo.ClusterComputeResource:
    +		name = m.Name
    +	case mo.HostSystem:
    +		name = m.Name
    +	case mo.ResourcePool:
    +		name = m.Name
    +
    +	// { "vim.Network" } - Identifies a network entity folder.
    +	// Network entity folders on a vCenter Server can contain Network,
    +	// DistributedVirtualSwitch, and DistributedVirtualPortgroup managed objects.
    +	// Network entity folders on an ESXi host can contain only Network objects.
    +	case mo.Network:
    +		name = m.Name
    +	case mo.OpaqueNetwork:
    +		name = m.Name
    +	case mo.DistributedVirtualSwitch:
    +		name = m.Name
    +	case mo.DistributedVirtualPortgroup:
    +		name = m.Name
    +	case mo.VmwareDistributedVirtualSwitch:
    +		name = m.Name
    +
    +	// { "vim.Datastore" } - Identifies a datastore folder. Datastore folders can
    +	// contain child datastore folders and Datastore managed objects.
    +	case mo.Datastore:
    +		name = m.Name
    +
    +	default:
    +		panic("not implemented for type " + reflect.TypeOf(r).String())
    +	}
    +
    +	e := Element{
    +		Path:   path.Join(prefix, name),
    +		Object: r,
    +	}
    +
    +	return e
    +}
    +
    +type Lister struct {
    +	Collector *property.Collector
    +	Reference types.ManagedObjectReference
    +	Prefix    string
    +	All       bool
    +}
    +
    +func (l Lister) retrieveProperties(ctx context.Context, req types.RetrieveProperties, dst *[]interface{}) error {
    +	res, err := l.Collector.RetrieveProperties(ctx, req)
    +	if err != nil {
    +		return err
    +	}
    +
    +	// Instead of using mo.LoadRetrievePropertiesResponse, use a custom loop to
    +	// iterate over the results and ignore entries that have properties that
    +	// could not be retrieved (a non-empty `missingSet` property). Since the
    +	// returned objects are enumerated by vSphere in the first place, any object
    +	// that has a non-empty `missingSet` property is indicative of a race
    +	// condition in vSphere where the object was enumerated initially, but was
    +	// removed before its properties could be collected.
    +	for _, p := range res.Returnval {
    +		v, err := mo.ObjectContentToType(p)
    +		if err != nil {
    +			// Ignore fault if it is ManagedObjectNotFound
    +			if soap.IsVimFault(err) {
    +				switch soap.ToVimFault(err).(type) {
    +				case *types.ManagedObjectNotFound:
    +					continue
    +				}
    +			}
    +
    +			return err
    +		}
    +
    +		*dst = append(*dst, v)
    +	}
    +
    +	return nil
    +}
    +
    +func (l Lister) List(ctx context.Context) ([]Element, error) {
    +	switch l.Reference.Type {
    +	case "Folder", "StoragePod":
    +		return l.ListFolder(ctx)
    +	case "Datacenter":
    +		return l.ListDatacenter(ctx)
    +	case "ComputeResource", "ClusterComputeResource":
    +		// Treat ComputeResource and ClusterComputeResource as one and the same.
    +		// It doesn't matter from the perspective of the lister.
    +		return l.ListComputeResource(ctx)
    +	case "ResourcePool":
    +		return l.ListResourcePool(ctx)
    +	case "HostSystem":
    +		return l.ListHostSystem(ctx)
    +	case "VirtualApp":
    +		return l.ListVirtualApp(ctx)
    +	default:
    +		return nil, fmt.Errorf("cannot traverse type " + l.Reference.Type)
    +	}
    +}
    +
    +func (l Lister) ListFolder(ctx context.Context) ([]Element, error) {
    +	spec := types.PropertyFilterSpec{
    +		ObjectSet: []types.ObjectSpec{
    +			{
    +				Obj: l.Reference,
    +				SelectSet: []types.BaseSelectionSpec{
    +					&types.TraversalSpec{
    +						Path: "childEntity",
    +						Skip: types.NewBool(false),
    +						Type: "Folder",
    +					},
    +				},
    +				Skip: types.NewBool(true),
    +			},
    +		},
    +	}
    +
    +	// Retrieve all objects that we can deal with
    +	childTypes := []string{
    +		"Folder",
    +		"Datacenter",
    +		"VirtualApp",
    +		"VirtualMachine",
    +		"Network",
    +		"ComputeResource",
    +		"ClusterComputeResource",
    +		"Datastore",
    +		"DistributedVirtualSwitch",
    +	}
    +
    +	for _, t := range childTypes {
    +		pspec := types.PropertySpec{
    +			Type: t,
    +		}
    +
    +		if l.All {
    +			pspec.All = types.NewBool(true)
    +		} else {
    +			pspec.PathSet = []string{"name"}
    +
    +			// Additional basic properties.
    +			switch t {
    +			case "Folder":
    +				pspec.PathSet = append(pspec.PathSet, "childType")
    +			case "ComputeResource", "ClusterComputeResource":
    +				// The ComputeResource and ClusterComputeResource are dereferenced in
    +				// the ResourcePoolFlag. Make sure they always have their resourcePool
    +				// field populated.
    +				pspec.PathSet = append(pspec.PathSet, "resourcePool")
    +			}
    +		}
    +
    +		spec.PropSet = append(spec.PropSet, pspec)
    +	}
    +
    +	req := types.RetrieveProperties{
    +		SpecSet: []types.PropertyFilterSpec{spec},
    +	}
    +
    +	var dst []interface{}
    +
    +	err := l.retrieveProperties(ctx, req, &dst)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	es := []Element{}
    +	for _, v := range dst {
    +		es = append(es, ToElement(v.(mo.Reference), l.Prefix))
    +	}
    +
    +	return es, nil
    +}
    +
    +func (l Lister) ListDatacenter(ctx context.Context) ([]Element, error) {
    +	ospec := types.ObjectSpec{
    +		Obj:  l.Reference,
    +		Skip: types.NewBool(true),
    +	}
    +
    +	// Include every datastore folder in the select set
    +	fields := []string{
    +		"vmFolder",
    +		"hostFolder",
    +		"datastoreFolder",
    +		"networkFolder",
    +	}
    +
    +	for _, f := range fields {
    +		tspec := types.TraversalSpec{
    +			Path: f,
    +			Skip: types.NewBool(false),
    +			Type: "Datacenter",
    +		}
    +
    +		ospec.SelectSet = append(ospec.SelectSet, &tspec)
    +	}
    +
    +	pspec := types.PropertySpec{
    +		Type: "Folder",
    +	}
    +
    +	if l.All {
    +		pspec.All = types.NewBool(true)
    +	} else {
    +		pspec.PathSet = []string{"name", "childType"}
    +	}
    +
    +	req := types.RetrieveProperties{
    +		SpecSet: []types.PropertyFilterSpec{
    +			{
    +				ObjectSet: []types.ObjectSpec{ospec},
    +				PropSet:   []types.PropertySpec{pspec},
    +			},
    +		},
    +	}
    +
    +	var dst []interface{}
    +
    +	err := l.retrieveProperties(ctx, req, &dst)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	es := []Element{}
    +	for _, v := range dst {
    +		es = append(es, ToElement(v.(mo.Reference), l.Prefix))
    +	}
    +
    +	return es, nil
    +}
    +
    +func (l Lister) ListComputeResource(ctx context.Context) ([]Element, error) {
    +	ospec := types.ObjectSpec{
    +		Obj:  l.Reference,
    +		Skip: types.NewBool(true),
    +	}
    +
    +	fields := []string{
    +		"host",
    +		"resourcePool",
    +	}
    +
    +	for _, f := range fields {
    +		tspec := types.TraversalSpec{
    +			Path: f,
    +			Skip: types.NewBool(false),
    +			Type: "ComputeResource",
    +		}
    +
    +		ospec.SelectSet = append(ospec.SelectSet, &tspec)
    +	}
    +
    +	childTypes := []string{
    +		"HostSystem",
    +		"ResourcePool",
    +	}
    +
    +	var pspecs []types.PropertySpec
    +	for _, t := range childTypes {
    +		pspec := types.PropertySpec{
    +			Type: t,
    +		}
    +
    +		if l.All {
    +			pspec.All = types.NewBool(true)
    +		} else {
    +			pspec.PathSet = []string{"name"}
    +		}
    +
    +		pspecs = append(pspecs, pspec)
    +	}
    +
    +	req := types.RetrieveProperties{
    +		SpecSet: []types.PropertyFilterSpec{
    +			{
    +				ObjectSet: []types.ObjectSpec{ospec},
    +				PropSet:   pspecs,
    +			},
    +		},
    +	}
    +
    +	var dst []interface{}
    +
    +	err := l.retrieveProperties(ctx, req, &dst)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	es := []Element{}
    +	for _, v := range dst {
    +		es = append(es, ToElement(v.(mo.Reference), l.Prefix))
    +	}
    +
    +	return es, nil
    +}
    +
    +func (l Lister) ListResourcePool(ctx context.Context) ([]Element, error) {
    +	ospec := types.ObjectSpec{
    +		Obj:  l.Reference,
    +		Skip: types.NewBool(true),
    +	}
    +
    +	fields := []string{
    +		"resourcePool",
    +	}
    +
    +	for _, f := range fields {
    +		tspec := types.TraversalSpec{
    +			Path: f,
    +			Skip: types.NewBool(false),
    +			Type: "ResourcePool",
    +		}
    +
    +		ospec.SelectSet = append(ospec.SelectSet, &tspec)
    +	}
    +
    +	childTypes := []string{
    +		"ResourcePool",
    +	}
    +
    +	var pspecs []types.PropertySpec
    +	for _, t := range childTypes {
    +		pspec := types.PropertySpec{
    +			Type: t,
    +		}
    +
    +		if l.All {
    +			pspec.All = types.NewBool(true)
    +		} else {
    +			pspec.PathSet = []string{"name"}
    +		}
    +
    +		pspecs = append(pspecs, pspec)
    +	}
    +
    +	req := types.RetrieveProperties{
    +		SpecSet: []types.PropertyFilterSpec{
    +			{
    +				ObjectSet: []types.ObjectSpec{ospec},
    +				PropSet:   pspecs,
    +			},
    +		},
    +	}
    +
    +	var dst []interface{}
    +
    +	err := l.retrieveProperties(ctx, req, &dst)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	es := []Element{}
    +	for _, v := range dst {
    +		es = append(es, ToElement(v.(mo.Reference), l.Prefix))
    +	}
    +
    +	return es, nil
    +}
    +
    +func (l Lister) ListHostSystem(ctx context.Context) ([]Element, error) {
    +	ospec := types.ObjectSpec{
    +		Obj:  l.Reference,
    +		Skip: types.NewBool(true),
    +	}
    +
    +	fields := []string{
    +		"datastore",
    +		"network",
    +		"vm",
    +	}
    +
    +	for _, f := range fields {
    +		tspec := types.TraversalSpec{
    +			Path: f,
    +			Skip: types.NewBool(false),
    +			Type: "HostSystem",
    +		}
    +
    +		ospec.SelectSet = append(ospec.SelectSet, &tspec)
    +	}
    +
    +	childTypes := []string{
    +		"Datastore",
    +		"Network",
    +		"VirtualMachine",
    +	}
    +
    +	var pspecs []types.PropertySpec
    +	for _, t := range childTypes {
    +		pspec := types.PropertySpec{
    +			Type: t,
    +		}
    +
    +		if l.All {
    +			pspec.All = types.NewBool(true)
    +		} else {
    +			pspec.PathSet = []string{"name"}
    +		}
    +
    +		pspecs = append(pspecs, pspec)
    +	}
    +
    +	req := types.RetrieveProperties{
    +		SpecSet: []types.PropertyFilterSpec{
    +			{
    +				ObjectSet: []types.ObjectSpec{ospec},
    +				PropSet:   pspecs,
    +			},
    +		},
    +	}
    +
    +	var dst []interface{}
    +
    +	err := l.retrieveProperties(ctx, req, &dst)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	es := []Element{}
    +	for _, v := range dst {
    +		es = append(es, ToElement(v.(mo.Reference), l.Prefix))
    +	}
    +
    +	return es, nil
    +}
    +
    +func (l Lister) ListVirtualApp(ctx context.Context) ([]Element, error) {
    +	ospec := types.ObjectSpec{
    +		Obj:  l.Reference,
    +		Skip: types.NewBool(true),
    +	}
    +
    +	fields := []string{
    +		"resourcePool",
    +		"vm",
    +	}
    +
    +	for _, f := range fields {
    +		tspec := types.TraversalSpec{
    +			Path: f,
    +			Skip: types.NewBool(false),
    +			Type: "VirtualApp",
    +		}
    +
    +		ospec.SelectSet = append(ospec.SelectSet, &tspec)
    +	}
    +
    +	childTypes := []string{
    +		"ResourcePool",
    +		"VirtualMachine",
    +	}
    +
    +	var pspecs []types.PropertySpec
    +	for _, t := range childTypes {
    +		pspec := types.PropertySpec{
    +			Type: t,
    +		}
    +
    +		if l.All {
    +			pspec.All = types.NewBool(true)
    +		} else {
    +			pspec.PathSet = []string{"name"}
    +		}
    +
    +		pspecs = append(pspecs, pspec)
    +	}
    +
    +	req := types.RetrieveProperties{
    +		SpecSet: []types.PropertyFilterSpec{
    +			{
    +				ObjectSet: []types.ObjectSpec{ospec},
    +				PropSet:   pspecs,
    +			},
    +		},
    +	}
    +
    +	var dst []interface{}
    +
    +	err := l.retrieveProperties(ctx, req, &dst)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	es := []Element{}
    +	for _, v := range dst {
    +		es = append(es, ToElement(v.(mo.Reference), l.Prefix))
    +	}
    +
    +	return es, nil
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/list/path.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/list/path.go
    new file mode 100644
    index 000000000..f3a106520
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/list/path.go
    @@ -0,0 +1,44 @@
    +/*
    +Copyright (c) 2014 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package list
    +
    +import (
    +	"path"
    +	"strings"
    +)
    +
    +func ToParts(p string) []string {
    +	p = path.Clean(p)
    +	if p == "/" {
    +		return []string{}
    +	}
    +
    +	if len(p) > 0 {
    +		// Prefix ./ if relative
    +		if p[0] != '/' && p[0] != '.' {
    +			p = "./" + p
    +		}
    +	}
    +
    +	ps := strings.Split(p, "/")
    +	if ps[0] == "" {
    +		// Start at root
    +		ps = ps[1:]
    +	}
    +
    +	return ps
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/nfc/lease.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/nfc/lease.go
    new file mode 100644
    index 000000000..3fb85ee6f
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/nfc/lease.go
    @@ -0,0 +1,238 @@
    +/*
    +Copyright (c) 2015-2017 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package nfc
    +
    +import (
    +	"context"
    +	"errors"
    +	"fmt"
    +	"io"
    +	"path"
    +
    +	"github.com/vmware/govmomi/property"
    +	"github.com/vmware/govmomi/vim25"
    +	"github.com/vmware/govmomi/vim25/methods"
    +	"github.com/vmware/govmomi/vim25/mo"
    +	"github.com/vmware/govmomi/vim25/progress"
    +	"github.com/vmware/govmomi/vim25/soap"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +type Lease struct {
    +	types.ManagedObjectReference
    +
    +	c *vim25.Client
    +}
    +
    +func NewLease(c *vim25.Client, ref types.ManagedObjectReference) *Lease {
    +	return &Lease{ref, c}
    +}
    +
    +// Abort wraps methods.Abort
    +func (l *Lease) Abort(ctx context.Context, fault *types.LocalizedMethodFault) error {
    +	req := types.HttpNfcLeaseAbort{
    +		This:  l.Reference(),
    +		Fault: fault,
    +	}
    +
    +	_, err := methods.HttpNfcLeaseAbort(ctx, l.c, &req)
    +	if err != nil {
    +		return err
    +	}
    +
    +	return nil
    +}
    +
    +// Complete wraps methods.Complete
    +func (l *Lease) Complete(ctx context.Context) error {
    +	req := types.HttpNfcLeaseComplete{
    +		This: l.Reference(),
    +	}
    +
    +	_, err := methods.HttpNfcLeaseComplete(ctx, l.c, &req)
    +	if err != nil {
    +		return err
    +	}
    +
    +	return nil
    +}
    +
    +// GetManifest wraps methods.GetManifest
    +func (l *Lease) GetManifest(ctx context.Context) error {
    +	req := types.HttpNfcLeaseGetManifest{
    +		This: l.Reference(),
    +	}
    +
    +	_, err := methods.HttpNfcLeaseGetManifest(ctx, l.c, &req)
    +	if err != nil {
    +		return err
    +	}
    +
    +	return nil
    +}
    +
    +// Progress wraps methods.Progress
    +func (l *Lease) Progress(ctx context.Context, percent int32) error {
    +	req := types.HttpNfcLeaseProgress{
    +		This:    l.Reference(),
    +		Percent: percent,
    +	}
    +
    +	_, err := methods.HttpNfcLeaseProgress(ctx, l.c, &req)
    +	if err != nil {
    +		return err
    +	}
    +
    +	return nil
    +}
    +
    +type LeaseInfo struct {
    +	types.HttpNfcLeaseInfo
    +
    +	Items []FileItem
    +}
    +
    +func (l *Lease) newLeaseInfo(li *types.HttpNfcLeaseInfo, items []types.OvfFileItem) (*LeaseInfo, error) {
    +	info := &LeaseInfo{
    +		HttpNfcLeaseInfo: *li,
    +	}
    +
    +	for _, device := range li.DeviceUrl {
    +		u, err := l.c.ParseURL(device.Url)
    +		if err != nil {
    +			return nil, err
    +		}
    +
    +		if device.SslThumbprint != "" {
    +			// TODO: prefer host management IP
    +			l.c.SetThumbprint(u.Host, device.SslThumbprint)
    +		}
    +
    +		if len(items) == 0 {
    +			// this is an export
    +			item := types.OvfFileItem{
    +				DeviceId: device.Key,
    +				Path:     device.TargetId,
    +				Size:     device.FileSize,
    +			}
    +
    +			if item.Size == 0 {
    +				item.Size = li.TotalDiskCapacityInKB * 1024
    +			}
    +
    +			if item.Path == "" {
    +				item.Path = path.Base(device.Url)
    +			}
    +
    +			info.Items = append(info.Items, NewFileItem(u, item))
    +
    +			continue
    +		}
    +
    +		// this is an import
    +		for _, item := range items {
    +			if device.ImportKey == item.DeviceId {
    +				info.Items = append(info.Items, NewFileItem(u, item))
    +				break
    +			}
    +		}
    +	}
    +
    +	return info, nil
    +}
    +
    +func (l *Lease) Wait(ctx context.Context, items []types.OvfFileItem) (*LeaseInfo, error) {
    +	var lease mo.HttpNfcLease
    +
    +	pc := property.DefaultCollector(l.c)
    +	err := property.Wait(ctx, pc, l.Reference(), []string{"state", "info", "error"}, func(pc []types.PropertyChange) bool {
    +		done := false
    +
    +		for _, c := range pc {
    +			if c.Val == nil {
    +				continue
    +			}
    +
    +			switch c.Name {
    +			case "error":
    +				val := c.Val.(types.LocalizedMethodFault)
    +				lease.Error = &val
    +				done = true
    +			case "info":
    +				val := c.Val.(types.HttpNfcLeaseInfo)
    +				lease.Info = &val
    +			case "state":
    +				lease.State = c.Val.(types.HttpNfcLeaseState)
    +				if lease.State != types.HttpNfcLeaseStateInitializing {
    +					done = true
    +				}
    +			}
    +		}
    +
    +		return done
    +	})
    +
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	if lease.State == types.HttpNfcLeaseStateReady {
    +		return l.newLeaseInfo(lease.Info, items)
    +	}
    +
    +	if lease.Error != nil {
    +		return nil, errors.New(lease.Error.LocalizedMessage)
    +	}
    +
    +	return nil, fmt.Errorf("unexpected nfc lease state: %s", lease.State)
    +}
    +
    +func (l *Lease) StartUpdater(ctx context.Context, info *LeaseInfo) *LeaseUpdater {
    +	return newLeaseUpdater(ctx, l, info)
    +}
    +
    +func (l *Lease) Upload(ctx context.Context, item FileItem, f io.Reader, opts soap.Upload) error {
    +	if opts.Progress == nil {
    +		opts.Progress = item
    +	} else {
    +		opts.Progress = progress.Tee(item, opts.Progress)
    +	}
    +
    +	// Non-disk files (such as .iso) use the PUT method.
    +	// Overwrite: t header is also required in this case (ovftool does the same)
    +	if item.Create {
    +		opts.Method = "PUT"
    +		opts.Headers = map[string]string{
    +			"Overwrite": "t",
    +		}
    +	} else {
    +		opts.Method = "POST"
    +		opts.Type = "application/x-vnd.vmware-streamVmdk"
    +	}
    +
    +	return l.c.Upload(ctx, f, item.URL, &opts)
    +}
    +
    +func (l *Lease) DownloadFile(ctx context.Context, file string, item FileItem, opts soap.Download) error {
    +	if opts.Progress == nil {
    +		opts.Progress = item
    +	} else {
    +		opts.Progress = progress.Tee(item, opts.Progress)
    +	}
    +
    +	return l.c.DownloadFile(ctx, file, item.URL, &opts)
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/nfc/lease_updater.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/nfc/lease_updater.go
    new file mode 100644
    index 000000000..d3face81a
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/nfc/lease_updater.go
    @@ -0,0 +1,146 @@
    +/*
    +Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package nfc
    +
    +import (
    +	"context"
    +	"log"
    +	"net/url"
    +	"sync"
    +	"sync/atomic"
    +	"time"
    +
    +	"github.com/vmware/govmomi/vim25/progress"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +type FileItem struct {
    +	types.OvfFileItem
    +	URL *url.URL
    +
    +	ch chan progress.Report
    +}
    +
    +func NewFileItem(u *url.URL, item types.OvfFileItem) FileItem {
    +	return FileItem{
    +		OvfFileItem: item,
    +		URL:         u,
    +		ch:          make(chan progress.Report),
    +	}
    +}
    +
    +func (o FileItem) Sink() chan<- progress.Report {
    +	return o.ch
    +}
    +
    +// File converts the FileItem.OvfFileItem to an OvfFile
    +func (o FileItem) File() types.OvfFile {
    +	return types.OvfFile{
    +		DeviceId: o.DeviceId,
    +		Path:     o.Path,
    +		Size:     o.Size,
    +	}
    +}
    +
    +type LeaseUpdater struct {
    +	lease *Lease
    +
    +	pos   int64 // Number of bytes
    +	total int64 // Total number of bytes
    +
    +	done chan struct{} // When lease updater should stop
    +
    +	wg sync.WaitGroup // Track when update loop is done
    +}
    +
    +func newLeaseUpdater(ctx context.Context, lease *Lease, info *LeaseInfo) *LeaseUpdater {
    +	l := LeaseUpdater{
    +		lease: lease,
    +
    +		done: make(chan struct{}),
    +	}
    +
    +	for _, item := range info.Items {
    +		l.total += item.Size
    +		go l.waitForProgress(item)
    +	}
    +
    +	// Kickstart update loop
    +	l.wg.Add(1)
    +	go l.run()
    +
    +	return &l
    +}
    +
    +func (l *LeaseUpdater) waitForProgress(item FileItem) {
    +	var pos, total int64
    +
    +	total = item.Size
    +
    +	for {
    +		select {
    +		case <-l.done:
    +			return
    +		case p, ok := <-item.ch:
    +			// Return in case of error
    +			if ok && p.Error() != nil {
    +				return
    +			}
    +
    +			if !ok {
    +				// Last element on the channel, add to total
    +				atomic.AddInt64(&l.pos, total-pos)
    +				return
    +			}
    +
    +			// Approximate progress in number of bytes
    +			x := int64(float32(total) * (p.Percentage() / 100.0))
    +			atomic.AddInt64(&l.pos, x-pos)
    +			pos = x
    +		}
    +	}
    +}
    +
    +func (l *LeaseUpdater) run() {
    +	defer l.wg.Done()
    +
    +	tick := time.NewTicker(2 * time.Second)
    +	defer tick.Stop()
    +
    +	for {
    +		select {
    +		case <-l.done:
    +			return
    +		case <-tick.C:
    +			// From the vim api HttpNfcLeaseProgress(percent) doc, percent ==
    +			// "Completion status represented as an integer in the 0-100 range."
    +			// Always report the current value of percent, as it will renew the
    +			// lease even if the value hasn't changed or is 0.
    +			percent := int32(float32(100*atomic.LoadInt64(&l.pos)) / float32(l.total))
    +			err := l.lease.Progress(context.TODO(), percent)
    +			if err != nil {
    +				log.Printf("NFC lease progress: %s", err)
    +				return
    +			}
    +		}
    +	}
    +}
    +
    +func (l *LeaseUpdater) Done() {
    +	close(l.done)
    +	l.wg.Wait()
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/authorization_manager.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/authorization_manager.go
    new file mode 100644
    index 000000000..b703258fe
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/authorization_manager.go
    @@ -0,0 +1,174 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"context"
    +
    +	"github.com/vmware/govmomi/vim25"
    +	"github.com/vmware/govmomi/vim25/methods"
    +	"github.com/vmware/govmomi/vim25/mo"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +type AuthorizationManager struct {
    +	Common
    +}
    +
    +func NewAuthorizationManager(c *vim25.Client) *AuthorizationManager {
    +	m := AuthorizationManager{
    +		Common: NewCommon(c, *c.ServiceContent.AuthorizationManager),
    +	}
    +
    +	return &m
    +}
    +
    +type AuthorizationRoleList []types.AuthorizationRole
    +
    +func (l AuthorizationRoleList) ById(id int32) *types.AuthorizationRole {
    +	for _, role := range l {
    +		if role.RoleId == id {
    +			return &role
    +		}
    +	}
    +
    +	return nil
    +}
    +
    +func (l AuthorizationRoleList) ByName(name string) *types.AuthorizationRole {
    +	for _, role := range l {
    +		if role.Name == name {
    +			return &role
    +		}
    +	}
    +
    +	return nil
    +}
    +
    +func (m AuthorizationManager) RoleList(ctx context.Context) (AuthorizationRoleList, error) {
    +	var am mo.AuthorizationManager
    +
    +	err := m.Properties(ctx, m.Reference(), []string{"roleList"}, &am)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return AuthorizationRoleList(am.RoleList), nil
    +}
    +
    +func (m AuthorizationManager) RetrieveEntityPermissions(ctx context.Context, entity types.ManagedObjectReference, inherited bool) ([]types.Permission, error) {
    +	req := types.RetrieveEntityPermissions{
    +		This:      m.Reference(),
    +		Entity:    entity,
    +		Inherited: inherited,
    +	}
    +
    +	res, err := methods.RetrieveEntityPermissions(ctx, m.Client(), &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return res.Returnval, nil
    +}
    +
    +func (m AuthorizationManager) RemoveEntityPermission(ctx context.Context, entity types.ManagedObjectReference, user string, isGroup bool) error {
    +	req := types.RemoveEntityPermission{
    +		This:    m.Reference(),
    +		Entity:  entity,
    +		User:    user,
    +		IsGroup: isGroup,
    +	}
    +
    +	_, err := methods.RemoveEntityPermission(ctx, m.Client(), &req)
    +	return err
    +}
    +
    +func (m AuthorizationManager) SetEntityPermissions(ctx context.Context, entity types.ManagedObjectReference, permission []types.Permission) error {
    +	req := types.SetEntityPermissions{
    +		This:       m.Reference(),
    +		Entity:     entity,
    +		Permission: permission,
    +	}
    +
    +	_, err := methods.SetEntityPermissions(ctx, m.Client(), &req)
    +	return err
    +}
    +
    +func (m AuthorizationManager) RetrieveRolePermissions(ctx context.Context, id int32) ([]types.Permission, error) {
    +	req := types.RetrieveRolePermissions{
    +		This:   m.Reference(),
    +		RoleId: id,
    +	}
    +
    +	res, err := methods.RetrieveRolePermissions(ctx, m.Client(), &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return res.Returnval, nil
    +}
    +
    +func (m AuthorizationManager) RetrieveAllPermissions(ctx context.Context) ([]types.Permission, error) {
    +	req := types.RetrieveAllPermissions{
    +		This: m.Reference(),
    +	}
    +
    +	res, err := methods.RetrieveAllPermissions(ctx, m.Client(), &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return res.Returnval, nil
    +}
    +
    +func (m AuthorizationManager) AddRole(ctx context.Context, name string, ids []string) (int32, error) {
    +	req := types.AddAuthorizationRole{
    +		This:    m.Reference(),
    +		Name:    name,
    +		PrivIds: ids,
    +	}
    +
    +	res, err := methods.AddAuthorizationRole(ctx, m.Client(), &req)
    +	if err != nil {
    +		return -1, err
    +	}
    +
    +	return res.Returnval, nil
    +}
    +
    +func (m AuthorizationManager) RemoveRole(ctx context.Context, id int32, failIfUsed bool) error {
    +	req := types.RemoveAuthorizationRole{
    +		This:       m.Reference(),
    +		RoleId:     id,
    +		FailIfUsed: failIfUsed,
    +	}
    +
    +	_, err := methods.RemoveAuthorizationRole(ctx, m.Client(), &req)
    +	return err
    +}
    +
    +func (m AuthorizationManager) UpdateRole(ctx context.Context, id int32, name string, ids []string) error {
    +	req := types.UpdateAuthorizationRole{
    +		This:    m.Reference(),
    +		RoleId:  id,
    +		NewName: name,
    +		PrivIds: ids,
    +	}
    +
    +	_, err := methods.UpdateAuthorizationRole(ctx, m.Client(), &req)
    +	return err
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/authorization_manager_internal.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/authorization_manager_internal.go
    new file mode 100644
    index 000000000..4fa520f5a
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/authorization_manager_internal.go
    @@ -0,0 +1,86 @@
    +/*
    +Copyright (c) 2017 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"context"
    +
    +	"github.com/vmware/govmomi/vim25/soap"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +type DisabledMethodRequest struct {
    +	Method string `xml:"method"`
    +	Reason string `xml:"reasonId"`
    +}
    +
    +type disableMethodsRequest struct {
    +	This   types.ManagedObjectReference   `xml:"_this"`
    +	Entity []types.ManagedObjectReference `xml:"entity"`
    +	Method []DisabledMethodRequest        `xml:"method"`
    +	Source string                         `xml:"sourceId"`
    +	Scope  bool                           `xml:"sessionScope,omitempty"`
    +}
    +
    +type disableMethodsBody struct {
    +	Req *disableMethodsRequest `xml:"urn:internalvim25 DisableMethods,omitempty"`
    +	Res interface{}            `xml:"urn:vim25 DisableMethodsResponse,omitempty"`
    +	Err *soap.Fault            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *disableMethodsBody) Fault() *soap.Fault { return b.Err }
    +
    +func (m AuthorizationManager) DisableMethods(ctx context.Context, entity []types.ManagedObjectReference, method []DisabledMethodRequest, source string) error {
    +	var reqBody, resBody disableMethodsBody
    +
    +	reqBody.Req = &disableMethodsRequest{
    +		This:   m.Reference(),
    +		Entity: entity,
    +		Method: method,
    +		Source: source,
    +	}
    +
    +	return m.Client().RoundTrip(ctx, &reqBody, &resBody)
    +}
    +
    +type enableMethodsRequest struct {
    +	This   types.ManagedObjectReference   `xml:"_this"`
    +	Entity []types.ManagedObjectReference `xml:"entity"`
    +	Method []string                       `xml:"method"`
    +	Source string                         `xml:"sourceId"`
    +}
    +
    +type enableMethodsBody struct {
    +	Req *enableMethodsRequest `xml:"urn:internalvim25 EnableMethods,omitempty"`
    +	Res interface{}           `xml:"urn:vim25 EnableMethodsResponse,omitempty"`
    +	Err *soap.Fault           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *enableMethodsBody) Fault() *soap.Fault { return b.Err }
    +
    +func (m AuthorizationManager) EnableMethods(ctx context.Context, entity []types.ManagedObjectReference, method []string, source string) error {
    +	var reqBody, resBody enableMethodsBody
    +
    +	reqBody.Req = &enableMethodsRequest{
    +		This:   m.Reference(),
    +		Entity: entity,
    +		Method: method,
    +		Source: source,
    +	}
    +
    +	return m.Client().RoundTrip(ctx, &reqBody, &resBody)
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/cluster_compute_resource.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/cluster_compute_resource.go
    new file mode 100644
    index 000000000..c9fe3aa03
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/cluster_compute_resource.go
    @@ -0,0 +1,70 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"context"
    +
    +	"github.com/vmware/govmomi/vim25"
    +	"github.com/vmware/govmomi/vim25/methods"
    +	"github.com/vmware/govmomi/vim25/mo"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +type ClusterComputeResource struct {
    +	ComputeResource
    +}
    +
    +func NewClusterComputeResource(c *vim25.Client, ref types.ManagedObjectReference) *ClusterComputeResource {
    +	return &ClusterComputeResource{
    +		ComputeResource: *NewComputeResource(c, ref),
    +	}
    +}
    +
    +func (c ClusterComputeResource) Configuration(ctx context.Context) (*types.ClusterConfigInfoEx, error) {
    +	var obj mo.ClusterComputeResource
    +
    +	err := c.Properties(ctx, c.Reference(), []string{"configurationEx"}, &obj)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return obj.ConfigurationEx.(*types.ClusterConfigInfoEx), nil
    +}
    +
    +func (c ClusterComputeResource) AddHost(ctx context.Context, spec types.HostConnectSpec, asConnected bool, license *string, resourcePool *types.ManagedObjectReference) (*Task, error) {
    +	req := types.AddHost_Task{
    +		This:        c.Reference(),
    +		Spec:        spec,
    +		AsConnected: asConnected,
    +	}
    +
    +	if license != nil {
    +		req.License = *license
    +	}
    +
    +	if resourcePool != nil {
    +		req.ResourcePool = resourcePool
    +	}
    +
    +	res, err := methods.AddHost_Task(ctx, c.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(c.c, res.Returnval), nil
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/common.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/common.go
    new file mode 100644
    index 000000000..dfeee4a36
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/common.go
    @@ -0,0 +1,132 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"context"
    +	"errors"
    +	"fmt"
    +	"path"
    +
    +	"github.com/vmware/govmomi/property"
    +	"github.com/vmware/govmomi/vim25"
    +	"github.com/vmware/govmomi/vim25/methods"
    +	"github.com/vmware/govmomi/vim25/mo"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +var (
    +	ErrNotSupported = errors.New("product/version specific feature not supported by target")
    +)
    +
    +// Common contains the fields and functions common to all objects.
    +type Common struct {
    +	InventoryPath string
    +
    +	c *vim25.Client
    +	r types.ManagedObjectReference
    +}
    +
    +func (c Common) String() string {
    +	ref := fmt.Sprintf("%v", c.Reference())
    +
    +	if c.InventoryPath == "" {
    +		return ref
    +	}
    +
    +	return fmt.Sprintf("%s @ %s", ref, c.InventoryPath)
    +}
    +
    +func NewCommon(c *vim25.Client, r types.ManagedObjectReference) Common {
    +	return Common{c: c, r: r}
    +}
    +
    +func (c Common) Reference() types.ManagedObjectReference {
    +	return c.r
    +}
    +
    +func (c Common) Client() *vim25.Client {
    +	return c.c
    +}
    +
    +// Name returns the base name of the InventoryPath field
    +func (c Common) Name() string {
    +	if c.InventoryPath == "" {
    +		return ""
    +	}
    +	return path.Base(c.InventoryPath)
    +}
    +
    +func (c *Common) SetInventoryPath(p string) {
    +	c.InventoryPath = p
    +}
    +
    +// ObjectName returns the base name of the InventoryPath field if set,
    +// otherwise fetches the mo.ManagedEntity.Name field via the property collector.
    +func (c Common) ObjectName(ctx context.Context) (string, error) {
    +	var o mo.ManagedEntity
    +
    +	err := c.Properties(ctx, c.Reference(), []string{"name"}, &o)
    +	if err != nil {
    +		return "", err
    +	}
    +
    +	if o.Name != "" {
    +		return o.Name, nil
    +	}
    +
    +	// Network has its own "name" field...
    +	var n mo.Network
    +
    +	err = c.Properties(ctx, c.Reference(), []string{"name"}, &n)
    +	if err != nil {
    +		return "", err
    +	}
    +
    +	return n.Name, nil
    +}
    +
    +func (c Common) Properties(ctx context.Context, r types.ManagedObjectReference, ps []string, dst interface{}) error {
    +	return property.DefaultCollector(c.c).RetrieveOne(ctx, r, ps, dst)
    +}
    +
    +func (c Common) Destroy(ctx context.Context) (*Task, error) {
    +	req := types.Destroy_Task{
    +		This: c.Reference(),
    +	}
    +
    +	res, err := methods.Destroy_Task(ctx, c.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(c.c, res.Returnval), nil
    +}
    +
    +func (c Common) Rename(ctx context.Context, name string) (*Task, error) {
    +	req := types.Rename_Task{
    +		This:    c.Reference(),
    +		NewName: name,
    +	}
    +
    +	res, err := methods.Rename_Task(ctx, c.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(c.c, res.Returnval), nil
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/compute_resource.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/compute_resource.go
    new file mode 100644
    index 000000000..7645fddaf
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/compute_resource.go
    @@ -0,0 +1,111 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"context"
    +	"path"
    +
    +	"github.com/vmware/govmomi/property"
    +	"github.com/vmware/govmomi/vim25"
    +	"github.com/vmware/govmomi/vim25/methods"
    +	"github.com/vmware/govmomi/vim25/mo"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +type ComputeResource struct {
    +	Common
    +}
    +
    +func NewComputeResource(c *vim25.Client, ref types.ManagedObjectReference) *ComputeResource {
    +	return &ComputeResource{
    +		Common: NewCommon(c, ref),
    +	}
    +}
    +
    +func (c ComputeResource) Hosts(ctx context.Context) ([]*HostSystem, error) {
    +	var cr mo.ComputeResource
    +
    +	err := c.Properties(ctx, c.Reference(), []string{"host"}, &cr)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	if len(cr.Host) == 0 {
    +		return nil, nil
    +	}
    +
    +	var hs []mo.HostSystem
    +	pc := property.DefaultCollector(c.Client())
    +	err = pc.Retrieve(ctx, cr.Host, []string{"name"}, &hs)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	var hosts []*HostSystem
    +
    +	for _, h := range hs {
    +		host := NewHostSystem(c.Client(), h.Reference())
    +		host.InventoryPath = path.Join(c.InventoryPath, h.Name)
    +		hosts = append(hosts, host)
    +	}
    +
    +	return hosts, nil
    +}
    +
    +func (c ComputeResource) Datastores(ctx context.Context) ([]*Datastore, error) {
    +	var cr mo.ComputeResource
    +
    +	err := c.Properties(ctx, c.Reference(), []string{"datastore"}, &cr)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	var dss []*Datastore
    +	for _, ref := range cr.Datastore {
    +		ds := NewDatastore(c.c, ref)
    +		dss = append(dss, ds)
    +	}
    +
    +	return dss, nil
    +}
    +
    +func (c ComputeResource) ResourcePool(ctx context.Context) (*ResourcePool, error) {
    +	var cr mo.ComputeResource
    +
    +	err := c.Properties(ctx, c.Reference(), []string{"resourcePool"}, &cr)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewResourcePool(c.c, *cr.ResourcePool), nil
    +}
    +
    +func (c ComputeResource) Reconfigure(ctx context.Context, spec types.BaseComputeResourceConfigSpec, modify bool) (*Task, error) {
    +	req := types.ReconfigureComputeResource_Task{
    +		This:   c.Reference(),
    +		Spec:   spec,
    +		Modify: modify,
    +	}
    +
    +	res, err := methods.ReconfigureComputeResource_Task(ctx, c.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(c.c, res.Returnval), nil
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/custom_fields_manager.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/custom_fields_manager.go
    new file mode 100644
    index 000000000..ef748ef2c
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/custom_fields_manager.go
    @@ -0,0 +1,146 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"context"
    +	"errors"
    +	"strconv"
    +
    +	"github.com/vmware/govmomi/vim25"
    +	"github.com/vmware/govmomi/vim25/methods"
    +	"github.com/vmware/govmomi/vim25/mo"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +var (
    +	ErrKeyNameNotFound = errors.New("key name not found")
    +)
    +
    +type CustomFieldsManager struct {
    +	Common
    +}
    +
    +// GetCustomFieldsManager wraps NewCustomFieldsManager, returning ErrNotSupported
    +// when the client is not connected to a vCenter instance.
    +func GetCustomFieldsManager(c *vim25.Client) (*CustomFieldsManager, error) {
    +	if c.ServiceContent.CustomFieldsManager == nil {
    +		return nil, ErrNotSupported
    +	}
    +	return NewCustomFieldsManager(c), nil
    +}
    +
    +func NewCustomFieldsManager(c *vim25.Client) *CustomFieldsManager {
    +	m := CustomFieldsManager{
    +		Common: NewCommon(c, *c.ServiceContent.CustomFieldsManager),
    +	}
    +
    +	return &m
    +}
    +
    +func (m CustomFieldsManager) Add(ctx context.Context, name string, moType string, fieldDefPolicy *types.PrivilegePolicyDef, fieldPolicy *types.PrivilegePolicyDef) (*types.CustomFieldDef, error) {
    +	req := types.AddCustomFieldDef{
    +		This:           m.Reference(),
    +		Name:           name,
    +		MoType:         moType,
    +		FieldDefPolicy: fieldDefPolicy,
    +		FieldPolicy:    fieldPolicy,
    +	}
    +
    +	res, err := methods.AddCustomFieldDef(ctx, m.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return &res.Returnval, nil
    +}
    +
    +func (m CustomFieldsManager) Remove(ctx context.Context, key int32) error {
    +	req := types.RemoveCustomFieldDef{
    +		This: m.Reference(),
    +		Key:  key,
    +	}
    +
    +	_, err := methods.RemoveCustomFieldDef(ctx, m.c, &req)
    +	return err
    +}
    +
    +func (m CustomFieldsManager) Rename(ctx context.Context, key int32, name string) error {
    +	req := types.RenameCustomFieldDef{
    +		This: m.Reference(),
    +		Key:  key,
    +		Name: name,
    +	}
    +
    +	_, err := methods.RenameCustomFieldDef(ctx, m.c, &req)
    +	return err
    +}
    +
    +func (m CustomFieldsManager) Set(ctx context.Context, entity types.ManagedObjectReference, key int32, value string) error {
    +	req := types.SetField{
    +		This:   m.Reference(),
    +		Entity: entity,
    +		Key:    key,
    +		Value:  value,
    +	}
    +
    +	_, err := methods.SetField(ctx, m.c, &req)
    +	return err
    +}
    +
    +type CustomFieldDefList []types.CustomFieldDef
    +
    +func (m CustomFieldsManager) Field(ctx context.Context) (CustomFieldDefList, error) {
    +	var fm mo.CustomFieldsManager
    +
    +	err := m.Properties(ctx, m.Reference(), []string{"field"}, &fm)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return fm.Field, nil
    +}
    +
    +func (m CustomFieldsManager) FindKey(ctx context.Context, name string) (int32, error) {
    +	field, err := m.Field(ctx)
    +	if err != nil {
    +		return -1, err
    +	}
    +
    +	for _, def := range field {
    +		if def.Name == name {
    +			return def.Key, nil
    +		}
    +	}
    +
    +	k, err := strconv.Atoi(name)
    +	if err == nil {
    +		// assume literal int key
    +		return int32(k), nil
    +	}
    +
    +	return -1, ErrKeyNameNotFound
    +}
    +
    +func (l CustomFieldDefList) ByKey(key int32) *types.CustomFieldDef {
    +	for _, def := range l {
    +		if def.Key == key {
    +			return &def
    +		}
    +	}
    +	return nil
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/customization_spec_manager.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/customization_spec_manager.go
    new file mode 100644
    index 000000000..cb8b965dc
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/customization_spec_manager.go
    @@ -0,0 +1,166 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"context"
    +
    +	"github.com/vmware/govmomi/vim25"
    +	"github.com/vmware/govmomi/vim25/methods"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +type CustomizationSpecManager struct {
    +	Common
    +}
    +
    +func NewCustomizationSpecManager(c *vim25.Client) *CustomizationSpecManager {
    +	cs := CustomizationSpecManager{
    +		Common: NewCommon(c, *c.ServiceContent.CustomizationSpecManager),
    +	}
    +
    +	return &cs
    +}
    +
    +func (cs CustomizationSpecManager) DoesCustomizationSpecExist(ctx context.Context, name string) (bool, error) {
    +	req := types.DoesCustomizationSpecExist{
    +		This: cs.Reference(),
    +		Name: name,
    +	}
    +
    +	res, err := methods.DoesCustomizationSpecExist(ctx, cs.c, &req)
    +
    +	if err != nil {
    +		return false, err
    +	}
    +
    +	return res.Returnval, nil
    +}
    +
    +func (cs CustomizationSpecManager) GetCustomizationSpec(ctx context.Context, name string) (*types.CustomizationSpecItem, error) {
    +	req := types.GetCustomizationSpec{
    +		This: cs.Reference(),
    +		Name: name,
    +	}
    +
    +	res, err := methods.GetCustomizationSpec(ctx, cs.c, &req)
    +
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return &res.Returnval, nil
    +}
    +
    +func (cs CustomizationSpecManager) CreateCustomizationSpec(ctx context.Context, item types.CustomizationSpecItem) error {
    +	req := types.CreateCustomizationSpec{
    +		This: cs.Reference(),
    +		Item: item,
    +	}
    +
    +	_, err := methods.CreateCustomizationSpec(ctx, cs.c, &req)
    +	if err != nil {
    +		return err
    +	}
    +
    +	return nil
    +}
    +
    +func (cs CustomizationSpecManager) OverwriteCustomizationSpec(ctx context.Context, item types.CustomizationSpecItem) error {
    +	req := types.OverwriteCustomizationSpec{
    +		This: cs.Reference(),
    +		Item: item,
    +	}
    +
    +	_, err := methods.OverwriteCustomizationSpec(ctx, cs.c, &req)
    +	if err != nil {
    +		return err
    +	}
    +
    +	return nil
    +}
    +
    +func (cs CustomizationSpecManager) DeleteCustomizationSpec(ctx context.Context, name string) error {
    +	req := types.DeleteCustomizationSpec{
    +		This: cs.Reference(),
    +		Name: name,
    +	}
    +
    +	_, err := methods.DeleteCustomizationSpec(ctx, cs.c, &req)
    +	if err != nil {
    +		return err
    +	}
    +
    +	return nil
    +}
    +
    +func (cs CustomizationSpecManager) DuplicateCustomizationSpec(ctx context.Context, name string, newName string) error {
    +	req := types.DuplicateCustomizationSpec{
    +		This:    cs.Reference(),
    +		Name:    name,
    +		NewName: newName,
    +	}
    +
    +	_, err := methods.DuplicateCustomizationSpec(ctx, cs.c, &req)
    +	if err != nil {
    +		return err
    +	}
    +
    +	return nil
    +}
    +
    +func (cs CustomizationSpecManager) RenameCustomizationSpec(ctx context.Context, name string, newName string) error {
    +	req := types.RenameCustomizationSpec{
    +		This:    cs.Reference(),
    +		Name:    name,
    +		NewName: newName,
    +	}
    +
    +	_, err := methods.RenameCustomizationSpec(ctx, cs.c, &req)
    +	if err != nil {
    +		return err
    +	}
    +
    +	return nil
    +}
    +
    +func (cs CustomizationSpecManager) CustomizationSpecItemToXml(ctx context.Context, item types.CustomizationSpecItem) (string, error) {
    +	req := types.CustomizationSpecItemToXml{
    +		This: cs.Reference(),
    +		Item: item,
    +	}
    +
    +	res, err := methods.CustomizationSpecItemToXml(ctx, cs.c, &req)
    +	if err != nil {
    +		return "", err
    +	}
    +
    +	return res.Returnval, nil
    +}
    +
    +func (cs CustomizationSpecManager) XmlToCustomizationSpecItem(ctx context.Context, xml string) (*types.CustomizationSpecItem, error) {
    +	req := types.XmlToCustomizationSpecItem{
    +		This:        cs.Reference(),
    +		SpecItemXml: xml,
    +	}
    +
    +	res, err := methods.XmlToCustomizationSpecItem(ctx, cs.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +	return &res.Returnval, nil
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/datacenter.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/datacenter.go
    new file mode 100644
    index 000000000..41fa35265
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/datacenter.go
    @@ -0,0 +1,129 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"context"
    +	"fmt"
    +
    +	"github.com/vmware/govmomi/vim25"
    +	"github.com/vmware/govmomi/vim25/methods"
    +	"github.com/vmware/govmomi/vim25/mo"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +type DatacenterFolders struct {
    +	VmFolder        *Folder
    +	HostFolder      *Folder
    +	DatastoreFolder *Folder
    +	NetworkFolder   *Folder
    +}
    +
    +type Datacenter struct {
    +	Common
    +}
    +
    +func NewDatacenter(c *vim25.Client, ref types.ManagedObjectReference) *Datacenter {
    +	return &Datacenter{
    +		Common: NewCommon(c, ref),
    +	}
    +}
    +
    +func (d *Datacenter) Folders(ctx context.Context) (*DatacenterFolders, error) {
    +	var md mo.Datacenter
    +
    +	ps := []string{"name", "vmFolder", "hostFolder", "datastoreFolder", "networkFolder"}
    +	err := d.Properties(ctx, d.Reference(), ps, &md)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	df := &DatacenterFolders{
    +		VmFolder:        NewFolder(d.c, md.VmFolder),
    +		HostFolder:      NewFolder(d.c, md.HostFolder),
    +		DatastoreFolder: NewFolder(d.c, md.DatastoreFolder),
    +		NetworkFolder:   NewFolder(d.c, md.NetworkFolder),
    +	}
    +
    +	paths := []struct {
    +		name string
    +		path *string
    +	}{
    +		{"vm", &df.VmFolder.InventoryPath},
    +		{"host", &df.HostFolder.InventoryPath},
    +		{"datastore", &df.DatastoreFolder.InventoryPath},
    +		{"network", &df.NetworkFolder.InventoryPath},
    +	}
    +
    +	for _, p := range paths {
    +		*p.path = fmt.Sprintf("/%s/%s", md.Name, p.name)
    +	}
    +
    +	return df, nil
    +}
    +
    +func (d Datacenter) Destroy(ctx context.Context) (*Task, error) {
    +	req := types.Destroy_Task{
    +		This: d.Reference(),
    +	}
    +
    +	res, err := methods.Destroy_Task(ctx, d.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(d.c, res.Returnval), nil
    +}
    +
    +// PowerOnVM powers on multiple virtual machines with a single vCenter call.
    +// If called against ESX, serially powers on the list of VMs and the returned *Task will always be nil.
    +func (d Datacenter) PowerOnVM(ctx context.Context, vm []types.ManagedObjectReference, option ...types.BaseOptionValue) (*Task, error) {
    +	if d.Client().IsVC() {
    +		req := types.PowerOnMultiVM_Task{
    +			This:   d.Reference(),
    +			Vm:     vm,
    +			Option: option,
    +		}
    +
    +		res, err := methods.PowerOnMultiVM_Task(ctx, d.c, &req)
    +		if err != nil {
    +			return nil, err
    +		}
    +
    +		return NewTask(d.c, res.Returnval), nil
    +	}
    +
    +	for _, ref := range vm {
    +		obj := NewVirtualMachine(d.Client(), ref)
    +		task, err := obj.PowerOn(ctx)
    +		if err != nil {
    +			return nil, err
    +		}
    +
    +		err = task.Wait(ctx)
    +		if err != nil {
    +			// Ignore any InvalidPowerState fault, as it indicates the VM is already powered on
    +			if f, ok := err.(types.HasFault); ok {
    +				if _, ok = f.Fault().(*types.InvalidPowerState); !ok {
    +					return nil, err
    +				}
    +			}
    +		}
    +	}
    +
    +	return nil, nil
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/datastore.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/datastore.go
    new file mode 100644
    index 000000000..dfe6603aa
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/datastore.go
    @@ -0,0 +1,435 @@
    +/*
    +Copyright (c) 2015-2016 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"fmt"
    +	"io"
    +	"math/rand"
    +	"os"
    +	"path"
    +	"strings"
    +
    +	"context"
    +	"net/http"
    +	"net/url"
    +
    +	"github.com/vmware/govmomi/property"
    +	"github.com/vmware/govmomi/session"
    +	"github.com/vmware/govmomi/vim25"
    +	"github.com/vmware/govmomi/vim25/mo"
    +	"github.com/vmware/govmomi/vim25/soap"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +// DatastoreNoSuchDirectoryError is returned when a directory could not be found.
    +type DatastoreNoSuchDirectoryError struct {
    +	verb    string
    +	subject string
    +}
    +
    +func (e DatastoreNoSuchDirectoryError) Error() string {
    +	return fmt.Sprintf("cannot %s '%s': No such directory", e.verb, e.subject)
    +}
    +
    +// DatastoreNoSuchFileError is returned when a file could not be found.
    +type DatastoreNoSuchFileError struct {
    +	verb    string
    +	subject string
    +}
    +
    +func (e DatastoreNoSuchFileError) Error() string {
    +	return fmt.Sprintf("cannot %s '%s': No such file", e.verb, e.subject)
    +}
    +
    +type Datastore struct {
    +	Common
    +
    +	DatacenterPath string
    +}
    +
    +func NewDatastore(c *vim25.Client, ref types.ManagedObjectReference) *Datastore {
    +	return &Datastore{
    +		Common: NewCommon(c, ref),
    +	}
    +}
    +
    +func (d Datastore) Path(path string) string {
    +	return (&DatastorePath{
    +		Datastore: d.Name(),
    +		Path:      path,
    +	}).String()
    +}
    +
    +// NewURL constructs a url.URL with the given file path for datastore access over HTTP.
    +func (d Datastore) NewURL(path string) *url.URL {
    +	u := d.c.URL()
    +
    +	return &url.URL{
    +		Scheme: u.Scheme,
    +		Host:   u.Host,
    +		Path:   fmt.Sprintf("/folder/%s", path),
    +		RawQuery: url.Values{
    +			"dcPath": []string{d.DatacenterPath},
    +			"dsName": []string{d.Name()},
    +		}.Encode(),
    +	}
    +}
    +
    +// URL is deprecated, use NewURL instead.
    +func (d Datastore) URL(ctx context.Context, dc *Datacenter, path string) (*url.URL, error) {
    +	return d.NewURL(path), nil
    +}
    +
    +func (d Datastore) Browser(ctx context.Context) (*HostDatastoreBrowser, error) {
    +	var do mo.Datastore
    +
    +	err := d.Properties(ctx, d.Reference(), []string{"browser"}, &do)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewHostDatastoreBrowser(d.c, do.Browser), nil
    +}
    +
    +func (d Datastore) useServiceTicket() bool {
    +	// If connected to workstation, service ticketing not supported
    +	// If connected to ESX, service ticketing not needed
    +	if !d.c.IsVC() {
    +		return false
    +	}
    +
    +	key := "GOVMOMI_USE_SERVICE_TICKET"
    +
    +	val := d.c.URL().Query().Get(key)
    +	if val == "" {
    +		val = os.Getenv(key)
    +	}
    +
    +	if val == "1" || val == "true" {
    +		return true
    +	}
    +
    +	return false
    +}
    +
    +func (d Datastore) useServiceTicketHostName(name string) bool {
    +	// No need if talking directly to ESX.
    +	if !d.c.IsVC() {
    +		return false
    +	}
    +
    +	// If version happens to be < 5.1
    +	if name == "" {
    +		return false
    +	}
    +
    +	// If the HostSystem is using DHCP on a network without dynamic DNS,
    +	// HostSystem.Config.Network.DnsConfig.HostName is set to "localhost" by default.
    +	// This resolves to "localhost.localdomain" by default via /etc/hosts on ESX.
    +	// In that case, we will stick with the HostSystem.Name which is the IP address that
    +	// was used to connect the host to VC.
    +	if name == "localhost.localdomain" {
    +		return false
    +	}
    +
    +	// Still possible to have HostName that don't resolve via DNS,
    +	// so we default to false.
    +	key := "GOVMOMI_USE_SERVICE_TICKET_HOSTNAME"
    +
    +	val := d.c.URL().Query().Get(key)
    +	if val == "" {
    +		val = os.Getenv(key)
    +	}
    +
    +	if val == "1" || val == "true" {
    +		return true
    +	}
    +
    +	return false
    +}
    +
    +type datastoreServiceTicketHostKey struct{}
    +
    +// HostContext returns a Context where the given host will be used for datastore HTTP access
    +// via the ServiceTicket method.
    +func (d Datastore) HostContext(ctx context.Context, host *HostSystem) context.Context {
    +	return context.WithValue(ctx, datastoreServiceTicketHostKey{}, host)
    +}
    +
    +// ServiceTicket obtains a ticket via AcquireGenericServiceTicket and returns it an http.Cookie with the url.URL
    +// that can be used along with the ticket cookie to access the given path.  An host is chosen at random unless the
    +// the given Context was created with a specific host via the HostContext method.
    +func (d Datastore) ServiceTicket(ctx context.Context, path string, method string) (*url.URL, *http.Cookie, error) {
    +	u := d.NewURL(path)
    +
    +	host, ok := ctx.Value(datastoreServiceTicketHostKey{}).(*HostSystem)
    +
    +	if !ok {
    +		if !d.useServiceTicket() {
    +			return u, nil, nil
    +		}
    +
    +		hosts, err := d.AttachedHosts(ctx)
    +		if err != nil {
    +			return nil, nil, err
    +		}
    +
    +		if len(hosts) == 0 {
    +			// Fallback to letting vCenter choose a host
    +			return u, nil, nil
    +		}
    +
    +		// Pick a random attached host
    +		host = hosts[rand.Intn(len(hosts))]
    +	}
    +
    +	ips, err := host.ManagementIPs(ctx)
    +	if err != nil {
    +		return nil, nil, err
    +	}
    +
    +	if len(ips) > 0 {
    +		// prefer a ManagementIP
    +		u.Host = ips[0].String()
    +	} else {
    +		// fallback to inventory name
    +		u.Host, err = host.ObjectName(ctx)
    +		if err != nil {
    +			return nil, nil, err
    +		}
    +	}
    +
    +	// VC datacenter path will not be valid against ESX
    +	q := u.Query()
    +	delete(q, "dcPath")
    +	u.RawQuery = q.Encode()
    +
    +	spec := types.SessionManagerHttpServiceRequestSpec{
    +		Url: u.String(),
    +		// See SessionManagerHttpServiceRequestSpecMethod enum
    +		Method: fmt.Sprintf("http%s%s", method[0:1], strings.ToLower(method[1:])),
    +	}
    +
    +	sm := session.NewManager(d.Client())
    +
    +	ticket, err := sm.AcquireGenericServiceTicket(ctx, &spec)
    +	if err != nil {
    +		return nil, nil, err
    +	}
    +
    +	cookie := &http.Cookie{
    +		Name:  "vmware_cgi_ticket",
    +		Value: ticket.Id,
    +	}
    +
    +	if d.useServiceTicketHostName(ticket.HostName) {
    +		u.Host = ticket.HostName
    +	}
    +
    +	d.Client().SetThumbprint(u.Host, ticket.SslThumbprint)
    +
    +	return u, cookie, nil
    +}
    +
    +func (d Datastore) uploadTicket(ctx context.Context, path string, param *soap.Upload) (*url.URL, *soap.Upload, error) {
    +	p := soap.DefaultUpload
    +	if param != nil {
    +		p = *param // copy
    +	}
    +
    +	u, ticket, err := d.ServiceTicket(ctx, path, p.Method)
    +	if err != nil {
    +		return nil, nil, err
    +	}
    +
    +	p.Ticket = ticket
    +
    +	return u, &p, nil
    +}
    +
    +func (d Datastore) downloadTicket(ctx context.Context, path string, param *soap.Download) (*url.URL, *soap.Download, error) {
    +	p := soap.DefaultDownload
    +	if param != nil {
    +		p = *param // copy
    +	}
    +
    +	u, ticket, err := d.ServiceTicket(ctx, path, p.Method)
    +	if err != nil {
    +		return nil, nil, err
    +	}
    +
    +	p.Ticket = ticket
    +
    +	return u, &p, nil
    +}
    +
    +// Upload via soap.Upload with an http service ticket
    +func (d Datastore) Upload(ctx context.Context, f io.Reader, path string, param *soap.Upload) error {
    +	u, p, err := d.uploadTicket(ctx, path, param)
    +	if err != nil {
    +		return err
    +	}
    +	return d.Client().Upload(ctx, f, u, p)
    +}
    +
    +// UploadFile via soap.Upload with an http service ticket
    +func (d Datastore) UploadFile(ctx context.Context, file string, path string, param *soap.Upload) error {
    +	u, p, err := d.uploadTicket(ctx, path, param)
    +	if err != nil {
    +		return err
    +	}
    +	return d.Client().UploadFile(ctx, file, u, p)
    +}
    +
    +// Download via soap.Download with an http service ticket
    +func (d Datastore) Download(ctx context.Context, path string, param *soap.Download) (io.ReadCloser, int64, error) {
    +	u, p, err := d.downloadTicket(ctx, path, param)
    +	if err != nil {
    +		return nil, 0, err
    +	}
    +	return d.Client().Download(ctx, u, p)
    +}
    +
    +// DownloadFile via soap.Download with an http service ticket
    +func (d Datastore) DownloadFile(ctx context.Context, path string, file string, param *soap.Download) error {
    +	u, p, err := d.downloadTicket(ctx, path, param)
    +	if err != nil {
    +		return err
    +	}
    +	return d.Client().DownloadFile(ctx, file, u, p)
    +}
    +
    +// AttachedHosts returns hosts that have this Datastore attached, accessible and writable.
    +func (d Datastore) AttachedHosts(ctx context.Context) ([]*HostSystem, error) {
    +	var ds mo.Datastore
    +	var hosts []*HostSystem
    +
    +	pc := property.DefaultCollector(d.Client())
    +	err := pc.RetrieveOne(ctx, d.Reference(), []string{"host"}, &ds)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	mounts := make(map[types.ManagedObjectReference]types.DatastoreHostMount)
    +	var refs []types.ManagedObjectReference
    +	for _, host := range ds.Host {
    +		refs = append(refs, host.Key)
    +		mounts[host.Key] = host
    +	}
    +
    +	var hs []mo.HostSystem
    +	err = pc.Retrieve(ctx, refs, []string{"runtime.connectionState", "runtime.powerState"}, &hs)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	for _, host := range hs {
    +		if host.Runtime.ConnectionState == types.HostSystemConnectionStateConnected &&
    +			host.Runtime.PowerState == types.HostSystemPowerStatePoweredOn {
    +
    +			mount := mounts[host.Reference()]
    +			info := mount.MountInfo
    +
    +			if *info.Mounted && *info.Accessible && info.AccessMode == string(types.HostMountModeReadWrite) {
    +				hosts = append(hosts, NewHostSystem(d.Client(), mount.Key))
    +			}
    +		}
    +	}
    +
    +	return hosts, nil
    +}
    +
    +// AttachedClusterHosts returns hosts that have this Datastore attached, accessible and writable and are members of the given cluster.
    +func (d Datastore) AttachedClusterHosts(ctx context.Context, cluster *ComputeResource) ([]*HostSystem, error) {
    +	var hosts []*HostSystem
    +
    +	clusterHosts, err := cluster.Hosts(ctx)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	attachedHosts, err := d.AttachedHosts(ctx)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	refs := make(map[types.ManagedObjectReference]bool)
    +	for _, host := range attachedHosts {
    +		refs[host.Reference()] = true
    +	}
    +
    +	for _, host := range clusterHosts {
    +		if refs[host.Reference()] {
    +			hosts = append(hosts, host)
    +		}
    +	}
    +
    +	return hosts, nil
    +}
    +
    +func (d Datastore) Stat(ctx context.Context, file string) (types.BaseFileInfo, error) {
    +	b, err := d.Browser(ctx)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	spec := types.HostDatastoreBrowserSearchSpec{
    +		Details: &types.FileQueryFlags{
    +			FileType:     true,
    +			FileSize:     true,
    +			Modification: true,
    +			FileOwner:    types.NewBool(true),
    +		},
    +		MatchPattern: []string{path.Base(file)},
    +	}
    +
    +	dsPath := d.Path(path.Dir(file))
    +	task, err := b.SearchDatastore(ctx, dsPath, &spec)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	info, err := task.WaitForResult(ctx, nil)
    +	if err != nil {
    +		if types.IsFileNotFound(err) {
    +			// FileNotFound means the base path doesn't exist.
    +			return nil, DatastoreNoSuchDirectoryError{"stat", dsPath}
    +		}
    +
    +		return nil, err
    +	}
    +
    +	res := info.Result.(types.HostDatastoreBrowserSearchResults)
    +	if len(res.File) == 0 {
    +		// File doesn't exist
    +		return nil, DatastoreNoSuchFileError{"stat", d.Path(file)}
    +	}
    +
    +	return res.File[0], nil
    +
    +}
    +
    +// Type returns the type of file system volume.
    +func (d Datastore) Type(ctx context.Context) (types.HostFileSystemVolumeFileSystemType, error) {
    +	var mds mo.Datastore
    +
    +	if err := d.Properties(ctx, d.Reference(), []string{"summary.type"}, &mds); err != nil {
    +		return types.HostFileSystemVolumeFileSystemType(""), err
    +	}
    +	return types.HostFileSystemVolumeFileSystemType(mds.Summary.Type), nil
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/datastore_file.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/datastore_file.go
    new file mode 100644
    index 000000000..bc010fc36
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/datastore_file.go
    @@ -0,0 +1,414 @@
    +/*
    +Copyright (c) 2016-2017 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"bytes"
    +	"context"
    +	"errors"
    +	"fmt"
    +	"io"
    +	"net/http"
    +	"os"
    +	"path"
    +	"sync"
    +	"time"
    +
    +	"github.com/vmware/govmomi/vim25/soap"
    +)
    +
    +// DatastoreFile implements io.Reader, io.Seeker and io.Closer interfaces for datastore file access.
    +type DatastoreFile struct {
    +	d    Datastore
    +	ctx  context.Context
    +	name string
    +
    +	buf    io.Reader
    +	body   io.ReadCloser
    +	length int64
    +	offset struct {
    +		read, seek int64
    +	}
    +}
    +
    +// Open opens the named file relative to the Datastore.
    +func (d Datastore) Open(ctx context.Context, name string) (*DatastoreFile, error) {
    +	return &DatastoreFile{
    +		d:      d,
    +		name:   name,
    +		length: -1,
    +		ctx:    ctx,
    +	}, nil
    +}
    +
    +// Read reads up to len(b) bytes from the DatastoreFile.
    +func (f *DatastoreFile) Read(b []byte) (int, error) {
    +	if f.offset.read != f.offset.seek {
    +		// A Seek() call changed the offset, we need to issue a new GET
    +		_ = f.Close()
    +
    +		f.offset.read = f.offset.seek
    +	} else if f.buf != nil {
    +		// f.buf + f behaves like an io.MultiReader
    +		n, err := f.buf.Read(b)
    +		if err == io.EOF {
    +			f.buf = nil // buffer has been drained
    +		}
    +		if n > 0 {
    +			return n, nil
    +		}
    +	}
    +
    +	body, err := f.get()
    +	if err != nil {
    +		return 0, err
    +	}
    +
    +	n, err := body.Read(b)
    +
    +	f.offset.read += int64(n)
    +	f.offset.seek += int64(n)
    +
    +	return n, err
    +}
    +
    +// Close closes the DatastoreFile.
    +func (f *DatastoreFile) Close() error {
    +	var err error
    +
    +	if f.body != nil {
    +		err = f.body.Close()
    +		f.body = nil
    +	}
    +
    +	f.buf = nil
    +
    +	return err
    +}
    +
    +// Seek sets the offset for the next Read on the DatastoreFile.
    +func (f *DatastoreFile) Seek(offset int64, whence int) (int64, error) {
    +	switch whence {
    +	case io.SeekStart:
    +	case io.SeekCurrent:
    +		offset += f.offset.seek
    +	case io.SeekEnd:
    +		if f.length < 0 {
    +			_, err := f.Stat()
    +			if err != nil {
    +				return 0, err
    +			}
    +		}
    +		offset += f.length
    +	default:
    +		return 0, errors.New("Seek: invalid whence")
    +	}
    +
    +	// allow negative SeekStart for initial Range request
    +	if offset < 0 {
    +		return 0, errors.New("Seek: invalid offset")
    +	}
    +
    +	f.offset.seek = offset
    +
    +	return offset, nil
    +}
    +
    +type fileStat struct {
    +	file   *DatastoreFile
    +	header http.Header
    +}
    +
    +func (s *fileStat) Name() string {
    +	return path.Base(s.file.name)
    +}
    +
    +func (s *fileStat) Size() int64 {
    +	return s.file.length
    +}
    +
    +func (s *fileStat) Mode() os.FileMode {
    +	return 0
    +}
    +
    +func (s *fileStat) ModTime() time.Time {
    +	return time.Now() // no Last-Modified
    +}
    +
    +func (s *fileStat) IsDir() bool {
    +	return false
    +}
    +
    +func (s *fileStat) Sys() interface{} {
    +	return s.header
    +}
    +
    +func statusError(res *http.Response) error {
    +	if res.StatusCode == http.StatusNotFound {
    +		return os.ErrNotExist
    +	}
    +	return errors.New(res.Status)
    +}
    +
    +// Stat returns the os.FileInfo interface describing file.
    +func (f *DatastoreFile) Stat() (os.FileInfo, error) {
    +	// TODO: consider using Datastore.Stat() instead
    +	u, p, err := f.d.downloadTicket(f.ctx, f.name, &soap.Download{Method: "HEAD"})
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	res, err := f.d.Client().DownloadRequest(f.ctx, u, p)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	if res.StatusCode != http.StatusOK {
    +		return nil, statusError(res)
    +	}
    +
    +	f.length = res.ContentLength
    +
    +	return &fileStat{f, res.Header}, nil
    +}
    +
    +func (f *DatastoreFile) get() (io.Reader, error) {
    +	if f.body != nil {
    +		return f.body, nil
    +	}
    +
    +	u, p, err := f.d.downloadTicket(f.ctx, f.name, nil)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	if f.offset.read != 0 {
    +		p.Headers = map[string]string{
    +			"Range": fmt.Sprintf("bytes=%d-", f.offset.read),
    +		}
    +	}
    +
    +	res, err := f.d.Client().DownloadRequest(f.ctx, u, p)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	switch res.StatusCode {
    +	case http.StatusOK:
    +		f.length = res.ContentLength
    +	case http.StatusPartialContent:
    +		var start, end int
    +		cr := res.Header.Get("Content-Range")
    +		_, err = fmt.Sscanf(cr, "bytes %d-%d/%d", &start, &end, &f.length)
    +		if err != nil {
    +			f.length = -1
    +		}
    +	case http.StatusRequestedRangeNotSatisfiable:
    +		// ok: Read() will return io.EOF
    +	default:
    +		return nil, statusError(res)
    +	}
    +
    +	if f.length < 0 {
    +		_ = res.Body.Close()
    +		return nil, errors.New("unable to determine file size")
    +	}
    +
    +	f.body = res.Body
    +
    +	return f.body, nil
    +}
    +
    +func lastIndexLines(s []byte, line *int, include func(l int, m string) bool) (int64, bool) {
    +	i := len(s) - 1
    +	done := false
    +
    +	for i > 0 {
    +		o := bytes.LastIndexByte(s[:i], '\n')
    +		if o < 0 {
    +			break
    +		}
    +
    +		msg := string(s[o+1 : i+1])
    +		if !include(*line, msg) {
    +			done = true
    +			break
    +		} else {
    +			i = o
    +			*line++
    +		}
    +	}
    +
    +	return int64(i), done
    +}
    +
    +// Tail seeks to the position of the last N lines of the file.
    +func (f *DatastoreFile) Tail(n int) error {
    +	return f.TailFunc(n, func(line int, _ string) bool { return n > line })
    +}
    +
    +// TailFunc will seek backwards in the datastore file until it hits a line that does
    +// not satisfy the supplied `include` function.
    +func (f *DatastoreFile) TailFunc(lines int, include func(line int, message string) bool) error {
    +	// Read the file in reverse using bsize chunks
    +	const bsize = int64(1024 * 16)
    +
    +	fsize, err := f.Seek(0, io.SeekEnd)
    +	if err != nil {
    +		return err
    +	}
    +
    +	if lines == 0 {
    +		return nil
    +	}
    +
    +	chunk := int64(-1)
    +
    +	buf := bytes.NewBuffer(make([]byte, 0, bsize))
    +	line := 0
    +
    +	for {
    +		var eof bool
    +		var pos int64
    +
    +		nread := bsize
    +
    +		offset := chunk * bsize
    +		remain := fsize + offset
    +
    +		if remain < 0 {
    +			if pos, err = f.Seek(0, io.SeekStart); err != nil {
    +				return err
    +			}
    +
    +			nread = bsize + remain
    +			eof = true
    +		} else {
    +			if pos, err = f.Seek(offset, io.SeekEnd); err != nil {
    +				return err
    +			}
    +		}
    +
    +		if _, err = io.CopyN(buf, f, nread); err != nil {
    +			if err != io.EOF {
    +				return err
    +			}
    +		}
    +
    +		b := buf.Bytes()
    +		idx, done := lastIndexLines(b, &line, include)
    +
    +		if done {
    +			if chunk == -1 {
    +				// We found all N lines in the last chunk of the file.
    +				// The seek offset is also now at the current end of file.
    +				// Save this buffer to avoid another GET request when Read() is called.
    +				buf.Next(int(idx + 1))
    +				f.buf = buf
    +				return nil
    +			}
    +
    +			if _, err = f.Seek(pos+idx+1, io.SeekStart); err != nil {
    +				return err
    +			}
    +
    +			break
    +		}
    +
    +		if eof {
    +			if remain < 0 {
    +				// We found < N lines in the entire file, so seek to the start.
    +				_, _ = f.Seek(0, io.SeekStart)
    +			}
    +			break
    +		}
    +
    +		chunk--
    +		buf.Reset()
    +	}
    +
    +	return nil
    +}
    +
    +type followDatastoreFile struct {
    +	r *DatastoreFile
    +	c chan struct{}
    +	i time.Duration
    +	o sync.Once
    +}
    +
    +// Read reads up to len(b) bytes from the DatastoreFile being followed.
    +// This method will block until data is read, an error other than io.EOF is returned or Close() is called.
    +func (f *followDatastoreFile) Read(p []byte) (int, error) {
    +	offset := f.r.offset.seek
    +	stop := false
    +
    +	for {
    +		n, err := f.r.Read(p)
    +		if err != nil && err == io.EOF {
    +			_ = f.r.Close() // GET request body has been drained.
    +			if stop {
    +				return n, err
    +			}
    +			err = nil
    +		}
    +
    +		if n > 0 {
    +			return n, err
    +		}
    +
    +		select {
    +		case <-f.c:
    +			// Wake up and stop polling once the body has been drained
    +			stop = true
    +		case <-time.After(f.i):
    +		}
    +
    +		info, serr := f.r.Stat()
    +		if serr != nil {
    +			// Return EOF rather than 404 if the file goes away
    +			if serr == os.ErrNotExist {
    +				_ = f.r.Close()
    +				return 0, io.EOF
    +			}
    +			return 0, serr
    +		}
    +
    +		if info.Size() < offset {
    +			// assume file has be truncated
    +			offset, err = f.r.Seek(0, io.SeekStart)
    +			if err != nil {
    +				return 0, err
    +			}
    +		}
    +	}
    +}
    +
    +// Close will stop Follow polling and close the underlying DatastoreFile.
    +func (f *followDatastoreFile) Close() error {
    +	f.o.Do(func() { close(f.c) })
    +	return nil
    +}
    +
    +// Follow returns an io.ReadCloser to stream the file contents as data is appended.
    +func (f *DatastoreFile) Follow(interval time.Duration) io.ReadCloser {
    +	return &followDatastoreFile{
    +		r: f,
    +		c: make(chan struct{}),
    +		i: interval,
    +	}
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/datastore_file_manager.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/datastore_file_manager.go
    new file mode 100644
    index 000000000..a6e29c2c5
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/datastore_file_manager.go
    @@ -0,0 +1,228 @@
    +/*
    +Copyright (c) 2017-2018 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"bufio"
    +	"bytes"
    +	"context"
    +	"fmt"
    +	"io"
    +	"log"
    +	"path"
    +	"strings"
    +
    +	"github.com/vmware/govmomi/vim25/progress"
    +	"github.com/vmware/govmomi/vim25/soap"
    +)
    +
    +// DatastoreFileManager combines FileManager and VirtualDiskManager to manage files on a Datastore
    +type DatastoreFileManager struct {
    +	Datacenter         *Datacenter
    +	Datastore          *Datastore
    +	FileManager        *FileManager
    +	VirtualDiskManager *VirtualDiskManager
    +
    +	Force            bool
    +	DatacenterTarget *Datacenter
    +}
    +
    +// NewFileManager creates a new instance of DatastoreFileManager
    +func (d Datastore) NewFileManager(dc *Datacenter, force bool) *DatastoreFileManager {
    +	c := d.Client()
    +
    +	m := &DatastoreFileManager{
    +		Datacenter:         dc,
    +		Datastore:          &d,
    +		FileManager:        NewFileManager(c),
    +		VirtualDiskManager: NewVirtualDiskManager(c),
    +		Force:              force,
    +		DatacenterTarget:   dc,
    +	}
    +
    +	return m
    +}
    +
    +func (m *DatastoreFileManager) WithProgress(ctx context.Context, s progress.Sinker) context.Context {
    +	return context.WithValue(ctx, m, s)
    +}
    +
    +func (m *DatastoreFileManager) wait(ctx context.Context, task *Task) error {
    +	var logger progress.Sinker
    +	if s, ok := ctx.Value(m).(progress.Sinker); ok {
    +		logger = s
    +	}
    +	_, err := task.WaitForResult(ctx, logger)
    +	return err
    +}
    +
    +// Delete dispatches to the appropriate Delete method based on file name extension
    +func (m *DatastoreFileManager) Delete(ctx context.Context, name string) error {
    +	switch path.Ext(name) {
    +	case ".vmdk":
    +		return m.DeleteVirtualDisk(ctx, name)
    +	default:
    +		return m.DeleteFile(ctx, name)
    +	}
    +}
    +
    +// DeleteFile calls FileManager.DeleteDatastoreFile
    +func (m *DatastoreFileManager) DeleteFile(ctx context.Context, name string) error {
    +	p := m.Path(name)
    +
    +	task, err := m.FileManager.DeleteDatastoreFile(ctx, p.String(), m.Datacenter)
    +	if err != nil {
    +		return err
    +	}
    +
    +	return m.wait(ctx, task)
    +}
    +
    +// DeleteVirtualDisk calls VirtualDiskManager.DeleteVirtualDisk
    +// Regardless of the Datastore type, DeleteVirtualDisk will fail if 'ddb.deletable=false',
    +// so if Force=true this method attempts to set 'ddb.deletable=true' before starting the delete task.
    +func (m *DatastoreFileManager) DeleteVirtualDisk(ctx context.Context, name string) error {
    +	p := m.Path(name)
    +
    +	var merr error
    +
    +	if m.Force {
    +		merr = m.markDiskAsDeletable(ctx, p)
    +	}
    +
    +	task, err := m.VirtualDiskManager.DeleteVirtualDisk(ctx, p.String(), m.Datacenter)
    +	if err != nil {
    +		log.Printf("markDiskAsDeletable(%s): %s", p, merr)
    +		return err
    +	}
    +
    +	return m.wait(ctx, task)
    +}
    +
    +// CopyFile calls FileManager.CopyDatastoreFile
    +func (m *DatastoreFileManager) CopyFile(ctx context.Context, src string, dst string) error {
    +	srcp := m.Path(src)
    +	dstp := m.Path(dst)
    +
    +	task, err := m.FileManager.CopyDatastoreFile(ctx, srcp.String(), m.Datacenter, dstp.String(), m.DatacenterTarget, m.Force)
    +	if err != nil {
    +		return err
    +	}
    +
    +	return m.wait(ctx, task)
    +}
    +
    +// Copy dispatches to the appropriate FileManager or VirtualDiskManager Copy method based on file name extension
    +func (m *DatastoreFileManager) Copy(ctx context.Context, src string, dst string) error {
    +	srcp := m.Path(src)
    +	dstp := m.Path(dst)
    +
    +	f := m.FileManager.CopyDatastoreFile
    +
    +	if srcp.IsVMDK() {
    +		// types.VirtualDiskSpec=nil as it is not implemented by vCenter
    +		f = func(ctx context.Context, src string, srcDC *Datacenter, dst string, dstDC *Datacenter, force bool) (*Task, error) {
    +			return m.VirtualDiskManager.CopyVirtualDisk(ctx, src, srcDC, dst, dstDC, nil, force)
    +		}
    +	}
    +
    +	task, err := f(ctx, srcp.String(), m.Datacenter, dstp.String(), m.DatacenterTarget, m.Force)
    +	if err != nil {
    +		return err
    +	}
    +
    +	return m.wait(ctx, task)
    +}
    +
    +// MoveFile calls FileManager.MoveDatastoreFile
    +func (m *DatastoreFileManager) MoveFile(ctx context.Context, src string, dst string) error {
    +	srcp := m.Path(src)
    +	dstp := m.Path(dst)
    +
    +	task, err := m.FileManager.MoveDatastoreFile(ctx, srcp.String(), m.Datacenter, dstp.String(), m.DatacenterTarget, m.Force)
    +	if err != nil {
    +		return err
    +	}
    +
    +	return m.wait(ctx, task)
    +}
    +
    +// Move dispatches to the appropriate FileManager or VirtualDiskManager Move method based on file name extension
    +func (m *DatastoreFileManager) Move(ctx context.Context, src string, dst string) error {
    +	srcp := m.Path(src)
    +	dstp := m.Path(dst)
    +
    +	f := m.FileManager.MoveDatastoreFile
    +
    +	if srcp.IsVMDK() {
    +		f = m.VirtualDiskManager.MoveVirtualDisk
    +	}
    +
    +	task, err := f(ctx, srcp.String(), m.Datacenter, dstp.String(), m.DatacenterTarget, m.Force)
    +	if err != nil {
    +		return err
    +	}
    +
    +	return m.wait(ctx, task)
    +}
    +
    +// Path converts path name to a DatastorePath
    +func (m *DatastoreFileManager) Path(name string) *DatastorePath {
    +	var p DatastorePath
    +
    +	if !p.FromString(name) {
    +		p.Path = name
    +		p.Datastore = m.Datastore.Name()
    +	}
    +
    +	return &p
    +}
    +
    +func (m *DatastoreFileManager) markDiskAsDeletable(ctx context.Context, path *DatastorePath) error {
    +	r, _, err := m.Datastore.Download(ctx, path.Path, &soap.DefaultDownload)
    +	if err != nil {
    +		return err
    +	}
    +
    +	defer r.Close()
    +
    +	hasFlag := false
    +	buf := new(bytes.Buffer)
    +
    +	s := bufio.NewScanner(&io.LimitedReader{R: r, N: 2048}) // should be only a few hundred bytes, limit to be sure
    +
    +	for s.Scan() {
    +		line := s.Text()
    +		if strings.HasPrefix(line, "ddb.deletable") {
    +			hasFlag = true
    +			continue
    +		}
    +
    +		fmt.Fprintln(buf, line)
    +	}
    +
    +	if err := s.Err(); err != nil {
    +		return err // any error other than EOF
    +	}
    +
    +	if !hasFlag {
    +		return nil // already deletable, so leave as-is
    +	}
    +
    +	// rewrite the .vmdk with ddb.deletable flag removed (the default is true)
    +	return m.Datastore.Upload(ctx, buf, path.Path, &soap.DefaultUpload)
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/datastore_path.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/datastore_path.go
    new file mode 100644
    index 000000000..1563ee1e1
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/datastore_path.go
    @@ -0,0 +1,71 @@
    +/*
    +Copyright (c) 2016 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"fmt"
    +	"path"
    +	"strings"
    +)
    +
    +// DatastorePath contains the components of a datastore path.
    +type DatastorePath struct {
    +	Datastore string
    +	Path      string
    +}
    +
    +// FromString parses a datastore path.
    +// Returns true if the path could be parsed, false otherwise.
    +func (p *DatastorePath) FromString(s string) bool {
    +	if len(s) == 0 {
    +		return false
    +	}
    +
    +	s = strings.TrimSpace(s)
    +
    +	if !strings.HasPrefix(s, "[") {
    +		return false
    +	}
    +
    +	s = s[1:]
    +
    +	ix := strings.Index(s, "]")
    +	if ix < 0 {
    +		return false
    +	}
    +
    +	p.Datastore = s[:ix]
    +	p.Path = strings.TrimSpace(s[ix+1:])
    +
    +	return true
    +}
    +
    +// String formats a datastore path.
    +func (p *DatastorePath) String() string {
    +	s := fmt.Sprintf("[%s]", p.Datastore)
    +
    +	if p.Path == "" {
    +		return s
    +	}
    +
    +	return strings.Join([]string{s, p.Path}, " ")
    +}
    +
    +// IsVMDK returns true if Path has a ".vmdk" extension
    +func (p *DatastorePath) IsVMDK() bool {
    +	return path.Ext(p.Path) == ".vmdk"
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/diagnostic_log.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/diagnostic_log.go
    new file mode 100644
    index 000000000..466d0ee91
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/diagnostic_log.go
    @@ -0,0 +1,76 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"context"
    +	"fmt"
    +	"io"
    +	"math"
    +)
    +
    +// DiagnosticLog wraps DiagnosticManager.BrowseLog
    +type DiagnosticLog struct {
    +	m DiagnosticManager
    +
    +	Key  string
    +	Host *HostSystem
    +
    +	Start int32
    +}
    +
    +// Seek to log position starting at the last nlines of the log
    +func (l *DiagnosticLog) Seek(ctx context.Context, nlines int32) error {
    +	h, err := l.m.BrowseLog(ctx, l.Host, l.Key, math.MaxInt32, 0)
    +	if err != nil {
    +		return err
    +	}
    +
    +	l.Start = h.LineEnd - nlines
    +
    +	return nil
    +}
    +
    +// Copy log starting from l.Start to the given io.Writer
    +// Returns on error or when end of log is reached.
    +func (l *DiagnosticLog) Copy(ctx context.Context, w io.Writer) (int, error) {
    +	const max = 500 // VC max == 500, ESX max == 1000
    +	written := 0
    +
    +	for {
    +		h, err := l.m.BrowseLog(ctx, l.Host, l.Key, l.Start, max)
    +		if err != nil {
    +			return 0, err
    +		}
    +
    +		for _, line := range h.LineText {
    +			n, err := fmt.Fprintln(w, line)
    +			written += n
    +			if err != nil {
    +				return written, err
    +			}
    +		}
    +
    +		l.Start += int32(len(h.LineText))
    +
    +		if l.Start >= h.LineEnd {
    +			break
    +		}
    +	}
    +
    +	return written, nil
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/diagnostic_manager.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/diagnostic_manager.go
    new file mode 100644
    index 000000000..5baf1ad90
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/diagnostic_manager.go
    @@ -0,0 +1,104 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"context"
    +
    +	"github.com/vmware/govmomi/vim25"
    +	"github.com/vmware/govmomi/vim25/methods"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +type DiagnosticManager struct {
    +	Common
    +}
    +
    +func NewDiagnosticManager(c *vim25.Client) *DiagnosticManager {
    +	m := DiagnosticManager{
    +		Common: NewCommon(c, *c.ServiceContent.DiagnosticManager),
    +	}
    +
    +	return &m
    +}
    +
    +func (m DiagnosticManager) Log(ctx context.Context, host *HostSystem, key string) *DiagnosticLog {
    +	return &DiagnosticLog{
    +		m:    m,
    +		Key:  key,
    +		Host: host,
    +	}
    +}
    +
    +func (m DiagnosticManager) BrowseLog(ctx context.Context, host *HostSystem, key string, start, lines int32) (*types.DiagnosticManagerLogHeader, error) {
    +	req := types.BrowseDiagnosticLog{
    +		This:  m.Reference(),
    +		Key:   key,
    +		Start: start,
    +		Lines: lines,
    +	}
    +
    +	if host != nil {
    +		ref := host.Reference()
    +		req.Host = &ref
    +	}
    +
    +	res, err := methods.BrowseDiagnosticLog(ctx, m.Client(), &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return &res.Returnval, nil
    +}
    +
    +func (m DiagnosticManager) GenerateLogBundles(ctx context.Context, includeDefault bool, host []*HostSystem) (*Task, error) {
    +	req := types.GenerateLogBundles_Task{
    +		This:           m.Reference(),
    +		IncludeDefault: includeDefault,
    +	}
    +
    +	if host != nil {
    +		for _, h := range host {
    +			req.Host = append(req.Host, h.Reference())
    +		}
    +	}
    +
    +	res, err := methods.GenerateLogBundles_Task(ctx, m.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(m.c, res.Returnval), nil
    +}
    +
    +func (m DiagnosticManager) QueryDescriptions(ctx context.Context, host *HostSystem) ([]types.DiagnosticManagerLogDescriptor, error) {
    +	req := types.QueryDescriptions{
    +		This: m.Reference(),
    +	}
    +
    +	if host != nil {
    +		ref := host.Reference()
    +		req.Host = &ref
    +	}
    +
    +	res, err := methods.QueryDescriptions(ctx, m.Client(), &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return res.Returnval, nil
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/distributed_virtual_portgroup.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/distributed_virtual_portgroup.go
    new file mode 100644
    index 000000000..f8ac5512c
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/distributed_virtual_portgroup.go
    @@ -0,0 +1,80 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"context"
    +	"fmt"
    +
    +	"github.com/vmware/govmomi/vim25"
    +	"github.com/vmware/govmomi/vim25/methods"
    +	"github.com/vmware/govmomi/vim25/mo"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +type DistributedVirtualPortgroup struct {
    +	Common
    +}
    +
    +func NewDistributedVirtualPortgroup(c *vim25.Client, ref types.ManagedObjectReference) *DistributedVirtualPortgroup {
    +	return &DistributedVirtualPortgroup{
    +		Common: NewCommon(c, ref),
    +	}
    +}
    +
    +// EthernetCardBackingInfo returns the VirtualDeviceBackingInfo for this DistributedVirtualPortgroup
    +func (p DistributedVirtualPortgroup) EthernetCardBackingInfo(ctx context.Context) (types.BaseVirtualDeviceBackingInfo, error) {
    +	var dvp mo.DistributedVirtualPortgroup
    +	var dvs mo.DistributedVirtualSwitch
    +	prop := "config.distributedVirtualSwitch"
    +
    +	if err := p.Properties(ctx, p.Reference(), []string{"key", prop}, &dvp); err != nil {
    +		return nil, err
    +	}
    +
    +	// "This property should always be set unless the user's setting does not have System.Read privilege on the object referred to by this property."
    +	if dvp.Config.DistributedVirtualSwitch == nil {
    +		return nil, fmt.Errorf("no System.Read privilege on: %s.%s", p.Reference(), prop)
    +	}
    +
    +	if err := p.Properties(ctx, *dvp.Config.DistributedVirtualSwitch, []string{"uuid"}, &dvs); err != nil {
    +		return nil, err
    +	}
    +
    +	backing := &types.VirtualEthernetCardDistributedVirtualPortBackingInfo{
    +		Port: types.DistributedVirtualSwitchPortConnection{
    +			PortgroupKey: dvp.Key,
    +			SwitchUuid:   dvs.Uuid,
    +		},
    +	}
    +
    +	return backing, nil
    +}
    +
    +func (p DistributedVirtualPortgroup) Reconfigure(ctx context.Context, spec types.DVPortgroupConfigSpec) (*Task, error) {
    +	req := types.ReconfigureDVPortgroup_Task{
    +		This: p.Reference(),
    +		Spec: spec,
    +	}
    +
    +	res, err := methods.ReconfigureDVPortgroup_Task(ctx, p.Client(), &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(p.Client(), res.Returnval), nil
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/distributed_virtual_switch.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/distributed_virtual_switch.go
    new file mode 100644
    index 000000000..526ce4bf7
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/distributed_virtual_switch.go
    @@ -0,0 +1,80 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"context"
    +
    +	"github.com/vmware/govmomi/vim25"
    +	"github.com/vmware/govmomi/vim25/methods"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +type DistributedVirtualSwitch struct {
    +	Common
    +}
    +
    +func NewDistributedVirtualSwitch(c *vim25.Client, ref types.ManagedObjectReference) *DistributedVirtualSwitch {
    +	return &DistributedVirtualSwitch{
    +		Common: NewCommon(c, ref),
    +	}
    +}
    +
    +func (s DistributedVirtualSwitch) EthernetCardBackingInfo(ctx context.Context) (types.BaseVirtualDeviceBackingInfo, error) {
    +	return nil, ErrNotSupported // TODO: just to satisfy NetworkReference interface for the finder
    +}
    +
    +func (s DistributedVirtualSwitch) Reconfigure(ctx context.Context, spec types.BaseDVSConfigSpec) (*Task, error) {
    +	req := types.ReconfigureDvs_Task{
    +		This: s.Reference(),
    +		Spec: spec,
    +	}
    +
    +	res, err := methods.ReconfigureDvs_Task(ctx, s.Client(), &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(s.Client(), res.Returnval), nil
    +}
    +
    +func (s DistributedVirtualSwitch) AddPortgroup(ctx context.Context, spec []types.DVPortgroupConfigSpec) (*Task, error) {
    +	req := types.AddDVPortgroup_Task{
    +		This: s.Reference(),
    +		Spec: spec,
    +	}
    +
    +	res, err := methods.AddDVPortgroup_Task(ctx, s.Client(), &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(s.Client(), res.Returnval), nil
    +}
    +
    +func (s DistributedVirtualSwitch) FetchDVPorts(ctx context.Context, criteria *types.DistributedVirtualSwitchPortCriteria) ([]types.DistributedVirtualPort, error) {
    +	req := &types.FetchDVPorts{
    +		This:     s.Reference(),
    +		Criteria: criteria,
    +	}
    +
    +	res, err := methods.FetchDVPorts(ctx, s.Client(), req)
    +	if err != nil {
    +		return nil, err
    +	}
    +	return res.Returnval, nil
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/extension_manager.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/extension_manager.go
    new file mode 100644
    index 000000000..94ade017c
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/extension_manager.go
    @@ -0,0 +1,113 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"context"
    +
    +	"github.com/vmware/govmomi/vim25"
    +	"github.com/vmware/govmomi/vim25/methods"
    +	"github.com/vmware/govmomi/vim25/mo"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +type ExtensionManager struct {
    +	Common
    +}
    +
    +// GetExtensionManager wraps NewExtensionManager, returning ErrNotSupported
    +// when the client is not connected to a vCenter instance.
    +func GetExtensionManager(c *vim25.Client) (*ExtensionManager, error) {
    +	if c.ServiceContent.ExtensionManager == nil {
    +		return nil, ErrNotSupported
    +	}
    +	return NewExtensionManager(c), nil
    +}
    +
    +func NewExtensionManager(c *vim25.Client) *ExtensionManager {
    +	o := ExtensionManager{
    +		Common: NewCommon(c, *c.ServiceContent.ExtensionManager),
    +	}
    +
    +	return &o
    +}
    +
    +func (m ExtensionManager) List(ctx context.Context) ([]types.Extension, error) {
    +	var em mo.ExtensionManager
    +
    +	err := m.Properties(ctx, m.Reference(), []string{"extensionList"}, &em)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return em.ExtensionList, nil
    +}
    +
    +func (m ExtensionManager) Find(ctx context.Context, key string) (*types.Extension, error) {
    +	req := types.FindExtension{
    +		This:         m.Reference(),
    +		ExtensionKey: key,
    +	}
    +
    +	res, err := methods.FindExtension(ctx, m.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return res.Returnval, nil
    +}
    +
    +func (m ExtensionManager) Register(ctx context.Context, extension types.Extension) error {
    +	req := types.RegisterExtension{
    +		This:      m.Reference(),
    +		Extension: extension,
    +	}
    +
    +	_, err := methods.RegisterExtension(ctx, m.c, &req)
    +	return err
    +}
    +
    +func (m ExtensionManager) SetCertificate(ctx context.Context, key string, certificatePem string) error {
    +	req := types.SetExtensionCertificate{
    +		This:           m.Reference(),
    +		ExtensionKey:   key,
    +		CertificatePem: certificatePem,
    +	}
    +
    +	_, err := methods.SetExtensionCertificate(ctx, m.c, &req)
    +	return err
    +}
    +
    +func (m ExtensionManager) Unregister(ctx context.Context, key string) error {
    +	req := types.UnregisterExtension{
    +		This:         m.Reference(),
    +		ExtensionKey: key,
    +	}
    +
    +	_, err := methods.UnregisterExtension(ctx, m.c, &req)
    +	return err
    +}
    +
    +func (m ExtensionManager) Update(ctx context.Context, extension types.Extension) error {
    +	req := types.UpdateExtension{
    +		This:      m.Reference(),
    +		Extension: extension,
    +	}
    +
    +	_, err := methods.UpdateExtension(ctx, m.c, &req)
    +	return err
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/file_manager.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/file_manager.go
    new file mode 100644
    index 000000000..ba947be20
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/file_manager.go
    @@ -0,0 +1,126 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"context"
    +
    +	"github.com/vmware/govmomi/vim25"
    +	"github.com/vmware/govmomi/vim25/methods"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +type FileManager struct {
    +	Common
    +}
    +
    +func NewFileManager(c *vim25.Client) *FileManager {
    +	f := FileManager{
    +		Common: NewCommon(c, *c.ServiceContent.FileManager),
    +	}
    +
    +	return &f
    +}
    +
    +func (f FileManager) CopyDatastoreFile(ctx context.Context, sourceName string, sourceDatacenter *Datacenter, destinationName string, destinationDatacenter *Datacenter, force bool) (*Task, error) {
    +	req := types.CopyDatastoreFile_Task{
    +		This:            f.Reference(),
    +		SourceName:      sourceName,
    +		DestinationName: destinationName,
    +		Force:           types.NewBool(force),
    +	}
    +
    +	if sourceDatacenter != nil {
    +		ref := sourceDatacenter.Reference()
    +		req.SourceDatacenter = &ref
    +	}
    +
    +	if destinationDatacenter != nil {
    +		ref := destinationDatacenter.Reference()
    +		req.DestinationDatacenter = &ref
    +	}
    +
    +	res, err := methods.CopyDatastoreFile_Task(ctx, f.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(f.c, res.Returnval), nil
    +}
    +
    +// DeleteDatastoreFile deletes the specified file or folder from the datastore.
    +func (f FileManager) DeleteDatastoreFile(ctx context.Context, name string, dc *Datacenter) (*Task, error) {
    +	req := types.DeleteDatastoreFile_Task{
    +		This: f.Reference(),
    +		Name: name,
    +	}
    +
    +	if dc != nil {
    +		ref := dc.Reference()
    +		req.Datacenter = &ref
    +	}
    +
    +	res, err := methods.DeleteDatastoreFile_Task(ctx, f.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(f.c, res.Returnval), nil
    +}
    +
    +// MakeDirectory creates a folder using the specified name.
    +func (f FileManager) MakeDirectory(ctx context.Context, name string, dc *Datacenter, createParentDirectories bool) error {
    +	req := types.MakeDirectory{
    +		This: f.Reference(),
    +		Name: name,
    +		CreateParentDirectories: types.NewBool(createParentDirectories),
    +	}
    +
    +	if dc != nil {
    +		ref := dc.Reference()
    +		req.Datacenter = &ref
    +	}
    +
    +	_, err := methods.MakeDirectory(ctx, f.c, &req)
    +	return err
    +}
    +
    +func (f FileManager) MoveDatastoreFile(ctx context.Context, sourceName string, sourceDatacenter *Datacenter, destinationName string, destinationDatacenter *Datacenter, force bool) (*Task, error) {
    +	req := types.MoveDatastoreFile_Task{
    +		This:            f.Reference(),
    +		SourceName:      sourceName,
    +		DestinationName: destinationName,
    +		Force:           types.NewBool(force),
    +	}
    +
    +	if sourceDatacenter != nil {
    +		ref := sourceDatacenter.Reference()
    +		req.SourceDatacenter = &ref
    +	}
    +
    +	if destinationDatacenter != nil {
    +		ref := destinationDatacenter.Reference()
    +		req.DestinationDatacenter = &ref
    +	}
    +
    +	res, err := methods.MoveDatastoreFile_Task(ctx, f.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(f.c, res.Returnval), nil
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/folder.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/folder.go
    new file mode 100644
    index 000000000..7a69949f9
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/folder.go
    @@ -0,0 +1,227 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"context"
    +
    +	"github.com/vmware/govmomi/vim25"
    +	"github.com/vmware/govmomi/vim25/methods"
    +	"github.com/vmware/govmomi/vim25/mo"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +type Folder struct {
    +	Common
    +}
    +
    +func NewFolder(c *vim25.Client, ref types.ManagedObjectReference) *Folder {
    +	return &Folder{
    +		Common: NewCommon(c, ref),
    +	}
    +}
    +
    +func NewRootFolder(c *vim25.Client) *Folder {
    +	f := NewFolder(c, c.ServiceContent.RootFolder)
    +	f.InventoryPath = "/"
    +	return f
    +}
    +
    +func (f Folder) Children(ctx context.Context) ([]Reference, error) {
    +	var mf mo.Folder
    +
    +	err := f.Properties(ctx, f.Reference(), []string{"childEntity"}, &mf)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	var rs []Reference
    +	for _, e := range mf.ChildEntity {
    +		if r := NewReference(f.c, e); r != nil {
    +			rs = append(rs, r)
    +		}
    +	}
    +
    +	return rs, nil
    +}
    +
    +func (f Folder) CreateDatacenter(ctx context.Context, datacenter string) (*Datacenter, error) {
    +	req := types.CreateDatacenter{
    +		This: f.Reference(),
    +		Name: datacenter,
    +	}
    +
    +	res, err := methods.CreateDatacenter(ctx, f.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	// Response will be nil if this is an ESX host that does not belong to a vCenter
    +	if res == nil {
    +		return nil, nil
    +	}
    +
    +	return NewDatacenter(f.c, res.Returnval), nil
    +}
    +
    +func (f Folder) CreateCluster(ctx context.Context, cluster string, spec types.ClusterConfigSpecEx) (*ClusterComputeResource, error) {
    +	req := types.CreateClusterEx{
    +		This: f.Reference(),
    +		Name: cluster,
    +		Spec: spec,
    +	}
    +
    +	res, err := methods.CreateClusterEx(ctx, f.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	// Response will be nil if this is an ESX host that does not belong to a vCenter
    +	if res == nil {
    +		return nil, nil
    +	}
    +
    +	return NewClusterComputeResource(f.c, res.Returnval), nil
    +}
    +
    +func (f Folder) CreateFolder(ctx context.Context, name string) (*Folder, error) {
    +	req := types.CreateFolder{
    +		This: f.Reference(),
    +		Name: name,
    +	}
    +
    +	res, err := methods.CreateFolder(ctx, f.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewFolder(f.c, res.Returnval), err
    +}
    +
    +func (f Folder) CreateStoragePod(ctx context.Context, name string) (*StoragePod, error) {
    +	req := types.CreateStoragePod{
    +		This: f.Reference(),
    +		Name: name,
    +	}
    +
    +	res, err := methods.CreateStoragePod(ctx, f.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewStoragePod(f.c, res.Returnval), err
    +}
    +
    +func (f Folder) AddStandaloneHost(ctx context.Context, spec types.HostConnectSpec, addConnected bool, license *string, compResSpec *types.BaseComputeResourceConfigSpec) (*Task, error) {
    +	req := types.AddStandaloneHost_Task{
    +		This:         f.Reference(),
    +		Spec:         spec,
    +		AddConnected: addConnected,
    +	}
    +
    +	if license != nil {
    +		req.License = *license
    +	}
    +
    +	if compResSpec != nil {
    +		req.CompResSpec = *compResSpec
    +	}
    +
    +	res, err := methods.AddStandaloneHost_Task(ctx, f.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(f.c, res.Returnval), nil
    +}
    +
    +func (f Folder) CreateVM(ctx context.Context, config types.VirtualMachineConfigSpec, pool *ResourcePool, host *HostSystem) (*Task, error) {
    +	req := types.CreateVM_Task{
    +		This:   f.Reference(),
    +		Config: config,
    +		Pool:   pool.Reference(),
    +	}
    +
    +	if host != nil {
    +		ref := host.Reference()
    +		req.Host = &ref
    +	}
    +
    +	res, err := methods.CreateVM_Task(ctx, f.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(f.c, res.Returnval), nil
    +}
    +
    +func (f Folder) RegisterVM(ctx context.Context, path string, name string, asTemplate bool, pool *ResourcePool, host *HostSystem) (*Task, error) {
    +	req := types.RegisterVM_Task{
    +		This:       f.Reference(),
    +		Path:       path,
    +		AsTemplate: asTemplate,
    +	}
    +
    +	if name != "" {
    +		req.Name = name
    +	}
    +
    +	if host != nil {
    +		ref := host.Reference()
    +		req.Host = &ref
    +	}
    +
    +	if pool != nil {
    +		ref := pool.Reference()
    +		req.Pool = &ref
    +	}
    +
    +	res, err := methods.RegisterVM_Task(ctx, f.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(f.c, res.Returnval), nil
    +}
    +
    +func (f Folder) CreateDVS(ctx context.Context, spec types.DVSCreateSpec) (*Task, error) {
    +	req := types.CreateDVS_Task{
    +		This: f.Reference(),
    +		Spec: spec,
    +	}
    +
    +	res, err := methods.CreateDVS_Task(ctx, f.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(f.c, res.Returnval), nil
    +}
    +
    +func (f Folder) MoveInto(ctx context.Context, list []types.ManagedObjectReference) (*Task, error) {
    +	req := types.MoveIntoFolder_Task{
    +		This: f.Reference(),
    +		List: list,
    +	}
    +
    +	res, err := methods.MoveIntoFolder_Task(ctx, f.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(f.c, res.Returnval), nil
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/history_collector.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/history_collector.go
    new file mode 100644
    index 000000000..afdcab78b
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/history_collector.go
    @@ -0,0 +1,72 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"context"
    +
    +	"github.com/vmware/govmomi/vim25"
    +	"github.com/vmware/govmomi/vim25/methods"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +type HistoryCollector struct {
    +	Common
    +}
    +
    +func NewHistoryCollector(c *vim25.Client, ref types.ManagedObjectReference) *HistoryCollector {
    +	return &HistoryCollector{
    +		Common: NewCommon(c, ref),
    +	}
    +}
    +
    +func (h HistoryCollector) Destroy(ctx context.Context) error {
    +	req := types.DestroyCollector{
    +		This: h.Reference(),
    +	}
    +
    +	_, err := methods.DestroyCollector(ctx, h.c, &req)
    +	return err
    +}
    +
    +func (h HistoryCollector) Reset(ctx context.Context) error {
    +	req := types.ResetCollector{
    +		This: h.Reference(),
    +	}
    +
    +	_, err := methods.ResetCollector(ctx, h.c, &req)
    +	return err
    +}
    +
    +func (h HistoryCollector) Rewind(ctx context.Context) error {
    +	req := types.RewindCollector{
    +		This: h.Reference(),
    +	}
    +
    +	_, err := methods.RewindCollector(ctx, h.c, &req)
    +	return err
    +}
    +
    +func (h HistoryCollector) SetPageSize(ctx context.Context, maxCount int32) error {
    +	req := types.SetCollectorPageSize{
    +		This:     h.Reference(),
    +		MaxCount: maxCount,
    +	}
    +
    +	_, err := methods.SetCollectorPageSize(ctx, h.c, &req)
    +	return err
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/host_account_manager.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/host_account_manager.go
    new file mode 100644
    index 000000000..640aff860
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/host_account_manager.go
    @@ -0,0 +1,65 @@
    +/*
    +Copyright (c) 2016 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"context"
    +
    +	"github.com/vmware/govmomi/vim25"
    +	"github.com/vmware/govmomi/vim25/methods"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +type HostAccountManager struct {
    +	Common
    +}
    +
    +func NewHostAccountManager(c *vim25.Client, ref types.ManagedObjectReference) *HostAccountManager {
    +	return &HostAccountManager{
    +		Common: NewCommon(c, ref),
    +	}
    +}
    +
    +func (m HostAccountManager) Create(ctx context.Context, user *types.HostAccountSpec) error {
    +	req := types.CreateUser{
    +		This: m.Reference(),
    +		User: user,
    +	}
    +
    +	_, err := methods.CreateUser(ctx, m.Client(), &req)
    +	return err
    +}
    +
    +func (m HostAccountManager) Update(ctx context.Context, user *types.HostAccountSpec) error {
    +	req := types.UpdateUser{
    +		This: m.Reference(),
    +		User: user,
    +	}
    +
    +	_, err := methods.UpdateUser(ctx, m.Client(), &req)
    +	return err
    +}
    +
    +func (m HostAccountManager) Remove(ctx context.Context, userName string) error {
    +	req := types.RemoveUser{
    +		This:     m.Reference(),
    +		UserName: userName,
    +	}
    +
    +	_, err := methods.RemoveUser(ctx, m.Client(), &req)
    +	return err
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/host_certificate_info.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/host_certificate_info.go
    new file mode 100644
    index 000000000..52c26a9dd
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/host_certificate_info.go
    @@ -0,0 +1,250 @@
    +/*
    +Copyright (c) 2016 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"crypto/sha256"
    +	"crypto/tls"
    +	"crypto/x509"
    +	"crypto/x509/pkix"
    +	"encoding/asn1"
    +	"fmt"
    +	"io"
    +	"net/url"
    +	"strings"
    +	"text/tabwriter"
    +
    +	"github.com/vmware/govmomi/vim25/soap"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +// HostCertificateInfo provides helpers for types.HostCertificateManagerCertificateInfo
    +type HostCertificateInfo struct {
    +	types.HostCertificateManagerCertificateInfo
    +
    +	ThumbprintSHA1   string
    +	ThumbprintSHA256 string
    +
    +	Err         error
    +	Certificate *x509.Certificate `json:"-"`
    +
    +	subjectName *pkix.Name
    +	issuerName  *pkix.Name
    +}
    +
    +// FromCertificate converts x509.Certificate to HostCertificateInfo
    +func (info *HostCertificateInfo) FromCertificate(cert *x509.Certificate) *HostCertificateInfo {
    +	info.Certificate = cert
    +	info.subjectName = &cert.Subject
    +	info.issuerName = &cert.Issuer
    +
    +	info.Issuer = info.fromName(info.issuerName)
    +	info.NotBefore = &cert.NotBefore
    +	info.NotAfter = &cert.NotAfter
    +	info.Subject = info.fromName(info.subjectName)
    +
    +	info.ThumbprintSHA1 = soap.ThumbprintSHA1(cert)
    +
    +	// SHA-256 for info purposes only, API fields all use SHA-1
    +	sum := sha256.Sum256(cert.Raw)
    +	hex := make([]string, len(sum))
    +	for i, b := range sum {
    +		hex[i] = fmt.Sprintf("%02X", b)
    +	}
    +	info.ThumbprintSHA256 = strings.Join(hex, ":")
    +
    +	if info.Status == "" {
    +		info.Status = string(types.HostCertificateManagerCertificateInfoCertificateStatusUnknown)
    +	}
    +
    +	return info
    +}
    +
    +// FromURL connects to the given URL.Host via tls.Dial with the given tls.Config and populates the HostCertificateInfo
    +// via tls.ConnectionState.  If the certificate was verified with the given tls.Config, the Err field will be nil.
    +// Otherwise, Err will be set to the x509.UnknownAuthorityError or x509.HostnameError.
    +// If tls.Dial returns an error of any other type, that error is returned.
    +func (info *HostCertificateInfo) FromURL(u *url.URL, config *tls.Config) error {
    +	addr := u.Host
    +	if !(strings.LastIndex(addr, ":") > strings.LastIndex(addr, "]")) {
    +		addr += ":443"
    +	}
    +
    +	conn, err := tls.Dial("tcp", addr, config)
    +	if err != nil {
    +		switch err.(type) {
    +		case x509.UnknownAuthorityError:
    +		case x509.HostnameError:
    +		default:
    +			return err
    +		}
    +
    +		info.Err = err
    +
    +		conn, err = tls.Dial("tcp", addr, &tls.Config{InsecureSkipVerify: true})
    +		if err != nil {
    +			return err
    +		}
    +	} else {
    +		info.Status = string(types.HostCertificateManagerCertificateInfoCertificateStatusGood)
    +	}
    +
    +	state := conn.ConnectionState()
    +	_ = conn.Close()
    +	info.FromCertificate(state.PeerCertificates[0])
    +
    +	return nil
    +}
    +
    +var emailAddressOID = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 9, 1}
    +
    +func (info *HostCertificateInfo) fromName(name *pkix.Name) string {
    +	var attrs []string
    +
    +	oids := map[string]string{
    +		emailAddressOID.String(): "emailAddress",
    +	}
    +
    +	for _, attr := range name.Names {
    +		if key, ok := oids[attr.Type.String()]; ok {
    +			attrs = append(attrs, fmt.Sprintf("%s=%s", key, attr.Value))
    +		}
    +	}
    +
    +	attrs = append(attrs, fmt.Sprintf("CN=%s", name.CommonName))
    +
    +	add := func(key string, vals []string) {
    +		for _, val := range vals {
    +			attrs = append(attrs, fmt.Sprintf("%s=%s", key, val))
    +		}
    +	}
    +
    +	elts := []struct {
    +		key string
    +		val []string
    +	}{
    +		{"OU", name.OrganizationalUnit},
    +		{"O", name.Organization},
    +		{"L", name.Locality},
    +		{"ST", name.Province},
    +		{"C", name.Country},
    +	}
    +
    +	for _, elt := range elts {
    +		add(elt.key, elt.val)
    +	}
    +
    +	return strings.Join(attrs, ",")
    +}
    +
    +func (info *HostCertificateInfo) toName(s string) *pkix.Name {
    +	var name pkix.Name
    +
    +	for _, pair := range strings.Split(s, ",") {
    +		attr := strings.SplitN(pair, "=", 2)
    +		if len(attr) != 2 {
    +			continue
    +		}
    +
    +		v := attr[1]
    +
    +		switch strings.ToLower(attr[0]) {
    +		case "cn":
    +			name.CommonName = v
    +		case "ou":
    +			name.OrganizationalUnit = append(name.OrganizationalUnit, v)
    +		case "o":
    +			name.Organization = append(name.Organization, v)
    +		case "l":
    +			name.Locality = append(name.Locality, v)
    +		case "st":
    +			name.Province = append(name.Province, v)
    +		case "c":
    +			name.Country = append(name.Country, v)
    +		case "emailaddress":
    +			name.Names = append(name.Names, pkix.AttributeTypeAndValue{Type: emailAddressOID, Value: v})
    +		}
    +	}
    +
    +	return &name
    +}
    +
    +// SubjectName parses Subject into a pkix.Name
    +func (info *HostCertificateInfo) SubjectName() *pkix.Name {
    +	if info.subjectName != nil {
    +		return info.subjectName
    +	}
    +
    +	return info.toName(info.Subject)
    +}
    +
    +// IssuerName parses Issuer into a pkix.Name
    +func (info *HostCertificateInfo) IssuerName() *pkix.Name {
    +	if info.issuerName != nil {
    +		return info.issuerName
    +	}
    +
    +	return info.toName(info.Issuer)
    +}
    +
    +// Write outputs info similar to the Chrome Certificate Viewer.
    +func (info *HostCertificateInfo) Write(w io.Writer) error {
    +	tw := tabwriter.NewWriter(w, 2, 0, 2, ' ', 0)
    +
    +	s := func(val string) string {
    +		if val != "" {
    +			return val
    +		}
    +		return ""
    +	}
    +
    +	ss := func(val []string) string {
    +		return s(strings.Join(val, ","))
    +	}
    +
    +	name := func(n *pkix.Name) {
    +		fmt.Fprintf(tw, "  Common Name (CN):\t%s\n", s(n.CommonName))
    +		fmt.Fprintf(tw, "  Organization (O):\t%s\n", ss(n.Organization))
    +		fmt.Fprintf(tw, "  Organizational Unit (OU):\t%s\n", ss(n.OrganizationalUnit))
    +	}
    +
    +	status := info.Status
    +	if info.Err != nil {
    +		status = fmt.Sprintf("ERROR %s", info.Err)
    +	}
    +	fmt.Fprintf(tw, "Certificate Status:\t%s\n", status)
    +
    +	fmt.Fprintln(tw, "Issued To:\t")
    +	name(info.SubjectName())
    +
    +	fmt.Fprintln(tw, "Issued By:\t")
    +	name(info.IssuerName())
    +
    +	fmt.Fprintln(tw, "Validity Period:\t")
    +	fmt.Fprintf(tw, "  Issued On:\t%s\n", info.NotBefore)
    +	fmt.Fprintf(tw, "  Expires On:\t%s\n", info.NotAfter)
    +
    +	if info.ThumbprintSHA1 != "" {
    +		fmt.Fprintln(tw, "Thumbprints:\t")
    +		if info.ThumbprintSHA256 != "" {
    +			fmt.Fprintf(tw, "  SHA-256 Thumbprint:\t%s\n", info.ThumbprintSHA256)
    +		}
    +		fmt.Fprintf(tw, "  SHA-1 Thumbprint:\t%s\n", info.ThumbprintSHA1)
    +	}
    +
    +	return tw.Flush()
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/host_certificate_manager.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/host_certificate_manager.go
    new file mode 100644
    index 000000000..2875a9fc1
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/host_certificate_manager.go
    @@ -0,0 +1,162 @@
    +/*
    +Copyright (c) 2016 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"context"
    +
    +	"github.com/vmware/govmomi/property"
    +	"github.com/vmware/govmomi/vim25"
    +	"github.com/vmware/govmomi/vim25/methods"
    +	"github.com/vmware/govmomi/vim25/mo"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +// HostCertificateManager provides helper methods around the HostSystem.ConfigManager.CertificateManager
    +type HostCertificateManager struct {
    +	Common
    +	Host *HostSystem
    +}
    +
    +// NewHostCertificateManager creates a new HostCertificateManager helper
    +func NewHostCertificateManager(c *vim25.Client, ref types.ManagedObjectReference, host types.ManagedObjectReference) *HostCertificateManager {
    +	return &HostCertificateManager{
    +		Common: NewCommon(c, ref),
    +		Host:   NewHostSystem(c, host),
    +	}
    +}
    +
    +// CertificateInfo wraps the host CertificateManager certificateInfo property with the HostCertificateInfo helper.
    +// The ThumbprintSHA1 field is set to HostSystem.Summary.Config.SslThumbprint if the host system is managed by a vCenter.
    +func (m HostCertificateManager) CertificateInfo(ctx context.Context) (*HostCertificateInfo, error) {
    +	var hs mo.HostSystem
    +	var cm mo.HostCertificateManager
    +
    +	pc := property.DefaultCollector(m.Client())
    +
    +	err := pc.RetrieveOne(ctx, m.Reference(), []string{"certificateInfo"}, &cm)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	_ = pc.RetrieveOne(ctx, m.Host.Reference(), []string{"summary.config.sslThumbprint"}, &hs)
    +
    +	return &HostCertificateInfo{
    +		HostCertificateManagerCertificateInfo: cm.CertificateInfo,
    +		ThumbprintSHA1:                        hs.Summary.Config.SslThumbprint,
    +	}, nil
    +}
    +
    +// GenerateCertificateSigningRequest requests the host system to generate a certificate-signing request (CSR) for itself.
    +// The CSR is then typically provided to a Certificate Authority to sign and issue the SSL certificate for the host system.
    +// Use InstallServerCertificate to import this certificate.
    +func (m HostCertificateManager) GenerateCertificateSigningRequest(ctx context.Context, useIPAddressAsCommonName bool) (string, error) {
    +	req := types.GenerateCertificateSigningRequest{
    +		This: m.Reference(),
    +		UseIpAddressAsCommonName: useIPAddressAsCommonName,
    +	}
    +
    +	res, err := methods.GenerateCertificateSigningRequest(ctx, m.Client(), &req)
    +	if err != nil {
    +		return "", err
    +	}
    +
    +	return res.Returnval, nil
    +}
    +
    +// GenerateCertificateSigningRequestByDn requests the host system to generate a certificate-signing request (CSR) for itself.
    +// Alternative version similar to GenerateCertificateSigningRequest but takes a Distinguished Name (DN) as a parameter.
    +func (m HostCertificateManager) GenerateCertificateSigningRequestByDn(ctx context.Context, distinguishedName string) (string, error) {
    +	req := types.GenerateCertificateSigningRequestByDn{
    +		This:              m.Reference(),
    +		DistinguishedName: distinguishedName,
    +	}
    +
    +	res, err := methods.GenerateCertificateSigningRequestByDn(ctx, m.Client(), &req)
    +	if err != nil {
    +		return "", err
    +	}
    +
    +	return res.Returnval, nil
    +}
    +
    +// InstallServerCertificate imports the given SSL certificate to the host system.
    +func (m HostCertificateManager) InstallServerCertificate(ctx context.Context, cert string) error {
    +	req := types.InstallServerCertificate{
    +		This: m.Reference(),
    +		Cert: cert,
    +	}
    +
    +	_, err := methods.InstallServerCertificate(ctx, m.Client(), &req)
    +	if err != nil {
    +		return err
    +	}
    +
    +	// NotifyAffectedService is internal, not exposing as we don't have a use case other than with InstallServerCertificate
    +	// Without this call, hostd needs to be restarted to use the updated certificate
    +	// Note: using Refresh as it has the same struct/signature, we just need to use different xml name tags
    +	body := struct {
    +		Req *types.Refresh         `xml:"urn:vim25 NotifyAffectedServices,omitempty"`
    +		Res *types.RefreshResponse `xml:"urn:vim25 NotifyAffectedServicesResponse,omitempty"`
    +		methods.RefreshBody
    +	}{
    +		Req: &types.Refresh{This: m.Reference()},
    +	}
    +
    +	return m.Client().RoundTrip(ctx, &body, &body)
    +}
    +
    +// ListCACertificateRevocationLists returns the SSL CRLs of Certificate Authorities that are trusted by the host system.
    +func (m HostCertificateManager) ListCACertificateRevocationLists(ctx context.Context) ([]string, error) {
    +	req := types.ListCACertificateRevocationLists{
    +		This: m.Reference(),
    +	}
    +
    +	res, err := methods.ListCACertificateRevocationLists(ctx, m.Client(), &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return res.Returnval, nil
    +}
    +
    +// ListCACertificates returns the SSL certificates of Certificate Authorities that are trusted by the host system.
    +func (m HostCertificateManager) ListCACertificates(ctx context.Context) ([]string, error) {
    +	req := types.ListCACertificates{
    +		This: m.Reference(),
    +	}
    +
    +	res, err := methods.ListCACertificates(ctx, m.Client(), &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return res.Returnval, nil
    +}
    +
    +// ReplaceCACertificatesAndCRLs replaces the trusted CA certificates and CRL used by the host system.
    +// These determine whether the server can verify the identity of an external entity.
    +func (m HostCertificateManager) ReplaceCACertificatesAndCRLs(ctx context.Context, caCert []string, caCrl []string) error {
    +	req := types.ReplaceCACertificatesAndCRLs{
    +		This:   m.Reference(),
    +		CaCert: caCert,
    +		CaCrl:  caCrl,
    +	}
    +
    +	_, err := methods.ReplaceCACertificatesAndCRLs(ctx, m.Client(), &req)
    +	return err
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/host_config_manager.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/host_config_manager.go
    new file mode 100644
    index 000000000..123227ecc
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/host_config_manager.go
    @@ -0,0 +1,196 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"context"
    +
    +	"github.com/vmware/govmomi/vim25"
    +	"github.com/vmware/govmomi/vim25/mo"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +type HostConfigManager struct {
    +	Common
    +}
    +
    +func NewHostConfigManager(c *vim25.Client, ref types.ManagedObjectReference) *HostConfigManager {
    +	return &HostConfigManager{
    +		Common: NewCommon(c, ref),
    +	}
    +}
    +
    +func (m HostConfigManager) DatastoreSystem(ctx context.Context) (*HostDatastoreSystem, error) {
    +	var h mo.HostSystem
    +
    +	err := m.Properties(ctx, m.Reference(), []string{"configManager.datastoreSystem"}, &h)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewHostDatastoreSystem(m.c, *h.ConfigManager.DatastoreSystem), nil
    +}
    +
    +func (m HostConfigManager) NetworkSystem(ctx context.Context) (*HostNetworkSystem, error) {
    +	var h mo.HostSystem
    +
    +	err := m.Properties(ctx, m.Reference(), []string{"configManager.networkSystem"}, &h)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewHostNetworkSystem(m.c, *h.ConfigManager.NetworkSystem), nil
    +}
    +
    +func (m HostConfigManager) FirewallSystem(ctx context.Context) (*HostFirewallSystem, error) {
    +	var h mo.HostSystem
    +
    +	err := m.Properties(ctx, m.Reference(), []string{"configManager.firewallSystem"}, &h)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewHostFirewallSystem(m.c, *h.ConfigManager.FirewallSystem), nil
    +}
    +
    +func (m HostConfigManager) StorageSystem(ctx context.Context) (*HostStorageSystem, error) {
    +	var h mo.HostSystem
    +
    +	err := m.Properties(ctx, m.Reference(), []string{"configManager.storageSystem"}, &h)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewHostStorageSystem(m.c, *h.ConfigManager.StorageSystem), nil
    +}
    +
    +func (m HostConfigManager) VirtualNicManager(ctx context.Context) (*HostVirtualNicManager, error) {
    +	var h mo.HostSystem
    +
    +	err := m.Properties(ctx, m.Reference(), []string{"configManager.virtualNicManager"}, &h)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewHostVirtualNicManager(m.c, *h.ConfigManager.VirtualNicManager, m.Reference()), nil
    +}
    +
    +func (m HostConfigManager) VsanSystem(ctx context.Context) (*HostVsanSystem, error) {
    +	var h mo.HostSystem
    +
    +	err := m.Properties(ctx, m.Reference(), []string{"configManager.vsanSystem"}, &h)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	// Added in 5.5
    +	if h.ConfigManager.VsanSystem == nil {
    +		return nil, ErrNotSupported
    +	}
    +
    +	return NewHostVsanSystem(m.c, *h.ConfigManager.VsanSystem), nil
    +}
    +
    +func (m HostConfigManager) VsanInternalSystem(ctx context.Context) (*HostVsanInternalSystem, error) {
    +	var h mo.HostSystem
    +
    +	err := m.Properties(ctx, m.Reference(), []string{"configManager.vsanInternalSystem"}, &h)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	// Added in 5.5
    +	if h.ConfigManager.VsanInternalSystem == nil {
    +		return nil, ErrNotSupported
    +	}
    +
    +	return NewHostVsanInternalSystem(m.c, *h.ConfigManager.VsanInternalSystem), nil
    +}
    +
    +func (m HostConfigManager) AccountManager(ctx context.Context) (*HostAccountManager, error) {
    +	var h mo.HostSystem
    +
    +	err := m.Properties(ctx, m.Reference(), []string{"configManager.accountManager"}, &h)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	ref := h.ConfigManager.AccountManager // Added in 6.0
    +	if ref == nil {
    +		// Versions < 5.5 can use the ServiceContent ref,
    +		// but we can only use it when connected directly to ESX.
    +		c := m.Client()
    +		if !c.IsVC() {
    +			ref = c.ServiceContent.AccountManager
    +		}
    +
    +		if ref == nil {
    +			return nil, ErrNotSupported
    +		}
    +	}
    +
    +	return NewHostAccountManager(m.c, *ref), nil
    +}
    +
    +func (m HostConfigManager) OptionManager(ctx context.Context) (*OptionManager, error) {
    +	var h mo.HostSystem
    +
    +	err := m.Properties(ctx, m.Reference(), []string{"configManager.advancedOption"}, &h)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewOptionManager(m.c, *h.ConfigManager.AdvancedOption), nil
    +}
    +
    +func (m HostConfigManager) ServiceSystem(ctx context.Context) (*HostServiceSystem, error) {
    +	var h mo.HostSystem
    +
    +	err := m.Properties(ctx, m.Reference(), []string{"configManager.serviceSystem"}, &h)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewHostServiceSystem(m.c, *h.ConfigManager.ServiceSystem), nil
    +}
    +
    +func (m HostConfigManager) CertificateManager(ctx context.Context) (*HostCertificateManager, error) {
    +	var h mo.HostSystem
    +
    +	err := m.Properties(ctx, m.Reference(), []string{"configManager.certificateManager"}, &h)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	// Added in 6.0
    +	if h.ConfigManager.CertificateManager == nil {
    +		return nil, ErrNotSupported
    +	}
    +
    +	return NewHostCertificateManager(m.c, *h.ConfigManager.CertificateManager, m.Reference()), nil
    +}
    +
    +func (m HostConfigManager) DateTimeSystem(ctx context.Context) (*HostDateTimeSystem, error) {
    +	var h mo.HostSystem
    +
    +	err := m.Properties(ctx, m.Reference(), []string{"configManager.dateTimeSystem"}, &h)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewHostDateTimeSystem(m.c, *h.ConfigManager.DateTimeSystem), nil
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/host_datastore_browser.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/host_datastore_browser.go
    new file mode 100644
    index 000000000..b0c9e08a1
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/host_datastore_browser.go
    @@ -0,0 +1,65 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"context"
    +
    +	"github.com/vmware/govmomi/vim25"
    +	"github.com/vmware/govmomi/vim25/methods"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +type HostDatastoreBrowser struct {
    +	Common
    +}
    +
    +func NewHostDatastoreBrowser(c *vim25.Client, ref types.ManagedObjectReference) *HostDatastoreBrowser {
    +	return &HostDatastoreBrowser{
    +		Common: NewCommon(c, ref),
    +	}
    +}
    +
    +func (b HostDatastoreBrowser) SearchDatastore(ctx context.Context, datastorePath string, searchSpec *types.HostDatastoreBrowserSearchSpec) (*Task, error) {
    +	req := types.SearchDatastore_Task{
    +		This:          b.Reference(),
    +		DatastorePath: datastorePath,
    +		SearchSpec:    searchSpec,
    +	}
    +
    +	res, err := methods.SearchDatastore_Task(ctx, b.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(b.c, res.Returnval), nil
    +}
    +
    +func (b HostDatastoreBrowser) SearchDatastoreSubFolders(ctx context.Context, datastorePath string, searchSpec *types.HostDatastoreBrowserSearchSpec) (*Task, error) {
    +	req := types.SearchDatastoreSubFolders_Task{
    +		This:          b.Reference(),
    +		DatastorePath: datastorePath,
    +		SearchSpec:    searchSpec,
    +	}
    +
    +	res, err := methods.SearchDatastoreSubFolders_Task(ctx, b.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(b.c, res.Returnval), nil
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/host_datastore_system.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/host_datastore_system.go
    new file mode 100644
    index 000000000..7b738e611
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/host_datastore_system.go
    @@ -0,0 +1,119 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"context"
    +
    +	"github.com/vmware/govmomi/vim25"
    +	"github.com/vmware/govmomi/vim25/methods"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +type HostDatastoreSystem struct {
    +	Common
    +}
    +
    +func NewHostDatastoreSystem(c *vim25.Client, ref types.ManagedObjectReference) *HostDatastoreSystem {
    +	return &HostDatastoreSystem{
    +		Common: NewCommon(c, ref),
    +	}
    +}
    +
    +func (s HostDatastoreSystem) CreateLocalDatastore(ctx context.Context, name string, path string) (*Datastore, error) {
    +	req := types.CreateLocalDatastore{
    +		This: s.Reference(),
    +		Name: name,
    +		Path: path,
    +	}
    +
    +	res, err := methods.CreateLocalDatastore(ctx, s.Client(), &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewDatastore(s.Client(), res.Returnval), nil
    +}
    +
    +func (s HostDatastoreSystem) CreateNasDatastore(ctx context.Context, spec types.HostNasVolumeSpec) (*Datastore, error) {
    +	req := types.CreateNasDatastore{
    +		This: s.Reference(),
    +		Spec: spec,
    +	}
    +
    +	res, err := methods.CreateNasDatastore(ctx, s.Client(), &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewDatastore(s.Client(), res.Returnval), nil
    +}
    +
    +func (s HostDatastoreSystem) CreateVmfsDatastore(ctx context.Context, spec types.VmfsDatastoreCreateSpec) (*Datastore, error) {
    +	req := types.CreateVmfsDatastore{
    +		This: s.Reference(),
    +		Spec: spec,
    +	}
    +
    +	res, err := methods.CreateVmfsDatastore(ctx, s.Client(), &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewDatastore(s.Client(), res.Returnval), nil
    +}
    +
    +func (s HostDatastoreSystem) Remove(ctx context.Context, ds *Datastore) error {
    +	req := types.RemoveDatastore{
    +		This:      s.Reference(),
    +		Datastore: ds.Reference(),
    +	}
    +
    +	_, err := methods.RemoveDatastore(ctx, s.Client(), &req)
    +	if err != nil {
    +		return err
    +	}
    +
    +	return nil
    +}
    +
    +func (s HostDatastoreSystem) QueryAvailableDisksForVmfs(ctx context.Context) ([]types.HostScsiDisk, error) {
    +	req := types.QueryAvailableDisksForVmfs{
    +		This: s.Reference(),
    +	}
    +
    +	res, err := methods.QueryAvailableDisksForVmfs(ctx, s.Client(), &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return res.Returnval, nil
    +}
    +
    +func (s HostDatastoreSystem) QueryVmfsDatastoreCreateOptions(ctx context.Context, devicePath string) ([]types.VmfsDatastoreOption, error) {
    +	req := types.QueryVmfsDatastoreCreateOptions{
    +		This:       s.Reference(),
    +		DevicePath: devicePath,
    +	}
    +
    +	res, err := methods.QueryVmfsDatastoreCreateOptions(ctx, s.Client(), &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return res.Returnval, nil
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/host_date_time_system.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/host_date_time_system.go
    new file mode 100644
    index 000000000..7c9203d7b
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/host_date_time_system.go
    @@ -0,0 +1,69 @@
    +/*
    +Copyright (c) 2016 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"context"
    +	"time"
    +
    +	"github.com/vmware/govmomi/vim25"
    +	"github.com/vmware/govmomi/vim25/methods"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +type HostDateTimeSystem struct {
    +	Common
    +}
    +
    +func NewHostDateTimeSystem(c *vim25.Client, ref types.ManagedObjectReference) *HostDateTimeSystem {
    +	return &HostDateTimeSystem{
    +		Common: NewCommon(c, ref),
    +	}
    +}
    +
    +func (s HostDateTimeSystem) UpdateConfig(ctx context.Context, config types.HostDateTimeConfig) error {
    +	req := types.UpdateDateTimeConfig{
    +		This:   s.Reference(),
    +		Config: config,
    +	}
    +
    +	_, err := methods.UpdateDateTimeConfig(ctx, s.c, &req)
    +	return err
    +}
    +
    +func (s HostDateTimeSystem) Update(ctx context.Context, date time.Time) error {
    +	req := types.UpdateDateTime{
    +		This:     s.Reference(),
    +		DateTime: date,
    +	}
    +
    +	_, err := methods.UpdateDateTime(ctx, s.c, &req)
    +	return err
    +}
    +
    +func (s HostDateTimeSystem) Query(ctx context.Context) (*time.Time, error) {
    +	req := types.QueryDateTime{
    +		This: s.Reference(),
    +	}
    +
    +	res, err := methods.QueryDateTime(ctx, s.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return &res.Returnval, nil
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/host_firewall_system.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/host_firewall_system.go
    new file mode 100644
    index 000000000..0b1440253
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/host_firewall_system.go
    @@ -0,0 +1,181 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"context"
    +	"errors"
    +	"fmt"
    +	"strings"
    +
    +	"github.com/vmware/govmomi/vim25"
    +	"github.com/vmware/govmomi/vim25/methods"
    +	"github.com/vmware/govmomi/vim25/mo"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +type HostFirewallSystem struct {
    +	Common
    +}
    +
    +func NewHostFirewallSystem(c *vim25.Client, ref types.ManagedObjectReference) *HostFirewallSystem {
    +	return &HostFirewallSystem{
    +		Common: NewCommon(c, ref),
    +	}
    +}
    +
    +func (s HostFirewallSystem) DisableRuleset(ctx context.Context, id string) error {
    +	req := types.DisableRuleset{
    +		This: s.Reference(),
    +		Id:   id,
    +	}
    +
    +	_, err := methods.DisableRuleset(ctx, s.c, &req)
    +	return err
    +}
    +
    +func (s HostFirewallSystem) EnableRuleset(ctx context.Context, id string) error {
    +	req := types.EnableRuleset{
    +		This: s.Reference(),
    +		Id:   id,
    +	}
    +
    +	_, err := methods.EnableRuleset(ctx, s.c, &req)
    +	return err
    +}
    +
    +func (s HostFirewallSystem) Refresh(ctx context.Context) error {
    +	req := types.RefreshFirewall{
    +		This: s.Reference(),
    +	}
    +
    +	_, err := methods.RefreshFirewall(ctx, s.c, &req)
    +	return err
    +}
    +
    +func (s HostFirewallSystem) Info(ctx context.Context) (*types.HostFirewallInfo, error) {
    +	var fs mo.HostFirewallSystem
    +
    +	err := s.Properties(ctx, s.Reference(), []string{"firewallInfo"}, &fs)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return fs.FirewallInfo, nil
    +}
    +
    +// HostFirewallRulesetList provides helpers for a slice of types.HostFirewallRuleset
    +type HostFirewallRulesetList []types.HostFirewallRuleset
    +
    +// ByRule returns a HostFirewallRulesetList where Direction, PortType and Protocol are equal and Port is within range
    +func (l HostFirewallRulesetList) ByRule(rule types.HostFirewallRule) HostFirewallRulesetList {
    +	var matches HostFirewallRulesetList
    +
    +	for _, rs := range l {
    +		for _, r := range rs.Rule {
    +			if r.PortType != rule.PortType ||
    +				r.Protocol != rule.Protocol ||
    +				r.Direction != rule.Direction {
    +				continue
    +			}
    +
    +			if r.EndPort == 0 && rule.Port == r.Port ||
    +				rule.Port >= r.Port && rule.Port <= r.EndPort {
    +				matches = append(matches, rs)
    +				break
    +			}
    +		}
    +	}
    +
    +	return matches
    +}
    +
    +// EnabledByRule returns a HostFirewallRulesetList with Match(rule) applied and filtered via Enabled()
    +// if enabled param is true, otherwise filtered via Disabled().
    +// An error is returned if the resulting list is empty.
    +func (l HostFirewallRulesetList) EnabledByRule(rule types.HostFirewallRule, enabled bool) (HostFirewallRulesetList, error) {
    +	var matched, skipped HostFirewallRulesetList
    +	var matchedKind, skippedKind string
    +
    +	l = l.ByRule(rule)
    +
    +	if enabled {
    +		matched = l.Enabled()
    +		matchedKind = "enabled"
    +
    +		skipped = l.Disabled()
    +		skippedKind = "disabled"
    +	} else {
    +		matched = l.Disabled()
    +		matchedKind = "disabled"
    +
    +		skipped = l.Enabled()
    +		skippedKind = "enabled"
    +	}
    +
    +	if len(matched) == 0 {
    +		msg := fmt.Sprintf("%d %s firewall rulesets match %s %s %s %d, %d %s rulesets match",
    +			len(matched), matchedKind,
    +			rule.Direction, rule.Protocol, rule.PortType, rule.Port,
    +			len(skipped), skippedKind)
    +
    +		if len(skipped) != 0 {
    +			msg += fmt.Sprintf(": %s", strings.Join(skipped.Keys(), ", "))
    +		}
    +
    +		return nil, errors.New(msg)
    +	}
    +
    +	return matched, nil
    +}
    +
    +// Enabled returns a HostFirewallRulesetList with enabled rules
    +func (l HostFirewallRulesetList) Enabled() HostFirewallRulesetList {
    +	var matches HostFirewallRulesetList
    +
    +	for _, rs := range l {
    +		if rs.Enabled {
    +			matches = append(matches, rs)
    +		}
    +	}
    +
    +	return matches
    +}
    +
    +// Disabled returns a HostFirewallRulesetList with disabled rules
    +func (l HostFirewallRulesetList) Disabled() HostFirewallRulesetList {
    +	var matches HostFirewallRulesetList
    +
    +	for _, rs := range l {
    +		if !rs.Enabled {
    +			matches = append(matches, rs)
    +		}
    +	}
    +
    +	return matches
    +}
    +
    +// Keys returns the HostFirewallRuleset.Key for each ruleset in the list
    +func (l HostFirewallRulesetList) Keys() []string {
    +	var keys []string
    +
    +	for _, rs := range l {
    +		keys = append(keys, rs.Key)
    +	}
    +
    +	return keys
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/host_network_system.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/host_network_system.go
    new file mode 100644
    index 000000000..c21e1ec35
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/host_network_system.go
    @@ -0,0 +1,358 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"context"
    +
    +	"github.com/vmware/govmomi/vim25"
    +	"github.com/vmware/govmomi/vim25/methods"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +type HostNetworkSystem struct {
    +	Common
    +}
    +
    +func NewHostNetworkSystem(c *vim25.Client, ref types.ManagedObjectReference) *HostNetworkSystem {
    +	return &HostNetworkSystem{
    +		Common: NewCommon(c, ref),
    +	}
    +}
    +
    +// AddPortGroup wraps methods.AddPortGroup
    +func (o HostNetworkSystem) AddPortGroup(ctx context.Context, portgrp types.HostPortGroupSpec) error {
    +	req := types.AddPortGroup{
    +		This:    o.Reference(),
    +		Portgrp: portgrp,
    +	}
    +
    +	_, err := methods.AddPortGroup(ctx, o.c, &req)
    +	if err != nil {
    +		return err
    +	}
    +
    +	return nil
    +}
    +
    +// AddServiceConsoleVirtualNic wraps methods.AddServiceConsoleVirtualNic
    +func (o HostNetworkSystem) AddServiceConsoleVirtualNic(ctx context.Context, portgroup string, nic types.HostVirtualNicSpec) (string, error) {
    +	req := types.AddServiceConsoleVirtualNic{
    +		This:      o.Reference(),
    +		Portgroup: portgroup,
    +		Nic:       nic,
    +	}
    +
    +	res, err := methods.AddServiceConsoleVirtualNic(ctx, o.c, &req)
    +	if err != nil {
    +		return "", err
    +	}
    +
    +	return res.Returnval, nil
    +}
    +
    +// AddVirtualNic wraps methods.AddVirtualNic
    +func (o HostNetworkSystem) AddVirtualNic(ctx context.Context, portgroup string, nic types.HostVirtualNicSpec) (string, error) {
    +	req := types.AddVirtualNic{
    +		This:      o.Reference(),
    +		Portgroup: portgroup,
    +		Nic:       nic,
    +	}
    +
    +	res, err := methods.AddVirtualNic(ctx, o.c, &req)
    +	if err != nil {
    +		return "", err
    +	}
    +
    +	return res.Returnval, nil
    +}
    +
    +// AddVirtualSwitch wraps methods.AddVirtualSwitch
    +func (o HostNetworkSystem) AddVirtualSwitch(ctx context.Context, vswitchName string, spec *types.HostVirtualSwitchSpec) error {
    +	req := types.AddVirtualSwitch{
    +		This:        o.Reference(),
    +		VswitchName: vswitchName,
    +		Spec:        spec,
    +	}
    +
    +	_, err := methods.AddVirtualSwitch(ctx, o.c, &req)
    +	if err != nil {
    +		return err
    +	}
    +
    +	return nil
    +}
    +
    +// QueryNetworkHint wraps methods.QueryNetworkHint
    +func (o HostNetworkSystem) QueryNetworkHint(ctx context.Context, device []string) error {
    +	req := types.QueryNetworkHint{
    +		This:   o.Reference(),
    +		Device: device,
    +	}
    +
    +	_, err := methods.QueryNetworkHint(ctx, o.c, &req)
    +	if err != nil {
    +		return err
    +	}
    +
    +	return nil
    +}
    +
    +// RefreshNetworkSystem wraps methods.RefreshNetworkSystem
    +func (o HostNetworkSystem) RefreshNetworkSystem(ctx context.Context) error {
    +	req := types.RefreshNetworkSystem{
    +		This: o.Reference(),
    +	}
    +
    +	_, err := methods.RefreshNetworkSystem(ctx, o.c, &req)
    +	if err != nil {
    +		return err
    +	}
    +
    +	return nil
    +}
    +
    +// RemovePortGroup wraps methods.RemovePortGroup
    +func (o HostNetworkSystem) RemovePortGroup(ctx context.Context, pgName string) error {
    +	req := types.RemovePortGroup{
    +		This:   o.Reference(),
    +		PgName: pgName,
    +	}
    +
    +	_, err := methods.RemovePortGroup(ctx, o.c, &req)
    +	if err != nil {
    +		return err
    +	}
    +
    +	return nil
    +}
    +
    +// RemoveServiceConsoleVirtualNic wraps methods.RemoveServiceConsoleVirtualNic
    +func (o HostNetworkSystem) RemoveServiceConsoleVirtualNic(ctx context.Context, device string) error {
    +	req := types.RemoveServiceConsoleVirtualNic{
    +		This:   o.Reference(),
    +		Device: device,
    +	}
    +
    +	_, err := methods.RemoveServiceConsoleVirtualNic(ctx, o.c, &req)
    +	if err != nil {
    +		return err
    +	}
    +
    +	return nil
    +}
    +
    +// RemoveVirtualNic wraps methods.RemoveVirtualNic
    +func (o HostNetworkSystem) RemoveVirtualNic(ctx context.Context, device string) error {
    +	req := types.RemoveVirtualNic{
    +		This:   o.Reference(),
    +		Device: device,
    +	}
    +
    +	_, err := methods.RemoveVirtualNic(ctx, o.c, &req)
    +	if err != nil {
    +		return err
    +	}
    +
    +	return nil
    +}
    +
    +// RemoveVirtualSwitch wraps methods.RemoveVirtualSwitch
    +func (o HostNetworkSystem) RemoveVirtualSwitch(ctx context.Context, vswitchName string) error {
    +	req := types.RemoveVirtualSwitch{
    +		This:        o.Reference(),
    +		VswitchName: vswitchName,
    +	}
    +
    +	_, err := methods.RemoveVirtualSwitch(ctx, o.c, &req)
    +	if err != nil {
    +		return err
    +	}
    +
    +	return nil
    +}
    +
    +// RestartServiceConsoleVirtualNic wraps methods.RestartServiceConsoleVirtualNic
    +func (o HostNetworkSystem) RestartServiceConsoleVirtualNic(ctx context.Context, device string) error {
    +	req := types.RestartServiceConsoleVirtualNic{
    +		This:   o.Reference(),
    +		Device: device,
    +	}
    +
    +	_, err := methods.RestartServiceConsoleVirtualNic(ctx, o.c, &req)
    +	if err != nil {
    +		return err
    +	}
    +
    +	return nil
    +}
    +
    +// UpdateConsoleIpRouteConfig wraps methods.UpdateConsoleIpRouteConfig
    +func (o HostNetworkSystem) UpdateConsoleIpRouteConfig(ctx context.Context, config types.BaseHostIpRouteConfig) error {
    +	req := types.UpdateConsoleIpRouteConfig{
    +		This:   o.Reference(),
    +		Config: config,
    +	}
    +
    +	_, err := methods.UpdateConsoleIpRouteConfig(ctx, o.c, &req)
    +	if err != nil {
    +		return err
    +	}
    +
    +	return nil
    +}
    +
    +// UpdateDnsConfig wraps methods.UpdateDnsConfig
    +func (o HostNetworkSystem) UpdateDnsConfig(ctx context.Context, config types.BaseHostDnsConfig) error {
    +	req := types.UpdateDnsConfig{
    +		This:   o.Reference(),
    +		Config: config,
    +	}
    +
    +	_, err := methods.UpdateDnsConfig(ctx, o.c, &req)
    +	if err != nil {
    +		return err
    +	}
    +
    +	return nil
    +}
    +
    +// UpdateIpRouteConfig wraps methods.UpdateIpRouteConfig
    +func (o HostNetworkSystem) UpdateIpRouteConfig(ctx context.Context, config types.BaseHostIpRouteConfig) error {
    +	req := types.UpdateIpRouteConfig{
    +		This:   o.Reference(),
    +		Config: config,
    +	}
    +
    +	_, err := methods.UpdateIpRouteConfig(ctx, o.c, &req)
    +	if err != nil {
    +		return err
    +	}
    +
    +	return nil
    +}
    +
    +// UpdateIpRouteTableConfig wraps methods.UpdateIpRouteTableConfig
    +func (o HostNetworkSystem) UpdateIpRouteTableConfig(ctx context.Context, config types.HostIpRouteTableConfig) error {
    +	req := types.UpdateIpRouteTableConfig{
    +		This:   o.Reference(),
    +		Config: config,
    +	}
    +
    +	_, err := methods.UpdateIpRouteTableConfig(ctx, o.c, &req)
    +	if err != nil {
    +		return err
    +	}
    +
    +	return nil
    +}
    +
    +// UpdateNetworkConfig wraps methods.UpdateNetworkConfig
    +func (o HostNetworkSystem) UpdateNetworkConfig(ctx context.Context, config types.HostNetworkConfig, changeMode string) (*types.HostNetworkConfigResult, error) {
    +	req := types.UpdateNetworkConfig{
    +		This:       o.Reference(),
    +		Config:     config,
    +		ChangeMode: changeMode,
    +	}
    +
    +	res, err := methods.UpdateNetworkConfig(ctx, o.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return &res.Returnval, nil
    +}
    +
    +// UpdatePhysicalNicLinkSpeed wraps methods.UpdatePhysicalNicLinkSpeed
    +func (o HostNetworkSystem) UpdatePhysicalNicLinkSpeed(ctx context.Context, device string, linkSpeed *types.PhysicalNicLinkInfo) error {
    +	req := types.UpdatePhysicalNicLinkSpeed{
    +		This:      o.Reference(),
    +		Device:    device,
    +		LinkSpeed: linkSpeed,
    +	}
    +
    +	_, err := methods.UpdatePhysicalNicLinkSpeed(ctx, o.c, &req)
    +	if err != nil {
    +		return err
    +	}
    +
    +	return nil
    +}
    +
    +// UpdatePortGroup wraps methods.UpdatePortGroup
    +func (o HostNetworkSystem) UpdatePortGroup(ctx context.Context, pgName string, portgrp types.HostPortGroupSpec) error {
    +	req := types.UpdatePortGroup{
    +		This:    o.Reference(),
    +		PgName:  pgName,
    +		Portgrp: portgrp,
    +	}
    +
    +	_, err := methods.UpdatePortGroup(ctx, o.c, &req)
    +	if err != nil {
    +		return err
    +	}
    +
    +	return nil
    +}
    +
    +// UpdateServiceConsoleVirtualNic wraps methods.UpdateServiceConsoleVirtualNic
    +func (o HostNetworkSystem) UpdateServiceConsoleVirtualNic(ctx context.Context, device string, nic types.HostVirtualNicSpec) error {
    +	req := types.UpdateServiceConsoleVirtualNic{
    +		This:   o.Reference(),
    +		Device: device,
    +		Nic:    nic,
    +	}
    +
    +	_, err := methods.UpdateServiceConsoleVirtualNic(ctx, o.c, &req)
    +	if err != nil {
    +		return err
    +	}
    +
    +	return nil
    +}
    +
    +// UpdateVirtualNic wraps methods.UpdateVirtualNic
    +func (o HostNetworkSystem) UpdateVirtualNic(ctx context.Context, device string, nic types.HostVirtualNicSpec) error {
    +	req := types.UpdateVirtualNic{
    +		This:   o.Reference(),
    +		Device: device,
    +		Nic:    nic,
    +	}
    +
    +	_, err := methods.UpdateVirtualNic(ctx, o.c, &req)
    +	if err != nil {
    +		return err
    +	}
    +
    +	return nil
    +}
    +
    +// UpdateVirtualSwitch wraps methods.UpdateVirtualSwitch
    +func (o HostNetworkSystem) UpdateVirtualSwitch(ctx context.Context, vswitchName string, spec types.HostVirtualSwitchSpec) error {
    +	req := types.UpdateVirtualSwitch{
    +		This:        o.Reference(),
    +		VswitchName: vswitchName,
    +		Spec:        spec,
    +	}
    +
    +	_, err := methods.UpdateVirtualSwitch(ctx, o.c, &req)
    +	if err != nil {
    +		return err
    +	}
    +
    +	return nil
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/host_service_system.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/host_service_system.go
    new file mode 100644
    index 000000000..a66b32c17
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/host_service_system.go
    @@ -0,0 +1,88 @@
    +/*
    +Copyright (c) 2016 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"context"
    +
    +	"github.com/vmware/govmomi/vim25"
    +	"github.com/vmware/govmomi/vim25/methods"
    +	"github.com/vmware/govmomi/vim25/mo"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +type HostServiceSystem struct {
    +	Common
    +}
    +
    +func NewHostServiceSystem(c *vim25.Client, ref types.ManagedObjectReference) *HostServiceSystem {
    +	return &HostServiceSystem{
    +		Common: NewCommon(c, ref),
    +	}
    +}
    +
    +func (s HostServiceSystem) Service(ctx context.Context) ([]types.HostService, error) {
    +	var ss mo.HostServiceSystem
    +
    +	err := s.Properties(ctx, s.Reference(), []string{"serviceInfo.service"}, &ss)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return ss.ServiceInfo.Service, nil
    +}
    +
    +func (s HostServiceSystem) Start(ctx context.Context, id string) error {
    +	req := types.StartService{
    +		This: s.Reference(),
    +		Id:   id,
    +	}
    +
    +	_, err := methods.StartService(ctx, s.Client(), &req)
    +	return err
    +}
    +
    +func (s HostServiceSystem) Stop(ctx context.Context, id string) error {
    +	req := types.StopService{
    +		This: s.Reference(),
    +		Id:   id,
    +	}
    +
    +	_, err := methods.StopService(ctx, s.Client(), &req)
    +	return err
    +}
    +
    +func (s HostServiceSystem) Restart(ctx context.Context, id string) error {
    +	req := types.RestartService{
    +		This: s.Reference(),
    +		Id:   id,
    +	}
    +
    +	_, err := methods.RestartService(ctx, s.Client(), &req)
    +	return err
    +}
    +
    +func (s HostServiceSystem) UpdatePolicy(ctx context.Context, id string, policy string) error {
    +	req := types.UpdateServicePolicy{
    +		This:   s.Reference(),
    +		Id:     id,
    +		Policy: policy,
    +	}
    +
    +	_, err := methods.UpdateServicePolicy(ctx, s.Client(), &req)
    +	return err
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/host_storage_system.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/host_storage_system.go
    new file mode 100644
    index 000000000..5990a1d4e
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/host_storage_system.go
    @@ -0,0 +1,174 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"context"
    +	"errors"
    +
    +	"github.com/vmware/govmomi/vim25"
    +	"github.com/vmware/govmomi/vim25/methods"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +type HostStorageSystem struct {
    +	Common
    +}
    +
    +func NewHostStorageSystem(c *vim25.Client, ref types.ManagedObjectReference) *HostStorageSystem {
    +	return &HostStorageSystem{
    +		Common: NewCommon(c, ref),
    +	}
    +}
    +
    +func (s HostStorageSystem) RetrieveDiskPartitionInfo(ctx context.Context, devicePath string) (*types.HostDiskPartitionInfo, error) {
    +	req := types.RetrieveDiskPartitionInfo{
    +		This:       s.Reference(),
    +		DevicePath: []string{devicePath},
    +	}
    +
    +	res, err := methods.RetrieveDiskPartitionInfo(ctx, s.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	if res.Returnval == nil || len(res.Returnval) == 0 {
    +		return nil, errors.New("no partition info")
    +	}
    +
    +	return &res.Returnval[0], nil
    +}
    +
    +func (s HostStorageSystem) ComputeDiskPartitionInfo(ctx context.Context, devicePath string, layout types.HostDiskPartitionLayout) (*types.HostDiskPartitionInfo, error) {
    +	req := types.ComputeDiskPartitionInfo{
    +		This:       s.Reference(),
    +		DevicePath: devicePath,
    +		Layout:     layout,
    +	}
    +
    +	res, err := methods.ComputeDiskPartitionInfo(ctx, s.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return &res.Returnval, nil
    +}
    +
    +func (s HostStorageSystem) UpdateDiskPartitionInfo(ctx context.Context, devicePath string, spec types.HostDiskPartitionSpec) error {
    +	req := types.UpdateDiskPartitions{
    +		This:       s.Reference(),
    +		DevicePath: devicePath,
    +		Spec:       spec,
    +	}
    +
    +	_, err := methods.UpdateDiskPartitions(ctx, s.c, &req)
    +	return err
    +}
    +
    +func (s HostStorageSystem) RescanAllHba(ctx context.Context) error {
    +	req := types.RescanAllHba{
    +		This: s.Reference(),
    +	}
    +
    +	_, err := methods.RescanAllHba(ctx, s.c, &req)
    +	return err
    +}
    +
    +func (s HostStorageSystem) Refresh(ctx context.Context) error {
    +	req := types.RefreshStorageSystem{
    +		This: s.Reference(),
    +	}
    +
    +	_, err := methods.RefreshStorageSystem(ctx, s.c, &req)
    +	return err
    +}
    +
    +func (s HostStorageSystem) RescanVmfs(ctx context.Context) error {
    +	req := types.RescanVmfs{
    +		This: s.Reference(),
    +	}
    +
    +	_, err := methods.RescanVmfs(ctx, s.c, &req)
    +	return err
    +}
    +
    +func (s HostStorageSystem) MarkAsSsd(ctx context.Context, uuid string) (*Task, error) {
    +	req := types.MarkAsSsd_Task{
    +		This:         s.Reference(),
    +		ScsiDiskUuid: uuid,
    +	}
    +
    +	res, err := methods.MarkAsSsd_Task(ctx, s.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(s.c, res.Returnval), nil
    +}
    +
    +func (s HostStorageSystem) MarkAsNonSsd(ctx context.Context, uuid string) (*Task, error) {
    +	req := types.MarkAsNonSsd_Task{
    +		This:         s.Reference(),
    +		ScsiDiskUuid: uuid,
    +	}
    +
    +	res, err := methods.MarkAsNonSsd_Task(ctx, s.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(s.c, res.Returnval), nil
    +}
    +
    +func (s HostStorageSystem) MarkAsLocal(ctx context.Context, uuid string) (*Task, error) {
    +	req := types.MarkAsLocal_Task{
    +		This:         s.Reference(),
    +		ScsiDiskUuid: uuid,
    +	}
    +
    +	res, err := methods.MarkAsLocal_Task(ctx, s.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(s.c, res.Returnval), nil
    +}
    +
    +func (s HostStorageSystem) MarkAsNonLocal(ctx context.Context, uuid string) (*Task, error) {
    +	req := types.MarkAsNonLocal_Task{
    +		This:         s.Reference(),
    +		ScsiDiskUuid: uuid,
    +	}
    +
    +	res, err := methods.MarkAsNonLocal_Task(ctx, s.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(s.c, res.Returnval), nil
    +}
    +
    +func (s HostStorageSystem) AttachScsiLun(ctx context.Context, uuid string) error {
    +	req := types.AttachScsiLun{
    +		This:    s.Reference(),
    +		LunUuid: uuid,
    +	}
    +
    +	_, err := methods.AttachScsiLun(ctx, s.c, &req)
    +
    +	return err
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/host_system.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/host_system.go
    new file mode 100644
    index 000000000..a350edfde
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/host_system.go
    @@ -0,0 +1,153 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"context"
    +	"fmt"
    +	"net"
    +
    +	"github.com/vmware/govmomi/vim25"
    +	"github.com/vmware/govmomi/vim25/methods"
    +	"github.com/vmware/govmomi/vim25/mo"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +type HostSystem struct {
    +	Common
    +}
    +
    +func NewHostSystem(c *vim25.Client, ref types.ManagedObjectReference) *HostSystem {
    +	return &HostSystem{
    +		Common: NewCommon(c, ref),
    +	}
    +}
    +
    +func (h HostSystem) ConfigManager() *HostConfigManager {
    +	return NewHostConfigManager(h.c, h.Reference())
    +}
    +
    +func (h HostSystem) ResourcePool(ctx context.Context) (*ResourcePool, error) {
    +	var mh mo.HostSystem
    +
    +	err := h.Properties(ctx, h.Reference(), []string{"parent"}, &mh)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	var mcr *mo.ComputeResource
    +	var parent interface{}
    +
    +	switch mh.Parent.Type {
    +	case "ComputeResource":
    +		mcr = new(mo.ComputeResource)
    +		parent = mcr
    +	case "ClusterComputeResource":
    +		mcc := new(mo.ClusterComputeResource)
    +		mcr = &mcc.ComputeResource
    +		parent = mcc
    +	default:
    +		return nil, fmt.Errorf("unknown host parent type: %s", mh.Parent.Type)
    +	}
    +
    +	err = h.Properties(ctx, *mh.Parent, []string{"resourcePool"}, parent)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	pool := NewResourcePool(h.c, *mcr.ResourcePool)
    +	return pool, nil
    +}
    +
    +func (h HostSystem) ManagementIPs(ctx context.Context) ([]net.IP, error) {
    +	var mh mo.HostSystem
    +
    +	err := h.Properties(ctx, h.Reference(), []string{"config.virtualNicManagerInfo.netConfig"}, &mh)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	var ips []net.IP
    +	for _, nc := range mh.Config.VirtualNicManagerInfo.NetConfig {
    +		if nc.NicType == "management" && len(nc.CandidateVnic) > 0 {
    +			ip := net.ParseIP(nc.CandidateVnic[0].Spec.Ip.IpAddress)
    +			if ip != nil {
    +				ips = append(ips, ip)
    +			}
    +		}
    +	}
    +
    +	return ips, nil
    +}
    +
    +func (h HostSystem) Disconnect(ctx context.Context) (*Task, error) {
    +	req := types.DisconnectHost_Task{
    +		This: h.Reference(),
    +	}
    +
    +	res, err := methods.DisconnectHost_Task(ctx, h.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(h.c, res.Returnval), nil
    +}
    +
    +func (h HostSystem) Reconnect(ctx context.Context, cnxSpec *types.HostConnectSpec, reconnectSpec *types.HostSystemReconnectSpec) (*Task, error) {
    +	req := types.ReconnectHost_Task{
    +		This:          h.Reference(),
    +		CnxSpec:       cnxSpec,
    +		ReconnectSpec: reconnectSpec,
    +	}
    +
    +	res, err := methods.ReconnectHost_Task(ctx, h.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(h.c, res.Returnval), nil
    +}
    +
    +func (h HostSystem) EnterMaintenanceMode(ctx context.Context, timeout int32, evacuate bool, spec *types.HostMaintenanceSpec) (*Task, error) {
    +	req := types.EnterMaintenanceMode_Task{
    +		This:                  h.Reference(),
    +		Timeout:               timeout,
    +		EvacuatePoweredOffVms: types.NewBool(evacuate),
    +		MaintenanceSpec:       spec,
    +	}
    +
    +	res, err := methods.EnterMaintenanceMode_Task(ctx, h.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(h.c, res.Returnval), nil
    +}
    +
    +func (h HostSystem) ExitMaintenanceMode(ctx context.Context, timeout int32) (*Task, error) {
    +	req := types.ExitMaintenanceMode_Task{
    +		This:    h.Reference(),
    +		Timeout: timeout,
    +	}
    +
    +	res, err := methods.ExitMaintenanceMode_Task(ctx, h.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(h.c, res.Returnval), nil
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/host_virtual_nic_manager.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/host_virtual_nic_manager.go
    new file mode 100644
    index 000000000..01e7e9cd4
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/host_virtual_nic_manager.go
    @@ -0,0 +1,93 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"context"
    +
    +	"github.com/vmware/govmomi/vim25"
    +	"github.com/vmware/govmomi/vim25/methods"
    +	"github.com/vmware/govmomi/vim25/mo"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +type HostVirtualNicManager struct {
    +	Common
    +	Host *HostSystem
    +}
    +
    +func NewHostVirtualNicManager(c *vim25.Client, ref types.ManagedObjectReference, host types.ManagedObjectReference) *HostVirtualNicManager {
    +	return &HostVirtualNicManager{
    +		Common: NewCommon(c, ref),
    +		Host:   NewHostSystem(c, host),
    +	}
    +}
    +
    +func (m HostVirtualNicManager) Info(ctx context.Context) (*types.HostVirtualNicManagerInfo, error) {
    +	var vnm mo.HostVirtualNicManager
    +
    +	err := m.Properties(ctx, m.Reference(), []string{"info"}, &vnm)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return &vnm.Info, nil
    +}
    +
    +func (m HostVirtualNicManager) DeselectVnic(ctx context.Context, nicType string, device string) error {
    +	if nicType == string(types.HostVirtualNicManagerNicTypeVsan) {
    +		// Avoid fault.NotSupported:
    +		// "Error deselecting device '$device': VSAN interfaces must be deselected using vim.host.VsanSystem"
    +		s, err := m.Host.ConfigManager().VsanSystem(ctx)
    +		if err != nil {
    +			return err
    +		}
    +
    +		return s.updateVnic(ctx, device, false)
    +	}
    +
    +	req := types.DeselectVnicForNicType{
    +		This:    m.Reference(),
    +		NicType: nicType,
    +		Device:  device,
    +	}
    +
    +	_, err := methods.DeselectVnicForNicType(ctx, m.Client(), &req)
    +	return err
    +}
    +
    +func (m HostVirtualNicManager) SelectVnic(ctx context.Context, nicType string, device string) error {
    +	if nicType == string(types.HostVirtualNicManagerNicTypeVsan) {
    +		// Avoid fault.NotSupported:
    +		// "Error selecting device '$device': VSAN interfaces must be selected using vim.host.VsanSystem"
    +		s, err := m.Host.ConfigManager().VsanSystem(ctx)
    +		if err != nil {
    +			return err
    +		}
    +
    +		return s.updateVnic(ctx, device, true)
    +	}
    +
    +	req := types.SelectVnicForNicType{
    +		This:    m.Reference(),
    +		NicType: nicType,
    +		Device:  device,
    +	}
    +
    +	_, err := methods.SelectVnicForNicType(ctx, m.Client(), &req)
    +	return err
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/host_vsan_internal_system.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/host_vsan_internal_system.go
    new file mode 100644
    index 000000000..1430e8a88
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/host_vsan_internal_system.go
    @@ -0,0 +1,117 @@
    +/*
    +Copyright (c) 2017 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"context"
    +	"encoding/json"
    +
    +	"github.com/vmware/govmomi/vim25"
    +	"github.com/vmware/govmomi/vim25/methods"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +type HostVsanInternalSystem struct {
    +	Common
    +}
    +
    +func NewHostVsanInternalSystem(c *vim25.Client, ref types.ManagedObjectReference) *HostVsanInternalSystem {
    +	m := HostVsanInternalSystem{
    +		Common: NewCommon(c, ref),
    +	}
    +
    +	return &m
    +}
    +
    +// QueryVsanObjectUuidsByFilter returns vSAN DOM object uuids by filter.
    +func (m HostVsanInternalSystem) QueryVsanObjectUuidsByFilter(ctx context.Context, uuids []string, limit int32, version int32) ([]string, error) {
    +	req := types.QueryVsanObjectUuidsByFilter{
    +		This:    m.Reference(),
    +		Uuids:   uuids,
    +		Limit:   &limit,
    +		Version: version,
    +	}
    +
    +	res, err := methods.QueryVsanObjectUuidsByFilter(ctx, m.Client(), &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return res.Returnval, nil
    +}
    +
    +type VsanObjExtAttrs struct {
    +	Type  string `json:"Object type"`
    +	Class string `json:"Object class"`
    +	Size  string `json:"Object size"`
    +	Path  string `json:"Object path"`
    +	Name  string `json:"User friendly name"`
    +}
    +
    +func (a *VsanObjExtAttrs) DatastorePath(dir string) string {
    +	l := len(dir)
    +	path := a.Path
    +
    +	if len(path) >= l {
    +		path = a.Path[l:]
    +	}
    +
    +	if path != "" {
    +		return path
    +	}
    +
    +	return a.Name // vmnamespace
    +}
    +
    +// GetVsanObjExtAttrs is internal and intended for troubleshooting/debugging situations in the field.
    +// WARNING: This API can be slow because we do IOs (reads) to all the objects.
    +func (m HostVsanInternalSystem) GetVsanObjExtAttrs(ctx context.Context, uuids []string) (map[string]VsanObjExtAttrs, error) {
    +	req := types.GetVsanObjExtAttrs{
    +		This:  m.Reference(),
    +		Uuids: uuids,
    +	}
    +
    +	res, err := methods.GetVsanObjExtAttrs(ctx, m.Client(), &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	var attrs map[string]VsanObjExtAttrs
    +
    +	err = json.Unmarshal([]byte(res.Returnval), &attrs)
    +
    +	return attrs, err
    +}
    +
    +// DeleteVsanObjects is internal and intended for troubleshooting/debugging only.
    +// WARNING: This API can be slow because we do IOs to all the objects.
    +// DOM won't allow access to objects which have lost quorum. Such objects can be deleted with the optional "force" flag.
    +// These objects may however re-appear with quorum if the absent components come back (network partition gets resolved, etc.)
    +func (m HostVsanInternalSystem) DeleteVsanObjects(ctx context.Context, uuids []string, force *bool) ([]types.HostVsanInternalSystemDeleteVsanObjectsResult, error) {
    +	req := types.DeleteVsanObjects{
    +		This:  m.Reference(),
    +		Uuids: uuids,
    +		Force: force,
    +	}
    +
    +	res, err := methods.DeleteVsanObjects(ctx, m.Client(), &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return res.Returnval, nil
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/host_vsan_system.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/host_vsan_system.go
    new file mode 100644
    index 000000000..5ab234d5e
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/host_vsan_system.go
    @@ -0,0 +1,88 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"context"
    +
    +	"github.com/vmware/govmomi/vim25"
    +	"github.com/vmware/govmomi/vim25/methods"
    +	"github.com/vmware/govmomi/vim25/mo"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +type HostVsanSystem struct {
    +	Common
    +}
    +
    +func NewHostVsanSystem(c *vim25.Client, ref types.ManagedObjectReference) *HostVsanSystem {
    +	return &HostVsanSystem{
    +		Common: NewCommon(c, ref),
    +	}
    +}
    +
    +func (s HostVsanSystem) Update(ctx context.Context, config types.VsanHostConfigInfo) (*Task, error) {
    +	req := types.UpdateVsan_Task{
    +		This:   s.Reference(),
    +		Config: config,
    +	}
    +
    +	res, err := methods.UpdateVsan_Task(ctx, s.Client(), &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(s.Client(), res.Returnval), nil
    +}
    +
    +// updateVnic in support of the HostVirtualNicManager.{SelectVnic,DeselectVnic} methods
    +func (s HostVsanSystem) updateVnic(ctx context.Context, device string, enable bool) error {
    +	var vsan mo.HostVsanSystem
    +
    +	err := s.Properties(ctx, s.Reference(), []string{"config.networkInfo.port"}, &vsan)
    +	if err != nil {
    +		return err
    +	}
    +
    +	info := vsan.Config
    +
    +	var port []types.VsanHostConfigInfoNetworkInfoPortConfig
    +
    +	for _, p := range info.NetworkInfo.Port {
    +		if p.Device == device {
    +			continue
    +		}
    +
    +		port = append(port, p)
    +	}
    +
    +	if enable {
    +		port = append(port, types.VsanHostConfigInfoNetworkInfoPortConfig{
    +			Device: device,
    +		})
    +	}
    +
    +	info.NetworkInfo.Port = port
    +
    +	task, err := s.Update(ctx, info)
    +	if err != nil {
    +		return err
    +	}
    +
    +	_, err = task.WaitForResult(ctx, nil)
    +	return err
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/namespace_manager.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/namespace_manager.go
    new file mode 100644
    index 000000000..f463b368c
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/namespace_manager.go
    @@ -0,0 +1,76 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"context"
    +
    +	"github.com/vmware/govmomi/vim25"
    +	"github.com/vmware/govmomi/vim25/methods"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +type DatastoreNamespaceManager struct {
    +	Common
    +}
    +
    +func NewDatastoreNamespaceManager(c *vim25.Client) *DatastoreNamespaceManager {
    +	n := DatastoreNamespaceManager{
    +		Common: NewCommon(c, *c.ServiceContent.DatastoreNamespaceManager),
    +	}
    +
    +	return &n
    +}
    +
    +// CreateDirectory creates a top-level directory on the given vsan datastore, using
    +// the given user display name hint and opaque storage policy.
    +func (nm DatastoreNamespaceManager) CreateDirectory(ctx context.Context, ds *Datastore, displayName string, policy string) (string, error) {
    +
    +	req := &types.CreateDirectory{
    +		This:        nm.Reference(),
    +		Datastore:   ds.Reference(),
    +		DisplayName: displayName,
    +		Policy:      policy,
    +	}
    +
    +	resp, err := methods.CreateDirectory(ctx, nm.c, req)
    +	if err != nil {
    +		return "", err
    +	}
    +
    +	return resp.Returnval, nil
    +}
    +
    +// DeleteDirectory deletes the given top-level directory from a vsan datastore.
    +func (nm DatastoreNamespaceManager) DeleteDirectory(ctx context.Context, dc *Datacenter, datastorePath string) error {
    +
    +	req := &types.DeleteDirectory{
    +		This:          nm.Reference(),
    +		DatastorePath: datastorePath,
    +	}
    +
    +	if dc != nil {
    +		ref := dc.Reference()
    +		req.Datacenter = &ref
    +	}
    +
    +	if _, err := methods.DeleteDirectory(ctx, nm.c, req); err != nil {
    +		return err
    +	}
    +
    +	return nil
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/network.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/network.go
    new file mode 100644
    index 000000000..d1dc7ce01
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/network.go
    @@ -0,0 +1,56 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"context"
    +
    +	"github.com/vmware/govmomi/vim25"
    +	"github.com/vmware/govmomi/vim25/mo"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +type Network struct {
    +	Common
    +}
    +
    +func NewNetwork(c *vim25.Client, ref types.ManagedObjectReference) *Network {
    +	return &Network{
    +		Common: NewCommon(c, ref),
    +	}
    +}
    +
    +// EthernetCardBackingInfo returns the VirtualDeviceBackingInfo for this Network
    +func (n Network) EthernetCardBackingInfo(ctx context.Context) (types.BaseVirtualDeviceBackingInfo, error) {
    +	var e mo.Network
    +
    +	// Use Network.Name rather than Common.Name as the latter does not return the complete name if it contains a '/'
    +	// We can't use Common.ObjectName here either as we need the ManagedEntity.Name field is not set since mo.Network
    +	// has its own Name field.
    +	err := n.Properties(ctx, n.Reference(), []string{"name"}, &e)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	backing := &types.VirtualEthernetCardNetworkBackingInfo{
    +		VirtualDeviceDeviceBackingInfo: types.VirtualDeviceDeviceBackingInfo{
    +			DeviceName: e.Name,
    +		},
    +	}
    +
    +	return backing, nil
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/network_reference.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/network_reference.go
    new file mode 100644
    index 000000000..7716bdb38
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/network_reference.go
    @@ -0,0 +1,31 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"context"
    +
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +// The NetworkReference interface is implemented by managed objects
    +// which can be used as the backing for a VirtualEthernetCard.
    +type NetworkReference interface {
    +	Reference
    +
    +	EthernetCardBackingInfo(ctx context.Context) (types.BaseVirtualDeviceBackingInfo, error)
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/opaque_network.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/opaque_network.go
    new file mode 100644
    index 000000000..47ce4cefe
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/opaque_network.go
    @@ -0,0 +1,57 @@
    +/*
    +Copyright (c) 2017 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"context"
    +	"fmt"
    +
    +	"github.com/vmware/govmomi/vim25"
    +	"github.com/vmware/govmomi/vim25/mo"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +type OpaqueNetwork struct {
    +	Common
    +}
    +
    +func NewOpaqueNetwork(c *vim25.Client, ref types.ManagedObjectReference) *OpaqueNetwork {
    +	return &OpaqueNetwork{
    +		Common: NewCommon(c, ref),
    +	}
    +}
    +
    +// EthernetCardBackingInfo returns the VirtualDeviceBackingInfo for this Network
    +func (n OpaqueNetwork) EthernetCardBackingInfo(ctx context.Context) (types.BaseVirtualDeviceBackingInfo, error) {
    +	var net mo.OpaqueNetwork
    +
    +	if err := n.Properties(ctx, n.Reference(), []string{"summary"}, &net); err != nil {
    +		return nil, err
    +	}
    +
    +	summary, ok := net.Summary.(*types.OpaqueNetworkSummary)
    +	if !ok {
    +		return nil, fmt.Errorf("%s unsupported network type: %T", n, net.Summary)
    +	}
    +
    +	backing := &types.VirtualEthernetCardOpaqueNetworkBackingInfo{
    +		OpaqueNetworkId:   summary.OpaqueNetworkId,
    +		OpaqueNetworkType: summary.OpaqueNetworkType,
    +	}
    +
    +	return backing, nil
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/option_manager.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/option_manager.go
    new file mode 100644
    index 000000000..7f93273aa
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/option_manager.go
    @@ -0,0 +1,59 @@
    +/*
    +Copyright (c) 2016 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"context"
    +
    +	"github.com/vmware/govmomi/vim25"
    +	"github.com/vmware/govmomi/vim25/methods"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +type OptionManager struct {
    +	Common
    +}
    +
    +func NewOptionManager(c *vim25.Client, ref types.ManagedObjectReference) *OptionManager {
    +	return &OptionManager{
    +		Common: NewCommon(c, ref),
    +	}
    +}
    +
    +func (m OptionManager) Query(ctx context.Context, name string) ([]types.BaseOptionValue, error) {
    +	req := types.QueryOptions{
    +		This: m.Reference(),
    +		Name: name,
    +	}
    +
    +	res, err := methods.QueryOptions(ctx, m.Client(), &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return res.Returnval, nil
    +}
    +
    +func (m OptionManager) Update(ctx context.Context, value []types.BaseOptionValue) error {
    +	req := types.UpdateOptions{
    +		This:         m.Reference(),
    +		ChangedValue: value,
    +	}
    +
    +	_, err := methods.UpdateOptions(ctx, m.Client(), &req)
    +	return err
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/resource_pool.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/resource_pool.go
    new file mode 100644
    index 000000000..55c2e2b2f
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/resource_pool.go
    @@ -0,0 +1,138 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"context"
    +
    +	"github.com/vmware/govmomi/nfc"
    +	"github.com/vmware/govmomi/vim25"
    +	"github.com/vmware/govmomi/vim25/methods"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +type ResourcePool struct {
    +	Common
    +}
    +
    +func NewResourcePool(c *vim25.Client, ref types.ManagedObjectReference) *ResourcePool {
    +	return &ResourcePool{
    +		Common: NewCommon(c, ref),
    +	}
    +}
    +
    +func (p ResourcePool) ImportVApp(ctx context.Context, spec types.BaseImportSpec, folder *Folder, host *HostSystem) (*nfc.Lease, error) {
    +	req := types.ImportVApp{
    +		This: p.Reference(),
    +		Spec: spec,
    +	}
    +
    +	if folder != nil {
    +		ref := folder.Reference()
    +		req.Folder = &ref
    +	}
    +
    +	if host != nil {
    +		ref := host.Reference()
    +		req.Host = &ref
    +	}
    +
    +	res, err := methods.ImportVApp(ctx, p.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return nfc.NewLease(p.c, res.Returnval), nil
    +}
    +
    +func (p ResourcePool) Create(ctx context.Context, name string, spec types.ResourceConfigSpec) (*ResourcePool, error) {
    +	req := types.CreateResourcePool{
    +		This: p.Reference(),
    +		Name: name,
    +		Spec: spec,
    +	}
    +
    +	res, err := methods.CreateResourcePool(ctx, p.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewResourcePool(p.c, res.Returnval), nil
    +}
    +
    +func (p ResourcePool) CreateVApp(ctx context.Context, name string, resSpec types.ResourceConfigSpec, configSpec types.VAppConfigSpec, folder *Folder) (*VirtualApp, error) {
    +	req := types.CreateVApp{
    +		This:       p.Reference(),
    +		Name:       name,
    +		ResSpec:    resSpec,
    +		ConfigSpec: configSpec,
    +	}
    +
    +	if folder != nil {
    +		ref := folder.Reference()
    +		req.VmFolder = &ref
    +	}
    +
    +	res, err := methods.CreateVApp(ctx, p.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewVirtualApp(p.c, res.Returnval), nil
    +}
    +
    +func (p ResourcePool) UpdateConfig(ctx context.Context, name string, config *types.ResourceConfigSpec) error {
    +	req := types.UpdateConfig{
    +		This:   p.Reference(),
    +		Name:   name,
    +		Config: config,
    +	}
    +
    +	if config != nil && config.Entity == nil {
    +		ref := p.Reference()
    +
    +		// Create copy of config so changes won't leak back to the caller
    +		newConfig := *config
    +		newConfig.Entity = &ref
    +		req.Config = &newConfig
    +	}
    +
    +	_, err := methods.UpdateConfig(ctx, p.c, &req)
    +	return err
    +}
    +
    +func (p ResourcePool) DestroyChildren(ctx context.Context) error {
    +	req := types.DestroyChildren{
    +		This: p.Reference(),
    +	}
    +
    +	_, err := methods.DestroyChildren(ctx, p.c, &req)
    +	return err
    +}
    +
    +func (p ResourcePool) Destroy(ctx context.Context) (*Task, error) {
    +	req := types.Destroy_Task{
    +		This: p.Reference(),
    +	}
    +
    +	res, err := methods.Destroy_Task(ctx, p.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(p.c, res.Returnval), nil
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/search_index.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/search_index.go
    new file mode 100644
    index 000000000..4b0a525d5
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/search_index.go
    @@ -0,0 +1,163 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"context"
    +
    +	"github.com/vmware/govmomi/vim25"
    +	"github.com/vmware/govmomi/vim25/methods"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +type SearchIndex struct {
    +	Common
    +}
    +
    +func NewSearchIndex(c *vim25.Client) *SearchIndex {
    +	s := SearchIndex{
    +		Common: NewCommon(c, *c.ServiceContent.SearchIndex),
    +	}
    +
    +	return &s
    +}
    +
    +// FindByDatastorePath finds a virtual machine by its location on a datastore.
    +func (s SearchIndex) FindByDatastorePath(ctx context.Context, dc *Datacenter, path string) (Reference, error) {
    +	req := types.FindByDatastorePath{
    +		This:       s.Reference(),
    +		Datacenter: dc.Reference(),
    +		Path:       path,
    +	}
    +
    +	res, err := methods.FindByDatastorePath(ctx, s.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	if res.Returnval == nil {
    +		return nil, nil
    +	}
    +	return NewReference(s.c, *res.Returnval), nil
    +}
    +
    +// FindByDnsName finds a virtual machine or host by DNS name.
    +func (s SearchIndex) FindByDnsName(ctx context.Context, dc *Datacenter, dnsName string, vmSearch bool) (Reference, error) {
    +	req := types.FindByDnsName{
    +		This:     s.Reference(),
    +		DnsName:  dnsName,
    +		VmSearch: vmSearch,
    +	}
    +	if dc != nil {
    +		ref := dc.Reference()
    +		req.Datacenter = &ref
    +	}
    +
    +	res, err := methods.FindByDnsName(ctx, s.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	if res.Returnval == nil {
    +		return nil, nil
    +	}
    +	return NewReference(s.c, *res.Returnval), nil
    +}
    +
    +// FindByInventoryPath finds a managed entity based on its location in the inventory.
    +func (s SearchIndex) FindByInventoryPath(ctx context.Context, path string) (Reference, error) {
    +	req := types.FindByInventoryPath{
    +		This:          s.Reference(),
    +		InventoryPath: path,
    +	}
    +
    +	res, err := methods.FindByInventoryPath(ctx, s.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	if res.Returnval == nil {
    +		return nil, nil
    +	}
    +	return NewReference(s.c, *res.Returnval), nil
    +}
    +
    +// FindByIp finds a virtual machine or host by IP address.
    +func (s SearchIndex) FindByIp(ctx context.Context, dc *Datacenter, ip string, vmSearch bool) (Reference, error) {
    +	req := types.FindByIp{
    +		This:     s.Reference(),
    +		Ip:       ip,
    +		VmSearch: vmSearch,
    +	}
    +	if dc != nil {
    +		ref := dc.Reference()
    +		req.Datacenter = &ref
    +	}
    +
    +	res, err := methods.FindByIp(ctx, s.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	if res.Returnval == nil {
    +		return nil, nil
    +	}
    +	return NewReference(s.c, *res.Returnval), nil
    +}
    +
    +// FindByUuid finds a virtual machine or host by UUID.
    +func (s SearchIndex) FindByUuid(ctx context.Context, dc *Datacenter, uuid string, vmSearch bool, instanceUuid *bool) (Reference, error) {
    +	req := types.FindByUuid{
    +		This:         s.Reference(),
    +		Uuid:         uuid,
    +		VmSearch:     vmSearch,
    +		InstanceUuid: instanceUuid,
    +	}
    +	if dc != nil {
    +		ref := dc.Reference()
    +		req.Datacenter = &ref
    +	}
    +
    +	res, err := methods.FindByUuid(ctx, s.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	if res.Returnval == nil {
    +		return nil, nil
    +	}
    +	return NewReference(s.c, *res.Returnval), nil
    +}
    +
    +// FindChild finds a particular child based on a managed entity name.
    +func (s SearchIndex) FindChild(ctx context.Context, entity Reference, name string) (Reference, error) {
    +	req := types.FindChild{
    +		This:   s.Reference(),
    +		Entity: entity.Reference(),
    +		Name:   name,
    +	}
    +
    +	res, err := methods.FindChild(ctx, s.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	if res.Returnval == nil {
    +		return nil, nil
    +	}
    +	return NewReference(s.c, *res.Returnval), nil
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/storage_pod.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/storage_pod.go
    new file mode 100644
    index 000000000..188b91a00
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/storage_pod.go
    @@ -0,0 +1,34 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"github.com/vmware/govmomi/vim25"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +type StoragePod struct {
    +	*Folder
    +}
    +
    +func NewStoragePod(c *vim25.Client, ref types.ManagedObjectReference) *StoragePod {
    +	return &StoragePod{
    +		Folder: &Folder{
    +			Common: NewCommon(c, ref),
    +		},
    +	}
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/storage_resource_manager.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/storage_resource_manager.go
    new file mode 100644
    index 000000000..579bcd4d7
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/storage_resource_manager.go
    @@ -0,0 +1,179 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"context"
    +
    +	"github.com/vmware/govmomi/vim25"
    +	"github.com/vmware/govmomi/vim25/methods"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +type StorageResourceManager struct {
    +	Common
    +}
    +
    +func NewStorageResourceManager(c *vim25.Client) *StorageResourceManager {
    +	sr := StorageResourceManager{
    +		Common: NewCommon(c, *c.ServiceContent.StorageResourceManager),
    +	}
    +
    +	return &sr
    +}
    +
    +func (sr StorageResourceManager) ApplyStorageDrsRecommendation(ctx context.Context, key []string) (*Task, error) {
    +	req := types.ApplyStorageDrsRecommendation_Task{
    +		This: sr.Reference(),
    +		Key:  key,
    +	}
    +
    +	res, err := methods.ApplyStorageDrsRecommendation_Task(ctx, sr.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(sr.c, res.Returnval), nil
    +}
    +
    +func (sr StorageResourceManager) ApplyStorageDrsRecommendationToPod(ctx context.Context, pod *StoragePod, key string) (*Task, error) {
    +	req := types.ApplyStorageDrsRecommendationToPod_Task{
    +		This: sr.Reference(),
    +		Key:  key,
    +	}
    +
    +	if pod != nil {
    +		req.Pod = pod.Reference()
    +	}
    +
    +	res, err := methods.ApplyStorageDrsRecommendationToPod_Task(ctx, sr.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(sr.c, res.Returnval), nil
    +}
    +
    +func (sr StorageResourceManager) CancelStorageDrsRecommendation(ctx context.Context, key []string) error {
    +	req := types.CancelStorageDrsRecommendation{
    +		This: sr.Reference(),
    +		Key:  key,
    +	}
    +
    +	_, err := methods.CancelStorageDrsRecommendation(ctx, sr.c, &req)
    +
    +	return err
    +}
    +
    +func (sr StorageResourceManager) ConfigureDatastoreIORM(ctx context.Context, datastore *Datastore, spec types.StorageIORMConfigSpec, key string) (*Task, error) {
    +	req := types.ConfigureDatastoreIORM_Task{
    +		This: sr.Reference(),
    +		Spec: spec,
    +	}
    +
    +	if datastore != nil {
    +		req.Datastore = datastore.Reference()
    +	}
    +
    +	res, err := methods.ConfigureDatastoreIORM_Task(ctx, sr.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(sr.c, res.Returnval), nil
    +}
    +
    +func (sr StorageResourceManager) ConfigureStorageDrsForPod(ctx context.Context, pod *StoragePod, spec types.StorageDrsConfigSpec, modify bool) (*Task, error) {
    +	req := types.ConfigureStorageDrsForPod_Task{
    +		This:   sr.Reference(),
    +		Spec:   spec,
    +		Modify: modify,
    +	}
    +
    +	if pod != nil {
    +		req.Pod = pod.Reference()
    +	}
    +
    +	res, err := methods.ConfigureStorageDrsForPod_Task(ctx, sr.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(sr.c, res.Returnval), nil
    +}
    +
    +func (sr StorageResourceManager) QueryDatastorePerformanceSummary(ctx context.Context, datastore *Datastore) ([]types.StoragePerformanceSummary, error) {
    +	req := types.QueryDatastorePerformanceSummary{
    +		This: sr.Reference(),
    +	}
    +
    +	if datastore != nil {
    +		req.Datastore = datastore.Reference()
    +	}
    +
    +	res, err := methods.QueryDatastorePerformanceSummary(ctx, sr.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return res.Returnval, nil
    +}
    +
    +func (sr StorageResourceManager) QueryIORMConfigOption(ctx context.Context, host *HostSystem) (*types.StorageIORMConfigOption, error) {
    +	req := types.QueryIORMConfigOption{
    +		This: sr.Reference(),
    +	}
    +
    +	if host != nil {
    +		req.Host = host.Reference()
    +	}
    +
    +	res, err := methods.QueryIORMConfigOption(ctx, sr.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return &res.Returnval, nil
    +}
    +
    +func (sr StorageResourceManager) RecommendDatastores(ctx context.Context, storageSpec types.StoragePlacementSpec) (*types.StoragePlacementResult, error) {
    +	req := types.RecommendDatastores{
    +		This:        sr.Reference(),
    +		StorageSpec: storageSpec,
    +	}
    +
    +	res, err := methods.RecommendDatastores(ctx, sr.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return &res.Returnval, nil
    +}
    +
    +func (sr StorageResourceManager) RefreshStorageDrsRecommendation(ctx context.Context, pod *StoragePod) error {
    +	req := types.RefreshStorageDrsRecommendation{
    +		This: sr.Reference(),
    +	}
    +
    +	if pod != nil {
    +		req.Pod = pod.Reference()
    +	}
    +
    +	_, err := methods.RefreshStorageDrsRecommendation(ctx, sr.c, &req)
    +
    +	return err
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/task.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/task.go
    new file mode 100644
    index 000000000..2b66aa93b
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/task.go
    @@ -0,0 +1,62 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"context"
    +
    +	"github.com/vmware/govmomi/property"
    +	"github.com/vmware/govmomi/task"
    +	"github.com/vmware/govmomi/vim25"
    +	"github.com/vmware/govmomi/vim25/methods"
    +	"github.com/vmware/govmomi/vim25/progress"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +// Task is a convenience wrapper around task.Task that keeps a reference to
    +// the client that was used to create it. This allows users to call the Wait()
    +// function with only a context parameter, instead of a context parameter, a
    +// soap.RoundTripper, and reference to the root property collector.
    +type Task struct {
    +	Common
    +}
    +
    +func NewTask(c *vim25.Client, ref types.ManagedObjectReference) *Task {
    +	t := Task{
    +		Common: NewCommon(c, ref),
    +	}
    +
    +	return &t
    +}
    +
    +func (t *Task) Wait(ctx context.Context) error {
    +	_, err := t.WaitForResult(ctx, nil)
    +	return err
    +}
    +
    +func (t *Task) WaitForResult(ctx context.Context, s progress.Sinker) (*types.TaskInfo, error) {
    +	p := property.DefaultCollector(t.c)
    +	return task.Wait(ctx, t.Reference(), p, s)
    +}
    +
    +func (t *Task) Cancel(ctx context.Context) error {
    +	_, err := methods.CancelTask(ctx, t.Client(), &types.CancelTask{
    +		This: t.Reference(),
    +	})
    +
    +	return err
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/types.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/types.go
    new file mode 100644
    index 000000000..4eb8d1b8b
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/types.go
    @@ -0,0 +1,67 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"github.com/vmware/govmomi/vim25"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +type Reference interface {
    +	Reference() types.ManagedObjectReference
    +}
    +
    +func NewReference(c *vim25.Client, e types.ManagedObjectReference) Reference {
    +	switch e.Type {
    +	case "Folder":
    +		return NewFolder(c, e)
    +	case "StoragePod":
    +		return &StoragePod{
    +			NewFolder(c, e),
    +		}
    +	case "Datacenter":
    +		return NewDatacenter(c, e)
    +	case "VirtualMachine":
    +		return NewVirtualMachine(c, e)
    +	case "VirtualApp":
    +		return &VirtualApp{
    +			NewResourcePool(c, e),
    +		}
    +	case "ComputeResource":
    +		return NewComputeResource(c, e)
    +	case "ClusterComputeResource":
    +		return NewClusterComputeResource(c, e)
    +	case "HostSystem":
    +		return NewHostSystem(c, e)
    +	case "Network":
    +		return NewNetwork(c, e)
    +	case "OpaqueNetwork":
    +		return NewOpaqueNetwork(c, e)
    +	case "ResourcePool":
    +		return NewResourcePool(c, e)
    +	case "DistributedVirtualSwitch":
    +		return NewDistributedVirtualSwitch(c, e)
    +	case "VmwareDistributedVirtualSwitch":
    +		return &VmwareDistributedVirtualSwitch{*NewDistributedVirtualSwitch(c, e)}
    +	case "DistributedVirtualPortgroup":
    +		return NewDistributedVirtualPortgroup(c, e)
    +	case "Datastore":
    +		return NewDatastore(c, e)
    +	default:
    +		panic("Unknown managed entity: " + e.Type)
    +	}
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/virtual_app.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/virtual_app.go
    new file mode 100644
    index 000000000..4811178f1
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/virtual_app.go
    @@ -0,0 +1,105 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"context"
    +
    +	"github.com/vmware/govmomi/vim25"
    +	"github.com/vmware/govmomi/vim25/methods"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +type VirtualApp struct {
    +	*ResourcePool
    +}
    +
    +func NewVirtualApp(c *vim25.Client, ref types.ManagedObjectReference) *VirtualApp {
    +	return &VirtualApp{
    +		ResourcePool: NewResourcePool(c, ref),
    +	}
    +}
    +
    +func (p VirtualApp) CreateChildVM(ctx context.Context, config types.VirtualMachineConfigSpec, host *HostSystem) (*Task, error) {
    +	req := types.CreateChildVM_Task{
    +		This:   p.Reference(),
    +		Config: config,
    +	}
    +
    +	if host != nil {
    +		ref := host.Reference()
    +		req.Host = &ref
    +	}
    +
    +	res, err := methods.CreateChildVM_Task(ctx, p.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(p.c, res.Returnval), nil
    +}
    +
    +func (p VirtualApp) UpdateConfig(ctx context.Context, spec types.VAppConfigSpec) error {
    +	req := types.UpdateVAppConfig{
    +		This: p.Reference(),
    +		Spec: spec,
    +	}
    +
    +	_, err := methods.UpdateVAppConfig(ctx, p.c, &req)
    +	return err
    +}
    +
    +func (p VirtualApp) PowerOn(ctx context.Context) (*Task, error) {
    +	req := types.PowerOnVApp_Task{
    +		This: p.Reference(),
    +	}
    +
    +	res, err := methods.PowerOnVApp_Task(ctx, p.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(p.c, res.Returnval), nil
    +}
    +
    +func (p VirtualApp) PowerOff(ctx context.Context, force bool) (*Task, error) {
    +	req := types.PowerOffVApp_Task{
    +		This:  p.Reference(),
    +		Force: force,
    +	}
    +
    +	res, err := methods.PowerOffVApp_Task(ctx, p.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(p.c, res.Returnval), nil
    +
    +}
    +
    +func (p VirtualApp) Suspend(ctx context.Context) (*Task, error) {
    +	req := types.SuspendVApp_Task{
    +		This: p.Reference(),
    +	}
    +
    +	res, err := methods.SuspendVApp_Task(ctx, p.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(p.c, res.Returnval), nil
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/virtual_device_list.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/virtual_device_list.go
    new file mode 100644
    index 000000000..e1c35eff8
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/virtual_device_list.go
    @@ -0,0 +1,935 @@
    +/*
    +Copyright (c) 2015-2017 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"errors"
    +	"fmt"
    +	"path/filepath"
    +	"reflect"
    +	"regexp"
    +	"sort"
    +	"strings"
    +
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +// Type values for use in BootOrder
    +const (
    +	DeviceTypeNone     = "-"
    +	DeviceTypeCdrom    = "cdrom"
    +	DeviceTypeDisk     = "disk"
    +	DeviceTypeEthernet = "ethernet"
    +	DeviceTypeFloppy   = "floppy"
    +)
    +
    +// VirtualDeviceList provides helper methods for working with a list of virtual devices.
    +type VirtualDeviceList []types.BaseVirtualDevice
    +
    +// SCSIControllerTypes are used for adding a new SCSI controller to a VM.
    +func SCSIControllerTypes() VirtualDeviceList {
    +	// Return a mutable list of SCSI controller types, initialized with defaults.
    +	return VirtualDeviceList([]types.BaseVirtualDevice{
    +		&types.VirtualLsiLogicController{},
    +		&types.VirtualBusLogicController{},
    +		&types.ParaVirtualSCSIController{},
    +		&types.VirtualLsiLogicSASController{},
    +	}).Select(func(device types.BaseVirtualDevice) bool {
    +		c := device.(types.BaseVirtualSCSIController).GetVirtualSCSIController()
    +		c.SharedBus = types.VirtualSCSISharingNoSharing
    +		c.BusNumber = -1
    +		return true
    +	})
    +}
    +
    +// EthernetCardTypes are used for adding a new ethernet card to a VM.
    +func EthernetCardTypes() VirtualDeviceList {
    +	return VirtualDeviceList([]types.BaseVirtualDevice{
    +		&types.VirtualE1000{},
    +		&types.VirtualE1000e{},
    +		&types.VirtualVmxnet2{},
    +		&types.VirtualVmxnet3{},
    +		&types.VirtualPCNet32{},
    +		&types.VirtualSriovEthernetCard{},
    +	}).Select(func(device types.BaseVirtualDevice) bool {
    +		c := device.(types.BaseVirtualEthernetCard).GetVirtualEthernetCard()
    +		c.GetVirtualDevice().Key = -1
    +		return true
    +	})
    +}
    +
    +// Select returns a new list containing all elements of the list for which the given func returns true.
    +func (l VirtualDeviceList) Select(f func(device types.BaseVirtualDevice) bool) VirtualDeviceList {
    +	var found VirtualDeviceList
    +
    +	for _, device := range l {
    +		if f(device) {
    +			found = append(found, device)
    +		}
    +	}
    +
    +	return found
    +}
    +
    +// SelectByType returns a new list with devices that are equal to or extend the given type.
    +func (l VirtualDeviceList) SelectByType(deviceType types.BaseVirtualDevice) VirtualDeviceList {
    +	dtype := reflect.TypeOf(deviceType)
    +	if dtype == nil {
    +		return nil
    +	}
    +	dname := dtype.Elem().Name()
    +
    +	return l.Select(func(device types.BaseVirtualDevice) bool {
    +		t := reflect.TypeOf(device)
    +
    +		if t == dtype {
    +			return true
    +		}
    +
    +		_, ok := t.Elem().FieldByName(dname)
    +
    +		return ok
    +	})
    +}
    +
    +// SelectByBackingInfo returns a new list with devices matching the given backing info.
    +// If the value of backing is nil, any device with a backing of the same type will be returned.
    +func (l VirtualDeviceList) SelectByBackingInfo(backing types.BaseVirtualDeviceBackingInfo) VirtualDeviceList {
    +	t := reflect.TypeOf(backing)
    +
    +	return l.Select(func(device types.BaseVirtualDevice) bool {
    +		db := device.GetVirtualDevice().Backing
    +		if db == nil {
    +			return false
    +		}
    +
    +		if reflect.TypeOf(db) != t {
    +			return false
    +		}
    +
    +		if reflect.ValueOf(backing).IsNil() {
    +			// selecting by backing type
    +			return true
    +		}
    +
    +		switch a := db.(type) {
    +		case *types.VirtualEthernetCardNetworkBackingInfo:
    +			b := backing.(*types.VirtualEthernetCardNetworkBackingInfo)
    +			return a.DeviceName == b.DeviceName
    +		case *types.VirtualEthernetCardDistributedVirtualPortBackingInfo:
    +			b := backing.(*types.VirtualEthernetCardDistributedVirtualPortBackingInfo)
    +			return a.Port.SwitchUuid == b.Port.SwitchUuid &&
    +				a.Port.PortgroupKey == b.Port.PortgroupKey
    +		case *types.VirtualDiskFlatVer2BackingInfo:
    +			b := backing.(*types.VirtualDiskFlatVer2BackingInfo)
    +			if a.Parent != nil && b.Parent != nil {
    +				return a.Parent.FileName == b.Parent.FileName
    +			}
    +			return a.FileName == b.FileName
    +		case *types.VirtualSerialPortURIBackingInfo:
    +			b := backing.(*types.VirtualSerialPortURIBackingInfo)
    +			return a.ServiceURI == b.ServiceURI
    +		case types.BaseVirtualDeviceFileBackingInfo:
    +			b := backing.(types.BaseVirtualDeviceFileBackingInfo)
    +			return a.GetVirtualDeviceFileBackingInfo().FileName == b.GetVirtualDeviceFileBackingInfo().FileName
    +		default:
    +			return false
    +		}
    +	})
    +}
    +
    +// Find returns the device matching the given name.
    +func (l VirtualDeviceList) Find(name string) types.BaseVirtualDevice {
    +	for _, device := range l {
    +		if l.Name(device) == name {
    +			return device
    +		}
    +	}
    +	return nil
    +}
    +
    +// FindByKey returns the device matching the given key.
    +func (l VirtualDeviceList) FindByKey(key int32) types.BaseVirtualDevice {
    +	for _, device := range l {
    +		if device.GetVirtualDevice().Key == key {
    +			return device
    +		}
    +	}
    +	return nil
    +}
    +
    +// FindIDEController will find the named IDE controller if given, otherwise will pick an available controller.
    +// An error is returned if the named controller is not found or not an IDE controller.  Or, if name is not
    +// given and no available controller can be found.
    +func (l VirtualDeviceList) FindIDEController(name string) (*types.VirtualIDEController, error) {
    +	if name != "" {
    +		d := l.Find(name)
    +		if d == nil {
    +			return nil, fmt.Errorf("device '%s' not found", name)
    +		}
    +		if c, ok := d.(*types.VirtualIDEController); ok {
    +			return c, nil
    +		}
    +		return nil, fmt.Errorf("%s is not an IDE controller", name)
    +	}
    +
    +	c := l.PickController((*types.VirtualIDEController)(nil))
    +	if c == nil {
    +		return nil, errors.New("no available IDE controller")
    +	}
    +
    +	return c.(*types.VirtualIDEController), nil
    +}
    +
    +// CreateIDEController creates a new IDE controller.
    +func (l VirtualDeviceList) CreateIDEController() (types.BaseVirtualDevice, error) {
    +	ide := &types.VirtualIDEController{}
    +	ide.Key = l.NewKey()
    +	return ide, nil
    +}
    +
    +// FindSCSIController will find the named SCSI controller if given, otherwise will pick an available controller.
    +// An error is returned if the named controller is not found or not an SCSI controller.  Or, if name is not
    +// given and no available controller can be found.
    +func (l VirtualDeviceList) FindSCSIController(name string) (*types.VirtualSCSIController, error) {
    +	if name != "" {
    +		d := l.Find(name)
    +		if d == nil {
    +			return nil, fmt.Errorf("device '%s' not found", name)
    +		}
    +		if c, ok := d.(types.BaseVirtualSCSIController); ok {
    +			return c.GetVirtualSCSIController(), nil
    +		}
    +		return nil, fmt.Errorf("%s is not an SCSI controller", name)
    +	}
    +
    +	c := l.PickController((*types.VirtualSCSIController)(nil))
    +	if c == nil {
    +		return nil, errors.New("no available SCSI controller")
    +	}
    +
    +	return c.(types.BaseVirtualSCSIController).GetVirtualSCSIController(), nil
    +}
    +
    +// CreateSCSIController creates a new SCSI controller of type name if given, otherwise defaults to lsilogic.
    +func (l VirtualDeviceList) CreateSCSIController(name string) (types.BaseVirtualDevice, error) {
    +	ctypes := SCSIControllerTypes()
    +
    +	if name == "scsi" || name == "" {
    +		name = ctypes.Type(ctypes[0])
    +	}
    +
    +	found := ctypes.Select(func(device types.BaseVirtualDevice) bool {
    +		return l.Type(device) == name
    +	})
    +
    +	if len(found) == 0 {
    +		return nil, fmt.Errorf("unknown SCSI controller type '%s'", name)
    +	}
    +
    +	c, ok := found[0].(types.BaseVirtualSCSIController)
    +	if !ok {
    +		return nil, fmt.Errorf("invalid SCSI controller type '%s'", name)
    +	}
    +
    +	scsi := c.GetVirtualSCSIController()
    +	scsi.BusNumber = l.newSCSIBusNumber()
    +	scsi.Key = l.NewKey()
    +	scsi.ScsiCtlrUnitNumber = 7
    +	return c.(types.BaseVirtualDevice), nil
    +}
    +
    +var scsiBusNumbers = []int{0, 1, 2, 3}
    +
    +// newSCSIBusNumber returns the bus number to use for adding a new SCSI bus device.
    +// -1 is returned if there are no bus numbers available.
    +func (l VirtualDeviceList) newSCSIBusNumber() int32 {
    +	var used []int
    +
    +	for _, d := range l.SelectByType((*types.VirtualSCSIController)(nil)) {
    +		num := d.(types.BaseVirtualSCSIController).GetVirtualSCSIController().BusNumber
    +		if num >= 0 {
    +			used = append(used, int(num))
    +		} // else caller is creating a new vm using SCSIControllerTypes
    +	}
    +
    +	sort.Ints(used)
    +
    +	for i, n := range scsiBusNumbers {
    +		if i == len(used) || n != used[i] {
    +			return int32(n)
    +		}
    +	}
    +
    +	return -1
    +}
    +
    +// FindNVMEController will find the named NVME controller if given, otherwise will pick an available controller.
    +// An error is returned if the named controller is not found or not an NVME controller.  Or, if name is not
    +// given and no available controller can be found.
    +func (l VirtualDeviceList) FindNVMEController(name string) (*types.VirtualNVMEController, error) {
    +	if name != "" {
    +		d := l.Find(name)
    +		if d == nil {
    +			return nil, fmt.Errorf("device '%s' not found", name)
    +		}
    +		if c, ok := d.(*types.VirtualNVMEController); ok {
    +			return c, nil
    +		}
    +		return nil, fmt.Errorf("%s is not an NVME controller", name)
    +	}
    +
    +	c := l.PickController((*types.VirtualNVMEController)(nil))
    +	if c == nil {
    +		return nil, errors.New("no available NVME controller")
    +	}
    +
    +	return c.(*types.VirtualNVMEController), nil
    +}
    +
    +// CreateNVMEController creates a new NVMWE controller.
    +func (l VirtualDeviceList) CreateNVMEController() (types.BaseVirtualDevice, error) {
    +	nvme := &types.VirtualNVMEController{}
    +	nvme.BusNumber = l.newNVMEBusNumber()
    +	nvme.Key = l.NewKey()
    +
    +	return nvme, nil
    +}
    +
    +var nvmeBusNumbers = []int{0, 1, 2, 3}
    +
    +// newNVMEBusNumber returns the bus number to use for adding a new NVME bus device.
    +// -1 is returned if there are no bus numbers available.
    +func (l VirtualDeviceList) newNVMEBusNumber() int32 {
    +	var used []int
    +
    +	for _, d := range l.SelectByType((*types.VirtualNVMEController)(nil)) {
    +		num := d.(types.BaseVirtualController).GetVirtualController().BusNumber
    +		if num >= 0 {
    +			used = append(used, int(num))
    +		} // else caller is creating a new vm using NVMEControllerTypes
    +	}
    +
    +	sort.Ints(used)
    +
    +	for i, n := range nvmeBusNumbers {
    +		if i == len(used) || n != used[i] {
    +			return int32(n)
    +		}
    +	}
    +
    +	return -1
    +}
    +
    +// FindDiskController will find an existing ide or scsi disk controller.
    +func (l VirtualDeviceList) FindDiskController(name string) (types.BaseVirtualController, error) {
    +	switch {
    +	case name == "ide":
    +		return l.FindIDEController("")
    +	case name == "scsi" || name == "":
    +		return l.FindSCSIController("")
    +	case name == "nvme":
    +		return l.FindNVMEController("")
    +	default:
    +		if c, ok := l.Find(name).(types.BaseVirtualController); ok {
    +			return c, nil
    +		}
    +		return nil, fmt.Errorf("%s is not a valid controller", name)
    +	}
    +}
    +
    +// PickController returns a controller of the given type(s).
    +// If no controllers are found or have no available slots, then nil is returned.
    +func (l VirtualDeviceList) PickController(kind types.BaseVirtualController) types.BaseVirtualController {
    +	l = l.SelectByType(kind.(types.BaseVirtualDevice)).Select(func(device types.BaseVirtualDevice) bool {
    +		num := len(device.(types.BaseVirtualController).GetVirtualController().Device)
    +
    +		switch device.(type) {
    +		case types.BaseVirtualSCSIController:
    +			return num < 15
    +		case *types.VirtualIDEController:
    +			return num < 2
    +		case *types.VirtualNVMEController:
    +			return num < 8
    +		default:
    +			return true
    +		}
    +	})
    +
    +	if len(l) == 0 {
    +		return nil
    +	}
    +
    +	return l[0].(types.BaseVirtualController)
    +}
    +
    +// newUnitNumber returns the unit number to use for attaching a new device to the given controller.
    +func (l VirtualDeviceList) newUnitNumber(c types.BaseVirtualController) int32 {
    +	units := make([]bool, 30)
    +
    +	switch sc := c.(type) {
    +	case types.BaseVirtualSCSIController:
    +		//  The SCSI controller sits on its own bus
    +		units[sc.GetVirtualSCSIController().ScsiCtlrUnitNumber] = true
    +	}
    +
    +	key := c.GetVirtualController().Key
    +
    +	for _, device := range l {
    +		d := device.GetVirtualDevice()
    +
    +		if d.ControllerKey == key && d.UnitNumber != nil {
    +			units[int(*d.UnitNumber)] = true
    +		}
    +	}
    +
    +	for unit, used := range units {
    +		if !used {
    +			return int32(unit)
    +		}
    +	}
    +
    +	return -1
    +}
    +
    +// NewKey returns the key to use for adding a new device to the device list.
    +// The device list we're working with here may not be complete (e.g. when
    +// we're only adding new devices), so any positive keys could conflict with device keys
    +// that are already in use. To avoid this type of conflict, we can use negative keys
    +// here, which will be resolved to positive keys by vSphere as the reconfiguration is done.
    +func (l VirtualDeviceList) NewKey() int32 {
    +	var key int32 = -200
    +
    +	for _, device := range l {
    +		d := device.GetVirtualDevice()
    +		if d.Key < key {
    +			key = d.Key
    +		}
    +	}
    +
    +	return key - 1
    +}
    +
    +// AssignController assigns a device to a controller.
    +func (l VirtualDeviceList) AssignController(device types.BaseVirtualDevice, c types.BaseVirtualController) {
    +	d := device.GetVirtualDevice()
    +	d.ControllerKey = c.GetVirtualController().Key
    +	d.UnitNumber = new(int32)
    +	*d.UnitNumber = l.newUnitNumber(c)
    +	if d.Key == 0 {
    +		d.Key = -1
    +	}
    +}
    +
    +// CreateDisk creates a new VirtualDisk device which can be added to a VM.
    +func (l VirtualDeviceList) CreateDisk(c types.BaseVirtualController, ds types.ManagedObjectReference, name string) *types.VirtualDisk {
    +	// If name is not specified, one will be chosen for you.
    +	// But if when given, make sure it ends in .vmdk, otherwise it will be treated as a directory.
    +	if len(name) > 0 && filepath.Ext(name) != ".vmdk" {
    +		name += ".vmdk"
    +	}
    +
    +	device := &types.VirtualDisk{
    +		VirtualDevice: types.VirtualDevice{
    +			Backing: &types.VirtualDiskFlatVer2BackingInfo{
    +				DiskMode:        string(types.VirtualDiskModePersistent),
    +				ThinProvisioned: types.NewBool(true),
    +				VirtualDeviceFileBackingInfo: types.VirtualDeviceFileBackingInfo{
    +					FileName:  name,
    +					Datastore: &ds,
    +				},
    +			},
    +		},
    +	}
    +
    +	l.AssignController(device, c)
    +	return device
    +}
    +
    +// ChildDisk creates a new VirtualDisk device, linked to the given parent disk, which can be added to a VM.
    +func (l VirtualDeviceList) ChildDisk(parent *types.VirtualDisk) *types.VirtualDisk {
    +	disk := *parent
    +	backing := disk.Backing.(*types.VirtualDiskFlatVer2BackingInfo)
    +	p := new(DatastorePath)
    +	p.FromString(backing.FileName)
    +	p.Path = ""
    +
    +	// Use specified disk as parent backing to a new disk.
    +	disk.Backing = &types.VirtualDiskFlatVer2BackingInfo{
    +		VirtualDeviceFileBackingInfo: types.VirtualDeviceFileBackingInfo{
    +			FileName:  p.String(),
    +			Datastore: backing.Datastore,
    +		},
    +		Parent:          backing,
    +		DiskMode:        backing.DiskMode,
    +		ThinProvisioned: backing.ThinProvisioned,
    +	}
    +
    +	return &disk
    +}
    +
    +func (l VirtualDeviceList) connectivity(device types.BaseVirtualDevice, v bool) error {
    +	c := device.GetVirtualDevice().Connectable
    +	if c == nil {
    +		return fmt.Errorf("%s is not connectable", l.Name(device))
    +	}
    +
    +	c.Connected = v
    +	c.StartConnected = v
    +
    +	return nil
    +}
    +
    +// Connect changes the device to connected, returns an error if the device is not connectable.
    +func (l VirtualDeviceList) Connect(device types.BaseVirtualDevice) error {
    +	return l.connectivity(device, true)
    +}
    +
    +// Disconnect changes the device to disconnected, returns an error if the device is not connectable.
    +func (l VirtualDeviceList) Disconnect(device types.BaseVirtualDevice) error {
    +	return l.connectivity(device, false)
    +}
    +
    +// FindCdrom finds a cdrom device with the given name, defaulting to the first cdrom device if any.
    +func (l VirtualDeviceList) FindCdrom(name string) (*types.VirtualCdrom, error) {
    +	if name != "" {
    +		d := l.Find(name)
    +		if d == nil {
    +			return nil, fmt.Errorf("device '%s' not found", name)
    +		}
    +		if c, ok := d.(*types.VirtualCdrom); ok {
    +			return c, nil
    +		}
    +		return nil, fmt.Errorf("%s is not a cdrom device", name)
    +	}
    +
    +	c := l.SelectByType((*types.VirtualCdrom)(nil))
    +	if len(c) == 0 {
    +		return nil, errors.New("no cdrom device found")
    +	}
    +
    +	return c[0].(*types.VirtualCdrom), nil
    +}
    +
    +// CreateCdrom creates a new VirtualCdrom device which can be added to a VM.
    +func (l VirtualDeviceList) CreateCdrom(c *types.VirtualIDEController) (*types.VirtualCdrom, error) {
    +	device := &types.VirtualCdrom{}
    +
    +	l.AssignController(device, c)
    +
    +	l.setDefaultCdromBacking(device)
    +
    +	device.Connectable = &types.VirtualDeviceConnectInfo{
    +		AllowGuestControl: true,
    +		Connected:         true,
    +		StartConnected:    true,
    +	}
    +
    +	return device, nil
    +}
    +
    +// InsertIso changes the cdrom device backing to use the given iso file.
    +func (l VirtualDeviceList) InsertIso(device *types.VirtualCdrom, iso string) *types.VirtualCdrom {
    +	device.Backing = &types.VirtualCdromIsoBackingInfo{
    +		VirtualDeviceFileBackingInfo: types.VirtualDeviceFileBackingInfo{
    +			FileName: iso,
    +		},
    +	}
    +
    +	return device
    +}
    +
    +// EjectIso removes the iso file based backing and replaces with the default cdrom backing.
    +func (l VirtualDeviceList) EjectIso(device *types.VirtualCdrom) *types.VirtualCdrom {
    +	l.setDefaultCdromBacking(device)
    +	return device
    +}
    +
    +func (l VirtualDeviceList) setDefaultCdromBacking(device *types.VirtualCdrom) {
    +	device.Backing = &types.VirtualCdromAtapiBackingInfo{
    +		VirtualDeviceDeviceBackingInfo: types.VirtualDeviceDeviceBackingInfo{
    +			DeviceName:    fmt.Sprintf("%s-%d-%d", DeviceTypeCdrom, device.ControllerKey, device.UnitNumber),
    +			UseAutoDetect: types.NewBool(false),
    +		},
    +	}
    +}
    +
    +// FindFloppy finds a floppy device with the given name, defaulting to the first floppy device if any.
    +func (l VirtualDeviceList) FindFloppy(name string) (*types.VirtualFloppy, error) {
    +	if name != "" {
    +		d := l.Find(name)
    +		if d == nil {
    +			return nil, fmt.Errorf("device '%s' not found", name)
    +		}
    +		if c, ok := d.(*types.VirtualFloppy); ok {
    +			return c, nil
    +		}
    +		return nil, fmt.Errorf("%s is not a floppy device", name)
    +	}
    +
    +	c := l.SelectByType((*types.VirtualFloppy)(nil))
    +	if len(c) == 0 {
    +		return nil, errors.New("no floppy device found")
    +	}
    +
    +	return c[0].(*types.VirtualFloppy), nil
    +}
    +
    +// CreateFloppy creates a new VirtualFloppy device which can be added to a VM.
    +func (l VirtualDeviceList) CreateFloppy() (*types.VirtualFloppy, error) {
    +	device := &types.VirtualFloppy{}
    +
    +	c := l.PickController((*types.VirtualSIOController)(nil))
    +	if c == nil {
    +		return nil, errors.New("no available SIO controller")
    +	}
    +
    +	l.AssignController(device, c)
    +
    +	l.setDefaultFloppyBacking(device)
    +
    +	device.Connectable = &types.VirtualDeviceConnectInfo{
    +		AllowGuestControl: true,
    +		Connected:         true,
    +		StartConnected:    true,
    +	}
    +
    +	return device, nil
    +}
    +
    +// InsertImg changes the floppy device backing to use the given img file.
    +func (l VirtualDeviceList) InsertImg(device *types.VirtualFloppy, img string) *types.VirtualFloppy {
    +	device.Backing = &types.VirtualFloppyImageBackingInfo{
    +		VirtualDeviceFileBackingInfo: types.VirtualDeviceFileBackingInfo{
    +			FileName: img,
    +		},
    +	}
    +
    +	return device
    +}
    +
    +// EjectImg removes the img file based backing and replaces with the default floppy backing.
    +func (l VirtualDeviceList) EjectImg(device *types.VirtualFloppy) *types.VirtualFloppy {
    +	l.setDefaultFloppyBacking(device)
    +	return device
    +}
    +
    +func (l VirtualDeviceList) setDefaultFloppyBacking(device *types.VirtualFloppy) {
    +	device.Backing = &types.VirtualFloppyDeviceBackingInfo{
    +		VirtualDeviceDeviceBackingInfo: types.VirtualDeviceDeviceBackingInfo{
    +			DeviceName:    fmt.Sprintf("%s-%d", DeviceTypeFloppy, device.UnitNumber),
    +			UseAutoDetect: types.NewBool(false),
    +		},
    +	}
    +}
    +
    +// FindSerialPort finds a serial port device with the given name, defaulting to the first serial port device if any.
    +func (l VirtualDeviceList) FindSerialPort(name string) (*types.VirtualSerialPort, error) {
    +	if name != "" {
    +		d := l.Find(name)
    +		if d == nil {
    +			return nil, fmt.Errorf("device '%s' not found", name)
    +		}
    +		if c, ok := d.(*types.VirtualSerialPort); ok {
    +			return c, nil
    +		}
    +		return nil, fmt.Errorf("%s is not a serial port device", name)
    +	}
    +
    +	c := l.SelectByType((*types.VirtualSerialPort)(nil))
    +	if len(c) == 0 {
    +		return nil, errors.New("no serial port device found")
    +	}
    +
    +	return c[0].(*types.VirtualSerialPort), nil
    +}
    +
    +// CreateSerialPort creates a new VirtualSerialPort device which can be added to a VM.
    +func (l VirtualDeviceList) CreateSerialPort() (*types.VirtualSerialPort, error) {
    +	device := &types.VirtualSerialPort{
    +		YieldOnPoll: true,
    +	}
    +
    +	c := l.PickController((*types.VirtualSIOController)(nil))
    +	if c == nil {
    +		return nil, errors.New("no available SIO controller")
    +	}
    +
    +	l.AssignController(device, c)
    +
    +	l.setDefaultSerialPortBacking(device)
    +
    +	return device, nil
    +}
    +
    +// ConnectSerialPort connects a serial port to a server or client uri.
    +func (l VirtualDeviceList) ConnectSerialPort(device *types.VirtualSerialPort, uri string, client bool, proxyuri string) *types.VirtualSerialPort {
    +	if strings.HasPrefix(uri, "[") {
    +		device.Backing = &types.VirtualSerialPortFileBackingInfo{
    +			VirtualDeviceFileBackingInfo: types.VirtualDeviceFileBackingInfo{
    +				FileName: uri,
    +			},
    +		}
    +
    +		return device
    +	}
    +
    +	direction := types.VirtualDeviceURIBackingOptionDirectionServer
    +	if client {
    +		direction = types.VirtualDeviceURIBackingOptionDirectionClient
    +	}
    +
    +	device.Backing = &types.VirtualSerialPortURIBackingInfo{
    +		VirtualDeviceURIBackingInfo: types.VirtualDeviceURIBackingInfo{
    +			Direction:  string(direction),
    +			ServiceURI: uri,
    +			ProxyURI:   proxyuri,
    +		},
    +	}
    +
    +	return device
    +}
    +
    +// DisconnectSerialPort disconnects the serial port backing.
    +func (l VirtualDeviceList) DisconnectSerialPort(device *types.VirtualSerialPort) *types.VirtualSerialPort {
    +	l.setDefaultSerialPortBacking(device)
    +	return device
    +}
    +
    +func (l VirtualDeviceList) setDefaultSerialPortBacking(device *types.VirtualSerialPort) {
    +	device.Backing = &types.VirtualSerialPortURIBackingInfo{
    +		VirtualDeviceURIBackingInfo: types.VirtualDeviceURIBackingInfo{
    +			Direction:  "client",
    +			ServiceURI: "localhost:0",
    +		},
    +	}
    +}
    +
    +// CreateEthernetCard creates a new VirtualEthernetCard of the given name name and initialized with the given backing.
    +func (l VirtualDeviceList) CreateEthernetCard(name string, backing types.BaseVirtualDeviceBackingInfo) (types.BaseVirtualDevice, error) {
    +	ctypes := EthernetCardTypes()
    +
    +	if name == "" {
    +		name = ctypes.deviceName(ctypes[0])
    +	}
    +
    +	found := ctypes.Select(func(device types.BaseVirtualDevice) bool {
    +		return l.deviceName(device) == name
    +	})
    +
    +	if len(found) == 0 {
    +		return nil, fmt.Errorf("unknown ethernet card type '%s'", name)
    +	}
    +
    +	c, ok := found[0].(types.BaseVirtualEthernetCard)
    +	if !ok {
    +		return nil, fmt.Errorf("invalid ethernet card type '%s'", name)
    +	}
    +
    +	c.GetVirtualEthernetCard().Backing = backing
    +
    +	return c.(types.BaseVirtualDevice), nil
    +}
    +
    +// PrimaryMacAddress returns the MacAddress field of the primary VirtualEthernetCard
    +func (l VirtualDeviceList) PrimaryMacAddress() string {
    +	eth0 := l.Find("ethernet-0")
    +
    +	if eth0 == nil {
    +		return ""
    +	}
    +
    +	return eth0.(types.BaseVirtualEthernetCard).GetVirtualEthernetCard().MacAddress
    +}
    +
    +// convert a BaseVirtualDevice to a BaseVirtualMachineBootOptionsBootableDevice
    +var bootableDevices = map[string]func(device types.BaseVirtualDevice) types.BaseVirtualMachineBootOptionsBootableDevice{
    +	DeviceTypeNone: func(types.BaseVirtualDevice) types.BaseVirtualMachineBootOptionsBootableDevice {
    +		return &types.VirtualMachineBootOptionsBootableDevice{}
    +	},
    +	DeviceTypeCdrom: func(types.BaseVirtualDevice) types.BaseVirtualMachineBootOptionsBootableDevice {
    +		return &types.VirtualMachineBootOptionsBootableCdromDevice{}
    +	},
    +	DeviceTypeDisk: func(d types.BaseVirtualDevice) types.BaseVirtualMachineBootOptionsBootableDevice {
    +		return &types.VirtualMachineBootOptionsBootableDiskDevice{
    +			DeviceKey: d.GetVirtualDevice().Key,
    +		}
    +	},
    +	DeviceTypeEthernet: func(d types.BaseVirtualDevice) types.BaseVirtualMachineBootOptionsBootableDevice {
    +		return &types.VirtualMachineBootOptionsBootableEthernetDevice{
    +			DeviceKey: d.GetVirtualDevice().Key,
    +		}
    +	},
    +	DeviceTypeFloppy: func(types.BaseVirtualDevice) types.BaseVirtualMachineBootOptionsBootableDevice {
    +		return &types.VirtualMachineBootOptionsBootableFloppyDevice{}
    +	},
    +}
    +
    +// BootOrder returns a list of devices which can be used to set boot order via VirtualMachine.SetBootOptions.
    +// The order can be any of "ethernet", "cdrom", "floppy" or "disk" or by specific device name.
    +// A value of "-" will clear the existing boot order on the VC/ESX side.
    +func (l VirtualDeviceList) BootOrder(order []string) []types.BaseVirtualMachineBootOptionsBootableDevice {
    +	var devices []types.BaseVirtualMachineBootOptionsBootableDevice
    +
    +	for _, name := range order {
    +		if kind, ok := bootableDevices[name]; ok {
    +			if name == DeviceTypeNone {
    +				// Not covered in the API docs, nor obvious, but this clears the boot order on the VC/ESX side.
    +				devices = append(devices, new(types.VirtualMachineBootOptionsBootableDevice))
    +				continue
    +			}
    +
    +			for _, device := range l {
    +				if l.Type(device) == name {
    +					devices = append(devices, kind(device))
    +				}
    +			}
    +			continue
    +		}
    +
    +		if d := l.Find(name); d != nil {
    +			if kind, ok := bootableDevices[l.Type(d)]; ok {
    +				devices = append(devices, kind(d))
    +			}
    +		}
    +	}
    +
    +	return devices
    +}
    +
    +// SelectBootOrder returns an ordered list of devices matching the given bootable device order
    +func (l VirtualDeviceList) SelectBootOrder(order []types.BaseVirtualMachineBootOptionsBootableDevice) VirtualDeviceList {
    +	var devices VirtualDeviceList
    +
    +	for _, bd := range order {
    +		for _, device := range l {
    +			if kind, ok := bootableDevices[l.Type(device)]; ok {
    +				if reflect.DeepEqual(kind(device), bd) {
    +					devices = append(devices, device)
    +				}
    +			}
    +		}
    +	}
    +
    +	return devices
    +}
    +
    +// TypeName returns the vmodl type name of the device
    +func (l VirtualDeviceList) TypeName(device types.BaseVirtualDevice) string {
    +	dtype := reflect.TypeOf(device)
    +	if dtype == nil {
    +		return ""
    +	}
    +	return dtype.Elem().Name()
    +}
    +
    +var deviceNameRegexp = regexp.MustCompile(`(?:Virtual)?(?:Machine)?(\w+?)(?:Card|EthernetCard|Device|Controller)?$`)
    +
    +func (l VirtualDeviceList) deviceName(device types.BaseVirtualDevice) string {
    +	name := "device"
    +	typeName := l.TypeName(device)
    +
    +	m := deviceNameRegexp.FindStringSubmatch(typeName)
    +	if len(m) == 2 {
    +		name = strings.ToLower(m[1])
    +	}
    +
    +	return name
    +}
    +
    +// Type returns a human-readable name for the given device
    +func (l VirtualDeviceList) Type(device types.BaseVirtualDevice) string {
    +	switch device.(type) {
    +	case types.BaseVirtualEthernetCard:
    +		return DeviceTypeEthernet
    +	case *types.ParaVirtualSCSIController:
    +		return "pvscsi"
    +	case *types.VirtualLsiLogicSASController:
    +		return "lsilogic-sas"
    +	case *types.VirtualNVMEController:
    +		return "nvme"
    +	default:
    +		return l.deviceName(device)
    +	}
    +}
    +
    +// Name returns a stable, human-readable name for the given device
    +func (l VirtualDeviceList) Name(device types.BaseVirtualDevice) string {
    +	var key string
    +	var UnitNumber int32
    +	d := device.GetVirtualDevice()
    +	if d.UnitNumber != nil {
    +		UnitNumber = *d.UnitNumber
    +	}
    +
    +	dtype := l.Type(device)
    +	switch dtype {
    +	case DeviceTypeEthernet:
    +		key = fmt.Sprintf("%d", UnitNumber-7)
    +	case DeviceTypeDisk:
    +		key = fmt.Sprintf("%d-%d", d.ControllerKey, UnitNumber)
    +	default:
    +		key = fmt.Sprintf("%d", d.Key)
    +	}
    +
    +	return fmt.Sprintf("%s-%s", dtype, key)
    +}
    +
    +// ConfigSpec creates a virtual machine configuration spec for
    +// the specified operation, for the list of devices in the device list.
    +func (l VirtualDeviceList) ConfigSpec(op types.VirtualDeviceConfigSpecOperation) ([]types.BaseVirtualDeviceConfigSpec, error) {
    +	var fop types.VirtualDeviceConfigSpecFileOperation
    +	switch op {
    +	case types.VirtualDeviceConfigSpecOperationAdd:
    +		fop = types.VirtualDeviceConfigSpecFileOperationCreate
    +	case types.VirtualDeviceConfigSpecOperationEdit:
    +		fop = types.VirtualDeviceConfigSpecFileOperationReplace
    +	case types.VirtualDeviceConfigSpecOperationRemove:
    +		fop = types.VirtualDeviceConfigSpecFileOperationDestroy
    +	default:
    +		panic("unknown op")
    +	}
    +
    +	var res []types.BaseVirtualDeviceConfigSpec
    +	for _, device := range l {
    +		config := &types.VirtualDeviceConfigSpec{
    +			Device:    device,
    +			Operation: op,
    +		}
    +
    +		if disk, ok := device.(*types.VirtualDisk); ok {
    +			config.FileOperation = fop
    +
    +			// Special case to attach an existing disk
    +			if op == types.VirtualDeviceConfigSpecOperationAdd && disk.CapacityInKB == 0 {
    +				childDisk := false
    +				if b, ok := disk.Backing.(*types.VirtualDiskFlatVer2BackingInfo); ok {
    +					childDisk = b.Parent != nil
    +				}
    +
    +				if !childDisk {
    +					// Existing disk, clear file operation
    +					config.FileOperation = ""
    +				}
    +			}
    +		}
    +
    +		res = append(res, config)
    +	}
    +
    +	return res, nil
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/virtual_disk_manager.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/virtual_disk_manager.go
    new file mode 100644
    index 000000000..72439caf9
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/virtual_disk_manager.go
    @@ -0,0 +1,227 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"context"
    +
    +	"github.com/vmware/govmomi/vim25"
    +	"github.com/vmware/govmomi/vim25/methods"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +type VirtualDiskManager struct {
    +	Common
    +}
    +
    +func NewVirtualDiskManager(c *vim25.Client) *VirtualDiskManager {
    +	m := VirtualDiskManager{
    +		Common: NewCommon(c, *c.ServiceContent.VirtualDiskManager),
    +	}
    +
    +	return &m
    +}
    +
    +// CopyVirtualDisk copies a virtual disk, performing conversions as specified in the spec.
    +func (m VirtualDiskManager) CopyVirtualDisk(
    +	ctx context.Context,
    +	sourceName string, sourceDatacenter *Datacenter,
    +	destName string, destDatacenter *Datacenter,
    +	destSpec *types.VirtualDiskSpec, force bool) (*Task, error) {
    +
    +	req := types.CopyVirtualDisk_Task{
    +		This:       m.Reference(),
    +		SourceName: sourceName,
    +		DestName:   destName,
    +		DestSpec:   destSpec,
    +		Force:      types.NewBool(force),
    +	}
    +
    +	if sourceDatacenter != nil {
    +		ref := sourceDatacenter.Reference()
    +		req.SourceDatacenter = &ref
    +	}
    +
    +	if destDatacenter != nil {
    +		ref := destDatacenter.Reference()
    +		req.DestDatacenter = &ref
    +	}
    +
    +	res, err := methods.CopyVirtualDisk_Task(ctx, m.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(m.c, res.Returnval), nil
    +}
    +
    +// CreateVirtualDisk creates a new virtual disk.
    +func (m VirtualDiskManager) CreateVirtualDisk(
    +	ctx context.Context,
    +	name string, datacenter *Datacenter,
    +	spec types.BaseVirtualDiskSpec) (*Task, error) {
    +
    +	req := types.CreateVirtualDisk_Task{
    +		This: m.Reference(),
    +		Name: name,
    +		Spec: spec,
    +	}
    +
    +	if datacenter != nil {
    +		ref := datacenter.Reference()
    +		req.Datacenter = &ref
    +	}
    +
    +	res, err := methods.CreateVirtualDisk_Task(ctx, m.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(m.c, res.Returnval), nil
    +}
    +
    +// MoveVirtualDisk moves a virtual disk.
    +func (m VirtualDiskManager) MoveVirtualDisk(
    +	ctx context.Context,
    +	sourceName string, sourceDatacenter *Datacenter,
    +	destName string, destDatacenter *Datacenter,
    +	force bool) (*Task, error) {
    +	req := types.MoveVirtualDisk_Task{
    +		This:       m.Reference(),
    +		SourceName: sourceName,
    +		DestName:   destName,
    +		Force:      types.NewBool(force),
    +	}
    +
    +	if sourceDatacenter != nil {
    +		ref := sourceDatacenter.Reference()
    +		req.SourceDatacenter = &ref
    +	}
    +
    +	if destDatacenter != nil {
    +		ref := destDatacenter.Reference()
    +		req.DestDatacenter = &ref
    +	}
    +
    +	res, err := methods.MoveVirtualDisk_Task(ctx, m.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(m.c, res.Returnval), nil
    +}
    +
    +// DeleteVirtualDisk deletes a virtual disk.
    +func (m VirtualDiskManager) DeleteVirtualDisk(ctx context.Context, name string, dc *Datacenter) (*Task, error) {
    +	req := types.DeleteVirtualDisk_Task{
    +		This: m.Reference(),
    +		Name: name,
    +	}
    +
    +	if dc != nil {
    +		ref := dc.Reference()
    +		req.Datacenter = &ref
    +	}
    +
    +	res, err := methods.DeleteVirtualDisk_Task(ctx, m.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(m.c, res.Returnval), nil
    +}
    +
    +// InflateVirtualDisk inflates a virtual disk.
    +func (m VirtualDiskManager) InflateVirtualDisk(ctx context.Context, name string, dc *Datacenter) (*Task, error) {
    +	req := types.InflateVirtualDisk_Task{
    +		This: m.Reference(),
    +		Name: name,
    +	}
    +
    +	if dc != nil {
    +		ref := dc.Reference()
    +		req.Datacenter = &ref
    +	}
    +
    +	res, err := methods.InflateVirtualDisk_Task(ctx, m.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(m.c, res.Returnval), nil
    +}
    +
    +// ShrinkVirtualDisk shrinks a virtual disk.
    +func (m VirtualDiskManager) ShrinkVirtualDisk(ctx context.Context, name string, dc *Datacenter, copy *bool) (*Task, error) {
    +	req := types.ShrinkVirtualDisk_Task{
    +		This: m.Reference(),
    +		Name: name,
    +		Copy: copy,
    +	}
    +
    +	if dc != nil {
    +		ref := dc.Reference()
    +		req.Datacenter = &ref
    +	}
    +
    +	res, err := methods.ShrinkVirtualDisk_Task(ctx, m.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(m.c, res.Returnval), nil
    +}
    +
    +// Queries virtual disk uuid
    +func (m VirtualDiskManager) QueryVirtualDiskUuid(ctx context.Context, name string, dc *Datacenter) (string, error) {
    +	req := types.QueryVirtualDiskUuid{
    +		This: m.Reference(),
    +		Name: name,
    +	}
    +
    +	if dc != nil {
    +		ref := dc.Reference()
    +		req.Datacenter = &ref
    +	}
    +
    +	res, err := methods.QueryVirtualDiskUuid(ctx, m.c, &req)
    +	if err != nil {
    +		return "", err
    +	}
    +
    +	if res == nil {
    +		return "", nil
    +	}
    +
    +	return res.Returnval, nil
    +}
    +
    +func (m VirtualDiskManager) SetVirtualDiskUuid(ctx context.Context, name string, dc *Datacenter, uuid string) error {
    +	req := types.SetVirtualDiskUuid{
    +		This: m.Reference(),
    +		Name: name,
    +		Uuid: uuid,
    +	}
    +
    +	if dc != nil {
    +		ref := dc.Reference()
    +		req.Datacenter = &ref
    +	}
    +
    +	_, err := methods.SetVirtualDiskUuid(ctx, m.c, &req)
    +	return err
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/virtual_disk_manager_internal.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/virtual_disk_manager_internal.go
    new file mode 100644
    index 000000000..faa9ecad5
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/virtual_disk_manager_internal.go
    @@ -0,0 +1,166 @@
    +/*
    +Copyright (c) 2017 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"context"
    +	"reflect"
    +
    +	"github.com/vmware/govmomi/vim25/soap"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +func init() {
    +	types.Add("ArrayOfVirtualDiskInfo", reflect.TypeOf((*arrayOfVirtualDiskInfo)(nil)).Elem())
    +
    +	types.Add("VirtualDiskInfo", reflect.TypeOf((*VirtualDiskInfo)(nil)).Elem())
    +}
    +
    +type arrayOfVirtualDiskInfo struct {
    +	VirtualDiskInfo []VirtualDiskInfo `xml:"VirtualDiskInfo,omitempty"`
    +}
    +
    +type queryVirtualDiskInfoTaskRequest struct {
    +	This           types.ManagedObjectReference  `xml:"_this"`
    +	Name           string                        `xml:"name"`
    +	Datacenter     *types.ManagedObjectReference `xml:"datacenter,omitempty"`
    +	IncludeParents bool                          `xml:"includeParents"`
    +}
    +
    +type queryVirtualDiskInfoTaskResponse struct {
    +	Returnval types.ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type queryVirtualDiskInfoTaskBody struct {
    +	Req         *queryVirtualDiskInfoTaskRequest  `xml:"urn:internalvim25 QueryVirtualDiskInfo_Task,omitempty"`
    +	Res         *queryVirtualDiskInfoTaskResponse `xml:"urn:vim25 QueryVirtualDiskInfo_TaskResponse,omitempty"`
    +	InternalRes *queryVirtualDiskInfoTaskResponse `xml:"urn:internalvim25 QueryVirtualDiskInfo_TaskResponse,omitempty"`
    +	Err         *soap.Fault                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *queryVirtualDiskInfoTaskBody) Fault() *soap.Fault { return b.Err }
    +
    +func queryVirtualDiskInfoTask(ctx context.Context, r soap.RoundTripper, req *queryVirtualDiskInfoTaskRequest) (*queryVirtualDiskInfoTaskResponse, error) {
    +	var reqBody, resBody queryVirtualDiskInfoTaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	if resBody.Res != nil {
    +		return resBody.Res, nil
    +	}
    +
    +	return resBody.InternalRes, nil
    +}
    +
    +type VirtualDiskInfo struct {
    +	Name     string `xml:"unit>name"`
    +	DiskType string `xml:"diskType"`
    +	Parent   string `xml:"parent,omitempty"`
    +}
    +
    +func (m VirtualDiskManager) QueryVirtualDiskInfo(ctx context.Context, name string, dc *Datacenter, includeParents bool) ([]VirtualDiskInfo, error) {
    +	req := queryVirtualDiskInfoTaskRequest{
    +		This:           m.Reference(),
    +		Name:           name,
    +		IncludeParents: includeParents,
    +	}
    +
    +	if dc != nil {
    +		ref := dc.Reference()
    +		req.Datacenter = &ref
    +	}
    +
    +	res, err := queryVirtualDiskInfoTask(ctx, m.Client(), &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	info, err := NewTask(m.Client(), res.Returnval).WaitForResult(ctx, nil)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return info.Result.(arrayOfVirtualDiskInfo).VirtualDiskInfo, nil
    +}
    +
    +type createChildDiskTaskRequest struct {
    +	This             types.ManagedObjectReference  `xml:"_this"`
    +	ChildName        string                        `xml:"childName"`
    +	ChildDatacenter  *types.ManagedObjectReference `xml:"childDatacenter,omitempty"`
    +	ParentName       string                        `xml:"parentName"`
    +	ParentDatacenter *types.ManagedObjectReference `xml:"parentDatacenter,omitempty"`
    +	IsLinkedClone    bool                          `xml:"isLinkedClone"`
    +}
    +
    +type createChildDiskTaskResponse struct {
    +	Returnval types.ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type createChildDiskTaskBody struct {
    +	Req         *createChildDiskTaskRequest  `xml:"urn:internalvim25 CreateChildDisk_Task,omitempty"`
    +	Res         *createChildDiskTaskResponse `xml:"urn:vim25 CreateChildDisk_TaskResponse,omitempty"`
    +	InternalRes *createChildDiskTaskResponse `xml:"urn:internalvim25 CreateChildDisk_TaskResponse,omitempty"`
    +	Err         *soap.Fault                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *createChildDiskTaskBody) Fault() *soap.Fault { return b.Err }
    +
    +func createChildDiskTask(ctx context.Context, r soap.RoundTripper, req *createChildDiskTaskRequest) (*createChildDiskTaskResponse, error) {
    +	var reqBody, resBody createChildDiskTaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	if resBody.Res != nil {
    +		return resBody.Res, nil // vim-version <= 6.5
    +	}
    +
    +	return resBody.InternalRes, nil // vim-version >= 6.7
    +}
    +
    +func (m VirtualDiskManager) CreateChildDisk(ctx context.Context, parent string, pdc *Datacenter, name string, dc *Datacenter, linked bool) (*Task, error) {
    +	req := createChildDiskTaskRequest{
    +		This:          m.Reference(),
    +		ChildName:     name,
    +		ParentName:    parent,
    +		IsLinkedClone: linked,
    +	}
    +
    +	if dc != nil {
    +		ref := dc.Reference()
    +		req.ChildDatacenter = &ref
    +	}
    +
    +	if pdc != nil {
    +		ref := pdc.Reference()
    +		req.ParentDatacenter = &ref
    +	}
    +
    +	res, err := createChildDiskTask(ctx, m.Client(), &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(m.Client(), res.Returnval), nil
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/virtual_machine.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/virtual_machine.go
    new file mode 100644
    index 000000000..511f55723
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/virtual_machine.go
    @@ -0,0 +1,801 @@
    +/*
    +Copyright (c) 2015-2017 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +import (
    +	"context"
    +	"errors"
    +	"fmt"
    +	"net"
    +	"path"
    +
    +	"github.com/vmware/govmomi/nfc"
    +	"github.com/vmware/govmomi/property"
    +	"github.com/vmware/govmomi/vim25"
    +	"github.com/vmware/govmomi/vim25/methods"
    +	"github.com/vmware/govmomi/vim25/mo"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +const (
    +	PropRuntimePowerState = "summary.runtime.powerState"
    +)
    +
    +type VirtualMachine struct {
    +	Common
    +}
    +
    +func NewVirtualMachine(c *vim25.Client, ref types.ManagedObjectReference) *VirtualMachine {
    +	return &VirtualMachine{
    +		Common: NewCommon(c, ref),
    +	}
    +}
    +
    +func (v VirtualMachine) PowerState(ctx context.Context) (types.VirtualMachinePowerState, error) {
    +	var o mo.VirtualMachine
    +
    +	err := v.Properties(ctx, v.Reference(), []string{PropRuntimePowerState}, &o)
    +	if err != nil {
    +		return "", err
    +	}
    +
    +	return o.Summary.Runtime.PowerState, nil
    +}
    +
    +func (v VirtualMachine) PowerOn(ctx context.Context) (*Task, error) {
    +	req := types.PowerOnVM_Task{
    +		This: v.Reference(),
    +	}
    +
    +	res, err := methods.PowerOnVM_Task(ctx, v.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(v.c, res.Returnval), nil
    +}
    +
    +func (v VirtualMachine) PowerOff(ctx context.Context) (*Task, error) {
    +	req := types.PowerOffVM_Task{
    +		This: v.Reference(),
    +	}
    +
    +	res, err := methods.PowerOffVM_Task(ctx, v.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(v.c, res.Returnval), nil
    +}
    +
    +func (v VirtualMachine) Reset(ctx context.Context) (*Task, error) {
    +	req := types.ResetVM_Task{
    +		This: v.Reference(),
    +	}
    +
    +	res, err := methods.ResetVM_Task(ctx, v.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(v.c, res.Returnval), nil
    +}
    +
    +func (v VirtualMachine) Suspend(ctx context.Context) (*Task, error) {
    +	req := types.SuspendVM_Task{
    +		This: v.Reference(),
    +	}
    +
    +	res, err := methods.SuspendVM_Task(ctx, v.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(v.c, res.Returnval), nil
    +}
    +
    +func (v VirtualMachine) ShutdownGuest(ctx context.Context) error {
    +	req := types.ShutdownGuest{
    +		This: v.Reference(),
    +	}
    +
    +	_, err := methods.ShutdownGuest(ctx, v.c, &req)
    +	return err
    +}
    +
    +func (v VirtualMachine) RebootGuest(ctx context.Context) error {
    +	req := types.RebootGuest{
    +		This: v.Reference(),
    +	}
    +
    +	_, err := methods.RebootGuest(ctx, v.c, &req)
    +	return err
    +}
    +
    +func (v VirtualMachine) Destroy(ctx context.Context) (*Task, error) {
    +	req := types.Destroy_Task{
    +		This: v.Reference(),
    +	}
    +
    +	res, err := methods.Destroy_Task(ctx, v.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(v.c, res.Returnval), nil
    +}
    +
    +func (v VirtualMachine) Clone(ctx context.Context, folder *Folder, name string, config types.VirtualMachineCloneSpec) (*Task, error) {
    +	req := types.CloneVM_Task{
    +		This:   v.Reference(),
    +		Folder: folder.Reference(),
    +		Name:   name,
    +		Spec:   config,
    +	}
    +
    +	res, err := methods.CloneVM_Task(ctx, v.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(v.c, res.Returnval), nil
    +}
    +
    +func (v VirtualMachine) Customize(ctx context.Context, spec types.CustomizationSpec) (*Task, error) {
    +	req := types.CustomizeVM_Task{
    +		This: v.Reference(),
    +		Spec: spec,
    +	}
    +
    +	res, err := methods.CustomizeVM_Task(ctx, v.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(v.c, res.Returnval), nil
    +}
    +
    +func (v VirtualMachine) Relocate(ctx context.Context, config types.VirtualMachineRelocateSpec, priority types.VirtualMachineMovePriority) (*Task, error) {
    +	req := types.RelocateVM_Task{
    +		This:     v.Reference(),
    +		Spec:     config,
    +		Priority: priority,
    +	}
    +
    +	res, err := methods.RelocateVM_Task(ctx, v.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(v.c, res.Returnval), nil
    +}
    +
    +func (v VirtualMachine) Reconfigure(ctx context.Context, config types.VirtualMachineConfigSpec) (*Task, error) {
    +	req := types.ReconfigVM_Task{
    +		This: v.Reference(),
    +		Spec: config,
    +	}
    +
    +	res, err := methods.ReconfigVM_Task(ctx, v.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(v.c, res.Returnval), nil
    +}
    +
    +func (v VirtualMachine) WaitForIP(ctx context.Context) (string, error) {
    +	var ip string
    +
    +	p := property.DefaultCollector(v.c)
    +	err := property.Wait(ctx, p, v.Reference(), []string{"guest.ipAddress"}, func(pc []types.PropertyChange) bool {
    +		for _, c := range pc {
    +			if c.Name != "guest.ipAddress" {
    +				continue
    +			}
    +			if c.Op != types.PropertyChangeOpAssign {
    +				continue
    +			}
    +			if c.Val == nil {
    +				continue
    +			}
    +
    +			ip = c.Val.(string)
    +			return true
    +		}
    +
    +		return false
    +	})
    +
    +	if err != nil {
    +		return "", err
    +	}
    +
    +	return ip, nil
    +}
    +
    +// WaitForNetIP waits for the VM guest.net property to report an IP address for all VM NICs.
    +// Only consider IPv4 addresses if the v4 param is true.
    +// By default, wait for all NICs to get an IP address, unless 1 or more device is given.
    +// A device can be specified by the MAC address or the device name, e.g. "ethernet-0".
    +// Returns a map with MAC address as the key and IP address list as the value.
    +func (v VirtualMachine) WaitForNetIP(ctx context.Context, v4 bool, device ...string) (map[string][]string, error) {
    +	macs := make(map[string][]string)
    +	eths := make(map[string]string)
    +
    +	p := property.DefaultCollector(v.c)
    +
    +	// Wait for all NICs to have a MacAddress, which may not be generated yet.
    +	err := property.Wait(ctx, p, v.Reference(), []string{"config.hardware.device"}, func(pc []types.PropertyChange) bool {
    +		for _, c := range pc {
    +			if c.Op != types.PropertyChangeOpAssign {
    +				continue
    +			}
    +
    +			devices := VirtualDeviceList(c.Val.(types.ArrayOfVirtualDevice).VirtualDevice)
    +			for _, d := range devices {
    +				if nic, ok := d.(types.BaseVirtualEthernetCard); ok {
    +					mac := nic.GetVirtualEthernetCard().MacAddress
    +					if mac == "" {
    +						return false
    +					}
    +					macs[mac] = nil
    +					eths[devices.Name(d)] = mac
    +				}
    +			}
    +		}
    +
    +		return true
    +	})
    +
    +	if len(device) != 0 {
    +		// Only wait for specific NIC(s)
    +		macs = make(map[string][]string)
    +		for _, mac := range device {
    +			if eth, ok := eths[mac]; ok {
    +				mac = eth // device name, e.g. "ethernet-0"
    +			}
    +			macs[mac] = nil
    +		}
    +	}
    +
    +	err = property.Wait(ctx, p, v.Reference(), []string{"guest.net"}, func(pc []types.PropertyChange) bool {
    +		for _, c := range pc {
    +			if c.Op != types.PropertyChangeOpAssign {
    +				continue
    +			}
    +
    +			nics := c.Val.(types.ArrayOfGuestNicInfo).GuestNicInfo
    +			for _, nic := range nics {
    +				mac := nic.MacAddress
    +				if mac == "" || nic.IpConfig == nil {
    +					continue
    +				}
    +
    +				for _, ip := range nic.IpConfig.IpAddress {
    +					if _, ok := macs[mac]; !ok {
    +						continue // Ignore any that don't correspond to a VM device
    +					}
    +					if v4 && net.ParseIP(ip.IpAddress).To4() == nil {
    +						continue // Ignore non IPv4 address
    +					}
    +					macs[mac] = append(macs[mac], ip.IpAddress)
    +				}
    +			}
    +		}
    +
    +		for _, ips := range macs {
    +			if len(ips) == 0 {
    +				return false
    +			}
    +		}
    +
    +		return true
    +	})
    +
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return macs, nil
    +}
    +
    +// Device returns the VirtualMachine's config.hardware.device property.
    +func (v VirtualMachine) Device(ctx context.Context) (VirtualDeviceList, error) {
    +	var o mo.VirtualMachine
    +
    +	err := v.Properties(ctx, v.Reference(), []string{"config.hardware.device", "summary.runtime.connectionState"}, &o)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	// Quoting the SDK doc:
    +	//   The virtual machine configuration is not guaranteed to be available.
    +	//   For example, the configuration information would be unavailable if the server
    +	//   is unable to access the virtual machine files on disk, and is often also unavailable
    +	//   during the initial phases of virtual machine creation.
    +	if o.Config == nil {
    +		return nil, fmt.Errorf("%s Config is not available, connectionState=%s",
    +			v.Reference(), o.Summary.Runtime.ConnectionState)
    +	}
    +
    +	return VirtualDeviceList(o.Config.Hardware.Device), nil
    +}
    +
    +func (v VirtualMachine) HostSystem(ctx context.Context) (*HostSystem, error) {
    +	var o mo.VirtualMachine
    +
    +	err := v.Properties(ctx, v.Reference(), []string{"summary.runtime.host"}, &o)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	host := o.Summary.Runtime.Host
    +	if host == nil {
    +		return nil, errors.New("VM doesn't have a HostSystem")
    +	}
    +
    +	return NewHostSystem(v.c, *host), nil
    +}
    +
    +func (v VirtualMachine) ResourcePool(ctx context.Context) (*ResourcePool, error) {
    +	var o mo.VirtualMachine
    +
    +	err := v.Properties(ctx, v.Reference(), []string{"resourcePool"}, &o)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	rp := o.ResourcePool
    +	if rp == nil {
    +		return nil, errors.New("VM doesn't have a resourcePool")
    +	}
    +
    +	return NewResourcePool(v.c, *rp), nil
    +}
    +
    +func (v VirtualMachine) configureDevice(ctx context.Context, op types.VirtualDeviceConfigSpecOperation, fop types.VirtualDeviceConfigSpecFileOperation, devices ...types.BaseVirtualDevice) error {
    +	spec := types.VirtualMachineConfigSpec{}
    +
    +	for _, device := range devices {
    +		config := &types.VirtualDeviceConfigSpec{
    +			Device:    device,
    +			Operation: op,
    +		}
    +
    +		if disk, ok := device.(*types.VirtualDisk); ok {
    +			config.FileOperation = fop
    +
    +			// Special case to attach an existing disk
    +			if op == types.VirtualDeviceConfigSpecOperationAdd && disk.CapacityInKB == 0 {
    +				childDisk := false
    +				if b, ok := disk.Backing.(*types.VirtualDiskFlatVer2BackingInfo); ok {
    +					childDisk = b.Parent != nil
    +				}
    +
    +				if !childDisk {
    +					config.FileOperation = "" // existing disk
    +				}
    +			}
    +		}
    +
    +		spec.DeviceChange = append(spec.DeviceChange, config)
    +	}
    +
    +	task, err := v.Reconfigure(ctx, spec)
    +	if err != nil {
    +		return err
    +	}
    +
    +	return task.Wait(ctx)
    +}
    +
    +// AddDevice adds the given devices to the VirtualMachine
    +func (v VirtualMachine) AddDevice(ctx context.Context, device ...types.BaseVirtualDevice) error {
    +	return v.configureDevice(ctx, types.VirtualDeviceConfigSpecOperationAdd, types.VirtualDeviceConfigSpecFileOperationCreate, device...)
    +}
    +
    +// EditDevice edits the given (existing) devices on the VirtualMachine
    +func (v VirtualMachine) EditDevice(ctx context.Context, device ...types.BaseVirtualDevice) error {
    +	return v.configureDevice(ctx, types.VirtualDeviceConfigSpecOperationEdit, types.VirtualDeviceConfigSpecFileOperationReplace, device...)
    +}
    +
    +// RemoveDevice removes the given devices on the VirtualMachine
    +func (v VirtualMachine) RemoveDevice(ctx context.Context, keepFiles bool, device ...types.BaseVirtualDevice) error {
    +	fop := types.VirtualDeviceConfigSpecFileOperationDestroy
    +	if keepFiles {
    +		fop = ""
    +	}
    +	return v.configureDevice(ctx, types.VirtualDeviceConfigSpecOperationRemove, fop, device...)
    +}
    +
    +// BootOptions returns the VirtualMachine's config.bootOptions property.
    +func (v VirtualMachine) BootOptions(ctx context.Context) (*types.VirtualMachineBootOptions, error) {
    +	var o mo.VirtualMachine
    +
    +	err := v.Properties(ctx, v.Reference(), []string{"config.bootOptions"}, &o)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return o.Config.BootOptions, nil
    +}
    +
    +// SetBootOptions reconfigures the VirtualMachine with the given options.
    +func (v VirtualMachine) SetBootOptions(ctx context.Context, options *types.VirtualMachineBootOptions) error {
    +	spec := types.VirtualMachineConfigSpec{}
    +
    +	spec.BootOptions = options
    +
    +	task, err := v.Reconfigure(ctx, spec)
    +	if err != nil {
    +		return err
    +	}
    +
    +	return task.Wait(ctx)
    +}
    +
    +// Answer answers a pending question.
    +func (v VirtualMachine) Answer(ctx context.Context, id, answer string) error {
    +	req := types.AnswerVM{
    +		This:         v.Reference(),
    +		QuestionId:   id,
    +		AnswerChoice: answer,
    +	}
    +
    +	_, err := methods.AnswerVM(ctx, v.c, &req)
    +	if err != nil {
    +		return err
    +	}
    +
    +	return nil
    +}
    +
    +func (v VirtualMachine) AcquireTicket(ctx context.Context, kind string) (*types.VirtualMachineTicket, error) {
    +	req := types.AcquireTicket{
    +		This:       v.Reference(),
    +		TicketType: kind,
    +	}
    +
    +	res, err := methods.AcquireTicket(ctx, v.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return &res.Returnval, nil
    +}
    +
    +// CreateSnapshot creates a new snapshot of a virtual machine.
    +func (v VirtualMachine) CreateSnapshot(ctx context.Context, name string, description string, memory bool, quiesce bool) (*Task, error) {
    +	req := types.CreateSnapshot_Task{
    +		This:        v.Reference(),
    +		Name:        name,
    +		Description: description,
    +		Memory:      memory,
    +		Quiesce:     quiesce,
    +	}
    +
    +	res, err := methods.CreateSnapshot_Task(ctx, v.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(v.c, res.Returnval), nil
    +}
    +
    +// RemoveAllSnapshot removes all snapshots of a virtual machine
    +func (v VirtualMachine) RemoveAllSnapshot(ctx context.Context, consolidate *bool) (*Task, error) {
    +	req := types.RemoveAllSnapshots_Task{
    +		This:        v.Reference(),
    +		Consolidate: consolidate,
    +	}
    +
    +	res, err := methods.RemoveAllSnapshots_Task(ctx, v.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(v.c, res.Returnval), nil
    +}
    +
    +type snapshotMap map[string][]types.ManagedObjectReference
    +
    +func (m snapshotMap) add(parent string, tree []types.VirtualMachineSnapshotTree) {
    +	for i, st := range tree {
    +		sname := st.Name
    +		names := []string{sname, st.Snapshot.Value}
    +
    +		if parent != "" {
    +			sname = path.Join(parent, sname)
    +			// Add full path as an option to resolve duplicate names
    +			names = append(names, sname)
    +		}
    +
    +		for _, name := range names {
    +			m[name] = append(m[name], tree[i].Snapshot)
    +		}
    +
    +		m.add(sname, st.ChildSnapshotList)
    +	}
    +}
    +
    +// FindSnapshot supports snapshot lookup by name, where name can be:
    +// 1) snapshot ManagedObjectReference.Value (unique)
    +// 2) snapshot name (may not be unique)
    +// 3) snapshot tree path (may not be unique)
    +func (v VirtualMachine) FindSnapshot(ctx context.Context, name string) (*types.ManagedObjectReference, error) {
    +	var o mo.VirtualMachine
    +
    +	err := v.Properties(ctx, v.Reference(), []string{"snapshot"}, &o)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	if o.Snapshot == nil || len(o.Snapshot.RootSnapshotList) == 0 {
    +		return nil, errors.New("No snapshots for this VM")
    +	}
    +
    +	m := make(snapshotMap)
    +	m.add("", o.Snapshot.RootSnapshotList)
    +
    +	s := m[name]
    +	switch len(s) {
    +	case 0:
    +		return nil, fmt.Errorf("snapshot %q not found", name)
    +	case 1:
    +		return &s[0], nil
    +	default:
    +		return nil, fmt.Errorf("%q resolves to %d snapshots", name, len(s))
    +	}
    +}
    +
    +// RemoveSnapshot removes a named snapshot
    +func (v VirtualMachine) RemoveSnapshot(ctx context.Context, name string, removeChildren bool, consolidate *bool) (*Task, error) {
    +	snapshot, err := v.FindSnapshot(ctx, name)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	req := types.RemoveSnapshot_Task{
    +		This:           snapshot.Reference(),
    +		RemoveChildren: removeChildren,
    +		Consolidate:    consolidate,
    +	}
    +
    +	res, err := methods.RemoveSnapshot_Task(ctx, v.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(v.c, res.Returnval), nil
    +}
    +
    +// RevertToCurrentSnapshot reverts to the current snapshot
    +func (v VirtualMachine) RevertToCurrentSnapshot(ctx context.Context, suppressPowerOn bool) (*Task, error) {
    +	req := types.RevertToCurrentSnapshot_Task{
    +		This:            v.Reference(),
    +		SuppressPowerOn: types.NewBool(suppressPowerOn),
    +	}
    +
    +	res, err := methods.RevertToCurrentSnapshot_Task(ctx, v.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(v.c, res.Returnval), nil
    +}
    +
    +// RevertToSnapshot reverts to a named snapshot
    +func (v VirtualMachine) RevertToSnapshot(ctx context.Context, name string, suppressPowerOn bool) (*Task, error) {
    +	snapshot, err := v.FindSnapshot(ctx, name)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	req := types.RevertToSnapshot_Task{
    +		This:            snapshot.Reference(),
    +		SuppressPowerOn: types.NewBool(suppressPowerOn),
    +	}
    +
    +	res, err := methods.RevertToSnapshot_Task(ctx, v.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(v.c, res.Returnval), nil
    +}
    +
    +// IsToolsRunning returns true if VMware Tools is currently running in the guest OS, and false otherwise.
    +func (v VirtualMachine) IsToolsRunning(ctx context.Context) (bool, error) {
    +	var o mo.VirtualMachine
    +
    +	err := v.Properties(ctx, v.Reference(), []string{"guest.toolsRunningStatus"}, &o)
    +	if err != nil {
    +		return false, err
    +	}
    +
    +	return o.Guest.ToolsRunningStatus == string(types.VirtualMachineToolsRunningStatusGuestToolsRunning), nil
    +}
    +
    +// Wait for the VirtualMachine to change to the desired power state.
    +func (v VirtualMachine) WaitForPowerState(ctx context.Context, state types.VirtualMachinePowerState) error {
    +	p := property.DefaultCollector(v.c)
    +	err := property.Wait(ctx, p, v.Reference(), []string{PropRuntimePowerState}, func(pc []types.PropertyChange) bool {
    +		for _, c := range pc {
    +			if c.Name != PropRuntimePowerState {
    +				continue
    +			}
    +			if c.Val == nil {
    +				continue
    +			}
    +
    +			ps := c.Val.(types.VirtualMachinePowerState)
    +			if ps == state {
    +				return true
    +			}
    +		}
    +		return false
    +	})
    +
    +	return err
    +}
    +
    +func (v VirtualMachine) MarkAsTemplate(ctx context.Context) error {
    +	req := types.MarkAsTemplate{
    +		This: v.Reference(),
    +	}
    +
    +	_, err := methods.MarkAsTemplate(ctx, v.c, &req)
    +	if err != nil {
    +		return err
    +	}
    +
    +	return nil
    +}
    +
    +func (v VirtualMachine) MarkAsVirtualMachine(ctx context.Context, pool ResourcePool, host *HostSystem) error {
    +	req := types.MarkAsVirtualMachine{
    +		This: v.Reference(),
    +		Pool: pool.Reference(),
    +	}
    +
    +	if host != nil {
    +		ref := host.Reference()
    +		req.Host = &ref
    +	}
    +
    +	_, err := methods.MarkAsVirtualMachine(ctx, v.c, &req)
    +	if err != nil {
    +		return err
    +	}
    +
    +	return nil
    +}
    +
    +func (v VirtualMachine) Migrate(ctx context.Context, pool *ResourcePool, host *HostSystem, priority types.VirtualMachineMovePriority, state types.VirtualMachinePowerState) (*Task, error) {
    +	req := types.MigrateVM_Task{
    +		This:     v.Reference(),
    +		Priority: priority,
    +		State:    state,
    +	}
    +
    +	if pool != nil {
    +		ref := pool.Reference()
    +		req.Pool = &ref
    +	}
    +
    +	if host != nil {
    +		ref := host.Reference()
    +		req.Host = &ref
    +	}
    +
    +	res, err := methods.MigrateVM_Task(ctx, v.c, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(v.c, res.Returnval), nil
    +}
    +
    +func (v VirtualMachine) Unregister(ctx context.Context) error {
    +	req := types.UnregisterVM{
    +		This: v.Reference(),
    +	}
    +
    +	_, err := methods.UnregisterVM(ctx, v.Client(), &req)
    +	return err
    +}
    +
    +// QueryEnvironmentBrowser is a helper to get the environmentBrowser property.
    +func (v VirtualMachine) QueryConfigTarget(ctx context.Context) (*types.ConfigTarget, error) {
    +	var vm mo.VirtualMachine
    +
    +	err := v.Properties(ctx, v.Reference(), []string{"environmentBrowser"}, &vm)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	req := types.QueryConfigTarget{
    +		This: vm.EnvironmentBrowser,
    +	}
    +
    +	res, err := methods.QueryConfigTarget(ctx, v.Client(), &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return res.Returnval, nil
    +}
    +
    +func (v VirtualMachine) MountToolsInstaller(ctx context.Context) error {
    +	req := types.MountToolsInstaller{
    +		This: v.Reference(),
    +	}
    +
    +	_, err := methods.MountToolsInstaller(ctx, v.Client(), &req)
    +	return err
    +}
    +
    +func (v VirtualMachine) UnmountToolsInstaller(ctx context.Context) error {
    +	req := types.UnmountToolsInstaller{
    +		This: v.Reference(),
    +	}
    +
    +	_, err := methods.UnmountToolsInstaller(ctx, v.Client(), &req)
    +	return err
    +}
    +
    +func (v VirtualMachine) UpgradeTools(ctx context.Context, options string) (*Task, error) {
    +	req := types.UpgradeTools_Task{
    +		This:             v.Reference(),
    +		InstallerOptions: options,
    +	}
    +
    +	res, err := methods.UpgradeTools_Task(ctx, v.Client(), &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(v.c, res.Returnval), nil
    +}
    +
    +func (v VirtualMachine) Export(ctx context.Context) (*nfc.Lease, error) {
    +	req := types.ExportVm{
    +		This: v.Reference(),
    +	}
    +
    +	res, err := methods.ExportVm(ctx, v.Client(), &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return nfc.NewLease(v.c, res.Returnval), nil
    +}
    +
    +func (v VirtualMachine) UpgradeVM(ctx context.Context, version string) (*Task, error) {
    +	req := types.UpgradeVM_Task{
    +		This:    v.Reference(),
    +		Version: version,
    +	}
    +
    +	res, err := methods.UpgradeVM_Task(ctx, v.Client(), &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return NewTask(v.c, res.Returnval), nil
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/vmware_distributed_virtual_switch.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/vmware_distributed_virtual_switch.go
    new file mode 100644
    index 000000000..f6caf9870
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/object/vmware_distributed_virtual_switch.go
    @@ -0,0 +1,21 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package object
    +
    +type VmwareDistributedVirtualSwitch struct {
    +	DistributedVirtualSwitch
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/property/collector.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/property/collector.go
    new file mode 100644
    index 000000000..ccf712cf9
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/property/collector.go
    @@ -0,0 +1,205 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package property
    +
    +import (
    +	"context"
    +	"errors"
    +
    +	"github.com/vmware/govmomi/vim25"
    +	"github.com/vmware/govmomi/vim25/methods"
    +	"github.com/vmware/govmomi/vim25/mo"
    +	"github.com/vmware/govmomi/vim25/soap"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +// Collector models the PropertyCollector managed object.
    +//
    +// For more information, see:
    +// http://pubs.vmware.com/vsphere-60/index.jsp?topic=%2Fcom.vmware.wssdk.apiref.doc%2Fvmodl.query.PropertyCollector.html
    +//
    +type Collector struct {
    +	roundTripper soap.RoundTripper
    +	reference    types.ManagedObjectReference
    +}
    +
    +// DefaultCollector returns the session's default property collector.
    +func DefaultCollector(c *vim25.Client) *Collector {
    +	p := Collector{
    +		roundTripper: c,
    +		reference:    c.ServiceContent.PropertyCollector,
    +	}
    +
    +	return &p
    +}
    +
    +func (p Collector) Reference() types.ManagedObjectReference {
    +	return p.reference
    +}
    +
    +// Create creates a new session-specific Collector that can be used to
    +// retrieve property updates independent of any other Collector.
    +func (p *Collector) Create(ctx context.Context) (*Collector, error) {
    +	req := types.CreatePropertyCollector{
    +		This: p.Reference(),
    +	}
    +
    +	res, err := methods.CreatePropertyCollector(ctx, p.roundTripper, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	newp := Collector{
    +		roundTripper: p.roundTripper,
    +		reference:    res.Returnval,
    +	}
    +
    +	return &newp, nil
    +}
    +
    +// Destroy destroys this Collector.
    +func (p *Collector) Destroy(ctx context.Context) error {
    +	req := types.DestroyPropertyCollector{
    +		This: p.Reference(),
    +	}
    +
    +	_, err := methods.DestroyPropertyCollector(ctx, p.roundTripper, &req)
    +	if err != nil {
    +		return err
    +	}
    +
    +	p.reference = types.ManagedObjectReference{}
    +	return nil
    +}
    +
    +func (p *Collector) CreateFilter(ctx context.Context, req types.CreateFilter) error {
    +	req.This = p.Reference()
    +
    +	_, err := methods.CreateFilter(ctx, p.roundTripper, &req)
    +	if err != nil {
    +		return err
    +	}
    +
    +	return nil
    +}
    +
    +func (p *Collector) WaitForUpdates(ctx context.Context, v string) (*types.UpdateSet, error) {
    +	req := types.WaitForUpdatesEx{
    +		This:    p.Reference(),
    +		Version: v,
    +	}
    +
    +	res, err := methods.WaitForUpdatesEx(ctx, p.roundTripper, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return res.Returnval, nil
    +}
    +
    +func (p *Collector) RetrieveProperties(ctx context.Context, req types.RetrieveProperties) (*types.RetrievePropertiesResponse, error) {
    +	req.This = p.Reference()
    +	return methods.RetrieveProperties(ctx, p.roundTripper, &req)
    +}
    +
    +// Retrieve loads properties for a slice of managed objects. The dst argument
    +// must be a pointer to a []interface{}, which is populated with the instances
    +// of the specified managed objects, with the relevant properties filled in. If
    +// the properties slice is nil, all properties are loaded.
    +func (p *Collector) Retrieve(ctx context.Context, objs []types.ManagedObjectReference, ps []string, dst interface{}) error {
    +	if len(objs) == 0 {
    +		return errors.New("object references is empty")
    +	}
    +
    +	var propSpec *types.PropertySpec
    +	var objectSet []types.ObjectSpec
    +
    +	for _, obj := range objs {
    +		// Ensure that all object reference types are the same
    +		if propSpec == nil {
    +			propSpec = &types.PropertySpec{
    +				Type: obj.Type,
    +			}
    +
    +			if ps == nil {
    +				propSpec.All = types.NewBool(true)
    +			} else {
    +				propSpec.PathSet = ps
    +			}
    +		} else {
    +			if obj.Type != propSpec.Type {
    +				return errors.New("object references must have the same type")
    +			}
    +		}
    +
    +		objectSpec := types.ObjectSpec{
    +			Obj:  obj,
    +			Skip: types.NewBool(false),
    +		}
    +
    +		objectSet = append(objectSet, objectSpec)
    +	}
    +
    +	req := types.RetrieveProperties{
    +		SpecSet: []types.PropertyFilterSpec{
    +			{
    +				ObjectSet: objectSet,
    +				PropSet:   []types.PropertySpec{*propSpec},
    +			},
    +		},
    +	}
    +
    +	res, err := p.RetrieveProperties(ctx, req)
    +	if err != nil {
    +		return err
    +	}
    +
    +	if d, ok := dst.(*[]types.ObjectContent); ok {
    +		*d = res.Returnval
    +		return nil
    +	}
    +
    +	return mo.LoadRetrievePropertiesResponse(res, dst)
    +}
    +
    +// RetrieveWithFilter populates dst as Retrieve does, but only for entities matching the given filter.
    +func (p *Collector) RetrieveWithFilter(ctx context.Context, objs []types.ManagedObjectReference, ps []string, dst interface{}, filter Filter) error {
    +	if len(filter) == 0 {
    +		return p.Retrieve(ctx, objs, ps, dst)
    +	}
    +
    +	var content []types.ObjectContent
    +
    +	err := p.Retrieve(ctx, objs, filter.Keys(), &content)
    +	if err != nil {
    +		return err
    +	}
    +
    +	objs = filter.MatchObjectContent(content)
    +
    +	if len(objs) == 0 {
    +		return nil
    +	}
    +
    +	return p.Retrieve(ctx, objs, ps, dst)
    +}
    +
    +// RetrieveOne calls Retrieve with a single managed object reference.
    +func (p *Collector) RetrieveOne(ctx context.Context, obj types.ManagedObjectReference, ps []string, dst interface{}) error {
    +	var objs = []types.ManagedObjectReference{obj}
    +	return p.Retrieve(ctx, objs, ps, dst)
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/property/filter.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/property/filter.go
    new file mode 100644
    index 000000000..a4bf16d05
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/property/filter.go
    @@ -0,0 +1,139 @@
    +/*
    +Copyright (c) 2017 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package property
    +
    +import (
    +	"fmt"
    +	"path"
    +	"reflect"
    +	"strconv"
    +	"strings"
    +
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +// Filter provides methods for matching against types.DynamicProperty
    +type Filter map[string]types.AnyType
    +
    +// Keys returns the Filter map keys as a []string
    +func (f Filter) Keys() []string {
    +	keys := make([]string, 0, len(f))
    +
    +	for key := range f {
    +		keys = append(keys, key)
    +	}
    +
    +	return keys
    +}
    +
    +// MatchProperty returns true if a Filter entry matches the given prop.
    +func (f Filter) MatchProperty(prop types.DynamicProperty) bool {
    +	match, ok := f[prop.Name]
    +	if !ok {
    +		return false
    +	}
    +
    +	if match == prop.Val {
    +		return true
    +	}
    +
    +	ptype := reflect.TypeOf(prop.Val)
    +
    +	if strings.HasPrefix(ptype.Name(), "ArrayOf") {
    +		pval := reflect.ValueOf(prop.Val).Field(0)
    +
    +		for i := 0; i < pval.Len(); i++ {
    +			prop.Val = pval.Index(i).Interface()
    +
    +			if f.MatchProperty(prop) {
    +				return true
    +			}
    +		}
    +
    +		return false
    +	}
    +
    +	if reflect.TypeOf(match) != ptype {
    +		s, ok := match.(string)
    +		if !ok {
    +			return false
    +		}
    +
    +		// convert if we can
    +		switch prop.Val.(type) {
    +		case bool:
    +			match, _ = strconv.ParseBool(s)
    +		case int16:
    +			x, _ := strconv.ParseInt(s, 10, 16)
    +			match = int16(x)
    +		case int32:
    +			x, _ := strconv.ParseInt(s, 10, 32)
    +			match = int32(x)
    +		case int64:
    +			match, _ = strconv.ParseInt(s, 10, 64)
    +		case float32:
    +			x, _ := strconv.ParseFloat(s, 32)
    +			match = float32(x)
    +		case float64:
    +			match, _ = strconv.ParseFloat(s, 64)
    +		case fmt.Stringer:
    +			prop.Val = prop.Val.(fmt.Stringer).String()
    +		default:
    +			if ptype.Kind() != reflect.String {
    +				return false
    +			}
    +			// An enum type we can convert to a string type
    +			prop.Val = reflect.ValueOf(prop.Val).String()
    +		}
    +	}
    +
    +	switch pval := prop.Val.(type) {
    +	case string:
    +		s := match.(string)
    +		if s == "*" {
    +			return true // TODO: path.Match fails if s contains a '/'
    +		}
    +		m, _ := path.Match(s, pval)
    +		return m
    +	default:
    +		return reflect.DeepEqual(match, pval)
    +	}
    +}
    +
    +// MatchPropertyList returns true if all given props match the Filter.
    +func (f Filter) MatchPropertyList(props []types.DynamicProperty) bool {
    +	for _, p := range props {
    +		if !f.MatchProperty(p) {
    +			return false
    +		}
    +	}
    +
    +	return len(f) == len(props) // false if a property such as VM "guest" is unset
    +}
    +
    +// MatchObjectContent returns a list of ObjectContent.Obj where the ObjectContent.PropSet matches the Filter.
    +func (f Filter) MatchObjectContent(objects []types.ObjectContent) []types.ManagedObjectReference {
    +	var refs []types.ManagedObjectReference
    +
    +	for _, o := range objects {
    +		if f.MatchPropertyList(o.PropSet) {
    +			refs = append(refs, o.Obj)
    +		}
    +	}
    +
    +	return refs
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/property/wait.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/property/wait.go
    new file mode 100644
    index 000000000..fe847926c
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/property/wait.go
    @@ -0,0 +1,115 @@
    +/*
    +Copyright (c) 2015-2017 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package property
    +
    +import (
    +	"context"
    +
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +// WaitFilter provides helpers to construct a types.CreateFilter for use with property.Wait
    +type WaitFilter struct {
    +	types.CreateFilter
    +}
    +
    +// Add a new ObjectSpec and PropertySpec to the WaitFilter
    +func (f *WaitFilter) Add(obj types.ManagedObjectReference, kind string, ps []string, set ...types.BaseSelectionSpec) *WaitFilter {
    +	spec := types.ObjectSpec{
    +		Obj:       obj,
    +		SelectSet: set,
    +	}
    +
    +	pset := types.PropertySpec{
    +		Type:    kind,
    +		PathSet: ps,
    +	}
    +
    +	if len(ps) == 0 {
    +		pset.All = types.NewBool(true)
    +	}
    +
    +	f.Spec.ObjectSet = append(f.Spec.ObjectSet, spec)
    +
    +	f.Spec.PropSet = append(f.Spec.PropSet, pset)
    +
    +	return f
    +}
    +
    +// Wait creates a new WaitFilter and calls the specified function for each ObjectUpdate via WaitForUpdates
    +func Wait(ctx context.Context, c *Collector, obj types.ManagedObjectReference, ps []string, f func([]types.PropertyChange) bool) error {
    +	filter := new(WaitFilter).Add(obj, obj.Type, ps)
    +
    +	return WaitForUpdates(ctx, c, filter, func(updates []types.ObjectUpdate) bool {
    +		for _, update := range updates {
    +			if f(update.ChangeSet) {
    +				return true
    +			}
    +		}
    +
    +		return false
    +	})
    +}
    +
    +// WaitForUpdates waits for any of the specified properties of the specified managed
    +// object to change. It calls the specified function for every update it
    +// receives. If this function returns false, it continues waiting for
    +// subsequent updates. If this function returns true, it stops waiting and
    +// returns.
    +//
    +// To only receive updates for the specified managed object, the function
    +// creates a new property collector and calls CreateFilter. A new property
    +// collector is required because filters can only be added, not removed.
    +//
    +// The newly created collector is destroyed before this function returns (both
    +// in case of success or error).
    +//
    +func WaitForUpdates(ctx context.Context, c *Collector, filter *WaitFilter, f func([]types.ObjectUpdate) bool) error {
    +	p, err := c.Create(ctx)
    +	if err != nil {
    +		return err
    +	}
    +
    +	// Attempt to destroy the collector using the background context, as the
    +	// specified context may have timed out or have been cancelled.
    +	defer p.Destroy(context.Background())
    +
    +	err = p.CreateFilter(ctx, filter.CreateFilter)
    +	if err != nil {
    +		return err
    +	}
    +
    +	for version := ""; ; {
    +		res, err := p.WaitForUpdates(ctx, version)
    +		if err != nil {
    +			return err
    +		}
    +
    +		// Retry if the result came back empty
    +		if res == nil {
    +			continue
    +		}
    +
    +		version = res.Version
    +
    +		for _, fs := range res.FilterSet {
    +			if f(fs.ObjectSet) {
    +				return nil
    +			}
    +		}
    +	}
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/session/keep_alive.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/session/keep_alive.go
    new file mode 100644
    index 000000000..a9d4c141c
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/session/keep_alive.go
    @@ -0,0 +1,127 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package session
    +
    +import (
    +	"context"
    +	"sync"
    +	"time"
    +
    +	"github.com/vmware/govmomi/vim25/methods"
    +	"github.com/vmware/govmomi/vim25/soap"
    +)
    +
    +type keepAlive struct {
    +	sync.Mutex
    +
    +	roundTripper    soap.RoundTripper
    +	idleTime        time.Duration
    +	notifyRequest   chan struct{}
    +	notifyStop      chan struct{}
    +	notifyWaitGroup sync.WaitGroup
    +
    +	// keepAlive executes a request in the background with the purpose of
    +	// keeping the session active. The response for this request is discarded.
    +	keepAlive func(soap.RoundTripper) error
    +}
    +
    +func defaultKeepAlive(roundTripper soap.RoundTripper) error {
    +	_, _ = methods.GetCurrentTime(context.Background(), roundTripper)
    +	return nil
    +}
    +
    +// KeepAlive wraps the specified soap.RoundTripper and executes a meaningless
    +// API request in the background after the RoundTripper has been idle for the
    +// specified amount of idle time. The keep alive process only starts once a
    +// user logs in and runs until the user logs out again.
    +func KeepAlive(roundTripper soap.RoundTripper, idleTime time.Duration) soap.RoundTripper {
    +	return KeepAliveHandler(roundTripper, idleTime, defaultKeepAlive)
    +}
    +
    +// KeepAliveHandler works as KeepAlive() does, but the handler param can decide how to handle errors.
    +// For example, if connectivity to ESX/VC is down long enough for a session to expire, a handler can choose to
    +// Login() on a types.NotAuthenticated error.  If handler returns non-nil, the keep alive go routine will be stopped.
    +func KeepAliveHandler(roundTripper soap.RoundTripper, idleTime time.Duration, handler func(soap.RoundTripper) error) soap.RoundTripper {
    +	k := &keepAlive{
    +		roundTripper:  roundTripper,
    +		idleTime:      idleTime,
    +		notifyRequest: make(chan struct{}),
    +	}
    +
    +	k.keepAlive = handler
    +
    +	return k
    +}
    +
    +func (k *keepAlive) start() {
    +	k.Lock()
    +	defer k.Unlock()
    +
    +	if k.notifyStop != nil {
    +		return
    +	}
    +
    +	// This channel must be closed to terminate idle timer.
    +	k.notifyStop = make(chan struct{})
    +	k.notifyWaitGroup.Add(1)
    +
    +	go func() {
    +		defer k.notifyWaitGroup.Done()
    +
    +		for t := time.NewTimer(k.idleTime); ; {
    +			select {
    +			case <-k.notifyStop:
    +				return
    +			case <-k.notifyRequest:
    +				t.Reset(k.idleTime)
    +			case <-t.C:
    +				if err := k.keepAlive(k.roundTripper); err != nil {
    +					k.stop()
    +				}
    +				t = time.NewTimer(k.idleTime)
    +			}
    +		}
    +	}()
    +}
    +
    +func (k *keepAlive) stop() {
    +	k.Lock()
    +	defer k.Unlock()
    +
    +	if k.notifyStop != nil {
    +		close(k.notifyStop)
    +		k.notifyWaitGroup.Wait()
    +		k.notifyStop = nil
    +	}
    +}
    +
    +func (k *keepAlive) RoundTrip(ctx context.Context, req, res soap.HasFault) error {
    +	err := k.roundTripper.RoundTrip(ctx, req, res)
    +	if err != nil {
    +		return err
    +	}
    +
    +	// Start ticker on login, stop ticker on logout.
    +	switch req.(type) {
    +	case *methods.LoginBody, *methods.LoginExtensionByCertificateBody:
    +		k.start()
    +	case *methods.LogoutBody:
    +		k.stop()
    +	}
    +
    +	return nil
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/session/manager.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/session/manager.go
    new file mode 100644
    index 000000000..ad3219716
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/session/manager.go
    @@ -0,0 +1,267 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package session
    +
    +import (
    +	"context"
    +	"net/http"
    +	"net/url"
    +	"os"
    +
    +	"github.com/vmware/govmomi/property"
    +	"github.com/vmware/govmomi/vim25"
    +	"github.com/vmware/govmomi/vim25/methods"
    +	"github.com/vmware/govmomi/vim25/mo"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +// Locale defaults to "en_US" and can be overridden via this var or the GOVMOMI_LOCALE env var.
    +// A value of "_" uses the server locale setting.
    +var Locale = os.Getenv("GOVMOMI_LOCALE")
    +
    +func init() {
    +	if Locale == "_" {
    +		Locale = ""
    +	} else if Locale == "" {
    +		Locale = "en_US"
    +	}
    +}
    +
    +type Manager struct {
    +	client      *vim25.Client
    +	userSession *types.UserSession
    +}
    +
    +func NewManager(client *vim25.Client) *Manager {
    +	m := Manager{
    +		client: client,
    +	}
    +
    +	return &m
    +}
    +
    +func (sm Manager) Reference() types.ManagedObjectReference {
    +	return *sm.client.ServiceContent.SessionManager
    +}
    +
    +func (sm *Manager) SetLocale(ctx context.Context, locale string) error {
    +	req := types.SetLocale{
    +		This:   sm.Reference(),
    +		Locale: locale,
    +	}
    +
    +	_, err := methods.SetLocale(ctx, sm.client, &req)
    +	return err
    +}
    +
    +func (sm *Manager) Login(ctx context.Context, u *url.Userinfo) error {
    +	req := types.Login{
    +		This:   sm.Reference(),
    +		Locale: Locale,
    +	}
    +
    +	if u != nil {
    +		req.UserName = u.Username()
    +		if pw, ok := u.Password(); ok {
    +			req.Password = pw
    +		}
    +	}
    +
    +	login, err := methods.Login(ctx, sm.client, &req)
    +	if err != nil {
    +		return err
    +	}
    +
    +	sm.userSession = &login.Returnval
    +	return nil
    +}
    +
    +// LoginExtensionByCertificate uses the vCenter SDK tunnel to login using a client certificate.
    +// The client certificate can be set using the soap.Client.SetCertificate method.
    +// See: https://kb.vmware.com/s/article/2004305
    +func (sm *Manager) LoginExtensionByCertificate(ctx context.Context, key string) error {
    +	c := sm.client
    +	u := c.URL()
    +	if u.Hostname() != "sdkTunnel" {
    +		sc := c.Tunnel()
    +		c = &vim25.Client{
    +			Client:         sc,
    +			RoundTripper:   sc,
    +			ServiceContent: c.ServiceContent,
    +		}
    +		// When http.Transport.Proxy is used, our thumbprint checker is bypassed, resulting in:
    +		// "Post https://sdkTunnel:8089/sdk: x509: certificate is valid for $vcenter_hostname, not sdkTunnel"
    +		// The only easy way around this is to disable verification for the call to LoginExtensionByCertificate().
    +		// TODO: find a way to avoid disabling InsecureSkipVerify.
    +		c.Transport.(*http.Transport).TLSClientConfig.InsecureSkipVerify = true
    +	}
    +
    +	req := types.LoginExtensionByCertificate{
    +		This:         sm.Reference(),
    +		ExtensionKey: key,
    +		Locale:       Locale,
    +	}
    +
    +	login, err := methods.LoginExtensionByCertificate(ctx, c, &req)
    +	if err != nil {
    +		return err
    +	}
    +
    +	// Copy the session cookie
    +	sm.client.Jar.SetCookies(u, c.Jar.Cookies(c.URL()))
    +
    +	sm.userSession = &login.Returnval
    +	return nil
    +}
    +
    +func (sm *Manager) LoginByToken(ctx context.Context) error {
    +	req := types.LoginByToken{
    +		This:   sm.Reference(),
    +		Locale: Locale,
    +	}
    +
    +	login, err := methods.LoginByToken(ctx, sm.client, &req)
    +	if err != nil {
    +		return err
    +	}
    +
    +	sm.userSession = &login.Returnval
    +	return nil
    +}
    +
    +func (sm *Manager) Logout(ctx context.Context) error {
    +	req := types.Logout{
    +		This: sm.Reference(),
    +	}
    +
    +	_, err := methods.Logout(ctx, sm.client, &req)
    +	if err != nil {
    +		return err
    +	}
    +
    +	sm.userSession = nil
    +	return nil
    +}
    +
    +// UserSession retrieves and returns the SessionManager's CurrentSession field.
    +// Nil is returned if the session is not authenticated.
    +func (sm *Manager) UserSession(ctx context.Context) (*types.UserSession, error) {
    +	var mgr mo.SessionManager
    +
    +	pc := property.DefaultCollector(sm.client)
    +	err := pc.RetrieveOne(ctx, sm.Reference(), []string{"currentSession"}, &mgr)
    +	if err != nil {
    +		// It's OK if we can't retrieve properties because we're not authenticated
    +		if f, ok := err.(types.HasFault); ok {
    +			switch f.Fault().(type) {
    +			case *types.NotAuthenticated:
    +				return nil, nil
    +			}
    +		}
    +
    +		return nil, err
    +	}
    +
    +	return mgr.CurrentSession, nil
    +}
    +
    +func (sm *Manager) TerminateSession(ctx context.Context, sessionId []string) error {
    +	req := types.TerminateSession{
    +		This:      sm.Reference(),
    +		SessionId: sessionId,
    +	}
    +
    +	_, err := methods.TerminateSession(ctx, sm.client, &req)
    +	return err
    +}
    +
    +// SessionIsActive checks whether the session that was created at login is
    +// still valid. This function only works against vCenter.
    +func (sm *Manager) SessionIsActive(ctx context.Context) (bool, error) {
    +	if sm.userSession == nil {
    +		return false, nil
    +	}
    +
    +	req := types.SessionIsActive{
    +		This:      sm.Reference(),
    +		SessionID: sm.userSession.Key,
    +		UserName:  sm.userSession.UserName,
    +	}
    +
    +	active, err := methods.SessionIsActive(ctx, sm.client, &req)
    +	if err != nil {
    +		return false, err
    +	}
    +
    +	return active.Returnval, err
    +}
    +
    +func (sm *Manager) AcquireGenericServiceTicket(ctx context.Context, spec types.BaseSessionManagerServiceRequestSpec) (*types.SessionManagerGenericServiceTicket, error) {
    +	req := types.AcquireGenericServiceTicket{
    +		This: sm.Reference(),
    +		Spec: spec,
    +	}
    +
    +	res, err := methods.AcquireGenericServiceTicket(ctx, sm.client, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return &res.Returnval, nil
    +}
    +
    +func (sm *Manager) AcquireLocalTicket(ctx context.Context, userName string) (*types.SessionManagerLocalTicket, error) {
    +	req := types.AcquireLocalTicket{
    +		This:     sm.Reference(),
    +		UserName: userName,
    +	}
    +
    +	res, err := methods.AcquireLocalTicket(ctx, sm.client, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return &res.Returnval, nil
    +}
    +
    +func (sm *Manager) AcquireCloneTicket(ctx context.Context) (string, error) {
    +	req := types.AcquireCloneTicket{
    +		This: sm.Reference(),
    +	}
    +
    +	res, err := methods.AcquireCloneTicket(ctx, sm.client, &req)
    +	if err != nil {
    +		return "", err
    +	}
    +
    +	return res.Returnval, nil
    +}
    +
    +func (sm *Manager) CloneSession(ctx context.Context, ticket string) error {
    +	req := types.CloneSession{
    +		This:        sm.Reference(),
    +		CloneTicket: ticket,
    +	}
    +
    +	res, err := methods.CloneSession(ctx, sm.client, &req)
    +	if err != nil {
    +		return err
    +	}
    +
    +	sm.userSession = &res.Returnval
    +	return nil
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/task/error.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/task/error.go
    new file mode 100644
    index 000000000..5f6b8503f
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/task/error.go
    @@ -0,0 +1,32 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package task
    +
    +import "github.com/vmware/govmomi/vim25/types"
    +
    +type Error struct {
    +	*types.LocalizedMethodFault
    +}
    +
    +// Error returns the task's localized fault message.
    +func (e Error) Error() string {
    +	return e.LocalizedMethodFault.LocalizedMessage
    +}
    +
    +func (e Error) Fault() types.BaseMethodFault {
    +	return e.LocalizedMethodFault.Fault
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/task/wait.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/task/wait.go
    new file mode 100644
    index 000000000..19fee5384
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/task/wait.go
    @@ -0,0 +1,132 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package task
    +
    +import (
    +	"context"
    +
    +	"github.com/vmware/govmomi/property"
    +	"github.com/vmware/govmomi/vim25/progress"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +type taskProgress struct {
    +	info *types.TaskInfo
    +}
    +
    +func (t taskProgress) Percentage() float32 {
    +	return float32(t.info.Progress)
    +}
    +
    +func (t taskProgress) Detail() string {
    +	return ""
    +}
    +
    +func (t taskProgress) Error() error {
    +	if t.info.Error != nil {
    +		return Error{t.info.Error}
    +	}
    +
    +	return nil
    +}
    +
    +type taskCallback struct {
    +	ch   chan<- progress.Report
    +	info *types.TaskInfo
    +	err  error
    +}
    +
    +func (t *taskCallback) fn(pc []types.PropertyChange) bool {
    +	for _, c := range pc {
    +		if c.Name != "info" {
    +			continue
    +		}
    +
    +		if c.Op != types.PropertyChangeOpAssign {
    +			continue
    +		}
    +
    +		if c.Val == nil {
    +			continue
    +		}
    +
    +		ti := c.Val.(types.TaskInfo)
    +		t.info = &ti
    +	}
    +
    +	// t.info could be nil if pc can't satify the rules above
    +	if t.info == nil {
    +		return false
    +	}
    +
    +	pr := taskProgress{t.info}
    +
    +	// Store copy of error, so Wait() can return it as well.
    +	t.err = pr.Error()
    +
    +	switch t.info.State {
    +	case types.TaskInfoStateQueued, types.TaskInfoStateRunning:
    +		if t.ch != nil {
    +			// Don't care if this is dropped
    +			select {
    +			case t.ch <- pr:
    +			default:
    +			}
    +		}
    +		return false
    +	case types.TaskInfoStateSuccess, types.TaskInfoStateError:
    +		if t.ch != nil {
    +			// Last one must always be delivered
    +			t.ch <- pr
    +		}
    +		return true
    +	default:
    +		panic("unknown state: " + t.info.State)
    +	}
    +}
    +
    +// Wait waits for a task to finish with either success or failure. It does so
    +// by waiting for the "info" property of task managed object to change. The
    +// function returns when it finds the task in the "success" or "error" state.
    +// In the former case, the return value is nil. In the latter case the return
    +// value is an instance of this package's Error struct.
    +//
    +// Any error returned while waiting for property changes causes the function to
    +// return immediately and propagate the error.
    +//
    +// If the progress.Sinker argument is specified, any progress updates for the
    +// task are sent here. The completion percentage is passed through directly.
    +// The detail for the progress update is set to an empty string. If the task
    +// finishes in the error state, the error instance is passed through as well.
    +// Note that this error is the same error that is returned by this function.
    +//
    +func Wait(ctx context.Context, ref types.ManagedObjectReference, pc *property.Collector, s progress.Sinker) (*types.TaskInfo, error) {
    +	cb := &taskCallback{}
    +
    +	// Include progress sink if specified
    +	if s != nil {
    +		cb.ch = s.Sink()
    +		defer close(cb.ch)
    +	}
    +
    +	err := property.Wait(ctx, pc, ref, []string{"info"}, cb.fn)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return cb.info, cb.err
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/client.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/client.go
    new file mode 100644
    index 000000000..1d26fb8b6
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/client.go
    @@ -0,0 +1,146 @@
    +/*
    +Copyright (c) 2015-2016 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package vim25
    +
    +import (
    +	"context"
    +	"encoding/json"
    +	"strings"
    +
    +	"github.com/vmware/govmomi/vim25/methods"
    +	"github.com/vmware/govmomi/vim25/soap"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +const (
    +	Namespace = "vim25"
    +	Version   = "6.7"
    +	Path      = "/sdk"
    +)
    +
    +var (
    +	ServiceInstance = types.ManagedObjectReference{
    +		Type:  "ServiceInstance",
    +		Value: "ServiceInstance",
    +	}
    +)
    +
    +// Client is a tiny wrapper around the vim25/soap Client that stores session
    +// specific state (i.e. state that only needs to be retrieved once after the
    +// client has been created). This means the client can be reused after
    +// serialization without performing additional requests for initialization.
    +type Client struct {
    +	*soap.Client
    +
    +	ServiceContent types.ServiceContent
    +
    +	// RoundTripper is a separate field such that the client's implementation of
    +	// the RoundTripper interface can be wrapped by separate implementations for
    +	// extra functionality (for example, reauthentication on session timeout).
    +	RoundTripper soap.RoundTripper
    +}
    +
    +// NewClient creates and returns a new client wirh the ServiceContent field
    +// filled in.
    +func NewClient(ctx context.Context, rt soap.RoundTripper) (*Client, error) {
    +	c := Client{
    +		RoundTripper: rt,
    +	}
    +
    +	// Set client if it happens to be a soap.Client
    +	if sc, ok := rt.(*soap.Client); ok {
    +		c.Client = sc
    +
    +		if c.Namespace == "" {
    +			c.Namespace = "urn:" + Namespace
    +		} else if strings.Index(c.Namespace, ":") < 0 {
    +			c.Namespace = "urn:" + c.Namespace // ensure valid URI format
    +		}
    +		if c.Version == "" {
    +			c.Version = Version
    +		}
    +	}
    +
    +	var err error
    +	c.ServiceContent, err = methods.GetServiceContent(ctx, rt)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return &c, nil
    +}
    +
    +// RoundTrip dispatches to the RoundTripper field.
    +func (c *Client) RoundTrip(ctx context.Context, req, res soap.HasFault) error {
    +	return c.RoundTripper.RoundTrip(ctx, req, res)
    +}
    +
    +type marshaledClient struct {
    +	SoapClient     *soap.Client
    +	ServiceContent types.ServiceContent
    +}
    +
    +func (c *Client) MarshalJSON() ([]byte, error) {
    +	m := marshaledClient{
    +		SoapClient:     c.Client,
    +		ServiceContent: c.ServiceContent,
    +	}
    +
    +	return json.Marshal(m)
    +}
    +
    +func (c *Client) UnmarshalJSON(b []byte) error {
    +	var m marshaledClient
    +
    +	err := json.Unmarshal(b, &m)
    +	if err != nil {
    +		return err
    +	}
    +
    +	*c = Client{
    +		Client:         m.SoapClient,
    +		ServiceContent: m.ServiceContent,
    +		RoundTripper:   m.SoapClient,
    +	}
    +
    +	return nil
    +}
    +
    +// Valid returns whether or not the client is valid and ready for use.
    +// This should be called after unmarshalling the client.
    +func (c *Client) Valid() bool {
    +	if c == nil {
    +		return false
    +	}
    +
    +	if c.Client == nil {
    +		return false
    +	}
    +
    +	// Use arbitrary pointer field in the service content.
    +	// Doesn't matter which one, as long as it is populated by default.
    +	if c.ServiceContent.SessionManager == nil {
    +		return false
    +	}
    +
    +	return true
    +}
    +
    +// IsVC returns true if we are connected to a vCenter
    +func (c *Client) IsVC() bool {
    +	return c.ServiceContent.About.ApiType == "VirtualCenter"
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/debug/debug.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/debug/debug.go
    new file mode 100644
    index 000000000..22d547178
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/debug/debug.go
    @@ -0,0 +1,81 @@
    +/*
    +Copyright (c) 2014 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package debug
    +
    +import (
    +	"io"
    +	"os"
    +	"path"
    +)
    +
    +// Provider specified the interface types must implement to be used as a
    +// debugging sink. Having multiple such sink implementations allows it to be
    +// changed externally (for example when running tests).
    +type Provider interface {
    +	NewFile(s string) io.WriteCloser
    +	Flush()
    +}
    +
    +var currentProvider Provider = nil
    +
    +func SetProvider(p Provider) {
    +	if currentProvider != nil {
    +		currentProvider.Flush()
    +	}
    +	currentProvider = p
    +}
    +
    +// Enabled returns whether debugging is enabled or not.
    +func Enabled() bool {
    +	return currentProvider != nil
    +}
    +
    +// NewFile dispatches to the current provider's NewFile function.
    +func NewFile(s string) io.WriteCloser {
    +	return currentProvider.NewFile(s)
    +}
    +
    +// Flush dispatches to the current provider's Flush function.
    +func Flush() {
    +	currentProvider.Flush()
    +}
    +
    +// FileProvider implements a debugging provider that creates a real file for
    +// every call to NewFile. It maintains a list of all files that it creates,
    +// such that it can close them when its Flush function is called.
    +type FileProvider struct {
    +	Path string
    +
    +	files []*os.File
    +}
    +
    +func (fp *FileProvider) NewFile(p string) io.WriteCloser {
    +	f, err := os.Create(path.Join(fp.Path, p))
    +	if err != nil {
    +		panic(err)
    +	}
    +
    +	fp.files = append(fp.files, f)
    +
    +	return f
    +}
    +
    +func (fp *FileProvider) Flush() {
    +	for _, f := range fp.files {
    +		f.Close()
    +	}
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/doc.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/doc.go
    new file mode 100644
    index 000000000..acb2c9f64
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/doc.go
    @@ -0,0 +1,29 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +/*
    +Package vim25 provides a minimal client implementation to use with other
    +packages in the vim25 tree. The code in this package intentionally does not
    +take any dependendies outside the vim25 tree.
    +
    +The client implementation in this package embeds the soap.Client structure.
    +Additionally, it stores the value of the session's ServiceContent object. This
    +object stores references to a variety of subsystems, such as the root property
    +collector, the session manager, and the search index. The client is fully
    +functional after serialization and deserialization, without the need for
    +additional requests for initialization.
    +*/
    +package vim25
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/methods/methods.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/methods/methods.go
    new file mode 100644
    index 000000000..c3ad23eef
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/methods/methods.go
    @@ -0,0 +1,17284 @@
    +/*
    +Copyright (c) 2014-2018 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package methods
    +
    +import (
    +	"context"
    +
    +	"github.com/vmware/govmomi/vim25/soap"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +type AbdicateDomOwnershipBody struct {
    +	Req    *types.AbdicateDomOwnership         `xml:"urn:vim25 AbdicateDomOwnership,omitempty"`
    +	Res    *types.AbdicateDomOwnershipResponse `xml:"urn:vim25 AbdicateDomOwnershipResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *AbdicateDomOwnershipBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func AbdicateDomOwnership(ctx context.Context, r soap.RoundTripper, req *types.AbdicateDomOwnership) (*types.AbdicateDomOwnershipResponse, error) {
    +	var reqBody, resBody AbdicateDomOwnershipBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type AcknowledgeAlarmBody struct {
    +	Req    *types.AcknowledgeAlarm         `xml:"urn:vim25 AcknowledgeAlarm,omitempty"`
    +	Res    *types.AcknowledgeAlarmResponse `xml:"urn:vim25 AcknowledgeAlarmResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *AcknowledgeAlarmBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func AcknowledgeAlarm(ctx context.Context, r soap.RoundTripper, req *types.AcknowledgeAlarm) (*types.AcknowledgeAlarmResponse, error) {
    +	var reqBody, resBody AcknowledgeAlarmBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type AcquireCimServicesTicketBody struct {
    +	Req    *types.AcquireCimServicesTicket         `xml:"urn:vim25 AcquireCimServicesTicket,omitempty"`
    +	Res    *types.AcquireCimServicesTicketResponse `xml:"urn:vim25 AcquireCimServicesTicketResponse,omitempty"`
    +	Fault_ *soap.Fault                             `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *AcquireCimServicesTicketBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func AcquireCimServicesTicket(ctx context.Context, r soap.RoundTripper, req *types.AcquireCimServicesTicket) (*types.AcquireCimServicesTicketResponse, error) {
    +	var reqBody, resBody AcquireCimServicesTicketBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type AcquireCloneTicketBody struct {
    +	Req    *types.AcquireCloneTicket         `xml:"urn:vim25 AcquireCloneTicket,omitempty"`
    +	Res    *types.AcquireCloneTicketResponse `xml:"urn:vim25 AcquireCloneTicketResponse,omitempty"`
    +	Fault_ *soap.Fault                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *AcquireCloneTicketBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func AcquireCloneTicket(ctx context.Context, r soap.RoundTripper, req *types.AcquireCloneTicket) (*types.AcquireCloneTicketResponse, error) {
    +	var reqBody, resBody AcquireCloneTicketBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type AcquireCredentialsInGuestBody struct {
    +	Req    *types.AcquireCredentialsInGuest         `xml:"urn:vim25 AcquireCredentialsInGuest,omitempty"`
    +	Res    *types.AcquireCredentialsInGuestResponse `xml:"urn:vim25 AcquireCredentialsInGuestResponse,omitempty"`
    +	Fault_ *soap.Fault                              `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *AcquireCredentialsInGuestBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func AcquireCredentialsInGuest(ctx context.Context, r soap.RoundTripper, req *types.AcquireCredentialsInGuest) (*types.AcquireCredentialsInGuestResponse, error) {
    +	var reqBody, resBody AcquireCredentialsInGuestBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type AcquireGenericServiceTicketBody struct {
    +	Req    *types.AcquireGenericServiceTicket         `xml:"urn:vim25 AcquireGenericServiceTicket,omitempty"`
    +	Res    *types.AcquireGenericServiceTicketResponse `xml:"urn:vim25 AcquireGenericServiceTicketResponse,omitempty"`
    +	Fault_ *soap.Fault                                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *AcquireGenericServiceTicketBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func AcquireGenericServiceTicket(ctx context.Context, r soap.RoundTripper, req *types.AcquireGenericServiceTicket) (*types.AcquireGenericServiceTicketResponse, error) {
    +	var reqBody, resBody AcquireGenericServiceTicketBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type AcquireLocalTicketBody struct {
    +	Req    *types.AcquireLocalTicket         `xml:"urn:vim25 AcquireLocalTicket,omitempty"`
    +	Res    *types.AcquireLocalTicketResponse `xml:"urn:vim25 AcquireLocalTicketResponse,omitempty"`
    +	Fault_ *soap.Fault                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *AcquireLocalTicketBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func AcquireLocalTicket(ctx context.Context, r soap.RoundTripper, req *types.AcquireLocalTicket) (*types.AcquireLocalTicketResponse, error) {
    +	var reqBody, resBody AcquireLocalTicketBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type AcquireMksTicketBody struct {
    +	Req    *types.AcquireMksTicket         `xml:"urn:vim25 AcquireMksTicket,omitempty"`
    +	Res    *types.AcquireMksTicketResponse `xml:"urn:vim25 AcquireMksTicketResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *AcquireMksTicketBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func AcquireMksTicket(ctx context.Context, r soap.RoundTripper, req *types.AcquireMksTicket) (*types.AcquireMksTicketResponse, error) {
    +	var reqBody, resBody AcquireMksTicketBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type AcquireTicketBody struct {
    +	Req    *types.AcquireTicket         `xml:"urn:vim25 AcquireTicket,omitempty"`
    +	Res    *types.AcquireTicketResponse `xml:"urn:vim25 AcquireTicketResponse,omitempty"`
    +	Fault_ *soap.Fault                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *AcquireTicketBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func AcquireTicket(ctx context.Context, r soap.RoundTripper, req *types.AcquireTicket) (*types.AcquireTicketResponse, error) {
    +	var reqBody, resBody AcquireTicketBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type AddAuthorizationRoleBody struct {
    +	Req    *types.AddAuthorizationRole         `xml:"urn:vim25 AddAuthorizationRole,omitempty"`
    +	Res    *types.AddAuthorizationRoleResponse `xml:"urn:vim25 AddAuthorizationRoleResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *AddAuthorizationRoleBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func AddAuthorizationRole(ctx context.Context, r soap.RoundTripper, req *types.AddAuthorizationRole) (*types.AddAuthorizationRoleResponse, error) {
    +	var reqBody, resBody AddAuthorizationRoleBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type AddCustomFieldDefBody struct {
    +	Req    *types.AddCustomFieldDef         `xml:"urn:vim25 AddCustomFieldDef,omitempty"`
    +	Res    *types.AddCustomFieldDefResponse `xml:"urn:vim25 AddCustomFieldDefResponse,omitempty"`
    +	Fault_ *soap.Fault                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *AddCustomFieldDefBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func AddCustomFieldDef(ctx context.Context, r soap.RoundTripper, req *types.AddCustomFieldDef) (*types.AddCustomFieldDefResponse, error) {
    +	var reqBody, resBody AddCustomFieldDefBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type AddDVPortgroup_TaskBody struct {
    +	Req    *types.AddDVPortgroup_Task         `xml:"urn:vim25 AddDVPortgroup_Task,omitempty"`
    +	Res    *types.AddDVPortgroup_TaskResponse `xml:"urn:vim25 AddDVPortgroup_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *AddDVPortgroup_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func AddDVPortgroup_Task(ctx context.Context, r soap.RoundTripper, req *types.AddDVPortgroup_Task) (*types.AddDVPortgroup_TaskResponse, error) {
    +	var reqBody, resBody AddDVPortgroup_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type AddDisks_TaskBody struct {
    +	Req    *types.AddDisks_Task         `xml:"urn:vim25 AddDisks_Task,omitempty"`
    +	Res    *types.AddDisks_TaskResponse `xml:"urn:vim25 AddDisks_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *AddDisks_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func AddDisks_Task(ctx context.Context, r soap.RoundTripper, req *types.AddDisks_Task) (*types.AddDisks_TaskResponse, error) {
    +	var reqBody, resBody AddDisks_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type AddFilterBody struct {
    +	Req    *types.AddFilter         `xml:"urn:vim25 AddFilter,omitempty"`
    +	Res    *types.AddFilterResponse `xml:"urn:vim25 AddFilterResponse,omitempty"`
    +	Fault_ *soap.Fault              `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *AddFilterBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func AddFilter(ctx context.Context, r soap.RoundTripper, req *types.AddFilter) (*types.AddFilterResponse, error) {
    +	var reqBody, resBody AddFilterBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type AddFilterEntitiesBody struct {
    +	Req    *types.AddFilterEntities         `xml:"urn:vim25 AddFilterEntities,omitempty"`
    +	Res    *types.AddFilterEntitiesResponse `xml:"urn:vim25 AddFilterEntitiesResponse,omitempty"`
    +	Fault_ *soap.Fault                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *AddFilterEntitiesBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func AddFilterEntities(ctx context.Context, r soap.RoundTripper, req *types.AddFilterEntities) (*types.AddFilterEntitiesResponse, error) {
    +	var reqBody, resBody AddFilterEntitiesBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type AddGuestAliasBody struct {
    +	Req    *types.AddGuestAlias         `xml:"urn:vim25 AddGuestAlias,omitempty"`
    +	Res    *types.AddGuestAliasResponse `xml:"urn:vim25 AddGuestAliasResponse,omitempty"`
    +	Fault_ *soap.Fault                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *AddGuestAliasBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func AddGuestAlias(ctx context.Context, r soap.RoundTripper, req *types.AddGuestAlias) (*types.AddGuestAliasResponse, error) {
    +	var reqBody, resBody AddGuestAliasBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type AddHost_TaskBody struct {
    +	Req    *types.AddHost_Task         `xml:"urn:vim25 AddHost_Task,omitempty"`
    +	Res    *types.AddHost_TaskResponse `xml:"urn:vim25 AddHost_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *AddHost_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func AddHost_Task(ctx context.Context, r soap.RoundTripper, req *types.AddHost_Task) (*types.AddHost_TaskResponse, error) {
    +	var reqBody, resBody AddHost_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type AddInternetScsiSendTargetsBody struct {
    +	Req    *types.AddInternetScsiSendTargets         `xml:"urn:vim25 AddInternetScsiSendTargets,omitempty"`
    +	Res    *types.AddInternetScsiSendTargetsResponse `xml:"urn:vim25 AddInternetScsiSendTargetsResponse,omitempty"`
    +	Fault_ *soap.Fault                               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *AddInternetScsiSendTargetsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func AddInternetScsiSendTargets(ctx context.Context, r soap.RoundTripper, req *types.AddInternetScsiSendTargets) (*types.AddInternetScsiSendTargetsResponse, error) {
    +	var reqBody, resBody AddInternetScsiSendTargetsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type AddInternetScsiStaticTargetsBody struct {
    +	Req    *types.AddInternetScsiStaticTargets         `xml:"urn:vim25 AddInternetScsiStaticTargets,omitempty"`
    +	Res    *types.AddInternetScsiStaticTargetsResponse `xml:"urn:vim25 AddInternetScsiStaticTargetsResponse,omitempty"`
    +	Fault_ *soap.Fault                                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *AddInternetScsiStaticTargetsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func AddInternetScsiStaticTargets(ctx context.Context, r soap.RoundTripper, req *types.AddInternetScsiStaticTargets) (*types.AddInternetScsiStaticTargetsResponse, error) {
    +	var reqBody, resBody AddInternetScsiStaticTargetsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type AddKeyBody struct {
    +	Req    *types.AddKey         `xml:"urn:vim25 AddKey,omitempty"`
    +	Res    *types.AddKeyResponse `xml:"urn:vim25 AddKeyResponse,omitempty"`
    +	Fault_ *soap.Fault           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *AddKeyBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func AddKey(ctx context.Context, r soap.RoundTripper, req *types.AddKey) (*types.AddKeyResponse, error) {
    +	var reqBody, resBody AddKeyBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type AddKeysBody struct {
    +	Req    *types.AddKeys         `xml:"urn:vim25 AddKeys,omitempty"`
    +	Res    *types.AddKeysResponse `xml:"urn:vim25 AddKeysResponse,omitempty"`
    +	Fault_ *soap.Fault            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *AddKeysBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func AddKeys(ctx context.Context, r soap.RoundTripper, req *types.AddKeys) (*types.AddKeysResponse, error) {
    +	var reqBody, resBody AddKeysBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type AddLicenseBody struct {
    +	Req    *types.AddLicense         `xml:"urn:vim25 AddLicense,omitempty"`
    +	Res    *types.AddLicenseResponse `xml:"urn:vim25 AddLicenseResponse,omitempty"`
    +	Fault_ *soap.Fault               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *AddLicenseBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func AddLicense(ctx context.Context, r soap.RoundTripper, req *types.AddLicense) (*types.AddLicenseResponse, error) {
    +	var reqBody, resBody AddLicenseBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type AddMonitoredEntitiesBody struct {
    +	Req    *types.AddMonitoredEntities         `xml:"urn:vim25 AddMonitoredEntities,omitempty"`
    +	Res    *types.AddMonitoredEntitiesResponse `xml:"urn:vim25 AddMonitoredEntitiesResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *AddMonitoredEntitiesBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func AddMonitoredEntities(ctx context.Context, r soap.RoundTripper, req *types.AddMonitoredEntities) (*types.AddMonitoredEntitiesResponse, error) {
    +	var reqBody, resBody AddMonitoredEntitiesBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type AddNetworkResourcePoolBody struct {
    +	Req    *types.AddNetworkResourcePool         `xml:"urn:vim25 AddNetworkResourcePool,omitempty"`
    +	Res    *types.AddNetworkResourcePoolResponse `xml:"urn:vim25 AddNetworkResourcePoolResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *AddNetworkResourcePoolBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func AddNetworkResourcePool(ctx context.Context, r soap.RoundTripper, req *types.AddNetworkResourcePool) (*types.AddNetworkResourcePoolResponse, error) {
    +	var reqBody, resBody AddNetworkResourcePoolBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type AddPortGroupBody struct {
    +	Req    *types.AddPortGroup         `xml:"urn:vim25 AddPortGroup,omitempty"`
    +	Res    *types.AddPortGroupResponse `xml:"urn:vim25 AddPortGroupResponse,omitempty"`
    +	Fault_ *soap.Fault                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *AddPortGroupBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func AddPortGroup(ctx context.Context, r soap.RoundTripper, req *types.AddPortGroup) (*types.AddPortGroupResponse, error) {
    +	var reqBody, resBody AddPortGroupBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type AddServiceConsoleVirtualNicBody struct {
    +	Req    *types.AddServiceConsoleVirtualNic         `xml:"urn:vim25 AddServiceConsoleVirtualNic,omitempty"`
    +	Res    *types.AddServiceConsoleVirtualNicResponse `xml:"urn:vim25 AddServiceConsoleVirtualNicResponse,omitempty"`
    +	Fault_ *soap.Fault                                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *AddServiceConsoleVirtualNicBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func AddServiceConsoleVirtualNic(ctx context.Context, r soap.RoundTripper, req *types.AddServiceConsoleVirtualNic) (*types.AddServiceConsoleVirtualNicResponse, error) {
    +	var reqBody, resBody AddServiceConsoleVirtualNicBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type AddStandaloneHost_TaskBody struct {
    +	Req    *types.AddStandaloneHost_Task         `xml:"urn:vim25 AddStandaloneHost_Task,omitempty"`
    +	Res    *types.AddStandaloneHost_TaskResponse `xml:"urn:vim25 AddStandaloneHost_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *AddStandaloneHost_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func AddStandaloneHost_Task(ctx context.Context, r soap.RoundTripper, req *types.AddStandaloneHost_Task) (*types.AddStandaloneHost_TaskResponse, error) {
    +	var reqBody, resBody AddStandaloneHost_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type AddVirtualNicBody struct {
    +	Req    *types.AddVirtualNic         `xml:"urn:vim25 AddVirtualNic,omitempty"`
    +	Res    *types.AddVirtualNicResponse `xml:"urn:vim25 AddVirtualNicResponse,omitempty"`
    +	Fault_ *soap.Fault                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *AddVirtualNicBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func AddVirtualNic(ctx context.Context, r soap.RoundTripper, req *types.AddVirtualNic) (*types.AddVirtualNicResponse, error) {
    +	var reqBody, resBody AddVirtualNicBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type AddVirtualSwitchBody struct {
    +	Req    *types.AddVirtualSwitch         `xml:"urn:vim25 AddVirtualSwitch,omitempty"`
    +	Res    *types.AddVirtualSwitchResponse `xml:"urn:vim25 AddVirtualSwitchResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *AddVirtualSwitchBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func AddVirtualSwitch(ctx context.Context, r soap.RoundTripper, req *types.AddVirtualSwitch) (*types.AddVirtualSwitchResponse, error) {
    +	var reqBody, resBody AddVirtualSwitchBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type AllocateIpv4AddressBody struct {
    +	Req    *types.AllocateIpv4Address         `xml:"urn:vim25 AllocateIpv4Address,omitempty"`
    +	Res    *types.AllocateIpv4AddressResponse `xml:"urn:vim25 AllocateIpv4AddressResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *AllocateIpv4AddressBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func AllocateIpv4Address(ctx context.Context, r soap.RoundTripper, req *types.AllocateIpv4Address) (*types.AllocateIpv4AddressResponse, error) {
    +	var reqBody, resBody AllocateIpv4AddressBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type AllocateIpv6AddressBody struct {
    +	Req    *types.AllocateIpv6Address         `xml:"urn:vim25 AllocateIpv6Address,omitempty"`
    +	Res    *types.AllocateIpv6AddressResponse `xml:"urn:vim25 AllocateIpv6AddressResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *AllocateIpv6AddressBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func AllocateIpv6Address(ctx context.Context, r soap.RoundTripper, req *types.AllocateIpv6Address) (*types.AllocateIpv6AddressResponse, error) {
    +	var reqBody, resBody AllocateIpv6AddressBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type AnswerVMBody struct {
    +	Req    *types.AnswerVM         `xml:"urn:vim25 AnswerVM,omitempty"`
    +	Res    *types.AnswerVMResponse `xml:"urn:vim25 AnswerVMResponse,omitempty"`
    +	Fault_ *soap.Fault             `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *AnswerVMBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func AnswerVM(ctx context.Context, r soap.RoundTripper, req *types.AnswerVM) (*types.AnswerVMResponse, error) {
    +	var reqBody, resBody AnswerVMBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ApplyEntitiesConfig_TaskBody struct {
    +	Req    *types.ApplyEntitiesConfig_Task         `xml:"urn:vim25 ApplyEntitiesConfig_Task,omitempty"`
    +	Res    *types.ApplyEntitiesConfig_TaskResponse `xml:"urn:vim25 ApplyEntitiesConfig_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                             `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ApplyEntitiesConfig_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ApplyEntitiesConfig_Task(ctx context.Context, r soap.RoundTripper, req *types.ApplyEntitiesConfig_Task) (*types.ApplyEntitiesConfig_TaskResponse, error) {
    +	var reqBody, resBody ApplyEntitiesConfig_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ApplyEvcModeVM_TaskBody struct {
    +	Req    *types.ApplyEvcModeVM_Task         `xml:"urn:vim25 ApplyEvcModeVM_Task,omitempty"`
    +	Res    *types.ApplyEvcModeVM_TaskResponse `xml:"urn:vim25 ApplyEvcModeVM_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ApplyEvcModeVM_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ApplyEvcModeVM_Task(ctx context.Context, r soap.RoundTripper, req *types.ApplyEvcModeVM_Task) (*types.ApplyEvcModeVM_TaskResponse, error) {
    +	var reqBody, resBody ApplyEvcModeVM_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ApplyHostConfig_TaskBody struct {
    +	Req    *types.ApplyHostConfig_Task         `xml:"urn:vim25 ApplyHostConfig_Task,omitempty"`
    +	Res    *types.ApplyHostConfig_TaskResponse `xml:"urn:vim25 ApplyHostConfig_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ApplyHostConfig_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ApplyHostConfig_Task(ctx context.Context, r soap.RoundTripper, req *types.ApplyHostConfig_Task) (*types.ApplyHostConfig_TaskResponse, error) {
    +	var reqBody, resBody ApplyHostConfig_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ApplyRecommendationBody struct {
    +	Req    *types.ApplyRecommendation         `xml:"urn:vim25 ApplyRecommendation,omitempty"`
    +	Res    *types.ApplyRecommendationResponse `xml:"urn:vim25 ApplyRecommendationResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ApplyRecommendationBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ApplyRecommendation(ctx context.Context, r soap.RoundTripper, req *types.ApplyRecommendation) (*types.ApplyRecommendationResponse, error) {
    +	var reqBody, resBody ApplyRecommendationBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ApplyStorageDrsRecommendationToPod_TaskBody struct {
    +	Req    *types.ApplyStorageDrsRecommendationToPod_Task         `xml:"urn:vim25 ApplyStorageDrsRecommendationToPod_Task,omitempty"`
    +	Res    *types.ApplyStorageDrsRecommendationToPod_TaskResponse `xml:"urn:vim25 ApplyStorageDrsRecommendationToPod_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ApplyStorageDrsRecommendationToPod_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ApplyStorageDrsRecommendationToPod_Task(ctx context.Context, r soap.RoundTripper, req *types.ApplyStorageDrsRecommendationToPod_Task) (*types.ApplyStorageDrsRecommendationToPod_TaskResponse, error) {
    +	var reqBody, resBody ApplyStorageDrsRecommendationToPod_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ApplyStorageDrsRecommendation_TaskBody struct {
    +	Req    *types.ApplyStorageDrsRecommendation_Task         `xml:"urn:vim25 ApplyStorageDrsRecommendation_Task,omitempty"`
    +	Res    *types.ApplyStorageDrsRecommendation_TaskResponse `xml:"urn:vim25 ApplyStorageDrsRecommendation_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ApplyStorageDrsRecommendation_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ApplyStorageDrsRecommendation_Task(ctx context.Context, r soap.RoundTripper, req *types.ApplyStorageDrsRecommendation_Task) (*types.ApplyStorageDrsRecommendation_TaskResponse, error) {
    +	var reqBody, resBody ApplyStorageDrsRecommendation_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type AreAlarmActionsEnabledBody struct {
    +	Req    *types.AreAlarmActionsEnabled         `xml:"urn:vim25 AreAlarmActionsEnabled,omitempty"`
    +	Res    *types.AreAlarmActionsEnabledResponse `xml:"urn:vim25 AreAlarmActionsEnabledResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *AreAlarmActionsEnabledBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func AreAlarmActionsEnabled(ctx context.Context, r soap.RoundTripper, req *types.AreAlarmActionsEnabled) (*types.AreAlarmActionsEnabledResponse, error) {
    +	var reqBody, resBody AreAlarmActionsEnabledBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type AssignUserToGroupBody struct {
    +	Req    *types.AssignUserToGroup         `xml:"urn:vim25 AssignUserToGroup,omitempty"`
    +	Res    *types.AssignUserToGroupResponse `xml:"urn:vim25 AssignUserToGroupResponse,omitempty"`
    +	Fault_ *soap.Fault                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *AssignUserToGroupBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func AssignUserToGroup(ctx context.Context, r soap.RoundTripper, req *types.AssignUserToGroup) (*types.AssignUserToGroupResponse, error) {
    +	var reqBody, resBody AssignUserToGroupBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type AssociateProfileBody struct {
    +	Req    *types.AssociateProfile         `xml:"urn:vim25 AssociateProfile,omitempty"`
    +	Res    *types.AssociateProfileResponse `xml:"urn:vim25 AssociateProfileResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *AssociateProfileBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func AssociateProfile(ctx context.Context, r soap.RoundTripper, req *types.AssociateProfile) (*types.AssociateProfileResponse, error) {
    +	var reqBody, resBody AssociateProfileBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type AttachDisk_TaskBody struct {
    +	Req    *types.AttachDisk_Task         `xml:"urn:vim25 AttachDisk_Task,omitempty"`
    +	Res    *types.AttachDisk_TaskResponse `xml:"urn:vim25 AttachDisk_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *AttachDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func AttachDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.AttachDisk_Task) (*types.AttachDisk_TaskResponse, error) {
    +	var reqBody, resBody AttachDisk_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type AttachScsiLunBody struct {
    +	Req    *types.AttachScsiLun         `xml:"urn:vim25 AttachScsiLun,omitempty"`
    +	Res    *types.AttachScsiLunResponse `xml:"urn:vim25 AttachScsiLunResponse,omitempty"`
    +	Fault_ *soap.Fault                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *AttachScsiLunBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func AttachScsiLun(ctx context.Context, r soap.RoundTripper, req *types.AttachScsiLun) (*types.AttachScsiLunResponse, error) {
    +	var reqBody, resBody AttachScsiLunBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type AttachScsiLunEx_TaskBody struct {
    +	Req    *types.AttachScsiLunEx_Task         `xml:"urn:vim25 AttachScsiLunEx_Task,omitempty"`
    +	Res    *types.AttachScsiLunEx_TaskResponse `xml:"urn:vim25 AttachScsiLunEx_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *AttachScsiLunEx_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func AttachScsiLunEx_Task(ctx context.Context, r soap.RoundTripper, req *types.AttachScsiLunEx_Task) (*types.AttachScsiLunEx_TaskResponse, error) {
    +	var reqBody, resBody AttachScsiLunEx_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type AttachTagToVStorageObjectBody struct {
    +	Req    *types.AttachTagToVStorageObject         `xml:"urn:vim25 AttachTagToVStorageObject,omitempty"`
    +	Res    *types.AttachTagToVStorageObjectResponse `xml:"urn:vim25 AttachTagToVStorageObjectResponse,omitempty"`
    +	Fault_ *soap.Fault                              `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *AttachTagToVStorageObjectBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func AttachTagToVStorageObject(ctx context.Context, r soap.RoundTripper, req *types.AttachTagToVStorageObject) (*types.AttachTagToVStorageObjectResponse, error) {
    +	var reqBody, resBody AttachTagToVStorageObjectBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type AttachVmfsExtentBody struct {
    +	Req    *types.AttachVmfsExtent         `xml:"urn:vim25 AttachVmfsExtent,omitempty"`
    +	Res    *types.AttachVmfsExtentResponse `xml:"urn:vim25 AttachVmfsExtentResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *AttachVmfsExtentBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func AttachVmfsExtent(ctx context.Context, r soap.RoundTripper, req *types.AttachVmfsExtent) (*types.AttachVmfsExtentResponse, error) {
    +	var reqBody, resBody AttachVmfsExtentBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type AutoStartPowerOffBody struct {
    +	Req    *types.AutoStartPowerOff         `xml:"urn:vim25 AutoStartPowerOff,omitempty"`
    +	Res    *types.AutoStartPowerOffResponse `xml:"urn:vim25 AutoStartPowerOffResponse,omitempty"`
    +	Fault_ *soap.Fault                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *AutoStartPowerOffBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func AutoStartPowerOff(ctx context.Context, r soap.RoundTripper, req *types.AutoStartPowerOff) (*types.AutoStartPowerOffResponse, error) {
    +	var reqBody, resBody AutoStartPowerOffBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type AutoStartPowerOnBody struct {
    +	Req    *types.AutoStartPowerOn         `xml:"urn:vim25 AutoStartPowerOn,omitempty"`
    +	Res    *types.AutoStartPowerOnResponse `xml:"urn:vim25 AutoStartPowerOnResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *AutoStartPowerOnBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func AutoStartPowerOn(ctx context.Context, r soap.RoundTripper, req *types.AutoStartPowerOn) (*types.AutoStartPowerOnResponse, error) {
    +	var reqBody, resBody AutoStartPowerOnBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type BackupFirmwareConfigurationBody struct {
    +	Req    *types.BackupFirmwareConfiguration         `xml:"urn:vim25 BackupFirmwareConfiguration,omitempty"`
    +	Res    *types.BackupFirmwareConfigurationResponse `xml:"urn:vim25 BackupFirmwareConfigurationResponse,omitempty"`
    +	Fault_ *soap.Fault                                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *BackupFirmwareConfigurationBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func BackupFirmwareConfiguration(ctx context.Context, r soap.RoundTripper, req *types.BackupFirmwareConfiguration) (*types.BackupFirmwareConfigurationResponse, error) {
    +	var reqBody, resBody BackupFirmwareConfigurationBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type BindVnicBody struct {
    +	Req    *types.BindVnic         `xml:"urn:vim25 BindVnic,omitempty"`
    +	Res    *types.BindVnicResponse `xml:"urn:vim25 BindVnicResponse,omitempty"`
    +	Fault_ *soap.Fault             `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *BindVnicBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func BindVnic(ctx context.Context, r soap.RoundTripper, req *types.BindVnic) (*types.BindVnicResponse, error) {
    +	var reqBody, resBody BindVnicBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type BrowseDiagnosticLogBody struct {
    +	Req    *types.BrowseDiagnosticLog         `xml:"urn:vim25 BrowseDiagnosticLog,omitempty"`
    +	Res    *types.BrowseDiagnosticLogResponse `xml:"urn:vim25 BrowseDiagnosticLogResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *BrowseDiagnosticLogBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func BrowseDiagnosticLog(ctx context.Context, r soap.RoundTripper, req *types.BrowseDiagnosticLog) (*types.BrowseDiagnosticLogResponse, error) {
    +	var reqBody, resBody BrowseDiagnosticLogBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CanProvisionObjectsBody struct {
    +	Req    *types.CanProvisionObjects         `xml:"urn:vim25 CanProvisionObjects,omitempty"`
    +	Res    *types.CanProvisionObjectsResponse `xml:"urn:vim25 CanProvisionObjectsResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CanProvisionObjectsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CanProvisionObjects(ctx context.Context, r soap.RoundTripper, req *types.CanProvisionObjects) (*types.CanProvisionObjectsResponse, error) {
    +	var reqBody, resBody CanProvisionObjectsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CancelRecommendationBody struct {
    +	Req    *types.CancelRecommendation         `xml:"urn:vim25 CancelRecommendation,omitempty"`
    +	Res    *types.CancelRecommendationResponse `xml:"urn:vim25 CancelRecommendationResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CancelRecommendationBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CancelRecommendation(ctx context.Context, r soap.RoundTripper, req *types.CancelRecommendation) (*types.CancelRecommendationResponse, error) {
    +	var reqBody, resBody CancelRecommendationBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CancelRetrievePropertiesExBody struct {
    +	Req    *types.CancelRetrievePropertiesEx         `xml:"urn:vim25 CancelRetrievePropertiesEx,omitempty"`
    +	Res    *types.CancelRetrievePropertiesExResponse `xml:"urn:vim25 CancelRetrievePropertiesExResponse,omitempty"`
    +	Fault_ *soap.Fault                               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CancelRetrievePropertiesExBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CancelRetrievePropertiesEx(ctx context.Context, r soap.RoundTripper, req *types.CancelRetrievePropertiesEx) (*types.CancelRetrievePropertiesExResponse, error) {
    +	var reqBody, resBody CancelRetrievePropertiesExBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CancelStorageDrsRecommendationBody struct {
    +	Req    *types.CancelStorageDrsRecommendation         `xml:"urn:vim25 CancelStorageDrsRecommendation,omitempty"`
    +	Res    *types.CancelStorageDrsRecommendationResponse `xml:"urn:vim25 CancelStorageDrsRecommendationResponse,omitempty"`
    +	Fault_ *soap.Fault                                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CancelStorageDrsRecommendationBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CancelStorageDrsRecommendation(ctx context.Context, r soap.RoundTripper, req *types.CancelStorageDrsRecommendation) (*types.CancelStorageDrsRecommendationResponse, error) {
    +	var reqBody, resBody CancelStorageDrsRecommendationBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CancelTaskBody struct {
    +	Req    *types.CancelTask         `xml:"urn:vim25 CancelTask,omitempty"`
    +	Res    *types.CancelTaskResponse `xml:"urn:vim25 CancelTaskResponse,omitempty"`
    +	Fault_ *soap.Fault               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CancelTaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CancelTask(ctx context.Context, r soap.RoundTripper, req *types.CancelTask) (*types.CancelTaskResponse, error) {
    +	var reqBody, resBody CancelTaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CancelWaitForUpdatesBody struct {
    +	Req    *types.CancelWaitForUpdates         `xml:"urn:vim25 CancelWaitForUpdates,omitempty"`
    +	Res    *types.CancelWaitForUpdatesResponse `xml:"urn:vim25 CancelWaitForUpdatesResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CancelWaitForUpdatesBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CancelWaitForUpdates(ctx context.Context, r soap.RoundTripper, req *types.CancelWaitForUpdates) (*types.CancelWaitForUpdatesResponse, error) {
    +	var reqBody, resBody CancelWaitForUpdatesBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CertMgrRefreshCACertificatesAndCRLs_TaskBody struct {
    +	Req    *types.CertMgrRefreshCACertificatesAndCRLs_Task         `xml:"urn:vim25 CertMgrRefreshCACertificatesAndCRLs_Task,omitempty"`
    +	Res    *types.CertMgrRefreshCACertificatesAndCRLs_TaskResponse `xml:"urn:vim25 CertMgrRefreshCACertificatesAndCRLs_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                             `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CertMgrRefreshCACertificatesAndCRLs_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CertMgrRefreshCACertificatesAndCRLs_Task(ctx context.Context, r soap.RoundTripper, req *types.CertMgrRefreshCACertificatesAndCRLs_Task) (*types.CertMgrRefreshCACertificatesAndCRLs_TaskResponse, error) {
    +	var reqBody, resBody CertMgrRefreshCACertificatesAndCRLs_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CertMgrRefreshCertificates_TaskBody struct {
    +	Req    *types.CertMgrRefreshCertificates_Task         `xml:"urn:vim25 CertMgrRefreshCertificates_Task,omitempty"`
    +	Res    *types.CertMgrRefreshCertificates_TaskResponse `xml:"urn:vim25 CertMgrRefreshCertificates_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CertMgrRefreshCertificates_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CertMgrRefreshCertificates_Task(ctx context.Context, r soap.RoundTripper, req *types.CertMgrRefreshCertificates_Task) (*types.CertMgrRefreshCertificates_TaskResponse, error) {
    +	var reqBody, resBody CertMgrRefreshCertificates_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CertMgrRevokeCertificates_TaskBody struct {
    +	Req    *types.CertMgrRevokeCertificates_Task         `xml:"urn:vim25 CertMgrRevokeCertificates_Task,omitempty"`
    +	Res    *types.CertMgrRevokeCertificates_TaskResponse `xml:"urn:vim25 CertMgrRevokeCertificates_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CertMgrRevokeCertificates_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CertMgrRevokeCertificates_Task(ctx context.Context, r soap.RoundTripper, req *types.CertMgrRevokeCertificates_Task) (*types.CertMgrRevokeCertificates_TaskResponse, error) {
    +	var reqBody, resBody CertMgrRevokeCertificates_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ChangeAccessModeBody struct {
    +	Req    *types.ChangeAccessMode         `xml:"urn:vim25 ChangeAccessMode,omitempty"`
    +	Res    *types.ChangeAccessModeResponse `xml:"urn:vim25 ChangeAccessModeResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ChangeAccessModeBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ChangeAccessMode(ctx context.Context, r soap.RoundTripper, req *types.ChangeAccessMode) (*types.ChangeAccessModeResponse, error) {
    +	var reqBody, resBody ChangeAccessModeBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ChangeFileAttributesInGuestBody struct {
    +	Req    *types.ChangeFileAttributesInGuest         `xml:"urn:vim25 ChangeFileAttributesInGuest,omitempty"`
    +	Res    *types.ChangeFileAttributesInGuestResponse `xml:"urn:vim25 ChangeFileAttributesInGuestResponse,omitempty"`
    +	Fault_ *soap.Fault                                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ChangeFileAttributesInGuestBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ChangeFileAttributesInGuest(ctx context.Context, r soap.RoundTripper, req *types.ChangeFileAttributesInGuest) (*types.ChangeFileAttributesInGuestResponse, error) {
    +	var reqBody, resBody ChangeFileAttributesInGuestBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ChangeKey_TaskBody struct {
    +	Req    *types.ChangeKey_Task         `xml:"urn:vim25 ChangeKey_Task,omitempty"`
    +	Res    *types.ChangeKey_TaskResponse `xml:"urn:vim25 ChangeKey_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ChangeKey_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ChangeKey_Task(ctx context.Context, r soap.RoundTripper, req *types.ChangeKey_Task) (*types.ChangeKey_TaskResponse, error) {
    +	var reqBody, resBody ChangeKey_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ChangeLockdownModeBody struct {
    +	Req    *types.ChangeLockdownMode         `xml:"urn:vim25 ChangeLockdownMode,omitempty"`
    +	Res    *types.ChangeLockdownModeResponse `xml:"urn:vim25 ChangeLockdownModeResponse,omitempty"`
    +	Fault_ *soap.Fault                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ChangeLockdownModeBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ChangeLockdownMode(ctx context.Context, r soap.RoundTripper, req *types.ChangeLockdownMode) (*types.ChangeLockdownModeResponse, error) {
    +	var reqBody, resBody ChangeLockdownModeBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ChangeNFSUserPasswordBody struct {
    +	Req    *types.ChangeNFSUserPassword         `xml:"urn:vim25 ChangeNFSUserPassword,omitempty"`
    +	Res    *types.ChangeNFSUserPasswordResponse `xml:"urn:vim25 ChangeNFSUserPasswordResponse,omitempty"`
    +	Fault_ *soap.Fault                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ChangeNFSUserPasswordBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ChangeNFSUserPassword(ctx context.Context, r soap.RoundTripper, req *types.ChangeNFSUserPassword) (*types.ChangeNFSUserPasswordResponse, error) {
    +	var reqBody, resBody ChangeNFSUserPasswordBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ChangeOwnerBody struct {
    +	Req    *types.ChangeOwner         `xml:"urn:vim25 ChangeOwner,omitempty"`
    +	Res    *types.ChangeOwnerResponse `xml:"urn:vim25 ChangeOwnerResponse,omitempty"`
    +	Fault_ *soap.Fault                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ChangeOwnerBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ChangeOwner(ctx context.Context, r soap.RoundTripper, req *types.ChangeOwner) (*types.ChangeOwnerResponse, error) {
    +	var reqBody, resBody ChangeOwnerBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CheckAddHostEvc_TaskBody struct {
    +	Req    *types.CheckAddHostEvc_Task         `xml:"urn:vim25 CheckAddHostEvc_Task,omitempty"`
    +	Res    *types.CheckAddHostEvc_TaskResponse `xml:"urn:vim25 CheckAddHostEvc_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CheckAddHostEvc_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CheckAddHostEvc_Task(ctx context.Context, r soap.RoundTripper, req *types.CheckAddHostEvc_Task) (*types.CheckAddHostEvc_TaskResponse, error) {
    +	var reqBody, resBody CheckAddHostEvc_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CheckAnswerFileStatus_TaskBody struct {
    +	Req    *types.CheckAnswerFileStatus_Task         `xml:"urn:vim25 CheckAnswerFileStatus_Task,omitempty"`
    +	Res    *types.CheckAnswerFileStatus_TaskResponse `xml:"urn:vim25 CheckAnswerFileStatus_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CheckAnswerFileStatus_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CheckAnswerFileStatus_Task(ctx context.Context, r soap.RoundTripper, req *types.CheckAnswerFileStatus_Task) (*types.CheckAnswerFileStatus_TaskResponse, error) {
    +	var reqBody, resBody CheckAnswerFileStatus_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CheckClone_TaskBody struct {
    +	Req    *types.CheckClone_Task         `xml:"urn:vim25 CheckClone_Task,omitempty"`
    +	Res    *types.CheckClone_TaskResponse `xml:"urn:vim25 CheckClone_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CheckClone_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CheckClone_Task(ctx context.Context, r soap.RoundTripper, req *types.CheckClone_Task) (*types.CheckClone_TaskResponse, error) {
    +	var reqBody, resBody CheckClone_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CheckCompatibility_TaskBody struct {
    +	Req    *types.CheckCompatibility_Task         `xml:"urn:vim25 CheckCompatibility_Task,omitempty"`
    +	Res    *types.CheckCompatibility_TaskResponse `xml:"urn:vim25 CheckCompatibility_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CheckCompatibility_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CheckCompatibility_Task(ctx context.Context, r soap.RoundTripper, req *types.CheckCompatibility_Task) (*types.CheckCompatibility_TaskResponse, error) {
    +	var reqBody, resBody CheckCompatibility_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CheckCompliance_TaskBody struct {
    +	Req    *types.CheckCompliance_Task         `xml:"urn:vim25 CheckCompliance_Task,omitempty"`
    +	Res    *types.CheckCompliance_TaskResponse `xml:"urn:vim25 CheckCompliance_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CheckCompliance_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CheckCompliance_Task(ctx context.Context, r soap.RoundTripper, req *types.CheckCompliance_Task) (*types.CheckCompliance_TaskResponse, error) {
    +	var reqBody, resBody CheckCompliance_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CheckConfigureEvcMode_TaskBody struct {
    +	Req    *types.CheckConfigureEvcMode_Task         `xml:"urn:vim25 CheckConfigureEvcMode_Task,omitempty"`
    +	Res    *types.CheckConfigureEvcMode_TaskResponse `xml:"urn:vim25 CheckConfigureEvcMode_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CheckConfigureEvcMode_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CheckConfigureEvcMode_Task(ctx context.Context, r soap.RoundTripper, req *types.CheckConfigureEvcMode_Task) (*types.CheckConfigureEvcMode_TaskResponse, error) {
    +	var reqBody, resBody CheckConfigureEvcMode_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CheckCustomizationResourcesBody struct {
    +	Req    *types.CheckCustomizationResources         `xml:"urn:vim25 CheckCustomizationResources,omitempty"`
    +	Res    *types.CheckCustomizationResourcesResponse `xml:"urn:vim25 CheckCustomizationResourcesResponse,omitempty"`
    +	Fault_ *soap.Fault                                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CheckCustomizationResourcesBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CheckCustomizationResources(ctx context.Context, r soap.RoundTripper, req *types.CheckCustomizationResources) (*types.CheckCustomizationResourcesResponse, error) {
    +	var reqBody, resBody CheckCustomizationResourcesBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CheckCustomizationSpecBody struct {
    +	Req    *types.CheckCustomizationSpec         `xml:"urn:vim25 CheckCustomizationSpec,omitempty"`
    +	Res    *types.CheckCustomizationSpecResponse `xml:"urn:vim25 CheckCustomizationSpecResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CheckCustomizationSpecBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CheckCustomizationSpec(ctx context.Context, r soap.RoundTripper, req *types.CheckCustomizationSpec) (*types.CheckCustomizationSpecResponse, error) {
    +	var reqBody, resBody CheckCustomizationSpecBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CheckForUpdatesBody struct {
    +	Req    *types.CheckForUpdates         `xml:"urn:vim25 CheckForUpdates,omitempty"`
    +	Res    *types.CheckForUpdatesResponse `xml:"urn:vim25 CheckForUpdatesResponse,omitempty"`
    +	Fault_ *soap.Fault                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CheckForUpdatesBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CheckForUpdates(ctx context.Context, r soap.RoundTripper, req *types.CheckForUpdates) (*types.CheckForUpdatesResponse, error) {
    +	var reqBody, resBody CheckForUpdatesBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CheckHostPatch_TaskBody struct {
    +	Req    *types.CheckHostPatch_Task         `xml:"urn:vim25 CheckHostPatch_Task,omitempty"`
    +	Res    *types.CheckHostPatch_TaskResponse `xml:"urn:vim25 CheckHostPatch_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CheckHostPatch_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CheckHostPatch_Task(ctx context.Context, r soap.RoundTripper, req *types.CheckHostPatch_Task) (*types.CheckHostPatch_TaskResponse, error) {
    +	var reqBody, resBody CheckHostPatch_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CheckInstantClone_TaskBody struct {
    +	Req    *types.CheckInstantClone_Task         `xml:"urn:vim25 CheckInstantClone_Task,omitempty"`
    +	Res    *types.CheckInstantClone_TaskResponse `xml:"urn:vim25 CheckInstantClone_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CheckInstantClone_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CheckInstantClone_Task(ctx context.Context, r soap.RoundTripper, req *types.CheckInstantClone_Task) (*types.CheckInstantClone_TaskResponse, error) {
    +	var reqBody, resBody CheckInstantClone_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CheckLicenseFeatureBody struct {
    +	Req    *types.CheckLicenseFeature         `xml:"urn:vim25 CheckLicenseFeature,omitempty"`
    +	Res    *types.CheckLicenseFeatureResponse `xml:"urn:vim25 CheckLicenseFeatureResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CheckLicenseFeatureBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CheckLicenseFeature(ctx context.Context, r soap.RoundTripper, req *types.CheckLicenseFeature) (*types.CheckLicenseFeatureResponse, error) {
    +	var reqBody, resBody CheckLicenseFeatureBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CheckMigrate_TaskBody struct {
    +	Req    *types.CheckMigrate_Task         `xml:"urn:vim25 CheckMigrate_Task,omitempty"`
    +	Res    *types.CheckMigrate_TaskResponse `xml:"urn:vim25 CheckMigrate_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CheckMigrate_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CheckMigrate_Task(ctx context.Context, r soap.RoundTripper, req *types.CheckMigrate_Task) (*types.CheckMigrate_TaskResponse, error) {
    +	var reqBody, resBody CheckMigrate_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CheckPowerOn_TaskBody struct {
    +	Req    *types.CheckPowerOn_Task         `xml:"urn:vim25 CheckPowerOn_Task,omitempty"`
    +	Res    *types.CheckPowerOn_TaskResponse `xml:"urn:vim25 CheckPowerOn_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CheckPowerOn_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CheckPowerOn_Task(ctx context.Context, r soap.RoundTripper, req *types.CheckPowerOn_Task) (*types.CheckPowerOn_TaskResponse, error) {
    +	var reqBody, resBody CheckPowerOn_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CheckProfileCompliance_TaskBody struct {
    +	Req    *types.CheckProfileCompliance_Task         `xml:"urn:vim25 CheckProfileCompliance_Task,omitempty"`
    +	Res    *types.CheckProfileCompliance_TaskResponse `xml:"urn:vim25 CheckProfileCompliance_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CheckProfileCompliance_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CheckProfileCompliance_Task(ctx context.Context, r soap.RoundTripper, req *types.CheckProfileCompliance_Task) (*types.CheckProfileCompliance_TaskResponse, error) {
    +	var reqBody, resBody CheckProfileCompliance_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CheckRelocate_TaskBody struct {
    +	Req    *types.CheckRelocate_Task         `xml:"urn:vim25 CheckRelocate_Task,omitempty"`
    +	Res    *types.CheckRelocate_TaskResponse `xml:"urn:vim25 CheckRelocate_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CheckRelocate_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CheckRelocate_Task(ctx context.Context, r soap.RoundTripper, req *types.CheckRelocate_Task) (*types.CheckRelocate_TaskResponse, error) {
    +	var reqBody, resBody CheckRelocate_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CheckVmConfig_TaskBody struct {
    +	Req    *types.CheckVmConfig_Task         `xml:"urn:vim25 CheckVmConfig_Task,omitempty"`
    +	Res    *types.CheckVmConfig_TaskResponse `xml:"urn:vim25 CheckVmConfig_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CheckVmConfig_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CheckVmConfig_Task(ctx context.Context, r soap.RoundTripper, req *types.CheckVmConfig_Task) (*types.CheckVmConfig_TaskResponse, error) {
    +	var reqBody, resBody CheckVmConfig_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ClearComplianceStatusBody struct {
    +	Req    *types.ClearComplianceStatus         `xml:"urn:vim25 ClearComplianceStatus,omitempty"`
    +	Res    *types.ClearComplianceStatusResponse `xml:"urn:vim25 ClearComplianceStatusResponse,omitempty"`
    +	Fault_ *soap.Fault                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ClearComplianceStatusBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ClearComplianceStatus(ctx context.Context, r soap.RoundTripper, req *types.ClearComplianceStatus) (*types.ClearComplianceStatusResponse, error) {
    +	var reqBody, resBody ClearComplianceStatusBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ClearNFSUserBody struct {
    +	Req    *types.ClearNFSUser         `xml:"urn:vim25 ClearNFSUser,omitempty"`
    +	Res    *types.ClearNFSUserResponse `xml:"urn:vim25 ClearNFSUserResponse,omitempty"`
    +	Fault_ *soap.Fault                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ClearNFSUserBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ClearNFSUser(ctx context.Context, r soap.RoundTripper, req *types.ClearNFSUser) (*types.ClearNFSUserResponse, error) {
    +	var reqBody, resBody ClearNFSUserBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ClearSystemEventLogBody struct {
    +	Req    *types.ClearSystemEventLog         `xml:"urn:vim25 ClearSystemEventLog,omitempty"`
    +	Res    *types.ClearSystemEventLogResponse `xml:"urn:vim25 ClearSystemEventLogResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ClearSystemEventLogBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ClearSystemEventLog(ctx context.Context, r soap.RoundTripper, req *types.ClearSystemEventLog) (*types.ClearSystemEventLogResponse, error) {
    +	var reqBody, resBody ClearSystemEventLogBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ClearTriggeredAlarmsBody struct {
    +	Req    *types.ClearTriggeredAlarms         `xml:"urn:vim25 ClearTriggeredAlarms,omitempty"`
    +	Res    *types.ClearTriggeredAlarmsResponse `xml:"urn:vim25 ClearTriggeredAlarmsResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ClearTriggeredAlarmsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ClearTriggeredAlarms(ctx context.Context, r soap.RoundTripper, req *types.ClearTriggeredAlarms) (*types.ClearTriggeredAlarmsResponse, error) {
    +	var reqBody, resBody ClearTriggeredAlarmsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ClearVStorageObjectControlFlagsBody struct {
    +	Req    *types.ClearVStorageObjectControlFlags         `xml:"urn:vim25 ClearVStorageObjectControlFlags,omitempty"`
    +	Res    *types.ClearVStorageObjectControlFlagsResponse `xml:"urn:vim25 ClearVStorageObjectControlFlagsResponse,omitempty"`
    +	Fault_ *soap.Fault                                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ClearVStorageObjectControlFlagsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ClearVStorageObjectControlFlags(ctx context.Context, r soap.RoundTripper, req *types.ClearVStorageObjectControlFlags) (*types.ClearVStorageObjectControlFlagsResponse, error) {
    +	var reqBody, resBody ClearVStorageObjectControlFlagsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CloneSessionBody struct {
    +	Req    *types.CloneSession         `xml:"urn:vim25 CloneSession,omitempty"`
    +	Res    *types.CloneSessionResponse `xml:"urn:vim25 CloneSessionResponse,omitempty"`
    +	Fault_ *soap.Fault                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CloneSessionBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CloneSession(ctx context.Context, r soap.RoundTripper, req *types.CloneSession) (*types.CloneSessionResponse, error) {
    +	var reqBody, resBody CloneSessionBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CloneVApp_TaskBody struct {
    +	Req    *types.CloneVApp_Task         `xml:"urn:vim25 CloneVApp_Task,omitempty"`
    +	Res    *types.CloneVApp_TaskResponse `xml:"urn:vim25 CloneVApp_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CloneVApp_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CloneVApp_Task(ctx context.Context, r soap.RoundTripper, req *types.CloneVApp_Task) (*types.CloneVApp_TaskResponse, error) {
    +	var reqBody, resBody CloneVApp_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CloneVM_TaskBody struct {
    +	Req    *types.CloneVM_Task         `xml:"urn:vim25 CloneVM_Task,omitempty"`
    +	Res    *types.CloneVM_TaskResponse `xml:"urn:vim25 CloneVM_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CloneVM_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CloneVM_Task(ctx context.Context, r soap.RoundTripper, req *types.CloneVM_Task) (*types.CloneVM_TaskResponse, error) {
    +	var reqBody, resBody CloneVM_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CloneVStorageObject_TaskBody struct {
    +	Req    *types.CloneVStorageObject_Task         `xml:"urn:vim25 CloneVStorageObject_Task,omitempty"`
    +	Res    *types.CloneVStorageObject_TaskResponse `xml:"urn:vim25 CloneVStorageObject_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                             `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CloneVStorageObject_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CloneVStorageObject_Task(ctx context.Context, r soap.RoundTripper, req *types.CloneVStorageObject_Task) (*types.CloneVStorageObject_TaskResponse, error) {
    +	var reqBody, resBody CloneVStorageObject_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CloseInventoryViewFolderBody struct {
    +	Req    *types.CloseInventoryViewFolder         `xml:"urn:vim25 CloseInventoryViewFolder,omitempty"`
    +	Res    *types.CloseInventoryViewFolderResponse `xml:"urn:vim25 CloseInventoryViewFolderResponse,omitempty"`
    +	Fault_ *soap.Fault                             `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CloseInventoryViewFolderBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CloseInventoryViewFolder(ctx context.Context, r soap.RoundTripper, req *types.CloseInventoryViewFolder) (*types.CloseInventoryViewFolderResponse, error) {
    +	var reqBody, resBody CloseInventoryViewFolderBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ClusterEnterMaintenanceModeBody struct {
    +	Req    *types.ClusterEnterMaintenanceMode         `xml:"urn:vim25 ClusterEnterMaintenanceMode,omitempty"`
    +	Res    *types.ClusterEnterMaintenanceModeResponse `xml:"urn:vim25 ClusterEnterMaintenanceModeResponse,omitempty"`
    +	Fault_ *soap.Fault                                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ClusterEnterMaintenanceModeBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ClusterEnterMaintenanceMode(ctx context.Context, r soap.RoundTripper, req *types.ClusterEnterMaintenanceMode) (*types.ClusterEnterMaintenanceModeResponse, error) {
    +	var reqBody, resBody ClusterEnterMaintenanceModeBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CompositeHostProfile_TaskBody struct {
    +	Req    *types.CompositeHostProfile_Task         `xml:"urn:vim25 CompositeHostProfile_Task,omitempty"`
    +	Res    *types.CompositeHostProfile_TaskResponse `xml:"urn:vim25 CompositeHostProfile_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                              `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CompositeHostProfile_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CompositeHostProfile_Task(ctx context.Context, r soap.RoundTripper, req *types.CompositeHostProfile_Task) (*types.CompositeHostProfile_TaskResponse, error) {
    +	var reqBody, resBody CompositeHostProfile_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ComputeDiskPartitionInfoBody struct {
    +	Req    *types.ComputeDiskPartitionInfo         `xml:"urn:vim25 ComputeDiskPartitionInfo,omitempty"`
    +	Res    *types.ComputeDiskPartitionInfoResponse `xml:"urn:vim25 ComputeDiskPartitionInfoResponse,omitempty"`
    +	Fault_ *soap.Fault                             `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ComputeDiskPartitionInfoBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ComputeDiskPartitionInfo(ctx context.Context, r soap.RoundTripper, req *types.ComputeDiskPartitionInfo) (*types.ComputeDiskPartitionInfoResponse, error) {
    +	var reqBody, resBody ComputeDiskPartitionInfoBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ComputeDiskPartitionInfoForResizeBody struct {
    +	Req    *types.ComputeDiskPartitionInfoForResize         `xml:"urn:vim25 ComputeDiskPartitionInfoForResize,omitempty"`
    +	Res    *types.ComputeDiskPartitionInfoForResizeResponse `xml:"urn:vim25 ComputeDiskPartitionInfoForResizeResponse,omitempty"`
    +	Fault_ *soap.Fault                                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ComputeDiskPartitionInfoForResizeBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ComputeDiskPartitionInfoForResize(ctx context.Context, r soap.RoundTripper, req *types.ComputeDiskPartitionInfoForResize) (*types.ComputeDiskPartitionInfoForResizeResponse, error) {
    +	var reqBody, resBody ComputeDiskPartitionInfoForResizeBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ConfigureCryptoKeyBody struct {
    +	Req    *types.ConfigureCryptoKey         `xml:"urn:vim25 ConfigureCryptoKey,omitempty"`
    +	Res    *types.ConfigureCryptoKeyResponse `xml:"urn:vim25 ConfigureCryptoKeyResponse,omitempty"`
    +	Fault_ *soap.Fault                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ConfigureCryptoKeyBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ConfigureCryptoKey(ctx context.Context, r soap.RoundTripper, req *types.ConfigureCryptoKey) (*types.ConfigureCryptoKeyResponse, error) {
    +	var reqBody, resBody ConfigureCryptoKeyBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ConfigureDatastoreIORM_TaskBody struct {
    +	Req    *types.ConfigureDatastoreIORM_Task         `xml:"urn:vim25 ConfigureDatastoreIORM_Task,omitempty"`
    +	Res    *types.ConfigureDatastoreIORM_TaskResponse `xml:"urn:vim25 ConfigureDatastoreIORM_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ConfigureDatastoreIORM_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ConfigureDatastoreIORM_Task(ctx context.Context, r soap.RoundTripper, req *types.ConfigureDatastoreIORM_Task) (*types.ConfigureDatastoreIORM_TaskResponse, error) {
    +	var reqBody, resBody ConfigureDatastoreIORM_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ConfigureDatastorePrincipalBody struct {
    +	Req    *types.ConfigureDatastorePrincipal         `xml:"urn:vim25 ConfigureDatastorePrincipal,omitempty"`
    +	Res    *types.ConfigureDatastorePrincipalResponse `xml:"urn:vim25 ConfigureDatastorePrincipalResponse,omitempty"`
    +	Fault_ *soap.Fault                                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ConfigureDatastorePrincipalBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ConfigureDatastorePrincipal(ctx context.Context, r soap.RoundTripper, req *types.ConfigureDatastorePrincipal) (*types.ConfigureDatastorePrincipalResponse, error) {
    +	var reqBody, resBody ConfigureDatastorePrincipalBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ConfigureEvcMode_TaskBody struct {
    +	Req    *types.ConfigureEvcMode_Task         `xml:"urn:vim25 ConfigureEvcMode_Task,omitempty"`
    +	Res    *types.ConfigureEvcMode_TaskResponse `xml:"urn:vim25 ConfigureEvcMode_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ConfigureEvcMode_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ConfigureEvcMode_Task(ctx context.Context, r soap.RoundTripper, req *types.ConfigureEvcMode_Task) (*types.ConfigureEvcMode_TaskResponse, error) {
    +	var reqBody, resBody ConfigureEvcMode_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ConfigureHostCache_TaskBody struct {
    +	Req    *types.ConfigureHostCache_Task         `xml:"urn:vim25 ConfigureHostCache_Task,omitempty"`
    +	Res    *types.ConfigureHostCache_TaskResponse `xml:"urn:vim25 ConfigureHostCache_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ConfigureHostCache_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ConfigureHostCache_Task(ctx context.Context, r soap.RoundTripper, req *types.ConfigureHostCache_Task) (*types.ConfigureHostCache_TaskResponse, error) {
    +	var reqBody, resBody ConfigureHostCache_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ConfigureLicenseSourceBody struct {
    +	Req    *types.ConfigureLicenseSource         `xml:"urn:vim25 ConfigureLicenseSource,omitempty"`
    +	Res    *types.ConfigureLicenseSourceResponse `xml:"urn:vim25 ConfigureLicenseSourceResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ConfigureLicenseSourceBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ConfigureLicenseSource(ctx context.Context, r soap.RoundTripper, req *types.ConfigureLicenseSource) (*types.ConfigureLicenseSourceResponse, error) {
    +	var reqBody, resBody ConfigureLicenseSourceBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ConfigurePowerPolicyBody struct {
    +	Req    *types.ConfigurePowerPolicy         `xml:"urn:vim25 ConfigurePowerPolicy,omitempty"`
    +	Res    *types.ConfigurePowerPolicyResponse `xml:"urn:vim25 ConfigurePowerPolicyResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ConfigurePowerPolicyBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ConfigurePowerPolicy(ctx context.Context, r soap.RoundTripper, req *types.ConfigurePowerPolicy) (*types.ConfigurePowerPolicyResponse, error) {
    +	var reqBody, resBody ConfigurePowerPolicyBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ConfigureStorageDrsForPod_TaskBody struct {
    +	Req    *types.ConfigureStorageDrsForPod_Task         `xml:"urn:vim25 ConfigureStorageDrsForPod_Task,omitempty"`
    +	Res    *types.ConfigureStorageDrsForPod_TaskResponse `xml:"urn:vim25 ConfigureStorageDrsForPod_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ConfigureStorageDrsForPod_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ConfigureStorageDrsForPod_Task(ctx context.Context, r soap.RoundTripper, req *types.ConfigureStorageDrsForPod_Task) (*types.ConfigureStorageDrsForPod_TaskResponse, error) {
    +	var reqBody, resBody ConfigureStorageDrsForPod_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ConfigureVFlashResourceEx_TaskBody struct {
    +	Req    *types.ConfigureVFlashResourceEx_Task         `xml:"urn:vim25 ConfigureVFlashResourceEx_Task,omitempty"`
    +	Res    *types.ConfigureVFlashResourceEx_TaskResponse `xml:"urn:vim25 ConfigureVFlashResourceEx_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ConfigureVFlashResourceEx_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ConfigureVFlashResourceEx_Task(ctx context.Context, r soap.RoundTripper, req *types.ConfigureVFlashResourceEx_Task) (*types.ConfigureVFlashResourceEx_TaskResponse, error) {
    +	var reqBody, resBody ConfigureVFlashResourceEx_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ConsolidateVMDisks_TaskBody struct {
    +	Req    *types.ConsolidateVMDisks_Task         `xml:"urn:vim25 ConsolidateVMDisks_Task,omitempty"`
    +	Res    *types.ConsolidateVMDisks_TaskResponse `xml:"urn:vim25 ConsolidateVMDisks_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ConsolidateVMDisks_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ConsolidateVMDisks_Task(ctx context.Context, r soap.RoundTripper, req *types.ConsolidateVMDisks_Task) (*types.ConsolidateVMDisks_TaskResponse, error) {
    +	var reqBody, resBody ConsolidateVMDisks_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ContinueRetrievePropertiesExBody struct {
    +	Req    *types.ContinueRetrievePropertiesEx         `xml:"urn:vim25 ContinueRetrievePropertiesEx,omitempty"`
    +	Res    *types.ContinueRetrievePropertiesExResponse `xml:"urn:vim25 ContinueRetrievePropertiesExResponse,omitempty"`
    +	Fault_ *soap.Fault                                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ContinueRetrievePropertiesExBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ContinueRetrievePropertiesEx(ctx context.Context, r soap.RoundTripper, req *types.ContinueRetrievePropertiesEx) (*types.ContinueRetrievePropertiesExResponse, error) {
    +	var reqBody, resBody ContinueRetrievePropertiesExBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ConvertNamespacePathToUuidPathBody struct {
    +	Req    *types.ConvertNamespacePathToUuidPath         `xml:"urn:vim25 ConvertNamespacePathToUuidPath,omitempty"`
    +	Res    *types.ConvertNamespacePathToUuidPathResponse `xml:"urn:vim25 ConvertNamespacePathToUuidPathResponse,omitempty"`
    +	Fault_ *soap.Fault                                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ConvertNamespacePathToUuidPathBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ConvertNamespacePathToUuidPath(ctx context.Context, r soap.RoundTripper, req *types.ConvertNamespacePathToUuidPath) (*types.ConvertNamespacePathToUuidPathResponse, error) {
    +	var reqBody, resBody ConvertNamespacePathToUuidPathBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CopyDatastoreFile_TaskBody struct {
    +	Req    *types.CopyDatastoreFile_Task         `xml:"urn:vim25 CopyDatastoreFile_Task,omitempty"`
    +	Res    *types.CopyDatastoreFile_TaskResponse `xml:"urn:vim25 CopyDatastoreFile_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CopyDatastoreFile_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CopyDatastoreFile_Task(ctx context.Context, r soap.RoundTripper, req *types.CopyDatastoreFile_Task) (*types.CopyDatastoreFile_TaskResponse, error) {
    +	var reqBody, resBody CopyDatastoreFile_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CopyVirtualDisk_TaskBody struct {
    +	Req    *types.CopyVirtualDisk_Task         `xml:"urn:vim25 CopyVirtualDisk_Task,omitempty"`
    +	Res    *types.CopyVirtualDisk_TaskResponse `xml:"urn:vim25 CopyVirtualDisk_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CopyVirtualDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CopyVirtualDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.CopyVirtualDisk_Task) (*types.CopyVirtualDisk_TaskResponse, error) {
    +	var reqBody, resBody CopyVirtualDisk_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateAlarmBody struct {
    +	Req    *types.CreateAlarm         `xml:"urn:vim25 CreateAlarm,omitempty"`
    +	Res    *types.CreateAlarmResponse `xml:"urn:vim25 CreateAlarmResponse,omitempty"`
    +	Fault_ *soap.Fault                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateAlarmBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateAlarm(ctx context.Context, r soap.RoundTripper, req *types.CreateAlarm) (*types.CreateAlarmResponse, error) {
    +	var reqBody, resBody CreateAlarmBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateChildVM_TaskBody struct {
    +	Req    *types.CreateChildVM_Task         `xml:"urn:vim25 CreateChildVM_Task,omitempty"`
    +	Res    *types.CreateChildVM_TaskResponse `xml:"urn:vim25 CreateChildVM_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateChildVM_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateChildVM_Task(ctx context.Context, r soap.RoundTripper, req *types.CreateChildVM_Task) (*types.CreateChildVM_TaskResponse, error) {
    +	var reqBody, resBody CreateChildVM_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateClusterBody struct {
    +	Req    *types.CreateCluster         `xml:"urn:vim25 CreateCluster,omitempty"`
    +	Res    *types.CreateClusterResponse `xml:"urn:vim25 CreateClusterResponse,omitempty"`
    +	Fault_ *soap.Fault                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateClusterBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateCluster(ctx context.Context, r soap.RoundTripper, req *types.CreateCluster) (*types.CreateClusterResponse, error) {
    +	var reqBody, resBody CreateClusterBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateClusterExBody struct {
    +	Req    *types.CreateClusterEx         `xml:"urn:vim25 CreateClusterEx,omitempty"`
    +	Res    *types.CreateClusterExResponse `xml:"urn:vim25 CreateClusterExResponse,omitempty"`
    +	Fault_ *soap.Fault                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateClusterExBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateClusterEx(ctx context.Context, r soap.RoundTripper, req *types.CreateClusterEx) (*types.CreateClusterExResponse, error) {
    +	var reqBody, resBody CreateClusterExBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateCollectorForEventsBody struct {
    +	Req    *types.CreateCollectorForEvents         `xml:"urn:vim25 CreateCollectorForEvents,omitempty"`
    +	Res    *types.CreateCollectorForEventsResponse `xml:"urn:vim25 CreateCollectorForEventsResponse,omitempty"`
    +	Fault_ *soap.Fault                             `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateCollectorForEventsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateCollectorForEvents(ctx context.Context, r soap.RoundTripper, req *types.CreateCollectorForEvents) (*types.CreateCollectorForEventsResponse, error) {
    +	var reqBody, resBody CreateCollectorForEventsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateCollectorForTasksBody struct {
    +	Req    *types.CreateCollectorForTasks         `xml:"urn:vim25 CreateCollectorForTasks,omitempty"`
    +	Res    *types.CreateCollectorForTasksResponse `xml:"urn:vim25 CreateCollectorForTasksResponse,omitempty"`
    +	Fault_ *soap.Fault                            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateCollectorForTasksBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateCollectorForTasks(ctx context.Context, r soap.RoundTripper, req *types.CreateCollectorForTasks) (*types.CreateCollectorForTasksResponse, error) {
    +	var reqBody, resBody CreateCollectorForTasksBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateContainerViewBody struct {
    +	Req    *types.CreateContainerView         `xml:"urn:vim25 CreateContainerView,omitempty"`
    +	Res    *types.CreateContainerViewResponse `xml:"urn:vim25 CreateContainerViewResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateContainerViewBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateContainerView(ctx context.Context, r soap.RoundTripper, req *types.CreateContainerView) (*types.CreateContainerViewResponse, error) {
    +	var reqBody, resBody CreateContainerViewBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateCustomizationSpecBody struct {
    +	Req    *types.CreateCustomizationSpec         `xml:"urn:vim25 CreateCustomizationSpec,omitempty"`
    +	Res    *types.CreateCustomizationSpecResponse `xml:"urn:vim25 CreateCustomizationSpecResponse,omitempty"`
    +	Fault_ *soap.Fault                            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateCustomizationSpecBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateCustomizationSpec(ctx context.Context, r soap.RoundTripper, req *types.CreateCustomizationSpec) (*types.CreateCustomizationSpecResponse, error) {
    +	var reqBody, resBody CreateCustomizationSpecBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateDVPortgroup_TaskBody struct {
    +	Req    *types.CreateDVPortgroup_Task         `xml:"urn:vim25 CreateDVPortgroup_Task,omitempty"`
    +	Res    *types.CreateDVPortgroup_TaskResponse `xml:"urn:vim25 CreateDVPortgroup_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateDVPortgroup_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateDVPortgroup_Task(ctx context.Context, r soap.RoundTripper, req *types.CreateDVPortgroup_Task) (*types.CreateDVPortgroup_TaskResponse, error) {
    +	var reqBody, resBody CreateDVPortgroup_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateDVS_TaskBody struct {
    +	Req    *types.CreateDVS_Task         `xml:"urn:vim25 CreateDVS_Task,omitempty"`
    +	Res    *types.CreateDVS_TaskResponse `xml:"urn:vim25 CreateDVS_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateDVS_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateDVS_Task(ctx context.Context, r soap.RoundTripper, req *types.CreateDVS_Task) (*types.CreateDVS_TaskResponse, error) {
    +	var reqBody, resBody CreateDVS_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateDatacenterBody struct {
    +	Req    *types.CreateDatacenter         `xml:"urn:vim25 CreateDatacenter,omitempty"`
    +	Res    *types.CreateDatacenterResponse `xml:"urn:vim25 CreateDatacenterResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateDatacenterBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateDatacenter(ctx context.Context, r soap.RoundTripper, req *types.CreateDatacenter) (*types.CreateDatacenterResponse, error) {
    +	var reqBody, resBody CreateDatacenterBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateDefaultProfileBody struct {
    +	Req    *types.CreateDefaultProfile         `xml:"urn:vim25 CreateDefaultProfile,omitempty"`
    +	Res    *types.CreateDefaultProfileResponse `xml:"urn:vim25 CreateDefaultProfileResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateDefaultProfileBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateDefaultProfile(ctx context.Context, r soap.RoundTripper, req *types.CreateDefaultProfile) (*types.CreateDefaultProfileResponse, error) {
    +	var reqBody, resBody CreateDefaultProfileBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateDescriptorBody struct {
    +	Req    *types.CreateDescriptor         `xml:"urn:vim25 CreateDescriptor,omitempty"`
    +	Res    *types.CreateDescriptorResponse `xml:"urn:vim25 CreateDescriptorResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateDescriptorBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateDescriptor(ctx context.Context, r soap.RoundTripper, req *types.CreateDescriptor) (*types.CreateDescriptorResponse, error) {
    +	var reqBody, resBody CreateDescriptorBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateDiagnosticPartitionBody struct {
    +	Req    *types.CreateDiagnosticPartition         `xml:"urn:vim25 CreateDiagnosticPartition,omitempty"`
    +	Res    *types.CreateDiagnosticPartitionResponse `xml:"urn:vim25 CreateDiagnosticPartitionResponse,omitempty"`
    +	Fault_ *soap.Fault                              `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateDiagnosticPartitionBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateDiagnosticPartition(ctx context.Context, r soap.RoundTripper, req *types.CreateDiagnosticPartition) (*types.CreateDiagnosticPartitionResponse, error) {
    +	var reqBody, resBody CreateDiagnosticPartitionBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateDirectoryBody struct {
    +	Req    *types.CreateDirectory         `xml:"urn:vim25 CreateDirectory,omitempty"`
    +	Res    *types.CreateDirectoryResponse `xml:"urn:vim25 CreateDirectoryResponse,omitempty"`
    +	Fault_ *soap.Fault                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateDirectoryBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateDirectory(ctx context.Context, r soap.RoundTripper, req *types.CreateDirectory) (*types.CreateDirectoryResponse, error) {
    +	var reqBody, resBody CreateDirectoryBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateDiskFromSnapshot_TaskBody struct {
    +	Req    *types.CreateDiskFromSnapshot_Task         `xml:"urn:vim25 CreateDiskFromSnapshot_Task,omitempty"`
    +	Res    *types.CreateDiskFromSnapshot_TaskResponse `xml:"urn:vim25 CreateDiskFromSnapshot_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateDiskFromSnapshot_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateDiskFromSnapshot_Task(ctx context.Context, r soap.RoundTripper, req *types.CreateDiskFromSnapshot_Task) (*types.CreateDiskFromSnapshot_TaskResponse, error) {
    +	var reqBody, resBody CreateDiskFromSnapshot_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateDisk_TaskBody struct {
    +	Req    *types.CreateDisk_Task         `xml:"urn:vim25 CreateDisk_Task,omitempty"`
    +	Res    *types.CreateDisk_TaskResponse `xml:"urn:vim25 CreateDisk_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.CreateDisk_Task) (*types.CreateDisk_TaskResponse, error) {
    +	var reqBody, resBody CreateDisk_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateFilterBody struct {
    +	Req    *types.CreateFilter         `xml:"urn:vim25 CreateFilter,omitempty"`
    +	Res    *types.CreateFilterResponse `xml:"urn:vim25 CreateFilterResponse,omitempty"`
    +	Fault_ *soap.Fault                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateFilterBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateFilter(ctx context.Context, r soap.RoundTripper, req *types.CreateFilter) (*types.CreateFilterResponse, error) {
    +	var reqBody, resBody CreateFilterBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateFolderBody struct {
    +	Req    *types.CreateFolder         `xml:"urn:vim25 CreateFolder,omitempty"`
    +	Res    *types.CreateFolderResponse `xml:"urn:vim25 CreateFolderResponse,omitempty"`
    +	Fault_ *soap.Fault                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateFolderBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateFolder(ctx context.Context, r soap.RoundTripper, req *types.CreateFolder) (*types.CreateFolderResponse, error) {
    +	var reqBody, resBody CreateFolderBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateGroupBody struct {
    +	Req    *types.CreateGroup         `xml:"urn:vim25 CreateGroup,omitempty"`
    +	Res    *types.CreateGroupResponse `xml:"urn:vim25 CreateGroupResponse,omitempty"`
    +	Fault_ *soap.Fault                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateGroupBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateGroup(ctx context.Context, r soap.RoundTripper, req *types.CreateGroup) (*types.CreateGroupResponse, error) {
    +	var reqBody, resBody CreateGroupBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateImportSpecBody struct {
    +	Req    *types.CreateImportSpec         `xml:"urn:vim25 CreateImportSpec,omitempty"`
    +	Res    *types.CreateImportSpecResponse `xml:"urn:vim25 CreateImportSpecResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateImportSpecBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateImportSpec(ctx context.Context, r soap.RoundTripper, req *types.CreateImportSpec) (*types.CreateImportSpecResponse, error) {
    +	var reqBody, resBody CreateImportSpecBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateInventoryViewBody struct {
    +	Req    *types.CreateInventoryView         `xml:"urn:vim25 CreateInventoryView,omitempty"`
    +	Res    *types.CreateInventoryViewResponse `xml:"urn:vim25 CreateInventoryViewResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateInventoryViewBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateInventoryView(ctx context.Context, r soap.RoundTripper, req *types.CreateInventoryView) (*types.CreateInventoryViewResponse, error) {
    +	var reqBody, resBody CreateInventoryViewBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateIpPoolBody struct {
    +	Req    *types.CreateIpPool         `xml:"urn:vim25 CreateIpPool,omitempty"`
    +	Res    *types.CreateIpPoolResponse `xml:"urn:vim25 CreateIpPoolResponse,omitempty"`
    +	Fault_ *soap.Fault                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateIpPoolBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateIpPool(ctx context.Context, r soap.RoundTripper, req *types.CreateIpPool) (*types.CreateIpPoolResponse, error) {
    +	var reqBody, resBody CreateIpPoolBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateListViewBody struct {
    +	Req    *types.CreateListView         `xml:"urn:vim25 CreateListView,omitempty"`
    +	Res    *types.CreateListViewResponse `xml:"urn:vim25 CreateListViewResponse,omitempty"`
    +	Fault_ *soap.Fault                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateListViewBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateListView(ctx context.Context, r soap.RoundTripper, req *types.CreateListView) (*types.CreateListViewResponse, error) {
    +	var reqBody, resBody CreateListViewBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateListViewFromViewBody struct {
    +	Req    *types.CreateListViewFromView         `xml:"urn:vim25 CreateListViewFromView,omitempty"`
    +	Res    *types.CreateListViewFromViewResponse `xml:"urn:vim25 CreateListViewFromViewResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateListViewFromViewBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateListViewFromView(ctx context.Context, r soap.RoundTripper, req *types.CreateListViewFromView) (*types.CreateListViewFromViewResponse, error) {
    +	var reqBody, resBody CreateListViewFromViewBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateLocalDatastoreBody struct {
    +	Req    *types.CreateLocalDatastore         `xml:"urn:vim25 CreateLocalDatastore,omitempty"`
    +	Res    *types.CreateLocalDatastoreResponse `xml:"urn:vim25 CreateLocalDatastoreResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateLocalDatastoreBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateLocalDatastore(ctx context.Context, r soap.RoundTripper, req *types.CreateLocalDatastore) (*types.CreateLocalDatastoreResponse, error) {
    +	var reqBody, resBody CreateLocalDatastoreBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateNasDatastoreBody struct {
    +	Req    *types.CreateNasDatastore         `xml:"urn:vim25 CreateNasDatastore,omitempty"`
    +	Res    *types.CreateNasDatastoreResponse `xml:"urn:vim25 CreateNasDatastoreResponse,omitempty"`
    +	Fault_ *soap.Fault                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateNasDatastoreBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateNasDatastore(ctx context.Context, r soap.RoundTripper, req *types.CreateNasDatastore) (*types.CreateNasDatastoreResponse, error) {
    +	var reqBody, resBody CreateNasDatastoreBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateNvdimmNamespace_TaskBody struct {
    +	Req    *types.CreateNvdimmNamespace_Task         `xml:"urn:vim25 CreateNvdimmNamespace_Task,omitempty"`
    +	Res    *types.CreateNvdimmNamespace_TaskResponse `xml:"urn:vim25 CreateNvdimmNamespace_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateNvdimmNamespace_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateNvdimmNamespace_Task(ctx context.Context, r soap.RoundTripper, req *types.CreateNvdimmNamespace_Task) (*types.CreateNvdimmNamespace_TaskResponse, error) {
    +	var reqBody, resBody CreateNvdimmNamespace_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateObjectScheduledTaskBody struct {
    +	Req    *types.CreateObjectScheduledTask         `xml:"urn:vim25 CreateObjectScheduledTask,omitempty"`
    +	Res    *types.CreateObjectScheduledTaskResponse `xml:"urn:vim25 CreateObjectScheduledTaskResponse,omitempty"`
    +	Fault_ *soap.Fault                              `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateObjectScheduledTaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateObjectScheduledTask(ctx context.Context, r soap.RoundTripper, req *types.CreateObjectScheduledTask) (*types.CreateObjectScheduledTaskResponse, error) {
    +	var reqBody, resBody CreateObjectScheduledTaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreatePerfIntervalBody struct {
    +	Req    *types.CreatePerfInterval         `xml:"urn:vim25 CreatePerfInterval,omitempty"`
    +	Res    *types.CreatePerfIntervalResponse `xml:"urn:vim25 CreatePerfIntervalResponse,omitempty"`
    +	Fault_ *soap.Fault                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreatePerfIntervalBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreatePerfInterval(ctx context.Context, r soap.RoundTripper, req *types.CreatePerfInterval) (*types.CreatePerfIntervalResponse, error) {
    +	var reqBody, resBody CreatePerfIntervalBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateProfileBody struct {
    +	Req    *types.CreateProfile         `xml:"urn:vim25 CreateProfile,omitempty"`
    +	Res    *types.CreateProfileResponse `xml:"urn:vim25 CreateProfileResponse,omitempty"`
    +	Fault_ *soap.Fault                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateProfileBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateProfile(ctx context.Context, r soap.RoundTripper, req *types.CreateProfile) (*types.CreateProfileResponse, error) {
    +	var reqBody, resBody CreateProfileBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreatePropertyCollectorBody struct {
    +	Req    *types.CreatePropertyCollector         `xml:"urn:vim25 CreatePropertyCollector,omitempty"`
    +	Res    *types.CreatePropertyCollectorResponse `xml:"urn:vim25 CreatePropertyCollectorResponse,omitempty"`
    +	Fault_ *soap.Fault                            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreatePropertyCollectorBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreatePropertyCollector(ctx context.Context, r soap.RoundTripper, req *types.CreatePropertyCollector) (*types.CreatePropertyCollectorResponse, error) {
    +	var reqBody, resBody CreatePropertyCollectorBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateRegistryKeyInGuestBody struct {
    +	Req    *types.CreateRegistryKeyInGuest         `xml:"urn:vim25 CreateRegistryKeyInGuest,omitempty"`
    +	Res    *types.CreateRegistryKeyInGuestResponse `xml:"urn:vim25 CreateRegistryKeyInGuestResponse,omitempty"`
    +	Fault_ *soap.Fault                             `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateRegistryKeyInGuestBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateRegistryKeyInGuest(ctx context.Context, r soap.RoundTripper, req *types.CreateRegistryKeyInGuest) (*types.CreateRegistryKeyInGuestResponse, error) {
    +	var reqBody, resBody CreateRegistryKeyInGuestBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateResourcePoolBody struct {
    +	Req    *types.CreateResourcePool         `xml:"urn:vim25 CreateResourcePool,omitempty"`
    +	Res    *types.CreateResourcePoolResponse `xml:"urn:vim25 CreateResourcePoolResponse,omitempty"`
    +	Fault_ *soap.Fault                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateResourcePoolBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateResourcePool(ctx context.Context, r soap.RoundTripper, req *types.CreateResourcePool) (*types.CreateResourcePoolResponse, error) {
    +	var reqBody, resBody CreateResourcePoolBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateScheduledTaskBody struct {
    +	Req    *types.CreateScheduledTask         `xml:"urn:vim25 CreateScheduledTask,omitempty"`
    +	Res    *types.CreateScheduledTaskResponse `xml:"urn:vim25 CreateScheduledTaskResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateScheduledTaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateScheduledTask(ctx context.Context, r soap.RoundTripper, req *types.CreateScheduledTask) (*types.CreateScheduledTaskResponse, error) {
    +	var reqBody, resBody CreateScheduledTaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateScreenshot_TaskBody struct {
    +	Req    *types.CreateScreenshot_Task         `xml:"urn:vim25 CreateScreenshot_Task,omitempty"`
    +	Res    *types.CreateScreenshot_TaskResponse `xml:"urn:vim25 CreateScreenshot_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateScreenshot_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateScreenshot_Task(ctx context.Context, r soap.RoundTripper, req *types.CreateScreenshot_Task) (*types.CreateScreenshot_TaskResponse, error) {
    +	var reqBody, resBody CreateScreenshot_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateSecondaryVMEx_TaskBody struct {
    +	Req    *types.CreateSecondaryVMEx_Task         `xml:"urn:vim25 CreateSecondaryVMEx_Task,omitempty"`
    +	Res    *types.CreateSecondaryVMEx_TaskResponse `xml:"urn:vim25 CreateSecondaryVMEx_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                             `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateSecondaryVMEx_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateSecondaryVMEx_Task(ctx context.Context, r soap.RoundTripper, req *types.CreateSecondaryVMEx_Task) (*types.CreateSecondaryVMEx_TaskResponse, error) {
    +	var reqBody, resBody CreateSecondaryVMEx_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateSecondaryVM_TaskBody struct {
    +	Req    *types.CreateSecondaryVM_Task         `xml:"urn:vim25 CreateSecondaryVM_Task,omitempty"`
    +	Res    *types.CreateSecondaryVM_TaskResponse `xml:"urn:vim25 CreateSecondaryVM_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateSecondaryVM_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateSecondaryVM_Task(ctx context.Context, r soap.RoundTripper, req *types.CreateSecondaryVM_Task) (*types.CreateSecondaryVM_TaskResponse, error) {
    +	var reqBody, resBody CreateSecondaryVM_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateSnapshotEx_TaskBody struct {
    +	Req    *types.CreateSnapshotEx_Task         `xml:"urn:vim25 CreateSnapshotEx_Task,omitempty"`
    +	Res    *types.CreateSnapshotEx_TaskResponse `xml:"urn:vim25 CreateSnapshotEx_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateSnapshotEx_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateSnapshotEx_Task(ctx context.Context, r soap.RoundTripper, req *types.CreateSnapshotEx_Task) (*types.CreateSnapshotEx_TaskResponse, error) {
    +	var reqBody, resBody CreateSnapshotEx_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateSnapshot_TaskBody struct {
    +	Req    *types.CreateSnapshot_Task         `xml:"urn:vim25 CreateSnapshot_Task,omitempty"`
    +	Res    *types.CreateSnapshot_TaskResponse `xml:"urn:vim25 CreateSnapshot_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateSnapshot_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateSnapshot_Task(ctx context.Context, r soap.RoundTripper, req *types.CreateSnapshot_Task) (*types.CreateSnapshot_TaskResponse, error) {
    +	var reqBody, resBody CreateSnapshot_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateStoragePodBody struct {
    +	Req    *types.CreateStoragePod         `xml:"urn:vim25 CreateStoragePod,omitempty"`
    +	Res    *types.CreateStoragePodResponse `xml:"urn:vim25 CreateStoragePodResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateStoragePodBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateStoragePod(ctx context.Context, r soap.RoundTripper, req *types.CreateStoragePod) (*types.CreateStoragePodResponse, error) {
    +	var reqBody, resBody CreateStoragePodBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateTaskBody struct {
    +	Req    *types.CreateTask         `xml:"urn:vim25 CreateTask,omitempty"`
    +	Res    *types.CreateTaskResponse `xml:"urn:vim25 CreateTaskResponse,omitempty"`
    +	Fault_ *soap.Fault               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateTaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateTask(ctx context.Context, r soap.RoundTripper, req *types.CreateTask) (*types.CreateTaskResponse, error) {
    +	var reqBody, resBody CreateTaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateTemporaryDirectoryInGuestBody struct {
    +	Req    *types.CreateTemporaryDirectoryInGuest         `xml:"urn:vim25 CreateTemporaryDirectoryInGuest,omitempty"`
    +	Res    *types.CreateTemporaryDirectoryInGuestResponse `xml:"urn:vim25 CreateTemporaryDirectoryInGuestResponse,omitempty"`
    +	Fault_ *soap.Fault                                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateTemporaryDirectoryInGuestBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateTemporaryDirectoryInGuest(ctx context.Context, r soap.RoundTripper, req *types.CreateTemporaryDirectoryInGuest) (*types.CreateTemporaryDirectoryInGuestResponse, error) {
    +	var reqBody, resBody CreateTemporaryDirectoryInGuestBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateTemporaryFileInGuestBody struct {
    +	Req    *types.CreateTemporaryFileInGuest         `xml:"urn:vim25 CreateTemporaryFileInGuest,omitempty"`
    +	Res    *types.CreateTemporaryFileInGuestResponse `xml:"urn:vim25 CreateTemporaryFileInGuestResponse,omitempty"`
    +	Fault_ *soap.Fault                               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateTemporaryFileInGuestBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateTemporaryFileInGuest(ctx context.Context, r soap.RoundTripper, req *types.CreateTemporaryFileInGuest) (*types.CreateTemporaryFileInGuestResponse, error) {
    +	var reqBody, resBody CreateTemporaryFileInGuestBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateUserBody struct {
    +	Req    *types.CreateUser         `xml:"urn:vim25 CreateUser,omitempty"`
    +	Res    *types.CreateUserResponse `xml:"urn:vim25 CreateUserResponse,omitempty"`
    +	Fault_ *soap.Fault               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateUserBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateUser(ctx context.Context, r soap.RoundTripper, req *types.CreateUser) (*types.CreateUserResponse, error) {
    +	var reqBody, resBody CreateUserBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateVAppBody struct {
    +	Req    *types.CreateVApp         `xml:"urn:vim25 CreateVApp,omitempty"`
    +	Res    *types.CreateVAppResponse `xml:"urn:vim25 CreateVAppResponse,omitempty"`
    +	Fault_ *soap.Fault               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateVAppBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateVApp(ctx context.Context, r soap.RoundTripper, req *types.CreateVApp) (*types.CreateVAppResponse, error) {
    +	var reqBody, resBody CreateVAppBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateVM_TaskBody struct {
    +	Req    *types.CreateVM_Task         `xml:"urn:vim25 CreateVM_Task,omitempty"`
    +	Res    *types.CreateVM_TaskResponse `xml:"urn:vim25 CreateVM_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateVM_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateVM_Task(ctx context.Context, r soap.RoundTripper, req *types.CreateVM_Task) (*types.CreateVM_TaskResponse, error) {
    +	var reqBody, resBody CreateVM_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateVirtualDisk_TaskBody struct {
    +	Req    *types.CreateVirtualDisk_Task         `xml:"urn:vim25 CreateVirtualDisk_Task,omitempty"`
    +	Res    *types.CreateVirtualDisk_TaskResponse `xml:"urn:vim25 CreateVirtualDisk_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateVirtualDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateVirtualDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.CreateVirtualDisk_Task) (*types.CreateVirtualDisk_TaskResponse, error) {
    +	var reqBody, resBody CreateVirtualDisk_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateVmfsDatastoreBody struct {
    +	Req    *types.CreateVmfsDatastore         `xml:"urn:vim25 CreateVmfsDatastore,omitempty"`
    +	Res    *types.CreateVmfsDatastoreResponse `xml:"urn:vim25 CreateVmfsDatastoreResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateVmfsDatastoreBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateVmfsDatastore(ctx context.Context, r soap.RoundTripper, req *types.CreateVmfsDatastore) (*types.CreateVmfsDatastoreResponse, error) {
    +	var reqBody, resBody CreateVmfsDatastoreBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateVvolDatastoreBody struct {
    +	Req    *types.CreateVvolDatastore         `xml:"urn:vim25 CreateVvolDatastore,omitempty"`
    +	Res    *types.CreateVvolDatastoreResponse `xml:"urn:vim25 CreateVvolDatastoreResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateVvolDatastoreBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateVvolDatastore(ctx context.Context, r soap.RoundTripper, req *types.CreateVvolDatastore) (*types.CreateVvolDatastoreResponse, error) {
    +	var reqBody, resBody CreateVvolDatastoreBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CryptoManagerHostEnableBody struct {
    +	Req    *types.CryptoManagerHostEnable         `xml:"urn:vim25 CryptoManagerHostEnable,omitempty"`
    +	Res    *types.CryptoManagerHostEnableResponse `xml:"urn:vim25 CryptoManagerHostEnableResponse,omitempty"`
    +	Fault_ *soap.Fault                            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CryptoManagerHostEnableBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CryptoManagerHostEnable(ctx context.Context, r soap.RoundTripper, req *types.CryptoManagerHostEnable) (*types.CryptoManagerHostEnableResponse, error) {
    +	var reqBody, resBody CryptoManagerHostEnableBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CryptoManagerHostPrepareBody struct {
    +	Req    *types.CryptoManagerHostPrepare         `xml:"urn:vim25 CryptoManagerHostPrepare,omitempty"`
    +	Res    *types.CryptoManagerHostPrepareResponse `xml:"urn:vim25 CryptoManagerHostPrepareResponse,omitempty"`
    +	Fault_ *soap.Fault                             `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CryptoManagerHostPrepareBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CryptoManagerHostPrepare(ctx context.Context, r soap.RoundTripper, req *types.CryptoManagerHostPrepare) (*types.CryptoManagerHostPrepareResponse, error) {
    +	var reqBody, resBody CryptoManagerHostPrepareBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CryptoUnlock_TaskBody struct {
    +	Req    *types.CryptoUnlock_Task         `xml:"urn:vim25 CryptoUnlock_Task,omitempty"`
    +	Res    *types.CryptoUnlock_TaskResponse `xml:"urn:vim25 CryptoUnlock_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CryptoUnlock_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CryptoUnlock_Task(ctx context.Context, r soap.RoundTripper, req *types.CryptoUnlock_Task) (*types.CryptoUnlock_TaskResponse, error) {
    +	var reqBody, resBody CryptoUnlock_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CurrentTimeBody struct {
    +	Req    *types.CurrentTime         `xml:"urn:vim25 CurrentTime,omitempty"`
    +	Res    *types.CurrentTimeResponse `xml:"urn:vim25 CurrentTimeResponse,omitempty"`
    +	Fault_ *soap.Fault                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CurrentTimeBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CurrentTime(ctx context.Context, r soap.RoundTripper, req *types.CurrentTime) (*types.CurrentTimeResponse, error) {
    +	var reqBody, resBody CurrentTimeBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CustomizationSpecItemToXmlBody struct {
    +	Req    *types.CustomizationSpecItemToXml         `xml:"urn:vim25 CustomizationSpecItemToXml,omitempty"`
    +	Res    *types.CustomizationSpecItemToXmlResponse `xml:"urn:vim25 CustomizationSpecItemToXmlResponse,omitempty"`
    +	Fault_ *soap.Fault                               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CustomizationSpecItemToXmlBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CustomizationSpecItemToXml(ctx context.Context, r soap.RoundTripper, req *types.CustomizationSpecItemToXml) (*types.CustomizationSpecItemToXmlResponse, error) {
    +	var reqBody, resBody CustomizationSpecItemToXmlBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CustomizeVM_TaskBody struct {
    +	Req    *types.CustomizeVM_Task         `xml:"urn:vim25 CustomizeVM_Task,omitempty"`
    +	Res    *types.CustomizeVM_TaskResponse `xml:"urn:vim25 CustomizeVM_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CustomizeVM_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CustomizeVM_Task(ctx context.Context, r soap.RoundTripper, req *types.CustomizeVM_Task) (*types.CustomizeVM_TaskResponse, error) {
    +	var reqBody, resBody CustomizeVM_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DVPortgroupRollback_TaskBody struct {
    +	Req    *types.DVPortgroupRollback_Task         `xml:"urn:vim25 DVPortgroupRollback_Task,omitempty"`
    +	Res    *types.DVPortgroupRollback_TaskResponse `xml:"urn:vim25 DVPortgroupRollback_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                             `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DVPortgroupRollback_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DVPortgroupRollback_Task(ctx context.Context, r soap.RoundTripper, req *types.DVPortgroupRollback_Task) (*types.DVPortgroupRollback_TaskResponse, error) {
    +	var reqBody, resBody DVPortgroupRollback_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DVSManagerExportEntity_TaskBody struct {
    +	Req    *types.DVSManagerExportEntity_Task         `xml:"urn:vim25 DVSManagerExportEntity_Task,omitempty"`
    +	Res    *types.DVSManagerExportEntity_TaskResponse `xml:"urn:vim25 DVSManagerExportEntity_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DVSManagerExportEntity_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DVSManagerExportEntity_Task(ctx context.Context, r soap.RoundTripper, req *types.DVSManagerExportEntity_Task) (*types.DVSManagerExportEntity_TaskResponse, error) {
    +	var reqBody, resBody DVSManagerExportEntity_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DVSManagerImportEntity_TaskBody struct {
    +	Req    *types.DVSManagerImportEntity_Task         `xml:"urn:vim25 DVSManagerImportEntity_Task,omitempty"`
    +	Res    *types.DVSManagerImportEntity_TaskResponse `xml:"urn:vim25 DVSManagerImportEntity_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DVSManagerImportEntity_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DVSManagerImportEntity_Task(ctx context.Context, r soap.RoundTripper, req *types.DVSManagerImportEntity_Task) (*types.DVSManagerImportEntity_TaskResponse, error) {
    +	var reqBody, resBody DVSManagerImportEntity_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DVSManagerLookupDvPortGroupBody struct {
    +	Req    *types.DVSManagerLookupDvPortGroup         `xml:"urn:vim25 DVSManagerLookupDvPortGroup,omitempty"`
    +	Res    *types.DVSManagerLookupDvPortGroupResponse `xml:"urn:vim25 DVSManagerLookupDvPortGroupResponse,omitempty"`
    +	Fault_ *soap.Fault                                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DVSManagerLookupDvPortGroupBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DVSManagerLookupDvPortGroup(ctx context.Context, r soap.RoundTripper, req *types.DVSManagerLookupDvPortGroup) (*types.DVSManagerLookupDvPortGroupResponse, error) {
    +	var reqBody, resBody DVSManagerLookupDvPortGroupBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DVSRollback_TaskBody struct {
    +	Req    *types.DVSRollback_Task         `xml:"urn:vim25 DVSRollback_Task,omitempty"`
    +	Res    *types.DVSRollback_TaskResponse `xml:"urn:vim25 DVSRollback_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DVSRollback_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DVSRollback_Task(ctx context.Context, r soap.RoundTripper, req *types.DVSRollback_Task) (*types.DVSRollback_TaskResponse, error) {
    +	var reqBody, resBody DVSRollback_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DatastoreEnterMaintenanceModeBody struct {
    +	Req    *types.DatastoreEnterMaintenanceMode         `xml:"urn:vim25 DatastoreEnterMaintenanceMode,omitempty"`
    +	Res    *types.DatastoreEnterMaintenanceModeResponse `xml:"urn:vim25 DatastoreEnterMaintenanceModeResponse,omitempty"`
    +	Fault_ *soap.Fault                                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DatastoreEnterMaintenanceModeBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DatastoreEnterMaintenanceMode(ctx context.Context, r soap.RoundTripper, req *types.DatastoreEnterMaintenanceMode) (*types.DatastoreEnterMaintenanceModeResponse, error) {
    +	var reqBody, resBody DatastoreEnterMaintenanceModeBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DatastoreExitMaintenanceMode_TaskBody struct {
    +	Req    *types.DatastoreExitMaintenanceMode_Task         `xml:"urn:vim25 DatastoreExitMaintenanceMode_Task,omitempty"`
    +	Res    *types.DatastoreExitMaintenanceMode_TaskResponse `xml:"urn:vim25 DatastoreExitMaintenanceMode_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DatastoreExitMaintenanceMode_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DatastoreExitMaintenanceMode_Task(ctx context.Context, r soap.RoundTripper, req *types.DatastoreExitMaintenanceMode_Task) (*types.DatastoreExitMaintenanceMode_TaskResponse, error) {
    +	var reqBody, resBody DatastoreExitMaintenanceMode_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DecodeLicenseBody struct {
    +	Req    *types.DecodeLicense         `xml:"urn:vim25 DecodeLicense,omitempty"`
    +	Res    *types.DecodeLicenseResponse `xml:"urn:vim25 DecodeLicenseResponse,omitempty"`
    +	Fault_ *soap.Fault                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DecodeLicenseBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DecodeLicense(ctx context.Context, r soap.RoundTripper, req *types.DecodeLicense) (*types.DecodeLicenseResponse, error) {
    +	var reqBody, resBody DecodeLicenseBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DefragmentAllDisksBody struct {
    +	Req    *types.DefragmentAllDisks         `xml:"urn:vim25 DefragmentAllDisks,omitempty"`
    +	Res    *types.DefragmentAllDisksResponse `xml:"urn:vim25 DefragmentAllDisksResponse,omitempty"`
    +	Fault_ *soap.Fault                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DefragmentAllDisksBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DefragmentAllDisks(ctx context.Context, r soap.RoundTripper, req *types.DefragmentAllDisks) (*types.DefragmentAllDisksResponse, error) {
    +	var reqBody, resBody DefragmentAllDisksBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DefragmentVirtualDisk_TaskBody struct {
    +	Req    *types.DefragmentVirtualDisk_Task         `xml:"urn:vim25 DefragmentVirtualDisk_Task,omitempty"`
    +	Res    *types.DefragmentVirtualDisk_TaskResponse `xml:"urn:vim25 DefragmentVirtualDisk_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DefragmentVirtualDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DefragmentVirtualDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.DefragmentVirtualDisk_Task) (*types.DefragmentVirtualDisk_TaskResponse, error) {
    +	var reqBody, resBody DefragmentVirtualDisk_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DeleteCustomizationSpecBody struct {
    +	Req    *types.DeleteCustomizationSpec         `xml:"urn:vim25 DeleteCustomizationSpec,omitempty"`
    +	Res    *types.DeleteCustomizationSpecResponse `xml:"urn:vim25 DeleteCustomizationSpecResponse,omitempty"`
    +	Fault_ *soap.Fault                            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DeleteCustomizationSpecBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DeleteCustomizationSpec(ctx context.Context, r soap.RoundTripper, req *types.DeleteCustomizationSpec) (*types.DeleteCustomizationSpecResponse, error) {
    +	var reqBody, resBody DeleteCustomizationSpecBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DeleteDatastoreFile_TaskBody struct {
    +	Req    *types.DeleteDatastoreFile_Task         `xml:"urn:vim25 DeleteDatastoreFile_Task,omitempty"`
    +	Res    *types.DeleteDatastoreFile_TaskResponse `xml:"urn:vim25 DeleteDatastoreFile_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                             `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DeleteDatastoreFile_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DeleteDatastoreFile_Task(ctx context.Context, r soap.RoundTripper, req *types.DeleteDatastoreFile_Task) (*types.DeleteDatastoreFile_TaskResponse, error) {
    +	var reqBody, resBody DeleteDatastoreFile_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DeleteDirectoryBody struct {
    +	Req    *types.DeleteDirectory         `xml:"urn:vim25 DeleteDirectory,omitempty"`
    +	Res    *types.DeleteDirectoryResponse `xml:"urn:vim25 DeleteDirectoryResponse,omitempty"`
    +	Fault_ *soap.Fault                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DeleteDirectoryBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DeleteDirectory(ctx context.Context, r soap.RoundTripper, req *types.DeleteDirectory) (*types.DeleteDirectoryResponse, error) {
    +	var reqBody, resBody DeleteDirectoryBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DeleteDirectoryInGuestBody struct {
    +	Req    *types.DeleteDirectoryInGuest         `xml:"urn:vim25 DeleteDirectoryInGuest,omitempty"`
    +	Res    *types.DeleteDirectoryInGuestResponse `xml:"urn:vim25 DeleteDirectoryInGuestResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DeleteDirectoryInGuestBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DeleteDirectoryInGuest(ctx context.Context, r soap.RoundTripper, req *types.DeleteDirectoryInGuest) (*types.DeleteDirectoryInGuestResponse, error) {
    +	var reqBody, resBody DeleteDirectoryInGuestBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DeleteFileBody struct {
    +	Req    *types.DeleteFile         `xml:"urn:vim25 DeleteFile,omitempty"`
    +	Res    *types.DeleteFileResponse `xml:"urn:vim25 DeleteFileResponse,omitempty"`
    +	Fault_ *soap.Fault               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DeleteFileBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DeleteFile(ctx context.Context, r soap.RoundTripper, req *types.DeleteFile) (*types.DeleteFileResponse, error) {
    +	var reqBody, resBody DeleteFileBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DeleteFileInGuestBody struct {
    +	Req    *types.DeleteFileInGuest         `xml:"urn:vim25 DeleteFileInGuest,omitempty"`
    +	Res    *types.DeleteFileInGuestResponse `xml:"urn:vim25 DeleteFileInGuestResponse,omitempty"`
    +	Fault_ *soap.Fault                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DeleteFileInGuestBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DeleteFileInGuest(ctx context.Context, r soap.RoundTripper, req *types.DeleteFileInGuest) (*types.DeleteFileInGuestResponse, error) {
    +	var reqBody, resBody DeleteFileInGuestBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DeleteHostSpecificationBody struct {
    +	Req    *types.DeleteHostSpecification         `xml:"urn:vim25 DeleteHostSpecification,omitempty"`
    +	Res    *types.DeleteHostSpecificationResponse `xml:"urn:vim25 DeleteHostSpecificationResponse,omitempty"`
    +	Fault_ *soap.Fault                            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DeleteHostSpecificationBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DeleteHostSpecification(ctx context.Context, r soap.RoundTripper, req *types.DeleteHostSpecification) (*types.DeleteHostSpecificationResponse, error) {
    +	var reqBody, resBody DeleteHostSpecificationBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DeleteHostSubSpecificationBody struct {
    +	Req    *types.DeleteHostSubSpecification         `xml:"urn:vim25 DeleteHostSubSpecification,omitempty"`
    +	Res    *types.DeleteHostSubSpecificationResponse `xml:"urn:vim25 DeleteHostSubSpecificationResponse,omitempty"`
    +	Fault_ *soap.Fault                               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DeleteHostSubSpecificationBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DeleteHostSubSpecification(ctx context.Context, r soap.RoundTripper, req *types.DeleteHostSubSpecification) (*types.DeleteHostSubSpecificationResponse, error) {
    +	var reqBody, resBody DeleteHostSubSpecificationBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DeleteNvdimmBlockNamespaces_TaskBody struct {
    +	Req    *types.DeleteNvdimmBlockNamespaces_Task         `xml:"urn:vim25 DeleteNvdimmBlockNamespaces_Task,omitempty"`
    +	Res    *types.DeleteNvdimmBlockNamespaces_TaskResponse `xml:"urn:vim25 DeleteNvdimmBlockNamespaces_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DeleteNvdimmBlockNamespaces_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DeleteNvdimmBlockNamespaces_Task(ctx context.Context, r soap.RoundTripper, req *types.DeleteNvdimmBlockNamespaces_Task) (*types.DeleteNvdimmBlockNamespaces_TaskResponse, error) {
    +	var reqBody, resBody DeleteNvdimmBlockNamespaces_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DeleteNvdimmNamespace_TaskBody struct {
    +	Req    *types.DeleteNvdimmNamespace_Task         `xml:"urn:vim25 DeleteNvdimmNamespace_Task,omitempty"`
    +	Res    *types.DeleteNvdimmNamespace_TaskResponse `xml:"urn:vim25 DeleteNvdimmNamespace_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DeleteNvdimmNamespace_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DeleteNvdimmNamespace_Task(ctx context.Context, r soap.RoundTripper, req *types.DeleteNvdimmNamespace_Task) (*types.DeleteNvdimmNamespace_TaskResponse, error) {
    +	var reqBody, resBody DeleteNvdimmNamespace_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DeleteRegistryKeyInGuestBody struct {
    +	Req    *types.DeleteRegistryKeyInGuest         `xml:"urn:vim25 DeleteRegistryKeyInGuest,omitempty"`
    +	Res    *types.DeleteRegistryKeyInGuestResponse `xml:"urn:vim25 DeleteRegistryKeyInGuestResponse,omitempty"`
    +	Fault_ *soap.Fault                             `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DeleteRegistryKeyInGuestBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DeleteRegistryKeyInGuest(ctx context.Context, r soap.RoundTripper, req *types.DeleteRegistryKeyInGuest) (*types.DeleteRegistryKeyInGuestResponse, error) {
    +	var reqBody, resBody DeleteRegistryKeyInGuestBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DeleteRegistryValueInGuestBody struct {
    +	Req    *types.DeleteRegistryValueInGuest         `xml:"urn:vim25 DeleteRegistryValueInGuest,omitempty"`
    +	Res    *types.DeleteRegistryValueInGuestResponse `xml:"urn:vim25 DeleteRegistryValueInGuestResponse,omitempty"`
    +	Fault_ *soap.Fault                               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DeleteRegistryValueInGuestBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DeleteRegistryValueInGuest(ctx context.Context, r soap.RoundTripper, req *types.DeleteRegistryValueInGuest) (*types.DeleteRegistryValueInGuestResponse, error) {
    +	var reqBody, resBody DeleteRegistryValueInGuestBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DeleteScsiLunStateBody struct {
    +	Req    *types.DeleteScsiLunState         `xml:"urn:vim25 DeleteScsiLunState,omitempty"`
    +	Res    *types.DeleteScsiLunStateResponse `xml:"urn:vim25 DeleteScsiLunStateResponse,omitempty"`
    +	Fault_ *soap.Fault                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DeleteScsiLunStateBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DeleteScsiLunState(ctx context.Context, r soap.RoundTripper, req *types.DeleteScsiLunState) (*types.DeleteScsiLunStateResponse, error) {
    +	var reqBody, resBody DeleteScsiLunStateBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DeleteSnapshot_TaskBody struct {
    +	Req    *types.DeleteSnapshot_Task         `xml:"urn:vim25 DeleteSnapshot_Task,omitempty"`
    +	Res    *types.DeleteSnapshot_TaskResponse `xml:"urn:vim25 DeleteSnapshot_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DeleteSnapshot_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DeleteSnapshot_Task(ctx context.Context, r soap.RoundTripper, req *types.DeleteSnapshot_Task) (*types.DeleteSnapshot_TaskResponse, error) {
    +	var reqBody, resBody DeleteSnapshot_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DeleteVStorageObject_TaskBody struct {
    +	Req    *types.DeleteVStorageObject_Task         `xml:"urn:vim25 DeleteVStorageObject_Task,omitempty"`
    +	Res    *types.DeleteVStorageObject_TaskResponse `xml:"urn:vim25 DeleteVStorageObject_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                              `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DeleteVStorageObject_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DeleteVStorageObject_Task(ctx context.Context, r soap.RoundTripper, req *types.DeleteVStorageObject_Task) (*types.DeleteVStorageObject_TaskResponse, error) {
    +	var reqBody, resBody DeleteVStorageObject_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DeleteVffsVolumeStateBody struct {
    +	Req    *types.DeleteVffsVolumeState         `xml:"urn:vim25 DeleteVffsVolumeState,omitempty"`
    +	Res    *types.DeleteVffsVolumeStateResponse `xml:"urn:vim25 DeleteVffsVolumeStateResponse,omitempty"`
    +	Fault_ *soap.Fault                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DeleteVffsVolumeStateBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DeleteVffsVolumeState(ctx context.Context, r soap.RoundTripper, req *types.DeleteVffsVolumeState) (*types.DeleteVffsVolumeStateResponse, error) {
    +	var reqBody, resBody DeleteVffsVolumeStateBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DeleteVirtualDisk_TaskBody struct {
    +	Req    *types.DeleteVirtualDisk_Task         `xml:"urn:vim25 DeleteVirtualDisk_Task,omitempty"`
    +	Res    *types.DeleteVirtualDisk_TaskResponse `xml:"urn:vim25 DeleteVirtualDisk_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DeleteVirtualDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DeleteVirtualDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.DeleteVirtualDisk_Task) (*types.DeleteVirtualDisk_TaskResponse, error) {
    +	var reqBody, resBody DeleteVirtualDisk_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DeleteVmfsVolumeStateBody struct {
    +	Req    *types.DeleteVmfsVolumeState         `xml:"urn:vim25 DeleteVmfsVolumeState,omitempty"`
    +	Res    *types.DeleteVmfsVolumeStateResponse `xml:"urn:vim25 DeleteVmfsVolumeStateResponse,omitempty"`
    +	Fault_ *soap.Fault                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DeleteVmfsVolumeStateBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DeleteVmfsVolumeState(ctx context.Context, r soap.RoundTripper, req *types.DeleteVmfsVolumeState) (*types.DeleteVmfsVolumeStateResponse, error) {
    +	var reqBody, resBody DeleteVmfsVolumeStateBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DeleteVsanObjectsBody struct {
    +	Req    *types.DeleteVsanObjects         `xml:"urn:vim25 DeleteVsanObjects,omitempty"`
    +	Res    *types.DeleteVsanObjectsResponse `xml:"urn:vim25 DeleteVsanObjectsResponse,omitempty"`
    +	Fault_ *soap.Fault                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DeleteVsanObjectsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DeleteVsanObjects(ctx context.Context, r soap.RoundTripper, req *types.DeleteVsanObjects) (*types.DeleteVsanObjectsResponse, error) {
    +	var reqBody, resBody DeleteVsanObjectsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DeselectVnicBody struct {
    +	Req    *types.DeselectVnic         `xml:"urn:vim25 DeselectVnic,omitempty"`
    +	Res    *types.DeselectVnicResponse `xml:"urn:vim25 DeselectVnicResponse,omitempty"`
    +	Fault_ *soap.Fault                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DeselectVnicBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DeselectVnic(ctx context.Context, r soap.RoundTripper, req *types.DeselectVnic) (*types.DeselectVnicResponse, error) {
    +	var reqBody, resBody DeselectVnicBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DeselectVnicForNicTypeBody struct {
    +	Req    *types.DeselectVnicForNicType         `xml:"urn:vim25 DeselectVnicForNicType,omitempty"`
    +	Res    *types.DeselectVnicForNicTypeResponse `xml:"urn:vim25 DeselectVnicForNicTypeResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DeselectVnicForNicTypeBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DeselectVnicForNicType(ctx context.Context, r soap.RoundTripper, req *types.DeselectVnicForNicType) (*types.DeselectVnicForNicTypeResponse, error) {
    +	var reqBody, resBody DeselectVnicForNicTypeBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DestroyChildrenBody struct {
    +	Req    *types.DestroyChildren         `xml:"urn:vim25 DestroyChildren,omitempty"`
    +	Res    *types.DestroyChildrenResponse `xml:"urn:vim25 DestroyChildrenResponse,omitempty"`
    +	Fault_ *soap.Fault                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DestroyChildrenBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DestroyChildren(ctx context.Context, r soap.RoundTripper, req *types.DestroyChildren) (*types.DestroyChildrenResponse, error) {
    +	var reqBody, resBody DestroyChildrenBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DestroyCollectorBody struct {
    +	Req    *types.DestroyCollector         `xml:"urn:vim25 DestroyCollector,omitempty"`
    +	Res    *types.DestroyCollectorResponse `xml:"urn:vim25 DestroyCollectorResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DestroyCollectorBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DestroyCollector(ctx context.Context, r soap.RoundTripper, req *types.DestroyCollector) (*types.DestroyCollectorResponse, error) {
    +	var reqBody, resBody DestroyCollectorBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DestroyDatastoreBody struct {
    +	Req    *types.DestroyDatastore         `xml:"urn:vim25 DestroyDatastore,omitempty"`
    +	Res    *types.DestroyDatastoreResponse `xml:"urn:vim25 DestroyDatastoreResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DestroyDatastoreBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DestroyDatastore(ctx context.Context, r soap.RoundTripper, req *types.DestroyDatastore) (*types.DestroyDatastoreResponse, error) {
    +	var reqBody, resBody DestroyDatastoreBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DestroyIpPoolBody struct {
    +	Req    *types.DestroyIpPool         `xml:"urn:vim25 DestroyIpPool,omitempty"`
    +	Res    *types.DestroyIpPoolResponse `xml:"urn:vim25 DestroyIpPoolResponse,omitempty"`
    +	Fault_ *soap.Fault                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DestroyIpPoolBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DestroyIpPool(ctx context.Context, r soap.RoundTripper, req *types.DestroyIpPool) (*types.DestroyIpPoolResponse, error) {
    +	var reqBody, resBody DestroyIpPoolBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DestroyNetworkBody struct {
    +	Req    *types.DestroyNetwork         `xml:"urn:vim25 DestroyNetwork,omitempty"`
    +	Res    *types.DestroyNetworkResponse `xml:"urn:vim25 DestroyNetworkResponse,omitempty"`
    +	Fault_ *soap.Fault                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DestroyNetworkBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DestroyNetwork(ctx context.Context, r soap.RoundTripper, req *types.DestroyNetwork) (*types.DestroyNetworkResponse, error) {
    +	var reqBody, resBody DestroyNetworkBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DestroyProfileBody struct {
    +	Req    *types.DestroyProfile         `xml:"urn:vim25 DestroyProfile,omitempty"`
    +	Res    *types.DestroyProfileResponse `xml:"urn:vim25 DestroyProfileResponse,omitempty"`
    +	Fault_ *soap.Fault                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DestroyProfileBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DestroyProfile(ctx context.Context, r soap.RoundTripper, req *types.DestroyProfile) (*types.DestroyProfileResponse, error) {
    +	var reqBody, resBody DestroyProfileBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DestroyPropertyCollectorBody struct {
    +	Req    *types.DestroyPropertyCollector         `xml:"urn:vim25 DestroyPropertyCollector,omitempty"`
    +	Res    *types.DestroyPropertyCollectorResponse `xml:"urn:vim25 DestroyPropertyCollectorResponse,omitempty"`
    +	Fault_ *soap.Fault                             `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DestroyPropertyCollectorBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DestroyPropertyCollector(ctx context.Context, r soap.RoundTripper, req *types.DestroyPropertyCollector) (*types.DestroyPropertyCollectorResponse, error) {
    +	var reqBody, resBody DestroyPropertyCollectorBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DestroyPropertyFilterBody struct {
    +	Req    *types.DestroyPropertyFilter         `xml:"urn:vim25 DestroyPropertyFilter,omitempty"`
    +	Res    *types.DestroyPropertyFilterResponse `xml:"urn:vim25 DestroyPropertyFilterResponse,omitempty"`
    +	Fault_ *soap.Fault                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DestroyPropertyFilterBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DestroyPropertyFilter(ctx context.Context, r soap.RoundTripper, req *types.DestroyPropertyFilter) (*types.DestroyPropertyFilterResponse, error) {
    +	var reqBody, resBody DestroyPropertyFilterBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DestroyVffsBody struct {
    +	Req    *types.DestroyVffs         `xml:"urn:vim25 DestroyVffs,omitempty"`
    +	Res    *types.DestroyVffsResponse `xml:"urn:vim25 DestroyVffsResponse,omitempty"`
    +	Fault_ *soap.Fault                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DestroyVffsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DestroyVffs(ctx context.Context, r soap.RoundTripper, req *types.DestroyVffs) (*types.DestroyVffsResponse, error) {
    +	var reqBody, resBody DestroyVffsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DestroyViewBody struct {
    +	Req    *types.DestroyView         `xml:"urn:vim25 DestroyView,omitempty"`
    +	Res    *types.DestroyViewResponse `xml:"urn:vim25 DestroyViewResponse,omitempty"`
    +	Fault_ *soap.Fault                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DestroyViewBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DestroyView(ctx context.Context, r soap.RoundTripper, req *types.DestroyView) (*types.DestroyViewResponse, error) {
    +	var reqBody, resBody DestroyViewBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type Destroy_TaskBody struct {
    +	Req    *types.Destroy_Task         `xml:"urn:vim25 Destroy_Task,omitempty"`
    +	Res    *types.Destroy_TaskResponse `xml:"urn:vim25 Destroy_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *Destroy_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func Destroy_Task(ctx context.Context, r soap.RoundTripper, req *types.Destroy_Task) (*types.Destroy_TaskResponse, error) {
    +	var reqBody, resBody Destroy_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DetachDisk_TaskBody struct {
    +	Req    *types.DetachDisk_Task         `xml:"urn:vim25 DetachDisk_Task,omitempty"`
    +	Res    *types.DetachDisk_TaskResponse `xml:"urn:vim25 DetachDisk_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DetachDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DetachDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.DetachDisk_Task) (*types.DetachDisk_TaskResponse, error) {
    +	var reqBody, resBody DetachDisk_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DetachScsiLunBody struct {
    +	Req    *types.DetachScsiLun         `xml:"urn:vim25 DetachScsiLun,omitempty"`
    +	Res    *types.DetachScsiLunResponse `xml:"urn:vim25 DetachScsiLunResponse,omitempty"`
    +	Fault_ *soap.Fault                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DetachScsiLunBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DetachScsiLun(ctx context.Context, r soap.RoundTripper, req *types.DetachScsiLun) (*types.DetachScsiLunResponse, error) {
    +	var reqBody, resBody DetachScsiLunBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DetachScsiLunEx_TaskBody struct {
    +	Req    *types.DetachScsiLunEx_Task         `xml:"urn:vim25 DetachScsiLunEx_Task,omitempty"`
    +	Res    *types.DetachScsiLunEx_TaskResponse `xml:"urn:vim25 DetachScsiLunEx_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DetachScsiLunEx_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DetachScsiLunEx_Task(ctx context.Context, r soap.RoundTripper, req *types.DetachScsiLunEx_Task) (*types.DetachScsiLunEx_TaskResponse, error) {
    +	var reqBody, resBody DetachScsiLunEx_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DetachTagFromVStorageObjectBody struct {
    +	Req    *types.DetachTagFromVStorageObject         `xml:"urn:vim25 DetachTagFromVStorageObject,omitempty"`
    +	Res    *types.DetachTagFromVStorageObjectResponse `xml:"urn:vim25 DetachTagFromVStorageObjectResponse,omitempty"`
    +	Fault_ *soap.Fault                                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DetachTagFromVStorageObjectBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DetachTagFromVStorageObject(ctx context.Context, r soap.RoundTripper, req *types.DetachTagFromVStorageObject) (*types.DetachTagFromVStorageObjectResponse, error) {
    +	var reqBody, resBody DetachTagFromVStorageObjectBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DisableEvcMode_TaskBody struct {
    +	Req    *types.DisableEvcMode_Task         `xml:"urn:vim25 DisableEvcMode_Task,omitempty"`
    +	Res    *types.DisableEvcMode_TaskResponse `xml:"urn:vim25 DisableEvcMode_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DisableEvcMode_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DisableEvcMode_Task(ctx context.Context, r soap.RoundTripper, req *types.DisableEvcMode_Task) (*types.DisableEvcMode_TaskResponse, error) {
    +	var reqBody, resBody DisableEvcMode_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DisableFeatureBody struct {
    +	Req    *types.DisableFeature         `xml:"urn:vim25 DisableFeature,omitempty"`
    +	Res    *types.DisableFeatureResponse `xml:"urn:vim25 DisableFeatureResponse,omitempty"`
    +	Fault_ *soap.Fault                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DisableFeatureBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DisableFeature(ctx context.Context, r soap.RoundTripper, req *types.DisableFeature) (*types.DisableFeatureResponse, error) {
    +	var reqBody, resBody DisableFeatureBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DisableHyperThreadingBody struct {
    +	Req    *types.DisableHyperThreading         `xml:"urn:vim25 DisableHyperThreading,omitempty"`
    +	Res    *types.DisableHyperThreadingResponse `xml:"urn:vim25 DisableHyperThreadingResponse,omitempty"`
    +	Fault_ *soap.Fault                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DisableHyperThreadingBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DisableHyperThreading(ctx context.Context, r soap.RoundTripper, req *types.DisableHyperThreading) (*types.DisableHyperThreadingResponse, error) {
    +	var reqBody, resBody DisableHyperThreadingBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DisableMultipathPathBody struct {
    +	Req    *types.DisableMultipathPath         `xml:"urn:vim25 DisableMultipathPath,omitempty"`
    +	Res    *types.DisableMultipathPathResponse `xml:"urn:vim25 DisableMultipathPathResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DisableMultipathPathBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DisableMultipathPath(ctx context.Context, r soap.RoundTripper, req *types.DisableMultipathPath) (*types.DisableMultipathPathResponse, error) {
    +	var reqBody, resBody DisableMultipathPathBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DisableRulesetBody struct {
    +	Req    *types.DisableRuleset         `xml:"urn:vim25 DisableRuleset,omitempty"`
    +	Res    *types.DisableRulesetResponse `xml:"urn:vim25 DisableRulesetResponse,omitempty"`
    +	Fault_ *soap.Fault                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DisableRulesetBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DisableRuleset(ctx context.Context, r soap.RoundTripper, req *types.DisableRuleset) (*types.DisableRulesetResponse, error) {
    +	var reqBody, resBody DisableRulesetBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DisableSecondaryVM_TaskBody struct {
    +	Req    *types.DisableSecondaryVM_Task         `xml:"urn:vim25 DisableSecondaryVM_Task,omitempty"`
    +	Res    *types.DisableSecondaryVM_TaskResponse `xml:"urn:vim25 DisableSecondaryVM_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DisableSecondaryVM_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DisableSecondaryVM_Task(ctx context.Context, r soap.RoundTripper, req *types.DisableSecondaryVM_Task) (*types.DisableSecondaryVM_TaskResponse, error) {
    +	var reqBody, resBody DisableSecondaryVM_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DisableSmartCardAuthenticationBody struct {
    +	Req    *types.DisableSmartCardAuthentication         `xml:"urn:vim25 DisableSmartCardAuthentication,omitempty"`
    +	Res    *types.DisableSmartCardAuthenticationResponse `xml:"urn:vim25 DisableSmartCardAuthenticationResponse,omitempty"`
    +	Fault_ *soap.Fault                                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DisableSmartCardAuthenticationBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DisableSmartCardAuthentication(ctx context.Context, r soap.RoundTripper, req *types.DisableSmartCardAuthentication) (*types.DisableSmartCardAuthenticationResponse, error) {
    +	var reqBody, resBody DisableSmartCardAuthenticationBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DisconnectHost_TaskBody struct {
    +	Req    *types.DisconnectHost_Task         `xml:"urn:vim25 DisconnectHost_Task,omitempty"`
    +	Res    *types.DisconnectHost_TaskResponse `xml:"urn:vim25 DisconnectHost_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DisconnectHost_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DisconnectHost_Task(ctx context.Context, r soap.RoundTripper, req *types.DisconnectHost_Task) (*types.DisconnectHost_TaskResponse, error) {
    +	var reqBody, resBody DisconnectHost_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DiscoverFcoeHbasBody struct {
    +	Req    *types.DiscoverFcoeHbas         `xml:"urn:vim25 DiscoverFcoeHbas,omitempty"`
    +	Res    *types.DiscoverFcoeHbasResponse `xml:"urn:vim25 DiscoverFcoeHbasResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DiscoverFcoeHbasBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DiscoverFcoeHbas(ctx context.Context, r soap.RoundTripper, req *types.DiscoverFcoeHbas) (*types.DiscoverFcoeHbasResponse, error) {
    +	var reqBody, resBody DiscoverFcoeHbasBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DissociateProfileBody struct {
    +	Req    *types.DissociateProfile         `xml:"urn:vim25 DissociateProfile,omitempty"`
    +	Res    *types.DissociateProfileResponse `xml:"urn:vim25 DissociateProfileResponse,omitempty"`
    +	Fault_ *soap.Fault                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DissociateProfileBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DissociateProfile(ctx context.Context, r soap.RoundTripper, req *types.DissociateProfile) (*types.DissociateProfileResponse, error) {
    +	var reqBody, resBody DissociateProfileBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DoesCustomizationSpecExistBody struct {
    +	Req    *types.DoesCustomizationSpecExist         `xml:"urn:vim25 DoesCustomizationSpecExist,omitempty"`
    +	Res    *types.DoesCustomizationSpecExistResponse `xml:"urn:vim25 DoesCustomizationSpecExistResponse,omitempty"`
    +	Fault_ *soap.Fault                               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DoesCustomizationSpecExistBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DoesCustomizationSpecExist(ctx context.Context, r soap.RoundTripper, req *types.DoesCustomizationSpecExist) (*types.DoesCustomizationSpecExistResponse, error) {
    +	var reqBody, resBody DoesCustomizationSpecExistBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DuplicateCustomizationSpecBody struct {
    +	Req    *types.DuplicateCustomizationSpec         `xml:"urn:vim25 DuplicateCustomizationSpec,omitempty"`
    +	Res    *types.DuplicateCustomizationSpecResponse `xml:"urn:vim25 DuplicateCustomizationSpecResponse,omitempty"`
    +	Fault_ *soap.Fault                               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DuplicateCustomizationSpecBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DuplicateCustomizationSpec(ctx context.Context, r soap.RoundTripper, req *types.DuplicateCustomizationSpec) (*types.DuplicateCustomizationSpecResponse, error) {
    +	var reqBody, resBody DuplicateCustomizationSpecBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DvsReconfigureVmVnicNetworkResourcePool_TaskBody struct {
    +	Req    *types.DvsReconfigureVmVnicNetworkResourcePool_Task         `xml:"urn:vim25 DvsReconfigureVmVnicNetworkResourcePool_Task,omitempty"`
    +	Res    *types.DvsReconfigureVmVnicNetworkResourcePool_TaskResponse `xml:"urn:vim25 DvsReconfigureVmVnicNetworkResourcePool_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DvsReconfigureVmVnicNetworkResourcePool_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DvsReconfigureVmVnicNetworkResourcePool_Task(ctx context.Context, r soap.RoundTripper, req *types.DvsReconfigureVmVnicNetworkResourcePool_Task) (*types.DvsReconfigureVmVnicNetworkResourcePool_TaskResponse, error) {
    +	var reqBody, resBody DvsReconfigureVmVnicNetworkResourcePool_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type EagerZeroVirtualDisk_TaskBody struct {
    +	Req    *types.EagerZeroVirtualDisk_Task         `xml:"urn:vim25 EagerZeroVirtualDisk_Task,omitempty"`
    +	Res    *types.EagerZeroVirtualDisk_TaskResponse `xml:"urn:vim25 EagerZeroVirtualDisk_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                              `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *EagerZeroVirtualDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func EagerZeroVirtualDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.EagerZeroVirtualDisk_Task) (*types.EagerZeroVirtualDisk_TaskResponse, error) {
    +	var reqBody, resBody EagerZeroVirtualDisk_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type EnableAlarmActionsBody struct {
    +	Req    *types.EnableAlarmActions         `xml:"urn:vim25 EnableAlarmActions,omitempty"`
    +	Res    *types.EnableAlarmActionsResponse `xml:"urn:vim25 EnableAlarmActionsResponse,omitempty"`
    +	Fault_ *soap.Fault                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *EnableAlarmActionsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func EnableAlarmActions(ctx context.Context, r soap.RoundTripper, req *types.EnableAlarmActions) (*types.EnableAlarmActionsResponse, error) {
    +	var reqBody, resBody EnableAlarmActionsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type EnableCryptoBody struct {
    +	Req    *types.EnableCrypto         `xml:"urn:vim25 EnableCrypto,omitempty"`
    +	Res    *types.EnableCryptoResponse `xml:"urn:vim25 EnableCryptoResponse,omitempty"`
    +	Fault_ *soap.Fault                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *EnableCryptoBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func EnableCrypto(ctx context.Context, r soap.RoundTripper, req *types.EnableCrypto) (*types.EnableCryptoResponse, error) {
    +	var reqBody, resBody EnableCryptoBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type EnableFeatureBody struct {
    +	Req    *types.EnableFeature         `xml:"urn:vim25 EnableFeature,omitempty"`
    +	Res    *types.EnableFeatureResponse `xml:"urn:vim25 EnableFeatureResponse,omitempty"`
    +	Fault_ *soap.Fault                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *EnableFeatureBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func EnableFeature(ctx context.Context, r soap.RoundTripper, req *types.EnableFeature) (*types.EnableFeatureResponse, error) {
    +	var reqBody, resBody EnableFeatureBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type EnableHyperThreadingBody struct {
    +	Req    *types.EnableHyperThreading         `xml:"urn:vim25 EnableHyperThreading,omitempty"`
    +	Res    *types.EnableHyperThreadingResponse `xml:"urn:vim25 EnableHyperThreadingResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *EnableHyperThreadingBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func EnableHyperThreading(ctx context.Context, r soap.RoundTripper, req *types.EnableHyperThreading) (*types.EnableHyperThreadingResponse, error) {
    +	var reqBody, resBody EnableHyperThreadingBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type EnableMultipathPathBody struct {
    +	Req    *types.EnableMultipathPath         `xml:"urn:vim25 EnableMultipathPath,omitempty"`
    +	Res    *types.EnableMultipathPathResponse `xml:"urn:vim25 EnableMultipathPathResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *EnableMultipathPathBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func EnableMultipathPath(ctx context.Context, r soap.RoundTripper, req *types.EnableMultipathPath) (*types.EnableMultipathPathResponse, error) {
    +	var reqBody, resBody EnableMultipathPathBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type EnableNetworkResourceManagementBody struct {
    +	Req    *types.EnableNetworkResourceManagement         `xml:"urn:vim25 EnableNetworkResourceManagement,omitempty"`
    +	Res    *types.EnableNetworkResourceManagementResponse `xml:"urn:vim25 EnableNetworkResourceManagementResponse,omitempty"`
    +	Fault_ *soap.Fault                                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *EnableNetworkResourceManagementBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func EnableNetworkResourceManagement(ctx context.Context, r soap.RoundTripper, req *types.EnableNetworkResourceManagement) (*types.EnableNetworkResourceManagementResponse, error) {
    +	var reqBody, resBody EnableNetworkResourceManagementBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type EnableRulesetBody struct {
    +	Req    *types.EnableRuleset         `xml:"urn:vim25 EnableRuleset,omitempty"`
    +	Res    *types.EnableRulesetResponse `xml:"urn:vim25 EnableRulesetResponse,omitempty"`
    +	Fault_ *soap.Fault                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *EnableRulesetBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func EnableRuleset(ctx context.Context, r soap.RoundTripper, req *types.EnableRuleset) (*types.EnableRulesetResponse, error) {
    +	var reqBody, resBody EnableRulesetBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type EnableSecondaryVM_TaskBody struct {
    +	Req    *types.EnableSecondaryVM_Task         `xml:"urn:vim25 EnableSecondaryVM_Task,omitempty"`
    +	Res    *types.EnableSecondaryVM_TaskResponse `xml:"urn:vim25 EnableSecondaryVM_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *EnableSecondaryVM_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func EnableSecondaryVM_Task(ctx context.Context, r soap.RoundTripper, req *types.EnableSecondaryVM_Task) (*types.EnableSecondaryVM_TaskResponse, error) {
    +	var reqBody, resBody EnableSecondaryVM_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type EnableSmartCardAuthenticationBody struct {
    +	Req    *types.EnableSmartCardAuthentication         `xml:"urn:vim25 EnableSmartCardAuthentication,omitempty"`
    +	Res    *types.EnableSmartCardAuthenticationResponse `xml:"urn:vim25 EnableSmartCardAuthenticationResponse,omitempty"`
    +	Fault_ *soap.Fault                                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *EnableSmartCardAuthenticationBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func EnableSmartCardAuthentication(ctx context.Context, r soap.RoundTripper, req *types.EnableSmartCardAuthentication) (*types.EnableSmartCardAuthenticationResponse, error) {
    +	var reqBody, resBody EnableSmartCardAuthenticationBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type EnterLockdownModeBody struct {
    +	Req    *types.EnterLockdownMode         `xml:"urn:vim25 EnterLockdownMode,omitempty"`
    +	Res    *types.EnterLockdownModeResponse `xml:"urn:vim25 EnterLockdownModeResponse,omitempty"`
    +	Fault_ *soap.Fault                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *EnterLockdownModeBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func EnterLockdownMode(ctx context.Context, r soap.RoundTripper, req *types.EnterLockdownMode) (*types.EnterLockdownModeResponse, error) {
    +	var reqBody, resBody EnterLockdownModeBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type EnterMaintenanceMode_TaskBody struct {
    +	Req    *types.EnterMaintenanceMode_Task         `xml:"urn:vim25 EnterMaintenanceMode_Task,omitempty"`
    +	Res    *types.EnterMaintenanceMode_TaskResponse `xml:"urn:vim25 EnterMaintenanceMode_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                              `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *EnterMaintenanceMode_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func EnterMaintenanceMode_Task(ctx context.Context, r soap.RoundTripper, req *types.EnterMaintenanceMode_Task) (*types.EnterMaintenanceMode_TaskResponse, error) {
    +	var reqBody, resBody EnterMaintenanceMode_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type EstimateDatabaseSizeBody struct {
    +	Req    *types.EstimateDatabaseSize         `xml:"urn:vim25 EstimateDatabaseSize,omitempty"`
    +	Res    *types.EstimateDatabaseSizeResponse `xml:"urn:vim25 EstimateDatabaseSizeResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *EstimateDatabaseSizeBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func EstimateDatabaseSize(ctx context.Context, r soap.RoundTripper, req *types.EstimateDatabaseSize) (*types.EstimateDatabaseSizeResponse, error) {
    +	var reqBody, resBody EstimateDatabaseSizeBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type EstimateStorageForConsolidateSnapshots_TaskBody struct {
    +	Req    *types.EstimateStorageForConsolidateSnapshots_Task         `xml:"urn:vim25 EstimateStorageForConsolidateSnapshots_Task,omitempty"`
    +	Res    *types.EstimateStorageForConsolidateSnapshots_TaskResponse `xml:"urn:vim25 EstimateStorageForConsolidateSnapshots_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *EstimateStorageForConsolidateSnapshots_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func EstimateStorageForConsolidateSnapshots_Task(ctx context.Context, r soap.RoundTripper, req *types.EstimateStorageForConsolidateSnapshots_Task) (*types.EstimateStorageForConsolidateSnapshots_TaskResponse, error) {
    +	var reqBody, resBody EstimateStorageForConsolidateSnapshots_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type EsxAgentHostManagerUpdateConfigBody struct {
    +	Req    *types.EsxAgentHostManagerUpdateConfig         `xml:"urn:vim25 EsxAgentHostManagerUpdateConfig,omitempty"`
    +	Res    *types.EsxAgentHostManagerUpdateConfigResponse `xml:"urn:vim25 EsxAgentHostManagerUpdateConfigResponse,omitempty"`
    +	Fault_ *soap.Fault                                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *EsxAgentHostManagerUpdateConfigBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func EsxAgentHostManagerUpdateConfig(ctx context.Context, r soap.RoundTripper, req *types.EsxAgentHostManagerUpdateConfig) (*types.EsxAgentHostManagerUpdateConfigResponse, error) {
    +	var reqBody, resBody EsxAgentHostManagerUpdateConfigBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type EvacuateVsanNode_TaskBody struct {
    +	Req    *types.EvacuateVsanNode_Task         `xml:"urn:vim25 EvacuateVsanNode_Task,omitempty"`
    +	Res    *types.EvacuateVsanNode_TaskResponse `xml:"urn:vim25 EvacuateVsanNode_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *EvacuateVsanNode_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func EvacuateVsanNode_Task(ctx context.Context, r soap.RoundTripper, req *types.EvacuateVsanNode_Task) (*types.EvacuateVsanNode_TaskResponse, error) {
    +	var reqBody, resBody EvacuateVsanNode_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type EvcManagerBody struct {
    +	Req    *types.EvcManager         `xml:"urn:vim25 EvcManager,omitempty"`
    +	Res    *types.EvcManagerResponse `xml:"urn:vim25 EvcManagerResponse,omitempty"`
    +	Fault_ *soap.Fault               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *EvcManagerBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func EvcManager(ctx context.Context, r soap.RoundTripper, req *types.EvcManager) (*types.EvcManagerResponse, error) {
    +	var reqBody, resBody EvcManagerBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ExecuteHostProfileBody struct {
    +	Req    *types.ExecuteHostProfile         `xml:"urn:vim25 ExecuteHostProfile,omitempty"`
    +	Res    *types.ExecuteHostProfileResponse `xml:"urn:vim25 ExecuteHostProfileResponse,omitempty"`
    +	Fault_ *soap.Fault                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ExecuteHostProfileBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ExecuteHostProfile(ctx context.Context, r soap.RoundTripper, req *types.ExecuteHostProfile) (*types.ExecuteHostProfileResponse, error) {
    +	var reqBody, resBody ExecuteHostProfileBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ExecuteSimpleCommandBody struct {
    +	Req    *types.ExecuteSimpleCommand         `xml:"urn:vim25 ExecuteSimpleCommand,omitempty"`
    +	Res    *types.ExecuteSimpleCommandResponse `xml:"urn:vim25 ExecuteSimpleCommandResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ExecuteSimpleCommandBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ExecuteSimpleCommand(ctx context.Context, r soap.RoundTripper, req *types.ExecuteSimpleCommand) (*types.ExecuteSimpleCommandResponse, error) {
    +	var reqBody, resBody ExecuteSimpleCommandBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ExitLockdownModeBody struct {
    +	Req    *types.ExitLockdownMode         `xml:"urn:vim25 ExitLockdownMode,omitempty"`
    +	Res    *types.ExitLockdownModeResponse `xml:"urn:vim25 ExitLockdownModeResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ExitLockdownModeBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ExitLockdownMode(ctx context.Context, r soap.RoundTripper, req *types.ExitLockdownMode) (*types.ExitLockdownModeResponse, error) {
    +	var reqBody, resBody ExitLockdownModeBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ExitMaintenanceMode_TaskBody struct {
    +	Req    *types.ExitMaintenanceMode_Task         `xml:"urn:vim25 ExitMaintenanceMode_Task,omitempty"`
    +	Res    *types.ExitMaintenanceMode_TaskResponse `xml:"urn:vim25 ExitMaintenanceMode_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                             `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ExitMaintenanceMode_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ExitMaintenanceMode_Task(ctx context.Context, r soap.RoundTripper, req *types.ExitMaintenanceMode_Task) (*types.ExitMaintenanceMode_TaskResponse, error) {
    +	var reqBody, resBody ExitMaintenanceMode_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ExpandVmfsDatastoreBody struct {
    +	Req    *types.ExpandVmfsDatastore         `xml:"urn:vim25 ExpandVmfsDatastore,omitempty"`
    +	Res    *types.ExpandVmfsDatastoreResponse `xml:"urn:vim25 ExpandVmfsDatastoreResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ExpandVmfsDatastoreBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ExpandVmfsDatastore(ctx context.Context, r soap.RoundTripper, req *types.ExpandVmfsDatastore) (*types.ExpandVmfsDatastoreResponse, error) {
    +	var reqBody, resBody ExpandVmfsDatastoreBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ExpandVmfsExtentBody struct {
    +	Req    *types.ExpandVmfsExtent         `xml:"urn:vim25 ExpandVmfsExtent,omitempty"`
    +	Res    *types.ExpandVmfsExtentResponse `xml:"urn:vim25 ExpandVmfsExtentResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ExpandVmfsExtentBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ExpandVmfsExtent(ctx context.Context, r soap.RoundTripper, req *types.ExpandVmfsExtent) (*types.ExpandVmfsExtentResponse, error) {
    +	var reqBody, resBody ExpandVmfsExtentBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ExportAnswerFile_TaskBody struct {
    +	Req    *types.ExportAnswerFile_Task         `xml:"urn:vim25 ExportAnswerFile_Task,omitempty"`
    +	Res    *types.ExportAnswerFile_TaskResponse `xml:"urn:vim25 ExportAnswerFile_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ExportAnswerFile_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ExportAnswerFile_Task(ctx context.Context, r soap.RoundTripper, req *types.ExportAnswerFile_Task) (*types.ExportAnswerFile_TaskResponse, error) {
    +	var reqBody, resBody ExportAnswerFile_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ExportProfileBody struct {
    +	Req    *types.ExportProfile         `xml:"urn:vim25 ExportProfile,omitempty"`
    +	Res    *types.ExportProfileResponse `xml:"urn:vim25 ExportProfileResponse,omitempty"`
    +	Fault_ *soap.Fault                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ExportProfileBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ExportProfile(ctx context.Context, r soap.RoundTripper, req *types.ExportProfile) (*types.ExportProfileResponse, error) {
    +	var reqBody, resBody ExportProfileBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ExportSnapshotBody struct {
    +	Req    *types.ExportSnapshot         `xml:"urn:vim25 ExportSnapshot,omitempty"`
    +	Res    *types.ExportSnapshotResponse `xml:"urn:vim25 ExportSnapshotResponse,omitempty"`
    +	Fault_ *soap.Fault                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ExportSnapshotBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ExportSnapshot(ctx context.Context, r soap.RoundTripper, req *types.ExportSnapshot) (*types.ExportSnapshotResponse, error) {
    +	var reqBody, resBody ExportSnapshotBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ExportVAppBody struct {
    +	Req    *types.ExportVApp         `xml:"urn:vim25 ExportVApp,omitempty"`
    +	Res    *types.ExportVAppResponse `xml:"urn:vim25 ExportVAppResponse,omitempty"`
    +	Fault_ *soap.Fault               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ExportVAppBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ExportVApp(ctx context.Context, r soap.RoundTripper, req *types.ExportVApp) (*types.ExportVAppResponse, error) {
    +	var reqBody, resBody ExportVAppBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ExportVmBody struct {
    +	Req    *types.ExportVm         `xml:"urn:vim25 ExportVm,omitempty"`
    +	Res    *types.ExportVmResponse `xml:"urn:vim25 ExportVmResponse,omitempty"`
    +	Fault_ *soap.Fault             `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ExportVmBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ExportVm(ctx context.Context, r soap.RoundTripper, req *types.ExportVm) (*types.ExportVmResponse, error) {
    +	var reqBody, resBody ExportVmBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ExtendDisk_TaskBody struct {
    +	Req    *types.ExtendDisk_Task         `xml:"urn:vim25 ExtendDisk_Task,omitempty"`
    +	Res    *types.ExtendDisk_TaskResponse `xml:"urn:vim25 ExtendDisk_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ExtendDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ExtendDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.ExtendDisk_Task) (*types.ExtendDisk_TaskResponse, error) {
    +	var reqBody, resBody ExtendDisk_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ExtendVffsBody struct {
    +	Req    *types.ExtendVffs         `xml:"urn:vim25 ExtendVffs,omitempty"`
    +	Res    *types.ExtendVffsResponse `xml:"urn:vim25 ExtendVffsResponse,omitempty"`
    +	Fault_ *soap.Fault               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ExtendVffsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ExtendVffs(ctx context.Context, r soap.RoundTripper, req *types.ExtendVffs) (*types.ExtendVffsResponse, error) {
    +	var reqBody, resBody ExtendVffsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ExtendVirtualDisk_TaskBody struct {
    +	Req    *types.ExtendVirtualDisk_Task         `xml:"urn:vim25 ExtendVirtualDisk_Task,omitempty"`
    +	Res    *types.ExtendVirtualDisk_TaskResponse `xml:"urn:vim25 ExtendVirtualDisk_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ExtendVirtualDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ExtendVirtualDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.ExtendVirtualDisk_Task) (*types.ExtendVirtualDisk_TaskResponse, error) {
    +	var reqBody, resBody ExtendVirtualDisk_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ExtendVmfsDatastoreBody struct {
    +	Req    *types.ExtendVmfsDatastore         `xml:"urn:vim25 ExtendVmfsDatastore,omitempty"`
    +	Res    *types.ExtendVmfsDatastoreResponse `xml:"urn:vim25 ExtendVmfsDatastoreResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ExtendVmfsDatastoreBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ExtendVmfsDatastore(ctx context.Context, r soap.RoundTripper, req *types.ExtendVmfsDatastore) (*types.ExtendVmfsDatastoreResponse, error) {
    +	var reqBody, resBody ExtendVmfsDatastoreBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ExtractOvfEnvironmentBody struct {
    +	Req    *types.ExtractOvfEnvironment         `xml:"urn:vim25 ExtractOvfEnvironment,omitempty"`
    +	Res    *types.ExtractOvfEnvironmentResponse `xml:"urn:vim25 ExtractOvfEnvironmentResponse,omitempty"`
    +	Fault_ *soap.Fault                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ExtractOvfEnvironmentBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ExtractOvfEnvironment(ctx context.Context, r soap.RoundTripper, req *types.ExtractOvfEnvironment) (*types.ExtractOvfEnvironmentResponse, error) {
    +	var reqBody, resBody ExtractOvfEnvironmentBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type FetchDVPortKeysBody struct {
    +	Req    *types.FetchDVPortKeys         `xml:"urn:vim25 FetchDVPortKeys,omitempty"`
    +	Res    *types.FetchDVPortKeysResponse `xml:"urn:vim25 FetchDVPortKeysResponse,omitempty"`
    +	Fault_ *soap.Fault                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *FetchDVPortKeysBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func FetchDVPortKeys(ctx context.Context, r soap.RoundTripper, req *types.FetchDVPortKeys) (*types.FetchDVPortKeysResponse, error) {
    +	var reqBody, resBody FetchDVPortKeysBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type FetchDVPortsBody struct {
    +	Req    *types.FetchDVPorts         `xml:"urn:vim25 FetchDVPorts,omitempty"`
    +	Res    *types.FetchDVPortsResponse `xml:"urn:vim25 FetchDVPortsResponse,omitempty"`
    +	Fault_ *soap.Fault                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *FetchDVPortsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func FetchDVPorts(ctx context.Context, r soap.RoundTripper, req *types.FetchDVPorts) (*types.FetchDVPortsResponse, error) {
    +	var reqBody, resBody FetchDVPortsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type FetchSystemEventLogBody struct {
    +	Req    *types.FetchSystemEventLog         `xml:"urn:vim25 FetchSystemEventLog,omitempty"`
    +	Res    *types.FetchSystemEventLogResponse `xml:"urn:vim25 FetchSystemEventLogResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *FetchSystemEventLogBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func FetchSystemEventLog(ctx context.Context, r soap.RoundTripper, req *types.FetchSystemEventLog) (*types.FetchSystemEventLogResponse, error) {
    +	var reqBody, resBody FetchSystemEventLogBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type FetchUserPrivilegeOnEntitiesBody struct {
    +	Req    *types.FetchUserPrivilegeOnEntities         `xml:"urn:vim25 FetchUserPrivilegeOnEntities,omitempty"`
    +	Res    *types.FetchUserPrivilegeOnEntitiesResponse `xml:"urn:vim25 FetchUserPrivilegeOnEntitiesResponse,omitempty"`
    +	Fault_ *soap.Fault                                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *FetchUserPrivilegeOnEntitiesBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func FetchUserPrivilegeOnEntities(ctx context.Context, r soap.RoundTripper, req *types.FetchUserPrivilegeOnEntities) (*types.FetchUserPrivilegeOnEntitiesResponse, error) {
    +	var reqBody, resBody FetchUserPrivilegeOnEntitiesBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type FindAllByDnsNameBody struct {
    +	Req    *types.FindAllByDnsName         `xml:"urn:vim25 FindAllByDnsName,omitempty"`
    +	Res    *types.FindAllByDnsNameResponse `xml:"urn:vim25 FindAllByDnsNameResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *FindAllByDnsNameBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func FindAllByDnsName(ctx context.Context, r soap.RoundTripper, req *types.FindAllByDnsName) (*types.FindAllByDnsNameResponse, error) {
    +	var reqBody, resBody FindAllByDnsNameBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type FindAllByIpBody struct {
    +	Req    *types.FindAllByIp         `xml:"urn:vim25 FindAllByIp,omitempty"`
    +	Res    *types.FindAllByIpResponse `xml:"urn:vim25 FindAllByIpResponse,omitempty"`
    +	Fault_ *soap.Fault                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *FindAllByIpBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func FindAllByIp(ctx context.Context, r soap.RoundTripper, req *types.FindAllByIp) (*types.FindAllByIpResponse, error) {
    +	var reqBody, resBody FindAllByIpBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type FindAllByUuidBody struct {
    +	Req    *types.FindAllByUuid         `xml:"urn:vim25 FindAllByUuid,omitempty"`
    +	Res    *types.FindAllByUuidResponse `xml:"urn:vim25 FindAllByUuidResponse,omitempty"`
    +	Fault_ *soap.Fault                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *FindAllByUuidBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func FindAllByUuid(ctx context.Context, r soap.RoundTripper, req *types.FindAllByUuid) (*types.FindAllByUuidResponse, error) {
    +	var reqBody, resBody FindAllByUuidBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type FindAssociatedProfileBody struct {
    +	Req    *types.FindAssociatedProfile         `xml:"urn:vim25 FindAssociatedProfile,omitempty"`
    +	Res    *types.FindAssociatedProfileResponse `xml:"urn:vim25 FindAssociatedProfileResponse,omitempty"`
    +	Fault_ *soap.Fault                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *FindAssociatedProfileBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func FindAssociatedProfile(ctx context.Context, r soap.RoundTripper, req *types.FindAssociatedProfile) (*types.FindAssociatedProfileResponse, error) {
    +	var reqBody, resBody FindAssociatedProfileBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type FindByDatastorePathBody struct {
    +	Req    *types.FindByDatastorePath         `xml:"urn:vim25 FindByDatastorePath,omitempty"`
    +	Res    *types.FindByDatastorePathResponse `xml:"urn:vim25 FindByDatastorePathResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *FindByDatastorePathBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func FindByDatastorePath(ctx context.Context, r soap.RoundTripper, req *types.FindByDatastorePath) (*types.FindByDatastorePathResponse, error) {
    +	var reqBody, resBody FindByDatastorePathBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type FindByDnsNameBody struct {
    +	Req    *types.FindByDnsName         `xml:"urn:vim25 FindByDnsName,omitempty"`
    +	Res    *types.FindByDnsNameResponse `xml:"urn:vim25 FindByDnsNameResponse,omitempty"`
    +	Fault_ *soap.Fault                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *FindByDnsNameBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func FindByDnsName(ctx context.Context, r soap.RoundTripper, req *types.FindByDnsName) (*types.FindByDnsNameResponse, error) {
    +	var reqBody, resBody FindByDnsNameBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type FindByInventoryPathBody struct {
    +	Req    *types.FindByInventoryPath         `xml:"urn:vim25 FindByInventoryPath,omitempty"`
    +	Res    *types.FindByInventoryPathResponse `xml:"urn:vim25 FindByInventoryPathResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *FindByInventoryPathBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func FindByInventoryPath(ctx context.Context, r soap.RoundTripper, req *types.FindByInventoryPath) (*types.FindByInventoryPathResponse, error) {
    +	var reqBody, resBody FindByInventoryPathBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type FindByIpBody struct {
    +	Req    *types.FindByIp         `xml:"urn:vim25 FindByIp,omitempty"`
    +	Res    *types.FindByIpResponse `xml:"urn:vim25 FindByIpResponse,omitempty"`
    +	Fault_ *soap.Fault             `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *FindByIpBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func FindByIp(ctx context.Context, r soap.RoundTripper, req *types.FindByIp) (*types.FindByIpResponse, error) {
    +	var reqBody, resBody FindByIpBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type FindByUuidBody struct {
    +	Req    *types.FindByUuid         `xml:"urn:vim25 FindByUuid,omitempty"`
    +	Res    *types.FindByUuidResponse `xml:"urn:vim25 FindByUuidResponse,omitempty"`
    +	Fault_ *soap.Fault               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *FindByUuidBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func FindByUuid(ctx context.Context, r soap.RoundTripper, req *types.FindByUuid) (*types.FindByUuidResponse, error) {
    +	var reqBody, resBody FindByUuidBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type FindChildBody struct {
    +	Req    *types.FindChild         `xml:"urn:vim25 FindChild,omitempty"`
    +	Res    *types.FindChildResponse `xml:"urn:vim25 FindChildResponse,omitempty"`
    +	Fault_ *soap.Fault              `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *FindChildBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func FindChild(ctx context.Context, r soap.RoundTripper, req *types.FindChild) (*types.FindChildResponse, error) {
    +	var reqBody, resBody FindChildBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type FindExtensionBody struct {
    +	Req    *types.FindExtension         `xml:"urn:vim25 FindExtension,omitempty"`
    +	Res    *types.FindExtensionResponse `xml:"urn:vim25 FindExtensionResponse,omitempty"`
    +	Fault_ *soap.Fault                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *FindExtensionBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func FindExtension(ctx context.Context, r soap.RoundTripper, req *types.FindExtension) (*types.FindExtensionResponse, error) {
    +	var reqBody, resBody FindExtensionBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type FindRulesForVmBody struct {
    +	Req    *types.FindRulesForVm         `xml:"urn:vim25 FindRulesForVm,omitempty"`
    +	Res    *types.FindRulesForVmResponse `xml:"urn:vim25 FindRulesForVmResponse,omitempty"`
    +	Fault_ *soap.Fault                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *FindRulesForVmBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func FindRulesForVm(ctx context.Context, r soap.RoundTripper, req *types.FindRulesForVm) (*types.FindRulesForVmResponse, error) {
    +	var reqBody, resBody FindRulesForVmBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type FormatVffsBody struct {
    +	Req    *types.FormatVffs         `xml:"urn:vim25 FormatVffs,omitempty"`
    +	Res    *types.FormatVffsResponse `xml:"urn:vim25 FormatVffsResponse,omitempty"`
    +	Fault_ *soap.Fault               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *FormatVffsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func FormatVffs(ctx context.Context, r soap.RoundTripper, req *types.FormatVffs) (*types.FormatVffsResponse, error) {
    +	var reqBody, resBody FormatVffsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type FormatVmfsBody struct {
    +	Req    *types.FormatVmfs         `xml:"urn:vim25 FormatVmfs,omitempty"`
    +	Res    *types.FormatVmfsResponse `xml:"urn:vim25 FormatVmfsResponse,omitempty"`
    +	Fault_ *soap.Fault               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *FormatVmfsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func FormatVmfs(ctx context.Context, r soap.RoundTripper, req *types.FormatVmfs) (*types.FormatVmfsResponse, error) {
    +	var reqBody, resBody FormatVmfsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type GenerateCertificateSigningRequestBody struct {
    +	Req    *types.GenerateCertificateSigningRequest         `xml:"urn:vim25 GenerateCertificateSigningRequest,omitempty"`
    +	Res    *types.GenerateCertificateSigningRequestResponse `xml:"urn:vim25 GenerateCertificateSigningRequestResponse,omitempty"`
    +	Fault_ *soap.Fault                                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *GenerateCertificateSigningRequestBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func GenerateCertificateSigningRequest(ctx context.Context, r soap.RoundTripper, req *types.GenerateCertificateSigningRequest) (*types.GenerateCertificateSigningRequestResponse, error) {
    +	var reqBody, resBody GenerateCertificateSigningRequestBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type GenerateCertificateSigningRequestByDnBody struct {
    +	Req    *types.GenerateCertificateSigningRequestByDn         `xml:"urn:vim25 GenerateCertificateSigningRequestByDn,omitempty"`
    +	Res    *types.GenerateCertificateSigningRequestByDnResponse `xml:"urn:vim25 GenerateCertificateSigningRequestByDnResponse,omitempty"`
    +	Fault_ *soap.Fault                                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *GenerateCertificateSigningRequestByDnBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func GenerateCertificateSigningRequestByDn(ctx context.Context, r soap.RoundTripper, req *types.GenerateCertificateSigningRequestByDn) (*types.GenerateCertificateSigningRequestByDnResponse, error) {
    +	var reqBody, resBody GenerateCertificateSigningRequestByDnBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type GenerateClientCsrBody struct {
    +	Req    *types.GenerateClientCsr         `xml:"urn:vim25 GenerateClientCsr,omitempty"`
    +	Res    *types.GenerateClientCsrResponse `xml:"urn:vim25 GenerateClientCsrResponse,omitempty"`
    +	Fault_ *soap.Fault                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *GenerateClientCsrBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func GenerateClientCsr(ctx context.Context, r soap.RoundTripper, req *types.GenerateClientCsr) (*types.GenerateClientCsrResponse, error) {
    +	var reqBody, resBody GenerateClientCsrBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type GenerateConfigTaskListBody struct {
    +	Req    *types.GenerateConfigTaskList         `xml:"urn:vim25 GenerateConfigTaskList,omitempty"`
    +	Res    *types.GenerateConfigTaskListResponse `xml:"urn:vim25 GenerateConfigTaskListResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *GenerateConfigTaskListBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func GenerateConfigTaskList(ctx context.Context, r soap.RoundTripper, req *types.GenerateConfigTaskList) (*types.GenerateConfigTaskListResponse, error) {
    +	var reqBody, resBody GenerateConfigTaskListBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type GenerateHostConfigTaskSpec_TaskBody struct {
    +	Req    *types.GenerateHostConfigTaskSpec_Task         `xml:"urn:vim25 GenerateHostConfigTaskSpec_Task,omitempty"`
    +	Res    *types.GenerateHostConfigTaskSpec_TaskResponse `xml:"urn:vim25 GenerateHostConfigTaskSpec_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *GenerateHostConfigTaskSpec_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func GenerateHostConfigTaskSpec_Task(ctx context.Context, r soap.RoundTripper, req *types.GenerateHostConfigTaskSpec_Task) (*types.GenerateHostConfigTaskSpec_TaskResponse, error) {
    +	var reqBody, resBody GenerateHostConfigTaskSpec_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type GenerateHostProfileTaskList_TaskBody struct {
    +	Req    *types.GenerateHostProfileTaskList_Task         `xml:"urn:vim25 GenerateHostProfileTaskList_Task,omitempty"`
    +	Res    *types.GenerateHostProfileTaskList_TaskResponse `xml:"urn:vim25 GenerateHostProfileTaskList_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *GenerateHostProfileTaskList_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func GenerateHostProfileTaskList_Task(ctx context.Context, r soap.RoundTripper, req *types.GenerateHostProfileTaskList_Task) (*types.GenerateHostProfileTaskList_TaskResponse, error) {
    +	var reqBody, resBody GenerateHostProfileTaskList_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type GenerateKeyBody struct {
    +	Req    *types.GenerateKey         `xml:"urn:vim25 GenerateKey,omitempty"`
    +	Res    *types.GenerateKeyResponse `xml:"urn:vim25 GenerateKeyResponse,omitempty"`
    +	Fault_ *soap.Fault                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *GenerateKeyBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func GenerateKey(ctx context.Context, r soap.RoundTripper, req *types.GenerateKey) (*types.GenerateKeyResponse, error) {
    +	var reqBody, resBody GenerateKeyBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type GenerateLogBundles_TaskBody struct {
    +	Req    *types.GenerateLogBundles_Task         `xml:"urn:vim25 GenerateLogBundles_Task,omitempty"`
    +	Res    *types.GenerateLogBundles_TaskResponse `xml:"urn:vim25 GenerateLogBundles_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *GenerateLogBundles_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func GenerateLogBundles_Task(ctx context.Context, r soap.RoundTripper, req *types.GenerateLogBundles_Task) (*types.GenerateLogBundles_TaskResponse, error) {
    +	var reqBody, resBody GenerateLogBundles_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type GenerateSelfSignedClientCertBody struct {
    +	Req    *types.GenerateSelfSignedClientCert         `xml:"urn:vim25 GenerateSelfSignedClientCert,omitempty"`
    +	Res    *types.GenerateSelfSignedClientCertResponse `xml:"urn:vim25 GenerateSelfSignedClientCertResponse,omitempty"`
    +	Fault_ *soap.Fault                                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *GenerateSelfSignedClientCertBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func GenerateSelfSignedClientCert(ctx context.Context, r soap.RoundTripper, req *types.GenerateSelfSignedClientCert) (*types.GenerateSelfSignedClientCertResponse, error) {
    +	var reqBody, resBody GenerateSelfSignedClientCertBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type GetAlarmBody struct {
    +	Req    *types.GetAlarm         `xml:"urn:vim25 GetAlarm,omitempty"`
    +	Res    *types.GetAlarmResponse `xml:"urn:vim25 GetAlarmResponse,omitempty"`
    +	Fault_ *soap.Fault             `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *GetAlarmBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func GetAlarm(ctx context.Context, r soap.RoundTripper, req *types.GetAlarm) (*types.GetAlarmResponse, error) {
    +	var reqBody, resBody GetAlarmBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type GetAlarmStateBody struct {
    +	Req    *types.GetAlarmState         `xml:"urn:vim25 GetAlarmState,omitempty"`
    +	Res    *types.GetAlarmStateResponse `xml:"urn:vim25 GetAlarmStateResponse,omitempty"`
    +	Fault_ *soap.Fault                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *GetAlarmStateBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func GetAlarmState(ctx context.Context, r soap.RoundTripper, req *types.GetAlarmState) (*types.GetAlarmStateResponse, error) {
    +	var reqBody, resBody GetAlarmStateBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type GetCustomizationSpecBody struct {
    +	Req    *types.GetCustomizationSpec         `xml:"urn:vim25 GetCustomizationSpec,omitempty"`
    +	Res    *types.GetCustomizationSpecResponse `xml:"urn:vim25 GetCustomizationSpecResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *GetCustomizationSpecBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func GetCustomizationSpec(ctx context.Context, r soap.RoundTripper, req *types.GetCustomizationSpec) (*types.GetCustomizationSpecResponse, error) {
    +	var reqBody, resBody GetCustomizationSpecBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type GetPublicKeyBody struct {
    +	Req    *types.GetPublicKey         `xml:"urn:vim25 GetPublicKey,omitempty"`
    +	Res    *types.GetPublicKeyResponse `xml:"urn:vim25 GetPublicKeyResponse,omitempty"`
    +	Fault_ *soap.Fault                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *GetPublicKeyBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func GetPublicKey(ctx context.Context, r soap.RoundTripper, req *types.GetPublicKey) (*types.GetPublicKeyResponse, error) {
    +	var reqBody, resBody GetPublicKeyBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type GetResourceUsageBody struct {
    +	Req    *types.GetResourceUsage         `xml:"urn:vim25 GetResourceUsage,omitempty"`
    +	Res    *types.GetResourceUsageResponse `xml:"urn:vim25 GetResourceUsageResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *GetResourceUsageBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func GetResourceUsage(ctx context.Context, r soap.RoundTripper, req *types.GetResourceUsage) (*types.GetResourceUsageResponse, error) {
    +	var reqBody, resBody GetResourceUsageBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type GetVchaClusterHealthBody struct {
    +	Req    *types.GetVchaClusterHealth         `xml:"urn:vim25 GetVchaClusterHealth,omitempty"`
    +	Res    *types.GetVchaClusterHealthResponse `xml:"urn:vim25 GetVchaClusterHealthResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *GetVchaClusterHealthBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func GetVchaClusterHealth(ctx context.Context, r soap.RoundTripper, req *types.GetVchaClusterHealth) (*types.GetVchaClusterHealthResponse, error) {
    +	var reqBody, resBody GetVchaClusterHealthBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type GetVsanObjExtAttrsBody struct {
    +	Req    *types.GetVsanObjExtAttrs         `xml:"urn:vim25 GetVsanObjExtAttrs,omitempty"`
    +	Res    *types.GetVsanObjExtAttrsResponse `xml:"urn:vim25 GetVsanObjExtAttrsResponse,omitempty"`
    +	Fault_ *soap.Fault                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *GetVsanObjExtAttrsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func GetVsanObjExtAttrs(ctx context.Context, r soap.RoundTripper, req *types.GetVsanObjExtAttrs) (*types.GetVsanObjExtAttrsResponse, error) {
    +	var reqBody, resBody GetVsanObjExtAttrsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type HasMonitoredEntityBody struct {
    +	Req    *types.HasMonitoredEntity         `xml:"urn:vim25 HasMonitoredEntity,omitempty"`
    +	Res    *types.HasMonitoredEntityResponse `xml:"urn:vim25 HasMonitoredEntityResponse,omitempty"`
    +	Fault_ *soap.Fault                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *HasMonitoredEntityBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func HasMonitoredEntity(ctx context.Context, r soap.RoundTripper, req *types.HasMonitoredEntity) (*types.HasMonitoredEntityResponse, error) {
    +	var reqBody, resBody HasMonitoredEntityBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type HasPrivilegeOnEntitiesBody struct {
    +	Req    *types.HasPrivilegeOnEntities         `xml:"urn:vim25 HasPrivilegeOnEntities,omitempty"`
    +	Res    *types.HasPrivilegeOnEntitiesResponse `xml:"urn:vim25 HasPrivilegeOnEntitiesResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *HasPrivilegeOnEntitiesBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func HasPrivilegeOnEntities(ctx context.Context, r soap.RoundTripper, req *types.HasPrivilegeOnEntities) (*types.HasPrivilegeOnEntitiesResponse, error) {
    +	var reqBody, resBody HasPrivilegeOnEntitiesBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type HasPrivilegeOnEntityBody struct {
    +	Req    *types.HasPrivilegeOnEntity         `xml:"urn:vim25 HasPrivilegeOnEntity,omitempty"`
    +	Res    *types.HasPrivilegeOnEntityResponse `xml:"urn:vim25 HasPrivilegeOnEntityResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *HasPrivilegeOnEntityBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func HasPrivilegeOnEntity(ctx context.Context, r soap.RoundTripper, req *types.HasPrivilegeOnEntity) (*types.HasPrivilegeOnEntityResponse, error) {
    +	var reqBody, resBody HasPrivilegeOnEntityBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type HasProviderBody struct {
    +	Req    *types.HasProvider         `xml:"urn:vim25 HasProvider,omitempty"`
    +	Res    *types.HasProviderResponse `xml:"urn:vim25 HasProviderResponse,omitempty"`
    +	Fault_ *soap.Fault                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *HasProviderBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func HasProvider(ctx context.Context, r soap.RoundTripper, req *types.HasProvider) (*types.HasProviderResponse, error) {
    +	var reqBody, resBody HasProviderBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type HasUserPrivilegeOnEntitiesBody struct {
    +	Req    *types.HasUserPrivilegeOnEntities         `xml:"urn:vim25 HasUserPrivilegeOnEntities,omitempty"`
    +	Res    *types.HasUserPrivilegeOnEntitiesResponse `xml:"urn:vim25 HasUserPrivilegeOnEntitiesResponse,omitempty"`
    +	Fault_ *soap.Fault                               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *HasUserPrivilegeOnEntitiesBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func HasUserPrivilegeOnEntities(ctx context.Context, r soap.RoundTripper, req *types.HasUserPrivilegeOnEntities) (*types.HasUserPrivilegeOnEntitiesResponse, error) {
    +	var reqBody, resBody HasUserPrivilegeOnEntitiesBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type HostClearVStorageObjectControlFlagsBody struct {
    +	Req    *types.HostClearVStorageObjectControlFlags         `xml:"urn:vim25 HostClearVStorageObjectControlFlags,omitempty"`
    +	Res    *types.HostClearVStorageObjectControlFlagsResponse `xml:"urn:vim25 HostClearVStorageObjectControlFlagsResponse,omitempty"`
    +	Fault_ *soap.Fault                                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *HostClearVStorageObjectControlFlagsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func HostClearVStorageObjectControlFlags(ctx context.Context, r soap.RoundTripper, req *types.HostClearVStorageObjectControlFlags) (*types.HostClearVStorageObjectControlFlagsResponse, error) {
    +	var reqBody, resBody HostClearVStorageObjectControlFlagsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type HostCloneVStorageObject_TaskBody struct {
    +	Req    *types.HostCloneVStorageObject_Task         `xml:"urn:vim25 HostCloneVStorageObject_Task,omitempty"`
    +	Res    *types.HostCloneVStorageObject_TaskResponse `xml:"urn:vim25 HostCloneVStorageObject_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *HostCloneVStorageObject_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func HostCloneVStorageObject_Task(ctx context.Context, r soap.RoundTripper, req *types.HostCloneVStorageObject_Task) (*types.HostCloneVStorageObject_TaskResponse, error) {
    +	var reqBody, resBody HostCloneVStorageObject_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type HostConfigVFlashCacheBody struct {
    +	Req    *types.HostConfigVFlashCache         `xml:"urn:vim25 HostConfigVFlashCache,omitempty"`
    +	Res    *types.HostConfigVFlashCacheResponse `xml:"urn:vim25 HostConfigVFlashCacheResponse,omitempty"`
    +	Fault_ *soap.Fault                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *HostConfigVFlashCacheBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func HostConfigVFlashCache(ctx context.Context, r soap.RoundTripper, req *types.HostConfigVFlashCache) (*types.HostConfigVFlashCacheResponse, error) {
    +	var reqBody, resBody HostConfigVFlashCacheBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type HostConfigureVFlashResourceBody struct {
    +	Req    *types.HostConfigureVFlashResource         `xml:"urn:vim25 HostConfigureVFlashResource,omitempty"`
    +	Res    *types.HostConfigureVFlashResourceResponse `xml:"urn:vim25 HostConfigureVFlashResourceResponse,omitempty"`
    +	Fault_ *soap.Fault                                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *HostConfigureVFlashResourceBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func HostConfigureVFlashResource(ctx context.Context, r soap.RoundTripper, req *types.HostConfigureVFlashResource) (*types.HostConfigureVFlashResourceResponse, error) {
    +	var reqBody, resBody HostConfigureVFlashResourceBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type HostCreateDisk_TaskBody struct {
    +	Req    *types.HostCreateDisk_Task         `xml:"urn:vim25 HostCreateDisk_Task,omitempty"`
    +	Res    *types.HostCreateDisk_TaskResponse `xml:"urn:vim25 HostCreateDisk_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *HostCreateDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func HostCreateDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.HostCreateDisk_Task) (*types.HostCreateDisk_TaskResponse, error) {
    +	var reqBody, resBody HostCreateDisk_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type HostDeleteVStorageObject_TaskBody struct {
    +	Req    *types.HostDeleteVStorageObject_Task         `xml:"urn:vim25 HostDeleteVStorageObject_Task,omitempty"`
    +	Res    *types.HostDeleteVStorageObject_TaskResponse `xml:"urn:vim25 HostDeleteVStorageObject_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *HostDeleteVStorageObject_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func HostDeleteVStorageObject_Task(ctx context.Context, r soap.RoundTripper, req *types.HostDeleteVStorageObject_Task) (*types.HostDeleteVStorageObject_TaskResponse, error) {
    +	var reqBody, resBody HostDeleteVStorageObject_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type HostExtendDisk_TaskBody struct {
    +	Req    *types.HostExtendDisk_Task         `xml:"urn:vim25 HostExtendDisk_Task,omitempty"`
    +	Res    *types.HostExtendDisk_TaskResponse `xml:"urn:vim25 HostExtendDisk_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *HostExtendDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func HostExtendDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.HostExtendDisk_Task) (*types.HostExtendDisk_TaskResponse, error) {
    +	var reqBody, resBody HostExtendDisk_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type HostGetVFlashModuleDefaultConfigBody struct {
    +	Req    *types.HostGetVFlashModuleDefaultConfig         `xml:"urn:vim25 HostGetVFlashModuleDefaultConfig,omitempty"`
    +	Res    *types.HostGetVFlashModuleDefaultConfigResponse `xml:"urn:vim25 HostGetVFlashModuleDefaultConfigResponse,omitempty"`
    +	Fault_ *soap.Fault                                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *HostGetVFlashModuleDefaultConfigBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func HostGetVFlashModuleDefaultConfig(ctx context.Context, r soap.RoundTripper, req *types.HostGetVFlashModuleDefaultConfig) (*types.HostGetVFlashModuleDefaultConfigResponse, error) {
    +	var reqBody, resBody HostGetVFlashModuleDefaultConfigBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type HostImageConfigGetAcceptanceBody struct {
    +	Req    *types.HostImageConfigGetAcceptance         `xml:"urn:vim25 HostImageConfigGetAcceptance,omitempty"`
    +	Res    *types.HostImageConfigGetAcceptanceResponse `xml:"urn:vim25 HostImageConfigGetAcceptanceResponse,omitempty"`
    +	Fault_ *soap.Fault                                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *HostImageConfigGetAcceptanceBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func HostImageConfigGetAcceptance(ctx context.Context, r soap.RoundTripper, req *types.HostImageConfigGetAcceptance) (*types.HostImageConfigGetAcceptanceResponse, error) {
    +	var reqBody, resBody HostImageConfigGetAcceptanceBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type HostImageConfigGetProfileBody struct {
    +	Req    *types.HostImageConfigGetProfile         `xml:"urn:vim25 HostImageConfigGetProfile,omitempty"`
    +	Res    *types.HostImageConfigGetProfileResponse `xml:"urn:vim25 HostImageConfigGetProfileResponse,omitempty"`
    +	Fault_ *soap.Fault                              `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *HostImageConfigGetProfileBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func HostImageConfigGetProfile(ctx context.Context, r soap.RoundTripper, req *types.HostImageConfigGetProfile) (*types.HostImageConfigGetProfileResponse, error) {
    +	var reqBody, resBody HostImageConfigGetProfileBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type HostInflateDisk_TaskBody struct {
    +	Req    *types.HostInflateDisk_Task         `xml:"urn:vim25 HostInflateDisk_Task,omitempty"`
    +	Res    *types.HostInflateDisk_TaskResponse `xml:"urn:vim25 HostInflateDisk_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *HostInflateDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func HostInflateDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.HostInflateDisk_Task) (*types.HostInflateDisk_TaskResponse, error) {
    +	var reqBody, resBody HostInflateDisk_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type HostListVStorageObjectBody struct {
    +	Req    *types.HostListVStorageObject         `xml:"urn:vim25 HostListVStorageObject,omitempty"`
    +	Res    *types.HostListVStorageObjectResponse `xml:"urn:vim25 HostListVStorageObjectResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *HostListVStorageObjectBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func HostListVStorageObject(ctx context.Context, r soap.RoundTripper, req *types.HostListVStorageObject) (*types.HostListVStorageObjectResponse, error) {
    +	var reqBody, resBody HostListVStorageObjectBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type HostProfileResetValidationStateBody struct {
    +	Req    *types.HostProfileResetValidationState         `xml:"urn:vim25 HostProfileResetValidationState,omitempty"`
    +	Res    *types.HostProfileResetValidationStateResponse `xml:"urn:vim25 HostProfileResetValidationStateResponse,omitempty"`
    +	Fault_ *soap.Fault                                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *HostProfileResetValidationStateBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func HostProfileResetValidationState(ctx context.Context, r soap.RoundTripper, req *types.HostProfileResetValidationState) (*types.HostProfileResetValidationStateResponse, error) {
    +	var reqBody, resBody HostProfileResetValidationStateBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type HostReconcileDatastoreInventory_TaskBody struct {
    +	Req    *types.HostReconcileDatastoreInventory_Task         `xml:"urn:vim25 HostReconcileDatastoreInventory_Task,omitempty"`
    +	Res    *types.HostReconcileDatastoreInventory_TaskResponse `xml:"urn:vim25 HostReconcileDatastoreInventory_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *HostReconcileDatastoreInventory_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func HostReconcileDatastoreInventory_Task(ctx context.Context, r soap.RoundTripper, req *types.HostReconcileDatastoreInventory_Task) (*types.HostReconcileDatastoreInventory_TaskResponse, error) {
    +	var reqBody, resBody HostReconcileDatastoreInventory_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type HostRegisterDiskBody struct {
    +	Req    *types.HostRegisterDisk         `xml:"urn:vim25 HostRegisterDisk,omitempty"`
    +	Res    *types.HostRegisterDiskResponse `xml:"urn:vim25 HostRegisterDiskResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *HostRegisterDiskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func HostRegisterDisk(ctx context.Context, r soap.RoundTripper, req *types.HostRegisterDisk) (*types.HostRegisterDiskResponse, error) {
    +	var reqBody, resBody HostRegisterDiskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type HostRelocateVStorageObject_TaskBody struct {
    +	Req    *types.HostRelocateVStorageObject_Task         `xml:"urn:vim25 HostRelocateVStorageObject_Task,omitempty"`
    +	Res    *types.HostRelocateVStorageObject_TaskResponse `xml:"urn:vim25 HostRelocateVStorageObject_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *HostRelocateVStorageObject_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func HostRelocateVStorageObject_Task(ctx context.Context, r soap.RoundTripper, req *types.HostRelocateVStorageObject_Task) (*types.HostRelocateVStorageObject_TaskResponse, error) {
    +	var reqBody, resBody HostRelocateVStorageObject_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type HostRemoveVFlashResourceBody struct {
    +	Req    *types.HostRemoveVFlashResource         `xml:"urn:vim25 HostRemoveVFlashResource,omitempty"`
    +	Res    *types.HostRemoveVFlashResourceResponse `xml:"urn:vim25 HostRemoveVFlashResourceResponse,omitempty"`
    +	Fault_ *soap.Fault                             `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *HostRemoveVFlashResourceBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func HostRemoveVFlashResource(ctx context.Context, r soap.RoundTripper, req *types.HostRemoveVFlashResource) (*types.HostRemoveVFlashResourceResponse, error) {
    +	var reqBody, resBody HostRemoveVFlashResourceBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type HostRenameVStorageObjectBody struct {
    +	Req    *types.HostRenameVStorageObject         `xml:"urn:vim25 HostRenameVStorageObject,omitempty"`
    +	Res    *types.HostRenameVStorageObjectResponse `xml:"urn:vim25 HostRenameVStorageObjectResponse,omitempty"`
    +	Fault_ *soap.Fault                             `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *HostRenameVStorageObjectBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func HostRenameVStorageObject(ctx context.Context, r soap.RoundTripper, req *types.HostRenameVStorageObject) (*types.HostRenameVStorageObjectResponse, error) {
    +	var reqBody, resBody HostRenameVStorageObjectBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type HostRetrieveVStorageInfrastructureObjectPolicyBody struct {
    +	Req    *types.HostRetrieveVStorageInfrastructureObjectPolicy         `xml:"urn:vim25 HostRetrieveVStorageInfrastructureObjectPolicy,omitempty"`
    +	Res    *types.HostRetrieveVStorageInfrastructureObjectPolicyResponse `xml:"urn:vim25 HostRetrieveVStorageInfrastructureObjectPolicyResponse,omitempty"`
    +	Fault_ *soap.Fault                                                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *HostRetrieveVStorageInfrastructureObjectPolicyBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func HostRetrieveVStorageInfrastructureObjectPolicy(ctx context.Context, r soap.RoundTripper, req *types.HostRetrieveVStorageInfrastructureObjectPolicy) (*types.HostRetrieveVStorageInfrastructureObjectPolicyResponse, error) {
    +	var reqBody, resBody HostRetrieveVStorageInfrastructureObjectPolicyBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type HostRetrieveVStorageObjectBody struct {
    +	Req    *types.HostRetrieveVStorageObject         `xml:"urn:vim25 HostRetrieveVStorageObject,omitempty"`
    +	Res    *types.HostRetrieveVStorageObjectResponse `xml:"urn:vim25 HostRetrieveVStorageObjectResponse,omitempty"`
    +	Fault_ *soap.Fault                               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *HostRetrieveVStorageObjectBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func HostRetrieveVStorageObject(ctx context.Context, r soap.RoundTripper, req *types.HostRetrieveVStorageObject) (*types.HostRetrieveVStorageObjectResponse, error) {
    +	var reqBody, resBody HostRetrieveVStorageObjectBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type HostRetrieveVStorageObjectStateBody struct {
    +	Req    *types.HostRetrieveVStorageObjectState         `xml:"urn:vim25 HostRetrieveVStorageObjectState,omitempty"`
    +	Res    *types.HostRetrieveVStorageObjectStateResponse `xml:"urn:vim25 HostRetrieveVStorageObjectStateResponse,omitempty"`
    +	Fault_ *soap.Fault                                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *HostRetrieveVStorageObjectStateBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func HostRetrieveVStorageObjectState(ctx context.Context, r soap.RoundTripper, req *types.HostRetrieveVStorageObjectState) (*types.HostRetrieveVStorageObjectStateResponse, error) {
    +	var reqBody, resBody HostRetrieveVStorageObjectStateBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type HostScheduleReconcileDatastoreInventoryBody struct {
    +	Req    *types.HostScheduleReconcileDatastoreInventory         `xml:"urn:vim25 HostScheduleReconcileDatastoreInventory,omitempty"`
    +	Res    *types.HostScheduleReconcileDatastoreInventoryResponse `xml:"urn:vim25 HostScheduleReconcileDatastoreInventoryResponse,omitempty"`
    +	Fault_ *soap.Fault                                            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *HostScheduleReconcileDatastoreInventoryBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func HostScheduleReconcileDatastoreInventory(ctx context.Context, r soap.RoundTripper, req *types.HostScheduleReconcileDatastoreInventory) (*types.HostScheduleReconcileDatastoreInventoryResponse, error) {
    +	var reqBody, resBody HostScheduleReconcileDatastoreInventoryBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type HostSetVStorageObjectControlFlagsBody struct {
    +	Req    *types.HostSetVStorageObjectControlFlags         `xml:"urn:vim25 HostSetVStorageObjectControlFlags,omitempty"`
    +	Res    *types.HostSetVStorageObjectControlFlagsResponse `xml:"urn:vim25 HostSetVStorageObjectControlFlagsResponse,omitempty"`
    +	Fault_ *soap.Fault                                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *HostSetVStorageObjectControlFlagsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func HostSetVStorageObjectControlFlags(ctx context.Context, r soap.RoundTripper, req *types.HostSetVStorageObjectControlFlags) (*types.HostSetVStorageObjectControlFlagsResponse, error) {
    +	var reqBody, resBody HostSetVStorageObjectControlFlagsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type HostSpecGetUpdatedHostsBody struct {
    +	Req    *types.HostSpecGetUpdatedHosts         `xml:"urn:vim25 HostSpecGetUpdatedHosts,omitempty"`
    +	Res    *types.HostSpecGetUpdatedHostsResponse `xml:"urn:vim25 HostSpecGetUpdatedHostsResponse,omitempty"`
    +	Fault_ *soap.Fault                            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *HostSpecGetUpdatedHostsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func HostSpecGetUpdatedHosts(ctx context.Context, r soap.RoundTripper, req *types.HostSpecGetUpdatedHosts) (*types.HostSpecGetUpdatedHostsResponse, error) {
    +	var reqBody, resBody HostSpecGetUpdatedHostsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type HostVStorageObjectCreateDiskFromSnapshot_TaskBody struct {
    +	Req    *types.HostVStorageObjectCreateDiskFromSnapshot_Task         `xml:"urn:vim25 HostVStorageObjectCreateDiskFromSnapshot_Task,omitempty"`
    +	Res    *types.HostVStorageObjectCreateDiskFromSnapshot_TaskResponse `xml:"urn:vim25 HostVStorageObjectCreateDiskFromSnapshot_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *HostVStorageObjectCreateDiskFromSnapshot_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func HostVStorageObjectCreateDiskFromSnapshot_Task(ctx context.Context, r soap.RoundTripper, req *types.HostVStorageObjectCreateDiskFromSnapshot_Task) (*types.HostVStorageObjectCreateDiskFromSnapshot_TaskResponse, error) {
    +	var reqBody, resBody HostVStorageObjectCreateDiskFromSnapshot_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type HostVStorageObjectCreateSnapshot_TaskBody struct {
    +	Req    *types.HostVStorageObjectCreateSnapshot_Task         `xml:"urn:vim25 HostVStorageObjectCreateSnapshot_Task,omitempty"`
    +	Res    *types.HostVStorageObjectCreateSnapshot_TaskResponse `xml:"urn:vim25 HostVStorageObjectCreateSnapshot_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *HostVStorageObjectCreateSnapshot_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func HostVStorageObjectCreateSnapshot_Task(ctx context.Context, r soap.RoundTripper, req *types.HostVStorageObjectCreateSnapshot_Task) (*types.HostVStorageObjectCreateSnapshot_TaskResponse, error) {
    +	var reqBody, resBody HostVStorageObjectCreateSnapshot_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type HostVStorageObjectDeleteSnapshot_TaskBody struct {
    +	Req    *types.HostVStorageObjectDeleteSnapshot_Task         `xml:"urn:vim25 HostVStorageObjectDeleteSnapshot_Task,omitempty"`
    +	Res    *types.HostVStorageObjectDeleteSnapshot_TaskResponse `xml:"urn:vim25 HostVStorageObjectDeleteSnapshot_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *HostVStorageObjectDeleteSnapshot_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func HostVStorageObjectDeleteSnapshot_Task(ctx context.Context, r soap.RoundTripper, req *types.HostVStorageObjectDeleteSnapshot_Task) (*types.HostVStorageObjectDeleteSnapshot_TaskResponse, error) {
    +	var reqBody, resBody HostVStorageObjectDeleteSnapshot_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type HostVStorageObjectRetrieveSnapshotInfoBody struct {
    +	Req    *types.HostVStorageObjectRetrieveSnapshotInfo         `xml:"urn:vim25 HostVStorageObjectRetrieveSnapshotInfo,omitempty"`
    +	Res    *types.HostVStorageObjectRetrieveSnapshotInfoResponse `xml:"urn:vim25 HostVStorageObjectRetrieveSnapshotInfoResponse,omitempty"`
    +	Fault_ *soap.Fault                                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *HostVStorageObjectRetrieveSnapshotInfoBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func HostVStorageObjectRetrieveSnapshotInfo(ctx context.Context, r soap.RoundTripper, req *types.HostVStorageObjectRetrieveSnapshotInfo) (*types.HostVStorageObjectRetrieveSnapshotInfoResponse, error) {
    +	var reqBody, resBody HostVStorageObjectRetrieveSnapshotInfoBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type HostVStorageObjectRevert_TaskBody struct {
    +	Req    *types.HostVStorageObjectRevert_Task         `xml:"urn:vim25 HostVStorageObjectRevert_Task,omitempty"`
    +	Res    *types.HostVStorageObjectRevert_TaskResponse `xml:"urn:vim25 HostVStorageObjectRevert_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *HostVStorageObjectRevert_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func HostVStorageObjectRevert_Task(ctx context.Context, r soap.RoundTripper, req *types.HostVStorageObjectRevert_Task) (*types.HostVStorageObjectRevert_TaskResponse, error) {
    +	var reqBody, resBody HostVStorageObjectRevert_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type HttpNfcLeaseAbortBody struct {
    +	Req    *types.HttpNfcLeaseAbort         `xml:"urn:vim25 HttpNfcLeaseAbort,omitempty"`
    +	Res    *types.HttpNfcLeaseAbortResponse `xml:"urn:vim25 HttpNfcLeaseAbortResponse,omitempty"`
    +	Fault_ *soap.Fault                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *HttpNfcLeaseAbortBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func HttpNfcLeaseAbort(ctx context.Context, r soap.RoundTripper, req *types.HttpNfcLeaseAbort) (*types.HttpNfcLeaseAbortResponse, error) {
    +	var reqBody, resBody HttpNfcLeaseAbortBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type HttpNfcLeaseCompleteBody struct {
    +	Req    *types.HttpNfcLeaseComplete         `xml:"urn:vim25 HttpNfcLeaseComplete,omitempty"`
    +	Res    *types.HttpNfcLeaseCompleteResponse `xml:"urn:vim25 HttpNfcLeaseCompleteResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *HttpNfcLeaseCompleteBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func HttpNfcLeaseComplete(ctx context.Context, r soap.RoundTripper, req *types.HttpNfcLeaseComplete) (*types.HttpNfcLeaseCompleteResponse, error) {
    +	var reqBody, resBody HttpNfcLeaseCompleteBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type HttpNfcLeaseGetManifestBody struct {
    +	Req    *types.HttpNfcLeaseGetManifest         `xml:"urn:vim25 HttpNfcLeaseGetManifest,omitempty"`
    +	Res    *types.HttpNfcLeaseGetManifestResponse `xml:"urn:vim25 HttpNfcLeaseGetManifestResponse,omitempty"`
    +	Fault_ *soap.Fault                            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *HttpNfcLeaseGetManifestBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func HttpNfcLeaseGetManifest(ctx context.Context, r soap.RoundTripper, req *types.HttpNfcLeaseGetManifest) (*types.HttpNfcLeaseGetManifestResponse, error) {
    +	var reqBody, resBody HttpNfcLeaseGetManifestBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type HttpNfcLeaseProgressBody struct {
    +	Req    *types.HttpNfcLeaseProgress         `xml:"urn:vim25 HttpNfcLeaseProgress,omitempty"`
    +	Res    *types.HttpNfcLeaseProgressResponse `xml:"urn:vim25 HttpNfcLeaseProgressResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *HttpNfcLeaseProgressBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func HttpNfcLeaseProgress(ctx context.Context, r soap.RoundTripper, req *types.HttpNfcLeaseProgress) (*types.HttpNfcLeaseProgressResponse, error) {
    +	var reqBody, resBody HttpNfcLeaseProgressBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type HttpNfcLeasePullFromUrls_TaskBody struct {
    +	Req    *types.HttpNfcLeasePullFromUrls_Task         `xml:"urn:vim25 HttpNfcLeasePullFromUrls_Task,omitempty"`
    +	Res    *types.HttpNfcLeasePullFromUrls_TaskResponse `xml:"urn:vim25 HttpNfcLeasePullFromUrls_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *HttpNfcLeasePullFromUrls_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func HttpNfcLeasePullFromUrls_Task(ctx context.Context, r soap.RoundTripper, req *types.HttpNfcLeasePullFromUrls_Task) (*types.HttpNfcLeasePullFromUrls_TaskResponse, error) {
    +	var reqBody, resBody HttpNfcLeasePullFromUrls_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type HttpNfcLeaseSetManifestChecksumTypeBody struct {
    +	Req    *types.HttpNfcLeaseSetManifestChecksumType         `xml:"urn:vim25 HttpNfcLeaseSetManifestChecksumType,omitempty"`
    +	Res    *types.HttpNfcLeaseSetManifestChecksumTypeResponse `xml:"urn:vim25 HttpNfcLeaseSetManifestChecksumTypeResponse,omitempty"`
    +	Fault_ *soap.Fault                                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *HttpNfcLeaseSetManifestChecksumTypeBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func HttpNfcLeaseSetManifestChecksumType(ctx context.Context, r soap.RoundTripper, req *types.HttpNfcLeaseSetManifestChecksumType) (*types.HttpNfcLeaseSetManifestChecksumTypeResponse, error) {
    +	var reqBody, resBody HttpNfcLeaseSetManifestChecksumTypeBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ImpersonateUserBody struct {
    +	Req    *types.ImpersonateUser         `xml:"urn:vim25 ImpersonateUser,omitempty"`
    +	Res    *types.ImpersonateUserResponse `xml:"urn:vim25 ImpersonateUserResponse,omitempty"`
    +	Fault_ *soap.Fault                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ImpersonateUserBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ImpersonateUser(ctx context.Context, r soap.RoundTripper, req *types.ImpersonateUser) (*types.ImpersonateUserResponse, error) {
    +	var reqBody, resBody ImpersonateUserBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ImportCertificateForCAM_TaskBody struct {
    +	Req    *types.ImportCertificateForCAM_Task         `xml:"urn:vim25 ImportCertificateForCAM_Task,omitempty"`
    +	Res    *types.ImportCertificateForCAM_TaskResponse `xml:"urn:vim25 ImportCertificateForCAM_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ImportCertificateForCAM_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ImportCertificateForCAM_Task(ctx context.Context, r soap.RoundTripper, req *types.ImportCertificateForCAM_Task) (*types.ImportCertificateForCAM_TaskResponse, error) {
    +	var reqBody, resBody ImportCertificateForCAM_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ImportUnmanagedSnapshotBody struct {
    +	Req    *types.ImportUnmanagedSnapshot         `xml:"urn:vim25 ImportUnmanagedSnapshot,omitempty"`
    +	Res    *types.ImportUnmanagedSnapshotResponse `xml:"urn:vim25 ImportUnmanagedSnapshotResponse,omitempty"`
    +	Fault_ *soap.Fault                            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ImportUnmanagedSnapshotBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ImportUnmanagedSnapshot(ctx context.Context, r soap.RoundTripper, req *types.ImportUnmanagedSnapshot) (*types.ImportUnmanagedSnapshotResponse, error) {
    +	var reqBody, resBody ImportUnmanagedSnapshotBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ImportVAppBody struct {
    +	Req    *types.ImportVApp         `xml:"urn:vim25 ImportVApp,omitempty"`
    +	Res    *types.ImportVAppResponse `xml:"urn:vim25 ImportVAppResponse,omitempty"`
    +	Fault_ *soap.Fault               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ImportVAppBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ImportVApp(ctx context.Context, r soap.RoundTripper, req *types.ImportVApp) (*types.ImportVAppResponse, error) {
    +	var reqBody, resBody ImportVAppBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type InflateDisk_TaskBody struct {
    +	Req    *types.InflateDisk_Task         `xml:"urn:vim25 InflateDisk_Task,omitempty"`
    +	Res    *types.InflateDisk_TaskResponse `xml:"urn:vim25 InflateDisk_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *InflateDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func InflateDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.InflateDisk_Task) (*types.InflateDisk_TaskResponse, error) {
    +	var reqBody, resBody InflateDisk_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type InflateVirtualDisk_TaskBody struct {
    +	Req    *types.InflateVirtualDisk_Task         `xml:"urn:vim25 InflateVirtualDisk_Task,omitempty"`
    +	Res    *types.InflateVirtualDisk_TaskResponse `xml:"urn:vim25 InflateVirtualDisk_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *InflateVirtualDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func InflateVirtualDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.InflateVirtualDisk_Task) (*types.InflateVirtualDisk_TaskResponse, error) {
    +	var reqBody, resBody InflateVirtualDisk_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type InitializeDisks_TaskBody struct {
    +	Req    *types.InitializeDisks_Task         `xml:"urn:vim25 InitializeDisks_Task,omitempty"`
    +	Res    *types.InitializeDisks_TaskResponse `xml:"urn:vim25 InitializeDisks_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *InitializeDisks_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func InitializeDisks_Task(ctx context.Context, r soap.RoundTripper, req *types.InitializeDisks_Task) (*types.InitializeDisks_TaskResponse, error) {
    +	var reqBody, resBody InitializeDisks_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type InitiateFileTransferFromGuestBody struct {
    +	Req    *types.InitiateFileTransferFromGuest         `xml:"urn:vim25 InitiateFileTransferFromGuest,omitempty"`
    +	Res    *types.InitiateFileTransferFromGuestResponse `xml:"urn:vim25 InitiateFileTransferFromGuestResponse,omitempty"`
    +	Fault_ *soap.Fault                                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *InitiateFileTransferFromGuestBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func InitiateFileTransferFromGuest(ctx context.Context, r soap.RoundTripper, req *types.InitiateFileTransferFromGuest) (*types.InitiateFileTransferFromGuestResponse, error) {
    +	var reqBody, resBody InitiateFileTransferFromGuestBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type InitiateFileTransferToGuestBody struct {
    +	Req    *types.InitiateFileTransferToGuest         `xml:"urn:vim25 InitiateFileTransferToGuest,omitempty"`
    +	Res    *types.InitiateFileTransferToGuestResponse `xml:"urn:vim25 InitiateFileTransferToGuestResponse,omitempty"`
    +	Fault_ *soap.Fault                                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *InitiateFileTransferToGuestBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func InitiateFileTransferToGuest(ctx context.Context, r soap.RoundTripper, req *types.InitiateFileTransferToGuest) (*types.InitiateFileTransferToGuestResponse, error) {
    +	var reqBody, resBody InitiateFileTransferToGuestBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type InstallHostPatchV2_TaskBody struct {
    +	Req    *types.InstallHostPatchV2_Task         `xml:"urn:vim25 InstallHostPatchV2_Task,omitempty"`
    +	Res    *types.InstallHostPatchV2_TaskResponse `xml:"urn:vim25 InstallHostPatchV2_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *InstallHostPatchV2_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func InstallHostPatchV2_Task(ctx context.Context, r soap.RoundTripper, req *types.InstallHostPatchV2_Task) (*types.InstallHostPatchV2_TaskResponse, error) {
    +	var reqBody, resBody InstallHostPatchV2_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type InstallHostPatch_TaskBody struct {
    +	Req    *types.InstallHostPatch_Task         `xml:"urn:vim25 InstallHostPatch_Task,omitempty"`
    +	Res    *types.InstallHostPatch_TaskResponse `xml:"urn:vim25 InstallHostPatch_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *InstallHostPatch_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func InstallHostPatch_Task(ctx context.Context, r soap.RoundTripper, req *types.InstallHostPatch_Task) (*types.InstallHostPatch_TaskResponse, error) {
    +	var reqBody, resBody InstallHostPatch_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type InstallIoFilter_TaskBody struct {
    +	Req    *types.InstallIoFilter_Task         `xml:"urn:vim25 InstallIoFilter_Task,omitempty"`
    +	Res    *types.InstallIoFilter_TaskResponse `xml:"urn:vim25 InstallIoFilter_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *InstallIoFilter_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func InstallIoFilter_Task(ctx context.Context, r soap.RoundTripper, req *types.InstallIoFilter_Task) (*types.InstallIoFilter_TaskResponse, error) {
    +	var reqBody, resBody InstallIoFilter_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type InstallServerCertificateBody struct {
    +	Req    *types.InstallServerCertificate         `xml:"urn:vim25 InstallServerCertificate,omitempty"`
    +	Res    *types.InstallServerCertificateResponse `xml:"urn:vim25 InstallServerCertificateResponse,omitempty"`
    +	Fault_ *soap.Fault                             `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *InstallServerCertificateBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func InstallServerCertificate(ctx context.Context, r soap.RoundTripper, req *types.InstallServerCertificate) (*types.InstallServerCertificateResponse, error) {
    +	var reqBody, resBody InstallServerCertificateBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type InstallSmartCardTrustAnchorBody struct {
    +	Req    *types.InstallSmartCardTrustAnchor         `xml:"urn:vim25 InstallSmartCardTrustAnchor,omitempty"`
    +	Res    *types.InstallSmartCardTrustAnchorResponse `xml:"urn:vim25 InstallSmartCardTrustAnchorResponse,omitempty"`
    +	Fault_ *soap.Fault                                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *InstallSmartCardTrustAnchorBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func InstallSmartCardTrustAnchor(ctx context.Context, r soap.RoundTripper, req *types.InstallSmartCardTrustAnchor) (*types.InstallSmartCardTrustAnchorResponse, error) {
    +	var reqBody, resBody InstallSmartCardTrustAnchorBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type InstantClone_TaskBody struct {
    +	Req    *types.InstantClone_Task         `xml:"urn:vim25 InstantClone_Task,omitempty"`
    +	Res    *types.InstantClone_TaskResponse `xml:"urn:vim25 InstantClone_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *InstantClone_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func InstantClone_Task(ctx context.Context, r soap.RoundTripper, req *types.InstantClone_Task) (*types.InstantClone_TaskResponse, error) {
    +	var reqBody, resBody InstantClone_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type IsSharedGraphicsActiveBody struct {
    +	Req    *types.IsSharedGraphicsActive         `xml:"urn:vim25 IsSharedGraphicsActive,omitempty"`
    +	Res    *types.IsSharedGraphicsActiveResponse `xml:"urn:vim25 IsSharedGraphicsActiveResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *IsSharedGraphicsActiveBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func IsSharedGraphicsActive(ctx context.Context, r soap.RoundTripper, req *types.IsSharedGraphicsActive) (*types.IsSharedGraphicsActiveResponse, error) {
    +	var reqBody, resBody IsSharedGraphicsActiveBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type JoinDomainWithCAM_TaskBody struct {
    +	Req    *types.JoinDomainWithCAM_Task         `xml:"urn:vim25 JoinDomainWithCAM_Task,omitempty"`
    +	Res    *types.JoinDomainWithCAM_TaskResponse `xml:"urn:vim25 JoinDomainWithCAM_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *JoinDomainWithCAM_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func JoinDomainWithCAM_Task(ctx context.Context, r soap.RoundTripper, req *types.JoinDomainWithCAM_Task) (*types.JoinDomainWithCAM_TaskResponse, error) {
    +	var reqBody, resBody JoinDomainWithCAM_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type JoinDomain_TaskBody struct {
    +	Req    *types.JoinDomain_Task         `xml:"urn:vim25 JoinDomain_Task,omitempty"`
    +	Res    *types.JoinDomain_TaskResponse `xml:"urn:vim25 JoinDomain_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *JoinDomain_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func JoinDomain_Task(ctx context.Context, r soap.RoundTripper, req *types.JoinDomain_Task) (*types.JoinDomain_TaskResponse, error) {
    +	var reqBody, resBody JoinDomain_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type LeaveCurrentDomain_TaskBody struct {
    +	Req    *types.LeaveCurrentDomain_Task         `xml:"urn:vim25 LeaveCurrentDomain_Task,omitempty"`
    +	Res    *types.LeaveCurrentDomain_TaskResponse `xml:"urn:vim25 LeaveCurrentDomain_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *LeaveCurrentDomain_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func LeaveCurrentDomain_Task(ctx context.Context, r soap.RoundTripper, req *types.LeaveCurrentDomain_Task) (*types.LeaveCurrentDomain_TaskResponse, error) {
    +	var reqBody, resBody LeaveCurrentDomain_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ListCACertificateRevocationListsBody struct {
    +	Req    *types.ListCACertificateRevocationLists         `xml:"urn:vim25 ListCACertificateRevocationLists,omitempty"`
    +	Res    *types.ListCACertificateRevocationListsResponse `xml:"urn:vim25 ListCACertificateRevocationListsResponse,omitempty"`
    +	Fault_ *soap.Fault                                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ListCACertificateRevocationListsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ListCACertificateRevocationLists(ctx context.Context, r soap.RoundTripper, req *types.ListCACertificateRevocationLists) (*types.ListCACertificateRevocationListsResponse, error) {
    +	var reqBody, resBody ListCACertificateRevocationListsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ListCACertificatesBody struct {
    +	Req    *types.ListCACertificates         `xml:"urn:vim25 ListCACertificates,omitempty"`
    +	Res    *types.ListCACertificatesResponse `xml:"urn:vim25 ListCACertificatesResponse,omitempty"`
    +	Fault_ *soap.Fault                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ListCACertificatesBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ListCACertificates(ctx context.Context, r soap.RoundTripper, req *types.ListCACertificates) (*types.ListCACertificatesResponse, error) {
    +	var reqBody, resBody ListCACertificatesBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ListFilesInGuestBody struct {
    +	Req    *types.ListFilesInGuest         `xml:"urn:vim25 ListFilesInGuest,omitempty"`
    +	Res    *types.ListFilesInGuestResponse `xml:"urn:vim25 ListFilesInGuestResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ListFilesInGuestBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ListFilesInGuest(ctx context.Context, r soap.RoundTripper, req *types.ListFilesInGuest) (*types.ListFilesInGuestResponse, error) {
    +	var reqBody, resBody ListFilesInGuestBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ListGuestAliasesBody struct {
    +	Req    *types.ListGuestAliases         `xml:"urn:vim25 ListGuestAliases,omitempty"`
    +	Res    *types.ListGuestAliasesResponse `xml:"urn:vim25 ListGuestAliasesResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ListGuestAliasesBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ListGuestAliases(ctx context.Context, r soap.RoundTripper, req *types.ListGuestAliases) (*types.ListGuestAliasesResponse, error) {
    +	var reqBody, resBody ListGuestAliasesBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ListGuestMappedAliasesBody struct {
    +	Req    *types.ListGuestMappedAliases         `xml:"urn:vim25 ListGuestMappedAliases,omitempty"`
    +	Res    *types.ListGuestMappedAliasesResponse `xml:"urn:vim25 ListGuestMappedAliasesResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ListGuestMappedAliasesBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ListGuestMappedAliases(ctx context.Context, r soap.RoundTripper, req *types.ListGuestMappedAliases) (*types.ListGuestMappedAliasesResponse, error) {
    +	var reqBody, resBody ListGuestMappedAliasesBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ListKeysBody struct {
    +	Req    *types.ListKeys         `xml:"urn:vim25 ListKeys,omitempty"`
    +	Res    *types.ListKeysResponse `xml:"urn:vim25 ListKeysResponse,omitempty"`
    +	Fault_ *soap.Fault             `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ListKeysBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ListKeys(ctx context.Context, r soap.RoundTripper, req *types.ListKeys) (*types.ListKeysResponse, error) {
    +	var reqBody, resBody ListKeysBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ListKmipServersBody struct {
    +	Req    *types.ListKmipServers         `xml:"urn:vim25 ListKmipServers,omitempty"`
    +	Res    *types.ListKmipServersResponse `xml:"urn:vim25 ListKmipServersResponse,omitempty"`
    +	Fault_ *soap.Fault                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ListKmipServersBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ListKmipServers(ctx context.Context, r soap.RoundTripper, req *types.ListKmipServers) (*types.ListKmipServersResponse, error) {
    +	var reqBody, resBody ListKmipServersBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ListProcessesInGuestBody struct {
    +	Req    *types.ListProcessesInGuest         `xml:"urn:vim25 ListProcessesInGuest,omitempty"`
    +	Res    *types.ListProcessesInGuestResponse `xml:"urn:vim25 ListProcessesInGuestResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ListProcessesInGuestBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ListProcessesInGuest(ctx context.Context, r soap.RoundTripper, req *types.ListProcessesInGuest) (*types.ListProcessesInGuestResponse, error) {
    +	var reqBody, resBody ListProcessesInGuestBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ListRegistryKeysInGuestBody struct {
    +	Req    *types.ListRegistryKeysInGuest         `xml:"urn:vim25 ListRegistryKeysInGuest,omitempty"`
    +	Res    *types.ListRegistryKeysInGuestResponse `xml:"urn:vim25 ListRegistryKeysInGuestResponse,omitempty"`
    +	Fault_ *soap.Fault                            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ListRegistryKeysInGuestBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ListRegistryKeysInGuest(ctx context.Context, r soap.RoundTripper, req *types.ListRegistryKeysInGuest) (*types.ListRegistryKeysInGuestResponse, error) {
    +	var reqBody, resBody ListRegistryKeysInGuestBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ListRegistryValuesInGuestBody struct {
    +	Req    *types.ListRegistryValuesInGuest         `xml:"urn:vim25 ListRegistryValuesInGuest,omitempty"`
    +	Res    *types.ListRegistryValuesInGuestResponse `xml:"urn:vim25 ListRegistryValuesInGuestResponse,omitempty"`
    +	Fault_ *soap.Fault                              `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ListRegistryValuesInGuestBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ListRegistryValuesInGuest(ctx context.Context, r soap.RoundTripper, req *types.ListRegistryValuesInGuest) (*types.ListRegistryValuesInGuestResponse, error) {
    +	var reqBody, resBody ListRegistryValuesInGuestBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ListSmartCardTrustAnchorsBody struct {
    +	Req    *types.ListSmartCardTrustAnchors         `xml:"urn:vim25 ListSmartCardTrustAnchors,omitempty"`
    +	Res    *types.ListSmartCardTrustAnchorsResponse `xml:"urn:vim25 ListSmartCardTrustAnchorsResponse,omitempty"`
    +	Fault_ *soap.Fault                              `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ListSmartCardTrustAnchorsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ListSmartCardTrustAnchors(ctx context.Context, r soap.RoundTripper, req *types.ListSmartCardTrustAnchors) (*types.ListSmartCardTrustAnchorsResponse, error) {
    +	var reqBody, resBody ListSmartCardTrustAnchorsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ListTagsAttachedToVStorageObjectBody struct {
    +	Req    *types.ListTagsAttachedToVStorageObject         `xml:"urn:vim25 ListTagsAttachedToVStorageObject,omitempty"`
    +	Res    *types.ListTagsAttachedToVStorageObjectResponse `xml:"urn:vim25 ListTagsAttachedToVStorageObjectResponse,omitempty"`
    +	Fault_ *soap.Fault                                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ListTagsAttachedToVStorageObjectBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ListTagsAttachedToVStorageObject(ctx context.Context, r soap.RoundTripper, req *types.ListTagsAttachedToVStorageObject) (*types.ListTagsAttachedToVStorageObjectResponse, error) {
    +	var reqBody, resBody ListTagsAttachedToVStorageObjectBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ListVStorageObjectBody struct {
    +	Req    *types.ListVStorageObject         `xml:"urn:vim25 ListVStorageObject,omitempty"`
    +	Res    *types.ListVStorageObjectResponse `xml:"urn:vim25 ListVStorageObjectResponse,omitempty"`
    +	Fault_ *soap.Fault                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ListVStorageObjectBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ListVStorageObject(ctx context.Context, r soap.RoundTripper, req *types.ListVStorageObject) (*types.ListVStorageObjectResponse, error) {
    +	var reqBody, resBody ListVStorageObjectBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ListVStorageObjectsAttachedToTagBody struct {
    +	Req    *types.ListVStorageObjectsAttachedToTag         `xml:"urn:vim25 ListVStorageObjectsAttachedToTag,omitempty"`
    +	Res    *types.ListVStorageObjectsAttachedToTagResponse `xml:"urn:vim25 ListVStorageObjectsAttachedToTagResponse,omitempty"`
    +	Fault_ *soap.Fault                                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ListVStorageObjectsAttachedToTagBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ListVStorageObjectsAttachedToTag(ctx context.Context, r soap.RoundTripper, req *types.ListVStorageObjectsAttachedToTag) (*types.ListVStorageObjectsAttachedToTagResponse, error) {
    +	var reqBody, resBody ListVStorageObjectsAttachedToTagBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type LogUserEventBody struct {
    +	Req    *types.LogUserEvent         `xml:"urn:vim25 LogUserEvent,omitempty"`
    +	Res    *types.LogUserEventResponse `xml:"urn:vim25 LogUserEventResponse,omitempty"`
    +	Fault_ *soap.Fault                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *LogUserEventBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func LogUserEvent(ctx context.Context, r soap.RoundTripper, req *types.LogUserEvent) (*types.LogUserEventResponse, error) {
    +	var reqBody, resBody LogUserEventBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type LoginBody struct {
    +	Req    *types.Login         `xml:"urn:vim25 Login,omitempty"`
    +	Res    *types.LoginResponse `xml:"urn:vim25 LoginResponse,omitempty"`
    +	Fault_ *soap.Fault          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *LoginBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func Login(ctx context.Context, r soap.RoundTripper, req *types.Login) (*types.LoginResponse, error) {
    +	var reqBody, resBody LoginBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type LoginBySSPIBody struct {
    +	Req    *types.LoginBySSPI         `xml:"urn:vim25 LoginBySSPI,omitempty"`
    +	Res    *types.LoginBySSPIResponse `xml:"urn:vim25 LoginBySSPIResponse,omitempty"`
    +	Fault_ *soap.Fault                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *LoginBySSPIBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func LoginBySSPI(ctx context.Context, r soap.RoundTripper, req *types.LoginBySSPI) (*types.LoginBySSPIResponse, error) {
    +	var reqBody, resBody LoginBySSPIBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type LoginByTokenBody struct {
    +	Req    *types.LoginByToken         `xml:"urn:vim25 LoginByToken,omitempty"`
    +	Res    *types.LoginByTokenResponse `xml:"urn:vim25 LoginByTokenResponse,omitempty"`
    +	Fault_ *soap.Fault                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *LoginByTokenBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func LoginByToken(ctx context.Context, r soap.RoundTripper, req *types.LoginByToken) (*types.LoginByTokenResponse, error) {
    +	var reqBody, resBody LoginByTokenBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type LoginExtensionByCertificateBody struct {
    +	Req    *types.LoginExtensionByCertificate         `xml:"urn:vim25 LoginExtensionByCertificate,omitempty"`
    +	Res    *types.LoginExtensionByCertificateResponse `xml:"urn:vim25 LoginExtensionByCertificateResponse,omitempty"`
    +	Fault_ *soap.Fault                                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *LoginExtensionByCertificateBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func LoginExtensionByCertificate(ctx context.Context, r soap.RoundTripper, req *types.LoginExtensionByCertificate) (*types.LoginExtensionByCertificateResponse, error) {
    +	var reqBody, resBody LoginExtensionByCertificateBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type LoginExtensionBySubjectNameBody struct {
    +	Req    *types.LoginExtensionBySubjectName         `xml:"urn:vim25 LoginExtensionBySubjectName,omitempty"`
    +	Res    *types.LoginExtensionBySubjectNameResponse `xml:"urn:vim25 LoginExtensionBySubjectNameResponse,omitempty"`
    +	Fault_ *soap.Fault                                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *LoginExtensionBySubjectNameBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func LoginExtensionBySubjectName(ctx context.Context, r soap.RoundTripper, req *types.LoginExtensionBySubjectName) (*types.LoginExtensionBySubjectNameResponse, error) {
    +	var reqBody, resBody LoginExtensionBySubjectNameBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type LogoutBody struct {
    +	Req    *types.Logout         `xml:"urn:vim25 Logout,omitempty"`
    +	Res    *types.LogoutResponse `xml:"urn:vim25 LogoutResponse,omitempty"`
    +	Fault_ *soap.Fault           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *LogoutBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func Logout(ctx context.Context, r soap.RoundTripper, req *types.Logout) (*types.LogoutResponse, error) {
    +	var reqBody, resBody LogoutBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type LookupDvPortGroupBody struct {
    +	Req    *types.LookupDvPortGroup         `xml:"urn:vim25 LookupDvPortGroup,omitempty"`
    +	Res    *types.LookupDvPortGroupResponse `xml:"urn:vim25 LookupDvPortGroupResponse,omitempty"`
    +	Fault_ *soap.Fault                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *LookupDvPortGroupBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func LookupDvPortGroup(ctx context.Context, r soap.RoundTripper, req *types.LookupDvPortGroup) (*types.LookupDvPortGroupResponse, error) {
    +	var reqBody, resBody LookupDvPortGroupBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type LookupVmOverheadMemoryBody struct {
    +	Req    *types.LookupVmOverheadMemory         `xml:"urn:vim25 LookupVmOverheadMemory,omitempty"`
    +	Res    *types.LookupVmOverheadMemoryResponse `xml:"urn:vim25 LookupVmOverheadMemoryResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *LookupVmOverheadMemoryBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func LookupVmOverheadMemory(ctx context.Context, r soap.RoundTripper, req *types.LookupVmOverheadMemory) (*types.LookupVmOverheadMemoryResponse, error) {
    +	var reqBody, resBody LookupVmOverheadMemoryBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type MakeDirectoryBody struct {
    +	Req    *types.MakeDirectory         `xml:"urn:vim25 MakeDirectory,omitempty"`
    +	Res    *types.MakeDirectoryResponse `xml:"urn:vim25 MakeDirectoryResponse,omitempty"`
    +	Fault_ *soap.Fault                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *MakeDirectoryBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func MakeDirectory(ctx context.Context, r soap.RoundTripper, req *types.MakeDirectory) (*types.MakeDirectoryResponse, error) {
    +	var reqBody, resBody MakeDirectoryBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type MakeDirectoryInGuestBody struct {
    +	Req    *types.MakeDirectoryInGuest         `xml:"urn:vim25 MakeDirectoryInGuest,omitempty"`
    +	Res    *types.MakeDirectoryInGuestResponse `xml:"urn:vim25 MakeDirectoryInGuestResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *MakeDirectoryInGuestBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func MakeDirectoryInGuest(ctx context.Context, r soap.RoundTripper, req *types.MakeDirectoryInGuest) (*types.MakeDirectoryInGuestResponse, error) {
    +	var reqBody, resBody MakeDirectoryInGuestBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type MakePrimaryVM_TaskBody struct {
    +	Req    *types.MakePrimaryVM_Task         `xml:"urn:vim25 MakePrimaryVM_Task,omitempty"`
    +	Res    *types.MakePrimaryVM_TaskResponse `xml:"urn:vim25 MakePrimaryVM_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *MakePrimaryVM_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func MakePrimaryVM_Task(ctx context.Context, r soap.RoundTripper, req *types.MakePrimaryVM_Task) (*types.MakePrimaryVM_TaskResponse, error) {
    +	var reqBody, resBody MakePrimaryVM_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type MarkAsLocal_TaskBody struct {
    +	Req    *types.MarkAsLocal_Task         `xml:"urn:vim25 MarkAsLocal_Task,omitempty"`
    +	Res    *types.MarkAsLocal_TaskResponse `xml:"urn:vim25 MarkAsLocal_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *MarkAsLocal_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func MarkAsLocal_Task(ctx context.Context, r soap.RoundTripper, req *types.MarkAsLocal_Task) (*types.MarkAsLocal_TaskResponse, error) {
    +	var reqBody, resBody MarkAsLocal_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type MarkAsNonLocal_TaskBody struct {
    +	Req    *types.MarkAsNonLocal_Task         `xml:"urn:vim25 MarkAsNonLocal_Task,omitempty"`
    +	Res    *types.MarkAsNonLocal_TaskResponse `xml:"urn:vim25 MarkAsNonLocal_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *MarkAsNonLocal_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func MarkAsNonLocal_Task(ctx context.Context, r soap.RoundTripper, req *types.MarkAsNonLocal_Task) (*types.MarkAsNonLocal_TaskResponse, error) {
    +	var reqBody, resBody MarkAsNonLocal_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type MarkAsNonSsd_TaskBody struct {
    +	Req    *types.MarkAsNonSsd_Task         `xml:"urn:vim25 MarkAsNonSsd_Task,omitempty"`
    +	Res    *types.MarkAsNonSsd_TaskResponse `xml:"urn:vim25 MarkAsNonSsd_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *MarkAsNonSsd_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func MarkAsNonSsd_Task(ctx context.Context, r soap.RoundTripper, req *types.MarkAsNonSsd_Task) (*types.MarkAsNonSsd_TaskResponse, error) {
    +	var reqBody, resBody MarkAsNonSsd_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type MarkAsSsd_TaskBody struct {
    +	Req    *types.MarkAsSsd_Task         `xml:"urn:vim25 MarkAsSsd_Task,omitempty"`
    +	Res    *types.MarkAsSsd_TaskResponse `xml:"urn:vim25 MarkAsSsd_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *MarkAsSsd_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func MarkAsSsd_Task(ctx context.Context, r soap.RoundTripper, req *types.MarkAsSsd_Task) (*types.MarkAsSsd_TaskResponse, error) {
    +	var reqBody, resBody MarkAsSsd_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type MarkAsTemplateBody struct {
    +	Req    *types.MarkAsTemplate         `xml:"urn:vim25 MarkAsTemplate,omitempty"`
    +	Res    *types.MarkAsTemplateResponse `xml:"urn:vim25 MarkAsTemplateResponse,omitempty"`
    +	Fault_ *soap.Fault                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *MarkAsTemplateBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func MarkAsTemplate(ctx context.Context, r soap.RoundTripper, req *types.MarkAsTemplate) (*types.MarkAsTemplateResponse, error) {
    +	var reqBody, resBody MarkAsTemplateBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type MarkAsVirtualMachineBody struct {
    +	Req    *types.MarkAsVirtualMachine         `xml:"urn:vim25 MarkAsVirtualMachine,omitempty"`
    +	Res    *types.MarkAsVirtualMachineResponse `xml:"urn:vim25 MarkAsVirtualMachineResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *MarkAsVirtualMachineBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func MarkAsVirtualMachine(ctx context.Context, r soap.RoundTripper, req *types.MarkAsVirtualMachine) (*types.MarkAsVirtualMachineResponse, error) {
    +	var reqBody, resBody MarkAsVirtualMachineBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type MarkDefaultBody struct {
    +	Req    *types.MarkDefault         `xml:"urn:vim25 MarkDefault,omitempty"`
    +	Res    *types.MarkDefaultResponse `xml:"urn:vim25 MarkDefaultResponse,omitempty"`
    +	Fault_ *soap.Fault                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *MarkDefaultBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func MarkDefault(ctx context.Context, r soap.RoundTripper, req *types.MarkDefault) (*types.MarkDefaultResponse, error) {
    +	var reqBody, resBody MarkDefaultBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type MarkForRemovalBody struct {
    +	Req    *types.MarkForRemoval         `xml:"urn:vim25 MarkForRemoval,omitempty"`
    +	Res    *types.MarkForRemovalResponse `xml:"urn:vim25 MarkForRemovalResponse,omitempty"`
    +	Fault_ *soap.Fault                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *MarkForRemovalBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func MarkForRemoval(ctx context.Context, r soap.RoundTripper, req *types.MarkForRemoval) (*types.MarkForRemovalResponse, error) {
    +	var reqBody, resBody MarkForRemovalBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type MergeDvs_TaskBody struct {
    +	Req    *types.MergeDvs_Task         `xml:"urn:vim25 MergeDvs_Task,omitempty"`
    +	Res    *types.MergeDvs_TaskResponse `xml:"urn:vim25 MergeDvs_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *MergeDvs_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func MergeDvs_Task(ctx context.Context, r soap.RoundTripper, req *types.MergeDvs_Task) (*types.MergeDvs_TaskResponse, error) {
    +	var reqBody, resBody MergeDvs_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type MergePermissionsBody struct {
    +	Req    *types.MergePermissions         `xml:"urn:vim25 MergePermissions,omitempty"`
    +	Res    *types.MergePermissionsResponse `xml:"urn:vim25 MergePermissionsResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *MergePermissionsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func MergePermissions(ctx context.Context, r soap.RoundTripper, req *types.MergePermissions) (*types.MergePermissionsResponse, error) {
    +	var reqBody, resBody MergePermissionsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type MigrateVM_TaskBody struct {
    +	Req    *types.MigrateVM_Task         `xml:"urn:vim25 MigrateVM_Task,omitempty"`
    +	Res    *types.MigrateVM_TaskResponse `xml:"urn:vim25 MigrateVM_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *MigrateVM_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func MigrateVM_Task(ctx context.Context, r soap.RoundTripper, req *types.MigrateVM_Task) (*types.MigrateVM_TaskResponse, error) {
    +	var reqBody, resBody MigrateVM_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ModifyListViewBody struct {
    +	Req    *types.ModifyListView         `xml:"urn:vim25 ModifyListView,omitempty"`
    +	Res    *types.ModifyListViewResponse `xml:"urn:vim25 ModifyListViewResponse,omitempty"`
    +	Fault_ *soap.Fault                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ModifyListViewBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ModifyListView(ctx context.Context, r soap.RoundTripper, req *types.ModifyListView) (*types.ModifyListViewResponse, error) {
    +	var reqBody, resBody ModifyListViewBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type MountToolsInstallerBody struct {
    +	Req    *types.MountToolsInstaller         `xml:"urn:vim25 MountToolsInstaller,omitempty"`
    +	Res    *types.MountToolsInstallerResponse `xml:"urn:vim25 MountToolsInstallerResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *MountToolsInstallerBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func MountToolsInstaller(ctx context.Context, r soap.RoundTripper, req *types.MountToolsInstaller) (*types.MountToolsInstallerResponse, error) {
    +	var reqBody, resBody MountToolsInstallerBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type MountVffsVolumeBody struct {
    +	Req    *types.MountVffsVolume         `xml:"urn:vim25 MountVffsVolume,omitempty"`
    +	Res    *types.MountVffsVolumeResponse `xml:"urn:vim25 MountVffsVolumeResponse,omitempty"`
    +	Fault_ *soap.Fault                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *MountVffsVolumeBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func MountVffsVolume(ctx context.Context, r soap.RoundTripper, req *types.MountVffsVolume) (*types.MountVffsVolumeResponse, error) {
    +	var reqBody, resBody MountVffsVolumeBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type MountVmfsVolumeBody struct {
    +	Req    *types.MountVmfsVolume         `xml:"urn:vim25 MountVmfsVolume,omitempty"`
    +	Res    *types.MountVmfsVolumeResponse `xml:"urn:vim25 MountVmfsVolumeResponse,omitempty"`
    +	Fault_ *soap.Fault                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *MountVmfsVolumeBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func MountVmfsVolume(ctx context.Context, r soap.RoundTripper, req *types.MountVmfsVolume) (*types.MountVmfsVolumeResponse, error) {
    +	var reqBody, resBody MountVmfsVolumeBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type MountVmfsVolumeEx_TaskBody struct {
    +	Req    *types.MountVmfsVolumeEx_Task         `xml:"urn:vim25 MountVmfsVolumeEx_Task,omitempty"`
    +	Res    *types.MountVmfsVolumeEx_TaskResponse `xml:"urn:vim25 MountVmfsVolumeEx_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *MountVmfsVolumeEx_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func MountVmfsVolumeEx_Task(ctx context.Context, r soap.RoundTripper, req *types.MountVmfsVolumeEx_Task) (*types.MountVmfsVolumeEx_TaskResponse, error) {
    +	var reqBody, resBody MountVmfsVolumeEx_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type MoveDVPort_TaskBody struct {
    +	Req    *types.MoveDVPort_Task         `xml:"urn:vim25 MoveDVPort_Task,omitempty"`
    +	Res    *types.MoveDVPort_TaskResponse `xml:"urn:vim25 MoveDVPort_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *MoveDVPort_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func MoveDVPort_Task(ctx context.Context, r soap.RoundTripper, req *types.MoveDVPort_Task) (*types.MoveDVPort_TaskResponse, error) {
    +	var reqBody, resBody MoveDVPort_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type MoveDatastoreFile_TaskBody struct {
    +	Req    *types.MoveDatastoreFile_Task         `xml:"urn:vim25 MoveDatastoreFile_Task,omitempty"`
    +	Res    *types.MoveDatastoreFile_TaskResponse `xml:"urn:vim25 MoveDatastoreFile_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *MoveDatastoreFile_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func MoveDatastoreFile_Task(ctx context.Context, r soap.RoundTripper, req *types.MoveDatastoreFile_Task) (*types.MoveDatastoreFile_TaskResponse, error) {
    +	var reqBody, resBody MoveDatastoreFile_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type MoveDirectoryInGuestBody struct {
    +	Req    *types.MoveDirectoryInGuest         `xml:"urn:vim25 MoveDirectoryInGuest,omitempty"`
    +	Res    *types.MoveDirectoryInGuestResponse `xml:"urn:vim25 MoveDirectoryInGuestResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *MoveDirectoryInGuestBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func MoveDirectoryInGuest(ctx context.Context, r soap.RoundTripper, req *types.MoveDirectoryInGuest) (*types.MoveDirectoryInGuestResponse, error) {
    +	var reqBody, resBody MoveDirectoryInGuestBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type MoveFileInGuestBody struct {
    +	Req    *types.MoveFileInGuest         `xml:"urn:vim25 MoveFileInGuest,omitempty"`
    +	Res    *types.MoveFileInGuestResponse `xml:"urn:vim25 MoveFileInGuestResponse,omitempty"`
    +	Fault_ *soap.Fault                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *MoveFileInGuestBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func MoveFileInGuest(ctx context.Context, r soap.RoundTripper, req *types.MoveFileInGuest) (*types.MoveFileInGuestResponse, error) {
    +	var reqBody, resBody MoveFileInGuestBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type MoveHostInto_TaskBody struct {
    +	Req    *types.MoveHostInto_Task         `xml:"urn:vim25 MoveHostInto_Task,omitempty"`
    +	Res    *types.MoveHostInto_TaskResponse `xml:"urn:vim25 MoveHostInto_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *MoveHostInto_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func MoveHostInto_Task(ctx context.Context, r soap.RoundTripper, req *types.MoveHostInto_Task) (*types.MoveHostInto_TaskResponse, error) {
    +	var reqBody, resBody MoveHostInto_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type MoveIntoFolder_TaskBody struct {
    +	Req    *types.MoveIntoFolder_Task         `xml:"urn:vim25 MoveIntoFolder_Task,omitempty"`
    +	Res    *types.MoveIntoFolder_TaskResponse `xml:"urn:vim25 MoveIntoFolder_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *MoveIntoFolder_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func MoveIntoFolder_Task(ctx context.Context, r soap.RoundTripper, req *types.MoveIntoFolder_Task) (*types.MoveIntoFolder_TaskResponse, error) {
    +	var reqBody, resBody MoveIntoFolder_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type MoveIntoResourcePoolBody struct {
    +	Req    *types.MoveIntoResourcePool         `xml:"urn:vim25 MoveIntoResourcePool,omitempty"`
    +	Res    *types.MoveIntoResourcePoolResponse `xml:"urn:vim25 MoveIntoResourcePoolResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *MoveIntoResourcePoolBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func MoveIntoResourcePool(ctx context.Context, r soap.RoundTripper, req *types.MoveIntoResourcePool) (*types.MoveIntoResourcePoolResponse, error) {
    +	var reqBody, resBody MoveIntoResourcePoolBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type MoveInto_TaskBody struct {
    +	Req    *types.MoveInto_Task         `xml:"urn:vim25 MoveInto_Task,omitempty"`
    +	Res    *types.MoveInto_TaskResponse `xml:"urn:vim25 MoveInto_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *MoveInto_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func MoveInto_Task(ctx context.Context, r soap.RoundTripper, req *types.MoveInto_Task) (*types.MoveInto_TaskResponse, error) {
    +	var reqBody, resBody MoveInto_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type MoveVirtualDisk_TaskBody struct {
    +	Req    *types.MoveVirtualDisk_Task         `xml:"urn:vim25 MoveVirtualDisk_Task,omitempty"`
    +	Res    *types.MoveVirtualDisk_TaskResponse `xml:"urn:vim25 MoveVirtualDisk_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *MoveVirtualDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func MoveVirtualDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.MoveVirtualDisk_Task) (*types.MoveVirtualDisk_TaskResponse, error) {
    +	var reqBody, resBody MoveVirtualDisk_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type OpenInventoryViewFolderBody struct {
    +	Req    *types.OpenInventoryViewFolder         `xml:"urn:vim25 OpenInventoryViewFolder,omitempty"`
    +	Res    *types.OpenInventoryViewFolderResponse `xml:"urn:vim25 OpenInventoryViewFolderResponse,omitempty"`
    +	Fault_ *soap.Fault                            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *OpenInventoryViewFolderBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func OpenInventoryViewFolder(ctx context.Context, r soap.RoundTripper, req *types.OpenInventoryViewFolder) (*types.OpenInventoryViewFolderResponse, error) {
    +	var reqBody, resBody OpenInventoryViewFolderBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type OverwriteCustomizationSpecBody struct {
    +	Req    *types.OverwriteCustomizationSpec         `xml:"urn:vim25 OverwriteCustomizationSpec,omitempty"`
    +	Res    *types.OverwriteCustomizationSpecResponse `xml:"urn:vim25 OverwriteCustomizationSpecResponse,omitempty"`
    +	Fault_ *soap.Fault                               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *OverwriteCustomizationSpecBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func OverwriteCustomizationSpec(ctx context.Context, r soap.RoundTripper, req *types.OverwriteCustomizationSpec) (*types.OverwriteCustomizationSpecResponse, error) {
    +	var reqBody, resBody OverwriteCustomizationSpecBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ParseDescriptorBody struct {
    +	Req    *types.ParseDescriptor         `xml:"urn:vim25 ParseDescriptor,omitempty"`
    +	Res    *types.ParseDescriptorResponse `xml:"urn:vim25 ParseDescriptorResponse,omitempty"`
    +	Fault_ *soap.Fault                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ParseDescriptorBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ParseDescriptor(ctx context.Context, r soap.RoundTripper, req *types.ParseDescriptor) (*types.ParseDescriptorResponse, error) {
    +	var reqBody, resBody ParseDescriptorBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type PerformDvsProductSpecOperation_TaskBody struct {
    +	Req    *types.PerformDvsProductSpecOperation_Task         `xml:"urn:vim25 PerformDvsProductSpecOperation_Task,omitempty"`
    +	Res    *types.PerformDvsProductSpecOperation_TaskResponse `xml:"urn:vim25 PerformDvsProductSpecOperation_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *PerformDvsProductSpecOperation_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func PerformDvsProductSpecOperation_Task(ctx context.Context, r soap.RoundTripper, req *types.PerformDvsProductSpecOperation_Task) (*types.PerformDvsProductSpecOperation_TaskResponse, error) {
    +	var reqBody, resBody PerformDvsProductSpecOperation_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type PerformVsanUpgradePreflightCheckBody struct {
    +	Req    *types.PerformVsanUpgradePreflightCheck         `xml:"urn:vim25 PerformVsanUpgradePreflightCheck,omitempty"`
    +	Res    *types.PerformVsanUpgradePreflightCheckResponse `xml:"urn:vim25 PerformVsanUpgradePreflightCheckResponse,omitempty"`
    +	Fault_ *soap.Fault                                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *PerformVsanUpgradePreflightCheckBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func PerformVsanUpgradePreflightCheck(ctx context.Context, r soap.RoundTripper, req *types.PerformVsanUpgradePreflightCheck) (*types.PerformVsanUpgradePreflightCheckResponse, error) {
    +	var reqBody, resBody PerformVsanUpgradePreflightCheckBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type PerformVsanUpgrade_TaskBody struct {
    +	Req    *types.PerformVsanUpgrade_Task         `xml:"urn:vim25 PerformVsanUpgrade_Task,omitempty"`
    +	Res    *types.PerformVsanUpgrade_TaskResponse `xml:"urn:vim25 PerformVsanUpgrade_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *PerformVsanUpgrade_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func PerformVsanUpgrade_Task(ctx context.Context, r soap.RoundTripper, req *types.PerformVsanUpgrade_Task) (*types.PerformVsanUpgrade_TaskResponse, error) {
    +	var reqBody, resBody PerformVsanUpgrade_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type PlaceVmBody struct {
    +	Req    *types.PlaceVm         `xml:"urn:vim25 PlaceVm,omitempty"`
    +	Res    *types.PlaceVmResponse `xml:"urn:vim25 PlaceVmResponse,omitempty"`
    +	Fault_ *soap.Fault            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *PlaceVmBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func PlaceVm(ctx context.Context, r soap.RoundTripper, req *types.PlaceVm) (*types.PlaceVmResponse, error) {
    +	var reqBody, resBody PlaceVmBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type PostEventBody struct {
    +	Req    *types.PostEvent         `xml:"urn:vim25 PostEvent,omitempty"`
    +	Res    *types.PostEventResponse `xml:"urn:vim25 PostEventResponse,omitempty"`
    +	Fault_ *soap.Fault              `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *PostEventBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func PostEvent(ctx context.Context, r soap.RoundTripper, req *types.PostEvent) (*types.PostEventResponse, error) {
    +	var reqBody, resBody PostEventBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type PostHealthUpdatesBody struct {
    +	Req    *types.PostHealthUpdates         `xml:"urn:vim25 PostHealthUpdates,omitempty"`
    +	Res    *types.PostHealthUpdatesResponse `xml:"urn:vim25 PostHealthUpdatesResponse,omitempty"`
    +	Fault_ *soap.Fault                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *PostHealthUpdatesBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func PostHealthUpdates(ctx context.Context, r soap.RoundTripper, req *types.PostHealthUpdates) (*types.PostHealthUpdatesResponse, error) {
    +	var reqBody, resBody PostHealthUpdatesBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type PowerDownHostToStandBy_TaskBody struct {
    +	Req    *types.PowerDownHostToStandBy_Task         `xml:"urn:vim25 PowerDownHostToStandBy_Task,omitempty"`
    +	Res    *types.PowerDownHostToStandBy_TaskResponse `xml:"urn:vim25 PowerDownHostToStandBy_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *PowerDownHostToStandBy_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func PowerDownHostToStandBy_Task(ctx context.Context, r soap.RoundTripper, req *types.PowerDownHostToStandBy_Task) (*types.PowerDownHostToStandBy_TaskResponse, error) {
    +	var reqBody, resBody PowerDownHostToStandBy_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type PowerOffVApp_TaskBody struct {
    +	Req    *types.PowerOffVApp_Task         `xml:"urn:vim25 PowerOffVApp_Task,omitempty"`
    +	Res    *types.PowerOffVApp_TaskResponse `xml:"urn:vim25 PowerOffVApp_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *PowerOffVApp_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func PowerOffVApp_Task(ctx context.Context, r soap.RoundTripper, req *types.PowerOffVApp_Task) (*types.PowerOffVApp_TaskResponse, error) {
    +	var reqBody, resBody PowerOffVApp_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type PowerOffVM_TaskBody struct {
    +	Req    *types.PowerOffVM_Task         `xml:"urn:vim25 PowerOffVM_Task,omitempty"`
    +	Res    *types.PowerOffVM_TaskResponse `xml:"urn:vim25 PowerOffVM_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *PowerOffVM_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func PowerOffVM_Task(ctx context.Context, r soap.RoundTripper, req *types.PowerOffVM_Task) (*types.PowerOffVM_TaskResponse, error) {
    +	var reqBody, resBody PowerOffVM_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type PowerOnMultiVM_TaskBody struct {
    +	Req    *types.PowerOnMultiVM_Task         `xml:"urn:vim25 PowerOnMultiVM_Task,omitempty"`
    +	Res    *types.PowerOnMultiVM_TaskResponse `xml:"urn:vim25 PowerOnMultiVM_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *PowerOnMultiVM_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func PowerOnMultiVM_Task(ctx context.Context, r soap.RoundTripper, req *types.PowerOnMultiVM_Task) (*types.PowerOnMultiVM_TaskResponse, error) {
    +	var reqBody, resBody PowerOnMultiVM_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type PowerOnVApp_TaskBody struct {
    +	Req    *types.PowerOnVApp_Task         `xml:"urn:vim25 PowerOnVApp_Task,omitempty"`
    +	Res    *types.PowerOnVApp_TaskResponse `xml:"urn:vim25 PowerOnVApp_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *PowerOnVApp_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func PowerOnVApp_Task(ctx context.Context, r soap.RoundTripper, req *types.PowerOnVApp_Task) (*types.PowerOnVApp_TaskResponse, error) {
    +	var reqBody, resBody PowerOnVApp_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type PowerOnVM_TaskBody struct {
    +	Req    *types.PowerOnVM_Task         `xml:"urn:vim25 PowerOnVM_Task,omitempty"`
    +	Res    *types.PowerOnVM_TaskResponse `xml:"urn:vim25 PowerOnVM_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *PowerOnVM_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func PowerOnVM_Task(ctx context.Context, r soap.RoundTripper, req *types.PowerOnVM_Task) (*types.PowerOnVM_TaskResponse, error) {
    +	var reqBody, resBody PowerOnVM_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type PowerUpHostFromStandBy_TaskBody struct {
    +	Req    *types.PowerUpHostFromStandBy_Task         `xml:"urn:vim25 PowerUpHostFromStandBy_Task,omitempty"`
    +	Res    *types.PowerUpHostFromStandBy_TaskResponse `xml:"urn:vim25 PowerUpHostFromStandBy_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *PowerUpHostFromStandBy_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func PowerUpHostFromStandBy_Task(ctx context.Context, r soap.RoundTripper, req *types.PowerUpHostFromStandBy_Task) (*types.PowerUpHostFromStandBy_TaskResponse, error) {
    +	var reqBody, resBody PowerUpHostFromStandBy_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type PrepareCryptoBody struct {
    +	Req    *types.PrepareCrypto         `xml:"urn:vim25 PrepareCrypto,omitempty"`
    +	Res    *types.PrepareCryptoResponse `xml:"urn:vim25 PrepareCryptoResponse,omitempty"`
    +	Fault_ *soap.Fault                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *PrepareCryptoBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func PrepareCrypto(ctx context.Context, r soap.RoundTripper, req *types.PrepareCrypto) (*types.PrepareCryptoResponse, error) {
    +	var reqBody, resBody PrepareCryptoBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type PromoteDisks_TaskBody struct {
    +	Req    *types.PromoteDisks_Task         `xml:"urn:vim25 PromoteDisks_Task,omitempty"`
    +	Res    *types.PromoteDisks_TaskResponse `xml:"urn:vim25 PromoteDisks_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *PromoteDisks_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func PromoteDisks_Task(ctx context.Context, r soap.RoundTripper, req *types.PromoteDisks_Task) (*types.PromoteDisks_TaskResponse, error) {
    +	var reqBody, resBody PromoteDisks_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type PutUsbScanCodesBody struct {
    +	Req    *types.PutUsbScanCodes         `xml:"urn:vim25 PutUsbScanCodes,omitempty"`
    +	Res    *types.PutUsbScanCodesResponse `xml:"urn:vim25 PutUsbScanCodesResponse,omitempty"`
    +	Fault_ *soap.Fault                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *PutUsbScanCodesBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func PutUsbScanCodes(ctx context.Context, r soap.RoundTripper, req *types.PutUsbScanCodes) (*types.PutUsbScanCodesResponse, error) {
    +	var reqBody, resBody PutUsbScanCodesBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryAnswerFileStatusBody struct {
    +	Req    *types.QueryAnswerFileStatus         `xml:"urn:vim25 QueryAnswerFileStatus,omitempty"`
    +	Res    *types.QueryAnswerFileStatusResponse `xml:"urn:vim25 QueryAnswerFileStatusResponse,omitempty"`
    +	Fault_ *soap.Fault                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryAnswerFileStatusBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryAnswerFileStatus(ctx context.Context, r soap.RoundTripper, req *types.QueryAnswerFileStatus) (*types.QueryAnswerFileStatusResponse, error) {
    +	var reqBody, resBody QueryAnswerFileStatusBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryAssignedLicensesBody struct {
    +	Req    *types.QueryAssignedLicenses         `xml:"urn:vim25 QueryAssignedLicenses,omitempty"`
    +	Res    *types.QueryAssignedLicensesResponse `xml:"urn:vim25 QueryAssignedLicensesResponse,omitempty"`
    +	Fault_ *soap.Fault                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryAssignedLicensesBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryAssignedLicenses(ctx context.Context, r soap.RoundTripper, req *types.QueryAssignedLicenses) (*types.QueryAssignedLicensesResponse, error) {
    +	var reqBody, resBody QueryAssignedLicensesBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryAvailableDisksForVmfsBody struct {
    +	Req    *types.QueryAvailableDisksForVmfs         `xml:"urn:vim25 QueryAvailableDisksForVmfs,omitempty"`
    +	Res    *types.QueryAvailableDisksForVmfsResponse `xml:"urn:vim25 QueryAvailableDisksForVmfsResponse,omitempty"`
    +	Fault_ *soap.Fault                               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryAvailableDisksForVmfsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryAvailableDisksForVmfs(ctx context.Context, r soap.RoundTripper, req *types.QueryAvailableDisksForVmfs) (*types.QueryAvailableDisksForVmfsResponse, error) {
    +	var reqBody, resBody QueryAvailableDisksForVmfsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryAvailableDvsSpecBody struct {
    +	Req    *types.QueryAvailableDvsSpec         `xml:"urn:vim25 QueryAvailableDvsSpec,omitempty"`
    +	Res    *types.QueryAvailableDvsSpecResponse `xml:"urn:vim25 QueryAvailableDvsSpecResponse,omitempty"`
    +	Fault_ *soap.Fault                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryAvailableDvsSpecBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryAvailableDvsSpec(ctx context.Context, r soap.RoundTripper, req *types.QueryAvailableDvsSpec) (*types.QueryAvailableDvsSpecResponse, error) {
    +	var reqBody, resBody QueryAvailableDvsSpecBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryAvailablePartitionBody struct {
    +	Req    *types.QueryAvailablePartition         `xml:"urn:vim25 QueryAvailablePartition,omitempty"`
    +	Res    *types.QueryAvailablePartitionResponse `xml:"urn:vim25 QueryAvailablePartitionResponse,omitempty"`
    +	Fault_ *soap.Fault                            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryAvailablePartitionBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryAvailablePartition(ctx context.Context, r soap.RoundTripper, req *types.QueryAvailablePartition) (*types.QueryAvailablePartitionResponse, error) {
    +	var reqBody, resBody QueryAvailablePartitionBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryAvailablePerfMetricBody struct {
    +	Req    *types.QueryAvailablePerfMetric         `xml:"urn:vim25 QueryAvailablePerfMetric,omitempty"`
    +	Res    *types.QueryAvailablePerfMetricResponse `xml:"urn:vim25 QueryAvailablePerfMetricResponse,omitempty"`
    +	Fault_ *soap.Fault                             `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryAvailablePerfMetricBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryAvailablePerfMetric(ctx context.Context, r soap.RoundTripper, req *types.QueryAvailablePerfMetric) (*types.QueryAvailablePerfMetricResponse, error) {
    +	var reqBody, resBody QueryAvailablePerfMetricBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryAvailableSsdsBody struct {
    +	Req    *types.QueryAvailableSsds         `xml:"urn:vim25 QueryAvailableSsds,omitempty"`
    +	Res    *types.QueryAvailableSsdsResponse `xml:"urn:vim25 QueryAvailableSsdsResponse,omitempty"`
    +	Fault_ *soap.Fault                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryAvailableSsdsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryAvailableSsds(ctx context.Context, r soap.RoundTripper, req *types.QueryAvailableSsds) (*types.QueryAvailableSsdsResponse, error) {
    +	var reqBody, resBody QueryAvailableSsdsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryAvailableTimeZonesBody struct {
    +	Req    *types.QueryAvailableTimeZones         `xml:"urn:vim25 QueryAvailableTimeZones,omitempty"`
    +	Res    *types.QueryAvailableTimeZonesResponse `xml:"urn:vim25 QueryAvailableTimeZonesResponse,omitempty"`
    +	Fault_ *soap.Fault                            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryAvailableTimeZonesBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryAvailableTimeZones(ctx context.Context, r soap.RoundTripper, req *types.QueryAvailableTimeZones) (*types.QueryAvailableTimeZonesResponse, error) {
    +	var reqBody, resBody QueryAvailableTimeZonesBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryBootDevicesBody struct {
    +	Req    *types.QueryBootDevices         `xml:"urn:vim25 QueryBootDevices,omitempty"`
    +	Res    *types.QueryBootDevicesResponse `xml:"urn:vim25 QueryBootDevicesResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryBootDevicesBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryBootDevices(ctx context.Context, r soap.RoundTripper, req *types.QueryBootDevices) (*types.QueryBootDevicesResponse, error) {
    +	var reqBody, resBody QueryBootDevicesBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryBoundVnicsBody struct {
    +	Req    *types.QueryBoundVnics         `xml:"urn:vim25 QueryBoundVnics,omitempty"`
    +	Res    *types.QueryBoundVnicsResponse `xml:"urn:vim25 QueryBoundVnicsResponse,omitempty"`
    +	Fault_ *soap.Fault                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryBoundVnicsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryBoundVnics(ctx context.Context, r soap.RoundTripper, req *types.QueryBoundVnics) (*types.QueryBoundVnicsResponse, error) {
    +	var reqBody, resBody QueryBoundVnicsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryCandidateNicsBody struct {
    +	Req    *types.QueryCandidateNics         `xml:"urn:vim25 QueryCandidateNics,omitempty"`
    +	Res    *types.QueryCandidateNicsResponse `xml:"urn:vim25 QueryCandidateNicsResponse,omitempty"`
    +	Fault_ *soap.Fault                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryCandidateNicsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryCandidateNics(ctx context.Context, r soap.RoundTripper, req *types.QueryCandidateNics) (*types.QueryCandidateNicsResponse, error) {
    +	var reqBody, resBody QueryCandidateNicsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryChangedDiskAreasBody struct {
    +	Req    *types.QueryChangedDiskAreas         `xml:"urn:vim25 QueryChangedDiskAreas,omitempty"`
    +	Res    *types.QueryChangedDiskAreasResponse `xml:"urn:vim25 QueryChangedDiskAreasResponse,omitempty"`
    +	Fault_ *soap.Fault                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryChangedDiskAreasBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryChangedDiskAreas(ctx context.Context, r soap.RoundTripper, req *types.QueryChangedDiskAreas) (*types.QueryChangedDiskAreasResponse, error) {
    +	var reqBody, resBody QueryChangedDiskAreasBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryCmmdsBody struct {
    +	Req    *types.QueryCmmds         `xml:"urn:vim25 QueryCmmds,omitempty"`
    +	Res    *types.QueryCmmdsResponse `xml:"urn:vim25 QueryCmmdsResponse,omitempty"`
    +	Fault_ *soap.Fault               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryCmmdsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryCmmds(ctx context.Context, r soap.RoundTripper, req *types.QueryCmmds) (*types.QueryCmmdsResponse, error) {
    +	var reqBody, resBody QueryCmmdsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryCompatibleHostForExistingDvsBody struct {
    +	Req    *types.QueryCompatibleHostForExistingDvs         `xml:"urn:vim25 QueryCompatibleHostForExistingDvs,omitempty"`
    +	Res    *types.QueryCompatibleHostForExistingDvsResponse `xml:"urn:vim25 QueryCompatibleHostForExistingDvsResponse,omitempty"`
    +	Fault_ *soap.Fault                                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryCompatibleHostForExistingDvsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryCompatibleHostForExistingDvs(ctx context.Context, r soap.RoundTripper, req *types.QueryCompatibleHostForExistingDvs) (*types.QueryCompatibleHostForExistingDvsResponse, error) {
    +	var reqBody, resBody QueryCompatibleHostForExistingDvsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryCompatibleHostForNewDvsBody struct {
    +	Req    *types.QueryCompatibleHostForNewDvs         `xml:"urn:vim25 QueryCompatibleHostForNewDvs,omitempty"`
    +	Res    *types.QueryCompatibleHostForNewDvsResponse `xml:"urn:vim25 QueryCompatibleHostForNewDvsResponse,omitempty"`
    +	Fault_ *soap.Fault                                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryCompatibleHostForNewDvsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryCompatibleHostForNewDvs(ctx context.Context, r soap.RoundTripper, req *types.QueryCompatibleHostForNewDvs) (*types.QueryCompatibleHostForNewDvsResponse, error) {
    +	var reqBody, resBody QueryCompatibleHostForNewDvsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryComplianceStatusBody struct {
    +	Req    *types.QueryComplianceStatus         `xml:"urn:vim25 QueryComplianceStatus,omitempty"`
    +	Res    *types.QueryComplianceStatusResponse `xml:"urn:vim25 QueryComplianceStatusResponse,omitempty"`
    +	Fault_ *soap.Fault                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryComplianceStatusBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryComplianceStatus(ctx context.Context, r soap.RoundTripper, req *types.QueryComplianceStatus) (*types.QueryComplianceStatusResponse, error) {
    +	var reqBody, resBody QueryComplianceStatusBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryConfigOptionBody struct {
    +	Req    *types.QueryConfigOption         `xml:"urn:vim25 QueryConfigOption,omitempty"`
    +	Res    *types.QueryConfigOptionResponse `xml:"urn:vim25 QueryConfigOptionResponse,omitempty"`
    +	Fault_ *soap.Fault                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryConfigOptionBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryConfigOption(ctx context.Context, r soap.RoundTripper, req *types.QueryConfigOption) (*types.QueryConfigOptionResponse, error) {
    +	var reqBody, resBody QueryConfigOptionBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryConfigOptionDescriptorBody struct {
    +	Req    *types.QueryConfigOptionDescriptor         `xml:"urn:vim25 QueryConfigOptionDescriptor,omitempty"`
    +	Res    *types.QueryConfigOptionDescriptorResponse `xml:"urn:vim25 QueryConfigOptionDescriptorResponse,omitempty"`
    +	Fault_ *soap.Fault                                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryConfigOptionDescriptorBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryConfigOptionDescriptor(ctx context.Context, r soap.RoundTripper, req *types.QueryConfigOptionDescriptor) (*types.QueryConfigOptionDescriptorResponse, error) {
    +	var reqBody, resBody QueryConfigOptionDescriptorBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryConfigOptionExBody struct {
    +	Req    *types.QueryConfigOptionEx         `xml:"urn:vim25 QueryConfigOptionEx,omitempty"`
    +	Res    *types.QueryConfigOptionExResponse `xml:"urn:vim25 QueryConfigOptionExResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryConfigOptionExBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryConfigOptionEx(ctx context.Context, r soap.RoundTripper, req *types.QueryConfigOptionEx) (*types.QueryConfigOptionExResponse, error) {
    +	var reqBody, resBody QueryConfigOptionExBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryConfigTargetBody struct {
    +	Req    *types.QueryConfigTarget         `xml:"urn:vim25 QueryConfigTarget,omitempty"`
    +	Res    *types.QueryConfigTargetResponse `xml:"urn:vim25 QueryConfigTargetResponse,omitempty"`
    +	Fault_ *soap.Fault                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryConfigTargetBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryConfigTarget(ctx context.Context, r soap.RoundTripper, req *types.QueryConfigTarget) (*types.QueryConfigTargetResponse, error) {
    +	var reqBody, resBody QueryConfigTargetBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryConfiguredModuleOptionStringBody struct {
    +	Req    *types.QueryConfiguredModuleOptionString         `xml:"urn:vim25 QueryConfiguredModuleOptionString,omitempty"`
    +	Res    *types.QueryConfiguredModuleOptionStringResponse `xml:"urn:vim25 QueryConfiguredModuleOptionStringResponse,omitempty"`
    +	Fault_ *soap.Fault                                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryConfiguredModuleOptionStringBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryConfiguredModuleOptionString(ctx context.Context, r soap.RoundTripper, req *types.QueryConfiguredModuleOptionString) (*types.QueryConfiguredModuleOptionStringResponse, error) {
    +	var reqBody, resBody QueryConfiguredModuleOptionStringBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryConnectionInfoBody struct {
    +	Req    *types.QueryConnectionInfo         `xml:"urn:vim25 QueryConnectionInfo,omitempty"`
    +	Res    *types.QueryConnectionInfoResponse `xml:"urn:vim25 QueryConnectionInfoResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryConnectionInfoBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryConnectionInfo(ctx context.Context, r soap.RoundTripper, req *types.QueryConnectionInfo) (*types.QueryConnectionInfoResponse, error) {
    +	var reqBody, resBody QueryConnectionInfoBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryConnectionInfoViaSpecBody struct {
    +	Req    *types.QueryConnectionInfoViaSpec         `xml:"urn:vim25 QueryConnectionInfoViaSpec,omitempty"`
    +	Res    *types.QueryConnectionInfoViaSpecResponse `xml:"urn:vim25 QueryConnectionInfoViaSpecResponse,omitempty"`
    +	Fault_ *soap.Fault                               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryConnectionInfoViaSpecBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryConnectionInfoViaSpec(ctx context.Context, r soap.RoundTripper, req *types.QueryConnectionInfoViaSpec) (*types.QueryConnectionInfoViaSpecResponse, error) {
    +	var reqBody, resBody QueryConnectionInfoViaSpecBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryDatastorePerformanceSummaryBody struct {
    +	Req    *types.QueryDatastorePerformanceSummary         `xml:"urn:vim25 QueryDatastorePerformanceSummary,omitempty"`
    +	Res    *types.QueryDatastorePerformanceSummaryResponse `xml:"urn:vim25 QueryDatastorePerformanceSummaryResponse,omitempty"`
    +	Fault_ *soap.Fault                                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryDatastorePerformanceSummaryBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryDatastorePerformanceSummary(ctx context.Context, r soap.RoundTripper, req *types.QueryDatastorePerformanceSummary) (*types.QueryDatastorePerformanceSummaryResponse, error) {
    +	var reqBody, resBody QueryDatastorePerformanceSummaryBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryDateTimeBody struct {
    +	Req    *types.QueryDateTime         `xml:"urn:vim25 QueryDateTime,omitempty"`
    +	Res    *types.QueryDateTimeResponse `xml:"urn:vim25 QueryDateTimeResponse,omitempty"`
    +	Fault_ *soap.Fault                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryDateTimeBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryDateTime(ctx context.Context, r soap.RoundTripper, req *types.QueryDateTime) (*types.QueryDateTimeResponse, error) {
    +	var reqBody, resBody QueryDateTimeBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryDescriptionsBody struct {
    +	Req    *types.QueryDescriptions         `xml:"urn:vim25 QueryDescriptions,omitempty"`
    +	Res    *types.QueryDescriptionsResponse `xml:"urn:vim25 QueryDescriptionsResponse,omitempty"`
    +	Fault_ *soap.Fault                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryDescriptionsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryDescriptions(ctx context.Context, r soap.RoundTripper, req *types.QueryDescriptions) (*types.QueryDescriptionsResponse, error) {
    +	var reqBody, resBody QueryDescriptionsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryDisksForVsanBody struct {
    +	Req    *types.QueryDisksForVsan         `xml:"urn:vim25 QueryDisksForVsan,omitempty"`
    +	Res    *types.QueryDisksForVsanResponse `xml:"urn:vim25 QueryDisksForVsanResponse,omitempty"`
    +	Fault_ *soap.Fault                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryDisksForVsanBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryDisksForVsan(ctx context.Context, r soap.RoundTripper, req *types.QueryDisksForVsan) (*types.QueryDisksForVsanResponse, error) {
    +	var reqBody, resBody QueryDisksForVsanBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryDisksUsingFilterBody struct {
    +	Req    *types.QueryDisksUsingFilter         `xml:"urn:vim25 QueryDisksUsingFilter,omitempty"`
    +	Res    *types.QueryDisksUsingFilterResponse `xml:"urn:vim25 QueryDisksUsingFilterResponse,omitempty"`
    +	Fault_ *soap.Fault                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryDisksUsingFilterBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryDisksUsingFilter(ctx context.Context, r soap.RoundTripper, req *types.QueryDisksUsingFilter) (*types.QueryDisksUsingFilterResponse, error) {
    +	var reqBody, resBody QueryDisksUsingFilterBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryDvsByUuidBody struct {
    +	Req    *types.QueryDvsByUuid         `xml:"urn:vim25 QueryDvsByUuid,omitempty"`
    +	Res    *types.QueryDvsByUuidResponse `xml:"urn:vim25 QueryDvsByUuidResponse,omitempty"`
    +	Fault_ *soap.Fault                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryDvsByUuidBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryDvsByUuid(ctx context.Context, r soap.RoundTripper, req *types.QueryDvsByUuid) (*types.QueryDvsByUuidResponse, error) {
    +	var reqBody, resBody QueryDvsByUuidBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryDvsCheckCompatibilityBody struct {
    +	Req    *types.QueryDvsCheckCompatibility         `xml:"urn:vim25 QueryDvsCheckCompatibility,omitempty"`
    +	Res    *types.QueryDvsCheckCompatibilityResponse `xml:"urn:vim25 QueryDvsCheckCompatibilityResponse,omitempty"`
    +	Fault_ *soap.Fault                               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryDvsCheckCompatibilityBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryDvsCheckCompatibility(ctx context.Context, r soap.RoundTripper, req *types.QueryDvsCheckCompatibility) (*types.QueryDvsCheckCompatibilityResponse, error) {
    +	var reqBody, resBody QueryDvsCheckCompatibilityBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryDvsCompatibleHostSpecBody struct {
    +	Req    *types.QueryDvsCompatibleHostSpec         `xml:"urn:vim25 QueryDvsCompatibleHostSpec,omitempty"`
    +	Res    *types.QueryDvsCompatibleHostSpecResponse `xml:"urn:vim25 QueryDvsCompatibleHostSpecResponse,omitempty"`
    +	Fault_ *soap.Fault                               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryDvsCompatibleHostSpecBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryDvsCompatibleHostSpec(ctx context.Context, r soap.RoundTripper, req *types.QueryDvsCompatibleHostSpec) (*types.QueryDvsCompatibleHostSpecResponse, error) {
    +	var reqBody, resBody QueryDvsCompatibleHostSpecBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryDvsConfigTargetBody struct {
    +	Req    *types.QueryDvsConfigTarget         `xml:"urn:vim25 QueryDvsConfigTarget,omitempty"`
    +	Res    *types.QueryDvsConfigTargetResponse `xml:"urn:vim25 QueryDvsConfigTargetResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryDvsConfigTargetBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryDvsConfigTarget(ctx context.Context, r soap.RoundTripper, req *types.QueryDvsConfigTarget) (*types.QueryDvsConfigTargetResponse, error) {
    +	var reqBody, resBody QueryDvsConfigTargetBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryDvsFeatureCapabilityBody struct {
    +	Req    *types.QueryDvsFeatureCapability         `xml:"urn:vim25 QueryDvsFeatureCapability,omitempty"`
    +	Res    *types.QueryDvsFeatureCapabilityResponse `xml:"urn:vim25 QueryDvsFeatureCapabilityResponse,omitempty"`
    +	Fault_ *soap.Fault                              `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryDvsFeatureCapabilityBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryDvsFeatureCapability(ctx context.Context, r soap.RoundTripper, req *types.QueryDvsFeatureCapability) (*types.QueryDvsFeatureCapabilityResponse, error) {
    +	var reqBody, resBody QueryDvsFeatureCapabilityBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryEventsBody struct {
    +	Req    *types.QueryEvents         `xml:"urn:vim25 QueryEvents,omitempty"`
    +	Res    *types.QueryEventsResponse `xml:"urn:vim25 QueryEventsResponse,omitempty"`
    +	Fault_ *soap.Fault                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryEventsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryEvents(ctx context.Context, r soap.RoundTripper, req *types.QueryEvents) (*types.QueryEventsResponse, error) {
    +	var reqBody, resBody QueryEventsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryExpressionMetadataBody struct {
    +	Req    *types.QueryExpressionMetadata         `xml:"urn:vim25 QueryExpressionMetadata,omitempty"`
    +	Res    *types.QueryExpressionMetadataResponse `xml:"urn:vim25 QueryExpressionMetadataResponse,omitempty"`
    +	Fault_ *soap.Fault                            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryExpressionMetadataBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryExpressionMetadata(ctx context.Context, r soap.RoundTripper, req *types.QueryExpressionMetadata) (*types.QueryExpressionMetadataResponse, error) {
    +	var reqBody, resBody QueryExpressionMetadataBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryExtensionIpAllocationUsageBody struct {
    +	Req    *types.QueryExtensionIpAllocationUsage         `xml:"urn:vim25 QueryExtensionIpAllocationUsage,omitempty"`
    +	Res    *types.QueryExtensionIpAllocationUsageResponse `xml:"urn:vim25 QueryExtensionIpAllocationUsageResponse,omitempty"`
    +	Fault_ *soap.Fault                                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryExtensionIpAllocationUsageBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryExtensionIpAllocationUsage(ctx context.Context, r soap.RoundTripper, req *types.QueryExtensionIpAllocationUsage) (*types.QueryExtensionIpAllocationUsageResponse, error) {
    +	var reqBody, resBody QueryExtensionIpAllocationUsageBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryFaultToleranceCompatibilityBody struct {
    +	Req    *types.QueryFaultToleranceCompatibility         `xml:"urn:vim25 QueryFaultToleranceCompatibility,omitempty"`
    +	Res    *types.QueryFaultToleranceCompatibilityResponse `xml:"urn:vim25 QueryFaultToleranceCompatibilityResponse,omitempty"`
    +	Fault_ *soap.Fault                                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryFaultToleranceCompatibilityBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryFaultToleranceCompatibility(ctx context.Context, r soap.RoundTripper, req *types.QueryFaultToleranceCompatibility) (*types.QueryFaultToleranceCompatibilityResponse, error) {
    +	var reqBody, resBody QueryFaultToleranceCompatibilityBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryFaultToleranceCompatibilityExBody struct {
    +	Req    *types.QueryFaultToleranceCompatibilityEx         `xml:"urn:vim25 QueryFaultToleranceCompatibilityEx,omitempty"`
    +	Res    *types.QueryFaultToleranceCompatibilityExResponse `xml:"urn:vim25 QueryFaultToleranceCompatibilityExResponse,omitempty"`
    +	Fault_ *soap.Fault                                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryFaultToleranceCompatibilityExBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryFaultToleranceCompatibilityEx(ctx context.Context, r soap.RoundTripper, req *types.QueryFaultToleranceCompatibilityEx) (*types.QueryFaultToleranceCompatibilityExResponse, error) {
    +	var reqBody, resBody QueryFaultToleranceCompatibilityExBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryFilterEntitiesBody struct {
    +	Req    *types.QueryFilterEntities         `xml:"urn:vim25 QueryFilterEntities,omitempty"`
    +	Res    *types.QueryFilterEntitiesResponse `xml:"urn:vim25 QueryFilterEntitiesResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryFilterEntitiesBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryFilterEntities(ctx context.Context, r soap.RoundTripper, req *types.QueryFilterEntities) (*types.QueryFilterEntitiesResponse, error) {
    +	var reqBody, resBody QueryFilterEntitiesBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryFilterInfoIdsBody struct {
    +	Req    *types.QueryFilterInfoIds         `xml:"urn:vim25 QueryFilterInfoIds,omitempty"`
    +	Res    *types.QueryFilterInfoIdsResponse `xml:"urn:vim25 QueryFilterInfoIdsResponse,omitempty"`
    +	Fault_ *soap.Fault                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryFilterInfoIdsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryFilterInfoIds(ctx context.Context, r soap.RoundTripper, req *types.QueryFilterInfoIds) (*types.QueryFilterInfoIdsResponse, error) {
    +	var reqBody, resBody QueryFilterInfoIdsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryFilterListBody struct {
    +	Req    *types.QueryFilterList         `xml:"urn:vim25 QueryFilterList,omitempty"`
    +	Res    *types.QueryFilterListResponse `xml:"urn:vim25 QueryFilterListResponse,omitempty"`
    +	Fault_ *soap.Fault                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryFilterListBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryFilterList(ctx context.Context, r soap.RoundTripper, req *types.QueryFilterList) (*types.QueryFilterListResponse, error) {
    +	var reqBody, resBody QueryFilterListBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryFilterNameBody struct {
    +	Req    *types.QueryFilterName         `xml:"urn:vim25 QueryFilterName,omitempty"`
    +	Res    *types.QueryFilterNameResponse `xml:"urn:vim25 QueryFilterNameResponse,omitempty"`
    +	Fault_ *soap.Fault                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryFilterNameBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryFilterName(ctx context.Context, r soap.RoundTripper, req *types.QueryFilterName) (*types.QueryFilterNameResponse, error) {
    +	var reqBody, resBody QueryFilterNameBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryFirmwareConfigUploadURLBody struct {
    +	Req    *types.QueryFirmwareConfigUploadURL         `xml:"urn:vim25 QueryFirmwareConfigUploadURL,omitempty"`
    +	Res    *types.QueryFirmwareConfigUploadURLResponse `xml:"urn:vim25 QueryFirmwareConfigUploadURLResponse,omitempty"`
    +	Fault_ *soap.Fault                                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryFirmwareConfigUploadURLBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryFirmwareConfigUploadURL(ctx context.Context, r soap.RoundTripper, req *types.QueryFirmwareConfigUploadURL) (*types.QueryFirmwareConfigUploadURLResponse, error) {
    +	var reqBody, resBody QueryFirmwareConfigUploadURLBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryHealthUpdateInfosBody struct {
    +	Req    *types.QueryHealthUpdateInfos         `xml:"urn:vim25 QueryHealthUpdateInfos,omitempty"`
    +	Res    *types.QueryHealthUpdateInfosResponse `xml:"urn:vim25 QueryHealthUpdateInfosResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryHealthUpdateInfosBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryHealthUpdateInfos(ctx context.Context, r soap.RoundTripper, req *types.QueryHealthUpdateInfos) (*types.QueryHealthUpdateInfosResponse, error) {
    +	var reqBody, resBody QueryHealthUpdateInfosBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryHealthUpdatesBody struct {
    +	Req    *types.QueryHealthUpdates         `xml:"urn:vim25 QueryHealthUpdates,omitempty"`
    +	Res    *types.QueryHealthUpdatesResponse `xml:"urn:vim25 QueryHealthUpdatesResponse,omitempty"`
    +	Fault_ *soap.Fault                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryHealthUpdatesBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryHealthUpdates(ctx context.Context, r soap.RoundTripper, req *types.QueryHealthUpdates) (*types.QueryHealthUpdatesResponse, error) {
    +	var reqBody, resBody QueryHealthUpdatesBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryHostConnectionInfoBody struct {
    +	Req    *types.QueryHostConnectionInfo         `xml:"urn:vim25 QueryHostConnectionInfo,omitempty"`
    +	Res    *types.QueryHostConnectionInfoResponse `xml:"urn:vim25 QueryHostConnectionInfoResponse,omitempty"`
    +	Fault_ *soap.Fault                            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryHostConnectionInfoBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryHostConnectionInfo(ctx context.Context, r soap.RoundTripper, req *types.QueryHostConnectionInfo) (*types.QueryHostConnectionInfoResponse, error) {
    +	var reqBody, resBody QueryHostConnectionInfoBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryHostPatch_TaskBody struct {
    +	Req    *types.QueryHostPatch_Task         `xml:"urn:vim25 QueryHostPatch_Task,omitempty"`
    +	Res    *types.QueryHostPatch_TaskResponse `xml:"urn:vim25 QueryHostPatch_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryHostPatch_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryHostPatch_Task(ctx context.Context, r soap.RoundTripper, req *types.QueryHostPatch_Task) (*types.QueryHostPatch_TaskResponse, error) {
    +	var reqBody, resBody QueryHostPatch_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryHostProfileMetadataBody struct {
    +	Req    *types.QueryHostProfileMetadata         `xml:"urn:vim25 QueryHostProfileMetadata,omitempty"`
    +	Res    *types.QueryHostProfileMetadataResponse `xml:"urn:vim25 QueryHostProfileMetadataResponse,omitempty"`
    +	Fault_ *soap.Fault                             `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryHostProfileMetadataBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryHostProfileMetadata(ctx context.Context, r soap.RoundTripper, req *types.QueryHostProfileMetadata) (*types.QueryHostProfileMetadataResponse, error) {
    +	var reqBody, resBody QueryHostProfileMetadataBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryHostStatusBody struct {
    +	Req    *types.QueryHostStatus         `xml:"urn:vim25 QueryHostStatus,omitempty"`
    +	Res    *types.QueryHostStatusResponse `xml:"urn:vim25 QueryHostStatusResponse,omitempty"`
    +	Fault_ *soap.Fault                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryHostStatusBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryHostStatus(ctx context.Context, r soap.RoundTripper, req *types.QueryHostStatus) (*types.QueryHostStatusResponse, error) {
    +	var reqBody, resBody QueryHostStatusBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryIORMConfigOptionBody struct {
    +	Req    *types.QueryIORMConfigOption         `xml:"urn:vim25 QueryIORMConfigOption,omitempty"`
    +	Res    *types.QueryIORMConfigOptionResponse `xml:"urn:vim25 QueryIORMConfigOptionResponse,omitempty"`
    +	Fault_ *soap.Fault                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryIORMConfigOptionBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryIORMConfigOption(ctx context.Context, r soap.RoundTripper, req *types.QueryIORMConfigOption) (*types.QueryIORMConfigOptionResponse, error) {
    +	var reqBody, resBody QueryIORMConfigOptionBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryIPAllocationsBody struct {
    +	Req    *types.QueryIPAllocations         `xml:"urn:vim25 QueryIPAllocations,omitempty"`
    +	Res    *types.QueryIPAllocationsResponse `xml:"urn:vim25 QueryIPAllocationsResponse,omitempty"`
    +	Fault_ *soap.Fault                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryIPAllocationsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryIPAllocations(ctx context.Context, r soap.RoundTripper, req *types.QueryIPAllocations) (*types.QueryIPAllocationsResponse, error) {
    +	var reqBody, resBody QueryIPAllocationsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryIoFilterInfoBody struct {
    +	Req    *types.QueryIoFilterInfo         `xml:"urn:vim25 QueryIoFilterInfo,omitempty"`
    +	Res    *types.QueryIoFilterInfoResponse `xml:"urn:vim25 QueryIoFilterInfoResponse,omitempty"`
    +	Fault_ *soap.Fault                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryIoFilterInfoBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryIoFilterInfo(ctx context.Context, r soap.RoundTripper, req *types.QueryIoFilterInfo) (*types.QueryIoFilterInfoResponse, error) {
    +	var reqBody, resBody QueryIoFilterInfoBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryIoFilterIssuesBody struct {
    +	Req    *types.QueryIoFilterIssues         `xml:"urn:vim25 QueryIoFilterIssues,omitempty"`
    +	Res    *types.QueryIoFilterIssuesResponse `xml:"urn:vim25 QueryIoFilterIssuesResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryIoFilterIssuesBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryIoFilterIssues(ctx context.Context, r soap.RoundTripper, req *types.QueryIoFilterIssues) (*types.QueryIoFilterIssuesResponse, error) {
    +	var reqBody, resBody QueryIoFilterIssuesBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryIpPoolsBody struct {
    +	Req    *types.QueryIpPools         `xml:"urn:vim25 QueryIpPools,omitempty"`
    +	Res    *types.QueryIpPoolsResponse `xml:"urn:vim25 QueryIpPoolsResponse,omitempty"`
    +	Fault_ *soap.Fault                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryIpPoolsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryIpPools(ctx context.Context, r soap.RoundTripper, req *types.QueryIpPools) (*types.QueryIpPoolsResponse, error) {
    +	var reqBody, resBody QueryIpPoolsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryLicenseSourceAvailabilityBody struct {
    +	Req    *types.QueryLicenseSourceAvailability         `xml:"urn:vim25 QueryLicenseSourceAvailability,omitempty"`
    +	Res    *types.QueryLicenseSourceAvailabilityResponse `xml:"urn:vim25 QueryLicenseSourceAvailabilityResponse,omitempty"`
    +	Fault_ *soap.Fault                                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryLicenseSourceAvailabilityBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryLicenseSourceAvailability(ctx context.Context, r soap.RoundTripper, req *types.QueryLicenseSourceAvailability) (*types.QueryLicenseSourceAvailabilityResponse, error) {
    +	var reqBody, resBody QueryLicenseSourceAvailabilityBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryLicenseUsageBody struct {
    +	Req    *types.QueryLicenseUsage         `xml:"urn:vim25 QueryLicenseUsage,omitempty"`
    +	Res    *types.QueryLicenseUsageResponse `xml:"urn:vim25 QueryLicenseUsageResponse,omitempty"`
    +	Fault_ *soap.Fault                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryLicenseUsageBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryLicenseUsage(ctx context.Context, r soap.RoundTripper, req *types.QueryLicenseUsage) (*types.QueryLicenseUsageResponse, error) {
    +	var reqBody, resBody QueryLicenseUsageBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryLockdownExceptionsBody struct {
    +	Req    *types.QueryLockdownExceptions         `xml:"urn:vim25 QueryLockdownExceptions,omitempty"`
    +	Res    *types.QueryLockdownExceptionsResponse `xml:"urn:vim25 QueryLockdownExceptionsResponse,omitempty"`
    +	Fault_ *soap.Fault                            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryLockdownExceptionsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryLockdownExceptions(ctx context.Context, r soap.RoundTripper, req *types.QueryLockdownExceptions) (*types.QueryLockdownExceptionsResponse, error) {
    +	var reqBody, resBody QueryLockdownExceptionsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryManagedByBody struct {
    +	Req    *types.QueryManagedBy         `xml:"urn:vim25 QueryManagedBy,omitempty"`
    +	Res    *types.QueryManagedByResponse `xml:"urn:vim25 QueryManagedByResponse,omitempty"`
    +	Fault_ *soap.Fault                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryManagedByBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryManagedBy(ctx context.Context, r soap.RoundTripper, req *types.QueryManagedBy) (*types.QueryManagedByResponse, error) {
    +	var reqBody, resBody QueryManagedByBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryMemoryOverheadBody struct {
    +	Req    *types.QueryMemoryOverhead         `xml:"urn:vim25 QueryMemoryOverhead,omitempty"`
    +	Res    *types.QueryMemoryOverheadResponse `xml:"urn:vim25 QueryMemoryOverheadResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryMemoryOverheadBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryMemoryOverhead(ctx context.Context, r soap.RoundTripper, req *types.QueryMemoryOverhead) (*types.QueryMemoryOverheadResponse, error) {
    +	var reqBody, resBody QueryMemoryOverheadBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryMemoryOverheadExBody struct {
    +	Req    *types.QueryMemoryOverheadEx         `xml:"urn:vim25 QueryMemoryOverheadEx,omitempty"`
    +	Res    *types.QueryMemoryOverheadExResponse `xml:"urn:vim25 QueryMemoryOverheadExResponse,omitempty"`
    +	Fault_ *soap.Fault                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryMemoryOverheadExBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryMemoryOverheadEx(ctx context.Context, r soap.RoundTripper, req *types.QueryMemoryOverheadEx) (*types.QueryMemoryOverheadExResponse, error) {
    +	var reqBody, resBody QueryMemoryOverheadExBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryMigrationDependenciesBody struct {
    +	Req    *types.QueryMigrationDependencies         `xml:"urn:vim25 QueryMigrationDependencies,omitempty"`
    +	Res    *types.QueryMigrationDependenciesResponse `xml:"urn:vim25 QueryMigrationDependenciesResponse,omitempty"`
    +	Fault_ *soap.Fault                               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryMigrationDependenciesBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryMigrationDependencies(ctx context.Context, r soap.RoundTripper, req *types.QueryMigrationDependencies) (*types.QueryMigrationDependenciesResponse, error) {
    +	var reqBody, resBody QueryMigrationDependenciesBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryModulesBody struct {
    +	Req    *types.QueryModules         `xml:"urn:vim25 QueryModules,omitempty"`
    +	Res    *types.QueryModulesResponse `xml:"urn:vim25 QueryModulesResponse,omitempty"`
    +	Fault_ *soap.Fault                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryModulesBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryModules(ctx context.Context, r soap.RoundTripper, req *types.QueryModules) (*types.QueryModulesResponse, error) {
    +	var reqBody, resBody QueryModulesBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryMonitoredEntitiesBody struct {
    +	Req    *types.QueryMonitoredEntities         `xml:"urn:vim25 QueryMonitoredEntities,omitempty"`
    +	Res    *types.QueryMonitoredEntitiesResponse `xml:"urn:vim25 QueryMonitoredEntitiesResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryMonitoredEntitiesBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryMonitoredEntities(ctx context.Context, r soap.RoundTripper, req *types.QueryMonitoredEntities) (*types.QueryMonitoredEntitiesResponse, error) {
    +	var reqBody, resBody QueryMonitoredEntitiesBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryNFSUserBody struct {
    +	Req    *types.QueryNFSUser         `xml:"urn:vim25 QueryNFSUser,omitempty"`
    +	Res    *types.QueryNFSUserResponse `xml:"urn:vim25 QueryNFSUserResponse,omitempty"`
    +	Fault_ *soap.Fault                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryNFSUserBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryNFSUser(ctx context.Context, r soap.RoundTripper, req *types.QueryNFSUser) (*types.QueryNFSUserResponse, error) {
    +	var reqBody, resBody QueryNFSUserBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryNetConfigBody struct {
    +	Req    *types.QueryNetConfig         `xml:"urn:vim25 QueryNetConfig,omitempty"`
    +	Res    *types.QueryNetConfigResponse `xml:"urn:vim25 QueryNetConfigResponse,omitempty"`
    +	Fault_ *soap.Fault                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryNetConfigBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryNetConfig(ctx context.Context, r soap.RoundTripper, req *types.QueryNetConfig) (*types.QueryNetConfigResponse, error) {
    +	var reqBody, resBody QueryNetConfigBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryNetworkHintBody struct {
    +	Req    *types.QueryNetworkHint         `xml:"urn:vim25 QueryNetworkHint,omitempty"`
    +	Res    *types.QueryNetworkHintResponse `xml:"urn:vim25 QueryNetworkHintResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryNetworkHintBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryNetworkHint(ctx context.Context, r soap.RoundTripper, req *types.QueryNetworkHint) (*types.QueryNetworkHintResponse, error) {
    +	var reqBody, resBody QueryNetworkHintBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryObjectsOnPhysicalVsanDiskBody struct {
    +	Req    *types.QueryObjectsOnPhysicalVsanDisk         `xml:"urn:vim25 QueryObjectsOnPhysicalVsanDisk,omitempty"`
    +	Res    *types.QueryObjectsOnPhysicalVsanDiskResponse `xml:"urn:vim25 QueryObjectsOnPhysicalVsanDiskResponse,omitempty"`
    +	Fault_ *soap.Fault                                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryObjectsOnPhysicalVsanDiskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryObjectsOnPhysicalVsanDisk(ctx context.Context, r soap.RoundTripper, req *types.QueryObjectsOnPhysicalVsanDisk) (*types.QueryObjectsOnPhysicalVsanDiskResponse, error) {
    +	var reqBody, resBody QueryObjectsOnPhysicalVsanDiskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryOptionsBody struct {
    +	Req    *types.QueryOptions         `xml:"urn:vim25 QueryOptions,omitempty"`
    +	Res    *types.QueryOptionsResponse `xml:"urn:vim25 QueryOptionsResponse,omitempty"`
    +	Fault_ *soap.Fault                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryOptionsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryOptions(ctx context.Context, r soap.RoundTripper, req *types.QueryOptions) (*types.QueryOptionsResponse, error) {
    +	var reqBody, resBody QueryOptionsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryPartitionCreateDescBody struct {
    +	Req    *types.QueryPartitionCreateDesc         `xml:"urn:vim25 QueryPartitionCreateDesc,omitempty"`
    +	Res    *types.QueryPartitionCreateDescResponse `xml:"urn:vim25 QueryPartitionCreateDescResponse,omitempty"`
    +	Fault_ *soap.Fault                             `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryPartitionCreateDescBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryPartitionCreateDesc(ctx context.Context, r soap.RoundTripper, req *types.QueryPartitionCreateDesc) (*types.QueryPartitionCreateDescResponse, error) {
    +	var reqBody, resBody QueryPartitionCreateDescBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryPartitionCreateOptionsBody struct {
    +	Req    *types.QueryPartitionCreateOptions         `xml:"urn:vim25 QueryPartitionCreateOptions,omitempty"`
    +	Res    *types.QueryPartitionCreateOptionsResponse `xml:"urn:vim25 QueryPartitionCreateOptionsResponse,omitempty"`
    +	Fault_ *soap.Fault                                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryPartitionCreateOptionsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryPartitionCreateOptions(ctx context.Context, r soap.RoundTripper, req *types.QueryPartitionCreateOptions) (*types.QueryPartitionCreateOptionsResponse, error) {
    +	var reqBody, resBody QueryPartitionCreateOptionsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryPathSelectionPolicyOptionsBody struct {
    +	Req    *types.QueryPathSelectionPolicyOptions         `xml:"urn:vim25 QueryPathSelectionPolicyOptions,omitempty"`
    +	Res    *types.QueryPathSelectionPolicyOptionsResponse `xml:"urn:vim25 QueryPathSelectionPolicyOptionsResponse,omitempty"`
    +	Fault_ *soap.Fault                                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryPathSelectionPolicyOptionsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryPathSelectionPolicyOptions(ctx context.Context, r soap.RoundTripper, req *types.QueryPathSelectionPolicyOptions) (*types.QueryPathSelectionPolicyOptionsResponse, error) {
    +	var reqBody, resBody QueryPathSelectionPolicyOptionsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryPerfBody struct {
    +	Req    *types.QueryPerf         `xml:"urn:vim25 QueryPerf,omitempty"`
    +	Res    *types.QueryPerfResponse `xml:"urn:vim25 QueryPerfResponse,omitempty"`
    +	Fault_ *soap.Fault              `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryPerfBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryPerf(ctx context.Context, r soap.RoundTripper, req *types.QueryPerf) (*types.QueryPerfResponse, error) {
    +	var reqBody, resBody QueryPerfBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryPerfCompositeBody struct {
    +	Req    *types.QueryPerfComposite         `xml:"urn:vim25 QueryPerfComposite,omitempty"`
    +	Res    *types.QueryPerfCompositeResponse `xml:"urn:vim25 QueryPerfCompositeResponse,omitempty"`
    +	Fault_ *soap.Fault                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryPerfCompositeBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryPerfComposite(ctx context.Context, r soap.RoundTripper, req *types.QueryPerfComposite) (*types.QueryPerfCompositeResponse, error) {
    +	var reqBody, resBody QueryPerfCompositeBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryPerfCounterBody struct {
    +	Req    *types.QueryPerfCounter         `xml:"urn:vim25 QueryPerfCounter,omitempty"`
    +	Res    *types.QueryPerfCounterResponse `xml:"urn:vim25 QueryPerfCounterResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryPerfCounterBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryPerfCounter(ctx context.Context, r soap.RoundTripper, req *types.QueryPerfCounter) (*types.QueryPerfCounterResponse, error) {
    +	var reqBody, resBody QueryPerfCounterBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryPerfCounterByLevelBody struct {
    +	Req    *types.QueryPerfCounterByLevel         `xml:"urn:vim25 QueryPerfCounterByLevel,omitempty"`
    +	Res    *types.QueryPerfCounterByLevelResponse `xml:"urn:vim25 QueryPerfCounterByLevelResponse,omitempty"`
    +	Fault_ *soap.Fault                            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryPerfCounterByLevelBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryPerfCounterByLevel(ctx context.Context, r soap.RoundTripper, req *types.QueryPerfCounterByLevel) (*types.QueryPerfCounterByLevelResponse, error) {
    +	var reqBody, resBody QueryPerfCounterByLevelBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryPerfProviderSummaryBody struct {
    +	Req    *types.QueryPerfProviderSummary         `xml:"urn:vim25 QueryPerfProviderSummary,omitempty"`
    +	Res    *types.QueryPerfProviderSummaryResponse `xml:"urn:vim25 QueryPerfProviderSummaryResponse,omitempty"`
    +	Fault_ *soap.Fault                             `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryPerfProviderSummaryBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryPerfProviderSummary(ctx context.Context, r soap.RoundTripper, req *types.QueryPerfProviderSummary) (*types.QueryPerfProviderSummaryResponse, error) {
    +	var reqBody, resBody QueryPerfProviderSummaryBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryPhysicalVsanDisksBody struct {
    +	Req    *types.QueryPhysicalVsanDisks         `xml:"urn:vim25 QueryPhysicalVsanDisks,omitempty"`
    +	Res    *types.QueryPhysicalVsanDisksResponse `xml:"urn:vim25 QueryPhysicalVsanDisksResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryPhysicalVsanDisksBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryPhysicalVsanDisks(ctx context.Context, r soap.RoundTripper, req *types.QueryPhysicalVsanDisks) (*types.QueryPhysicalVsanDisksResponse, error) {
    +	var reqBody, resBody QueryPhysicalVsanDisksBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryPnicStatusBody struct {
    +	Req    *types.QueryPnicStatus         `xml:"urn:vim25 QueryPnicStatus,omitempty"`
    +	Res    *types.QueryPnicStatusResponse `xml:"urn:vim25 QueryPnicStatusResponse,omitempty"`
    +	Fault_ *soap.Fault                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryPnicStatusBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryPnicStatus(ctx context.Context, r soap.RoundTripper, req *types.QueryPnicStatus) (*types.QueryPnicStatusResponse, error) {
    +	var reqBody, resBody QueryPnicStatusBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryPolicyMetadataBody struct {
    +	Req    *types.QueryPolicyMetadata         `xml:"urn:vim25 QueryPolicyMetadata,omitempty"`
    +	Res    *types.QueryPolicyMetadataResponse `xml:"urn:vim25 QueryPolicyMetadataResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryPolicyMetadataBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryPolicyMetadata(ctx context.Context, r soap.RoundTripper, req *types.QueryPolicyMetadata) (*types.QueryPolicyMetadataResponse, error) {
    +	var reqBody, resBody QueryPolicyMetadataBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryProfileStructureBody struct {
    +	Req    *types.QueryProfileStructure         `xml:"urn:vim25 QueryProfileStructure,omitempty"`
    +	Res    *types.QueryProfileStructureResponse `xml:"urn:vim25 QueryProfileStructureResponse,omitempty"`
    +	Fault_ *soap.Fault                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryProfileStructureBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryProfileStructure(ctx context.Context, r soap.RoundTripper, req *types.QueryProfileStructure) (*types.QueryProfileStructureResponse, error) {
    +	var reqBody, resBody QueryProfileStructureBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryProviderListBody struct {
    +	Req    *types.QueryProviderList         `xml:"urn:vim25 QueryProviderList,omitempty"`
    +	Res    *types.QueryProviderListResponse `xml:"urn:vim25 QueryProviderListResponse,omitempty"`
    +	Fault_ *soap.Fault                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryProviderListBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryProviderList(ctx context.Context, r soap.RoundTripper, req *types.QueryProviderList) (*types.QueryProviderListResponse, error) {
    +	var reqBody, resBody QueryProviderListBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryProviderNameBody struct {
    +	Req    *types.QueryProviderName         `xml:"urn:vim25 QueryProviderName,omitempty"`
    +	Res    *types.QueryProviderNameResponse `xml:"urn:vim25 QueryProviderNameResponse,omitempty"`
    +	Fault_ *soap.Fault                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryProviderNameBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryProviderName(ctx context.Context, r soap.RoundTripper, req *types.QueryProviderName) (*types.QueryProviderNameResponse, error) {
    +	var reqBody, resBody QueryProviderNameBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryResourceConfigOptionBody struct {
    +	Req    *types.QueryResourceConfigOption         `xml:"urn:vim25 QueryResourceConfigOption,omitempty"`
    +	Res    *types.QueryResourceConfigOptionResponse `xml:"urn:vim25 QueryResourceConfigOptionResponse,omitempty"`
    +	Fault_ *soap.Fault                              `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryResourceConfigOptionBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryResourceConfigOption(ctx context.Context, r soap.RoundTripper, req *types.QueryResourceConfigOption) (*types.QueryResourceConfigOptionResponse, error) {
    +	var reqBody, resBody QueryResourceConfigOptionBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryServiceListBody struct {
    +	Req    *types.QueryServiceList         `xml:"urn:vim25 QueryServiceList,omitempty"`
    +	Res    *types.QueryServiceListResponse `xml:"urn:vim25 QueryServiceListResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryServiceListBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryServiceList(ctx context.Context, r soap.RoundTripper, req *types.QueryServiceList) (*types.QueryServiceListResponse, error) {
    +	var reqBody, resBody QueryServiceListBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryStorageArrayTypePolicyOptionsBody struct {
    +	Req    *types.QueryStorageArrayTypePolicyOptions         `xml:"urn:vim25 QueryStorageArrayTypePolicyOptions,omitempty"`
    +	Res    *types.QueryStorageArrayTypePolicyOptionsResponse `xml:"urn:vim25 QueryStorageArrayTypePolicyOptionsResponse,omitempty"`
    +	Fault_ *soap.Fault                                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryStorageArrayTypePolicyOptionsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryStorageArrayTypePolicyOptions(ctx context.Context, r soap.RoundTripper, req *types.QueryStorageArrayTypePolicyOptions) (*types.QueryStorageArrayTypePolicyOptionsResponse, error) {
    +	var reqBody, resBody QueryStorageArrayTypePolicyOptionsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QuerySupportedFeaturesBody struct {
    +	Req    *types.QuerySupportedFeatures         `xml:"urn:vim25 QuerySupportedFeatures,omitempty"`
    +	Res    *types.QuerySupportedFeaturesResponse `xml:"urn:vim25 QuerySupportedFeaturesResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QuerySupportedFeaturesBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QuerySupportedFeatures(ctx context.Context, r soap.RoundTripper, req *types.QuerySupportedFeatures) (*types.QuerySupportedFeaturesResponse, error) {
    +	var reqBody, resBody QuerySupportedFeaturesBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QuerySyncingVsanObjectsBody struct {
    +	Req    *types.QuerySyncingVsanObjects         `xml:"urn:vim25 QuerySyncingVsanObjects,omitempty"`
    +	Res    *types.QuerySyncingVsanObjectsResponse `xml:"urn:vim25 QuerySyncingVsanObjectsResponse,omitempty"`
    +	Fault_ *soap.Fault                            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QuerySyncingVsanObjectsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QuerySyncingVsanObjects(ctx context.Context, r soap.RoundTripper, req *types.QuerySyncingVsanObjects) (*types.QuerySyncingVsanObjectsResponse, error) {
    +	var reqBody, resBody QuerySyncingVsanObjectsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QuerySystemUsersBody struct {
    +	Req    *types.QuerySystemUsers         `xml:"urn:vim25 QuerySystemUsers,omitempty"`
    +	Res    *types.QuerySystemUsersResponse `xml:"urn:vim25 QuerySystemUsersResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QuerySystemUsersBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QuerySystemUsers(ctx context.Context, r soap.RoundTripper, req *types.QuerySystemUsers) (*types.QuerySystemUsersResponse, error) {
    +	var reqBody, resBody QuerySystemUsersBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryTargetCapabilitiesBody struct {
    +	Req    *types.QueryTargetCapabilities         `xml:"urn:vim25 QueryTargetCapabilities,omitempty"`
    +	Res    *types.QueryTargetCapabilitiesResponse `xml:"urn:vim25 QueryTargetCapabilitiesResponse,omitempty"`
    +	Fault_ *soap.Fault                            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryTargetCapabilitiesBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryTargetCapabilities(ctx context.Context, r soap.RoundTripper, req *types.QueryTargetCapabilities) (*types.QueryTargetCapabilitiesResponse, error) {
    +	var reqBody, resBody QueryTargetCapabilitiesBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryTpmAttestationReportBody struct {
    +	Req    *types.QueryTpmAttestationReport         `xml:"urn:vim25 QueryTpmAttestationReport,omitempty"`
    +	Res    *types.QueryTpmAttestationReportResponse `xml:"urn:vim25 QueryTpmAttestationReportResponse,omitempty"`
    +	Fault_ *soap.Fault                              `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryTpmAttestationReportBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryTpmAttestationReport(ctx context.Context, r soap.RoundTripper, req *types.QueryTpmAttestationReport) (*types.QueryTpmAttestationReportResponse, error) {
    +	var reqBody, resBody QueryTpmAttestationReportBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryUnmonitoredHostsBody struct {
    +	Req    *types.QueryUnmonitoredHosts         `xml:"urn:vim25 QueryUnmonitoredHosts,omitempty"`
    +	Res    *types.QueryUnmonitoredHostsResponse `xml:"urn:vim25 QueryUnmonitoredHostsResponse,omitempty"`
    +	Fault_ *soap.Fault                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryUnmonitoredHostsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryUnmonitoredHosts(ctx context.Context, r soap.RoundTripper, req *types.QueryUnmonitoredHosts) (*types.QueryUnmonitoredHostsResponse, error) {
    +	var reqBody, resBody QueryUnmonitoredHostsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryUnownedFilesBody struct {
    +	Req    *types.QueryUnownedFiles         `xml:"urn:vim25 QueryUnownedFiles,omitempty"`
    +	Res    *types.QueryUnownedFilesResponse `xml:"urn:vim25 QueryUnownedFilesResponse,omitempty"`
    +	Fault_ *soap.Fault                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryUnownedFilesBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryUnownedFiles(ctx context.Context, r soap.RoundTripper, req *types.QueryUnownedFiles) (*types.QueryUnownedFilesResponse, error) {
    +	var reqBody, resBody QueryUnownedFilesBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryUnresolvedVmfsVolumeBody struct {
    +	Req    *types.QueryUnresolvedVmfsVolume         `xml:"urn:vim25 QueryUnresolvedVmfsVolume,omitempty"`
    +	Res    *types.QueryUnresolvedVmfsVolumeResponse `xml:"urn:vim25 QueryUnresolvedVmfsVolumeResponse,omitempty"`
    +	Fault_ *soap.Fault                              `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryUnresolvedVmfsVolumeBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryUnresolvedVmfsVolume(ctx context.Context, r soap.RoundTripper, req *types.QueryUnresolvedVmfsVolume) (*types.QueryUnresolvedVmfsVolumeResponse, error) {
    +	var reqBody, resBody QueryUnresolvedVmfsVolumeBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryUnresolvedVmfsVolumesBody struct {
    +	Req    *types.QueryUnresolvedVmfsVolumes         `xml:"urn:vim25 QueryUnresolvedVmfsVolumes,omitempty"`
    +	Res    *types.QueryUnresolvedVmfsVolumesResponse `xml:"urn:vim25 QueryUnresolvedVmfsVolumesResponse,omitempty"`
    +	Fault_ *soap.Fault                               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryUnresolvedVmfsVolumesBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryUnresolvedVmfsVolumes(ctx context.Context, r soap.RoundTripper, req *types.QueryUnresolvedVmfsVolumes) (*types.QueryUnresolvedVmfsVolumesResponse, error) {
    +	var reqBody, resBody QueryUnresolvedVmfsVolumesBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryUsedVlanIdInDvsBody struct {
    +	Req    *types.QueryUsedVlanIdInDvs         `xml:"urn:vim25 QueryUsedVlanIdInDvs,omitempty"`
    +	Res    *types.QueryUsedVlanIdInDvsResponse `xml:"urn:vim25 QueryUsedVlanIdInDvsResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryUsedVlanIdInDvsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryUsedVlanIdInDvs(ctx context.Context, r soap.RoundTripper, req *types.QueryUsedVlanIdInDvs) (*types.QueryUsedVlanIdInDvsResponse, error) {
    +	var reqBody, resBody QueryUsedVlanIdInDvsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryVMotionCompatibilityBody struct {
    +	Req    *types.QueryVMotionCompatibility         `xml:"urn:vim25 QueryVMotionCompatibility,omitempty"`
    +	Res    *types.QueryVMotionCompatibilityResponse `xml:"urn:vim25 QueryVMotionCompatibilityResponse,omitempty"`
    +	Fault_ *soap.Fault                              `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryVMotionCompatibilityBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryVMotionCompatibility(ctx context.Context, r soap.RoundTripper, req *types.QueryVMotionCompatibility) (*types.QueryVMotionCompatibilityResponse, error) {
    +	var reqBody, resBody QueryVMotionCompatibilityBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryVMotionCompatibilityEx_TaskBody struct {
    +	Req    *types.QueryVMotionCompatibilityEx_Task         `xml:"urn:vim25 QueryVMotionCompatibilityEx_Task,omitempty"`
    +	Res    *types.QueryVMotionCompatibilityEx_TaskResponse `xml:"urn:vim25 QueryVMotionCompatibilityEx_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryVMotionCompatibilityEx_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryVMotionCompatibilityEx_Task(ctx context.Context, r soap.RoundTripper, req *types.QueryVMotionCompatibilityEx_Task) (*types.QueryVMotionCompatibilityEx_TaskResponse, error) {
    +	var reqBody, resBody QueryVMotionCompatibilityEx_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryVirtualDiskFragmentationBody struct {
    +	Req    *types.QueryVirtualDiskFragmentation         `xml:"urn:vim25 QueryVirtualDiskFragmentation,omitempty"`
    +	Res    *types.QueryVirtualDiskFragmentationResponse `xml:"urn:vim25 QueryVirtualDiskFragmentationResponse,omitempty"`
    +	Fault_ *soap.Fault                                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryVirtualDiskFragmentationBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryVirtualDiskFragmentation(ctx context.Context, r soap.RoundTripper, req *types.QueryVirtualDiskFragmentation) (*types.QueryVirtualDiskFragmentationResponse, error) {
    +	var reqBody, resBody QueryVirtualDiskFragmentationBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryVirtualDiskGeometryBody struct {
    +	Req    *types.QueryVirtualDiskGeometry         `xml:"urn:vim25 QueryVirtualDiskGeometry,omitempty"`
    +	Res    *types.QueryVirtualDiskGeometryResponse `xml:"urn:vim25 QueryVirtualDiskGeometryResponse,omitempty"`
    +	Fault_ *soap.Fault                             `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryVirtualDiskGeometryBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryVirtualDiskGeometry(ctx context.Context, r soap.RoundTripper, req *types.QueryVirtualDiskGeometry) (*types.QueryVirtualDiskGeometryResponse, error) {
    +	var reqBody, resBody QueryVirtualDiskGeometryBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryVirtualDiskUuidBody struct {
    +	Req    *types.QueryVirtualDiskUuid         `xml:"urn:vim25 QueryVirtualDiskUuid,omitempty"`
    +	Res    *types.QueryVirtualDiskUuidResponse `xml:"urn:vim25 QueryVirtualDiskUuidResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryVirtualDiskUuidBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryVirtualDiskUuid(ctx context.Context, r soap.RoundTripper, req *types.QueryVirtualDiskUuid) (*types.QueryVirtualDiskUuidResponse, error) {
    +	var reqBody, resBody QueryVirtualDiskUuidBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryVmfsConfigOptionBody struct {
    +	Req    *types.QueryVmfsConfigOption         `xml:"urn:vim25 QueryVmfsConfigOption,omitempty"`
    +	Res    *types.QueryVmfsConfigOptionResponse `xml:"urn:vim25 QueryVmfsConfigOptionResponse,omitempty"`
    +	Fault_ *soap.Fault                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryVmfsConfigOptionBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryVmfsConfigOption(ctx context.Context, r soap.RoundTripper, req *types.QueryVmfsConfigOption) (*types.QueryVmfsConfigOptionResponse, error) {
    +	var reqBody, resBody QueryVmfsConfigOptionBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryVmfsDatastoreCreateOptionsBody struct {
    +	Req    *types.QueryVmfsDatastoreCreateOptions         `xml:"urn:vim25 QueryVmfsDatastoreCreateOptions,omitempty"`
    +	Res    *types.QueryVmfsDatastoreCreateOptionsResponse `xml:"urn:vim25 QueryVmfsDatastoreCreateOptionsResponse,omitempty"`
    +	Fault_ *soap.Fault                                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryVmfsDatastoreCreateOptionsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryVmfsDatastoreCreateOptions(ctx context.Context, r soap.RoundTripper, req *types.QueryVmfsDatastoreCreateOptions) (*types.QueryVmfsDatastoreCreateOptionsResponse, error) {
    +	var reqBody, resBody QueryVmfsDatastoreCreateOptionsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryVmfsDatastoreExpandOptionsBody struct {
    +	Req    *types.QueryVmfsDatastoreExpandOptions         `xml:"urn:vim25 QueryVmfsDatastoreExpandOptions,omitempty"`
    +	Res    *types.QueryVmfsDatastoreExpandOptionsResponse `xml:"urn:vim25 QueryVmfsDatastoreExpandOptionsResponse,omitempty"`
    +	Fault_ *soap.Fault                                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryVmfsDatastoreExpandOptionsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryVmfsDatastoreExpandOptions(ctx context.Context, r soap.RoundTripper, req *types.QueryVmfsDatastoreExpandOptions) (*types.QueryVmfsDatastoreExpandOptionsResponse, error) {
    +	var reqBody, resBody QueryVmfsDatastoreExpandOptionsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryVmfsDatastoreExtendOptionsBody struct {
    +	Req    *types.QueryVmfsDatastoreExtendOptions         `xml:"urn:vim25 QueryVmfsDatastoreExtendOptions,omitempty"`
    +	Res    *types.QueryVmfsDatastoreExtendOptionsResponse `xml:"urn:vim25 QueryVmfsDatastoreExtendOptionsResponse,omitempty"`
    +	Fault_ *soap.Fault                                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryVmfsDatastoreExtendOptionsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryVmfsDatastoreExtendOptions(ctx context.Context, r soap.RoundTripper, req *types.QueryVmfsDatastoreExtendOptions) (*types.QueryVmfsDatastoreExtendOptionsResponse, error) {
    +	var reqBody, resBody QueryVmfsDatastoreExtendOptionsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryVnicStatusBody struct {
    +	Req    *types.QueryVnicStatus         `xml:"urn:vim25 QueryVnicStatus,omitempty"`
    +	Res    *types.QueryVnicStatusResponse `xml:"urn:vim25 QueryVnicStatusResponse,omitempty"`
    +	Fault_ *soap.Fault                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryVnicStatusBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryVnicStatus(ctx context.Context, r soap.RoundTripper, req *types.QueryVnicStatus) (*types.QueryVnicStatusResponse, error) {
    +	var reqBody, resBody QueryVnicStatusBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryVsanObjectUuidsByFilterBody struct {
    +	Req    *types.QueryVsanObjectUuidsByFilter         `xml:"urn:vim25 QueryVsanObjectUuidsByFilter,omitempty"`
    +	Res    *types.QueryVsanObjectUuidsByFilterResponse `xml:"urn:vim25 QueryVsanObjectUuidsByFilterResponse,omitempty"`
    +	Fault_ *soap.Fault                                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryVsanObjectUuidsByFilterBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryVsanObjectUuidsByFilter(ctx context.Context, r soap.RoundTripper, req *types.QueryVsanObjectUuidsByFilter) (*types.QueryVsanObjectUuidsByFilterResponse, error) {
    +	var reqBody, resBody QueryVsanObjectUuidsByFilterBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryVsanObjectsBody struct {
    +	Req    *types.QueryVsanObjects         `xml:"urn:vim25 QueryVsanObjects,omitempty"`
    +	Res    *types.QueryVsanObjectsResponse `xml:"urn:vim25 QueryVsanObjectsResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryVsanObjectsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryVsanObjects(ctx context.Context, r soap.RoundTripper, req *types.QueryVsanObjects) (*types.QueryVsanObjectsResponse, error) {
    +	var reqBody, resBody QueryVsanObjectsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryVsanStatisticsBody struct {
    +	Req    *types.QueryVsanStatistics         `xml:"urn:vim25 QueryVsanStatistics,omitempty"`
    +	Res    *types.QueryVsanStatisticsResponse `xml:"urn:vim25 QueryVsanStatisticsResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryVsanStatisticsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryVsanStatistics(ctx context.Context, r soap.RoundTripper, req *types.QueryVsanStatistics) (*types.QueryVsanStatisticsResponse, error) {
    +	var reqBody, resBody QueryVsanStatisticsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryVsanUpgradeStatusBody struct {
    +	Req    *types.QueryVsanUpgradeStatus         `xml:"urn:vim25 QueryVsanUpgradeStatus,omitempty"`
    +	Res    *types.QueryVsanUpgradeStatusResponse `xml:"urn:vim25 QueryVsanUpgradeStatusResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryVsanUpgradeStatusBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryVsanUpgradeStatus(ctx context.Context, r soap.RoundTripper, req *types.QueryVsanUpgradeStatus) (*types.QueryVsanUpgradeStatusResponse, error) {
    +	var reqBody, resBody QueryVsanUpgradeStatusBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ReadEnvironmentVariableInGuestBody struct {
    +	Req    *types.ReadEnvironmentVariableInGuest         `xml:"urn:vim25 ReadEnvironmentVariableInGuest,omitempty"`
    +	Res    *types.ReadEnvironmentVariableInGuestResponse `xml:"urn:vim25 ReadEnvironmentVariableInGuestResponse,omitempty"`
    +	Fault_ *soap.Fault                                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ReadEnvironmentVariableInGuestBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ReadEnvironmentVariableInGuest(ctx context.Context, r soap.RoundTripper, req *types.ReadEnvironmentVariableInGuest) (*types.ReadEnvironmentVariableInGuestResponse, error) {
    +	var reqBody, resBody ReadEnvironmentVariableInGuestBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ReadNextEventsBody struct {
    +	Req    *types.ReadNextEvents         `xml:"urn:vim25 ReadNextEvents,omitempty"`
    +	Res    *types.ReadNextEventsResponse `xml:"urn:vim25 ReadNextEventsResponse,omitempty"`
    +	Fault_ *soap.Fault                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ReadNextEventsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ReadNextEvents(ctx context.Context, r soap.RoundTripper, req *types.ReadNextEvents) (*types.ReadNextEventsResponse, error) {
    +	var reqBody, resBody ReadNextEventsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ReadNextTasksBody struct {
    +	Req    *types.ReadNextTasks         `xml:"urn:vim25 ReadNextTasks,omitempty"`
    +	Res    *types.ReadNextTasksResponse `xml:"urn:vim25 ReadNextTasksResponse,omitempty"`
    +	Fault_ *soap.Fault                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ReadNextTasksBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ReadNextTasks(ctx context.Context, r soap.RoundTripper, req *types.ReadNextTasks) (*types.ReadNextTasksResponse, error) {
    +	var reqBody, resBody ReadNextTasksBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ReadPreviousEventsBody struct {
    +	Req    *types.ReadPreviousEvents         `xml:"urn:vim25 ReadPreviousEvents,omitempty"`
    +	Res    *types.ReadPreviousEventsResponse `xml:"urn:vim25 ReadPreviousEventsResponse,omitempty"`
    +	Fault_ *soap.Fault                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ReadPreviousEventsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ReadPreviousEvents(ctx context.Context, r soap.RoundTripper, req *types.ReadPreviousEvents) (*types.ReadPreviousEventsResponse, error) {
    +	var reqBody, resBody ReadPreviousEventsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ReadPreviousTasksBody struct {
    +	Req    *types.ReadPreviousTasks         `xml:"urn:vim25 ReadPreviousTasks,omitempty"`
    +	Res    *types.ReadPreviousTasksResponse `xml:"urn:vim25 ReadPreviousTasksResponse,omitempty"`
    +	Fault_ *soap.Fault                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ReadPreviousTasksBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ReadPreviousTasks(ctx context.Context, r soap.RoundTripper, req *types.ReadPreviousTasks) (*types.ReadPreviousTasksResponse, error) {
    +	var reqBody, resBody ReadPreviousTasksBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RebootGuestBody struct {
    +	Req    *types.RebootGuest         `xml:"urn:vim25 RebootGuest,omitempty"`
    +	Res    *types.RebootGuestResponse `xml:"urn:vim25 RebootGuestResponse,omitempty"`
    +	Fault_ *soap.Fault                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RebootGuestBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RebootGuest(ctx context.Context, r soap.RoundTripper, req *types.RebootGuest) (*types.RebootGuestResponse, error) {
    +	var reqBody, resBody RebootGuestBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RebootHost_TaskBody struct {
    +	Req    *types.RebootHost_Task         `xml:"urn:vim25 RebootHost_Task,omitempty"`
    +	Res    *types.RebootHost_TaskResponse `xml:"urn:vim25 RebootHost_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RebootHost_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RebootHost_Task(ctx context.Context, r soap.RoundTripper, req *types.RebootHost_Task) (*types.RebootHost_TaskResponse, error) {
    +	var reqBody, resBody RebootHost_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RecommendDatastoresBody struct {
    +	Req    *types.RecommendDatastores         `xml:"urn:vim25 RecommendDatastores,omitempty"`
    +	Res    *types.RecommendDatastoresResponse `xml:"urn:vim25 RecommendDatastoresResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RecommendDatastoresBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RecommendDatastores(ctx context.Context, r soap.RoundTripper, req *types.RecommendDatastores) (*types.RecommendDatastoresResponse, error) {
    +	var reqBody, resBody RecommendDatastoresBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RecommendHostsForVmBody struct {
    +	Req    *types.RecommendHostsForVm         `xml:"urn:vim25 RecommendHostsForVm,omitempty"`
    +	Res    *types.RecommendHostsForVmResponse `xml:"urn:vim25 RecommendHostsForVmResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RecommendHostsForVmBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RecommendHostsForVm(ctx context.Context, r soap.RoundTripper, req *types.RecommendHostsForVm) (*types.RecommendHostsForVmResponse, error) {
    +	var reqBody, resBody RecommendHostsForVmBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RecommissionVsanNode_TaskBody struct {
    +	Req    *types.RecommissionVsanNode_Task         `xml:"urn:vim25 RecommissionVsanNode_Task,omitempty"`
    +	Res    *types.RecommissionVsanNode_TaskResponse `xml:"urn:vim25 RecommissionVsanNode_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                              `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RecommissionVsanNode_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RecommissionVsanNode_Task(ctx context.Context, r soap.RoundTripper, req *types.RecommissionVsanNode_Task) (*types.RecommissionVsanNode_TaskResponse, error) {
    +	var reqBody, resBody RecommissionVsanNode_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ReconcileDatastoreInventory_TaskBody struct {
    +	Req    *types.ReconcileDatastoreInventory_Task         `xml:"urn:vim25 ReconcileDatastoreInventory_Task,omitempty"`
    +	Res    *types.ReconcileDatastoreInventory_TaskResponse `xml:"urn:vim25 ReconcileDatastoreInventory_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ReconcileDatastoreInventory_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ReconcileDatastoreInventory_Task(ctx context.Context, r soap.RoundTripper, req *types.ReconcileDatastoreInventory_Task) (*types.ReconcileDatastoreInventory_TaskResponse, error) {
    +	var reqBody, resBody ReconcileDatastoreInventory_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ReconfigVM_TaskBody struct {
    +	Req    *types.ReconfigVM_Task         `xml:"urn:vim25 ReconfigVM_Task,omitempty"`
    +	Res    *types.ReconfigVM_TaskResponse `xml:"urn:vim25 ReconfigVM_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ReconfigVM_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ReconfigVM_Task(ctx context.Context, r soap.RoundTripper, req *types.ReconfigVM_Task) (*types.ReconfigVM_TaskResponse, error) {
    +	var reqBody, resBody ReconfigVM_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ReconfigurationSatisfiableBody struct {
    +	Req    *types.ReconfigurationSatisfiable         `xml:"urn:vim25 ReconfigurationSatisfiable,omitempty"`
    +	Res    *types.ReconfigurationSatisfiableResponse `xml:"urn:vim25 ReconfigurationSatisfiableResponse,omitempty"`
    +	Fault_ *soap.Fault                               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ReconfigurationSatisfiableBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ReconfigurationSatisfiable(ctx context.Context, r soap.RoundTripper, req *types.ReconfigurationSatisfiable) (*types.ReconfigurationSatisfiableResponse, error) {
    +	var reqBody, resBody ReconfigurationSatisfiableBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ReconfigureAlarmBody struct {
    +	Req    *types.ReconfigureAlarm         `xml:"urn:vim25 ReconfigureAlarm,omitempty"`
    +	Res    *types.ReconfigureAlarmResponse `xml:"urn:vim25 ReconfigureAlarmResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ReconfigureAlarmBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ReconfigureAlarm(ctx context.Context, r soap.RoundTripper, req *types.ReconfigureAlarm) (*types.ReconfigureAlarmResponse, error) {
    +	var reqBody, resBody ReconfigureAlarmBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ReconfigureAutostartBody struct {
    +	Req    *types.ReconfigureAutostart         `xml:"urn:vim25 ReconfigureAutostart,omitempty"`
    +	Res    *types.ReconfigureAutostartResponse `xml:"urn:vim25 ReconfigureAutostartResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ReconfigureAutostartBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ReconfigureAutostart(ctx context.Context, r soap.RoundTripper, req *types.ReconfigureAutostart) (*types.ReconfigureAutostartResponse, error) {
    +	var reqBody, resBody ReconfigureAutostartBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ReconfigureCluster_TaskBody struct {
    +	Req    *types.ReconfigureCluster_Task         `xml:"urn:vim25 ReconfigureCluster_Task,omitempty"`
    +	Res    *types.ReconfigureCluster_TaskResponse `xml:"urn:vim25 ReconfigureCluster_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ReconfigureCluster_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ReconfigureCluster_Task(ctx context.Context, r soap.RoundTripper, req *types.ReconfigureCluster_Task) (*types.ReconfigureCluster_TaskResponse, error) {
    +	var reqBody, resBody ReconfigureCluster_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ReconfigureComputeResource_TaskBody struct {
    +	Req    *types.ReconfigureComputeResource_Task         `xml:"urn:vim25 ReconfigureComputeResource_Task,omitempty"`
    +	Res    *types.ReconfigureComputeResource_TaskResponse `xml:"urn:vim25 ReconfigureComputeResource_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ReconfigureComputeResource_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ReconfigureComputeResource_Task(ctx context.Context, r soap.RoundTripper, req *types.ReconfigureComputeResource_Task) (*types.ReconfigureComputeResource_TaskResponse, error) {
    +	var reqBody, resBody ReconfigureComputeResource_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ReconfigureDVPort_TaskBody struct {
    +	Req    *types.ReconfigureDVPort_Task         `xml:"urn:vim25 ReconfigureDVPort_Task,omitempty"`
    +	Res    *types.ReconfigureDVPort_TaskResponse `xml:"urn:vim25 ReconfigureDVPort_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ReconfigureDVPort_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ReconfigureDVPort_Task(ctx context.Context, r soap.RoundTripper, req *types.ReconfigureDVPort_Task) (*types.ReconfigureDVPort_TaskResponse, error) {
    +	var reqBody, resBody ReconfigureDVPort_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ReconfigureDVPortgroup_TaskBody struct {
    +	Req    *types.ReconfigureDVPortgroup_Task         `xml:"urn:vim25 ReconfigureDVPortgroup_Task,omitempty"`
    +	Res    *types.ReconfigureDVPortgroup_TaskResponse `xml:"urn:vim25 ReconfigureDVPortgroup_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ReconfigureDVPortgroup_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ReconfigureDVPortgroup_Task(ctx context.Context, r soap.RoundTripper, req *types.ReconfigureDVPortgroup_Task) (*types.ReconfigureDVPortgroup_TaskResponse, error) {
    +	var reqBody, resBody ReconfigureDVPortgroup_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ReconfigureDatacenter_TaskBody struct {
    +	Req    *types.ReconfigureDatacenter_Task         `xml:"urn:vim25 ReconfigureDatacenter_Task,omitempty"`
    +	Res    *types.ReconfigureDatacenter_TaskResponse `xml:"urn:vim25 ReconfigureDatacenter_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ReconfigureDatacenter_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ReconfigureDatacenter_Task(ctx context.Context, r soap.RoundTripper, req *types.ReconfigureDatacenter_Task) (*types.ReconfigureDatacenter_TaskResponse, error) {
    +	var reqBody, resBody ReconfigureDatacenter_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ReconfigureDomObjectBody struct {
    +	Req    *types.ReconfigureDomObject         `xml:"urn:vim25 ReconfigureDomObject,omitempty"`
    +	Res    *types.ReconfigureDomObjectResponse `xml:"urn:vim25 ReconfigureDomObjectResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ReconfigureDomObjectBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ReconfigureDomObject(ctx context.Context, r soap.RoundTripper, req *types.ReconfigureDomObject) (*types.ReconfigureDomObjectResponse, error) {
    +	var reqBody, resBody ReconfigureDomObjectBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ReconfigureDvs_TaskBody struct {
    +	Req    *types.ReconfigureDvs_Task         `xml:"urn:vim25 ReconfigureDvs_Task,omitempty"`
    +	Res    *types.ReconfigureDvs_TaskResponse `xml:"urn:vim25 ReconfigureDvs_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ReconfigureDvs_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ReconfigureDvs_Task(ctx context.Context, r soap.RoundTripper, req *types.ReconfigureDvs_Task) (*types.ReconfigureDvs_TaskResponse, error) {
    +	var reqBody, resBody ReconfigureDvs_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ReconfigureHostForDAS_TaskBody struct {
    +	Req    *types.ReconfigureHostForDAS_Task         `xml:"urn:vim25 ReconfigureHostForDAS_Task,omitempty"`
    +	Res    *types.ReconfigureHostForDAS_TaskResponse `xml:"urn:vim25 ReconfigureHostForDAS_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ReconfigureHostForDAS_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ReconfigureHostForDAS_Task(ctx context.Context, r soap.RoundTripper, req *types.ReconfigureHostForDAS_Task) (*types.ReconfigureHostForDAS_TaskResponse, error) {
    +	var reqBody, resBody ReconfigureHostForDAS_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ReconfigureScheduledTaskBody struct {
    +	Req    *types.ReconfigureScheduledTask         `xml:"urn:vim25 ReconfigureScheduledTask,omitempty"`
    +	Res    *types.ReconfigureScheduledTaskResponse `xml:"urn:vim25 ReconfigureScheduledTaskResponse,omitempty"`
    +	Fault_ *soap.Fault                             `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ReconfigureScheduledTaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ReconfigureScheduledTask(ctx context.Context, r soap.RoundTripper, req *types.ReconfigureScheduledTask) (*types.ReconfigureScheduledTaskResponse, error) {
    +	var reqBody, resBody ReconfigureScheduledTaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ReconfigureServiceConsoleReservationBody struct {
    +	Req    *types.ReconfigureServiceConsoleReservation         `xml:"urn:vim25 ReconfigureServiceConsoleReservation,omitempty"`
    +	Res    *types.ReconfigureServiceConsoleReservationResponse `xml:"urn:vim25 ReconfigureServiceConsoleReservationResponse,omitempty"`
    +	Fault_ *soap.Fault                                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ReconfigureServiceConsoleReservationBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ReconfigureServiceConsoleReservation(ctx context.Context, r soap.RoundTripper, req *types.ReconfigureServiceConsoleReservation) (*types.ReconfigureServiceConsoleReservationResponse, error) {
    +	var reqBody, resBody ReconfigureServiceConsoleReservationBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ReconfigureSnmpAgentBody struct {
    +	Req    *types.ReconfigureSnmpAgent         `xml:"urn:vim25 ReconfigureSnmpAgent,omitempty"`
    +	Res    *types.ReconfigureSnmpAgentResponse `xml:"urn:vim25 ReconfigureSnmpAgentResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ReconfigureSnmpAgentBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ReconfigureSnmpAgent(ctx context.Context, r soap.RoundTripper, req *types.ReconfigureSnmpAgent) (*types.ReconfigureSnmpAgentResponse, error) {
    +	var reqBody, resBody ReconfigureSnmpAgentBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ReconfigureVirtualMachineReservationBody struct {
    +	Req    *types.ReconfigureVirtualMachineReservation         `xml:"urn:vim25 ReconfigureVirtualMachineReservation,omitempty"`
    +	Res    *types.ReconfigureVirtualMachineReservationResponse `xml:"urn:vim25 ReconfigureVirtualMachineReservationResponse,omitempty"`
    +	Fault_ *soap.Fault                                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ReconfigureVirtualMachineReservationBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ReconfigureVirtualMachineReservation(ctx context.Context, r soap.RoundTripper, req *types.ReconfigureVirtualMachineReservation) (*types.ReconfigureVirtualMachineReservationResponse, error) {
    +	var reqBody, resBody ReconfigureVirtualMachineReservationBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ReconnectHost_TaskBody struct {
    +	Req    *types.ReconnectHost_Task         `xml:"urn:vim25 ReconnectHost_Task,omitempty"`
    +	Res    *types.ReconnectHost_TaskResponse `xml:"urn:vim25 ReconnectHost_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ReconnectHost_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ReconnectHost_Task(ctx context.Context, r soap.RoundTripper, req *types.ReconnectHost_Task) (*types.ReconnectHost_TaskResponse, error) {
    +	var reqBody, resBody ReconnectHost_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RectifyDvsHost_TaskBody struct {
    +	Req    *types.RectifyDvsHost_Task         `xml:"urn:vim25 RectifyDvsHost_Task,omitempty"`
    +	Res    *types.RectifyDvsHost_TaskResponse `xml:"urn:vim25 RectifyDvsHost_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RectifyDvsHost_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RectifyDvsHost_Task(ctx context.Context, r soap.RoundTripper, req *types.RectifyDvsHost_Task) (*types.RectifyDvsHost_TaskResponse, error) {
    +	var reqBody, resBody RectifyDvsHost_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RectifyDvsOnHost_TaskBody struct {
    +	Req    *types.RectifyDvsOnHost_Task         `xml:"urn:vim25 RectifyDvsOnHost_Task,omitempty"`
    +	Res    *types.RectifyDvsOnHost_TaskResponse `xml:"urn:vim25 RectifyDvsOnHost_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RectifyDvsOnHost_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RectifyDvsOnHost_Task(ctx context.Context, r soap.RoundTripper, req *types.RectifyDvsOnHost_Task) (*types.RectifyDvsOnHost_TaskResponse, error) {
    +	var reqBody, resBody RectifyDvsOnHost_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RefreshBody struct {
    +	Req    *types.Refresh         `xml:"urn:vim25 Refresh,omitempty"`
    +	Res    *types.RefreshResponse `xml:"urn:vim25 RefreshResponse,omitempty"`
    +	Fault_ *soap.Fault            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RefreshBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func Refresh(ctx context.Context, r soap.RoundTripper, req *types.Refresh) (*types.RefreshResponse, error) {
    +	var reqBody, resBody RefreshBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RefreshDVPortStateBody struct {
    +	Req    *types.RefreshDVPortState         `xml:"urn:vim25 RefreshDVPortState,omitempty"`
    +	Res    *types.RefreshDVPortStateResponse `xml:"urn:vim25 RefreshDVPortStateResponse,omitempty"`
    +	Fault_ *soap.Fault                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RefreshDVPortStateBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RefreshDVPortState(ctx context.Context, r soap.RoundTripper, req *types.RefreshDVPortState) (*types.RefreshDVPortStateResponse, error) {
    +	var reqBody, resBody RefreshDVPortStateBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RefreshDatastoreBody struct {
    +	Req    *types.RefreshDatastore         `xml:"urn:vim25 RefreshDatastore,omitempty"`
    +	Res    *types.RefreshDatastoreResponse `xml:"urn:vim25 RefreshDatastoreResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RefreshDatastoreBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RefreshDatastore(ctx context.Context, r soap.RoundTripper, req *types.RefreshDatastore) (*types.RefreshDatastoreResponse, error) {
    +	var reqBody, resBody RefreshDatastoreBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RefreshDatastoreStorageInfoBody struct {
    +	Req    *types.RefreshDatastoreStorageInfo         `xml:"urn:vim25 RefreshDatastoreStorageInfo,omitempty"`
    +	Res    *types.RefreshDatastoreStorageInfoResponse `xml:"urn:vim25 RefreshDatastoreStorageInfoResponse,omitempty"`
    +	Fault_ *soap.Fault                                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RefreshDatastoreStorageInfoBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RefreshDatastoreStorageInfo(ctx context.Context, r soap.RoundTripper, req *types.RefreshDatastoreStorageInfo) (*types.RefreshDatastoreStorageInfoResponse, error) {
    +	var reqBody, resBody RefreshDatastoreStorageInfoBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RefreshDateTimeSystemBody struct {
    +	Req    *types.RefreshDateTimeSystem         `xml:"urn:vim25 RefreshDateTimeSystem,omitempty"`
    +	Res    *types.RefreshDateTimeSystemResponse `xml:"urn:vim25 RefreshDateTimeSystemResponse,omitempty"`
    +	Fault_ *soap.Fault                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RefreshDateTimeSystemBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RefreshDateTimeSystem(ctx context.Context, r soap.RoundTripper, req *types.RefreshDateTimeSystem) (*types.RefreshDateTimeSystemResponse, error) {
    +	var reqBody, resBody RefreshDateTimeSystemBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RefreshFirewallBody struct {
    +	Req    *types.RefreshFirewall         `xml:"urn:vim25 RefreshFirewall,omitempty"`
    +	Res    *types.RefreshFirewallResponse `xml:"urn:vim25 RefreshFirewallResponse,omitempty"`
    +	Fault_ *soap.Fault                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RefreshFirewallBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RefreshFirewall(ctx context.Context, r soap.RoundTripper, req *types.RefreshFirewall) (*types.RefreshFirewallResponse, error) {
    +	var reqBody, resBody RefreshFirewallBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RefreshGraphicsManagerBody struct {
    +	Req    *types.RefreshGraphicsManager         `xml:"urn:vim25 RefreshGraphicsManager,omitempty"`
    +	Res    *types.RefreshGraphicsManagerResponse `xml:"urn:vim25 RefreshGraphicsManagerResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RefreshGraphicsManagerBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RefreshGraphicsManager(ctx context.Context, r soap.RoundTripper, req *types.RefreshGraphicsManager) (*types.RefreshGraphicsManagerResponse, error) {
    +	var reqBody, resBody RefreshGraphicsManagerBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RefreshHealthStatusSystemBody struct {
    +	Req    *types.RefreshHealthStatusSystem         `xml:"urn:vim25 RefreshHealthStatusSystem,omitempty"`
    +	Res    *types.RefreshHealthStatusSystemResponse `xml:"urn:vim25 RefreshHealthStatusSystemResponse,omitempty"`
    +	Fault_ *soap.Fault                              `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RefreshHealthStatusSystemBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RefreshHealthStatusSystem(ctx context.Context, r soap.RoundTripper, req *types.RefreshHealthStatusSystem) (*types.RefreshHealthStatusSystemResponse, error) {
    +	var reqBody, resBody RefreshHealthStatusSystemBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RefreshNetworkSystemBody struct {
    +	Req    *types.RefreshNetworkSystem         `xml:"urn:vim25 RefreshNetworkSystem,omitempty"`
    +	Res    *types.RefreshNetworkSystemResponse `xml:"urn:vim25 RefreshNetworkSystemResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RefreshNetworkSystemBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RefreshNetworkSystem(ctx context.Context, r soap.RoundTripper, req *types.RefreshNetworkSystem) (*types.RefreshNetworkSystemResponse, error) {
    +	var reqBody, resBody RefreshNetworkSystemBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RefreshRecommendationBody struct {
    +	Req    *types.RefreshRecommendation         `xml:"urn:vim25 RefreshRecommendation,omitempty"`
    +	Res    *types.RefreshRecommendationResponse `xml:"urn:vim25 RefreshRecommendationResponse,omitempty"`
    +	Fault_ *soap.Fault                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RefreshRecommendationBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RefreshRecommendation(ctx context.Context, r soap.RoundTripper, req *types.RefreshRecommendation) (*types.RefreshRecommendationResponse, error) {
    +	var reqBody, resBody RefreshRecommendationBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RefreshRuntimeBody struct {
    +	Req    *types.RefreshRuntime         `xml:"urn:vim25 RefreshRuntime,omitempty"`
    +	Res    *types.RefreshRuntimeResponse `xml:"urn:vim25 RefreshRuntimeResponse,omitempty"`
    +	Fault_ *soap.Fault                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RefreshRuntimeBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RefreshRuntime(ctx context.Context, r soap.RoundTripper, req *types.RefreshRuntime) (*types.RefreshRuntimeResponse, error) {
    +	var reqBody, resBody RefreshRuntimeBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RefreshServicesBody struct {
    +	Req    *types.RefreshServices         `xml:"urn:vim25 RefreshServices,omitempty"`
    +	Res    *types.RefreshServicesResponse `xml:"urn:vim25 RefreshServicesResponse,omitempty"`
    +	Fault_ *soap.Fault                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RefreshServicesBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RefreshServices(ctx context.Context, r soap.RoundTripper, req *types.RefreshServices) (*types.RefreshServicesResponse, error) {
    +	var reqBody, resBody RefreshServicesBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RefreshStorageDrsRecommendationBody struct {
    +	Req    *types.RefreshStorageDrsRecommendation         `xml:"urn:vim25 RefreshStorageDrsRecommendation,omitempty"`
    +	Res    *types.RefreshStorageDrsRecommendationResponse `xml:"urn:vim25 RefreshStorageDrsRecommendationResponse,omitempty"`
    +	Fault_ *soap.Fault                                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RefreshStorageDrsRecommendationBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RefreshStorageDrsRecommendation(ctx context.Context, r soap.RoundTripper, req *types.RefreshStorageDrsRecommendation) (*types.RefreshStorageDrsRecommendationResponse, error) {
    +	var reqBody, resBody RefreshStorageDrsRecommendationBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RefreshStorageDrsRecommendationsForPod_TaskBody struct {
    +	Req    *types.RefreshStorageDrsRecommendationsForPod_Task         `xml:"urn:vim25 RefreshStorageDrsRecommendationsForPod_Task,omitempty"`
    +	Res    *types.RefreshStorageDrsRecommendationsForPod_TaskResponse `xml:"urn:vim25 RefreshStorageDrsRecommendationsForPod_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RefreshStorageDrsRecommendationsForPod_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RefreshStorageDrsRecommendationsForPod_Task(ctx context.Context, r soap.RoundTripper, req *types.RefreshStorageDrsRecommendationsForPod_Task) (*types.RefreshStorageDrsRecommendationsForPod_TaskResponse, error) {
    +	var reqBody, resBody RefreshStorageDrsRecommendationsForPod_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RefreshStorageInfoBody struct {
    +	Req    *types.RefreshStorageInfo         `xml:"urn:vim25 RefreshStorageInfo,omitempty"`
    +	Res    *types.RefreshStorageInfoResponse `xml:"urn:vim25 RefreshStorageInfoResponse,omitempty"`
    +	Fault_ *soap.Fault                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RefreshStorageInfoBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RefreshStorageInfo(ctx context.Context, r soap.RoundTripper, req *types.RefreshStorageInfo) (*types.RefreshStorageInfoResponse, error) {
    +	var reqBody, resBody RefreshStorageInfoBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RefreshStorageSystemBody struct {
    +	Req    *types.RefreshStorageSystem         `xml:"urn:vim25 RefreshStorageSystem,omitempty"`
    +	Res    *types.RefreshStorageSystemResponse `xml:"urn:vim25 RefreshStorageSystemResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RefreshStorageSystemBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RefreshStorageSystem(ctx context.Context, r soap.RoundTripper, req *types.RefreshStorageSystem) (*types.RefreshStorageSystemResponse, error) {
    +	var reqBody, resBody RefreshStorageSystemBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RegisterChildVM_TaskBody struct {
    +	Req    *types.RegisterChildVM_Task         `xml:"urn:vim25 RegisterChildVM_Task,omitempty"`
    +	Res    *types.RegisterChildVM_TaskResponse `xml:"urn:vim25 RegisterChildVM_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RegisterChildVM_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RegisterChildVM_Task(ctx context.Context, r soap.RoundTripper, req *types.RegisterChildVM_Task) (*types.RegisterChildVM_TaskResponse, error) {
    +	var reqBody, resBody RegisterChildVM_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RegisterDiskBody struct {
    +	Req    *types.RegisterDisk         `xml:"urn:vim25 RegisterDisk,omitempty"`
    +	Res    *types.RegisterDiskResponse `xml:"urn:vim25 RegisterDiskResponse,omitempty"`
    +	Fault_ *soap.Fault                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RegisterDiskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RegisterDisk(ctx context.Context, r soap.RoundTripper, req *types.RegisterDisk) (*types.RegisterDiskResponse, error) {
    +	var reqBody, resBody RegisterDiskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RegisterExtensionBody struct {
    +	Req    *types.RegisterExtension         `xml:"urn:vim25 RegisterExtension,omitempty"`
    +	Res    *types.RegisterExtensionResponse `xml:"urn:vim25 RegisterExtensionResponse,omitempty"`
    +	Fault_ *soap.Fault                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RegisterExtensionBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RegisterExtension(ctx context.Context, r soap.RoundTripper, req *types.RegisterExtension) (*types.RegisterExtensionResponse, error) {
    +	var reqBody, resBody RegisterExtensionBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RegisterHealthUpdateProviderBody struct {
    +	Req    *types.RegisterHealthUpdateProvider         `xml:"urn:vim25 RegisterHealthUpdateProvider,omitempty"`
    +	Res    *types.RegisterHealthUpdateProviderResponse `xml:"urn:vim25 RegisterHealthUpdateProviderResponse,omitempty"`
    +	Fault_ *soap.Fault                                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RegisterHealthUpdateProviderBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RegisterHealthUpdateProvider(ctx context.Context, r soap.RoundTripper, req *types.RegisterHealthUpdateProvider) (*types.RegisterHealthUpdateProviderResponse, error) {
    +	var reqBody, resBody RegisterHealthUpdateProviderBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RegisterKmipServerBody struct {
    +	Req    *types.RegisterKmipServer         `xml:"urn:vim25 RegisterKmipServer,omitempty"`
    +	Res    *types.RegisterKmipServerResponse `xml:"urn:vim25 RegisterKmipServerResponse,omitempty"`
    +	Fault_ *soap.Fault                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RegisterKmipServerBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RegisterKmipServer(ctx context.Context, r soap.RoundTripper, req *types.RegisterKmipServer) (*types.RegisterKmipServerResponse, error) {
    +	var reqBody, resBody RegisterKmipServerBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RegisterVM_TaskBody struct {
    +	Req    *types.RegisterVM_Task         `xml:"urn:vim25 RegisterVM_Task,omitempty"`
    +	Res    *types.RegisterVM_TaskResponse `xml:"urn:vim25 RegisterVM_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RegisterVM_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RegisterVM_Task(ctx context.Context, r soap.RoundTripper, req *types.RegisterVM_Task) (*types.RegisterVM_TaskResponse, error) {
    +	var reqBody, resBody RegisterVM_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ReleaseCredentialsInGuestBody struct {
    +	Req    *types.ReleaseCredentialsInGuest         `xml:"urn:vim25 ReleaseCredentialsInGuest,omitempty"`
    +	Res    *types.ReleaseCredentialsInGuestResponse `xml:"urn:vim25 ReleaseCredentialsInGuestResponse,omitempty"`
    +	Fault_ *soap.Fault                              `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ReleaseCredentialsInGuestBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ReleaseCredentialsInGuest(ctx context.Context, r soap.RoundTripper, req *types.ReleaseCredentialsInGuest) (*types.ReleaseCredentialsInGuestResponse, error) {
    +	var reqBody, resBody ReleaseCredentialsInGuestBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ReleaseIpAllocationBody struct {
    +	Req    *types.ReleaseIpAllocation         `xml:"urn:vim25 ReleaseIpAllocation,omitempty"`
    +	Res    *types.ReleaseIpAllocationResponse `xml:"urn:vim25 ReleaseIpAllocationResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ReleaseIpAllocationBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ReleaseIpAllocation(ctx context.Context, r soap.RoundTripper, req *types.ReleaseIpAllocation) (*types.ReleaseIpAllocationResponse, error) {
    +	var reqBody, resBody ReleaseIpAllocationBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ReleaseManagedSnapshotBody struct {
    +	Req    *types.ReleaseManagedSnapshot         `xml:"urn:vim25 ReleaseManagedSnapshot,omitempty"`
    +	Res    *types.ReleaseManagedSnapshotResponse `xml:"urn:vim25 ReleaseManagedSnapshotResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ReleaseManagedSnapshotBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ReleaseManagedSnapshot(ctx context.Context, r soap.RoundTripper, req *types.ReleaseManagedSnapshot) (*types.ReleaseManagedSnapshotResponse, error) {
    +	var reqBody, resBody ReleaseManagedSnapshotBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ReloadBody struct {
    +	Req    *types.Reload         `xml:"urn:vim25 Reload,omitempty"`
    +	Res    *types.ReloadResponse `xml:"urn:vim25 ReloadResponse,omitempty"`
    +	Fault_ *soap.Fault           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ReloadBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func Reload(ctx context.Context, r soap.RoundTripper, req *types.Reload) (*types.ReloadResponse, error) {
    +	var reqBody, resBody ReloadBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RelocateVM_TaskBody struct {
    +	Req    *types.RelocateVM_Task         `xml:"urn:vim25 RelocateVM_Task,omitempty"`
    +	Res    *types.RelocateVM_TaskResponse `xml:"urn:vim25 RelocateVM_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RelocateVM_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RelocateVM_Task(ctx context.Context, r soap.RoundTripper, req *types.RelocateVM_Task) (*types.RelocateVM_TaskResponse, error) {
    +	var reqBody, resBody RelocateVM_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RelocateVStorageObject_TaskBody struct {
    +	Req    *types.RelocateVStorageObject_Task         `xml:"urn:vim25 RelocateVStorageObject_Task,omitempty"`
    +	Res    *types.RelocateVStorageObject_TaskResponse `xml:"urn:vim25 RelocateVStorageObject_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RelocateVStorageObject_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RelocateVStorageObject_Task(ctx context.Context, r soap.RoundTripper, req *types.RelocateVStorageObject_Task) (*types.RelocateVStorageObject_TaskResponse, error) {
    +	var reqBody, resBody RelocateVStorageObject_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RemoveAlarmBody struct {
    +	Req    *types.RemoveAlarm         `xml:"urn:vim25 RemoveAlarm,omitempty"`
    +	Res    *types.RemoveAlarmResponse `xml:"urn:vim25 RemoveAlarmResponse,omitempty"`
    +	Fault_ *soap.Fault                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RemoveAlarmBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RemoveAlarm(ctx context.Context, r soap.RoundTripper, req *types.RemoveAlarm) (*types.RemoveAlarmResponse, error) {
    +	var reqBody, resBody RemoveAlarmBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RemoveAllSnapshots_TaskBody struct {
    +	Req    *types.RemoveAllSnapshots_Task         `xml:"urn:vim25 RemoveAllSnapshots_Task,omitempty"`
    +	Res    *types.RemoveAllSnapshots_TaskResponse `xml:"urn:vim25 RemoveAllSnapshots_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RemoveAllSnapshots_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RemoveAllSnapshots_Task(ctx context.Context, r soap.RoundTripper, req *types.RemoveAllSnapshots_Task) (*types.RemoveAllSnapshots_TaskResponse, error) {
    +	var reqBody, resBody RemoveAllSnapshots_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RemoveAssignedLicenseBody struct {
    +	Req    *types.RemoveAssignedLicense         `xml:"urn:vim25 RemoveAssignedLicense,omitempty"`
    +	Res    *types.RemoveAssignedLicenseResponse `xml:"urn:vim25 RemoveAssignedLicenseResponse,omitempty"`
    +	Fault_ *soap.Fault                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RemoveAssignedLicenseBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RemoveAssignedLicense(ctx context.Context, r soap.RoundTripper, req *types.RemoveAssignedLicense) (*types.RemoveAssignedLicenseResponse, error) {
    +	var reqBody, resBody RemoveAssignedLicenseBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RemoveAuthorizationRoleBody struct {
    +	Req    *types.RemoveAuthorizationRole         `xml:"urn:vim25 RemoveAuthorizationRole,omitempty"`
    +	Res    *types.RemoveAuthorizationRoleResponse `xml:"urn:vim25 RemoveAuthorizationRoleResponse,omitempty"`
    +	Fault_ *soap.Fault                            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RemoveAuthorizationRoleBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RemoveAuthorizationRole(ctx context.Context, r soap.RoundTripper, req *types.RemoveAuthorizationRole) (*types.RemoveAuthorizationRoleResponse, error) {
    +	var reqBody, resBody RemoveAuthorizationRoleBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RemoveCustomFieldDefBody struct {
    +	Req    *types.RemoveCustomFieldDef         `xml:"urn:vim25 RemoveCustomFieldDef,omitempty"`
    +	Res    *types.RemoveCustomFieldDefResponse `xml:"urn:vim25 RemoveCustomFieldDefResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RemoveCustomFieldDefBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RemoveCustomFieldDef(ctx context.Context, r soap.RoundTripper, req *types.RemoveCustomFieldDef) (*types.RemoveCustomFieldDefResponse, error) {
    +	var reqBody, resBody RemoveCustomFieldDefBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RemoveDatastoreBody struct {
    +	Req    *types.RemoveDatastore         `xml:"urn:vim25 RemoveDatastore,omitempty"`
    +	Res    *types.RemoveDatastoreResponse `xml:"urn:vim25 RemoveDatastoreResponse,omitempty"`
    +	Fault_ *soap.Fault                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RemoveDatastoreBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RemoveDatastore(ctx context.Context, r soap.RoundTripper, req *types.RemoveDatastore) (*types.RemoveDatastoreResponse, error) {
    +	var reqBody, resBody RemoveDatastoreBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RemoveDatastoreEx_TaskBody struct {
    +	Req    *types.RemoveDatastoreEx_Task         `xml:"urn:vim25 RemoveDatastoreEx_Task,omitempty"`
    +	Res    *types.RemoveDatastoreEx_TaskResponse `xml:"urn:vim25 RemoveDatastoreEx_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RemoveDatastoreEx_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RemoveDatastoreEx_Task(ctx context.Context, r soap.RoundTripper, req *types.RemoveDatastoreEx_Task) (*types.RemoveDatastoreEx_TaskResponse, error) {
    +	var reqBody, resBody RemoveDatastoreEx_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RemoveDiskMapping_TaskBody struct {
    +	Req    *types.RemoveDiskMapping_Task         `xml:"urn:vim25 RemoveDiskMapping_Task,omitempty"`
    +	Res    *types.RemoveDiskMapping_TaskResponse `xml:"urn:vim25 RemoveDiskMapping_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RemoveDiskMapping_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RemoveDiskMapping_Task(ctx context.Context, r soap.RoundTripper, req *types.RemoveDiskMapping_Task) (*types.RemoveDiskMapping_TaskResponse, error) {
    +	var reqBody, resBody RemoveDiskMapping_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RemoveDisk_TaskBody struct {
    +	Req    *types.RemoveDisk_Task         `xml:"urn:vim25 RemoveDisk_Task,omitempty"`
    +	Res    *types.RemoveDisk_TaskResponse `xml:"urn:vim25 RemoveDisk_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RemoveDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RemoveDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.RemoveDisk_Task) (*types.RemoveDisk_TaskResponse, error) {
    +	var reqBody, resBody RemoveDisk_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RemoveEntityPermissionBody struct {
    +	Req    *types.RemoveEntityPermission         `xml:"urn:vim25 RemoveEntityPermission,omitempty"`
    +	Res    *types.RemoveEntityPermissionResponse `xml:"urn:vim25 RemoveEntityPermissionResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RemoveEntityPermissionBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RemoveEntityPermission(ctx context.Context, r soap.RoundTripper, req *types.RemoveEntityPermission) (*types.RemoveEntityPermissionResponse, error) {
    +	var reqBody, resBody RemoveEntityPermissionBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RemoveFilterBody struct {
    +	Req    *types.RemoveFilter         `xml:"urn:vim25 RemoveFilter,omitempty"`
    +	Res    *types.RemoveFilterResponse `xml:"urn:vim25 RemoveFilterResponse,omitempty"`
    +	Fault_ *soap.Fault                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RemoveFilterBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RemoveFilter(ctx context.Context, r soap.RoundTripper, req *types.RemoveFilter) (*types.RemoveFilterResponse, error) {
    +	var reqBody, resBody RemoveFilterBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RemoveFilterEntitiesBody struct {
    +	Req    *types.RemoveFilterEntities         `xml:"urn:vim25 RemoveFilterEntities,omitempty"`
    +	Res    *types.RemoveFilterEntitiesResponse `xml:"urn:vim25 RemoveFilterEntitiesResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RemoveFilterEntitiesBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RemoveFilterEntities(ctx context.Context, r soap.RoundTripper, req *types.RemoveFilterEntities) (*types.RemoveFilterEntitiesResponse, error) {
    +	var reqBody, resBody RemoveFilterEntitiesBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RemoveGroupBody struct {
    +	Req    *types.RemoveGroup         `xml:"urn:vim25 RemoveGroup,omitempty"`
    +	Res    *types.RemoveGroupResponse `xml:"urn:vim25 RemoveGroupResponse,omitempty"`
    +	Fault_ *soap.Fault                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RemoveGroupBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RemoveGroup(ctx context.Context, r soap.RoundTripper, req *types.RemoveGroup) (*types.RemoveGroupResponse, error) {
    +	var reqBody, resBody RemoveGroupBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RemoveGuestAliasBody struct {
    +	Req    *types.RemoveGuestAlias         `xml:"urn:vim25 RemoveGuestAlias,omitempty"`
    +	Res    *types.RemoveGuestAliasResponse `xml:"urn:vim25 RemoveGuestAliasResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RemoveGuestAliasBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RemoveGuestAlias(ctx context.Context, r soap.RoundTripper, req *types.RemoveGuestAlias) (*types.RemoveGuestAliasResponse, error) {
    +	var reqBody, resBody RemoveGuestAliasBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RemoveGuestAliasByCertBody struct {
    +	Req    *types.RemoveGuestAliasByCert         `xml:"urn:vim25 RemoveGuestAliasByCert,omitempty"`
    +	Res    *types.RemoveGuestAliasByCertResponse `xml:"urn:vim25 RemoveGuestAliasByCertResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RemoveGuestAliasByCertBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RemoveGuestAliasByCert(ctx context.Context, r soap.RoundTripper, req *types.RemoveGuestAliasByCert) (*types.RemoveGuestAliasByCertResponse, error) {
    +	var reqBody, resBody RemoveGuestAliasByCertBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RemoveInternetScsiSendTargetsBody struct {
    +	Req    *types.RemoveInternetScsiSendTargets         `xml:"urn:vim25 RemoveInternetScsiSendTargets,omitempty"`
    +	Res    *types.RemoveInternetScsiSendTargetsResponse `xml:"urn:vim25 RemoveInternetScsiSendTargetsResponse,omitempty"`
    +	Fault_ *soap.Fault                                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RemoveInternetScsiSendTargetsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RemoveInternetScsiSendTargets(ctx context.Context, r soap.RoundTripper, req *types.RemoveInternetScsiSendTargets) (*types.RemoveInternetScsiSendTargetsResponse, error) {
    +	var reqBody, resBody RemoveInternetScsiSendTargetsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RemoveInternetScsiStaticTargetsBody struct {
    +	Req    *types.RemoveInternetScsiStaticTargets         `xml:"urn:vim25 RemoveInternetScsiStaticTargets,omitempty"`
    +	Res    *types.RemoveInternetScsiStaticTargetsResponse `xml:"urn:vim25 RemoveInternetScsiStaticTargetsResponse,omitempty"`
    +	Fault_ *soap.Fault                                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RemoveInternetScsiStaticTargetsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RemoveInternetScsiStaticTargets(ctx context.Context, r soap.RoundTripper, req *types.RemoveInternetScsiStaticTargets) (*types.RemoveInternetScsiStaticTargetsResponse, error) {
    +	var reqBody, resBody RemoveInternetScsiStaticTargetsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RemoveKeyBody struct {
    +	Req    *types.RemoveKey         `xml:"urn:vim25 RemoveKey,omitempty"`
    +	Res    *types.RemoveKeyResponse `xml:"urn:vim25 RemoveKeyResponse,omitempty"`
    +	Fault_ *soap.Fault              `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RemoveKeyBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RemoveKey(ctx context.Context, r soap.RoundTripper, req *types.RemoveKey) (*types.RemoveKeyResponse, error) {
    +	var reqBody, resBody RemoveKeyBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RemoveKeysBody struct {
    +	Req    *types.RemoveKeys         `xml:"urn:vim25 RemoveKeys,omitempty"`
    +	Res    *types.RemoveKeysResponse `xml:"urn:vim25 RemoveKeysResponse,omitempty"`
    +	Fault_ *soap.Fault               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RemoveKeysBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RemoveKeys(ctx context.Context, r soap.RoundTripper, req *types.RemoveKeys) (*types.RemoveKeysResponse, error) {
    +	var reqBody, resBody RemoveKeysBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RemoveKmipServerBody struct {
    +	Req    *types.RemoveKmipServer         `xml:"urn:vim25 RemoveKmipServer,omitempty"`
    +	Res    *types.RemoveKmipServerResponse `xml:"urn:vim25 RemoveKmipServerResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RemoveKmipServerBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RemoveKmipServer(ctx context.Context, r soap.RoundTripper, req *types.RemoveKmipServer) (*types.RemoveKmipServerResponse, error) {
    +	var reqBody, resBody RemoveKmipServerBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RemoveLicenseBody struct {
    +	Req    *types.RemoveLicense         `xml:"urn:vim25 RemoveLicense,omitempty"`
    +	Res    *types.RemoveLicenseResponse `xml:"urn:vim25 RemoveLicenseResponse,omitempty"`
    +	Fault_ *soap.Fault                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RemoveLicenseBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RemoveLicense(ctx context.Context, r soap.RoundTripper, req *types.RemoveLicense) (*types.RemoveLicenseResponse, error) {
    +	var reqBody, resBody RemoveLicenseBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RemoveLicenseLabelBody struct {
    +	Req    *types.RemoveLicenseLabel         `xml:"urn:vim25 RemoveLicenseLabel,omitempty"`
    +	Res    *types.RemoveLicenseLabelResponse `xml:"urn:vim25 RemoveLicenseLabelResponse,omitempty"`
    +	Fault_ *soap.Fault                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RemoveLicenseLabelBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RemoveLicenseLabel(ctx context.Context, r soap.RoundTripper, req *types.RemoveLicenseLabel) (*types.RemoveLicenseLabelResponse, error) {
    +	var reqBody, resBody RemoveLicenseLabelBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RemoveMonitoredEntitiesBody struct {
    +	Req    *types.RemoveMonitoredEntities         `xml:"urn:vim25 RemoveMonitoredEntities,omitempty"`
    +	Res    *types.RemoveMonitoredEntitiesResponse `xml:"urn:vim25 RemoveMonitoredEntitiesResponse,omitempty"`
    +	Fault_ *soap.Fault                            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RemoveMonitoredEntitiesBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RemoveMonitoredEntities(ctx context.Context, r soap.RoundTripper, req *types.RemoveMonitoredEntities) (*types.RemoveMonitoredEntitiesResponse, error) {
    +	var reqBody, resBody RemoveMonitoredEntitiesBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RemoveNetworkResourcePoolBody struct {
    +	Req    *types.RemoveNetworkResourcePool         `xml:"urn:vim25 RemoveNetworkResourcePool,omitempty"`
    +	Res    *types.RemoveNetworkResourcePoolResponse `xml:"urn:vim25 RemoveNetworkResourcePoolResponse,omitempty"`
    +	Fault_ *soap.Fault                              `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RemoveNetworkResourcePoolBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RemoveNetworkResourcePool(ctx context.Context, r soap.RoundTripper, req *types.RemoveNetworkResourcePool) (*types.RemoveNetworkResourcePoolResponse, error) {
    +	var reqBody, resBody RemoveNetworkResourcePoolBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RemovePerfIntervalBody struct {
    +	Req    *types.RemovePerfInterval         `xml:"urn:vim25 RemovePerfInterval,omitempty"`
    +	Res    *types.RemovePerfIntervalResponse `xml:"urn:vim25 RemovePerfIntervalResponse,omitempty"`
    +	Fault_ *soap.Fault                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RemovePerfIntervalBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RemovePerfInterval(ctx context.Context, r soap.RoundTripper, req *types.RemovePerfInterval) (*types.RemovePerfIntervalResponse, error) {
    +	var reqBody, resBody RemovePerfIntervalBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RemovePortGroupBody struct {
    +	Req    *types.RemovePortGroup         `xml:"urn:vim25 RemovePortGroup,omitempty"`
    +	Res    *types.RemovePortGroupResponse `xml:"urn:vim25 RemovePortGroupResponse,omitempty"`
    +	Fault_ *soap.Fault                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RemovePortGroupBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RemovePortGroup(ctx context.Context, r soap.RoundTripper, req *types.RemovePortGroup) (*types.RemovePortGroupResponse, error) {
    +	var reqBody, resBody RemovePortGroupBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RemoveScheduledTaskBody struct {
    +	Req    *types.RemoveScheduledTask         `xml:"urn:vim25 RemoveScheduledTask,omitempty"`
    +	Res    *types.RemoveScheduledTaskResponse `xml:"urn:vim25 RemoveScheduledTaskResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RemoveScheduledTaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RemoveScheduledTask(ctx context.Context, r soap.RoundTripper, req *types.RemoveScheduledTask) (*types.RemoveScheduledTaskResponse, error) {
    +	var reqBody, resBody RemoveScheduledTaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RemoveServiceConsoleVirtualNicBody struct {
    +	Req    *types.RemoveServiceConsoleVirtualNic         `xml:"urn:vim25 RemoveServiceConsoleVirtualNic,omitempty"`
    +	Res    *types.RemoveServiceConsoleVirtualNicResponse `xml:"urn:vim25 RemoveServiceConsoleVirtualNicResponse,omitempty"`
    +	Fault_ *soap.Fault                                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RemoveServiceConsoleVirtualNicBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RemoveServiceConsoleVirtualNic(ctx context.Context, r soap.RoundTripper, req *types.RemoveServiceConsoleVirtualNic) (*types.RemoveServiceConsoleVirtualNicResponse, error) {
    +	var reqBody, resBody RemoveServiceConsoleVirtualNicBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RemoveSmartCardTrustAnchorBody struct {
    +	Req    *types.RemoveSmartCardTrustAnchor         `xml:"urn:vim25 RemoveSmartCardTrustAnchor,omitempty"`
    +	Res    *types.RemoveSmartCardTrustAnchorResponse `xml:"urn:vim25 RemoveSmartCardTrustAnchorResponse,omitempty"`
    +	Fault_ *soap.Fault                               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RemoveSmartCardTrustAnchorBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RemoveSmartCardTrustAnchor(ctx context.Context, r soap.RoundTripper, req *types.RemoveSmartCardTrustAnchor) (*types.RemoveSmartCardTrustAnchorResponse, error) {
    +	var reqBody, resBody RemoveSmartCardTrustAnchorBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RemoveSmartCardTrustAnchorByFingerprintBody struct {
    +	Req    *types.RemoveSmartCardTrustAnchorByFingerprint         `xml:"urn:vim25 RemoveSmartCardTrustAnchorByFingerprint,omitempty"`
    +	Res    *types.RemoveSmartCardTrustAnchorByFingerprintResponse `xml:"urn:vim25 RemoveSmartCardTrustAnchorByFingerprintResponse,omitempty"`
    +	Fault_ *soap.Fault                                            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RemoveSmartCardTrustAnchorByFingerprintBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RemoveSmartCardTrustAnchorByFingerprint(ctx context.Context, r soap.RoundTripper, req *types.RemoveSmartCardTrustAnchorByFingerprint) (*types.RemoveSmartCardTrustAnchorByFingerprintResponse, error) {
    +	var reqBody, resBody RemoveSmartCardTrustAnchorByFingerprintBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RemoveSnapshot_TaskBody struct {
    +	Req    *types.RemoveSnapshot_Task         `xml:"urn:vim25 RemoveSnapshot_Task,omitempty"`
    +	Res    *types.RemoveSnapshot_TaskResponse `xml:"urn:vim25 RemoveSnapshot_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RemoveSnapshot_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RemoveSnapshot_Task(ctx context.Context, r soap.RoundTripper, req *types.RemoveSnapshot_Task) (*types.RemoveSnapshot_TaskResponse, error) {
    +	var reqBody, resBody RemoveSnapshot_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RemoveUserBody struct {
    +	Req    *types.RemoveUser         `xml:"urn:vim25 RemoveUser,omitempty"`
    +	Res    *types.RemoveUserResponse `xml:"urn:vim25 RemoveUserResponse,omitempty"`
    +	Fault_ *soap.Fault               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RemoveUserBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RemoveUser(ctx context.Context, r soap.RoundTripper, req *types.RemoveUser) (*types.RemoveUserResponse, error) {
    +	var reqBody, resBody RemoveUserBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RemoveVirtualNicBody struct {
    +	Req    *types.RemoveVirtualNic         `xml:"urn:vim25 RemoveVirtualNic,omitempty"`
    +	Res    *types.RemoveVirtualNicResponse `xml:"urn:vim25 RemoveVirtualNicResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RemoveVirtualNicBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RemoveVirtualNic(ctx context.Context, r soap.RoundTripper, req *types.RemoveVirtualNic) (*types.RemoveVirtualNicResponse, error) {
    +	var reqBody, resBody RemoveVirtualNicBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RemoveVirtualSwitchBody struct {
    +	Req    *types.RemoveVirtualSwitch         `xml:"urn:vim25 RemoveVirtualSwitch,omitempty"`
    +	Res    *types.RemoveVirtualSwitchResponse `xml:"urn:vim25 RemoveVirtualSwitchResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RemoveVirtualSwitchBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RemoveVirtualSwitch(ctx context.Context, r soap.RoundTripper, req *types.RemoveVirtualSwitch) (*types.RemoveVirtualSwitchResponse, error) {
    +	var reqBody, resBody RemoveVirtualSwitchBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RenameCustomFieldDefBody struct {
    +	Req    *types.RenameCustomFieldDef         `xml:"urn:vim25 RenameCustomFieldDef,omitempty"`
    +	Res    *types.RenameCustomFieldDefResponse `xml:"urn:vim25 RenameCustomFieldDefResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RenameCustomFieldDefBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RenameCustomFieldDef(ctx context.Context, r soap.RoundTripper, req *types.RenameCustomFieldDef) (*types.RenameCustomFieldDefResponse, error) {
    +	var reqBody, resBody RenameCustomFieldDefBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RenameCustomizationSpecBody struct {
    +	Req    *types.RenameCustomizationSpec         `xml:"urn:vim25 RenameCustomizationSpec,omitempty"`
    +	Res    *types.RenameCustomizationSpecResponse `xml:"urn:vim25 RenameCustomizationSpecResponse,omitempty"`
    +	Fault_ *soap.Fault                            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RenameCustomizationSpecBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RenameCustomizationSpec(ctx context.Context, r soap.RoundTripper, req *types.RenameCustomizationSpec) (*types.RenameCustomizationSpecResponse, error) {
    +	var reqBody, resBody RenameCustomizationSpecBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RenameDatastoreBody struct {
    +	Req    *types.RenameDatastore         `xml:"urn:vim25 RenameDatastore,omitempty"`
    +	Res    *types.RenameDatastoreResponse `xml:"urn:vim25 RenameDatastoreResponse,omitempty"`
    +	Fault_ *soap.Fault                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RenameDatastoreBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RenameDatastore(ctx context.Context, r soap.RoundTripper, req *types.RenameDatastore) (*types.RenameDatastoreResponse, error) {
    +	var reqBody, resBody RenameDatastoreBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RenameSnapshotBody struct {
    +	Req    *types.RenameSnapshot         `xml:"urn:vim25 RenameSnapshot,omitempty"`
    +	Res    *types.RenameSnapshotResponse `xml:"urn:vim25 RenameSnapshotResponse,omitempty"`
    +	Fault_ *soap.Fault                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RenameSnapshotBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RenameSnapshot(ctx context.Context, r soap.RoundTripper, req *types.RenameSnapshot) (*types.RenameSnapshotResponse, error) {
    +	var reqBody, resBody RenameSnapshotBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RenameVStorageObjectBody struct {
    +	Req    *types.RenameVStorageObject         `xml:"urn:vim25 RenameVStorageObject,omitempty"`
    +	Res    *types.RenameVStorageObjectResponse `xml:"urn:vim25 RenameVStorageObjectResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RenameVStorageObjectBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RenameVStorageObject(ctx context.Context, r soap.RoundTripper, req *types.RenameVStorageObject) (*types.RenameVStorageObjectResponse, error) {
    +	var reqBody, resBody RenameVStorageObjectBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type Rename_TaskBody struct {
    +	Req    *types.Rename_Task         `xml:"urn:vim25 Rename_Task,omitempty"`
    +	Res    *types.Rename_TaskResponse `xml:"urn:vim25 Rename_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *Rename_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func Rename_Task(ctx context.Context, r soap.RoundTripper, req *types.Rename_Task) (*types.Rename_TaskResponse, error) {
    +	var reqBody, resBody Rename_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ReplaceCACertificatesAndCRLsBody struct {
    +	Req    *types.ReplaceCACertificatesAndCRLs         `xml:"urn:vim25 ReplaceCACertificatesAndCRLs,omitempty"`
    +	Res    *types.ReplaceCACertificatesAndCRLsResponse `xml:"urn:vim25 ReplaceCACertificatesAndCRLsResponse,omitempty"`
    +	Fault_ *soap.Fault                                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ReplaceCACertificatesAndCRLsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ReplaceCACertificatesAndCRLs(ctx context.Context, r soap.RoundTripper, req *types.ReplaceCACertificatesAndCRLs) (*types.ReplaceCACertificatesAndCRLsResponse, error) {
    +	var reqBody, resBody ReplaceCACertificatesAndCRLsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ReplaceSmartCardTrustAnchorsBody struct {
    +	Req    *types.ReplaceSmartCardTrustAnchors         `xml:"urn:vim25 ReplaceSmartCardTrustAnchors,omitempty"`
    +	Res    *types.ReplaceSmartCardTrustAnchorsResponse `xml:"urn:vim25 ReplaceSmartCardTrustAnchorsResponse,omitempty"`
    +	Fault_ *soap.Fault                                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ReplaceSmartCardTrustAnchorsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ReplaceSmartCardTrustAnchors(ctx context.Context, r soap.RoundTripper, req *types.ReplaceSmartCardTrustAnchors) (*types.ReplaceSmartCardTrustAnchorsResponse, error) {
    +	var reqBody, resBody ReplaceSmartCardTrustAnchorsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RescanAllHbaBody struct {
    +	Req    *types.RescanAllHba         `xml:"urn:vim25 RescanAllHba,omitempty"`
    +	Res    *types.RescanAllHbaResponse `xml:"urn:vim25 RescanAllHbaResponse,omitempty"`
    +	Fault_ *soap.Fault                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RescanAllHbaBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RescanAllHba(ctx context.Context, r soap.RoundTripper, req *types.RescanAllHba) (*types.RescanAllHbaResponse, error) {
    +	var reqBody, resBody RescanAllHbaBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RescanHbaBody struct {
    +	Req    *types.RescanHba         `xml:"urn:vim25 RescanHba,omitempty"`
    +	Res    *types.RescanHbaResponse `xml:"urn:vim25 RescanHbaResponse,omitempty"`
    +	Fault_ *soap.Fault              `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RescanHbaBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RescanHba(ctx context.Context, r soap.RoundTripper, req *types.RescanHba) (*types.RescanHbaResponse, error) {
    +	var reqBody, resBody RescanHbaBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RescanVffsBody struct {
    +	Req    *types.RescanVffs         `xml:"urn:vim25 RescanVffs,omitempty"`
    +	Res    *types.RescanVffsResponse `xml:"urn:vim25 RescanVffsResponse,omitempty"`
    +	Fault_ *soap.Fault               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RescanVffsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RescanVffs(ctx context.Context, r soap.RoundTripper, req *types.RescanVffs) (*types.RescanVffsResponse, error) {
    +	var reqBody, resBody RescanVffsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RescanVmfsBody struct {
    +	Req    *types.RescanVmfs         `xml:"urn:vim25 RescanVmfs,omitempty"`
    +	Res    *types.RescanVmfsResponse `xml:"urn:vim25 RescanVmfsResponse,omitempty"`
    +	Fault_ *soap.Fault               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RescanVmfsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RescanVmfs(ctx context.Context, r soap.RoundTripper, req *types.RescanVmfs) (*types.RescanVmfsResponse, error) {
    +	var reqBody, resBody RescanVmfsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ResetCollectorBody struct {
    +	Req    *types.ResetCollector         `xml:"urn:vim25 ResetCollector,omitempty"`
    +	Res    *types.ResetCollectorResponse `xml:"urn:vim25 ResetCollectorResponse,omitempty"`
    +	Fault_ *soap.Fault                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ResetCollectorBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ResetCollector(ctx context.Context, r soap.RoundTripper, req *types.ResetCollector) (*types.ResetCollectorResponse, error) {
    +	var reqBody, resBody ResetCollectorBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ResetCounterLevelMappingBody struct {
    +	Req    *types.ResetCounterLevelMapping         `xml:"urn:vim25 ResetCounterLevelMapping,omitempty"`
    +	Res    *types.ResetCounterLevelMappingResponse `xml:"urn:vim25 ResetCounterLevelMappingResponse,omitempty"`
    +	Fault_ *soap.Fault                             `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ResetCounterLevelMappingBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ResetCounterLevelMapping(ctx context.Context, r soap.RoundTripper, req *types.ResetCounterLevelMapping) (*types.ResetCounterLevelMappingResponse, error) {
    +	var reqBody, resBody ResetCounterLevelMappingBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ResetEntityPermissionsBody struct {
    +	Req    *types.ResetEntityPermissions         `xml:"urn:vim25 ResetEntityPermissions,omitempty"`
    +	Res    *types.ResetEntityPermissionsResponse `xml:"urn:vim25 ResetEntityPermissionsResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ResetEntityPermissionsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ResetEntityPermissions(ctx context.Context, r soap.RoundTripper, req *types.ResetEntityPermissions) (*types.ResetEntityPermissionsResponse, error) {
    +	var reqBody, resBody ResetEntityPermissionsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ResetFirmwareToFactoryDefaultsBody struct {
    +	Req    *types.ResetFirmwareToFactoryDefaults         `xml:"urn:vim25 ResetFirmwareToFactoryDefaults,omitempty"`
    +	Res    *types.ResetFirmwareToFactoryDefaultsResponse `xml:"urn:vim25 ResetFirmwareToFactoryDefaultsResponse,omitempty"`
    +	Fault_ *soap.Fault                                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ResetFirmwareToFactoryDefaultsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ResetFirmwareToFactoryDefaults(ctx context.Context, r soap.RoundTripper, req *types.ResetFirmwareToFactoryDefaults) (*types.ResetFirmwareToFactoryDefaultsResponse, error) {
    +	var reqBody, resBody ResetFirmwareToFactoryDefaultsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ResetGuestInformationBody struct {
    +	Req    *types.ResetGuestInformation         `xml:"urn:vim25 ResetGuestInformation,omitempty"`
    +	Res    *types.ResetGuestInformationResponse `xml:"urn:vim25 ResetGuestInformationResponse,omitempty"`
    +	Fault_ *soap.Fault                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ResetGuestInformationBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ResetGuestInformation(ctx context.Context, r soap.RoundTripper, req *types.ResetGuestInformation) (*types.ResetGuestInformationResponse, error) {
    +	var reqBody, resBody ResetGuestInformationBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ResetListViewBody struct {
    +	Req    *types.ResetListView         `xml:"urn:vim25 ResetListView,omitempty"`
    +	Res    *types.ResetListViewResponse `xml:"urn:vim25 ResetListViewResponse,omitempty"`
    +	Fault_ *soap.Fault                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ResetListViewBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ResetListView(ctx context.Context, r soap.RoundTripper, req *types.ResetListView) (*types.ResetListViewResponse, error) {
    +	var reqBody, resBody ResetListViewBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ResetListViewFromViewBody struct {
    +	Req    *types.ResetListViewFromView         `xml:"urn:vim25 ResetListViewFromView,omitempty"`
    +	Res    *types.ResetListViewFromViewResponse `xml:"urn:vim25 ResetListViewFromViewResponse,omitempty"`
    +	Fault_ *soap.Fault                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ResetListViewFromViewBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ResetListViewFromView(ctx context.Context, r soap.RoundTripper, req *types.ResetListViewFromView) (*types.ResetListViewFromViewResponse, error) {
    +	var reqBody, resBody ResetListViewFromViewBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ResetSystemHealthInfoBody struct {
    +	Req    *types.ResetSystemHealthInfo         `xml:"urn:vim25 ResetSystemHealthInfo,omitempty"`
    +	Res    *types.ResetSystemHealthInfoResponse `xml:"urn:vim25 ResetSystemHealthInfoResponse,omitempty"`
    +	Fault_ *soap.Fault                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ResetSystemHealthInfoBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ResetSystemHealthInfo(ctx context.Context, r soap.RoundTripper, req *types.ResetSystemHealthInfo) (*types.ResetSystemHealthInfoResponse, error) {
    +	var reqBody, resBody ResetSystemHealthInfoBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ResetVM_TaskBody struct {
    +	Req    *types.ResetVM_Task         `xml:"urn:vim25 ResetVM_Task,omitempty"`
    +	Res    *types.ResetVM_TaskResponse `xml:"urn:vim25 ResetVM_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ResetVM_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ResetVM_Task(ctx context.Context, r soap.RoundTripper, req *types.ResetVM_Task) (*types.ResetVM_TaskResponse, error) {
    +	var reqBody, resBody ResetVM_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ResignatureUnresolvedVmfsVolume_TaskBody struct {
    +	Req    *types.ResignatureUnresolvedVmfsVolume_Task         `xml:"urn:vim25 ResignatureUnresolvedVmfsVolume_Task,omitempty"`
    +	Res    *types.ResignatureUnresolvedVmfsVolume_TaskResponse `xml:"urn:vim25 ResignatureUnresolvedVmfsVolume_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ResignatureUnresolvedVmfsVolume_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ResignatureUnresolvedVmfsVolume_Task(ctx context.Context, r soap.RoundTripper, req *types.ResignatureUnresolvedVmfsVolume_Task) (*types.ResignatureUnresolvedVmfsVolume_TaskResponse, error) {
    +	var reqBody, resBody ResignatureUnresolvedVmfsVolume_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ResolveInstallationErrorsOnCluster_TaskBody struct {
    +	Req    *types.ResolveInstallationErrorsOnCluster_Task         `xml:"urn:vim25 ResolveInstallationErrorsOnCluster_Task,omitempty"`
    +	Res    *types.ResolveInstallationErrorsOnCluster_TaskResponse `xml:"urn:vim25 ResolveInstallationErrorsOnCluster_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ResolveInstallationErrorsOnCluster_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ResolveInstallationErrorsOnCluster_Task(ctx context.Context, r soap.RoundTripper, req *types.ResolveInstallationErrorsOnCluster_Task) (*types.ResolveInstallationErrorsOnCluster_TaskResponse, error) {
    +	var reqBody, resBody ResolveInstallationErrorsOnCluster_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ResolveInstallationErrorsOnHost_TaskBody struct {
    +	Req    *types.ResolveInstallationErrorsOnHost_Task         `xml:"urn:vim25 ResolveInstallationErrorsOnHost_Task,omitempty"`
    +	Res    *types.ResolveInstallationErrorsOnHost_TaskResponse `xml:"urn:vim25 ResolveInstallationErrorsOnHost_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ResolveInstallationErrorsOnHost_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ResolveInstallationErrorsOnHost_Task(ctx context.Context, r soap.RoundTripper, req *types.ResolveInstallationErrorsOnHost_Task) (*types.ResolveInstallationErrorsOnHost_TaskResponse, error) {
    +	var reqBody, resBody ResolveInstallationErrorsOnHost_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ResolveMultipleUnresolvedVmfsVolumesBody struct {
    +	Req    *types.ResolveMultipleUnresolvedVmfsVolumes         `xml:"urn:vim25 ResolveMultipleUnresolvedVmfsVolumes,omitempty"`
    +	Res    *types.ResolveMultipleUnresolvedVmfsVolumesResponse `xml:"urn:vim25 ResolveMultipleUnresolvedVmfsVolumesResponse,omitempty"`
    +	Fault_ *soap.Fault                                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ResolveMultipleUnresolvedVmfsVolumesBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ResolveMultipleUnresolvedVmfsVolumes(ctx context.Context, r soap.RoundTripper, req *types.ResolveMultipleUnresolvedVmfsVolumes) (*types.ResolveMultipleUnresolvedVmfsVolumesResponse, error) {
    +	var reqBody, resBody ResolveMultipleUnresolvedVmfsVolumesBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ResolveMultipleUnresolvedVmfsVolumesEx_TaskBody struct {
    +	Req    *types.ResolveMultipleUnresolvedVmfsVolumesEx_Task         `xml:"urn:vim25 ResolveMultipleUnresolvedVmfsVolumesEx_Task,omitempty"`
    +	Res    *types.ResolveMultipleUnresolvedVmfsVolumesEx_TaskResponse `xml:"urn:vim25 ResolveMultipleUnresolvedVmfsVolumesEx_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ResolveMultipleUnresolvedVmfsVolumesEx_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ResolveMultipleUnresolvedVmfsVolumesEx_Task(ctx context.Context, r soap.RoundTripper, req *types.ResolveMultipleUnresolvedVmfsVolumesEx_Task) (*types.ResolveMultipleUnresolvedVmfsVolumesEx_TaskResponse, error) {
    +	var reqBody, resBody ResolveMultipleUnresolvedVmfsVolumesEx_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RestartServiceBody struct {
    +	Req    *types.RestartService         `xml:"urn:vim25 RestartService,omitempty"`
    +	Res    *types.RestartServiceResponse `xml:"urn:vim25 RestartServiceResponse,omitempty"`
    +	Fault_ *soap.Fault                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RestartServiceBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RestartService(ctx context.Context, r soap.RoundTripper, req *types.RestartService) (*types.RestartServiceResponse, error) {
    +	var reqBody, resBody RestartServiceBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RestartServiceConsoleVirtualNicBody struct {
    +	Req    *types.RestartServiceConsoleVirtualNic         `xml:"urn:vim25 RestartServiceConsoleVirtualNic,omitempty"`
    +	Res    *types.RestartServiceConsoleVirtualNicResponse `xml:"urn:vim25 RestartServiceConsoleVirtualNicResponse,omitempty"`
    +	Fault_ *soap.Fault                                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RestartServiceConsoleVirtualNicBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RestartServiceConsoleVirtualNic(ctx context.Context, r soap.RoundTripper, req *types.RestartServiceConsoleVirtualNic) (*types.RestartServiceConsoleVirtualNicResponse, error) {
    +	var reqBody, resBody RestartServiceConsoleVirtualNicBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RestoreFirmwareConfigurationBody struct {
    +	Req    *types.RestoreFirmwareConfiguration         `xml:"urn:vim25 RestoreFirmwareConfiguration,omitempty"`
    +	Res    *types.RestoreFirmwareConfigurationResponse `xml:"urn:vim25 RestoreFirmwareConfigurationResponse,omitempty"`
    +	Fault_ *soap.Fault                                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RestoreFirmwareConfigurationBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RestoreFirmwareConfiguration(ctx context.Context, r soap.RoundTripper, req *types.RestoreFirmwareConfiguration) (*types.RestoreFirmwareConfigurationResponse, error) {
    +	var reqBody, resBody RestoreFirmwareConfigurationBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RetrieveAllPermissionsBody struct {
    +	Req    *types.RetrieveAllPermissions         `xml:"urn:vim25 RetrieveAllPermissions,omitempty"`
    +	Res    *types.RetrieveAllPermissionsResponse `xml:"urn:vim25 RetrieveAllPermissionsResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RetrieveAllPermissionsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RetrieveAllPermissions(ctx context.Context, r soap.RoundTripper, req *types.RetrieveAllPermissions) (*types.RetrieveAllPermissionsResponse, error) {
    +	var reqBody, resBody RetrieveAllPermissionsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RetrieveAnswerFileBody struct {
    +	Req    *types.RetrieveAnswerFile         `xml:"urn:vim25 RetrieveAnswerFile,omitempty"`
    +	Res    *types.RetrieveAnswerFileResponse `xml:"urn:vim25 RetrieveAnswerFileResponse,omitempty"`
    +	Fault_ *soap.Fault                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RetrieveAnswerFileBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RetrieveAnswerFile(ctx context.Context, r soap.RoundTripper, req *types.RetrieveAnswerFile) (*types.RetrieveAnswerFileResponse, error) {
    +	var reqBody, resBody RetrieveAnswerFileBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RetrieveAnswerFileForProfileBody struct {
    +	Req    *types.RetrieveAnswerFileForProfile         `xml:"urn:vim25 RetrieveAnswerFileForProfile,omitempty"`
    +	Res    *types.RetrieveAnswerFileForProfileResponse `xml:"urn:vim25 RetrieveAnswerFileForProfileResponse,omitempty"`
    +	Fault_ *soap.Fault                                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RetrieveAnswerFileForProfileBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RetrieveAnswerFileForProfile(ctx context.Context, r soap.RoundTripper, req *types.RetrieveAnswerFileForProfile) (*types.RetrieveAnswerFileForProfileResponse, error) {
    +	var reqBody, resBody RetrieveAnswerFileForProfileBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RetrieveArgumentDescriptionBody struct {
    +	Req    *types.RetrieveArgumentDescription         `xml:"urn:vim25 RetrieveArgumentDescription,omitempty"`
    +	Res    *types.RetrieveArgumentDescriptionResponse `xml:"urn:vim25 RetrieveArgumentDescriptionResponse,omitempty"`
    +	Fault_ *soap.Fault                                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RetrieveArgumentDescriptionBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RetrieveArgumentDescription(ctx context.Context, r soap.RoundTripper, req *types.RetrieveArgumentDescription) (*types.RetrieveArgumentDescriptionResponse, error) {
    +	var reqBody, resBody RetrieveArgumentDescriptionBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RetrieveClientCertBody struct {
    +	Req    *types.RetrieveClientCert         `xml:"urn:vim25 RetrieveClientCert,omitempty"`
    +	Res    *types.RetrieveClientCertResponse `xml:"urn:vim25 RetrieveClientCertResponse,omitempty"`
    +	Fault_ *soap.Fault                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RetrieveClientCertBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RetrieveClientCert(ctx context.Context, r soap.RoundTripper, req *types.RetrieveClientCert) (*types.RetrieveClientCertResponse, error) {
    +	var reqBody, resBody RetrieveClientCertBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RetrieveClientCsrBody struct {
    +	Req    *types.RetrieveClientCsr         `xml:"urn:vim25 RetrieveClientCsr,omitempty"`
    +	Res    *types.RetrieveClientCsrResponse `xml:"urn:vim25 RetrieveClientCsrResponse,omitempty"`
    +	Fault_ *soap.Fault                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RetrieveClientCsrBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RetrieveClientCsr(ctx context.Context, r soap.RoundTripper, req *types.RetrieveClientCsr) (*types.RetrieveClientCsrResponse, error) {
    +	var reqBody, resBody RetrieveClientCsrBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RetrieveDasAdvancedRuntimeInfoBody struct {
    +	Req    *types.RetrieveDasAdvancedRuntimeInfo         `xml:"urn:vim25 RetrieveDasAdvancedRuntimeInfo,omitempty"`
    +	Res    *types.RetrieveDasAdvancedRuntimeInfoResponse `xml:"urn:vim25 RetrieveDasAdvancedRuntimeInfoResponse,omitempty"`
    +	Fault_ *soap.Fault                                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RetrieveDasAdvancedRuntimeInfoBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RetrieveDasAdvancedRuntimeInfo(ctx context.Context, r soap.RoundTripper, req *types.RetrieveDasAdvancedRuntimeInfo) (*types.RetrieveDasAdvancedRuntimeInfoResponse, error) {
    +	var reqBody, resBody RetrieveDasAdvancedRuntimeInfoBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RetrieveDescriptionBody struct {
    +	Req    *types.RetrieveDescription         `xml:"urn:vim25 RetrieveDescription,omitempty"`
    +	Res    *types.RetrieveDescriptionResponse `xml:"urn:vim25 RetrieveDescriptionResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RetrieveDescriptionBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RetrieveDescription(ctx context.Context, r soap.RoundTripper, req *types.RetrieveDescription) (*types.RetrieveDescriptionResponse, error) {
    +	var reqBody, resBody RetrieveDescriptionBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RetrieveDiskPartitionInfoBody struct {
    +	Req    *types.RetrieveDiskPartitionInfo         `xml:"urn:vim25 RetrieveDiskPartitionInfo,omitempty"`
    +	Res    *types.RetrieveDiskPartitionInfoResponse `xml:"urn:vim25 RetrieveDiskPartitionInfoResponse,omitempty"`
    +	Fault_ *soap.Fault                              `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RetrieveDiskPartitionInfoBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RetrieveDiskPartitionInfo(ctx context.Context, r soap.RoundTripper, req *types.RetrieveDiskPartitionInfo) (*types.RetrieveDiskPartitionInfoResponse, error) {
    +	var reqBody, resBody RetrieveDiskPartitionInfoBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RetrieveEntityPermissionsBody struct {
    +	Req    *types.RetrieveEntityPermissions         `xml:"urn:vim25 RetrieveEntityPermissions,omitempty"`
    +	Res    *types.RetrieveEntityPermissionsResponse `xml:"urn:vim25 RetrieveEntityPermissionsResponse,omitempty"`
    +	Fault_ *soap.Fault                              `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RetrieveEntityPermissionsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RetrieveEntityPermissions(ctx context.Context, r soap.RoundTripper, req *types.RetrieveEntityPermissions) (*types.RetrieveEntityPermissionsResponse, error) {
    +	var reqBody, resBody RetrieveEntityPermissionsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RetrieveEntityScheduledTaskBody struct {
    +	Req    *types.RetrieveEntityScheduledTask         `xml:"urn:vim25 RetrieveEntityScheduledTask,omitempty"`
    +	Res    *types.RetrieveEntityScheduledTaskResponse `xml:"urn:vim25 RetrieveEntityScheduledTaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RetrieveEntityScheduledTaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RetrieveEntityScheduledTask(ctx context.Context, r soap.RoundTripper, req *types.RetrieveEntityScheduledTask) (*types.RetrieveEntityScheduledTaskResponse, error) {
    +	var reqBody, resBody RetrieveEntityScheduledTaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RetrieveHardwareUptimeBody struct {
    +	Req    *types.RetrieveHardwareUptime         `xml:"urn:vim25 RetrieveHardwareUptime,omitempty"`
    +	Res    *types.RetrieveHardwareUptimeResponse `xml:"urn:vim25 RetrieveHardwareUptimeResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RetrieveHardwareUptimeBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RetrieveHardwareUptime(ctx context.Context, r soap.RoundTripper, req *types.RetrieveHardwareUptime) (*types.RetrieveHardwareUptimeResponse, error) {
    +	var reqBody, resBody RetrieveHardwareUptimeBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RetrieveHostAccessControlEntriesBody struct {
    +	Req    *types.RetrieveHostAccessControlEntries         `xml:"urn:vim25 RetrieveHostAccessControlEntries,omitempty"`
    +	Res    *types.RetrieveHostAccessControlEntriesResponse `xml:"urn:vim25 RetrieveHostAccessControlEntriesResponse,omitempty"`
    +	Fault_ *soap.Fault                                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RetrieveHostAccessControlEntriesBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RetrieveHostAccessControlEntries(ctx context.Context, r soap.RoundTripper, req *types.RetrieveHostAccessControlEntries) (*types.RetrieveHostAccessControlEntriesResponse, error) {
    +	var reqBody, resBody RetrieveHostAccessControlEntriesBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RetrieveHostCustomizationsBody struct {
    +	Req    *types.RetrieveHostCustomizations         `xml:"urn:vim25 RetrieveHostCustomizations,omitempty"`
    +	Res    *types.RetrieveHostCustomizationsResponse `xml:"urn:vim25 RetrieveHostCustomizationsResponse,omitempty"`
    +	Fault_ *soap.Fault                               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RetrieveHostCustomizationsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RetrieveHostCustomizations(ctx context.Context, r soap.RoundTripper, req *types.RetrieveHostCustomizations) (*types.RetrieveHostCustomizationsResponse, error) {
    +	var reqBody, resBody RetrieveHostCustomizationsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RetrieveHostCustomizationsForProfileBody struct {
    +	Req    *types.RetrieveHostCustomizationsForProfile         `xml:"urn:vim25 RetrieveHostCustomizationsForProfile,omitempty"`
    +	Res    *types.RetrieveHostCustomizationsForProfileResponse `xml:"urn:vim25 RetrieveHostCustomizationsForProfileResponse,omitempty"`
    +	Fault_ *soap.Fault                                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RetrieveHostCustomizationsForProfileBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RetrieveHostCustomizationsForProfile(ctx context.Context, r soap.RoundTripper, req *types.RetrieveHostCustomizationsForProfile) (*types.RetrieveHostCustomizationsForProfileResponse, error) {
    +	var reqBody, resBody RetrieveHostCustomizationsForProfileBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RetrieveHostSpecificationBody struct {
    +	Req    *types.RetrieveHostSpecification         `xml:"urn:vim25 RetrieveHostSpecification,omitempty"`
    +	Res    *types.RetrieveHostSpecificationResponse `xml:"urn:vim25 RetrieveHostSpecificationResponse,omitempty"`
    +	Fault_ *soap.Fault                              `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RetrieveHostSpecificationBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RetrieveHostSpecification(ctx context.Context, r soap.RoundTripper, req *types.RetrieveHostSpecification) (*types.RetrieveHostSpecificationResponse, error) {
    +	var reqBody, resBody RetrieveHostSpecificationBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RetrieveKmipServerCertBody struct {
    +	Req    *types.RetrieveKmipServerCert         `xml:"urn:vim25 RetrieveKmipServerCert,omitempty"`
    +	Res    *types.RetrieveKmipServerCertResponse `xml:"urn:vim25 RetrieveKmipServerCertResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RetrieveKmipServerCertBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RetrieveKmipServerCert(ctx context.Context, r soap.RoundTripper, req *types.RetrieveKmipServerCert) (*types.RetrieveKmipServerCertResponse, error) {
    +	var reqBody, resBody RetrieveKmipServerCertBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RetrieveKmipServersStatus_TaskBody struct {
    +	Req    *types.RetrieveKmipServersStatus_Task         `xml:"urn:vim25 RetrieveKmipServersStatus_Task,omitempty"`
    +	Res    *types.RetrieveKmipServersStatus_TaskResponse `xml:"urn:vim25 RetrieveKmipServersStatus_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RetrieveKmipServersStatus_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RetrieveKmipServersStatus_Task(ctx context.Context, r soap.RoundTripper, req *types.RetrieveKmipServersStatus_Task) (*types.RetrieveKmipServersStatus_TaskResponse, error) {
    +	var reqBody, resBody RetrieveKmipServersStatus_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RetrieveObjectScheduledTaskBody struct {
    +	Req    *types.RetrieveObjectScheduledTask         `xml:"urn:vim25 RetrieveObjectScheduledTask,omitempty"`
    +	Res    *types.RetrieveObjectScheduledTaskResponse `xml:"urn:vim25 RetrieveObjectScheduledTaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RetrieveObjectScheduledTaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RetrieveObjectScheduledTask(ctx context.Context, r soap.RoundTripper, req *types.RetrieveObjectScheduledTask) (*types.RetrieveObjectScheduledTaskResponse, error) {
    +	var reqBody, resBody RetrieveObjectScheduledTaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RetrieveProductComponentsBody struct {
    +	Req    *types.RetrieveProductComponents         `xml:"urn:vim25 RetrieveProductComponents,omitempty"`
    +	Res    *types.RetrieveProductComponentsResponse `xml:"urn:vim25 RetrieveProductComponentsResponse,omitempty"`
    +	Fault_ *soap.Fault                              `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RetrieveProductComponentsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RetrieveProductComponents(ctx context.Context, r soap.RoundTripper, req *types.RetrieveProductComponents) (*types.RetrieveProductComponentsResponse, error) {
    +	var reqBody, resBody RetrieveProductComponentsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RetrievePropertiesBody struct {
    +	Req    *types.RetrieveProperties         `xml:"urn:vim25 RetrieveProperties,omitempty"`
    +	Res    *types.RetrievePropertiesResponse `xml:"urn:vim25 RetrievePropertiesResponse,omitempty"`
    +	Fault_ *soap.Fault                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RetrievePropertiesBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RetrieveProperties(ctx context.Context, r soap.RoundTripper, req *types.RetrieveProperties) (*types.RetrievePropertiesResponse, error) {
    +	var reqBody, resBody RetrievePropertiesBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RetrievePropertiesExBody struct {
    +	Req    *types.RetrievePropertiesEx         `xml:"urn:vim25 RetrievePropertiesEx,omitempty"`
    +	Res    *types.RetrievePropertiesExResponse `xml:"urn:vim25 RetrievePropertiesExResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RetrievePropertiesExBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RetrievePropertiesEx(ctx context.Context, r soap.RoundTripper, req *types.RetrievePropertiesEx) (*types.RetrievePropertiesExResponse, error) {
    +	var reqBody, resBody RetrievePropertiesExBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RetrieveRolePermissionsBody struct {
    +	Req    *types.RetrieveRolePermissions         `xml:"urn:vim25 RetrieveRolePermissions,omitempty"`
    +	Res    *types.RetrieveRolePermissionsResponse `xml:"urn:vim25 RetrieveRolePermissionsResponse,omitempty"`
    +	Fault_ *soap.Fault                            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RetrieveRolePermissionsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RetrieveRolePermissions(ctx context.Context, r soap.RoundTripper, req *types.RetrieveRolePermissions) (*types.RetrieveRolePermissionsResponse, error) {
    +	var reqBody, resBody RetrieveRolePermissionsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RetrieveSelfSignedClientCertBody struct {
    +	Req    *types.RetrieveSelfSignedClientCert         `xml:"urn:vim25 RetrieveSelfSignedClientCert,omitempty"`
    +	Res    *types.RetrieveSelfSignedClientCertResponse `xml:"urn:vim25 RetrieveSelfSignedClientCertResponse,omitempty"`
    +	Fault_ *soap.Fault                                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RetrieveSelfSignedClientCertBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RetrieveSelfSignedClientCert(ctx context.Context, r soap.RoundTripper, req *types.RetrieveSelfSignedClientCert) (*types.RetrieveSelfSignedClientCertResponse, error) {
    +	var reqBody, resBody RetrieveSelfSignedClientCertBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RetrieveServiceContentBody struct {
    +	Req    *types.RetrieveServiceContent         `xml:"urn:vim25 RetrieveServiceContent,omitempty"`
    +	Res    *types.RetrieveServiceContentResponse `xml:"urn:vim25 RetrieveServiceContentResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RetrieveServiceContentBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RetrieveServiceContent(ctx context.Context, r soap.RoundTripper, req *types.RetrieveServiceContent) (*types.RetrieveServiceContentResponse, error) {
    +	var reqBody, resBody RetrieveServiceContentBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RetrieveSnapshotInfoBody struct {
    +	Req    *types.RetrieveSnapshotInfo         `xml:"urn:vim25 RetrieveSnapshotInfo,omitempty"`
    +	Res    *types.RetrieveSnapshotInfoResponse `xml:"urn:vim25 RetrieveSnapshotInfoResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RetrieveSnapshotInfoBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RetrieveSnapshotInfo(ctx context.Context, r soap.RoundTripper, req *types.RetrieveSnapshotInfo) (*types.RetrieveSnapshotInfoResponse, error) {
    +	var reqBody, resBody RetrieveSnapshotInfoBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RetrieveUserGroupsBody struct {
    +	Req    *types.RetrieveUserGroups         `xml:"urn:vim25 RetrieveUserGroups,omitempty"`
    +	Res    *types.RetrieveUserGroupsResponse `xml:"urn:vim25 RetrieveUserGroupsResponse,omitempty"`
    +	Fault_ *soap.Fault                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RetrieveUserGroupsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RetrieveUserGroups(ctx context.Context, r soap.RoundTripper, req *types.RetrieveUserGroups) (*types.RetrieveUserGroupsResponse, error) {
    +	var reqBody, resBody RetrieveUserGroupsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RetrieveVStorageInfrastructureObjectPolicyBody struct {
    +	Req    *types.RetrieveVStorageInfrastructureObjectPolicy         `xml:"urn:vim25 RetrieveVStorageInfrastructureObjectPolicy,omitempty"`
    +	Res    *types.RetrieveVStorageInfrastructureObjectPolicyResponse `xml:"urn:vim25 RetrieveVStorageInfrastructureObjectPolicyResponse,omitempty"`
    +	Fault_ *soap.Fault                                               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RetrieveVStorageInfrastructureObjectPolicyBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RetrieveVStorageInfrastructureObjectPolicy(ctx context.Context, r soap.RoundTripper, req *types.RetrieveVStorageInfrastructureObjectPolicy) (*types.RetrieveVStorageInfrastructureObjectPolicyResponse, error) {
    +	var reqBody, resBody RetrieveVStorageInfrastructureObjectPolicyBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RetrieveVStorageObjectBody struct {
    +	Req    *types.RetrieveVStorageObject         `xml:"urn:vim25 RetrieveVStorageObject,omitempty"`
    +	Res    *types.RetrieveVStorageObjectResponse `xml:"urn:vim25 RetrieveVStorageObjectResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RetrieveVStorageObjectBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RetrieveVStorageObject(ctx context.Context, r soap.RoundTripper, req *types.RetrieveVStorageObject) (*types.RetrieveVStorageObjectResponse, error) {
    +	var reqBody, resBody RetrieveVStorageObjectBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RetrieveVStorageObjectAssociationsBody struct {
    +	Req    *types.RetrieveVStorageObjectAssociations         `xml:"urn:vim25 RetrieveVStorageObjectAssociations,omitempty"`
    +	Res    *types.RetrieveVStorageObjectAssociationsResponse `xml:"urn:vim25 RetrieveVStorageObjectAssociationsResponse,omitempty"`
    +	Fault_ *soap.Fault                                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RetrieveVStorageObjectAssociationsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RetrieveVStorageObjectAssociations(ctx context.Context, r soap.RoundTripper, req *types.RetrieveVStorageObjectAssociations) (*types.RetrieveVStorageObjectAssociationsResponse, error) {
    +	var reqBody, resBody RetrieveVStorageObjectAssociationsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RetrieveVStorageObjectStateBody struct {
    +	Req    *types.RetrieveVStorageObjectState         `xml:"urn:vim25 RetrieveVStorageObjectState,omitempty"`
    +	Res    *types.RetrieveVStorageObjectStateResponse `xml:"urn:vim25 RetrieveVStorageObjectStateResponse,omitempty"`
    +	Fault_ *soap.Fault                                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RetrieveVStorageObjectStateBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RetrieveVStorageObjectState(ctx context.Context, r soap.RoundTripper, req *types.RetrieveVStorageObjectState) (*types.RetrieveVStorageObjectStateResponse, error) {
    +	var reqBody, resBody RetrieveVStorageObjectStateBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RevertToCurrentSnapshot_TaskBody struct {
    +	Req    *types.RevertToCurrentSnapshot_Task         `xml:"urn:vim25 RevertToCurrentSnapshot_Task,omitempty"`
    +	Res    *types.RevertToCurrentSnapshot_TaskResponse `xml:"urn:vim25 RevertToCurrentSnapshot_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RevertToCurrentSnapshot_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RevertToCurrentSnapshot_Task(ctx context.Context, r soap.RoundTripper, req *types.RevertToCurrentSnapshot_Task) (*types.RevertToCurrentSnapshot_TaskResponse, error) {
    +	var reqBody, resBody RevertToCurrentSnapshot_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RevertToSnapshot_TaskBody struct {
    +	Req    *types.RevertToSnapshot_Task         `xml:"urn:vim25 RevertToSnapshot_Task,omitempty"`
    +	Res    *types.RevertToSnapshot_TaskResponse `xml:"urn:vim25 RevertToSnapshot_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RevertToSnapshot_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RevertToSnapshot_Task(ctx context.Context, r soap.RoundTripper, req *types.RevertToSnapshot_Task) (*types.RevertToSnapshot_TaskResponse, error) {
    +	var reqBody, resBody RevertToSnapshot_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RevertVStorageObject_TaskBody struct {
    +	Req    *types.RevertVStorageObject_Task         `xml:"urn:vim25 RevertVStorageObject_Task,omitempty"`
    +	Res    *types.RevertVStorageObject_TaskResponse `xml:"urn:vim25 RevertVStorageObject_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                              `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RevertVStorageObject_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RevertVStorageObject_Task(ctx context.Context, r soap.RoundTripper, req *types.RevertVStorageObject_Task) (*types.RevertVStorageObject_TaskResponse, error) {
    +	var reqBody, resBody RevertVStorageObject_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RewindCollectorBody struct {
    +	Req    *types.RewindCollector         `xml:"urn:vim25 RewindCollector,omitempty"`
    +	Res    *types.RewindCollectorResponse `xml:"urn:vim25 RewindCollectorResponse,omitempty"`
    +	Fault_ *soap.Fault                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RewindCollectorBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RewindCollector(ctx context.Context, r soap.RoundTripper, req *types.RewindCollector) (*types.RewindCollectorResponse, error) {
    +	var reqBody, resBody RewindCollectorBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RunScheduledTaskBody struct {
    +	Req    *types.RunScheduledTask         `xml:"urn:vim25 RunScheduledTask,omitempty"`
    +	Res    *types.RunScheduledTaskResponse `xml:"urn:vim25 RunScheduledTaskResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RunScheduledTaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RunScheduledTask(ctx context.Context, r soap.RoundTripper, req *types.RunScheduledTask) (*types.RunScheduledTaskResponse, error) {
    +	var reqBody, resBody RunScheduledTaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type RunVsanPhysicalDiskDiagnosticsBody struct {
    +	Req    *types.RunVsanPhysicalDiskDiagnostics         `xml:"urn:vim25 RunVsanPhysicalDiskDiagnostics,omitempty"`
    +	Res    *types.RunVsanPhysicalDiskDiagnosticsResponse `xml:"urn:vim25 RunVsanPhysicalDiskDiagnosticsResponse,omitempty"`
    +	Fault_ *soap.Fault                                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *RunVsanPhysicalDiskDiagnosticsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func RunVsanPhysicalDiskDiagnostics(ctx context.Context, r soap.RoundTripper, req *types.RunVsanPhysicalDiskDiagnostics) (*types.RunVsanPhysicalDiskDiagnosticsResponse, error) {
    +	var reqBody, resBody RunVsanPhysicalDiskDiagnosticsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ScanHostPatchV2_TaskBody struct {
    +	Req    *types.ScanHostPatchV2_Task         `xml:"urn:vim25 ScanHostPatchV2_Task,omitempty"`
    +	Res    *types.ScanHostPatchV2_TaskResponse `xml:"urn:vim25 ScanHostPatchV2_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ScanHostPatchV2_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ScanHostPatchV2_Task(ctx context.Context, r soap.RoundTripper, req *types.ScanHostPatchV2_Task) (*types.ScanHostPatchV2_TaskResponse, error) {
    +	var reqBody, resBody ScanHostPatchV2_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ScanHostPatch_TaskBody struct {
    +	Req    *types.ScanHostPatch_Task         `xml:"urn:vim25 ScanHostPatch_Task,omitempty"`
    +	Res    *types.ScanHostPatch_TaskResponse `xml:"urn:vim25 ScanHostPatch_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ScanHostPatch_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ScanHostPatch_Task(ctx context.Context, r soap.RoundTripper, req *types.ScanHostPatch_Task) (*types.ScanHostPatch_TaskResponse, error) {
    +	var reqBody, resBody ScanHostPatch_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ScheduleReconcileDatastoreInventoryBody struct {
    +	Req    *types.ScheduleReconcileDatastoreInventory         `xml:"urn:vim25 ScheduleReconcileDatastoreInventory,omitempty"`
    +	Res    *types.ScheduleReconcileDatastoreInventoryResponse `xml:"urn:vim25 ScheduleReconcileDatastoreInventoryResponse,omitempty"`
    +	Fault_ *soap.Fault                                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ScheduleReconcileDatastoreInventoryBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ScheduleReconcileDatastoreInventory(ctx context.Context, r soap.RoundTripper, req *types.ScheduleReconcileDatastoreInventory) (*types.ScheduleReconcileDatastoreInventoryResponse, error) {
    +	var reqBody, resBody ScheduleReconcileDatastoreInventoryBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type SearchDatastoreSubFolders_TaskBody struct {
    +	Req    *types.SearchDatastoreSubFolders_Task         `xml:"urn:vim25 SearchDatastoreSubFolders_Task,omitempty"`
    +	Res    *types.SearchDatastoreSubFolders_TaskResponse `xml:"urn:vim25 SearchDatastoreSubFolders_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *SearchDatastoreSubFolders_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func SearchDatastoreSubFolders_Task(ctx context.Context, r soap.RoundTripper, req *types.SearchDatastoreSubFolders_Task) (*types.SearchDatastoreSubFolders_TaskResponse, error) {
    +	var reqBody, resBody SearchDatastoreSubFolders_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type SearchDatastore_TaskBody struct {
    +	Req    *types.SearchDatastore_Task         `xml:"urn:vim25 SearchDatastore_Task,omitempty"`
    +	Res    *types.SearchDatastore_TaskResponse `xml:"urn:vim25 SearchDatastore_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *SearchDatastore_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func SearchDatastore_Task(ctx context.Context, r soap.RoundTripper, req *types.SearchDatastore_Task) (*types.SearchDatastore_TaskResponse, error) {
    +	var reqBody, resBody SearchDatastore_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type SelectActivePartitionBody struct {
    +	Req    *types.SelectActivePartition         `xml:"urn:vim25 SelectActivePartition,omitempty"`
    +	Res    *types.SelectActivePartitionResponse `xml:"urn:vim25 SelectActivePartitionResponse,omitempty"`
    +	Fault_ *soap.Fault                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *SelectActivePartitionBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func SelectActivePartition(ctx context.Context, r soap.RoundTripper, req *types.SelectActivePartition) (*types.SelectActivePartitionResponse, error) {
    +	var reqBody, resBody SelectActivePartitionBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type SelectVnicBody struct {
    +	Req    *types.SelectVnic         `xml:"urn:vim25 SelectVnic,omitempty"`
    +	Res    *types.SelectVnicResponse `xml:"urn:vim25 SelectVnicResponse,omitempty"`
    +	Fault_ *soap.Fault               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *SelectVnicBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func SelectVnic(ctx context.Context, r soap.RoundTripper, req *types.SelectVnic) (*types.SelectVnicResponse, error) {
    +	var reqBody, resBody SelectVnicBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type SelectVnicForNicTypeBody struct {
    +	Req    *types.SelectVnicForNicType         `xml:"urn:vim25 SelectVnicForNicType,omitempty"`
    +	Res    *types.SelectVnicForNicTypeResponse `xml:"urn:vim25 SelectVnicForNicTypeResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *SelectVnicForNicTypeBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func SelectVnicForNicType(ctx context.Context, r soap.RoundTripper, req *types.SelectVnicForNicType) (*types.SelectVnicForNicTypeResponse, error) {
    +	var reqBody, resBody SelectVnicForNicTypeBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type SendNMIBody struct {
    +	Req    *types.SendNMI         `xml:"urn:vim25 SendNMI,omitempty"`
    +	Res    *types.SendNMIResponse `xml:"urn:vim25 SendNMIResponse,omitempty"`
    +	Fault_ *soap.Fault            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *SendNMIBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func SendNMI(ctx context.Context, r soap.RoundTripper, req *types.SendNMI) (*types.SendNMIResponse, error) {
    +	var reqBody, resBody SendNMIBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type SendTestNotificationBody struct {
    +	Req    *types.SendTestNotification         `xml:"urn:vim25 SendTestNotification,omitempty"`
    +	Res    *types.SendTestNotificationResponse `xml:"urn:vim25 SendTestNotificationResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *SendTestNotificationBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func SendTestNotification(ctx context.Context, r soap.RoundTripper, req *types.SendTestNotification) (*types.SendTestNotificationResponse, error) {
    +	var reqBody, resBody SendTestNotificationBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type SessionIsActiveBody struct {
    +	Req    *types.SessionIsActive         `xml:"urn:vim25 SessionIsActive,omitempty"`
    +	Res    *types.SessionIsActiveResponse `xml:"urn:vim25 SessionIsActiveResponse,omitempty"`
    +	Fault_ *soap.Fault                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *SessionIsActiveBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func SessionIsActive(ctx context.Context, r soap.RoundTripper, req *types.SessionIsActive) (*types.SessionIsActiveResponse, error) {
    +	var reqBody, resBody SessionIsActiveBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type SetCollectorPageSizeBody struct {
    +	Req    *types.SetCollectorPageSize         `xml:"urn:vim25 SetCollectorPageSize,omitempty"`
    +	Res    *types.SetCollectorPageSizeResponse `xml:"urn:vim25 SetCollectorPageSizeResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *SetCollectorPageSizeBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func SetCollectorPageSize(ctx context.Context, r soap.RoundTripper, req *types.SetCollectorPageSize) (*types.SetCollectorPageSizeResponse, error) {
    +	var reqBody, resBody SetCollectorPageSizeBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type SetDisplayTopologyBody struct {
    +	Req    *types.SetDisplayTopology         `xml:"urn:vim25 SetDisplayTopology,omitempty"`
    +	Res    *types.SetDisplayTopologyResponse `xml:"urn:vim25 SetDisplayTopologyResponse,omitempty"`
    +	Fault_ *soap.Fault                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *SetDisplayTopologyBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func SetDisplayTopology(ctx context.Context, r soap.RoundTripper, req *types.SetDisplayTopology) (*types.SetDisplayTopologyResponse, error) {
    +	var reqBody, resBody SetDisplayTopologyBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type SetEntityPermissionsBody struct {
    +	Req    *types.SetEntityPermissions         `xml:"urn:vim25 SetEntityPermissions,omitempty"`
    +	Res    *types.SetEntityPermissionsResponse `xml:"urn:vim25 SetEntityPermissionsResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *SetEntityPermissionsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func SetEntityPermissions(ctx context.Context, r soap.RoundTripper, req *types.SetEntityPermissions) (*types.SetEntityPermissionsResponse, error) {
    +	var reqBody, resBody SetEntityPermissionsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type SetExtensionCertificateBody struct {
    +	Req    *types.SetExtensionCertificate         `xml:"urn:vim25 SetExtensionCertificate,omitempty"`
    +	Res    *types.SetExtensionCertificateResponse `xml:"urn:vim25 SetExtensionCertificateResponse,omitempty"`
    +	Fault_ *soap.Fault                            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *SetExtensionCertificateBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func SetExtensionCertificate(ctx context.Context, r soap.RoundTripper, req *types.SetExtensionCertificate) (*types.SetExtensionCertificateResponse, error) {
    +	var reqBody, resBody SetExtensionCertificateBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type SetFieldBody struct {
    +	Req    *types.SetField         `xml:"urn:vim25 SetField,omitempty"`
    +	Res    *types.SetFieldResponse `xml:"urn:vim25 SetFieldResponse,omitempty"`
    +	Fault_ *soap.Fault             `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *SetFieldBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func SetField(ctx context.Context, r soap.RoundTripper, req *types.SetField) (*types.SetFieldResponse, error) {
    +	var reqBody, resBody SetFieldBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type SetLicenseEditionBody struct {
    +	Req    *types.SetLicenseEdition         `xml:"urn:vim25 SetLicenseEdition,omitempty"`
    +	Res    *types.SetLicenseEditionResponse `xml:"urn:vim25 SetLicenseEditionResponse,omitempty"`
    +	Fault_ *soap.Fault                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *SetLicenseEditionBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func SetLicenseEdition(ctx context.Context, r soap.RoundTripper, req *types.SetLicenseEdition) (*types.SetLicenseEditionResponse, error) {
    +	var reqBody, resBody SetLicenseEditionBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type SetLocaleBody struct {
    +	Req    *types.SetLocale         `xml:"urn:vim25 SetLocale,omitempty"`
    +	Res    *types.SetLocaleResponse `xml:"urn:vim25 SetLocaleResponse,omitempty"`
    +	Fault_ *soap.Fault              `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *SetLocaleBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func SetLocale(ctx context.Context, r soap.RoundTripper, req *types.SetLocale) (*types.SetLocaleResponse, error) {
    +	var reqBody, resBody SetLocaleBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type SetMultipathLunPolicyBody struct {
    +	Req    *types.SetMultipathLunPolicy         `xml:"urn:vim25 SetMultipathLunPolicy,omitempty"`
    +	Res    *types.SetMultipathLunPolicyResponse `xml:"urn:vim25 SetMultipathLunPolicyResponse,omitempty"`
    +	Fault_ *soap.Fault                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *SetMultipathLunPolicyBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func SetMultipathLunPolicy(ctx context.Context, r soap.RoundTripper, req *types.SetMultipathLunPolicy) (*types.SetMultipathLunPolicyResponse, error) {
    +	var reqBody, resBody SetMultipathLunPolicyBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type SetNFSUserBody struct {
    +	Req    *types.SetNFSUser         `xml:"urn:vim25 SetNFSUser,omitempty"`
    +	Res    *types.SetNFSUserResponse `xml:"urn:vim25 SetNFSUserResponse,omitempty"`
    +	Fault_ *soap.Fault               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *SetNFSUserBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func SetNFSUser(ctx context.Context, r soap.RoundTripper, req *types.SetNFSUser) (*types.SetNFSUserResponse, error) {
    +	var reqBody, resBody SetNFSUserBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type SetPublicKeyBody struct {
    +	Req    *types.SetPublicKey         `xml:"urn:vim25 SetPublicKey,omitempty"`
    +	Res    *types.SetPublicKeyResponse `xml:"urn:vim25 SetPublicKeyResponse,omitempty"`
    +	Fault_ *soap.Fault                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *SetPublicKeyBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func SetPublicKey(ctx context.Context, r soap.RoundTripper, req *types.SetPublicKey) (*types.SetPublicKeyResponse, error) {
    +	var reqBody, resBody SetPublicKeyBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type SetRegistryValueInGuestBody struct {
    +	Req    *types.SetRegistryValueInGuest         `xml:"urn:vim25 SetRegistryValueInGuest,omitempty"`
    +	Res    *types.SetRegistryValueInGuestResponse `xml:"urn:vim25 SetRegistryValueInGuestResponse,omitempty"`
    +	Fault_ *soap.Fault                            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *SetRegistryValueInGuestBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func SetRegistryValueInGuest(ctx context.Context, r soap.RoundTripper, req *types.SetRegistryValueInGuest) (*types.SetRegistryValueInGuestResponse, error) {
    +	var reqBody, resBody SetRegistryValueInGuestBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type SetScreenResolutionBody struct {
    +	Req    *types.SetScreenResolution         `xml:"urn:vim25 SetScreenResolution,omitempty"`
    +	Res    *types.SetScreenResolutionResponse `xml:"urn:vim25 SetScreenResolutionResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *SetScreenResolutionBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func SetScreenResolution(ctx context.Context, r soap.RoundTripper, req *types.SetScreenResolution) (*types.SetScreenResolutionResponse, error) {
    +	var reqBody, resBody SetScreenResolutionBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type SetTaskDescriptionBody struct {
    +	Req    *types.SetTaskDescription         `xml:"urn:vim25 SetTaskDescription,omitempty"`
    +	Res    *types.SetTaskDescriptionResponse `xml:"urn:vim25 SetTaskDescriptionResponse,omitempty"`
    +	Fault_ *soap.Fault                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *SetTaskDescriptionBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func SetTaskDescription(ctx context.Context, r soap.RoundTripper, req *types.SetTaskDescription) (*types.SetTaskDescriptionResponse, error) {
    +	var reqBody, resBody SetTaskDescriptionBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type SetTaskStateBody struct {
    +	Req    *types.SetTaskState         `xml:"urn:vim25 SetTaskState,omitempty"`
    +	Res    *types.SetTaskStateResponse `xml:"urn:vim25 SetTaskStateResponse,omitempty"`
    +	Fault_ *soap.Fault                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *SetTaskStateBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func SetTaskState(ctx context.Context, r soap.RoundTripper, req *types.SetTaskState) (*types.SetTaskStateResponse, error) {
    +	var reqBody, resBody SetTaskStateBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type SetVStorageObjectControlFlagsBody struct {
    +	Req    *types.SetVStorageObjectControlFlags         `xml:"urn:vim25 SetVStorageObjectControlFlags,omitempty"`
    +	Res    *types.SetVStorageObjectControlFlagsResponse `xml:"urn:vim25 SetVStorageObjectControlFlagsResponse,omitempty"`
    +	Fault_ *soap.Fault                                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *SetVStorageObjectControlFlagsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func SetVStorageObjectControlFlags(ctx context.Context, r soap.RoundTripper, req *types.SetVStorageObjectControlFlags) (*types.SetVStorageObjectControlFlagsResponse, error) {
    +	var reqBody, resBody SetVStorageObjectControlFlagsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type SetVirtualDiskUuidBody struct {
    +	Req    *types.SetVirtualDiskUuid         `xml:"urn:vim25 SetVirtualDiskUuid,omitempty"`
    +	Res    *types.SetVirtualDiskUuidResponse `xml:"urn:vim25 SetVirtualDiskUuidResponse,omitempty"`
    +	Fault_ *soap.Fault                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *SetVirtualDiskUuidBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func SetVirtualDiskUuid(ctx context.Context, r soap.RoundTripper, req *types.SetVirtualDiskUuid) (*types.SetVirtualDiskUuidResponse, error) {
    +	var reqBody, resBody SetVirtualDiskUuidBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ShrinkVirtualDisk_TaskBody struct {
    +	Req    *types.ShrinkVirtualDisk_Task         `xml:"urn:vim25 ShrinkVirtualDisk_Task,omitempty"`
    +	Res    *types.ShrinkVirtualDisk_TaskResponse `xml:"urn:vim25 ShrinkVirtualDisk_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ShrinkVirtualDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ShrinkVirtualDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.ShrinkVirtualDisk_Task) (*types.ShrinkVirtualDisk_TaskResponse, error) {
    +	var reqBody, resBody ShrinkVirtualDisk_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ShutdownGuestBody struct {
    +	Req    *types.ShutdownGuest         `xml:"urn:vim25 ShutdownGuest,omitempty"`
    +	Res    *types.ShutdownGuestResponse `xml:"urn:vim25 ShutdownGuestResponse,omitempty"`
    +	Fault_ *soap.Fault                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ShutdownGuestBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ShutdownGuest(ctx context.Context, r soap.RoundTripper, req *types.ShutdownGuest) (*types.ShutdownGuestResponse, error) {
    +	var reqBody, resBody ShutdownGuestBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ShutdownHost_TaskBody struct {
    +	Req    *types.ShutdownHost_Task         `xml:"urn:vim25 ShutdownHost_Task,omitempty"`
    +	Res    *types.ShutdownHost_TaskResponse `xml:"urn:vim25 ShutdownHost_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ShutdownHost_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ShutdownHost_Task(ctx context.Context, r soap.RoundTripper, req *types.ShutdownHost_Task) (*types.ShutdownHost_TaskResponse, error) {
    +	var reqBody, resBody ShutdownHost_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type StageHostPatch_TaskBody struct {
    +	Req    *types.StageHostPatch_Task         `xml:"urn:vim25 StageHostPatch_Task,omitempty"`
    +	Res    *types.StageHostPatch_TaskResponse `xml:"urn:vim25 StageHostPatch_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *StageHostPatch_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func StageHostPatch_Task(ctx context.Context, r soap.RoundTripper, req *types.StageHostPatch_Task) (*types.StageHostPatch_TaskResponse, error) {
    +	var reqBody, resBody StageHostPatch_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type StampAllRulesWithUuid_TaskBody struct {
    +	Req    *types.StampAllRulesWithUuid_Task         `xml:"urn:vim25 StampAllRulesWithUuid_Task,omitempty"`
    +	Res    *types.StampAllRulesWithUuid_TaskResponse `xml:"urn:vim25 StampAllRulesWithUuid_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *StampAllRulesWithUuid_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func StampAllRulesWithUuid_Task(ctx context.Context, r soap.RoundTripper, req *types.StampAllRulesWithUuid_Task) (*types.StampAllRulesWithUuid_TaskResponse, error) {
    +	var reqBody, resBody StampAllRulesWithUuid_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type StandbyGuestBody struct {
    +	Req    *types.StandbyGuest         `xml:"urn:vim25 StandbyGuest,omitempty"`
    +	Res    *types.StandbyGuestResponse `xml:"urn:vim25 StandbyGuestResponse,omitempty"`
    +	Fault_ *soap.Fault                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *StandbyGuestBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func StandbyGuest(ctx context.Context, r soap.RoundTripper, req *types.StandbyGuest) (*types.StandbyGuestResponse, error) {
    +	var reqBody, resBody StandbyGuestBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type StartProgramInGuestBody struct {
    +	Req    *types.StartProgramInGuest         `xml:"urn:vim25 StartProgramInGuest,omitempty"`
    +	Res    *types.StartProgramInGuestResponse `xml:"urn:vim25 StartProgramInGuestResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *StartProgramInGuestBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func StartProgramInGuest(ctx context.Context, r soap.RoundTripper, req *types.StartProgramInGuest) (*types.StartProgramInGuestResponse, error) {
    +	var reqBody, resBody StartProgramInGuestBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type StartRecording_TaskBody struct {
    +	Req    *types.StartRecording_Task         `xml:"urn:vim25 StartRecording_Task,omitempty"`
    +	Res    *types.StartRecording_TaskResponse `xml:"urn:vim25 StartRecording_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *StartRecording_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func StartRecording_Task(ctx context.Context, r soap.RoundTripper, req *types.StartRecording_Task) (*types.StartRecording_TaskResponse, error) {
    +	var reqBody, resBody StartRecording_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type StartReplaying_TaskBody struct {
    +	Req    *types.StartReplaying_Task         `xml:"urn:vim25 StartReplaying_Task,omitempty"`
    +	Res    *types.StartReplaying_TaskResponse `xml:"urn:vim25 StartReplaying_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *StartReplaying_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func StartReplaying_Task(ctx context.Context, r soap.RoundTripper, req *types.StartReplaying_Task) (*types.StartReplaying_TaskResponse, error) {
    +	var reqBody, resBody StartReplaying_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type StartServiceBody struct {
    +	Req    *types.StartService         `xml:"urn:vim25 StartService,omitempty"`
    +	Res    *types.StartServiceResponse `xml:"urn:vim25 StartServiceResponse,omitempty"`
    +	Fault_ *soap.Fault                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *StartServiceBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func StartService(ctx context.Context, r soap.RoundTripper, req *types.StartService) (*types.StartServiceResponse, error) {
    +	var reqBody, resBody StartServiceBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type StopRecording_TaskBody struct {
    +	Req    *types.StopRecording_Task         `xml:"urn:vim25 StopRecording_Task,omitempty"`
    +	Res    *types.StopRecording_TaskResponse `xml:"urn:vim25 StopRecording_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *StopRecording_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func StopRecording_Task(ctx context.Context, r soap.RoundTripper, req *types.StopRecording_Task) (*types.StopRecording_TaskResponse, error) {
    +	var reqBody, resBody StopRecording_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type StopReplaying_TaskBody struct {
    +	Req    *types.StopReplaying_Task         `xml:"urn:vim25 StopReplaying_Task,omitempty"`
    +	Res    *types.StopReplaying_TaskResponse `xml:"urn:vim25 StopReplaying_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *StopReplaying_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func StopReplaying_Task(ctx context.Context, r soap.RoundTripper, req *types.StopReplaying_Task) (*types.StopReplaying_TaskResponse, error) {
    +	var reqBody, resBody StopReplaying_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type StopServiceBody struct {
    +	Req    *types.StopService         `xml:"urn:vim25 StopService,omitempty"`
    +	Res    *types.StopServiceResponse `xml:"urn:vim25 StopServiceResponse,omitempty"`
    +	Fault_ *soap.Fault                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *StopServiceBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func StopService(ctx context.Context, r soap.RoundTripper, req *types.StopService) (*types.StopServiceResponse, error) {
    +	var reqBody, resBody StopServiceBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type SuspendVApp_TaskBody struct {
    +	Req    *types.SuspendVApp_Task         `xml:"urn:vim25 SuspendVApp_Task,omitempty"`
    +	Res    *types.SuspendVApp_TaskResponse `xml:"urn:vim25 SuspendVApp_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *SuspendVApp_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func SuspendVApp_Task(ctx context.Context, r soap.RoundTripper, req *types.SuspendVApp_Task) (*types.SuspendVApp_TaskResponse, error) {
    +	var reqBody, resBody SuspendVApp_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type SuspendVM_TaskBody struct {
    +	Req    *types.SuspendVM_Task         `xml:"urn:vim25 SuspendVM_Task,omitempty"`
    +	Res    *types.SuspendVM_TaskResponse `xml:"urn:vim25 SuspendVM_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *SuspendVM_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func SuspendVM_Task(ctx context.Context, r soap.RoundTripper, req *types.SuspendVM_Task) (*types.SuspendVM_TaskResponse, error) {
    +	var reqBody, resBody SuspendVM_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type TerminateFaultTolerantVM_TaskBody struct {
    +	Req    *types.TerminateFaultTolerantVM_Task         `xml:"urn:vim25 TerminateFaultTolerantVM_Task,omitempty"`
    +	Res    *types.TerminateFaultTolerantVM_TaskResponse `xml:"urn:vim25 TerminateFaultTolerantVM_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *TerminateFaultTolerantVM_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func TerminateFaultTolerantVM_Task(ctx context.Context, r soap.RoundTripper, req *types.TerminateFaultTolerantVM_Task) (*types.TerminateFaultTolerantVM_TaskResponse, error) {
    +	var reqBody, resBody TerminateFaultTolerantVM_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type TerminateProcessInGuestBody struct {
    +	Req    *types.TerminateProcessInGuest         `xml:"urn:vim25 TerminateProcessInGuest,omitempty"`
    +	Res    *types.TerminateProcessInGuestResponse `xml:"urn:vim25 TerminateProcessInGuestResponse,omitempty"`
    +	Fault_ *soap.Fault                            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *TerminateProcessInGuestBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func TerminateProcessInGuest(ctx context.Context, r soap.RoundTripper, req *types.TerminateProcessInGuest) (*types.TerminateProcessInGuestResponse, error) {
    +	var reqBody, resBody TerminateProcessInGuestBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type TerminateSessionBody struct {
    +	Req    *types.TerminateSession         `xml:"urn:vim25 TerminateSession,omitempty"`
    +	Res    *types.TerminateSessionResponse `xml:"urn:vim25 TerminateSessionResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *TerminateSessionBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func TerminateSession(ctx context.Context, r soap.RoundTripper, req *types.TerminateSession) (*types.TerminateSessionResponse, error) {
    +	var reqBody, resBody TerminateSessionBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type TerminateVMBody struct {
    +	Req    *types.TerminateVM         `xml:"urn:vim25 TerminateVM,omitempty"`
    +	Res    *types.TerminateVMResponse `xml:"urn:vim25 TerminateVMResponse,omitempty"`
    +	Fault_ *soap.Fault                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *TerminateVMBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func TerminateVM(ctx context.Context, r soap.RoundTripper, req *types.TerminateVM) (*types.TerminateVMResponse, error) {
    +	var reqBody, resBody TerminateVMBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type TurnDiskLocatorLedOff_TaskBody struct {
    +	Req    *types.TurnDiskLocatorLedOff_Task         `xml:"urn:vim25 TurnDiskLocatorLedOff_Task,omitempty"`
    +	Res    *types.TurnDiskLocatorLedOff_TaskResponse `xml:"urn:vim25 TurnDiskLocatorLedOff_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *TurnDiskLocatorLedOff_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func TurnDiskLocatorLedOff_Task(ctx context.Context, r soap.RoundTripper, req *types.TurnDiskLocatorLedOff_Task) (*types.TurnDiskLocatorLedOff_TaskResponse, error) {
    +	var reqBody, resBody TurnDiskLocatorLedOff_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type TurnDiskLocatorLedOn_TaskBody struct {
    +	Req    *types.TurnDiskLocatorLedOn_Task         `xml:"urn:vim25 TurnDiskLocatorLedOn_Task,omitempty"`
    +	Res    *types.TurnDiskLocatorLedOn_TaskResponse `xml:"urn:vim25 TurnDiskLocatorLedOn_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                              `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *TurnDiskLocatorLedOn_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func TurnDiskLocatorLedOn_Task(ctx context.Context, r soap.RoundTripper, req *types.TurnDiskLocatorLedOn_Task) (*types.TurnDiskLocatorLedOn_TaskResponse, error) {
    +	var reqBody, resBody TurnDiskLocatorLedOn_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type TurnOffFaultToleranceForVM_TaskBody struct {
    +	Req    *types.TurnOffFaultToleranceForVM_Task         `xml:"urn:vim25 TurnOffFaultToleranceForVM_Task,omitempty"`
    +	Res    *types.TurnOffFaultToleranceForVM_TaskResponse `xml:"urn:vim25 TurnOffFaultToleranceForVM_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *TurnOffFaultToleranceForVM_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func TurnOffFaultToleranceForVM_Task(ctx context.Context, r soap.RoundTripper, req *types.TurnOffFaultToleranceForVM_Task) (*types.TurnOffFaultToleranceForVM_TaskResponse, error) {
    +	var reqBody, resBody TurnOffFaultToleranceForVM_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UnassignUserFromGroupBody struct {
    +	Req    *types.UnassignUserFromGroup         `xml:"urn:vim25 UnassignUserFromGroup,omitempty"`
    +	Res    *types.UnassignUserFromGroupResponse `xml:"urn:vim25 UnassignUserFromGroupResponse,omitempty"`
    +	Fault_ *soap.Fault                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UnassignUserFromGroupBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UnassignUserFromGroup(ctx context.Context, r soap.RoundTripper, req *types.UnassignUserFromGroup) (*types.UnassignUserFromGroupResponse, error) {
    +	var reqBody, resBody UnassignUserFromGroupBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UnbindVnicBody struct {
    +	Req    *types.UnbindVnic         `xml:"urn:vim25 UnbindVnic,omitempty"`
    +	Res    *types.UnbindVnicResponse `xml:"urn:vim25 UnbindVnicResponse,omitempty"`
    +	Fault_ *soap.Fault               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UnbindVnicBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UnbindVnic(ctx context.Context, r soap.RoundTripper, req *types.UnbindVnic) (*types.UnbindVnicResponse, error) {
    +	var reqBody, resBody UnbindVnicBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UninstallHostPatch_TaskBody struct {
    +	Req    *types.UninstallHostPatch_Task         `xml:"urn:vim25 UninstallHostPatch_Task,omitempty"`
    +	Res    *types.UninstallHostPatch_TaskResponse `xml:"urn:vim25 UninstallHostPatch_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UninstallHostPatch_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UninstallHostPatch_Task(ctx context.Context, r soap.RoundTripper, req *types.UninstallHostPatch_Task) (*types.UninstallHostPatch_TaskResponse, error) {
    +	var reqBody, resBody UninstallHostPatch_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UninstallIoFilter_TaskBody struct {
    +	Req    *types.UninstallIoFilter_Task         `xml:"urn:vim25 UninstallIoFilter_Task,omitempty"`
    +	Res    *types.UninstallIoFilter_TaskResponse `xml:"urn:vim25 UninstallIoFilter_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UninstallIoFilter_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UninstallIoFilter_Task(ctx context.Context, r soap.RoundTripper, req *types.UninstallIoFilter_Task) (*types.UninstallIoFilter_TaskResponse, error) {
    +	var reqBody, resBody UninstallIoFilter_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UninstallServiceBody struct {
    +	Req    *types.UninstallService         `xml:"urn:vim25 UninstallService,omitempty"`
    +	Res    *types.UninstallServiceResponse `xml:"urn:vim25 UninstallServiceResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UninstallServiceBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UninstallService(ctx context.Context, r soap.RoundTripper, req *types.UninstallService) (*types.UninstallServiceResponse, error) {
    +	var reqBody, resBody UninstallServiceBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UnmapVmfsVolumeEx_TaskBody struct {
    +	Req    *types.UnmapVmfsVolumeEx_Task         `xml:"urn:vim25 UnmapVmfsVolumeEx_Task,omitempty"`
    +	Res    *types.UnmapVmfsVolumeEx_TaskResponse `xml:"urn:vim25 UnmapVmfsVolumeEx_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UnmapVmfsVolumeEx_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UnmapVmfsVolumeEx_Task(ctx context.Context, r soap.RoundTripper, req *types.UnmapVmfsVolumeEx_Task) (*types.UnmapVmfsVolumeEx_TaskResponse, error) {
    +	var reqBody, resBody UnmapVmfsVolumeEx_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UnmountDiskMapping_TaskBody struct {
    +	Req    *types.UnmountDiskMapping_Task         `xml:"urn:vim25 UnmountDiskMapping_Task,omitempty"`
    +	Res    *types.UnmountDiskMapping_TaskResponse `xml:"urn:vim25 UnmountDiskMapping_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UnmountDiskMapping_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UnmountDiskMapping_Task(ctx context.Context, r soap.RoundTripper, req *types.UnmountDiskMapping_Task) (*types.UnmountDiskMapping_TaskResponse, error) {
    +	var reqBody, resBody UnmountDiskMapping_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UnmountForceMountedVmfsVolumeBody struct {
    +	Req    *types.UnmountForceMountedVmfsVolume         `xml:"urn:vim25 UnmountForceMountedVmfsVolume,omitempty"`
    +	Res    *types.UnmountForceMountedVmfsVolumeResponse `xml:"urn:vim25 UnmountForceMountedVmfsVolumeResponse,omitempty"`
    +	Fault_ *soap.Fault                                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UnmountForceMountedVmfsVolumeBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UnmountForceMountedVmfsVolume(ctx context.Context, r soap.RoundTripper, req *types.UnmountForceMountedVmfsVolume) (*types.UnmountForceMountedVmfsVolumeResponse, error) {
    +	var reqBody, resBody UnmountForceMountedVmfsVolumeBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UnmountToolsInstallerBody struct {
    +	Req    *types.UnmountToolsInstaller         `xml:"urn:vim25 UnmountToolsInstaller,omitempty"`
    +	Res    *types.UnmountToolsInstallerResponse `xml:"urn:vim25 UnmountToolsInstallerResponse,omitempty"`
    +	Fault_ *soap.Fault                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UnmountToolsInstallerBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UnmountToolsInstaller(ctx context.Context, r soap.RoundTripper, req *types.UnmountToolsInstaller) (*types.UnmountToolsInstallerResponse, error) {
    +	var reqBody, resBody UnmountToolsInstallerBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UnmountVffsVolumeBody struct {
    +	Req    *types.UnmountVffsVolume         `xml:"urn:vim25 UnmountVffsVolume,omitempty"`
    +	Res    *types.UnmountVffsVolumeResponse `xml:"urn:vim25 UnmountVffsVolumeResponse,omitempty"`
    +	Fault_ *soap.Fault                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UnmountVffsVolumeBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UnmountVffsVolume(ctx context.Context, r soap.RoundTripper, req *types.UnmountVffsVolume) (*types.UnmountVffsVolumeResponse, error) {
    +	var reqBody, resBody UnmountVffsVolumeBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UnmountVmfsVolumeBody struct {
    +	Req    *types.UnmountVmfsVolume         `xml:"urn:vim25 UnmountVmfsVolume,omitempty"`
    +	Res    *types.UnmountVmfsVolumeResponse `xml:"urn:vim25 UnmountVmfsVolumeResponse,omitempty"`
    +	Fault_ *soap.Fault                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UnmountVmfsVolumeBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UnmountVmfsVolume(ctx context.Context, r soap.RoundTripper, req *types.UnmountVmfsVolume) (*types.UnmountVmfsVolumeResponse, error) {
    +	var reqBody, resBody UnmountVmfsVolumeBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UnmountVmfsVolumeEx_TaskBody struct {
    +	Req    *types.UnmountVmfsVolumeEx_Task         `xml:"urn:vim25 UnmountVmfsVolumeEx_Task,omitempty"`
    +	Res    *types.UnmountVmfsVolumeEx_TaskResponse `xml:"urn:vim25 UnmountVmfsVolumeEx_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                             `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UnmountVmfsVolumeEx_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UnmountVmfsVolumeEx_Task(ctx context.Context, r soap.RoundTripper, req *types.UnmountVmfsVolumeEx_Task) (*types.UnmountVmfsVolumeEx_TaskResponse, error) {
    +	var reqBody, resBody UnmountVmfsVolumeEx_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UnregisterAndDestroy_TaskBody struct {
    +	Req    *types.UnregisterAndDestroy_Task         `xml:"urn:vim25 UnregisterAndDestroy_Task,omitempty"`
    +	Res    *types.UnregisterAndDestroy_TaskResponse `xml:"urn:vim25 UnregisterAndDestroy_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                              `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UnregisterAndDestroy_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UnregisterAndDestroy_Task(ctx context.Context, r soap.RoundTripper, req *types.UnregisterAndDestroy_Task) (*types.UnregisterAndDestroy_TaskResponse, error) {
    +	var reqBody, resBody UnregisterAndDestroy_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UnregisterExtensionBody struct {
    +	Req    *types.UnregisterExtension         `xml:"urn:vim25 UnregisterExtension,omitempty"`
    +	Res    *types.UnregisterExtensionResponse `xml:"urn:vim25 UnregisterExtensionResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UnregisterExtensionBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UnregisterExtension(ctx context.Context, r soap.RoundTripper, req *types.UnregisterExtension) (*types.UnregisterExtensionResponse, error) {
    +	var reqBody, resBody UnregisterExtensionBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UnregisterHealthUpdateProviderBody struct {
    +	Req    *types.UnregisterHealthUpdateProvider         `xml:"urn:vim25 UnregisterHealthUpdateProvider,omitempty"`
    +	Res    *types.UnregisterHealthUpdateProviderResponse `xml:"urn:vim25 UnregisterHealthUpdateProviderResponse,omitempty"`
    +	Fault_ *soap.Fault                                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UnregisterHealthUpdateProviderBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UnregisterHealthUpdateProvider(ctx context.Context, r soap.RoundTripper, req *types.UnregisterHealthUpdateProvider) (*types.UnregisterHealthUpdateProviderResponse, error) {
    +	var reqBody, resBody UnregisterHealthUpdateProviderBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UnregisterVMBody struct {
    +	Req    *types.UnregisterVM         `xml:"urn:vim25 UnregisterVM,omitempty"`
    +	Res    *types.UnregisterVMResponse `xml:"urn:vim25 UnregisterVMResponse,omitempty"`
    +	Fault_ *soap.Fault                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UnregisterVMBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UnregisterVM(ctx context.Context, r soap.RoundTripper, req *types.UnregisterVM) (*types.UnregisterVMResponse, error) {
    +	var reqBody, resBody UnregisterVMBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateAnswerFile_TaskBody struct {
    +	Req    *types.UpdateAnswerFile_Task         `xml:"urn:vim25 UpdateAnswerFile_Task,omitempty"`
    +	Res    *types.UpdateAnswerFile_TaskResponse `xml:"urn:vim25 UpdateAnswerFile_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateAnswerFile_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateAnswerFile_Task(ctx context.Context, r soap.RoundTripper, req *types.UpdateAnswerFile_Task) (*types.UpdateAnswerFile_TaskResponse, error) {
    +	var reqBody, resBody UpdateAnswerFile_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateAssignedLicenseBody struct {
    +	Req    *types.UpdateAssignedLicense         `xml:"urn:vim25 UpdateAssignedLicense,omitempty"`
    +	Res    *types.UpdateAssignedLicenseResponse `xml:"urn:vim25 UpdateAssignedLicenseResponse,omitempty"`
    +	Fault_ *soap.Fault                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateAssignedLicenseBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateAssignedLicense(ctx context.Context, r soap.RoundTripper, req *types.UpdateAssignedLicense) (*types.UpdateAssignedLicenseResponse, error) {
    +	var reqBody, resBody UpdateAssignedLicenseBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateAuthorizationRoleBody struct {
    +	Req    *types.UpdateAuthorizationRole         `xml:"urn:vim25 UpdateAuthorizationRole,omitempty"`
    +	Res    *types.UpdateAuthorizationRoleResponse `xml:"urn:vim25 UpdateAuthorizationRoleResponse,omitempty"`
    +	Fault_ *soap.Fault                            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateAuthorizationRoleBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateAuthorizationRole(ctx context.Context, r soap.RoundTripper, req *types.UpdateAuthorizationRole) (*types.UpdateAuthorizationRoleResponse, error) {
    +	var reqBody, resBody UpdateAuthorizationRoleBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateBootDeviceBody struct {
    +	Req    *types.UpdateBootDevice         `xml:"urn:vim25 UpdateBootDevice,omitempty"`
    +	Res    *types.UpdateBootDeviceResponse `xml:"urn:vim25 UpdateBootDeviceResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateBootDeviceBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateBootDevice(ctx context.Context, r soap.RoundTripper, req *types.UpdateBootDevice) (*types.UpdateBootDeviceResponse, error) {
    +	var reqBody, resBody UpdateBootDeviceBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateChildResourceConfigurationBody struct {
    +	Req    *types.UpdateChildResourceConfiguration         `xml:"urn:vim25 UpdateChildResourceConfiguration,omitempty"`
    +	Res    *types.UpdateChildResourceConfigurationResponse `xml:"urn:vim25 UpdateChildResourceConfigurationResponse,omitempty"`
    +	Fault_ *soap.Fault                                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateChildResourceConfigurationBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateChildResourceConfiguration(ctx context.Context, r soap.RoundTripper, req *types.UpdateChildResourceConfiguration) (*types.UpdateChildResourceConfigurationResponse, error) {
    +	var reqBody, resBody UpdateChildResourceConfigurationBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateClusterProfileBody struct {
    +	Req    *types.UpdateClusterProfile         `xml:"urn:vim25 UpdateClusterProfile,omitempty"`
    +	Res    *types.UpdateClusterProfileResponse `xml:"urn:vim25 UpdateClusterProfileResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateClusterProfileBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateClusterProfile(ctx context.Context, r soap.RoundTripper, req *types.UpdateClusterProfile) (*types.UpdateClusterProfileResponse, error) {
    +	var reqBody, resBody UpdateClusterProfileBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateConfigBody struct {
    +	Req    *types.UpdateConfig         `xml:"urn:vim25 UpdateConfig,omitempty"`
    +	Res    *types.UpdateConfigResponse `xml:"urn:vim25 UpdateConfigResponse,omitempty"`
    +	Fault_ *soap.Fault                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateConfigBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateConfig(ctx context.Context, r soap.RoundTripper, req *types.UpdateConfig) (*types.UpdateConfigResponse, error) {
    +	var reqBody, resBody UpdateConfigBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateConsoleIpRouteConfigBody struct {
    +	Req    *types.UpdateConsoleIpRouteConfig         `xml:"urn:vim25 UpdateConsoleIpRouteConfig,omitempty"`
    +	Res    *types.UpdateConsoleIpRouteConfigResponse `xml:"urn:vim25 UpdateConsoleIpRouteConfigResponse,omitempty"`
    +	Fault_ *soap.Fault                               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateConsoleIpRouteConfigBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateConsoleIpRouteConfig(ctx context.Context, r soap.RoundTripper, req *types.UpdateConsoleIpRouteConfig) (*types.UpdateConsoleIpRouteConfigResponse, error) {
    +	var reqBody, resBody UpdateConsoleIpRouteConfigBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateCounterLevelMappingBody struct {
    +	Req    *types.UpdateCounterLevelMapping         `xml:"urn:vim25 UpdateCounterLevelMapping,omitempty"`
    +	Res    *types.UpdateCounterLevelMappingResponse `xml:"urn:vim25 UpdateCounterLevelMappingResponse,omitempty"`
    +	Fault_ *soap.Fault                              `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateCounterLevelMappingBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateCounterLevelMapping(ctx context.Context, r soap.RoundTripper, req *types.UpdateCounterLevelMapping) (*types.UpdateCounterLevelMappingResponse, error) {
    +	var reqBody, resBody UpdateCounterLevelMappingBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateDVSHealthCheckConfig_TaskBody struct {
    +	Req    *types.UpdateDVSHealthCheckConfig_Task         `xml:"urn:vim25 UpdateDVSHealthCheckConfig_Task,omitempty"`
    +	Res    *types.UpdateDVSHealthCheckConfig_TaskResponse `xml:"urn:vim25 UpdateDVSHealthCheckConfig_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateDVSHealthCheckConfig_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateDVSHealthCheckConfig_Task(ctx context.Context, r soap.RoundTripper, req *types.UpdateDVSHealthCheckConfig_Task) (*types.UpdateDVSHealthCheckConfig_TaskResponse, error) {
    +	var reqBody, resBody UpdateDVSHealthCheckConfig_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateDVSLacpGroupConfig_TaskBody struct {
    +	Req    *types.UpdateDVSLacpGroupConfig_Task         `xml:"urn:vim25 UpdateDVSLacpGroupConfig_Task,omitempty"`
    +	Res    *types.UpdateDVSLacpGroupConfig_TaskResponse `xml:"urn:vim25 UpdateDVSLacpGroupConfig_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateDVSLacpGroupConfig_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateDVSLacpGroupConfig_Task(ctx context.Context, r soap.RoundTripper, req *types.UpdateDVSLacpGroupConfig_Task) (*types.UpdateDVSLacpGroupConfig_TaskResponse, error) {
    +	var reqBody, resBody UpdateDVSLacpGroupConfig_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateDateTimeBody struct {
    +	Req    *types.UpdateDateTime         `xml:"urn:vim25 UpdateDateTime,omitempty"`
    +	Res    *types.UpdateDateTimeResponse `xml:"urn:vim25 UpdateDateTimeResponse,omitempty"`
    +	Fault_ *soap.Fault                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateDateTimeBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateDateTime(ctx context.Context, r soap.RoundTripper, req *types.UpdateDateTime) (*types.UpdateDateTimeResponse, error) {
    +	var reqBody, resBody UpdateDateTimeBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateDateTimeConfigBody struct {
    +	Req    *types.UpdateDateTimeConfig         `xml:"urn:vim25 UpdateDateTimeConfig,omitempty"`
    +	Res    *types.UpdateDateTimeConfigResponse `xml:"urn:vim25 UpdateDateTimeConfigResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateDateTimeConfigBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateDateTimeConfig(ctx context.Context, r soap.RoundTripper, req *types.UpdateDateTimeConfig) (*types.UpdateDateTimeConfigResponse, error) {
    +	var reqBody, resBody UpdateDateTimeConfigBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateDefaultPolicyBody struct {
    +	Req    *types.UpdateDefaultPolicy         `xml:"urn:vim25 UpdateDefaultPolicy,omitempty"`
    +	Res    *types.UpdateDefaultPolicyResponse `xml:"urn:vim25 UpdateDefaultPolicyResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateDefaultPolicyBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateDefaultPolicy(ctx context.Context, r soap.RoundTripper, req *types.UpdateDefaultPolicy) (*types.UpdateDefaultPolicyResponse, error) {
    +	var reqBody, resBody UpdateDefaultPolicyBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateDiskPartitionsBody struct {
    +	Req    *types.UpdateDiskPartitions         `xml:"urn:vim25 UpdateDiskPartitions,omitempty"`
    +	Res    *types.UpdateDiskPartitionsResponse `xml:"urn:vim25 UpdateDiskPartitionsResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateDiskPartitionsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateDiskPartitions(ctx context.Context, r soap.RoundTripper, req *types.UpdateDiskPartitions) (*types.UpdateDiskPartitionsResponse, error) {
    +	var reqBody, resBody UpdateDiskPartitionsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateDnsConfigBody struct {
    +	Req    *types.UpdateDnsConfig         `xml:"urn:vim25 UpdateDnsConfig,omitempty"`
    +	Res    *types.UpdateDnsConfigResponse `xml:"urn:vim25 UpdateDnsConfigResponse,omitempty"`
    +	Fault_ *soap.Fault                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateDnsConfigBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateDnsConfig(ctx context.Context, r soap.RoundTripper, req *types.UpdateDnsConfig) (*types.UpdateDnsConfigResponse, error) {
    +	var reqBody, resBody UpdateDnsConfigBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateDvsCapabilityBody struct {
    +	Req    *types.UpdateDvsCapability         `xml:"urn:vim25 UpdateDvsCapability,omitempty"`
    +	Res    *types.UpdateDvsCapabilityResponse `xml:"urn:vim25 UpdateDvsCapabilityResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateDvsCapabilityBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateDvsCapability(ctx context.Context, r soap.RoundTripper, req *types.UpdateDvsCapability) (*types.UpdateDvsCapabilityResponse, error) {
    +	var reqBody, resBody UpdateDvsCapabilityBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateExtensionBody struct {
    +	Req    *types.UpdateExtension         `xml:"urn:vim25 UpdateExtension,omitempty"`
    +	Res    *types.UpdateExtensionResponse `xml:"urn:vim25 UpdateExtensionResponse,omitempty"`
    +	Fault_ *soap.Fault                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateExtensionBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateExtension(ctx context.Context, r soap.RoundTripper, req *types.UpdateExtension) (*types.UpdateExtensionResponse, error) {
    +	var reqBody, resBody UpdateExtensionBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateFlagsBody struct {
    +	Req    *types.UpdateFlags         `xml:"urn:vim25 UpdateFlags,omitempty"`
    +	Res    *types.UpdateFlagsResponse `xml:"urn:vim25 UpdateFlagsResponse,omitempty"`
    +	Fault_ *soap.Fault                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateFlagsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateFlags(ctx context.Context, r soap.RoundTripper, req *types.UpdateFlags) (*types.UpdateFlagsResponse, error) {
    +	var reqBody, resBody UpdateFlagsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateGraphicsConfigBody struct {
    +	Req    *types.UpdateGraphicsConfig         `xml:"urn:vim25 UpdateGraphicsConfig,omitempty"`
    +	Res    *types.UpdateGraphicsConfigResponse `xml:"urn:vim25 UpdateGraphicsConfigResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateGraphicsConfigBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateGraphicsConfig(ctx context.Context, r soap.RoundTripper, req *types.UpdateGraphicsConfig) (*types.UpdateGraphicsConfigResponse, error) {
    +	var reqBody, resBody UpdateGraphicsConfigBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateHostCustomizations_TaskBody struct {
    +	Req    *types.UpdateHostCustomizations_Task         `xml:"urn:vim25 UpdateHostCustomizations_Task,omitempty"`
    +	Res    *types.UpdateHostCustomizations_TaskResponse `xml:"urn:vim25 UpdateHostCustomizations_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateHostCustomizations_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateHostCustomizations_Task(ctx context.Context, r soap.RoundTripper, req *types.UpdateHostCustomizations_Task) (*types.UpdateHostCustomizations_TaskResponse, error) {
    +	var reqBody, resBody UpdateHostCustomizations_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateHostImageAcceptanceLevelBody struct {
    +	Req    *types.UpdateHostImageAcceptanceLevel         `xml:"urn:vim25 UpdateHostImageAcceptanceLevel,omitempty"`
    +	Res    *types.UpdateHostImageAcceptanceLevelResponse `xml:"urn:vim25 UpdateHostImageAcceptanceLevelResponse,omitempty"`
    +	Fault_ *soap.Fault                                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateHostImageAcceptanceLevelBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateHostImageAcceptanceLevel(ctx context.Context, r soap.RoundTripper, req *types.UpdateHostImageAcceptanceLevel) (*types.UpdateHostImageAcceptanceLevelResponse, error) {
    +	var reqBody, resBody UpdateHostImageAcceptanceLevelBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateHostProfileBody struct {
    +	Req    *types.UpdateHostProfile         `xml:"urn:vim25 UpdateHostProfile,omitempty"`
    +	Res    *types.UpdateHostProfileResponse `xml:"urn:vim25 UpdateHostProfileResponse,omitempty"`
    +	Fault_ *soap.Fault                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateHostProfileBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateHostProfile(ctx context.Context, r soap.RoundTripper, req *types.UpdateHostProfile) (*types.UpdateHostProfileResponse, error) {
    +	var reqBody, resBody UpdateHostProfileBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateHostSpecificationBody struct {
    +	Req    *types.UpdateHostSpecification         `xml:"urn:vim25 UpdateHostSpecification,omitempty"`
    +	Res    *types.UpdateHostSpecificationResponse `xml:"urn:vim25 UpdateHostSpecificationResponse,omitempty"`
    +	Fault_ *soap.Fault                            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateHostSpecificationBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateHostSpecification(ctx context.Context, r soap.RoundTripper, req *types.UpdateHostSpecification) (*types.UpdateHostSpecificationResponse, error) {
    +	var reqBody, resBody UpdateHostSpecificationBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateHostSubSpecificationBody struct {
    +	Req    *types.UpdateHostSubSpecification         `xml:"urn:vim25 UpdateHostSubSpecification,omitempty"`
    +	Res    *types.UpdateHostSubSpecificationResponse `xml:"urn:vim25 UpdateHostSubSpecificationResponse,omitempty"`
    +	Fault_ *soap.Fault                               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateHostSubSpecificationBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateHostSubSpecification(ctx context.Context, r soap.RoundTripper, req *types.UpdateHostSubSpecification) (*types.UpdateHostSubSpecificationResponse, error) {
    +	var reqBody, resBody UpdateHostSubSpecificationBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateInternetScsiAdvancedOptionsBody struct {
    +	Req    *types.UpdateInternetScsiAdvancedOptions         `xml:"urn:vim25 UpdateInternetScsiAdvancedOptions,omitempty"`
    +	Res    *types.UpdateInternetScsiAdvancedOptionsResponse `xml:"urn:vim25 UpdateInternetScsiAdvancedOptionsResponse,omitempty"`
    +	Fault_ *soap.Fault                                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateInternetScsiAdvancedOptionsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateInternetScsiAdvancedOptions(ctx context.Context, r soap.RoundTripper, req *types.UpdateInternetScsiAdvancedOptions) (*types.UpdateInternetScsiAdvancedOptionsResponse, error) {
    +	var reqBody, resBody UpdateInternetScsiAdvancedOptionsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateInternetScsiAliasBody struct {
    +	Req    *types.UpdateInternetScsiAlias         `xml:"urn:vim25 UpdateInternetScsiAlias,omitempty"`
    +	Res    *types.UpdateInternetScsiAliasResponse `xml:"urn:vim25 UpdateInternetScsiAliasResponse,omitempty"`
    +	Fault_ *soap.Fault                            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateInternetScsiAliasBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateInternetScsiAlias(ctx context.Context, r soap.RoundTripper, req *types.UpdateInternetScsiAlias) (*types.UpdateInternetScsiAliasResponse, error) {
    +	var reqBody, resBody UpdateInternetScsiAliasBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateInternetScsiAuthenticationPropertiesBody struct {
    +	Req    *types.UpdateInternetScsiAuthenticationProperties         `xml:"urn:vim25 UpdateInternetScsiAuthenticationProperties,omitempty"`
    +	Res    *types.UpdateInternetScsiAuthenticationPropertiesResponse `xml:"urn:vim25 UpdateInternetScsiAuthenticationPropertiesResponse,omitempty"`
    +	Fault_ *soap.Fault                                               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateInternetScsiAuthenticationPropertiesBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateInternetScsiAuthenticationProperties(ctx context.Context, r soap.RoundTripper, req *types.UpdateInternetScsiAuthenticationProperties) (*types.UpdateInternetScsiAuthenticationPropertiesResponse, error) {
    +	var reqBody, resBody UpdateInternetScsiAuthenticationPropertiesBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateInternetScsiDigestPropertiesBody struct {
    +	Req    *types.UpdateInternetScsiDigestProperties         `xml:"urn:vim25 UpdateInternetScsiDigestProperties,omitempty"`
    +	Res    *types.UpdateInternetScsiDigestPropertiesResponse `xml:"urn:vim25 UpdateInternetScsiDigestPropertiesResponse,omitempty"`
    +	Fault_ *soap.Fault                                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateInternetScsiDigestPropertiesBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateInternetScsiDigestProperties(ctx context.Context, r soap.RoundTripper, req *types.UpdateInternetScsiDigestProperties) (*types.UpdateInternetScsiDigestPropertiesResponse, error) {
    +	var reqBody, resBody UpdateInternetScsiDigestPropertiesBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateInternetScsiDiscoveryPropertiesBody struct {
    +	Req    *types.UpdateInternetScsiDiscoveryProperties         `xml:"urn:vim25 UpdateInternetScsiDiscoveryProperties,omitempty"`
    +	Res    *types.UpdateInternetScsiDiscoveryPropertiesResponse `xml:"urn:vim25 UpdateInternetScsiDiscoveryPropertiesResponse,omitempty"`
    +	Fault_ *soap.Fault                                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateInternetScsiDiscoveryPropertiesBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateInternetScsiDiscoveryProperties(ctx context.Context, r soap.RoundTripper, req *types.UpdateInternetScsiDiscoveryProperties) (*types.UpdateInternetScsiDiscoveryPropertiesResponse, error) {
    +	var reqBody, resBody UpdateInternetScsiDiscoveryPropertiesBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateInternetScsiIPPropertiesBody struct {
    +	Req    *types.UpdateInternetScsiIPProperties         `xml:"urn:vim25 UpdateInternetScsiIPProperties,omitempty"`
    +	Res    *types.UpdateInternetScsiIPPropertiesResponse `xml:"urn:vim25 UpdateInternetScsiIPPropertiesResponse,omitempty"`
    +	Fault_ *soap.Fault                                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateInternetScsiIPPropertiesBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateInternetScsiIPProperties(ctx context.Context, r soap.RoundTripper, req *types.UpdateInternetScsiIPProperties) (*types.UpdateInternetScsiIPPropertiesResponse, error) {
    +	var reqBody, resBody UpdateInternetScsiIPPropertiesBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateInternetScsiNameBody struct {
    +	Req    *types.UpdateInternetScsiName         `xml:"urn:vim25 UpdateInternetScsiName,omitempty"`
    +	Res    *types.UpdateInternetScsiNameResponse `xml:"urn:vim25 UpdateInternetScsiNameResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateInternetScsiNameBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateInternetScsiName(ctx context.Context, r soap.RoundTripper, req *types.UpdateInternetScsiName) (*types.UpdateInternetScsiNameResponse, error) {
    +	var reqBody, resBody UpdateInternetScsiNameBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateIpConfigBody struct {
    +	Req    *types.UpdateIpConfig         `xml:"urn:vim25 UpdateIpConfig,omitempty"`
    +	Res    *types.UpdateIpConfigResponse `xml:"urn:vim25 UpdateIpConfigResponse,omitempty"`
    +	Fault_ *soap.Fault                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateIpConfigBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateIpConfig(ctx context.Context, r soap.RoundTripper, req *types.UpdateIpConfig) (*types.UpdateIpConfigResponse, error) {
    +	var reqBody, resBody UpdateIpConfigBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateIpPoolBody struct {
    +	Req    *types.UpdateIpPool         `xml:"urn:vim25 UpdateIpPool,omitempty"`
    +	Res    *types.UpdateIpPoolResponse `xml:"urn:vim25 UpdateIpPoolResponse,omitempty"`
    +	Fault_ *soap.Fault                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateIpPoolBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateIpPool(ctx context.Context, r soap.RoundTripper, req *types.UpdateIpPool) (*types.UpdateIpPoolResponse, error) {
    +	var reqBody, resBody UpdateIpPoolBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateIpRouteConfigBody struct {
    +	Req    *types.UpdateIpRouteConfig         `xml:"urn:vim25 UpdateIpRouteConfig,omitempty"`
    +	Res    *types.UpdateIpRouteConfigResponse `xml:"urn:vim25 UpdateIpRouteConfigResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateIpRouteConfigBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateIpRouteConfig(ctx context.Context, r soap.RoundTripper, req *types.UpdateIpRouteConfig) (*types.UpdateIpRouteConfigResponse, error) {
    +	var reqBody, resBody UpdateIpRouteConfigBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateIpRouteTableConfigBody struct {
    +	Req    *types.UpdateIpRouteTableConfig         `xml:"urn:vim25 UpdateIpRouteTableConfig,omitempty"`
    +	Res    *types.UpdateIpRouteTableConfigResponse `xml:"urn:vim25 UpdateIpRouteTableConfigResponse,omitempty"`
    +	Fault_ *soap.Fault                             `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateIpRouteTableConfigBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateIpRouteTableConfig(ctx context.Context, r soap.RoundTripper, req *types.UpdateIpRouteTableConfig) (*types.UpdateIpRouteTableConfigResponse, error) {
    +	var reqBody, resBody UpdateIpRouteTableConfigBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateIpmiBody struct {
    +	Req    *types.UpdateIpmi         `xml:"urn:vim25 UpdateIpmi,omitempty"`
    +	Res    *types.UpdateIpmiResponse `xml:"urn:vim25 UpdateIpmiResponse,omitempty"`
    +	Fault_ *soap.Fault               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateIpmiBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateIpmi(ctx context.Context, r soap.RoundTripper, req *types.UpdateIpmi) (*types.UpdateIpmiResponse, error) {
    +	var reqBody, resBody UpdateIpmiBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateKmipServerBody struct {
    +	Req    *types.UpdateKmipServer         `xml:"urn:vim25 UpdateKmipServer,omitempty"`
    +	Res    *types.UpdateKmipServerResponse `xml:"urn:vim25 UpdateKmipServerResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateKmipServerBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateKmipServer(ctx context.Context, r soap.RoundTripper, req *types.UpdateKmipServer) (*types.UpdateKmipServerResponse, error) {
    +	var reqBody, resBody UpdateKmipServerBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateKmsSignedCsrClientCertBody struct {
    +	Req    *types.UpdateKmsSignedCsrClientCert         `xml:"urn:vim25 UpdateKmsSignedCsrClientCert,omitempty"`
    +	Res    *types.UpdateKmsSignedCsrClientCertResponse `xml:"urn:vim25 UpdateKmsSignedCsrClientCertResponse,omitempty"`
    +	Fault_ *soap.Fault                                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateKmsSignedCsrClientCertBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateKmsSignedCsrClientCert(ctx context.Context, r soap.RoundTripper, req *types.UpdateKmsSignedCsrClientCert) (*types.UpdateKmsSignedCsrClientCertResponse, error) {
    +	var reqBody, resBody UpdateKmsSignedCsrClientCertBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateLicenseBody struct {
    +	Req    *types.UpdateLicense         `xml:"urn:vim25 UpdateLicense,omitempty"`
    +	Res    *types.UpdateLicenseResponse `xml:"urn:vim25 UpdateLicenseResponse,omitempty"`
    +	Fault_ *soap.Fault                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateLicenseBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateLicense(ctx context.Context, r soap.RoundTripper, req *types.UpdateLicense) (*types.UpdateLicenseResponse, error) {
    +	var reqBody, resBody UpdateLicenseBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateLicenseLabelBody struct {
    +	Req    *types.UpdateLicenseLabel         `xml:"urn:vim25 UpdateLicenseLabel,omitempty"`
    +	Res    *types.UpdateLicenseLabelResponse `xml:"urn:vim25 UpdateLicenseLabelResponse,omitempty"`
    +	Fault_ *soap.Fault                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateLicenseLabelBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateLicenseLabel(ctx context.Context, r soap.RoundTripper, req *types.UpdateLicenseLabel) (*types.UpdateLicenseLabelResponse, error) {
    +	var reqBody, resBody UpdateLicenseLabelBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateLinkedChildrenBody struct {
    +	Req    *types.UpdateLinkedChildren         `xml:"urn:vim25 UpdateLinkedChildren,omitempty"`
    +	Res    *types.UpdateLinkedChildrenResponse `xml:"urn:vim25 UpdateLinkedChildrenResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateLinkedChildrenBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateLinkedChildren(ctx context.Context, r soap.RoundTripper, req *types.UpdateLinkedChildren) (*types.UpdateLinkedChildrenResponse, error) {
    +	var reqBody, resBody UpdateLinkedChildrenBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateLocalSwapDatastoreBody struct {
    +	Req    *types.UpdateLocalSwapDatastore         `xml:"urn:vim25 UpdateLocalSwapDatastore,omitempty"`
    +	Res    *types.UpdateLocalSwapDatastoreResponse `xml:"urn:vim25 UpdateLocalSwapDatastoreResponse,omitempty"`
    +	Fault_ *soap.Fault                             `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateLocalSwapDatastoreBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateLocalSwapDatastore(ctx context.Context, r soap.RoundTripper, req *types.UpdateLocalSwapDatastore) (*types.UpdateLocalSwapDatastoreResponse, error) {
    +	var reqBody, resBody UpdateLocalSwapDatastoreBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateLockdownExceptionsBody struct {
    +	Req    *types.UpdateLockdownExceptions         `xml:"urn:vim25 UpdateLockdownExceptions,omitempty"`
    +	Res    *types.UpdateLockdownExceptionsResponse `xml:"urn:vim25 UpdateLockdownExceptionsResponse,omitempty"`
    +	Fault_ *soap.Fault                             `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateLockdownExceptionsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateLockdownExceptions(ctx context.Context, r soap.RoundTripper, req *types.UpdateLockdownExceptions) (*types.UpdateLockdownExceptionsResponse, error) {
    +	var reqBody, resBody UpdateLockdownExceptionsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateModuleOptionStringBody struct {
    +	Req    *types.UpdateModuleOptionString         `xml:"urn:vim25 UpdateModuleOptionString,omitempty"`
    +	Res    *types.UpdateModuleOptionStringResponse `xml:"urn:vim25 UpdateModuleOptionStringResponse,omitempty"`
    +	Fault_ *soap.Fault                             `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateModuleOptionStringBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateModuleOptionString(ctx context.Context, r soap.RoundTripper, req *types.UpdateModuleOptionString) (*types.UpdateModuleOptionStringResponse, error) {
    +	var reqBody, resBody UpdateModuleOptionStringBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateNetworkConfigBody struct {
    +	Req    *types.UpdateNetworkConfig         `xml:"urn:vim25 UpdateNetworkConfig,omitempty"`
    +	Res    *types.UpdateNetworkConfigResponse `xml:"urn:vim25 UpdateNetworkConfigResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateNetworkConfigBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateNetworkConfig(ctx context.Context, r soap.RoundTripper, req *types.UpdateNetworkConfig) (*types.UpdateNetworkConfigResponse, error) {
    +	var reqBody, resBody UpdateNetworkConfigBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateNetworkResourcePoolBody struct {
    +	Req    *types.UpdateNetworkResourcePool         `xml:"urn:vim25 UpdateNetworkResourcePool,omitempty"`
    +	Res    *types.UpdateNetworkResourcePoolResponse `xml:"urn:vim25 UpdateNetworkResourcePoolResponse,omitempty"`
    +	Fault_ *soap.Fault                              `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateNetworkResourcePoolBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateNetworkResourcePool(ctx context.Context, r soap.RoundTripper, req *types.UpdateNetworkResourcePool) (*types.UpdateNetworkResourcePoolResponse, error) {
    +	var reqBody, resBody UpdateNetworkResourcePoolBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateOptionsBody struct {
    +	Req    *types.UpdateOptions         `xml:"urn:vim25 UpdateOptions,omitempty"`
    +	Res    *types.UpdateOptionsResponse `xml:"urn:vim25 UpdateOptionsResponse,omitempty"`
    +	Fault_ *soap.Fault                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateOptionsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateOptions(ctx context.Context, r soap.RoundTripper, req *types.UpdateOptions) (*types.UpdateOptionsResponse, error) {
    +	var reqBody, resBody UpdateOptionsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdatePassthruConfigBody struct {
    +	Req    *types.UpdatePassthruConfig         `xml:"urn:vim25 UpdatePassthruConfig,omitempty"`
    +	Res    *types.UpdatePassthruConfigResponse `xml:"urn:vim25 UpdatePassthruConfigResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdatePassthruConfigBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdatePassthruConfig(ctx context.Context, r soap.RoundTripper, req *types.UpdatePassthruConfig) (*types.UpdatePassthruConfigResponse, error) {
    +	var reqBody, resBody UpdatePassthruConfigBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdatePerfIntervalBody struct {
    +	Req    *types.UpdatePerfInterval         `xml:"urn:vim25 UpdatePerfInterval,omitempty"`
    +	Res    *types.UpdatePerfIntervalResponse `xml:"urn:vim25 UpdatePerfIntervalResponse,omitempty"`
    +	Fault_ *soap.Fault                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdatePerfIntervalBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdatePerfInterval(ctx context.Context, r soap.RoundTripper, req *types.UpdatePerfInterval) (*types.UpdatePerfIntervalResponse, error) {
    +	var reqBody, resBody UpdatePerfIntervalBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdatePhysicalNicLinkSpeedBody struct {
    +	Req    *types.UpdatePhysicalNicLinkSpeed         `xml:"urn:vim25 UpdatePhysicalNicLinkSpeed,omitempty"`
    +	Res    *types.UpdatePhysicalNicLinkSpeedResponse `xml:"urn:vim25 UpdatePhysicalNicLinkSpeedResponse,omitempty"`
    +	Fault_ *soap.Fault                               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdatePhysicalNicLinkSpeedBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdatePhysicalNicLinkSpeed(ctx context.Context, r soap.RoundTripper, req *types.UpdatePhysicalNicLinkSpeed) (*types.UpdatePhysicalNicLinkSpeedResponse, error) {
    +	var reqBody, resBody UpdatePhysicalNicLinkSpeedBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdatePortGroupBody struct {
    +	Req    *types.UpdatePortGroup         `xml:"urn:vim25 UpdatePortGroup,omitempty"`
    +	Res    *types.UpdatePortGroupResponse `xml:"urn:vim25 UpdatePortGroupResponse,omitempty"`
    +	Fault_ *soap.Fault                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdatePortGroupBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdatePortGroup(ctx context.Context, r soap.RoundTripper, req *types.UpdatePortGroup) (*types.UpdatePortGroupResponse, error) {
    +	var reqBody, resBody UpdatePortGroupBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateProgressBody struct {
    +	Req    *types.UpdateProgress         `xml:"urn:vim25 UpdateProgress,omitempty"`
    +	Res    *types.UpdateProgressResponse `xml:"urn:vim25 UpdateProgressResponse,omitempty"`
    +	Fault_ *soap.Fault                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateProgressBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateProgress(ctx context.Context, r soap.RoundTripper, req *types.UpdateProgress) (*types.UpdateProgressResponse, error) {
    +	var reqBody, resBody UpdateProgressBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateReferenceHostBody struct {
    +	Req    *types.UpdateReferenceHost         `xml:"urn:vim25 UpdateReferenceHost,omitempty"`
    +	Res    *types.UpdateReferenceHostResponse `xml:"urn:vim25 UpdateReferenceHostResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateReferenceHostBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateReferenceHost(ctx context.Context, r soap.RoundTripper, req *types.UpdateReferenceHost) (*types.UpdateReferenceHostResponse, error) {
    +	var reqBody, resBody UpdateReferenceHostBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateRulesetBody struct {
    +	Req    *types.UpdateRuleset         `xml:"urn:vim25 UpdateRuleset,omitempty"`
    +	Res    *types.UpdateRulesetResponse `xml:"urn:vim25 UpdateRulesetResponse,omitempty"`
    +	Fault_ *soap.Fault                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateRulesetBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateRuleset(ctx context.Context, r soap.RoundTripper, req *types.UpdateRuleset) (*types.UpdateRulesetResponse, error) {
    +	var reqBody, resBody UpdateRulesetBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateScsiLunDisplayNameBody struct {
    +	Req    *types.UpdateScsiLunDisplayName         `xml:"urn:vim25 UpdateScsiLunDisplayName,omitempty"`
    +	Res    *types.UpdateScsiLunDisplayNameResponse `xml:"urn:vim25 UpdateScsiLunDisplayNameResponse,omitempty"`
    +	Fault_ *soap.Fault                             `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateScsiLunDisplayNameBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateScsiLunDisplayName(ctx context.Context, r soap.RoundTripper, req *types.UpdateScsiLunDisplayName) (*types.UpdateScsiLunDisplayNameResponse, error) {
    +	var reqBody, resBody UpdateScsiLunDisplayNameBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateSelfSignedClientCertBody struct {
    +	Req    *types.UpdateSelfSignedClientCert         `xml:"urn:vim25 UpdateSelfSignedClientCert,omitempty"`
    +	Res    *types.UpdateSelfSignedClientCertResponse `xml:"urn:vim25 UpdateSelfSignedClientCertResponse,omitempty"`
    +	Fault_ *soap.Fault                               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateSelfSignedClientCertBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateSelfSignedClientCert(ctx context.Context, r soap.RoundTripper, req *types.UpdateSelfSignedClientCert) (*types.UpdateSelfSignedClientCertResponse, error) {
    +	var reqBody, resBody UpdateSelfSignedClientCertBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateServiceConsoleVirtualNicBody struct {
    +	Req    *types.UpdateServiceConsoleVirtualNic         `xml:"urn:vim25 UpdateServiceConsoleVirtualNic,omitempty"`
    +	Res    *types.UpdateServiceConsoleVirtualNicResponse `xml:"urn:vim25 UpdateServiceConsoleVirtualNicResponse,omitempty"`
    +	Fault_ *soap.Fault                                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateServiceConsoleVirtualNicBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateServiceConsoleVirtualNic(ctx context.Context, r soap.RoundTripper, req *types.UpdateServiceConsoleVirtualNic) (*types.UpdateServiceConsoleVirtualNicResponse, error) {
    +	var reqBody, resBody UpdateServiceConsoleVirtualNicBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateServiceMessageBody struct {
    +	Req    *types.UpdateServiceMessage         `xml:"urn:vim25 UpdateServiceMessage,omitempty"`
    +	Res    *types.UpdateServiceMessageResponse `xml:"urn:vim25 UpdateServiceMessageResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateServiceMessageBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateServiceMessage(ctx context.Context, r soap.RoundTripper, req *types.UpdateServiceMessage) (*types.UpdateServiceMessageResponse, error) {
    +	var reqBody, resBody UpdateServiceMessageBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateServicePolicyBody struct {
    +	Req    *types.UpdateServicePolicy         `xml:"urn:vim25 UpdateServicePolicy,omitempty"`
    +	Res    *types.UpdateServicePolicyResponse `xml:"urn:vim25 UpdateServicePolicyResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateServicePolicyBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateServicePolicy(ctx context.Context, r soap.RoundTripper, req *types.UpdateServicePolicy) (*types.UpdateServicePolicyResponse, error) {
    +	var reqBody, resBody UpdateServicePolicyBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateSoftwareInternetScsiEnabledBody struct {
    +	Req    *types.UpdateSoftwareInternetScsiEnabled         `xml:"urn:vim25 UpdateSoftwareInternetScsiEnabled,omitempty"`
    +	Res    *types.UpdateSoftwareInternetScsiEnabledResponse `xml:"urn:vim25 UpdateSoftwareInternetScsiEnabledResponse,omitempty"`
    +	Fault_ *soap.Fault                                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateSoftwareInternetScsiEnabledBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateSoftwareInternetScsiEnabled(ctx context.Context, r soap.RoundTripper, req *types.UpdateSoftwareInternetScsiEnabled) (*types.UpdateSoftwareInternetScsiEnabledResponse, error) {
    +	var reqBody, resBody UpdateSoftwareInternetScsiEnabledBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateSystemResourcesBody struct {
    +	Req    *types.UpdateSystemResources         `xml:"urn:vim25 UpdateSystemResources,omitempty"`
    +	Res    *types.UpdateSystemResourcesResponse `xml:"urn:vim25 UpdateSystemResourcesResponse,omitempty"`
    +	Fault_ *soap.Fault                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateSystemResourcesBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateSystemResources(ctx context.Context, r soap.RoundTripper, req *types.UpdateSystemResources) (*types.UpdateSystemResourcesResponse, error) {
    +	var reqBody, resBody UpdateSystemResourcesBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateSystemSwapConfigurationBody struct {
    +	Req    *types.UpdateSystemSwapConfiguration         `xml:"urn:vim25 UpdateSystemSwapConfiguration,omitempty"`
    +	Res    *types.UpdateSystemSwapConfigurationResponse `xml:"urn:vim25 UpdateSystemSwapConfigurationResponse,omitempty"`
    +	Fault_ *soap.Fault                                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateSystemSwapConfigurationBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateSystemSwapConfiguration(ctx context.Context, r soap.RoundTripper, req *types.UpdateSystemSwapConfiguration) (*types.UpdateSystemSwapConfigurationResponse, error) {
    +	var reqBody, resBody UpdateSystemSwapConfigurationBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateSystemUsersBody struct {
    +	Req    *types.UpdateSystemUsers         `xml:"urn:vim25 UpdateSystemUsers,omitempty"`
    +	Res    *types.UpdateSystemUsersResponse `xml:"urn:vim25 UpdateSystemUsersResponse,omitempty"`
    +	Fault_ *soap.Fault                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateSystemUsersBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateSystemUsers(ctx context.Context, r soap.RoundTripper, req *types.UpdateSystemUsers) (*types.UpdateSystemUsersResponse, error) {
    +	var reqBody, resBody UpdateSystemUsersBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateUserBody struct {
    +	Req    *types.UpdateUser         `xml:"urn:vim25 UpdateUser,omitempty"`
    +	Res    *types.UpdateUserResponse `xml:"urn:vim25 UpdateUserResponse,omitempty"`
    +	Fault_ *soap.Fault               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateUserBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateUser(ctx context.Context, r soap.RoundTripper, req *types.UpdateUser) (*types.UpdateUserResponse, error) {
    +	var reqBody, resBody UpdateUserBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateVAppConfigBody struct {
    +	Req    *types.UpdateVAppConfig         `xml:"urn:vim25 UpdateVAppConfig,omitempty"`
    +	Res    *types.UpdateVAppConfigResponse `xml:"urn:vim25 UpdateVAppConfigResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateVAppConfigBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateVAppConfig(ctx context.Context, r soap.RoundTripper, req *types.UpdateVAppConfig) (*types.UpdateVAppConfigResponse, error) {
    +	var reqBody, resBody UpdateVAppConfigBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateVStorageInfrastructureObjectPolicy_TaskBody struct {
    +	Req    *types.UpdateVStorageInfrastructureObjectPolicy_Task         `xml:"urn:vim25 UpdateVStorageInfrastructureObjectPolicy_Task,omitempty"`
    +	Res    *types.UpdateVStorageInfrastructureObjectPolicy_TaskResponse `xml:"urn:vim25 UpdateVStorageInfrastructureObjectPolicy_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateVStorageInfrastructureObjectPolicy_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateVStorageInfrastructureObjectPolicy_Task(ctx context.Context, r soap.RoundTripper, req *types.UpdateVStorageInfrastructureObjectPolicy_Task) (*types.UpdateVStorageInfrastructureObjectPolicy_TaskResponse, error) {
    +	var reqBody, resBody UpdateVStorageInfrastructureObjectPolicy_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateVStorageObjectPolicy_TaskBody struct {
    +	Req    *types.UpdateVStorageObjectPolicy_Task         `xml:"urn:vim25 UpdateVStorageObjectPolicy_Task,omitempty"`
    +	Res    *types.UpdateVStorageObjectPolicy_TaskResponse `xml:"urn:vim25 UpdateVStorageObjectPolicy_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateVStorageObjectPolicy_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateVStorageObjectPolicy_Task(ctx context.Context, r soap.RoundTripper, req *types.UpdateVStorageObjectPolicy_Task) (*types.UpdateVStorageObjectPolicy_TaskResponse, error) {
    +	var reqBody, resBody UpdateVStorageObjectPolicy_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateVVolVirtualMachineFiles_TaskBody struct {
    +	Req    *types.UpdateVVolVirtualMachineFiles_Task         `xml:"urn:vim25 UpdateVVolVirtualMachineFiles_Task,omitempty"`
    +	Res    *types.UpdateVVolVirtualMachineFiles_TaskResponse `xml:"urn:vim25 UpdateVVolVirtualMachineFiles_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateVVolVirtualMachineFiles_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateVVolVirtualMachineFiles_Task(ctx context.Context, r soap.RoundTripper, req *types.UpdateVVolVirtualMachineFiles_Task) (*types.UpdateVVolVirtualMachineFiles_TaskResponse, error) {
    +	var reqBody, resBody UpdateVVolVirtualMachineFiles_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateVirtualMachineFiles_TaskBody struct {
    +	Req    *types.UpdateVirtualMachineFiles_Task         `xml:"urn:vim25 UpdateVirtualMachineFiles_Task,omitempty"`
    +	Res    *types.UpdateVirtualMachineFiles_TaskResponse `xml:"urn:vim25 UpdateVirtualMachineFiles_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateVirtualMachineFiles_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateVirtualMachineFiles_Task(ctx context.Context, r soap.RoundTripper, req *types.UpdateVirtualMachineFiles_Task) (*types.UpdateVirtualMachineFiles_TaskResponse, error) {
    +	var reqBody, resBody UpdateVirtualMachineFiles_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateVirtualNicBody struct {
    +	Req    *types.UpdateVirtualNic         `xml:"urn:vim25 UpdateVirtualNic,omitempty"`
    +	Res    *types.UpdateVirtualNicResponse `xml:"urn:vim25 UpdateVirtualNicResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateVirtualNicBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateVirtualNic(ctx context.Context, r soap.RoundTripper, req *types.UpdateVirtualNic) (*types.UpdateVirtualNicResponse, error) {
    +	var reqBody, resBody UpdateVirtualNicBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateVirtualSwitchBody struct {
    +	Req    *types.UpdateVirtualSwitch         `xml:"urn:vim25 UpdateVirtualSwitch,omitempty"`
    +	Res    *types.UpdateVirtualSwitchResponse `xml:"urn:vim25 UpdateVirtualSwitchResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateVirtualSwitchBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateVirtualSwitch(ctx context.Context, r soap.RoundTripper, req *types.UpdateVirtualSwitch) (*types.UpdateVirtualSwitchResponse, error) {
    +	var reqBody, resBody UpdateVirtualSwitchBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateVmfsUnmapBandwidthBody struct {
    +	Req    *types.UpdateVmfsUnmapBandwidth         `xml:"urn:vim25 UpdateVmfsUnmapBandwidth,omitempty"`
    +	Res    *types.UpdateVmfsUnmapBandwidthResponse `xml:"urn:vim25 UpdateVmfsUnmapBandwidthResponse,omitempty"`
    +	Fault_ *soap.Fault                             `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateVmfsUnmapBandwidthBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateVmfsUnmapBandwidth(ctx context.Context, r soap.RoundTripper, req *types.UpdateVmfsUnmapBandwidth) (*types.UpdateVmfsUnmapBandwidthResponse, error) {
    +	var reqBody, resBody UpdateVmfsUnmapBandwidthBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateVmfsUnmapPriorityBody struct {
    +	Req    *types.UpdateVmfsUnmapPriority         `xml:"urn:vim25 UpdateVmfsUnmapPriority,omitempty"`
    +	Res    *types.UpdateVmfsUnmapPriorityResponse `xml:"urn:vim25 UpdateVmfsUnmapPriorityResponse,omitempty"`
    +	Fault_ *soap.Fault                            `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateVmfsUnmapPriorityBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateVmfsUnmapPriority(ctx context.Context, r soap.RoundTripper, req *types.UpdateVmfsUnmapPriority) (*types.UpdateVmfsUnmapPriorityResponse, error) {
    +	var reqBody, resBody UpdateVmfsUnmapPriorityBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpdateVsan_TaskBody struct {
    +	Req    *types.UpdateVsan_Task         `xml:"urn:vim25 UpdateVsan_Task,omitempty"`
    +	Res    *types.UpdateVsan_TaskResponse `xml:"urn:vim25 UpdateVsan_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpdateVsan_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpdateVsan_Task(ctx context.Context, r soap.RoundTripper, req *types.UpdateVsan_Task) (*types.UpdateVsan_TaskResponse, error) {
    +	var reqBody, resBody UpdateVsan_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpgradeIoFilter_TaskBody struct {
    +	Req    *types.UpgradeIoFilter_Task         `xml:"urn:vim25 UpgradeIoFilter_Task,omitempty"`
    +	Res    *types.UpgradeIoFilter_TaskResponse `xml:"urn:vim25 UpgradeIoFilter_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpgradeIoFilter_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpgradeIoFilter_Task(ctx context.Context, r soap.RoundTripper, req *types.UpgradeIoFilter_Task) (*types.UpgradeIoFilter_TaskResponse, error) {
    +	var reqBody, resBody UpgradeIoFilter_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpgradeTools_TaskBody struct {
    +	Req    *types.UpgradeTools_Task         `xml:"urn:vim25 UpgradeTools_Task,omitempty"`
    +	Res    *types.UpgradeTools_TaskResponse `xml:"urn:vim25 UpgradeTools_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpgradeTools_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpgradeTools_Task(ctx context.Context, r soap.RoundTripper, req *types.UpgradeTools_Task) (*types.UpgradeTools_TaskResponse, error) {
    +	var reqBody, resBody UpgradeTools_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpgradeVM_TaskBody struct {
    +	Req    *types.UpgradeVM_Task         `xml:"urn:vim25 UpgradeVM_Task,omitempty"`
    +	Res    *types.UpgradeVM_TaskResponse `xml:"urn:vim25 UpgradeVM_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpgradeVM_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpgradeVM_Task(ctx context.Context, r soap.RoundTripper, req *types.UpgradeVM_Task) (*types.UpgradeVM_TaskResponse, error) {
    +	var reqBody, resBody UpgradeVM_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpgradeVmLayoutBody struct {
    +	Req    *types.UpgradeVmLayout         `xml:"urn:vim25 UpgradeVmLayout,omitempty"`
    +	Res    *types.UpgradeVmLayoutResponse `xml:"urn:vim25 UpgradeVmLayoutResponse,omitempty"`
    +	Fault_ *soap.Fault                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpgradeVmLayoutBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpgradeVmLayout(ctx context.Context, r soap.RoundTripper, req *types.UpgradeVmLayout) (*types.UpgradeVmLayoutResponse, error) {
    +	var reqBody, resBody UpgradeVmLayoutBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpgradeVmfsBody struct {
    +	Req    *types.UpgradeVmfs         `xml:"urn:vim25 UpgradeVmfs,omitempty"`
    +	Res    *types.UpgradeVmfsResponse `xml:"urn:vim25 UpgradeVmfsResponse,omitempty"`
    +	Fault_ *soap.Fault                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpgradeVmfsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpgradeVmfs(ctx context.Context, r soap.RoundTripper, req *types.UpgradeVmfs) (*types.UpgradeVmfsResponse, error) {
    +	var reqBody, resBody UpgradeVmfsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UpgradeVsanObjectsBody struct {
    +	Req    *types.UpgradeVsanObjects         `xml:"urn:vim25 UpgradeVsanObjects,omitempty"`
    +	Res    *types.UpgradeVsanObjectsResponse `xml:"urn:vim25 UpgradeVsanObjectsResponse,omitempty"`
    +	Fault_ *soap.Fault                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UpgradeVsanObjectsBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UpgradeVsanObjects(ctx context.Context, r soap.RoundTripper, req *types.UpgradeVsanObjects) (*types.UpgradeVsanObjectsResponse, error) {
    +	var reqBody, resBody UpgradeVsanObjectsBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UploadClientCertBody struct {
    +	Req    *types.UploadClientCert         `xml:"urn:vim25 UploadClientCert,omitempty"`
    +	Res    *types.UploadClientCertResponse `xml:"urn:vim25 UploadClientCertResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UploadClientCertBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UploadClientCert(ctx context.Context, r soap.RoundTripper, req *types.UploadClientCert) (*types.UploadClientCertResponse, error) {
    +	var reqBody, resBody UploadClientCertBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UploadKmipServerCertBody struct {
    +	Req    *types.UploadKmipServerCert         `xml:"urn:vim25 UploadKmipServerCert,omitempty"`
    +	Res    *types.UploadKmipServerCertResponse `xml:"urn:vim25 UploadKmipServerCertResponse,omitempty"`
    +	Fault_ *soap.Fault                         `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UploadKmipServerCertBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UploadKmipServerCert(ctx context.Context, r soap.RoundTripper, req *types.UploadKmipServerCert) (*types.UploadKmipServerCertResponse, error) {
    +	var reqBody, resBody UploadKmipServerCertBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type VStorageObjectCreateSnapshot_TaskBody struct {
    +	Req    *types.VStorageObjectCreateSnapshot_Task         `xml:"urn:vim25 VStorageObjectCreateSnapshot_Task,omitempty"`
    +	Res    *types.VStorageObjectCreateSnapshot_TaskResponse `xml:"urn:vim25 VStorageObjectCreateSnapshot_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *VStorageObjectCreateSnapshot_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func VStorageObjectCreateSnapshot_Task(ctx context.Context, r soap.RoundTripper, req *types.VStorageObjectCreateSnapshot_Task) (*types.VStorageObjectCreateSnapshot_TaskResponse, error) {
    +	var reqBody, resBody VStorageObjectCreateSnapshot_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ValidateCredentialsInGuestBody struct {
    +	Req    *types.ValidateCredentialsInGuest         `xml:"urn:vim25 ValidateCredentialsInGuest,omitempty"`
    +	Res    *types.ValidateCredentialsInGuestResponse `xml:"urn:vim25 ValidateCredentialsInGuestResponse,omitempty"`
    +	Fault_ *soap.Fault                               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ValidateCredentialsInGuestBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ValidateCredentialsInGuest(ctx context.Context, r soap.RoundTripper, req *types.ValidateCredentialsInGuest) (*types.ValidateCredentialsInGuestResponse, error) {
    +	var reqBody, resBody ValidateCredentialsInGuestBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ValidateHostBody struct {
    +	Req    *types.ValidateHost         `xml:"urn:vim25 ValidateHost,omitempty"`
    +	Res    *types.ValidateHostResponse `xml:"urn:vim25 ValidateHostResponse,omitempty"`
    +	Fault_ *soap.Fault                 `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ValidateHostBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ValidateHost(ctx context.Context, r soap.RoundTripper, req *types.ValidateHost) (*types.ValidateHostResponse, error) {
    +	var reqBody, resBody ValidateHostBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ValidateHostProfileComposition_TaskBody struct {
    +	Req    *types.ValidateHostProfileComposition_Task         `xml:"urn:vim25 ValidateHostProfileComposition_Task,omitempty"`
    +	Res    *types.ValidateHostProfileComposition_TaskResponse `xml:"urn:vim25 ValidateHostProfileComposition_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ValidateHostProfileComposition_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ValidateHostProfileComposition_Task(ctx context.Context, r soap.RoundTripper, req *types.ValidateHostProfileComposition_Task) (*types.ValidateHostProfileComposition_TaskResponse, error) {
    +	var reqBody, resBody ValidateHostProfileComposition_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ValidateMigrationBody struct {
    +	Req    *types.ValidateMigration         `xml:"urn:vim25 ValidateMigration,omitempty"`
    +	Res    *types.ValidateMigrationResponse `xml:"urn:vim25 ValidateMigrationResponse,omitempty"`
    +	Fault_ *soap.Fault                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ValidateMigrationBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ValidateMigration(ctx context.Context, r soap.RoundTripper, req *types.ValidateMigration) (*types.ValidateMigrationResponse, error) {
    +	var reqBody, resBody ValidateMigrationBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ValidateStoragePodConfigBody struct {
    +	Req    *types.ValidateStoragePodConfig         `xml:"urn:vim25 ValidateStoragePodConfig,omitempty"`
    +	Res    *types.ValidateStoragePodConfigResponse `xml:"urn:vim25 ValidateStoragePodConfigResponse,omitempty"`
    +	Fault_ *soap.Fault                             `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ValidateStoragePodConfigBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ValidateStoragePodConfig(ctx context.Context, r soap.RoundTripper, req *types.ValidateStoragePodConfig) (*types.ValidateStoragePodConfigResponse, error) {
    +	var reqBody, resBody ValidateStoragePodConfigBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type WaitForUpdatesBody struct {
    +	Req    *types.WaitForUpdates         `xml:"urn:vim25 WaitForUpdates,omitempty"`
    +	Res    *types.WaitForUpdatesResponse `xml:"urn:vim25 WaitForUpdatesResponse,omitempty"`
    +	Fault_ *soap.Fault                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *WaitForUpdatesBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func WaitForUpdates(ctx context.Context, r soap.RoundTripper, req *types.WaitForUpdates) (*types.WaitForUpdatesResponse, error) {
    +	var reqBody, resBody WaitForUpdatesBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type WaitForUpdatesExBody struct {
    +	Req    *types.WaitForUpdatesEx         `xml:"urn:vim25 WaitForUpdatesEx,omitempty"`
    +	Res    *types.WaitForUpdatesExResponse `xml:"urn:vim25 WaitForUpdatesExResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *WaitForUpdatesExBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func WaitForUpdatesEx(ctx context.Context, r soap.RoundTripper, req *types.WaitForUpdatesEx) (*types.WaitForUpdatesExResponse, error) {
    +	var reqBody, resBody WaitForUpdatesExBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type XmlToCustomizationSpecItemBody struct {
    +	Req    *types.XmlToCustomizationSpecItem         `xml:"urn:vim25 XmlToCustomizationSpecItem,omitempty"`
    +	Res    *types.XmlToCustomizationSpecItemResponse `xml:"urn:vim25 XmlToCustomizationSpecItemResponse,omitempty"`
    +	Fault_ *soap.Fault                               `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *XmlToCustomizationSpecItemBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func XmlToCustomizationSpecItem(ctx context.Context, r soap.RoundTripper, req *types.XmlToCustomizationSpecItem) (*types.XmlToCustomizationSpecItemResponse, error) {
    +	var reqBody, resBody XmlToCustomizationSpecItemBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ZeroFillVirtualDisk_TaskBody struct {
    +	Req    *types.ZeroFillVirtualDisk_Task         `xml:"urn:vim25 ZeroFillVirtualDisk_Task,omitempty"`
    +	Res    *types.ZeroFillVirtualDisk_TaskResponse `xml:"urn:vim25 ZeroFillVirtualDisk_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                             `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ZeroFillVirtualDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ZeroFillVirtualDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.ZeroFillVirtualDisk_Task) (*types.ZeroFillVirtualDisk_TaskResponse, error) {
    +	var reqBody, resBody ZeroFillVirtualDisk_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ConfigureVcha_TaskBody struct {
    +	Req    *types.ConfigureVcha_Task         `xml:"urn:vim25 configureVcha_Task,omitempty"`
    +	Res    *types.ConfigureVcha_TaskResponse `xml:"urn:vim25 configureVcha_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                       `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ConfigureVcha_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ConfigureVcha_Task(ctx context.Context, r soap.RoundTripper, req *types.ConfigureVcha_Task) (*types.ConfigureVcha_TaskResponse, error) {
    +	var reqBody, resBody ConfigureVcha_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreatePassiveNode_TaskBody struct {
    +	Req    *types.CreatePassiveNode_Task         `xml:"urn:vim25 createPassiveNode_Task,omitempty"`
    +	Res    *types.CreatePassiveNode_TaskResponse `xml:"urn:vim25 createPassiveNode_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreatePassiveNode_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreatePassiveNode_Task(ctx context.Context, r soap.RoundTripper, req *types.CreatePassiveNode_Task) (*types.CreatePassiveNode_TaskResponse, error) {
    +	var reqBody, resBody CreatePassiveNode_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type CreateWitnessNode_TaskBody struct {
    +	Req    *types.CreateWitnessNode_Task         `xml:"urn:vim25 createWitnessNode_Task,omitempty"`
    +	Res    *types.CreateWitnessNode_TaskResponse `xml:"urn:vim25 createWitnessNode_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                           `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *CreateWitnessNode_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func CreateWitnessNode_Task(ctx context.Context, r soap.RoundTripper, req *types.CreateWitnessNode_Task) (*types.CreateWitnessNode_TaskResponse, error) {
    +	var reqBody, resBody CreateWitnessNode_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DeployVcha_TaskBody struct {
    +	Req    *types.DeployVcha_Task         `xml:"urn:vim25 deployVcha_Task,omitempty"`
    +	Res    *types.DeployVcha_TaskResponse `xml:"urn:vim25 deployVcha_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DeployVcha_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DeployVcha_Task(ctx context.Context, r soap.RoundTripper, req *types.DeployVcha_Task) (*types.DeployVcha_TaskResponse, error) {
    +	var reqBody, resBody DeployVcha_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type DestroyVcha_TaskBody struct {
    +	Req    *types.DestroyVcha_Task         `xml:"urn:vim25 destroyVcha_Task,omitempty"`
    +	Res    *types.DestroyVcha_TaskResponse `xml:"urn:vim25 destroyVcha_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *DestroyVcha_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func DestroyVcha_Task(ctx context.Context, r soap.RoundTripper, req *types.DestroyVcha_Task) (*types.DestroyVcha_TaskResponse, error) {
    +	var reqBody, resBody DestroyVcha_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type FetchSoftwarePackagesBody struct {
    +	Req    *types.FetchSoftwarePackages         `xml:"urn:vim25 fetchSoftwarePackages,omitempty"`
    +	Res    *types.FetchSoftwarePackagesResponse `xml:"urn:vim25 fetchSoftwarePackagesResponse,omitempty"`
    +	Fault_ *soap.Fault                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *FetchSoftwarePackagesBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func FetchSoftwarePackages(ctx context.Context, r soap.RoundTripper, req *types.FetchSoftwarePackages) (*types.FetchSoftwarePackagesResponse, error) {
    +	var reqBody, resBody FetchSoftwarePackagesBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type GetClusterModeBody struct {
    +	Req    *types.GetClusterMode         `xml:"urn:vim25 getClusterMode,omitempty"`
    +	Res    *types.GetClusterModeResponse `xml:"urn:vim25 getClusterModeResponse,omitempty"`
    +	Fault_ *soap.Fault                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *GetClusterModeBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func GetClusterMode(ctx context.Context, r soap.RoundTripper, req *types.GetClusterMode) (*types.GetClusterModeResponse, error) {
    +	var reqBody, resBody GetClusterModeBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type GetVchaConfigBody struct {
    +	Req    *types.GetVchaConfig         `xml:"urn:vim25 getVchaConfig,omitempty"`
    +	Res    *types.GetVchaConfigResponse `xml:"urn:vim25 getVchaConfigResponse,omitempty"`
    +	Fault_ *soap.Fault                  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *GetVchaConfigBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func GetVchaConfig(ctx context.Context, r soap.RoundTripper, req *types.GetVchaConfig) (*types.GetVchaConfigResponse, error) {
    +	var reqBody, resBody GetVchaConfigBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type InitiateFailover_TaskBody struct {
    +	Req    *types.InitiateFailover_Task         `xml:"urn:vim25 initiateFailover_Task,omitempty"`
    +	Res    *types.InitiateFailover_TaskResponse `xml:"urn:vim25 initiateFailover_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *InitiateFailover_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func InitiateFailover_Task(ctx context.Context, r soap.RoundTripper, req *types.InitiateFailover_Task) (*types.InitiateFailover_TaskResponse, error) {
    +	var reqBody, resBody InitiateFailover_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type InstallDateBody struct {
    +	Req    *types.InstallDate         `xml:"urn:vim25 installDate,omitempty"`
    +	Res    *types.InstallDateResponse `xml:"urn:vim25 installDateResponse,omitempty"`
    +	Fault_ *soap.Fault                `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *InstallDateBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func InstallDate(ctx context.Context, r soap.RoundTripper, req *types.InstallDate) (*types.InstallDateResponse, error) {
    +	var reqBody, resBody InstallDateBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type PrepareVcha_TaskBody struct {
    +	Req    *types.PrepareVcha_Task         `xml:"urn:vim25 prepareVcha_Task,omitempty"`
    +	Res    *types.PrepareVcha_TaskResponse `xml:"urn:vim25 prepareVcha_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *PrepareVcha_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func PrepareVcha_Task(ctx context.Context, r soap.RoundTripper, req *types.PrepareVcha_Task) (*types.PrepareVcha_TaskResponse, error) {
    +	var reqBody, resBody PrepareVcha_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type QueryDatacenterConfigOptionDescriptorBody struct {
    +	Req    *types.QueryDatacenterConfigOptionDescriptor         `xml:"urn:vim25 queryDatacenterConfigOptionDescriptor,omitempty"`
    +	Res    *types.QueryDatacenterConfigOptionDescriptorResponse `xml:"urn:vim25 queryDatacenterConfigOptionDescriptorResponse,omitempty"`
    +	Fault_ *soap.Fault                                          `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *QueryDatacenterConfigOptionDescriptorBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func QueryDatacenterConfigOptionDescriptor(ctx context.Context, r soap.RoundTripper, req *types.QueryDatacenterConfigOptionDescriptor) (*types.QueryDatacenterConfigOptionDescriptorResponse, error) {
    +	var reqBody, resBody QueryDatacenterConfigOptionDescriptorBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type ReloadVirtualMachineFromPath_TaskBody struct {
    +	Req    *types.ReloadVirtualMachineFromPath_Task         `xml:"urn:vim25 reloadVirtualMachineFromPath_Task,omitempty"`
    +	Res    *types.ReloadVirtualMachineFromPath_TaskResponse `xml:"urn:vim25 reloadVirtualMachineFromPath_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                                      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *ReloadVirtualMachineFromPath_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func ReloadVirtualMachineFromPath_Task(ctx context.Context, r soap.RoundTripper, req *types.ReloadVirtualMachineFromPath_Task) (*types.ReloadVirtualMachineFromPath_TaskResponse, error) {
    +	var reqBody, resBody ReloadVirtualMachineFromPath_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type SetClusterMode_TaskBody struct {
    +	Req    *types.SetClusterMode_Task         `xml:"urn:vim25 setClusterMode_Task,omitempty"`
    +	Res    *types.SetClusterMode_TaskResponse `xml:"urn:vim25 setClusterMode_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *SetClusterMode_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func SetClusterMode_Task(ctx context.Context, r soap.RoundTripper, req *types.SetClusterMode_Task) (*types.SetClusterMode_TaskResponse, error) {
    +	var reqBody, resBody SetClusterMode_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type SetCustomValueBody struct {
    +	Req    *types.SetCustomValue         `xml:"urn:vim25 setCustomValue,omitempty"`
    +	Res    *types.SetCustomValueResponse `xml:"urn:vim25 setCustomValueResponse,omitempty"`
    +	Fault_ *soap.Fault                   `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *SetCustomValueBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func SetCustomValue(ctx context.Context, r soap.RoundTripper, req *types.SetCustomValue) (*types.SetCustomValueResponse, error) {
    +	var reqBody, resBody SetCustomValueBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    +
    +type UnregisterVApp_TaskBody struct {
    +	Req    *types.UnregisterVApp_Task         `xml:"urn:vim25 unregisterVApp_Task,omitempty"`
    +	Res    *types.UnregisterVApp_TaskResponse `xml:"urn:vim25 unregisterVApp_TaskResponse,omitempty"`
    +	Fault_ *soap.Fault                        `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
    +}
    +
    +func (b *UnregisterVApp_TaskBody) Fault() *soap.Fault { return b.Fault_ }
    +
    +func UnregisterVApp_Task(ctx context.Context, r soap.RoundTripper, req *types.UnregisterVApp_Task) (*types.UnregisterVApp_TaskResponse, error) {
    +	var reqBody, resBody UnregisterVApp_TaskBody
    +
    +	reqBody.Req = req
    +
    +	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    +		return nil, err
    +	}
    +
    +	return resBody.Res, nil
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/methods/service_content.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/methods/service_content.go
    new file mode 100644
    index 000000000..401646598
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/methods/service_content.go
    @@ -0,0 +1,57 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package methods
    +
    +import (
    +	"context"
    +	"time"
    +
    +	"github.com/vmware/govmomi/vim25/soap"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +// copy of vim25.ServiceInstance to avoid import cycle
    +var serviceInstance = types.ManagedObjectReference{
    +	Type:  "ServiceInstance",
    +	Value: "ServiceInstance",
    +}
    +
    +func GetServiceContent(ctx context.Context, r soap.RoundTripper) (types.ServiceContent, error) {
    +	req := types.RetrieveServiceContent{
    +		This: serviceInstance,
    +	}
    +
    +	res, err := RetrieveServiceContent(ctx, r, &req)
    +	if err != nil {
    +		return types.ServiceContent{}, err
    +	}
    +
    +	return res.Returnval, nil
    +}
    +
    +func GetCurrentTime(ctx context.Context, r soap.RoundTripper) (*time.Time, error) {
    +	req := types.CurrentTime{
    +		This: serviceInstance,
    +	}
    +
    +	res, err := CurrentTime(ctx, r, &req)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return &res.Returnval, nil
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/mo/ancestors.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/mo/ancestors.go
    new file mode 100644
    index 000000000..d3da5b184
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/mo/ancestors.go
    @@ -0,0 +1,137 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package mo
    +
    +import (
    +	"context"
    +	"fmt"
    +
    +	"github.com/vmware/govmomi/vim25/soap"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +// Ancestors returns the entire ancestry tree of a specified managed object.
    +// The return value includes the root node and the specified object itself.
    +func Ancestors(ctx context.Context, rt soap.RoundTripper, pc, obj types.ManagedObjectReference) ([]ManagedEntity, error) {
    +	ospec := types.ObjectSpec{
    +		Obj: obj,
    +		SelectSet: []types.BaseSelectionSpec{
    +			&types.TraversalSpec{
    +				SelectionSpec: types.SelectionSpec{Name: "traverseParent"},
    +				Type:          "ManagedEntity",
    +				Path:          "parent",
    +				Skip:          types.NewBool(false),
    +				SelectSet: []types.BaseSelectionSpec{
    +					&types.SelectionSpec{Name: "traverseParent"},
    +				},
    +			},
    +			&types.TraversalSpec{
    +				SelectionSpec: types.SelectionSpec{},
    +				Type:          "VirtualMachine",
    +				Path:          "parentVApp",
    +				Skip:          types.NewBool(false),
    +				SelectSet: []types.BaseSelectionSpec{
    +					&types.SelectionSpec{Name: "traverseParent"},
    +				},
    +			},
    +		},
    +		Skip: types.NewBool(false),
    +	}
    +
    +	pspec := []types.PropertySpec{
    +		{
    +			Type:    "ManagedEntity",
    +			PathSet: []string{"name", "parent"},
    +		},
    +		{
    +			Type:    "VirtualMachine",
    +			PathSet: []string{"parentVApp"},
    +		},
    +	}
    +
    +	req := types.RetrieveProperties{
    +		This: pc,
    +		SpecSet: []types.PropertyFilterSpec{
    +			{
    +				ObjectSet: []types.ObjectSpec{ospec},
    +				PropSet:   pspec,
    +			},
    +		},
    +	}
    +
    +	var ifaces []interface{}
    +	err := RetrievePropertiesForRequest(ctx, rt, req, &ifaces)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	var out []ManagedEntity
    +
    +	// Build ancestry tree by iteratively finding a new child.
    +	for len(out) < len(ifaces) {
    +		var find types.ManagedObjectReference
    +
    +		if len(out) > 0 {
    +			find = out[len(out)-1].Self
    +		}
    +
    +		// Find entity we're looking for given the last entity in the current tree.
    +		for _, iface := range ifaces {
    +			me := iface.(IsManagedEntity).GetManagedEntity()
    +
    +			if me.Name == "" {
    +				// The types below have their own 'Name' field, so ManagedEntity.Name (me.Name) is empty.
    +				// We only hit this case when the 'obj' param is one of these types.
    +				// In most cases, 'obj' is a Folder so Name isn't collected in this call.
    +				switch x := iface.(type) {
    +				case Network:
    +					me.Name = x.Name
    +				case DistributedVirtualSwitch:
    +					me.Name = x.Name
    +				case DistributedVirtualPortgroup:
    +					me.Name = x.Name
    +				case OpaqueNetwork:
    +					me.Name = x.Name
    +				default:
    +					// ManagedEntity always has a Name, if we hit this point we missed a case above.
    +					panic(fmt.Sprintf("%#v Name is empty", me.Reference()))
    +				}
    +			}
    +
    +			if me.Parent == nil {
    +				// Special case for VirtualMachine within VirtualApp,
    +				// unlikely to hit this other than via Finder.Element()
    +				switch x := iface.(type) {
    +				case VirtualMachine:
    +					me.Parent = x.ParentVApp
    +				}
    +			}
    +
    +			if me.Parent == nil {
    +				out = append(out, me)
    +				break
    +			}
    +
    +			if *me.Parent == find {
    +				out = append(out, me)
    +				break
    +			}
    +		}
    +	}
    +
    +	return out, nil
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/mo/entity.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/mo/entity.go
    new file mode 100644
    index 000000000..193e6f71e
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/mo/entity.go
    @@ -0,0 +1,24 @@
    +/*
    +Copyright (c) 2016 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package mo
    +
    +// Entity is the interface that is implemented by all managed objects
    +// that extend ManagedEntity.
    +type Entity interface {
    +	Reference
    +	Entity() *ManagedEntity
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/mo/extra.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/mo/extra.go
    new file mode 100644
    index 000000000..254ef3594
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/mo/extra.go
    @@ -0,0 +1,61 @@
    +/*
    +Copyright (c) 2014 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package mo
    +
    +type IsManagedEntity interface {
    +	GetManagedEntity() ManagedEntity
    +}
    +
    +func (m ComputeResource) GetManagedEntity() ManagedEntity {
    +	return m.ManagedEntity
    +}
    +
    +func (m Datacenter) GetManagedEntity() ManagedEntity {
    +	return m.ManagedEntity
    +}
    +
    +func (m Datastore) GetManagedEntity() ManagedEntity {
    +	return m.ManagedEntity
    +}
    +
    +func (m DistributedVirtualSwitch) GetManagedEntity() ManagedEntity {
    +	return m.ManagedEntity
    +}
    +
    +func (m DistributedVirtualPortgroup) GetManagedEntity() ManagedEntity {
    +	return m.ManagedEntity
    +}
    +
    +func (m Folder) GetManagedEntity() ManagedEntity {
    +	return m.ManagedEntity
    +}
    +
    +func (m HostSystem) GetManagedEntity() ManagedEntity {
    +	return m.ManagedEntity
    +}
    +
    +func (m Network) GetManagedEntity() ManagedEntity {
    +	return m.ManagedEntity
    +}
    +
    +func (m ResourcePool) GetManagedEntity() ManagedEntity {
    +	return m.ManagedEntity
    +}
    +
    +func (m VirtualMachine) GetManagedEntity() ManagedEntity {
    +	return m.ManagedEntity
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/mo/mo.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/mo/mo.go
    new file mode 100644
    index 000000000..4f19988e3
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/mo/mo.go
    @@ -0,0 +1,1801 @@
    +/*
    +Copyright (c) 2014-2018 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package mo
    +
    +import (
    +	"reflect"
    +	"time"
    +
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +type Alarm struct {
    +	ExtensibleManagedObject
    +
    +	Info types.AlarmInfo `mo:"info"`
    +}
    +
    +func init() {
    +	t["Alarm"] = reflect.TypeOf((*Alarm)(nil)).Elem()
    +}
    +
    +type AlarmManager struct {
    +	Self types.ManagedObjectReference
    +
    +	DefaultExpression []types.BaseAlarmExpression `mo:"defaultExpression"`
    +	Description       types.AlarmDescription      `mo:"description"`
    +}
    +
    +func (m AlarmManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["AlarmManager"] = reflect.TypeOf((*AlarmManager)(nil)).Elem()
    +}
    +
    +type AuthorizationManager struct {
    +	Self types.ManagedObjectReference
    +
    +	PrivilegeList []types.AuthorizationPrivilege `mo:"privilegeList"`
    +	RoleList      []types.AuthorizationRole      `mo:"roleList"`
    +	Description   types.AuthorizationDescription `mo:"description"`
    +}
    +
    +func (m AuthorizationManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["AuthorizationManager"] = reflect.TypeOf((*AuthorizationManager)(nil)).Elem()
    +}
    +
    +type CertificateManager struct {
    +	Self types.ManagedObjectReference
    +}
    +
    +func (m CertificateManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["CertificateManager"] = reflect.TypeOf((*CertificateManager)(nil)).Elem()
    +}
    +
    +type ClusterComputeResource struct {
    +	ComputeResource
    +
    +	Configuration     types.ClusterConfigInfo          `mo:"configuration"`
    +	Recommendation    []types.ClusterRecommendation    `mo:"recommendation"`
    +	DrsRecommendation []types.ClusterDrsRecommendation `mo:"drsRecommendation"`
    +	MigrationHistory  []types.ClusterDrsMigration      `mo:"migrationHistory"`
    +	ActionHistory     []types.ClusterActionHistory     `mo:"actionHistory"`
    +	DrsFault          []types.ClusterDrsFaults         `mo:"drsFault"`
    +}
    +
    +func init() {
    +	t["ClusterComputeResource"] = reflect.TypeOf((*ClusterComputeResource)(nil)).Elem()
    +}
    +
    +type ClusterEVCManager struct {
    +	ExtensibleManagedObject
    +
    +	ManagedCluster types.ManagedObjectReference    `mo:"managedCluster"`
    +	EvcState       types.ClusterEVCManagerEVCState `mo:"evcState"`
    +}
    +
    +func init() {
    +	t["ClusterEVCManager"] = reflect.TypeOf((*ClusterEVCManager)(nil)).Elem()
    +}
    +
    +type ClusterProfile struct {
    +	Profile
    +}
    +
    +func init() {
    +	t["ClusterProfile"] = reflect.TypeOf((*ClusterProfile)(nil)).Elem()
    +}
    +
    +type ClusterProfileManager struct {
    +	ProfileManager
    +}
    +
    +func init() {
    +	t["ClusterProfileManager"] = reflect.TypeOf((*ClusterProfileManager)(nil)).Elem()
    +}
    +
    +type ComputeResource struct {
    +	ManagedEntity
    +
    +	ResourcePool       *types.ManagedObjectReference       `mo:"resourcePool"`
    +	Host               []types.ManagedObjectReference      `mo:"host"`
    +	Datastore          []types.ManagedObjectReference      `mo:"datastore"`
    +	Network            []types.ManagedObjectReference      `mo:"network"`
    +	Summary            types.BaseComputeResourceSummary    `mo:"summary"`
    +	EnvironmentBrowser *types.ManagedObjectReference       `mo:"environmentBrowser"`
    +	ConfigurationEx    types.BaseComputeResourceConfigInfo `mo:"configurationEx"`
    +}
    +
    +func (m *ComputeResource) Entity() *ManagedEntity {
    +	return &m.ManagedEntity
    +}
    +
    +func init() {
    +	t["ComputeResource"] = reflect.TypeOf((*ComputeResource)(nil)).Elem()
    +}
    +
    +type ContainerView struct {
    +	ManagedObjectView
    +
    +	Container types.ManagedObjectReference `mo:"container"`
    +	Type      []string                     `mo:"type"`
    +	Recursive bool                         `mo:"recursive"`
    +}
    +
    +func init() {
    +	t["ContainerView"] = reflect.TypeOf((*ContainerView)(nil)).Elem()
    +}
    +
    +type CryptoManager struct {
    +	Self types.ManagedObjectReference
    +
    +	Enabled bool `mo:"enabled"`
    +}
    +
    +func (m CryptoManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["CryptoManager"] = reflect.TypeOf((*CryptoManager)(nil)).Elem()
    +}
    +
    +type CryptoManagerHost struct {
    +	CryptoManager
    +}
    +
    +func init() {
    +	t["CryptoManagerHost"] = reflect.TypeOf((*CryptoManagerHost)(nil)).Elem()
    +}
    +
    +type CryptoManagerHostKMS struct {
    +	CryptoManagerHost
    +}
    +
    +func init() {
    +	t["CryptoManagerHostKMS"] = reflect.TypeOf((*CryptoManagerHostKMS)(nil)).Elem()
    +}
    +
    +type CryptoManagerKmip struct {
    +	CryptoManager
    +
    +	KmipServers []types.KmipClusterInfo `mo:"kmipServers"`
    +}
    +
    +func init() {
    +	t["CryptoManagerKmip"] = reflect.TypeOf((*CryptoManagerKmip)(nil)).Elem()
    +}
    +
    +type CustomFieldsManager struct {
    +	Self types.ManagedObjectReference
    +
    +	Field []types.CustomFieldDef `mo:"field"`
    +}
    +
    +func (m CustomFieldsManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["CustomFieldsManager"] = reflect.TypeOf((*CustomFieldsManager)(nil)).Elem()
    +}
    +
    +type CustomizationSpecManager struct {
    +	Self types.ManagedObjectReference
    +
    +	Info          []types.CustomizationSpecInfo `mo:"info"`
    +	EncryptionKey []byte                        `mo:"encryptionKey"`
    +}
    +
    +func (m CustomizationSpecManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["CustomizationSpecManager"] = reflect.TypeOf((*CustomizationSpecManager)(nil)).Elem()
    +}
    +
    +type Datacenter struct {
    +	ManagedEntity
    +
    +	VmFolder        types.ManagedObjectReference   `mo:"vmFolder"`
    +	HostFolder      types.ManagedObjectReference   `mo:"hostFolder"`
    +	DatastoreFolder types.ManagedObjectReference   `mo:"datastoreFolder"`
    +	NetworkFolder   types.ManagedObjectReference   `mo:"networkFolder"`
    +	Datastore       []types.ManagedObjectReference `mo:"datastore"`
    +	Network         []types.ManagedObjectReference `mo:"network"`
    +	Configuration   types.DatacenterConfigInfo     `mo:"configuration"`
    +}
    +
    +func (m *Datacenter) Entity() *ManagedEntity {
    +	return &m.ManagedEntity
    +}
    +
    +func init() {
    +	t["Datacenter"] = reflect.TypeOf((*Datacenter)(nil)).Elem()
    +}
    +
    +type Datastore struct {
    +	ManagedEntity
    +
    +	Info              types.BaseDatastoreInfo        `mo:"info"`
    +	Summary           types.DatastoreSummary         `mo:"summary"`
    +	Host              []types.DatastoreHostMount     `mo:"host"`
    +	Vm                []types.ManagedObjectReference `mo:"vm"`
    +	Browser           types.ManagedObjectReference   `mo:"browser"`
    +	Capability        types.DatastoreCapability      `mo:"capability"`
    +	IormConfiguration *types.StorageIORMInfo         `mo:"iormConfiguration"`
    +}
    +
    +func (m *Datastore) Entity() *ManagedEntity {
    +	return &m.ManagedEntity
    +}
    +
    +func init() {
    +	t["Datastore"] = reflect.TypeOf((*Datastore)(nil)).Elem()
    +}
    +
    +type DatastoreNamespaceManager struct {
    +	Self types.ManagedObjectReference
    +}
    +
    +func (m DatastoreNamespaceManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["DatastoreNamespaceManager"] = reflect.TypeOf((*DatastoreNamespaceManager)(nil)).Elem()
    +}
    +
    +type DiagnosticManager struct {
    +	Self types.ManagedObjectReference
    +}
    +
    +func (m DiagnosticManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["DiagnosticManager"] = reflect.TypeOf((*DiagnosticManager)(nil)).Elem()
    +}
    +
    +type DistributedVirtualPortgroup struct {
    +	Network
    +
    +	Key      string                      `mo:"key"`
    +	Config   types.DVPortgroupConfigInfo `mo:"config"`
    +	PortKeys []string                    `mo:"portKeys"`
    +}
    +
    +func init() {
    +	t["DistributedVirtualPortgroup"] = reflect.TypeOf((*DistributedVirtualPortgroup)(nil)).Elem()
    +}
    +
    +type DistributedVirtualSwitch struct {
    +	ManagedEntity
    +
    +	Uuid                string                         `mo:"uuid"`
    +	Capability          types.DVSCapability            `mo:"capability"`
    +	Summary             types.DVSSummary               `mo:"summary"`
    +	Config              types.BaseDVSConfigInfo        `mo:"config"`
    +	NetworkResourcePool []types.DVSNetworkResourcePool `mo:"networkResourcePool"`
    +	Portgroup           []types.ManagedObjectReference `mo:"portgroup"`
    +	Runtime             *types.DVSRuntimeInfo          `mo:"runtime"`
    +}
    +
    +func (m *DistributedVirtualSwitch) Entity() *ManagedEntity {
    +	return &m.ManagedEntity
    +}
    +
    +func init() {
    +	t["DistributedVirtualSwitch"] = reflect.TypeOf((*DistributedVirtualSwitch)(nil)).Elem()
    +}
    +
    +type DistributedVirtualSwitchManager struct {
    +	Self types.ManagedObjectReference
    +}
    +
    +func (m DistributedVirtualSwitchManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["DistributedVirtualSwitchManager"] = reflect.TypeOf((*DistributedVirtualSwitchManager)(nil)).Elem()
    +}
    +
    +type EnvironmentBrowser struct {
    +	Self types.ManagedObjectReference
    +
    +	DatastoreBrowser *types.ManagedObjectReference `mo:"datastoreBrowser"`
    +}
    +
    +func (m EnvironmentBrowser) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["EnvironmentBrowser"] = reflect.TypeOf((*EnvironmentBrowser)(nil)).Elem()
    +}
    +
    +type EventHistoryCollector struct {
    +	HistoryCollector
    +
    +	LatestPage []types.BaseEvent `mo:"latestPage"`
    +}
    +
    +func init() {
    +	t["EventHistoryCollector"] = reflect.TypeOf((*EventHistoryCollector)(nil)).Elem()
    +}
    +
    +type EventManager struct {
    +	Self types.ManagedObjectReference
    +
    +	Description  types.EventDescription `mo:"description"`
    +	LatestEvent  types.BaseEvent        `mo:"latestEvent"`
    +	MaxCollector int32                  `mo:"maxCollector"`
    +}
    +
    +func (m EventManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["EventManager"] = reflect.TypeOf((*EventManager)(nil)).Elem()
    +}
    +
    +type ExtensibleManagedObject struct {
    +	Self types.ManagedObjectReference
    +
    +	Value          []types.BaseCustomFieldValue `mo:"value"`
    +	AvailableField []types.CustomFieldDef       `mo:"availableField"`
    +}
    +
    +func (m ExtensibleManagedObject) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["ExtensibleManagedObject"] = reflect.TypeOf((*ExtensibleManagedObject)(nil)).Elem()
    +}
    +
    +type ExtensionManager struct {
    +	Self types.ManagedObjectReference
    +
    +	ExtensionList []types.Extension `mo:"extensionList"`
    +}
    +
    +func (m ExtensionManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["ExtensionManager"] = reflect.TypeOf((*ExtensionManager)(nil)).Elem()
    +}
    +
    +type FailoverClusterConfigurator struct {
    +	Self types.ManagedObjectReference
    +
    +	DisabledConfigureMethod []string `mo:"disabledConfigureMethod"`
    +}
    +
    +func (m FailoverClusterConfigurator) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["FailoverClusterConfigurator"] = reflect.TypeOf((*FailoverClusterConfigurator)(nil)).Elem()
    +}
    +
    +type FailoverClusterManager struct {
    +	Self types.ManagedObjectReference
    +
    +	DisabledClusterMethod []string `mo:"disabledClusterMethod"`
    +}
    +
    +func (m FailoverClusterManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["FailoverClusterManager"] = reflect.TypeOf((*FailoverClusterManager)(nil)).Elem()
    +}
    +
    +type FileManager struct {
    +	Self types.ManagedObjectReference
    +}
    +
    +func (m FileManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["FileManager"] = reflect.TypeOf((*FileManager)(nil)).Elem()
    +}
    +
    +type Folder struct {
    +	ManagedEntity
    +
    +	ChildType   []string                       `mo:"childType"`
    +	ChildEntity []types.ManagedObjectReference `mo:"childEntity"`
    +}
    +
    +func (m *Folder) Entity() *ManagedEntity {
    +	return &m.ManagedEntity
    +}
    +
    +func init() {
    +	t["Folder"] = reflect.TypeOf((*Folder)(nil)).Elem()
    +}
    +
    +type GuestAliasManager struct {
    +	Self types.ManagedObjectReference
    +}
    +
    +func (m GuestAliasManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["GuestAliasManager"] = reflect.TypeOf((*GuestAliasManager)(nil)).Elem()
    +}
    +
    +type GuestAuthManager struct {
    +	Self types.ManagedObjectReference
    +}
    +
    +func (m GuestAuthManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["GuestAuthManager"] = reflect.TypeOf((*GuestAuthManager)(nil)).Elem()
    +}
    +
    +type GuestFileManager struct {
    +	Self types.ManagedObjectReference
    +}
    +
    +func (m GuestFileManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["GuestFileManager"] = reflect.TypeOf((*GuestFileManager)(nil)).Elem()
    +}
    +
    +type GuestOperationsManager struct {
    +	Self types.ManagedObjectReference
    +
    +	AuthManager                 *types.ManagedObjectReference `mo:"authManager"`
    +	FileManager                 *types.ManagedObjectReference `mo:"fileManager"`
    +	ProcessManager              *types.ManagedObjectReference `mo:"processManager"`
    +	GuestWindowsRegistryManager *types.ManagedObjectReference `mo:"guestWindowsRegistryManager"`
    +	AliasManager                *types.ManagedObjectReference `mo:"aliasManager"`
    +}
    +
    +func (m GuestOperationsManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["GuestOperationsManager"] = reflect.TypeOf((*GuestOperationsManager)(nil)).Elem()
    +}
    +
    +type GuestProcessManager struct {
    +	Self types.ManagedObjectReference
    +}
    +
    +func (m GuestProcessManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["GuestProcessManager"] = reflect.TypeOf((*GuestProcessManager)(nil)).Elem()
    +}
    +
    +type GuestWindowsRegistryManager struct {
    +	Self types.ManagedObjectReference
    +}
    +
    +func (m GuestWindowsRegistryManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["GuestWindowsRegistryManager"] = reflect.TypeOf((*GuestWindowsRegistryManager)(nil)).Elem()
    +}
    +
    +type HealthUpdateManager struct {
    +	Self types.ManagedObjectReference
    +}
    +
    +func (m HealthUpdateManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["HealthUpdateManager"] = reflect.TypeOf((*HealthUpdateManager)(nil)).Elem()
    +}
    +
    +type HistoryCollector struct {
    +	Self types.ManagedObjectReference
    +
    +	Filter types.AnyType `mo:"filter"`
    +}
    +
    +func (m HistoryCollector) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["HistoryCollector"] = reflect.TypeOf((*HistoryCollector)(nil)).Elem()
    +}
    +
    +type HostAccessManager struct {
    +	Self types.ManagedObjectReference
    +
    +	LockdownMode types.HostLockdownMode `mo:"lockdownMode"`
    +}
    +
    +func (m HostAccessManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["HostAccessManager"] = reflect.TypeOf((*HostAccessManager)(nil)).Elem()
    +}
    +
    +type HostActiveDirectoryAuthentication struct {
    +	HostDirectoryStore
    +}
    +
    +func init() {
    +	t["HostActiveDirectoryAuthentication"] = reflect.TypeOf((*HostActiveDirectoryAuthentication)(nil)).Elem()
    +}
    +
    +type HostAuthenticationManager struct {
    +	Self types.ManagedObjectReference
    +
    +	Info           types.HostAuthenticationManagerInfo `mo:"info"`
    +	SupportedStore []types.ManagedObjectReference      `mo:"supportedStore"`
    +}
    +
    +func (m HostAuthenticationManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["HostAuthenticationManager"] = reflect.TypeOf((*HostAuthenticationManager)(nil)).Elem()
    +}
    +
    +type HostAuthenticationStore struct {
    +	Self types.ManagedObjectReference
    +
    +	Info types.BaseHostAuthenticationStoreInfo `mo:"info"`
    +}
    +
    +func (m HostAuthenticationStore) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["HostAuthenticationStore"] = reflect.TypeOf((*HostAuthenticationStore)(nil)).Elem()
    +}
    +
    +type HostAutoStartManager struct {
    +	Self types.ManagedObjectReference
    +
    +	Config types.HostAutoStartManagerConfig `mo:"config"`
    +}
    +
    +func (m HostAutoStartManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["HostAutoStartManager"] = reflect.TypeOf((*HostAutoStartManager)(nil)).Elem()
    +}
    +
    +type HostBootDeviceSystem struct {
    +	Self types.ManagedObjectReference
    +}
    +
    +func (m HostBootDeviceSystem) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["HostBootDeviceSystem"] = reflect.TypeOf((*HostBootDeviceSystem)(nil)).Elem()
    +}
    +
    +type HostCacheConfigurationManager struct {
    +	Self types.ManagedObjectReference
    +
    +	CacheConfigurationInfo []types.HostCacheConfigurationInfo `mo:"cacheConfigurationInfo"`
    +}
    +
    +func (m HostCacheConfigurationManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["HostCacheConfigurationManager"] = reflect.TypeOf((*HostCacheConfigurationManager)(nil)).Elem()
    +}
    +
    +type HostCertificateManager struct {
    +	Self types.ManagedObjectReference
    +
    +	CertificateInfo types.HostCertificateManagerCertificateInfo `mo:"certificateInfo"`
    +}
    +
    +func (m HostCertificateManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["HostCertificateManager"] = reflect.TypeOf((*HostCertificateManager)(nil)).Elem()
    +}
    +
    +type HostCpuSchedulerSystem struct {
    +	ExtensibleManagedObject
    +
    +	HyperthreadInfo *types.HostHyperThreadScheduleInfo `mo:"hyperthreadInfo"`
    +}
    +
    +func init() {
    +	t["HostCpuSchedulerSystem"] = reflect.TypeOf((*HostCpuSchedulerSystem)(nil)).Elem()
    +}
    +
    +type HostDatastoreBrowser struct {
    +	Self types.ManagedObjectReference
    +
    +	Datastore     []types.ManagedObjectReference `mo:"datastore"`
    +	SupportedType []types.BaseFileQuery          `mo:"supportedType"`
    +}
    +
    +func (m HostDatastoreBrowser) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["HostDatastoreBrowser"] = reflect.TypeOf((*HostDatastoreBrowser)(nil)).Elem()
    +}
    +
    +type HostDatastoreSystem struct {
    +	Self types.ManagedObjectReference
    +
    +	Datastore    []types.ManagedObjectReference        `mo:"datastore"`
    +	Capabilities types.HostDatastoreSystemCapabilities `mo:"capabilities"`
    +}
    +
    +func (m HostDatastoreSystem) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["HostDatastoreSystem"] = reflect.TypeOf((*HostDatastoreSystem)(nil)).Elem()
    +}
    +
    +type HostDateTimeSystem struct {
    +	Self types.ManagedObjectReference
    +
    +	DateTimeInfo types.HostDateTimeInfo `mo:"dateTimeInfo"`
    +}
    +
    +func (m HostDateTimeSystem) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["HostDateTimeSystem"] = reflect.TypeOf((*HostDateTimeSystem)(nil)).Elem()
    +}
    +
    +type HostDiagnosticSystem struct {
    +	Self types.ManagedObjectReference
    +
    +	ActivePartition *types.HostDiagnosticPartition `mo:"activePartition"`
    +}
    +
    +func (m HostDiagnosticSystem) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["HostDiagnosticSystem"] = reflect.TypeOf((*HostDiagnosticSystem)(nil)).Elem()
    +}
    +
    +type HostDirectoryStore struct {
    +	HostAuthenticationStore
    +}
    +
    +func init() {
    +	t["HostDirectoryStore"] = reflect.TypeOf((*HostDirectoryStore)(nil)).Elem()
    +}
    +
    +type HostEsxAgentHostManager struct {
    +	Self types.ManagedObjectReference
    +
    +	ConfigInfo types.HostEsxAgentHostManagerConfigInfo `mo:"configInfo"`
    +}
    +
    +func (m HostEsxAgentHostManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["HostEsxAgentHostManager"] = reflect.TypeOf((*HostEsxAgentHostManager)(nil)).Elem()
    +}
    +
    +type HostFirewallSystem struct {
    +	ExtensibleManagedObject
    +
    +	FirewallInfo *types.HostFirewallInfo `mo:"firewallInfo"`
    +}
    +
    +func init() {
    +	t["HostFirewallSystem"] = reflect.TypeOf((*HostFirewallSystem)(nil)).Elem()
    +}
    +
    +type HostFirmwareSystem struct {
    +	Self types.ManagedObjectReference
    +}
    +
    +func (m HostFirmwareSystem) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["HostFirmwareSystem"] = reflect.TypeOf((*HostFirmwareSystem)(nil)).Elem()
    +}
    +
    +type HostGraphicsManager struct {
    +	ExtensibleManagedObject
    +
    +	GraphicsInfo           []types.HostGraphicsInfo          `mo:"graphicsInfo"`
    +	GraphicsConfig         *types.HostGraphicsConfig         `mo:"graphicsConfig"`
    +	SharedPassthruGpuTypes []string                          `mo:"sharedPassthruGpuTypes"`
    +	SharedGpuCapabilities  []types.HostSharedGpuCapabilities `mo:"sharedGpuCapabilities"`
    +}
    +
    +func init() {
    +	t["HostGraphicsManager"] = reflect.TypeOf((*HostGraphicsManager)(nil)).Elem()
    +}
    +
    +type HostHealthStatusSystem struct {
    +	Self types.ManagedObjectReference
    +
    +	Runtime types.HealthSystemRuntime `mo:"runtime"`
    +}
    +
    +func (m HostHealthStatusSystem) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["HostHealthStatusSystem"] = reflect.TypeOf((*HostHealthStatusSystem)(nil)).Elem()
    +}
    +
    +type HostImageConfigManager struct {
    +	Self types.ManagedObjectReference
    +}
    +
    +func (m HostImageConfigManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["HostImageConfigManager"] = reflect.TypeOf((*HostImageConfigManager)(nil)).Elem()
    +}
    +
    +type HostKernelModuleSystem struct {
    +	Self types.ManagedObjectReference
    +}
    +
    +func (m HostKernelModuleSystem) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["HostKernelModuleSystem"] = reflect.TypeOf((*HostKernelModuleSystem)(nil)).Elem()
    +}
    +
    +type HostLocalAccountManager struct {
    +	Self types.ManagedObjectReference
    +}
    +
    +func (m HostLocalAccountManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["HostLocalAccountManager"] = reflect.TypeOf((*HostLocalAccountManager)(nil)).Elem()
    +}
    +
    +type HostLocalAuthentication struct {
    +	HostAuthenticationStore
    +}
    +
    +func init() {
    +	t["HostLocalAuthentication"] = reflect.TypeOf((*HostLocalAuthentication)(nil)).Elem()
    +}
    +
    +type HostMemorySystem struct {
    +	ExtensibleManagedObject
    +
    +	ConsoleReservationInfo        *types.ServiceConsoleReservationInfo       `mo:"consoleReservationInfo"`
    +	VirtualMachineReservationInfo *types.VirtualMachineMemoryReservationInfo `mo:"virtualMachineReservationInfo"`
    +}
    +
    +func init() {
    +	t["HostMemorySystem"] = reflect.TypeOf((*HostMemorySystem)(nil)).Elem()
    +}
    +
    +type HostNetworkSystem struct {
    +	ExtensibleManagedObject
    +
    +	Capabilities         *types.HostNetCapabilities        `mo:"capabilities"`
    +	NetworkInfo          *types.HostNetworkInfo            `mo:"networkInfo"`
    +	OffloadCapabilities  *types.HostNetOffloadCapabilities `mo:"offloadCapabilities"`
    +	NetworkConfig        *types.HostNetworkConfig          `mo:"networkConfig"`
    +	DnsConfig            types.BaseHostDnsConfig           `mo:"dnsConfig"`
    +	IpRouteConfig        types.BaseHostIpRouteConfig       `mo:"ipRouteConfig"`
    +	ConsoleIpRouteConfig types.BaseHostIpRouteConfig       `mo:"consoleIpRouteConfig"`
    +}
    +
    +func init() {
    +	t["HostNetworkSystem"] = reflect.TypeOf((*HostNetworkSystem)(nil)).Elem()
    +}
    +
    +type HostNvdimmSystem struct {
    +	Self types.ManagedObjectReference
    +
    +	NvdimmSystemInfo types.NvdimmSystemInfo `mo:"nvdimmSystemInfo"`
    +}
    +
    +func (m HostNvdimmSystem) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["HostNvdimmSystem"] = reflect.TypeOf((*HostNvdimmSystem)(nil)).Elem()
    +}
    +
    +type HostPatchManager struct {
    +	Self types.ManagedObjectReference
    +}
    +
    +func (m HostPatchManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["HostPatchManager"] = reflect.TypeOf((*HostPatchManager)(nil)).Elem()
    +}
    +
    +type HostPciPassthruSystem struct {
    +	ExtensibleManagedObject
    +
    +	PciPassthruInfo     []types.BaseHostPciPassthruInfo     `mo:"pciPassthruInfo"`
    +	SriovDevicePoolInfo []types.BaseHostSriovDevicePoolInfo `mo:"sriovDevicePoolInfo"`
    +}
    +
    +func init() {
    +	t["HostPciPassthruSystem"] = reflect.TypeOf((*HostPciPassthruSystem)(nil)).Elem()
    +}
    +
    +type HostPowerSystem struct {
    +	Self types.ManagedObjectReference
    +
    +	Capability types.PowerSystemCapability `mo:"capability"`
    +	Info       types.PowerSystemInfo       `mo:"info"`
    +}
    +
    +func (m HostPowerSystem) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["HostPowerSystem"] = reflect.TypeOf((*HostPowerSystem)(nil)).Elem()
    +}
    +
    +type HostProfile struct {
    +	Profile
    +
    +	ValidationState           *string                                 `mo:"validationState"`
    +	ValidationStateUpdateTime *time.Time                              `mo:"validationStateUpdateTime"`
    +	ValidationFailureInfo     *types.HostProfileValidationFailureInfo `mo:"validationFailureInfo"`
    +	ReferenceHost             *types.ManagedObjectReference           `mo:"referenceHost"`
    +}
    +
    +func init() {
    +	t["HostProfile"] = reflect.TypeOf((*HostProfile)(nil)).Elem()
    +}
    +
    +type HostProfileManager struct {
    +	ProfileManager
    +}
    +
    +func init() {
    +	t["HostProfileManager"] = reflect.TypeOf((*HostProfileManager)(nil)).Elem()
    +}
    +
    +type HostServiceSystem struct {
    +	ExtensibleManagedObject
    +
    +	ServiceInfo types.HostServiceInfo `mo:"serviceInfo"`
    +}
    +
    +func init() {
    +	t["HostServiceSystem"] = reflect.TypeOf((*HostServiceSystem)(nil)).Elem()
    +}
    +
    +type HostSnmpSystem struct {
    +	Self types.ManagedObjectReference
    +
    +	Configuration types.HostSnmpConfigSpec        `mo:"configuration"`
    +	Limits        types.HostSnmpSystemAgentLimits `mo:"limits"`
    +}
    +
    +func (m HostSnmpSystem) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["HostSnmpSystem"] = reflect.TypeOf((*HostSnmpSystem)(nil)).Elem()
    +}
    +
    +type HostSpecificationManager struct {
    +	Self types.ManagedObjectReference
    +}
    +
    +func (m HostSpecificationManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["HostSpecificationManager"] = reflect.TypeOf((*HostSpecificationManager)(nil)).Elem()
    +}
    +
    +type HostStorageSystem struct {
    +	ExtensibleManagedObject
    +
    +	StorageDeviceInfo    *types.HostStorageDeviceInfo   `mo:"storageDeviceInfo"`
    +	FileSystemVolumeInfo types.HostFileSystemVolumeInfo `mo:"fileSystemVolumeInfo"`
    +	SystemFile           []string                       `mo:"systemFile"`
    +	MultipathStateInfo   *types.HostMultipathStateInfo  `mo:"multipathStateInfo"`
    +}
    +
    +func init() {
    +	t["HostStorageSystem"] = reflect.TypeOf((*HostStorageSystem)(nil)).Elem()
    +}
    +
    +type HostSystem struct {
    +	ManagedEntity
    +
    +	Runtime                    types.HostRuntimeInfo                      `mo:"runtime"`
    +	Summary                    types.HostListSummary                      `mo:"summary"`
    +	Hardware                   *types.HostHardwareInfo                    `mo:"hardware"`
    +	Capability                 *types.HostCapability                      `mo:"capability"`
    +	LicensableResource         types.HostLicensableResourceInfo           `mo:"licensableResource"`
    +	RemediationState           *types.HostSystemRemediationState          `mo:"remediationState"`
    +	PrecheckRemediationResult  *types.ApplyHostProfileConfigurationSpec   `mo:"precheckRemediationResult"`
    +	RemediationResult          *types.ApplyHostProfileConfigurationResult `mo:"remediationResult"`
    +	ComplianceCheckState       *types.HostSystemComplianceCheckState      `mo:"complianceCheckState"`
    +	ComplianceCheckResult      *types.ComplianceResult                    `mo:"complianceCheckResult"`
    +	ConfigManager              types.HostConfigManager                    `mo:"configManager"`
    +	Config                     *types.HostConfigInfo                      `mo:"config"`
    +	Vm                         []types.ManagedObjectReference             `mo:"vm"`
    +	Datastore                  []types.ManagedObjectReference             `mo:"datastore"`
    +	Network                    []types.ManagedObjectReference             `mo:"network"`
    +	DatastoreBrowser           types.ManagedObjectReference               `mo:"datastoreBrowser"`
    +	SystemResources            *types.HostSystemResourceInfo              `mo:"systemResources"`
    +	AnswerFileValidationState  *types.AnswerFileStatusResult              `mo:"answerFileValidationState"`
    +	AnswerFileValidationResult *types.AnswerFileStatusResult              `mo:"answerFileValidationResult"`
    +}
    +
    +func (m *HostSystem) Entity() *ManagedEntity {
    +	return &m.ManagedEntity
    +}
    +
    +func init() {
    +	t["HostSystem"] = reflect.TypeOf((*HostSystem)(nil)).Elem()
    +}
    +
    +type HostVFlashManager struct {
    +	Self types.ManagedObjectReference
    +
    +	VFlashConfigInfo *types.HostVFlashManagerVFlashConfigInfo `mo:"vFlashConfigInfo"`
    +}
    +
    +func (m HostVFlashManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["HostVFlashManager"] = reflect.TypeOf((*HostVFlashManager)(nil)).Elem()
    +}
    +
    +type HostVMotionSystem struct {
    +	ExtensibleManagedObject
    +
    +	NetConfig *types.HostVMotionNetConfig `mo:"netConfig"`
    +	IpConfig  *types.HostIpConfig         `mo:"ipConfig"`
    +}
    +
    +func init() {
    +	t["HostVMotionSystem"] = reflect.TypeOf((*HostVMotionSystem)(nil)).Elem()
    +}
    +
    +type HostVStorageObjectManager struct {
    +	VStorageObjectManagerBase
    +}
    +
    +func init() {
    +	t["HostVStorageObjectManager"] = reflect.TypeOf((*HostVStorageObjectManager)(nil)).Elem()
    +}
    +
    +type HostVirtualNicManager struct {
    +	ExtensibleManagedObject
    +
    +	Info types.HostVirtualNicManagerInfo `mo:"info"`
    +}
    +
    +func init() {
    +	t["HostVirtualNicManager"] = reflect.TypeOf((*HostVirtualNicManager)(nil)).Elem()
    +}
    +
    +type HostVsanInternalSystem struct {
    +	Self types.ManagedObjectReference
    +}
    +
    +func (m HostVsanInternalSystem) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["HostVsanInternalSystem"] = reflect.TypeOf((*HostVsanInternalSystem)(nil)).Elem()
    +}
    +
    +type HostVsanSystem struct {
    +	Self types.ManagedObjectReference
    +
    +	Config types.VsanHostConfigInfo `mo:"config"`
    +}
    +
    +func (m HostVsanSystem) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["HostVsanSystem"] = reflect.TypeOf((*HostVsanSystem)(nil)).Elem()
    +}
    +
    +type HttpNfcLease struct {
    +	Self types.ManagedObjectReference
    +
    +	InitializeProgress int32                          `mo:"initializeProgress"`
    +	TransferProgress   int32                          `mo:"transferProgress"`
    +	Mode               string                         `mo:"mode"`
    +	Capabilities       types.HttpNfcLeaseCapabilities `mo:"capabilities"`
    +	Info               *types.HttpNfcLeaseInfo        `mo:"info"`
    +	State              types.HttpNfcLeaseState        `mo:"state"`
    +	Error              *types.LocalizedMethodFault    `mo:"error"`
    +}
    +
    +func (m HttpNfcLease) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["HttpNfcLease"] = reflect.TypeOf((*HttpNfcLease)(nil)).Elem()
    +}
    +
    +type InventoryView struct {
    +	ManagedObjectView
    +}
    +
    +func init() {
    +	t["InventoryView"] = reflect.TypeOf((*InventoryView)(nil)).Elem()
    +}
    +
    +type IoFilterManager struct {
    +	Self types.ManagedObjectReference
    +}
    +
    +func (m IoFilterManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["IoFilterManager"] = reflect.TypeOf((*IoFilterManager)(nil)).Elem()
    +}
    +
    +type IpPoolManager struct {
    +	Self types.ManagedObjectReference
    +}
    +
    +func (m IpPoolManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["IpPoolManager"] = reflect.TypeOf((*IpPoolManager)(nil)).Elem()
    +}
    +
    +type IscsiManager struct {
    +	Self types.ManagedObjectReference
    +}
    +
    +func (m IscsiManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["IscsiManager"] = reflect.TypeOf((*IscsiManager)(nil)).Elem()
    +}
    +
    +type LicenseAssignmentManager struct {
    +	Self types.ManagedObjectReference
    +}
    +
    +func (m LicenseAssignmentManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["LicenseAssignmentManager"] = reflect.TypeOf((*LicenseAssignmentManager)(nil)).Elem()
    +}
    +
    +type LicenseManager struct {
    +	Self types.ManagedObjectReference
    +
    +	Source                   types.BaseLicenseSource            `mo:"source"`
    +	SourceAvailable          bool                               `mo:"sourceAvailable"`
    +	Diagnostics              *types.LicenseDiagnostics          `mo:"diagnostics"`
    +	FeatureInfo              []types.LicenseFeatureInfo         `mo:"featureInfo"`
    +	LicensedEdition          string                             `mo:"licensedEdition"`
    +	Licenses                 []types.LicenseManagerLicenseInfo  `mo:"licenses"`
    +	LicenseAssignmentManager *types.ManagedObjectReference      `mo:"licenseAssignmentManager"`
    +	Evaluation               types.LicenseManagerEvaluationInfo `mo:"evaluation"`
    +}
    +
    +func (m LicenseManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["LicenseManager"] = reflect.TypeOf((*LicenseManager)(nil)).Elem()
    +}
    +
    +type ListView struct {
    +	ManagedObjectView
    +}
    +
    +func init() {
    +	t["ListView"] = reflect.TypeOf((*ListView)(nil)).Elem()
    +}
    +
    +type LocalizationManager struct {
    +	Self types.ManagedObjectReference
    +
    +	Catalog []types.LocalizationManagerMessageCatalog `mo:"catalog"`
    +}
    +
    +func (m LocalizationManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["LocalizationManager"] = reflect.TypeOf((*LocalizationManager)(nil)).Elem()
    +}
    +
    +type ManagedEntity struct {
    +	ExtensibleManagedObject
    +
    +	Parent              *types.ManagedObjectReference  `mo:"parent"`
    +	CustomValue         []types.BaseCustomFieldValue   `mo:"customValue"`
    +	OverallStatus       types.ManagedEntityStatus      `mo:"overallStatus"`
    +	ConfigStatus        types.ManagedEntityStatus      `mo:"configStatus"`
    +	ConfigIssue         []types.BaseEvent              `mo:"configIssue"`
    +	EffectiveRole       []int32                        `mo:"effectiveRole"`
    +	Permission          []types.Permission             `mo:"permission"`
    +	Name                string                         `mo:"name"`
    +	DisabledMethod      []string                       `mo:"disabledMethod"`
    +	RecentTask          []types.ManagedObjectReference `mo:"recentTask"`
    +	DeclaredAlarmState  []types.AlarmState             `mo:"declaredAlarmState"`
    +	TriggeredAlarmState []types.AlarmState             `mo:"triggeredAlarmState"`
    +	AlarmActionsEnabled *bool                          `mo:"alarmActionsEnabled"`
    +	Tag                 []types.Tag                    `mo:"tag"`
    +}
    +
    +func init() {
    +	t["ManagedEntity"] = reflect.TypeOf((*ManagedEntity)(nil)).Elem()
    +}
    +
    +type ManagedObjectView struct {
    +	Self types.ManagedObjectReference
    +
    +	View []types.ManagedObjectReference `mo:"view"`
    +}
    +
    +func (m ManagedObjectView) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["ManagedObjectView"] = reflect.TypeOf((*ManagedObjectView)(nil)).Elem()
    +}
    +
    +type MessageBusProxy struct {
    +	Self types.ManagedObjectReference
    +}
    +
    +func (m MessageBusProxy) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["MessageBusProxy"] = reflect.TypeOf((*MessageBusProxy)(nil)).Elem()
    +}
    +
    +type Network struct {
    +	ManagedEntity
    +
    +	Name    string                         `mo:"name"`
    +	Summary types.BaseNetworkSummary       `mo:"summary"`
    +	Host    []types.ManagedObjectReference `mo:"host"`
    +	Vm      []types.ManagedObjectReference `mo:"vm"`
    +}
    +
    +func (m *Network) Entity() *ManagedEntity {
    +	return &m.ManagedEntity
    +}
    +
    +func init() {
    +	t["Network"] = reflect.TypeOf((*Network)(nil)).Elem()
    +}
    +
    +type OpaqueNetwork struct {
    +	Network
    +
    +	Capability  *types.OpaqueNetworkCapability `mo:"capability"`
    +	ExtraConfig []types.BaseOptionValue        `mo:"extraConfig"`
    +}
    +
    +func init() {
    +	t["OpaqueNetwork"] = reflect.TypeOf((*OpaqueNetwork)(nil)).Elem()
    +}
    +
    +type OptionManager struct {
    +	Self types.ManagedObjectReference
    +
    +	SupportedOption []types.OptionDef       `mo:"supportedOption"`
    +	Setting         []types.BaseOptionValue `mo:"setting"`
    +}
    +
    +func (m OptionManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["OptionManager"] = reflect.TypeOf((*OptionManager)(nil)).Elem()
    +}
    +
    +type OverheadMemoryManager struct {
    +	Self types.ManagedObjectReference
    +}
    +
    +func (m OverheadMemoryManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["OverheadMemoryManager"] = reflect.TypeOf((*OverheadMemoryManager)(nil)).Elem()
    +}
    +
    +type OvfManager struct {
    +	Self types.ManagedObjectReference
    +
    +	OvfImportOption []types.OvfOptionInfo `mo:"ovfImportOption"`
    +	OvfExportOption []types.OvfOptionInfo `mo:"ovfExportOption"`
    +}
    +
    +func (m OvfManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["OvfManager"] = reflect.TypeOf((*OvfManager)(nil)).Elem()
    +}
    +
    +type PerformanceManager struct {
    +	Self types.ManagedObjectReference
    +
    +	Description        types.PerformanceDescription `mo:"description"`
    +	HistoricalInterval []types.PerfInterval         `mo:"historicalInterval"`
    +	PerfCounter        []types.PerfCounterInfo      `mo:"perfCounter"`
    +}
    +
    +func (m PerformanceManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["PerformanceManager"] = reflect.TypeOf((*PerformanceManager)(nil)).Elem()
    +}
    +
    +type Profile struct {
    +	Self types.ManagedObjectReference
    +
    +	Config           types.BaseProfileConfigInfo    `mo:"config"`
    +	Description      *types.ProfileDescription      `mo:"description"`
    +	Name             string                         `mo:"name"`
    +	CreatedTime      time.Time                      `mo:"createdTime"`
    +	ModifiedTime     time.Time                      `mo:"modifiedTime"`
    +	Entity           []types.ManagedObjectReference `mo:"entity"`
    +	ComplianceStatus string                         `mo:"complianceStatus"`
    +}
    +
    +func (m Profile) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["Profile"] = reflect.TypeOf((*Profile)(nil)).Elem()
    +}
    +
    +type ProfileComplianceManager struct {
    +	Self types.ManagedObjectReference
    +}
    +
    +func (m ProfileComplianceManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["ProfileComplianceManager"] = reflect.TypeOf((*ProfileComplianceManager)(nil)).Elem()
    +}
    +
    +type ProfileManager struct {
    +	Self types.ManagedObjectReference
    +
    +	Profile []types.ManagedObjectReference `mo:"profile"`
    +}
    +
    +func (m ProfileManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["ProfileManager"] = reflect.TypeOf((*ProfileManager)(nil)).Elem()
    +}
    +
    +type PropertyCollector struct {
    +	Self types.ManagedObjectReference
    +
    +	Filter []types.ManagedObjectReference `mo:"filter"`
    +}
    +
    +func (m PropertyCollector) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["PropertyCollector"] = reflect.TypeOf((*PropertyCollector)(nil)).Elem()
    +}
    +
    +type PropertyFilter struct {
    +	Self types.ManagedObjectReference
    +
    +	Spec           types.PropertyFilterSpec `mo:"spec"`
    +	PartialUpdates bool                     `mo:"partialUpdates"`
    +}
    +
    +func (m PropertyFilter) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["PropertyFilter"] = reflect.TypeOf((*PropertyFilter)(nil)).Elem()
    +}
    +
    +type ResourcePlanningManager struct {
    +	Self types.ManagedObjectReference
    +}
    +
    +func (m ResourcePlanningManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["ResourcePlanningManager"] = reflect.TypeOf((*ResourcePlanningManager)(nil)).Elem()
    +}
    +
    +type ResourcePool struct {
    +	ManagedEntity
    +
    +	Summary            types.BaseResourcePoolSummary  `mo:"summary"`
    +	Runtime            types.ResourcePoolRuntimeInfo  `mo:"runtime"`
    +	Owner              types.ManagedObjectReference   `mo:"owner"`
    +	ResourcePool       []types.ManagedObjectReference `mo:"resourcePool"`
    +	Vm                 []types.ManagedObjectReference `mo:"vm"`
    +	Config             types.ResourceConfigSpec       `mo:"config"`
    +	ChildConfiguration []types.ResourceConfigSpec     `mo:"childConfiguration"`
    +}
    +
    +func (m *ResourcePool) Entity() *ManagedEntity {
    +	return &m.ManagedEntity
    +}
    +
    +func init() {
    +	t["ResourcePool"] = reflect.TypeOf((*ResourcePool)(nil)).Elem()
    +}
    +
    +type ScheduledTask struct {
    +	ExtensibleManagedObject
    +
    +	Info types.ScheduledTaskInfo `mo:"info"`
    +}
    +
    +func init() {
    +	t["ScheduledTask"] = reflect.TypeOf((*ScheduledTask)(nil)).Elem()
    +}
    +
    +type ScheduledTaskManager struct {
    +	Self types.ManagedObjectReference
    +
    +	ScheduledTask []types.ManagedObjectReference `mo:"scheduledTask"`
    +	Description   types.ScheduledTaskDescription `mo:"description"`
    +}
    +
    +func (m ScheduledTaskManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["ScheduledTaskManager"] = reflect.TypeOf((*ScheduledTaskManager)(nil)).Elem()
    +}
    +
    +type SearchIndex struct {
    +	Self types.ManagedObjectReference
    +}
    +
    +func (m SearchIndex) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["SearchIndex"] = reflect.TypeOf((*SearchIndex)(nil)).Elem()
    +}
    +
    +type ServiceInstance struct {
    +	Self types.ManagedObjectReference
    +
    +	ServerClock time.Time            `mo:"serverClock"`
    +	Capability  types.Capability     `mo:"capability"`
    +	Content     types.ServiceContent `mo:"content"`
    +}
    +
    +func (m ServiceInstance) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["ServiceInstance"] = reflect.TypeOf((*ServiceInstance)(nil)).Elem()
    +}
    +
    +type ServiceManager struct {
    +	Self types.ManagedObjectReference
    +
    +	Service []types.ServiceManagerServiceInfo `mo:"service"`
    +}
    +
    +func (m ServiceManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["ServiceManager"] = reflect.TypeOf((*ServiceManager)(nil)).Elem()
    +}
    +
    +type SessionManager struct {
    +	Self types.ManagedObjectReference
    +
    +	SessionList         []types.UserSession `mo:"sessionList"`
    +	CurrentSession      *types.UserSession  `mo:"currentSession"`
    +	Message             *string             `mo:"message"`
    +	MessageLocaleList   []string            `mo:"messageLocaleList"`
    +	SupportedLocaleList []string            `mo:"supportedLocaleList"`
    +	DefaultLocale       string              `mo:"defaultLocale"`
    +}
    +
    +func (m SessionManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["SessionManager"] = reflect.TypeOf((*SessionManager)(nil)).Elem()
    +}
    +
    +type SimpleCommand struct {
    +	Self types.ManagedObjectReference
    +
    +	EncodingType types.SimpleCommandEncoding     `mo:"encodingType"`
    +	Entity       types.ServiceManagerServiceInfo `mo:"entity"`
    +}
    +
    +func (m SimpleCommand) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["SimpleCommand"] = reflect.TypeOf((*SimpleCommand)(nil)).Elem()
    +}
    +
    +type StoragePod struct {
    +	Folder
    +
    +	Summary            *types.StoragePodSummary  `mo:"summary"`
    +	PodStorageDrsEntry *types.PodStorageDrsEntry `mo:"podStorageDrsEntry"`
    +}
    +
    +func init() {
    +	t["StoragePod"] = reflect.TypeOf((*StoragePod)(nil)).Elem()
    +}
    +
    +type StorageResourceManager struct {
    +	Self types.ManagedObjectReference
    +}
    +
    +func (m StorageResourceManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["StorageResourceManager"] = reflect.TypeOf((*StorageResourceManager)(nil)).Elem()
    +}
    +
    +type Task struct {
    +	ExtensibleManagedObject
    +
    +	Info types.TaskInfo `mo:"info"`
    +}
    +
    +func init() {
    +	t["Task"] = reflect.TypeOf((*Task)(nil)).Elem()
    +}
    +
    +type TaskHistoryCollector struct {
    +	HistoryCollector
    +
    +	LatestPage []types.TaskInfo `mo:"latestPage"`
    +}
    +
    +func init() {
    +	t["TaskHistoryCollector"] = reflect.TypeOf((*TaskHistoryCollector)(nil)).Elem()
    +}
    +
    +type TaskManager struct {
    +	Self types.ManagedObjectReference
    +
    +	RecentTask   []types.ManagedObjectReference `mo:"recentTask"`
    +	Description  types.TaskDescription          `mo:"description"`
    +	MaxCollector int32                          `mo:"maxCollector"`
    +}
    +
    +func (m TaskManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["TaskManager"] = reflect.TypeOf((*TaskManager)(nil)).Elem()
    +}
    +
    +type UserDirectory struct {
    +	Self types.ManagedObjectReference
    +
    +	DomainList []string `mo:"domainList"`
    +}
    +
    +func (m UserDirectory) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["UserDirectory"] = reflect.TypeOf((*UserDirectory)(nil)).Elem()
    +}
    +
    +type VStorageObjectManagerBase struct {
    +	Self types.ManagedObjectReference
    +}
    +
    +func (m VStorageObjectManagerBase) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["VStorageObjectManagerBase"] = reflect.TypeOf((*VStorageObjectManagerBase)(nil)).Elem()
    +}
    +
    +type VcenterVStorageObjectManager struct {
    +	VStorageObjectManagerBase
    +}
    +
    +func init() {
    +	t["VcenterVStorageObjectManager"] = reflect.TypeOf((*VcenterVStorageObjectManager)(nil)).Elem()
    +}
    +
    +type View struct {
    +	Self types.ManagedObjectReference
    +}
    +
    +func (m View) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["View"] = reflect.TypeOf((*View)(nil)).Elem()
    +}
    +
    +type ViewManager struct {
    +	Self types.ManagedObjectReference
    +
    +	ViewList []types.ManagedObjectReference `mo:"viewList"`
    +}
    +
    +func (m ViewManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["ViewManager"] = reflect.TypeOf((*ViewManager)(nil)).Elem()
    +}
    +
    +type VirtualApp struct {
    +	ResourcePool
    +
    +	ParentFolder *types.ManagedObjectReference  `mo:"parentFolder"`
    +	Datastore    []types.ManagedObjectReference `mo:"datastore"`
    +	Network      []types.ManagedObjectReference `mo:"network"`
    +	VAppConfig   *types.VAppConfigInfo          `mo:"vAppConfig"`
    +	ParentVApp   *types.ManagedObjectReference  `mo:"parentVApp"`
    +	ChildLink    []types.VirtualAppLinkInfo     `mo:"childLink"`
    +}
    +
    +func init() {
    +	t["VirtualApp"] = reflect.TypeOf((*VirtualApp)(nil)).Elem()
    +}
    +
    +type VirtualDiskManager struct {
    +	Self types.ManagedObjectReference
    +}
    +
    +func (m VirtualDiskManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["VirtualDiskManager"] = reflect.TypeOf((*VirtualDiskManager)(nil)).Elem()
    +}
    +
    +type VirtualMachine struct {
    +	ManagedEntity
    +
    +	Capability           types.VirtualMachineCapability    `mo:"capability"`
    +	Config               *types.VirtualMachineConfigInfo   `mo:"config"`
    +	Layout               *types.VirtualMachineFileLayout   `mo:"layout"`
    +	LayoutEx             *types.VirtualMachineFileLayoutEx `mo:"layoutEx"`
    +	Storage              *types.VirtualMachineStorageInfo  `mo:"storage"`
    +	EnvironmentBrowser   types.ManagedObjectReference      `mo:"environmentBrowser"`
    +	ResourcePool         *types.ManagedObjectReference     `mo:"resourcePool"`
    +	ParentVApp           *types.ManagedObjectReference     `mo:"parentVApp"`
    +	ResourceConfig       *types.ResourceConfigSpec         `mo:"resourceConfig"`
    +	Runtime              types.VirtualMachineRuntimeInfo   `mo:"runtime"`
    +	Guest                *types.GuestInfo                  `mo:"guest"`
    +	Summary              types.VirtualMachineSummary       `mo:"summary"`
    +	Datastore            []types.ManagedObjectReference    `mo:"datastore"`
    +	Network              []types.ManagedObjectReference    `mo:"network"`
    +	Snapshot             *types.VirtualMachineSnapshotInfo `mo:"snapshot"`
    +	RootSnapshot         []types.ManagedObjectReference    `mo:"rootSnapshot"`
    +	GuestHeartbeatStatus types.ManagedEntityStatus         `mo:"guestHeartbeatStatus"`
    +}
    +
    +func (m *VirtualMachine) Entity() *ManagedEntity {
    +	return &m.ManagedEntity
    +}
    +
    +func init() {
    +	t["VirtualMachine"] = reflect.TypeOf((*VirtualMachine)(nil)).Elem()
    +}
    +
    +type VirtualMachineCompatibilityChecker struct {
    +	Self types.ManagedObjectReference
    +}
    +
    +func (m VirtualMachineCompatibilityChecker) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["VirtualMachineCompatibilityChecker"] = reflect.TypeOf((*VirtualMachineCompatibilityChecker)(nil)).Elem()
    +}
    +
    +type VirtualMachineProvisioningChecker struct {
    +	Self types.ManagedObjectReference
    +}
    +
    +func (m VirtualMachineProvisioningChecker) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["VirtualMachineProvisioningChecker"] = reflect.TypeOf((*VirtualMachineProvisioningChecker)(nil)).Elem()
    +}
    +
    +type VirtualMachineSnapshot struct {
    +	ExtensibleManagedObject
    +
    +	Config        types.VirtualMachineConfigInfo `mo:"config"`
    +	ChildSnapshot []types.ManagedObjectReference `mo:"childSnapshot"`
    +	Vm            types.ManagedObjectReference   `mo:"vm"`
    +}
    +
    +func init() {
    +	t["VirtualMachineSnapshot"] = reflect.TypeOf((*VirtualMachineSnapshot)(nil)).Elem()
    +}
    +
    +type VirtualizationManager struct {
    +	Self types.ManagedObjectReference
    +}
    +
    +func (m VirtualizationManager) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["VirtualizationManager"] = reflect.TypeOf((*VirtualizationManager)(nil)).Elem()
    +}
    +
    +type VmwareDistributedVirtualSwitch struct {
    +	DistributedVirtualSwitch
    +}
    +
    +func init() {
    +	t["VmwareDistributedVirtualSwitch"] = reflect.TypeOf((*VmwareDistributedVirtualSwitch)(nil)).Elem()
    +}
    +
    +type VsanUpgradeSystem struct {
    +	Self types.ManagedObjectReference
    +}
    +
    +func (m VsanUpgradeSystem) Reference() types.ManagedObjectReference {
    +	return m.Self
    +}
    +
    +func init() {
    +	t["VsanUpgradeSystem"] = reflect.TypeOf((*VsanUpgradeSystem)(nil)).Elem()
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/mo/reference.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/mo/reference.go
    new file mode 100644
    index 000000000..465edbe80
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/mo/reference.go
    @@ -0,0 +1,26 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package mo
    +
    +import "github.com/vmware/govmomi/vim25/types"
    +
    +// Reference is the interface that is implemented by all the managed objects
    +// defined in this package. It specifies that these managed objects have a
    +// function that returns the managed object reference to themselves.
    +type Reference interface {
    +	Reference() types.ManagedObjectReference
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/mo/registry.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/mo/registry.go
    new file mode 100644
    index 000000000..deacf508b
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/mo/registry.go
    @@ -0,0 +1,21 @@
    +/*
    +Copyright (c) 2014 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package mo
    +
    +import "reflect"
    +
    +var t = map[string]reflect.Type{}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/mo/retrieve.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/mo/retrieve.go
    new file mode 100644
    index 000000000..e7ffc32ce
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/mo/retrieve.go
    @@ -0,0 +1,174 @@
    +/*
    +Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package mo
    +
    +import (
    +	"context"
    +	"reflect"
    +
    +	"github.com/vmware/govmomi/vim25/methods"
    +	"github.com/vmware/govmomi/vim25/soap"
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +func ignoreMissingProperty(ref types.ManagedObjectReference, p types.MissingProperty) bool {
    +	switch ref.Type {
    +	case "VirtualMachine":
    +		switch p.Path {
    +		case "environmentBrowser":
    +			// See https://github.com/vmware/govmomi/pull/242
    +			return true
    +		case "alarmActionsEnabled":
    +			// Seen with vApp child VM
    +			return true
    +		}
    +	}
    +
    +	return false
    +}
    +
    +// ObjectContentToType loads an ObjectContent value into the value it
    +// represents. If the ObjectContent value has a non-empty 'MissingSet' field,
    +// it returns the first fault it finds there as error. If the 'MissingSet'
    +// field is empty, it returns a pointer to a reflect.Value. It handles contain
    +// nested properties, such as 'guest.ipAddress' or 'config.hardware'.
    +func ObjectContentToType(o types.ObjectContent) (interface{}, error) {
    +	// Expect no properties in the missing set
    +	for _, p := range o.MissingSet {
    +		if ignoreMissingProperty(o.Obj, p) {
    +			continue
    +		}
    +
    +		return nil, soap.WrapVimFault(p.Fault.Fault)
    +	}
    +
    +	ti := typeInfoForType(o.Obj.Type)
    +	v, err := ti.LoadFromObjectContent(o)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	return v.Elem().Interface(), nil
    +}
    +
    +// LoadRetrievePropertiesResponse converts the response of a call to
    +// RetrieveProperties to one or more managed objects.
    +func LoadRetrievePropertiesResponse(res *types.RetrievePropertiesResponse, dst interface{}) error {
    +	rt := reflect.TypeOf(dst)
    +	if rt == nil || rt.Kind() != reflect.Ptr {
    +		panic("need pointer")
    +	}
    +
    +	rv := reflect.ValueOf(dst).Elem()
    +	if !rv.CanSet() {
    +		panic("cannot set dst")
    +	}
    +
    +	isSlice := false
    +	switch rt.Elem().Kind() {
    +	case reflect.Struct:
    +	case reflect.Slice:
    +		isSlice = true
    +	default:
    +		panic("unexpected type")
    +	}
    +
    +	if isSlice {
    +		for _, p := range res.Returnval {
    +			v, err := ObjectContentToType(p)
    +			if err != nil {
    +				return err
    +			}
    +
    +			vt := reflect.TypeOf(v)
    +
    +			if !rv.Type().AssignableTo(vt) {
    +				// For example: dst is []ManagedEntity, res is []HostSystem
    +				if field, ok := vt.FieldByName(rt.Elem().Elem().Name()); ok && field.Anonymous {
    +					rv.Set(reflect.Append(rv, reflect.ValueOf(v).FieldByIndex(field.Index)))
    +					continue
    +				}
    +			}
    +
    +			rv.Set(reflect.Append(rv, reflect.ValueOf(v)))
    +		}
    +	} else {
    +		switch len(res.Returnval) {
    +		case 0:
    +		case 1:
    +			v, err := ObjectContentToType(res.Returnval[0])
    +			if err != nil {
    +				return err
    +			}
    +
    +			vt := reflect.TypeOf(v)
    +
    +			if !rv.Type().AssignableTo(vt) {
    +				// For example: dst is ComputeResource, res is ClusterComputeResource
    +				if field, ok := vt.FieldByName(rt.Elem().Name()); ok && field.Anonymous {
    +					rv.Set(reflect.ValueOf(v).FieldByIndex(field.Index))
    +					return nil
    +				}
    +			}
    +
    +			rv.Set(reflect.ValueOf(v))
    +		default:
    +			// If dst is not a slice, expect to receive 0 or 1 results
    +			panic("more than 1 result")
    +		}
    +	}
    +
    +	return nil
    +}
    +
    +// RetrievePropertiesForRequest calls the RetrieveProperties method with the
    +// specified request and decodes the response struct into the value pointed to
    +// by dst.
    +func RetrievePropertiesForRequest(ctx context.Context, r soap.RoundTripper, req types.RetrieveProperties, dst interface{}) error {
    +	res, err := methods.RetrieveProperties(ctx, r, &req)
    +	if err != nil {
    +		return err
    +	}
    +
    +	return LoadRetrievePropertiesResponse(res, dst)
    +}
    +
    +// RetrieveProperties retrieves the properties of the managed object specified
    +// as obj and decodes the response struct into the value pointed to by dst.
    +func RetrieveProperties(ctx context.Context, r soap.RoundTripper, pc, obj types.ManagedObjectReference, dst interface{}) error {
    +	req := types.RetrieveProperties{
    +		This: pc,
    +		SpecSet: []types.PropertyFilterSpec{
    +			{
    +				ObjectSet: []types.ObjectSpec{
    +					{
    +						Obj:  obj,
    +						Skip: types.NewBool(false),
    +					},
    +				},
    +				PropSet: []types.PropertySpec{
    +					{
    +						All:  types.NewBool(true),
    +						Type: obj.Type,
    +					},
    +				},
    +			},
    +		},
    +	}
    +
    +	return RetrievePropertiesForRequest(ctx, r, req, dst)
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/mo/type_info.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/mo/type_info.go
    new file mode 100644
    index 000000000..0c9e5b034
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/mo/type_info.go
    @@ -0,0 +1,247 @@
    +/*
    +Copyright (c) 2014 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package mo
    +
    +import (
    +	"fmt"
    +	"reflect"
    +	"regexp"
    +	"strings"
    +	"sync"
    +
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +type typeInfo struct {
    +	typ reflect.Type
    +
    +	// Field indices of "Self" field.
    +	self []int
    +
    +	// Map property names to field indices.
    +	props map[string][]int
    +}
    +
    +var typeInfoLock sync.RWMutex
    +var typeInfoMap = make(map[string]*typeInfo)
    +
    +func typeInfoForType(tname string) *typeInfo {
    +	typeInfoLock.RLock()
    +	ti, ok := typeInfoMap[tname]
    +	typeInfoLock.RUnlock()
    +
    +	if ok {
    +		return ti
    +	}
    +
    +	// Create new typeInfo for type.
    +	if typ, ok := t[tname]; !ok {
    +		panic("unknown type: " + tname)
    +	} else {
    +		// Multiple routines may race to set it, but the result is the same.
    +		typeInfoLock.Lock()
    +		ti = newTypeInfo(typ)
    +		typeInfoMap[tname] = ti
    +		typeInfoLock.Unlock()
    +	}
    +
    +	return ti
    +}
    +
    +func newTypeInfo(typ reflect.Type) *typeInfo {
    +	t := typeInfo{
    +		typ:   typ,
    +		props: make(map[string][]int),
    +	}
    +
    +	t.build(typ, "", []int{})
    +
    +	return &t
    +}
    +
    +var managedObjectRefType = reflect.TypeOf((*types.ManagedObjectReference)(nil)).Elem()
    +
    +func buildName(fn string, f reflect.StructField) string {
    +	if fn != "" {
    +		fn += "."
    +	}
    +
    +	motag := f.Tag.Get("mo")
    +	if motag != "" {
    +		return fn + motag
    +	}
    +
    +	xmltag := f.Tag.Get("xml")
    +	if xmltag != "" {
    +		tokens := strings.Split(xmltag, ",")
    +		if tokens[0] != "" {
    +			return fn + tokens[0]
    +		}
    +	}
    +
    +	return ""
    +}
    +
    +func (t *typeInfo) build(typ reflect.Type, fn string, fi []int) {
    +	if typ.Kind() == reflect.Ptr {
    +		typ = typ.Elem()
    +	}
    +
    +	if typ.Kind() != reflect.Struct {
    +		panic("need struct")
    +	}
    +
    +	for i := 0; i < typ.NumField(); i++ {
    +		f := typ.Field(i)
    +		ftyp := f.Type
    +
    +		// Copy field indices so they can be passed along.
    +		fic := make([]int, len(fi)+1)
    +		copy(fic, fi)
    +		fic[len(fi)] = i
    +
    +		// Recurse into embedded field.
    +		if f.Anonymous {
    +			t.build(ftyp, fn, fic)
    +			continue
    +		}
    +
    +		// Top level type has a "Self" field.
    +		if f.Name == "Self" && ftyp == managedObjectRefType {
    +			t.self = fic
    +			continue
    +		}
    +
    +		fnc := buildName(fn, f)
    +		if fnc == "" {
    +			continue
    +		}
    +
    +		t.props[fnc] = fic
    +
    +		// Dereference pointer.
    +		if ftyp.Kind() == reflect.Ptr {
    +			ftyp = ftyp.Elem()
    +		}
    +
    +		// Slices are not addressable by `foo.bar.qux`.
    +		if ftyp.Kind() == reflect.Slice {
    +			continue
    +		}
    +
    +		// Skip the managed reference type.
    +		if ftyp == managedObjectRefType {
    +			continue
    +		}
    +
    +		// Recurse into structs.
    +		if ftyp.Kind() == reflect.Struct {
    +			t.build(ftyp, fnc, fic)
    +		}
    +	}
    +}
    +
    +// assignValue assignes a value 'pv' to the struct pointed to by 'val', given a
    +// slice of field indices. It recurses into the struct until it finds the field
    +// specified by the indices. It creates new values for pointer types where
    +// needed.
    +func assignValue(val reflect.Value, fi []int, pv reflect.Value) {
    +	// Create new value if necessary.
    +	if val.Kind() == reflect.Ptr {
    +		if val.IsNil() {
    +			val.Set(reflect.New(val.Type().Elem()))
    +		}
    +
    +		val = val.Elem()
    +	}
    +
    +	rv := val.Field(fi[0])
    +	fi = fi[1:]
    +	if len(fi) == 0 {
    +		rt := rv.Type()
    +		pt := pv.Type()
    +
    +		// If type is a pointer, create new instance of type.
    +		if rt.Kind() == reflect.Ptr {
    +			rv.Set(reflect.New(rt.Elem()))
    +			rv = rv.Elem()
    +			rt = rv.Type()
    +		}
    +
    +		// If type is an interface, check if pv implements it.
    +		if rt.Kind() == reflect.Interface && !pt.Implements(rt) {
    +			// Check if pointer to pv implements it.
    +			if reflect.PtrTo(pt).Implements(rt) {
    +				npv := reflect.New(pt)
    +				npv.Elem().Set(pv)
    +				pv = npv
    +				pt = pv.Type()
    +			} else {
    +				panic(fmt.Sprintf("type %s doesn't implement %s", pt.Name(), rt.Name()))
    +			}
    +		}
    +
    +		if pt.AssignableTo(rt) {
    +			rv.Set(pv)
    +		} else if rt.ConvertibleTo(pt) {
    +			rv.Set(pv.Convert(rt))
    +		} else {
    +			panic(fmt.Sprintf("cannot assign %s (%s) to %s (%s)", rt.Name(), rt.Kind(), pt.Name(), pt.Kind()))
    +		}
    +
    +		return
    +	}
    +
    +	assignValue(rv, fi, pv)
    +}
    +
    +var arrayOfRegexp = regexp.MustCompile("ArrayOf(.*)$")
    +
    +func anyTypeToValue(t interface{}) reflect.Value {
    +	rt := reflect.TypeOf(t)
    +	rv := reflect.ValueOf(t)
    +
    +	// Dereference if ArrayOfXYZ type
    +	m := arrayOfRegexp.FindStringSubmatch(rt.Name())
    +	if len(m) > 0 {
    +		// ArrayOfXYZ type has single field named XYZ
    +		rv = rv.FieldByName(m[1])
    +		if !rv.IsValid() {
    +			panic(fmt.Sprintf("expected %s type to have field %s", m[0], m[1]))
    +		}
    +	}
    +
    +	return rv
    +}
    +
    +// LoadObjectFromContent loads properties from the 'PropSet' field in the
    +// specified ObjectContent value into the value it represents, which is
    +// returned as a reflect.Value.
    +func (t *typeInfo) LoadFromObjectContent(o types.ObjectContent) (reflect.Value, error) {
    +	v := reflect.New(t.typ)
    +	assignValue(v, t.self, reflect.ValueOf(o.Obj))
    +
    +	for _, p := range o.PropSet {
    +		rv, ok := t.props[p.Name]
    +		if !ok {
    +			continue
    +		}
    +		assignValue(v, rv, anyTypeToValue(p.Val))
    +	}
    +
    +	return v, nil
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/progress/aggregator.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/progress/aggregator.go
    new file mode 100644
    index 000000000..24cb3d59a
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/progress/aggregator.go
    @@ -0,0 +1,73 @@
    +/*
    +Copyright (c) 2014 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package progress
    +
    +import "sync"
    +
    +type Aggregator struct {
    +	downstream Sinker
    +	upstream   chan (<-chan Report)
    +
    +	done chan struct{}
    +	w    sync.WaitGroup
    +}
    +
    +func NewAggregator(s Sinker) *Aggregator {
    +	a := &Aggregator{
    +		downstream: s,
    +		upstream:   make(chan (<-chan Report)),
    +
    +		done: make(chan struct{}),
    +	}
    +
    +	a.w.Add(1)
    +	go a.loop()
    +
    +	return a
    +}
    +
    +func (a *Aggregator) loop() {
    +	defer a.w.Done()
    +
    +	dch := a.downstream.Sink()
    +	defer close(dch)
    +
    +	for {
    +		select {
    +		case uch := <-a.upstream:
    +			// Drain upstream channel
    +			for e := range uch {
    +				dch <- e
    +			}
    +		case <-a.done:
    +			return
    +		}
    +	}
    +}
    +
    +func (a *Aggregator) Sink() chan<- Report {
    +	ch := make(chan Report)
    +	a.upstream <- ch
    +	return ch
    +}
    +
    +// Done marks the aggregator as done. No more calls to Sink() may be made and
    +// the downstream progress report channel will be closed when Done() returns.
    +func (a *Aggregator) Done() {
    +	close(a.done)
    +	a.w.Wait()
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/progress/doc.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/progress/doc.go
    new file mode 100644
    index 000000000..a0458dd5c
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/progress/doc.go
    @@ -0,0 +1,32 @@
    +/*
    +Copyright (c) 2014 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package progress
    +
    +/*
    +The progress package contains functionality to deal with progress reporting.
    +The functionality is built to serve progress reporting for infrastructure
    +operations when talking the vSphere API, but is generic enough to be used
    +elsewhere.
    +
    +At the core of this progress reporting API lies the Sinker interface. This
    +interface is implemented by any object that can act as a sink for progress
    +reports. Callers of the Sink() function receives a send-only channel for
    +progress reports. They are responsible for closing the channel when done.
    +This semantic makes it easy to keep track of multiple progress report channels;
    +they are only created when Sink() is called and assumed closed when any
    +function that receives a Sinker parameter returns.
    +*/
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/progress/prefix.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/progress/prefix.go
    new file mode 100644
    index 000000000..4f842ad95
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/progress/prefix.go
    @@ -0,0 +1,54 @@
    +/*
    +Copyright (c) 2014 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package progress
    +
    +import "fmt"
    +
    +type prefixedReport struct {
    +	Report
    +	prefix string
    +}
    +
    +func (r prefixedReport) Detail() string {
    +	if d := r.Report.Detail(); d != "" {
    +		return fmt.Sprintf("%s: %s", r.prefix, d)
    +	}
    +
    +	return r.prefix
    +}
    +
    +func prefixLoop(upstream <-chan Report, downstream chan<- Report, prefix string) {
    +	defer close(downstream)
    +
    +	for r := range upstream {
    +		downstream <- prefixedReport{
    +			Report: r,
    +			prefix: prefix,
    +		}
    +	}
    +}
    +
    +func Prefix(s Sinker, prefix string) Sinker {
    +	fn := func() chan<- Report {
    +		upstream := make(chan Report)
    +		downstream := s.Sink()
    +		go prefixLoop(upstream, downstream, prefix)
    +		return upstream
    +	}
    +
    +	return SinkFunc(fn)
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/progress/reader.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/progress/reader.go
    new file mode 100644
    index 000000000..9d67bc652
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/progress/reader.go
    @@ -0,0 +1,185 @@
    +/*
    +Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package progress
    +
    +import (
    +	"container/list"
    +	"context"
    +	"fmt"
    +	"io"
    +	"sync/atomic"
    +	"time"
    +)
    +
    +type readerReport struct {
    +	t time.Time
    +
    +	pos  int64
    +	size int64
    +	bps  *uint64
    +
    +	err error
    +}
    +
    +func (r readerReport) Percentage() float32 {
    +	return 100.0 * float32(r.pos) / float32(r.size)
    +}
    +
    +func (r readerReport) Detail() string {
    +	const (
    +		KiB = 1024
    +		MiB = 1024 * KiB
    +		GiB = 1024 * MiB
    +	)
    +
    +	// Use the reader's bps field, so this report returns an up-to-date number.
    +	//
    +	// For example: if there hasn't been progress for the last 5 seconds, the
    +	// most recent report should return "0B/s".
    +	//
    +	bps := atomic.LoadUint64(r.bps)
    +
    +	switch {
    +	case bps >= GiB:
    +		return fmt.Sprintf("%.1fGiB/s", float32(bps)/float32(GiB))
    +	case bps >= MiB:
    +		return fmt.Sprintf("%.1fMiB/s", float32(bps)/float32(MiB))
    +	case bps >= KiB:
    +		return fmt.Sprintf("%.1fKiB/s", float32(bps)/float32(KiB))
    +	default:
    +		return fmt.Sprintf("%dB/s", bps)
    +	}
    +}
    +
    +func (p readerReport) Error() error {
    +	return p.err
    +}
    +
    +// reader wraps an io.Reader and sends a progress report over a channel for
    +// every read it handles.
    +type reader struct {
    +	r io.Reader
    +
    +	pos  int64
    +	size int64
    +	bps  uint64
    +
    +	ch  chan<- Report
    +	ctx context.Context
    +}
    +
    +func NewReader(ctx context.Context, s Sinker, r io.Reader, size int64) *reader {
    +	pr := reader{
    +		r:    r,
    +		ctx:  ctx,
    +		size: size,
    +	}
    +
    +	// Reports must be sent downstream and to the bps computation loop.
    +	pr.ch = Tee(s, newBpsLoop(&pr.bps)).Sink()
    +
    +	return &pr
    +}
    +
    +// Read calls the Read function on the underlying io.Reader. Additionally,
    +// every read causes a progress report to be sent to the progress reader's
    +// underlying channel.
    +func (r *reader) Read(b []byte) (int, error) {
    +	n, err := r.r.Read(b)
    +	r.pos += int64(n)
    +
    +	if err != nil && err != io.EOF {
    +		return n, err
    +	}
    +
    +	q := readerReport{
    +		t:    time.Now(),
    +		pos:  r.pos,
    +		size: r.size,
    +		bps:  &r.bps,
    +	}
    +
    +	select {
    +	case r.ch <- q:
    +	case <-r.ctx.Done():
    +	}
    +
    +	return n, err
    +}
    +
    +// Done marks the progress reader as done, optionally including an error in the
    +// progress report. After sending it, the underlying channel is closed.
    +func (r *reader) Done(err error) {
    +	q := readerReport{
    +		t:    time.Now(),
    +		pos:  r.pos,
    +		size: r.size,
    +		bps:  &r.bps,
    +		err:  err,
    +	}
    +
    +	select {
    +	case r.ch <- q:
    +		close(r.ch)
    +	case <-r.ctx.Done():
    +	}
    +}
    +
    +// newBpsLoop returns a sink that monitors and stores throughput.
    +func newBpsLoop(dst *uint64) SinkFunc {
    +	fn := func() chan<- Report {
    +		sink := make(chan Report)
    +		go bpsLoop(sink, dst)
    +		return sink
    +	}
    +
    +	return fn
    +}
    +
    +func bpsLoop(ch <-chan Report, dst *uint64) {
    +	l := list.New()
    +
    +	for {
    +		var tch <-chan time.Time
    +
    +		// Setup timer for front of list to become stale.
    +		if e := l.Front(); e != nil {
    +			dt := time.Second - time.Now().Sub(e.Value.(readerReport).t)
    +			tch = time.After(dt)
    +		}
    +
    +		select {
    +		case q, ok := <-ch:
    +			if !ok {
    +				return
    +			}
    +
    +			l.PushBack(q)
    +		case <-tch:
    +			l.Remove(l.Front())
    +		}
    +
    +		// Compute new bps
    +		if l.Len() == 0 {
    +			atomic.StoreUint64(dst, 0)
    +		} else {
    +			f := l.Front().Value.(readerReport)
    +			b := l.Back().Value.(readerReport)
    +			atomic.StoreUint64(dst, uint64(b.pos-f.pos))
    +		}
    +	}
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/progress/report.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/progress/report.go
    new file mode 100644
    index 000000000..bf80263ff
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/progress/report.go
    @@ -0,0 +1,26 @@
    +/*
    +Copyright (c) 2014 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package progress
    +
    +// Report defines the interface for types that can deliver progress reports.
    +// Examples include uploads/downloads in the http client and the task info
    +// field in the task managed object.
    +type Report interface {
    +	Percentage() float32
    +	Detail() string
    +	Error() error
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/progress/scale.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/progress/scale.go
    new file mode 100644
    index 000000000..988083920
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/progress/scale.go
    @@ -0,0 +1,76 @@
    +/*
    +Copyright (c) 2014 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package progress
    +
    +type scaledReport struct {
    +	Report
    +	n int
    +	i int
    +}
    +
    +func (r scaledReport) Percentage() float32 {
    +	b := 100 * float32(r.i) / float32(r.n)
    +	return b + (r.Report.Percentage() / float32(r.n))
    +}
    +
    +type scaleOne struct {
    +	s Sinker
    +	n int
    +	i int
    +}
    +
    +func (s scaleOne) Sink() chan<- Report {
    +	upstream := make(chan Report)
    +	downstream := s.s.Sink()
    +	go s.loop(upstream, downstream)
    +	return upstream
    +}
    +
    +func (s scaleOne) loop(upstream <-chan Report, downstream chan<- Report) {
    +	defer close(downstream)
    +
    +	for r := range upstream {
    +		downstream <- scaledReport{
    +			Report: r,
    +			n:      s.n,
    +			i:      s.i,
    +		}
    +	}
    +}
    +
    +type scaleMany struct {
    +	s Sinker
    +	n int
    +	i int
    +}
    +
    +func Scale(s Sinker, n int) Sinker {
    +	return &scaleMany{
    +		s: s,
    +		n: n,
    +	}
    +}
    +
    +func (s *scaleMany) Sink() chan<- Report {
    +	if s.i == s.n {
    +		s.n++
    +	}
    +
    +	ch := scaleOne{s: s.s, n: s.n, i: s.i}.Sink()
    +	s.i++
    +	return ch
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/progress/sinker.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/progress/sinker.go
    new file mode 100644
    index 000000000..0bd35a47f
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/progress/sinker.go
    @@ -0,0 +1,33 @@
    +/*
    +Copyright (c) 2014 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package progress
    +
    +// Sinker defines what is expected of a type that can act as a sink for
    +// progress reports. The semantics are as follows. If you call Sink(), you are
    +// responsible for closing the returned channel. Closing this channel means
    +// that the related task is done, or resulted in error.
    +type Sinker interface {
    +	Sink() chan<- Report
    +}
    +
    +// SinkFunc defines a function that returns a progress report channel.
    +type SinkFunc func() chan<- Report
    +
    +// Sink makes the SinkFunc implement the Sinker interface.
    +func (fn SinkFunc) Sink() chan<- Report {
    +	return fn()
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/progress/tee.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/progress/tee.go
    new file mode 100644
    index 000000000..ab4607842
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/progress/tee.go
    @@ -0,0 +1,41 @@
    +/*
    +Copyright (c) 2014 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package progress
    +
    +// Tee works like Unix tee; it forwards all progress reports it receives to the
    +// specified sinks
    +func Tee(s1, s2 Sinker) Sinker {
    +	fn := func() chan<- Report {
    +		d1 := s1.Sink()
    +		d2 := s2.Sink()
    +		u := make(chan Report)
    +		go tee(u, d1, d2)
    +		return u
    +	}
    +
    +	return SinkFunc(fn)
    +}
    +
    +func tee(u <-chan Report, d1, d2 chan<- Report) {
    +	defer close(d1)
    +	defer close(d2)
    +
    +	for r := range u {
    +		d1 <- r
    +		d2 <- r
    +	}
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/retry.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/retry.go
    new file mode 100644
    index 000000000..b8807eef3
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/retry.go
    @@ -0,0 +1,105 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package vim25
    +
    +import (
    +	"context"
    +	"net"
    +	"net/url"
    +	"time"
    +
    +	"github.com/vmware/govmomi/vim25/soap"
    +)
    +
    +type RetryFunc func(err error) (retry bool, delay time.Duration)
    +
    +// TemporaryNetworkError returns a RetryFunc that retries up to a maximum of n
    +// times, only if the error returned by the RoundTrip function is a temporary
    +// network error (for example: a connect timeout).
    +func TemporaryNetworkError(n int) RetryFunc {
    +	return func(err error) (retry bool, delay time.Duration) {
    +		var nerr net.Error
    +		var ok bool
    +
    +		// Never retry if this is not a network error.
    +		switch rerr := err.(type) {
    +		case *url.Error:
    +			if nerr, ok = rerr.Err.(net.Error); !ok {
    +				return false, 0
    +			}
    +		case net.Error:
    +			nerr = rerr
    +		default:
    +			return false, 0
    +		}
    +
    +		if !nerr.Temporary() {
    +			return false, 0
    +		}
    +
    +		// Don't retry if we're out of tries.
    +		if n--; n <= 0 {
    +			return false, 0
    +		}
    +
    +		return true, 0
    +	}
    +}
    +
    +type retry struct {
    +	roundTripper soap.RoundTripper
    +
    +	// fn is a custom function that is called when an error occurs.
    +	// It returns whether or not to retry, and if so, how long to
    +	// delay before retrying.
    +	fn RetryFunc
    +}
    +
    +// Retry wraps the specified soap.RoundTripper and invokes the
    +// specified RetryFunc. The RetryFunc returns whether or not to
    +// retry the call, and if so, how long to wait before retrying. If
    +// the result of this function is to not retry, the original error
    +// is returned from the RoundTrip function.
    +func Retry(roundTripper soap.RoundTripper, fn RetryFunc) soap.RoundTripper {
    +	r := &retry{
    +		roundTripper: roundTripper,
    +		fn:           fn,
    +	}
    +
    +	return r
    +}
    +
    +func (r *retry) RoundTrip(ctx context.Context, req, res soap.HasFault) error {
    +	var err error
    +
    +	for {
    +		err = r.roundTripper.RoundTrip(ctx, req, res)
    +		if err == nil {
    +			break
    +		}
    +
    +		// Invoke retry function to see if another attempt should be made.
    +		if retry, delay := r.fn(err); retry {
    +			time.Sleep(delay)
    +			continue
    +		}
    +
    +		break
    +	}
    +
    +	return err
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/soap/client.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/soap/client.go
    new file mode 100644
    index 000000000..d94b6a056
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/soap/client.go
    @@ -0,0 +1,775 @@
    +/*
    +Copyright (c) 2014-2018 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package soap
    +
    +import (
    +	"bufio"
    +	"bytes"
    +	"context"
    +	"crypto/sha1"
    +	"crypto/tls"
    +	"crypto/x509"
    +	"encoding/json"
    +	"errors"
    +	"fmt"
    +	"io"
    +	"io/ioutil"
    +	"log"
    +	"net"
    +	"net/http"
    +	"net/http/cookiejar"
    +	"net/url"
    +	"os"
    +	"path/filepath"
    +	"regexp"
    +	"strings"
    +	"sync"
    +	"time"
    +
    +	"github.com/vmware/govmomi/vim25/progress"
    +	"github.com/vmware/govmomi/vim25/types"
    +	"github.com/vmware/govmomi/vim25/xml"
    +)
    +
    +type HasFault interface {
    +	Fault() *Fault
    +}
    +
    +type RoundTripper interface {
    +	RoundTrip(ctx context.Context, req, res HasFault) error
    +}
    +
    +const (
    +	SessionCookieName = "vmware_soap_session"
    +)
    +
    +type Client struct {
    +	http.Client
    +
    +	u *url.URL
    +	k bool // Named after curl's -k flag
    +	d *debugContainer
    +	t *http.Transport
    +
    +	hostsMu sync.Mutex
    +	hosts   map[string]string
    +
    +	Namespace string // Vim namespace
    +	Version   string // Vim version
    +	UserAgent string
    +
    +	cookie string
    +}
    +
    +var schemeMatch = regexp.MustCompile(`^\w+://`)
    +
    +// ParseURL is wrapper around url.Parse, where Scheme defaults to "https" and Path defaults to "/sdk"
    +func ParseURL(s string) (*url.URL, error) {
    +	var err error
    +	var u *url.URL
    +
    +	if s != "" {
    +		// Default the scheme to https
    +		if !schemeMatch.MatchString(s) {
    +			s = "https://" + s
    +		}
    +
    +		u, err = url.Parse(s)
    +		if err != nil {
    +			return nil, err
    +		}
    +
    +		// Default the path to /sdk
    +		if u.Path == "" {
    +			u.Path = "/sdk"
    +		}
    +
    +		if u.User == nil {
    +			u.User = url.UserPassword("", "")
    +		}
    +	}
    +
    +	return u, nil
    +}
    +
    +func NewClient(u *url.URL, insecure bool) *Client {
    +	c := Client{
    +		u: u,
    +		k: insecure,
    +		d: newDebug(),
    +	}
    +
    +	// Initialize http.RoundTripper on client, so we can customize it below
    +	if t, ok := http.DefaultTransport.(*http.Transport); ok {
    +		c.t = &http.Transport{
    +			Proxy:                 t.Proxy,
    +			DialContext:           t.DialContext,
    +			MaxIdleConns:          t.MaxIdleConns,
    +			IdleConnTimeout:       t.IdleConnTimeout,
    +			TLSHandshakeTimeout:   t.TLSHandshakeTimeout,
    +			ExpectContinueTimeout: t.ExpectContinueTimeout,
    +		}
    +	} else {
    +		c.t = new(http.Transport)
    +	}
    +
    +	c.hosts = make(map[string]string)
    +	c.t.TLSClientConfig = &tls.Config{InsecureSkipVerify: c.k}
    +	// Don't bother setting DialTLS if InsecureSkipVerify=true
    +	if !c.k {
    +		c.t.DialTLS = c.dialTLS
    +	}
    +
    +	c.Client.Transport = c.t
    +	c.Client.Jar, _ = cookiejar.New(nil)
    +
    +	// Remove user information from a copy of the URL
    +	c.u = c.URL()
    +	c.u.User = nil
    +
    +	return &c
    +}
    +
    +// NewServiceClient creates a NewClient with the given URL.Path and namespace.
    +func (c *Client) NewServiceClient(path string, namespace string) *Client {
    +	vc := c.URL()
    +	u, err := url.Parse(path)
    +	if err != nil {
    +		log.Panicf("url.Parse(%q): %s", path, err)
    +	}
    +	if u.Host == "" {
    +		u.Scheme = vc.Scheme
    +		u.Host = vc.Host
    +	}
    +
    +	client := NewClient(u, c.k)
    +	client.Namespace = "urn:" + namespace
    +	if cert := c.Certificate(); cert != nil {
    +		client.SetCertificate(*cert)
    +	}
    +
    +	// Copy the trusted thumbprints
    +	c.hostsMu.Lock()
    +	for k, v := range c.hosts {
    +		client.hosts[k] = v
    +	}
    +	c.hostsMu.Unlock()
    +
    +	// Copy the cookies
    +	client.Client.Jar.SetCookies(u, c.Client.Jar.Cookies(u))
    +
    +	// Set SOAP Header cookie
    +	for _, cookie := range client.Jar.Cookies(u) {
    +		if cookie.Name == SessionCookieName {
    +			client.cookie = cookie.Value
    +			break
    +		}
    +	}
    +
    +	// Copy any query params (e.g. GOVMOMI_TUNNEL_PROXY_PORT used in testing)
    +	client.u.RawQuery = vc.RawQuery
    +
    +	return client
    +}
    +
    +// SetRootCAs defines the set of root certificate authorities
    +// that clients use when verifying server certificates.
    +// By default TLS uses the host's root CA set.
    +//
    +// See: http.Client.Transport.TLSClientConfig.RootCAs
    +func (c *Client) SetRootCAs(file string) error {
    +	pool := x509.NewCertPool()
    +
    +	for _, name := range filepath.SplitList(file) {
    +		pem, err := ioutil.ReadFile(name)
    +		if err != nil {
    +			return err
    +		}
    +
    +		pool.AppendCertsFromPEM(pem)
    +	}
    +
    +	c.t.TLSClientConfig.RootCAs = pool
    +
    +	return nil
    +}
    +
    +// Add default https port if missing
    +func hostAddr(addr string) string {
    +	_, port := splitHostPort(addr)
    +	if port == "" {
    +		return addr + ":443"
    +	}
    +	return addr
    +}
    +
    +// SetThumbprint sets the known certificate thumbprint for the given host.
    +// A custom DialTLS function is used to support thumbprint based verification.
    +// We first try tls.Dial with the default tls.Config, only falling back to thumbprint verification
    +// if it fails with an x509.UnknownAuthorityError or x509.HostnameError
    +//
    +// See: http.Client.Transport.DialTLS
    +func (c *Client) SetThumbprint(host string, thumbprint string) {
    +	host = hostAddr(host)
    +
    +	c.hostsMu.Lock()
    +	if thumbprint == "" {
    +		delete(c.hosts, host)
    +	} else {
    +		c.hosts[host] = thumbprint
    +	}
    +	c.hostsMu.Unlock()
    +}
    +
    +// Thumbprint returns the certificate thumbprint for the given host if known to this client.
    +func (c *Client) Thumbprint(host string) string {
    +	host = hostAddr(host)
    +	c.hostsMu.Lock()
    +	defer c.hostsMu.Unlock()
    +	return c.hosts[host]
    +}
    +
    +// LoadThumbprints from file with the give name.
    +// If name is empty or name does not exist this function will return nil.
    +func (c *Client) LoadThumbprints(file string) error {
    +	if file == "" {
    +		return nil
    +	}
    +
    +	for _, name := range filepath.SplitList(file) {
    +		err := c.loadThumbprints(name)
    +		if err != nil {
    +			return err
    +		}
    +	}
    +
    +	return nil
    +}
    +
    +func (c *Client) loadThumbprints(name string) error {
    +	f, err := os.Open(name)
    +	if err != nil {
    +		if os.IsNotExist(err) {
    +			return nil
    +		}
    +		return err
    +	}
    +
    +	scanner := bufio.NewScanner(f)
    +
    +	for scanner.Scan() {
    +		e := strings.SplitN(scanner.Text(), " ", 2)
    +		if len(e) != 2 {
    +			continue
    +		}
    +
    +		c.SetThumbprint(e[0], e[1])
    +	}
    +
    +	_ = f.Close()
    +
    +	return scanner.Err()
    +}
    +
    +// ThumbprintSHA1 returns the thumbprint of the given cert in the same format used by the SDK and Client.SetThumbprint.
    +//
    +// See: SSLVerifyFault.Thumbprint, SessionManagerGenericServiceTicket.Thumbprint, HostConnectSpec.SslThumbprint
    +func ThumbprintSHA1(cert *x509.Certificate) string {
    +	sum := sha1.Sum(cert.Raw)
    +	hex := make([]string, len(sum))
    +	for i, b := range sum {
    +		hex[i] = fmt.Sprintf("%02X", b)
    +	}
    +	return strings.Join(hex, ":")
    +}
    +
    +func (c *Client) dialTLS(network string, addr string) (net.Conn, error) {
    +	// Would be nice if there was a tls.Config.Verify func,
    +	// see tls.clientHandshakeState.doFullHandshake
    +
    +	conn, err := tls.Dial(network, addr, c.t.TLSClientConfig)
    +
    +	if err == nil {
    +		return conn, nil
    +	}
    +
    +	switch err.(type) {
    +	case x509.UnknownAuthorityError:
    +	case x509.HostnameError:
    +	default:
    +		return nil, err
    +	}
    +
    +	thumbprint := c.Thumbprint(addr)
    +	if thumbprint == "" {
    +		return nil, err
    +	}
    +
    +	config := &tls.Config{InsecureSkipVerify: true}
    +	conn, err = tls.Dial(network, addr, config)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	cert := conn.ConnectionState().PeerCertificates[0]
    +	peer := ThumbprintSHA1(cert)
    +	if thumbprint != peer {
    +		_ = conn.Close()
    +
    +		return nil, fmt.Errorf("Host %q thumbprint does not match %q", addr, thumbprint)
    +	}
    +
    +	return conn, nil
    +}
    +
    +// splitHostPort is similar to net.SplitHostPort,
    +// but rather than return error if there isn't a ':port',
    +// return an empty string for the port.
    +func splitHostPort(host string) (string, string) {
    +	ix := strings.LastIndex(host, ":")
    +
    +	if ix <= strings.LastIndex(host, "]") {
    +		return host, ""
    +	}
    +
    +	name := host[:ix]
    +	port := host[ix+1:]
    +
    +	return name, port
    +}
    +
    +const sdkTunnel = "sdkTunnel:8089"
    +
    +func (c *Client) Certificate() *tls.Certificate {
    +	certs := c.t.TLSClientConfig.Certificates
    +	if len(certs) == 0 {
    +		return nil
    +	}
    +	return &certs[0]
    +}
    +
    +func (c *Client) SetCertificate(cert tls.Certificate) {
    +	t := c.Client.Transport.(*http.Transport)
    +
    +	// Extension or HoK certificate
    +	t.TLSClientConfig.Certificates = []tls.Certificate{cert}
    +}
    +
    +// Tunnel returns a Client configured to proxy requests through vCenter's http port 80,
    +// to the SDK tunnel virtual host.  Use of the SDK tunnel is required by LoginExtensionByCertificate()
    +// and optional for other methods.
    +func (c *Client) Tunnel() *Client {
    +	tunnel := c.NewServiceClient(c.u.Path, c.Namespace)
    +	t := tunnel.Client.Transport.(*http.Transport)
    +	// Proxy to vCenter host on port 80
    +	host := tunnel.u.Hostname()
    +	// Should be no reason to change the default port other than testing
    +	key := "GOVMOMI_TUNNEL_PROXY_PORT"
    +
    +	port := tunnel.URL().Query().Get(key)
    +	if port == "" {
    +		port = os.Getenv(key)
    +	}
    +
    +	if port != "" {
    +		host += ":" + port
    +	}
    +
    +	t.Proxy = http.ProxyURL(&url.URL{
    +		Scheme: "http",
    +		Host:   host,
    +	})
    +
    +	// Rewrite url Host to use the sdk tunnel, required for a certificate request.
    +	tunnel.u.Host = sdkTunnel
    +	return tunnel
    +}
    +
    +func (c *Client) URL() *url.URL {
    +	urlCopy := *c.u
    +	return &urlCopy
    +}
    +
    +type marshaledClient struct {
    +	Cookies  []*http.Cookie
    +	URL      *url.URL
    +	Insecure bool
    +}
    +
    +func (c *Client) MarshalJSON() ([]byte, error) {
    +	m := marshaledClient{
    +		Cookies:  c.Jar.Cookies(c.u),
    +		URL:      c.u,
    +		Insecure: c.k,
    +	}
    +
    +	return json.Marshal(m)
    +}
    +
    +func (c *Client) UnmarshalJSON(b []byte) error {
    +	var m marshaledClient
    +
    +	err := json.Unmarshal(b, &m)
    +	if err != nil {
    +		return err
    +	}
    +
    +	*c = *NewClient(m.URL, m.Insecure)
    +	c.Jar.SetCookies(m.URL, m.Cookies)
    +
    +	return nil
    +}
    +
    +func (c *Client) do(ctx context.Context, req *http.Request) (*http.Response, error) {
    +	if nil == ctx || nil == ctx.Done() { // ctx.Done() is for ctx
    +		return c.Client.Do(req)
    +	}
    +
    +	return c.Client.Do(req.WithContext(ctx))
    +}
    +
    +// Signer can be implemented by soap.Header.Security to sign requests.
    +// If the soap.Header.Security field is set to an implementation of Signer via WithHeader(),
    +// then Client.RoundTrip will call Sign() to marshal the SOAP request.
    +type Signer interface {
    +	Sign(Envelope) ([]byte, error)
    +}
    +
    +type headerContext struct{}
    +
    +// WithHeader can be used to modify the outgoing request soap.Header fields.
    +func (c *Client) WithHeader(ctx context.Context, header Header) context.Context {
    +	return context.WithValue(ctx, headerContext{}, header)
    +}
    +
    +func (c *Client) RoundTrip(ctx context.Context, reqBody, resBody HasFault) error {
    +	var err error
    +	var b []byte
    +
    +	reqEnv := Envelope{Body: reqBody}
    +	resEnv := Envelope{Body: resBody}
    +
    +	h, ok := ctx.Value(headerContext{}).(Header)
    +	if !ok {
    +		h = Header{}
    +	}
    +
    +	// We added support for OperationID before soap.Header was exported.
    +	if id, ok := ctx.Value(types.ID{}).(string); ok {
    +		h.ID = id
    +	}
    +
    +	h.Cookie = c.cookie
    +	if h.Cookie != "" || h.ID != "" || h.Security != nil {
    +		reqEnv.Header = &h // XML marshal header only if a field is set
    +	}
    +
    +	// Create debugging context for this round trip
    +	d := c.d.newRoundTrip()
    +	if d.enabled() {
    +		defer d.done()
    +	}
    +
    +	if signer, ok := h.Security.(Signer); ok {
    +		b, err = signer.Sign(reqEnv)
    +		if err != nil {
    +			return err
    +		}
    +	} else {
    +		b, err = xml.Marshal(reqEnv)
    +		if err != nil {
    +			panic(err)
    +		}
    +	}
    +
    +	rawReqBody := io.MultiReader(strings.NewReader(xml.Header), bytes.NewReader(b))
    +	req, err := http.NewRequest("POST", c.u.String(), rawReqBody)
    +	if err != nil {
    +		panic(err)
    +	}
    +
    +	req = req.WithContext(ctx)
    +
    +	req.Header.Set(`Content-Type`, `text/xml; charset="utf-8"`)
    +
    +	action := h.Action
    +	if action == "" {
    +		action = fmt.Sprintf("%s/%s", c.Namespace, c.Version)
    +	}
    +	req.Header.Set(`SOAPAction`, action)
    +
    +	if c.UserAgent != "" {
    +		req.Header.Set(`User-Agent`, c.UserAgent)
    +	}
    +
    +	if d.enabled() {
    +		d.debugRequest(req)
    +	}
    +
    +	tstart := time.Now()
    +	res, err := c.do(ctx, req)
    +	tstop := time.Now()
    +
    +	if d.enabled() {
    +		d.logf("%6dms (%T)", tstop.Sub(tstart)/time.Millisecond, resBody)
    +	}
    +
    +	if err != nil {
    +		return err
    +	}
    +
    +	if d.enabled() {
    +		d.debugResponse(res)
    +	}
    +
    +	// Close response regardless of what happens next
    +	defer res.Body.Close()
    +
    +	switch res.StatusCode {
    +	case http.StatusOK:
    +		// OK
    +	case http.StatusInternalServerError:
    +		// Error, but typically includes a body explaining the error
    +	default:
    +		return errors.New(res.Status)
    +	}
    +
    +	dec := xml.NewDecoder(res.Body)
    +	dec.TypeFunc = types.TypeFunc()
    +	err = dec.Decode(&resEnv)
    +	if err != nil {
    +		return err
    +	}
    +
    +	if f := resBody.Fault(); f != nil {
    +		return WrapSoapFault(f)
    +	}
    +
    +	return err
    +}
    +
    +func (c *Client) CloseIdleConnections() {
    +	c.t.CloseIdleConnections()
    +}
    +
    +// ParseURL wraps url.Parse to rewrite the URL.Host field
    +// In the case of VM guest uploads or NFC lease URLs, a Host
    +// field with a value of "*" is rewritten to the Client's URL.Host.
    +func (c *Client) ParseURL(urlStr string) (*url.URL, error) {
    +	u, err := url.Parse(urlStr)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	host, _ := splitHostPort(u.Host)
    +	if host == "*" {
    +		// Also use Client's port, to support port forwarding
    +		u.Host = c.URL().Host
    +	}
    +
    +	return u, nil
    +}
    +
    +type Upload struct {
    +	Type          string
    +	Method        string
    +	ContentLength int64
    +	Headers       map[string]string
    +	Ticket        *http.Cookie
    +	Progress      progress.Sinker
    +}
    +
    +var DefaultUpload = Upload{
    +	Type:   "application/octet-stream",
    +	Method: "PUT",
    +}
    +
    +// Upload PUTs the local file to the given URL
    +func (c *Client) Upload(ctx context.Context, f io.Reader, u *url.URL, param *Upload) error {
    +	var err error
    +
    +	if param.Progress != nil {
    +		pr := progress.NewReader(ctx, param.Progress, f, param.ContentLength)
    +		f = pr
    +
    +		// Mark progress reader as done when returning from this function.
    +		defer func() {
    +			pr.Done(err)
    +		}()
    +	}
    +
    +	req, err := http.NewRequest(param.Method, u.String(), f)
    +	if err != nil {
    +		return err
    +	}
    +
    +	req = req.WithContext(ctx)
    +
    +	req.ContentLength = param.ContentLength
    +	req.Header.Set("Content-Type", param.Type)
    +
    +	for k, v := range param.Headers {
    +		req.Header.Add(k, v)
    +	}
    +
    +	if param.Ticket != nil {
    +		req.AddCookie(param.Ticket)
    +	}
    +
    +	res, err := c.Client.Do(req)
    +	if err != nil {
    +		return err
    +	}
    +
    +	switch res.StatusCode {
    +	case http.StatusOK:
    +	case http.StatusCreated:
    +	default:
    +		err = errors.New(res.Status)
    +	}
    +
    +	return err
    +}
    +
    +// UploadFile PUTs the local file to the given URL
    +func (c *Client) UploadFile(ctx context.Context, file string, u *url.URL, param *Upload) error {
    +	if param == nil {
    +		p := DefaultUpload // Copy since we set ContentLength
    +		param = &p
    +	}
    +
    +	s, err := os.Stat(file)
    +	if err != nil {
    +		return err
    +	}
    +
    +	f, err := os.Open(file)
    +	if err != nil {
    +		return err
    +	}
    +	defer f.Close()
    +
    +	param.ContentLength = s.Size()
    +
    +	return c.Upload(ctx, f, u, param)
    +}
    +
    +type Download struct {
    +	Method   string
    +	Headers  map[string]string
    +	Ticket   *http.Cookie
    +	Progress progress.Sinker
    +	Writer   io.Writer
    +}
    +
    +var DefaultDownload = Download{
    +	Method: "GET",
    +}
    +
    +// DownloadRequest wraps http.Client.Do, returning the http.Response without checking its StatusCode
    +func (c *Client) DownloadRequest(ctx context.Context, u *url.URL, param *Download) (*http.Response, error) {
    +	req, err := http.NewRequest(param.Method, u.String(), nil)
    +	if err != nil {
    +		return nil, err
    +	}
    +
    +	req = req.WithContext(ctx)
    +
    +	for k, v := range param.Headers {
    +		req.Header.Add(k, v)
    +	}
    +
    +	if param.Ticket != nil {
    +		req.AddCookie(param.Ticket)
    +	}
    +
    +	return c.Client.Do(req)
    +}
    +
    +// Download GETs the remote file from the given URL
    +func (c *Client) Download(ctx context.Context, u *url.URL, param *Download) (io.ReadCloser, int64, error) {
    +	res, err := c.DownloadRequest(ctx, u, param)
    +	if err != nil {
    +		return nil, 0, err
    +	}
    +
    +	switch res.StatusCode {
    +	case http.StatusOK:
    +	default:
    +		err = errors.New(res.Status)
    +	}
    +
    +	if err != nil {
    +		return nil, 0, err
    +	}
    +
    +	r := res.Body
    +
    +	return r, res.ContentLength, nil
    +}
    +
    +func (c *Client) WriteFile(ctx context.Context, file string, src io.Reader, size int64, s progress.Sinker, w io.Writer) error {
    +	var err error
    +
    +	r := src
    +
    +	fh, err := os.Create(file)
    +	if err != nil {
    +		return err
    +	}
    +
    +	if s != nil {
    +		pr := progress.NewReader(ctx, s, src, size)
    +		src = pr
    +
    +		// Mark progress reader as done when returning from this function.
    +		defer func() {
    +			pr.Done(err)
    +		}()
    +	}
    +
    +	if w == nil {
    +		w = fh
    +	} else {
    +		w = io.MultiWriter(w, fh)
    +	}
    +
    +	_, err = io.Copy(w, r)
    +
    +	cerr := fh.Close()
    +
    +	if err == nil {
    +		err = cerr
    +	}
    +
    +	return err
    +}
    +
    +// DownloadFile GETs the given URL to a local file
    +func (c *Client) DownloadFile(ctx context.Context, file string, u *url.URL, param *Download) error {
    +	var err error
    +	if param == nil {
    +		param = &DefaultDownload
    +	}
    +
    +	rc, contentLength, err := c.Download(ctx, u, param)
    +	if err != nil {
    +		return err
    +	}
    +
    +	return c.WriteFile(ctx, file, rc, contentLength, param.Progress, param.Writer)
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/soap/debug.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/soap/debug.go
    new file mode 100644
    index 000000000..63518abca
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/soap/debug.go
    @@ -0,0 +1,149 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package soap
    +
    +import (
    +	"fmt"
    +	"io"
    +	"net/http"
    +	"net/http/httputil"
    +	"sync/atomic"
    +	"time"
    +
    +	"github.com/vmware/govmomi/vim25/debug"
    +)
    +
    +// teeReader wraps io.TeeReader and patches through the Close() function.
    +type teeReader struct {
    +	io.Reader
    +	io.Closer
    +}
    +
    +func newTeeReader(rc io.ReadCloser, w io.Writer) io.ReadCloser {
    +	return teeReader{
    +		Reader: io.TeeReader(rc, w),
    +		Closer: rc,
    +	}
    +}
    +
    +// debugRoundTrip contains state and logic needed to debug a single round trip.
    +type debugRoundTrip struct {
    +	cn  uint64         // Client number
    +	rn  uint64         // Request number
    +	log io.WriteCloser // Request log
    +	cs  []io.Closer    // Files that need closing when done
    +}
    +
    +func (d *debugRoundTrip) logf(format string, a ...interface{}) {
    +	now := time.Now().Format("2006-01-02T15-04-05.000000000")
    +	fmt.Fprintf(d.log, "%s - %04d: ", now, d.rn)
    +	fmt.Fprintf(d.log, format, a...)
    +	fmt.Fprintf(d.log, "\n")
    +}
    +
    +func (d *debugRoundTrip) enabled() bool {
    +	return d != nil
    +}
    +
    +func (d *debugRoundTrip) done() {
    +	for _, c := range d.cs {
    +		c.Close()
    +	}
    +}
    +
    +func (d *debugRoundTrip) newFile(suffix string) io.WriteCloser {
    +	return debug.NewFile(fmt.Sprintf("%d-%04d.%s", d.cn, d.rn, suffix))
    +}
    +
    +func (d *debugRoundTrip) debugRequest(req *http.Request) {
    +	if d == nil {
    +		return
    +	}
    +
    +	var wc io.WriteCloser
    +
    +	// Capture headers
    +	wc = d.newFile("req.headers")
    +	b, _ := httputil.DumpRequest(req, false)
    +	wc.Write(b)
    +	wc.Close()
    +
    +	// Capture body
    +	wc = d.newFile("req.xml")
    +	req.Body = newTeeReader(req.Body, wc)
    +
    +	// Delay closing until marked done
    +	d.cs = append(d.cs, wc)
    +}
    +
    +func (d *debugRoundTrip) debugResponse(res *http.Response) {
    +	if d == nil {
    +		return
    +	}
    +
    +	var wc io.WriteCloser
    +
    +	// Capture headers
    +	wc = d.newFile("res.headers")
    +	b, _ := httputil.DumpResponse(res, false)
    +	wc.Write(b)
    +	wc.Close()
    +
    +	// Capture body
    +	wc = d.newFile("res.xml")
    +	res.Body = newTeeReader(res.Body, wc)
    +
    +	// Delay closing until marked done
    +	d.cs = append(d.cs, wc)
    +}
    +
    +var cn uint64 // Client counter
    +
    +// debugContainer wraps the debugging state for a single client.
    +type debugContainer struct {
    +	cn  uint64         // Client number
    +	rn  uint64         // Request counter
    +	log io.WriteCloser // Request log
    +}
    +
    +func newDebug() *debugContainer {
    +	d := debugContainer{
    +		cn: atomic.AddUint64(&cn, 1),
    +		rn: 0,
    +	}
    +
    +	if !debug.Enabled() {
    +		return nil
    +	}
    +
    +	d.log = debug.NewFile(fmt.Sprintf("%d-client.log", d.cn))
    +	return &d
    +}
    +
    +func (d *debugContainer) newRoundTrip() *debugRoundTrip {
    +	if d == nil {
    +		return nil
    +	}
    +
    +	drt := debugRoundTrip{
    +		cn:  d.cn,
    +		rn:  atomic.AddUint64(&d.rn, 1),
    +		log: d.log,
    +	}
    +
    +	return &drt
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/soap/error.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/soap/error.go
    new file mode 100644
    index 000000000..d89208522
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/soap/error.go
    @@ -0,0 +1,115 @@
    +/*
    +Copyright (c) 2014 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package soap
    +
    +import (
    +	"fmt"
    +	"reflect"
    +
    +	"github.com/vmware/govmomi/vim25/types"
    +)
    +
    +type regularError struct {
    +	err error
    +}
    +
    +func (r regularError) Error() string {
    +	return r.err.Error()
    +}
    +
    +type soapFaultError struct {
    +	fault *Fault
    +}
    +
    +func (s soapFaultError) Error() string {
    +	msg := s.fault.String
    +
    +	if msg == "" {
    +		msg = reflect.TypeOf(s.fault.Detail.Fault).Name()
    +	}
    +
    +	return fmt.Sprintf("%s: %s", s.fault.Code, msg)
    +}
    +
    +type vimFaultError struct {
    +	fault types.BaseMethodFault
    +}
    +
    +func (v vimFaultError) Error() string {
    +	typ := reflect.TypeOf(v.fault)
    +	for typ.Kind() == reflect.Ptr {
    +		typ = typ.Elem()
    +	}
    +
    +	return typ.Name()
    +}
    +
    +func (v vimFaultError) Fault() types.BaseMethodFault {
    +	return v.fault
    +}
    +
    +func Wrap(err error) error {
    +	switch err.(type) {
    +	case regularError:
    +		return err
    +	case soapFaultError:
    +		return err
    +	case vimFaultError:
    +		return err
    +	}
    +
    +	return WrapRegularError(err)
    +}
    +
    +func WrapRegularError(err error) error {
    +	return regularError{err}
    +}
    +
    +func IsRegularError(err error) bool {
    +	_, ok := err.(regularError)
    +	return ok
    +}
    +
    +func ToRegularError(err error) error {
    +	return err.(regularError).err
    +}
    +
    +func WrapSoapFault(f *Fault) error {
    +	return soapFaultError{f}
    +}
    +
    +func IsSoapFault(err error) bool {
    +	_, ok := err.(soapFaultError)
    +	return ok
    +}
    +
    +func ToSoapFault(err error) *Fault {
    +	return err.(soapFaultError).fault
    +}
    +
    +func WrapVimFault(v types.BaseMethodFault) error {
    +	return vimFaultError{v}
    +}
    +
    +func IsVimFault(err error) bool {
    +	_, ok := err.(vimFaultError)
    +	return ok
    +}
    +
    +func ToVimFault(err error) types.BaseMethodFault {
    +	return err.(vimFaultError).fault
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/soap/soap.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/soap/soap.go
    new file mode 100644
    index 000000000..a8dc121ba
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/soap/soap.go
    @@ -0,0 +1,49 @@
    +/*
    +Copyright (c) 2014-2018 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package soap
    +
    +import (
    +	"github.com/vmware/govmomi/vim25/types"
    +	"github.com/vmware/govmomi/vim25/xml"
    +)
    +
    +// Header includes optional soap Header fields.
    +type Header struct {
    +	Action   string      `xml:"-"`                         // Action is the 'SOAPAction' HTTP header value. Defaults to "Client.Namespace/Client.Version".
    +	Cookie   string      `xml:"vcSessionCookie,omitempty"` // Cookie is a vCenter session cookie that can be used with other SDK endpoints (e.g. pbm).
    +	ID       string      `xml:"operationID,omitempty"`     // ID is the operationID used by ESX/vCenter logging for correlation.
    +	Security interface{} `xml:",omitempty"`                // Security is used for SAML token authentication and request signing.
    +}
    +
    +type Envelope struct {
    +	XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Envelope"`
    +	Header  *Header  `xml:"http://schemas.xmlsoap.org/soap/envelope/ Header,omitempty"`
    +	Body    interface{}
    +}
    +
    +type Fault struct {
    +	XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault"`
    +	Code    string   `xml:"faultcode"`
    +	String  string   `xml:"faultstring"`
    +	Detail  struct {
    +		Fault types.AnyType `xml:",any,typeattr"`
    +	} `xml:"detail"`
    +}
    +
    +func (f *Fault) VimFault() types.AnyType {
    +	return f.Detail.Fault
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/types/base.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/types/base.go
    new file mode 100644
    index 000000000..3bb12b741
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/types/base.go
    @@ -0,0 +1,19 @@
    +/*
    +Copyright (c) 2014 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package types
    +
    +type AnyType interface{}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/types/enum.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/types/enum.go
    new file mode 100644
    index 000000000..c8c597752
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/types/enum.go
    @@ -0,0 +1,4824 @@
    +/*
    +Copyright (c) 2014-2018 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package types
    +
    +import "reflect"
    +
    +type ActionParameter string
    +
    +const (
    +	ActionParameterTargetName        = ActionParameter("targetName")
    +	ActionParameterAlarmName         = ActionParameter("alarmName")
    +	ActionParameterOldStatus         = ActionParameter("oldStatus")
    +	ActionParameterNewStatus         = ActionParameter("newStatus")
    +	ActionParameterTriggeringSummary = ActionParameter("triggeringSummary")
    +	ActionParameterDeclaringSummary  = ActionParameter("declaringSummary")
    +	ActionParameterEventDescription  = ActionParameter("eventDescription")
    +	ActionParameterTarget            = ActionParameter("target")
    +	ActionParameterAlarm             = ActionParameter("alarm")
    +)
    +
    +func init() {
    +	t["ActionParameter"] = reflect.TypeOf((*ActionParameter)(nil)).Elem()
    +}
    +
    +type ActionType string
    +
    +const (
    +	ActionTypeMigrationV1         = ActionType("MigrationV1")
    +	ActionTypeVmPowerV1           = ActionType("VmPowerV1")
    +	ActionTypeHostPowerV1         = ActionType("HostPowerV1")
    +	ActionTypeHostMaintenanceV1   = ActionType("HostMaintenanceV1")
    +	ActionTypeStorageMigrationV1  = ActionType("StorageMigrationV1")
    +	ActionTypeStoragePlacementV1  = ActionType("StoragePlacementV1")
    +	ActionTypePlacementV1         = ActionType("PlacementV1")
    +	ActionTypeHostInfraUpdateHaV1 = ActionType("HostInfraUpdateHaV1")
    +)
    +
    +func init() {
    +	t["ActionType"] = reflect.TypeOf((*ActionType)(nil)).Elem()
    +}
    +
    +type AffinityType string
    +
    +const (
    +	AffinityTypeMemory = AffinityType("memory")
    +	AffinityTypeCpu    = AffinityType("cpu")
    +)
    +
    +func init() {
    +	t["AffinityType"] = reflect.TypeOf((*AffinityType)(nil)).Elem()
    +}
    +
    +type AgentInstallFailedReason string
    +
    +const (
    +	AgentInstallFailedReasonNotEnoughSpaceOnDevice      = AgentInstallFailedReason("NotEnoughSpaceOnDevice")
    +	AgentInstallFailedReasonPrepareToUpgradeFailed      = AgentInstallFailedReason("PrepareToUpgradeFailed")
    +	AgentInstallFailedReasonAgentNotRunning             = AgentInstallFailedReason("AgentNotRunning")
    +	AgentInstallFailedReasonAgentNotReachable           = AgentInstallFailedReason("AgentNotReachable")
    +	AgentInstallFailedReasonInstallTimedout             = AgentInstallFailedReason("InstallTimedout")
    +	AgentInstallFailedReasonSignatureVerificationFailed = AgentInstallFailedReason("SignatureVerificationFailed")
    +	AgentInstallFailedReasonAgentUploadFailed           = AgentInstallFailedReason("AgentUploadFailed")
    +	AgentInstallFailedReasonAgentUploadTimedout         = AgentInstallFailedReason("AgentUploadTimedout")
    +	AgentInstallFailedReasonUnknownInstallerError       = AgentInstallFailedReason("UnknownInstallerError")
    +)
    +
    +func init() {
    +	t["AgentInstallFailedReason"] = reflect.TypeOf((*AgentInstallFailedReason)(nil)).Elem()
    +}
    +
    +type AlarmFilterSpecAlarmTypeByEntity string
    +
    +const (
    +	AlarmFilterSpecAlarmTypeByEntityEntityTypeAll  = AlarmFilterSpecAlarmTypeByEntity("entityTypeAll")
    +	AlarmFilterSpecAlarmTypeByEntityEntityTypeHost = AlarmFilterSpecAlarmTypeByEntity("entityTypeHost")
    +	AlarmFilterSpecAlarmTypeByEntityEntityTypeVm   = AlarmFilterSpecAlarmTypeByEntity("entityTypeVm")
    +)
    +
    +func init() {
    +	t["AlarmFilterSpecAlarmTypeByEntity"] = reflect.TypeOf((*AlarmFilterSpecAlarmTypeByEntity)(nil)).Elem()
    +}
    +
    +type AlarmFilterSpecAlarmTypeByTrigger string
    +
    +const (
    +	AlarmFilterSpecAlarmTypeByTriggerTriggerTypeAll    = AlarmFilterSpecAlarmTypeByTrigger("triggerTypeAll")
    +	AlarmFilterSpecAlarmTypeByTriggerTriggerTypeEvent  = AlarmFilterSpecAlarmTypeByTrigger("triggerTypeEvent")
    +	AlarmFilterSpecAlarmTypeByTriggerTriggerTypeMetric = AlarmFilterSpecAlarmTypeByTrigger("triggerTypeMetric")
    +)
    +
    +func init() {
    +	t["AlarmFilterSpecAlarmTypeByTrigger"] = reflect.TypeOf((*AlarmFilterSpecAlarmTypeByTrigger)(nil)).Elem()
    +}
    +
    +type AnswerFileValidationInfoStatus string
    +
    +const (
    +	AnswerFileValidationInfoStatusSuccess         = AnswerFileValidationInfoStatus("success")
    +	AnswerFileValidationInfoStatusFailed          = AnswerFileValidationInfoStatus("failed")
    +	AnswerFileValidationInfoStatusFailed_defaults = AnswerFileValidationInfoStatus("failed_defaults")
    +)
    +
    +func init() {
    +	t["AnswerFileValidationInfoStatus"] = reflect.TypeOf((*AnswerFileValidationInfoStatus)(nil)).Elem()
    +}
    +
    +type ApplyHostProfileConfigurationResultStatus string
    +
    +const (
    +	ApplyHostProfileConfigurationResultStatusSuccess                     = ApplyHostProfileConfigurationResultStatus("success")
    +	ApplyHostProfileConfigurationResultStatusFailed                      = ApplyHostProfileConfigurationResultStatus("failed")
    +	ApplyHostProfileConfigurationResultStatusReboot_failed               = ApplyHostProfileConfigurationResultStatus("reboot_failed")
    +	ApplyHostProfileConfigurationResultStatusStateless_reboot_failed     = ApplyHostProfileConfigurationResultStatus("stateless_reboot_failed")
    +	ApplyHostProfileConfigurationResultStatusCheck_compliance_failed     = ApplyHostProfileConfigurationResultStatus("check_compliance_failed")
    +	ApplyHostProfileConfigurationResultStatusState_not_satisfied         = ApplyHostProfileConfigurationResultStatus("state_not_satisfied")
    +	ApplyHostProfileConfigurationResultStatusExit_maintenancemode_failed = ApplyHostProfileConfigurationResultStatus("exit_maintenancemode_failed")
    +	ApplyHostProfileConfigurationResultStatusCanceled                    = ApplyHostProfileConfigurationResultStatus("canceled")
    +)
    +
    +func init() {
    +	t["ApplyHostProfileConfigurationResultStatus"] = reflect.TypeOf((*ApplyHostProfileConfigurationResultStatus)(nil)).Elem()
    +}
    +
    +type ArrayUpdateOperation string
    +
    +const (
    +	ArrayUpdateOperationAdd    = ArrayUpdateOperation("add")
    +	ArrayUpdateOperationRemove = ArrayUpdateOperation("remove")
    +	ArrayUpdateOperationEdit   = ArrayUpdateOperation("edit")
    +)
    +
    +func init() {
    +	t["ArrayUpdateOperation"] = reflect.TypeOf((*ArrayUpdateOperation)(nil)).Elem()
    +}
    +
    +type AutoStartAction string
    +
    +const (
    +	AutoStartActionNone          = AutoStartAction("none")
    +	AutoStartActionSystemDefault = AutoStartAction("systemDefault")
    +	AutoStartActionPowerOn       = AutoStartAction("powerOn")
    +	AutoStartActionPowerOff      = AutoStartAction("powerOff")
    +	AutoStartActionGuestShutdown = AutoStartAction("guestShutdown")
    +	AutoStartActionSuspend       = AutoStartAction("suspend")
    +)
    +
    +func init() {
    +	t["AutoStartAction"] = reflect.TypeOf((*AutoStartAction)(nil)).Elem()
    +}
    +
    +type AutoStartWaitHeartbeatSetting string
    +
    +const (
    +	AutoStartWaitHeartbeatSettingYes           = AutoStartWaitHeartbeatSetting("yes")
    +	AutoStartWaitHeartbeatSettingNo            = AutoStartWaitHeartbeatSetting("no")
    +	AutoStartWaitHeartbeatSettingSystemDefault = AutoStartWaitHeartbeatSetting("systemDefault")
    +)
    +
    +func init() {
    +	t["AutoStartWaitHeartbeatSetting"] = reflect.TypeOf((*AutoStartWaitHeartbeatSetting)(nil)).Elem()
    +}
    +
    +type BaseConfigInfoDiskFileBackingInfoProvisioningType string
    +
    +const (
    +	BaseConfigInfoDiskFileBackingInfoProvisioningTypeThin             = BaseConfigInfoDiskFileBackingInfoProvisioningType("thin")
    +	BaseConfigInfoDiskFileBackingInfoProvisioningTypeEagerZeroedThick = BaseConfigInfoDiskFileBackingInfoProvisioningType("eagerZeroedThick")
    +	BaseConfigInfoDiskFileBackingInfoProvisioningTypeLazyZeroedThick  = BaseConfigInfoDiskFileBackingInfoProvisioningType("lazyZeroedThick")
    +)
    +
    +func init() {
    +	t["BaseConfigInfoDiskFileBackingInfoProvisioningType"] = reflect.TypeOf((*BaseConfigInfoDiskFileBackingInfoProvisioningType)(nil)).Elem()
    +}
    +
    +type BatchResultResult string
    +
    +const (
    +	BatchResultResultSuccess = BatchResultResult("success")
    +	BatchResultResultFail    = BatchResultResult("fail")
    +)
    +
    +func init() {
    +	t["BatchResultResult"] = reflect.TypeOf((*BatchResultResult)(nil)).Elem()
    +}
    +
    +type CannotEnableVmcpForClusterReason string
    +
    +const (
    +	CannotEnableVmcpForClusterReasonAPDTimeoutDisabled      = CannotEnableVmcpForClusterReason("APDTimeoutDisabled")
    +	CannotEnableVmcpForClusterReasonIncompatibleHostVersion = CannotEnableVmcpForClusterReason("IncompatibleHostVersion")
    +)
    +
    +func init() {
    +	t["CannotEnableVmcpForClusterReason"] = reflect.TypeOf((*CannotEnableVmcpForClusterReason)(nil)).Elem()
    +}
    +
    +type CannotMoveFaultToleranceVmMoveType string
    +
    +const (
    +	CannotMoveFaultToleranceVmMoveTypeResourcePool = CannotMoveFaultToleranceVmMoveType("resourcePool")
    +	CannotMoveFaultToleranceVmMoveTypeCluster      = CannotMoveFaultToleranceVmMoveType("cluster")
    +)
    +
    +func init() {
    +	t["CannotMoveFaultToleranceVmMoveType"] = reflect.TypeOf((*CannotMoveFaultToleranceVmMoveType)(nil)).Elem()
    +}
    +
    +type CannotPowerOffVmInClusterOperation string
    +
    +const (
    +	CannotPowerOffVmInClusterOperationSuspend       = CannotPowerOffVmInClusterOperation("suspend")
    +	CannotPowerOffVmInClusterOperationPowerOff      = CannotPowerOffVmInClusterOperation("powerOff")
    +	CannotPowerOffVmInClusterOperationGuestShutdown = CannotPowerOffVmInClusterOperation("guestShutdown")
    +	CannotPowerOffVmInClusterOperationGuestSuspend  = CannotPowerOffVmInClusterOperation("guestSuspend")
    +)
    +
    +func init() {
    +	t["CannotPowerOffVmInClusterOperation"] = reflect.TypeOf((*CannotPowerOffVmInClusterOperation)(nil)).Elem()
    +}
    +
    +type CannotUseNetworkReason string
    +
    +const (
    +	CannotUseNetworkReasonNetworkReservationNotSupported  = CannotUseNetworkReason("NetworkReservationNotSupported")
    +	CannotUseNetworkReasonMismatchedNetworkPolicies       = CannotUseNetworkReason("MismatchedNetworkPolicies")
    +	CannotUseNetworkReasonMismatchedDvsVersionOrVendor    = CannotUseNetworkReason("MismatchedDvsVersionOrVendor")
    +	CannotUseNetworkReasonVMotionToUnsupportedNetworkType = CannotUseNetworkReason("VMotionToUnsupportedNetworkType")
    +)
    +
    +func init() {
    +	t["CannotUseNetworkReason"] = reflect.TypeOf((*CannotUseNetworkReason)(nil)).Elem()
    +}
    +
    +type CheckTestType string
    +
    +const (
    +	CheckTestTypeSourceTests       = CheckTestType("sourceTests")
    +	CheckTestTypeHostTests         = CheckTestType("hostTests")
    +	CheckTestTypeResourcePoolTests = CheckTestType("resourcePoolTests")
    +	CheckTestTypeDatastoreTests    = CheckTestType("datastoreTests")
    +	CheckTestTypeNetworkTests      = CheckTestType("networkTests")
    +)
    +
    +func init() {
    +	t["CheckTestType"] = reflect.TypeOf((*CheckTestType)(nil)).Elem()
    +}
    +
    +type ClusterDasAamNodeStateDasState string
    +
    +const (
    +	ClusterDasAamNodeStateDasStateUninitialized = ClusterDasAamNodeStateDasState("uninitialized")
    +	ClusterDasAamNodeStateDasStateInitialized   = ClusterDasAamNodeStateDasState("initialized")
    +	ClusterDasAamNodeStateDasStateConfiguring   = ClusterDasAamNodeStateDasState("configuring")
    +	ClusterDasAamNodeStateDasStateUnconfiguring = ClusterDasAamNodeStateDasState("unconfiguring")
    +	ClusterDasAamNodeStateDasStateRunning       = ClusterDasAamNodeStateDasState("running")
    +	ClusterDasAamNodeStateDasStateError         = ClusterDasAamNodeStateDasState("error")
    +	ClusterDasAamNodeStateDasStateAgentShutdown = ClusterDasAamNodeStateDasState("agentShutdown")
    +	ClusterDasAamNodeStateDasStateNodeFailed    = ClusterDasAamNodeStateDasState("nodeFailed")
    +)
    +
    +func init() {
    +	t["ClusterDasAamNodeStateDasState"] = reflect.TypeOf((*ClusterDasAamNodeStateDasState)(nil)).Elem()
    +}
    +
    +type ClusterDasConfigInfoHBDatastoreCandidate string
    +
    +const (
    +	ClusterDasConfigInfoHBDatastoreCandidateUserSelectedDs                  = ClusterDasConfigInfoHBDatastoreCandidate("userSelectedDs")
    +	ClusterDasConfigInfoHBDatastoreCandidateAllFeasibleDs                   = ClusterDasConfigInfoHBDatastoreCandidate("allFeasibleDs")
    +	ClusterDasConfigInfoHBDatastoreCandidateAllFeasibleDsWithUserPreference = ClusterDasConfigInfoHBDatastoreCandidate("allFeasibleDsWithUserPreference")
    +)
    +
    +func init() {
    +	t["ClusterDasConfigInfoHBDatastoreCandidate"] = reflect.TypeOf((*ClusterDasConfigInfoHBDatastoreCandidate)(nil)).Elem()
    +}
    +
    +type ClusterDasConfigInfoServiceState string
    +
    +const (
    +	ClusterDasConfigInfoServiceStateDisabled = ClusterDasConfigInfoServiceState("disabled")
    +	ClusterDasConfigInfoServiceStateEnabled  = ClusterDasConfigInfoServiceState("enabled")
    +)
    +
    +func init() {
    +	t["ClusterDasConfigInfoServiceState"] = reflect.TypeOf((*ClusterDasConfigInfoServiceState)(nil)).Elem()
    +}
    +
    +type ClusterDasConfigInfoVmMonitoringState string
    +
    +const (
    +	ClusterDasConfigInfoVmMonitoringStateVmMonitoringDisabled = ClusterDasConfigInfoVmMonitoringState("vmMonitoringDisabled")
    +	ClusterDasConfigInfoVmMonitoringStateVmMonitoringOnly     = ClusterDasConfigInfoVmMonitoringState("vmMonitoringOnly")
    +	ClusterDasConfigInfoVmMonitoringStateVmAndAppMonitoring   = ClusterDasConfigInfoVmMonitoringState("vmAndAppMonitoring")
    +)
    +
    +func init() {
    +	t["ClusterDasConfigInfoVmMonitoringState"] = reflect.TypeOf((*ClusterDasConfigInfoVmMonitoringState)(nil)).Elem()
    +}
    +
    +type ClusterDasFdmAvailabilityState string
    +
    +const (
    +	ClusterDasFdmAvailabilityStateUninitialized                = ClusterDasFdmAvailabilityState("uninitialized")
    +	ClusterDasFdmAvailabilityStateElection                     = ClusterDasFdmAvailabilityState("election")
    +	ClusterDasFdmAvailabilityStateMaster                       = ClusterDasFdmAvailabilityState("master")
    +	ClusterDasFdmAvailabilityStateConnectedToMaster            = ClusterDasFdmAvailabilityState("connectedToMaster")
    +	ClusterDasFdmAvailabilityStateNetworkPartitionedFromMaster = ClusterDasFdmAvailabilityState("networkPartitionedFromMaster")
    +	ClusterDasFdmAvailabilityStateNetworkIsolated              = ClusterDasFdmAvailabilityState("networkIsolated")
    +	ClusterDasFdmAvailabilityStateHostDown                     = ClusterDasFdmAvailabilityState("hostDown")
    +	ClusterDasFdmAvailabilityStateInitializationError          = ClusterDasFdmAvailabilityState("initializationError")
    +	ClusterDasFdmAvailabilityStateUninitializationError        = ClusterDasFdmAvailabilityState("uninitializationError")
    +	ClusterDasFdmAvailabilityStateFdmUnreachable               = ClusterDasFdmAvailabilityState("fdmUnreachable")
    +)
    +
    +func init() {
    +	t["ClusterDasFdmAvailabilityState"] = reflect.TypeOf((*ClusterDasFdmAvailabilityState)(nil)).Elem()
    +}
    +
    +type ClusterDasVmSettingsIsolationResponse string
    +
    +const (
    +	ClusterDasVmSettingsIsolationResponseNone                     = ClusterDasVmSettingsIsolationResponse("none")
    +	ClusterDasVmSettingsIsolationResponsePowerOff                 = ClusterDasVmSettingsIsolationResponse("powerOff")
    +	ClusterDasVmSettingsIsolationResponseShutdown                 = ClusterDasVmSettingsIsolationResponse("shutdown")
    +	ClusterDasVmSettingsIsolationResponseClusterIsolationResponse = ClusterDasVmSettingsIsolationResponse("clusterIsolationResponse")
    +)
    +
    +func init() {
    +	t["ClusterDasVmSettingsIsolationResponse"] = reflect.TypeOf((*ClusterDasVmSettingsIsolationResponse)(nil)).Elem()
    +}
    +
    +type ClusterDasVmSettingsRestartPriority string
    +
    +const (
    +	ClusterDasVmSettingsRestartPriorityDisabled               = ClusterDasVmSettingsRestartPriority("disabled")
    +	ClusterDasVmSettingsRestartPriorityLowest                 = ClusterDasVmSettingsRestartPriority("lowest")
    +	ClusterDasVmSettingsRestartPriorityLow                    = ClusterDasVmSettingsRestartPriority("low")
    +	ClusterDasVmSettingsRestartPriorityMedium                 = ClusterDasVmSettingsRestartPriority("medium")
    +	ClusterDasVmSettingsRestartPriorityHigh                   = ClusterDasVmSettingsRestartPriority("high")
    +	ClusterDasVmSettingsRestartPriorityHighest                = ClusterDasVmSettingsRestartPriority("highest")
    +	ClusterDasVmSettingsRestartPriorityClusterRestartPriority = ClusterDasVmSettingsRestartPriority("clusterRestartPriority")
    +)
    +
    +func init() {
    +	t["ClusterDasVmSettingsRestartPriority"] = reflect.TypeOf((*ClusterDasVmSettingsRestartPriority)(nil)).Elem()
    +}
    +
    +type ClusterHostInfraUpdateHaModeActionOperationType string
    +
    +const (
    +	ClusterHostInfraUpdateHaModeActionOperationTypeEnterQuarantine  = ClusterHostInfraUpdateHaModeActionOperationType("enterQuarantine")
    +	ClusterHostInfraUpdateHaModeActionOperationTypeExitQuarantine   = ClusterHostInfraUpdateHaModeActionOperationType("exitQuarantine")
    +	ClusterHostInfraUpdateHaModeActionOperationTypeEnterMaintenance = ClusterHostInfraUpdateHaModeActionOperationType("enterMaintenance")
    +)
    +
    +func init() {
    +	t["ClusterHostInfraUpdateHaModeActionOperationType"] = reflect.TypeOf((*ClusterHostInfraUpdateHaModeActionOperationType)(nil)).Elem()
    +}
    +
    +type ClusterInfraUpdateHaConfigInfoBehaviorType string
    +
    +const (
    +	ClusterInfraUpdateHaConfigInfoBehaviorTypeManual    = ClusterInfraUpdateHaConfigInfoBehaviorType("Manual")
    +	ClusterInfraUpdateHaConfigInfoBehaviorTypeAutomated = ClusterInfraUpdateHaConfigInfoBehaviorType("Automated")
    +)
    +
    +func init() {
    +	t["ClusterInfraUpdateHaConfigInfoBehaviorType"] = reflect.TypeOf((*ClusterInfraUpdateHaConfigInfoBehaviorType)(nil)).Elem()
    +}
    +
    +type ClusterInfraUpdateHaConfigInfoRemediationType string
    +
    +const (
    +	ClusterInfraUpdateHaConfigInfoRemediationTypeQuarantineMode  = ClusterInfraUpdateHaConfigInfoRemediationType("QuarantineMode")
    +	ClusterInfraUpdateHaConfigInfoRemediationTypeMaintenanceMode = ClusterInfraUpdateHaConfigInfoRemediationType("MaintenanceMode")
    +)
    +
    +func init() {
    +	t["ClusterInfraUpdateHaConfigInfoRemediationType"] = reflect.TypeOf((*ClusterInfraUpdateHaConfigInfoRemediationType)(nil)).Elem()
    +}
    +
    +type ClusterPowerOnVmOption string
    +
    +const (
    +	ClusterPowerOnVmOptionOverrideAutomationLevel = ClusterPowerOnVmOption("OverrideAutomationLevel")
    +	ClusterPowerOnVmOptionReserveResources        = ClusterPowerOnVmOption("ReserveResources")
    +)
    +
    +func init() {
    +	t["ClusterPowerOnVmOption"] = reflect.TypeOf((*ClusterPowerOnVmOption)(nil)).Elem()
    +}
    +
    +type ClusterProfileServiceType string
    +
    +const (
    +	ClusterProfileServiceTypeDRS = ClusterProfileServiceType("DRS")
    +	ClusterProfileServiceTypeHA  = ClusterProfileServiceType("HA")
    +	ClusterProfileServiceTypeDPM = ClusterProfileServiceType("DPM")
    +	ClusterProfileServiceTypeFT  = ClusterProfileServiceType("FT")
    +)
    +
    +func init() {
    +	t["ClusterProfileServiceType"] = reflect.TypeOf((*ClusterProfileServiceType)(nil)).Elem()
    +}
    +
    +type ClusterVmComponentProtectionSettingsStorageVmReaction string
    +
    +const (
    +	ClusterVmComponentProtectionSettingsStorageVmReactionDisabled            = ClusterVmComponentProtectionSettingsStorageVmReaction("disabled")
    +	ClusterVmComponentProtectionSettingsStorageVmReactionWarning             = ClusterVmComponentProtectionSettingsStorageVmReaction("warning")
    +	ClusterVmComponentProtectionSettingsStorageVmReactionRestartConservative = ClusterVmComponentProtectionSettingsStorageVmReaction("restartConservative")
    +	ClusterVmComponentProtectionSettingsStorageVmReactionRestartAggressive   = ClusterVmComponentProtectionSettingsStorageVmReaction("restartAggressive")
    +	ClusterVmComponentProtectionSettingsStorageVmReactionClusterDefault      = ClusterVmComponentProtectionSettingsStorageVmReaction("clusterDefault")
    +)
    +
    +func init() {
    +	t["ClusterVmComponentProtectionSettingsStorageVmReaction"] = reflect.TypeOf((*ClusterVmComponentProtectionSettingsStorageVmReaction)(nil)).Elem()
    +}
    +
    +type ClusterVmComponentProtectionSettingsVmReactionOnAPDCleared string
    +
    +const (
    +	ClusterVmComponentProtectionSettingsVmReactionOnAPDClearedNone              = ClusterVmComponentProtectionSettingsVmReactionOnAPDCleared("none")
    +	ClusterVmComponentProtectionSettingsVmReactionOnAPDClearedReset             = ClusterVmComponentProtectionSettingsVmReactionOnAPDCleared("reset")
    +	ClusterVmComponentProtectionSettingsVmReactionOnAPDClearedUseClusterDefault = ClusterVmComponentProtectionSettingsVmReactionOnAPDCleared("useClusterDefault")
    +)
    +
    +func init() {
    +	t["ClusterVmComponentProtectionSettingsVmReactionOnAPDCleared"] = reflect.TypeOf((*ClusterVmComponentProtectionSettingsVmReactionOnAPDCleared)(nil)).Elem()
    +}
    +
    +type ClusterVmReadinessReadyCondition string
    +
    +const (
    +	ClusterVmReadinessReadyConditionNone               = ClusterVmReadinessReadyCondition("none")
    +	ClusterVmReadinessReadyConditionPoweredOn          = ClusterVmReadinessReadyCondition("poweredOn")
    +	ClusterVmReadinessReadyConditionGuestHbStatusGreen = ClusterVmReadinessReadyCondition("guestHbStatusGreen")
    +	ClusterVmReadinessReadyConditionAppHbStatusGreen   = ClusterVmReadinessReadyCondition("appHbStatusGreen")
    +	ClusterVmReadinessReadyConditionUseClusterDefault  = ClusterVmReadinessReadyCondition("useClusterDefault")
    +)
    +
    +func init() {
    +	t["ClusterVmReadinessReadyCondition"] = reflect.TypeOf((*ClusterVmReadinessReadyCondition)(nil)).Elem()
    +}
    +
    +type ComplianceResultStatus string
    +
    +const (
    +	ComplianceResultStatusCompliant    = ComplianceResultStatus("compliant")
    +	ComplianceResultStatusNonCompliant = ComplianceResultStatus("nonCompliant")
    +	ComplianceResultStatusUnknown      = ComplianceResultStatus("unknown")
    +	ComplianceResultStatusRunning      = ComplianceResultStatus("running")
    +)
    +
    +func init() {
    +	t["ComplianceResultStatus"] = reflect.TypeOf((*ComplianceResultStatus)(nil)).Elem()
    +}
    +
    +type ComputeResourceHostSPBMLicenseInfoHostSPBMLicenseState string
    +
    +const (
    +	ComputeResourceHostSPBMLicenseInfoHostSPBMLicenseStateLicensed   = ComputeResourceHostSPBMLicenseInfoHostSPBMLicenseState("licensed")
    +	ComputeResourceHostSPBMLicenseInfoHostSPBMLicenseStateUnlicensed = ComputeResourceHostSPBMLicenseInfoHostSPBMLicenseState("unlicensed")
    +	ComputeResourceHostSPBMLicenseInfoHostSPBMLicenseStateUnknown    = ComputeResourceHostSPBMLicenseInfoHostSPBMLicenseState("unknown")
    +)
    +
    +func init() {
    +	t["ComputeResourceHostSPBMLicenseInfoHostSPBMLicenseState"] = reflect.TypeOf((*ComputeResourceHostSPBMLicenseInfoHostSPBMLicenseState)(nil)).Elem()
    +}
    +
    +type ConfigSpecOperation string
    +
    +const (
    +	ConfigSpecOperationAdd    = ConfigSpecOperation("add")
    +	ConfigSpecOperationEdit   = ConfigSpecOperation("edit")
    +	ConfigSpecOperationRemove = ConfigSpecOperation("remove")
    +)
    +
    +func init() {
    +	t["ConfigSpecOperation"] = reflect.TypeOf((*ConfigSpecOperation)(nil)).Elem()
    +}
    +
    +type CustomizationLicenseDataMode string
    +
    +const (
    +	CustomizationLicenseDataModePerServer = CustomizationLicenseDataMode("perServer")
    +	CustomizationLicenseDataModePerSeat   = CustomizationLicenseDataMode("perSeat")
    +)
    +
    +func init() {
    +	t["CustomizationLicenseDataMode"] = reflect.TypeOf((*CustomizationLicenseDataMode)(nil)).Elem()
    +}
    +
    +type CustomizationNetBIOSMode string
    +
    +const (
    +	CustomizationNetBIOSModeEnableNetBIOSViaDhcp = CustomizationNetBIOSMode("enableNetBIOSViaDhcp")
    +	CustomizationNetBIOSModeEnableNetBIOS        = CustomizationNetBIOSMode("enableNetBIOS")
    +	CustomizationNetBIOSModeDisableNetBIOS       = CustomizationNetBIOSMode("disableNetBIOS")
    +)
    +
    +func init() {
    +	t["CustomizationNetBIOSMode"] = reflect.TypeOf((*CustomizationNetBIOSMode)(nil)).Elem()
    +}
    +
    +type CustomizationSysprepRebootOption string
    +
    +const (
    +	CustomizationSysprepRebootOptionReboot   = CustomizationSysprepRebootOption("reboot")
    +	CustomizationSysprepRebootOptionNoreboot = CustomizationSysprepRebootOption("noreboot")
    +	CustomizationSysprepRebootOptionShutdown = CustomizationSysprepRebootOption("shutdown")
    +)
    +
    +func init() {
    +	t["CustomizationSysprepRebootOption"] = reflect.TypeOf((*CustomizationSysprepRebootOption)(nil)).Elem()
    +}
    +
    +type DVPortStatusVmDirectPathGen2InactiveReasonNetwork string
    +
    +const (
    +	DVPortStatusVmDirectPathGen2InactiveReasonNetworkPortNptIncompatibleDvs             = DVPortStatusVmDirectPathGen2InactiveReasonNetwork("portNptIncompatibleDvs")
    +	DVPortStatusVmDirectPathGen2InactiveReasonNetworkPortNptNoCompatibleNics            = DVPortStatusVmDirectPathGen2InactiveReasonNetwork("portNptNoCompatibleNics")
    +	DVPortStatusVmDirectPathGen2InactiveReasonNetworkPortNptNoVirtualFunctionsAvailable = DVPortStatusVmDirectPathGen2InactiveReasonNetwork("portNptNoVirtualFunctionsAvailable")
    +	DVPortStatusVmDirectPathGen2InactiveReasonNetworkPortNptDisabledForPort             = DVPortStatusVmDirectPathGen2InactiveReasonNetwork("portNptDisabledForPort")
    +)
    +
    +func init() {
    +	t["DVPortStatusVmDirectPathGen2InactiveReasonNetwork"] = reflect.TypeOf((*DVPortStatusVmDirectPathGen2InactiveReasonNetwork)(nil)).Elem()
    +}
    +
    +type DVPortStatusVmDirectPathGen2InactiveReasonOther string
    +
    +const (
    +	DVPortStatusVmDirectPathGen2InactiveReasonOtherPortNptIncompatibleHost      = DVPortStatusVmDirectPathGen2InactiveReasonOther("portNptIncompatibleHost")
    +	DVPortStatusVmDirectPathGen2InactiveReasonOtherPortNptIncompatibleConnectee = DVPortStatusVmDirectPathGen2InactiveReasonOther("portNptIncompatibleConnectee")
    +)
    +
    +func init() {
    +	t["DVPortStatusVmDirectPathGen2InactiveReasonOther"] = reflect.TypeOf((*DVPortStatusVmDirectPathGen2InactiveReasonOther)(nil)).Elem()
    +}
    +
    +type DVSMacLimitPolicyType string
    +
    +const (
    +	DVSMacLimitPolicyTypeAllow = DVSMacLimitPolicyType("allow")
    +	DVSMacLimitPolicyTypeDrop  = DVSMacLimitPolicyType("drop")
    +)
    +
    +func init() {
    +	t["DVSMacLimitPolicyType"] = reflect.TypeOf((*DVSMacLimitPolicyType)(nil)).Elem()
    +}
    +
    +type DasConfigFaultDasConfigFaultReason string
    +
    +const (
    +	DasConfigFaultDasConfigFaultReasonHostNetworkMisconfiguration = DasConfigFaultDasConfigFaultReason("HostNetworkMisconfiguration")
    +	DasConfigFaultDasConfigFaultReasonHostMisconfiguration        = DasConfigFaultDasConfigFaultReason("HostMisconfiguration")
    +	DasConfigFaultDasConfigFaultReasonInsufficientPrivileges      = DasConfigFaultDasConfigFaultReason("InsufficientPrivileges")
    +	DasConfigFaultDasConfigFaultReasonNoPrimaryAgentAvailable     = DasConfigFaultDasConfigFaultReason("NoPrimaryAgentAvailable")
    +	DasConfigFaultDasConfigFaultReasonOther                       = DasConfigFaultDasConfigFaultReason("Other")
    +	DasConfigFaultDasConfigFaultReasonNoDatastoresConfigured      = DasConfigFaultDasConfigFaultReason("NoDatastoresConfigured")
    +	DasConfigFaultDasConfigFaultReasonCreateConfigVvolFailed      = DasConfigFaultDasConfigFaultReason("CreateConfigVvolFailed")
    +	DasConfigFaultDasConfigFaultReasonVSanNotSupportedOnHost      = DasConfigFaultDasConfigFaultReason("VSanNotSupportedOnHost")
    +	DasConfigFaultDasConfigFaultReasonDasNetworkMisconfiguration  = DasConfigFaultDasConfigFaultReason("DasNetworkMisconfiguration")
    +)
    +
    +func init() {
    +	t["DasConfigFaultDasConfigFaultReason"] = reflect.TypeOf((*DasConfigFaultDasConfigFaultReason)(nil)).Elem()
    +}
    +
    +type DasVmPriority string
    +
    +const (
    +	DasVmPriorityDisabled = DasVmPriority("disabled")
    +	DasVmPriorityLow      = DasVmPriority("low")
    +	DasVmPriorityMedium   = DasVmPriority("medium")
    +	DasVmPriorityHigh     = DasVmPriority("high")
    +)
    +
    +func init() {
    +	t["DasVmPriority"] = reflect.TypeOf((*DasVmPriority)(nil)).Elem()
    +}
    +
    +type DatastoreAccessible string
    +
    +const (
    +	DatastoreAccessibleTrue  = DatastoreAccessible("True")
    +	DatastoreAccessibleFalse = DatastoreAccessible("False")
    +)
    +
    +func init() {
    +	t["DatastoreAccessible"] = reflect.TypeOf((*DatastoreAccessible)(nil)).Elem()
    +}
    +
    +type DatastoreSummaryMaintenanceModeState string
    +
    +const (
    +	DatastoreSummaryMaintenanceModeStateNormal              = DatastoreSummaryMaintenanceModeState("normal")
    +	DatastoreSummaryMaintenanceModeStateEnteringMaintenance = DatastoreSummaryMaintenanceModeState("enteringMaintenance")
    +	DatastoreSummaryMaintenanceModeStateInMaintenance       = DatastoreSummaryMaintenanceModeState("inMaintenance")
    +)
    +
    +func init() {
    +	t["DatastoreSummaryMaintenanceModeState"] = reflect.TypeOf((*DatastoreSummaryMaintenanceModeState)(nil)).Elem()
    +}
    +
    +type DayOfWeek string
    +
    +const (
    +	DayOfWeekSunday    = DayOfWeek("sunday")
    +	DayOfWeekMonday    = DayOfWeek("monday")
    +	DayOfWeekTuesday   = DayOfWeek("tuesday")
    +	DayOfWeekWednesday = DayOfWeek("wednesday")
    +	DayOfWeekThursday  = DayOfWeek("thursday")
    +	DayOfWeekFriday    = DayOfWeek("friday")
    +	DayOfWeekSaturday  = DayOfWeek("saturday")
    +)
    +
    +func init() {
    +	t["DayOfWeek"] = reflect.TypeOf((*DayOfWeek)(nil)).Elem()
    +}
    +
    +type DeviceNotSupportedReason string
    +
    +const (
    +	DeviceNotSupportedReasonHost  = DeviceNotSupportedReason("host")
    +	DeviceNotSupportedReasonGuest = DeviceNotSupportedReason("guest")
    +)
    +
    +func init() {
    +	t["DeviceNotSupportedReason"] = reflect.TypeOf((*DeviceNotSupportedReason)(nil)).Elem()
    +}
    +
    +type DiagnosticManagerLogCreator string
    +
    +const (
    +	DiagnosticManagerLogCreatorVpxd      = DiagnosticManagerLogCreator("vpxd")
    +	DiagnosticManagerLogCreatorVpxa      = DiagnosticManagerLogCreator("vpxa")
    +	DiagnosticManagerLogCreatorHostd     = DiagnosticManagerLogCreator("hostd")
    +	DiagnosticManagerLogCreatorServerd   = DiagnosticManagerLogCreator("serverd")
    +	DiagnosticManagerLogCreatorInstall   = DiagnosticManagerLogCreator("install")
    +	DiagnosticManagerLogCreatorVpxClient = DiagnosticManagerLogCreator("vpxClient")
    +	DiagnosticManagerLogCreatorRecordLog = DiagnosticManagerLogCreator("recordLog")
    +)
    +
    +func init() {
    +	t["DiagnosticManagerLogCreator"] = reflect.TypeOf((*DiagnosticManagerLogCreator)(nil)).Elem()
    +}
    +
    +type DiagnosticManagerLogFormat string
    +
    +const (
    +	DiagnosticManagerLogFormatPlain = DiagnosticManagerLogFormat("plain")
    +)
    +
    +func init() {
    +	t["DiagnosticManagerLogFormat"] = reflect.TypeOf((*DiagnosticManagerLogFormat)(nil)).Elem()
    +}
    +
    +type DiagnosticPartitionStorageType string
    +
    +const (
    +	DiagnosticPartitionStorageTypeDirectAttached  = DiagnosticPartitionStorageType("directAttached")
    +	DiagnosticPartitionStorageTypeNetworkAttached = DiagnosticPartitionStorageType("networkAttached")
    +)
    +
    +func init() {
    +	t["DiagnosticPartitionStorageType"] = reflect.TypeOf((*DiagnosticPartitionStorageType)(nil)).Elem()
    +}
    +
    +type DiagnosticPartitionType string
    +
    +const (
    +	DiagnosticPartitionTypeSingleHost = DiagnosticPartitionType("singleHost")
    +	DiagnosticPartitionTypeMultiHost  = DiagnosticPartitionType("multiHost")
    +)
    +
    +func init() {
    +	t["DiagnosticPartitionType"] = reflect.TypeOf((*DiagnosticPartitionType)(nil)).Elem()
    +}
    +
    +type DisallowedChangeByServiceDisallowedChange string
    +
    +const (
    +	DisallowedChangeByServiceDisallowedChangeHotExtendDisk = DisallowedChangeByServiceDisallowedChange("hotExtendDisk")
    +)
    +
    +func init() {
    +	t["DisallowedChangeByServiceDisallowedChange"] = reflect.TypeOf((*DisallowedChangeByServiceDisallowedChange)(nil)).Elem()
    +}
    +
    +type DistributedVirtualPortgroupMetaTagName string
    +
    +const (
    +	DistributedVirtualPortgroupMetaTagNameDvsName       = DistributedVirtualPortgroupMetaTagName("dvsName")
    +	DistributedVirtualPortgroupMetaTagNamePortgroupName = DistributedVirtualPortgroupMetaTagName("portgroupName")
    +	DistributedVirtualPortgroupMetaTagNamePortIndex     = DistributedVirtualPortgroupMetaTagName("portIndex")
    +)
    +
    +func init() {
    +	t["DistributedVirtualPortgroupMetaTagName"] = reflect.TypeOf((*DistributedVirtualPortgroupMetaTagName)(nil)).Elem()
    +}
    +
    +type DistributedVirtualPortgroupPortgroupType string
    +
    +const (
    +	DistributedVirtualPortgroupPortgroupTypeEarlyBinding = DistributedVirtualPortgroupPortgroupType("earlyBinding")
    +	DistributedVirtualPortgroupPortgroupTypeLateBinding  = DistributedVirtualPortgroupPortgroupType("lateBinding")
    +	DistributedVirtualPortgroupPortgroupTypeEphemeral    = DistributedVirtualPortgroupPortgroupType("ephemeral")
    +)
    +
    +func init() {
    +	t["DistributedVirtualPortgroupPortgroupType"] = reflect.TypeOf((*DistributedVirtualPortgroupPortgroupType)(nil)).Elem()
    +}
    +
    +type DistributedVirtualSwitchHostInfrastructureTrafficClass string
    +
    +const (
    +	DistributedVirtualSwitchHostInfrastructureTrafficClassManagement     = DistributedVirtualSwitchHostInfrastructureTrafficClass("management")
    +	DistributedVirtualSwitchHostInfrastructureTrafficClassFaultTolerance = DistributedVirtualSwitchHostInfrastructureTrafficClass("faultTolerance")
    +	DistributedVirtualSwitchHostInfrastructureTrafficClassVmotion        = DistributedVirtualSwitchHostInfrastructureTrafficClass("vmotion")
    +	DistributedVirtualSwitchHostInfrastructureTrafficClassVirtualMachine = DistributedVirtualSwitchHostInfrastructureTrafficClass("virtualMachine")
    +	DistributedVirtualSwitchHostInfrastructureTrafficClassISCSI          = DistributedVirtualSwitchHostInfrastructureTrafficClass("iSCSI")
    +	DistributedVirtualSwitchHostInfrastructureTrafficClassNfs            = DistributedVirtualSwitchHostInfrastructureTrafficClass("nfs")
    +	DistributedVirtualSwitchHostInfrastructureTrafficClassHbr            = DistributedVirtualSwitchHostInfrastructureTrafficClass("hbr")
    +	DistributedVirtualSwitchHostInfrastructureTrafficClassVsan           = DistributedVirtualSwitchHostInfrastructureTrafficClass("vsan")
    +	DistributedVirtualSwitchHostInfrastructureTrafficClassVdp            = DistributedVirtualSwitchHostInfrastructureTrafficClass("vdp")
    +)
    +
    +func init() {
    +	t["DistributedVirtualSwitchHostInfrastructureTrafficClass"] = reflect.TypeOf((*DistributedVirtualSwitchHostInfrastructureTrafficClass)(nil)).Elem()
    +}
    +
    +type DistributedVirtualSwitchHostMemberHostComponentState string
    +
    +const (
    +	DistributedVirtualSwitchHostMemberHostComponentStateUp           = DistributedVirtualSwitchHostMemberHostComponentState("up")
    +	DistributedVirtualSwitchHostMemberHostComponentStatePending      = DistributedVirtualSwitchHostMemberHostComponentState("pending")
    +	DistributedVirtualSwitchHostMemberHostComponentStateOutOfSync    = DistributedVirtualSwitchHostMemberHostComponentState("outOfSync")
    +	DistributedVirtualSwitchHostMemberHostComponentStateWarning      = DistributedVirtualSwitchHostMemberHostComponentState("warning")
    +	DistributedVirtualSwitchHostMemberHostComponentStateDisconnected = DistributedVirtualSwitchHostMemberHostComponentState("disconnected")
    +	DistributedVirtualSwitchHostMemberHostComponentStateDown         = DistributedVirtualSwitchHostMemberHostComponentState("down")
    +)
    +
    +func init() {
    +	t["DistributedVirtualSwitchHostMemberHostComponentState"] = reflect.TypeOf((*DistributedVirtualSwitchHostMemberHostComponentState)(nil)).Elem()
    +}
    +
    +type DistributedVirtualSwitchNetworkResourceControlVersion string
    +
    +const (
    +	DistributedVirtualSwitchNetworkResourceControlVersionVersion2 = DistributedVirtualSwitchNetworkResourceControlVersion("version2")
    +	DistributedVirtualSwitchNetworkResourceControlVersionVersion3 = DistributedVirtualSwitchNetworkResourceControlVersion("version3")
    +)
    +
    +func init() {
    +	t["DistributedVirtualSwitchNetworkResourceControlVersion"] = reflect.TypeOf((*DistributedVirtualSwitchNetworkResourceControlVersion)(nil)).Elem()
    +}
    +
    +type DistributedVirtualSwitchNicTeamingPolicyMode string
    +
    +const (
    +	DistributedVirtualSwitchNicTeamingPolicyModeLoadbalance_ip        = DistributedVirtualSwitchNicTeamingPolicyMode("loadbalance_ip")
    +	DistributedVirtualSwitchNicTeamingPolicyModeLoadbalance_srcmac    = DistributedVirtualSwitchNicTeamingPolicyMode("loadbalance_srcmac")
    +	DistributedVirtualSwitchNicTeamingPolicyModeLoadbalance_srcid     = DistributedVirtualSwitchNicTeamingPolicyMode("loadbalance_srcid")
    +	DistributedVirtualSwitchNicTeamingPolicyModeFailover_explicit     = DistributedVirtualSwitchNicTeamingPolicyMode("failover_explicit")
    +	DistributedVirtualSwitchNicTeamingPolicyModeLoadbalance_loadbased = DistributedVirtualSwitchNicTeamingPolicyMode("loadbalance_loadbased")
    +)
    +
    +func init() {
    +	t["DistributedVirtualSwitchNicTeamingPolicyMode"] = reflect.TypeOf((*DistributedVirtualSwitchNicTeamingPolicyMode)(nil)).Elem()
    +}
    +
    +type DistributedVirtualSwitchPortConnecteeConnecteeType string
    +
    +const (
    +	DistributedVirtualSwitchPortConnecteeConnecteeTypePnic            = DistributedVirtualSwitchPortConnecteeConnecteeType("pnic")
    +	DistributedVirtualSwitchPortConnecteeConnecteeTypeVmVnic          = DistributedVirtualSwitchPortConnecteeConnecteeType("vmVnic")
    +	DistributedVirtualSwitchPortConnecteeConnecteeTypeHostConsoleVnic = DistributedVirtualSwitchPortConnecteeConnecteeType("hostConsoleVnic")
    +	DistributedVirtualSwitchPortConnecteeConnecteeTypeHostVmkVnic     = DistributedVirtualSwitchPortConnecteeConnecteeType("hostVmkVnic")
    +)
    +
    +func init() {
    +	t["DistributedVirtualSwitchPortConnecteeConnecteeType"] = reflect.TypeOf((*DistributedVirtualSwitchPortConnecteeConnecteeType)(nil)).Elem()
    +}
    +
    +type DistributedVirtualSwitchProductSpecOperationType string
    +
    +const (
    +	DistributedVirtualSwitchProductSpecOperationTypePreInstall             = DistributedVirtualSwitchProductSpecOperationType("preInstall")
    +	DistributedVirtualSwitchProductSpecOperationTypeUpgrade                = DistributedVirtualSwitchProductSpecOperationType("upgrade")
    +	DistributedVirtualSwitchProductSpecOperationTypeNotifyAvailableUpgrade = DistributedVirtualSwitchProductSpecOperationType("notifyAvailableUpgrade")
    +	DistributedVirtualSwitchProductSpecOperationTypeProceedWithUpgrade     = DistributedVirtualSwitchProductSpecOperationType("proceedWithUpgrade")
    +	DistributedVirtualSwitchProductSpecOperationTypeUpdateBundleInfo       = DistributedVirtualSwitchProductSpecOperationType("updateBundleInfo")
    +)
    +
    +func init() {
    +	t["DistributedVirtualSwitchProductSpecOperationType"] = reflect.TypeOf((*DistributedVirtualSwitchProductSpecOperationType)(nil)).Elem()
    +}
    +
    +type DpmBehavior string
    +
    +const (
    +	DpmBehaviorManual    = DpmBehavior("manual")
    +	DpmBehaviorAutomated = DpmBehavior("automated")
    +)
    +
    +func init() {
    +	t["DpmBehavior"] = reflect.TypeOf((*DpmBehavior)(nil)).Elem()
    +}
    +
    +type DrsBehavior string
    +
    +const (
    +	DrsBehaviorManual             = DrsBehavior("manual")
    +	DrsBehaviorPartiallyAutomated = DrsBehavior("partiallyAutomated")
    +	DrsBehaviorFullyAutomated     = DrsBehavior("fullyAutomated")
    +)
    +
    +func init() {
    +	t["DrsBehavior"] = reflect.TypeOf((*DrsBehavior)(nil)).Elem()
    +}
    +
    +type DrsInjectorWorkloadCorrelationState string
    +
    +const (
    +	DrsInjectorWorkloadCorrelationStateCorrelated   = DrsInjectorWorkloadCorrelationState("Correlated")
    +	DrsInjectorWorkloadCorrelationStateUncorrelated = DrsInjectorWorkloadCorrelationState("Uncorrelated")
    +)
    +
    +func init() {
    +	t["DrsInjectorWorkloadCorrelationState"] = reflect.TypeOf((*DrsInjectorWorkloadCorrelationState)(nil)).Elem()
    +}
    +
    +type DrsRecommendationReasonCode string
    +
    +const (
    +	DrsRecommendationReasonCodeFairnessCpuAvg = DrsRecommendationReasonCode("fairnessCpuAvg")
    +	DrsRecommendationReasonCodeFairnessMemAvg = DrsRecommendationReasonCode("fairnessMemAvg")
    +	DrsRecommendationReasonCodeJointAffin     = DrsRecommendationReasonCode("jointAffin")
    +	DrsRecommendationReasonCodeAntiAffin      = DrsRecommendationReasonCode("antiAffin")
    +	DrsRecommendationReasonCodeHostMaint      = DrsRecommendationReasonCode("hostMaint")
    +)
    +
    +func init() {
    +	t["DrsRecommendationReasonCode"] = reflect.TypeOf((*DrsRecommendationReasonCode)(nil)).Elem()
    +}
    +
    +type DvsEventPortBlockState string
    +
    +const (
    +	DvsEventPortBlockStateUnset     = DvsEventPortBlockState("unset")
    +	DvsEventPortBlockStateBlocked   = DvsEventPortBlockState("blocked")
    +	DvsEventPortBlockStateUnblocked = DvsEventPortBlockState("unblocked")
    +	DvsEventPortBlockStateUnknown   = DvsEventPortBlockState("unknown")
    +)
    +
    +func init() {
    +	t["DvsEventPortBlockState"] = reflect.TypeOf((*DvsEventPortBlockState)(nil)).Elem()
    +}
    +
    +type DvsFilterOnFailure string
    +
    +const (
    +	DvsFilterOnFailureFailOpen   = DvsFilterOnFailure("failOpen")
    +	DvsFilterOnFailureFailClosed = DvsFilterOnFailure("failClosed")
    +)
    +
    +func init() {
    +	t["DvsFilterOnFailure"] = reflect.TypeOf((*DvsFilterOnFailure)(nil)).Elem()
    +}
    +
    +type DvsNetworkRuleDirectionType string
    +
    +const (
    +	DvsNetworkRuleDirectionTypeIncomingPackets = DvsNetworkRuleDirectionType("incomingPackets")
    +	DvsNetworkRuleDirectionTypeOutgoingPackets = DvsNetworkRuleDirectionType("outgoingPackets")
    +	DvsNetworkRuleDirectionTypeBoth            = DvsNetworkRuleDirectionType("both")
    +)
    +
    +func init() {
    +	t["DvsNetworkRuleDirectionType"] = reflect.TypeOf((*DvsNetworkRuleDirectionType)(nil)).Elem()
    +}
    +
    +type EntityImportType string
    +
    +const (
    +	EntityImportTypeCreateEntityWithNewIdentifier      = EntityImportType("createEntityWithNewIdentifier")
    +	EntityImportTypeCreateEntityWithOriginalIdentifier = EntityImportType("createEntityWithOriginalIdentifier")
    +	EntityImportTypeApplyToEntitySpecified             = EntityImportType("applyToEntitySpecified")
    +)
    +
    +func init() {
    +	t["EntityImportType"] = reflect.TypeOf((*EntityImportType)(nil)).Elem()
    +}
    +
    +type EntityType string
    +
    +const (
    +	EntityTypeDistributedVirtualSwitch    = EntityType("distributedVirtualSwitch")
    +	EntityTypeDistributedVirtualPortgroup = EntityType("distributedVirtualPortgroup")
    +)
    +
    +func init() {
    +	t["EntityType"] = reflect.TypeOf((*EntityType)(nil)).Elem()
    +}
    +
    +type EventAlarmExpressionComparisonOperator string
    +
    +const (
    +	EventAlarmExpressionComparisonOperatorEquals           = EventAlarmExpressionComparisonOperator("equals")
    +	EventAlarmExpressionComparisonOperatorNotEqualTo       = EventAlarmExpressionComparisonOperator("notEqualTo")
    +	EventAlarmExpressionComparisonOperatorStartsWith       = EventAlarmExpressionComparisonOperator("startsWith")
    +	EventAlarmExpressionComparisonOperatorDoesNotStartWith = EventAlarmExpressionComparisonOperator("doesNotStartWith")
    +	EventAlarmExpressionComparisonOperatorEndsWith         = EventAlarmExpressionComparisonOperator("endsWith")
    +	EventAlarmExpressionComparisonOperatorDoesNotEndWith   = EventAlarmExpressionComparisonOperator("doesNotEndWith")
    +)
    +
    +func init() {
    +	t["EventAlarmExpressionComparisonOperator"] = reflect.TypeOf((*EventAlarmExpressionComparisonOperator)(nil)).Elem()
    +}
    +
    +type EventCategory string
    +
    +const (
    +	EventCategoryInfo    = EventCategory("info")
    +	EventCategoryWarning = EventCategory("warning")
    +	EventCategoryError   = EventCategory("error")
    +	EventCategoryUser    = EventCategory("user")
    +)
    +
    +func init() {
    +	t["EventCategory"] = reflect.TypeOf((*EventCategory)(nil)).Elem()
    +}
    +
    +type EventEventSeverity string
    +
    +const (
    +	EventEventSeverityError   = EventEventSeverity("error")
    +	EventEventSeverityWarning = EventEventSeverity("warning")
    +	EventEventSeverityInfo    = EventEventSeverity("info")
    +	EventEventSeverityUser    = EventEventSeverity("user")
    +)
    +
    +func init() {
    +	t["EventEventSeverity"] = reflect.TypeOf((*EventEventSeverity)(nil)).Elem()
    +}
    +
    +type EventFilterSpecRecursionOption string
    +
    +const (
    +	EventFilterSpecRecursionOptionSelf     = EventFilterSpecRecursionOption("self")
    +	EventFilterSpecRecursionOptionChildren = EventFilterSpecRecursionOption("children")
    +	EventFilterSpecRecursionOptionAll      = EventFilterSpecRecursionOption("all")
    +)
    +
    +func init() {
    +	t["EventFilterSpecRecursionOption"] = reflect.TypeOf((*EventFilterSpecRecursionOption)(nil)).Elem()
    +}
    +
    +type FibreChannelPortType string
    +
    +const (
    +	FibreChannelPortTypeFabric       = FibreChannelPortType("fabric")
    +	FibreChannelPortTypeLoop         = FibreChannelPortType("loop")
    +	FibreChannelPortTypePointToPoint = FibreChannelPortType("pointToPoint")
    +	FibreChannelPortTypeUnknown      = FibreChannelPortType("unknown")
    +)
    +
    +func init() {
    +	t["FibreChannelPortType"] = reflect.TypeOf((*FibreChannelPortType)(nil)).Elem()
    +}
    +
    +type FileSystemMountInfoVStorageSupportStatus string
    +
    +const (
    +	FileSystemMountInfoVStorageSupportStatusVStorageSupported   = FileSystemMountInfoVStorageSupportStatus("vStorageSupported")
    +	FileSystemMountInfoVStorageSupportStatusVStorageUnsupported = FileSystemMountInfoVStorageSupportStatus("vStorageUnsupported")
    +	FileSystemMountInfoVStorageSupportStatusVStorageUnknown     = FileSystemMountInfoVStorageSupportStatus("vStorageUnknown")
    +)
    +
    +func init() {
    +	t["FileSystemMountInfoVStorageSupportStatus"] = reflect.TypeOf((*FileSystemMountInfoVStorageSupportStatus)(nil)).Elem()
    +}
    +
    +type FtIssuesOnHostHostSelectionType string
    +
    +const (
    +	FtIssuesOnHostHostSelectionTypeUser = FtIssuesOnHostHostSelectionType("user")
    +	FtIssuesOnHostHostSelectionTypeVc   = FtIssuesOnHostHostSelectionType("vc")
    +	FtIssuesOnHostHostSelectionTypeDrs  = FtIssuesOnHostHostSelectionType("drs")
    +)
    +
    +func init() {
    +	t["FtIssuesOnHostHostSelectionType"] = reflect.TypeOf((*FtIssuesOnHostHostSelectionType)(nil)).Elem()
    +}
    +
    +type GuestFileType string
    +
    +const (
    +	GuestFileTypeFile      = GuestFileType("file")
    +	GuestFileTypeDirectory = GuestFileType("directory")
    +	GuestFileTypeSymlink   = GuestFileType("symlink")
    +)
    +
    +func init() {
    +	t["GuestFileType"] = reflect.TypeOf((*GuestFileType)(nil)).Elem()
    +}
    +
    +type GuestInfoAppStateType string
    +
    +const (
    +	GuestInfoAppStateTypeNone              = GuestInfoAppStateType("none")
    +	GuestInfoAppStateTypeAppStateOk        = GuestInfoAppStateType("appStateOk")
    +	GuestInfoAppStateTypeAppStateNeedReset = GuestInfoAppStateType("appStateNeedReset")
    +)
    +
    +func init() {
    +	t["GuestInfoAppStateType"] = reflect.TypeOf((*GuestInfoAppStateType)(nil)).Elem()
    +}
    +
    +type GuestOsDescriptorFirmwareType string
    +
    +const (
    +	GuestOsDescriptorFirmwareTypeBios = GuestOsDescriptorFirmwareType("bios")
    +	GuestOsDescriptorFirmwareTypeEfi  = GuestOsDescriptorFirmwareType("efi")
    +)
    +
    +func init() {
    +	t["GuestOsDescriptorFirmwareType"] = reflect.TypeOf((*GuestOsDescriptorFirmwareType)(nil)).Elem()
    +}
    +
    +type GuestOsDescriptorSupportLevel string
    +
    +const (
    +	GuestOsDescriptorSupportLevelExperimental = GuestOsDescriptorSupportLevel("experimental")
    +	GuestOsDescriptorSupportLevelLegacy       = GuestOsDescriptorSupportLevel("legacy")
    +	GuestOsDescriptorSupportLevelTerminated   = GuestOsDescriptorSupportLevel("terminated")
    +	GuestOsDescriptorSupportLevelSupported    = GuestOsDescriptorSupportLevel("supported")
    +	GuestOsDescriptorSupportLevelUnsupported  = GuestOsDescriptorSupportLevel("unsupported")
    +	GuestOsDescriptorSupportLevelDeprecated   = GuestOsDescriptorSupportLevel("deprecated")
    +	GuestOsDescriptorSupportLevelTechPreview  = GuestOsDescriptorSupportLevel("techPreview")
    +)
    +
    +func init() {
    +	t["GuestOsDescriptorSupportLevel"] = reflect.TypeOf((*GuestOsDescriptorSupportLevel)(nil)).Elem()
    +}
    +
    +type GuestRegKeyWowSpec string
    +
    +const (
    +	GuestRegKeyWowSpecWOWNative = GuestRegKeyWowSpec("WOWNative")
    +	GuestRegKeyWowSpecWOW32     = GuestRegKeyWowSpec("WOW32")
    +	GuestRegKeyWowSpecWOW64     = GuestRegKeyWowSpec("WOW64")
    +)
    +
    +func init() {
    +	t["GuestRegKeyWowSpec"] = reflect.TypeOf((*GuestRegKeyWowSpec)(nil)).Elem()
    +}
    +
    +type HealthUpdateInfoComponentType string
    +
    +const (
    +	HealthUpdateInfoComponentTypeMemory  = HealthUpdateInfoComponentType("Memory")
    +	HealthUpdateInfoComponentTypePower   = HealthUpdateInfoComponentType("Power")
    +	HealthUpdateInfoComponentTypeFan     = HealthUpdateInfoComponentType("Fan")
    +	HealthUpdateInfoComponentTypeNetwork = HealthUpdateInfoComponentType("Network")
    +	HealthUpdateInfoComponentTypeStorage = HealthUpdateInfoComponentType("Storage")
    +)
    +
    +func init() {
    +	t["HealthUpdateInfoComponentType"] = reflect.TypeOf((*HealthUpdateInfoComponentType)(nil)).Elem()
    +}
    +
    +type HostAccessMode string
    +
    +const (
    +	HostAccessModeAccessNone     = HostAccessMode("accessNone")
    +	HostAccessModeAccessAdmin    = HostAccessMode("accessAdmin")
    +	HostAccessModeAccessNoAccess = HostAccessMode("accessNoAccess")
    +	HostAccessModeAccessReadOnly = HostAccessMode("accessReadOnly")
    +	HostAccessModeAccessOther    = HostAccessMode("accessOther")
    +)
    +
    +func init() {
    +	t["HostAccessMode"] = reflect.TypeOf((*HostAccessMode)(nil)).Elem()
    +}
    +
    +type HostActiveDirectoryAuthenticationCertificateDigest string
    +
    +const (
    +	HostActiveDirectoryAuthenticationCertificateDigestSHA1 = HostActiveDirectoryAuthenticationCertificateDigest("SHA1")
    +)
    +
    +func init() {
    +	t["HostActiveDirectoryAuthenticationCertificateDigest"] = reflect.TypeOf((*HostActiveDirectoryAuthenticationCertificateDigest)(nil)).Elem()
    +}
    +
    +type HostActiveDirectoryInfoDomainMembershipStatus string
    +
    +const (
    +	HostActiveDirectoryInfoDomainMembershipStatusUnknown           = HostActiveDirectoryInfoDomainMembershipStatus("unknown")
    +	HostActiveDirectoryInfoDomainMembershipStatusOk                = HostActiveDirectoryInfoDomainMembershipStatus("ok")
    +	HostActiveDirectoryInfoDomainMembershipStatusNoServers         = HostActiveDirectoryInfoDomainMembershipStatus("noServers")
    +	HostActiveDirectoryInfoDomainMembershipStatusClientTrustBroken = HostActiveDirectoryInfoDomainMembershipStatus("clientTrustBroken")
    +	HostActiveDirectoryInfoDomainMembershipStatusServerTrustBroken = HostActiveDirectoryInfoDomainMembershipStatus("serverTrustBroken")
    +	HostActiveDirectoryInfoDomainMembershipStatusInconsistentTrust = HostActiveDirectoryInfoDomainMembershipStatus("inconsistentTrust")
    +	HostActiveDirectoryInfoDomainMembershipStatusOtherProblem      = HostActiveDirectoryInfoDomainMembershipStatus("otherProblem")
    +)
    +
    +func init() {
    +	t["HostActiveDirectoryInfoDomainMembershipStatus"] = reflect.TypeOf((*HostActiveDirectoryInfoDomainMembershipStatus)(nil)).Elem()
    +}
    +
    +type HostCapabilityFtUnsupportedReason string
    +
    +const (
    +	HostCapabilityFtUnsupportedReasonVMotionNotLicensed  = HostCapabilityFtUnsupportedReason("vMotionNotLicensed")
    +	HostCapabilityFtUnsupportedReasonMissingVMotionNic   = HostCapabilityFtUnsupportedReason("missingVMotionNic")
    +	HostCapabilityFtUnsupportedReasonMissingFTLoggingNic = HostCapabilityFtUnsupportedReason("missingFTLoggingNic")
    +	HostCapabilityFtUnsupportedReasonFtNotLicensed       = HostCapabilityFtUnsupportedReason("ftNotLicensed")
    +	HostCapabilityFtUnsupportedReasonHaAgentIssue        = HostCapabilityFtUnsupportedReason("haAgentIssue")
    +	HostCapabilityFtUnsupportedReasonUnsupportedProduct  = HostCapabilityFtUnsupportedReason("unsupportedProduct")
    +	HostCapabilityFtUnsupportedReasonCpuHvUnsupported    = HostCapabilityFtUnsupportedReason("cpuHvUnsupported")
    +	HostCapabilityFtUnsupportedReasonCpuHwmmuUnsupported = HostCapabilityFtUnsupportedReason("cpuHwmmuUnsupported")
    +	HostCapabilityFtUnsupportedReasonCpuHvDisabled       = HostCapabilityFtUnsupportedReason("cpuHvDisabled")
    +)
    +
    +func init() {
    +	t["HostCapabilityFtUnsupportedReason"] = reflect.TypeOf((*HostCapabilityFtUnsupportedReason)(nil)).Elem()
    +}
    +
    +type HostCapabilityUnmapMethodSupported string
    +
    +const (
    +	HostCapabilityUnmapMethodSupportedPriority = HostCapabilityUnmapMethodSupported("priority")
    +	HostCapabilityUnmapMethodSupportedFixed    = HostCapabilityUnmapMethodSupported("fixed")
    +	HostCapabilityUnmapMethodSupportedDynamic  = HostCapabilityUnmapMethodSupported("dynamic")
    +)
    +
    +func init() {
    +	t["HostCapabilityUnmapMethodSupported"] = reflect.TypeOf((*HostCapabilityUnmapMethodSupported)(nil)).Elem()
    +}
    +
    +type HostCapabilityVmDirectPathGen2UnsupportedReason string
    +
    +const (
    +	HostCapabilityVmDirectPathGen2UnsupportedReasonHostNptIncompatibleProduct  = HostCapabilityVmDirectPathGen2UnsupportedReason("hostNptIncompatibleProduct")
    +	HostCapabilityVmDirectPathGen2UnsupportedReasonHostNptIncompatibleHardware = HostCapabilityVmDirectPathGen2UnsupportedReason("hostNptIncompatibleHardware")
    +	HostCapabilityVmDirectPathGen2UnsupportedReasonHostNptDisabled             = HostCapabilityVmDirectPathGen2UnsupportedReason("hostNptDisabled")
    +)
    +
    +func init() {
    +	t["HostCapabilityVmDirectPathGen2UnsupportedReason"] = reflect.TypeOf((*HostCapabilityVmDirectPathGen2UnsupportedReason)(nil)).Elem()
    +}
    +
    +type HostCertificateManagerCertificateInfoCertificateStatus string
    +
    +const (
    +	HostCertificateManagerCertificateInfoCertificateStatusUnknown            = HostCertificateManagerCertificateInfoCertificateStatus("unknown")
    +	HostCertificateManagerCertificateInfoCertificateStatusExpired            = HostCertificateManagerCertificateInfoCertificateStatus("expired")
    +	HostCertificateManagerCertificateInfoCertificateStatusExpiring           = HostCertificateManagerCertificateInfoCertificateStatus("expiring")
    +	HostCertificateManagerCertificateInfoCertificateStatusExpiringShortly    = HostCertificateManagerCertificateInfoCertificateStatus("expiringShortly")
    +	HostCertificateManagerCertificateInfoCertificateStatusExpirationImminent = HostCertificateManagerCertificateInfoCertificateStatus("expirationImminent")
    +	HostCertificateManagerCertificateInfoCertificateStatusGood               = HostCertificateManagerCertificateInfoCertificateStatus("good")
    +)
    +
    +func init() {
    +	t["HostCertificateManagerCertificateInfoCertificateStatus"] = reflect.TypeOf((*HostCertificateManagerCertificateInfoCertificateStatus)(nil)).Elem()
    +}
    +
    +type HostConfigChangeMode string
    +
    +const (
    +	HostConfigChangeModeModify  = HostConfigChangeMode("modify")
    +	HostConfigChangeModeReplace = HostConfigChangeMode("replace")
    +)
    +
    +func init() {
    +	t["HostConfigChangeMode"] = reflect.TypeOf((*HostConfigChangeMode)(nil)).Elem()
    +}
    +
    +type HostConfigChangeOperation string
    +
    +const (
    +	HostConfigChangeOperationAdd    = HostConfigChangeOperation("add")
    +	HostConfigChangeOperationRemove = HostConfigChangeOperation("remove")
    +	HostConfigChangeOperationEdit   = HostConfigChangeOperation("edit")
    +	HostConfigChangeOperationIgnore = HostConfigChangeOperation("ignore")
    +)
    +
    +func init() {
    +	t["HostConfigChangeOperation"] = reflect.TypeOf((*HostConfigChangeOperation)(nil)).Elem()
    +}
    +
    +type HostCpuPackageVendor string
    +
    +const (
    +	HostCpuPackageVendorUnknown = HostCpuPackageVendor("unknown")
    +	HostCpuPackageVendorIntel   = HostCpuPackageVendor("intel")
    +	HostCpuPackageVendorAmd     = HostCpuPackageVendor("amd")
    +)
    +
    +func init() {
    +	t["HostCpuPackageVendor"] = reflect.TypeOf((*HostCpuPackageVendor)(nil)).Elem()
    +}
    +
    +type HostCpuPowerManagementInfoPolicyType string
    +
    +const (
    +	HostCpuPowerManagementInfoPolicyTypeOff           = HostCpuPowerManagementInfoPolicyType("off")
    +	HostCpuPowerManagementInfoPolicyTypeStaticPolicy  = HostCpuPowerManagementInfoPolicyType("staticPolicy")
    +	HostCpuPowerManagementInfoPolicyTypeDynamicPolicy = HostCpuPowerManagementInfoPolicyType("dynamicPolicy")
    +)
    +
    +func init() {
    +	t["HostCpuPowerManagementInfoPolicyType"] = reflect.TypeOf((*HostCpuPowerManagementInfoPolicyType)(nil)).Elem()
    +}
    +
    +type HostCryptoState string
    +
    +const (
    +	HostCryptoStateIncapable = HostCryptoState("incapable")
    +	HostCryptoStatePrepared  = HostCryptoState("prepared")
    +	HostCryptoStateSafe      = HostCryptoState("safe")
    +)
    +
    +func init() {
    +	t["HostCryptoState"] = reflect.TypeOf((*HostCryptoState)(nil)).Elem()
    +}
    +
    +type HostDasErrorEventHostDasErrorReason string
    +
    +const (
    +	HostDasErrorEventHostDasErrorReasonConfigFailed               = HostDasErrorEventHostDasErrorReason("configFailed")
    +	HostDasErrorEventHostDasErrorReasonTimeout                    = HostDasErrorEventHostDasErrorReason("timeout")
    +	HostDasErrorEventHostDasErrorReasonCommunicationInitFailed    = HostDasErrorEventHostDasErrorReason("communicationInitFailed")
    +	HostDasErrorEventHostDasErrorReasonHealthCheckScriptFailed    = HostDasErrorEventHostDasErrorReason("healthCheckScriptFailed")
    +	HostDasErrorEventHostDasErrorReasonAgentFailed                = HostDasErrorEventHostDasErrorReason("agentFailed")
    +	HostDasErrorEventHostDasErrorReasonAgentShutdown              = HostDasErrorEventHostDasErrorReason("agentShutdown")
    +	HostDasErrorEventHostDasErrorReasonIsolationAddressUnpingable = HostDasErrorEventHostDasErrorReason("isolationAddressUnpingable")
    +	HostDasErrorEventHostDasErrorReasonOther                      = HostDasErrorEventHostDasErrorReason("other")
    +)
    +
    +func init() {
    +	t["HostDasErrorEventHostDasErrorReason"] = reflect.TypeOf((*HostDasErrorEventHostDasErrorReason)(nil)).Elem()
    +}
    +
    +type HostDigestInfoDigestMethodType string
    +
    +const (
    +	HostDigestInfoDigestMethodTypeSHA1    = HostDigestInfoDigestMethodType("SHA1")
    +	HostDigestInfoDigestMethodTypeMD5     = HostDigestInfoDigestMethodType("MD5")
    +	HostDigestInfoDigestMethodTypeSHA256  = HostDigestInfoDigestMethodType("SHA256")
    +	HostDigestInfoDigestMethodTypeSHA384  = HostDigestInfoDigestMethodType("SHA384")
    +	HostDigestInfoDigestMethodTypeSHA512  = HostDigestInfoDigestMethodType("SHA512")
    +	HostDigestInfoDigestMethodTypeSM3_256 = HostDigestInfoDigestMethodType("SM3_256")
    +)
    +
    +func init() {
    +	t["HostDigestInfoDigestMethodType"] = reflect.TypeOf((*HostDigestInfoDigestMethodType)(nil)).Elem()
    +}
    +
    +type HostDisconnectedEventReasonCode string
    +
    +const (
    +	HostDisconnectedEventReasonCodeSslThumbprintVerifyFailed = HostDisconnectedEventReasonCode("sslThumbprintVerifyFailed")
    +	HostDisconnectedEventReasonCodeLicenseExpired            = HostDisconnectedEventReasonCode("licenseExpired")
    +	HostDisconnectedEventReasonCodeAgentUpgrade              = HostDisconnectedEventReasonCode("agentUpgrade")
    +	HostDisconnectedEventReasonCodeUserRequest               = HostDisconnectedEventReasonCode("userRequest")
    +	HostDisconnectedEventReasonCodeInsufficientLicenses      = HostDisconnectedEventReasonCode("insufficientLicenses")
    +	HostDisconnectedEventReasonCodeAgentOutOfDate            = HostDisconnectedEventReasonCode("agentOutOfDate")
    +	HostDisconnectedEventReasonCodePasswordDecryptFailure    = HostDisconnectedEventReasonCode("passwordDecryptFailure")
    +	HostDisconnectedEventReasonCodeUnknown                   = HostDisconnectedEventReasonCode("unknown")
    +	HostDisconnectedEventReasonCodeVcVRAMCapacityExceeded    = HostDisconnectedEventReasonCode("vcVRAMCapacityExceeded")
    +)
    +
    +func init() {
    +	t["HostDisconnectedEventReasonCode"] = reflect.TypeOf((*HostDisconnectedEventReasonCode)(nil)).Elem()
    +}
    +
    +type HostDiskPartitionInfoPartitionFormat string
    +
    +const (
    +	HostDiskPartitionInfoPartitionFormatGpt     = HostDiskPartitionInfoPartitionFormat("gpt")
    +	HostDiskPartitionInfoPartitionFormatMbr     = HostDiskPartitionInfoPartitionFormat("mbr")
    +	HostDiskPartitionInfoPartitionFormatUnknown = HostDiskPartitionInfoPartitionFormat("unknown")
    +)
    +
    +func init() {
    +	t["HostDiskPartitionInfoPartitionFormat"] = reflect.TypeOf((*HostDiskPartitionInfoPartitionFormat)(nil)).Elem()
    +}
    +
    +type HostDiskPartitionInfoType string
    +
    +const (
    +	HostDiskPartitionInfoTypeNone          = HostDiskPartitionInfoType("none")
    +	HostDiskPartitionInfoTypeVmfs          = HostDiskPartitionInfoType("vmfs")
    +	HostDiskPartitionInfoTypeLinuxNative   = HostDiskPartitionInfoType("linuxNative")
    +	HostDiskPartitionInfoTypeLinuxSwap     = HostDiskPartitionInfoType("linuxSwap")
    +	HostDiskPartitionInfoTypeExtended      = HostDiskPartitionInfoType("extended")
    +	HostDiskPartitionInfoTypeNtfs          = HostDiskPartitionInfoType("ntfs")
    +	HostDiskPartitionInfoTypeVmkDiagnostic = HostDiskPartitionInfoType("vmkDiagnostic")
    +	HostDiskPartitionInfoTypeVffs          = HostDiskPartitionInfoType("vffs")
    +)
    +
    +func init() {
    +	t["HostDiskPartitionInfoType"] = reflect.TypeOf((*HostDiskPartitionInfoType)(nil)).Elem()
    +}
    +
    +type HostFeatureVersionKey string
    +
    +const (
    +	HostFeatureVersionKeyFaultTolerance = HostFeatureVersionKey("faultTolerance")
    +)
    +
    +func init() {
    +	t["HostFeatureVersionKey"] = reflect.TypeOf((*HostFeatureVersionKey)(nil)).Elem()
    +}
    +
    +type HostFileSystemVolumeFileSystemType string
    +
    +const (
    +	HostFileSystemVolumeFileSystemTypeVMFS  = HostFileSystemVolumeFileSystemType("VMFS")
    +	HostFileSystemVolumeFileSystemTypeNFS   = HostFileSystemVolumeFileSystemType("NFS")
    +	HostFileSystemVolumeFileSystemTypeNFS41 = HostFileSystemVolumeFileSystemType("NFS41")
    +	HostFileSystemVolumeFileSystemTypeCIFS  = HostFileSystemVolumeFileSystemType("CIFS")
    +	HostFileSystemVolumeFileSystemTypeVsan  = HostFileSystemVolumeFileSystemType("vsan")
    +	HostFileSystemVolumeFileSystemTypeVFFS  = HostFileSystemVolumeFileSystemType("VFFS")
    +	HostFileSystemVolumeFileSystemTypeVVOL  = HostFileSystemVolumeFileSystemType("VVOL")
    +	HostFileSystemVolumeFileSystemTypePMEM  = HostFileSystemVolumeFileSystemType("PMEM")
    +	HostFileSystemVolumeFileSystemTypeOTHER = HostFileSystemVolumeFileSystemType("OTHER")
    +)
    +
    +func init() {
    +	t["HostFileSystemVolumeFileSystemType"] = reflect.TypeOf((*HostFileSystemVolumeFileSystemType)(nil)).Elem()
    +}
    +
    +type HostFirewallRuleDirection string
    +
    +const (
    +	HostFirewallRuleDirectionInbound  = HostFirewallRuleDirection("inbound")
    +	HostFirewallRuleDirectionOutbound = HostFirewallRuleDirection("outbound")
    +)
    +
    +func init() {
    +	t["HostFirewallRuleDirection"] = reflect.TypeOf((*HostFirewallRuleDirection)(nil)).Elem()
    +}
    +
    +type HostFirewallRulePortType string
    +
    +const (
    +	HostFirewallRulePortTypeSrc = HostFirewallRulePortType("src")
    +	HostFirewallRulePortTypeDst = HostFirewallRulePortType("dst")
    +)
    +
    +func init() {
    +	t["HostFirewallRulePortType"] = reflect.TypeOf((*HostFirewallRulePortType)(nil)).Elem()
    +}
    +
    +type HostFirewallRuleProtocol string
    +
    +const (
    +	HostFirewallRuleProtocolTcp = HostFirewallRuleProtocol("tcp")
    +	HostFirewallRuleProtocolUdp = HostFirewallRuleProtocol("udp")
    +)
    +
    +func init() {
    +	t["HostFirewallRuleProtocol"] = reflect.TypeOf((*HostFirewallRuleProtocol)(nil)).Elem()
    +}
    +
    +type HostGraphicsConfigGraphicsType string
    +
    +const (
    +	HostGraphicsConfigGraphicsTypeShared       = HostGraphicsConfigGraphicsType("shared")
    +	HostGraphicsConfigGraphicsTypeSharedDirect = HostGraphicsConfigGraphicsType("sharedDirect")
    +)
    +
    +func init() {
    +	t["HostGraphicsConfigGraphicsType"] = reflect.TypeOf((*HostGraphicsConfigGraphicsType)(nil)).Elem()
    +}
    +
    +type HostGraphicsConfigSharedPassthruAssignmentPolicy string
    +
    +const (
    +	HostGraphicsConfigSharedPassthruAssignmentPolicyPerformance   = HostGraphicsConfigSharedPassthruAssignmentPolicy("performance")
    +	HostGraphicsConfigSharedPassthruAssignmentPolicyConsolidation = HostGraphicsConfigSharedPassthruAssignmentPolicy("consolidation")
    +)
    +
    +func init() {
    +	t["HostGraphicsConfigSharedPassthruAssignmentPolicy"] = reflect.TypeOf((*HostGraphicsConfigSharedPassthruAssignmentPolicy)(nil)).Elem()
    +}
    +
    +type HostGraphicsInfoGraphicsType string
    +
    +const (
    +	HostGraphicsInfoGraphicsTypeBasic        = HostGraphicsInfoGraphicsType("basic")
    +	HostGraphicsInfoGraphicsTypeShared       = HostGraphicsInfoGraphicsType("shared")
    +	HostGraphicsInfoGraphicsTypeDirect       = HostGraphicsInfoGraphicsType("direct")
    +	HostGraphicsInfoGraphicsTypeSharedDirect = HostGraphicsInfoGraphicsType("sharedDirect")
    +)
    +
    +func init() {
    +	t["HostGraphicsInfoGraphicsType"] = reflect.TypeOf((*HostGraphicsInfoGraphicsType)(nil)).Elem()
    +}
    +
    +type HostHardwareElementStatus string
    +
    +const (
    +	HostHardwareElementStatusUnknown = HostHardwareElementStatus("Unknown")
    +	HostHardwareElementStatusGreen   = HostHardwareElementStatus("Green")
    +	HostHardwareElementStatusYellow  = HostHardwareElementStatus("Yellow")
    +	HostHardwareElementStatusRed     = HostHardwareElementStatus("Red")
    +)
    +
    +func init() {
    +	t["HostHardwareElementStatus"] = reflect.TypeOf((*HostHardwareElementStatus)(nil)).Elem()
    +}
    +
    +type HostHasComponentFailureHostComponentType string
    +
    +const (
    +	HostHasComponentFailureHostComponentTypeDatastore = HostHasComponentFailureHostComponentType("Datastore")
    +)
    +
    +func init() {
    +	t["HostHasComponentFailureHostComponentType"] = reflect.TypeOf((*HostHasComponentFailureHostComponentType)(nil)).Elem()
    +}
    +
    +type HostImageAcceptanceLevel string
    +
    +const (
    +	HostImageAcceptanceLevelVmware_certified = HostImageAcceptanceLevel("vmware_certified")
    +	HostImageAcceptanceLevelVmware_accepted  = HostImageAcceptanceLevel("vmware_accepted")
    +	HostImageAcceptanceLevelPartner          = HostImageAcceptanceLevel("partner")
    +	HostImageAcceptanceLevelCommunity        = HostImageAcceptanceLevel("community")
    +)
    +
    +func init() {
    +	t["HostImageAcceptanceLevel"] = reflect.TypeOf((*HostImageAcceptanceLevel)(nil)).Elem()
    +}
    +
    +type HostIncompatibleForFaultToleranceReason string
    +
    +const (
    +	HostIncompatibleForFaultToleranceReasonProduct   = HostIncompatibleForFaultToleranceReason("product")
    +	HostIncompatibleForFaultToleranceReasonProcessor = HostIncompatibleForFaultToleranceReason("processor")
    +)
    +
    +func init() {
    +	t["HostIncompatibleForFaultToleranceReason"] = reflect.TypeOf((*HostIncompatibleForFaultToleranceReason)(nil)).Elem()
    +}
    +
    +type HostIncompatibleForRecordReplayReason string
    +
    +const (
    +	HostIncompatibleForRecordReplayReasonProduct   = HostIncompatibleForRecordReplayReason("product")
    +	HostIncompatibleForRecordReplayReasonProcessor = HostIncompatibleForRecordReplayReason("processor")
    +)
    +
    +func init() {
    +	t["HostIncompatibleForRecordReplayReason"] = reflect.TypeOf((*HostIncompatibleForRecordReplayReason)(nil)).Elem()
    +}
    +
    +type HostInternetScsiHbaChapAuthenticationType string
    +
    +const (
    +	HostInternetScsiHbaChapAuthenticationTypeChapProhibited  = HostInternetScsiHbaChapAuthenticationType("chapProhibited")
    +	HostInternetScsiHbaChapAuthenticationTypeChapDiscouraged = HostInternetScsiHbaChapAuthenticationType("chapDiscouraged")
    +	HostInternetScsiHbaChapAuthenticationTypeChapPreferred   = HostInternetScsiHbaChapAuthenticationType("chapPreferred")
    +	HostInternetScsiHbaChapAuthenticationTypeChapRequired    = HostInternetScsiHbaChapAuthenticationType("chapRequired")
    +)
    +
    +func init() {
    +	t["HostInternetScsiHbaChapAuthenticationType"] = reflect.TypeOf((*HostInternetScsiHbaChapAuthenticationType)(nil)).Elem()
    +}
    +
    +type HostInternetScsiHbaDigestType string
    +
    +const (
    +	HostInternetScsiHbaDigestTypeDigestProhibited  = HostInternetScsiHbaDigestType("digestProhibited")
    +	HostInternetScsiHbaDigestTypeDigestDiscouraged = HostInternetScsiHbaDigestType("digestDiscouraged")
    +	HostInternetScsiHbaDigestTypeDigestPreferred   = HostInternetScsiHbaDigestType("digestPreferred")
    +	HostInternetScsiHbaDigestTypeDigestRequired    = HostInternetScsiHbaDigestType("digestRequired")
    +)
    +
    +func init() {
    +	t["HostInternetScsiHbaDigestType"] = reflect.TypeOf((*HostInternetScsiHbaDigestType)(nil)).Elem()
    +}
    +
    +type HostInternetScsiHbaIscsiIpv6AddressAddressConfigurationType string
    +
    +const (
    +	HostInternetScsiHbaIscsiIpv6AddressAddressConfigurationTypeDHCP           = HostInternetScsiHbaIscsiIpv6AddressAddressConfigurationType("DHCP")
    +	HostInternetScsiHbaIscsiIpv6AddressAddressConfigurationTypeAutoConfigured = HostInternetScsiHbaIscsiIpv6AddressAddressConfigurationType("AutoConfigured")
    +	HostInternetScsiHbaIscsiIpv6AddressAddressConfigurationTypeStatic         = HostInternetScsiHbaIscsiIpv6AddressAddressConfigurationType("Static")
    +	HostInternetScsiHbaIscsiIpv6AddressAddressConfigurationTypeOther          = HostInternetScsiHbaIscsiIpv6AddressAddressConfigurationType("Other")
    +)
    +
    +func init() {
    +	t["HostInternetScsiHbaIscsiIpv6AddressAddressConfigurationType"] = reflect.TypeOf((*HostInternetScsiHbaIscsiIpv6AddressAddressConfigurationType)(nil)).Elem()
    +}
    +
    +type HostInternetScsiHbaIscsiIpv6AddressIPv6AddressOperation string
    +
    +const (
    +	HostInternetScsiHbaIscsiIpv6AddressIPv6AddressOperationAdd    = HostInternetScsiHbaIscsiIpv6AddressIPv6AddressOperation("add")
    +	HostInternetScsiHbaIscsiIpv6AddressIPv6AddressOperationRemove = HostInternetScsiHbaIscsiIpv6AddressIPv6AddressOperation("remove")
    +)
    +
    +func init() {
    +	t["HostInternetScsiHbaIscsiIpv6AddressIPv6AddressOperation"] = reflect.TypeOf((*HostInternetScsiHbaIscsiIpv6AddressIPv6AddressOperation)(nil)).Elem()
    +}
    +
    +type HostInternetScsiHbaNetworkBindingSupportType string
    +
    +const (
    +	HostInternetScsiHbaNetworkBindingSupportTypeNotsupported = HostInternetScsiHbaNetworkBindingSupportType("notsupported")
    +	HostInternetScsiHbaNetworkBindingSupportTypeOptional     = HostInternetScsiHbaNetworkBindingSupportType("optional")
    +	HostInternetScsiHbaNetworkBindingSupportTypeRequired     = HostInternetScsiHbaNetworkBindingSupportType("required")
    +)
    +
    +func init() {
    +	t["HostInternetScsiHbaNetworkBindingSupportType"] = reflect.TypeOf((*HostInternetScsiHbaNetworkBindingSupportType)(nil)).Elem()
    +}
    +
    +type HostInternetScsiHbaStaticTargetTargetDiscoveryMethod string
    +
    +const (
    +	HostInternetScsiHbaStaticTargetTargetDiscoveryMethodStaticMethod     = HostInternetScsiHbaStaticTargetTargetDiscoveryMethod("staticMethod")
    +	HostInternetScsiHbaStaticTargetTargetDiscoveryMethodSendTargetMethod = HostInternetScsiHbaStaticTargetTargetDiscoveryMethod("sendTargetMethod")
    +	HostInternetScsiHbaStaticTargetTargetDiscoveryMethodSlpMethod        = HostInternetScsiHbaStaticTargetTargetDiscoveryMethod("slpMethod")
    +	HostInternetScsiHbaStaticTargetTargetDiscoveryMethodIsnsMethod       = HostInternetScsiHbaStaticTargetTargetDiscoveryMethod("isnsMethod")
    +	HostInternetScsiHbaStaticTargetTargetDiscoveryMethodUnknownMethod    = HostInternetScsiHbaStaticTargetTargetDiscoveryMethod("unknownMethod")
    +)
    +
    +func init() {
    +	t["HostInternetScsiHbaStaticTargetTargetDiscoveryMethod"] = reflect.TypeOf((*HostInternetScsiHbaStaticTargetTargetDiscoveryMethod)(nil)).Elem()
    +}
    +
    +type HostIpConfigIpV6AddressConfigType string
    +
    +const (
    +	HostIpConfigIpV6AddressConfigTypeOther     = HostIpConfigIpV6AddressConfigType("other")
    +	HostIpConfigIpV6AddressConfigTypeManual    = HostIpConfigIpV6AddressConfigType("manual")
    +	HostIpConfigIpV6AddressConfigTypeDhcp      = HostIpConfigIpV6AddressConfigType("dhcp")
    +	HostIpConfigIpV6AddressConfigTypeLinklayer = HostIpConfigIpV6AddressConfigType("linklayer")
    +	HostIpConfigIpV6AddressConfigTypeRandom    = HostIpConfigIpV6AddressConfigType("random")
    +)
    +
    +func init() {
    +	t["HostIpConfigIpV6AddressConfigType"] = reflect.TypeOf((*HostIpConfigIpV6AddressConfigType)(nil)).Elem()
    +}
    +
    +type HostIpConfigIpV6AddressStatus string
    +
    +const (
    +	HostIpConfigIpV6AddressStatusPreferred    = HostIpConfigIpV6AddressStatus("preferred")
    +	HostIpConfigIpV6AddressStatusDeprecated   = HostIpConfigIpV6AddressStatus("deprecated")
    +	HostIpConfigIpV6AddressStatusInvalid      = HostIpConfigIpV6AddressStatus("invalid")
    +	HostIpConfigIpV6AddressStatusInaccessible = HostIpConfigIpV6AddressStatus("inaccessible")
    +	HostIpConfigIpV6AddressStatusUnknown      = HostIpConfigIpV6AddressStatus("unknown")
    +	HostIpConfigIpV6AddressStatusTentative    = HostIpConfigIpV6AddressStatus("tentative")
    +	HostIpConfigIpV6AddressStatusDuplicate    = HostIpConfigIpV6AddressStatus("duplicate")
    +)
    +
    +func init() {
    +	t["HostIpConfigIpV6AddressStatus"] = reflect.TypeOf((*HostIpConfigIpV6AddressStatus)(nil)).Elem()
    +}
    +
    +type HostLicensableResourceKey string
    +
    +const (
    +	HostLicensableResourceKeyNumCpuPackages = HostLicensableResourceKey("numCpuPackages")
    +	HostLicensableResourceKeyNumCpuCores    = HostLicensableResourceKey("numCpuCores")
    +	HostLicensableResourceKeyMemorySize     = HostLicensableResourceKey("memorySize")
    +	HostLicensableResourceKeyMemoryForVms   = HostLicensableResourceKey("memoryForVms")
    +	HostLicensableResourceKeyNumVmsStarted  = HostLicensableResourceKey("numVmsStarted")
    +	HostLicensableResourceKeyNumVmsStarting = HostLicensableResourceKey("numVmsStarting")
    +)
    +
    +func init() {
    +	t["HostLicensableResourceKey"] = reflect.TypeOf((*HostLicensableResourceKey)(nil)).Elem()
    +}
    +
    +type HostLockdownMode string
    +
    +const (
    +	HostLockdownModeLockdownDisabled = HostLockdownMode("lockdownDisabled")
    +	HostLockdownModeLockdownNormal   = HostLockdownMode("lockdownNormal")
    +	HostLockdownModeLockdownStrict   = HostLockdownMode("lockdownStrict")
    +)
    +
    +func init() {
    +	t["HostLockdownMode"] = reflect.TypeOf((*HostLockdownMode)(nil)).Elem()
    +}
    +
    +type HostLowLevelProvisioningManagerFileType string
    +
    +const (
    +	HostLowLevelProvisioningManagerFileTypeFile        = HostLowLevelProvisioningManagerFileType("File")
    +	HostLowLevelProvisioningManagerFileTypeVirtualDisk = HostLowLevelProvisioningManagerFileType("VirtualDisk")
    +	HostLowLevelProvisioningManagerFileTypeDirectory   = HostLowLevelProvisioningManagerFileType("Directory")
    +)
    +
    +func init() {
    +	t["HostLowLevelProvisioningManagerFileType"] = reflect.TypeOf((*HostLowLevelProvisioningManagerFileType)(nil)).Elem()
    +}
    +
    +type HostLowLevelProvisioningManagerReloadTarget string
    +
    +const (
    +	HostLowLevelProvisioningManagerReloadTargetCurrentConfig  = HostLowLevelProvisioningManagerReloadTarget("currentConfig")
    +	HostLowLevelProvisioningManagerReloadTargetSnapshotConfig = HostLowLevelProvisioningManagerReloadTarget("snapshotConfig")
    +)
    +
    +func init() {
    +	t["HostLowLevelProvisioningManagerReloadTarget"] = reflect.TypeOf((*HostLowLevelProvisioningManagerReloadTarget)(nil)).Elem()
    +}
    +
    +type HostMountInfoInaccessibleReason string
    +
    +const (
    +	HostMountInfoInaccessibleReasonAllPathsDown_Start   = HostMountInfoInaccessibleReason("AllPathsDown_Start")
    +	HostMountInfoInaccessibleReasonAllPathsDown_Timeout = HostMountInfoInaccessibleReason("AllPathsDown_Timeout")
    +	HostMountInfoInaccessibleReasonPermanentDeviceLoss  = HostMountInfoInaccessibleReason("PermanentDeviceLoss")
    +)
    +
    +func init() {
    +	t["HostMountInfoInaccessibleReason"] = reflect.TypeOf((*HostMountInfoInaccessibleReason)(nil)).Elem()
    +}
    +
    +type HostMountMode string
    +
    +const (
    +	HostMountModeReadWrite = HostMountMode("readWrite")
    +	HostMountModeReadOnly  = HostMountMode("readOnly")
    +)
    +
    +func init() {
    +	t["HostMountMode"] = reflect.TypeOf((*HostMountMode)(nil)).Elem()
    +}
    +
    +type HostNasVolumeSecurityType string
    +
    +const (
    +	HostNasVolumeSecurityTypeAUTH_SYS  = HostNasVolumeSecurityType("AUTH_SYS")
    +	HostNasVolumeSecurityTypeSEC_KRB5  = HostNasVolumeSecurityType("SEC_KRB5")
    +	HostNasVolumeSecurityTypeSEC_KRB5I = HostNasVolumeSecurityType("SEC_KRB5I")
    +)
    +
    +func init() {
    +	t["HostNasVolumeSecurityType"] = reflect.TypeOf((*HostNasVolumeSecurityType)(nil)).Elem()
    +}
    +
    +type HostNetStackInstanceCongestionControlAlgorithmType string
    +
    +const (
    +	HostNetStackInstanceCongestionControlAlgorithmTypeNewreno = HostNetStackInstanceCongestionControlAlgorithmType("newreno")
    +	HostNetStackInstanceCongestionControlAlgorithmTypeCubic   = HostNetStackInstanceCongestionControlAlgorithmType("cubic")
    +)
    +
    +func init() {
    +	t["HostNetStackInstanceCongestionControlAlgorithmType"] = reflect.TypeOf((*HostNetStackInstanceCongestionControlAlgorithmType)(nil)).Elem()
    +}
    +
    +type HostNetStackInstanceSystemStackKey string
    +
    +const (
    +	HostNetStackInstanceSystemStackKeyDefaultTcpipStack   = HostNetStackInstanceSystemStackKey("defaultTcpipStack")
    +	HostNetStackInstanceSystemStackKeyVmotion             = HostNetStackInstanceSystemStackKey("vmotion")
    +	HostNetStackInstanceSystemStackKeyVSphereProvisioning = HostNetStackInstanceSystemStackKey("vSphereProvisioning")
    +)
    +
    +func init() {
    +	t["HostNetStackInstanceSystemStackKey"] = reflect.TypeOf((*HostNetStackInstanceSystemStackKey)(nil)).Elem()
    +}
    +
    +type HostNumericSensorHealthState string
    +
    +const (
    +	HostNumericSensorHealthStateUnknown = HostNumericSensorHealthState("unknown")
    +	HostNumericSensorHealthStateGreen   = HostNumericSensorHealthState("green")
    +	HostNumericSensorHealthStateYellow  = HostNumericSensorHealthState("yellow")
    +	HostNumericSensorHealthStateRed     = HostNumericSensorHealthState("red")
    +)
    +
    +func init() {
    +	t["HostNumericSensorHealthState"] = reflect.TypeOf((*HostNumericSensorHealthState)(nil)).Elem()
    +}
    +
    +type HostNumericSensorType string
    +
    +const (
    +	HostNumericSensorTypeFan         = HostNumericSensorType("fan")
    +	HostNumericSensorTypePower       = HostNumericSensorType("power")
    +	HostNumericSensorTypeTemperature = HostNumericSensorType("temperature")
    +	HostNumericSensorTypeVoltage     = HostNumericSensorType("voltage")
    +	HostNumericSensorTypeOther       = HostNumericSensorType("other")
    +	HostNumericSensorTypeProcessor   = HostNumericSensorType("processor")
    +	HostNumericSensorTypeMemory      = HostNumericSensorType("memory")
    +	HostNumericSensorTypeStorage     = HostNumericSensorType("storage")
    +	HostNumericSensorTypeSystemBoard = HostNumericSensorType("systemBoard")
    +	HostNumericSensorTypeBattery     = HostNumericSensorType("battery")
    +	HostNumericSensorTypeBios        = HostNumericSensorType("bios")
    +	HostNumericSensorTypeCable       = HostNumericSensorType("cable")
    +	HostNumericSensorTypeWatchdog    = HostNumericSensorType("watchdog")
    +)
    +
    +func init() {
    +	t["HostNumericSensorType"] = reflect.TypeOf((*HostNumericSensorType)(nil)).Elem()
    +}
    +
    +type HostOpaqueSwitchOpaqueSwitchState string
    +
    +const (
    +	HostOpaqueSwitchOpaqueSwitchStateUp      = HostOpaqueSwitchOpaqueSwitchState("up")
    +	HostOpaqueSwitchOpaqueSwitchStateWarning = HostOpaqueSwitchOpaqueSwitchState("warning")
    +	HostOpaqueSwitchOpaqueSwitchStateDown    = HostOpaqueSwitchOpaqueSwitchState("down")
    +)
    +
    +func init() {
    +	t["HostOpaqueSwitchOpaqueSwitchState"] = reflect.TypeOf((*HostOpaqueSwitchOpaqueSwitchState)(nil)).Elem()
    +}
    +
    +type HostPatchManagerInstallState string
    +
    +const (
    +	HostPatchManagerInstallStateHostRestarted = HostPatchManagerInstallState("hostRestarted")
    +	HostPatchManagerInstallStateImageActive   = HostPatchManagerInstallState("imageActive")
    +)
    +
    +func init() {
    +	t["HostPatchManagerInstallState"] = reflect.TypeOf((*HostPatchManagerInstallState)(nil)).Elem()
    +}
    +
    +type HostPatchManagerIntegrityStatus string
    +
    +const (
    +	HostPatchManagerIntegrityStatusValidated           = HostPatchManagerIntegrityStatus("validated")
    +	HostPatchManagerIntegrityStatusKeyNotFound         = HostPatchManagerIntegrityStatus("keyNotFound")
    +	HostPatchManagerIntegrityStatusKeyRevoked          = HostPatchManagerIntegrityStatus("keyRevoked")
    +	HostPatchManagerIntegrityStatusKeyExpired          = HostPatchManagerIntegrityStatus("keyExpired")
    +	HostPatchManagerIntegrityStatusDigestMismatch      = HostPatchManagerIntegrityStatus("digestMismatch")
    +	HostPatchManagerIntegrityStatusNotEnoughSignatures = HostPatchManagerIntegrityStatus("notEnoughSignatures")
    +	HostPatchManagerIntegrityStatusValidationError     = HostPatchManagerIntegrityStatus("validationError")
    +)
    +
    +func init() {
    +	t["HostPatchManagerIntegrityStatus"] = reflect.TypeOf((*HostPatchManagerIntegrityStatus)(nil)).Elem()
    +}
    +
    +type HostPatchManagerReason string
    +
    +const (
    +	HostPatchManagerReasonObsoleted         = HostPatchManagerReason("obsoleted")
    +	HostPatchManagerReasonMissingPatch      = HostPatchManagerReason("missingPatch")
    +	HostPatchManagerReasonMissingLib        = HostPatchManagerReason("missingLib")
    +	HostPatchManagerReasonHasDependentPatch = HostPatchManagerReason("hasDependentPatch")
    +	HostPatchManagerReasonConflictPatch     = HostPatchManagerReason("conflictPatch")
    +	HostPatchManagerReasonConflictLib       = HostPatchManagerReason("conflictLib")
    +)
    +
    +func init() {
    +	t["HostPatchManagerReason"] = reflect.TypeOf((*HostPatchManagerReason)(nil)).Elem()
    +}
    +
    +type HostPowerOperationType string
    +
    +const (
    +	HostPowerOperationTypePowerOn  = HostPowerOperationType("powerOn")
    +	HostPowerOperationTypePowerOff = HostPowerOperationType("powerOff")
    +)
    +
    +func init() {
    +	t["HostPowerOperationType"] = reflect.TypeOf((*HostPowerOperationType)(nil)).Elem()
    +}
    +
    +type HostProfileManagerAnswerFileStatus string
    +
    +const (
    +	HostProfileManagerAnswerFileStatusValid   = HostProfileManagerAnswerFileStatus("valid")
    +	HostProfileManagerAnswerFileStatusInvalid = HostProfileManagerAnswerFileStatus("invalid")
    +	HostProfileManagerAnswerFileStatusUnknown = HostProfileManagerAnswerFileStatus("unknown")
    +)
    +
    +func init() {
    +	t["HostProfileManagerAnswerFileStatus"] = reflect.TypeOf((*HostProfileManagerAnswerFileStatus)(nil)).Elem()
    +}
    +
    +type HostProfileManagerCompositionResultResultElementStatus string
    +
    +const (
    +	HostProfileManagerCompositionResultResultElementStatusSuccess = HostProfileManagerCompositionResultResultElementStatus("success")
    +	HostProfileManagerCompositionResultResultElementStatusError   = HostProfileManagerCompositionResultResultElementStatus("error")
    +)
    +
    +func init() {
    +	t["HostProfileManagerCompositionResultResultElementStatus"] = reflect.TypeOf((*HostProfileManagerCompositionResultResultElementStatus)(nil)).Elem()
    +}
    +
    +type HostProfileManagerCompositionValidationResultResultElementStatus string
    +
    +const (
    +	HostProfileManagerCompositionValidationResultResultElementStatusSuccess = HostProfileManagerCompositionValidationResultResultElementStatus("success")
    +	HostProfileManagerCompositionValidationResultResultElementStatusError   = HostProfileManagerCompositionValidationResultResultElementStatus("error")
    +)
    +
    +func init() {
    +	t["HostProfileManagerCompositionValidationResultResultElementStatus"] = reflect.TypeOf((*HostProfileManagerCompositionValidationResultResultElementStatus)(nil)).Elem()
    +}
    +
    +type HostProfileManagerTaskListRequirement string
    +
    +const (
    +	HostProfileManagerTaskListRequirementMaintenanceModeRequired = HostProfileManagerTaskListRequirement("maintenanceModeRequired")
    +	HostProfileManagerTaskListRequirementRebootRequired          = HostProfileManagerTaskListRequirement("rebootRequired")
    +)
    +
    +func init() {
    +	t["HostProfileManagerTaskListRequirement"] = reflect.TypeOf((*HostProfileManagerTaskListRequirement)(nil)).Elem()
    +}
    +
    +type HostProfileValidationFailureInfoUpdateType string
    +
    +const (
    +	HostProfileValidationFailureInfoUpdateTypeHostBased = HostProfileValidationFailureInfoUpdateType("HostBased")
    +	HostProfileValidationFailureInfoUpdateTypeImport    = HostProfileValidationFailureInfoUpdateType("Import")
    +	HostProfileValidationFailureInfoUpdateTypeEdit      = HostProfileValidationFailureInfoUpdateType("Edit")
    +	HostProfileValidationFailureInfoUpdateTypeCompose   = HostProfileValidationFailureInfoUpdateType("Compose")
    +)
    +
    +func init() {
    +	t["HostProfileValidationFailureInfoUpdateType"] = reflect.TypeOf((*HostProfileValidationFailureInfoUpdateType)(nil)).Elem()
    +}
    +
    +type HostProfileValidationState string
    +
    +const (
    +	HostProfileValidationStateReady   = HostProfileValidationState("Ready")
    +	HostProfileValidationStateRunning = HostProfileValidationState("Running")
    +	HostProfileValidationStateFailed  = HostProfileValidationState("Failed")
    +)
    +
    +func init() {
    +	t["HostProfileValidationState"] = reflect.TypeOf((*HostProfileValidationState)(nil)).Elem()
    +}
    +
    +type HostProtocolEndpointPEType string
    +
    +const (
    +	HostProtocolEndpointPETypeBlock = HostProtocolEndpointPEType("block")
    +	HostProtocolEndpointPETypeNas   = HostProtocolEndpointPEType("nas")
    +)
    +
    +func init() {
    +	t["HostProtocolEndpointPEType"] = reflect.TypeOf((*HostProtocolEndpointPEType)(nil)).Elem()
    +}
    +
    +type HostProtocolEndpointProtocolEndpointType string
    +
    +const (
    +	HostProtocolEndpointProtocolEndpointTypeScsi  = HostProtocolEndpointProtocolEndpointType("scsi")
    +	HostProtocolEndpointProtocolEndpointTypeNfs   = HostProtocolEndpointProtocolEndpointType("nfs")
    +	HostProtocolEndpointProtocolEndpointTypeNfs4x = HostProtocolEndpointProtocolEndpointType("nfs4x")
    +)
    +
    +func init() {
    +	t["HostProtocolEndpointProtocolEndpointType"] = reflect.TypeOf((*HostProtocolEndpointProtocolEndpointType)(nil)).Elem()
    +}
    +
    +type HostReplayUnsupportedReason string
    +
    +const (
    +	HostReplayUnsupportedReasonIncompatibleProduct = HostReplayUnsupportedReason("incompatibleProduct")
    +	HostReplayUnsupportedReasonIncompatibleCpu     = HostReplayUnsupportedReason("incompatibleCpu")
    +	HostReplayUnsupportedReasonHvDisabled          = HostReplayUnsupportedReason("hvDisabled")
    +	HostReplayUnsupportedReasonCpuidLimitSet       = HostReplayUnsupportedReason("cpuidLimitSet")
    +	HostReplayUnsupportedReasonOldBIOS             = HostReplayUnsupportedReason("oldBIOS")
    +	HostReplayUnsupportedReasonUnknown             = HostReplayUnsupportedReason("unknown")
    +)
    +
    +func init() {
    +	t["HostReplayUnsupportedReason"] = reflect.TypeOf((*HostReplayUnsupportedReason)(nil)).Elem()
    +}
    +
    +type HostRuntimeInfoNetStackInstanceRuntimeInfoState string
    +
    +const (
    +	HostRuntimeInfoNetStackInstanceRuntimeInfoStateInactive     = HostRuntimeInfoNetStackInstanceRuntimeInfoState("inactive")
    +	HostRuntimeInfoNetStackInstanceRuntimeInfoStateActive       = HostRuntimeInfoNetStackInstanceRuntimeInfoState("active")
    +	HostRuntimeInfoNetStackInstanceRuntimeInfoStateDeactivating = HostRuntimeInfoNetStackInstanceRuntimeInfoState("deactivating")
    +	HostRuntimeInfoNetStackInstanceRuntimeInfoStateActivating   = HostRuntimeInfoNetStackInstanceRuntimeInfoState("activating")
    +)
    +
    +func init() {
    +	t["HostRuntimeInfoNetStackInstanceRuntimeInfoState"] = reflect.TypeOf((*HostRuntimeInfoNetStackInstanceRuntimeInfoState)(nil)).Elem()
    +}
    +
    +type HostServicePolicy string
    +
    +const (
    +	HostServicePolicyOn        = HostServicePolicy("on")
    +	HostServicePolicyAutomatic = HostServicePolicy("automatic")
    +	HostServicePolicyOff       = HostServicePolicy("off")
    +)
    +
    +func init() {
    +	t["HostServicePolicy"] = reflect.TypeOf((*HostServicePolicy)(nil)).Elem()
    +}
    +
    +type HostSnmpAgentCapability string
    +
    +const (
    +	HostSnmpAgentCapabilityCOMPLETE      = HostSnmpAgentCapability("COMPLETE")
    +	HostSnmpAgentCapabilityDIAGNOSTICS   = HostSnmpAgentCapability("DIAGNOSTICS")
    +	HostSnmpAgentCapabilityCONFIGURATION = HostSnmpAgentCapability("CONFIGURATION")
    +)
    +
    +func init() {
    +	t["HostSnmpAgentCapability"] = reflect.TypeOf((*HostSnmpAgentCapability)(nil)).Elem()
    +}
    +
    +type HostStandbyMode string
    +
    +const (
    +	HostStandbyModeEntering = HostStandbyMode("entering")
    +	HostStandbyModeExiting  = HostStandbyMode("exiting")
    +	HostStandbyModeIn       = HostStandbyMode("in")
    +	HostStandbyModeNone     = HostStandbyMode("none")
    +)
    +
    +func init() {
    +	t["HostStandbyMode"] = reflect.TypeOf((*HostStandbyMode)(nil)).Elem()
    +}
    +
    +type HostSystemConnectionState string
    +
    +const (
    +	HostSystemConnectionStateConnected     = HostSystemConnectionState("connected")
    +	HostSystemConnectionStateNotResponding = HostSystemConnectionState("notResponding")
    +	HostSystemConnectionStateDisconnected  = HostSystemConnectionState("disconnected")
    +)
    +
    +func init() {
    +	t["HostSystemConnectionState"] = reflect.TypeOf((*HostSystemConnectionState)(nil)).Elem()
    +}
    +
    +type HostSystemIdentificationInfoIdentifier string
    +
    +const (
    +	HostSystemIdentificationInfoIdentifierAssetTag          = HostSystemIdentificationInfoIdentifier("AssetTag")
    +	HostSystemIdentificationInfoIdentifierServiceTag        = HostSystemIdentificationInfoIdentifier("ServiceTag")
    +	HostSystemIdentificationInfoIdentifierOemSpecificString = HostSystemIdentificationInfoIdentifier("OemSpecificString")
    +)
    +
    +func init() {
    +	t["HostSystemIdentificationInfoIdentifier"] = reflect.TypeOf((*HostSystemIdentificationInfoIdentifier)(nil)).Elem()
    +}
    +
    +type HostSystemPowerState string
    +
    +const (
    +	HostSystemPowerStatePoweredOn  = HostSystemPowerState("poweredOn")
    +	HostSystemPowerStatePoweredOff = HostSystemPowerState("poweredOff")
    +	HostSystemPowerStateStandBy    = HostSystemPowerState("standBy")
    +	HostSystemPowerStateUnknown    = HostSystemPowerState("unknown")
    +)
    +
    +func init() {
    +	t["HostSystemPowerState"] = reflect.TypeOf((*HostSystemPowerState)(nil)).Elem()
    +}
    +
    +type HostSystemRemediationStateState string
    +
    +const (
    +	HostSystemRemediationStateStateRemediationReady            = HostSystemRemediationStateState("remediationReady")
    +	HostSystemRemediationStateStatePrecheckRemediationRunning  = HostSystemRemediationStateState("precheckRemediationRunning")
    +	HostSystemRemediationStateStatePrecheckRemediationComplete = HostSystemRemediationStateState("precheckRemediationComplete")
    +	HostSystemRemediationStateStatePrecheckRemediationFailed   = HostSystemRemediationStateState("precheckRemediationFailed")
    +	HostSystemRemediationStateStateRemediationRunning          = HostSystemRemediationStateState("remediationRunning")
    +	HostSystemRemediationStateStateRemediationFailed           = HostSystemRemediationStateState("remediationFailed")
    +)
    +
    +func init() {
    +	t["HostSystemRemediationStateState"] = reflect.TypeOf((*HostSystemRemediationStateState)(nil)).Elem()
    +}
    +
    +type HostTpmAttestationInfoAcceptanceStatus string
    +
    +const (
    +	HostTpmAttestationInfoAcceptanceStatusNotAccepted = HostTpmAttestationInfoAcceptanceStatus("notAccepted")
    +	HostTpmAttestationInfoAcceptanceStatusAccepted    = HostTpmAttestationInfoAcceptanceStatus("accepted")
    +)
    +
    +func init() {
    +	t["HostTpmAttestationInfoAcceptanceStatus"] = reflect.TypeOf((*HostTpmAttestationInfoAcceptanceStatus)(nil)).Elem()
    +}
    +
    +type HostUnresolvedVmfsExtentUnresolvedReason string
    +
    +const (
    +	HostUnresolvedVmfsExtentUnresolvedReasonDiskIdMismatch = HostUnresolvedVmfsExtentUnresolvedReason("diskIdMismatch")
    +	HostUnresolvedVmfsExtentUnresolvedReasonUuidConflict   = HostUnresolvedVmfsExtentUnresolvedReason("uuidConflict")
    +)
    +
    +func init() {
    +	t["HostUnresolvedVmfsExtentUnresolvedReason"] = reflect.TypeOf((*HostUnresolvedVmfsExtentUnresolvedReason)(nil)).Elem()
    +}
    +
    +type HostUnresolvedVmfsResolutionSpecVmfsUuidResolution string
    +
    +const (
    +	HostUnresolvedVmfsResolutionSpecVmfsUuidResolutionResignature = HostUnresolvedVmfsResolutionSpecVmfsUuidResolution("resignature")
    +	HostUnresolvedVmfsResolutionSpecVmfsUuidResolutionForceMount  = HostUnresolvedVmfsResolutionSpecVmfsUuidResolution("forceMount")
    +)
    +
    +func init() {
    +	t["HostUnresolvedVmfsResolutionSpecVmfsUuidResolution"] = reflect.TypeOf((*HostUnresolvedVmfsResolutionSpecVmfsUuidResolution)(nil)).Elem()
    +}
    +
    +type HostVirtualNicManagerNicType string
    +
    +const (
    +	HostVirtualNicManagerNicTypeVmotion               = HostVirtualNicManagerNicType("vmotion")
    +	HostVirtualNicManagerNicTypeFaultToleranceLogging = HostVirtualNicManagerNicType("faultToleranceLogging")
    +	HostVirtualNicManagerNicTypeVSphereReplication    = HostVirtualNicManagerNicType("vSphereReplication")
    +	HostVirtualNicManagerNicTypeVSphereReplicationNFC = HostVirtualNicManagerNicType("vSphereReplicationNFC")
    +	HostVirtualNicManagerNicTypeManagement            = HostVirtualNicManagerNicType("management")
    +	HostVirtualNicManagerNicTypeVsan                  = HostVirtualNicManagerNicType("vsan")
    +	HostVirtualNicManagerNicTypeVSphereProvisioning   = HostVirtualNicManagerNicType("vSphereProvisioning")
    +	HostVirtualNicManagerNicTypeVsanWitness           = HostVirtualNicManagerNicType("vsanWitness")
    +)
    +
    +func init() {
    +	t["HostVirtualNicManagerNicType"] = reflect.TypeOf((*HostVirtualNicManagerNicType)(nil)).Elem()
    +}
    +
    +type HostVmciAccessManagerMode string
    +
    +const (
    +	HostVmciAccessManagerModeGrant   = HostVmciAccessManagerMode("grant")
    +	HostVmciAccessManagerModeReplace = HostVmciAccessManagerMode("replace")
    +	HostVmciAccessManagerModeRevoke  = HostVmciAccessManagerMode("revoke")
    +)
    +
    +func init() {
    +	t["HostVmciAccessManagerMode"] = reflect.TypeOf((*HostVmciAccessManagerMode)(nil)).Elem()
    +}
    +
    +type HostVmfsVolumeUnmapBandwidthPolicy string
    +
    +const (
    +	HostVmfsVolumeUnmapBandwidthPolicyFixed   = HostVmfsVolumeUnmapBandwidthPolicy("fixed")
    +	HostVmfsVolumeUnmapBandwidthPolicyDynamic = HostVmfsVolumeUnmapBandwidthPolicy("dynamic")
    +)
    +
    +func init() {
    +	t["HostVmfsVolumeUnmapBandwidthPolicy"] = reflect.TypeOf((*HostVmfsVolumeUnmapBandwidthPolicy)(nil)).Elem()
    +}
    +
    +type HostVmfsVolumeUnmapPriority string
    +
    +const (
    +	HostVmfsVolumeUnmapPriorityNone = HostVmfsVolumeUnmapPriority("none")
    +	HostVmfsVolumeUnmapPriorityLow  = HostVmfsVolumeUnmapPriority("low")
    +)
    +
    +func init() {
    +	t["HostVmfsVolumeUnmapPriority"] = reflect.TypeOf((*HostVmfsVolumeUnmapPriority)(nil)).Elem()
    +}
    +
    +type HttpNfcLeaseManifestEntryChecksumType string
    +
    +const (
    +	HttpNfcLeaseManifestEntryChecksumTypeSha1   = HttpNfcLeaseManifestEntryChecksumType("sha1")
    +	HttpNfcLeaseManifestEntryChecksumTypeSha256 = HttpNfcLeaseManifestEntryChecksumType("sha256")
    +)
    +
    +func init() {
    +	t["HttpNfcLeaseManifestEntryChecksumType"] = reflect.TypeOf((*HttpNfcLeaseManifestEntryChecksumType)(nil)).Elem()
    +}
    +
    +type HttpNfcLeaseMode string
    +
    +const (
    +	HttpNfcLeaseModePushOrGet = HttpNfcLeaseMode("pushOrGet")
    +	HttpNfcLeaseModePull      = HttpNfcLeaseMode("pull")
    +)
    +
    +func init() {
    +	t["HttpNfcLeaseMode"] = reflect.TypeOf((*HttpNfcLeaseMode)(nil)).Elem()
    +}
    +
    +type HttpNfcLeaseState string
    +
    +const (
    +	HttpNfcLeaseStateInitializing = HttpNfcLeaseState("initializing")
    +	HttpNfcLeaseStateReady        = HttpNfcLeaseState("ready")
    +	HttpNfcLeaseStateDone         = HttpNfcLeaseState("done")
    +	HttpNfcLeaseStateError        = HttpNfcLeaseState("error")
    +)
    +
    +func init() {
    +	t["HttpNfcLeaseState"] = reflect.TypeOf((*HttpNfcLeaseState)(nil)).Elem()
    +}
    +
    +type IncompatibleHostForVmReplicationIncompatibleReason string
    +
    +const (
    +	IncompatibleHostForVmReplicationIncompatibleReasonRpo            = IncompatibleHostForVmReplicationIncompatibleReason("rpo")
    +	IncompatibleHostForVmReplicationIncompatibleReasonNetCompression = IncompatibleHostForVmReplicationIncompatibleReason("netCompression")
    +)
    +
    +func init() {
    +	t["IncompatibleHostForVmReplicationIncompatibleReason"] = reflect.TypeOf((*IncompatibleHostForVmReplicationIncompatibleReason)(nil)).Elem()
    +}
    +
    +type InternetScsiSnsDiscoveryMethod string
    +
    +const (
    +	InternetScsiSnsDiscoveryMethodIsnsStatic = InternetScsiSnsDiscoveryMethod("isnsStatic")
    +	InternetScsiSnsDiscoveryMethodIsnsDhcp   = InternetScsiSnsDiscoveryMethod("isnsDhcp")
    +	InternetScsiSnsDiscoveryMethodIsnsSlp    = InternetScsiSnsDiscoveryMethod("isnsSlp")
    +)
    +
    +func init() {
    +	t["InternetScsiSnsDiscoveryMethod"] = reflect.TypeOf((*InternetScsiSnsDiscoveryMethod)(nil)).Elem()
    +}
    +
    +type InvalidDasConfigArgumentEntryForInvalidArgument string
    +
    +const (
    +	InvalidDasConfigArgumentEntryForInvalidArgumentAdmissionControl = InvalidDasConfigArgumentEntryForInvalidArgument("admissionControl")
    +	InvalidDasConfigArgumentEntryForInvalidArgumentUserHeartbeatDs  = InvalidDasConfigArgumentEntryForInvalidArgument("userHeartbeatDs")
    +	InvalidDasConfigArgumentEntryForInvalidArgumentVmConfig         = InvalidDasConfigArgumentEntryForInvalidArgument("vmConfig")
    +)
    +
    +func init() {
    +	t["InvalidDasConfigArgumentEntryForInvalidArgument"] = reflect.TypeOf((*InvalidDasConfigArgumentEntryForInvalidArgument)(nil)).Elem()
    +}
    +
    +type InvalidProfileReferenceHostReason string
    +
    +const (
    +	InvalidProfileReferenceHostReasonIncompatibleVersion  = InvalidProfileReferenceHostReason("incompatibleVersion")
    +	InvalidProfileReferenceHostReasonMissingReferenceHost = InvalidProfileReferenceHostReason("missingReferenceHost")
    +)
    +
    +func init() {
    +	t["InvalidProfileReferenceHostReason"] = reflect.TypeOf((*InvalidProfileReferenceHostReason)(nil)).Elem()
    +}
    +
    +type IoFilterOperation string
    +
    +const (
    +	IoFilterOperationInstall   = IoFilterOperation("install")
    +	IoFilterOperationUninstall = IoFilterOperation("uninstall")
    +	IoFilterOperationUpgrade   = IoFilterOperation("upgrade")
    +)
    +
    +func init() {
    +	t["IoFilterOperation"] = reflect.TypeOf((*IoFilterOperation)(nil)).Elem()
    +}
    +
    +type IoFilterType string
    +
    +const (
    +	IoFilterTypeCache              = IoFilterType("cache")
    +	IoFilterTypeReplication        = IoFilterType("replication")
    +	IoFilterTypeEncryption         = IoFilterType("encryption")
    +	IoFilterTypeCompression        = IoFilterType("compression")
    +	IoFilterTypeInspection         = IoFilterType("inspection")
    +	IoFilterTypeDatastoreIoControl = IoFilterType("datastoreIoControl")
    +	IoFilterTypeDataProvider       = IoFilterType("dataProvider")
    +)
    +
    +func init() {
    +	t["IoFilterType"] = reflect.TypeOf((*IoFilterType)(nil)).Elem()
    +}
    +
    +type IscsiPortInfoPathStatus string
    +
    +const (
    +	IscsiPortInfoPathStatusNotUsed    = IscsiPortInfoPathStatus("notUsed")
    +	IscsiPortInfoPathStatusActive     = IscsiPortInfoPathStatus("active")
    +	IscsiPortInfoPathStatusStandBy    = IscsiPortInfoPathStatus("standBy")
    +	IscsiPortInfoPathStatusLastActive = IscsiPortInfoPathStatus("lastActive")
    +)
    +
    +func init() {
    +	t["IscsiPortInfoPathStatus"] = reflect.TypeOf((*IscsiPortInfoPathStatus)(nil)).Elem()
    +}
    +
    +type LatencySensitivitySensitivityLevel string
    +
    +const (
    +	LatencySensitivitySensitivityLevelLow    = LatencySensitivitySensitivityLevel("low")
    +	LatencySensitivitySensitivityLevelNormal = LatencySensitivitySensitivityLevel("normal")
    +	LatencySensitivitySensitivityLevelMedium = LatencySensitivitySensitivityLevel("medium")
    +	LatencySensitivitySensitivityLevelHigh   = LatencySensitivitySensitivityLevel("high")
    +	LatencySensitivitySensitivityLevelCustom = LatencySensitivitySensitivityLevel("custom")
    +)
    +
    +func init() {
    +	t["LatencySensitivitySensitivityLevel"] = reflect.TypeOf((*LatencySensitivitySensitivityLevel)(nil)).Elem()
    +}
    +
    +type LicenseAssignmentFailedReason string
    +
    +const (
    +	LicenseAssignmentFailedReasonKeyEntityMismatch                                    = LicenseAssignmentFailedReason("keyEntityMismatch")
    +	LicenseAssignmentFailedReasonDowngradeDisallowed                                  = LicenseAssignmentFailedReason("downgradeDisallowed")
    +	LicenseAssignmentFailedReasonInventoryNotManageableByVirtualCenter                = LicenseAssignmentFailedReason("inventoryNotManageableByVirtualCenter")
    +	LicenseAssignmentFailedReasonHostsUnmanageableByVirtualCenterWithoutLicenseServer = LicenseAssignmentFailedReason("hostsUnmanageableByVirtualCenterWithoutLicenseServer")
    +)
    +
    +func init() {
    +	t["LicenseAssignmentFailedReason"] = reflect.TypeOf((*LicenseAssignmentFailedReason)(nil)).Elem()
    +}
    +
    +type LicenseFeatureInfoSourceRestriction string
    +
    +const (
    +	LicenseFeatureInfoSourceRestrictionUnrestricted = LicenseFeatureInfoSourceRestriction("unrestricted")
    +	LicenseFeatureInfoSourceRestrictionServed       = LicenseFeatureInfoSourceRestriction("served")
    +	LicenseFeatureInfoSourceRestrictionFile         = LicenseFeatureInfoSourceRestriction("file")
    +)
    +
    +func init() {
    +	t["LicenseFeatureInfoSourceRestriction"] = reflect.TypeOf((*LicenseFeatureInfoSourceRestriction)(nil)).Elem()
    +}
    +
    +type LicenseFeatureInfoState string
    +
    +const (
    +	LicenseFeatureInfoStateEnabled  = LicenseFeatureInfoState("enabled")
    +	LicenseFeatureInfoStateDisabled = LicenseFeatureInfoState("disabled")
    +	LicenseFeatureInfoStateOptional = LicenseFeatureInfoState("optional")
    +)
    +
    +func init() {
    +	t["LicenseFeatureInfoState"] = reflect.TypeOf((*LicenseFeatureInfoState)(nil)).Elem()
    +}
    +
    +type LicenseFeatureInfoUnit string
    +
    +const (
    +	LicenseFeatureInfoUnitHost       = LicenseFeatureInfoUnit("host")
    +	LicenseFeatureInfoUnitCpuCore    = LicenseFeatureInfoUnit("cpuCore")
    +	LicenseFeatureInfoUnitCpuPackage = LicenseFeatureInfoUnit("cpuPackage")
    +	LicenseFeatureInfoUnitServer     = LicenseFeatureInfoUnit("server")
    +	LicenseFeatureInfoUnitVm         = LicenseFeatureInfoUnit("vm")
    +)
    +
    +func init() {
    +	t["LicenseFeatureInfoUnit"] = reflect.TypeOf((*LicenseFeatureInfoUnit)(nil)).Elem()
    +}
    +
    +type LicenseManagerLicenseKey string
    +
    +const (
    +	LicenseManagerLicenseKeyEsxFull    = LicenseManagerLicenseKey("esxFull")
    +	LicenseManagerLicenseKeyEsxVmtn    = LicenseManagerLicenseKey("esxVmtn")
    +	LicenseManagerLicenseKeyEsxExpress = LicenseManagerLicenseKey("esxExpress")
    +	LicenseManagerLicenseKeySan        = LicenseManagerLicenseKey("san")
    +	LicenseManagerLicenseKeyIscsi      = LicenseManagerLicenseKey("iscsi")
    +	LicenseManagerLicenseKeyNas        = LicenseManagerLicenseKey("nas")
    +	LicenseManagerLicenseKeyVsmp       = LicenseManagerLicenseKey("vsmp")
    +	LicenseManagerLicenseKeyBackup     = LicenseManagerLicenseKey("backup")
    +	LicenseManagerLicenseKeyVc         = LicenseManagerLicenseKey("vc")
    +	LicenseManagerLicenseKeyVcExpress  = LicenseManagerLicenseKey("vcExpress")
    +	LicenseManagerLicenseKeyEsxHost    = LicenseManagerLicenseKey("esxHost")
    +	LicenseManagerLicenseKeyGsxHost    = LicenseManagerLicenseKey("gsxHost")
    +	LicenseManagerLicenseKeyServerHost = LicenseManagerLicenseKey("serverHost")
    +	LicenseManagerLicenseKeyDrsPower   = LicenseManagerLicenseKey("drsPower")
    +	LicenseManagerLicenseKeyVmotion    = LicenseManagerLicenseKey("vmotion")
    +	LicenseManagerLicenseKeyDrs        = LicenseManagerLicenseKey("drs")
    +	LicenseManagerLicenseKeyDas        = LicenseManagerLicenseKey("das")
    +)
    +
    +func init() {
    +	t["LicenseManagerLicenseKey"] = reflect.TypeOf((*LicenseManagerLicenseKey)(nil)).Elem()
    +}
    +
    +type LicenseManagerState string
    +
    +const (
    +	LicenseManagerStateInitializing = LicenseManagerState("initializing")
    +	LicenseManagerStateNormal       = LicenseManagerState("normal")
    +	LicenseManagerStateMarginal     = LicenseManagerState("marginal")
    +	LicenseManagerStateFault        = LicenseManagerState("fault")
    +)
    +
    +func init() {
    +	t["LicenseManagerState"] = reflect.TypeOf((*LicenseManagerState)(nil)).Elem()
    +}
    +
    +type LicenseReservationInfoState string
    +
    +const (
    +	LicenseReservationInfoStateNotUsed       = LicenseReservationInfoState("notUsed")
    +	LicenseReservationInfoStateNoLicense     = LicenseReservationInfoState("noLicense")
    +	LicenseReservationInfoStateUnlicensedUse = LicenseReservationInfoState("unlicensedUse")
    +	LicenseReservationInfoStateLicensed      = LicenseReservationInfoState("licensed")
    +)
    +
    +func init() {
    +	t["LicenseReservationInfoState"] = reflect.TypeOf((*LicenseReservationInfoState)(nil)).Elem()
    +}
    +
    +type LinkDiscoveryProtocolConfigOperationType string
    +
    +const (
    +	LinkDiscoveryProtocolConfigOperationTypeNone      = LinkDiscoveryProtocolConfigOperationType("none")
    +	LinkDiscoveryProtocolConfigOperationTypeListen    = LinkDiscoveryProtocolConfigOperationType("listen")
    +	LinkDiscoveryProtocolConfigOperationTypeAdvertise = LinkDiscoveryProtocolConfigOperationType("advertise")
    +	LinkDiscoveryProtocolConfigOperationTypeBoth      = LinkDiscoveryProtocolConfigOperationType("both")
    +)
    +
    +func init() {
    +	t["LinkDiscoveryProtocolConfigOperationType"] = reflect.TypeOf((*LinkDiscoveryProtocolConfigOperationType)(nil)).Elem()
    +}
    +
    +type LinkDiscoveryProtocolConfigProtocolType string
    +
    +const (
    +	LinkDiscoveryProtocolConfigProtocolTypeCdp  = LinkDiscoveryProtocolConfigProtocolType("cdp")
    +	LinkDiscoveryProtocolConfigProtocolTypeLldp = LinkDiscoveryProtocolConfigProtocolType("lldp")
    +)
    +
    +func init() {
    +	t["LinkDiscoveryProtocolConfigProtocolType"] = reflect.TypeOf((*LinkDiscoveryProtocolConfigProtocolType)(nil)).Elem()
    +}
    +
    +type ManagedEntityStatus string
    +
    +const (
    +	ManagedEntityStatusGray   = ManagedEntityStatus("gray")
    +	ManagedEntityStatusGreen  = ManagedEntityStatus("green")
    +	ManagedEntityStatusYellow = ManagedEntityStatus("yellow")
    +	ManagedEntityStatusRed    = ManagedEntityStatus("red")
    +)
    +
    +func init() {
    +	t["ManagedEntityStatus"] = reflect.TypeOf((*ManagedEntityStatus)(nil)).Elem()
    +}
    +
    +type MetricAlarmOperator string
    +
    +const (
    +	MetricAlarmOperatorIsAbove = MetricAlarmOperator("isAbove")
    +	MetricAlarmOperatorIsBelow = MetricAlarmOperator("isBelow")
    +)
    +
    +func init() {
    +	t["MetricAlarmOperator"] = reflect.TypeOf((*MetricAlarmOperator)(nil)).Elem()
    +}
    +
    +type MultipathState string
    +
    +const (
    +	MultipathStateStandby  = MultipathState("standby")
    +	MultipathStateActive   = MultipathState("active")
    +	MultipathStateDisabled = MultipathState("disabled")
    +	MultipathStateDead     = MultipathState("dead")
    +	MultipathStateUnknown  = MultipathState("unknown")
    +)
    +
    +func init() {
    +	t["MultipathState"] = reflect.TypeOf((*MultipathState)(nil)).Elem()
    +}
    +
    +type NetBIOSConfigInfoMode string
    +
    +const (
    +	NetBIOSConfigInfoModeUnknown        = NetBIOSConfigInfoMode("unknown")
    +	NetBIOSConfigInfoModeEnabled        = NetBIOSConfigInfoMode("enabled")
    +	NetBIOSConfigInfoModeDisabled       = NetBIOSConfigInfoMode("disabled")
    +	NetBIOSConfigInfoModeEnabledViaDHCP = NetBIOSConfigInfoMode("enabledViaDHCP")
    +)
    +
    +func init() {
    +	t["NetBIOSConfigInfoMode"] = reflect.TypeOf((*NetBIOSConfigInfoMode)(nil)).Elem()
    +}
    +
    +type NetIpConfigInfoIpAddressOrigin string
    +
    +const (
    +	NetIpConfigInfoIpAddressOriginOther     = NetIpConfigInfoIpAddressOrigin("other")
    +	NetIpConfigInfoIpAddressOriginManual    = NetIpConfigInfoIpAddressOrigin("manual")
    +	NetIpConfigInfoIpAddressOriginDhcp      = NetIpConfigInfoIpAddressOrigin("dhcp")
    +	NetIpConfigInfoIpAddressOriginLinklayer = NetIpConfigInfoIpAddressOrigin("linklayer")
    +	NetIpConfigInfoIpAddressOriginRandom    = NetIpConfigInfoIpAddressOrigin("random")
    +)
    +
    +func init() {
    +	t["NetIpConfigInfoIpAddressOrigin"] = reflect.TypeOf((*NetIpConfigInfoIpAddressOrigin)(nil)).Elem()
    +}
    +
    +type NetIpConfigInfoIpAddressStatus string
    +
    +const (
    +	NetIpConfigInfoIpAddressStatusPreferred    = NetIpConfigInfoIpAddressStatus("preferred")
    +	NetIpConfigInfoIpAddressStatusDeprecated   = NetIpConfigInfoIpAddressStatus("deprecated")
    +	NetIpConfigInfoIpAddressStatusInvalid      = NetIpConfigInfoIpAddressStatus("invalid")
    +	NetIpConfigInfoIpAddressStatusInaccessible = NetIpConfigInfoIpAddressStatus("inaccessible")
    +	NetIpConfigInfoIpAddressStatusUnknown      = NetIpConfigInfoIpAddressStatus("unknown")
    +	NetIpConfigInfoIpAddressStatusTentative    = NetIpConfigInfoIpAddressStatus("tentative")
    +	NetIpConfigInfoIpAddressStatusDuplicate    = NetIpConfigInfoIpAddressStatus("duplicate")
    +)
    +
    +func init() {
    +	t["NetIpConfigInfoIpAddressStatus"] = reflect.TypeOf((*NetIpConfigInfoIpAddressStatus)(nil)).Elem()
    +}
    +
    +type NetIpStackInfoEntryType string
    +
    +const (
    +	NetIpStackInfoEntryTypeOther   = NetIpStackInfoEntryType("other")
    +	NetIpStackInfoEntryTypeInvalid = NetIpStackInfoEntryType("invalid")
    +	NetIpStackInfoEntryTypeDynamic = NetIpStackInfoEntryType("dynamic")
    +	NetIpStackInfoEntryTypeManual  = NetIpStackInfoEntryType("manual")
    +)
    +
    +func init() {
    +	t["NetIpStackInfoEntryType"] = reflect.TypeOf((*NetIpStackInfoEntryType)(nil)).Elem()
    +}
    +
    +type NetIpStackInfoPreference string
    +
    +const (
    +	NetIpStackInfoPreferenceReserved = NetIpStackInfoPreference("reserved")
    +	NetIpStackInfoPreferenceLow      = NetIpStackInfoPreference("low")
    +	NetIpStackInfoPreferenceMedium   = NetIpStackInfoPreference("medium")
    +	NetIpStackInfoPreferenceHigh     = NetIpStackInfoPreference("high")
    +)
    +
    +func init() {
    +	t["NetIpStackInfoPreference"] = reflect.TypeOf((*NetIpStackInfoPreference)(nil)).Elem()
    +}
    +
    +type NotSupportedDeviceForFTDeviceType string
    +
    +const (
    +	NotSupportedDeviceForFTDeviceTypeVirtualVmxnet3            = NotSupportedDeviceForFTDeviceType("virtualVmxnet3")
    +	NotSupportedDeviceForFTDeviceTypeParaVirtualSCSIController = NotSupportedDeviceForFTDeviceType("paraVirtualSCSIController")
    +)
    +
    +func init() {
    +	t["NotSupportedDeviceForFTDeviceType"] = reflect.TypeOf((*NotSupportedDeviceForFTDeviceType)(nil)).Elem()
    +}
    +
    +type NumVirtualCpusIncompatibleReason string
    +
    +const (
    +	NumVirtualCpusIncompatibleReasonRecordReplay   = NumVirtualCpusIncompatibleReason("recordReplay")
    +	NumVirtualCpusIncompatibleReasonFaultTolerance = NumVirtualCpusIncompatibleReason("faultTolerance")
    +)
    +
    +func init() {
    +	t["NumVirtualCpusIncompatibleReason"] = reflect.TypeOf((*NumVirtualCpusIncompatibleReason)(nil)).Elem()
    +}
    +
    +type NvdimmInterleaveSetState string
    +
    +const (
    +	NvdimmInterleaveSetStateInvalid = NvdimmInterleaveSetState("invalid")
    +	NvdimmInterleaveSetStateActive  = NvdimmInterleaveSetState("active")
    +)
    +
    +func init() {
    +	t["NvdimmInterleaveSetState"] = reflect.TypeOf((*NvdimmInterleaveSetState)(nil)).Elem()
    +}
    +
    +type NvdimmNamespaceHealthStatus string
    +
    +const (
    +	NvdimmNamespaceHealthStatusNormal            = NvdimmNamespaceHealthStatus("normal")
    +	NvdimmNamespaceHealthStatusMissing           = NvdimmNamespaceHealthStatus("missing")
    +	NvdimmNamespaceHealthStatusLabelMissing      = NvdimmNamespaceHealthStatus("labelMissing")
    +	NvdimmNamespaceHealthStatusInterleaveBroken  = NvdimmNamespaceHealthStatus("interleaveBroken")
    +	NvdimmNamespaceHealthStatusLabelInconsistent = NvdimmNamespaceHealthStatus("labelInconsistent")
    +	NvdimmNamespaceHealthStatusBttCorrupt        = NvdimmNamespaceHealthStatus("bttCorrupt")
    +	NvdimmNamespaceHealthStatusBadBlockSize      = NvdimmNamespaceHealthStatus("badBlockSize")
    +)
    +
    +func init() {
    +	t["NvdimmNamespaceHealthStatus"] = reflect.TypeOf((*NvdimmNamespaceHealthStatus)(nil)).Elem()
    +}
    +
    +type NvdimmNamespaceState string
    +
    +const (
    +	NvdimmNamespaceStateInvalid  = NvdimmNamespaceState("invalid")
    +	NvdimmNamespaceStateNotInUse = NvdimmNamespaceState("notInUse")
    +	NvdimmNamespaceStateInUse    = NvdimmNamespaceState("inUse")
    +)
    +
    +func init() {
    +	t["NvdimmNamespaceState"] = reflect.TypeOf((*NvdimmNamespaceState)(nil)).Elem()
    +}
    +
    +type NvdimmNamespaceType string
    +
    +const (
    +	NvdimmNamespaceTypeBlockNamespace      = NvdimmNamespaceType("blockNamespace")
    +	NvdimmNamespaceTypePersistentNamespace = NvdimmNamespaceType("persistentNamespace")
    +)
    +
    +func init() {
    +	t["NvdimmNamespaceType"] = reflect.TypeOf((*NvdimmNamespaceType)(nil)).Elem()
    +}
    +
    +type NvdimmNvdimmHealthInfoState string
    +
    +const (
    +	NvdimmNvdimmHealthInfoStateNormal = NvdimmNvdimmHealthInfoState("normal")
    +	NvdimmNvdimmHealthInfoStateError  = NvdimmNvdimmHealthInfoState("error")
    +)
    +
    +func init() {
    +	t["NvdimmNvdimmHealthInfoState"] = reflect.TypeOf((*NvdimmNvdimmHealthInfoState)(nil)).Elem()
    +}
    +
    +type NvdimmRangeType string
    +
    +const (
    +	NvdimmRangeTypeVolatileRange              = NvdimmRangeType("volatileRange")
    +	NvdimmRangeTypePersistentRange            = NvdimmRangeType("persistentRange")
    +	NvdimmRangeTypeControlRange               = NvdimmRangeType("controlRange")
    +	NvdimmRangeTypeBlockRange                 = NvdimmRangeType("blockRange")
    +	NvdimmRangeTypeVolatileVirtualDiskRange   = NvdimmRangeType("volatileVirtualDiskRange")
    +	NvdimmRangeTypeVolatileVirtualCDRange     = NvdimmRangeType("volatileVirtualCDRange")
    +	NvdimmRangeTypePersistentVirtualDiskRange = NvdimmRangeType("persistentVirtualDiskRange")
    +	NvdimmRangeTypePersistentVirtualCDRange   = NvdimmRangeType("persistentVirtualCDRange")
    +)
    +
    +func init() {
    +	t["NvdimmRangeType"] = reflect.TypeOf((*NvdimmRangeType)(nil)).Elem()
    +}
    +
    +type ObjectUpdateKind string
    +
    +const (
    +	ObjectUpdateKindModify = ObjectUpdateKind("modify")
    +	ObjectUpdateKindEnter  = ObjectUpdateKind("enter")
    +	ObjectUpdateKindLeave  = ObjectUpdateKind("leave")
    +)
    +
    +func init() {
    +	t["ObjectUpdateKind"] = reflect.TypeOf((*ObjectUpdateKind)(nil)).Elem()
    +}
    +
    +type OvfConsumerOstNodeType string
    +
    +const (
    +	OvfConsumerOstNodeTypeEnvelope                = OvfConsumerOstNodeType("envelope")
    +	OvfConsumerOstNodeTypeVirtualSystem           = OvfConsumerOstNodeType("virtualSystem")
    +	OvfConsumerOstNodeTypeVirtualSystemCollection = OvfConsumerOstNodeType("virtualSystemCollection")
    +)
    +
    +func init() {
    +	t["OvfConsumerOstNodeType"] = reflect.TypeOf((*OvfConsumerOstNodeType)(nil)).Elem()
    +}
    +
    +type OvfCreateImportSpecParamsDiskProvisioningType string
    +
    +const (
    +	OvfCreateImportSpecParamsDiskProvisioningTypeMonolithicSparse     = OvfCreateImportSpecParamsDiskProvisioningType("monolithicSparse")
    +	OvfCreateImportSpecParamsDiskProvisioningTypeMonolithicFlat       = OvfCreateImportSpecParamsDiskProvisioningType("monolithicFlat")
    +	OvfCreateImportSpecParamsDiskProvisioningTypeTwoGbMaxExtentSparse = OvfCreateImportSpecParamsDiskProvisioningType("twoGbMaxExtentSparse")
    +	OvfCreateImportSpecParamsDiskProvisioningTypeTwoGbMaxExtentFlat   = OvfCreateImportSpecParamsDiskProvisioningType("twoGbMaxExtentFlat")
    +	OvfCreateImportSpecParamsDiskProvisioningTypeThin                 = OvfCreateImportSpecParamsDiskProvisioningType("thin")
    +	OvfCreateImportSpecParamsDiskProvisioningTypeThick                = OvfCreateImportSpecParamsDiskProvisioningType("thick")
    +	OvfCreateImportSpecParamsDiskProvisioningTypeSeSparse             = OvfCreateImportSpecParamsDiskProvisioningType("seSparse")
    +	OvfCreateImportSpecParamsDiskProvisioningTypeEagerZeroedThick     = OvfCreateImportSpecParamsDiskProvisioningType("eagerZeroedThick")
    +	OvfCreateImportSpecParamsDiskProvisioningTypeSparse               = OvfCreateImportSpecParamsDiskProvisioningType("sparse")
    +	OvfCreateImportSpecParamsDiskProvisioningTypeFlat                 = OvfCreateImportSpecParamsDiskProvisioningType("flat")
    +)
    +
    +func init() {
    +	t["OvfCreateImportSpecParamsDiskProvisioningType"] = reflect.TypeOf((*OvfCreateImportSpecParamsDiskProvisioningType)(nil)).Elem()
    +}
    +
    +type PerfFormat string
    +
    +const (
    +	PerfFormatNormal = PerfFormat("normal")
    +	PerfFormatCsv    = PerfFormat("csv")
    +)
    +
    +func init() {
    +	t["PerfFormat"] = reflect.TypeOf((*PerfFormat)(nil)).Elem()
    +}
    +
    +type PerfStatsType string
    +
    +const (
    +	PerfStatsTypeAbsolute = PerfStatsType("absolute")
    +	PerfStatsTypeDelta    = PerfStatsType("delta")
    +	PerfStatsTypeRate     = PerfStatsType("rate")
    +)
    +
    +func init() {
    +	t["PerfStatsType"] = reflect.TypeOf((*PerfStatsType)(nil)).Elem()
    +}
    +
    +type PerfSummaryType string
    +
    +const (
    +	PerfSummaryTypeAverage   = PerfSummaryType("average")
    +	PerfSummaryTypeMaximum   = PerfSummaryType("maximum")
    +	PerfSummaryTypeMinimum   = PerfSummaryType("minimum")
    +	PerfSummaryTypeLatest    = PerfSummaryType("latest")
    +	PerfSummaryTypeSummation = PerfSummaryType("summation")
    +	PerfSummaryTypeNone      = PerfSummaryType("none")
    +)
    +
    +func init() {
    +	t["PerfSummaryType"] = reflect.TypeOf((*PerfSummaryType)(nil)).Elem()
    +}
    +
    +type PerformanceManagerUnit string
    +
    +const (
    +	PerformanceManagerUnitPercent            = PerformanceManagerUnit("percent")
    +	PerformanceManagerUnitKiloBytes          = PerformanceManagerUnit("kiloBytes")
    +	PerformanceManagerUnitMegaBytes          = PerformanceManagerUnit("megaBytes")
    +	PerformanceManagerUnitMegaHertz          = PerformanceManagerUnit("megaHertz")
    +	PerformanceManagerUnitNumber             = PerformanceManagerUnit("number")
    +	PerformanceManagerUnitMicrosecond        = PerformanceManagerUnit("microsecond")
    +	PerformanceManagerUnitMillisecond        = PerformanceManagerUnit("millisecond")
    +	PerformanceManagerUnitSecond             = PerformanceManagerUnit("second")
    +	PerformanceManagerUnitKiloBytesPerSecond = PerformanceManagerUnit("kiloBytesPerSecond")
    +	PerformanceManagerUnitMegaBytesPerSecond = PerformanceManagerUnit("megaBytesPerSecond")
    +	PerformanceManagerUnitWatt               = PerformanceManagerUnit("watt")
    +	PerformanceManagerUnitJoule              = PerformanceManagerUnit("joule")
    +	PerformanceManagerUnitTeraBytes          = PerformanceManagerUnit("teraBytes")
    +)
    +
    +func init() {
    +	t["PerformanceManagerUnit"] = reflect.TypeOf((*PerformanceManagerUnit)(nil)).Elem()
    +}
    +
    +type PhysicalNicResourcePoolSchedulerDisallowedReason string
    +
    +const (
    +	PhysicalNicResourcePoolSchedulerDisallowedReasonUserOptOut          = PhysicalNicResourcePoolSchedulerDisallowedReason("userOptOut")
    +	PhysicalNicResourcePoolSchedulerDisallowedReasonHardwareUnsupported = PhysicalNicResourcePoolSchedulerDisallowedReason("hardwareUnsupported")
    +)
    +
    +func init() {
    +	t["PhysicalNicResourcePoolSchedulerDisallowedReason"] = reflect.TypeOf((*PhysicalNicResourcePoolSchedulerDisallowedReason)(nil)).Elem()
    +}
    +
    +type PhysicalNicVmDirectPathGen2SupportedMode string
    +
    +const (
    +	PhysicalNicVmDirectPathGen2SupportedModeUpt = PhysicalNicVmDirectPathGen2SupportedMode("upt")
    +)
    +
    +func init() {
    +	t["PhysicalNicVmDirectPathGen2SupportedMode"] = reflect.TypeOf((*PhysicalNicVmDirectPathGen2SupportedMode)(nil)).Elem()
    +}
    +
    +type PlacementAffinityRuleRuleScope string
    +
    +const (
    +	PlacementAffinityRuleRuleScopeCluster    = PlacementAffinityRuleRuleScope("cluster")
    +	PlacementAffinityRuleRuleScopeHost       = PlacementAffinityRuleRuleScope("host")
    +	PlacementAffinityRuleRuleScopeStoragePod = PlacementAffinityRuleRuleScope("storagePod")
    +	PlacementAffinityRuleRuleScopeDatastore  = PlacementAffinityRuleRuleScope("datastore")
    +)
    +
    +func init() {
    +	t["PlacementAffinityRuleRuleScope"] = reflect.TypeOf((*PlacementAffinityRuleRuleScope)(nil)).Elem()
    +}
    +
    +type PlacementAffinityRuleRuleType string
    +
    +const (
    +	PlacementAffinityRuleRuleTypeAffinity         = PlacementAffinityRuleRuleType("affinity")
    +	PlacementAffinityRuleRuleTypeAntiAffinity     = PlacementAffinityRuleRuleType("antiAffinity")
    +	PlacementAffinityRuleRuleTypeSoftAffinity     = PlacementAffinityRuleRuleType("softAffinity")
    +	PlacementAffinityRuleRuleTypeSoftAntiAffinity = PlacementAffinityRuleRuleType("softAntiAffinity")
    +)
    +
    +func init() {
    +	t["PlacementAffinityRuleRuleType"] = reflect.TypeOf((*PlacementAffinityRuleRuleType)(nil)).Elem()
    +}
    +
    +type PlacementSpecPlacementType string
    +
    +const (
    +	PlacementSpecPlacementTypeCreate      = PlacementSpecPlacementType("create")
    +	PlacementSpecPlacementTypeReconfigure = PlacementSpecPlacementType("reconfigure")
    +	PlacementSpecPlacementTypeRelocate    = PlacementSpecPlacementType("relocate")
    +	PlacementSpecPlacementTypeClone       = PlacementSpecPlacementType("clone")
    +)
    +
    +func init() {
    +	t["PlacementSpecPlacementType"] = reflect.TypeOf((*PlacementSpecPlacementType)(nil)).Elem()
    +}
    +
    +type PortGroupConnecteeType string
    +
    +const (
    +	PortGroupConnecteeTypeVirtualMachine   = PortGroupConnecteeType("virtualMachine")
    +	PortGroupConnecteeTypeSystemManagement = PortGroupConnecteeType("systemManagement")
    +	PortGroupConnecteeTypeHost             = PortGroupConnecteeType("host")
    +	PortGroupConnecteeTypeUnknown          = PortGroupConnecteeType("unknown")
    +)
    +
    +func init() {
    +	t["PortGroupConnecteeType"] = reflect.TypeOf((*PortGroupConnecteeType)(nil)).Elem()
    +}
    +
    +type ProfileExecuteResultStatus string
    +
    +const (
    +	ProfileExecuteResultStatusSuccess   = ProfileExecuteResultStatus("success")
    +	ProfileExecuteResultStatusNeedInput = ProfileExecuteResultStatus("needInput")
    +	ProfileExecuteResultStatusError     = ProfileExecuteResultStatus("error")
    +)
    +
    +func init() {
    +	t["ProfileExecuteResultStatus"] = reflect.TypeOf((*ProfileExecuteResultStatus)(nil)).Elem()
    +}
    +
    +type ProfileNumericComparator string
    +
    +const (
    +	ProfileNumericComparatorLessThan         = ProfileNumericComparator("lessThan")
    +	ProfileNumericComparatorLessThanEqual    = ProfileNumericComparator("lessThanEqual")
    +	ProfileNumericComparatorEqual            = ProfileNumericComparator("equal")
    +	ProfileNumericComparatorNotEqual         = ProfileNumericComparator("notEqual")
    +	ProfileNumericComparatorGreaterThanEqual = ProfileNumericComparator("greaterThanEqual")
    +	ProfileNumericComparatorGreaterThan      = ProfileNumericComparator("greaterThan")
    +)
    +
    +func init() {
    +	t["ProfileNumericComparator"] = reflect.TypeOf((*ProfileNumericComparator)(nil)).Elem()
    +}
    +
    +type ProfileParameterMetadataRelationType string
    +
    +const (
    +	ProfileParameterMetadataRelationTypeDynamic_relation     = ProfileParameterMetadataRelationType("dynamic_relation")
    +	ProfileParameterMetadataRelationTypeExtensible_relation  = ProfileParameterMetadataRelationType("extensible_relation")
    +	ProfileParameterMetadataRelationTypeLocalizable_relation = ProfileParameterMetadataRelationType("localizable_relation")
    +	ProfileParameterMetadataRelationTypeStatic_relation      = ProfileParameterMetadataRelationType("static_relation")
    +	ProfileParameterMetadataRelationTypeValidation_relation  = ProfileParameterMetadataRelationType("validation_relation")
    +)
    +
    +func init() {
    +	t["ProfileParameterMetadataRelationType"] = reflect.TypeOf((*ProfileParameterMetadataRelationType)(nil)).Elem()
    +}
    +
    +type PropertyChangeOp string
    +
    +const (
    +	PropertyChangeOpAdd            = PropertyChangeOp("add")
    +	PropertyChangeOpRemove         = PropertyChangeOp("remove")
    +	PropertyChangeOpAssign         = PropertyChangeOp("assign")
    +	PropertyChangeOpIndirectRemove = PropertyChangeOp("indirectRemove")
    +)
    +
    +func init() {
    +	t["PropertyChangeOp"] = reflect.TypeOf((*PropertyChangeOp)(nil)).Elem()
    +}
    +
    +type QuarantineModeFaultFaultType string
    +
    +const (
    +	QuarantineModeFaultFaultTypeNoCompatibleNonQuarantinedHost = QuarantineModeFaultFaultType("NoCompatibleNonQuarantinedHost")
    +	QuarantineModeFaultFaultTypeCorrectionDisallowed           = QuarantineModeFaultFaultType("CorrectionDisallowed")
    +	QuarantineModeFaultFaultTypeCorrectionImpact               = QuarantineModeFaultFaultType("CorrectionImpact")
    +)
    +
    +func init() {
    +	t["QuarantineModeFaultFaultType"] = reflect.TypeOf((*QuarantineModeFaultFaultType)(nil)).Elem()
    +}
    +
    +type QuiesceMode string
    +
    +const (
    +	QuiesceModeApplication = QuiesceMode("application")
    +	QuiesceModeFilesystem  = QuiesceMode("filesystem")
    +	QuiesceModeNone        = QuiesceMode("none")
    +)
    +
    +func init() {
    +	t["QuiesceMode"] = reflect.TypeOf((*QuiesceMode)(nil)).Elem()
    +}
    +
    +type RecommendationReasonCode string
    +
    +const (
    +	RecommendationReasonCodeFairnessCpuAvg                  = RecommendationReasonCode("fairnessCpuAvg")
    +	RecommendationReasonCodeFairnessMemAvg                  = RecommendationReasonCode("fairnessMemAvg")
    +	RecommendationReasonCodeJointAffin                      = RecommendationReasonCode("jointAffin")
    +	RecommendationReasonCodeAntiAffin                       = RecommendationReasonCode("antiAffin")
    +	RecommendationReasonCodeHostMaint                       = RecommendationReasonCode("hostMaint")
    +	RecommendationReasonCodeEnterStandby                    = RecommendationReasonCode("enterStandby")
    +	RecommendationReasonCodeReservationCpu                  = RecommendationReasonCode("reservationCpu")
    +	RecommendationReasonCodeReservationMem                  = RecommendationReasonCode("reservationMem")
    +	RecommendationReasonCodePowerOnVm                       = RecommendationReasonCode("powerOnVm")
    +	RecommendationReasonCodePowerSaving                     = RecommendationReasonCode("powerSaving")
    +	RecommendationReasonCodeIncreaseCapacity                = RecommendationReasonCode("increaseCapacity")
    +	RecommendationReasonCodeCheckResource                   = RecommendationReasonCode("checkResource")
    +	RecommendationReasonCodeUnreservedCapacity              = RecommendationReasonCode("unreservedCapacity")
    +	RecommendationReasonCodeVmHostHardAffinity              = RecommendationReasonCode("vmHostHardAffinity")
    +	RecommendationReasonCodeVmHostSoftAffinity              = RecommendationReasonCode("vmHostSoftAffinity")
    +	RecommendationReasonCodeBalanceDatastoreSpaceUsage      = RecommendationReasonCode("balanceDatastoreSpaceUsage")
    +	RecommendationReasonCodeBalanceDatastoreIOLoad          = RecommendationReasonCode("balanceDatastoreIOLoad")
    +	RecommendationReasonCodeBalanceDatastoreIOPSReservation = RecommendationReasonCode("balanceDatastoreIOPSReservation")
    +	RecommendationReasonCodeDatastoreMaint                  = RecommendationReasonCode("datastoreMaint")
    +	RecommendationReasonCodeVirtualDiskJointAffin           = RecommendationReasonCode("virtualDiskJointAffin")
    +	RecommendationReasonCodeVirtualDiskAntiAffin            = RecommendationReasonCode("virtualDiskAntiAffin")
    +	RecommendationReasonCodeDatastoreSpaceOutage            = RecommendationReasonCode("datastoreSpaceOutage")
    +	RecommendationReasonCodeStoragePlacement                = RecommendationReasonCode("storagePlacement")
    +	RecommendationReasonCodeIolbDisabledInternal            = RecommendationReasonCode("iolbDisabledInternal")
    +	RecommendationReasonCodeXvmotionPlacement               = RecommendationReasonCode("xvmotionPlacement")
    +	RecommendationReasonCodeNetworkBandwidthReservation     = RecommendationReasonCode("networkBandwidthReservation")
    +	RecommendationReasonCodeHostInDegradation               = RecommendationReasonCode("hostInDegradation")
    +	RecommendationReasonCodeHostExitDegradation             = RecommendationReasonCode("hostExitDegradation")
    +	RecommendationReasonCodeMaxVmsConstraint                = RecommendationReasonCode("maxVmsConstraint")
    +	RecommendationReasonCodeFtConstraints                   = RecommendationReasonCode("ftConstraints")
    +)
    +
    +func init() {
    +	t["RecommendationReasonCode"] = reflect.TypeOf((*RecommendationReasonCode)(nil)).Elem()
    +}
    +
    +type RecommendationType string
    +
    +const (
    +	RecommendationTypeV1 = RecommendationType("V1")
    +)
    +
    +func init() {
    +	t["RecommendationType"] = reflect.TypeOf((*RecommendationType)(nil)).Elem()
    +}
    +
    +type ReplicationDiskConfigFaultReasonForFault string
    +
    +const (
    +	ReplicationDiskConfigFaultReasonForFaultDiskNotFound                           = ReplicationDiskConfigFaultReasonForFault("diskNotFound")
    +	ReplicationDiskConfigFaultReasonForFaultDiskTypeNotSupported                   = ReplicationDiskConfigFaultReasonForFault("diskTypeNotSupported")
    +	ReplicationDiskConfigFaultReasonForFaultInvalidDiskKey                         = ReplicationDiskConfigFaultReasonForFault("invalidDiskKey")
    +	ReplicationDiskConfigFaultReasonForFaultInvalidDiskReplicationId               = ReplicationDiskConfigFaultReasonForFault("invalidDiskReplicationId")
    +	ReplicationDiskConfigFaultReasonForFaultDuplicateDiskReplicationId             = ReplicationDiskConfigFaultReasonForFault("duplicateDiskReplicationId")
    +	ReplicationDiskConfigFaultReasonForFaultInvalidPersistentFilePath              = ReplicationDiskConfigFaultReasonForFault("invalidPersistentFilePath")
    +	ReplicationDiskConfigFaultReasonForFaultReconfigureDiskReplicationIdNotAllowed = ReplicationDiskConfigFaultReasonForFault("reconfigureDiskReplicationIdNotAllowed")
    +)
    +
    +func init() {
    +	t["ReplicationDiskConfigFaultReasonForFault"] = reflect.TypeOf((*ReplicationDiskConfigFaultReasonForFault)(nil)).Elem()
    +}
    +
    +type ReplicationVmConfigFaultReasonForFault string
    +
    +const (
    +	ReplicationVmConfigFaultReasonForFaultIncompatibleHwVersion                    = ReplicationVmConfigFaultReasonForFault("incompatibleHwVersion")
    +	ReplicationVmConfigFaultReasonForFaultInvalidVmReplicationId                   = ReplicationVmConfigFaultReasonForFault("invalidVmReplicationId")
    +	ReplicationVmConfigFaultReasonForFaultInvalidGenerationNumber                  = ReplicationVmConfigFaultReasonForFault("invalidGenerationNumber")
    +	ReplicationVmConfigFaultReasonForFaultOutOfBoundsRpoValue                      = ReplicationVmConfigFaultReasonForFault("outOfBoundsRpoValue")
    +	ReplicationVmConfigFaultReasonForFaultInvalidDestinationIpAddress              = ReplicationVmConfigFaultReasonForFault("invalidDestinationIpAddress")
    +	ReplicationVmConfigFaultReasonForFaultInvalidDestinationPort                   = ReplicationVmConfigFaultReasonForFault("invalidDestinationPort")
    +	ReplicationVmConfigFaultReasonForFaultInvalidExtraVmOptions                    = ReplicationVmConfigFaultReasonForFault("invalidExtraVmOptions")
    +	ReplicationVmConfigFaultReasonForFaultStaleGenerationNumber                    = ReplicationVmConfigFaultReasonForFault("staleGenerationNumber")
    +	ReplicationVmConfigFaultReasonForFaultReconfigureVmReplicationIdNotAllowed     = ReplicationVmConfigFaultReasonForFault("reconfigureVmReplicationIdNotAllowed")
    +	ReplicationVmConfigFaultReasonForFaultCannotRetrieveVmReplicationConfiguration = ReplicationVmConfigFaultReasonForFault("cannotRetrieveVmReplicationConfiguration")
    +	ReplicationVmConfigFaultReasonForFaultReplicationAlreadyEnabled                = ReplicationVmConfigFaultReasonForFault("replicationAlreadyEnabled")
    +	ReplicationVmConfigFaultReasonForFaultInvalidPriorConfiguration                = ReplicationVmConfigFaultReasonForFault("invalidPriorConfiguration")
    +	ReplicationVmConfigFaultReasonForFaultReplicationNotEnabled                    = ReplicationVmConfigFaultReasonForFault("replicationNotEnabled")
    +	ReplicationVmConfigFaultReasonForFaultReplicationConfigurationFailed           = ReplicationVmConfigFaultReasonForFault("replicationConfigurationFailed")
    +	ReplicationVmConfigFaultReasonForFaultEncryptedVm                              = ReplicationVmConfigFaultReasonForFault("encryptedVm")
    +	ReplicationVmConfigFaultReasonForFaultInvalidThumbprint                        = ReplicationVmConfigFaultReasonForFault("invalidThumbprint")
    +	ReplicationVmConfigFaultReasonForFaultIncompatibleDevice                       = ReplicationVmConfigFaultReasonForFault("incompatibleDevice")
    +)
    +
    +func init() {
    +	t["ReplicationVmConfigFaultReasonForFault"] = reflect.TypeOf((*ReplicationVmConfigFaultReasonForFault)(nil)).Elem()
    +}
    +
    +type ReplicationVmFaultReasonForFault string
    +
    +const (
    +	ReplicationVmFaultReasonForFaultNotConfigured      = ReplicationVmFaultReasonForFault("notConfigured")
    +	ReplicationVmFaultReasonForFaultPoweredOff         = ReplicationVmFaultReasonForFault("poweredOff")
    +	ReplicationVmFaultReasonForFaultSuspended          = ReplicationVmFaultReasonForFault("suspended")
    +	ReplicationVmFaultReasonForFaultPoweredOn          = ReplicationVmFaultReasonForFault("poweredOn")
    +	ReplicationVmFaultReasonForFaultOfflineReplicating = ReplicationVmFaultReasonForFault("offlineReplicating")
    +	ReplicationVmFaultReasonForFaultInvalidState       = ReplicationVmFaultReasonForFault("invalidState")
    +	ReplicationVmFaultReasonForFaultInvalidInstanceId  = ReplicationVmFaultReasonForFault("invalidInstanceId")
    +	ReplicationVmFaultReasonForFaultCloseDiskError     = ReplicationVmFaultReasonForFault("closeDiskError")
    +	ReplicationVmFaultReasonForFaultGroupExist         = ReplicationVmFaultReasonForFault("groupExist")
    +)
    +
    +func init() {
    +	t["ReplicationVmFaultReasonForFault"] = reflect.TypeOf((*ReplicationVmFaultReasonForFault)(nil)).Elem()
    +}
    +
    +type ReplicationVmInProgressFaultActivity string
    +
    +const (
    +	ReplicationVmInProgressFaultActivityFullSync = ReplicationVmInProgressFaultActivity("fullSync")
    +	ReplicationVmInProgressFaultActivityDelta    = ReplicationVmInProgressFaultActivity("delta")
    +)
    +
    +func init() {
    +	t["ReplicationVmInProgressFaultActivity"] = reflect.TypeOf((*ReplicationVmInProgressFaultActivity)(nil)).Elem()
    +}
    +
    +type ReplicationVmState string
    +
    +const (
    +	ReplicationVmStateNone    = ReplicationVmState("none")
    +	ReplicationVmStatePaused  = ReplicationVmState("paused")
    +	ReplicationVmStateSyncing = ReplicationVmState("syncing")
    +	ReplicationVmStateIdle    = ReplicationVmState("idle")
    +	ReplicationVmStateActive  = ReplicationVmState("active")
    +	ReplicationVmStateError   = ReplicationVmState("error")
    +)
    +
    +func init() {
    +	t["ReplicationVmState"] = reflect.TypeOf((*ReplicationVmState)(nil)).Elem()
    +}
    +
    +type ScheduledHardwareUpgradeInfoHardwareUpgradePolicy string
    +
    +const (
    +	ScheduledHardwareUpgradeInfoHardwareUpgradePolicyNever          = ScheduledHardwareUpgradeInfoHardwareUpgradePolicy("never")
    +	ScheduledHardwareUpgradeInfoHardwareUpgradePolicyOnSoftPowerOff = ScheduledHardwareUpgradeInfoHardwareUpgradePolicy("onSoftPowerOff")
    +	ScheduledHardwareUpgradeInfoHardwareUpgradePolicyAlways         = ScheduledHardwareUpgradeInfoHardwareUpgradePolicy("always")
    +)
    +
    +func init() {
    +	t["ScheduledHardwareUpgradeInfoHardwareUpgradePolicy"] = reflect.TypeOf((*ScheduledHardwareUpgradeInfoHardwareUpgradePolicy)(nil)).Elem()
    +}
    +
    +type ScheduledHardwareUpgradeInfoHardwareUpgradeStatus string
    +
    +const (
    +	ScheduledHardwareUpgradeInfoHardwareUpgradeStatusNone    = ScheduledHardwareUpgradeInfoHardwareUpgradeStatus("none")
    +	ScheduledHardwareUpgradeInfoHardwareUpgradeStatusPending = ScheduledHardwareUpgradeInfoHardwareUpgradeStatus("pending")
    +	ScheduledHardwareUpgradeInfoHardwareUpgradeStatusSuccess = ScheduledHardwareUpgradeInfoHardwareUpgradeStatus("success")
    +	ScheduledHardwareUpgradeInfoHardwareUpgradeStatusFailed  = ScheduledHardwareUpgradeInfoHardwareUpgradeStatus("failed")
    +)
    +
    +func init() {
    +	t["ScheduledHardwareUpgradeInfoHardwareUpgradeStatus"] = reflect.TypeOf((*ScheduledHardwareUpgradeInfoHardwareUpgradeStatus)(nil)).Elem()
    +}
    +
    +type ScsiDiskType string
    +
    +const (
    +	ScsiDiskTypeNative512          = ScsiDiskType("native512")
    +	ScsiDiskTypeEmulated512        = ScsiDiskType("emulated512")
    +	ScsiDiskTypeNative4k           = ScsiDiskType("native4k")
    +	ScsiDiskTypeSoftwareEmulated4k = ScsiDiskType("SoftwareEmulated4k")
    +	ScsiDiskTypeUnknown            = ScsiDiskType("unknown")
    +)
    +
    +func init() {
    +	t["ScsiDiskType"] = reflect.TypeOf((*ScsiDiskType)(nil)).Elem()
    +}
    +
    +type ScsiLunDescriptorQuality string
    +
    +const (
    +	ScsiLunDescriptorQualityHighQuality    = ScsiLunDescriptorQuality("highQuality")
    +	ScsiLunDescriptorQualityMediumQuality  = ScsiLunDescriptorQuality("mediumQuality")
    +	ScsiLunDescriptorQualityLowQuality     = ScsiLunDescriptorQuality("lowQuality")
    +	ScsiLunDescriptorQualityUnknownQuality = ScsiLunDescriptorQuality("unknownQuality")
    +)
    +
    +func init() {
    +	t["ScsiLunDescriptorQuality"] = reflect.TypeOf((*ScsiLunDescriptorQuality)(nil)).Elem()
    +}
    +
    +type ScsiLunState string
    +
    +const (
    +	ScsiLunStateUnknownState      = ScsiLunState("unknownState")
    +	ScsiLunStateOk                = ScsiLunState("ok")
    +	ScsiLunStateError             = ScsiLunState("error")
    +	ScsiLunStateOff               = ScsiLunState("off")
    +	ScsiLunStateQuiesced          = ScsiLunState("quiesced")
    +	ScsiLunStateDegraded          = ScsiLunState("degraded")
    +	ScsiLunStateLostCommunication = ScsiLunState("lostCommunication")
    +	ScsiLunStateTimeout           = ScsiLunState("timeout")
    +)
    +
    +func init() {
    +	t["ScsiLunState"] = reflect.TypeOf((*ScsiLunState)(nil)).Elem()
    +}
    +
    +type ScsiLunType string
    +
    +const (
    +	ScsiLunTypeDisk                   = ScsiLunType("disk")
    +	ScsiLunTypeTape                   = ScsiLunType("tape")
    +	ScsiLunTypePrinter                = ScsiLunType("printer")
    +	ScsiLunTypeProcessor              = ScsiLunType("processor")
    +	ScsiLunTypeWorm                   = ScsiLunType("worm")
    +	ScsiLunTypeCdrom                  = ScsiLunType("cdrom")
    +	ScsiLunTypeScanner                = ScsiLunType("scanner")
    +	ScsiLunTypeOpticalDevice          = ScsiLunType("opticalDevice")
    +	ScsiLunTypeMediaChanger           = ScsiLunType("mediaChanger")
    +	ScsiLunTypeCommunications         = ScsiLunType("communications")
    +	ScsiLunTypeStorageArrayController = ScsiLunType("storageArrayController")
    +	ScsiLunTypeEnclosure              = ScsiLunType("enclosure")
    +	ScsiLunTypeUnknown                = ScsiLunType("unknown")
    +)
    +
    +func init() {
    +	t["ScsiLunType"] = reflect.TypeOf((*ScsiLunType)(nil)).Elem()
    +}
    +
    +type ScsiLunVStorageSupportStatus string
    +
    +const (
    +	ScsiLunVStorageSupportStatusVStorageSupported   = ScsiLunVStorageSupportStatus("vStorageSupported")
    +	ScsiLunVStorageSupportStatusVStorageUnsupported = ScsiLunVStorageSupportStatus("vStorageUnsupported")
    +	ScsiLunVStorageSupportStatusVStorageUnknown     = ScsiLunVStorageSupportStatus("vStorageUnknown")
    +)
    +
    +func init() {
    +	t["ScsiLunVStorageSupportStatus"] = reflect.TypeOf((*ScsiLunVStorageSupportStatus)(nil)).Elem()
    +}
    +
    +type SessionManagerHttpServiceRequestSpecMethod string
    +
    +const (
    +	SessionManagerHttpServiceRequestSpecMethodHttpOptions = SessionManagerHttpServiceRequestSpecMethod("httpOptions")
    +	SessionManagerHttpServiceRequestSpecMethodHttpGet     = SessionManagerHttpServiceRequestSpecMethod("httpGet")
    +	SessionManagerHttpServiceRequestSpecMethodHttpHead    = SessionManagerHttpServiceRequestSpecMethod("httpHead")
    +	SessionManagerHttpServiceRequestSpecMethodHttpPost    = SessionManagerHttpServiceRequestSpecMethod("httpPost")
    +	SessionManagerHttpServiceRequestSpecMethodHttpPut     = SessionManagerHttpServiceRequestSpecMethod("httpPut")
    +	SessionManagerHttpServiceRequestSpecMethodHttpDelete  = SessionManagerHttpServiceRequestSpecMethod("httpDelete")
    +	SessionManagerHttpServiceRequestSpecMethodHttpTrace   = SessionManagerHttpServiceRequestSpecMethod("httpTrace")
    +	SessionManagerHttpServiceRequestSpecMethodHttpConnect = SessionManagerHttpServiceRequestSpecMethod("httpConnect")
    +)
    +
    +func init() {
    +	t["SessionManagerHttpServiceRequestSpecMethod"] = reflect.TypeOf((*SessionManagerHttpServiceRequestSpecMethod)(nil)).Elem()
    +}
    +
    +type SharesLevel string
    +
    +const (
    +	SharesLevelLow    = SharesLevel("low")
    +	SharesLevelNormal = SharesLevel("normal")
    +	SharesLevelHigh   = SharesLevel("high")
    +	SharesLevelCustom = SharesLevel("custom")
    +)
    +
    +func init() {
    +	t["SharesLevel"] = reflect.TypeOf((*SharesLevel)(nil)).Elem()
    +}
    +
    +type SimpleCommandEncoding string
    +
    +const (
    +	SimpleCommandEncodingCSV    = SimpleCommandEncoding("CSV")
    +	SimpleCommandEncodingHEX    = SimpleCommandEncoding("HEX")
    +	SimpleCommandEncodingSTRING = SimpleCommandEncoding("STRING")
    +)
    +
    +func init() {
    +	t["SimpleCommandEncoding"] = reflect.TypeOf((*SimpleCommandEncoding)(nil)).Elem()
    +}
    +
    +type SlpDiscoveryMethod string
    +
    +const (
    +	SlpDiscoveryMethodSlpDhcp          = SlpDiscoveryMethod("slpDhcp")
    +	SlpDiscoveryMethodSlpAutoUnicast   = SlpDiscoveryMethod("slpAutoUnicast")
    +	SlpDiscoveryMethodSlpAutoMulticast = SlpDiscoveryMethod("slpAutoMulticast")
    +	SlpDiscoveryMethodSlpManual        = SlpDiscoveryMethod("slpManual")
    +)
    +
    +func init() {
    +	t["SlpDiscoveryMethod"] = reflect.TypeOf((*SlpDiscoveryMethod)(nil)).Elem()
    +}
    +
    +type SoftwarePackageConstraint string
    +
    +const (
    +	SoftwarePackageConstraintEquals           = SoftwarePackageConstraint("equals")
    +	SoftwarePackageConstraintLessThan         = SoftwarePackageConstraint("lessThan")
    +	SoftwarePackageConstraintLessThanEqual    = SoftwarePackageConstraint("lessThanEqual")
    +	SoftwarePackageConstraintGreaterThanEqual = SoftwarePackageConstraint("greaterThanEqual")
    +	SoftwarePackageConstraintGreaterThan      = SoftwarePackageConstraint("greaterThan")
    +)
    +
    +func init() {
    +	t["SoftwarePackageConstraint"] = reflect.TypeOf((*SoftwarePackageConstraint)(nil)).Elem()
    +}
    +
    +type SoftwarePackageVibType string
    +
    +const (
    +	SoftwarePackageVibTypeBootbank = SoftwarePackageVibType("bootbank")
    +	SoftwarePackageVibTypeTools    = SoftwarePackageVibType("tools")
    +	SoftwarePackageVibTypeMeta     = SoftwarePackageVibType("meta")
    +)
    +
    +func init() {
    +	t["SoftwarePackageVibType"] = reflect.TypeOf((*SoftwarePackageVibType)(nil)).Elem()
    +}
    +
    +type StateAlarmOperator string
    +
    +const (
    +	StateAlarmOperatorIsEqual   = StateAlarmOperator("isEqual")
    +	StateAlarmOperatorIsUnequal = StateAlarmOperator("isUnequal")
    +)
    +
    +func init() {
    +	t["StateAlarmOperator"] = reflect.TypeOf((*StateAlarmOperator)(nil)).Elem()
    +}
    +
    +type StorageDrsPodConfigInfoBehavior string
    +
    +const (
    +	StorageDrsPodConfigInfoBehaviorManual    = StorageDrsPodConfigInfoBehavior("manual")
    +	StorageDrsPodConfigInfoBehaviorAutomated = StorageDrsPodConfigInfoBehavior("automated")
    +)
    +
    +func init() {
    +	t["StorageDrsPodConfigInfoBehavior"] = reflect.TypeOf((*StorageDrsPodConfigInfoBehavior)(nil)).Elem()
    +}
    +
    +type StorageDrsSpaceLoadBalanceConfigSpaceThresholdMode string
    +
    +const (
    +	StorageDrsSpaceLoadBalanceConfigSpaceThresholdModeUtilization = StorageDrsSpaceLoadBalanceConfigSpaceThresholdMode("utilization")
    +	StorageDrsSpaceLoadBalanceConfigSpaceThresholdModeFreeSpace   = StorageDrsSpaceLoadBalanceConfigSpaceThresholdMode("freeSpace")
    +)
    +
    +func init() {
    +	t["StorageDrsSpaceLoadBalanceConfigSpaceThresholdMode"] = reflect.TypeOf((*StorageDrsSpaceLoadBalanceConfigSpaceThresholdMode)(nil)).Elem()
    +}
    +
    +type StorageIORMThresholdMode string
    +
    +const (
    +	StorageIORMThresholdModeAutomatic = StorageIORMThresholdMode("automatic")
    +	StorageIORMThresholdModeManual    = StorageIORMThresholdMode("manual")
    +)
    +
    +func init() {
    +	t["StorageIORMThresholdMode"] = reflect.TypeOf((*StorageIORMThresholdMode)(nil)).Elem()
    +}
    +
    +type StoragePlacementSpecPlacementType string
    +
    +const (
    +	StoragePlacementSpecPlacementTypeCreate      = StoragePlacementSpecPlacementType("create")
    +	StoragePlacementSpecPlacementTypeReconfigure = StoragePlacementSpecPlacementType("reconfigure")
    +	StoragePlacementSpecPlacementTypeRelocate    = StoragePlacementSpecPlacementType("relocate")
    +	StoragePlacementSpecPlacementTypeClone       = StoragePlacementSpecPlacementType("clone")
    +)
    +
    +func init() {
    +	t["StoragePlacementSpecPlacementType"] = reflect.TypeOf((*StoragePlacementSpecPlacementType)(nil)).Elem()
    +}
    +
    +type TaskFilterSpecRecursionOption string
    +
    +const (
    +	TaskFilterSpecRecursionOptionSelf     = TaskFilterSpecRecursionOption("self")
    +	TaskFilterSpecRecursionOptionChildren = TaskFilterSpecRecursionOption("children")
    +	TaskFilterSpecRecursionOptionAll      = TaskFilterSpecRecursionOption("all")
    +)
    +
    +func init() {
    +	t["TaskFilterSpecRecursionOption"] = reflect.TypeOf((*TaskFilterSpecRecursionOption)(nil)).Elem()
    +}
    +
    +type TaskFilterSpecTimeOption string
    +
    +const (
    +	TaskFilterSpecTimeOptionQueuedTime    = TaskFilterSpecTimeOption("queuedTime")
    +	TaskFilterSpecTimeOptionStartedTime   = TaskFilterSpecTimeOption("startedTime")
    +	TaskFilterSpecTimeOptionCompletedTime = TaskFilterSpecTimeOption("completedTime")
    +)
    +
    +func init() {
    +	t["TaskFilterSpecTimeOption"] = reflect.TypeOf((*TaskFilterSpecTimeOption)(nil)).Elem()
    +}
    +
    +type TaskInfoState string
    +
    +const (
    +	TaskInfoStateQueued  = TaskInfoState("queued")
    +	TaskInfoStateRunning = TaskInfoState("running")
    +	TaskInfoStateSuccess = TaskInfoState("success")
    +	TaskInfoStateError   = TaskInfoState("error")
    +)
    +
    +func init() {
    +	t["TaskInfoState"] = reflect.TypeOf((*TaskInfoState)(nil)).Elem()
    +}
    +
    +type ThirdPartyLicenseAssignmentFailedReason string
    +
    +const (
    +	ThirdPartyLicenseAssignmentFailedReasonLicenseAssignmentFailed = ThirdPartyLicenseAssignmentFailedReason("licenseAssignmentFailed")
    +	ThirdPartyLicenseAssignmentFailedReasonModuleNotInstalled      = ThirdPartyLicenseAssignmentFailedReason("moduleNotInstalled")
    +)
    +
    +func init() {
    +	t["ThirdPartyLicenseAssignmentFailedReason"] = reflect.TypeOf((*ThirdPartyLicenseAssignmentFailedReason)(nil)).Elem()
    +}
    +
    +type UpgradePolicy string
    +
    +const (
    +	UpgradePolicyManual              = UpgradePolicy("manual")
    +	UpgradePolicyUpgradeAtPowerCycle = UpgradePolicy("upgradeAtPowerCycle")
    +)
    +
    +func init() {
    +	t["UpgradePolicy"] = reflect.TypeOf((*UpgradePolicy)(nil)).Elem()
    +}
    +
    +type VAppAutoStartAction string
    +
    +const (
    +	VAppAutoStartActionNone          = VAppAutoStartAction("none")
    +	VAppAutoStartActionPowerOn       = VAppAutoStartAction("powerOn")
    +	VAppAutoStartActionPowerOff      = VAppAutoStartAction("powerOff")
    +	VAppAutoStartActionGuestShutdown = VAppAutoStartAction("guestShutdown")
    +	VAppAutoStartActionSuspend       = VAppAutoStartAction("suspend")
    +)
    +
    +func init() {
    +	t["VAppAutoStartAction"] = reflect.TypeOf((*VAppAutoStartAction)(nil)).Elem()
    +}
    +
    +type VAppCloneSpecProvisioningType string
    +
    +const (
    +	VAppCloneSpecProvisioningTypeSameAsSource = VAppCloneSpecProvisioningType("sameAsSource")
    +	VAppCloneSpecProvisioningTypeThin         = VAppCloneSpecProvisioningType("thin")
    +	VAppCloneSpecProvisioningTypeThick        = VAppCloneSpecProvisioningType("thick")
    +)
    +
    +func init() {
    +	t["VAppCloneSpecProvisioningType"] = reflect.TypeOf((*VAppCloneSpecProvisioningType)(nil)).Elem()
    +}
    +
    +type VAppIPAssignmentInfoAllocationSchemes string
    +
    +const (
    +	VAppIPAssignmentInfoAllocationSchemesDhcp   = VAppIPAssignmentInfoAllocationSchemes("dhcp")
    +	VAppIPAssignmentInfoAllocationSchemesOvfenv = VAppIPAssignmentInfoAllocationSchemes("ovfenv")
    +)
    +
    +func init() {
    +	t["VAppIPAssignmentInfoAllocationSchemes"] = reflect.TypeOf((*VAppIPAssignmentInfoAllocationSchemes)(nil)).Elem()
    +}
    +
    +type VAppIPAssignmentInfoIpAllocationPolicy string
    +
    +const (
    +	VAppIPAssignmentInfoIpAllocationPolicyDhcpPolicy           = VAppIPAssignmentInfoIpAllocationPolicy("dhcpPolicy")
    +	VAppIPAssignmentInfoIpAllocationPolicyTransientPolicy      = VAppIPAssignmentInfoIpAllocationPolicy("transientPolicy")
    +	VAppIPAssignmentInfoIpAllocationPolicyFixedPolicy          = VAppIPAssignmentInfoIpAllocationPolicy("fixedPolicy")
    +	VAppIPAssignmentInfoIpAllocationPolicyFixedAllocatedPolicy = VAppIPAssignmentInfoIpAllocationPolicy("fixedAllocatedPolicy")
    +)
    +
    +func init() {
    +	t["VAppIPAssignmentInfoIpAllocationPolicy"] = reflect.TypeOf((*VAppIPAssignmentInfoIpAllocationPolicy)(nil)).Elem()
    +}
    +
    +type VAppIPAssignmentInfoProtocols string
    +
    +const (
    +	VAppIPAssignmentInfoProtocolsIPv4 = VAppIPAssignmentInfoProtocols("IPv4")
    +	VAppIPAssignmentInfoProtocolsIPv6 = VAppIPAssignmentInfoProtocols("IPv6")
    +)
    +
    +func init() {
    +	t["VAppIPAssignmentInfoProtocols"] = reflect.TypeOf((*VAppIPAssignmentInfoProtocols)(nil)).Elem()
    +}
    +
    +type VFlashModuleNotSupportedReason string
    +
    +const (
    +	VFlashModuleNotSupportedReasonCacheModeNotSupported            = VFlashModuleNotSupportedReason("CacheModeNotSupported")
    +	VFlashModuleNotSupportedReasonCacheConsistencyTypeNotSupported = VFlashModuleNotSupportedReason("CacheConsistencyTypeNotSupported")
    +	VFlashModuleNotSupportedReasonCacheBlockSizeNotSupported       = VFlashModuleNotSupportedReason("CacheBlockSizeNotSupported")
    +	VFlashModuleNotSupportedReasonCacheReservationNotSupported     = VFlashModuleNotSupportedReason("CacheReservationNotSupported")
    +	VFlashModuleNotSupportedReasonDiskSizeNotSupported             = VFlashModuleNotSupportedReason("DiskSizeNotSupported")
    +)
    +
    +func init() {
    +	t["VFlashModuleNotSupportedReason"] = reflect.TypeOf((*VFlashModuleNotSupportedReason)(nil)).Elem()
    +}
    +
    +type VMotionCompatibilityType string
    +
    +const (
    +	VMotionCompatibilityTypeCpu      = VMotionCompatibilityType("cpu")
    +	VMotionCompatibilityTypeSoftware = VMotionCompatibilityType("software")
    +)
    +
    +func init() {
    +	t["VMotionCompatibilityType"] = reflect.TypeOf((*VMotionCompatibilityType)(nil)).Elem()
    +}
    +
    +type VMwareDVSTeamingMatchStatus string
    +
    +const (
    +	VMwareDVSTeamingMatchStatusIphashMatch       = VMwareDVSTeamingMatchStatus("iphashMatch")
    +	VMwareDVSTeamingMatchStatusNonIphashMatch    = VMwareDVSTeamingMatchStatus("nonIphashMatch")
    +	VMwareDVSTeamingMatchStatusIphashMismatch    = VMwareDVSTeamingMatchStatus("iphashMismatch")
    +	VMwareDVSTeamingMatchStatusNonIphashMismatch = VMwareDVSTeamingMatchStatus("nonIphashMismatch")
    +)
    +
    +func init() {
    +	t["VMwareDVSTeamingMatchStatus"] = reflect.TypeOf((*VMwareDVSTeamingMatchStatus)(nil)).Elem()
    +}
    +
    +type VMwareDVSVspanSessionEncapType string
    +
    +const (
    +	VMwareDVSVspanSessionEncapTypeGre     = VMwareDVSVspanSessionEncapType("gre")
    +	VMwareDVSVspanSessionEncapTypeErspan2 = VMwareDVSVspanSessionEncapType("erspan2")
    +	VMwareDVSVspanSessionEncapTypeErspan3 = VMwareDVSVspanSessionEncapType("erspan3")
    +)
    +
    +func init() {
    +	t["VMwareDVSVspanSessionEncapType"] = reflect.TypeOf((*VMwareDVSVspanSessionEncapType)(nil)).Elem()
    +}
    +
    +type VMwareDVSVspanSessionType string
    +
    +const (
    +	VMwareDVSVspanSessionTypeMixedDestMirror                = VMwareDVSVspanSessionType("mixedDestMirror")
    +	VMwareDVSVspanSessionTypeDvPortMirror                   = VMwareDVSVspanSessionType("dvPortMirror")
    +	VMwareDVSVspanSessionTypeRemoteMirrorSource             = VMwareDVSVspanSessionType("remoteMirrorSource")
    +	VMwareDVSVspanSessionTypeRemoteMirrorDest               = VMwareDVSVspanSessionType("remoteMirrorDest")
    +	VMwareDVSVspanSessionTypeEncapsulatedRemoteMirrorSource = VMwareDVSVspanSessionType("encapsulatedRemoteMirrorSource")
    +)
    +
    +func init() {
    +	t["VMwareDVSVspanSessionType"] = reflect.TypeOf((*VMwareDVSVspanSessionType)(nil)).Elem()
    +}
    +
    +type VMwareDvsLacpApiVersion string
    +
    +const (
    +	VMwareDvsLacpApiVersionSingleLag   = VMwareDvsLacpApiVersion("singleLag")
    +	VMwareDvsLacpApiVersionMultipleLag = VMwareDvsLacpApiVersion("multipleLag")
    +)
    +
    +func init() {
    +	t["VMwareDvsLacpApiVersion"] = reflect.TypeOf((*VMwareDvsLacpApiVersion)(nil)).Elem()
    +}
    +
    +type VMwareDvsLacpLoadBalanceAlgorithm string
    +
    +const (
    +	VMwareDvsLacpLoadBalanceAlgorithmSrcMac                  = VMwareDvsLacpLoadBalanceAlgorithm("srcMac")
    +	VMwareDvsLacpLoadBalanceAlgorithmDestMac                 = VMwareDvsLacpLoadBalanceAlgorithm("destMac")
    +	VMwareDvsLacpLoadBalanceAlgorithmSrcDestMac              = VMwareDvsLacpLoadBalanceAlgorithm("srcDestMac")
    +	VMwareDvsLacpLoadBalanceAlgorithmDestIpVlan              = VMwareDvsLacpLoadBalanceAlgorithm("destIpVlan")
    +	VMwareDvsLacpLoadBalanceAlgorithmSrcIpVlan               = VMwareDvsLacpLoadBalanceAlgorithm("srcIpVlan")
    +	VMwareDvsLacpLoadBalanceAlgorithmSrcDestIpVlan           = VMwareDvsLacpLoadBalanceAlgorithm("srcDestIpVlan")
    +	VMwareDvsLacpLoadBalanceAlgorithmDestTcpUdpPort          = VMwareDvsLacpLoadBalanceAlgorithm("destTcpUdpPort")
    +	VMwareDvsLacpLoadBalanceAlgorithmSrcTcpUdpPort           = VMwareDvsLacpLoadBalanceAlgorithm("srcTcpUdpPort")
    +	VMwareDvsLacpLoadBalanceAlgorithmSrcDestTcpUdpPort       = VMwareDvsLacpLoadBalanceAlgorithm("srcDestTcpUdpPort")
    +	VMwareDvsLacpLoadBalanceAlgorithmDestIpTcpUdpPort        = VMwareDvsLacpLoadBalanceAlgorithm("destIpTcpUdpPort")
    +	VMwareDvsLacpLoadBalanceAlgorithmSrcIpTcpUdpPort         = VMwareDvsLacpLoadBalanceAlgorithm("srcIpTcpUdpPort")
    +	VMwareDvsLacpLoadBalanceAlgorithmSrcDestIpTcpUdpPort     = VMwareDvsLacpLoadBalanceAlgorithm("srcDestIpTcpUdpPort")
    +	VMwareDvsLacpLoadBalanceAlgorithmDestIpTcpUdpPortVlan    = VMwareDvsLacpLoadBalanceAlgorithm("destIpTcpUdpPortVlan")
    +	VMwareDvsLacpLoadBalanceAlgorithmSrcIpTcpUdpPortVlan     = VMwareDvsLacpLoadBalanceAlgorithm("srcIpTcpUdpPortVlan")
    +	VMwareDvsLacpLoadBalanceAlgorithmSrcDestIpTcpUdpPortVlan = VMwareDvsLacpLoadBalanceAlgorithm("srcDestIpTcpUdpPortVlan")
    +	VMwareDvsLacpLoadBalanceAlgorithmDestIp                  = VMwareDvsLacpLoadBalanceAlgorithm("destIp")
    +	VMwareDvsLacpLoadBalanceAlgorithmSrcIp                   = VMwareDvsLacpLoadBalanceAlgorithm("srcIp")
    +	VMwareDvsLacpLoadBalanceAlgorithmSrcDestIp               = VMwareDvsLacpLoadBalanceAlgorithm("srcDestIp")
    +	VMwareDvsLacpLoadBalanceAlgorithmVlan                    = VMwareDvsLacpLoadBalanceAlgorithm("vlan")
    +	VMwareDvsLacpLoadBalanceAlgorithmSrcPortId               = VMwareDvsLacpLoadBalanceAlgorithm("srcPortId")
    +)
    +
    +func init() {
    +	t["VMwareDvsLacpLoadBalanceAlgorithm"] = reflect.TypeOf((*VMwareDvsLacpLoadBalanceAlgorithm)(nil)).Elem()
    +}
    +
    +type VMwareDvsMulticastFilteringMode string
    +
    +const (
    +	VMwareDvsMulticastFilteringModeLegacyFiltering = VMwareDvsMulticastFilteringMode("legacyFiltering")
    +	VMwareDvsMulticastFilteringModeSnooping        = VMwareDvsMulticastFilteringMode("snooping")
    +)
    +
    +func init() {
    +	t["VMwareDvsMulticastFilteringMode"] = reflect.TypeOf((*VMwareDvsMulticastFilteringMode)(nil)).Elem()
    +}
    +
    +type VMwareUplinkLacpMode string
    +
    +const (
    +	VMwareUplinkLacpModeActive  = VMwareUplinkLacpMode("active")
    +	VMwareUplinkLacpModePassive = VMwareUplinkLacpMode("passive")
    +)
    +
    +func init() {
    +	t["VMwareUplinkLacpMode"] = reflect.TypeOf((*VMwareUplinkLacpMode)(nil)).Elem()
    +}
    +
    +type VStorageObjectConsumptionType string
    +
    +const (
    +	VStorageObjectConsumptionTypeDisk = VStorageObjectConsumptionType("disk")
    +)
    +
    +func init() {
    +	t["VStorageObjectConsumptionType"] = reflect.TypeOf((*VStorageObjectConsumptionType)(nil)).Elem()
    +}
    +
    +type ValidateMigrationTestType string
    +
    +const (
    +	ValidateMigrationTestTypeSourceTests            = ValidateMigrationTestType("sourceTests")
    +	ValidateMigrationTestTypeCompatibilityTests     = ValidateMigrationTestType("compatibilityTests")
    +	ValidateMigrationTestTypeDiskAccessibilityTests = ValidateMigrationTestType("diskAccessibilityTests")
    +	ValidateMigrationTestTypeResourceTests          = ValidateMigrationTestType("resourceTests")
    +)
    +
    +func init() {
    +	t["ValidateMigrationTestType"] = reflect.TypeOf((*ValidateMigrationTestType)(nil)).Elem()
    +}
    +
    +type VchaClusterMode string
    +
    +const (
    +	VchaClusterModeEnabled     = VchaClusterMode("enabled")
    +	VchaClusterModeDisabled    = VchaClusterMode("disabled")
    +	VchaClusterModeMaintenance = VchaClusterMode("maintenance")
    +)
    +
    +func init() {
    +	t["VchaClusterMode"] = reflect.TypeOf((*VchaClusterMode)(nil)).Elem()
    +}
    +
    +type VchaClusterState string
    +
    +const (
    +	VchaClusterStateHealthy  = VchaClusterState("healthy")
    +	VchaClusterStateDegraded = VchaClusterState("degraded")
    +	VchaClusterStateIsolated = VchaClusterState("isolated")
    +)
    +
    +func init() {
    +	t["VchaClusterState"] = reflect.TypeOf((*VchaClusterState)(nil)).Elem()
    +}
    +
    +type VchaNodeRole string
    +
    +const (
    +	VchaNodeRoleActive  = VchaNodeRole("active")
    +	VchaNodeRolePassive = VchaNodeRole("passive")
    +	VchaNodeRoleWitness = VchaNodeRole("witness")
    +)
    +
    +func init() {
    +	t["VchaNodeRole"] = reflect.TypeOf((*VchaNodeRole)(nil)).Elem()
    +}
    +
    +type VchaNodeState string
    +
    +const (
    +	VchaNodeStateUp   = VchaNodeState("up")
    +	VchaNodeStateDown = VchaNodeState("down")
    +)
    +
    +func init() {
    +	t["VchaNodeState"] = reflect.TypeOf((*VchaNodeState)(nil)).Elem()
    +}
    +
    +type VchaState string
    +
    +const (
    +	VchaStateConfigured    = VchaState("configured")
    +	VchaStateNotConfigured = VchaState("notConfigured")
    +	VchaStateInvalid       = VchaState("invalid")
    +	VchaStatePrepared      = VchaState("prepared")
    +)
    +
    +func init() {
    +	t["VchaState"] = reflect.TypeOf((*VchaState)(nil)).Elem()
    +}
    +
    +type VirtualAppVAppState string
    +
    +const (
    +	VirtualAppVAppStateStarted  = VirtualAppVAppState("started")
    +	VirtualAppVAppStateStopped  = VirtualAppVAppState("stopped")
    +	VirtualAppVAppStateStarting = VirtualAppVAppState("starting")
    +	VirtualAppVAppStateStopping = VirtualAppVAppState("stopping")
    +)
    +
    +func init() {
    +	t["VirtualAppVAppState"] = reflect.TypeOf((*VirtualAppVAppState)(nil)).Elem()
    +}
    +
    +type VirtualDeviceConfigSpecFileOperation string
    +
    +const (
    +	VirtualDeviceConfigSpecFileOperationCreate  = VirtualDeviceConfigSpecFileOperation("create")
    +	VirtualDeviceConfigSpecFileOperationDestroy = VirtualDeviceConfigSpecFileOperation("destroy")
    +	VirtualDeviceConfigSpecFileOperationReplace = VirtualDeviceConfigSpecFileOperation("replace")
    +)
    +
    +func init() {
    +	t["VirtualDeviceConfigSpecFileOperation"] = reflect.TypeOf((*VirtualDeviceConfigSpecFileOperation)(nil)).Elem()
    +}
    +
    +type VirtualDeviceConfigSpecOperation string
    +
    +const (
    +	VirtualDeviceConfigSpecOperationAdd    = VirtualDeviceConfigSpecOperation("add")
    +	VirtualDeviceConfigSpecOperationRemove = VirtualDeviceConfigSpecOperation("remove")
    +	VirtualDeviceConfigSpecOperationEdit   = VirtualDeviceConfigSpecOperation("edit")
    +)
    +
    +func init() {
    +	t["VirtualDeviceConfigSpecOperation"] = reflect.TypeOf((*VirtualDeviceConfigSpecOperation)(nil)).Elem()
    +}
    +
    +type VirtualDeviceConnectInfoMigrateConnectOp string
    +
    +const (
    +	VirtualDeviceConnectInfoMigrateConnectOpConnect    = VirtualDeviceConnectInfoMigrateConnectOp("connect")
    +	VirtualDeviceConnectInfoMigrateConnectOpDisconnect = VirtualDeviceConnectInfoMigrateConnectOp("disconnect")
    +	VirtualDeviceConnectInfoMigrateConnectOpUnset      = VirtualDeviceConnectInfoMigrateConnectOp("unset")
    +)
    +
    +func init() {
    +	t["VirtualDeviceConnectInfoMigrateConnectOp"] = reflect.TypeOf((*VirtualDeviceConnectInfoMigrateConnectOp)(nil)).Elem()
    +}
    +
    +type VirtualDeviceConnectInfoStatus string
    +
    +const (
    +	VirtualDeviceConnectInfoStatusOk                 = VirtualDeviceConnectInfoStatus("ok")
    +	VirtualDeviceConnectInfoStatusRecoverableError   = VirtualDeviceConnectInfoStatus("recoverableError")
    +	VirtualDeviceConnectInfoStatusUnrecoverableError = VirtualDeviceConnectInfoStatus("unrecoverableError")
    +	VirtualDeviceConnectInfoStatusUntried            = VirtualDeviceConnectInfoStatus("untried")
    +)
    +
    +func init() {
    +	t["VirtualDeviceConnectInfoStatus"] = reflect.TypeOf((*VirtualDeviceConnectInfoStatus)(nil)).Elem()
    +}
    +
    +type VirtualDeviceFileExtension string
    +
    +const (
    +	VirtualDeviceFileExtensionIso  = VirtualDeviceFileExtension("iso")
    +	VirtualDeviceFileExtensionFlp  = VirtualDeviceFileExtension("flp")
    +	VirtualDeviceFileExtensionVmdk = VirtualDeviceFileExtension("vmdk")
    +	VirtualDeviceFileExtensionDsk  = VirtualDeviceFileExtension("dsk")
    +	VirtualDeviceFileExtensionRdm  = VirtualDeviceFileExtension("rdm")
    +)
    +
    +func init() {
    +	t["VirtualDeviceFileExtension"] = reflect.TypeOf((*VirtualDeviceFileExtension)(nil)).Elem()
    +}
    +
    +type VirtualDeviceURIBackingOptionDirection string
    +
    +const (
    +	VirtualDeviceURIBackingOptionDirectionServer = VirtualDeviceURIBackingOptionDirection("server")
    +	VirtualDeviceURIBackingOptionDirectionClient = VirtualDeviceURIBackingOptionDirection("client")
    +)
    +
    +func init() {
    +	t["VirtualDeviceURIBackingOptionDirection"] = reflect.TypeOf((*VirtualDeviceURIBackingOptionDirection)(nil)).Elem()
    +}
    +
    +type VirtualDiskAdapterType string
    +
    +const (
    +	VirtualDiskAdapterTypeIde      = VirtualDiskAdapterType("ide")
    +	VirtualDiskAdapterTypeBusLogic = VirtualDiskAdapterType("busLogic")
    +	VirtualDiskAdapterTypeLsiLogic = VirtualDiskAdapterType("lsiLogic")
    +)
    +
    +func init() {
    +	t["VirtualDiskAdapterType"] = reflect.TypeOf((*VirtualDiskAdapterType)(nil)).Elem()
    +}
    +
    +type VirtualDiskCompatibilityMode string
    +
    +const (
    +	VirtualDiskCompatibilityModeVirtualMode  = VirtualDiskCompatibilityMode("virtualMode")
    +	VirtualDiskCompatibilityModePhysicalMode = VirtualDiskCompatibilityMode("physicalMode")
    +)
    +
    +func init() {
    +	t["VirtualDiskCompatibilityMode"] = reflect.TypeOf((*VirtualDiskCompatibilityMode)(nil)).Elem()
    +}
    +
    +type VirtualDiskDeltaDiskFormat string
    +
    +const (
    +	VirtualDiskDeltaDiskFormatRedoLogFormat  = VirtualDiskDeltaDiskFormat("redoLogFormat")
    +	VirtualDiskDeltaDiskFormatNativeFormat   = VirtualDiskDeltaDiskFormat("nativeFormat")
    +	VirtualDiskDeltaDiskFormatSeSparseFormat = VirtualDiskDeltaDiskFormat("seSparseFormat")
    +)
    +
    +func init() {
    +	t["VirtualDiskDeltaDiskFormat"] = reflect.TypeOf((*VirtualDiskDeltaDiskFormat)(nil)).Elem()
    +}
    +
    +type VirtualDiskDeltaDiskFormatVariant string
    +
    +const (
    +	VirtualDiskDeltaDiskFormatVariantVmfsSparseVariant = VirtualDiskDeltaDiskFormatVariant("vmfsSparseVariant")
    +	VirtualDiskDeltaDiskFormatVariantVsanSparseVariant = VirtualDiskDeltaDiskFormatVariant("vsanSparseVariant")
    +)
    +
    +func init() {
    +	t["VirtualDiskDeltaDiskFormatVariant"] = reflect.TypeOf((*VirtualDiskDeltaDiskFormatVariant)(nil)).Elem()
    +}
    +
    +type VirtualDiskMode string
    +
    +const (
    +	VirtualDiskModePersistent                = VirtualDiskMode("persistent")
    +	VirtualDiskModeNonpersistent             = VirtualDiskMode("nonpersistent")
    +	VirtualDiskModeUndoable                  = VirtualDiskMode("undoable")
    +	VirtualDiskModeIndependent_persistent    = VirtualDiskMode("independent_persistent")
    +	VirtualDiskModeIndependent_nonpersistent = VirtualDiskMode("independent_nonpersistent")
    +	VirtualDiskModeAppend                    = VirtualDiskMode("append")
    +)
    +
    +func init() {
    +	t["VirtualDiskMode"] = reflect.TypeOf((*VirtualDiskMode)(nil)).Elem()
    +}
    +
    +type VirtualDiskRuleSpecRuleType string
    +
    +const (
    +	VirtualDiskRuleSpecRuleTypeAffinity     = VirtualDiskRuleSpecRuleType("affinity")
    +	VirtualDiskRuleSpecRuleTypeAntiAffinity = VirtualDiskRuleSpecRuleType("antiAffinity")
    +	VirtualDiskRuleSpecRuleTypeDisabled     = VirtualDiskRuleSpecRuleType("disabled")
    +)
    +
    +func init() {
    +	t["VirtualDiskRuleSpecRuleType"] = reflect.TypeOf((*VirtualDiskRuleSpecRuleType)(nil)).Elem()
    +}
    +
    +type VirtualDiskSharing string
    +
    +const (
    +	VirtualDiskSharingSharingNone        = VirtualDiskSharing("sharingNone")
    +	VirtualDiskSharingSharingMultiWriter = VirtualDiskSharing("sharingMultiWriter")
    +)
    +
    +func init() {
    +	t["VirtualDiskSharing"] = reflect.TypeOf((*VirtualDiskSharing)(nil)).Elem()
    +}
    +
    +type VirtualDiskType string
    +
    +const (
    +	VirtualDiskTypePreallocated     = VirtualDiskType("preallocated")
    +	VirtualDiskTypeThin             = VirtualDiskType("thin")
    +	VirtualDiskTypeSeSparse         = VirtualDiskType("seSparse")
    +	VirtualDiskTypeRdm              = VirtualDiskType("rdm")
    +	VirtualDiskTypeRdmp             = VirtualDiskType("rdmp")
    +	VirtualDiskTypeRaw              = VirtualDiskType("raw")
    +	VirtualDiskTypeDelta            = VirtualDiskType("delta")
    +	VirtualDiskTypeSparse2Gb        = VirtualDiskType("sparse2Gb")
    +	VirtualDiskTypeThick2Gb         = VirtualDiskType("thick2Gb")
    +	VirtualDiskTypeEagerZeroedThick = VirtualDiskType("eagerZeroedThick")
    +	VirtualDiskTypeSparseMonolithic = VirtualDiskType("sparseMonolithic")
    +	VirtualDiskTypeFlatMonolithic   = VirtualDiskType("flatMonolithic")
    +	VirtualDiskTypeThick            = VirtualDiskType("thick")
    +)
    +
    +func init() {
    +	t["VirtualDiskType"] = reflect.TypeOf((*VirtualDiskType)(nil)).Elem()
    +}
    +
    +type VirtualDiskVFlashCacheConfigInfoCacheConsistencyType string
    +
    +const (
    +	VirtualDiskVFlashCacheConfigInfoCacheConsistencyTypeStrong = VirtualDiskVFlashCacheConfigInfoCacheConsistencyType("strong")
    +	VirtualDiskVFlashCacheConfigInfoCacheConsistencyTypeWeak   = VirtualDiskVFlashCacheConfigInfoCacheConsistencyType("weak")
    +)
    +
    +func init() {
    +	t["VirtualDiskVFlashCacheConfigInfoCacheConsistencyType"] = reflect.TypeOf((*VirtualDiskVFlashCacheConfigInfoCacheConsistencyType)(nil)).Elem()
    +}
    +
    +type VirtualDiskVFlashCacheConfigInfoCacheMode string
    +
    +const (
    +	VirtualDiskVFlashCacheConfigInfoCacheModeWrite_thru = VirtualDiskVFlashCacheConfigInfoCacheMode("write_thru")
    +	VirtualDiskVFlashCacheConfigInfoCacheModeWrite_back = VirtualDiskVFlashCacheConfigInfoCacheMode("write_back")
    +)
    +
    +func init() {
    +	t["VirtualDiskVFlashCacheConfigInfoCacheMode"] = reflect.TypeOf((*VirtualDiskVFlashCacheConfigInfoCacheMode)(nil)).Elem()
    +}
    +
    +type VirtualEthernetCardLegacyNetworkDeviceName string
    +
    +const (
    +	VirtualEthernetCardLegacyNetworkDeviceNameBridged  = VirtualEthernetCardLegacyNetworkDeviceName("bridged")
    +	VirtualEthernetCardLegacyNetworkDeviceNameNat      = VirtualEthernetCardLegacyNetworkDeviceName("nat")
    +	VirtualEthernetCardLegacyNetworkDeviceNameHostonly = VirtualEthernetCardLegacyNetworkDeviceName("hostonly")
    +)
    +
    +func init() {
    +	t["VirtualEthernetCardLegacyNetworkDeviceName"] = reflect.TypeOf((*VirtualEthernetCardLegacyNetworkDeviceName)(nil)).Elem()
    +}
    +
    +type VirtualEthernetCardMacType string
    +
    +const (
    +	VirtualEthernetCardMacTypeManual    = VirtualEthernetCardMacType("manual")
    +	VirtualEthernetCardMacTypeGenerated = VirtualEthernetCardMacType("generated")
    +	VirtualEthernetCardMacTypeAssigned  = VirtualEthernetCardMacType("assigned")
    +)
    +
    +func init() {
    +	t["VirtualEthernetCardMacType"] = reflect.TypeOf((*VirtualEthernetCardMacType)(nil)).Elem()
    +}
    +
    +type VirtualMachineAppHeartbeatStatusType string
    +
    +const (
    +	VirtualMachineAppHeartbeatStatusTypeAppStatusGray  = VirtualMachineAppHeartbeatStatusType("appStatusGray")
    +	VirtualMachineAppHeartbeatStatusTypeAppStatusGreen = VirtualMachineAppHeartbeatStatusType("appStatusGreen")
    +	VirtualMachineAppHeartbeatStatusTypeAppStatusRed   = VirtualMachineAppHeartbeatStatusType("appStatusRed")
    +)
    +
    +func init() {
    +	t["VirtualMachineAppHeartbeatStatusType"] = reflect.TypeOf((*VirtualMachineAppHeartbeatStatusType)(nil)).Elem()
    +}
    +
    +type VirtualMachineBootOptionsNetworkBootProtocolType string
    +
    +const (
    +	VirtualMachineBootOptionsNetworkBootProtocolTypeIpv4 = VirtualMachineBootOptionsNetworkBootProtocolType("ipv4")
    +	VirtualMachineBootOptionsNetworkBootProtocolTypeIpv6 = VirtualMachineBootOptionsNetworkBootProtocolType("ipv6")
    +)
    +
    +func init() {
    +	t["VirtualMachineBootOptionsNetworkBootProtocolType"] = reflect.TypeOf((*VirtualMachineBootOptionsNetworkBootProtocolType)(nil)).Elem()
    +}
    +
    +type VirtualMachineConfigInfoNpivWwnType string
    +
    +const (
    +	VirtualMachineConfigInfoNpivWwnTypeVc       = VirtualMachineConfigInfoNpivWwnType("vc")
    +	VirtualMachineConfigInfoNpivWwnTypeHost     = VirtualMachineConfigInfoNpivWwnType("host")
    +	VirtualMachineConfigInfoNpivWwnTypeExternal = VirtualMachineConfigInfoNpivWwnType("external")
    +)
    +
    +func init() {
    +	t["VirtualMachineConfigInfoNpivWwnType"] = reflect.TypeOf((*VirtualMachineConfigInfoNpivWwnType)(nil)).Elem()
    +}
    +
    +type VirtualMachineConfigInfoSwapPlacementType string
    +
    +const (
    +	VirtualMachineConfigInfoSwapPlacementTypeInherit     = VirtualMachineConfigInfoSwapPlacementType("inherit")
    +	VirtualMachineConfigInfoSwapPlacementTypeVmDirectory = VirtualMachineConfigInfoSwapPlacementType("vmDirectory")
    +	VirtualMachineConfigInfoSwapPlacementTypeHostLocal   = VirtualMachineConfigInfoSwapPlacementType("hostLocal")
    +)
    +
    +func init() {
    +	t["VirtualMachineConfigInfoSwapPlacementType"] = reflect.TypeOf((*VirtualMachineConfigInfoSwapPlacementType)(nil)).Elem()
    +}
    +
    +type VirtualMachineConfigSpecEncryptedVMotionModes string
    +
    +const (
    +	VirtualMachineConfigSpecEncryptedVMotionModesDisabled      = VirtualMachineConfigSpecEncryptedVMotionModes("disabled")
    +	VirtualMachineConfigSpecEncryptedVMotionModesOpportunistic = VirtualMachineConfigSpecEncryptedVMotionModes("opportunistic")
    +	VirtualMachineConfigSpecEncryptedVMotionModesRequired      = VirtualMachineConfigSpecEncryptedVMotionModes("required")
    +)
    +
    +func init() {
    +	t["VirtualMachineConfigSpecEncryptedVMotionModes"] = reflect.TypeOf((*VirtualMachineConfigSpecEncryptedVMotionModes)(nil)).Elem()
    +}
    +
    +type VirtualMachineConfigSpecNpivWwnOp string
    +
    +const (
    +	VirtualMachineConfigSpecNpivWwnOpGenerate = VirtualMachineConfigSpecNpivWwnOp("generate")
    +	VirtualMachineConfigSpecNpivWwnOpSet      = VirtualMachineConfigSpecNpivWwnOp("set")
    +	VirtualMachineConfigSpecNpivWwnOpRemove   = VirtualMachineConfigSpecNpivWwnOp("remove")
    +	VirtualMachineConfigSpecNpivWwnOpExtend   = VirtualMachineConfigSpecNpivWwnOp("extend")
    +)
    +
    +func init() {
    +	t["VirtualMachineConfigSpecNpivWwnOp"] = reflect.TypeOf((*VirtualMachineConfigSpecNpivWwnOp)(nil)).Elem()
    +}
    +
    +type VirtualMachineConnectionState string
    +
    +const (
    +	VirtualMachineConnectionStateConnected    = VirtualMachineConnectionState("connected")
    +	VirtualMachineConnectionStateDisconnected = VirtualMachineConnectionState("disconnected")
    +	VirtualMachineConnectionStateOrphaned     = VirtualMachineConnectionState("orphaned")
    +	VirtualMachineConnectionStateInaccessible = VirtualMachineConnectionState("inaccessible")
    +	VirtualMachineConnectionStateInvalid      = VirtualMachineConnectionState("invalid")
    +)
    +
    +func init() {
    +	t["VirtualMachineConnectionState"] = reflect.TypeOf((*VirtualMachineConnectionState)(nil)).Elem()
    +}
    +
    +type VirtualMachineCryptoState string
    +
    +const (
    +	VirtualMachineCryptoStateUnlocked = VirtualMachineCryptoState("unlocked")
    +	VirtualMachineCryptoStateLocked   = VirtualMachineCryptoState("locked")
    +)
    +
    +func init() {
    +	t["VirtualMachineCryptoState"] = reflect.TypeOf((*VirtualMachineCryptoState)(nil)).Elem()
    +}
    +
    +type VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonOther string
    +
    +const (
    +	VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonOtherVmNptIncompatibleHost    = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonOther("vmNptIncompatibleHost")
    +	VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonOtherVmNptIncompatibleNetwork = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonOther("vmNptIncompatibleNetwork")
    +)
    +
    +func init() {
    +	t["VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonOther"] = reflect.TypeOf((*VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonOther)(nil)).Elem()
    +}
    +
    +type VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm string
    +
    +const (
    +	VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVmVmNptIncompatibleGuest                      = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm("vmNptIncompatibleGuest")
    +	VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVmVmNptIncompatibleGuestDriver                = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm("vmNptIncompatibleGuestDriver")
    +	VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVmVmNptIncompatibleAdapterType                = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm("vmNptIncompatibleAdapterType")
    +	VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVmVmNptDisabledOrDisconnectedAdapter          = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm("vmNptDisabledOrDisconnectedAdapter")
    +	VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVmVmNptIncompatibleAdapterFeatures            = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm("vmNptIncompatibleAdapterFeatures")
    +	VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVmVmNptIncompatibleBackingType                = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm("vmNptIncompatibleBackingType")
    +	VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVmVmNptInsufficientMemoryReservation          = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm("vmNptInsufficientMemoryReservation")
    +	VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVmVmNptFaultToleranceOrRecordReplayConfigured = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm("vmNptFaultToleranceOrRecordReplayConfigured")
    +	VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVmVmNptConflictingIOChainConfigured           = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm("vmNptConflictingIOChainConfigured")
    +	VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVmVmNptMonitorBlocks                          = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm("vmNptMonitorBlocks")
    +	VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVmVmNptConflictingOperationInProgress         = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm("vmNptConflictingOperationInProgress")
    +	VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVmVmNptRuntimeError                           = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm("vmNptRuntimeError")
    +	VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVmVmNptOutOfIntrVector                        = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm("vmNptOutOfIntrVector")
    +	VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVmVmNptVMCIActive                             = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm("vmNptVMCIActive")
    +)
    +
    +func init() {
    +	t["VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm"] = reflect.TypeOf((*VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm)(nil)).Elem()
    +}
    +
    +type VirtualMachineFaultToleranceState string
    +
    +const (
    +	VirtualMachineFaultToleranceStateNotConfigured = VirtualMachineFaultToleranceState("notConfigured")
    +	VirtualMachineFaultToleranceStateDisabled      = VirtualMachineFaultToleranceState("disabled")
    +	VirtualMachineFaultToleranceStateEnabled       = VirtualMachineFaultToleranceState("enabled")
    +	VirtualMachineFaultToleranceStateNeedSecondary = VirtualMachineFaultToleranceState("needSecondary")
    +	VirtualMachineFaultToleranceStateStarting      = VirtualMachineFaultToleranceState("starting")
    +	VirtualMachineFaultToleranceStateRunning       = VirtualMachineFaultToleranceState("running")
    +)
    +
    +func init() {
    +	t["VirtualMachineFaultToleranceState"] = reflect.TypeOf((*VirtualMachineFaultToleranceState)(nil)).Elem()
    +}
    +
    +type VirtualMachineFaultToleranceType string
    +
    +const (
    +	VirtualMachineFaultToleranceTypeUnset         = VirtualMachineFaultToleranceType("unset")
    +	VirtualMachineFaultToleranceTypeRecordReplay  = VirtualMachineFaultToleranceType("recordReplay")
    +	VirtualMachineFaultToleranceTypeCheckpointing = VirtualMachineFaultToleranceType("checkpointing")
    +)
    +
    +func init() {
    +	t["VirtualMachineFaultToleranceType"] = reflect.TypeOf((*VirtualMachineFaultToleranceType)(nil)).Elem()
    +}
    +
    +type VirtualMachineFileLayoutExFileType string
    +
    +const (
    +	VirtualMachineFileLayoutExFileTypeConfig               = VirtualMachineFileLayoutExFileType("config")
    +	VirtualMachineFileLayoutExFileTypeExtendedConfig       = VirtualMachineFileLayoutExFileType("extendedConfig")
    +	VirtualMachineFileLayoutExFileTypeDiskDescriptor       = VirtualMachineFileLayoutExFileType("diskDescriptor")
    +	VirtualMachineFileLayoutExFileTypeDiskExtent           = VirtualMachineFileLayoutExFileType("diskExtent")
    +	VirtualMachineFileLayoutExFileTypeDigestDescriptor     = VirtualMachineFileLayoutExFileType("digestDescriptor")
    +	VirtualMachineFileLayoutExFileTypeDigestExtent         = VirtualMachineFileLayoutExFileType("digestExtent")
    +	VirtualMachineFileLayoutExFileTypeDiskReplicationState = VirtualMachineFileLayoutExFileType("diskReplicationState")
    +	VirtualMachineFileLayoutExFileTypeLog                  = VirtualMachineFileLayoutExFileType("log")
    +	VirtualMachineFileLayoutExFileTypeStat                 = VirtualMachineFileLayoutExFileType("stat")
    +	VirtualMachineFileLayoutExFileTypeNamespaceData        = VirtualMachineFileLayoutExFileType("namespaceData")
    +	VirtualMachineFileLayoutExFileTypeNvram                = VirtualMachineFileLayoutExFileType("nvram")
    +	VirtualMachineFileLayoutExFileTypeSnapshotData         = VirtualMachineFileLayoutExFileType("snapshotData")
    +	VirtualMachineFileLayoutExFileTypeSnapshotMemory       = VirtualMachineFileLayoutExFileType("snapshotMemory")
    +	VirtualMachineFileLayoutExFileTypeSnapshotList         = VirtualMachineFileLayoutExFileType("snapshotList")
    +	VirtualMachineFileLayoutExFileTypeSnapshotManifestList = VirtualMachineFileLayoutExFileType("snapshotManifestList")
    +	VirtualMachineFileLayoutExFileTypeSuspend              = VirtualMachineFileLayoutExFileType("suspend")
    +	VirtualMachineFileLayoutExFileTypeSuspendMemory        = VirtualMachineFileLayoutExFileType("suspendMemory")
    +	VirtualMachineFileLayoutExFileTypeSwap                 = VirtualMachineFileLayoutExFileType("swap")
    +	VirtualMachineFileLayoutExFileTypeUwswap               = VirtualMachineFileLayoutExFileType("uwswap")
    +	VirtualMachineFileLayoutExFileTypeCore                 = VirtualMachineFileLayoutExFileType("core")
    +	VirtualMachineFileLayoutExFileTypeScreenshot           = VirtualMachineFileLayoutExFileType("screenshot")
    +	VirtualMachineFileLayoutExFileTypeFtMetadata           = VirtualMachineFileLayoutExFileType("ftMetadata")
    +	VirtualMachineFileLayoutExFileTypeGuestCustomization   = VirtualMachineFileLayoutExFileType("guestCustomization")
    +)
    +
    +func init() {
    +	t["VirtualMachineFileLayoutExFileType"] = reflect.TypeOf((*VirtualMachineFileLayoutExFileType)(nil)).Elem()
    +}
    +
    +type VirtualMachineFlagInfoMonitorType string
    +
    +const (
    +	VirtualMachineFlagInfoMonitorTypeRelease = VirtualMachineFlagInfoMonitorType("release")
    +	VirtualMachineFlagInfoMonitorTypeDebug   = VirtualMachineFlagInfoMonitorType("debug")
    +	VirtualMachineFlagInfoMonitorTypeStats   = VirtualMachineFlagInfoMonitorType("stats")
    +)
    +
    +func init() {
    +	t["VirtualMachineFlagInfoMonitorType"] = reflect.TypeOf((*VirtualMachineFlagInfoMonitorType)(nil)).Elem()
    +}
    +
    +type VirtualMachineFlagInfoVirtualExecUsage string
    +
    +const (
    +	VirtualMachineFlagInfoVirtualExecUsageHvAuto = VirtualMachineFlagInfoVirtualExecUsage("hvAuto")
    +	VirtualMachineFlagInfoVirtualExecUsageHvOn   = VirtualMachineFlagInfoVirtualExecUsage("hvOn")
    +	VirtualMachineFlagInfoVirtualExecUsageHvOff  = VirtualMachineFlagInfoVirtualExecUsage("hvOff")
    +)
    +
    +func init() {
    +	t["VirtualMachineFlagInfoVirtualExecUsage"] = reflect.TypeOf((*VirtualMachineFlagInfoVirtualExecUsage)(nil)).Elem()
    +}
    +
    +type VirtualMachineFlagInfoVirtualMmuUsage string
    +
    +const (
    +	VirtualMachineFlagInfoVirtualMmuUsageAutomatic = VirtualMachineFlagInfoVirtualMmuUsage("automatic")
    +	VirtualMachineFlagInfoVirtualMmuUsageOn        = VirtualMachineFlagInfoVirtualMmuUsage("on")
    +	VirtualMachineFlagInfoVirtualMmuUsageOff       = VirtualMachineFlagInfoVirtualMmuUsage("off")
    +)
    +
    +func init() {
    +	t["VirtualMachineFlagInfoVirtualMmuUsage"] = reflect.TypeOf((*VirtualMachineFlagInfoVirtualMmuUsage)(nil)).Elem()
    +}
    +
    +type VirtualMachineForkConfigInfoChildType string
    +
    +const (
    +	VirtualMachineForkConfigInfoChildTypeNone          = VirtualMachineForkConfigInfoChildType("none")
    +	VirtualMachineForkConfigInfoChildTypePersistent    = VirtualMachineForkConfigInfoChildType("persistent")
    +	VirtualMachineForkConfigInfoChildTypeNonpersistent = VirtualMachineForkConfigInfoChildType("nonpersistent")
    +)
    +
    +func init() {
    +	t["VirtualMachineForkConfigInfoChildType"] = reflect.TypeOf((*VirtualMachineForkConfigInfoChildType)(nil)).Elem()
    +}
    +
    +type VirtualMachineGuestOsFamily string
    +
    +const (
    +	VirtualMachineGuestOsFamilyWindowsGuest      = VirtualMachineGuestOsFamily("windowsGuest")
    +	VirtualMachineGuestOsFamilyLinuxGuest        = VirtualMachineGuestOsFamily("linuxGuest")
    +	VirtualMachineGuestOsFamilyNetwareGuest      = VirtualMachineGuestOsFamily("netwareGuest")
    +	VirtualMachineGuestOsFamilySolarisGuest      = VirtualMachineGuestOsFamily("solarisGuest")
    +	VirtualMachineGuestOsFamilyDarwinGuestFamily = VirtualMachineGuestOsFamily("darwinGuestFamily")
    +	VirtualMachineGuestOsFamilyOtherGuestFamily  = VirtualMachineGuestOsFamily("otherGuestFamily")
    +)
    +
    +func init() {
    +	t["VirtualMachineGuestOsFamily"] = reflect.TypeOf((*VirtualMachineGuestOsFamily)(nil)).Elem()
    +}
    +
    +type VirtualMachineGuestOsIdentifier string
    +
    +const (
    +	VirtualMachineGuestOsIdentifierDosGuest                = VirtualMachineGuestOsIdentifier("dosGuest")
    +	VirtualMachineGuestOsIdentifierWin31Guest              = VirtualMachineGuestOsIdentifier("win31Guest")
    +	VirtualMachineGuestOsIdentifierWin95Guest              = VirtualMachineGuestOsIdentifier("win95Guest")
    +	VirtualMachineGuestOsIdentifierWin98Guest              = VirtualMachineGuestOsIdentifier("win98Guest")
    +	VirtualMachineGuestOsIdentifierWinMeGuest              = VirtualMachineGuestOsIdentifier("winMeGuest")
    +	VirtualMachineGuestOsIdentifierWinNTGuest              = VirtualMachineGuestOsIdentifier("winNTGuest")
    +	VirtualMachineGuestOsIdentifierWin2000ProGuest         = VirtualMachineGuestOsIdentifier("win2000ProGuest")
    +	VirtualMachineGuestOsIdentifierWin2000ServGuest        = VirtualMachineGuestOsIdentifier("win2000ServGuest")
    +	VirtualMachineGuestOsIdentifierWin2000AdvServGuest     = VirtualMachineGuestOsIdentifier("win2000AdvServGuest")
    +	VirtualMachineGuestOsIdentifierWinXPHomeGuest          = VirtualMachineGuestOsIdentifier("winXPHomeGuest")
    +	VirtualMachineGuestOsIdentifierWinXPProGuest           = VirtualMachineGuestOsIdentifier("winXPProGuest")
    +	VirtualMachineGuestOsIdentifierWinXPPro64Guest         = VirtualMachineGuestOsIdentifier("winXPPro64Guest")
    +	VirtualMachineGuestOsIdentifierWinNetWebGuest          = VirtualMachineGuestOsIdentifier("winNetWebGuest")
    +	VirtualMachineGuestOsIdentifierWinNetStandardGuest     = VirtualMachineGuestOsIdentifier("winNetStandardGuest")
    +	VirtualMachineGuestOsIdentifierWinNetEnterpriseGuest   = VirtualMachineGuestOsIdentifier("winNetEnterpriseGuest")
    +	VirtualMachineGuestOsIdentifierWinNetDatacenterGuest   = VirtualMachineGuestOsIdentifier("winNetDatacenterGuest")
    +	VirtualMachineGuestOsIdentifierWinNetBusinessGuest     = VirtualMachineGuestOsIdentifier("winNetBusinessGuest")
    +	VirtualMachineGuestOsIdentifierWinNetStandard64Guest   = VirtualMachineGuestOsIdentifier("winNetStandard64Guest")
    +	VirtualMachineGuestOsIdentifierWinNetEnterprise64Guest = VirtualMachineGuestOsIdentifier("winNetEnterprise64Guest")
    +	VirtualMachineGuestOsIdentifierWinLonghornGuest        = VirtualMachineGuestOsIdentifier("winLonghornGuest")
    +	VirtualMachineGuestOsIdentifierWinLonghorn64Guest      = VirtualMachineGuestOsIdentifier("winLonghorn64Guest")
    +	VirtualMachineGuestOsIdentifierWinNetDatacenter64Guest = VirtualMachineGuestOsIdentifier("winNetDatacenter64Guest")
    +	VirtualMachineGuestOsIdentifierWinVistaGuest           = VirtualMachineGuestOsIdentifier("winVistaGuest")
    +	VirtualMachineGuestOsIdentifierWinVista64Guest         = VirtualMachineGuestOsIdentifier("winVista64Guest")
    +	VirtualMachineGuestOsIdentifierWindows7Guest           = VirtualMachineGuestOsIdentifier("windows7Guest")
    +	VirtualMachineGuestOsIdentifierWindows7_64Guest        = VirtualMachineGuestOsIdentifier("windows7_64Guest")
    +	VirtualMachineGuestOsIdentifierWindows7Server64Guest   = VirtualMachineGuestOsIdentifier("windows7Server64Guest")
    +	VirtualMachineGuestOsIdentifierWindows8Guest           = VirtualMachineGuestOsIdentifier("windows8Guest")
    +	VirtualMachineGuestOsIdentifierWindows8_64Guest        = VirtualMachineGuestOsIdentifier("windows8_64Guest")
    +	VirtualMachineGuestOsIdentifierWindows8Server64Guest   = VirtualMachineGuestOsIdentifier("windows8Server64Guest")
    +	VirtualMachineGuestOsIdentifierWindows9Guest           = VirtualMachineGuestOsIdentifier("windows9Guest")
    +	VirtualMachineGuestOsIdentifierWindows9_64Guest        = VirtualMachineGuestOsIdentifier("windows9_64Guest")
    +	VirtualMachineGuestOsIdentifierWindows9Server64Guest   = VirtualMachineGuestOsIdentifier("windows9Server64Guest")
    +	VirtualMachineGuestOsIdentifierWindowsHyperVGuest      = VirtualMachineGuestOsIdentifier("windowsHyperVGuest")
    +	VirtualMachineGuestOsIdentifierFreebsdGuest            = VirtualMachineGuestOsIdentifier("freebsdGuest")
    +	VirtualMachineGuestOsIdentifierFreebsd64Guest          = VirtualMachineGuestOsIdentifier("freebsd64Guest")
    +	VirtualMachineGuestOsIdentifierFreebsd11Guest          = VirtualMachineGuestOsIdentifier("freebsd11Guest")
    +	VirtualMachineGuestOsIdentifierFreebsd11_64Guest       = VirtualMachineGuestOsIdentifier("freebsd11_64Guest")
    +	VirtualMachineGuestOsIdentifierFreebsd12Guest          = VirtualMachineGuestOsIdentifier("freebsd12Guest")
    +	VirtualMachineGuestOsIdentifierFreebsd12_64Guest       = VirtualMachineGuestOsIdentifier("freebsd12_64Guest")
    +	VirtualMachineGuestOsIdentifierRedhatGuest             = VirtualMachineGuestOsIdentifier("redhatGuest")
    +	VirtualMachineGuestOsIdentifierRhel2Guest              = VirtualMachineGuestOsIdentifier("rhel2Guest")
    +	VirtualMachineGuestOsIdentifierRhel3Guest              = VirtualMachineGuestOsIdentifier("rhel3Guest")
    +	VirtualMachineGuestOsIdentifierRhel3_64Guest           = VirtualMachineGuestOsIdentifier("rhel3_64Guest")
    +	VirtualMachineGuestOsIdentifierRhel4Guest              = VirtualMachineGuestOsIdentifier("rhel4Guest")
    +	VirtualMachineGuestOsIdentifierRhel4_64Guest           = VirtualMachineGuestOsIdentifier("rhel4_64Guest")
    +	VirtualMachineGuestOsIdentifierRhel5Guest              = VirtualMachineGuestOsIdentifier("rhel5Guest")
    +	VirtualMachineGuestOsIdentifierRhel5_64Guest           = VirtualMachineGuestOsIdentifier("rhel5_64Guest")
    +	VirtualMachineGuestOsIdentifierRhel6Guest              = VirtualMachineGuestOsIdentifier("rhel6Guest")
    +	VirtualMachineGuestOsIdentifierRhel6_64Guest           = VirtualMachineGuestOsIdentifier("rhel6_64Guest")
    +	VirtualMachineGuestOsIdentifierRhel7Guest              = VirtualMachineGuestOsIdentifier("rhel7Guest")
    +	VirtualMachineGuestOsIdentifierRhel7_64Guest           = VirtualMachineGuestOsIdentifier("rhel7_64Guest")
    +	VirtualMachineGuestOsIdentifierRhel8_64Guest           = VirtualMachineGuestOsIdentifier("rhel8_64Guest")
    +	VirtualMachineGuestOsIdentifierCentosGuest             = VirtualMachineGuestOsIdentifier("centosGuest")
    +	VirtualMachineGuestOsIdentifierCentos64Guest           = VirtualMachineGuestOsIdentifier("centos64Guest")
    +	VirtualMachineGuestOsIdentifierCentos6Guest            = VirtualMachineGuestOsIdentifier("centos6Guest")
    +	VirtualMachineGuestOsIdentifierCentos6_64Guest         = VirtualMachineGuestOsIdentifier("centos6_64Guest")
    +	VirtualMachineGuestOsIdentifierCentos7Guest            = VirtualMachineGuestOsIdentifier("centos7Guest")
    +	VirtualMachineGuestOsIdentifierCentos7_64Guest         = VirtualMachineGuestOsIdentifier("centos7_64Guest")
    +	VirtualMachineGuestOsIdentifierCentos8_64Guest         = VirtualMachineGuestOsIdentifier("centos8_64Guest")
    +	VirtualMachineGuestOsIdentifierOracleLinuxGuest        = VirtualMachineGuestOsIdentifier("oracleLinuxGuest")
    +	VirtualMachineGuestOsIdentifierOracleLinux64Guest      = VirtualMachineGuestOsIdentifier("oracleLinux64Guest")
    +	VirtualMachineGuestOsIdentifierOracleLinux6Guest       = VirtualMachineGuestOsIdentifier("oracleLinux6Guest")
    +	VirtualMachineGuestOsIdentifierOracleLinux6_64Guest    = VirtualMachineGuestOsIdentifier("oracleLinux6_64Guest")
    +	VirtualMachineGuestOsIdentifierOracleLinux7Guest       = VirtualMachineGuestOsIdentifier("oracleLinux7Guest")
    +	VirtualMachineGuestOsIdentifierOracleLinux7_64Guest    = VirtualMachineGuestOsIdentifier("oracleLinux7_64Guest")
    +	VirtualMachineGuestOsIdentifierOracleLinux8_64Guest    = VirtualMachineGuestOsIdentifier("oracleLinux8_64Guest")
    +	VirtualMachineGuestOsIdentifierSuseGuest               = VirtualMachineGuestOsIdentifier("suseGuest")
    +	VirtualMachineGuestOsIdentifierSuse64Guest             = VirtualMachineGuestOsIdentifier("suse64Guest")
    +	VirtualMachineGuestOsIdentifierSlesGuest               = VirtualMachineGuestOsIdentifier("slesGuest")
    +	VirtualMachineGuestOsIdentifierSles64Guest             = VirtualMachineGuestOsIdentifier("sles64Guest")
    +	VirtualMachineGuestOsIdentifierSles10Guest             = VirtualMachineGuestOsIdentifier("sles10Guest")
    +	VirtualMachineGuestOsIdentifierSles10_64Guest          = VirtualMachineGuestOsIdentifier("sles10_64Guest")
    +	VirtualMachineGuestOsIdentifierSles11Guest             = VirtualMachineGuestOsIdentifier("sles11Guest")
    +	VirtualMachineGuestOsIdentifierSles11_64Guest          = VirtualMachineGuestOsIdentifier("sles11_64Guest")
    +	VirtualMachineGuestOsIdentifierSles12Guest             = VirtualMachineGuestOsIdentifier("sles12Guest")
    +	VirtualMachineGuestOsIdentifierSles12_64Guest          = VirtualMachineGuestOsIdentifier("sles12_64Guest")
    +	VirtualMachineGuestOsIdentifierSles15_64Guest          = VirtualMachineGuestOsIdentifier("sles15_64Guest")
    +	VirtualMachineGuestOsIdentifierNld9Guest               = VirtualMachineGuestOsIdentifier("nld9Guest")
    +	VirtualMachineGuestOsIdentifierOesGuest                = VirtualMachineGuestOsIdentifier("oesGuest")
    +	VirtualMachineGuestOsIdentifierSjdsGuest               = VirtualMachineGuestOsIdentifier("sjdsGuest")
    +	VirtualMachineGuestOsIdentifierMandrakeGuest           = VirtualMachineGuestOsIdentifier("mandrakeGuest")
    +	VirtualMachineGuestOsIdentifierMandrivaGuest           = VirtualMachineGuestOsIdentifier("mandrivaGuest")
    +	VirtualMachineGuestOsIdentifierMandriva64Guest         = VirtualMachineGuestOsIdentifier("mandriva64Guest")
    +	VirtualMachineGuestOsIdentifierTurboLinuxGuest         = VirtualMachineGuestOsIdentifier("turboLinuxGuest")
    +	VirtualMachineGuestOsIdentifierTurboLinux64Guest       = VirtualMachineGuestOsIdentifier("turboLinux64Guest")
    +	VirtualMachineGuestOsIdentifierUbuntuGuest             = VirtualMachineGuestOsIdentifier("ubuntuGuest")
    +	VirtualMachineGuestOsIdentifierUbuntu64Guest           = VirtualMachineGuestOsIdentifier("ubuntu64Guest")
    +	VirtualMachineGuestOsIdentifierDebian4Guest            = VirtualMachineGuestOsIdentifier("debian4Guest")
    +	VirtualMachineGuestOsIdentifierDebian4_64Guest         = VirtualMachineGuestOsIdentifier("debian4_64Guest")
    +	VirtualMachineGuestOsIdentifierDebian5Guest            = VirtualMachineGuestOsIdentifier("debian5Guest")
    +	VirtualMachineGuestOsIdentifierDebian5_64Guest         = VirtualMachineGuestOsIdentifier("debian5_64Guest")
    +	VirtualMachineGuestOsIdentifierDebian6Guest            = VirtualMachineGuestOsIdentifier("debian6Guest")
    +	VirtualMachineGuestOsIdentifierDebian6_64Guest         = VirtualMachineGuestOsIdentifier("debian6_64Guest")
    +	VirtualMachineGuestOsIdentifierDebian7Guest            = VirtualMachineGuestOsIdentifier("debian7Guest")
    +	VirtualMachineGuestOsIdentifierDebian7_64Guest         = VirtualMachineGuestOsIdentifier("debian7_64Guest")
    +	VirtualMachineGuestOsIdentifierDebian8Guest            = VirtualMachineGuestOsIdentifier("debian8Guest")
    +	VirtualMachineGuestOsIdentifierDebian8_64Guest         = VirtualMachineGuestOsIdentifier("debian8_64Guest")
    +	VirtualMachineGuestOsIdentifierDebian9Guest            = VirtualMachineGuestOsIdentifier("debian9Guest")
    +	VirtualMachineGuestOsIdentifierDebian9_64Guest         = VirtualMachineGuestOsIdentifier("debian9_64Guest")
    +	VirtualMachineGuestOsIdentifierDebian10Guest           = VirtualMachineGuestOsIdentifier("debian10Guest")
    +	VirtualMachineGuestOsIdentifierDebian10_64Guest        = VirtualMachineGuestOsIdentifier("debian10_64Guest")
    +	VirtualMachineGuestOsIdentifierAsianux3Guest           = VirtualMachineGuestOsIdentifier("asianux3Guest")
    +	VirtualMachineGuestOsIdentifierAsianux3_64Guest        = VirtualMachineGuestOsIdentifier("asianux3_64Guest")
    +	VirtualMachineGuestOsIdentifierAsianux4Guest           = VirtualMachineGuestOsIdentifier("asianux4Guest")
    +	VirtualMachineGuestOsIdentifierAsianux4_64Guest        = VirtualMachineGuestOsIdentifier("asianux4_64Guest")
    +	VirtualMachineGuestOsIdentifierAsianux5_64Guest        = VirtualMachineGuestOsIdentifier("asianux5_64Guest")
    +	VirtualMachineGuestOsIdentifierAsianux7_64Guest        = VirtualMachineGuestOsIdentifier("asianux7_64Guest")
    +	VirtualMachineGuestOsIdentifierAsianux8_64Guest        = VirtualMachineGuestOsIdentifier("asianux8_64Guest")
    +	VirtualMachineGuestOsIdentifierOpensuseGuest           = VirtualMachineGuestOsIdentifier("opensuseGuest")
    +	VirtualMachineGuestOsIdentifierOpensuse64Guest         = VirtualMachineGuestOsIdentifier("opensuse64Guest")
    +	VirtualMachineGuestOsIdentifierFedoraGuest             = VirtualMachineGuestOsIdentifier("fedoraGuest")
    +	VirtualMachineGuestOsIdentifierFedora64Guest           = VirtualMachineGuestOsIdentifier("fedora64Guest")
    +	VirtualMachineGuestOsIdentifierCoreos64Guest           = VirtualMachineGuestOsIdentifier("coreos64Guest")
    +	VirtualMachineGuestOsIdentifierVmwarePhoton64Guest     = VirtualMachineGuestOsIdentifier("vmwarePhoton64Guest")
    +	VirtualMachineGuestOsIdentifierOther24xLinuxGuest      = VirtualMachineGuestOsIdentifier("other24xLinuxGuest")
    +	VirtualMachineGuestOsIdentifierOther26xLinuxGuest      = VirtualMachineGuestOsIdentifier("other26xLinuxGuest")
    +	VirtualMachineGuestOsIdentifierOtherLinuxGuest         = VirtualMachineGuestOsIdentifier("otherLinuxGuest")
    +	VirtualMachineGuestOsIdentifierOther3xLinuxGuest       = VirtualMachineGuestOsIdentifier("other3xLinuxGuest")
    +	VirtualMachineGuestOsIdentifierOther4xLinuxGuest       = VirtualMachineGuestOsIdentifier("other4xLinuxGuest")
    +	VirtualMachineGuestOsIdentifierGenericLinuxGuest       = VirtualMachineGuestOsIdentifier("genericLinuxGuest")
    +	VirtualMachineGuestOsIdentifierOther24xLinux64Guest    = VirtualMachineGuestOsIdentifier("other24xLinux64Guest")
    +	VirtualMachineGuestOsIdentifierOther26xLinux64Guest    = VirtualMachineGuestOsIdentifier("other26xLinux64Guest")
    +	VirtualMachineGuestOsIdentifierOther3xLinux64Guest     = VirtualMachineGuestOsIdentifier("other3xLinux64Guest")
    +	VirtualMachineGuestOsIdentifierOther4xLinux64Guest     = VirtualMachineGuestOsIdentifier("other4xLinux64Guest")
    +	VirtualMachineGuestOsIdentifierOtherLinux64Guest       = VirtualMachineGuestOsIdentifier("otherLinux64Guest")
    +	VirtualMachineGuestOsIdentifierSolaris6Guest           = VirtualMachineGuestOsIdentifier("solaris6Guest")
    +	VirtualMachineGuestOsIdentifierSolaris7Guest           = VirtualMachineGuestOsIdentifier("solaris7Guest")
    +	VirtualMachineGuestOsIdentifierSolaris8Guest           = VirtualMachineGuestOsIdentifier("solaris8Guest")
    +	VirtualMachineGuestOsIdentifierSolaris9Guest           = VirtualMachineGuestOsIdentifier("solaris9Guest")
    +	VirtualMachineGuestOsIdentifierSolaris10Guest          = VirtualMachineGuestOsIdentifier("solaris10Guest")
    +	VirtualMachineGuestOsIdentifierSolaris10_64Guest       = VirtualMachineGuestOsIdentifier("solaris10_64Guest")
    +	VirtualMachineGuestOsIdentifierSolaris11_64Guest       = VirtualMachineGuestOsIdentifier("solaris11_64Guest")
    +	VirtualMachineGuestOsIdentifierOs2Guest                = VirtualMachineGuestOsIdentifier("os2Guest")
    +	VirtualMachineGuestOsIdentifierEComStationGuest        = VirtualMachineGuestOsIdentifier("eComStationGuest")
    +	VirtualMachineGuestOsIdentifierEComStation2Guest       = VirtualMachineGuestOsIdentifier("eComStation2Guest")
    +	VirtualMachineGuestOsIdentifierNetware4Guest           = VirtualMachineGuestOsIdentifier("netware4Guest")
    +	VirtualMachineGuestOsIdentifierNetware5Guest           = VirtualMachineGuestOsIdentifier("netware5Guest")
    +	VirtualMachineGuestOsIdentifierNetware6Guest           = VirtualMachineGuestOsIdentifier("netware6Guest")
    +	VirtualMachineGuestOsIdentifierOpenServer5Guest        = VirtualMachineGuestOsIdentifier("openServer5Guest")
    +	VirtualMachineGuestOsIdentifierOpenServer6Guest        = VirtualMachineGuestOsIdentifier("openServer6Guest")
    +	VirtualMachineGuestOsIdentifierUnixWare7Guest          = VirtualMachineGuestOsIdentifier("unixWare7Guest")
    +	VirtualMachineGuestOsIdentifierDarwinGuest             = VirtualMachineGuestOsIdentifier("darwinGuest")
    +	VirtualMachineGuestOsIdentifierDarwin64Guest           = VirtualMachineGuestOsIdentifier("darwin64Guest")
    +	VirtualMachineGuestOsIdentifierDarwin10Guest           = VirtualMachineGuestOsIdentifier("darwin10Guest")
    +	VirtualMachineGuestOsIdentifierDarwin10_64Guest        = VirtualMachineGuestOsIdentifier("darwin10_64Guest")
    +	VirtualMachineGuestOsIdentifierDarwin11Guest           = VirtualMachineGuestOsIdentifier("darwin11Guest")
    +	VirtualMachineGuestOsIdentifierDarwin11_64Guest        = VirtualMachineGuestOsIdentifier("darwin11_64Guest")
    +	VirtualMachineGuestOsIdentifierDarwin12_64Guest        = VirtualMachineGuestOsIdentifier("darwin12_64Guest")
    +	VirtualMachineGuestOsIdentifierDarwin13_64Guest        = VirtualMachineGuestOsIdentifier("darwin13_64Guest")
    +	VirtualMachineGuestOsIdentifierDarwin14_64Guest        = VirtualMachineGuestOsIdentifier("darwin14_64Guest")
    +	VirtualMachineGuestOsIdentifierDarwin15_64Guest        = VirtualMachineGuestOsIdentifier("darwin15_64Guest")
    +	VirtualMachineGuestOsIdentifierDarwin16_64Guest        = VirtualMachineGuestOsIdentifier("darwin16_64Guest")
    +	VirtualMachineGuestOsIdentifierDarwin17_64Guest        = VirtualMachineGuestOsIdentifier("darwin17_64Guest")
    +	VirtualMachineGuestOsIdentifierDarwin18_64Guest        = VirtualMachineGuestOsIdentifier("darwin18_64Guest")
    +	VirtualMachineGuestOsIdentifierVmkernelGuest           = VirtualMachineGuestOsIdentifier("vmkernelGuest")
    +	VirtualMachineGuestOsIdentifierVmkernel5Guest          = VirtualMachineGuestOsIdentifier("vmkernel5Guest")
    +	VirtualMachineGuestOsIdentifierVmkernel6Guest          = VirtualMachineGuestOsIdentifier("vmkernel6Guest")
    +	VirtualMachineGuestOsIdentifierVmkernel65Guest         = VirtualMachineGuestOsIdentifier("vmkernel65Guest")
    +	VirtualMachineGuestOsIdentifierOtherGuest              = VirtualMachineGuestOsIdentifier("otherGuest")
    +	VirtualMachineGuestOsIdentifierOtherGuest64            = VirtualMachineGuestOsIdentifier("otherGuest64")
    +)
    +
    +func init() {
    +	t["VirtualMachineGuestOsIdentifier"] = reflect.TypeOf((*VirtualMachineGuestOsIdentifier)(nil)).Elem()
    +}
    +
    +type VirtualMachineGuestState string
    +
    +const (
    +	VirtualMachineGuestStateRunning      = VirtualMachineGuestState("running")
    +	VirtualMachineGuestStateShuttingDown = VirtualMachineGuestState("shuttingDown")
    +	VirtualMachineGuestStateResetting    = VirtualMachineGuestState("resetting")
    +	VirtualMachineGuestStateStandby      = VirtualMachineGuestState("standby")
    +	VirtualMachineGuestStateNotRunning   = VirtualMachineGuestState("notRunning")
    +	VirtualMachineGuestStateUnknown      = VirtualMachineGuestState("unknown")
    +)
    +
    +func init() {
    +	t["VirtualMachineGuestState"] = reflect.TypeOf((*VirtualMachineGuestState)(nil)).Elem()
    +}
    +
    +type VirtualMachineHtSharing string
    +
    +const (
    +	VirtualMachineHtSharingAny      = VirtualMachineHtSharing("any")
    +	VirtualMachineHtSharingNone     = VirtualMachineHtSharing("none")
    +	VirtualMachineHtSharingInternal = VirtualMachineHtSharing("internal")
    +)
    +
    +func init() {
    +	t["VirtualMachineHtSharing"] = reflect.TypeOf((*VirtualMachineHtSharing)(nil)).Elem()
    +}
    +
    +type VirtualMachineMemoryAllocationPolicy string
    +
    +const (
    +	VirtualMachineMemoryAllocationPolicySwapNone = VirtualMachineMemoryAllocationPolicy("swapNone")
    +	VirtualMachineMemoryAllocationPolicySwapSome = VirtualMachineMemoryAllocationPolicy("swapSome")
    +	VirtualMachineMemoryAllocationPolicySwapMost = VirtualMachineMemoryAllocationPolicy("swapMost")
    +)
    +
    +func init() {
    +	t["VirtualMachineMemoryAllocationPolicy"] = reflect.TypeOf((*VirtualMachineMemoryAllocationPolicy)(nil)).Elem()
    +}
    +
    +type VirtualMachineMetadataManagerVmMetadataOp string
    +
    +const (
    +	VirtualMachineMetadataManagerVmMetadataOpUpdate = VirtualMachineMetadataManagerVmMetadataOp("Update")
    +	VirtualMachineMetadataManagerVmMetadataOpRemove = VirtualMachineMetadataManagerVmMetadataOp("Remove")
    +)
    +
    +func init() {
    +	t["VirtualMachineMetadataManagerVmMetadataOp"] = reflect.TypeOf((*VirtualMachineMetadataManagerVmMetadataOp)(nil)).Elem()
    +}
    +
    +type VirtualMachineMetadataManagerVmMetadataOwnerOwner string
    +
    +const (
    +	VirtualMachineMetadataManagerVmMetadataOwnerOwnerComVmwareVsphereHA = VirtualMachineMetadataManagerVmMetadataOwnerOwner("ComVmwareVsphereHA")
    +)
    +
    +func init() {
    +	t["VirtualMachineMetadataManagerVmMetadataOwnerOwner"] = reflect.TypeOf((*VirtualMachineMetadataManagerVmMetadataOwnerOwner)(nil)).Elem()
    +}
    +
    +type VirtualMachineMovePriority string
    +
    +const (
    +	VirtualMachineMovePriorityLowPriority     = VirtualMachineMovePriority("lowPriority")
    +	VirtualMachineMovePriorityHighPriority    = VirtualMachineMovePriority("highPriority")
    +	VirtualMachineMovePriorityDefaultPriority = VirtualMachineMovePriority("defaultPriority")
    +)
    +
    +func init() {
    +	t["VirtualMachineMovePriority"] = reflect.TypeOf((*VirtualMachineMovePriority)(nil)).Elem()
    +}
    +
    +type VirtualMachineNeedSecondaryReason string
    +
    +const (
    +	VirtualMachineNeedSecondaryReasonInitializing           = VirtualMachineNeedSecondaryReason("initializing")
    +	VirtualMachineNeedSecondaryReasonDivergence             = VirtualMachineNeedSecondaryReason("divergence")
    +	VirtualMachineNeedSecondaryReasonLostConnection         = VirtualMachineNeedSecondaryReason("lostConnection")
    +	VirtualMachineNeedSecondaryReasonPartialHardwareFailure = VirtualMachineNeedSecondaryReason("partialHardwareFailure")
    +	VirtualMachineNeedSecondaryReasonUserAction             = VirtualMachineNeedSecondaryReason("userAction")
    +	VirtualMachineNeedSecondaryReasonCheckpointError        = VirtualMachineNeedSecondaryReason("checkpointError")
    +	VirtualMachineNeedSecondaryReasonOther                  = VirtualMachineNeedSecondaryReason("other")
    +)
    +
    +func init() {
    +	t["VirtualMachineNeedSecondaryReason"] = reflect.TypeOf((*VirtualMachineNeedSecondaryReason)(nil)).Elem()
    +}
    +
    +type VirtualMachinePowerOffBehavior string
    +
    +const (
    +	VirtualMachinePowerOffBehaviorPowerOff = VirtualMachinePowerOffBehavior("powerOff")
    +	VirtualMachinePowerOffBehaviorRevert   = VirtualMachinePowerOffBehavior("revert")
    +	VirtualMachinePowerOffBehaviorPrompt   = VirtualMachinePowerOffBehavior("prompt")
    +	VirtualMachinePowerOffBehaviorTake     = VirtualMachinePowerOffBehavior("take")
    +)
    +
    +func init() {
    +	t["VirtualMachinePowerOffBehavior"] = reflect.TypeOf((*VirtualMachinePowerOffBehavior)(nil)).Elem()
    +}
    +
    +type VirtualMachinePowerOpType string
    +
    +const (
    +	VirtualMachinePowerOpTypeSoft   = VirtualMachinePowerOpType("soft")
    +	VirtualMachinePowerOpTypeHard   = VirtualMachinePowerOpType("hard")
    +	VirtualMachinePowerOpTypePreset = VirtualMachinePowerOpType("preset")
    +)
    +
    +func init() {
    +	t["VirtualMachinePowerOpType"] = reflect.TypeOf((*VirtualMachinePowerOpType)(nil)).Elem()
    +}
    +
    +type VirtualMachinePowerState string
    +
    +const (
    +	VirtualMachinePowerStatePoweredOff = VirtualMachinePowerState("poweredOff")
    +	VirtualMachinePowerStatePoweredOn  = VirtualMachinePowerState("poweredOn")
    +	VirtualMachinePowerStateSuspended  = VirtualMachinePowerState("suspended")
    +)
    +
    +func init() {
    +	t["VirtualMachinePowerState"] = reflect.TypeOf((*VirtualMachinePowerState)(nil)).Elem()
    +}
    +
    +type VirtualMachineRecordReplayState string
    +
    +const (
    +	VirtualMachineRecordReplayStateRecording = VirtualMachineRecordReplayState("recording")
    +	VirtualMachineRecordReplayStateReplaying = VirtualMachineRecordReplayState("replaying")
    +	VirtualMachineRecordReplayStateInactive  = VirtualMachineRecordReplayState("inactive")
    +)
    +
    +func init() {
    +	t["VirtualMachineRecordReplayState"] = reflect.TypeOf((*VirtualMachineRecordReplayState)(nil)).Elem()
    +}
    +
    +type VirtualMachineRelocateDiskMoveOptions string
    +
    +const (
    +	VirtualMachineRelocateDiskMoveOptionsMoveAllDiskBackingsAndAllowSharing    = VirtualMachineRelocateDiskMoveOptions("moveAllDiskBackingsAndAllowSharing")
    +	VirtualMachineRelocateDiskMoveOptionsMoveAllDiskBackingsAndDisallowSharing = VirtualMachineRelocateDiskMoveOptions("moveAllDiskBackingsAndDisallowSharing")
    +	VirtualMachineRelocateDiskMoveOptionsMoveChildMostDiskBacking              = VirtualMachineRelocateDiskMoveOptions("moveChildMostDiskBacking")
    +	VirtualMachineRelocateDiskMoveOptionsCreateNewChildDiskBacking             = VirtualMachineRelocateDiskMoveOptions("createNewChildDiskBacking")
    +	VirtualMachineRelocateDiskMoveOptionsMoveAllDiskBackingsAndConsolidate     = VirtualMachineRelocateDiskMoveOptions("moveAllDiskBackingsAndConsolidate")
    +)
    +
    +func init() {
    +	t["VirtualMachineRelocateDiskMoveOptions"] = reflect.TypeOf((*VirtualMachineRelocateDiskMoveOptions)(nil)).Elem()
    +}
    +
    +type VirtualMachineRelocateTransformation string
    +
    +const (
    +	VirtualMachineRelocateTransformationFlat   = VirtualMachineRelocateTransformation("flat")
    +	VirtualMachineRelocateTransformationSparse = VirtualMachineRelocateTransformation("sparse")
    +)
    +
    +func init() {
    +	t["VirtualMachineRelocateTransformation"] = reflect.TypeOf((*VirtualMachineRelocateTransformation)(nil)).Elem()
    +}
    +
    +type VirtualMachineScsiPassthroughType string
    +
    +const (
    +	VirtualMachineScsiPassthroughTypeDisk      = VirtualMachineScsiPassthroughType("disk")
    +	VirtualMachineScsiPassthroughTypeTape      = VirtualMachineScsiPassthroughType("tape")
    +	VirtualMachineScsiPassthroughTypePrinter   = VirtualMachineScsiPassthroughType("printer")
    +	VirtualMachineScsiPassthroughTypeProcessor = VirtualMachineScsiPassthroughType("processor")
    +	VirtualMachineScsiPassthroughTypeWorm      = VirtualMachineScsiPassthroughType("worm")
    +	VirtualMachineScsiPassthroughTypeCdrom     = VirtualMachineScsiPassthroughType("cdrom")
    +	VirtualMachineScsiPassthroughTypeScanner   = VirtualMachineScsiPassthroughType("scanner")
    +	VirtualMachineScsiPassthroughTypeOptical   = VirtualMachineScsiPassthroughType("optical")
    +	VirtualMachineScsiPassthroughTypeMedia     = VirtualMachineScsiPassthroughType("media")
    +	VirtualMachineScsiPassthroughTypeCom       = VirtualMachineScsiPassthroughType("com")
    +	VirtualMachineScsiPassthroughTypeRaid      = VirtualMachineScsiPassthroughType("raid")
    +	VirtualMachineScsiPassthroughTypeUnknown   = VirtualMachineScsiPassthroughType("unknown")
    +)
    +
    +func init() {
    +	t["VirtualMachineScsiPassthroughType"] = reflect.TypeOf((*VirtualMachineScsiPassthroughType)(nil)).Elem()
    +}
    +
    +type VirtualMachineStandbyActionType string
    +
    +const (
    +	VirtualMachineStandbyActionTypeCheckpoint     = VirtualMachineStandbyActionType("checkpoint")
    +	VirtualMachineStandbyActionTypePowerOnSuspend = VirtualMachineStandbyActionType("powerOnSuspend")
    +)
    +
    +func init() {
    +	t["VirtualMachineStandbyActionType"] = reflect.TypeOf((*VirtualMachineStandbyActionType)(nil)).Elem()
    +}
    +
    +type VirtualMachineTargetInfoConfigurationTag string
    +
    +const (
    +	VirtualMachineTargetInfoConfigurationTagCompliant   = VirtualMachineTargetInfoConfigurationTag("compliant")
    +	VirtualMachineTargetInfoConfigurationTagClusterWide = VirtualMachineTargetInfoConfigurationTag("clusterWide")
    +)
    +
    +func init() {
    +	t["VirtualMachineTargetInfoConfigurationTag"] = reflect.TypeOf((*VirtualMachineTargetInfoConfigurationTag)(nil)).Elem()
    +}
    +
    +type VirtualMachineTicketType string
    +
    +const (
    +	VirtualMachineTicketTypeMks            = VirtualMachineTicketType("mks")
    +	VirtualMachineTicketTypeDevice         = VirtualMachineTicketType("device")
    +	VirtualMachineTicketTypeGuestControl   = VirtualMachineTicketType("guestControl")
    +	VirtualMachineTicketTypeWebmks         = VirtualMachineTicketType("webmks")
    +	VirtualMachineTicketTypeGuestIntegrity = VirtualMachineTicketType("guestIntegrity")
    +)
    +
    +func init() {
    +	t["VirtualMachineTicketType"] = reflect.TypeOf((*VirtualMachineTicketType)(nil)).Elem()
    +}
    +
    +type VirtualMachineToolsInstallType string
    +
    +const (
    +	VirtualMachineToolsInstallTypeGuestToolsTypeUnknown     = VirtualMachineToolsInstallType("guestToolsTypeUnknown")
    +	VirtualMachineToolsInstallTypeGuestToolsTypeMSI         = VirtualMachineToolsInstallType("guestToolsTypeMSI")
    +	VirtualMachineToolsInstallTypeGuestToolsTypeTar         = VirtualMachineToolsInstallType("guestToolsTypeTar")
    +	VirtualMachineToolsInstallTypeGuestToolsTypeOSP         = VirtualMachineToolsInstallType("guestToolsTypeOSP")
    +	VirtualMachineToolsInstallTypeGuestToolsTypeOpenVMTools = VirtualMachineToolsInstallType("guestToolsTypeOpenVMTools")
    +)
    +
    +func init() {
    +	t["VirtualMachineToolsInstallType"] = reflect.TypeOf((*VirtualMachineToolsInstallType)(nil)).Elem()
    +}
    +
    +type VirtualMachineToolsRunningStatus string
    +
    +const (
    +	VirtualMachineToolsRunningStatusGuestToolsNotRunning       = VirtualMachineToolsRunningStatus("guestToolsNotRunning")
    +	VirtualMachineToolsRunningStatusGuestToolsRunning          = VirtualMachineToolsRunningStatus("guestToolsRunning")
    +	VirtualMachineToolsRunningStatusGuestToolsExecutingScripts = VirtualMachineToolsRunningStatus("guestToolsExecutingScripts")
    +)
    +
    +func init() {
    +	t["VirtualMachineToolsRunningStatus"] = reflect.TypeOf((*VirtualMachineToolsRunningStatus)(nil)).Elem()
    +}
    +
    +type VirtualMachineToolsStatus string
    +
    +const (
    +	VirtualMachineToolsStatusToolsNotInstalled = VirtualMachineToolsStatus("toolsNotInstalled")
    +	VirtualMachineToolsStatusToolsNotRunning   = VirtualMachineToolsStatus("toolsNotRunning")
    +	VirtualMachineToolsStatusToolsOld          = VirtualMachineToolsStatus("toolsOld")
    +	VirtualMachineToolsStatusToolsOk           = VirtualMachineToolsStatus("toolsOk")
    +)
    +
    +func init() {
    +	t["VirtualMachineToolsStatus"] = reflect.TypeOf((*VirtualMachineToolsStatus)(nil)).Elem()
    +}
    +
    +type VirtualMachineToolsVersionStatus string
    +
    +const (
    +	VirtualMachineToolsVersionStatusGuestToolsNotInstalled = VirtualMachineToolsVersionStatus("guestToolsNotInstalled")
    +	VirtualMachineToolsVersionStatusGuestToolsNeedUpgrade  = VirtualMachineToolsVersionStatus("guestToolsNeedUpgrade")
    +	VirtualMachineToolsVersionStatusGuestToolsCurrent      = VirtualMachineToolsVersionStatus("guestToolsCurrent")
    +	VirtualMachineToolsVersionStatusGuestToolsUnmanaged    = VirtualMachineToolsVersionStatus("guestToolsUnmanaged")
    +	VirtualMachineToolsVersionStatusGuestToolsTooOld       = VirtualMachineToolsVersionStatus("guestToolsTooOld")
    +	VirtualMachineToolsVersionStatusGuestToolsSupportedOld = VirtualMachineToolsVersionStatus("guestToolsSupportedOld")
    +	VirtualMachineToolsVersionStatusGuestToolsSupportedNew = VirtualMachineToolsVersionStatus("guestToolsSupportedNew")
    +	VirtualMachineToolsVersionStatusGuestToolsTooNew       = VirtualMachineToolsVersionStatus("guestToolsTooNew")
    +	VirtualMachineToolsVersionStatusGuestToolsBlacklisted  = VirtualMachineToolsVersionStatus("guestToolsBlacklisted")
    +)
    +
    +func init() {
    +	t["VirtualMachineToolsVersionStatus"] = reflect.TypeOf((*VirtualMachineToolsVersionStatus)(nil)).Elem()
    +}
    +
    +type VirtualMachineUsbInfoFamily string
    +
    +const (
    +	VirtualMachineUsbInfoFamilyAudio           = VirtualMachineUsbInfoFamily("audio")
    +	VirtualMachineUsbInfoFamilyHid             = VirtualMachineUsbInfoFamily("hid")
    +	VirtualMachineUsbInfoFamilyHid_bootable    = VirtualMachineUsbInfoFamily("hid_bootable")
    +	VirtualMachineUsbInfoFamilyPhysical        = VirtualMachineUsbInfoFamily("physical")
    +	VirtualMachineUsbInfoFamilyCommunication   = VirtualMachineUsbInfoFamily("communication")
    +	VirtualMachineUsbInfoFamilyImaging         = VirtualMachineUsbInfoFamily("imaging")
    +	VirtualMachineUsbInfoFamilyPrinter         = VirtualMachineUsbInfoFamily("printer")
    +	VirtualMachineUsbInfoFamilyStorage         = VirtualMachineUsbInfoFamily("storage")
    +	VirtualMachineUsbInfoFamilyHub             = VirtualMachineUsbInfoFamily("hub")
    +	VirtualMachineUsbInfoFamilySmart_card      = VirtualMachineUsbInfoFamily("smart_card")
    +	VirtualMachineUsbInfoFamilySecurity        = VirtualMachineUsbInfoFamily("security")
    +	VirtualMachineUsbInfoFamilyVideo           = VirtualMachineUsbInfoFamily("video")
    +	VirtualMachineUsbInfoFamilyWireless        = VirtualMachineUsbInfoFamily("wireless")
    +	VirtualMachineUsbInfoFamilyBluetooth       = VirtualMachineUsbInfoFamily("bluetooth")
    +	VirtualMachineUsbInfoFamilyWusb            = VirtualMachineUsbInfoFamily("wusb")
    +	VirtualMachineUsbInfoFamilyPda             = VirtualMachineUsbInfoFamily("pda")
    +	VirtualMachineUsbInfoFamilyVendor_specific = VirtualMachineUsbInfoFamily("vendor_specific")
    +	VirtualMachineUsbInfoFamilyOther           = VirtualMachineUsbInfoFamily("other")
    +	VirtualMachineUsbInfoFamilyUnknownFamily   = VirtualMachineUsbInfoFamily("unknownFamily")
    +)
    +
    +func init() {
    +	t["VirtualMachineUsbInfoFamily"] = reflect.TypeOf((*VirtualMachineUsbInfoFamily)(nil)).Elem()
    +}
    +
    +type VirtualMachineUsbInfoSpeed string
    +
    +const (
    +	VirtualMachineUsbInfoSpeedLow          = VirtualMachineUsbInfoSpeed("low")
    +	VirtualMachineUsbInfoSpeedFull         = VirtualMachineUsbInfoSpeed("full")
    +	VirtualMachineUsbInfoSpeedHigh         = VirtualMachineUsbInfoSpeed("high")
    +	VirtualMachineUsbInfoSpeedSuperSpeed   = VirtualMachineUsbInfoSpeed("superSpeed")
    +	VirtualMachineUsbInfoSpeedUnknownSpeed = VirtualMachineUsbInfoSpeed("unknownSpeed")
    +)
    +
    +func init() {
    +	t["VirtualMachineUsbInfoSpeed"] = reflect.TypeOf((*VirtualMachineUsbInfoSpeed)(nil)).Elem()
    +}
    +
    +type VirtualMachineVMCIDeviceAction string
    +
    +const (
    +	VirtualMachineVMCIDeviceActionAllow = VirtualMachineVMCIDeviceAction("allow")
    +	VirtualMachineVMCIDeviceActionDeny  = VirtualMachineVMCIDeviceAction("deny")
    +)
    +
    +func init() {
    +	t["VirtualMachineVMCIDeviceAction"] = reflect.TypeOf((*VirtualMachineVMCIDeviceAction)(nil)).Elem()
    +}
    +
    +type VirtualMachineVMCIDeviceDirection string
    +
    +const (
    +	VirtualMachineVMCIDeviceDirectionGuest        = VirtualMachineVMCIDeviceDirection("guest")
    +	VirtualMachineVMCIDeviceDirectionHost         = VirtualMachineVMCIDeviceDirection("host")
    +	VirtualMachineVMCIDeviceDirectionAnyDirection = VirtualMachineVMCIDeviceDirection("anyDirection")
    +)
    +
    +func init() {
    +	t["VirtualMachineVMCIDeviceDirection"] = reflect.TypeOf((*VirtualMachineVMCIDeviceDirection)(nil)).Elem()
    +}
    +
    +type VirtualMachineVMCIDeviceProtocol string
    +
    +const (
    +	VirtualMachineVMCIDeviceProtocolHypervisor  = VirtualMachineVMCIDeviceProtocol("hypervisor")
    +	VirtualMachineVMCIDeviceProtocolDoorbell    = VirtualMachineVMCIDeviceProtocol("doorbell")
    +	VirtualMachineVMCIDeviceProtocolQueuepair   = VirtualMachineVMCIDeviceProtocol("queuepair")
    +	VirtualMachineVMCIDeviceProtocolDatagram    = VirtualMachineVMCIDeviceProtocol("datagram")
    +	VirtualMachineVMCIDeviceProtocolStream      = VirtualMachineVMCIDeviceProtocol("stream")
    +	VirtualMachineVMCIDeviceProtocolAnyProtocol = VirtualMachineVMCIDeviceProtocol("anyProtocol")
    +)
    +
    +func init() {
    +	t["VirtualMachineVMCIDeviceProtocol"] = reflect.TypeOf((*VirtualMachineVMCIDeviceProtocol)(nil)).Elem()
    +}
    +
    +type VirtualMachineVideoCardUse3dRenderer string
    +
    +const (
    +	VirtualMachineVideoCardUse3dRendererAutomatic = VirtualMachineVideoCardUse3dRenderer("automatic")
    +	VirtualMachineVideoCardUse3dRendererSoftware  = VirtualMachineVideoCardUse3dRenderer("software")
    +	VirtualMachineVideoCardUse3dRendererHardware  = VirtualMachineVideoCardUse3dRenderer("hardware")
    +)
    +
    +func init() {
    +	t["VirtualMachineVideoCardUse3dRenderer"] = reflect.TypeOf((*VirtualMachineVideoCardUse3dRenderer)(nil)).Elem()
    +}
    +
    +type VirtualMachineWindowsQuiesceSpecVssBackupContext string
    +
    +const (
    +	VirtualMachineWindowsQuiesceSpecVssBackupContextCtx_auto              = VirtualMachineWindowsQuiesceSpecVssBackupContext("ctx_auto")
    +	VirtualMachineWindowsQuiesceSpecVssBackupContextCtx_backup            = VirtualMachineWindowsQuiesceSpecVssBackupContext("ctx_backup")
    +	VirtualMachineWindowsQuiesceSpecVssBackupContextCtx_file_share_backup = VirtualMachineWindowsQuiesceSpecVssBackupContext("ctx_file_share_backup")
    +)
    +
    +func init() {
    +	t["VirtualMachineWindowsQuiesceSpecVssBackupContext"] = reflect.TypeOf((*VirtualMachineWindowsQuiesceSpecVssBackupContext)(nil)).Elem()
    +}
    +
    +type VirtualPointingDeviceHostChoice string
    +
    +const (
    +	VirtualPointingDeviceHostChoiceAutodetect           = VirtualPointingDeviceHostChoice("autodetect")
    +	VirtualPointingDeviceHostChoiceIntellimouseExplorer = VirtualPointingDeviceHostChoice("intellimouseExplorer")
    +	VirtualPointingDeviceHostChoiceIntellimousePs2      = VirtualPointingDeviceHostChoice("intellimousePs2")
    +	VirtualPointingDeviceHostChoiceLogitechMouseman     = VirtualPointingDeviceHostChoice("logitechMouseman")
    +	VirtualPointingDeviceHostChoiceMicrosoft_serial     = VirtualPointingDeviceHostChoice("microsoft_serial")
    +	VirtualPointingDeviceHostChoiceMouseSystems         = VirtualPointingDeviceHostChoice("mouseSystems")
    +	VirtualPointingDeviceHostChoiceMousemanSerial       = VirtualPointingDeviceHostChoice("mousemanSerial")
    +	VirtualPointingDeviceHostChoicePs2                  = VirtualPointingDeviceHostChoice("ps2")
    +)
    +
    +func init() {
    +	t["VirtualPointingDeviceHostChoice"] = reflect.TypeOf((*VirtualPointingDeviceHostChoice)(nil)).Elem()
    +}
    +
    +type VirtualSCSISharing string
    +
    +const (
    +	VirtualSCSISharingNoSharing       = VirtualSCSISharing("noSharing")
    +	VirtualSCSISharingVirtualSharing  = VirtualSCSISharing("virtualSharing")
    +	VirtualSCSISharingPhysicalSharing = VirtualSCSISharing("physicalSharing")
    +)
    +
    +func init() {
    +	t["VirtualSCSISharing"] = reflect.TypeOf((*VirtualSCSISharing)(nil)).Elem()
    +}
    +
    +type VirtualSerialPortEndPoint string
    +
    +const (
    +	VirtualSerialPortEndPointClient = VirtualSerialPortEndPoint("client")
    +	VirtualSerialPortEndPointServer = VirtualSerialPortEndPoint("server")
    +)
    +
    +func init() {
    +	t["VirtualSerialPortEndPoint"] = reflect.TypeOf((*VirtualSerialPortEndPoint)(nil)).Elem()
    +}
    +
    +type VirtualVmxnet3VrdmaOptionDeviceProtocols string
    +
    +const (
    +	VirtualVmxnet3VrdmaOptionDeviceProtocolsRocev1 = VirtualVmxnet3VrdmaOptionDeviceProtocols("rocev1")
    +	VirtualVmxnet3VrdmaOptionDeviceProtocolsRocev2 = VirtualVmxnet3VrdmaOptionDeviceProtocols("rocev2")
    +)
    +
    +func init() {
    +	t["VirtualVmxnet3VrdmaOptionDeviceProtocols"] = reflect.TypeOf((*VirtualVmxnet3VrdmaOptionDeviceProtocols)(nil)).Elem()
    +}
    +
    +type VmDasBeingResetEventReasonCode string
    +
    +const (
    +	VmDasBeingResetEventReasonCodeVmtoolsHeartbeatFailure  = VmDasBeingResetEventReasonCode("vmtoolsHeartbeatFailure")
    +	VmDasBeingResetEventReasonCodeAppHeartbeatFailure      = VmDasBeingResetEventReasonCode("appHeartbeatFailure")
    +	VmDasBeingResetEventReasonCodeAppImmediateResetRequest = VmDasBeingResetEventReasonCode("appImmediateResetRequest")
    +	VmDasBeingResetEventReasonCodeVmcpResetApdCleared      = VmDasBeingResetEventReasonCode("vmcpResetApdCleared")
    +)
    +
    +func init() {
    +	t["VmDasBeingResetEventReasonCode"] = reflect.TypeOf((*VmDasBeingResetEventReasonCode)(nil)).Elem()
    +}
    +
    +type VmFailedStartingSecondaryEventFailureReason string
    +
    +const (
    +	VmFailedStartingSecondaryEventFailureReasonIncompatibleHost = VmFailedStartingSecondaryEventFailureReason("incompatibleHost")
    +	VmFailedStartingSecondaryEventFailureReasonLoginFailed      = VmFailedStartingSecondaryEventFailureReason("loginFailed")
    +	VmFailedStartingSecondaryEventFailureReasonRegisterVmFailed = VmFailedStartingSecondaryEventFailureReason("registerVmFailed")
    +	VmFailedStartingSecondaryEventFailureReasonMigrateFailed    = VmFailedStartingSecondaryEventFailureReason("migrateFailed")
    +)
    +
    +func init() {
    +	t["VmFailedStartingSecondaryEventFailureReason"] = reflect.TypeOf((*VmFailedStartingSecondaryEventFailureReason)(nil)).Elem()
    +}
    +
    +type VmFaultToleranceConfigIssueReasonForIssue string
    +
    +const (
    +	VmFaultToleranceConfigIssueReasonForIssueHaNotEnabled                   = VmFaultToleranceConfigIssueReasonForIssue("haNotEnabled")
    +	VmFaultToleranceConfigIssueReasonForIssueMoreThanOneSecondary           = VmFaultToleranceConfigIssueReasonForIssue("moreThanOneSecondary")
    +	VmFaultToleranceConfigIssueReasonForIssueRecordReplayNotSupported       = VmFaultToleranceConfigIssueReasonForIssue("recordReplayNotSupported")
    +	VmFaultToleranceConfigIssueReasonForIssueReplayNotSupported             = VmFaultToleranceConfigIssueReasonForIssue("replayNotSupported")
    +	VmFaultToleranceConfigIssueReasonForIssueTemplateVm                     = VmFaultToleranceConfigIssueReasonForIssue("templateVm")
    +	VmFaultToleranceConfigIssueReasonForIssueMultipleVCPU                   = VmFaultToleranceConfigIssueReasonForIssue("multipleVCPU")
    +	VmFaultToleranceConfigIssueReasonForIssueHostInactive                   = VmFaultToleranceConfigIssueReasonForIssue("hostInactive")
    +	VmFaultToleranceConfigIssueReasonForIssueFtUnsupportedHardware          = VmFaultToleranceConfigIssueReasonForIssue("ftUnsupportedHardware")
    +	VmFaultToleranceConfigIssueReasonForIssueFtUnsupportedProduct           = VmFaultToleranceConfigIssueReasonForIssue("ftUnsupportedProduct")
    +	VmFaultToleranceConfigIssueReasonForIssueMissingVMotionNic              = VmFaultToleranceConfigIssueReasonForIssue("missingVMotionNic")
    +	VmFaultToleranceConfigIssueReasonForIssueMissingFTLoggingNic            = VmFaultToleranceConfigIssueReasonForIssue("missingFTLoggingNic")
    +	VmFaultToleranceConfigIssueReasonForIssueThinDisk                       = VmFaultToleranceConfigIssueReasonForIssue("thinDisk")
    +	VmFaultToleranceConfigIssueReasonForIssueVerifySSLCertificateFlagNotSet = VmFaultToleranceConfigIssueReasonForIssue("verifySSLCertificateFlagNotSet")
    +	VmFaultToleranceConfigIssueReasonForIssueHasSnapshots                   = VmFaultToleranceConfigIssueReasonForIssue("hasSnapshots")
    +	VmFaultToleranceConfigIssueReasonForIssueNoConfig                       = VmFaultToleranceConfigIssueReasonForIssue("noConfig")
    +	VmFaultToleranceConfigIssueReasonForIssueFtSecondaryVm                  = VmFaultToleranceConfigIssueReasonForIssue("ftSecondaryVm")
    +	VmFaultToleranceConfigIssueReasonForIssueHasLocalDisk                   = VmFaultToleranceConfigIssueReasonForIssue("hasLocalDisk")
    +	VmFaultToleranceConfigIssueReasonForIssueEsxAgentVm                     = VmFaultToleranceConfigIssueReasonForIssue("esxAgentVm")
    +	VmFaultToleranceConfigIssueReasonForIssueVideo3dEnabled                 = VmFaultToleranceConfigIssueReasonForIssue("video3dEnabled")
    +	VmFaultToleranceConfigIssueReasonForIssueHasUnsupportedDisk             = VmFaultToleranceConfigIssueReasonForIssue("hasUnsupportedDisk")
    +	VmFaultToleranceConfigIssueReasonForIssueInsufficientBandwidth          = VmFaultToleranceConfigIssueReasonForIssue("insufficientBandwidth")
    +	VmFaultToleranceConfigIssueReasonForIssueHasNestedHVConfiguration       = VmFaultToleranceConfigIssueReasonForIssue("hasNestedHVConfiguration")
    +	VmFaultToleranceConfigIssueReasonForIssueHasVFlashConfiguration         = VmFaultToleranceConfigIssueReasonForIssue("hasVFlashConfiguration")
    +	VmFaultToleranceConfigIssueReasonForIssueUnsupportedProduct             = VmFaultToleranceConfigIssueReasonForIssue("unsupportedProduct")
    +	VmFaultToleranceConfigIssueReasonForIssueCpuHvUnsupported               = VmFaultToleranceConfigIssueReasonForIssue("cpuHvUnsupported")
    +	VmFaultToleranceConfigIssueReasonForIssueCpuHwmmuUnsupported            = VmFaultToleranceConfigIssueReasonForIssue("cpuHwmmuUnsupported")
    +	VmFaultToleranceConfigIssueReasonForIssueCpuHvDisabled                  = VmFaultToleranceConfigIssueReasonForIssue("cpuHvDisabled")
    +	VmFaultToleranceConfigIssueReasonForIssueHasEFIFirmware                 = VmFaultToleranceConfigIssueReasonForIssue("hasEFIFirmware")
    +	VmFaultToleranceConfigIssueReasonForIssueTooManyVCPUs                   = VmFaultToleranceConfigIssueReasonForIssue("tooManyVCPUs")
    +	VmFaultToleranceConfigIssueReasonForIssueTooMuchMemory                  = VmFaultToleranceConfigIssueReasonForIssue("tooMuchMemory")
    +)
    +
    +func init() {
    +	t["VmFaultToleranceConfigIssueReasonForIssue"] = reflect.TypeOf((*VmFaultToleranceConfigIssueReasonForIssue)(nil)).Elem()
    +}
    +
    +type VmFaultToleranceInvalidFileBackingDeviceType string
    +
    +const (
    +	VmFaultToleranceInvalidFileBackingDeviceTypeVirtualFloppy       = VmFaultToleranceInvalidFileBackingDeviceType("virtualFloppy")
    +	VmFaultToleranceInvalidFileBackingDeviceTypeVirtualCdrom        = VmFaultToleranceInvalidFileBackingDeviceType("virtualCdrom")
    +	VmFaultToleranceInvalidFileBackingDeviceTypeVirtualSerialPort   = VmFaultToleranceInvalidFileBackingDeviceType("virtualSerialPort")
    +	VmFaultToleranceInvalidFileBackingDeviceTypeVirtualParallelPort = VmFaultToleranceInvalidFileBackingDeviceType("virtualParallelPort")
    +	VmFaultToleranceInvalidFileBackingDeviceTypeVirtualDisk         = VmFaultToleranceInvalidFileBackingDeviceType("virtualDisk")
    +)
    +
    +func init() {
    +	t["VmFaultToleranceInvalidFileBackingDeviceType"] = reflect.TypeOf((*VmFaultToleranceInvalidFileBackingDeviceType)(nil)).Elem()
    +}
    +
    +type VmShutdownOnIsolationEventOperation string
    +
    +const (
    +	VmShutdownOnIsolationEventOperationShutdown   = VmShutdownOnIsolationEventOperation("shutdown")
    +	VmShutdownOnIsolationEventOperationPoweredOff = VmShutdownOnIsolationEventOperation("poweredOff")
    +)
    +
    +func init() {
    +	t["VmShutdownOnIsolationEventOperation"] = reflect.TypeOf((*VmShutdownOnIsolationEventOperation)(nil)).Elem()
    +}
    +
    +type VmwareDistributedVirtualSwitchPvlanPortType string
    +
    +const (
    +	VmwareDistributedVirtualSwitchPvlanPortTypePromiscuous = VmwareDistributedVirtualSwitchPvlanPortType("promiscuous")
    +	VmwareDistributedVirtualSwitchPvlanPortTypeIsolated    = VmwareDistributedVirtualSwitchPvlanPortType("isolated")
    +	VmwareDistributedVirtualSwitchPvlanPortTypeCommunity   = VmwareDistributedVirtualSwitchPvlanPortType("community")
    +)
    +
    +func init() {
    +	t["VmwareDistributedVirtualSwitchPvlanPortType"] = reflect.TypeOf((*VmwareDistributedVirtualSwitchPvlanPortType)(nil)).Elem()
    +}
    +
    +type VsanDiskIssueType string
    +
    +const (
    +	VsanDiskIssueTypeNonExist      = VsanDiskIssueType("nonExist")
    +	VsanDiskIssueTypeStampMismatch = VsanDiskIssueType("stampMismatch")
    +	VsanDiskIssueTypeUnknown       = VsanDiskIssueType("unknown")
    +)
    +
    +func init() {
    +	t["VsanDiskIssueType"] = reflect.TypeOf((*VsanDiskIssueType)(nil)).Elem()
    +}
    +
    +type VsanHostDecommissionModeObjectAction string
    +
    +const (
    +	VsanHostDecommissionModeObjectActionNoAction                  = VsanHostDecommissionModeObjectAction("noAction")
    +	VsanHostDecommissionModeObjectActionEnsureObjectAccessibility = VsanHostDecommissionModeObjectAction("ensureObjectAccessibility")
    +	VsanHostDecommissionModeObjectActionEvacuateAllData           = VsanHostDecommissionModeObjectAction("evacuateAllData")
    +)
    +
    +func init() {
    +	t["VsanHostDecommissionModeObjectAction"] = reflect.TypeOf((*VsanHostDecommissionModeObjectAction)(nil)).Elem()
    +}
    +
    +type VsanHostDiskResultState string
    +
    +const (
    +	VsanHostDiskResultStateInUse      = VsanHostDiskResultState("inUse")
    +	VsanHostDiskResultStateEligible   = VsanHostDiskResultState("eligible")
    +	VsanHostDiskResultStateIneligible = VsanHostDiskResultState("ineligible")
    +)
    +
    +func init() {
    +	t["VsanHostDiskResultState"] = reflect.TypeOf((*VsanHostDiskResultState)(nil)).Elem()
    +}
    +
    +type VsanHostHealthState string
    +
    +const (
    +	VsanHostHealthStateUnknown   = VsanHostHealthState("unknown")
    +	VsanHostHealthStateHealthy   = VsanHostHealthState("healthy")
    +	VsanHostHealthStateUnhealthy = VsanHostHealthState("unhealthy")
    +)
    +
    +func init() {
    +	t["VsanHostHealthState"] = reflect.TypeOf((*VsanHostHealthState)(nil)).Elem()
    +}
    +
    +type VsanHostNodeState string
    +
    +const (
    +	VsanHostNodeStateError                   = VsanHostNodeState("error")
    +	VsanHostNodeStateDisabled                = VsanHostNodeState("disabled")
    +	VsanHostNodeStateAgent                   = VsanHostNodeState("agent")
    +	VsanHostNodeStateMaster                  = VsanHostNodeState("master")
    +	VsanHostNodeStateBackup                  = VsanHostNodeState("backup")
    +	VsanHostNodeStateStarting                = VsanHostNodeState("starting")
    +	VsanHostNodeStateStopping                = VsanHostNodeState("stopping")
    +	VsanHostNodeStateEnteringMaintenanceMode = VsanHostNodeState("enteringMaintenanceMode")
    +	VsanHostNodeStateExitingMaintenanceMode  = VsanHostNodeState("exitingMaintenanceMode")
    +	VsanHostNodeStateDecommissioning         = VsanHostNodeState("decommissioning")
    +)
    +
    +func init() {
    +	t["VsanHostNodeState"] = reflect.TypeOf((*VsanHostNodeState)(nil)).Elem()
    +}
    +
    +type VsanUpgradeSystemUpgradeHistoryDiskGroupOpType string
    +
    +const (
    +	VsanUpgradeSystemUpgradeHistoryDiskGroupOpTypeAdd    = VsanUpgradeSystemUpgradeHistoryDiskGroupOpType("add")
    +	VsanUpgradeSystemUpgradeHistoryDiskGroupOpTypeRemove = VsanUpgradeSystemUpgradeHistoryDiskGroupOpType("remove")
    +)
    +
    +func init() {
    +	t["VsanUpgradeSystemUpgradeHistoryDiskGroupOpType"] = reflect.TypeOf((*VsanUpgradeSystemUpgradeHistoryDiskGroupOpType)(nil)).Elem()
    +}
    +
    +type WeekOfMonth string
    +
    +const (
    +	WeekOfMonthFirst  = WeekOfMonth("first")
    +	WeekOfMonthSecond = WeekOfMonth("second")
    +	WeekOfMonthThird  = WeekOfMonth("third")
    +	WeekOfMonthFourth = WeekOfMonth("fourth")
    +	WeekOfMonthLast   = WeekOfMonth("last")
    +)
    +
    +func init() {
    +	t["WeekOfMonth"] = reflect.TypeOf((*WeekOfMonth)(nil)).Elem()
    +}
    +
    +type WillLoseHAProtectionResolution string
    +
    +const (
    +	WillLoseHAProtectionResolutionSvmotion = WillLoseHAProtectionResolution("svmotion")
    +	WillLoseHAProtectionResolutionRelocate = WillLoseHAProtectionResolution("relocate")
    +)
    +
    +func init() {
    +	t["WillLoseHAProtectionResolution"] = reflect.TypeOf((*WillLoseHAProtectionResolution)(nil)).Elem()
    +}
    +
    +type VslmVStorageObjectControlFlag string
    +
    +const (
    +	VslmVStorageObjectControlFlagKeepAfterDeleteVm          = VslmVStorageObjectControlFlag("keepAfterDeleteVm")
    +	VslmVStorageObjectControlFlagDisableRelocation          = VslmVStorageObjectControlFlag("disableRelocation")
    +	VslmVStorageObjectControlFlagEnableChangedBlockTracking = VslmVStorageObjectControlFlag("enableChangedBlockTracking")
    +)
    +
    +func init() {
    +	t["vslmVStorageObjectControlFlag"] = reflect.TypeOf((*VslmVStorageObjectControlFlag)(nil)).Elem()
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/types/fault.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/types/fault.go
    new file mode 100644
    index 000000000..c2503fa5c
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/types/fault.go
    @@ -0,0 +1,32 @@
    +/*
    +Copyright (c) 2015 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package types
    +
    +type HasFault interface {
    +	Fault() BaseMethodFault
    +}
    +
    +func IsFileNotFound(err error) bool {
    +	if f, ok := err.(HasFault); ok {
    +		switch f.Fault().(type) {
    +		case *FileNotFound:
    +			return true
    +		}
    +	}
    +
    +	return false
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/types/helpers.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/types/helpers.go
    new file mode 100644
    index 000000000..7ccfd29b6
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/types/helpers.go
    @@ -0,0 +1,95 @@
    +/*
    +Copyright (c) 2015-2017 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package types
    +
    +import (
    +	"reflect"
    +	"strings"
    +	"time"
    +)
    +
    +func NewBool(v bool) *bool {
    +	return &v
    +}
    +
    +func NewInt32(v int32) *int32 {
    +	return &v
    +}
    +
    +func NewInt64(v int64) *int64 {
    +	return &v
    +}
    +
    +func NewTime(v time.Time) *time.Time {
    +	return &v
    +}
    +
    +func NewReference(r ManagedObjectReference) *ManagedObjectReference {
    +	return &r
    +}
    +
    +func (r ManagedObjectReference) Reference() ManagedObjectReference {
    +	return r
    +}
    +
    +func (r ManagedObjectReference) String() string {
    +	return strings.Join([]string{r.Type, r.Value}, ":")
    +}
    +
    +func (r *ManagedObjectReference) FromString(o string) bool {
    +	s := strings.SplitN(o, ":", 2)
    +
    +	if len(s) < 2 {
    +		return false
    +	}
    +
    +	r.Type = s[0]
    +	r.Value = s[1]
    +
    +	return true
    +}
    +
    +func (c *PerfCounterInfo) Name() string {
    +	return c.GroupInfo.GetElementDescription().Key + "." + c.NameInfo.GetElementDescription().Key + "." + string(c.RollupType)
    +}
    +
    +func defaultResourceAllocationInfo() ResourceAllocationInfo {
    +	return ResourceAllocationInfo{
    +		Reservation:           NewInt64(0),
    +		ExpandableReservation: NewBool(true),
    +		Limit: NewInt64(-1),
    +		Shares: &SharesInfo{
    +			Level: SharesLevelNormal,
    +		},
    +	}
    +}
    +
    +// DefaultResourceConfigSpec returns a ResourceConfigSpec populated with the same default field values as vCenter.
    +// Note that the wsdl marks these fields as optional, but they are required to be set when creating a resource pool.
    +// They are only optional when updating a resource pool.
    +func DefaultResourceConfigSpec() ResourceConfigSpec {
    +	return ResourceConfigSpec{
    +		CpuAllocation:    defaultResourceAllocationInfo(),
    +		MemoryAllocation: defaultResourceAllocationInfo(),
    +	}
    +}
    +
    +func init() {
    +	// Known 6.5 issue where this event type is sent even though it is internal.
    +	// This workaround allows us to unmarshal and avoid NPEs.
    +	t["HostSubSpecificationUpdateEvent"] = reflect.TypeOf((*HostEvent)(nil)).Elem()
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/types/if.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/types/if.go
    new file mode 100644
    index 000000000..89d02f234
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/types/if.go
    @@ -0,0 +1,3449 @@
    +/*
    +Copyright (c) 2014-2018 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package types
    +
    +import "reflect"
    +
    +func (b *Action) GetAction() *Action { return b }
    +
    +type BaseAction interface {
    +	GetAction() *Action
    +}
    +
    +func init() {
    +	t["BaseAction"] = reflect.TypeOf((*Action)(nil)).Elem()
    +}
    +
    +func (b *ActiveDirectoryFault) GetActiveDirectoryFault() *ActiveDirectoryFault { return b }
    +
    +type BaseActiveDirectoryFault interface {
    +	GetActiveDirectoryFault() *ActiveDirectoryFault
    +}
    +
    +func init() {
    +	t["BaseActiveDirectoryFault"] = reflect.TypeOf((*ActiveDirectoryFault)(nil)).Elem()
    +}
    +
    +func (b *AlarmAction) GetAlarmAction() *AlarmAction { return b }
    +
    +type BaseAlarmAction interface {
    +	GetAlarmAction() *AlarmAction
    +}
    +
    +func init() {
    +	t["BaseAlarmAction"] = reflect.TypeOf((*AlarmAction)(nil)).Elem()
    +}
    +
    +func (b *AlarmEvent) GetAlarmEvent() *AlarmEvent { return b }
    +
    +type BaseAlarmEvent interface {
    +	GetAlarmEvent() *AlarmEvent
    +}
    +
    +func init() {
    +	t["BaseAlarmEvent"] = reflect.TypeOf((*AlarmEvent)(nil)).Elem()
    +}
    +
    +func (b *AlarmExpression) GetAlarmExpression() *AlarmExpression { return b }
    +
    +type BaseAlarmExpression interface {
    +	GetAlarmExpression() *AlarmExpression
    +}
    +
    +func init() {
    +	t["BaseAlarmExpression"] = reflect.TypeOf((*AlarmExpression)(nil)).Elem()
    +}
    +
    +func (b *AlarmSpec) GetAlarmSpec() *AlarmSpec { return b }
    +
    +type BaseAlarmSpec interface {
    +	GetAlarmSpec() *AlarmSpec
    +}
    +
    +func init() {
    +	t["BaseAlarmSpec"] = reflect.TypeOf((*AlarmSpec)(nil)).Elem()
    +}
    +
    +func (b *AnswerFileCreateSpec) GetAnswerFileCreateSpec() *AnswerFileCreateSpec { return b }
    +
    +type BaseAnswerFileCreateSpec interface {
    +	GetAnswerFileCreateSpec() *AnswerFileCreateSpec
    +}
    +
    +func init() {
    +	t["BaseAnswerFileCreateSpec"] = reflect.TypeOf((*AnswerFileCreateSpec)(nil)).Elem()
    +}
    +
    +func (b *ApplyProfile) GetApplyProfile() *ApplyProfile { return b }
    +
    +type BaseApplyProfile interface {
    +	GetApplyProfile() *ApplyProfile
    +}
    +
    +func init() {
    +	t["BaseApplyProfile"] = reflect.TypeOf((*ApplyProfile)(nil)).Elem()
    +}
    +
    +func (b *ArrayUpdateSpec) GetArrayUpdateSpec() *ArrayUpdateSpec { return b }
    +
    +type BaseArrayUpdateSpec interface {
    +	GetArrayUpdateSpec() *ArrayUpdateSpec
    +}
    +
    +func init() {
    +	t["BaseArrayUpdateSpec"] = reflect.TypeOf((*ArrayUpdateSpec)(nil)).Elem()
    +}
    +
    +func (b *AuthorizationEvent) GetAuthorizationEvent() *AuthorizationEvent { return b }
    +
    +type BaseAuthorizationEvent interface {
    +	GetAuthorizationEvent() *AuthorizationEvent
    +}
    +
    +func init() {
    +	t["BaseAuthorizationEvent"] = reflect.TypeOf((*AuthorizationEvent)(nil)).Elem()
    +}
    +
    +func (b *BaseConfigInfo) GetBaseConfigInfo() *BaseConfigInfo { return b }
    +
    +type BaseBaseConfigInfo interface {
    +	GetBaseConfigInfo() *BaseConfigInfo
    +}
    +
    +func init() {
    +	t["BaseBaseConfigInfo"] = reflect.TypeOf((*BaseConfigInfo)(nil)).Elem()
    +}
    +
    +func (b *BaseConfigInfoBackingInfo) GetBaseConfigInfoBackingInfo() *BaseConfigInfoBackingInfo {
    +	return b
    +}
    +
    +type BaseBaseConfigInfoBackingInfo interface {
    +	GetBaseConfigInfoBackingInfo() *BaseConfigInfoBackingInfo
    +}
    +
    +func init() {
    +	t["BaseBaseConfigInfoBackingInfo"] = reflect.TypeOf((*BaseConfigInfoBackingInfo)(nil)).Elem()
    +}
    +
    +func (b *BaseConfigInfoFileBackingInfo) GetBaseConfigInfoFileBackingInfo() *BaseConfigInfoFileBackingInfo {
    +	return b
    +}
    +
    +type BaseBaseConfigInfoFileBackingInfo interface {
    +	GetBaseConfigInfoFileBackingInfo() *BaseConfigInfoFileBackingInfo
    +}
    +
    +func init() {
    +	t["BaseBaseConfigInfoFileBackingInfo"] = reflect.TypeOf((*BaseConfigInfoFileBackingInfo)(nil)).Elem()
    +}
    +
    +func (b *CannotAccessNetwork) GetCannotAccessNetwork() *CannotAccessNetwork { return b }
    +
    +type BaseCannotAccessNetwork interface {
    +	GetCannotAccessNetwork() *CannotAccessNetwork
    +}
    +
    +func init() {
    +	t["BaseCannotAccessNetwork"] = reflect.TypeOf((*CannotAccessNetwork)(nil)).Elem()
    +}
    +
    +func (b *CannotAccessVmComponent) GetCannotAccessVmComponent() *CannotAccessVmComponent { return b }
    +
    +type BaseCannotAccessVmComponent interface {
    +	GetCannotAccessVmComponent() *CannotAccessVmComponent
    +}
    +
    +func init() {
    +	t["BaseCannotAccessVmComponent"] = reflect.TypeOf((*CannotAccessVmComponent)(nil)).Elem()
    +}
    +
    +func (b *CannotAccessVmDevice) GetCannotAccessVmDevice() *CannotAccessVmDevice { return b }
    +
    +type BaseCannotAccessVmDevice interface {
    +	GetCannotAccessVmDevice() *CannotAccessVmDevice
    +}
    +
    +func init() {
    +	t["BaseCannotAccessVmDevice"] = reflect.TypeOf((*CannotAccessVmDevice)(nil)).Elem()
    +}
    +
    +func (b *CannotAccessVmDisk) GetCannotAccessVmDisk() *CannotAccessVmDisk { return b }
    +
    +type BaseCannotAccessVmDisk interface {
    +	GetCannotAccessVmDisk() *CannotAccessVmDisk
    +}
    +
    +func init() {
    +	t["BaseCannotAccessVmDisk"] = reflect.TypeOf((*CannotAccessVmDisk)(nil)).Elem()
    +}
    +
    +func (b *CannotMoveVsanEnabledHost) GetCannotMoveVsanEnabledHost() *CannotMoveVsanEnabledHost {
    +	return b
    +}
    +
    +type BaseCannotMoveVsanEnabledHost interface {
    +	GetCannotMoveVsanEnabledHost() *CannotMoveVsanEnabledHost
    +}
    +
    +func init() {
    +	t["BaseCannotMoveVsanEnabledHost"] = reflect.TypeOf((*CannotMoveVsanEnabledHost)(nil)).Elem()
    +}
    +
    +func (b *ClusterAction) GetClusterAction() *ClusterAction { return b }
    +
    +type BaseClusterAction interface {
    +	GetClusterAction() *ClusterAction
    +}
    +
    +func init() {
    +	t["BaseClusterAction"] = reflect.TypeOf((*ClusterAction)(nil)).Elem()
    +}
    +
    +func (b *ClusterDasAdmissionControlInfo) GetClusterDasAdmissionControlInfo() *ClusterDasAdmissionControlInfo {
    +	return b
    +}
    +
    +type BaseClusterDasAdmissionControlInfo interface {
    +	GetClusterDasAdmissionControlInfo() *ClusterDasAdmissionControlInfo
    +}
    +
    +func init() {
    +	t["BaseClusterDasAdmissionControlInfo"] = reflect.TypeOf((*ClusterDasAdmissionControlInfo)(nil)).Elem()
    +}
    +
    +func (b *ClusterDasAdmissionControlPolicy) GetClusterDasAdmissionControlPolicy() *ClusterDasAdmissionControlPolicy {
    +	return b
    +}
    +
    +type BaseClusterDasAdmissionControlPolicy interface {
    +	GetClusterDasAdmissionControlPolicy() *ClusterDasAdmissionControlPolicy
    +}
    +
    +func init() {
    +	t["BaseClusterDasAdmissionControlPolicy"] = reflect.TypeOf((*ClusterDasAdmissionControlPolicy)(nil)).Elem()
    +}
    +
    +func (b *ClusterDasAdvancedRuntimeInfo) GetClusterDasAdvancedRuntimeInfo() *ClusterDasAdvancedRuntimeInfo {
    +	return b
    +}
    +
    +type BaseClusterDasAdvancedRuntimeInfo interface {
    +	GetClusterDasAdvancedRuntimeInfo() *ClusterDasAdvancedRuntimeInfo
    +}
    +
    +func init() {
    +	t["BaseClusterDasAdvancedRuntimeInfo"] = reflect.TypeOf((*ClusterDasAdvancedRuntimeInfo)(nil)).Elem()
    +}
    +
    +func (b *ClusterDasData) GetClusterDasData() *ClusterDasData { return b }
    +
    +type BaseClusterDasData interface {
    +	GetClusterDasData() *ClusterDasData
    +}
    +
    +func init() {
    +	t["BaseClusterDasData"] = reflect.TypeOf((*ClusterDasData)(nil)).Elem()
    +}
    +
    +func (b *ClusterDasHostInfo) GetClusterDasHostInfo() *ClusterDasHostInfo { return b }
    +
    +type BaseClusterDasHostInfo interface {
    +	GetClusterDasHostInfo() *ClusterDasHostInfo
    +}
    +
    +func init() {
    +	t["BaseClusterDasHostInfo"] = reflect.TypeOf((*ClusterDasHostInfo)(nil)).Elem()
    +}
    +
    +func (b *ClusterDrsFaultsFaultsByVm) GetClusterDrsFaultsFaultsByVm() *ClusterDrsFaultsFaultsByVm {
    +	return b
    +}
    +
    +type BaseClusterDrsFaultsFaultsByVm interface {
    +	GetClusterDrsFaultsFaultsByVm() *ClusterDrsFaultsFaultsByVm
    +}
    +
    +func init() {
    +	t["BaseClusterDrsFaultsFaultsByVm"] = reflect.TypeOf((*ClusterDrsFaultsFaultsByVm)(nil)).Elem()
    +}
    +
    +func (b *ClusterEvent) GetClusterEvent() *ClusterEvent { return b }
    +
    +type BaseClusterEvent interface {
    +	GetClusterEvent() *ClusterEvent
    +}
    +
    +func init() {
    +	t["BaseClusterEvent"] = reflect.TypeOf((*ClusterEvent)(nil)).Elem()
    +}
    +
    +func (b *ClusterGroupInfo) GetClusterGroupInfo() *ClusterGroupInfo { return b }
    +
    +type BaseClusterGroupInfo interface {
    +	GetClusterGroupInfo() *ClusterGroupInfo
    +}
    +
    +func init() {
    +	t["BaseClusterGroupInfo"] = reflect.TypeOf((*ClusterGroupInfo)(nil)).Elem()
    +}
    +
    +func (b *ClusterOvercommittedEvent) GetClusterOvercommittedEvent() *ClusterOvercommittedEvent {
    +	return b
    +}
    +
    +type BaseClusterOvercommittedEvent interface {
    +	GetClusterOvercommittedEvent() *ClusterOvercommittedEvent
    +}
    +
    +func init() {
    +	t["BaseClusterOvercommittedEvent"] = reflect.TypeOf((*ClusterOvercommittedEvent)(nil)).Elem()
    +}
    +
    +func (b *ClusterProfileConfigSpec) GetClusterProfileConfigSpec() *ClusterProfileConfigSpec { return b }
    +
    +type BaseClusterProfileConfigSpec interface {
    +	GetClusterProfileConfigSpec() *ClusterProfileConfigSpec
    +}
    +
    +func init() {
    +	t["BaseClusterProfileConfigSpec"] = reflect.TypeOf((*ClusterProfileConfigSpec)(nil)).Elem()
    +}
    +
    +func (b *ClusterProfileCreateSpec) GetClusterProfileCreateSpec() *ClusterProfileCreateSpec { return b }
    +
    +type BaseClusterProfileCreateSpec interface {
    +	GetClusterProfileCreateSpec() *ClusterProfileCreateSpec
    +}
    +
    +func init() {
    +	t["BaseClusterProfileCreateSpec"] = reflect.TypeOf((*ClusterProfileCreateSpec)(nil)).Elem()
    +}
    +
    +func (b *ClusterRuleInfo) GetClusterRuleInfo() *ClusterRuleInfo { return b }
    +
    +type BaseClusterRuleInfo interface {
    +	GetClusterRuleInfo() *ClusterRuleInfo
    +}
    +
    +func init() {
    +	t["BaseClusterRuleInfo"] = reflect.TypeOf((*ClusterRuleInfo)(nil)).Elem()
    +}
    +
    +func (b *ClusterSlotPolicy) GetClusterSlotPolicy() *ClusterSlotPolicy { return b }
    +
    +type BaseClusterSlotPolicy interface {
    +	GetClusterSlotPolicy() *ClusterSlotPolicy
    +}
    +
    +func init() {
    +	t["BaseClusterSlotPolicy"] = reflect.TypeOf((*ClusterSlotPolicy)(nil)).Elem()
    +}
    +
    +func (b *ClusterStatusChangedEvent) GetClusterStatusChangedEvent() *ClusterStatusChangedEvent {
    +	return b
    +}
    +
    +type BaseClusterStatusChangedEvent interface {
    +	GetClusterStatusChangedEvent() *ClusterStatusChangedEvent
    +}
    +
    +func init() {
    +	t["BaseClusterStatusChangedEvent"] = reflect.TypeOf((*ClusterStatusChangedEvent)(nil)).Elem()
    +}
    +
    +func (b *ComputeResourceConfigInfo) GetComputeResourceConfigInfo() *ComputeResourceConfigInfo {
    +	return b
    +}
    +
    +type BaseComputeResourceConfigInfo interface {
    +	GetComputeResourceConfigInfo() *ComputeResourceConfigInfo
    +}
    +
    +func init() {
    +	t["BaseComputeResourceConfigInfo"] = reflect.TypeOf((*ComputeResourceConfigInfo)(nil)).Elem()
    +}
    +
    +func (b *ComputeResourceConfigSpec) GetComputeResourceConfigSpec() *ComputeResourceConfigSpec {
    +	return b
    +}
    +
    +type BaseComputeResourceConfigSpec interface {
    +	GetComputeResourceConfigSpec() *ComputeResourceConfigSpec
    +}
    +
    +func init() {
    +	t["BaseComputeResourceConfigSpec"] = reflect.TypeOf((*ComputeResourceConfigSpec)(nil)).Elem()
    +}
    +
    +func (b *ComputeResourceSummary) GetComputeResourceSummary() *ComputeResourceSummary { return b }
    +
    +type BaseComputeResourceSummary interface {
    +	GetComputeResourceSummary() *ComputeResourceSummary
    +}
    +
    +func init() {
    +	t["BaseComputeResourceSummary"] = reflect.TypeOf((*ComputeResourceSummary)(nil)).Elem()
    +}
    +
    +func (b *CpuIncompatible) GetCpuIncompatible() *CpuIncompatible { return b }
    +
    +type BaseCpuIncompatible interface {
    +	GetCpuIncompatible() *CpuIncompatible
    +}
    +
    +func init() {
    +	t["BaseCpuIncompatible"] = reflect.TypeOf((*CpuIncompatible)(nil)).Elem()
    +}
    +
    +func (b *CryptoSpec) GetCryptoSpec() *CryptoSpec { return b }
    +
    +type BaseCryptoSpec interface {
    +	GetCryptoSpec() *CryptoSpec
    +}
    +
    +func init() {
    +	t["BaseCryptoSpec"] = reflect.TypeOf((*CryptoSpec)(nil)).Elem()
    +}
    +
    +func (b *CryptoSpecNoOp) GetCryptoSpecNoOp() *CryptoSpecNoOp { return b }
    +
    +type BaseCryptoSpecNoOp interface {
    +	GetCryptoSpecNoOp() *CryptoSpecNoOp
    +}
    +
    +func init() {
    +	t["BaseCryptoSpecNoOp"] = reflect.TypeOf((*CryptoSpecNoOp)(nil)).Elem()
    +}
    +
    +func (b *CustomFieldDefEvent) GetCustomFieldDefEvent() *CustomFieldDefEvent { return b }
    +
    +type BaseCustomFieldDefEvent interface {
    +	GetCustomFieldDefEvent() *CustomFieldDefEvent
    +}
    +
    +func init() {
    +	t["BaseCustomFieldDefEvent"] = reflect.TypeOf((*CustomFieldDefEvent)(nil)).Elem()
    +}
    +
    +func (b *CustomFieldEvent) GetCustomFieldEvent() *CustomFieldEvent { return b }
    +
    +type BaseCustomFieldEvent interface {
    +	GetCustomFieldEvent() *CustomFieldEvent
    +}
    +
    +func init() {
    +	t["BaseCustomFieldEvent"] = reflect.TypeOf((*CustomFieldEvent)(nil)).Elem()
    +}
    +
    +func (b *CustomFieldValue) GetCustomFieldValue() *CustomFieldValue { return b }
    +
    +type BaseCustomFieldValue interface {
    +	GetCustomFieldValue() *CustomFieldValue
    +}
    +
    +func init() {
    +	t["BaseCustomFieldValue"] = reflect.TypeOf((*CustomFieldValue)(nil)).Elem()
    +}
    +
    +func (b *CustomizationEvent) GetCustomizationEvent() *CustomizationEvent { return b }
    +
    +type BaseCustomizationEvent interface {
    +	GetCustomizationEvent() *CustomizationEvent
    +}
    +
    +func init() {
    +	t["BaseCustomizationEvent"] = reflect.TypeOf((*CustomizationEvent)(nil)).Elem()
    +}
    +
    +func (b *CustomizationFailed) GetCustomizationFailed() *CustomizationFailed { return b }
    +
    +type BaseCustomizationFailed interface {
    +	GetCustomizationFailed() *CustomizationFailed
    +}
    +
    +func init() {
    +	t["BaseCustomizationFailed"] = reflect.TypeOf((*CustomizationFailed)(nil)).Elem()
    +}
    +
    +func (b *CustomizationFault) GetCustomizationFault() *CustomizationFault { return b }
    +
    +type BaseCustomizationFault interface {
    +	GetCustomizationFault() *CustomizationFault
    +}
    +
    +func init() {
    +	t["BaseCustomizationFault"] = reflect.TypeOf((*CustomizationFault)(nil)).Elem()
    +}
    +
    +func (b *CustomizationIdentitySettings) GetCustomizationIdentitySettings() *CustomizationIdentitySettings {
    +	return b
    +}
    +
    +type BaseCustomizationIdentitySettings interface {
    +	GetCustomizationIdentitySettings() *CustomizationIdentitySettings
    +}
    +
    +func init() {
    +	t["BaseCustomizationIdentitySettings"] = reflect.TypeOf((*CustomizationIdentitySettings)(nil)).Elem()
    +}
    +
    +func (b *CustomizationIpGenerator) GetCustomizationIpGenerator() *CustomizationIpGenerator { return b }
    +
    +type BaseCustomizationIpGenerator interface {
    +	GetCustomizationIpGenerator() *CustomizationIpGenerator
    +}
    +
    +func init() {
    +	t["BaseCustomizationIpGenerator"] = reflect.TypeOf((*CustomizationIpGenerator)(nil)).Elem()
    +}
    +
    +func (b *CustomizationIpV6Generator) GetCustomizationIpV6Generator() *CustomizationIpV6Generator {
    +	return b
    +}
    +
    +type BaseCustomizationIpV6Generator interface {
    +	GetCustomizationIpV6Generator() *CustomizationIpV6Generator
    +}
    +
    +func init() {
    +	t["BaseCustomizationIpV6Generator"] = reflect.TypeOf((*CustomizationIpV6Generator)(nil)).Elem()
    +}
    +
    +func (b *CustomizationName) GetCustomizationName() *CustomizationName { return b }
    +
    +type BaseCustomizationName interface {
    +	GetCustomizationName() *CustomizationName
    +}
    +
    +func init() {
    +	t["BaseCustomizationName"] = reflect.TypeOf((*CustomizationName)(nil)).Elem()
    +}
    +
    +func (b *CustomizationOptions) GetCustomizationOptions() *CustomizationOptions { return b }
    +
    +type BaseCustomizationOptions interface {
    +	GetCustomizationOptions() *CustomizationOptions
    +}
    +
    +func init() {
    +	t["BaseCustomizationOptions"] = reflect.TypeOf((*CustomizationOptions)(nil)).Elem()
    +}
    +
    +func (b *DVPortSetting) GetDVPortSetting() *DVPortSetting { return b }
    +
    +type BaseDVPortSetting interface {
    +	GetDVPortSetting() *DVPortSetting
    +}
    +
    +func init() {
    +	t["BaseDVPortSetting"] = reflect.TypeOf((*DVPortSetting)(nil)).Elem()
    +}
    +
    +func (b *DVPortgroupEvent) GetDVPortgroupEvent() *DVPortgroupEvent { return b }
    +
    +type BaseDVPortgroupEvent interface {
    +	GetDVPortgroupEvent() *DVPortgroupEvent
    +}
    +
    +func init() {
    +	t["BaseDVPortgroupEvent"] = reflect.TypeOf((*DVPortgroupEvent)(nil)).Elem()
    +}
    +
    +func (b *DVPortgroupPolicy) GetDVPortgroupPolicy() *DVPortgroupPolicy { return b }
    +
    +type BaseDVPortgroupPolicy interface {
    +	GetDVPortgroupPolicy() *DVPortgroupPolicy
    +}
    +
    +func init() {
    +	t["BaseDVPortgroupPolicy"] = reflect.TypeOf((*DVPortgroupPolicy)(nil)).Elem()
    +}
    +
    +func (b *DVSConfigInfo) GetDVSConfigInfo() *DVSConfigInfo { return b }
    +
    +type BaseDVSConfigInfo interface {
    +	GetDVSConfigInfo() *DVSConfigInfo
    +}
    +
    +func init() {
    +	t["BaseDVSConfigInfo"] = reflect.TypeOf((*DVSConfigInfo)(nil)).Elem()
    +}
    +
    +func (b *DVSConfigSpec) GetDVSConfigSpec() *DVSConfigSpec { return b }
    +
    +type BaseDVSConfigSpec interface {
    +	GetDVSConfigSpec() *DVSConfigSpec
    +}
    +
    +func init() {
    +	t["BaseDVSConfigSpec"] = reflect.TypeOf((*DVSConfigSpec)(nil)).Elem()
    +}
    +
    +func (b *DVSFeatureCapability) GetDVSFeatureCapability() *DVSFeatureCapability { return b }
    +
    +type BaseDVSFeatureCapability interface {
    +	GetDVSFeatureCapability() *DVSFeatureCapability
    +}
    +
    +func init() {
    +	t["BaseDVSFeatureCapability"] = reflect.TypeOf((*DVSFeatureCapability)(nil)).Elem()
    +}
    +
    +func (b *DVSHealthCheckCapability) GetDVSHealthCheckCapability() *DVSHealthCheckCapability { return b }
    +
    +type BaseDVSHealthCheckCapability interface {
    +	GetDVSHealthCheckCapability() *DVSHealthCheckCapability
    +}
    +
    +func init() {
    +	t["BaseDVSHealthCheckCapability"] = reflect.TypeOf((*DVSHealthCheckCapability)(nil)).Elem()
    +}
    +
    +func (b *DVSHealthCheckConfig) GetDVSHealthCheckConfig() *DVSHealthCheckConfig { return b }
    +
    +type BaseDVSHealthCheckConfig interface {
    +	GetDVSHealthCheckConfig() *DVSHealthCheckConfig
    +}
    +
    +func init() {
    +	t["BaseDVSHealthCheckConfig"] = reflect.TypeOf((*DVSHealthCheckConfig)(nil)).Elem()
    +}
    +
    +func (b *DVSUplinkPortPolicy) GetDVSUplinkPortPolicy() *DVSUplinkPortPolicy { return b }
    +
    +type BaseDVSUplinkPortPolicy interface {
    +	GetDVSUplinkPortPolicy() *DVSUplinkPortPolicy
    +}
    +
    +func init() {
    +	t["BaseDVSUplinkPortPolicy"] = reflect.TypeOf((*DVSUplinkPortPolicy)(nil)).Elem()
    +}
    +
    +func (b *DailyTaskScheduler) GetDailyTaskScheduler() *DailyTaskScheduler { return b }
    +
    +type BaseDailyTaskScheduler interface {
    +	GetDailyTaskScheduler() *DailyTaskScheduler
    +}
    +
    +func init() {
    +	t["BaseDailyTaskScheduler"] = reflect.TypeOf((*DailyTaskScheduler)(nil)).Elem()
    +}
    +
    +func (b *DatacenterEvent) GetDatacenterEvent() *DatacenterEvent { return b }
    +
    +type BaseDatacenterEvent interface {
    +	GetDatacenterEvent() *DatacenterEvent
    +}
    +
    +func init() {
    +	t["BaseDatacenterEvent"] = reflect.TypeOf((*DatacenterEvent)(nil)).Elem()
    +}
    +
    +func (b *DatastoreEvent) GetDatastoreEvent() *DatastoreEvent { return b }
    +
    +type BaseDatastoreEvent interface {
    +	GetDatastoreEvent() *DatastoreEvent
    +}
    +
    +func init() {
    +	t["BaseDatastoreEvent"] = reflect.TypeOf((*DatastoreEvent)(nil)).Elem()
    +}
    +
    +func (b *DatastoreFileEvent) GetDatastoreFileEvent() *DatastoreFileEvent { return b }
    +
    +type BaseDatastoreFileEvent interface {
    +	GetDatastoreFileEvent() *DatastoreFileEvent
    +}
    +
    +func init() {
    +	t["BaseDatastoreFileEvent"] = reflect.TypeOf((*DatastoreFileEvent)(nil)).Elem()
    +}
    +
    +func (b *DatastoreInfo) GetDatastoreInfo() *DatastoreInfo { return b }
    +
    +type BaseDatastoreInfo interface {
    +	GetDatastoreInfo() *DatastoreInfo
    +}
    +
    +func init() {
    +	t["BaseDatastoreInfo"] = reflect.TypeOf((*DatastoreInfo)(nil)).Elem()
    +}
    +
    +func (b *DatastoreNotWritableOnHost) GetDatastoreNotWritableOnHost() *DatastoreNotWritableOnHost {
    +	return b
    +}
    +
    +type BaseDatastoreNotWritableOnHost interface {
    +	GetDatastoreNotWritableOnHost() *DatastoreNotWritableOnHost
    +}
    +
    +func init() {
    +	t["BaseDatastoreNotWritableOnHost"] = reflect.TypeOf((*DatastoreNotWritableOnHost)(nil)).Elem()
    +}
    +
    +func (b *Description) GetDescription() *Description { return b }
    +
    +type BaseDescription interface {
    +	GetDescription() *Description
    +}
    +
    +func init() {
    +	t["BaseDescription"] = reflect.TypeOf((*Description)(nil)).Elem()
    +}
    +
    +func (b *DeviceBackingNotSupported) GetDeviceBackingNotSupported() *DeviceBackingNotSupported {
    +	return b
    +}
    +
    +type BaseDeviceBackingNotSupported interface {
    +	GetDeviceBackingNotSupported() *DeviceBackingNotSupported
    +}
    +
    +func init() {
    +	t["BaseDeviceBackingNotSupported"] = reflect.TypeOf((*DeviceBackingNotSupported)(nil)).Elem()
    +}
    +
    +func (b *DeviceNotSupported) GetDeviceNotSupported() *DeviceNotSupported { return b }
    +
    +type BaseDeviceNotSupported interface {
    +	GetDeviceNotSupported() *DeviceNotSupported
    +}
    +
    +func init() {
    +	t["BaseDeviceNotSupported"] = reflect.TypeOf((*DeviceNotSupported)(nil)).Elem()
    +}
    +
    +func (b *DiskNotSupported) GetDiskNotSupported() *DiskNotSupported { return b }
    +
    +type BaseDiskNotSupported interface {
    +	GetDiskNotSupported() *DiskNotSupported
    +}
    +
    +func init() {
    +	t["BaseDiskNotSupported"] = reflect.TypeOf((*DiskNotSupported)(nil)).Elem()
    +}
    +
    +func (b *DistributedVirtualSwitchHostMemberBacking) GetDistributedVirtualSwitchHostMemberBacking() *DistributedVirtualSwitchHostMemberBacking {
    +	return b
    +}
    +
    +type BaseDistributedVirtualSwitchHostMemberBacking interface {
    +	GetDistributedVirtualSwitchHostMemberBacking() *DistributedVirtualSwitchHostMemberBacking
    +}
    +
    +func init() {
    +	t["BaseDistributedVirtualSwitchHostMemberBacking"] = reflect.TypeOf((*DistributedVirtualSwitchHostMemberBacking)(nil)).Elem()
    +}
    +
    +func (b *DistributedVirtualSwitchManagerHostDvsFilterSpec) GetDistributedVirtualSwitchManagerHostDvsFilterSpec() *DistributedVirtualSwitchManagerHostDvsFilterSpec {
    +	return b
    +}
    +
    +type BaseDistributedVirtualSwitchManagerHostDvsFilterSpec interface {
    +	GetDistributedVirtualSwitchManagerHostDvsFilterSpec() *DistributedVirtualSwitchManagerHostDvsFilterSpec
    +}
    +
    +func init() {
    +	t["BaseDistributedVirtualSwitchManagerHostDvsFilterSpec"] = reflect.TypeOf((*DistributedVirtualSwitchManagerHostDvsFilterSpec)(nil)).Elem()
    +}
    +
    +func (b *DvsEvent) GetDvsEvent() *DvsEvent { return b }
    +
    +type BaseDvsEvent interface {
    +	GetDvsEvent() *DvsEvent
    +}
    +
    +func init() {
    +	t["BaseDvsEvent"] = reflect.TypeOf((*DvsEvent)(nil)).Elem()
    +}
    +
    +func (b *DvsFault) GetDvsFault() *DvsFault { return b }
    +
    +type BaseDvsFault interface {
    +	GetDvsFault() *DvsFault
    +}
    +
    +func init() {
    +	t["BaseDvsFault"] = reflect.TypeOf((*DvsFault)(nil)).Elem()
    +}
    +
    +func (b *DvsFilterConfig) GetDvsFilterConfig() *DvsFilterConfig { return b }
    +
    +type BaseDvsFilterConfig interface {
    +	GetDvsFilterConfig() *DvsFilterConfig
    +}
    +
    +func init() {
    +	t["BaseDvsFilterConfig"] = reflect.TypeOf((*DvsFilterConfig)(nil)).Elem()
    +}
    +
    +func (b *DvsHealthStatusChangeEvent) GetDvsHealthStatusChangeEvent() *DvsHealthStatusChangeEvent {
    +	return b
    +}
    +
    +type BaseDvsHealthStatusChangeEvent interface {
    +	GetDvsHealthStatusChangeEvent() *DvsHealthStatusChangeEvent
    +}
    +
    +func init() {
    +	t["BaseDvsHealthStatusChangeEvent"] = reflect.TypeOf((*DvsHealthStatusChangeEvent)(nil)).Elem()
    +}
    +
    +func (b *DvsIpPort) GetDvsIpPort() *DvsIpPort { return b }
    +
    +type BaseDvsIpPort interface {
    +	GetDvsIpPort() *DvsIpPort
    +}
    +
    +func init() {
    +	t["BaseDvsIpPort"] = reflect.TypeOf((*DvsIpPort)(nil)).Elem()
    +}
    +
    +func (b *DvsNetworkRuleAction) GetDvsNetworkRuleAction() *DvsNetworkRuleAction { return b }
    +
    +type BaseDvsNetworkRuleAction interface {
    +	GetDvsNetworkRuleAction() *DvsNetworkRuleAction
    +}
    +
    +func init() {
    +	t["BaseDvsNetworkRuleAction"] = reflect.TypeOf((*DvsNetworkRuleAction)(nil)).Elem()
    +}
    +
    +func (b *DvsNetworkRuleQualifier) GetDvsNetworkRuleQualifier() *DvsNetworkRuleQualifier { return b }
    +
    +type BaseDvsNetworkRuleQualifier interface {
    +	GetDvsNetworkRuleQualifier() *DvsNetworkRuleQualifier
    +}
    +
    +func init() {
    +	t["BaseDvsNetworkRuleQualifier"] = reflect.TypeOf((*DvsNetworkRuleQualifier)(nil)).Elem()
    +}
    +
    +func (b *DvsTrafficFilterConfig) GetDvsTrafficFilterConfig() *DvsTrafficFilterConfig { return b }
    +
    +type BaseDvsTrafficFilterConfig interface {
    +	GetDvsTrafficFilterConfig() *DvsTrafficFilterConfig
    +}
    +
    +func init() {
    +	t["BaseDvsTrafficFilterConfig"] = reflect.TypeOf((*DvsTrafficFilterConfig)(nil)).Elem()
    +}
    +
    +func (b *DvsVNicProfile) GetDvsVNicProfile() *DvsVNicProfile { return b }
    +
    +type BaseDvsVNicProfile interface {
    +	GetDvsVNicProfile() *DvsVNicProfile
    +}
    +
    +func init() {
    +	t["BaseDvsVNicProfile"] = reflect.TypeOf((*DvsVNicProfile)(nil)).Elem()
    +}
    +
    +func (b *DynamicData) GetDynamicData() *DynamicData { return b }
    +
    +type BaseDynamicData interface {
    +	GetDynamicData() *DynamicData
    +}
    +
    +func init() {
    +	t["BaseDynamicData"] = reflect.TypeOf((*DynamicData)(nil)).Elem()
    +}
    +
    +func (b *EVCAdmissionFailed) GetEVCAdmissionFailed() *EVCAdmissionFailed { return b }
    +
    +type BaseEVCAdmissionFailed interface {
    +	GetEVCAdmissionFailed() *EVCAdmissionFailed
    +}
    +
    +func init() {
    +	t["BaseEVCAdmissionFailed"] = reflect.TypeOf((*EVCAdmissionFailed)(nil)).Elem()
    +}
    +
    +func (b *EVCConfigFault) GetEVCConfigFault() *EVCConfigFault { return b }
    +
    +type BaseEVCConfigFault interface {
    +	GetEVCConfigFault() *EVCConfigFault
    +}
    +
    +func init() {
    +	t["BaseEVCConfigFault"] = reflect.TypeOf((*EVCConfigFault)(nil)).Elem()
    +}
    +
    +func (b *ElementDescription) GetElementDescription() *ElementDescription { return b }
    +
    +type BaseElementDescription interface {
    +	GetElementDescription() *ElementDescription
    +}
    +
    +func init() {
    +	t["BaseElementDescription"] = reflect.TypeOf((*ElementDescription)(nil)).Elem()
    +}
    +
    +func (b *EnteredStandbyModeEvent) GetEnteredStandbyModeEvent() *EnteredStandbyModeEvent { return b }
    +
    +type BaseEnteredStandbyModeEvent interface {
    +	GetEnteredStandbyModeEvent() *EnteredStandbyModeEvent
    +}
    +
    +func init() {
    +	t["BaseEnteredStandbyModeEvent"] = reflect.TypeOf((*EnteredStandbyModeEvent)(nil)).Elem()
    +}
    +
    +func (b *EnteringStandbyModeEvent) GetEnteringStandbyModeEvent() *EnteringStandbyModeEvent { return b }
    +
    +type BaseEnteringStandbyModeEvent interface {
    +	GetEnteringStandbyModeEvent() *EnteringStandbyModeEvent
    +}
    +
    +func init() {
    +	t["BaseEnteringStandbyModeEvent"] = reflect.TypeOf((*EnteringStandbyModeEvent)(nil)).Elem()
    +}
    +
    +func (b *EntityEventArgument) GetEntityEventArgument() *EntityEventArgument { return b }
    +
    +type BaseEntityEventArgument interface {
    +	GetEntityEventArgument() *EntityEventArgument
    +}
    +
    +func init() {
    +	t["BaseEntityEventArgument"] = reflect.TypeOf((*EntityEventArgument)(nil)).Elem()
    +}
    +
    +func (b *Event) GetEvent() *Event { return b }
    +
    +type BaseEvent interface {
    +	GetEvent() *Event
    +}
    +
    +func init() {
    +	t["BaseEvent"] = reflect.TypeOf((*Event)(nil)).Elem()
    +}
    +
    +func (b *EventArgument) GetEventArgument() *EventArgument { return b }
    +
    +type BaseEventArgument interface {
    +	GetEventArgument() *EventArgument
    +}
    +
    +func init() {
    +	t["BaseEventArgument"] = reflect.TypeOf((*EventArgument)(nil)).Elem()
    +}
    +
    +func (b *ExitStandbyModeFailedEvent) GetExitStandbyModeFailedEvent() *ExitStandbyModeFailedEvent {
    +	return b
    +}
    +
    +type BaseExitStandbyModeFailedEvent interface {
    +	GetExitStandbyModeFailedEvent() *ExitStandbyModeFailedEvent
    +}
    +
    +func init() {
    +	t["BaseExitStandbyModeFailedEvent"] = reflect.TypeOf((*ExitStandbyModeFailedEvent)(nil)).Elem()
    +}
    +
    +func (b *ExitedStandbyModeEvent) GetExitedStandbyModeEvent() *ExitedStandbyModeEvent { return b }
    +
    +type BaseExitedStandbyModeEvent interface {
    +	GetExitedStandbyModeEvent() *ExitedStandbyModeEvent
    +}
    +
    +func init() {
    +	t["BaseExitedStandbyModeEvent"] = reflect.TypeOf((*ExitedStandbyModeEvent)(nil)).Elem()
    +}
    +
    +func (b *ExitingStandbyModeEvent) GetExitingStandbyModeEvent() *ExitingStandbyModeEvent { return b }
    +
    +type BaseExitingStandbyModeEvent interface {
    +	GetExitingStandbyModeEvent() *ExitingStandbyModeEvent
    +}
    +
    +func init() {
    +	t["BaseExitingStandbyModeEvent"] = reflect.TypeOf((*ExitingStandbyModeEvent)(nil)).Elem()
    +}
    +
    +func (b *ExpiredFeatureLicense) GetExpiredFeatureLicense() *ExpiredFeatureLicense { return b }
    +
    +type BaseExpiredFeatureLicense interface {
    +	GetExpiredFeatureLicense() *ExpiredFeatureLicense
    +}
    +
    +func init() {
    +	t["BaseExpiredFeatureLicense"] = reflect.TypeOf((*ExpiredFeatureLicense)(nil)).Elem()
    +}
    +
    +func (b *FaultToleranceConfigInfo) GetFaultToleranceConfigInfo() *FaultToleranceConfigInfo { return b }
    +
    +type BaseFaultToleranceConfigInfo interface {
    +	GetFaultToleranceConfigInfo() *FaultToleranceConfigInfo
    +}
    +
    +func init() {
    +	t["BaseFaultToleranceConfigInfo"] = reflect.TypeOf((*FaultToleranceConfigInfo)(nil)).Elem()
    +}
    +
    +func (b *FcoeFault) GetFcoeFault() *FcoeFault { return b }
    +
    +type BaseFcoeFault interface {
    +	GetFcoeFault() *FcoeFault
    +}
    +
    +func init() {
    +	t["BaseFcoeFault"] = reflect.TypeOf((*FcoeFault)(nil)).Elem()
    +}
    +
    +func (b *FileBackedVirtualDiskSpec) GetFileBackedVirtualDiskSpec() *FileBackedVirtualDiskSpec {
    +	return b
    +}
    +
    +type BaseFileBackedVirtualDiskSpec interface {
    +	GetFileBackedVirtualDiskSpec() *FileBackedVirtualDiskSpec
    +}
    +
    +func init() {
    +	t["BaseFileBackedVirtualDiskSpec"] = reflect.TypeOf((*FileBackedVirtualDiskSpec)(nil)).Elem()
    +}
    +
    +func (b *FileFault) GetFileFault() *FileFault { return b }
    +
    +type BaseFileFault interface {
    +	GetFileFault() *FileFault
    +}
    +
    +func init() {
    +	t["BaseFileFault"] = reflect.TypeOf((*FileFault)(nil)).Elem()
    +}
    +
    +func (b *FileInfo) GetFileInfo() *FileInfo { return b }
    +
    +type BaseFileInfo interface {
    +	GetFileInfo() *FileInfo
    +}
    +
    +func init() {
    +	t["BaseFileInfo"] = reflect.TypeOf((*FileInfo)(nil)).Elem()
    +}
    +
    +func (b *FileQuery) GetFileQuery() *FileQuery { return b }
    +
    +type BaseFileQuery interface {
    +	GetFileQuery() *FileQuery
    +}
    +
    +func init() {
    +	t["BaseFileQuery"] = reflect.TypeOf((*FileQuery)(nil)).Elem()
    +}
    +
    +func (b *GatewayConnectFault) GetGatewayConnectFault() *GatewayConnectFault { return b }
    +
    +type BaseGatewayConnectFault interface {
    +	GetGatewayConnectFault() *GatewayConnectFault
    +}
    +
    +func init() {
    +	t["BaseGatewayConnectFault"] = reflect.TypeOf((*GatewayConnectFault)(nil)).Elem()
    +}
    +
    +func (b *GatewayToHostConnectFault) GetGatewayToHostConnectFault() *GatewayToHostConnectFault {
    +	return b
    +}
    +
    +type BaseGatewayToHostConnectFault interface {
    +	GetGatewayToHostConnectFault() *GatewayToHostConnectFault
    +}
    +
    +func init() {
    +	t["BaseGatewayToHostConnectFault"] = reflect.TypeOf((*GatewayToHostConnectFault)(nil)).Elem()
    +}
    +
    +func (b *GeneralEvent) GetGeneralEvent() *GeneralEvent { return b }
    +
    +type BaseGeneralEvent interface {
    +	GetGeneralEvent() *GeneralEvent
    +}
    +
    +func init() {
    +	t["BaseGeneralEvent"] = reflect.TypeOf((*GeneralEvent)(nil)).Elem()
    +}
    +
    +func (b *GuestAuthSubject) GetGuestAuthSubject() *GuestAuthSubject { return b }
    +
    +type BaseGuestAuthSubject interface {
    +	GetGuestAuthSubject() *GuestAuthSubject
    +}
    +
    +func init() {
    +	t["BaseGuestAuthSubject"] = reflect.TypeOf((*GuestAuthSubject)(nil)).Elem()
    +}
    +
    +func (b *GuestAuthentication) GetGuestAuthentication() *GuestAuthentication { return b }
    +
    +type BaseGuestAuthentication interface {
    +	GetGuestAuthentication() *GuestAuthentication
    +}
    +
    +func init() {
    +	t["BaseGuestAuthentication"] = reflect.TypeOf((*GuestAuthentication)(nil)).Elem()
    +}
    +
    +func (b *GuestFileAttributes) GetGuestFileAttributes() *GuestFileAttributes { return b }
    +
    +type BaseGuestFileAttributes interface {
    +	GetGuestFileAttributes() *GuestFileAttributes
    +}
    +
    +func init() {
    +	t["BaseGuestFileAttributes"] = reflect.TypeOf((*GuestFileAttributes)(nil)).Elem()
    +}
    +
    +func (b *GuestOperationsFault) GetGuestOperationsFault() *GuestOperationsFault { return b }
    +
    +type BaseGuestOperationsFault interface {
    +	GetGuestOperationsFault() *GuestOperationsFault
    +}
    +
    +func init() {
    +	t["BaseGuestOperationsFault"] = reflect.TypeOf((*GuestOperationsFault)(nil)).Elem()
    +}
    +
    +func (b *GuestProgramSpec) GetGuestProgramSpec() *GuestProgramSpec { return b }
    +
    +type BaseGuestProgramSpec interface {
    +	GetGuestProgramSpec() *GuestProgramSpec
    +}
    +
    +func init() {
    +	t["BaseGuestProgramSpec"] = reflect.TypeOf((*GuestProgramSpec)(nil)).Elem()
    +}
    +
    +func (b *GuestRegValueDataSpec) GetGuestRegValueDataSpec() *GuestRegValueDataSpec { return b }
    +
    +type BaseGuestRegValueDataSpec interface {
    +	GetGuestRegValueDataSpec() *GuestRegValueDataSpec
    +}
    +
    +func init() {
    +	t["BaseGuestRegValueDataSpec"] = reflect.TypeOf((*GuestRegValueDataSpec)(nil)).Elem()
    +}
    +
    +func (b *GuestRegistryFault) GetGuestRegistryFault() *GuestRegistryFault { return b }
    +
    +type BaseGuestRegistryFault interface {
    +	GetGuestRegistryFault() *GuestRegistryFault
    +}
    +
    +func init() {
    +	t["BaseGuestRegistryFault"] = reflect.TypeOf((*GuestRegistryFault)(nil)).Elem()
    +}
    +
    +func (b *GuestRegistryKeyFault) GetGuestRegistryKeyFault() *GuestRegistryKeyFault { return b }
    +
    +type BaseGuestRegistryKeyFault interface {
    +	GetGuestRegistryKeyFault() *GuestRegistryKeyFault
    +}
    +
    +func init() {
    +	t["BaseGuestRegistryKeyFault"] = reflect.TypeOf((*GuestRegistryKeyFault)(nil)).Elem()
    +}
    +
    +func (b *GuestRegistryValueFault) GetGuestRegistryValueFault() *GuestRegistryValueFault { return b }
    +
    +type BaseGuestRegistryValueFault interface {
    +	GetGuestRegistryValueFault() *GuestRegistryValueFault
    +}
    +
    +func init() {
    +	t["BaseGuestRegistryValueFault"] = reflect.TypeOf((*GuestRegistryValueFault)(nil)).Elem()
    +}
    +
    +func (b *HostAccountSpec) GetHostAccountSpec() *HostAccountSpec { return b }
    +
    +type BaseHostAccountSpec interface {
    +	GetHostAccountSpec() *HostAccountSpec
    +}
    +
    +func init() {
    +	t["BaseHostAccountSpec"] = reflect.TypeOf((*HostAccountSpec)(nil)).Elem()
    +}
    +
    +func (b *HostAuthenticationStoreInfo) GetHostAuthenticationStoreInfo() *HostAuthenticationStoreInfo {
    +	return b
    +}
    +
    +type BaseHostAuthenticationStoreInfo interface {
    +	GetHostAuthenticationStoreInfo() *HostAuthenticationStoreInfo
    +}
    +
    +func init() {
    +	t["BaseHostAuthenticationStoreInfo"] = reflect.TypeOf((*HostAuthenticationStoreInfo)(nil)).Elem()
    +}
    +
    +func (b *HostCommunication) GetHostCommunication() *HostCommunication { return b }
    +
    +type BaseHostCommunication interface {
    +	GetHostCommunication() *HostCommunication
    +}
    +
    +func init() {
    +	t["BaseHostCommunication"] = reflect.TypeOf((*HostCommunication)(nil)).Elem()
    +}
    +
    +func (b *HostConfigFault) GetHostConfigFault() *HostConfigFault { return b }
    +
    +type BaseHostConfigFault interface {
    +	GetHostConfigFault() *HostConfigFault
    +}
    +
    +func init() {
    +	t["BaseHostConfigFault"] = reflect.TypeOf((*HostConfigFault)(nil)).Elem()
    +}
    +
    +func (b *HostConnectFault) GetHostConnectFault() *HostConnectFault { return b }
    +
    +type BaseHostConnectFault interface {
    +	GetHostConnectFault() *HostConnectFault
    +}
    +
    +func init() {
    +	t["BaseHostConnectFault"] = reflect.TypeOf((*HostConnectFault)(nil)).Elem()
    +}
    +
    +func (b *HostConnectInfoNetworkInfo) GetHostConnectInfoNetworkInfo() *HostConnectInfoNetworkInfo {
    +	return b
    +}
    +
    +type BaseHostConnectInfoNetworkInfo interface {
    +	GetHostConnectInfoNetworkInfo() *HostConnectInfoNetworkInfo
    +}
    +
    +func init() {
    +	t["BaseHostConnectInfoNetworkInfo"] = reflect.TypeOf((*HostConnectInfoNetworkInfo)(nil)).Elem()
    +}
    +
    +func (b *HostDasEvent) GetHostDasEvent() *HostDasEvent { return b }
    +
    +type BaseHostDasEvent interface {
    +	GetHostDasEvent() *HostDasEvent
    +}
    +
    +func init() {
    +	t["BaseHostDasEvent"] = reflect.TypeOf((*HostDasEvent)(nil)).Elem()
    +}
    +
    +func (b *HostDatastoreConnectInfo) GetHostDatastoreConnectInfo() *HostDatastoreConnectInfo { return b }
    +
    +type BaseHostDatastoreConnectInfo interface {
    +	GetHostDatastoreConnectInfo() *HostDatastoreConnectInfo
    +}
    +
    +func init() {
    +	t["BaseHostDatastoreConnectInfo"] = reflect.TypeOf((*HostDatastoreConnectInfo)(nil)).Elem()
    +}
    +
    +func (b *HostDevice) GetHostDevice() *HostDevice { return b }
    +
    +type BaseHostDevice interface {
    +	GetHostDevice() *HostDevice
    +}
    +
    +func init() {
    +	t["BaseHostDevice"] = reflect.TypeOf((*HostDevice)(nil)).Elem()
    +}
    +
    +func (b *HostDigestInfo) GetHostDigestInfo() *HostDigestInfo { return b }
    +
    +type BaseHostDigestInfo interface {
    +	GetHostDigestInfo() *HostDigestInfo
    +}
    +
    +func init() {
    +	t["BaseHostDigestInfo"] = reflect.TypeOf((*HostDigestInfo)(nil)).Elem()
    +}
    +
    +func (b *HostDirectoryStoreInfo) GetHostDirectoryStoreInfo() *HostDirectoryStoreInfo { return b }
    +
    +type BaseHostDirectoryStoreInfo interface {
    +	GetHostDirectoryStoreInfo() *HostDirectoryStoreInfo
    +}
    +
    +func init() {
    +	t["BaseHostDirectoryStoreInfo"] = reflect.TypeOf((*HostDirectoryStoreInfo)(nil)).Elem()
    +}
    +
    +func (b *HostDnsConfig) GetHostDnsConfig() *HostDnsConfig { return b }
    +
    +type BaseHostDnsConfig interface {
    +	GetHostDnsConfig() *HostDnsConfig
    +}
    +
    +func init() {
    +	t["BaseHostDnsConfig"] = reflect.TypeOf((*HostDnsConfig)(nil)).Elem()
    +}
    +
    +func (b *HostEvent) GetHostEvent() *HostEvent { return b }
    +
    +type BaseHostEvent interface {
    +	GetHostEvent() *HostEvent
    +}
    +
    +func init() {
    +	t["BaseHostEvent"] = reflect.TypeOf((*HostEvent)(nil)).Elem()
    +}
    +
    +func (b *HostFibreChannelHba) GetHostFibreChannelHba() *HostFibreChannelHba { return b }
    +
    +type BaseHostFibreChannelHba interface {
    +	GetHostFibreChannelHba() *HostFibreChannelHba
    +}
    +
    +func init() {
    +	t["BaseHostFibreChannelHba"] = reflect.TypeOf((*HostFibreChannelHba)(nil)).Elem()
    +}
    +
    +func (b *HostFibreChannelTargetTransport) GetHostFibreChannelTargetTransport() *HostFibreChannelTargetTransport {
    +	return b
    +}
    +
    +type BaseHostFibreChannelTargetTransport interface {
    +	GetHostFibreChannelTargetTransport() *HostFibreChannelTargetTransport
    +}
    +
    +func init() {
    +	t["BaseHostFibreChannelTargetTransport"] = reflect.TypeOf((*HostFibreChannelTargetTransport)(nil)).Elem()
    +}
    +
    +func (b *HostFileSystemVolume) GetHostFileSystemVolume() *HostFileSystemVolume { return b }
    +
    +type BaseHostFileSystemVolume interface {
    +	GetHostFileSystemVolume() *HostFileSystemVolume
    +}
    +
    +func init() {
    +	t["BaseHostFileSystemVolume"] = reflect.TypeOf((*HostFileSystemVolume)(nil)).Elem()
    +}
    +
    +func (b *HostHardwareElementInfo) GetHostHardwareElementInfo() *HostHardwareElementInfo { return b }
    +
    +type BaseHostHardwareElementInfo interface {
    +	GetHostHardwareElementInfo() *HostHardwareElementInfo
    +}
    +
    +func init() {
    +	t["BaseHostHardwareElementInfo"] = reflect.TypeOf((*HostHardwareElementInfo)(nil)).Elem()
    +}
    +
    +func (b *HostHostBusAdapter) GetHostHostBusAdapter() *HostHostBusAdapter { return b }
    +
    +type BaseHostHostBusAdapter interface {
    +	GetHostHostBusAdapter() *HostHostBusAdapter
    +}
    +
    +func init() {
    +	t["BaseHostHostBusAdapter"] = reflect.TypeOf((*HostHostBusAdapter)(nil)).Elem()
    +}
    +
    +func (b *HostIpRouteConfig) GetHostIpRouteConfig() *HostIpRouteConfig { return b }
    +
    +type BaseHostIpRouteConfig interface {
    +	GetHostIpRouteConfig() *HostIpRouteConfig
    +}
    +
    +func init() {
    +	t["BaseHostIpRouteConfig"] = reflect.TypeOf((*HostIpRouteConfig)(nil)).Elem()
    +}
    +
    +func (b *HostMemberHealthCheckResult) GetHostMemberHealthCheckResult() *HostMemberHealthCheckResult {
    +	return b
    +}
    +
    +type BaseHostMemberHealthCheckResult interface {
    +	GetHostMemberHealthCheckResult() *HostMemberHealthCheckResult
    +}
    +
    +func init() {
    +	t["BaseHostMemberHealthCheckResult"] = reflect.TypeOf((*HostMemberHealthCheckResult)(nil)).Elem()
    +}
    +
    +func (b *HostMemberUplinkHealthCheckResult) GetHostMemberUplinkHealthCheckResult() *HostMemberUplinkHealthCheckResult {
    +	return b
    +}
    +
    +type BaseHostMemberUplinkHealthCheckResult interface {
    +	GetHostMemberUplinkHealthCheckResult() *HostMemberUplinkHealthCheckResult
    +}
    +
    +func init() {
    +	t["BaseHostMemberUplinkHealthCheckResult"] = reflect.TypeOf((*HostMemberUplinkHealthCheckResult)(nil)).Elem()
    +}
    +
    +func (b *HostMultipathInfoLogicalUnitPolicy) GetHostMultipathInfoLogicalUnitPolicy() *HostMultipathInfoLogicalUnitPolicy {
    +	return b
    +}
    +
    +type BaseHostMultipathInfoLogicalUnitPolicy interface {
    +	GetHostMultipathInfoLogicalUnitPolicy() *HostMultipathInfoLogicalUnitPolicy
    +}
    +
    +func init() {
    +	t["BaseHostMultipathInfoLogicalUnitPolicy"] = reflect.TypeOf((*HostMultipathInfoLogicalUnitPolicy)(nil)).Elem()
    +}
    +
    +func (b *HostPciPassthruConfig) GetHostPciPassthruConfig() *HostPciPassthruConfig { return b }
    +
    +type BaseHostPciPassthruConfig interface {
    +	GetHostPciPassthruConfig() *HostPciPassthruConfig
    +}
    +
    +func init() {
    +	t["BaseHostPciPassthruConfig"] = reflect.TypeOf((*HostPciPassthruConfig)(nil)).Elem()
    +}
    +
    +func (b *HostPciPassthruInfo) GetHostPciPassthruInfo() *HostPciPassthruInfo { return b }
    +
    +type BaseHostPciPassthruInfo interface {
    +	GetHostPciPassthruInfo() *HostPciPassthruInfo
    +}
    +
    +func init() {
    +	t["BaseHostPciPassthruInfo"] = reflect.TypeOf((*HostPciPassthruInfo)(nil)).Elem()
    +}
    +
    +func (b *HostPowerOpFailed) GetHostPowerOpFailed() *HostPowerOpFailed { return b }
    +
    +type BaseHostPowerOpFailed interface {
    +	GetHostPowerOpFailed() *HostPowerOpFailed
    +}
    +
    +func init() {
    +	t["BaseHostPowerOpFailed"] = reflect.TypeOf((*HostPowerOpFailed)(nil)).Elem()
    +}
    +
    +func (b *HostProfileConfigSpec) GetHostProfileConfigSpec() *HostProfileConfigSpec { return b }
    +
    +type BaseHostProfileConfigSpec interface {
    +	GetHostProfileConfigSpec() *HostProfileConfigSpec
    +}
    +
    +func init() {
    +	t["BaseHostProfileConfigSpec"] = reflect.TypeOf((*HostProfileConfigSpec)(nil)).Elem()
    +}
    +
    +func (b *HostProfilesEntityCustomizations) GetHostProfilesEntityCustomizations() *HostProfilesEntityCustomizations {
    +	return b
    +}
    +
    +type BaseHostProfilesEntityCustomizations interface {
    +	GetHostProfilesEntityCustomizations() *HostProfilesEntityCustomizations
    +}
    +
    +func init() {
    +	t["BaseHostProfilesEntityCustomizations"] = reflect.TypeOf((*HostProfilesEntityCustomizations)(nil)).Elem()
    +}
    +
    +func (b *HostSriovDevicePoolInfo) GetHostSriovDevicePoolInfo() *HostSriovDevicePoolInfo { return b }
    +
    +type BaseHostSriovDevicePoolInfo interface {
    +	GetHostSriovDevicePoolInfo() *HostSriovDevicePoolInfo
    +}
    +
    +func init() {
    +	t["BaseHostSriovDevicePoolInfo"] = reflect.TypeOf((*HostSriovDevicePoolInfo)(nil)).Elem()
    +}
    +
    +func (b *HostSystemSwapConfigurationSystemSwapOption) GetHostSystemSwapConfigurationSystemSwapOption() *HostSystemSwapConfigurationSystemSwapOption {
    +	return b
    +}
    +
    +type BaseHostSystemSwapConfigurationSystemSwapOption interface {
    +	GetHostSystemSwapConfigurationSystemSwapOption() *HostSystemSwapConfigurationSystemSwapOption
    +}
    +
    +func init() {
    +	t["BaseHostSystemSwapConfigurationSystemSwapOption"] = reflect.TypeOf((*HostSystemSwapConfigurationSystemSwapOption)(nil)).Elem()
    +}
    +
    +func (b *HostTargetTransport) GetHostTargetTransport() *HostTargetTransport { return b }
    +
    +type BaseHostTargetTransport interface {
    +	GetHostTargetTransport() *HostTargetTransport
    +}
    +
    +func init() {
    +	t["BaseHostTargetTransport"] = reflect.TypeOf((*HostTargetTransport)(nil)).Elem()
    +}
    +
    +func (b *HostTpmEventDetails) GetHostTpmEventDetails() *HostTpmEventDetails { return b }
    +
    +type BaseHostTpmEventDetails interface {
    +	GetHostTpmEventDetails() *HostTpmEventDetails
    +}
    +
    +func init() {
    +	t["BaseHostTpmEventDetails"] = reflect.TypeOf((*HostTpmEventDetails)(nil)).Elem()
    +}
    +
    +func (b *HostVirtualSwitchBridge) GetHostVirtualSwitchBridge() *HostVirtualSwitchBridge { return b }
    +
    +type BaseHostVirtualSwitchBridge interface {
    +	GetHostVirtualSwitchBridge() *HostVirtualSwitchBridge
    +}
    +
    +func init() {
    +	t["BaseHostVirtualSwitchBridge"] = reflect.TypeOf((*HostVirtualSwitchBridge)(nil)).Elem()
    +}
    +
    +func (b *HourlyTaskScheduler) GetHourlyTaskScheduler() *HourlyTaskScheduler { return b }
    +
    +type BaseHourlyTaskScheduler interface {
    +	GetHourlyTaskScheduler() *HourlyTaskScheduler
    +}
    +
    +func init() {
    +	t["BaseHourlyTaskScheduler"] = reflect.TypeOf((*HourlyTaskScheduler)(nil)).Elem()
    +}
    +
    +func (b *ImportSpec) GetImportSpec() *ImportSpec { return b }
    +
    +type BaseImportSpec interface {
    +	GetImportSpec() *ImportSpec
    +}
    +
    +func init() {
    +	t["BaseImportSpec"] = reflect.TypeOf((*ImportSpec)(nil)).Elem()
    +}
    +
    +func (b *InaccessibleDatastore) GetInaccessibleDatastore() *InaccessibleDatastore { return b }
    +
    +type BaseInaccessibleDatastore interface {
    +	GetInaccessibleDatastore() *InaccessibleDatastore
    +}
    +
    +func init() {
    +	t["BaseInaccessibleDatastore"] = reflect.TypeOf((*InaccessibleDatastore)(nil)).Elem()
    +}
    +
    +func (b *InheritablePolicy) GetInheritablePolicy() *InheritablePolicy { return b }
    +
    +type BaseInheritablePolicy interface {
    +	GetInheritablePolicy() *InheritablePolicy
    +}
    +
    +func init() {
    +	t["BaseInheritablePolicy"] = reflect.TypeOf((*InheritablePolicy)(nil)).Elem()
    +}
    +
    +func (b *InsufficientHostCapacityFault) GetInsufficientHostCapacityFault() *InsufficientHostCapacityFault {
    +	return b
    +}
    +
    +type BaseInsufficientHostCapacityFault interface {
    +	GetInsufficientHostCapacityFault() *InsufficientHostCapacityFault
    +}
    +
    +func init() {
    +	t["BaseInsufficientHostCapacityFault"] = reflect.TypeOf((*InsufficientHostCapacityFault)(nil)).Elem()
    +}
    +
    +func (b *InsufficientResourcesFault) GetInsufficientResourcesFault() *InsufficientResourcesFault {
    +	return b
    +}
    +
    +type BaseInsufficientResourcesFault interface {
    +	GetInsufficientResourcesFault() *InsufficientResourcesFault
    +}
    +
    +func init() {
    +	t["BaseInsufficientResourcesFault"] = reflect.TypeOf((*InsufficientResourcesFault)(nil)).Elem()
    +}
    +
    +func (b *InsufficientStandbyResource) GetInsufficientStandbyResource() *InsufficientStandbyResource {
    +	return b
    +}
    +
    +type BaseInsufficientStandbyResource interface {
    +	GetInsufficientStandbyResource() *InsufficientStandbyResource
    +}
    +
    +func init() {
    +	t["BaseInsufficientStandbyResource"] = reflect.TypeOf((*InsufficientStandbyResource)(nil)).Elem()
    +}
    +
    +func (b *InvalidArgument) GetInvalidArgument() *InvalidArgument { return b }
    +
    +type BaseInvalidArgument interface {
    +	GetInvalidArgument() *InvalidArgument
    +}
    +
    +func init() {
    +	t["BaseInvalidArgument"] = reflect.TypeOf((*InvalidArgument)(nil)).Elem()
    +}
    +
    +func (b *InvalidCAMServer) GetInvalidCAMServer() *InvalidCAMServer { return b }
    +
    +type BaseInvalidCAMServer interface {
    +	GetInvalidCAMServer() *InvalidCAMServer
    +}
    +
    +func init() {
    +	t["BaseInvalidCAMServer"] = reflect.TypeOf((*InvalidCAMServer)(nil)).Elem()
    +}
    +
    +func (b *InvalidDatastore) GetInvalidDatastore() *InvalidDatastore { return b }
    +
    +type BaseInvalidDatastore interface {
    +	GetInvalidDatastore() *InvalidDatastore
    +}
    +
    +func init() {
    +	t["BaseInvalidDatastore"] = reflect.TypeOf((*InvalidDatastore)(nil)).Elem()
    +}
    +
    +func (b *InvalidDeviceSpec) GetInvalidDeviceSpec() *InvalidDeviceSpec { return b }
    +
    +type BaseInvalidDeviceSpec interface {
    +	GetInvalidDeviceSpec() *InvalidDeviceSpec
    +}
    +
    +func init() {
    +	t["BaseInvalidDeviceSpec"] = reflect.TypeOf((*InvalidDeviceSpec)(nil)).Elem()
    +}
    +
    +func (b *InvalidFolder) GetInvalidFolder() *InvalidFolder { return b }
    +
    +type BaseInvalidFolder interface {
    +	GetInvalidFolder() *InvalidFolder
    +}
    +
    +func init() {
    +	t["BaseInvalidFolder"] = reflect.TypeOf((*InvalidFolder)(nil)).Elem()
    +}
    +
    +func (b *InvalidFormat) GetInvalidFormat() *InvalidFormat { return b }
    +
    +type BaseInvalidFormat interface {
    +	GetInvalidFormat() *InvalidFormat
    +}
    +
    +func init() {
    +	t["BaseInvalidFormat"] = reflect.TypeOf((*InvalidFormat)(nil)).Elem()
    +}
    +
    +func (b *InvalidHostState) GetInvalidHostState() *InvalidHostState { return b }
    +
    +type BaseInvalidHostState interface {
    +	GetInvalidHostState() *InvalidHostState
    +}
    +
    +func init() {
    +	t["BaseInvalidHostState"] = reflect.TypeOf((*InvalidHostState)(nil)).Elem()
    +}
    +
    +func (b *InvalidLogin) GetInvalidLogin() *InvalidLogin { return b }
    +
    +type BaseInvalidLogin interface {
    +	GetInvalidLogin() *InvalidLogin
    +}
    +
    +func init() {
    +	t["BaseInvalidLogin"] = reflect.TypeOf((*InvalidLogin)(nil)).Elem()
    +}
    +
    +func (b *InvalidPropertyValue) GetInvalidPropertyValue() *InvalidPropertyValue { return b }
    +
    +type BaseInvalidPropertyValue interface {
    +	GetInvalidPropertyValue() *InvalidPropertyValue
    +}
    +
    +func init() {
    +	t["BaseInvalidPropertyValue"] = reflect.TypeOf((*InvalidPropertyValue)(nil)).Elem()
    +}
    +
    +func (b *InvalidRequest) GetInvalidRequest() *InvalidRequest { return b }
    +
    +type BaseInvalidRequest interface {
    +	GetInvalidRequest() *InvalidRequest
    +}
    +
    +func init() {
    +	t["BaseInvalidRequest"] = reflect.TypeOf((*InvalidRequest)(nil)).Elem()
    +}
    +
    +func (b *InvalidState) GetInvalidState() *InvalidState { return b }
    +
    +type BaseInvalidState interface {
    +	GetInvalidState() *InvalidState
    +}
    +
    +func init() {
    +	t["BaseInvalidState"] = reflect.TypeOf((*InvalidState)(nil)).Elem()
    +}
    +
    +func (b *InvalidVmConfig) GetInvalidVmConfig() *InvalidVmConfig { return b }
    +
    +type BaseInvalidVmConfig interface {
    +	GetInvalidVmConfig() *InvalidVmConfig
    +}
    +
    +func init() {
    +	t["BaseInvalidVmConfig"] = reflect.TypeOf((*InvalidVmConfig)(nil)).Elem()
    +}
    +
    +func (b *IoFilterInfo) GetIoFilterInfo() *IoFilterInfo { return b }
    +
    +type BaseIoFilterInfo interface {
    +	GetIoFilterInfo() *IoFilterInfo
    +}
    +
    +func init() {
    +	t["BaseIoFilterInfo"] = reflect.TypeOf((*IoFilterInfo)(nil)).Elem()
    +}
    +
    +func (b *IpAddress) GetIpAddress() *IpAddress { return b }
    +
    +type BaseIpAddress interface {
    +	GetIpAddress() *IpAddress
    +}
    +
    +func init() {
    +	t["BaseIpAddress"] = reflect.TypeOf((*IpAddress)(nil)).Elem()
    +}
    +
    +func (b *IscsiFault) GetIscsiFault() *IscsiFault { return b }
    +
    +type BaseIscsiFault interface {
    +	GetIscsiFault() *IscsiFault
    +}
    +
    +func init() {
    +	t["BaseIscsiFault"] = reflect.TypeOf((*IscsiFault)(nil)).Elem()
    +}
    +
    +func (b *LicenseEvent) GetLicenseEvent() *LicenseEvent { return b }
    +
    +type BaseLicenseEvent interface {
    +	GetLicenseEvent() *LicenseEvent
    +}
    +
    +func init() {
    +	t["BaseLicenseEvent"] = reflect.TypeOf((*LicenseEvent)(nil)).Elem()
    +}
    +
    +func (b *LicenseSource) GetLicenseSource() *LicenseSource { return b }
    +
    +type BaseLicenseSource interface {
    +	GetLicenseSource() *LicenseSource
    +}
    +
    +func init() {
    +	t["BaseLicenseSource"] = reflect.TypeOf((*LicenseSource)(nil)).Elem()
    +}
    +
    +func (b *MacAddress) GetMacAddress() *MacAddress { return b }
    +
    +type BaseMacAddress interface {
    +	GetMacAddress() *MacAddress
    +}
    +
    +func init() {
    +	t["BaseMacAddress"] = reflect.TypeOf((*MacAddress)(nil)).Elem()
    +}
    +
    +func (b *MethodFault) GetMethodFault() *MethodFault { return b }
    +
    +type BaseMethodFault interface {
    +	GetMethodFault() *MethodFault
    +}
    +
    +func init() {
    +	t["BaseMethodFault"] = reflect.TypeOf((*MethodFault)(nil)).Elem()
    +}
    +
    +func (b *MigrationEvent) GetMigrationEvent() *MigrationEvent { return b }
    +
    +type BaseMigrationEvent interface {
    +	GetMigrationEvent() *MigrationEvent
    +}
    +
    +func init() {
    +	t["BaseMigrationEvent"] = reflect.TypeOf((*MigrationEvent)(nil)).Elem()
    +}
    +
    +func (b *MigrationFault) GetMigrationFault() *MigrationFault { return b }
    +
    +type BaseMigrationFault interface {
    +	GetMigrationFault() *MigrationFault
    +}
    +
    +func init() {
    +	t["BaseMigrationFault"] = reflect.TypeOf((*MigrationFault)(nil)).Elem()
    +}
    +
    +func (b *MigrationFeatureNotSupported) GetMigrationFeatureNotSupported() *MigrationFeatureNotSupported {
    +	return b
    +}
    +
    +type BaseMigrationFeatureNotSupported interface {
    +	GetMigrationFeatureNotSupported() *MigrationFeatureNotSupported
    +}
    +
    +func init() {
    +	t["BaseMigrationFeatureNotSupported"] = reflect.TypeOf((*MigrationFeatureNotSupported)(nil)).Elem()
    +}
    +
    +func (b *MonthlyTaskScheduler) GetMonthlyTaskScheduler() *MonthlyTaskScheduler { return b }
    +
    +type BaseMonthlyTaskScheduler interface {
    +	GetMonthlyTaskScheduler() *MonthlyTaskScheduler
    +}
    +
    +func init() {
    +	t["BaseMonthlyTaskScheduler"] = reflect.TypeOf((*MonthlyTaskScheduler)(nil)).Elem()
    +}
    +
    +func (b *NasConfigFault) GetNasConfigFault() *NasConfigFault { return b }
    +
    +type BaseNasConfigFault interface {
    +	GetNasConfigFault() *NasConfigFault
    +}
    +
    +func init() {
    +	t["BaseNasConfigFault"] = reflect.TypeOf((*NasConfigFault)(nil)).Elem()
    +}
    +
    +func (b *NegatableExpression) GetNegatableExpression() *NegatableExpression { return b }
    +
    +type BaseNegatableExpression interface {
    +	GetNegatableExpression() *NegatableExpression
    +}
    +
    +func init() {
    +	t["BaseNegatableExpression"] = reflect.TypeOf((*NegatableExpression)(nil)).Elem()
    +}
    +
    +func (b *NetBIOSConfigInfo) GetNetBIOSConfigInfo() *NetBIOSConfigInfo { return b }
    +
    +type BaseNetBIOSConfigInfo interface {
    +	GetNetBIOSConfigInfo() *NetBIOSConfigInfo
    +}
    +
    +func init() {
    +	t["BaseNetBIOSConfigInfo"] = reflect.TypeOf((*NetBIOSConfigInfo)(nil)).Elem()
    +}
    +
    +func (b *NetworkSummary) GetNetworkSummary() *NetworkSummary { return b }
    +
    +type BaseNetworkSummary interface {
    +	GetNetworkSummary() *NetworkSummary
    +}
    +
    +func init() {
    +	t["BaseNetworkSummary"] = reflect.TypeOf((*NetworkSummary)(nil)).Elem()
    +}
    +
    +func (b *NoCompatibleHost) GetNoCompatibleHost() *NoCompatibleHost { return b }
    +
    +type BaseNoCompatibleHost interface {
    +	GetNoCompatibleHost() *NoCompatibleHost
    +}
    +
    +func init() {
    +	t["BaseNoCompatibleHost"] = reflect.TypeOf((*NoCompatibleHost)(nil)).Elem()
    +}
    +
    +func (b *NoPermission) GetNoPermission() *NoPermission { return b }
    +
    +type BaseNoPermission interface {
    +	GetNoPermission() *NoPermission
    +}
    +
    +func init() {
    +	t["BaseNoPermission"] = reflect.TypeOf((*NoPermission)(nil)).Elem()
    +}
    +
    +func (b *NodeDeploymentSpec) GetNodeDeploymentSpec() *NodeDeploymentSpec { return b }
    +
    +type BaseNodeDeploymentSpec interface {
    +	GetNodeDeploymentSpec() *NodeDeploymentSpec
    +}
    +
    +func init() {
    +	t["BaseNodeDeploymentSpec"] = reflect.TypeOf((*NodeDeploymentSpec)(nil)).Elem()
    +}
    +
    +func (b *NodeNetworkSpec) GetNodeNetworkSpec() *NodeNetworkSpec { return b }
    +
    +type BaseNodeNetworkSpec interface {
    +	GetNodeNetworkSpec() *NodeNetworkSpec
    +}
    +
    +func init() {
    +	t["BaseNodeNetworkSpec"] = reflect.TypeOf((*NodeNetworkSpec)(nil)).Elem()
    +}
    +
    +func (b *NotEnoughCpus) GetNotEnoughCpus() *NotEnoughCpus { return b }
    +
    +type BaseNotEnoughCpus interface {
    +	GetNotEnoughCpus() *NotEnoughCpus
    +}
    +
    +func init() {
    +	t["BaseNotEnoughCpus"] = reflect.TypeOf((*NotEnoughCpus)(nil)).Elem()
    +}
    +
    +func (b *NotEnoughLicenses) GetNotEnoughLicenses() *NotEnoughLicenses { return b }
    +
    +type BaseNotEnoughLicenses interface {
    +	GetNotEnoughLicenses() *NotEnoughLicenses
    +}
    +
    +func init() {
    +	t["BaseNotEnoughLicenses"] = reflect.TypeOf((*NotEnoughLicenses)(nil)).Elem()
    +}
    +
    +func (b *NotSupported) GetNotSupported() *NotSupported { return b }
    +
    +type BaseNotSupported interface {
    +	GetNotSupported() *NotSupported
    +}
    +
    +func init() {
    +	t["BaseNotSupported"] = reflect.TypeOf((*NotSupported)(nil)).Elem()
    +}
    +
    +func (b *NotSupportedHost) GetNotSupportedHost() *NotSupportedHost { return b }
    +
    +type BaseNotSupportedHost interface {
    +	GetNotSupportedHost() *NotSupportedHost
    +}
    +
    +func init() {
    +	t["BaseNotSupportedHost"] = reflect.TypeOf((*NotSupportedHost)(nil)).Elem()
    +}
    +
    +func (b *NotSupportedHostInCluster) GetNotSupportedHostInCluster() *NotSupportedHostInCluster {
    +	return b
    +}
    +
    +type BaseNotSupportedHostInCluster interface {
    +	GetNotSupportedHostInCluster() *NotSupportedHostInCluster
    +}
    +
    +func init() {
    +	t["BaseNotSupportedHostInCluster"] = reflect.TypeOf((*NotSupportedHostInCluster)(nil)).Elem()
    +}
    +
    +func (b *OptionType) GetOptionType() *OptionType { return b }
    +
    +type BaseOptionType interface {
    +	GetOptionType() *OptionType
    +}
    +
    +func init() {
    +	t["BaseOptionType"] = reflect.TypeOf((*OptionType)(nil)).Elem()
    +}
    +
    +func (b *OptionValue) GetOptionValue() *OptionValue { return b }
    +
    +type BaseOptionValue interface {
    +	GetOptionValue() *OptionValue
    +}
    +
    +func init() {
    +	t["BaseOptionValue"] = reflect.TypeOf((*OptionValue)(nil)).Elem()
    +}
    +
    +func (b *OvfAttribute) GetOvfAttribute() *OvfAttribute { return b }
    +
    +type BaseOvfAttribute interface {
    +	GetOvfAttribute() *OvfAttribute
    +}
    +
    +func init() {
    +	t["BaseOvfAttribute"] = reflect.TypeOf((*OvfAttribute)(nil)).Elem()
    +}
    +
    +func (b *OvfConnectedDevice) GetOvfConnectedDevice() *OvfConnectedDevice { return b }
    +
    +type BaseOvfConnectedDevice interface {
    +	GetOvfConnectedDevice() *OvfConnectedDevice
    +}
    +
    +func init() {
    +	t["BaseOvfConnectedDevice"] = reflect.TypeOf((*OvfConnectedDevice)(nil)).Elem()
    +}
    +
    +func (b *OvfConstraint) GetOvfConstraint() *OvfConstraint { return b }
    +
    +type BaseOvfConstraint interface {
    +	GetOvfConstraint() *OvfConstraint
    +}
    +
    +func init() {
    +	t["BaseOvfConstraint"] = reflect.TypeOf((*OvfConstraint)(nil)).Elem()
    +}
    +
    +func (b *OvfConsumerCallbackFault) GetOvfConsumerCallbackFault() *OvfConsumerCallbackFault { return b }
    +
    +type BaseOvfConsumerCallbackFault interface {
    +	GetOvfConsumerCallbackFault() *OvfConsumerCallbackFault
    +}
    +
    +func init() {
    +	t["BaseOvfConsumerCallbackFault"] = reflect.TypeOf((*OvfConsumerCallbackFault)(nil)).Elem()
    +}
    +
    +func (b *OvfElement) GetOvfElement() *OvfElement { return b }
    +
    +type BaseOvfElement interface {
    +	GetOvfElement() *OvfElement
    +}
    +
    +func init() {
    +	t["BaseOvfElement"] = reflect.TypeOf((*OvfElement)(nil)).Elem()
    +}
    +
    +func (b *OvfExport) GetOvfExport() *OvfExport { return b }
    +
    +type BaseOvfExport interface {
    +	GetOvfExport() *OvfExport
    +}
    +
    +func init() {
    +	t["BaseOvfExport"] = reflect.TypeOf((*OvfExport)(nil)).Elem()
    +}
    +
    +func (b *OvfFault) GetOvfFault() *OvfFault { return b }
    +
    +type BaseOvfFault interface {
    +	GetOvfFault() *OvfFault
    +}
    +
    +func init() {
    +	t["BaseOvfFault"] = reflect.TypeOf((*OvfFault)(nil)).Elem()
    +}
    +
    +func (b *OvfHardwareExport) GetOvfHardwareExport() *OvfHardwareExport { return b }
    +
    +type BaseOvfHardwareExport interface {
    +	GetOvfHardwareExport() *OvfHardwareExport
    +}
    +
    +func init() {
    +	t["BaseOvfHardwareExport"] = reflect.TypeOf((*OvfHardwareExport)(nil)).Elem()
    +}
    +
    +func (b *OvfImport) GetOvfImport() *OvfImport { return b }
    +
    +type BaseOvfImport interface {
    +	GetOvfImport() *OvfImport
    +}
    +
    +func init() {
    +	t["BaseOvfImport"] = reflect.TypeOf((*OvfImport)(nil)).Elem()
    +}
    +
    +func (b *OvfInvalidPackage) GetOvfInvalidPackage() *OvfInvalidPackage { return b }
    +
    +type BaseOvfInvalidPackage interface {
    +	GetOvfInvalidPackage() *OvfInvalidPackage
    +}
    +
    +func init() {
    +	t["BaseOvfInvalidPackage"] = reflect.TypeOf((*OvfInvalidPackage)(nil)).Elem()
    +}
    +
    +func (b *OvfInvalidValue) GetOvfInvalidValue() *OvfInvalidValue { return b }
    +
    +type BaseOvfInvalidValue interface {
    +	GetOvfInvalidValue() *OvfInvalidValue
    +}
    +
    +func init() {
    +	t["BaseOvfInvalidValue"] = reflect.TypeOf((*OvfInvalidValue)(nil)).Elem()
    +}
    +
    +func (b *OvfManagerCommonParams) GetOvfManagerCommonParams() *OvfManagerCommonParams { return b }
    +
    +type BaseOvfManagerCommonParams interface {
    +	GetOvfManagerCommonParams() *OvfManagerCommonParams
    +}
    +
    +func init() {
    +	t["BaseOvfManagerCommonParams"] = reflect.TypeOf((*OvfManagerCommonParams)(nil)).Elem()
    +}
    +
    +func (b *OvfMissingElement) GetOvfMissingElement() *OvfMissingElement { return b }
    +
    +type BaseOvfMissingElement interface {
    +	GetOvfMissingElement() *OvfMissingElement
    +}
    +
    +func init() {
    +	t["BaseOvfMissingElement"] = reflect.TypeOf((*OvfMissingElement)(nil)).Elem()
    +}
    +
    +func (b *OvfProperty) GetOvfProperty() *OvfProperty { return b }
    +
    +type BaseOvfProperty interface {
    +	GetOvfProperty() *OvfProperty
    +}
    +
    +func init() {
    +	t["BaseOvfProperty"] = reflect.TypeOf((*OvfProperty)(nil)).Elem()
    +}
    +
    +func (b *OvfSystemFault) GetOvfSystemFault() *OvfSystemFault { return b }
    +
    +type BaseOvfSystemFault interface {
    +	GetOvfSystemFault() *OvfSystemFault
    +}
    +
    +func init() {
    +	t["BaseOvfSystemFault"] = reflect.TypeOf((*OvfSystemFault)(nil)).Elem()
    +}
    +
    +func (b *OvfUnsupportedAttribute) GetOvfUnsupportedAttribute() *OvfUnsupportedAttribute { return b }
    +
    +type BaseOvfUnsupportedAttribute interface {
    +	GetOvfUnsupportedAttribute() *OvfUnsupportedAttribute
    +}
    +
    +func init() {
    +	t["BaseOvfUnsupportedAttribute"] = reflect.TypeOf((*OvfUnsupportedAttribute)(nil)).Elem()
    +}
    +
    +func (b *OvfUnsupportedElement) GetOvfUnsupportedElement() *OvfUnsupportedElement { return b }
    +
    +type BaseOvfUnsupportedElement interface {
    +	GetOvfUnsupportedElement() *OvfUnsupportedElement
    +}
    +
    +func init() {
    +	t["BaseOvfUnsupportedElement"] = reflect.TypeOf((*OvfUnsupportedElement)(nil)).Elem()
    +}
    +
    +func (b *OvfUnsupportedPackage) GetOvfUnsupportedPackage() *OvfUnsupportedPackage { return b }
    +
    +type BaseOvfUnsupportedPackage interface {
    +	GetOvfUnsupportedPackage() *OvfUnsupportedPackage
    +}
    +
    +func init() {
    +	t["BaseOvfUnsupportedPackage"] = reflect.TypeOf((*OvfUnsupportedPackage)(nil)).Elem()
    +}
    +
    +func (b *PatchMetadataInvalid) GetPatchMetadataInvalid() *PatchMetadataInvalid { return b }
    +
    +type BasePatchMetadataInvalid interface {
    +	GetPatchMetadataInvalid() *PatchMetadataInvalid
    +}
    +
    +func init() {
    +	t["BasePatchMetadataInvalid"] = reflect.TypeOf((*PatchMetadataInvalid)(nil)).Elem()
    +}
    +
    +func (b *PatchNotApplicable) GetPatchNotApplicable() *PatchNotApplicable { return b }
    +
    +type BasePatchNotApplicable interface {
    +	GetPatchNotApplicable() *PatchNotApplicable
    +}
    +
    +func init() {
    +	t["BasePatchNotApplicable"] = reflect.TypeOf((*PatchNotApplicable)(nil)).Elem()
    +}
    +
    +func (b *PerfEntityMetricBase) GetPerfEntityMetricBase() *PerfEntityMetricBase { return b }
    +
    +type BasePerfEntityMetricBase interface {
    +	GetPerfEntityMetricBase() *PerfEntityMetricBase
    +}
    +
    +func init() {
    +	t["BasePerfEntityMetricBase"] = reflect.TypeOf((*PerfEntityMetricBase)(nil)).Elem()
    +}
    +
    +func (b *PerfMetricSeries) GetPerfMetricSeries() *PerfMetricSeries { return b }
    +
    +type BasePerfMetricSeries interface {
    +	GetPerfMetricSeries() *PerfMetricSeries
    +}
    +
    +func init() {
    +	t["BasePerfMetricSeries"] = reflect.TypeOf((*PerfMetricSeries)(nil)).Elem()
    +}
    +
    +func (b *PermissionEvent) GetPermissionEvent() *PermissionEvent { return b }
    +
    +type BasePermissionEvent interface {
    +	GetPermissionEvent() *PermissionEvent
    +}
    +
    +func init() {
    +	t["BasePermissionEvent"] = reflect.TypeOf((*PermissionEvent)(nil)).Elem()
    +}
    +
    +func (b *PhysicalNicHint) GetPhysicalNicHint() *PhysicalNicHint { return b }
    +
    +type BasePhysicalNicHint interface {
    +	GetPhysicalNicHint() *PhysicalNicHint
    +}
    +
    +func init() {
    +	t["BasePhysicalNicHint"] = reflect.TypeOf((*PhysicalNicHint)(nil)).Elem()
    +}
    +
    +func (b *PlatformConfigFault) GetPlatformConfigFault() *PlatformConfigFault { return b }
    +
    +type BasePlatformConfigFault interface {
    +	GetPlatformConfigFault() *PlatformConfigFault
    +}
    +
    +func init() {
    +	t["BasePlatformConfigFault"] = reflect.TypeOf((*PlatformConfigFault)(nil)).Elem()
    +}
    +
    +func (b *PolicyOption) GetPolicyOption() *PolicyOption { return b }
    +
    +type BasePolicyOption interface {
    +	GetPolicyOption() *PolicyOption
    +}
    +
    +func init() {
    +	t["BasePolicyOption"] = reflect.TypeOf((*PolicyOption)(nil)).Elem()
    +}
    +
    +func (b *PortGroupProfile) GetPortGroupProfile() *PortGroupProfile { return b }
    +
    +type BasePortGroupProfile interface {
    +	GetPortGroupProfile() *PortGroupProfile
    +}
    +
    +func init() {
    +	t["BasePortGroupProfile"] = reflect.TypeOf((*PortGroupProfile)(nil)).Elem()
    +}
    +
    +func (b *ProfileConfigInfo) GetProfileConfigInfo() *ProfileConfigInfo { return b }
    +
    +type BaseProfileConfigInfo interface {
    +	GetProfileConfigInfo() *ProfileConfigInfo
    +}
    +
    +func init() {
    +	t["BaseProfileConfigInfo"] = reflect.TypeOf((*ProfileConfigInfo)(nil)).Elem()
    +}
    +
    +func (b *ProfileCreateSpec) GetProfileCreateSpec() *ProfileCreateSpec { return b }
    +
    +type BaseProfileCreateSpec interface {
    +	GetProfileCreateSpec() *ProfileCreateSpec
    +}
    +
    +func init() {
    +	t["BaseProfileCreateSpec"] = reflect.TypeOf((*ProfileCreateSpec)(nil)).Elem()
    +}
    +
    +func (b *ProfileEvent) GetProfileEvent() *ProfileEvent { return b }
    +
    +type BaseProfileEvent interface {
    +	GetProfileEvent() *ProfileEvent
    +}
    +
    +func init() {
    +	t["BaseProfileEvent"] = reflect.TypeOf((*ProfileEvent)(nil)).Elem()
    +}
    +
    +func (b *ProfileExecuteResult) GetProfileExecuteResult() *ProfileExecuteResult { return b }
    +
    +type BaseProfileExecuteResult interface {
    +	GetProfileExecuteResult() *ProfileExecuteResult
    +}
    +
    +func init() {
    +	t["BaseProfileExecuteResult"] = reflect.TypeOf((*ProfileExecuteResult)(nil)).Elem()
    +}
    +
    +func (b *ProfileExpression) GetProfileExpression() *ProfileExpression { return b }
    +
    +type BaseProfileExpression interface {
    +	GetProfileExpression() *ProfileExpression
    +}
    +
    +func init() {
    +	t["BaseProfileExpression"] = reflect.TypeOf((*ProfileExpression)(nil)).Elem()
    +}
    +
    +func (b *ProfilePolicyOptionMetadata) GetProfilePolicyOptionMetadata() *ProfilePolicyOptionMetadata {
    +	return b
    +}
    +
    +type BaseProfilePolicyOptionMetadata interface {
    +	GetProfilePolicyOptionMetadata() *ProfilePolicyOptionMetadata
    +}
    +
    +func init() {
    +	t["BaseProfilePolicyOptionMetadata"] = reflect.TypeOf((*ProfilePolicyOptionMetadata)(nil)).Elem()
    +}
    +
    +func (b *ProfileSerializedCreateSpec) GetProfileSerializedCreateSpec() *ProfileSerializedCreateSpec {
    +	return b
    +}
    +
    +type BaseProfileSerializedCreateSpec interface {
    +	GetProfileSerializedCreateSpec() *ProfileSerializedCreateSpec
    +}
    +
    +func init() {
    +	t["BaseProfileSerializedCreateSpec"] = reflect.TypeOf((*ProfileSerializedCreateSpec)(nil)).Elem()
    +}
    +
    +func (b *RDMNotSupported) GetRDMNotSupported() *RDMNotSupported { return b }
    +
    +type BaseRDMNotSupported interface {
    +	GetRDMNotSupported() *RDMNotSupported
    +}
    +
    +func init() {
    +	t["BaseRDMNotSupported"] = reflect.TypeOf((*RDMNotSupported)(nil)).Elem()
    +}
    +
    +func (b *RecurrentTaskScheduler) GetRecurrentTaskScheduler() *RecurrentTaskScheduler { return b }
    +
    +type BaseRecurrentTaskScheduler interface {
    +	GetRecurrentTaskScheduler() *RecurrentTaskScheduler
    +}
    +
    +func init() {
    +	t["BaseRecurrentTaskScheduler"] = reflect.TypeOf((*RecurrentTaskScheduler)(nil)).Elem()
    +}
    +
    +func (b *ReplicationConfigFault) GetReplicationConfigFault() *ReplicationConfigFault { return b }
    +
    +type BaseReplicationConfigFault interface {
    +	GetReplicationConfigFault() *ReplicationConfigFault
    +}
    +
    +func init() {
    +	t["BaseReplicationConfigFault"] = reflect.TypeOf((*ReplicationConfigFault)(nil)).Elem()
    +}
    +
    +func (b *ReplicationFault) GetReplicationFault() *ReplicationFault { return b }
    +
    +type BaseReplicationFault interface {
    +	GetReplicationFault() *ReplicationFault
    +}
    +
    +func init() {
    +	t["BaseReplicationFault"] = reflect.TypeOf((*ReplicationFault)(nil)).Elem()
    +}
    +
    +func (b *ReplicationVmFault) GetReplicationVmFault() *ReplicationVmFault { return b }
    +
    +type BaseReplicationVmFault interface {
    +	GetReplicationVmFault() *ReplicationVmFault
    +}
    +
    +func init() {
    +	t["BaseReplicationVmFault"] = reflect.TypeOf((*ReplicationVmFault)(nil)).Elem()
    +}
    +
    +func (b *ResourceInUse) GetResourceInUse() *ResourceInUse { return b }
    +
    +type BaseResourceInUse interface {
    +	GetResourceInUse() *ResourceInUse
    +}
    +
    +func init() {
    +	t["BaseResourceInUse"] = reflect.TypeOf((*ResourceInUse)(nil)).Elem()
    +}
    +
    +func (b *ResourcePoolEvent) GetResourcePoolEvent() *ResourcePoolEvent { return b }
    +
    +type BaseResourcePoolEvent interface {
    +	GetResourcePoolEvent() *ResourcePoolEvent
    +}
    +
    +func init() {
    +	t["BaseResourcePoolEvent"] = reflect.TypeOf((*ResourcePoolEvent)(nil)).Elem()
    +}
    +
    +func (b *ResourcePoolSummary) GetResourcePoolSummary() *ResourcePoolSummary { return b }
    +
    +type BaseResourcePoolSummary interface {
    +	GetResourcePoolSummary() *ResourcePoolSummary
    +}
    +
    +func init() {
    +	t["BaseResourcePoolSummary"] = reflect.TypeOf((*ResourcePoolSummary)(nil)).Elem()
    +}
    +
    +func (b *RoleEvent) GetRoleEvent() *RoleEvent { return b }
    +
    +type BaseRoleEvent interface {
    +	GetRoleEvent() *RoleEvent
    +}
    +
    +func init() {
    +	t["BaseRoleEvent"] = reflect.TypeOf((*RoleEvent)(nil)).Elem()
    +}
    +
    +func (b *RuntimeFault) GetRuntimeFault() *RuntimeFault { return b }
    +
    +type BaseRuntimeFault interface {
    +	GetRuntimeFault() *RuntimeFault
    +}
    +
    +func init() {
    +	t["BaseRuntimeFault"] = reflect.TypeOf((*RuntimeFault)(nil)).Elem()
    +}
    +
    +func (b *ScheduledTaskEvent) GetScheduledTaskEvent() *ScheduledTaskEvent { return b }
    +
    +type BaseScheduledTaskEvent interface {
    +	GetScheduledTaskEvent() *ScheduledTaskEvent
    +}
    +
    +func init() {
    +	t["BaseScheduledTaskEvent"] = reflect.TypeOf((*ScheduledTaskEvent)(nil)).Elem()
    +}
    +
    +func (b *ScheduledTaskSpec) GetScheduledTaskSpec() *ScheduledTaskSpec { return b }
    +
    +type BaseScheduledTaskSpec interface {
    +	GetScheduledTaskSpec() *ScheduledTaskSpec
    +}
    +
    +func init() {
    +	t["BaseScheduledTaskSpec"] = reflect.TypeOf((*ScheduledTaskSpec)(nil)).Elem()
    +}
    +
    +func (b *ScsiLun) GetScsiLun() *ScsiLun { return b }
    +
    +type BaseScsiLun interface {
    +	GetScsiLun() *ScsiLun
    +}
    +
    +func init() {
    +	t["BaseScsiLun"] = reflect.TypeOf((*ScsiLun)(nil)).Elem()
    +}
    +
    +func (b *SecurityError) GetSecurityError() *SecurityError { return b }
    +
    +type BaseSecurityError interface {
    +	GetSecurityError() *SecurityError
    +}
    +
    +func init() {
    +	t["BaseSecurityError"] = reflect.TypeOf((*SecurityError)(nil)).Elem()
    +}
    +
    +func (b *SelectionSet) GetSelectionSet() *SelectionSet { return b }
    +
    +type BaseSelectionSet interface {
    +	GetSelectionSet() *SelectionSet
    +}
    +
    +func init() {
    +	t["BaseSelectionSet"] = reflect.TypeOf((*SelectionSet)(nil)).Elem()
    +}
    +
    +func (b *SelectionSpec) GetSelectionSpec() *SelectionSpec { return b }
    +
    +type BaseSelectionSpec interface {
    +	GetSelectionSpec() *SelectionSpec
    +}
    +
    +func init() {
    +	t["BaseSelectionSpec"] = reflect.TypeOf((*SelectionSpec)(nil)).Elem()
    +}
    +
    +func (b *ServiceLocatorCredential) GetServiceLocatorCredential() *ServiceLocatorCredential { return b }
    +
    +type BaseServiceLocatorCredential interface {
    +	GetServiceLocatorCredential() *ServiceLocatorCredential
    +}
    +
    +func init() {
    +	t["BaseServiceLocatorCredential"] = reflect.TypeOf((*ServiceLocatorCredential)(nil)).Elem()
    +}
    +
    +func (b *SessionEvent) GetSessionEvent() *SessionEvent { return b }
    +
    +type BaseSessionEvent interface {
    +	GetSessionEvent() *SessionEvent
    +}
    +
    +func init() {
    +	t["BaseSessionEvent"] = reflect.TypeOf((*SessionEvent)(nil)).Elem()
    +}
    +
    +func (b *SessionManagerServiceRequestSpec) GetSessionManagerServiceRequestSpec() *SessionManagerServiceRequestSpec {
    +	return b
    +}
    +
    +type BaseSessionManagerServiceRequestSpec interface {
    +	GetSessionManagerServiceRequestSpec() *SessionManagerServiceRequestSpec
    +}
    +
    +func init() {
    +	t["BaseSessionManagerServiceRequestSpec"] = reflect.TypeOf((*SessionManagerServiceRequestSpec)(nil)).Elem()
    +}
    +
    +func (b *SnapshotCopyNotSupported) GetSnapshotCopyNotSupported() *SnapshotCopyNotSupported { return b }
    +
    +type BaseSnapshotCopyNotSupported interface {
    +	GetSnapshotCopyNotSupported() *SnapshotCopyNotSupported
    +}
    +
    +func init() {
    +	t["BaseSnapshotCopyNotSupported"] = reflect.TypeOf((*SnapshotCopyNotSupported)(nil)).Elem()
    +}
    +
    +func (b *SnapshotFault) GetSnapshotFault() *SnapshotFault { return b }
    +
    +type BaseSnapshotFault interface {
    +	GetSnapshotFault() *SnapshotFault
    +}
    +
    +func init() {
    +	t["BaseSnapshotFault"] = reflect.TypeOf((*SnapshotFault)(nil)).Elem()
    +}
    +
    +func (b *TaskEvent) GetTaskEvent() *TaskEvent { return b }
    +
    +type BaseTaskEvent interface {
    +	GetTaskEvent() *TaskEvent
    +}
    +
    +func init() {
    +	t["BaseTaskEvent"] = reflect.TypeOf((*TaskEvent)(nil)).Elem()
    +}
    +
    +func (b *TaskInProgress) GetTaskInProgress() *TaskInProgress { return b }
    +
    +type BaseTaskInProgress interface {
    +	GetTaskInProgress() *TaskInProgress
    +}
    +
    +func init() {
    +	t["BaseTaskInProgress"] = reflect.TypeOf((*TaskInProgress)(nil)).Elem()
    +}
    +
    +func (b *TaskReason) GetTaskReason() *TaskReason { return b }
    +
    +type BaseTaskReason interface {
    +	GetTaskReason() *TaskReason
    +}
    +
    +func init() {
    +	t["BaseTaskReason"] = reflect.TypeOf((*TaskReason)(nil)).Elem()
    +}
    +
    +func (b *TaskScheduler) GetTaskScheduler() *TaskScheduler { return b }
    +
    +type BaseTaskScheduler interface {
    +	GetTaskScheduler() *TaskScheduler
    +}
    +
    +func init() {
    +	t["BaseTaskScheduler"] = reflect.TypeOf((*TaskScheduler)(nil)).Elem()
    +}
    +
    +func (b *TemplateUpgradeEvent) GetTemplateUpgradeEvent() *TemplateUpgradeEvent { return b }
    +
    +type BaseTemplateUpgradeEvent interface {
    +	GetTemplateUpgradeEvent() *TemplateUpgradeEvent
    +}
    +
    +func init() {
    +	t["BaseTemplateUpgradeEvent"] = reflect.TypeOf((*TemplateUpgradeEvent)(nil)).Elem()
    +}
    +
    +func (b *Timedout) GetTimedout() *Timedout { return b }
    +
    +type BaseTimedout interface {
    +	GetTimedout() *Timedout
    +}
    +
    +func init() {
    +	t["BaseTimedout"] = reflect.TypeOf((*Timedout)(nil)).Elem()
    +}
    +
    +func (b *TypeDescription) GetTypeDescription() *TypeDescription { return b }
    +
    +type BaseTypeDescription interface {
    +	GetTypeDescription() *TypeDescription
    +}
    +
    +func init() {
    +	t["BaseTypeDescription"] = reflect.TypeOf((*TypeDescription)(nil)).Elem()
    +}
    +
    +func (b *UnsupportedDatastore) GetUnsupportedDatastore() *UnsupportedDatastore { return b }
    +
    +type BaseUnsupportedDatastore interface {
    +	GetUnsupportedDatastore() *UnsupportedDatastore
    +}
    +
    +func init() {
    +	t["BaseUnsupportedDatastore"] = reflect.TypeOf((*UnsupportedDatastore)(nil)).Elem()
    +}
    +
    +func (b *UpgradeEvent) GetUpgradeEvent() *UpgradeEvent { return b }
    +
    +type BaseUpgradeEvent interface {
    +	GetUpgradeEvent() *UpgradeEvent
    +}
    +
    +func init() {
    +	t["BaseUpgradeEvent"] = reflect.TypeOf((*UpgradeEvent)(nil)).Elem()
    +}
    +
    +func (b *UserSearchResult) GetUserSearchResult() *UserSearchResult { return b }
    +
    +type BaseUserSearchResult interface {
    +	GetUserSearchResult() *UserSearchResult
    +}
    +
    +func init() {
    +	t["BaseUserSearchResult"] = reflect.TypeOf((*UserSearchResult)(nil)).Elem()
    +}
    +
    +func (b *VAppConfigFault) GetVAppConfigFault() *VAppConfigFault { return b }
    +
    +type BaseVAppConfigFault interface {
    +	GetVAppConfigFault() *VAppConfigFault
    +}
    +
    +func init() {
    +	t["BaseVAppConfigFault"] = reflect.TypeOf((*VAppConfigFault)(nil)).Elem()
    +}
    +
    +func (b *VAppPropertyFault) GetVAppPropertyFault() *VAppPropertyFault { return b }
    +
    +type BaseVAppPropertyFault interface {
    +	GetVAppPropertyFault() *VAppPropertyFault
    +}
    +
    +func init() {
    +	t["BaseVAppPropertyFault"] = reflect.TypeOf((*VAppPropertyFault)(nil)).Elem()
    +}
    +
    +func (b *VMotionInterfaceIssue) GetVMotionInterfaceIssue() *VMotionInterfaceIssue { return b }
    +
    +type BaseVMotionInterfaceIssue interface {
    +	GetVMotionInterfaceIssue() *VMotionInterfaceIssue
    +}
    +
    +func init() {
    +	t["BaseVMotionInterfaceIssue"] = reflect.TypeOf((*VMotionInterfaceIssue)(nil)).Elem()
    +}
    +
    +func (b *VMwareDVSHealthCheckConfig) GetVMwareDVSHealthCheckConfig() *VMwareDVSHealthCheckConfig {
    +	return b
    +}
    +
    +type BaseVMwareDVSHealthCheckConfig interface {
    +	GetVMwareDVSHealthCheckConfig() *VMwareDVSHealthCheckConfig
    +}
    +
    +func init() {
    +	t["BaseVMwareDVSHealthCheckConfig"] = reflect.TypeOf((*VMwareDVSHealthCheckConfig)(nil)).Elem()
    +}
    +
    +func (b *VimFault) GetVimFault() *VimFault { return b }
    +
    +type BaseVimFault interface {
    +	GetVimFault() *VimFault
    +}
    +
    +func init() {
    +	t["BaseVimFault"] = reflect.TypeOf((*VimFault)(nil)).Elem()
    +}
    +
    +func (b *VirtualController) GetVirtualController() *VirtualController { return b }
    +
    +type BaseVirtualController interface {
    +	GetVirtualController() *VirtualController
    +}
    +
    +func init() {
    +	t["BaseVirtualController"] = reflect.TypeOf((*VirtualController)(nil)).Elem()
    +}
    +
    +func (b *VirtualControllerOption) GetVirtualControllerOption() *VirtualControllerOption { return b }
    +
    +type BaseVirtualControllerOption interface {
    +	GetVirtualControllerOption() *VirtualControllerOption
    +}
    +
    +func init() {
    +	t["BaseVirtualControllerOption"] = reflect.TypeOf((*VirtualControllerOption)(nil)).Elem()
    +}
    +
    +func (b *VirtualDevice) GetVirtualDevice() *VirtualDevice { return b }
    +
    +type BaseVirtualDevice interface {
    +	GetVirtualDevice() *VirtualDevice
    +}
    +
    +func init() {
    +	t["BaseVirtualDevice"] = reflect.TypeOf((*VirtualDevice)(nil)).Elem()
    +}
    +
    +func (b *VirtualDeviceBackingInfo) GetVirtualDeviceBackingInfo() *VirtualDeviceBackingInfo { return b }
    +
    +type BaseVirtualDeviceBackingInfo interface {
    +	GetVirtualDeviceBackingInfo() *VirtualDeviceBackingInfo
    +}
    +
    +func init() {
    +	t["BaseVirtualDeviceBackingInfo"] = reflect.TypeOf((*VirtualDeviceBackingInfo)(nil)).Elem()
    +}
    +
    +func (b *VirtualDeviceBackingOption) GetVirtualDeviceBackingOption() *VirtualDeviceBackingOption {
    +	return b
    +}
    +
    +type BaseVirtualDeviceBackingOption interface {
    +	GetVirtualDeviceBackingOption() *VirtualDeviceBackingOption
    +}
    +
    +func init() {
    +	t["BaseVirtualDeviceBackingOption"] = reflect.TypeOf((*VirtualDeviceBackingOption)(nil)).Elem()
    +}
    +
    +func (b *VirtualDeviceBusSlotInfo) GetVirtualDeviceBusSlotInfo() *VirtualDeviceBusSlotInfo { return b }
    +
    +type BaseVirtualDeviceBusSlotInfo interface {
    +	GetVirtualDeviceBusSlotInfo() *VirtualDeviceBusSlotInfo
    +}
    +
    +func init() {
    +	t["BaseVirtualDeviceBusSlotInfo"] = reflect.TypeOf((*VirtualDeviceBusSlotInfo)(nil)).Elem()
    +}
    +
    +func (b *VirtualDeviceConfigSpec) GetVirtualDeviceConfigSpec() *VirtualDeviceConfigSpec { return b }
    +
    +type BaseVirtualDeviceConfigSpec interface {
    +	GetVirtualDeviceConfigSpec() *VirtualDeviceConfigSpec
    +}
    +
    +func init() {
    +	t["BaseVirtualDeviceConfigSpec"] = reflect.TypeOf((*VirtualDeviceConfigSpec)(nil)).Elem()
    +}
    +
    +func (b *VirtualDeviceDeviceBackingInfo) GetVirtualDeviceDeviceBackingInfo() *VirtualDeviceDeviceBackingInfo {
    +	return b
    +}
    +
    +type BaseVirtualDeviceDeviceBackingInfo interface {
    +	GetVirtualDeviceDeviceBackingInfo() *VirtualDeviceDeviceBackingInfo
    +}
    +
    +func init() {
    +	t["BaseVirtualDeviceDeviceBackingInfo"] = reflect.TypeOf((*VirtualDeviceDeviceBackingInfo)(nil)).Elem()
    +}
    +
    +func (b *VirtualDeviceDeviceBackingOption) GetVirtualDeviceDeviceBackingOption() *VirtualDeviceDeviceBackingOption {
    +	return b
    +}
    +
    +type BaseVirtualDeviceDeviceBackingOption interface {
    +	GetVirtualDeviceDeviceBackingOption() *VirtualDeviceDeviceBackingOption
    +}
    +
    +func init() {
    +	t["BaseVirtualDeviceDeviceBackingOption"] = reflect.TypeOf((*VirtualDeviceDeviceBackingOption)(nil)).Elem()
    +}
    +
    +func (b *VirtualDeviceFileBackingInfo) GetVirtualDeviceFileBackingInfo() *VirtualDeviceFileBackingInfo {
    +	return b
    +}
    +
    +type BaseVirtualDeviceFileBackingInfo interface {
    +	GetVirtualDeviceFileBackingInfo() *VirtualDeviceFileBackingInfo
    +}
    +
    +func init() {
    +	t["BaseVirtualDeviceFileBackingInfo"] = reflect.TypeOf((*VirtualDeviceFileBackingInfo)(nil)).Elem()
    +}
    +
    +func (b *VirtualDeviceFileBackingOption) GetVirtualDeviceFileBackingOption() *VirtualDeviceFileBackingOption {
    +	return b
    +}
    +
    +type BaseVirtualDeviceFileBackingOption interface {
    +	GetVirtualDeviceFileBackingOption() *VirtualDeviceFileBackingOption
    +}
    +
    +func init() {
    +	t["BaseVirtualDeviceFileBackingOption"] = reflect.TypeOf((*VirtualDeviceFileBackingOption)(nil)).Elem()
    +}
    +
    +func (b *VirtualDeviceOption) GetVirtualDeviceOption() *VirtualDeviceOption { return b }
    +
    +type BaseVirtualDeviceOption interface {
    +	GetVirtualDeviceOption() *VirtualDeviceOption
    +}
    +
    +func init() {
    +	t["BaseVirtualDeviceOption"] = reflect.TypeOf((*VirtualDeviceOption)(nil)).Elem()
    +}
    +
    +func (b *VirtualDevicePciBusSlotInfo) GetVirtualDevicePciBusSlotInfo() *VirtualDevicePciBusSlotInfo {
    +	return b
    +}
    +
    +type BaseVirtualDevicePciBusSlotInfo interface {
    +	GetVirtualDevicePciBusSlotInfo() *VirtualDevicePciBusSlotInfo
    +}
    +
    +func init() {
    +	t["BaseVirtualDevicePciBusSlotInfo"] = reflect.TypeOf((*VirtualDevicePciBusSlotInfo)(nil)).Elem()
    +}
    +
    +func (b *VirtualDevicePipeBackingInfo) GetVirtualDevicePipeBackingInfo() *VirtualDevicePipeBackingInfo {
    +	return b
    +}
    +
    +type BaseVirtualDevicePipeBackingInfo interface {
    +	GetVirtualDevicePipeBackingInfo() *VirtualDevicePipeBackingInfo
    +}
    +
    +func init() {
    +	t["BaseVirtualDevicePipeBackingInfo"] = reflect.TypeOf((*VirtualDevicePipeBackingInfo)(nil)).Elem()
    +}
    +
    +func (b *VirtualDevicePipeBackingOption) GetVirtualDevicePipeBackingOption() *VirtualDevicePipeBackingOption {
    +	return b
    +}
    +
    +type BaseVirtualDevicePipeBackingOption interface {
    +	GetVirtualDevicePipeBackingOption() *VirtualDevicePipeBackingOption
    +}
    +
    +func init() {
    +	t["BaseVirtualDevicePipeBackingOption"] = reflect.TypeOf((*VirtualDevicePipeBackingOption)(nil)).Elem()
    +}
    +
    +func (b *VirtualDeviceRemoteDeviceBackingInfo) GetVirtualDeviceRemoteDeviceBackingInfo() *VirtualDeviceRemoteDeviceBackingInfo {
    +	return b
    +}
    +
    +type BaseVirtualDeviceRemoteDeviceBackingInfo interface {
    +	GetVirtualDeviceRemoteDeviceBackingInfo() *VirtualDeviceRemoteDeviceBackingInfo
    +}
    +
    +func init() {
    +	t["BaseVirtualDeviceRemoteDeviceBackingInfo"] = reflect.TypeOf((*VirtualDeviceRemoteDeviceBackingInfo)(nil)).Elem()
    +}
    +
    +func (b *VirtualDeviceRemoteDeviceBackingOption) GetVirtualDeviceRemoteDeviceBackingOption() *VirtualDeviceRemoteDeviceBackingOption {
    +	return b
    +}
    +
    +type BaseVirtualDeviceRemoteDeviceBackingOption interface {
    +	GetVirtualDeviceRemoteDeviceBackingOption() *VirtualDeviceRemoteDeviceBackingOption
    +}
    +
    +func init() {
    +	t["BaseVirtualDeviceRemoteDeviceBackingOption"] = reflect.TypeOf((*VirtualDeviceRemoteDeviceBackingOption)(nil)).Elem()
    +}
    +
    +func (b *VirtualDeviceURIBackingInfo) GetVirtualDeviceURIBackingInfo() *VirtualDeviceURIBackingInfo {
    +	return b
    +}
    +
    +type BaseVirtualDeviceURIBackingInfo interface {
    +	GetVirtualDeviceURIBackingInfo() *VirtualDeviceURIBackingInfo
    +}
    +
    +func init() {
    +	t["BaseVirtualDeviceURIBackingInfo"] = reflect.TypeOf((*VirtualDeviceURIBackingInfo)(nil)).Elem()
    +}
    +
    +func (b *VirtualDeviceURIBackingOption) GetVirtualDeviceURIBackingOption() *VirtualDeviceURIBackingOption {
    +	return b
    +}
    +
    +type BaseVirtualDeviceURIBackingOption interface {
    +	GetVirtualDeviceURIBackingOption() *VirtualDeviceURIBackingOption
    +}
    +
    +func init() {
    +	t["BaseVirtualDeviceURIBackingOption"] = reflect.TypeOf((*VirtualDeviceURIBackingOption)(nil)).Elem()
    +}
    +
    +func (b *VirtualDiskRawDiskVer2BackingInfo) GetVirtualDiskRawDiskVer2BackingInfo() *VirtualDiskRawDiskVer2BackingInfo {
    +	return b
    +}
    +
    +type BaseVirtualDiskRawDiskVer2BackingInfo interface {
    +	GetVirtualDiskRawDiskVer2BackingInfo() *VirtualDiskRawDiskVer2BackingInfo
    +}
    +
    +func init() {
    +	t["BaseVirtualDiskRawDiskVer2BackingInfo"] = reflect.TypeOf((*VirtualDiskRawDiskVer2BackingInfo)(nil)).Elem()
    +}
    +
    +func (b *VirtualDiskRawDiskVer2BackingOption) GetVirtualDiskRawDiskVer2BackingOption() *VirtualDiskRawDiskVer2BackingOption {
    +	return b
    +}
    +
    +type BaseVirtualDiskRawDiskVer2BackingOption interface {
    +	GetVirtualDiskRawDiskVer2BackingOption() *VirtualDiskRawDiskVer2BackingOption
    +}
    +
    +func init() {
    +	t["BaseVirtualDiskRawDiskVer2BackingOption"] = reflect.TypeOf((*VirtualDiskRawDiskVer2BackingOption)(nil)).Elem()
    +}
    +
    +func (b *VirtualDiskSpec) GetVirtualDiskSpec() *VirtualDiskSpec { return b }
    +
    +type BaseVirtualDiskSpec interface {
    +	GetVirtualDiskSpec() *VirtualDiskSpec
    +}
    +
    +func init() {
    +	t["BaseVirtualDiskSpec"] = reflect.TypeOf((*VirtualDiskSpec)(nil)).Elem()
    +}
    +
    +func (b *VirtualEthernetCard) GetVirtualEthernetCard() *VirtualEthernetCard { return b }
    +
    +type BaseVirtualEthernetCard interface {
    +	GetVirtualEthernetCard() *VirtualEthernetCard
    +}
    +
    +func init() {
    +	t["BaseVirtualEthernetCard"] = reflect.TypeOf((*VirtualEthernetCard)(nil)).Elem()
    +}
    +
    +func (b *VirtualEthernetCardOption) GetVirtualEthernetCardOption() *VirtualEthernetCardOption {
    +	return b
    +}
    +
    +type BaseVirtualEthernetCardOption interface {
    +	GetVirtualEthernetCardOption() *VirtualEthernetCardOption
    +}
    +
    +func init() {
    +	t["BaseVirtualEthernetCardOption"] = reflect.TypeOf((*VirtualEthernetCardOption)(nil)).Elem()
    +}
    +
    +func (b *VirtualHardwareCompatibilityIssue) GetVirtualHardwareCompatibilityIssue() *VirtualHardwareCompatibilityIssue {
    +	return b
    +}
    +
    +type BaseVirtualHardwareCompatibilityIssue interface {
    +	GetVirtualHardwareCompatibilityIssue() *VirtualHardwareCompatibilityIssue
    +}
    +
    +func init() {
    +	t["BaseVirtualHardwareCompatibilityIssue"] = reflect.TypeOf((*VirtualHardwareCompatibilityIssue)(nil)).Elem()
    +}
    +
    +func (b *VirtualMachineBootOptionsBootableDevice) GetVirtualMachineBootOptionsBootableDevice() *VirtualMachineBootOptionsBootableDevice {
    +	return b
    +}
    +
    +type BaseVirtualMachineBootOptionsBootableDevice interface {
    +	GetVirtualMachineBootOptionsBootableDevice() *VirtualMachineBootOptionsBootableDevice
    +}
    +
    +func init() {
    +	t["BaseVirtualMachineBootOptionsBootableDevice"] = reflect.TypeOf((*VirtualMachineBootOptionsBootableDevice)(nil)).Elem()
    +}
    +
    +func (b *VirtualMachineDeviceRuntimeInfoDeviceRuntimeState) GetVirtualMachineDeviceRuntimeInfoDeviceRuntimeState() *VirtualMachineDeviceRuntimeInfoDeviceRuntimeState {
    +	return b
    +}
    +
    +type BaseVirtualMachineDeviceRuntimeInfoDeviceRuntimeState interface {
    +	GetVirtualMachineDeviceRuntimeInfoDeviceRuntimeState() *VirtualMachineDeviceRuntimeInfoDeviceRuntimeState
    +}
    +
    +func init() {
    +	t["BaseVirtualMachineDeviceRuntimeInfoDeviceRuntimeState"] = reflect.TypeOf((*VirtualMachineDeviceRuntimeInfoDeviceRuntimeState)(nil)).Elem()
    +}
    +
    +func (b *VirtualMachineDiskDeviceInfo) GetVirtualMachineDiskDeviceInfo() *VirtualMachineDiskDeviceInfo {
    +	return b
    +}
    +
    +type BaseVirtualMachineDiskDeviceInfo interface {
    +	GetVirtualMachineDiskDeviceInfo() *VirtualMachineDiskDeviceInfo
    +}
    +
    +func init() {
    +	t["BaseVirtualMachineDiskDeviceInfo"] = reflect.TypeOf((*VirtualMachineDiskDeviceInfo)(nil)).Elem()
    +}
    +
    +func (b *VirtualMachineGuestQuiesceSpec) GetVirtualMachineGuestQuiesceSpec() *VirtualMachineGuestQuiesceSpec {
    +	return b
    +}
    +
    +type BaseVirtualMachineGuestQuiesceSpec interface {
    +	GetVirtualMachineGuestQuiesceSpec() *VirtualMachineGuestQuiesceSpec
    +}
    +
    +func init() {
    +	t["BaseVirtualMachineGuestQuiesceSpec"] = reflect.TypeOf((*VirtualMachineGuestQuiesceSpec)(nil)).Elem()
    +}
    +
    +func (b *VirtualMachinePciPassthroughInfo) GetVirtualMachinePciPassthroughInfo() *VirtualMachinePciPassthroughInfo {
    +	return b
    +}
    +
    +type BaseVirtualMachinePciPassthroughInfo interface {
    +	GetVirtualMachinePciPassthroughInfo() *VirtualMachinePciPassthroughInfo
    +}
    +
    +func init() {
    +	t["BaseVirtualMachinePciPassthroughInfo"] = reflect.TypeOf((*VirtualMachinePciPassthroughInfo)(nil)).Elem()
    +}
    +
    +func (b *VirtualMachineProfileSpec) GetVirtualMachineProfileSpec() *VirtualMachineProfileSpec {
    +	return b
    +}
    +
    +type BaseVirtualMachineProfileSpec interface {
    +	GetVirtualMachineProfileSpec() *VirtualMachineProfileSpec
    +}
    +
    +func init() {
    +	t["BaseVirtualMachineProfileSpec"] = reflect.TypeOf((*VirtualMachineProfileSpec)(nil)).Elem()
    +}
    +
    +func (b *VirtualMachineSriovDevicePoolInfo) GetVirtualMachineSriovDevicePoolInfo() *VirtualMachineSriovDevicePoolInfo {
    +	return b
    +}
    +
    +type BaseVirtualMachineSriovDevicePoolInfo interface {
    +	GetVirtualMachineSriovDevicePoolInfo() *VirtualMachineSriovDevicePoolInfo
    +}
    +
    +func init() {
    +	t["BaseVirtualMachineSriovDevicePoolInfo"] = reflect.TypeOf((*VirtualMachineSriovDevicePoolInfo)(nil)).Elem()
    +}
    +
    +func (b *VirtualMachineTargetInfo) GetVirtualMachineTargetInfo() *VirtualMachineTargetInfo { return b }
    +
    +type BaseVirtualMachineTargetInfo interface {
    +	GetVirtualMachineTargetInfo() *VirtualMachineTargetInfo
    +}
    +
    +func init() {
    +	t["BaseVirtualMachineTargetInfo"] = reflect.TypeOf((*VirtualMachineTargetInfo)(nil)).Elem()
    +}
    +
    +func (b *VirtualPCIPassthroughPluginBackingInfo) GetVirtualPCIPassthroughPluginBackingInfo() *VirtualPCIPassthroughPluginBackingInfo {
    +	return b
    +}
    +
    +type BaseVirtualPCIPassthroughPluginBackingInfo interface {
    +	GetVirtualPCIPassthroughPluginBackingInfo() *VirtualPCIPassthroughPluginBackingInfo
    +}
    +
    +func init() {
    +	t["BaseVirtualPCIPassthroughPluginBackingInfo"] = reflect.TypeOf((*VirtualPCIPassthroughPluginBackingInfo)(nil)).Elem()
    +}
    +
    +func (b *VirtualPCIPassthroughPluginBackingOption) GetVirtualPCIPassthroughPluginBackingOption() *VirtualPCIPassthroughPluginBackingOption {
    +	return b
    +}
    +
    +type BaseVirtualPCIPassthroughPluginBackingOption interface {
    +	GetVirtualPCIPassthroughPluginBackingOption() *VirtualPCIPassthroughPluginBackingOption
    +}
    +
    +func init() {
    +	t["BaseVirtualPCIPassthroughPluginBackingOption"] = reflect.TypeOf((*VirtualPCIPassthroughPluginBackingOption)(nil)).Elem()
    +}
    +
    +func (b *VirtualSATAController) GetVirtualSATAController() *VirtualSATAController { return b }
    +
    +type BaseVirtualSATAController interface {
    +	GetVirtualSATAController() *VirtualSATAController
    +}
    +
    +func init() {
    +	t["BaseVirtualSATAController"] = reflect.TypeOf((*VirtualSATAController)(nil)).Elem()
    +}
    +
    +func (b *VirtualSATAControllerOption) GetVirtualSATAControllerOption() *VirtualSATAControllerOption {
    +	return b
    +}
    +
    +type BaseVirtualSATAControllerOption interface {
    +	GetVirtualSATAControllerOption() *VirtualSATAControllerOption
    +}
    +
    +func init() {
    +	t["BaseVirtualSATAControllerOption"] = reflect.TypeOf((*VirtualSATAControllerOption)(nil)).Elem()
    +}
    +
    +func (b *VirtualSCSIController) GetVirtualSCSIController() *VirtualSCSIController { return b }
    +
    +type BaseVirtualSCSIController interface {
    +	GetVirtualSCSIController() *VirtualSCSIController
    +}
    +
    +func init() {
    +	t["BaseVirtualSCSIController"] = reflect.TypeOf((*VirtualSCSIController)(nil)).Elem()
    +}
    +
    +func (b *VirtualSCSIControllerOption) GetVirtualSCSIControllerOption() *VirtualSCSIControllerOption {
    +	return b
    +}
    +
    +type BaseVirtualSCSIControllerOption interface {
    +	GetVirtualSCSIControllerOption() *VirtualSCSIControllerOption
    +}
    +
    +func init() {
    +	t["BaseVirtualSCSIControllerOption"] = reflect.TypeOf((*VirtualSCSIControllerOption)(nil)).Elem()
    +}
    +
    +func (b *VirtualSoundCard) GetVirtualSoundCard() *VirtualSoundCard { return b }
    +
    +type BaseVirtualSoundCard interface {
    +	GetVirtualSoundCard() *VirtualSoundCard
    +}
    +
    +func init() {
    +	t["BaseVirtualSoundCard"] = reflect.TypeOf((*VirtualSoundCard)(nil)).Elem()
    +}
    +
    +func (b *VirtualSoundCardOption) GetVirtualSoundCardOption() *VirtualSoundCardOption { return b }
    +
    +type BaseVirtualSoundCardOption interface {
    +	GetVirtualSoundCardOption() *VirtualSoundCardOption
    +}
    +
    +func init() {
    +	t["BaseVirtualSoundCardOption"] = reflect.TypeOf((*VirtualSoundCardOption)(nil)).Elem()
    +}
    +
    +func (b *VirtualVmxnet) GetVirtualVmxnet() *VirtualVmxnet { return b }
    +
    +type BaseVirtualVmxnet interface {
    +	GetVirtualVmxnet() *VirtualVmxnet
    +}
    +
    +func init() {
    +	t["BaseVirtualVmxnet"] = reflect.TypeOf((*VirtualVmxnet)(nil)).Elem()
    +}
    +
    +func (b *VirtualVmxnet3) GetVirtualVmxnet3() *VirtualVmxnet3 { return b }
    +
    +type BaseVirtualVmxnet3 interface {
    +	GetVirtualVmxnet3() *VirtualVmxnet3
    +}
    +
    +func init() {
    +	t["BaseVirtualVmxnet3"] = reflect.TypeOf((*VirtualVmxnet3)(nil)).Elem()
    +}
    +
    +func (b *VirtualVmxnet3Option) GetVirtualVmxnet3Option() *VirtualVmxnet3Option { return b }
    +
    +type BaseVirtualVmxnet3Option interface {
    +	GetVirtualVmxnet3Option() *VirtualVmxnet3Option
    +}
    +
    +func init() {
    +	t["BaseVirtualVmxnet3Option"] = reflect.TypeOf((*VirtualVmxnet3Option)(nil)).Elem()
    +}
    +
    +func (b *VirtualVmxnetOption) GetVirtualVmxnetOption() *VirtualVmxnetOption { return b }
    +
    +type BaseVirtualVmxnetOption interface {
    +	GetVirtualVmxnetOption() *VirtualVmxnetOption
    +}
    +
    +func init() {
    +	t["BaseVirtualVmxnetOption"] = reflect.TypeOf((*VirtualVmxnetOption)(nil)).Elem()
    +}
    +
    +func (b *VmCloneEvent) GetVmCloneEvent() *VmCloneEvent { return b }
    +
    +type BaseVmCloneEvent interface {
    +	GetVmCloneEvent() *VmCloneEvent
    +}
    +
    +func init() {
    +	t["BaseVmCloneEvent"] = reflect.TypeOf((*VmCloneEvent)(nil)).Elem()
    +}
    +
    +func (b *VmConfigFault) GetVmConfigFault() *VmConfigFault { return b }
    +
    +type BaseVmConfigFault interface {
    +	GetVmConfigFault() *VmConfigFault
    +}
    +
    +func init() {
    +	t["BaseVmConfigFault"] = reflect.TypeOf((*VmConfigFault)(nil)).Elem()
    +}
    +
    +func (b *VmConfigFileInfo) GetVmConfigFileInfo() *VmConfigFileInfo { return b }
    +
    +type BaseVmConfigFileInfo interface {
    +	GetVmConfigFileInfo() *VmConfigFileInfo
    +}
    +
    +func init() {
    +	t["BaseVmConfigFileInfo"] = reflect.TypeOf((*VmConfigFileInfo)(nil)).Elem()
    +}
    +
    +func (b *VmConfigFileQuery) GetVmConfigFileQuery() *VmConfigFileQuery { return b }
    +
    +type BaseVmConfigFileQuery interface {
    +	GetVmConfigFileQuery() *VmConfigFileQuery
    +}
    +
    +func init() {
    +	t["BaseVmConfigFileQuery"] = reflect.TypeOf((*VmConfigFileQuery)(nil)).Elem()
    +}
    +
    +func (b *VmConfigInfo) GetVmConfigInfo() *VmConfigInfo { return b }
    +
    +type BaseVmConfigInfo interface {
    +	GetVmConfigInfo() *VmConfigInfo
    +}
    +
    +func init() {
    +	t["BaseVmConfigInfo"] = reflect.TypeOf((*VmConfigInfo)(nil)).Elem()
    +}
    +
    +func (b *VmConfigSpec) GetVmConfigSpec() *VmConfigSpec { return b }
    +
    +type BaseVmConfigSpec interface {
    +	GetVmConfigSpec() *VmConfigSpec
    +}
    +
    +func init() {
    +	t["BaseVmConfigSpec"] = reflect.TypeOf((*VmConfigSpec)(nil)).Elem()
    +}
    +
    +func (b *VmDasBeingResetEvent) GetVmDasBeingResetEvent() *VmDasBeingResetEvent { return b }
    +
    +type BaseVmDasBeingResetEvent interface {
    +	GetVmDasBeingResetEvent() *VmDasBeingResetEvent
    +}
    +
    +func init() {
    +	t["BaseVmDasBeingResetEvent"] = reflect.TypeOf((*VmDasBeingResetEvent)(nil)).Elem()
    +}
    +
    +func (b *VmEvent) GetVmEvent() *VmEvent { return b }
    +
    +type BaseVmEvent interface {
    +	GetVmEvent() *VmEvent
    +}
    +
    +func init() {
    +	t["BaseVmEvent"] = reflect.TypeOf((*VmEvent)(nil)).Elem()
    +}
    +
    +func (b *VmFaultToleranceIssue) GetVmFaultToleranceIssue() *VmFaultToleranceIssue { return b }
    +
    +type BaseVmFaultToleranceIssue interface {
    +	GetVmFaultToleranceIssue() *VmFaultToleranceIssue
    +}
    +
    +func init() {
    +	t["BaseVmFaultToleranceIssue"] = reflect.TypeOf((*VmFaultToleranceIssue)(nil)).Elem()
    +}
    +
    +func (b *VmMigratedEvent) GetVmMigratedEvent() *VmMigratedEvent { return b }
    +
    +type BaseVmMigratedEvent interface {
    +	GetVmMigratedEvent() *VmMigratedEvent
    +}
    +
    +func init() {
    +	t["BaseVmMigratedEvent"] = reflect.TypeOf((*VmMigratedEvent)(nil)).Elem()
    +}
    +
    +func (b *VmPoweredOffEvent) GetVmPoweredOffEvent() *VmPoweredOffEvent { return b }
    +
    +type BaseVmPoweredOffEvent interface {
    +	GetVmPoweredOffEvent() *VmPoweredOffEvent
    +}
    +
    +func init() {
    +	t["BaseVmPoweredOffEvent"] = reflect.TypeOf((*VmPoweredOffEvent)(nil)).Elem()
    +}
    +
    +func (b *VmPoweredOnEvent) GetVmPoweredOnEvent() *VmPoweredOnEvent { return b }
    +
    +type BaseVmPoweredOnEvent interface {
    +	GetVmPoweredOnEvent() *VmPoweredOnEvent
    +}
    +
    +func init() {
    +	t["BaseVmPoweredOnEvent"] = reflect.TypeOf((*VmPoweredOnEvent)(nil)).Elem()
    +}
    +
    +func (b *VmRelocateSpecEvent) GetVmRelocateSpecEvent() *VmRelocateSpecEvent { return b }
    +
    +type BaseVmRelocateSpecEvent interface {
    +	GetVmRelocateSpecEvent() *VmRelocateSpecEvent
    +}
    +
    +func init() {
    +	t["BaseVmRelocateSpecEvent"] = reflect.TypeOf((*VmRelocateSpecEvent)(nil)).Elem()
    +}
    +
    +func (b *VmStartingEvent) GetVmStartingEvent() *VmStartingEvent { return b }
    +
    +type BaseVmStartingEvent interface {
    +	GetVmStartingEvent() *VmStartingEvent
    +}
    +
    +func init() {
    +	t["BaseVmStartingEvent"] = reflect.TypeOf((*VmStartingEvent)(nil)).Elem()
    +}
    +
    +func (b *VmToolsUpgradeFault) GetVmToolsUpgradeFault() *VmToolsUpgradeFault { return b }
    +
    +type BaseVmToolsUpgradeFault interface {
    +	GetVmToolsUpgradeFault() *VmToolsUpgradeFault
    +}
    +
    +func init() {
    +	t["BaseVmToolsUpgradeFault"] = reflect.TypeOf((*VmToolsUpgradeFault)(nil)).Elem()
    +}
    +
    +func (b *VmfsDatastoreBaseOption) GetVmfsDatastoreBaseOption() *VmfsDatastoreBaseOption { return b }
    +
    +type BaseVmfsDatastoreBaseOption interface {
    +	GetVmfsDatastoreBaseOption() *VmfsDatastoreBaseOption
    +}
    +
    +func init() {
    +	t["BaseVmfsDatastoreBaseOption"] = reflect.TypeOf((*VmfsDatastoreBaseOption)(nil)).Elem()
    +}
    +
    +func (b *VmfsDatastoreSingleExtentOption) GetVmfsDatastoreSingleExtentOption() *VmfsDatastoreSingleExtentOption {
    +	return b
    +}
    +
    +type BaseVmfsDatastoreSingleExtentOption interface {
    +	GetVmfsDatastoreSingleExtentOption() *VmfsDatastoreSingleExtentOption
    +}
    +
    +func init() {
    +	t["BaseVmfsDatastoreSingleExtentOption"] = reflect.TypeOf((*VmfsDatastoreSingleExtentOption)(nil)).Elem()
    +}
    +
    +func (b *VmfsDatastoreSpec) GetVmfsDatastoreSpec() *VmfsDatastoreSpec { return b }
    +
    +type BaseVmfsDatastoreSpec interface {
    +	GetVmfsDatastoreSpec() *VmfsDatastoreSpec
    +}
    +
    +func init() {
    +	t["BaseVmfsDatastoreSpec"] = reflect.TypeOf((*VmfsDatastoreSpec)(nil)).Elem()
    +}
    +
    +func (b *VmfsMountFault) GetVmfsMountFault() *VmfsMountFault { return b }
    +
    +type BaseVmfsMountFault interface {
    +	GetVmfsMountFault() *VmfsMountFault
    +}
    +
    +func init() {
    +	t["BaseVmfsMountFault"] = reflect.TypeOf((*VmfsMountFault)(nil)).Elem()
    +}
    +
    +func (b *VmwareDistributedVirtualSwitchVlanSpec) GetVmwareDistributedVirtualSwitchVlanSpec() *VmwareDistributedVirtualSwitchVlanSpec {
    +	return b
    +}
    +
    +type BaseVmwareDistributedVirtualSwitchVlanSpec interface {
    +	GetVmwareDistributedVirtualSwitchVlanSpec() *VmwareDistributedVirtualSwitchVlanSpec
    +}
    +
    +func init() {
    +	t["BaseVmwareDistributedVirtualSwitchVlanSpec"] = reflect.TypeOf((*VmwareDistributedVirtualSwitchVlanSpec)(nil)).Elem()
    +}
    +
    +func (b *VsanDiskFault) GetVsanDiskFault() *VsanDiskFault { return b }
    +
    +type BaseVsanDiskFault interface {
    +	GetVsanDiskFault() *VsanDiskFault
    +}
    +
    +func init() {
    +	t["BaseVsanDiskFault"] = reflect.TypeOf((*VsanDiskFault)(nil)).Elem()
    +}
    +
    +func (b *VsanFault) GetVsanFault() *VsanFault { return b }
    +
    +type BaseVsanFault interface {
    +	GetVsanFault() *VsanFault
    +}
    +
    +func init() {
    +	t["BaseVsanFault"] = reflect.TypeOf((*VsanFault)(nil)).Elem()
    +}
    +
    +func (b *VsanUpgradeSystemPreflightCheckIssue) GetVsanUpgradeSystemPreflightCheckIssue() *VsanUpgradeSystemPreflightCheckIssue {
    +	return b
    +}
    +
    +type BaseVsanUpgradeSystemPreflightCheckIssue interface {
    +	GetVsanUpgradeSystemPreflightCheckIssue() *VsanUpgradeSystemPreflightCheckIssue
    +}
    +
    +func init() {
    +	t["BaseVsanUpgradeSystemPreflightCheckIssue"] = reflect.TypeOf((*VsanUpgradeSystemPreflightCheckIssue)(nil)).Elem()
    +}
    +
    +func (b *VsanUpgradeSystemUpgradeHistoryItem) GetVsanUpgradeSystemUpgradeHistoryItem() *VsanUpgradeSystemUpgradeHistoryItem {
    +	return b
    +}
    +
    +type BaseVsanUpgradeSystemUpgradeHistoryItem interface {
    +	GetVsanUpgradeSystemUpgradeHistoryItem() *VsanUpgradeSystemUpgradeHistoryItem
    +}
    +
    +func init() {
    +	t["BaseVsanUpgradeSystemUpgradeHistoryItem"] = reflect.TypeOf((*VsanUpgradeSystemUpgradeHistoryItem)(nil)).Elem()
    +}
    +
    +func (b *VslmCreateSpecBackingSpec) GetVslmCreateSpecBackingSpec() *VslmCreateSpecBackingSpec {
    +	return b
    +}
    +
    +type BaseVslmCreateSpecBackingSpec interface {
    +	GetVslmCreateSpecBackingSpec() *VslmCreateSpecBackingSpec
    +}
    +
    +func init() {
    +	t["BaseVslmCreateSpecBackingSpec"] = reflect.TypeOf((*VslmCreateSpecBackingSpec)(nil)).Elem()
    +}
    +
    +func (b *VslmMigrateSpec) GetVslmMigrateSpec() *VslmMigrateSpec { return b }
    +
    +type BaseVslmMigrateSpec interface {
    +	GetVslmMigrateSpec() *VslmMigrateSpec
    +}
    +
    +func init() {
    +	t["BaseVslmMigrateSpec"] = reflect.TypeOf((*VslmMigrateSpec)(nil)).Elem()
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/types/registry.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/types/registry.go
    new file mode 100644
    index 000000000..ff7c302d3
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/types/registry.go
    @@ -0,0 +1,43 @@
    +/*
    +Copyright (c) 2014 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package types
    +
    +import (
    +	"reflect"
    +	"strings"
    +)
    +
    +var t = map[string]reflect.Type{}
    +
    +func Add(name string, kind reflect.Type) {
    +	t[name] = kind
    +}
    +
    +type Func func(string) (reflect.Type, bool)
    +
    +func TypeFunc() Func {
    +	return func(name string) (reflect.Type, bool) {
    +		typ, ok := t[name]
    +		if !ok {
    +			// The /sdk endpoint does not prefix types with the namespace,
    +			// but extension endpoints, such as /pbm/sdk do.
    +			name = strings.TrimPrefix(name, "vim25:")
    +			typ, ok = t[name]
    +		}
    +		return typ, ok
    +	}
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/types/types.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/types/types.go
    new file mode 100644
    index 000000000..e990e273e
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/types/types.go
    @@ -0,0 +1,55433 @@
    +/*
    +Copyright (c) 2014-2018 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package types
    +
    +import (
    +	"reflect"
    +	"time"
    +)
    +
    +type AbdicateDomOwnership AbdicateDomOwnershipRequestType
    +
    +func init() {
    +	t["AbdicateDomOwnership"] = reflect.TypeOf((*AbdicateDomOwnership)(nil)).Elem()
    +}
    +
    +type AbdicateDomOwnershipRequestType struct {
    +	This  ManagedObjectReference `xml:"_this"`
    +	Uuids []string               `xml:"uuids"`
    +}
    +
    +func init() {
    +	t["AbdicateDomOwnershipRequestType"] = reflect.TypeOf((*AbdicateDomOwnershipRequestType)(nil)).Elem()
    +}
    +
    +type AbdicateDomOwnershipResponse struct {
    +	Returnval []string `xml:"returnval,omitempty"`
    +}
    +
    +type AboutInfo struct {
    +	DynamicData
    +
    +	Name                  string `xml:"name"`
    +	FullName              string `xml:"fullName"`
    +	Vendor                string `xml:"vendor"`
    +	Version               string `xml:"version"`
    +	Build                 string `xml:"build"`
    +	LocaleVersion         string `xml:"localeVersion,omitempty"`
    +	LocaleBuild           string `xml:"localeBuild,omitempty"`
    +	OsType                string `xml:"osType"`
    +	ProductLineId         string `xml:"productLineId"`
    +	ApiType               string `xml:"apiType"`
    +	ApiVersion            string `xml:"apiVersion"`
    +	InstanceUuid          string `xml:"instanceUuid,omitempty"`
    +	LicenseProductName    string `xml:"licenseProductName,omitempty"`
    +	LicenseProductVersion string `xml:"licenseProductVersion,omitempty"`
    +}
    +
    +func init() {
    +	t["AboutInfo"] = reflect.TypeOf((*AboutInfo)(nil)).Elem()
    +}
    +
    +type AccountCreatedEvent struct {
    +	HostEvent
    +
    +	Spec  BaseHostAccountSpec `xml:"spec,typeattr"`
    +	Group bool                `xml:"group"`
    +}
    +
    +func init() {
    +	t["AccountCreatedEvent"] = reflect.TypeOf((*AccountCreatedEvent)(nil)).Elem()
    +}
    +
    +type AccountRemovedEvent struct {
    +	HostEvent
    +
    +	Account string `xml:"account"`
    +	Group   bool   `xml:"group"`
    +}
    +
    +func init() {
    +	t["AccountRemovedEvent"] = reflect.TypeOf((*AccountRemovedEvent)(nil)).Elem()
    +}
    +
    +type AccountUpdatedEvent struct {
    +	HostEvent
    +
    +	Spec            BaseHostAccountSpec `xml:"spec,typeattr"`
    +	Group           bool                `xml:"group"`
    +	PrevDescription string              `xml:"prevDescription,omitempty"`
    +}
    +
    +func init() {
    +	t["AccountUpdatedEvent"] = reflect.TypeOf((*AccountUpdatedEvent)(nil)).Elem()
    +}
    +
    +type AcknowledgeAlarm AcknowledgeAlarmRequestType
    +
    +func init() {
    +	t["AcknowledgeAlarm"] = reflect.TypeOf((*AcknowledgeAlarm)(nil)).Elem()
    +}
    +
    +type AcknowledgeAlarmRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	Alarm  ManagedObjectReference `xml:"alarm"`
    +	Entity ManagedObjectReference `xml:"entity"`
    +}
    +
    +func init() {
    +	t["AcknowledgeAlarmRequestType"] = reflect.TypeOf((*AcknowledgeAlarmRequestType)(nil)).Elem()
    +}
    +
    +type AcknowledgeAlarmResponse struct {
    +}
    +
    +type AcquireCimServicesTicket AcquireCimServicesTicketRequestType
    +
    +func init() {
    +	t["AcquireCimServicesTicket"] = reflect.TypeOf((*AcquireCimServicesTicket)(nil)).Elem()
    +}
    +
    +type AcquireCimServicesTicketRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["AcquireCimServicesTicketRequestType"] = reflect.TypeOf((*AcquireCimServicesTicketRequestType)(nil)).Elem()
    +}
    +
    +type AcquireCimServicesTicketResponse struct {
    +	Returnval HostServiceTicket `xml:"returnval"`
    +}
    +
    +type AcquireCloneTicket AcquireCloneTicketRequestType
    +
    +func init() {
    +	t["AcquireCloneTicket"] = reflect.TypeOf((*AcquireCloneTicket)(nil)).Elem()
    +}
    +
    +type AcquireCloneTicketRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["AcquireCloneTicketRequestType"] = reflect.TypeOf((*AcquireCloneTicketRequestType)(nil)).Elem()
    +}
    +
    +type AcquireCloneTicketResponse struct {
    +	Returnval string `xml:"returnval"`
    +}
    +
    +type AcquireCredentialsInGuest AcquireCredentialsInGuestRequestType
    +
    +func init() {
    +	t["AcquireCredentialsInGuest"] = reflect.TypeOf((*AcquireCredentialsInGuest)(nil)).Elem()
    +}
    +
    +type AcquireCredentialsInGuestRequestType struct {
    +	This          ManagedObjectReference  `xml:"_this"`
    +	Vm            ManagedObjectReference  `xml:"vm"`
    +	RequestedAuth BaseGuestAuthentication `xml:"requestedAuth,typeattr"`
    +	SessionID     int64                   `xml:"sessionID,omitempty"`
    +}
    +
    +func init() {
    +	t["AcquireCredentialsInGuestRequestType"] = reflect.TypeOf((*AcquireCredentialsInGuestRequestType)(nil)).Elem()
    +}
    +
    +type AcquireCredentialsInGuestResponse struct {
    +	Returnval BaseGuestAuthentication `xml:"returnval,typeattr"`
    +}
    +
    +type AcquireGenericServiceTicket AcquireGenericServiceTicketRequestType
    +
    +func init() {
    +	t["AcquireGenericServiceTicket"] = reflect.TypeOf((*AcquireGenericServiceTicket)(nil)).Elem()
    +}
    +
    +type AcquireGenericServiceTicketRequestType struct {
    +	This ManagedObjectReference               `xml:"_this"`
    +	Spec BaseSessionManagerServiceRequestSpec `xml:"spec,typeattr"`
    +}
    +
    +func init() {
    +	t["AcquireGenericServiceTicketRequestType"] = reflect.TypeOf((*AcquireGenericServiceTicketRequestType)(nil)).Elem()
    +}
    +
    +type AcquireGenericServiceTicketResponse struct {
    +	Returnval SessionManagerGenericServiceTicket `xml:"returnval"`
    +}
    +
    +type AcquireLocalTicket AcquireLocalTicketRequestType
    +
    +func init() {
    +	t["AcquireLocalTicket"] = reflect.TypeOf((*AcquireLocalTicket)(nil)).Elem()
    +}
    +
    +type AcquireLocalTicketRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	UserName string                 `xml:"userName"`
    +}
    +
    +func init() {
    +	t["AcquireLocalTicketRequestType"] = reflect.TypeOf((*AcquireLocalTicketRequestType)(nil)).Elem()
    +}
    +
    +type AcquireLocalTicketResponse struct {
    +	Returnval SessionManagerLocalTicket `xml:"returnval"`
    +}
    +
    +type AcquireMksTicket AcquireMksTicketRequestType
    +
    +func init() {
    +	t["AcquireMksTicket"] = reflect.TypeOf((*AcquireMksTicket)(nil)).Elem()
    +}
    +
    +type AcquireMksTicketRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["AcquireMksTicketRequestType"] = reflect.TypeOf((*AcquireMksTicketRequestType)(nil)).Elem()
    +}
    +
    +type AcquireMksTicketResponse struct {
    +	Returnval VirtualMachineMksTicket `xml:"returnval"`
    +}
    +
    +type AcquireTicket AcquireTicketRequestType
    +
    +func init() {
    +	t["AcquireTicket"] = reflect.TypeOf((*AcquireTicket)(nil)).Elem()
    +}
    +
    +type AcquireTicketRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	TicketType string                 `xml:"ticketType"`
    +}
    +
    +func init() {
    +	t["AcquireTicketRequestType"] = reflect.TypeOf((*AcquireTicketRequestType)(nil)).Elem()
    +}
    +
    +type AcquireTicketResponse struct {
    +	Returnval VirtualMachineTicket `xml:"returnval"`
    +}
    +
    +type Action struct {
    +	DynamicData
    +}
    +
    +func init() {
    +	t["Action"] = reflect.TypeOf((*Action)(nil)).Elem()
    +}
    +
    +type ActiveDirectoryFault struct {
    +	VimFault
    +
    +	ErrorCode int32 `xml:"errorCode,omitempty"`
    +}
    +
    +func init() {
    +	t["ActiveDirectoryFault"] = reflect.TypeOf((*ActiveDirectoryFault)(nil)).Elem()
    +}
    +
    +type ActiveDirectoryFaultFault BaseActiveDirectoryFault
    +
    +func init() {
    +	t["ActiveDirectoryFaultFault"] = reflect.TypeOf((*ActiveDirectoryFaultFault)(nil)).Elem()
    +}
    +
    +type ActiveDirectoryProfile struct {
    +	ApplyProfile
    +}
    +
    +func init() {
    +	t["ActiveDirectoryProfile"] = reflect.TypeOf((*ActiveDirectoryProfile)(nil)).Elem()
    +}
    +
    +type ActiveVMsBlockingEVC struct {
    +	EVCConfigFault
    +
    +	EvcMode  string                   `xml:"evcMode,omitempty"`
    +	Host     []ManagedObjectReference `xml:"host,omitempty"`
    +	HostName []string                 `xml:"hostName,omitempty"`
    +}
    +
    +func init() {
    +	t["ActiveVMsBlockingEVC"] = reflect.TypeOf((*ActiveVMsBlockingEVC)(nil)).Elem()
    +}
    +
    +type ActiveVMsBlockingEVCFault ActiveVMsBlockingEVC
    +
    +func init() {
    +	t["ActiveVMsBlockingEVCFault"] = reflect.TypeOf((*ActiveVMsBlockingEVCFault)(nil)).Elem()
    +}
    +
    +type AddAuthorizationRole AddAuthorizationRoleRequestType
    +
    +func init() {
    +	t["AddAuthorizationRole"] = reflect.TypeOf((*AddAuthorizationRole)(nil)).Elem()
    +}
    +
    +type AddAuthorizationRoleRequestType struct {
    +	This    ManagedObjectReference `xml:"_this"`
    +	Name    string                 `xml:"name"`
    +	PrivIds []string               `xml:"privIds,omitempty"`
    +}
    +
    +func init() {
    +	t["AddAuthorizationRoleRequestType"] = reflect.TypeOf((*AddAuthorizationRoleRequestType)(nil)).Elem()
    +}
    +
    +type AddAuthorizationRoleResponse struct {
    +	Returnval int32 `xml:"returnval"`
    +}
    +
    +type AddCustomFieldDef AddCustomFieldDefRequestType
    +
    +func init() {
    +	t["AddCustomFieldDef"] = reflect.TypeOf((*AddCustomFieldDef)(nil)).Elem()
    +}
    +
    +type AddCustomFieldDefRequestType struct {
    +	This           ManagedObjectReference `xml:"_this"`
    +	Name           string                 `xml:"name"`
    +	MoType         string                 `xml:"moType,omitempty"`
    +	FieldDefPolicy *PrivilegePolicyDef    `xml:"fieldDefPolicy,omitempty"`
    +	FieldPolicy    *PrivilegePolicyDef    `xml:"fieldPolicy,omitempty"`
    +}
    +
    +func init() {
    +	t["AddCustomFieldDefRequestType"] = reflect.TypeOf((*AddCustomFieldDefRequestType)(nil)).Elem()
    +}
    +
    +type AddCustomFieldDefResponse struct {
    +	Returnval CustomFieldDef `xml:"returnval"`
    +}
    +
    +type AddDVPortgroupRequestType struct {
    +	This ManagedObjectReference  `xml:"_this"`
    +	Spec []DVPortgroupConfigSpec `xml:"spec"`
    +}
    +
    +func init() {
    +	t["AddDVPortgroupRequestType"] = reflect.TypeOf((*AddDVPortgroupRequestType)(nil)).Elem()
    +}
    +
    +type AddDVPortgroup_Task AddDVPortgroupRequestType
    +
    +func init() {
    +	t["AddDVPortgroup_Task"] = reflect.TypeOf((*AddDVPortgroup_Task)(nil)).Elem()
    +}
    +
    +type AddDVPortgroup_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type AddDisksRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Disk []HostScsiDisk         `xml:"disk"`
    +}
    +
    +func init() {
    +	t["AddDisksRequestType"] = reflect.TypeOf((*AddDisksRequestType)(nil)).Elem()
    +}
    +
    +type AddDisks_Task AddDisksRequestType
    +
    +func init() {
    +	t["AddDisks_Task"] = reflect.TypeOf((*AddDisks_Task)(nil)).Elem()
    +}
    +
    +type AddDisks_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type AddFilter AddFilterRequestType
    +
    +func init() {
    +	t["AddFilter"] = reflect.TypeOf((*AddFilter)(nil)).Elem()
    +}
    +
    +type AddFilterEntities AddFilterEntitiesRequestType
    +
    +func init() {
    +	t["AddFilterEntities"] = reflect.TypeOf((*AddFilterEntities)(nil)).Elem()
    +}
    +
    +type AddFilterEntitiesRequestType struct {
    +	This     ManagedObjectReference   `xml:"_this"`
    +	FilterId string                   `xml:"filterId"`
    +	Entities []ManagedObjectReference `xml:"entities,omitempty"`
    +}
    +
    +func init() {
    +	t["AddFilterEntitiesRequestType"] = reflect.TypeOf((*AddFilterEntitiesRequestType)(nil)).Elem()
    +}
    +
    +type AddFilterEntitiesResponse struct {
    +}
    +
    +type AddFilterRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	ProviderId string                 `xml:"providerId"`
    +	FilterName string                 `xml:"filterName"`
    +	InfoIds    []string               `xml:"infoIds,omitempty"`
    +}
    +
    +func init() {
    +	t["AddFilterRequestType"] = reflect.TypeOf((*AddFilterRequestType)(nil)).Elem()
    +}
    +
    +type AddFilterResponse struct {
    +	Returnval string `xml:"returnval"`
    +}
    +
    +type AddGuestAlias AddGuestAliasRequestType
    +
    +func init() {
    +	t["AddGuestAlias"] = reflect.TypeOf((*AddGuestAlias)(nil)).Elem()
    +}
    +
    +type AddGuestAliasRequestType struct {
    +	This       ManagedObjectReference  `xml:"_this"`
    +	Vm         ManagedObjectReference  `xml:"vm"`
    +	Auth       BaseGuestAuthentication `xml:"auth,typeattr"`
    +	Username   string                  `xml:"username"`
    +	MapCert    bool                    `xml:"mapCert"`
    +	Base64Cert string                  `xml:"base64Cert"`
    +	AliasInfo  GuestAuthAliasInfo      `xml:"aliasInfo"`
    +}
    +
    +func init() {
    +	t["AddGuestAliasRequestType"] = reflect.TypeOf((*AddGuestAliasRequestType)(nil)).Elem()
    +}
    +
    +type AddGuestAliasResponse struct {
    +}
    +
    +type AddHostRequestType struct {
    +	This         ManagedObjectReference  `xml:"_this"`
    +	Spec         HostConnectSpec         `xml:"spec"`
    +	AsConnected  bool                    `xml:"asConnected"`
    +	ResourcePool *ManagedObjectReference `xml:"resourcePool,omitempty"`
    +	License      string                  `xml:"license,omitempty"`
    +}
    +
    +func init() {
    +	t["AddHostRequestType"] = reflect.TypeOf((*AddHostRequestType)(nil)).Elem()
    +}
    +
    +type AddHost_Task AddHostRequestType
    +
    +func init() {
    +	t["AddHost_Task"] = reflect.TypeOf((*AddHost_Task)(nil)).Elem()
    +}
    +
    +type AddHost_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type AddInternetScsiSendTargets AddInternetScsiSendTargetsRequestType
    +
    +func init() {
    +	t["AddInternetScsiSendTargets"] = reflect.TypeOf((*AddInternetScsiSendTargets)(nil)).Elem()
    +}
    +
    +type AddInternetScsiSendTargetsRequestType struct {
    +	This           ManagedObjectReference          `xml:"_this"`
    +	IScsiHbaDevice string                          `xml:"iScsiHbaDevice"`
    +	Targets        []HostInternetScsiHbaSendTarget `xml:"targets"`
    +}
    +
    +func init() {
    +	t["AddInternetScsiSendTargetsRequestType"] = reflect.TypeOf((*AddInternetScsiSendTargetsRequestType)(nil)).Elem()
    +}
    +
    +type AddInternetScsiSendTargetsResponse struct {
    +}
    +
    +type AddInternetScsiStaticTargets AddInternetScsiStaticTargetsRequestType
    +
    +func init() {
    +	t["AddInternetScsiStaticTargets"] = reflect.TypeOf((*AddInternetScsiStaticTargets)(nil)).Elem()
    +}
    +
    +type AddInternetScsiStaticTargetsRequestType struct {
    +	This           ManagedObjectReference            `xml:"_this"`
    +	IScsiHbaDevice string                            `xml:"iScsiHbaDevice"`
    +	Targets        []HostInternetScsiHbaStaticTarget `xml:"targets"`
    +}
    +
    +func init() {
    +	t["AddInternetScsiStaticTargetsRequestType"] = reflect.TypeOf((*AddInternetScsiStaticTargetsRequestType)(nil)).Elem()
    +}
    +
    +type AddInternetScsiStaticTargetsResponse struct {
    +}
    +
    +type AddKey AddKeyRequestType
    +
    +func init() {
    +	t["AddKey"] = reflect.TypeOf((*AddKey)(nil)).Elem()
    +}
    +
    +type AddKeyRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Key  CryptoKeyPlain         `xml:"key"`
    +}
    +
    +func init() {
    +	t["AddKeyRequestType"] = reflect.TypeOf((*AddKeyRequestType)(nil)).Elem()
    +}
    +
    +type AddKeyResponse struct {
    +}
    +
    +type AddKeys AddKeysRequestType
    +
    +func init() {
    +	t["AddKeys"] = reflect.TypeOf((*AddKeys)(nil)).Elem()
    +}
    +
    +type AddKeysRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Keys []CryptoKeyPlain       `xml:"keys,omitempty"`
    +}
    +
    +func init() {
    +	t["AddKeysRequestType"] = reflect.TypeOf((*AddKeysRequestType)(nil)).Elem()
    +}
    +
    +type AddKeysResponse struct {
    +	Returnval []CryptoKeyResult `xml:"returnval,omitempty"`
    +}
    +
    +type AddLicense AddLicenseRequestType
    +
    +func init() {
    +	t["AddLicense"] = reflect.TypeOf((*AddLicense)(nil)).Elem()
    +}
    +
    +type AddLicenseRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	LicenseKey string                 `xml:"licenseKey"`
    +	Labels     []KeyValue             `xml:"labels,omitempty"`
    +}
    +
    +func init() {
    +	t["AddLicenseRequestType"] = reflect.TypeOf((*AddLicenseRequestType)(nil)).Elem()
    +}
    +
    +type AddLicenseResponse struct {
    +	Returnval LicenseManagerLicenseInfo `xml:"returnval"`
    +}
    +
    +type AddMonitoredEntities AddMonitoredEntitiesRequestType
    +
    +func init() {
    +	t["AddMonitoredEntities"] = reflect.TypeOf((*AddMonitoredEntities)(nil)).Elem()
    +}
    +
    +type AddMonitoredEntitiesRequestType struct {
    +	This       ManagedObjectReference   `xml:"_this"`
    +	ProviderId string                   `xml:"providerId"`
    +	Entities   []ManagedObjectReference `xml:"entities,omitempty"`
    +}
    +
    +func init() {
    +	t["AddMonitoredEntitiesRequestType"] = reflect.TypeOf((*AddMonitoredEntitiesRequestType)(nil)).Elem()
    +}
    +
    +type AddMonitoredEntitiesResponse struct {
    +}
    +
    +type AddNetworkResourcePool AddNetworkResourcePoolRequestType
    +
    +func init() {
    +	t["AddNetworkResourcePool"] = reflect.TypeOf((*AddNetworkResourcePool)(nil)).Elem()
    +}
    +
    +type AddNetworkResourcePoolRequestType struct {
    +	This       ManagedObjectReference             `xml:"_this"`
    +	ConfigSpec []DVSNetworkResourcePoolConfigSpec `xml:"configSpec"`
    +}
    +
    +func init() {
    +	t["AddNetworkResourcePoolRequestType"] = reflect.TypeOf((*AddNetworkResourcePoolRequestType)(nil)).Elem()
    +}
    +
    +type AddNetworkResourcePoolResponse struct {
    +}
    +
    +type AddPortGroup AddPortGroupRequestType
    +
    +func init() {
    +	t["AddPortGroup"] = reflect.TypeOf((*AddPortGroup)(nil)).Elem()
    +}
    +
    +type AddPortGroupRequestType struct {
    +	This    ManagedObjectReference `xml:"_this"`
    +	Portgrp HostPortGroupSpec      `xml:"portgrp"`
    +}
    +
    +func init() {
    +	t["AddPortGroupRequestType"] = reflect.TypeOf((*AddPortGroupRequestType)(nil)).Elem()
    +}
    +
    +type AddPortGroupResponse struct {
    +}
    +
    +type AddServiceConsoleVirtualNic AddServiceConsoleVirtualNicRequestType
    +
    +func init() {
    +	t["AddServiceConsoleVirtualNic"] = reflect.TypeOf((*AddServiceConsoleVirtualNic)(nil)).Elem()
    +}
    +
    +type AddServiceConsoleVirtualNicRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	Portgroup string                 `xml:"portgroup"`
    +	Nic       HostVirtualNicSpec     `xml:"nic"`
    +}
    +
    +func init() {
    +	t["AddServiceConsoleVirtualNicRequestType"] = reflect.TypeOf((*AddServiceConsoleVirtualNicRequestType)(nil)).Elem()
    +}
    +
    +type AddServiceConsoleVirtualNicResponse struct {
    +	Returnval string `xml:"returnval"`
    +}
    +
    +type AddStandaloneHostRequestType struct {
    +	This         ManagedObjectReference        `xml:"_this"`
    +	Spec         HostConnectSpec               `xml:"spec"`
    +	CompResSpec  BaseComputeResourceConfigSpec `xml:"compResSpec,omitempty,typeattr"`
    +	AddConnected bool                          `xml:"addConnected"`
    +	License      string                        `xml:"license,omitempty"`
    +}
    +
    +func init() {
    +	t["AddStandaloneHostRequestType"] = reflect.TypeOf((*AddStandaloneHostRequestType)(nil)).Elem()
    +}
    +
    +type AddStandaloneHost_Task AddStandaloneHostRequestType
    +
    +func init() {
    +	t["AddStandaloneHost_Task"] = reflect.TypeOf((*AddStandaloneHost_Task)(nil)).Elem()
    +}
    +
    +type AddStandaloneHost_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type AddVirtualNic AddVirtualNicRequestType
    +
    +func init() {
    +	t["AddVirtualNic"] = reflect.TypeOf((*AddVirtualNic)(nil)).Elem()
    +}
    +
    +type AddVirtualNicRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	Portgroup string                 `xml:"portgroup"`
    +	Nic       HostVirtualNicSpec     `xml:"nic"`
    +}
    +
    +func init() {
    +	t["AddVirtualNicRequestType"] = reflect.TypeOf((*AddVirtualNicRequestType)(nil)).Elem()
    +}
    +
    +type AddVirtualNicResponse struct {
    +	Returnval string `xml:"returnval"`
    +}
    +
    +type AddVirtualSwitch AddVirtualSwitchRequestType
    +
    +func init() {
    +	t["AddVirtualSwitch"] = reflect.TypeOf((*AddVirtualSwitch)(nil)).Elem()
    +}
    +
    +type AddVirtualSwitchRequestType struct {
    +	This        ManagedObjectReference `xml:"_this"`
    +	VswitchName string                 `xml:"vswitchName"`
    +	Spec        *HostVirtualSwitchSpec `xml:"spec,omitempty"`
    +}
    +
    +func init() {
    +	t["AddVirtualSwitchRequestType"] = reflect.TypeOf((*AddVirtualSwitchRequestType)(nil)).Elem()
    +}
    +
    +type AddVirtualSwitchResponse struct {
    +}
    +
    +type AdminDisabled struct {
    +	HostConfigFault
    +}
    +
    +func init() {
    +	t["AdminDisabled"] = reflect.TypeOf((*AdminDisabled)(nil)).Elem()
    +}
    +
    +type AdminDisabledFault AdminDisabled
    +
    +func init() {
    +	t["AdminDisabledFault"] = reflect.TypeOf((*AdminDisabledFault)(nil)).Elem()
    +}
    +
    +type AdminNotDisabled struct {
    +	HostConfigFault
    +}
    +
    +func init() {
    +	t["AdminNotDisabled"] = reflect.TypeOf((*AdminNotDisabled)(nil)).Elem()
    +}
    +
    +type AdminNotDisabledFault AdminNotDisabled
    +
    +func init() {
    +	t["AdminNotDisabledFault"] = reflect.TypeOf((*AdminNotDisabledFault)(nil)).Elem()
    +}
    +
    +type AdminPasswordNotChangedEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["AdminPasswordNotChangedEvent"] = reflect.TypeOf((*AdminPasswordNotChangedEvent)(nil)).Elem()
    +}
    +
    +type AffinityConfigured struct {
    +	MigrationFault
    +
    +	ConfiguredAffinity []string `xml:"configuredAffinity"`
    +}
    +
    +func init() {
    +	t["AffinityConfigured"] = reflect.TypeOf((*AffinityConfigured)(nil)).Elem()
    +}
    +
    +type AffinityConfiguredFault AffinityConfigured
    +
    +func init() {
    +	t["AffinityConfiguredFault"] = reflect.TypeOf((*AffinityConfiguredFault)(nil)).Elem()
    +}
    +
    +type AfterStartupTaskScheduler struct {
    +	TaskScheduler
    +
    +	Minute int32 `xml:"minute"`
    +}
    +
    +func init() {
    +	t["AfterStartupTaskScheduler"] = reflect.TypeOf((*AfterStartupTaskScheduler)(nil)).Elem()
    +}
    +
    +type AgentInstallFailed struct {
    +	HostConnectFault
    +
    +	Reason          string `xml:"reason,omitempty"`
    +	StatusCode      int32  `xml:"statusCode,omitempty"`
    +	InstallerOutput string `xml:"installerOutput,omitempty"`
    +}
    +
    +func init() {
    +	t["AgentInstallFailed"] = reflect.TypeOf((*AgentInstallFailed)(nil)).Elem()
    +}
    +
    +type AgentInstallFailedFault AgentInstallFailed
    +
    +func init() {
    +	t["AgentInstallFailedFault"] = reflect.TypeOf((*AgentInstallFailedFault)(nil)).Elem()
    +}
    +
    +type AlarmAcknowledgedEvent struct {
    +	AlarmEvent
    +
    +	Source ManagedEntityEventArgument `xml:"source"`
    +	Entity ManagedEntityEventArgument `xml:"entity"`
    +}
    +
    +func init() {
    +	t["AlarmAcknowledgedEvent"] = reflect.TypeOf((*AlarmAcknowledgedEvent)(nil)).Elem()
    +}
    +
    +type AlarmAction struct {
    +	DynamicData
    +}
    +
    +func init() {
    +	t["AlarmAction"] = reflect.TypeOf((*AlarmAction)(nil)).Elem()
    +}
    +
    +type AlarmActionTriggeredEvent struct {
    +	AlarmEvent
    +
    +	Source ManagedEntityEventArgument `xml:"source"`
    +	Entity ManagedEntityEventArgument `xml:"entity"`
    +}
    +
    +func init() {
    +	t["AlarmActionTriggeredEvent"] = reflect.TypeOf((*AlarmActionTriggeredEvent)(nil)).Elem()
    +}
    +
    +type AlarmClearedEvent struct {
    +	AlarmEvent
    +
    +	Source ManagedEntityEventArgument `xml:"source"`
    +	Entity ManagedEntityEventArgument `xml:"entity"`
    +	From   string                     `xml:"from"`
    +}
    +
    +func init() {
    +	t["AlarmClearedEvent"] = reflect.TypeOf((*AlarmClearedEvent)(nil)).Elem()
    +}
    +
    +type AlarmCreatedEvent struct {
    +	AlarmEvent
    +
    +	Entity ManagedEntityEventArgument `xml:"entity"`
    +}
    +
    +func init() {
    +	t["AlarmCreatedEvent"] = reflect.TypeOf((*AlarmCreatedEvent)(nil)).Elem()
    +}
    +
    +type AlarmDescription struct {
    +	DynamicData
    +
    +	Expr                               []BaseTypeDescription    `xml:"expr,typeattr"`
    +	StateOperator                      []BaseElementDescription `xml:"stateOperator,typeattr"`
    +	MetricOperator                     []BaseElementDescription `xml:"metricOperator,typeattr"`
    +	HostSystemConnectionState          []BaseElementDescription `xml:"hostSystemConnectionState,typeattr"`
    +	VirtualMachinePowerState           []BaseElementDescription `xml:"virtualMachinePowerState,typeattr"`
    +	DatastoreConnectionState           []BaseElementDescription `xml:"datastoreConnectionState,omitempty,typeattr"`
    +	HostSystemPowerState               []BaseElementDescription `xml:"hostSystemPowerState,omitempty,typeattr"`
    +	VirtualMachineGuestHeartbeatStatus []BaseElementDescription `xml:"virtualMachineGuestHeartbeatStatus,omitempty,typeattr"`
    +	EntityStatus                       []BaseElementDescription `xml:"entityStatus,typeattr"`
    +	Action                             []BaseTypeDescription    `xml:"action,typeattr"`
    +}
    +
    +func init() {
    +	t["AlarmDescription"] = reflect.TypeOf((*AlarmDescription)(nil)).Elem()
    +}
    +
    +type AlarmEmailCompletedEvent struct {
    +	AlarmEvent
    +
    +	Entity ManagedEntityEventArgument `xml:"entity"`
    +	To     string                     `xml:"to"`
    +}
    +
    +func init() {
    +	t["AlarmEmailCompletedEvent"] = reflect.TypeOf((*AlarmEmailCompletedEvent)(nil)).Elem()
    +}
    +
    +type AlarmEmailFailedEvent struct {
    +	AlarmEvent
    +
    +	Entity ManagedEntityEventArgument `xml:"entity"`
    +	To     string                     `xml:"to"`
    +	Reason LocalizedMethodFault       `xml:"reason"`
    +}
    +
    +func init() {
    +	t["AlarmEmailFailedEvent"] = reflect.TypeOf((*AlarmEmailFailedEvent)(nil)).Elem()
    +}
    +
    +type AlarmEvent struct {
    +	Event
    +
    +	Alarm AlarmEventArgument `xml:"alarm"`
    +}
    +
    +func init() {
    +	t["AlarmEvent"] = reflect.TypeOf((*AlarmEvent)(nil)).Elem()
    +}
    +
    +type AlarmEventArgument struct {
    +	EntityEventArgument
    +
    +	Alarm ManagedObjectReference `xml:"alarm"`
    +}
    +
    +func init() {
    +	t["AlarmEventArgument"] = reflect.TypeOf((*AlarmEventArgument)(nil)).Elem()
    +}
    +
    +type AlarmExpression struct {
    +	DynamicData
    +}
    +
    +func init() {
    +	t["AlarmExpression"] = reflect.TypeOf((*AlarmExpression)(nil)).Elem()
    +}
    +
    +type AlarmFilterSpec struct {
    +	DynamicData
    +
    +	Status      []ManagedEntityStatus `xml:"status,omitempty"`
    +	TypeEntity  string                `xml:"typeEntity,omitempty"`
    +	TypeTrigger string                `xml:"typeTrigger,omitempty"`
    +}
    +
    +func init() {
    +	t["AlarmFilterSpec"] = reflect.TypeOf((*AlarmFilterSpec)(nil)).Elem()
    +}
    +
    +type AlarmInfo struct {
    +	AlarmSpec
    +
    +	Key              string                 `xml:"key"`
    +	Alarm            ManagedObjectReference `xml:"alarm"`
    +	Entity           ManagedObjectReference `xml:"entity"`
    +	LastModifiedTime time.Time              `xml:"lastModifiedTime"`
    +	LastModifiedUser string                 `xml:"lastModifiedUser"`
    +	CreationEventId  int32                  `xml:"creationEventId"`
    +}
    +
    +func init() {
    +	t["AlarmInfo"] = reflect.TypeOf((*AlarmInfo)(nil)).Elem()
    +}
    +
    +type AlarmReconfiguredEvent struct {
    +	AlarmEvent
    +
    +	Entity        ManagedEntityEventArgument `xml:"entity"`
    +	ConfigChanges *ChangesInfoEventArgument  `xml:"configChanges,omitempty"`
    +}
    +
    +func init() {
    +	t["AlarmReconfiguredEvent"] = reflect.TypeOf((*AlarmReconfiguredEvent)(nil)).Elem()
    +}
    +
    +type AlarmRemovedEvent struct {
    +	AlarmEvent
    +
    +	Entity ManagedEntityEventArgument `xml:"entity"`
    +}
    +
    +func init() {
    +	t["AlarmRemovedEvent"] = reflect.TypeOf((*AlarmRemovedEvent)(nil)).Elem()
    +}
    +
    +type AlarmScriptCompleteEvent struct {
    +	AlarmEvent
    +
    +	Entity ManagedEntityEventArgument `xml:"entity"`
    +	Script string                     `xml:"script"`
    +}
    +
    +func init() {
    +	t["AlarmScriptCompleteEvent"] = reflect.TypeOf((*AlarmScriptCompleteEvent)(nil)).Elem()
    +}
    +
    +type AlarmScriptFailedEvent struct {
    +	AlarmEvent
    +
    +	Entity ManagedEntityEventArgument `xml:"entity"`
    +	Script string                     `xml:"script"`
    +	Reason LocalizedMethodFault       `xml:"reason"`
    +}
    +
    +func init() {
    +	t["AlarmScriptFailedEvent"] = reflect.TypeOf((*AlarmScriptFailedEvent)(nil)).Elem()
    +}
    +
    +type AlarmSetting struct {
    +	DynamicData
    +
    +	ToleranceRange     int32 `xml:"toleranceRange"`
    +	ReportingFrequency int32 `xml:"reportingFrequency"`
    +}
    +
    +func init() {
    +	t["AlarmSetting"] = reflect.TypeOf((*AlarmSetting)(nil)).Elem()
    +}
    +
    +type AlarmSnmpCompletedEvent struct {
    +	AlarmEvent
    +
    +	Entity ManagedEntityEventArgument `xml:"entity"`
    +}
    +
    +func init() {
    +	t["AlarmSnmpCompletedEvent"] = reflect.TypeOf((*AlarmSnmpCompletedEvent)(nil)).Elem()
    +}
    +
    +type AlarmSnmpFailedEvent struct {
    +	AlarmEvent
    +
    +	Entity ManagedEntityEventArgument `xml:"entity"`
    +	Reason LocalizedMethodFault       `xml:"reason"`
    +}
    +
    +func init() {
    +	t["AlarmSnmpFailedEvent"] = reflect.TypeOf((*AlarmSnmpFailedEvent)(nil)).Elem()
    +}
    +
    +type AlarmSpec struct {
    +	DynamicData
    +
    +	Name            string              `xml:"name"`
    +	SystemName      string              `xml:"systemName,omitempty"`
    +	Description     string              `xml:"description"`
    +	Enabled         bool                `xml:"enabled"`
    +	Expression      BaseAlarmExpression `xml:"expression,typeattr"`
    +	Action          BaseAlarmAction     `xml:"action,omitempty,typeattr"`
    +	ActionFrequency int32               `xml:"actionFrequency,omitempty"`
    +	Setting         *AlarmSetting       `xml:"setting,omitempty"`
    +}
    +
    +func init() {
    +	t["AlarmSpec"] = reflect.TypeOf((*AlarmSpec)(nil)).Elem()
    +}
    +
    +type AlarmState struct {
    +	DynamicData
    +
    +	Key                string                 `xml:"key"`
    +	Entity             ManagedObjectReference `xml:"entity"`
    +	Alarm              ManagedObjectReference `xml:"alarm"`
    +	OverallStatus      ManagedEntityStatus    `xml:"overallStatus"`
    +	Time               time.Time              `xml:"time"`
    +	Acknowledged       *bool                  `xml:"acknowledged"`
    +	AcknowledgedByUser string                 `xml:"acknowledgedByUser,omitempty"`
    +	AcknowledgedTime   *time.Time             `xml:"acknowledgedTime"`
    +	EventKey           int32                  `xml:"eventKey,omitempty"`
    +}
    +
    +func init() {
    +	t["AlarmState"] = reflect.TypeOf((*AlarmState)(nil)).Elem()
    +}
    +
    +type AlarmStatusChangedEvent struct {
    +	AlarmEvent
    +
    +	Source ManagedEntityEventArgument `xml:"source"`
    +	Entity ManagedEntityEventArgument `xml:"entity"`
    +	From   string                     `xml:"from"`
    +	To     string                     `xml:"to"`
    +}
    +
    +func init() {
    +	t["AlarmStatusChangedEvent"] = reflect.TypeOf((*AlarmStatusChangedEvent)(nil)).Elem()
    +}
    +
    +type AlarmTriggeringAction struct {
    +	AlarmAction
    +
    +	Action          BaseAction                            `xml:"action,typeattr"`
    +	TransitionSpecs []AlarmTriggeringActionTransitionSpec `xml:"transitionSpecs,omitempty"`
    +	Green2yellow    bool                                  `xml:"green2yellow"`
    +	Yellow2red      bool                                  `xml:"yellow2red"`
    +	Red2yellow      bool                                  `xml:"red2yellow"`
    +	Yellow2green    bool                                  `xml:"yellow2green"`
    +}
    +
    +func init() {
    +	t["AlarmTriggeringAction"] = reflect.TypeOf((*AlarmTriggeringAction)(nil)).Elem()
    +}
    +
    +type AlarmTriggeringActionTransitionSpec struct {
    +	DynamicData
    +
    +	StartState ManagedEntityStatus `xml:"startState"`
    +	FinalState ManagedEntityStatus `xml:"finalState"`
    +	Repeats    bool                `xml:"repeats"`
    +}
    +
    +func init() {
    +	t["AlarmTriggeringActionTransitionSpec"] = reflect.TypeOf((*AlarmTriggeringActionTransitionSpec)(nil)).Elem()
    +}
    +
    +type AllVirtualMachinesLicensedEvent struct {
    +	LicenseEvent
    +}
    +
    +func init() {
    +	t["AllVirtualMachinesLicensedEvent"] = reflect.TypeOf((*AllVirtualMachinesLicensedEvent)(nil)).Elem()
    +}
    +
    +type AllocateIpv4Address AllocateIpv4AddressRequestType
    +
    +func init() {
    +	t["AllocateIpv4Address"] = reflect.TypeOf((*AllocateIpv4Address)(nil)).Elem()
    +}
    +
    +type AllocateIpv4AddressRequestType struct {
    +	This         ManagedObjectReference `xml:"_this"`
    +	Dc           ManagedObjectReference `xml:"dc"`
    +	PoolId       int32                  `xml:"poolId"`
    +	AllocationId string                 `xml:"allocationId"`
    +}
    +
    +func init() {
    +	t["AllocateIpv4AddressRequestType"] = reflect.TypeOf((*AllocateIpv4AddressRequestType)(nil)).Elem()
    +}
    +
    +type AllocateIpv4AddressResponse struct {
    +	Returnval string `xml:"returnval"`
    +}
    +
    +type AllocateIpv6Address AllocateIpv6AddressRequestType
    +
    +func init() {
    +	t["AllocateIpv6Address"] = reflect.TypeOf((*AllocateIpv6Address)(nil)).Elem()
    +}
    +
    +type AllocateIpv6AddressRequestType struct {
    +	This         ManagedObjectReference `xml:"_this"`
    +	Dc           ManagedObjectReference `xml:"dc"`
    +	PoolId       int32                  `xml:"poolId"`
    +	AllocationId string                 `xml:"allocationId"`
    +}
    +
    +func init() {
    +	t["AllocateIpv6AddressRequestType"] = reflect.TypeOf((*AllocateIpv6AddressRequestType)(nil)).Elem()
    +}
    +
    +type AllocateIpv6AddressResponse struct {
    +	Returnval string `xml:"returnval"`
    +}
    +
    +type AlreadyAuthenticatedSessionEvent struct {
    +	SessionEvent
    +}
    +
    +func init() {
    +	t["AlreadyAuthenticatedSessionEvent"] = reflect.TypeOf((*AlreadyAuthenticatedSessionEvent)(nil)).Elem()
    +}
    +
    +type AlreadyBeingManaged struct {
    +	HostConnectFault
    +
    +	IpAddress string `xml:"ipAddress"`
    +}
    +
    +func init() {
    +	t["AlreadyBeingManaged"] = reflect.TypeOf((*AlreadyBeingManaged)(nil)).Elem()
    +}
    +
    +type AlreadyBeingManagedFault AlreadyBeingManaged
    +
    +func init() {
    +	t["AlreadyBeingManagedFault"] = reflect.TypeOf((*AlreadyBeingManagedFault)(nil)).Elem()
    +}
    +
    +type AlreadyConnected struct {
    +	HostConnectFault
    +
    +	Name string `xml:"name"`
    +}
    +
    +func init() {
    +	t["AlreadyConnected"] = reflect.TypeOf((*AlreadyConnected)(nil)).Elem()
    +}
    +
    +type AlreadyConnectedFault AlreadyConnected
    +
    +func init() {
    +	t["AlreadyConnectedFault"] = reflect.TypeOf((*AlreadyConnectedFault)(nil)).Elem()
    +}
    +
    +type AlreadyExists struct {
    +	VimFault
    +
    +	Name string `xml:"name,omitempty"`
    +}
    +
    +func init() {
    +	t["AlreadyExists"] = reflect.TypeOf((*AlreadyExists)(nil)).Elem()
    +}
    +
    +type AlreadyExistsFault AlreadyExists
    +
    +func init() {
    +	t["AlreadyExistsFault"] = reflect.TypeOf((*AlreadyExistsFault)(nil)).Elem()
    +}
    +
    +type AlreadyUpgraded struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["AlreadyUpgraded"] = reflect.TypeOf((*AlreadyUpgraded)(nil)).Elem()
    +}
    +
    +type AlreadyUpgradedFault AlreadyUpgraded
    +
    +func init() {
    +	t["AlreadyUpgradedFault"] = reflect.TypeOf((*AlreadyUpgradedFault)(nil)).Elem()
    +}
    +
    +type AndAlarmExpression struct {
    +	AlarmExpression
    +
    +	Expression []BaseAlarmExpression `xml:"expression,typeattr"`
    +}
    +
    +func init() {
    +	t["AndAlarmExpression"] = reflect.TypeOf((*AndAlarmExpression)(nil)).Elem()
    +}
    +
    +type AnswerFile struct {
    +	DynamicData
    +
    +	UserInput    []ProfileDeferredPolicyOptionParameter `xml:"userInput,omitempty"`
    +	CreatedTime  time.Time                              `xml:"createdTime"`
    +	ModifiedTime time.Time                              `xml:"modifiedTime"`
    +}
    +
    +func init() {
    +	t["AnswerFile"] = reflect.TypeOf((*AnswerFile)(nil)).Elem()
    +}
    +
    +type AnswerFileCreateSpec struct {
    +	DynamicData
    +
    +	Validating *bool `xml:"validating"`
    +}
    +
    +func init() {
    +	t["AnswerFileCreateSpec"] = reflect.TypeOf((*AnswerFileCreateSpec)(nil)).Elem()
    +}
    +
    +type AnswerFileOptionsCreateSpec struct {
    +	AnswerFileCreateSpec
    +
    +	UserInput []ProfileDeferredPolicyOptionParameter `xml:"userInput,omitempty"`
    +}
    +
    +func init() {
    +	t["AnswerFileOptionsCreateSpec"] = reflect.TypeOf((*AnswerFileOptionsCreateSpec)(nil)).Elem()
    +}
    +
    +type AnswerFileSerializedCreateSpec struct {
    +	AnswerFileCreateSpec
    +
    +	AnswerFileConfigString string `xml:"answerFileConfigString"`
    +}
    +
    +func init() {
    +	t["AnswerFileSerializedCreateSpec"] = reflect.TypeOf((*AnswerFileSerializedCreateSpec)(nil)).Elem()
    +}
    +
    +type AnswerFileStatusError struct {
    +	DynamicData
    +
    +	UserInputPath ProfilePropertyPath `xml:"userInputPath"`
    +	ErrMsg        LocalizableMessage  `xml:"errMsg"`
    +}
    +
    +func init() {
    +	t["AnswerFileStatusError"] = reflect.TypeOf((*AnswerFileStatusError)(nil)).Elem()
    +}
    +
    +type AnswerFileStatusResult struct {
    +	DynamicData
    +
    +	CheckedTime time.Time               `xml:"checkedTime"`
    +	Host        ManagedObjectReference  `xml:"host"`
    +	Status      string                  `xml:"status"`
    +	Error       []AnswerFileStatusError `xml:"error,omitempty"`
    +}
    +
    +func init() {
    +	t["AnswerFileStatusResult"] = reflect.TypeOf((*AnswerFileStatusResult)(nil)).Elem()
    +}
    +
    +type AnswerFileUpdateFailed struct {
    +	VimFault
    +
    +	Failure []AnswerFileUpdateFailure `xml:"failure"`
    +}
    +
    +func init() {
    +	t["AnswerFileUpdateFailed"] = reflect.TypeOf((*AnswerFileUpdateFailed)(nil)).Elem()
    +}
    +
    +type AnswerFileUpdateFailedFault AnswerFileUpdateFailed
    +
    +func init() {
    +	t["AnswerFileUpdateFailedFault"] = reflect.TypeOf((*AnswerFileUpdateFailedFault)(nil)).Elem()
    +}
    +
    +type AnswerFileUpdateFailure struct {
    +	DynamicData
    +
    +	UserInputPath ProfilePropertyPath `xml:"userInputPath"`
    +	ErrMsg        LocalizableMessage  `xml:"errMsg"`
    +}
    +
    +func init() {
    +	t["AnswerFileUpdateFailure"] = reflect.TypeOf((*AnswerFileUpdateFailure)(nil)).Elem()
    +}
    +
    +type AnswerVM AnswerVMRequestType
    +
    +func init() {
    +	t["AnswerVM"] = reflect.TypeOf((*AnswerVM)(nil)).Elem()
    +}
    +
    +type AnswerVMRequestType struct {
    +	This         ManagedObjectReference `xml:"_this"`
    +	QuestionId   string                 `xml:"questionId"`
    +	AnswerChoice string                 `xml:"answerChoice"`
    +}
    +
    +func init() {
    +	t["AnswerVMRequestType"] = reflect.TypeOf((*AnswerVMRequestType)(nil)).Elem()
    +}
    +
    +type AnswerVMResponse struct {
    +}
    +
    +type ApplicationQuiesceFault struct {
    +	SnapshotFault
    +}
    +
    +func init() {
    +	t["ApplicationQuiesceFault"] = reflect.TypeOf((*ApplicationQuiesceFault)(nil)).Elem()
    +}
    +
    +type ApplicationQuiesceFaultFault ApplicationQuiesceFault
    +
    +func init() {
    +	t["ApplicationQuiesceFaultFault"] = reflect.TypeOf((*ApplicationQuiesceFaultFault)(nil)).Elem()
    +}
    +
    +type ApplyEntitiesConfigRequestType struct {
    +	This             ManagedObjectReference              `xml:"_this"`
    +	ApplyConfigSpecs []ApplyHostProfileConfigurationSpec `xml:"applyConfigSpecs,omitempty"`
    +}
    +
    +func init() {
    +	t["ApplyEntitiesConfigRequestType"] = reflect.TypeOf((*ApplyEntitiesConfigRequestType)(nil)).Elem()
    +}
    +
    +type ApplyEntitiesConfig_Task ApplyEntitiesConfigRequestType
    +
    +func init() {
    +	t["ApplyEntitiesConfig_Task"] = reflect.TypeOf((*ApplyEntitiesConfig_Task)(nil)).Elem()
    +}
    +
    +type ApplyEntitiesConfig_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type ApplyEvcModeVMRequestType struct {
    +	This          ManagedObjectReference `xml:"_this"`
    +	Mask          []HostFeatureMask      `xml:"mask,omitempty"`
    +	CompleteMasks *bool                  `xml:"completeMasks"`
    +}
    +
    +func init() {
    +	t["ApplyEvcModeVMRequestType"] = reflect.TypeOf((*ApplyEvcModeVMRequestType)(nil)).Elem()
    +}
    +
    +type ApplyEvcModeVM_Task ApplyEvcModeVMRequestType
    +
    +func init() {
    +	t["ApplyEvcModeVM_Task"] = reflect.TypeOf((*ApplyEvcModeVM_Task)(nil)).Elem()
    +}
    +
    +type ApplyEvcModeVM_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type ApplyHostConfigRequestType struct {
    +	This       ManagedObjectReference                 `xml:"_this"`
    +	Host       ManagedObjectReference                 `xml:"host"`
    +	ConfigSpec HostConfigSpec                         `xml:"configSpec"`
    +	UserInput  []ProfileDeferredPolicyOptionParameter `xml:"userInput,omitempty"`
    +}
    +
    +func init() {
    +	t["ApplyHostConfigRequestType"] = reflect.TypeOf((*ApplyHostConfigRequestType)(nil)).Elem()
    +}
    +
    +type ApplyHostConfig_Task ApplyHostConfigRequestType
    +
    +func init() {
    +	t["ApplyHostConfig_Task"] = reflect.TypeOf((*ApplyHostConfig_Task)(nil)).Elem()
    +}
    +
    +type ApplyHostConfig_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type ApplyHostProfileConfigurationResult struct {
    +	DynamicData
    +
    +	StartTime    time.Time              `xml:"startTime"`
    +	CompleteTime time.Time              `xml:"completeTime"`
    +	Host         ManagedObjectReference `xml:"host"`
    +	Status       string                 `xml:"status"`
    +	Errors       []LocalizedMethodFault `xml:"errors,omitempty"`
    +}
    +
    +func init() {
    +	t["ApplyHostProfileConfigurationResult"] = reflect.TypeOf((*ApplyHostProfileConfigurationResult)(nil)).Elem()
    +}
    +
    +type ApplyHostProfileConfigurationSpec struct {
    +	ProfileExecuteResult
    +
    +	Host                ManagedObjectReference `xml:"host"`
    +	TaskListRequirement []string               `xml:"taskListRequirement,omitempty"`
    +	TaskDescription     []LocalizableMessage   `xml:"taskDescription,omitempty"`
    +	RebootStateless     *bool                  `xml:"rebootStateless"`
    +	RebootHost          *bool                  `xml:"rebootHost"`
    +	FaultData           *LocalizedMethodFault  `xml:"faultData,omitempty"`
    +}
    +
    +func init() {
    +	t["ApplyHostProfileConfigurationSpec"] = reflect.TypeOf((*ApplyHostProfileConfigurationSpec)(nil)).Elem()
    +}
    +
    +type ApplyProfile struct {
    +	DynamicData
    +
    +	Enabled          bool                          `xml:"enabled"`
    +	Policy           []ProfilePolicy               `xml:"policy,omitempty"`
    +	ProfileTypeName  string                        `xml:"profileTypeName,omitempty"`
    +	ProfileVersion   string                        `xml:"profileVersion,omitempty"`
    +	Property         []ProfileApplyProfileProperty `xml:"property,omitempty"`
    +	Favorite         *bool                         `xml:"favorite"`
    +	ToBeMerged       *bool                         `xml:"toBeMerged"`
    +	ToReplaceWith    *bool                         `xml:"toReplaceWith"`
    +	ToBeDeleted      *bool                         `xml:"toBeDeleted"`
    +	CopyEnableStatus *bool                         `xml:"copyEnableStatus"`
    +	Hidden           *bool                         `xml:"hidden"`
    +}
    +
    +func init() {
    +	t["ApplyProfile"] = reflect.TypeOf((*ApplyProfile)(nil)).Elem()
    +}
    +
    +type ApplyRecommendation ApplyRecommendationRequestType
    +
    +func init() {
    +	t["ApplyRecommendation"] = reflect.TypeOf((*ApplyRecommendation)(nil)).Elem()
    +}
    +
    +type ApplyRecommendationRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Key  string                 `xml:"key"`
    +}
    +
    +func init() {
    +	t["ApplyRecommendationRequestType"] = reflect.TypeOf((*ApplyRecommendationRequestType)(nil)).Elem()
    +}
    +
    +type ApplyRecommendationResponse struct {
    +}
    +
    +type ApplyStorageDrsRecommendationRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Key  []string               `xml:"key"`
    +}
    +
    +func init() {
    +	t["ApplyStorageDrsRecommendationRequestType"] = reflect.TypeOf((*ApplyStorageDrsRecommendationRequestType)(nil)).Elem()
    +}
    +
    +type ApplyStorageDrsRecommendationToPodRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Pod  ManagedObjectReference `xml:"pod"`
    +	Key  string                 `xml:"key"`
    +}
    +
    +func init() {
    +	t["ApplyStorageDrsRecommendationToPodRequestType"] = reflect.TypeOf((*ApplyStorageDrsRecommendationToPodRequestType)(nil)).Elem()
    +}
    +
    +type ApplyStorageDrsRecommendationToPod_Task ApplyStorageDrsRecommendationToPodRequestType
    +
    +func init() {
    +	t["ApplyStorageDrsRecommendationToPod_Task"] = reflect.TypeOf((*ApplyStorageDrsRecommendationToPod_Task)(nil)).Elem()
    +}
    +
    +type ApplyStorageDrsRecommendationToPod_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type ApplyStorageDrsRecommendation_Task ApplyStorageDrsRecommendationRequestType
    +
    +func init() {
    +	t["ApplyStorageDrsRecommendation_Task"] = reflect.TypeOf((*ApplyStorageDrsRecommendation_Task)(nil)).Elem()
    +}
    +
    +type ApplyStorageDrsRecommendation_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type ApplyStorageRecommendationResult struct {
    +	DynamicData
    +
    +	Vm *ManagedObjectReference `xml:"vm,omitempty"`
    +}
    +
    +func init() {
    +	t["ApplyStorageRecommendationResult"] = reflect.TypeOf((*ApplyStorageRecommendationResult)(nil)).Elem()
    +}
    +
    +type AreAlarmActionsEnabled AreAlarmActionsEnabledRequestType
    +
    +func init() {
    +	t["AreAlarmActionsEnabled"] = reflect.TypeOf((*AreAlarmActionsEnabled)(nil)).Elem()
    +}
    +
    +type AreAlarmActionsEnabledRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	Entity ManagedObjectReference `xml:"entity"`
    +}
    +
    +func init() {
    +	t["AreAlarmActionsEnabledRequestType"] = reflect.TypeOf((*AreAlarmActionsEnabledRequestType)(nil)).Elem()
    +}
    +
    +type AreAlarmActionsEnabledResponse struct {
    +	Returnval bool `xml:"returnval"`
    +}
    +
    +type ArrayOfAlarmAction struct {
    +	AlarmAction []BaseAlarmAction `xml:"AlarmAction,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfAlarmAction"] = reflect.TypeOf((*ArrayOfAlarmAction)(nil)).Elem()
    +}
    +
    +type ArrayOfAlarmExpression struct {
    +	AlarmExpression []BaseAlarmExpression `xml:"AlarmExpression,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfAlarmExpression"] = reflect.TypeOf((*ArrayOfAlarmExpression)(nil)).Elem()
    +}
    +
    +type ArrayOfAlarmState struct {
    +	AlarmState []AlarmState `xml:"AlarmState,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfAlarmState"] = reflect.TypeOf((*ArrayOfAlarmState)(nil)).Elem()
    +}
    +
    +type ArrayOfAlarmTriggeringActionTransitionSpec struct {
    +	AlarmTriggeringActionTransitionSpec []AlarmTriggeringActionTransitionSpec `xml:"AlarmTriggeringActionTransitionSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfAlarmTriggeringActionTransitionSpec"] = reflect.TypeOf((*ArrayOfAlarmTriggeringActionTransitionSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfAnswerFileStatusError struct {
    +	AnswerFileStatusError []AnswerFileStatusError `xml:"AnswerFileStatusError,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfAnswerFileStatusError"] = reflect.TypeOf((*ArrayOfAnswerFileStatusError)(nil)).Elem()
    +}
    +
    +type ArrayOfAnswerFileStatusResult struct {
    +	AnswerFileStatusResult []AnswerFileStatusResult `xml:"AnswerFileStatusResult,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfAnswerFileStatusResult"] = reflect.TypeOf((*ArrayOfAnswerFileStatusResult)(nil)).Elem()
    +}
    +
    +type ArrayOfAnswerFileUpdateFailure struct {
    +	AnswerFileUpdateFailure []AnswerFileUpdateFailure `xml:"AnswerFileUpdateFailure,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfAnswerFileUpdateFailure"] = reflect.TypeOf((*ArrayOfAnswerFileUpdateFailure)(nil)).Elem()
    +}
    +
    +type ArrayOfAnyType struct {
    +	AnyType []AnyType `xml:"anyType,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfAnyType"] = reflect.TypeOf((*ArrayOfAnyType)(nil)).Elem()
    +}
    +
    +type ArrayOfAnyURI struct {
    +	AnyURI []string `xml:"anyURI,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfAnyURI"] = reflect.TypeOf((*ArrayOfAnyURI)(nil)).Elem()
    +}
    +
    +type ArrayOfApplyHostProfileConfigurationResult struct {
    +	ApplyHostProfileConfigurationResult []ApplyHostProfileConfigurationResult `xml:"ApplyHostProfileConfigurationResult,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfApplyHostProfileConfigurationResult"] = reflect.TypeOf((*ArrayOfApplyHostProfileConfigurationResult)(nil)).Elem()
    +}
    +
    +type ArrayOfApplyHostProfileConfigurationSpec struct {
    +	ApplyHostProfileConfigurationSpec []ApplyHostProfileConfigurationSpec `xml:"ApplyHostProfileConfigurationSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfApplyHostProfileConfigurationSpec"] = reflect.TypeOf((*ArrayOfApplyHostProfileConfigurationSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfApplyProfile struct {
    +	ApplyProfile []BaseApplyProfile `xml:"ApplyProfile,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfApplyProfile"] = reflect.TypeOf((*ArrayOfApplyProfile)(nil)).Elem()
    +}
    +
    +type ArrayOfAuthorizationPrivilege struct {
    +	AuthorizationPrivilege []AuthorizationPrivilege `xml:"AuthorizationPrivilege,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfAuthorizationPrivilege"] = reflect.TypeOf((*ArrayOfAuthorizationPrivilege)(nil)).Elem()
    +}
    +
    +type ArrayOfAuthorizationRole struct {
    +	AuthorizationRole []AuthorizationRole `xml:"AuthorizationRole,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfAuthorizationRole"] = reflect.TypeOf((*ArrayOfAuthorizationRole)(nil)).Elem()
    +}
    +
    +type ArrayOfAutoStartPowerInfo struct {
    +	AutoStartPowerInfo []AutoStartPowerInfo `xml:"AutoStartPowerInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfAutoStartPowerInfo"] = reflect.TypeOf((*ArrayOfAutoStartPowerInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfBase64Binary struct {
    +	Base64Binary [][]byte `xml:"base64Binary,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfBase64Binary"] = reflect.TypeOf((*ArrayOfBase64Binary)(nil)).Elem()
    +}
    +
    +type ArrayOfBoolean struct {
    +	Boolean []bool `xml:"boolean,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfBoolean"] = reflect.TypeOf((*ArrayOfBoolean)(nil)).Elem()
    +}
    +
    +type ArrayOfByte struct {
    +	Byte []byte `xml:"byte,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfByte"] = reflect.TypeOf((*ArrayOfByte)(nil)).Elem()
    +}
    +
    +type ArrayOfChangesInfoEventArgument struct {
    +	ChangesInfoEventArgument []ChangesInfoEventArgument `xml:"ChangesInfoEventArgument,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfChangesInfoEventArgument"] = reflect.TypeOf((*ArrayOfChangesInfoEventArgument)(nil)).Elem()
    +}
    +
    +type ArrayOfCheckResult struct {
    +	CheckResult []CheckResult `xml:"CheckResult,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfCheckResult"] = reflect.TypeOf((*ArrayOfCheckResult)(nil)).Elem()
    +}
    +
    +type ArrayOfClusterAction struct {
    +	ClusterAction []BaseClusterAction `xml:"ClusterAction,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfClusterAction"] = reflect.TypeOf((*ArrayOfClusterAction)(nil)).Elem()
    +}
    +
    +type ArrayOfClusterActionHistory struct {
    +	ClusterActionHistory []ClusterActionHistory `xml:"ClusterActionHistory,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfClusterActionHistory"] = reflect.TypeOf((*ArrayOfClusterActionHistory)(nil)).Elem()
    +}
    +
    +type ArrayOfClusterAttemptedVmInfo struct {
    +	ClusterAttemptedVmInfo []ClusterAttemptedVmInfo `xml:"ClusterAttemptedVmInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfClusterAttemptedVmInfo"] = reflect.TypeOf((*ArrayOfClusterAttemptedVmInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfClusterDasAamNodeState struct {
    +	ClusterDasAamNodeState []ClusterDasAamNodeState `xml:"ClusterDasAamNodeState,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfClusterDasAamNodeState"] = reflect.TypeOf((*ArrayOfClusterDasAamNodeState)(nil)).Elem()
    +}
    +
    +type ArrayOfClusterDasFailoverLevelAdvancedRuntimeInfoHostSlots struct {
    +	ClusterDasFailoverLevelAdvancedRuntimeInfoHostSlots []ClusterDasFailoverLevelAdvancedRuntimeInfoHostSlots `xml:"ClusterDasFailoverLevelAdvancedRuntimeInfoHostSlots,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfClusterDasFailoverLevelAdvancedRuntimeInfoHostSlots"] = reflect.TypeOf((*ArrayOfClusterDasFailoverLevelAdvancedRuntimeInfoHostSlots)(nil)).Elem()
    +}
    +
    +type ArrayOfClusterDasFailoverLevelAdvancedRuntimeInfoVmSlots struct {
    +	ClusterDasFailoverLevelAdvancedRuntimeInfoVmSlots []ClusterDasFailoverLevelAdvancedRuntimeInfoVmSlots `xml:"ClusterDasFailoverLevelAdvancedRuntimeInfoVmSlots,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfClusterDasFailoverLevelAdvancedRuntimeInfoVmSlots"] = reflect.TypeOf((*ArrayOfClusterDasFailoverLevelAdvancedRuntimeInfoVmSlots)(nil)).Elem()
    +}
    +
    +type ArrayOfClusterDasVmConfigInfo struct {
    +	ClusterDasVmConfigInfo []ClusterDasVmConfigInfo `xml:"ClusterDasVmConfigInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfClusterDasVmConfigInfo"] = reflect.TypeOf((*ArrayOfClusterDasVmConfigInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfClusterDasVmConfigSpec struct {
    +	ClusterDasVmConfigSpec []ClusterDasVmConfigSpec `xml:"ClusterDasVmConfigSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfClusterDasVmConfigSpec"] = reflect.TypeOf((*ArrayOfClusterDasVmConfigSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfClusterDpmHostConfigInfo struct {
    +	ClusterDpmHostConfigInfo []ClusterDpmHostConfigInfo `xml:"ClusterDpmHostConfigInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfClusterDpmHostConfigInfo"] = reflect.TypeOf((*ArrayOfClusterDpmHostConfigInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfClusterDpmHostConfigSpec struct {
    +	ClusterDpmHostConfigSpec []ClusterDpmHostConfigSpec `xml:"ClusterDpmHostConfigSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfClusterDpmHostConfigSpec"] = reflect.TypeOf((*ArrayOfClusterDpmHostConfigSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfClusterDrsFaults struct {
    +	ClusterDrsFaults []ClusterDrsFaults `xml:"ClusterDrsFaults,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfClusterDrsFaults"] = reflect.TypeOf((*ArrayOfClusterDrsFaults)(nil)).Elem()
    +}
    +
    +type ArrayOfClusterDrsFaultsFaultsByVm struct {
    +	ClusterDrsFaultsFaultsByVm []BaseClusterDrsFaultsFaultsByVm `xml:"ClusterDrsFaultsFaultsByVm,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfClusterDrsFaultsFaultsByVm"] = reflect.TypeOf((*ArrayOfClusterDrsFaultsFaultsByVm)(nil)).Elem()
    +}
    +
    +type ArrayOfClusterDrsMigration struct {
    +	ClusterDrsMigration []ClusterDrsMigration `xml:"ClusterDrsMigration,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfClusterDrsMigration"] = reflect.TypeOf((*ArrayOfClusterDrsMigration)(nil)).Elem()
    +}
    +
    +type ArrayOfClusterDrsRecommendation struct {
    +	ClusterDrsRecommendation []ClusterDrsRecommendation `xml:"ClusterDrsRecommendation,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfClusterDrsRecommendation"] = reflect.TypeOf((*ArrayOfClusterDrsRecommendation)(nil)).Elem()
    +}
    +
    +type ArrayOfClusterDrsVmConfigInfo struct {
    +	ClusterDrsVmConfigInfo []ClusterDrsVmConfigInfo `xml:"ClusterDrsVmConfigInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfClusterDrsVmConfigInfo"] = reflect.TypeOf((*ArrayOfClusterDrsVmConfigInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfClusterDrsVmConfigSpec struct {
    +	ClusterDrsVmConfigSpec []ClusterDrsVmConfigSpec `xml:"ClusterDrsVmConfigSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfClusterDrsVmConfigSpec"] = reflect.TypeOf((*ArrayOfClusterDrsVmConfigSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfClusterEVCManagerCheckResult struct {
    +	ClusterEVCManagerCheckResult []ClusterEVCManagerCheckResult `xml:"ClusterEVCManagerCheckResult,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfClusterEVCManagerCheckResult"] = reflect.TypeOf((*ArrayOfClusterEVCManagerCheckResult)(nil)).Elem()
    +}
    +
    +type ArrayOfClusterFailoverHostAdmissionControlInfoHostStatus struct {
    +	ClusterFailoverHostAdmissionControlInfoHostStatus []ClusterFailoverHostAdmissionControlInfoHostStatus `xml:"ClusterFailoverHostAdmissionControlInfoHostStatus,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfClusterFailoverHostAdmissionControlInfoHostStatus"] = reflect.TypeOf((*ArrayOfClusterFailoverHostAdmissionControlInfoHostStatus)(nil)).Elem()
    +}
    +
    +type ArrayOfClusterGroupInfo struct {
    +	ClusterGroupInfo []BaseClusterGroupInfo `xml:"ClusterGroupInfo,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfClusterGroupInfo"] = reflect.TypeOf((*ArrayOfClusterGroupInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfClusterGroupSpec struct {
    +	ClusterGroupSpec []ClusterGroupSpec `xml:"ClusterGroupSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfClusterGroupSpec"] = reflect.TypeOf((*ArrayOfClusterGroupSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfClusterHostRecommendation struct {
    +	ClusterHostRecommendation []ClusterHostRecommendation `xml:"ClusterHostRecommendation,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfClusterHostRecommendation"] = reflect.TypeOf((*ArrayOfClusterHostRecommendation)(nil)).Elem()
    +}
    +
    +type ArrayOfClusterIoFilterInfo struct {
    +	ClusterIoFilterInfo []ClusterIoFilterInfo `xml:"ClusterIoFilterInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfClusterIoFilterInfo"] = reflect.TypeOf((*ArrayOfClusterIoFilterInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfClusterNotAttemptedVmInfo struct {
    +	ClusterNotAttemptedVmInfo []ClusterNotAttemptedVmInfo `xml:"ClusterNotAttemptedVmInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfClusterNotAttemptedVmInfo"] = reflect.TypeOf((*ArrayOfClusterNotAttemptedVmInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfClusterRecommendation struct {
    +	ClusterRecommendation []ClusterRecommendation `xml:"ClusterRecommendation,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfClusterRecommendation"] = reflect.TypeOf((*ArrayOfClusterRecommendation)(nil)).Elem()
    +}
    +
    +type ArrayOfClusterRuleInfo struct {
    +	ClusterRuleInfo []BaseClusterRuleInfo `xml:"ClusterRuleInfo,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfClusterRuleInfo"] = reflect.TypeOf((*ArrayOfClusterRuleInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfClusterRuleSpec struct {
    +	ClusterRuleSpec []ClusterRuleSpec `xml:"ClusterRuleSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfClusterRuleSpec"] = reflect.TypeOf((*ArrayOfClusterRuleSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfClusterVmOrchestrationInfo struct {
    +	ClusterVmOrchestrationInfo []ClusterVmOrchestrationInfo `xml:"ClusterVmOrchestrationInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfClusterVmOrchestrationInfo"] = reflect.TypeOf((*ArrayOfClusterVmOrchestrationInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfClusterVmOrchestrationSpec struct {
    +	ClusterVmOrchestrationSpec []ClusterVmOrchestrationSpec `xml:"ClusterVmOrchestrationSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfClusterVmOrchestrationSpec"] = reflect.TypeOf((*ArrayOfClusterVmOrchestrationSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfComplianceFailure struct {
    +	ComplianceFailure []ComplianceFailure `xml:"ComplianceFailure,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfComplianceFailure"] = reflect.TypeOf((*ArrayOfComplianceFailure)(nil)).Elem()
    +}
    +
    +type ArrayOfComplianceFailureComplianceFailureValues struct {
    +	ComplianceFailureComplianceFailureValues []ComplianceFailureComplianceFailureValues `xml:"ComplianceFailureComplianceFailureValues,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfComplianceFailureComplianceFailureValues"] = reflect.TypeOf((*ArrayOfComplianceFailureComplianceFailureValues)(nil)).Elem()
    +}
    +
    +type ArrayOfComplianceLocator struct {
    +	ComplianceLocator []ComplianceLocator `xml:"ComplianceLocator,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfComplianceLocator"] = reflect.TypeOf((*ArrayOfComplianceLocator)(nil)).Elem()
    +}
    +
    +type ArrayOfComplianceResult struct {
    +	ComplianceResult []ComplianceResult `xml:"ComplianceResult,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfComplianceResult"] = reflect.TypeOf((*ArrayOfComplianceResult)(nil)).Elem()
    +}
    +
    +type ArrayOfComputeResourceHostSPBMLicenseInfo struct {
    +	ComputeResourceHostSPBMLicenseInfo []ComputeResourceHostSPBMLicenseInfo `xml:"ComputeResourceHostSPBMLicenseInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfComputeResourceHostSPBMLicenseInfo"] = reflect.TypeOf((*ArrayOfComputeResourceHostSPBMLicenseInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfConflictingConfigurationConfig struct {
    +	ConflictingConfigurationConfig []ConflictingConfigurationConfig `xml:"ConflictingConfigurationConfig,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfConflictingConfigurationConfig"] = reflect.TypeOf((*ArrayOfConflictingConfigurationConfig)(nil)).Elem()
    +}
    +
    +type ArrayOfCryptoKeyId struct {
    +	CryptoKeyId []CryptoKeyId `xml:"CryptoKeyId,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfCryptoKeyId"] = reflect.TypeOf((*ArrayOfCryptoKeyId)(nil)).Elem()
    +}
    +
    +type ArrayOfCryptoKeyPlain struct {
    +	CryptoKeyPlain []CryptoKeyPlain `xml:"CryptoKeyPlain,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfCryptoKeyPlain"] = reflect.TypeOf((*ArrayOfCryptoKeyPlain)(nil)).Elem()
    +}
    +
    +type ArrayOfCryptoKeyResult struct {
    +	CryptoKeyResult []CryptoKeyResult `xml:"CryptoKeyResult,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfCryptoKeyResult"] = reflect.TypeOf((*ArrayOfCryptoKeyResult)(nil)).Elem()
    +}
    +
    +type ArrayOfCryptoManagerKmipClusterStatus struct {
    +	CryptoManagerKmipClusterStatus []CryptoManagerKmipClusterStatus `xml:"CryptoManagerKmipClusterStatus,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfCryptoManagerKmipClusterStatus"] = reflect.TypeOf((*ArrayOfCryptoManagerKmipClusterStatus)(nil)).Elem()
    +}
    +
    +type ArrayOfCryptoManagerKmipServerStatus struct {
    +	CryptoManagerKmipServerStatus []CryptoManagerKmipServerStatus `xml:"CryptoManagerKmipServerStatus,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfCryptoManagerKmipServerStatus"] = reflect.TypeOf((*ArrayOfCryptoManagerKmipServerStatus)(nil)).Elem()
    +}
    +
    +type ArrayOfCustomFieldDef struct {
    +	CustomFieldDef []CustomFieldDef `xml:"CustomFieldDef,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfCustomFieldDef"] = reflect.TypeOf((*ArrayOfCustomFieldDef)(nil)).Elem()
    +}
    +
    +type ArrayOfCustomFieldValue struct {
    +	CustomFieldValue []BaseCustomFieldValue `xml:"CustomFieldValue,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfCustomFieldValue"] = reflect.TypeOf((*ArrayOfCustomFieldValue)(nil)).Elem()
    +}
    +
    +type ArrayOfCustomizationAdapterMapping struct {
    +	CustomizationAdapterMapping []CustomizationAdapterMapping `xml:"CustomizationAdapterMapping,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfCustomizationAdapterMapping"] = reflect.TypeOf((*ArrayOfCustomizationAdapterMapping)(nil)).Elem()
    +}
    +
    +type ArrayOfCustomizationIpV6Generator struct {
    +	CustomizationIpV6Generator []BaseCustomizationIpV6Generator `xml:"CustomizationIpV6Generator,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfCustomizationIpV6Generator"] = reflect.TypeOf((*ArrayOfCustomizationIpV6Generator)(nil)).Elem()
    +}
    +
    +type ArrayOfCustomizationSpecInfo struct {
    +	CustomizationSpecInfo []CustomizationSpecInfo `xml:"CustomizationSpecInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfCustomizationSpecInfo"] = reflect.TypeOf((*ArrayOfCustomizationSpecInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfDVPortConfigSpec struct {
    +	DVPortConfigSpec []DVPortConfigSpec `xml:"DVPortConfigSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfDVPortConfigSpec"] = reflect.TypeOf((*ArrayOfDVPortConfigSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfDVPortgroupConfigSpec struct {
    +	DVPortgroupConfigSpec []DVPortgroupConfigSpec `xml:"DVPortgroupConfigSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfDVPortgroupConfigSpec"] = reflect.TypeOf((*ArrayOfDVPortgroupConfigSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfDVSHealthCheckConfig struct {
    +	DVSHealthCheckConfig []BaseDVSHealthCheckConfig `xml:"DVSHealthCheckConfig,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfDVSHealthCheckConfig"] = reflect.TypeOf((*ArrayOfDVSHealthCheckConfig)(nil)).Elem()
    +}
    +
    +type ArrayOfDVSNetworkResourcePool struct {
    +	DVSNetworkResourcePool []DVSNetworkResourcePool `xml:"DVSNetworkResourcePool,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfDVSNetworkResourcePool"] = reflect.TypeOf((*ArrayOfDVSNetworkResourcePool)(nil)).Elem()
    +}
    +
    +type ArrayOfDVSNetworkResourcePoolConfigSpec struct {
    +	DVSNetworkResourcePoolConfigSpec []DVSNetworkResourcePoolConfigSpec `xml:"DVSNetworkResourcePoolConfigSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfDVSNetworkResourcePoolConfigSpec"] = reflect.TypeOf((*ArrayOfDVSNetworkResourcePoolConfigSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfDVSVmVnicNetworkResourcePool struct {
    +	DVSVmVnicNetworkResourcePool []DVSVmVnicNetworkResourcePool `xml:"DVSVmVnicNetworkResourcePool,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfDVSVmVnicNetworkResourcePool"] = reflect.TypeOf((*ArrayOfDVSVmVnicNetworkResourcePool)(nil)).Elem()
    +}
    +
    +type ArrayOfDasHeartbeatDatastoreInfo struct {
    +	DasHeartbeatDatastoreInfo []DasHeartbeatDatastoreInfo `xml:"DasHeartbeatDatastoreInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfDasHeartbeatDatastoreInfo"] = reflect.TypeOf((*ArrayOfDasHeartbeatDatastoreInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfDatacenterMismatchArgument struct {
    +	DatacenterMismatchArgument []DatacenterMismatchArgument `xml:"DatacenterMismatchArgument,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfDatacenterMismatchArgument"] = reflect.TypeOf((*ArrayOfDatacenterMismatchArgument)(nil)).Elem()
    +}
    +
    +type ArrayOfDatastoreHostMount struct {
    +	DatastoreHostMount []DatastoreHostMount `xml:"DatastoreHostMount,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfDatastoreHostMount"] = reflect.TypeOf((*ArrayOfDatastoreHostMount)(nil)).Elem()
    +}
    +
    +type ArrayOfDatastoreMountPathDatastorePair struct {
    +	DatastoreMountPathDatastorePair []DatastoreMountPathDatastorePair `xml:"DatastoreMountPathDatastorePair,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfDatastoreMountPathDatastorePair"] = reflect.TypeOf((*ArrayOfDatastoreMountPathDatastorePair)(nil)).Elem()
    +}
    +
    +type ArrayOfDatastoreVVolContainerFailoverPair struct {
    +	DatastoreVVolContainerFailoverPair []DatastoreVVolContainerFailoverPair `xml:"DatastoreVVolContainerFailoverPair,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfDatastoreVVolContainerFailoverPair"] = reflect.TypeOf((*ArrayOfDatastoreVVolContainerFailoverPair)(nil)).Elem()
    +}
    +
    +type ArrayOfDiagnosticManagerBundleInfo struct {
    +	DiagnosticManagerBundleInfo []DiagnosticManagerBundleInfo `xml:"DiagnosticManagerBundleInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfDiagnosticManagerBundleInfo"] = reflect.TypeOf((*ArrayOfDiagnosticManagerBundleInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfDiagnosticManagerLogDescriptor struct {
    +	DiagnosticManagerLogDescriptor []DiagnosticManagerLogDescriptor `xml:"DiagnosticManagerLogDescriptor,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfDiagnosticManagerLogDescriptor"] = reflect.TypeOf((*ArrayOfDiagnosticManagerLogDescriptor)(nil)).Elem()
    +}
    +
    +type ArrayOfDiskChangeExtent struct {
    +	DiskChangeExtent []DiskChangeExtent `xml:"DiskChangeExtent,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfDiskChangeExtent"] = reflect.TypeOf((*ArrayOfDiskChangeExtent)(nil)).Elem()
    +}
    +
    +type ArrayOfDistributedVirtualPort struct {
    +	DistributedVirtualPort []DistributedVirtualPort `xml:"DistributedVirtualPort,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfDistributedVirtualPort"] = reflect.TypeOf((*ArrayOfDistributedVirtualPort)(nil)).Elem()
    +}
    +
    +type ArrayOfDistributedVirtualPortgroupInfo struct {
    +	DistributedVirtualPortgroupInfo []DistributedVirtualPortgroupInfo `xml:"DistributedVirtualPortgroupInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfDistributedVirtualPortgroupInfo"] = reflect.TypeOf((*ArrayOfDistributedVirtualPortgroupInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfDistributedVirtualSwitchHostMember struct {
    +	DistributedVirtualSwitchHostMember []DistributedVirtualSwitchHostMember `xml:"DistributedVirtualSwitchHostMember,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfDistributedVirtualSwitchHostMember"] = reflect.TypeOf((*ArrayOfDistributedVirtualSwitchHostMember)(nil)).Elem()
    +}
    +
    +type ArrayOfDistributedVirtualSwitchHostMemberConfigSpec struct {
    +	DistributedVirtualSwitchHostMemberConfigSpec []DistributedVirtualSwitchHostMemberConfigSpec `xml:"DistributedVirtualSwitchHostMemberConfigSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfDistributedVirtualSwitchHostMemberConfigSpec"] = reflect.TypeOf((*ArrayOfDistributedVirtualSwitchHostMemberConfigSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfDistributedVirtualSwitchHostMemberPnicSpec struct {
    +	DistributedVirtualSwitchHostMemberPnicSpec []DistributedVirtualSwitchHostMemberPnicSpec `xml:"DistributedVirtualSwitchHostMemberPnicSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfDistributedVirtualSwitchHostMemberPnicSpec"] = reflect.TypeOf((*ArrayOfDistributedVirtualSwitchHostMemberPnicSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfDistributedVirtualSwitchHostProductSpec struct {
    +	DistributedVirtualSwitchHostProductSpec []DistributedVirtualSwitchHostProductSpec `xml:"DistributedVirtualSwitchHostProductSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfDistributedVirtualSwitchHostProductSpec"] = reflect.TypeOf((*ArrayOfDistributedVirtualSwitchHostProductSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfDistributedVirtualSwitchInfo struct {
    +	DistributedVirtualSwitchInfo []DistributedVirtualSwitchInfo `xml:"DistributedVirtualSwitchInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfDistributedVirtualSwitchInfo"] = reflect.TypeOf((*ArrayOfDistributedVirtualSwitchInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfDistributedVirtualSwitchKeyedOpaqueBlob struct {
    +	DistributedVirtualSwitchKeyedOpaqueBlob []DistributedVirtualSwitchKeyedOpaqueBlob `xml:"DistributedVirtualSwitchKeyedOpaqueBlob,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfDistributedVirtualSwitchKeyedOpaqueBlob"] = reflect.TypeOf((*ArrayOfDistributedVirtualSwitchKeyedOpaqueBlob)(nil)).Elem()
    +}
    +
    +type ArrayOfDistributedVirtualSwitchManagerCompatibilityResult struct {
    +	DistributedVirtualSwitchManagerCompatibilityResult []DistributedVirtualSwitchManagerCompatibilityResult `xml:"DistributedVirtualSwitchManagerCompatibilityResult,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfDistributedVirtualSwitchManagerCompatibilityResult"] = reflect.TypeOf((*ArrayOfDistributedVirtualSwitchManagerCompatibilityResult)(nil)).Elem()
    +}
    +
    +type ArrayOfDistributedVirtualSwitchManagerHostDvsFilterSpec struct {
    +	DistributedVirtualSwitchManagerHostDvsFilterSpec []BaseDistributedVirtualSwitchManagerHostDvsFilterSpec `xml:"DistributedVirtualSwitchManagerHostDvsFilterSpec,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfDistributedVirtualSwitchManagerHostDvsFilterSpec"] = reflect.TypeOf((*ArrayOfDistributedVirtualSwitchManagerHostDvsFilterSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfDistributedVirtualSwitchProductSpec struct {
    +	DistributedVirtualSwitchProductSpec []DistributedVirtualSwitchProductSpec `xml:"DistributedVirtualSwitchProductSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfDistributedVirtualSwitchProductSpec"] = reflect.TypeOf((*ArrayOfDistributedVirtualSwitchProductSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfDouble struct {
    +	Double []float64 `xml:"double,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfDouble"] = reflect.TypeOf((*ArrayOfDouble)(nil)).Elem()
    +}
    +
    +type ArrayOfDvsApplyOperationFaultFaultOnObject struct {
    +	DvsApplyOperationFaultFaultOnObject []DvsApplyOperationFaultFaultOnObject `xml:"DvsApplyOperationFaultFaultOnObject,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfDvsApplyOperationFaultFaultOnObject"] = reflect.TypeOf((*ArrayOfDvsApplyOperationFaultFaultOnObject)(nil)).Elem()
    +}
    +
    +type ArrayOfDvsFilterConfig struct {
    +	DvsFilterConfig []BaseDvsFilterConfig `xml:"DvsFilterConfig,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfDvsFilterConfig"] = reflect.TypeOf((*ArrayOfDvsFilterConfig)(nil)).Elem()
    +}
    +
    +type ArrayOfDvsHostInfrastructureTrafficResource struct {
    +	DvsHostInfrastructureTrafficResource []DvsHostInfrastructureTrafficResource `xml:"DvsHostInfrastructureTrafficResource,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfDvsHostInfrastructureTrafficResource"] = reflect.TypeOf((*ArrayOfDvsHostInfrastructureTrafficResource)(nil)).Elem()
    +}
    +
    +type ArrayOfDvsHostVNicProfile struct {
    +	DvsHostVNicProfile []DvsHostVNicProfile `xml:"DvsHostVNicProfile,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfDvsHostVNicProfile"] = reflect.TypeOf((*ArrayOfDvsHostVNicProfile)(nil)).Elem()
    +}
    +
    +type ArrayOfDvsNetworkRuleQualifier struct {
    +	DvsNetworkRuleQualifier []BaseDvsNetworkRuleQualifier `xml:"DvsNetworkRuleQualifier,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfDvsNetworkRuleQualifier"] = reflect.TypeOf((*ArrayOfDvsNetworkRuleQualifier)(nil)).Elem()
    +}
    +
    +type ArrayOfDvsOperationBulkFaultFaultOnHost struct {
    +	DvsOperationBulkFaultFaultOnHost []DvsOperationBulkFaultFaultOnHost `xml:"DvsOperationBulkFaultFaultOnHost,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfDvsOperationBulkFaultFaultOnHost"] = reflect.TypeOf((*ArrayOfDvsOperationBulkFaultFaultOnHost)(nil)).Elem()
    +}
    +
    +type ArrayOfDvsOutOfSyncHostArgument struct {
    +	DvsOutOfSyncHostArgument []DvsOutOfSyncHostArgument `xml:"DvsOutOfSyncHostArgument,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfDvsOutOfSyncHostArgument"] = reflect.TypeOf((*ArrayOfDvsOutOfSyncHostArgument)(nil)).Elem()
    +}
    +
    +type ArrayOfDvsProfile struct {
    +	DvsProfile []DvsProfile `xml:"DvsProfile,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfDvsProfile"] = reflect.TypeOf((*ArrayOfDvsProfile)(nil)).Elem()
    +}
    +
    +type ArrayOfDvsServiceConsoleVNicProfile struct {
    +	DvsServiceConsoleVNicProfile []DvsServiceConsoleVNicProfile `xml:"DvsServiceConsoleVNicProfile,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfDvsServiceConsoleVNicProfile"] = reflect.TypeOf((*ArrayOfDvsServiceConsoleVNicProfile)(nil)).Elem()
    +}
    +
    +type ArrayOfDvsTrafficRule struct {
    +	DvsTrafficRule []DvsTrafficRule `xml:"DvsTrafficRule,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfDvsTrafficRule"] = reflect.TypeOf((*ArrayOfDvsTrafficRule)(nil)).Elem()
    +}
    +
    +type ArrayOfDvsVmVnicNetworkResourcePoolRuntimeInfo struct {
    +	DvsVmVnicNetworkResourcePoolRuntimeInfo []DvsVmVnicNetworkResourcePoolRuntimeInfo `xml:"DvsVmVnicNetworkResourcePoolRuntimeInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfDvsVmVnicNetworkResourcePoolRuntimeInfo"] = reflect.TypeOf((*ArrayOfDvsVmVnicNetworkResourcePoolRuntimeInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfDvsVmVnicResourcePoolConfigSpec struct {
    +	DvsVmVnicResourcePoolConfigSpec []DvsVmVnicResourcePoolConfigSpec `xml:"DvsVmVnicResourcePoolConfigSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfDvsVmVnicResourcePoolConfigSpec"] = reflect.TypeOf((*ArrayOfDvsVmVnicResourcePoolConfigSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfDvsVnicAllocatedResource struct {
    +	DvsVnicAllocatedResource []DvsVnicAllocatedResource `xml:"DvsVnicAllocatedResource,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfDvsVnicAllocatedResource"] = reflect.TypeOf((*ArrayOfDvsVnicAllocatedResource)(nil)).Elem()
    +}
    +
    +type ArrayOfDynamicProperty struct {
    +	DynamicProperty []DynamicProperty `xml:"DynamicProperty,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfDynamicProperty"] = reflect.TypeOf((*ArrayOfDynamicProperty)(nil)).Elem()
    +}
    +
    +type ArrayOfEVCMode struct {
    +	EVCMode []EVCMode `xml:"EVCMode,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfEVCMode"] = reflect.TypeOf((*ArrayOfEVCMode)(nil)).Elem()
    +}
    +
    +type ArrayOfElementDescription struct {
    +	ElementDescription []BaseElementDescription `xml:"ElementDescription,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfElementDescription"] = reflect.TypeOf((*ArrayOfElementDescription)(nil)).Elem()
    +}
    +
    +type ArrayOfEntityBackupConfig struct {
    +	EntityBackupConfig []EntityBackupConfig `xml:"EntityBackupConfig,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfEntityBackupConfig"] = reflect.TypeOf((*ArrayOfEntityBackupConfig)(nil)).Elem()
    +}
    +
    +type ArrayOfEntityPrivilege struct {
    +	EntityPrivilege []EntityPrivilege `xml:"EntityPrivilege,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfEntityPrivilege"] = reflect.TypeOf((*ArrayOfEntityPrivilege)(nil)).Elem()
    +}
    +
    +type ArrayOfEnumDescription struct {
    +	EnumDescription []EnumDescription `xml:"EnumDescription,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfEnumDescription"] = reflect.TypeOf((*ArrayOfEnumDescription)(nil)).Elem()
    +}
    +
    +type ArrayOfEvent struct {
    +	Event []BaseEvent `xml:"Event,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfEvent"] = reflect.TypeOf((*ArrayOfEvent)(nil)).Elem()
    +}
    +
    +type ArrayOfEventAlarmExpressionComparison struct {
    +	EventAlarmExpressionComparison []EventAlarmExpressionComparison `xml:"EventAlarmExpressionComparison,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfEventAlarmExpressionComparison"] = reflect.TypeOf((*ArrayOfEventAlarmExpressionComparison)(nil)).Elem()
    +}
    +
    +type ArrayOfEventArgDesc struct {
    +	EventArgDesc []EventArgDesc `xml:"EventArgDesc,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfEventArgDesc"] = reflect.TypeOf((*ArrayOfEventArgDesc)(nil)).Elem()
    +}
    +
    +type ArrayOfEventDescriptionEventDetail struct {
    +	EventDescriptionEventDetail []EventDescriptionEventDetail `xml:"EventDescriptionEventDetail,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfEventDescriptionEventDetail"] = reflect.TypeOf((*ArrayOfEventDescriptionEventDetail)(nil)).Elem()
    +}
    +
    +type ArrayOfExtManagedEntityInfo struct {
    +	ExtManagedEntityInfo []ExtManagedEntityInfo `xml:"ExtManagedEntityInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfExtManagedEntityInfo"] = reflect.TypeOf((*ArrayOfExtManagedEntityInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfExtSolutionManagerInfoTabInfo struct {
    +	ExtSolutionManagerInfoTabInfo []ExtSolutionManagerInfoTabInfo `xml:"ExtSolutionManagerInfoTabInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfExtSolutionManagerInfoTabInfo"] = reflect.TypeOf((*ArrayOfExtSolutionManagerInfoTabInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfExtendedEventPair struct {
    +	ExtendedEventPair []ExtendedEventPair `xml:"ExtendedEventPair,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfExtendedEventPair"] = reflect.TypeOf((*ArrayOfExtendedEventPair)(nil)).Elem()
    +}
    +
    +type ArrayOfExtension struct {
    +	Extension []Extension `xml:"Extension,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfExtension"] = reflect.TypeOf((*ArrayOfExtension)(nil)).Elem()
    +}
    +
    +type ArrayOfExtensionClientInfo struct {
    +	ExtensionClientInfo []ExtensionClientInfo `xml:"ExtensionClientInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfExtensionClientInfo"] = reflect.TypeOf((*ArrayOfExtensionClientInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfExtensionEventTypeInfo struct {
    +	ExtensionEventTypeInfo []ExtensionEventTypeInfo `xml:"ExtensionEventTypeInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfExtensionEventTypeInfo"] = reflect.TypeOf((*ArrayOfExtensionEventTypeInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfExtensionFaultTypeInfo struct {
    +	ExtensionFaultTypeInfo []ExtensionFaultTypeInfo `xml:"ExtensionFaultTypeInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfExtensionFaultTypeInfo"] = reflect.TypeOf((*ArrayOfExtensionFaultTypeInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfExtensionManagerIpAllocationUsage struct {
    +	ExtensionManagerIpAllocationUsage []ExtensionManagerIpAllocationUsage `xml:"ExtensionManagerIpAllocationUsage,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfExtensionManagerIpAllocationUsage"] = reflect.TypeOf((*ArrayOfExtensionManagerIpAllocationUsage)(nil)).Elem()
    +}
    +
    +type ArrayOfExtensionPrivilegeInfo struct {
    +	ExtensionPrivilegeInfo []ExtensionPrivilegeInfo `xml:"ExtensionPrivilegeInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfExtensionPrivilegeInfo"] = reflect.TypeOf((*ArrayOfExtensionPrivilegeInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfExtensionResourceInfo struct {
    +	ExtensionResourceInfo []ExtensionResourceInfo `xml:"ExtensionResourceInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfExtensionResourceInfo"] = reflect.TypeOf((*ArrayOfExtensionResourceInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfExtensionServerInfo struct {
    +	ExtensionServerInfo []ExtensionServerInfo `xml:"ExtensionServerInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfExtensionServerInfo"] = reflect.TypeOf((*ArrayOfExtensionServerInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfExtensionTaskTypeInfo struct {
    +	ExtensionTaskTypeInfo []ExtensionTaskTypeInfo `xml:"ExtensionTaskTypeInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfExtensionTaskTypeInfo"] = reflect.TypeOf((*ArrayOfExtensionTaskTypeInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfFaultToleranceDiskSpec struct {
    +	FaultToleranceDiskSpec []FaultToleranceDiskSpec `xml:"FaultToleranceDiskSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfFaultToleranceDiskSpec"] = reflect.TypeOf((*ArrayOfFaultToleranceDiskSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfFaultsByHost struct {
    +	FaultsByHost []FaultsByHost `xml:"FaultsByHost,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfFaultsByHost"] = reflect.TypeOf((*ArrayOfFaultsByHost)(nil)).Elem()
    +}
    +
    +type ArrayOfFaultsByVM struct {
    +	FaultsByVM []FaultsByVM `xml:"FaultsByVM,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfFaultsByVM"] = reflect.TypeOf((*ArrayOfFaultsByVM)(nil)).Elem()
    +}
    +
    +type ArrayOfFcoeConfigVlanRange struct {
    +	FcoeConfigVlanRange []FcoeConfigVlanRange `xml:"FcoeConfigVlanRange,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfFcoeConfigVlanRange"] = reflect.TypeOf((*ArrayOfFcoeConfigVlanRange)(nil)).Elem()
    +}
    +
    +type ArrayOfFileInfo struct {
    +	FileInfo []BaseFileInfo `xml:"FileInfo,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfFileInfo"] = reflect.TypeOf((*ArrayOfFileInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfFileQuery struct {
    +	FileQuery []BaseFileQuery `xml:"FileQuery,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfFileQuery"] = reflect.TypeOf((*ArrayOfFileQuery)(nil)).Elem()
    +}
    +
    +type ArrayOfFirewallProfileRulesetProfile struct {
    +	FirewallProfileRulesetProfile []FirewallProfileRulesetProfile `xml:"FirewallProfileRulesetProfile,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfFirewallProfileRulesetProfile"] = reflect.TypeOf((*ArrayOfFirewallProfileRulesetProfile)(nil)).Elem()
    +}
    +
    +type ArrayOfGuestAliases struct {
    +	GuestAliases []GuestAliases `xml:"GuestAliases,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfGuestAliases"] = reflect.TypeOf((*ArrayOfGuestAliases)(nil)).Elem()
    +}
    +
    +type ArrayOfGuestAuthAliasInfo struct {
    +	GuestAuthAliasInfo []GuestAuthAliasInfo `xml:"GuestAuthAliasInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfGuestAuthAliasInfo"] = reflect.TypeOf((*ArrayOfGuestAuthAliasInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfGuestAuthSubject struct {
    +	GuestAuthSubject []BaseGuestAuthSubject `xml:"GuestAuthSubject,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfGuestAuthSubject"] = reflect.TypeOf((*ArrayOfGuestAuthSubject)(nil)).Elem()
    +}
    +
    +type ArrayOfGuestDiskInfo struct {
    +	GuestDiskInfo []GuestDiskInfo `xml:"GuestDiskInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfGuestDiskInfo"] = reflect.TypeOf((*ArrayOfGuestDiskInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfGuestFileInfo struct {
    +	GuestFileInfo []GuestFileInfo `xml:"GuestFileInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfGuestFileInfo"] = reflect.TypeOf((*ArrayOfGuestFileInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfGuestInfoNamespaceGenerationInfo struct {
    +	GuestInfoNamespaceGenerationInfo []GuestInfoNamespaceGenerationInfo `xml:"GuestInfoNamespaceGenerationInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfGuestInfoNamespaceGenerationInfo"] = reflect.TypeOf((*ArrayOfGuestInfoNamespaceGenerationInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfGuestMappedAliases struct {
    +	GuestMappedAliases []GuestMappedAliases `xml:"GuestMappedAliases,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfGuestMappedAliases"] = reflect.TypeOf((*ArrayOfGuestMappedAliases)(nil)).Elem()
    +}
    +
    +type ArrayOfGuestNicInfo struct {
    +	GuestNicInfo []GuestNicInfo `xml:"GuestNicInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfGuestNicInfo"] = reflect.TypeOf((*ArrayOfGuestNicInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfGuestOsDescriptor struct {
    +	GuestOsDescriptor []GuestOsDescriptor `xml:"GuestOsDescriptor,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfGuestOsDescriptor"] = reflect.TypeOf((*ArrayOfGuestOsDescriptor)(nil)).Elem()
    +}
    +
    +type ArrayOfGuestProcessInfo struct {
    +	GuestProcessInfo []GuestProcessInfo `xml:"GuestProcessInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfGuestProcessInfo"] = reflect.TypeOf((*ArrayOfGuestProcessInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfGuestRegKeyRecordSpec struct {
    +	GuestRegKeyRecordSpec []GuestRegKeyRecordSpec `xml:"GuestRegKeyRecordSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfGuestRegKeyRecordSpec"] = reflect.TypeOf((*ArrayOfGuestRegKeyRecordSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfGuestRegValueSpec struct {
    +	GuestRegValueSpec []GuestRegValueSpec `xml:"GuestRegValueSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfGuestRegValueSpec"] = reflect.TypeOf((*ArrayOfGuestRegValueSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfGuestStackInfo struct {
    +	GuestStackInfo []GuestStackInfo `xml:"GuestStackInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfGuestStackInfo"] = reflect.TypeOf((*ArrayOfGuestStackInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfHbrManagerVmReplicationCapability struct {
    +	HbrManagerVmReplicationCapability []HbrManagerVmReplicationCapability `xml:"HbrManagerVmReplicationCapability,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHbrManagerVmReplicationCapability"] = reflect.TypeOf((*ArrayOfHbrManagerVmReplicationCapability)(nil)).Elem()
    +}
    +
    +type ArrayOfHealthUpdate struct {
    +	HealthUpdate []HealthUpdate `xml:"HealthUpdate,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHealthUpdate"] = reflect.TypeOf((*ArrayOfHealthUpdate)(nil)).Elem()
    +}
    +
    +type ArrayOfHealthUpdateInfo struct {
    +	HealthUpdateInfo []HealthUpdateInfo `xml:"HealthUpdateInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHealthUpdateInfo"] = reflect.TypeOf((*ArrayOfHealthUpdateInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfHostAccessControlEntry struct {
    +	HostAccessControlEntry []HostAccessControlEntry `xml:"HostAccessControlEntry,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostAccessControlEntry"] = reflect.TypeOf((*ArrayOfHostAccessControlEntry)(nil)).Elem()
    +}
    +
    +type ArrayOfHostAccountSpec struct {
    +	HostAccountSpec []BaseHostAccountSpec `xml:"HostAccountSpec,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostAccountSpec"] = reflect.TypeOf((*ArrayOfHostAccountSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfHostActiveDirectory struct {
    +	HostActiveDirectory []HostActiveDirectory `xml:"HostActiveDirectory,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostActiveDirectory"] = reflect.TypeOf((*ArrayOfHostActiveDirectory)(nil)).Elem()
    +}
    +
    +type ArrayOfHostAuthenticationStoreInfo struct {
    +	HostAuthenticationStoreInfo []BaseHostAuthenticationStoreInfo `xml:"HostAuthenticationStoreInfo,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostAuthenticationStoreInfo"] = reflect.TypeOf((*ArrayOfHostAuthenticationStoreInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfHostBootDevice struct {
    +	HostBootDevice []HostBootDevice `xml:"HostBootDevice,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostBootDevice"] = reflect.TypeOf((*ArrayOfHostBootDevice)(nil)).Elem()
    +}
    +
    +type ArrayOfHostCacheConfigurationInfo struct {
    +	HostCacheConfigurationInfo []HostCacheConfigurationInfo `xml:"HostCacheConfigurationInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostCacheConfigurationInfo"] = reflect.TypeOf((*ArrayOfHostCacheConfigurationInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfHostConnectInfoNetworkInfo struct {
    +	HostConnectInfoNetworkInfo []BaseHostConnectInfoNetworkInfo `xml:"HostConnectInfoNetworkInfo,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostConnectInfoNetworkInfo"] = reflect.TypeOf((*ArrayOfHostConnectInfoNetworkInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfHostCpuIdInfo struct {
    +	HostCpuIdInfo []HostCpuIdInfo `xml:"HostCpuIdInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostCpuIdInfo"] = reflect.TypeOf((*ArrayOfHostCpuIdInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfHostCpuPackage struct {
    +	HostCpuPackage []HostCpuPackage `xml:"HostCpuPackage,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostCpuPackage"] = reflect.TypeOf((*ArrayOfHostCpuPackage)(nil)).Elem()
    +}
    +
    +type ArrayOfHostDatastoreBrowserSearchResults struct {
    +	HostDatastoreBrowserSearchResults []HostDatastoreBrowserSearchResults `xml:"HostDatastoreBrowserSearchResults,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostDatastoreBrowserSearchResults"] = reflect.TypeOf((*ArrayOfHostDatastoreBrowserSearchResults)(nil)).Elem()
    +}
    +
    +type ArrayOfHostDatastoreConnectInfo struct {
    +	HostDatastoreConnectInfo []BaseHostDatastoreConnectInfo `xml:"HostDatastoreConnectInfo,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostDatastoreConnectInfo"] = reflect.TypeOf((*ArrayOfHostDatastoreConnectInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfHostDatastoreSystemDatastoreResult struct {
    +	HostDatastoreSystemDatastoreResult []HostDatastoreSystemDatastoreResult `xml:"HostDatastoreSystemDatastoreResult,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostDatastoreSystemDatastoreResult"] = reflect.TypeOf((*ArrayOfHostDatastoreSystemDatastoreResult)(nil)).Elem()
    +}
    +
    +type ArrayOfHostDateTimeSystemTimeZone struct {
    +	HostDateTimeSystemTimeZone []HostDateTimeSystemTimeZone `xml:"HostDateTimeSystemTimeZone,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostDateTimeSystemTimeZone"] = reflect.TypeOf((*ArrayOfHostDateTimeSystemTimeZone)(nil)).Elem()
    +}
    +
    +type ArrayOfHostDhcpService struct {
    +	HostDhcpService []HostDhcpService `xml:"HostDhcpService,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostDhcpService"] = reflect.TypeOf((*ArrayOfHostDhcpService)(nil)).Elem()
    +}
    +
    +type ArrayOfHostDhcpServiceConfig struct {
    +	HostDhcpServiceConfig []HostDhcpServiceConfig `xml:"HostDhcpServiceConfig,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostDhcpServiceConfig"] = reflect.TypeOf((*ArrayOfHostDhcpServiceConfig)(nil)).Elem()
    +}
    +
    +type ArrayOfHostDiagnosticPartition struct {
    +	HostDiagnosticPartition []HostDiagnosticPartition `xml:"HostDiagnosticPartition,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostDiagnosticPartition"] = reflect.TypeOf((*ArrayOfHostDiagnosticPartition)(nil)).Elem()
    +}
    +
    +type ArrayOfHostDiagnosticPartitionCreateOption struct {
    +	HostDiagnosticPartitionCreateOption []HostDiagnosticPartitionCreateOption `xml:"HostDiagnosticPartitionCreateOption,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostDiagnosticPartitionCreateOption"] = reflect.TypeOf((*ArrayOfHostDiagnosticPartitionCreateOption)(nil)).Elem()
    +}
    +
    +type ArrayOfHostDiskConfigurationResult struct {
    +	HostDiskConfigurationResult []HostDiskConfigurationResult `xml:"HostDiskConfigurationResult,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostDiskConfigurationResult"] = reflect.TypeOf((*ArrayOfHostDiskConfigurationResult)(nil)).Elem()
    +}
    +
    +type ArrayOfHostDiskMappingPartitionOption struct {
    +	HostDiskMappingPartitionOption []HostDiskMappingPartitionOption `xml:"HostDiskMappingPartitionOption,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostDiskMappingPartitionOption"] = reflect.TypeOf((*ArrayOfHostDiskMappingPartitionOption)(nil)).Elem()
    +}
    +
    +type ArrayOfHostDiskPartitionAttributes struct {
    +	HostDiskPartitionAttributes []HostDiskPartitionAttributes `xml:"HostDiskPartitionAttributes,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostDiskPartitionAttributes"] = reflect.TypeOf((*ArrayOfHostDiskPartitionAttributes)(nil)).Elem()
    +}
    +
    +type ArrayOfHostDiskPartitionBlockRange struct {
    +	HostDiskPartitionBlockRange []HostDiskPartitionBlockRange `xml:"HostDiskPartitionBlockRange,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostDiskPartitionBlockRange"] = reflect.TypeOf((*ArrayOfHostDiskPartitionBlockRange)(nil)).Elem()
    +}
    +
    +type ArrayOfHostDiskPartitionInfo struct {
    +	HostDiskPartitionInfo []HostDiskPartitionInfo `xml:"HostDiskPartitionInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostDiskPartitionInfo"] = reflect.TypeOf((*ArrayOfHostDiskPartitionInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfHostEventArgument struct {
    +	HostEventArgument []HostEventArgument `xml:"HostEventArgument,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostEventArgument"] = reflect.TypeOf((*ArrayOfHostEventArgument)(nil)).Elem()
    +}
    +
    +type ArrayOfHostFeatureCapability struct {
    +	HostFeatureCapability []HostFeatureCapability `xml:"HostFeatureCapability,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostFeatureCapability"] = reflect.TypeOf((*ArrayOfHostFeatureCapability)(nil)).Elem()
    +}
    +
    +type ArrayOfHostFeatureMask struct {
    +	HostFeatureMask []HostFeatureMask `xml:"HostFeatureMask,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostFeatureMask"] = reflect.TypeOf((*ArrayOfHostFeatureMask)(nil)).Elem()
    +}
    +
    +type ArrayOfHostFeatureVersionInfo struct {
    +	HostFeatureVersionInfo []HostFeatureVersionInfo `xml:"HostFeatureVersionInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostFeatureVersionInfo"] = reflect.TypeOf((*ArrayOfHostFeatureVersionInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfHostFileSystemMountInfo struct {
    +	HostFileSystemMountInfo []HostFileSystemMountInfo `xml:"HostFileSystemMountInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostFileSystemMountInfo"] = reflect.TypeOf((*ArrayOfHostFileSystemMountInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfHostFirewallConfigRuleSetConfig struct {
    +	HostFirewallConfigRuleSetConfig []HostFirewallConfigRuleSetConfig `xml:"HostFirewallConfigRuleSetConfig,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostFirewallConfigRuleSetConfig"] = reflect.TypeOf((*ArrayOfHostFirewallConfigRuleSetConfig)(nil)).Elem()
    +}
    +
    +type ArrayOfHostFirewallRule struct {
    +	HostFirewallRule []HostFirewallRule `xml:"HostFirewallRule,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostFirewallRule"] = reflect.TypeOf((*ArrayOfHostFirewallRule)(nil)).Elem()
    +}
    +
    +type ArrayOfHostFirewallRuleset struct {
    +	HostFirewallRuleset []HostFirewallRuleset `xml:"HostFirewallRuleset,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostFirewallRuleset"] = reflect.TypeOf((*ArrayOfHostFirewallRuleset)(nil)).Elem()
    +}
    +
    +type ArrayOfHostFirewallRulesetIpNetwork struct {
    +	HostFirewallRulesetIpNetwork []HostFirewallRulesetIpNetwork `xml:"HostFirewallRulesetIpNetwork,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostFirewallRulesetIpNetwork"] = reflect.TypeOf((*ArrayOfHostFirewallRulesetIpNetwork)(nil)).Elem()
    +}
    +
    +type ArrayOfHostGraphicsConfigDeviceType struct {
    +	HostGraphicsConfigDeviceType []HostGraphicsConfigDeviceType `xml:"HostGraphicsConfigDeviceType,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostGraphicsConfigDeviceType"] = reflect.TypeOf((*ArrayOfHostGraphicsConfigDeviceType)(nil)).Elem()
    +}
    +
    +type ArrayOfHostGraphicsInfo struct {
    +	HostGraphicsInfo []HostGraphicsInfo `xml:"HostGraphicsInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostGraphicsInfo"] = reflect.TypeOf((*ArrayOfHostGraphicsInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfHostHardwareElementInfo struct {
    +	HostHardwareElementInfo []BaseHostHardwareElementInfo `xml:"HostHardwareElementInfo,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostHardwareElementInfo"] = reflect.TypeOf((*ArrayOfHostHardwareElementInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfHostHostBusAdapter struct {
    +	HostHostBusAdapter []BaseHostHostBusAdapter `xml:"HostHostBusAdapter,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostHostBusAdapter"] = reflect.TypeOf((*ArrayOfHostHostBusAdapter)(nil)).Elem()
    +}
    +
    +type ArrayOfHostInternetScsiHbaIscsiIpv6Address struct {
    +	HostInternetScsiHbaIscsiIpv6Address []HostInternetScsiHbaIscsiIpv6Address `xml:"HostInternetScsiHbaIscsiIpv6Address,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostInternetScsiHbaIscsiIpv6Address"] = reflect.TypeOf((*ArrayOfHostInternetScsiHbaIscsiIpv6Address)(nil)).Elem()
    +}
    +
    +type ArrayOfHostInternetScsiHbaParamValue struct {
    +	HostInternetScsiHbaParamValue []HostInternetScsiHbaParamValue `xml:"HostInternetScsiHbaParamValue,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostInternetScsiHbaParamValue"] = reflect.TypeOf((*ArrayOfHostInternetScsiHbaParamValue)(nil)).Elem()
    +}
    +
    +type ArrayOfHostInternetScsiHbaSendTarget struct {
    +	HostInternetScsiHbaSendTarget []HostInternetScsiHbaSendTarget `xml:"HostInternetScsiHbaSendTarget,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostInternetScsiHbaSendTarget"] = reflect.TypeOf((*ArrayOfHostInternetScsiHbaSendTarget)(nil)).Elem()
    +}
    +
    +type ArrayOfHostInternetScsiHbaStaticTarget struct {
    +	HostInternetScsiHbaStaticTarget []HostInternetScsiHbaStaticTarget `xml:"HostInternetScsiHbaStaticTarget,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostInternetScsiHbaStaticTarget"] = reflect.TypeOf((*ArrayOfHostInternetScsiHbaStaticTarget)(nil)).Elem()
    +}
    +
    +type ArrayOfHostIoFilterInfo struct {
    +	HostIoFilterInfo []HostIoFilterInfo `xml:"HostIoFilterInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostIoFilterInfo"] = reflect.TypeOf((*ArrayOfHostIoFilterInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfHostIpConfigIpV6Address struct {
    +	HostIpConfigIpV6Address []HostIpConfigIpV6Address `xml:"HostIpConfigIpV6Address,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostIpConfigIpV6Address"] = reflect.TypeOf((*ArrayOfHostIpConfigIpV6Address)(nil)).Elem()
    +}
    +
    +type ArrayOfHostIpRouteEntry struct {
    +	HostIpRouteEntry []HostIpRouteEntry `xml:"HostIpRouteEntry,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostIpRouteEntry"] = reflect.TypeOf((*ArrayOfHostIpRouteEntry)(nil)).Elem()
    +}
    +
    +type ArrayOfHostIpRouteOp struct {
    +	HostIpRouteOp []HostIpRouteOp `xml:"HostIpRouteOp,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostIpRouteOp"] = reflect.TypeOf((*ArrayOfHostIpRouteOp)(nil)).Elem()
    +}
    +
    +type ArrayOfHostLowLevelProvisioningManagerDiskLayoutSpec struct {
    +	HostLowLevelProvisioningManagerDiskLayoutSpec []HostLowLevelProvisioningManagerDiskLayoutSpec `xml:"HostLowLevelProvisioningManagerDiskLayoutSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostLowLevelProvisioningManagerDiskLayoutSpec"] = reflect.TypeOf((*ArrayOfHostLowLevelProvisioningManagerDiskLayoutSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfHostLowLevelProvisioningManagerFileDeleteResult struct {
    +	HostLowLevelProvisioningManagerFileDeleteResult []HostLowLevelProvisioningManagerFileDeleteResult `xml:"HostLowLevelProvisioningManagerFileDeleteResult,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostLowLevelProvisioningManagerFileDeleteResult"] = reflect.TypeOf((*ArrayOfHostLowLevelProvisioningManagerFileDeleteResult)(nil)).Elem()
    +}
    +
    +type ArrayOfHostLowLevelProvisioningManagerFileDeleteSpec struct {
    +	HostLowLevelProvisioningManagerFileDeleteSpec []HostLowLevelProvisioningManagerFileDeleteSpec `xml:"HostLowLevelProvisioningManagerFileDeleteSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostLowLevelProvisioningManagerFileDeleteSpec"] = reflect.TypeOf((*ArrayOfHostLowLevelProvisioningManagerFileDeleteSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfHostLowLevelProvisioningManagerFileReserveResult struct {
    +	HostLowLevelProvisioningManagerFileReserveResult []HostLowLevelProvisioningManagerFileReserveResult `xml:"HostLowLevelProvisioningManagerFileReserveResult,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostLowLevelProvisioningManagerFileReserveResult"] = reflect.TypeOf((*ArrayOfHostLowLevelProvisioningManagerFileReserveResult)(nil)).Elem()
    +}
    +
    +type ArrayOfHostLowLevelProvisioningManagerFileReserveSpec struct {
    +	HostLowLevelProvisioningManagerFileReserveSpec []HostLowLevelProvisioningManagerFileReserveSpec `xml:"HostLowLevelProvisioningManagerFileReserveSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostLowLevelProvisioningManagerFileReserveSpec"] = reflect.TypeOf((*ArrayOfHostLowLevelProvisioningManagerFileReserveSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfHostLowLevelProvisioningManagerSnapshotLayoutSpec struct {
    +	HostLowLevelProvisioningManagerSnapshotLayoutSpec []HostLowLevelProvisioningManagerSnapshotLayoutSpec `xml:"HostLowLevelProvisioningManagerSnapshotLayoutSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostLowLevelProvisioningManagerSnapshotLayoutSpec"] = reflect.TypeOf((*ArrayOfHostLowLevelProvisioningManagerSnapshotLayoutSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfHostMemberHealthCheckResult struct {
    +	HostMemberHealthCheckResult []BaseHostMemberHealthCheckResult `xml:"HostMemberHealthCheckResult,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostMemberHealthCheckResult"] = reflect.TypeOf((*ArrayOfHostMemberHealthCheckResult)(nil)).Elem()
    +}
    +
    +type ArrayOfHostMemberRuntimeInfo struct {
    +	HostMemberRuntimeInfo []HostMemberRuntimeInfo `xml:"HostMemberRuntimeInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostMemberRuntimeInfo"] = reflect.TypeOf((*ArrayOfHostMemberRuntimeInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfHostMultipathInfoLogicalUnit struct {
    +	HostMultipathInfoLogicalUnit []HostMultipathInfoLogicalUnit `xml:"HostMultipathInfoLogicalUnit,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostMultipathInfoLogicalUnit"] = reflect.TypeOf((*ArrayOfHostMultipathInfoLogicalUnit)(nil)).Elem()
    +}
    +
    +type ArrayOfHostMultipathInfoPath struct {
    +	HostMultipathInfoPath []HostMultipathInfoPath `xml:"HostMultipathInfoPath,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostMultipathInfoPath"] = reflect.TypeOf((*ArrayOfHostMultipathInfoPath)(nil)).Elem()
    +}
    +
    +type ArrayOfHostMultipathStateInfoPath struct {
    +	HostMultipathStateInfoPath []HostMultipathStateInfoPath `xml:"HostMultipathStateInfoPath,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostMultipathStateInfoPath"] = reflect.TypeOf((*ArrayOfHostMultipathStateInfoPath)(nil)).Elem()
    +}
    +
    +type ArrayOfHostNasVolumeConfig struct {
    +	HostNasVolumeConfig []HostNasVolumeConfig `xml:"HostNasVolumeConfig,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostNasVolumeConfig"] = reflect.TypeOf((*ArrayOfHostNasVolumeConfig)(nil)).Elem()
    +}
    +
    +type ArrayOfHostNatService struct {
    +	HostNatService []HostNatService `xml:"HostNatService,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostNatService"] = reflect.TypeOf((*ArrayOfHostNatService)(nil)).Elem()
    +}
    +
    +type ArrayOfHostNatServiceConfig struct {
    +	HostNatServiceConfig []HostNatServiceConfig `xml:"HostNatServiceConfig,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostNatServiceConfig"] = reflect.TypeOf((*ArrayOfHostNatServiceConfig)(nil)).Elem()
    +}
    +
    +type ArrayOfHostNatServicePortForwardSpec struct {
    +	HostNatServicePortForwardSpec []HostNatServicePortForwardSpec `xml:"HostNatServicePortForwardSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostNatServicePortForwardSpec"] = reflect.TypeOf((*ArrayOfHostNatServicePortForwardSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfHostNetStackInstance struct {
    +	HostNetStackInstance []HostNetStackInstance `xml:"HostNetStackInstance,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostNetStackInstance"] = reflect.TypeOf((*ArrayOfHostNetStackInstance)(nil)).Elem()
    +}
    +
    +type ArrayOfHostNetworkConfigNetStackSpec struct {
    +	HostNetworkConfigNetStackSpec []HostNetworkConfigNetStackSpec `xml:"HostNetworkConfigNetStackSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostNetworkConfigNetStackSpec"] = reflect.TypeOf((*ArrayOfHostNetworkConfigNetStackSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfHostNumaNode struct {
    +	HostNumaNode []HostNumaNode `xml:"HostNumaNode,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostNumaNode"] = reflect.TypeOf((*ArrayOfHostNumaNode)(nil)).Elem()
    +}
    +
    +type ArrayOfHostNumericSensorInfo struct {
    +	HostNumericSensorInfo []HostNumericSensorInfo `xml:"HostNumericSensorInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostNumericSensorInfo"] = reflect.TypeOf((*ArrayOfHostNumericSensorInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfHostOpaqueNetworkInfo struct {
    +	HostOpaqueNetworkInfo []HostOpaqueNetworkInfo `xml:"HostOpaqueNetworkInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostOpaqueNetworkInfo"] = reflect.TypeOf((*ArrayOfHostOpaqueNetworkInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfHostOpaqueSwitch struct {
    +	HostOpaqueSwitch []HostOpaqueSwitch `xml:"HostOpaqueSwitch,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostOpaqueSwitch"] = reflect.TypeOf((*ArrayOfHostOpaqueSwitch)(nil)).Elem()
    +}
    +
    +type ArrayOfHostOpaqueSwitchPhysicalNicZone struct {
    +	HostOpaqueSwitchPhysicalNicZone []HostOpaqueSwitchPhysicalNicZone `xml:"HostOpaqueSwitchPhysicalNicZone,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostOpaqueSwitchPhysicalNicZone"] = reflect.TypeOf((*ArrayOfHostOpaqueSwitchPhysicalNicZone)(nil)).Elem()
    +}
    +
    +type ArrayOfHostPatchManagerStatus struct {
    +	HostPatchManagerStatus []HostPatchManagerStatus `xml:"HostPatchManagerStatus,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostPatchManagerStatus"] = reflect.TypeOf((*ArrayOfHostPatchManagerStatus)(nil)).Elem()
    +}
    +
    +type ArrayOfHostPatchManagerStatusPrerequisitePatch struct {
    +	HostPatchManagerStatusPrerequisitePatch []HostPatchManagerStatusPrerequisitePatch `xml:"HostPatchManagerStatusPrerequisitePatch,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostPatchManagerStatusPrerequisitePatch"] = reflect.TypeOf((*ArrayOfHostPatchManagerStatusPrerequisitePatch)(nil)).Elem()
    +}
    +
    +type ArrayOfHostPathSelectionPolicyOption struct {
    +	HostPathSelectionPolicyOption []HostPathSelectionPolicyOption `xml:"HostPathSelectionPolicyOption,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostPathSelectionPolicyOption"] = reflect.TypeOf((*ArrayOfHostPathSelectionPolicyOption)(nil)).Elem()
    +}
    +
    +type ArrayOfHostPciDevice struct {
    +	HostPciDevice []HostPciDevice `xml:"HostPciDevice,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostPciDevice"] = reflect.TypeOf((*ArrayOfHostPciDevice)(nil)).Elem()
    +}
    +
    +type ArrayOfHostPciPassthruConfig struct {
    +	HostPciPassthruConfig []BaseHostPciPassthruConfig `xml:"HostPciPassthruConfig,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostPciPassthruConfig"] = reflect.TypeOf((*ArrayOfHostPciPassthruConfig)(nil)).Elem()
    +}
    +
    +type ArrayOfHostPciPassthruInfo struct {
    +	HostPciPassthruInfo []BaseHostPciPassthruInfo `xml:"HostPciPassthruInfo,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostPciPassthruInfo"] = reflect.TypeOf((*ArrayOfHostPciPassthruInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfHostPlacedVirtualNicIdentifier struct {
    +	HostPlacedVirtualNicIdentifier []HostPlacedVirtualNicIdentifier `xml:"HostPlacedVirtualNicIdentifier,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostPlacedVirtualNicIdentifier"] = reflect.TypeOf((*ArrayOfHostPlacedVirtualNicIdentifier)(nil)).Elem()
    +}
    +
    +type ArrayOfHostPlugStoreTopologyAdapter struct {
    +	HostPlugStoreTopologyAdapter []HostPlugStoreTopologyAdapter `xml:"HostPlugStoreTopologyAdapter,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostPlugStoreTopologyAdapter"] = reflect.TypeOf((*ArrayOfHostPlugStoreTopologyAdapter)(nil)).Elem()
    +}
    +
    +type ArrayOfHostPlugStoreTopologyDevice struct {
    +	HostPlugStoreTopologyDevice []HostPlugStoreTopologyDevice `xml:"HostPlugStoreTopologyDevice,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostPlugStoreTopologyDevice"] = reflect.TypeOf((*ArrayOfHostPlugStoreTopologyDevice)(nil)).Elem()
    +}
    +
    +type ArrayOfHostPlugStoreTopologyPath struct {
    +	HostPlugStoreTopologyPath []HostPlugStoreTopologyPath `xml:"HostPlugStoreTopologyPath,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostPlugStoreTopologyPath"] = reflect.TypeOf((*ArrayOfHostPlugStoreTopologyPath)(nil)).Elem()
    +}
    +
    +type ArrayOfHostPlugStoreTopologyPlugin struct {
    +	HostPlugStoreTopologyPlugin []HostPlugStoreTopologyPlugin `xml:"HostPlugStoreTopologyPlugin,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostPlugStoreTopologyPlugin"] = reflect.TypeOf((*ArrayOfHostPlugStoreTopologyPlugin)(nil)).Elem()
    +}
    +
    +type ArrayOfHostPlugStoreTopologyTarget struct {
    +	HostPlugStoreTopologyTarget []HostPlugStoreTopologyTarget `xml:"HostPlugStoreTopologyTarget,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostPlugStoreTopologyTarget"] = reflect.TypeOf((*ArrayOfHostPlugStoreTopologyTarget)(nil)).Elem()
    +}
    +
    +type ArrayOfHostPnicNetworkResourceInfo struct {
    +	HostPnicNetworkResourceInfo []HostPnicNetworkResourceInfo `xml:"HostPnicNetworkResourceInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostPnicNetworkResourceInfo"] = reflect.TypeOf((*ArrayOfHostPnicNetworkResourceInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfHostPortGroup struct {
    +	HostPortGroup []HostPortGroup `xml:"HostPortGroup,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostPortGroup"] = reflect.TypeOf((*ArrayOfHostPortGroup)(nil)).Elem()
    +}
    +
    +type ArrayOfHostPortGroupConfig struct {
    +	HostPortGroupConfig []HostPortGroupConfig `xml:"HostPortGroupConfig,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostPortGroupConfig"] = reflect.TypeOf((*ArrayOfHostPortGroupConfig)(nil)).Elem()
    +}
    +
    +type ArrayOfHostPortGroupPort struct {
    +	HostPortGroupPort []HostPortGroupPort `xml:"HostPortGroupPort,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostPortGroupPort"] = reflect.TypeOf((*ArrayOfHostPortGroupPort)(nil)).Elem()
    +}
    +
    +type ArrayOfHostPortGroupProfile struct {
    +	HostPortGroupProfile []HostPortGroupProfile `xml:"HostPortGroupProfile,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostPortGroupProfile"] = reflect.TypeOf((*ArrayOfHostPortGroupProfile)(nil)).Elem()
    +}
    +
    +type ArrayOfHostPowerPolicy struct {
    +	HostPowerPolicy []HostPowerPolicy `xml:"HostPowerPolicy,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostPowerPolicy"] = reflect.TypeOf((*ArrayOfHostPowerPolicy)(nil)).Elem()
    +}
    +
    +type ArrayOfHostProfileManagerCompositionResultResultElement struct {
    +	HostProfileManagerCompositionResultResultElement []HostProfileManagerCompositionResultResultElement `xml:"HostProfileManagerCompositionResultResultElement,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostProfileManagerCompositionResultResultElement"] = reflect.TypeOf((*ArrayOfHostProfileManagerCompositionResultResultElement)(nil)).Elem()
    +}
    +
    +type ArrayOfHostProfileManagerCompositionValidationResultResultElement struct {
    +	HostProfileManagerCompositionValidationResultResultElement []HostProfileManagerCompositionValidationResultResultElement `xml:"HostProfileManagerCompositionValidationResultResultElement,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostProfileManagerCompositionValidationResultResultElement"] = reflect.TypeOf((*ArrayOfHostProfileManagerCompositionValidationResultResultElement)(nil)).Elem()
    +}
    +
    +type ArrayOfHostProfileManagerHostToConfigSpecMap struct {
    +	HostProfileManagerHostToConfigSpecMap []HostProfileManagerHostToConfigSpecMap `xml:"HostProfileManagerHostToConfigSpecMap,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostProfileManagerHostToConfigSpecMap"] = reflect.TypeOf((*ArrayOfHostProfileManagerHostToConfigSpecMap)(nil)).Elem()
    +}
    +
    +type ArrayOfHostProfilesEntityCustomizations struct {
    +	HostProfilesEntityCustomizations []BaseHostProfilesEntityCustomizations `xml:"HostProfilesEntityCustomizations,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostProfilesEntityCustomizations"] = reflect.TypeOf((*ArrayOfHostProfilesEntityCustomizations)(nil)).Elem()
    +}
    +
    +type ArrayOfHostProtocolEndpoint struct {
    +	HostProtocolEndpoint []HostProtocolEndpoint `xml:"HostProtocolEndpoint,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostProtocolEndpoint"] = reflect.TypeOf((*ArrayOfHostProtocolEndpoint)(nil)).Elem()
    +}
    +
    +type ArrayOfHostProxySwitch struct {
    +	HostProxySwitch []HostProxySwitch `xml:"HostProxySwitch,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostProxySwitch"] = reflect.TypeOf((*ArrayOfHostProxySwitch)(nil)).Elem()
    +}
    +
    +type ArrayOfHostProxySwitchConfig struct {
    +	HostProxySwitchConfig []HostProxySwitchConfig `xml:"HostProxySwitchConfig,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostProxySwitchConfig"] = reflect.TypeOf((*ArrayOfHostProxySwitchConfig)(nil)).Elem()
    +}
    +
    +type ArrayOfHostProxySwitchHostLagConfig struct {
    +	HostProxySwitchHostLagConfig []HostProxySwitchHostLagConfig `xml:"HostProxySwitchHostLagConfig,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostProxySwitchHostLagConfig"] = reflect.TypeOf((*ArrayOfHostProxySwitchHostLagConfig)(nil)).Elem()
    +}
    +
    +type ArrayOfHostRuntimeInfoNetStackInstanceRuntimeInfo struct {
    +	HostRuntimeInfoNetStackInstanceRuntimeInfo []HostRuntimeInfoNetStackInstanceRuntimeInfo `xml:"HostRuntimeInfoNetStackInstanceRuntimeInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostRuntimeInfoNetStackInstanceRuntimeInfo"] = reflect.TypeOf((*ArrayOfHostRuntimeInfoNetStackInstanceRuntimeInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfHostScsiDisk struct {
    +	HostScsiDisk []HostScsiDisk `xml:"HostScsiDisk,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostScsiDisk"] = reflect.TypeOf((*ArrayOfHostScsiDisk)(nil)).Elem()
    +}
    +
    +type ArrayOfHostScsiDiskPartition struct {
    +	HostScsiDiskPartition []HostScsiDiskPartition `xml:"HostScsiDiskPartition,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostScsiDiskPartition"] = reflect.TypeOf((*ArrayOfHostScsiDiskPartition)(nil)).Elem()
    +}
    +
    +type ArrayOfHostScsiTopologyInterface struct {
    +	HostScsiTopologyInterface []HostScsiTopologyInterface `xml:"HostScsiTopologyInterface,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostScsiTopologyInterface"] = reflect.TypeOf((*ArrayOfHostScsiTopologyInterface)(nil)).Elem()
    +}
    +
    +type ArrayOfHostScsiTopologyLun struct {
    +	HostScsiTopologyLun []HostScsiTopologyLun `xml:"HostScsiTopologyLun,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostScsiTopologyLun"] = reflect.TypeOf((*ArrayOfHostScsiTopologyLun)(nil)).Elem()
    +}
    +
    +type ArrayOfHostScsiTopologyTarget struct {
    +	HostScsiTopologyTarget []HostScsiTopologyTarget `xml:"HostScsiTopologyTarget,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostScsiTopologyTarget"] = reflect.TypeOf((*ArrayOfHostScsiTopologyTarget)(nil)).Elem()
    +}
    +
    +type ArrayOfHostService struct {
    +	HostService []HostService `xml:"HostService,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostService"] = reflect.TypeOf((*ArrayOfHostService)(nil)).Elem()
    +}
    +
    +type ArrayOfHostServiceConfig struct {
    +	HostServiceConfig []HostServiceConfig `xml:"HostServiceConfig,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostServiceConfig"] = reflect.TypeOf((*ArrayOfHostServiceConfig)(nil)).Elem()
    +}
    +
    +type ArrayOfHostSharedGpuCapabilities struct {
    +	HostSharedGpuCapabilities []HostSharedGpuCapabilities `xml:"HostSharedGpuCapabilities,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostSharedGpuCapabilities"] = reflect.TypeOf((*ArrayOfHostSharedGpuCapabilities)(nil)).Elem()
    +}
    +
    +type ArrayOfHostSnmpDestination struct {
    +	HostSnmpDestination []HostSnmpDestination `xml:"HostSnmpDestination,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostSnmpDestination"] = reflect.TypeOf((*ArrayOfHostSnmpDestination)(nil)).Elem()
    +}
    +
    +type ArrayOfHostSriovDevicePoolInfo struct {
    +	HostSriovDevicePoolInfo []BaseHostSriovDevicePoolInfo `xml:"HostSriovDevicePoolInfo,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostSriovDevicePoolInfo"] = reflect.TypeOf((*ArrayOfHostSriovDevicePoolInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfHostSslThumbprintInfo struct {
    +	HostSslThumbprintInfo []HostSslThumbprintInfo `xml:"HostSslThumbprintInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostSslThumbprintInfo"] = reflect.TypeOf((*ArrayOfHostSslThumbprintInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfHostStorageArrayTypePolicyOption struct {
    +	HostStorageArrayTypePolicyOption []HostStorageArrayTypePolicyOption `xml:"HostStorageArrayTypePolicyOption,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostStorageArrayTypePolicyOption"] = reflect.TypeOf((*ArrayOfHostStorageArrayTypePolicyOption)(nil)).Elem()
    +}
    +
    +type ArrayOfHostStorageElementInfo struct {
    +	HostStorageElementInfo []HostStorageElementInfo `xml:"HostStorageElementInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostStorageElementInfo"] = reflect.TypeOf((*ArrayOfHostStorageElementInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfHostStorageOperationalInfo struct {
    +	HostStorageOperationalInfo []HostStorageOperationalInfo `xml:"HostStorageOperationalInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostStorageOperationalInfo"] = reflect.TypeOf((*ArrayOfHostStorageOperationalInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfHostStorageSystemDiskLocatorLedResult struct {
    +	HostStorageSystemDiskLocatorLedResult []HostStorageSystemDiskLocatorLedResult `xml:"HostStorageSystemDiskLocatorLedResult,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostStorageSystemDiskLocatorLedResult"] = reflect.TypeOf((*ArrayOfHostStorageSystemDiskLocatorLedResult)(nil)).Elem()
    +}
    +
    +type ArrayOfHostStorageSystemScsiLunResult struct {
    +	HostStorageSystemScsiLunResult []HostStorageSystemScsiLunResult `xml:"HostStorageSystemScsiLunResult,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostStorageSystemScsiLunResult"] = reflect.TypeOf((*ArrayOfHostStorageSystemScsiLunResult)(nil)).Elem()
    +}
    +
    +type ArrayOfHostStorageSystemVmfsVolumeResult struct {
    +	HostStorageSystemVmfsVolumeResult []HostStorageSystemVmfsVolumeResult `xml:"HostStorageSystemVmfsVolumeResult,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostStorageSystemVmfsVolumeResult"] = reflect.TypeOf((*ArrayOfHostStorageSystemVmfsVolumeResult)(nil)).Elem()
    +}
    +
    +type ArrayOfHostSubSpecification struct {
    +	HostSubSpecification []HostSubSpecification `xml:"HostSubSpecification,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostSubSpecification"] = reflect.TypeOf((*ArrayOfHostSubSpecification)(nil)).Elem()
    +}
    +
    +type ArrayOfHostSystemIdentificationInfo struct {
    +	HostSystemIdentificationInfo []HostSystemIdentificationInfo `xml:"HostSystemIdentificationInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostSystemIdentificationInfo"] = reflect.TypeOf((*ArrayOfHostSystemIdentificationInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfHostSystemResourceInfo struct {
    +	HostSystemResourceInfo []HostSystemResourceInfo `xml:"HostSystemResourceInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostSystemResourceInfo"] = reflect.TypeOf((*ArrayOfHostSystemResourceInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfHostSystemSwapConfigurationSystemSwapOption struct {
    +	HostSystemSwapConfigurationSystemSwapOption []BaseHostSystemSwapConfigurationSystemSwapOption `xml:"HostSystemSwapConfigurationSystemSwapOption,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostSystemSwapConfigurationSystemSwapOption"] = reflect.TypeOf((*ArrayOfHostSystemSwapConfigurationSystemSwapOption)(nil)).Elem()
    +}
    +
    +type ArrayOfHostTpmDigestInfo struct {
    +	HostTpmDigestInfo []HostTpmDigestInfo `xml:"HostTpmDigestInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostTpmDigestInfo"] = reflect.TypeOf((*ArrayOfHostTpmDigestInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfHostTpmEventLogEntry struct {
    +	HostTpmEventLogEntry []HostTpmEventLogEntry `xml:"HostTpmEventLogEntry,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostTpmEventLogEntry"] = reflect.TypeOf((*ArrayOfHostTpmEventLogEntry)(nil)).Elem()
    +}
    +
    +type ArrayOfHostUnresolvedVmfsExtent struct {
    +	HostUnresolvedVmfsExtent []HostUnresolvedVmfsExtent `xml:"HostUnresolvedVmfsExtent,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostUnresolvedVmfsExtent"] = reflect.TypeOf((*ArrayOfHostUnresolvedVmfsExtent)(nil)).Elem()
    +}
    +
    +type ArrayOfHostUnresolvedVmfsResolutionResult struct {
    +	HostUnresolvedVmfsResolutionResult []HostUnresolvedVmfsResolutionResult `xml:"HostUnresolvedVmfsResolutionResult,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostUnresolvedVmfsResolutionResult"] = reflect.TypeOf((*ArrayOfHostUnresolvedVmfsResolutionResult)(nil)).Elem()
    +}
    +
    +type ArrayOfHostUnresolvedVmfsResolutionSpec struct {
    +	HostUnresolvedVmfsResolutionSpec []HostUnresolvedVmfsResolutionSpec `xml:"HostUnresolvedVmfsResolutionSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostUnresolvedVmfsResolutionSpec"] = reflect.TypeOf((*ArrayOfHostUnresolvedVmfsResolutionSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfHostUnresolvedVmfsVolume struct {
    +	HostUnresolvedVmfsVolume []HostUnresolvedVmfsVolume `xml:"HostUnresolvedVmfsVolume,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostUnresolvedVmfsVolume"] = reflect.TypeOf((*ArrayOfHostUnresolvedVmfsVolume)(nil)).Elem()
    +}
    +
    +type ArrayOfHostVFlashManagerVFlashCacheConfigInfoVFlashModuleConfigOption struct {
    +	HostVFlashManagerVFlashCacheConfigInfoVFlashModuleConfigOption []HostVFlashManagerVFlashCacheConfigInfoVFlashModuleConfigOption `xml:"HostVFlashManagerVFlashCacheConfigInfoVFlashModuleConfigOption,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostVFlashManagerVFlashCacheConfigInfoVFlashModuleConfigOption"] = reflect.TypeOf((*ArrayOfHostVFlashManagerVFlashCacheConfigInfoVFlashModuleConfigOption)(nil)).Elem()
    +}
    +
    +type ArrayOfHostVMotionCompatibility struct {
    +	HostVMotionCompatibility []HostVMotionCompatibility `xml:"HostVMotionCompatibility,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostVMotionCompatibility"] = reflect.TypeOf((*ArrayOfHostVMotionCompatibility)(nil)).Elem()
    +}
    +
    +type ArrayOfHostVirtualNic struct {
    +	HostVirtualNic []HostVirtualNic `xml:"HostVirtualNic,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostVirtualNic"] = reflect.TypeOf((*ArrayOfHostVirtualNic)(nil)).Elem()
    +}
    +
    +type ArrayOfHostVirtualNicConfig struct {
    +	HostVirtualNicConfig []HostVirtualNicConfig `xml:"HostVirtualNicConfig,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostVirtualNicConfig"] = reflect.TypeOf((*ArrayOfHostVirtualNicConfig)(nil)).Elem()
    +}
    +
    +type ArrayOfHostVirtualNicManagerNicTypeSelection struct {
    +	HostVirtualNicManagerNicTypeSelection []HostVirtualNicManagerNicTypeSelection `xml:"HostVirtualNicManagerNicTypeSelection,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostVirtualNicManagerNicTypeSelection"] = reflect.TypeOf((*ArrayOfHostVirtualNicManagerNicTypeSelection)(nil)).Elem()
    +}
    +
    +type ArrayOfHostVirtualSwitch struct {
    +	HostVirtualSwitch []HostVirtualSwitch `xml:"HostVirtualSwitch,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostVirtualSwitch"] = reflect.TypeOf((*ArrayOfHostVirtualSwitch)(nil)).Elem()
    +}
    +
    +type ArrayOfHostVirtualSwitchConfig struct {
    +	HostVirtualSwitchConfig []HostVirtualSwitchConfig `xml:"HostVirtualSwitchConfig,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostVirtualSwitchConfig"] = reflect.TypeOf((*ArrayOfHostVirtualSwitchConfig)(nil)).Elem()
    +}
    +
    +type ArrayOfHostVmciAccessManagerAccessSpec struct {
    +	HostVmciAccessManagerAccessSpec []HostVmciAccessManagerAccessSpec `xml:"HostVmciAccessManagerAccessSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostVmciAccessManagerAccessSpec"] = reflect.TypeOf((*ArrayOfHostVmciAccessManagerAccessSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfHostVmfsRescanResult struct {
    +	HostVmfsRescanResult []HostVmfsRescanResult `xml:"HostVmfsRescanResult,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostVmfsRescanResult"] = reflect.TypeOf((*ArrayOfHostVmfsRescanResult)(nil)).Elem()
    +}
    +
    +type ArrayOfHostVsanInternalSystemCmmdsQuery struct {
    +	HostVsanInternalSystemCmmdsQuery []HostVsanInternalSystemCmmdsQuery `xml:"HostVsanInternalSystemCmmdsQuery,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostVsanInternalSystemCmmdsQuery"] = reflect.TypeOf((*ArrayOfHostVsanInternalSystemCmmdsQuery)(nil)).Elem()
    +}
    +
    +type ArrayOfHostVsanInternalSystemDeleteVsanObjectsResult struct {
    +	HostVsanInternalSystemDeleteVsanObjectsResult []HostVsanInternalSystemDeleteVsanObjectsResult `xml:"HostVsanInternalSystemDeleteVsanObjectsResult,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostVsanInternalSystemDeleteVsanObjectsResult"] = reflect.TypeOf((*ArrayOfHostVsanInternalSystemDeleteVsanObjectsResult)(nil)).Elem()
    +}
    +
    +type ArrayOfHostVsanInternalSystemVsanObjectOperationResult struct {
    +	HostVsanInternalSystemVsanObjectOperationResult []HostVsanInternalSystemVsanObjectOperationResult `xml:"HostVsanInternalSystemVsanObjectOperationResult,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostVsanInternalSystemVsanObjectOperationResult"] = reflect.TypeOf((*ArrayOfHostVsanInternalSystemVsanObjectOperationResult)(nil)).Elem()
    +}
    +
    +type ArrayOfHostVsanInternalSystemVsanPhysicalDiskDiagnosticsResult struct {
    +	HostVsanInternalSystemVsanPhysicalDiskDiagnosticsResult []HostVsanInternalSystemVsanPhysicalDiskDiagnosticsResult `xml:"HostVsanInternalSystemVsanPhysicalDiskDiagnosticsResult,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHostVsanInternalSystemVsanPhysicalDiskDiagnosticsResult"] = reflect.TypeOf((*ArrayOfHostVsanInternalSystemVsanPhysicalDiskDiagnosticsResult)(nil)).Elem()
    +}
    +
    +type ArrayOfHttpNfcLeaseDatastoreLeaseInfo struct {
    +	HttpNfcLeaseDatastoreLeaseInfo []HttpNfcLeaseDatastoreLeaseInfo `xml:"HttpNfcLeaseDatastoreLeaseInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHttpNfcLeaseDatastoreLeaseInfo"] = reflect.TypeOf((*ArrayOfHttpNfcLeaseDatastoreLeaseInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfHttpNfcLeaseDeviceUrl struct {
    +	HttpNfcLeaseDeviceUrl []HttpNfcLeaseDeviceUrl `xml:"HttpNfcLeaseDeviceUrl,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHttpNfcLeaseDeviceUrl"] = reflect.TypeOf((*ArrayOfHttpNfcLeaseDeviceUrl)(nil)).Elem()
    +}
    +
    +type ArrayOfHttpNfcLeaseHostInfo struct {
    +	HttpNfcLeaseHostInfo []HttpNfcLeaseHostInfo `xml:"HttpNfcLeaseHostInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHttpNfcLeaseHostInfo"] = reflect.TypeOf((*ArrayOfHttpNfcLeaseHostInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfHttpNfcLeaseManifestEntry struct {
    +	HttpNfcLeaseManifestEntry []HttpNfcLeaseManifestEntry `xml:"HttpNfcLeaseManifestEntry,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHttpNfcLeaseManifestEntry"] = reflect.TypeOf((*ArrayOfHttpNfcLeaseManifestEntry)(nil)).Elem()
    +}
    +
    +type ArrayOfHttpNfcLeaseSourceFile struct {
    +	HttpNfcLeaseSourceFile []HttpNfcLeaseSourceFile `xml:"HttpNfcLeaseSourceFile,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfHttpNfcLeaseSourceFile"] = reflect.TypeOf((*ArrayOfHttpNfcLeaseSourceFile)(nil)).Elem()
    +}
    +
    +type ArrayOfID struct {
    +	ID []ID `xml:"ID,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfID"] = reflect.TypeOf((*ArrayOfID)(nil)).Elem()
    +}
    +
    +type ArrayOfImportOperationBulkFaultFaultOnImport struct {
    +	ImportOperationBulkFaultFaultOnImport []ImportOperationBulkFaultFaultOnImport `xml:"ImportOperationBulkFaultFaultOnImport,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfImportOperationBulkFaultFaultOnImport"] = reflect.TypeOf((*ArrayOfImportOperationBulkFaultFaultOnImport)(nil)).Elem()
    +}
    +
    +type ArrayOfImportSpec struct {
    +	ImportSpec []BaseImportSpec `xml:"ImportSpec,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfImportSpec"] = reflect.TypeOf((*ArrayOfImportSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfInt struct {
    +	Int []int32 `xml:"int,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfInt"] = reflect.TypeOf((*ArrayOfInt)(nil)).Elem()
    +}
    +
    +type ArrayOfIoFilterHostIssue struct {
    +	IoFilterHostIssue []IoFilterHostIssue `xml:"IoFilterHostIssue,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfIoFilterHostIssue"] = reflect.TypeOf((*ArrayOfIoFilterHostIssue)(nil)).Elem()
    +}
    +
    +type ArrayOfIpPool struct {
    +	IpPool []IpPool `xml:"IpPool,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfIpPool"] = reflect.TypeOf((*ArrayOfIpPool)(nil)).Elem()
    +}
    +
    +type ArrayOfIpPoolAssociation struct {
    +	IpPoolAssociation []IpPoolAssociation `xml:"IpPoolAssociation,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfIpPoolAssociation"] = reflect.TypeOf((*ArrayOfIpPoolAssociation)(nil)).Elem()
    +}
    +
    +type ArrayOfIpPoolManagerIpAllocation struct {
    +	IpPoolManagerIpAllocation []IpPoolManagerIpAllocation `xml:"IpPoolManagerIpAllocation,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfIpPoolManagerIpAllocation"] = reflect.TypeOf((*ArrayOfIpPoolManagerIpAllocation)(nil)).Elem()
    +}
    +
    +type ArrayOfIscsiDependencyEntity struct {
    +	IscsiDependencyEntity []IscsiDependencyEntity `xml:"IscsiDependencyEntity,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfIscsiDependencyEntity"] = reflect.TypeOf((*ArrayOfIscsiDependencyEntity)(nil)).Elem()
    +}
    +
    +type ArrayOfIscsiPortInfo struct {
    +	IscsiPortInfo []IscsiPortInfo `xml:"IscsiPortInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfIscsiPortInfo"] = reflect.TypeOf((*ArrayOfIscsiPortInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfKernelModuleInfo struct {
    +	KernelModuleInfo []KernelModuleInfo `xml:"KernelModuleInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfKernelModuleInfo"] = reflect.TypeOf((*ArrayOfKernelModuleInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfKeyAnyValue struct {
    +	KeyAnyValue []KeyAnyValue `xml:"KeyAnyValue,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfKeyAnyValue"] = reflect.TypeOf((*ArrayOfKeyAnyValue)(nil)).Elem()
    +}
    +
    +type ArrayOfKeyValue struct {
    +	KeyValue []KeyValue `xml:"KeyValue,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfKeyValue"] = reflect.TypeOf((*ArrayOfKeyValue)(nil)).Elem()
    +}
    +
    +type ArrayOfKmipClusterInfo struct {
    +	KmipClusterInfo []KmipClusterInfo `xml:"KmipClusterInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfKmipClusterInfo"] = reflect.TypeOf((*ArrayOfKmipClusterInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfKmipServerInfo struct {
    +	KmipServerInfo []KmipServerInfo `xml:"KmipServerInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfKmipServerInfo"] = reflect.TypeOf((*ArrayOfKmipServerInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfLicenseAssignmentManagerLicenseAssignment struct {
    +	LicenseAssignmentManagerLicenseAssignment []LicenseAssignmentManagerLicenseAssignment `xml:"LicenseAssignmentManagerLicenseAssignment,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfLicenseAssignmentManagerLicenseAssignment"] = reflect.TypeOf((*ArrayOfLicenseAssignmentManagerLicenseAssignment)(nil)).Elem()
    +}
    +
    +type ArrayOfLicenseAvailabilityInfo struct {
    +	LicenseAvailabilityInfo []LicenseAvailabilityInfo `xml:"LicenseAvailabilityInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfLicenseAvailabilityInfo"] = reflect.TypeOf((*ArrayOfLicenseAvailabilityInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfLicenseFeatureInfo struct {
    +	LicenseFeatureInfo []LicenseFeatureInfo `xml:"LicenseFeatureInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfLicenseFeatureInfo"] = reflect.TypeOf((*ArrayOfLicenseFeatureInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfLicenseManagerLicenseInfo struct {
    +	LicenseManagerLicenseInfo []LicenseManagerLicenseInfo `xml:"LicenseManagerLicenseInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfLicenseManagerLicenseInfo"] = reflect.TypeOf((*ArrayOfLicenseManagerLicenseInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfLicenseReservationInfo struct {
    +	LicenseReservationInfo []LicenseReservationInfo `xml:"LicenseReservationInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfLicenseReservationInfo"] = reflect.TypeOf((*ArrayOfLicenseReservationInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfLocalizableMessage struct {
    +	LocalizableMessage []LocalizableMessage `xml:"LocalizableMessage,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfLocalizableMessage"] = reflect.TypeOf((*ArrayOfLocalizableMessage)(nil)).Elem()
    +}
    +
    +type ArrayOfLocalizationManagerMessageCatalog struct {
    +	LocalizationManagerMessageCatalog []LocalizationManagerMessageCatalog `xml:"LocalizationManagerMessageCatalog,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfLocalizationManagerMessageCatalog"] = reflect.TypeOf((*ArrayOfLocalizationManagerMessageCatalog)(nil)).Elem()
    +}
    +
    +type ArrayOfLong struct {
    +	Long []int64 `xml:"long,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfLong"] = reflect.TypeOf((*ArrayOfLong)(nil)).Elem()
    +}
    +
    +type ArrayOfManagedEntityStatus struct {
    +	ManagedEntityStatus []ManagedEntityStatus `xml:"ManagedEntityStatus,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfManagedEntityStatus"] = reflect.TypeOf((*ArrayOfManagedEntityStatus)(nil)).Elem()
    +}
    +
    +type ArrayOfManagedObjectReference struct {
    +	ManagedObjectReference []ManagedObjectReference `xml:"ManagedObjectReference,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfManagedObjectReference"] = reflect.TypeOf((*ArrayOfManagedObjectReference)(nil)).Elem()
    +}
    +
    +type ArrayOfMethodActionArgument struct {
    +	MethodActionArgument []MethodActionArgument `xml:"MethodActionArgument,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfMethodActionArgument"] = reflect.TypeOf((*ArrayOfMethodActionArgument)(nil)).Elem()
    +}
    +
    +type ArrayOfMethodFault struct {
    +	MethodFault []BaseMethodFault `xml:"MethodFault,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfMethodFault"] = reflect.TypeOf((*ArrayOfMethodFault)(nil)).Elem()
    +}
    +
    +type ArrayOfMissingObject struct {
    +	MissingObject []MissingObject `xml:"MissingObject,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfMissingObject"] = reflect.TypeOf((*ArrayOfMissingObject)(nil)).Elem()
    +}
    +
    +type ArrayOfMissingProperty struct {
    +	MissingProperty []MissingProperty `xml:"MissingProperty,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfMissingProperty"] = reflect.TypeOf((*ArrayOfMissingProperty)(nil)).Elem()
    +}
    +
    +type ArrayOfMultipleCertificatesVerifyFaultThumbprintData struct {
    +	MultipleCertificatesVerifyFaultThumbprintData []MultipleCertificatesVerifyFaultThumbprintData `xml:"MultipleCertificatesVerifyFaultThumbprintData,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfMultipleCertificatesVerifyFaultThumbprintData"] = reflect.TypeOf((*ArrayOfMultipleCertificatesVerifyFaultThumbprintData)(nil)).Elem()
    +}
    +
    +type ArrayOfNasStorageProfile struct {
    +	NasStorageProfile []NasStorageProfile `xml:"NasStorageProfile,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfNasStorageProfile"] = reflect.TypeOf((*ArrayOfNasStorageProfile)(nil)).Elem()
    +}
    +
    +type ArrayOfNetIpConfigInfoIpAddress struct {
    +	NetIpConfigInfoIpAddress []NetIpConfigInfoIpAddress `xml:"NetIpConfigInfoIpAddress,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfNetIpConfigInfoIpAddress"] = reflect.TypeOf((*ArrayOfNetIpConfigInfoIpAddress)(nil)).Elem()
    +}
    +
    +type ArrayOfNetIpConfigSpecIpAddressSpec struct {
    +	NetIpConfigSpecIpAddressSpec []NetIpConfigSpecIpAddressSpec `xml:"NetIpConfigSpecIpAddressSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfNetIpConfigSpecIpAddressSpec"] = reflect.TypeOf((*ArrayOfNetIpConfigSpecIpAddressSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfNetIpRouteConfigInfoIpRoute struct {
    +	NetIpRouteConfigInfoIpRoute []NetIpRouteConfigInfoIpRoute `xml:"NetIpRouteConfigInfoIpRoute,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfNetIpRouteConfigInfoIpRoute"] = reflect.TypeOf((*ArrayOfNetIpRouteConfigInfoIpRoute)(nil)).Elem()
    +}
    +
    +type ArrayOfNetIpRouteConfigSpecIpRouteSpec struct {
    +	NetIpRouteConfigSpecIpRouteSpec []NetIpRouteConfigSpecIpRouteSpec `xml:"NetIpRouteConfigSpecIpRouteSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfNetIpRouteConfigSpecIpRouteSpec"] = reflect.TypeOf((*ArrayOfNetIpRouteConfigSpecIpRouteSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfNetIpStackInfoDefaultRouter struct {
    +	NetIpStackInfoDefaultRouter []NetIpStackInfoDefaultRouter `xml:"NetIpStackInfoDefaultRouter,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfNetIpStackInfoDefaultRouter"] = reflect.TypeOf((*ArrayOfNetIpStackInfoDefaultRouter)(nil)).Elem()
    +}
    +
    +type ArrayOfNetIpStackInfoNetToMedia struct {
    +	NetIpStackInfoNetToMedia []NetIpStackInfoNetToMedia `xml:"NetIpStackInfoNetToMedia,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfNetIpStackInfoNetToMedia"] = reflect.TypeOf((*ArrayOfNetIpStackInfoNetToMedia)(nil)).Elem()
    +}
    +
    +type ArrayOfNetStackInstanceProfile struct {
    +	NetStackInstanceProfile []NetStackInstanceProfile `xml:"NetStackInstanceProfile,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfNetStackInstanceProfile"] = reflect.TypeOf((*ArrayOfNetStackInstanceProfile)(nil)).Elem()
    +}
    +
    +type ArrayOfNsxHostVNicProfile struct {
    +	NsxHostVNicProfile []NsxHostVNicProfile `xml:"NsxHostVNicProfile,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfNsxHostVNicProfile"] = reflect.TypeOf((*ArrayOfNsxHostVNicProfile)(nil)).Elem()
    +}
    +
    +type ArrayOfNumericRange struct {
    +	NumericRange []NumericRange `xml:"NumericRange,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfNumericRange"] = reflect.TypeOf((*ArrayOfNumericRange)(nil)).Elem()
    +}
    +
    +type ArrayOfNvdimmDimmInfo struct {
    +	NvdimmDimmInfo []NvdimmDimmInfo `xml:"NvdimmDimmInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfNvdimmDimmInfo"] = reflect.TypeOf((*ArrayOfNvdimmDimmInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfNvdimmGuid struct {
    +	NvdimmGuid []NvdimmGuid `xml:"NvdimmGuid,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfNvdimmGuid"] = reflect.TypeOf((*ArrayOfNvdimmGuid)(nil)).Elem()
    +}
    +
    +type ArrayOfNvdimmInterleaveSetInfo struct {
    +	NvdimmInterleaveSetInfo []NvdimmInterleaveSetInfo `xml:"NvdimmInterleaveSetInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfNvdimmInterleaveSetInfo"] = reflect.TypeOf((*ArrayOfNvdimmInterleaveSetInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfNvdimmNamespaceInfo struct {
    +	NvdimmNamespaceInfo []NvdimmNamespaceInfo `xml:"NvdimmNamespaceInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfNvdimmNamespaceInfo"] = reflect.TypeOf((*ArrayOfNvdimmNamespaceInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfNvdimmRegionInfo struct {
    +	NvdimmRegionInfo []NvdimmRegionInfo `xml:"NvdimmRegionInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfNvdimmRegionInfo"] = reflect.TypeOf((*ArrayOfNvdimmRegionInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfObjectContent struct {
    +	ObjectContent []ObjectContent `xml:"ObjectContent,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfObjectContent"] = reflect.TypeOf((*ArrayOfObjectContent)(nil)).Elem()
    +}
    +
    +type ArrayOfObjectSpec struct {
    +	ObjectSpec []ObjectSpec `xml:"ObjectSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfObjectSpec"] = reflect.TypeOf((*ArrayOfObjectSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfObjectUpdate struct {
    +	ObjectUpdate []ObjectUpdate `xml:"ObjectUpdate,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfObjectUpdate"] = reflect.TypeOf((*ArrayOfObjectUpdate)(nil)).Elem()
    +}
    +
    +type ArrayOfOpaqueNetworkTargetInfo struct {
    +	OpaqueNetworkTargetInfo []OpaqueNetworkTargetInfo `xml:"OpaqueNetworkTargetInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfOpaqueNetworkTargetInfo"] = reflect.TypeOf((*ArrayOfOpaqueNetworkTargetInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfOptionDef struct {
    +	OptionDef []OptionDef `xml:"OptionDef,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfOptionDef"] = reflect.TypeOf((*ArrayOfOptionDef)(nil)).Elem()
    +}
    +
    +type ArrayOfOptionProfile struct {
    +	OptionProfile []OptionProfile `xml:"OptionProfile,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfOptionProfile"] = reflect.TypeOf((*ArrayOfOptionProfile)(nil)).Elem()
    +}
    +
    +type ArrayOfOptionValue struct {
    +	OptionValue []BaseOptionValue `xml:"OptionValue,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfOptionValue"] = reflect.TypeOf((*ArrayOfOptionValue)(nil)).Elem()
    +}
    +
    +type ArrayOfOvfConsumerOstNode struct {
    +	OvfConsumerOstNode []OvfConsumerOstNode `xml:"OvfConsumerOstNode,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfOvfConsumerOstNode"] = reflect.TypeOf((*ArrayOfOvfConsumerOstNode)(nil)).Elem()
    +}
    +
    +type ArrayOfOvfConsumerOvfSection struct {
    +	OvfConsumerOvfSection []OvfConsumerOvfSection `xml:"OvfConsumerOvfSection,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfOvfConsumerOvfSection"] = reflect.TypeOf((*ArrayOfOvfConsumerOvfSection)(nil)).Elem()
    +}
    +
    +type ArrayOfOvfDeploymentOption struct {
    +	OvfDeploymentOption []OvfDeploymentOption `xml:"OvfDeploymentOption,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfOvfDeploymentOption"] = reflect.TypeOf((*ArrayOfOvfDeploymentOption)(nil)).Elem()
    +}
    +
    +type ArrayOfOvfFile struct {
    +	OvfFile []OvfFile `xml:"OvfFile,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfOvfFile"] = reflect.TypeOf((*ArrayOfOvfFile)(nil)).Elem()
    +}
    +
    +type ArrayOfOvfFileItem struct {
    +	OvfFileItem []OvfFileItem `xml:"OvfFileItem,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfOvfFileItem"] = reflect.TypeOf((*ArrayOfOvfFileItem)(nil)).Elem()
    +}
    +
    +type ArrayOfOvfNetworkInfo struct {
    +	OvfNetworkInfo []OvfNetworkInfo `xml:"OvfNetworkInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfOvfNetworkInfo"] = reflect.TypeOf((*ArrayOfOvfNetworkInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfOvfNetworkMapping struct {
    +	OvfNetworkMapping []OvfNetworkMapping `xml:"OvfNetworkMapping,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfOvfNetworkMapping"] = reflect.TypeOf((*ArrayOfOvfNetworkMapping)(nil)).Elem()
    +}
    +
    +type ArrayOfOvfOptionInfo struct {
    +	OvfOptionInfo []OvfOptionInfo `xml:"OvfOptionInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfOvfOptionInfo"] = reflect.TypeOf((*ArrayOfOvfOptionInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfOvfResourceMap struct {
    +	OvfResourceMap []OvfResourceMap `xml:"OvfResourceMap,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfOvfResourceMap"] = reflect.TypeOf((*ArrayOfOvfResourceMap)(nil)).Elem()
    +}
    +
    +type ArrayOfPerfCounterInfo struct {
    +	PerfCounterInfo []PerfCounterInfo `xml:"PerfCounterInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfPerfCounterInfo"] = reflect.TypeOf((*ArrayOfPerfCounterInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfPerfEntityMetricBase struct {
    +	PerfEntityMetricBase []BasePerfEntityMetricBase `xml:"PerfEntityMetricBase,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfPerfEntityMetricBase"] = reflect.TypeOf((*ArrayOfPerfEntityMetricBase)(nil)).Elem()
    +}
    +
    +type ArrayOfPerfInterval struct {
    +	PerfInterval []PerfInterval `xml:"PerfInterval,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfPerfInterval"] = reflect.TypeOf((*ArrayOfPerfInterval)(nil)).Elem()
    +}
    +
    +type ArrayOfPerfMetricId struct {
    +	PerfMetricId []PerfMetricId `xml:"PerfMetricId,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfPerfMetricId"] = reflect.TypeOf((*ArrayOfPerfMetricId)(nil)).Elem()
    +}
    +
    +type ArrayOfPerfMetricSeries struct {
    +	PerfMetricSeries []BasePerfMetricSeries `xml:"PerfMetricSeries,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfPerfMetricSeries"] = reflect.TypeOf((*ArrayOfPerfMetricSeries)(nil)).Elem()
    +}
    +
    +type ArrayOfPerfMetricSeriesCSV struct {
    +	PerfMetricSeriesCSV []PerfMetricSeriesCSV `xml:"PerfMetricSeriesCSV,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfPerfMetricSeriesCSV"] = reflect.TypeOf((*ArrayOfPerfMetricSeriesCSV)(nil)).Elem()
    +}
    +
    +type ArrayOfPerfQuerySpec struct {
    +	PerfQuerySpec []PerfQuerySpec `xml:"PerfQuerySpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfPerfQuerySpec"] = reflect.TypeOf((*ArrayOfPerfQuerySpec)(nil)).Elem()
    +}
    +
    +type ArrayOfPerfSampleInfo struct {
    +	PerfSampleInfo []PerfSampleInfo `xml:"PerfSampleInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfPerfSampleInfo"] = reflect.TypeOf((*ArrayOfPerfSampleInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfPerformanceManagerCounterLevelMapping struct {
    +	PerformanceManagerCounterLevelMapping []PerformanceManagerCounterLevelMapping `xml:"PerformanceManagerCounterLevelMapping,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfPerformanceManagerCounterLevelMapping"] = reflect.TypeOf((*ArrayOfPerformanceManagerCounterLevelMapping)(nil)).Elem()
    +}
    +
    +type ArrayOfPermission struct {
    +	Permission []Permission `xml:"Permission,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfPermission"] = reflect.TypeOf((*ArrayOfPermission)(nil)).Elem()
    +}
    +
    +type ArrayOfPermissionProfile struct {
    +	PermissionProfile []PermissionProfile `xml:"PermissionProfile,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfPermissionProfile"] = reflect.TypeOf((*ArrayOfPermissionProfile)(nil)).Elem()
    +}
    +
    +type ArrayOfPhysicalNic struct {
    +	PhysicalNic []PhysicalNic `xml:"PhysicalNic,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfPhysicalNic"] = reflect.TypeOf((*ArrayOfPhysicalNic)(nil)).Elem()
    +}
    +
    +type ArrayOfPhysicalNicConfig struct {
    +	PhysicalNicConfig []PhysicalNicConfig `xml:"PhysicalNicConfig,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfPhysicalNicConfig"] = reflect.TypeOf((*ArrayOfPhysicalNicConfig)(nil)).Elem()
    +}
    +
    +type ArrayOfPhysicalNicHintInfo struct {
    +	PhysicalNicHintInfo []PhysicalNicHintInfo `xml:"PhysicalNicHintInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfPhysicalNicHintInfo"] = reflect.TypeOf((*ArrayOfPhysicalNicHintInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfPhysicalNicIpHint struct {
    +	PhysicalNicIpHint []PhysicalNicIpHint `xml:"PhysicalNicIpHint,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfPhysicalNicIpHint"] = reflect.TypeOf((*ArrayOfPhysicalNicIpHint)(nil)).Elem()
    +}
    +
    +type ArrayOfPhysicalNicLinkInfo struct {
    +	PhysicalNicLinkInfo []PhysicalNicLinkInfo `xml:"PhysicalNicLinkInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfPhysicalNicLinkInfo"] = reflect.TypeOf((*ArrayOfPhysicalNicLinkInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfPhysicalNicNameHint struct {
    +	PhysicalNicNameHint []PhysicalNicNameHint `xml:"PhysicalNicNameHint,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfPhysicalNicNameHint"] = reflect.TypeOf((*ArrayOfPhysicalNicNameHint)(nil)).Elem()
    +}
    +
    +type ArrayOfPhysicalNicProfile struct {
    +	PhysicalNicProfile []PhysicalNicProfile `xml:"PhysicalNicProfile,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfPhysicalNicProfile"] = reflect.TypeOf((*ArrayOfPhysicalNicProfile)(nil)).Elem()
    +}
    +
    +type ArrayOfPlacementAffinityRule struct {
    +	PlacementAffinityRule []PlacementAffinityRule `xml:"PlacementAffinityRule,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfPlacementAffinityRule"] = reflect.TypeOf((*ArrayOfPlacementAffinityRule)(nil)).Elem()
    +}
    +
    +type ArrayOfPlacementSpec struct {
    +	PlacementSpec []PlacementSpec `xml:"PlacementSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfPlacementSpec"] = reflect.TypeOf((*ArrayOfPlacementSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfPnicUplinkProfile struct {
    +	PnicUplinkProfile []PnicUplinkProfile `xml:"PnicUplinkProfile,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfPnicUplinkProfile"] = reflect.TypeOf((*ArrayOfPnicUplinkProfile)(nil)).Elem()
    +}
    +
    +type ArrayOfPodDiskLocator struct {
    +	PodDiskLocator []PodDiskLocator `xml:"PodDiskLocator,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfPodDiskLocator"] = reflect.TypeOf((*ArrayOfPodDiskLocator)(nil)).Elem()
    +}
    +
    +type ArrayOfPolicyOption struct {
    +	PolicyOption []BasePolicyOption `xml:"PolicyOption,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfPolicyOption"] = reflect.TypeOf((*ArrayOfPolicyOption)(nil)).Elem()
    +}
    +
    +type ArrayOfPrivilegeAvailability struct {
    +	PrivilegeAvailability []PrivilegeAvailability `xml:"PrivilegeAvailability,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfPrivilegeAvailability"] = reflect.TypeOf((*ArrayOfPrivilegeAvailability)(nil)).Elem()
    +}
    +
    +type ArrayOfProductComponentInfo struct {
    +	ProductComponentInfo []ProductComponentInfo `xml:"ProductComponentInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfProductComponentInfo"] = reflect.TypeOf((*ArrayOfProductComponentInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfProfileApplyProfileProperty struct {
    +	ProfileApplyProfileProperty []ProfileApplyProfileProperty `xml:"ProfileApplyProfileProperty,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfProfileApplyProfileProperty"] = reflect.TypeOf((*ArrayOfProfileApplyProfileProperty)(nil)).Elem()
    +}
    +
    +type ArrayOfProfileDeferredPolicyOptionParameter struct {
    +	ProfileDeferredPolicyOptionParameter []ProfileDeferredPolicyOptionParameter `xml:"ProfileDeferredPolicyOptionParameter,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfProfileDeferredPolicyOptionParameter"] = reflect.TypeOf((*ArrayOfProfileDeferredPolicyOptionParameter)(nil)).Elem()
    +}
    +
    +type ArrayOfProfileDescriptionSection struct {
    +	ProfileDescriptionSection []ProfileDescriptionSection `xml:"ProfileDescriptionSection,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfProfileDescriptionSection"] = reflect.TypeOf((*ArrayOfProfileDescriptionSection)(nil)).Elem()
    +}
    +
    +type ArrayOfProfileExecuteError struct {
    +	ProfileExecuteError []ProfileExecuteError `xml:"ProfileExecuteError,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfProfileExecuteError"] = reflect.TypeOf((*ArrayOfProfileExecuteError)(nil)).Elem()
    +}
    +
    +type ArrayOfProfileExpression struct {
    +	ProfileExpression []BaseProfileExpression `xml:"ProfileExpression,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfProfileExpression"] = reflect.TypeOf((*ArrayOfProfileExpression)(nil)).Elem()
    +}
    +
    +type ArrayOfProfileExpressionMetadata struct {
    +	ProfileExpressionMetadata []ProfileExpressionMetadata `xml:"ProfileExpressionMetadata,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfProfileExpressionMetadata"] = reflect.TypeOf((*ArrayOfProfileExpressionMetadata)(nil)).Elem()
    +}
    +
    +type ArrayOfProfileMetadata struct {
    +	ProfileMetadata []ProfileMetadata `xml:"ProfileMetadata,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfProfileMetadata"] = reflect.TypeOf((*ArrayOfProfileMetadata)(nil)).Elem()
    +}
    +
    +type ArrayOfProfileMetadataProfileOperationMessage struct {
    +	ProfileMetadataProfileOperationMessage []ProfileMetadataProfileOperationMessage `xml:"ProfileMetadataProfileOperationMessage,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfProfileMetadataProfileOperationMessage"] = reflect.TypeOf((*ArrayOfProfileMetadataProfileOperationMessage)(nil)).Elem()
    +}
    +
    +type ArrayOfProfileMetadataProfileSortSpec struct {
    +	ProfileMetadataProfileSortSpec []ProfileMetadataProfileSortSpec `xml:"ProfileMetadataProfileSortSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfProfileMetadataProfileSortSpec"] = reflect.TypeOf((*ArrayOfProfileMetadataProfileSortSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfProfileParameterMetadata struct {
    +	ProfileParameterMetadata []ProfileParameterMetadata `xml:"ProfileParameterMetadata,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfProfileParameterMetadata"] = reflect.TypeOf((*ArrayOfProfileParameterMetadata)(nil)).Elem()
    +}
    +
    +type ArrayOfProfileParameterMetadataParameterRelationMetadata struct {
    +	ProfileParameterMetadataParameterRelationMetadata []ProfileParameterMetadataParameterRelationMetadata `xml:"ProfileParameterMetadataParameterRelationMetadata,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfProfileParameterMetadataParameterRelationMetadata"] = reflect.TypeOf((*ArrayOfProfileParameterMetadataParameterRelationMetadata)(nil)).Elem()
    +}
    +
    +type ArrayOfProfilePolicy struct {
    +	ProfilePolicy []ProfilePolicy `xml:"ProfilePolicy,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfProfilePolicy"] = reflect.TypeOf((*ArrayOfProfilePolicy)(nil)).Elem()
    +}
    +
    +type ArrayOfProfilePolicyMetadata struct {
    +	ProfilePolicyMetadata []ProfilePolicyMetadata `xml:"ProfilePolicyMetadata,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfProfilePolicyMetadata"] = reflect.TypeOf((*ArrayOfProfilePolicyMetadata)(nil)).Elem()
    +}
    +
    +type ArrayOfProfilePolicyOptionMetadata struct {
    +	ProfilePolicyOptionMetadata []BaseProfilePolicyOptionMetadata `xml:"ProfilePolicyOptionMetadata,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfProfilePolicyOptionMetadata"] = reflect.TypeOf((*ArrayOfProfilePolicyOptionMetadata)(nil)).Elem()
    +}
    +
    +type ArrayOfProfileProfileStructureProperty struct {
    +	ProfileProfileStructureProperty []ProfileProfileStructureProperty `xml:"ProfileProfileStructureProperty,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfProfileProfileStructureProperty"] = reflect.TypeOf((*ArrayOfProfileProfileStructureProperty)(nil)).Elem()
    +}
    +
    +type ArrayOfProfilePropertyPath struct {
    +	ProfilePropertyPath []ProfilePropertyPath `xml:"ProfilePropertyPath,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfProfilePropertyPath"] = reflect.TypeOf((*ArrayOfProfilePropertyPath)(nil)).Elem()
    +}
    +
    +type ArrayOfProfileUpdateFailedUpdateFailure struct {
    +	ProfileUpdateFailedUpdateFailure []ProfileUpdateFailedUpdateFailure `xml:"ProfileUpdateFailedUpdateFailure,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfProfileUpdateFailedUpdateFailure"] = reflect.TypeOf((*ArrayOfProfileUpdateFailedUpdateFailure)(nil)).Elem()
    +}
    +
    +type ArrayOfPropertyChange struct {
    +	PropertyChange []PropertyChange `xml:"PropertyChange,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfPropertyChange"] = reflect.TypeOf((*ArrayOfPropertyChange)(nil)).Elem()
    +}
    +
    +type ArrayOfPropertyFilterSpec struct {
    +	PropertyFilterSpec []PropertyFilterSpec `xml:"PropertyFilterSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfPropertyFilterSpec"] = reflect.TypeOf((*ArrayOfPropertyFilterSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfPropertyFilterUpdate struct {
    +	PropertyFilterUpdate []PropertyFilterUpdate `xml:"PropertyFilterUpdate,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfPropertyFilterUpdate"] = reflect.TypeOf((*ArrayOfPropertyFilterUpdate)(nil)).Elem()
    +}
    +
    +type ArrayOfPropertySpec struct {
    +	PropertySpec []PropertySpec `xml:"PropertySpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfPropertySpec"] = reflect.TypeOf((*ArrayOfPropertySpec)(nil)).Elem()
    +}
    +
    +type ArrayOfRelation struct {
    +	Relation []Relation `xml:"Relation,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfRelation"] = reflect.TypeOf((*ArrayOfRelation)(nil)).Elem()
    +}
    +
    +type ArrayOfReplicationInfoDiskSettings struct {
    +	ReplicationInfoDiskSettings []ReplicationInfoDiskSettings `xml:"ReplicationInfoDiskSettings,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfReplicationInfoDiskSettings"] = reflect.TypeOf((*ArrayOfReplicationInfoDiskSettings)(nil)).Elem()
    +}
    +
    +type ArrayOfResourceConfigSpec struct {
    +	ResourceConfigSpec []ResourceConfigSpec `xml:"ResourceConfigSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfResourceConfigSpec"] = reflect.TypeOf((*ArrayOfResourceConfigSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfRetrieveVStorageObjSpec struct {
    +	RetrieveVStorageObjSpec []RetrieveVStorageObjSpec `xml:"RetrieveVStorageObjSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfRetrieveVStorageObjSpec"] = reflect.TypeOf((*ArrayOfRetrieveVStorageObjSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfScheduledTaskDetail struct {
    +	ScheduledTaskDetail []ScheduledTaskDetail `xml:"ScheduledTaskDetail,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfScheduledTaskDetail"] = reflect.TypeOf((*ArrayOfScheduledTaskDetail)(nil)).Elem()
    +}
    +
    +type ArrayOfScsiLun struct {
    +	ScsiLun []BaseScsiLun `xml:"ScsiLun,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfScsiLun"] = reflect.TypeOf((*ArrayOfScsiLun)(nil)).Elem()
    +}
    +
    +type ArrayOfScsiLunDescriptor struct {
    +	ScsiLunDescriptor []ScsiLunDescriptor `xml:"ScsiLunDescriptor,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfScsiLunDescriptor"] = reflect.TypeOf((*ArrayOfScsiLunDescriptor)(nil)).Elem()
    +}
    +
    +type ArrayOfScsiLunDurableName struct {
    +	ScsiLunDurableName []ScsiLunDurableName `xml:"ScsiLunDurableName,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfScsiLunDurableName"] = reflect.TypeOf((*ArrayOfScsiLunDurableName)(nil)).Elem()
    +}
    +
    +type ArrayOfSelectionSet struct {
    +	SelectionSet []BaseSelectionSet `xml:"SelectionSet,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfSelectionSet"] = reflect.TypeOf((*ArrayOfSelectionSet)(nil)).Elem()
    +}
    +
    +type ArrayOfSelectionSpec struct {
    +	SelectionSpec []BaseSelectionSpec `xml:"SelectionSpec,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfSelectionSpec"] = reflect.TypeOf((*ArrayOfSelectionSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfServiceConsolePortGroupProfile struct {
    +	ServiceConsolePortGroupProfile []ServiceConsolePortGroupProfile `xml:"ServiceConsolePortGroupProfile,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfServiceConsolePortGroupProfile"] = reflect.TypeOf((*ArrayOfServiceConsolePortGroupProfile)(nil)).Elem()
    +}
    +
    +type ArrayOfServiceLocator struct {
    +	ServiceLocator []ServiceLocator `xml:"ServiceLocator,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfServiceLocator"] = reflect.TypeOf((*ArrayOfServiceLocator)(nil)).Elem()
    +}
    +
    +type ArrayOfServiceManagerServiceInfo struct {
    +	ServiceManagerServiceInfo []ServiceManagerServiceInfo `xml:"ServiceManagerServiceInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfServiceManagerServiceInfo"] = reflect.TypeOf((*ArrayOfServiceManagerServiceInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfServiceProfile struct {
    +	ServiceProfile []ServiceProfile `xml:"ServiceProfile,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfServiceProfile"] = reflect.TypeOf((*ArrayOfServiceProfile)(nil)).Elem()
    +}
    +
    +type ArrayOfShort struct {
    +	Short []int16 `xml:"short,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfShort"] = reflect.TypeOf((*ArrayOfShort)(nil)).Elem()
    +}
    +
    +type ArrayOfSoftwarePackage struct {
    +	SoftwarePackage []SoftwarePackage `xml:"SoftwarePackage,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfSoftwarePackage"] = reflect.TypeOf((*ArrayOfSoftwarePackage)(nil)).Elem()
    +}
    +
    +type ArrayOfStaticRouteProfile struct {
    +	StaticRouteProfile []StaticRouteProfile `xml:"StaticRouteProfile,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfStaticRouteProfile"] = reflect.TypeOf((*ArrayOfStaticRouteProfile)(nil)).Elem()
    +}
    +
    +type ArrayOfStorageDrsOptionSpec struct {
    +	StorageDrsOptionSpec []StorageDrsOptionSpec `xml:"StorageDrsOptionSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfStorageDrsOptionSpec"] = reflect.TypeOf((*ArrayOfStorageDrsOptionSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfStorageDrsPlacementRankVmSpec struct {
    +	StorageDrsPlacementRankVmSpec []StorageDrsPlacementRankVmSpec `xml:"StorageDrsPlacementRankVmSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfStorageDrsPlacementRankVmSpec"] = reflect.TypeOf((*ArrayOfStorageDrsPlacementRankVmSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfStorageDrsVmConfigInfo struct {
    +	StorageDrsVmConfigInfo []StorageDrsVmConfigInfo `xml:"StorageDrsVmConfigInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfStorageDrsVmConfigInfo"] = reflect.TypeOf((*ArrayOfStorageDrsVmConfigInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfStorageDrsVmConfigSpec struct {
    +	StorageDrsVmConfigSpec []StorageDrsVmConfigSpec `xml:"StorageDrsVmConfigSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfStorageDrsVmConfigSpec"] = reflect.TypeOf((*ArrayOfStorageDrsVmConfigSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfStoragePerformanceSummary struct {
    +	StoragePerformanceSummary []StoragePerformanceSummary `xml:"StoragePerformanceSummary,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfStoragePerformanceSummary"] = reflect.TypeOf((*ArrayOfStoragePerformanceSummary)(nil)).Elem()
    +}
    +
    +type ArrayOfStorageRequirement struct {
    +	StorageRequirement []StorageRequirement `xml:"StorageRequirement,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfStorageRequirement"] = reflect.TypeOf((*ArrayOfStorageRequirement)(nil)).Elem()
    +}
    +
    +type ArrayOfString struct {
    +	String []string `xml:"string,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfString"] = reflect.TypeOf((*ArrayOfString)(nil)).Elem()
    +}
    +
    +type ArrayOfStructuredCustomizations struct {
    +	StructuredCustomizations []StructuredCustomizations `xml:"StructuredCustomizations,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfStructuredCustomizations"] = reflect.TypeOf((*ArrayOfStructuredCustomizations)(nil)).Elem()
    +}
    +
    +type ArrayOfSystemEventInfo struct {
    +	SystemEventInfo []SystemEventInfo `xml:"SystemEventInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfSystemEventInfo"] = reflect.TypeOf((*ArrayOfSystemEventInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfTag struct {
    +	Tag []Tag `xml:"Tag,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfTag"] = reflect.TypeOf((*ArrayOfTag)(nil)).Elem()
    +}
    +
    +type ArrayOfTaskInfo struct {
    +	TaskInfo []TaskInfo `xml:"TaskInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfTaskInfo"] = reflect.TypeOf((*ArrayOfTaskInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfTaskInfoState struct {
    +	TaskInfoState []TaskInfoState `xml:"TaskInfoState,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfTaskInfoState"] = reflect.TypeOf((*ArrayOfTaskInfoState)(nil)).Elem()
    +}
    +
    +type ArrayOfTypeDescription struct {
    +	TypeDescription []BaseTypeDescription `xml:"TypeDescription,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfTypeDescription"] = reflect.TypeOf((*ArrayOfTypeDescription)(nil)).Elem()
    +}
    +
    +type ArrayOfUpdateVirtualMachineFilesResultFailedVmFileInfo struct {
    +	UpdateVirtualMachineFilesResultFailedVmFileInfo []UpdateVirtualMachineFilesResultFailedVmFileInfo `xml:"UpdateVirtualMachineFilesResultFailedVmFileInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfUpdateVirtualMachineFilesResultFailedVmFileInfo"] = reflect.TypeOf((*ArrayOfUpdateVirtualMachineFilesResultFailedVmFileInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfUsbScanCodeSpecKeyEvent struct {
    +	UsbScanCodeSpecKeyEvent []UsbScanCodeSpecKeyEvent `xml:"UsbScanCodeSpecKeyEvent,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfUsbScanCodeSpecKeyEvent"] = reflect.TypeOf((*ArrayOfUsbScanCodeSpecKeyEvent)(nil)).Elem()
    +}
    +
    +type ArrayOfUserGroupProfile struct {
    +	UserGroupProfile []UserGroupProfile `xml:"UserGroupProfile,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfUserGroupProfile"] = reflect.TypeOf((*ArrayOfUserGroupProfile)(nil)).Elem()
    +}
    +
    +type ArrayOfUserPrivilegeResult struct {
    +	UserPrivilegeResult []UserPrivilegeResult `xml:"UserPrivilegeResult,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfUserPrivilegeResult"] = reflect.TypeOf((*ArrayOfUserPrivilegeResult)(nil)).Elem()
    +}
    +
    +type ArrayOfUserProfile struct {
    +	UserProfile []UserProfile `xml:"UserProfile,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfUserProfile"] = reflect.TypeOf((*ArrayOfUserProfile)(nil)).Elem()
    +}
    +
    +type ArrayOfUserSearchResult struct {
    +	UserSearchResult []BaseUserSearchResult `xml:"UserSearchResult,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfUserSearchResult"] = reflect.TypeOf((*ArrayOfUserSearchResult)(nil)).Elem()
    +}
    +
    +type ArrayOfUserSession struct {
    +	UserSession []UserSession `xml:"UserSession,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfUserSession"] = reflect.TypeOf((*ArrayOfUserSession)(nil)).Elem()
    +}
    +
    +type ArrayOfVASAStorageArray struct {
    +	VASAStorageArray []VASAStorageArray `xml:"VASAStorageArray,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVASAStorageArray"] = reflect.TypeOf((*ArrayOfVASAStorageArray)(nil)).Elem()
    +}
    +
    +type ArrayOfVAppCloneSpecNetworkMappingPair struct {
    +	VAppCloneSpecNetworkMappingPair []VAppCloneSpecNetworkMappingPair `xml:"VAppCloneSpecNetworkMappingPair,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVAppCloneSpecNetworkMappingPair"] = reflect.TypeOf((*ArrayOfVAppCloneSpecNetworkMappingPair)(nil)).Elem()
    +}
    +
    +type ArrayOfVAppCloneSpecResourceMap struct {
    +	VAppCloneSpecResourceMap []VAppCloneSpecResourceMap `xml:"VAppCloneSpecResourceMap,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVAppCloneSpecResourceMap"] = reflect.TypeOf((*ArrayOfVAppCloneSpecResourceMap)(nil)).Elem()
    +}
    +
    +type ArrayOfVAppEntityConfigInfo struct {
    +	VAppEntityConfigInfo []VAppEntityConfigInfo `xml:"VAppEntityConfigInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVAppEntityConfigInfo"] = reflect.TypeOf((*ArrayOfVAppEntityConfigInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfVAppOvfSectionInfo struct {
    +	VAppOvfSectionInfo []VAppOvfSectionInfo `xml:"VAppOvfSectionInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVAppOvfSectionInfo"] = reflect.TypeOf((*ArrayOfVAppOvfSectionInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfVAppOvfSectionSpec struct {
    +	VAppOvfSectionSpec []VAppOvfSectionSpec `xml:"VAppOvfSectionSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVAppOvfSectionSpec"] = reflect.TypeOf((*ArrayOfVAppOvfSectionSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfVAppProductInfo struct {
    +	VAppProductInfo []VAppProductInfo `xml:"VAppProductInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVAppProductInfo"] = reflect.TypeOf((*ArrayOfVAppProductInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfVAppProductSpec struct {
    +	VAppProductSpec []VAppProductSpec `xml:"VAppProductSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVAppProductSpec"] = reflect.TypeOf((*ArrayOfVAppProductSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfVAppPropertyInfo struct {
    +	VAppPropertyInfo []VAppPropertyInfo `xml:"VAppPropertyInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVAppPropertyInfo"] = reflect.TypeOf((*ArrayOfVAppPropertyInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfVAppPropertySpec struct {
    +	VAppPropertySpec []VAppPropertySpec `xml:"VAppPropertySpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVAppPropertySpec"] = reflect.TypeOf((*ArrayOfVAppPropertySpec)(nil)).Elem()
    +}
    +
    +type ArrayOfVMwareDVSPvlanConfigSpec struct {
    +	VMwareDVSPvlanConfigSpec []VMwareDVSPvlanConfigSpec `xml:"VMwareDVSPvlanConfigSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVMwareDVSPvlanConfigSpec"] = reflect.TypeOf((*ArrayOfVMwareDVSPvlanConfigSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfVMwareDVSPvlanMapEntry struct {
    +	VMwareDVSPvlanMapEntry []VMwareDVSPvlanMapEntry `xml:"VMwareDVSPvlanMapEntry,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVMwareDVSPvlanMapEntry"] = reflect.TypeOf((*ArrayOfVMwareDVSPvlanMapEntry)(nil)).Elem()
    +}
    +
    +type ArrayOfVMwareDVSVspanConfigSpec struct {
    +	VMwareDVSVspanConfigSpec []VMwareDVSVspanConfigSpec `xml:"VMwareDVSVspanConfigSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVMwareDVSVspanConfigSpec"] = reflect.TypeOf((*ArrayOfVMwareDVSVspanConfigSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfVMwareDvsLacpGroupConfig struct {
    +	VMwareDvsLacpGroupConfig []VMwareDvsLacpGroupConfig `xml:"VMwareDvsLacpGroupConfig,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVMwareDvsLacpGroupConfig"] = reflect.TypeOf((*ArrayOfVMwareDvsLacpGroupConfig)(nil)).Elem()
    +}
    +
    +type ArrayOfVMwareDvsLacpGroupSpec struct {
    +	VMwareDvsLacpGroupSpec []VMwareDvsLacpGroupSpec `xml:"VMwareDvsLacpGroupSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVMwareDvsLacpGroupSpec"] = reflect.TypeOf((*ArrayOfVMwareDvsLacpGroupSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfVMwareVspanSession struct {
    +	VMwareVspanSession []VMwareVspanSession `xml:"VMwareVspanSession,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVMwareVspanSession"] = reflect.TypeOf((*ArrayOfVMwareVspanSession)(nil)).Elem()
    +}
    +
    +type ArrayOfVStorageObjectAssociations struct {
    +	VStorageObjectAssociations []VStorageObjectAssociations `xml:"VStorageObjectAssociations,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVStorageObjectAssociations"] = reflect.TypeOf((*ArrayOfVStorageObjectAssociations)(nil)).Elem()
    +}
    +
    +type ArrayOfVStorageObjectAssociationsVmDiskAssociations struct {
    +	VStorageObjectAssociationsVmDiskAssociations []VStorageObjectAssociationsVmDiskAssociations `xml:"VStorageObjectAssociationsVmDiskAssociations,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVStorageObjectAssociationsVmDiskAssociations"] = reflect.TypeOf((*ArrayOfVStorageObjectAssociationsVmDiskAssociations)(nil)).Elem()
    +}
    +
    +type ArrayOfVStorageObjectSnapshotInfoVStorageObjectSnapshot struct {
    +	VStorageObjectSnapshotInfoVStorageObjectSnapshot []VStorageObjectSnapshotInfoVStorageObjectSnapshot `xml:"VStorageObjectSnapshotInfoVStorageObjectSnapshot,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVStorageObjectSnapshotInfoVStorageObjectSnapshot"] = reflect.TypeOf((*ArrayOfVStorageObjectSnapshotInfoVStorageObjectSnapshot)(nil)).Elem()
    +}
    +
    +type ArrayOfVVolHostPE struct {
    +	VVolHostPE []VVolHostPE `xml:"VVolHostPE,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVVolHostPE"] = reflect.TypeOf((*ArrayOfVVolHostPE)(nil)).Elem()
    +}
    +
    +type ArrayOfVVolVmConfigFileUpdateResultFailedVmConfigFileInfo struct {
    +	VVolVmConfigFileUpdateResultFailedVmConfigFileInfo []VVolVmConfigFileUpdateResultFailedVmConfigFileInfo `xml:"VVolVmConfigFileUpdateResultFailedVmConfigFileInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVVolVmConfigFileUpdateResultFailedVmConfigFileInfo"] = reflect.TypeOf((*ArrayOfVVolVmConfigFileUpdateResultFailedVmConfigFileInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfVchaNodeRuntimeInfo struct {
    +	VchaNodeRuntimeInfo []VchaNodeRuntimeInfo `xml:"VchaNodeRuntimeInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVchaNodeRuntimeInfo"] = reflect.TypeOf((*ArrayOfVchaNodeRuntimeInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfVimVasaProviderInfo struct {
    +	VimVasaProviderInfo []VimVasaProviderInfo `xml:"VimVasaProviderInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVimVasaProviderInfo"] = reflect.TypeOf((*ArrayOfVimVasaProviderInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfVimVasaProviderStatePerArray struct {
    +	VimVasaProviderStatePerArray []VimVasaProviderStatePerArray `xml:"VimVasaProviderStatePerArray,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVimVasaProviderStatePerArray"] = reflect.TypeOf((*ArrayOfVimVasaProviderStatePerArray)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualAppLinkInfo struct {
    +	VirtualAppLinkInfo []VirtualAppLinkInfo `xml:"VirtualAppLinkInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualAppLinkInfo"] = reflect.TypeOf((*ArrayOfVirtualAppLinkInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualDevice struct {
    +	VirtualDevice []BaseVirtualDevice `xml:"VirtualDevice,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualDevice"] = reflect.TypeOf((*ArrayOfVirtualDevice)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualDeviceBackingOption struct {
    +	VirtualDeviceBackingOption []BaseVirtualDeviceBackingOption `xml:"VirtualDeviceBackingOption,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualDeviceBackingOption"] = reflect.TypeOf((*ArrayOfVirtualDeviceBackingOption)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualDeviceConfigSpec struct {
    +	VirtualDeviceConfigSpec []BaseVirtualDeviceConfigSpec `xml:"VirtualDeviceConfigSpec,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualDeviceConfigSpec"] = reflect.TypeOf((*ArrayOfVirtualDeviceConfigSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualDeviceOption struct {
    +	VirtualDeviceOption []BaseVirtualDeviceOption `xml:"VirtualDeviceOption,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualDeviceOption"] = reflect.TypeOf((*ArrayOfVirtualDeviceOption)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualDisk struct {
    +	VirtualDisk []VirtualDisk `xml:"VirtualDisk,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualDisk"] = reflect.TypeOf((*ArrayOfVirtualDisk)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualDiskDeltaDiskFormatsSupported struct {
    +	VirtualDiskDeltaDiskFormatsSupported []VirtualDiskDeltaDiskFormatsSupported `xml:"VirtualDiskDeltaDiskFormatsSupported,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualDiskDeltaDiskFormatsSupported"] = reflect.TypeOf((*ArrayOfVirtualDiskDeltaDiskFormatsSupported)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualDiskId struct {
    +	VirtualDiskId []VirtualDiskId `xml:"VirtualDiskId,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualDiskId"] = reflect.TypeOf((*ArrayOfVirtualDiskId)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualDiskRuleSpec struct {
    +	VirtualDiskRuleSpec []VirtualDiskRuleSpec `xml:"VirtualDiskRuleSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualDiskRuleSpec"] = reflect.TypeOf((*ArrayOfVirtualDiskRuleSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualMachineBootOptionsBootableDevice struct {
    +	VirtualMachineBootOptionsBootableDevice []BaseVirtualMachineBootOptionsBootableDevice `xml:"VirtualMachineBootOptionsBootableDevice,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualMachineBootOptionsBootableDevice"] = reflect.TypeOf((*ArrayOfVirtualMachineBootOptionsBootableDevice)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualMachineCdromInfo struct {
    +	VirtualMachineCdromInfo []VirtualMachineCdromInfo `xml:"VirtualMachineCdromInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualMachineCdromInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineCdromInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualMachineConfigInfoDatastoreUrlPair struct {
    +	VirtualMachineConfigInfoDatastoreUrlPair []VirtualMachineConfigInfoDatastoreUrlPair `xml:"VirtualMachineConfigInfoDatastoreUrlPair,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualMachineConfigInfoDatastoreUrlPair"] = reflect.TypeOf((*ArrayOfVirtualMachineConfigInfoDatastoreUrlPair)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualMachineConfigOptionDescriptor struct {
    +	VirtualMachineConfigOptionDescriptor []VirtualMachineConfigOptionDescriptor `xml:"VirtualMachineConfigOptionDescriptor,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualMachineConfigOptionDescriptor"] = reflect.TypeOf((*ArrayOfVirtualMachineConfigOptionDescriptor)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualMachineCpuIdInfoSpec struct {
    +	VirtualMachineCpuIdInfoSpec []VirtualMachineCpuIdInfoSpec `xml:"VirtualMachineCpuIdInfoSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualMachineCpuIdInfoSpec"] = reflect.TypeOf((*ArrayOfVirtualMachineCpuIdInfoSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualMachineDatastoreInfo struct {
    +	VirtualMachineDatastoreInfo []VirtualMachineDatastoreInfo `xml:"VirtualMachineDatastoreInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualMachineDatastoreInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineDatastoreInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualMachineDatastoreVolumeOption struct {
    +	VirtualMachineDatastoreVolumeOption []VirtualMachineDatastoreVolumeOption `xml:"VirtualMachineDatastoreVolumeOption,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualMachineDatastoreVolumeOption"] = reflect.TypeOf((*ArrayOfVirtualMachineDatastoreVolumeOption)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualMachineDeviceRuntimeInfo struct {
    +	VirtualMachineDeviceRuntimeInfo []VirtualMachineDeviceRuntimeInfo `xml:"VirtualMachineDeviceRuntimeInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualMachineDeviceRuntimeInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineDeviceRuntimeInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualMachineDisplayTopology struct {
    +	VirtualMachineDisplayTopology []VirtualMachineDisplayTopology `xml:"VirtualMachineDisplayTopology,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualMachineDisplayTopology"] = reflect.TypeOf((*ArrayOfVirtualMachineDisplayTopology)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualMachineFeatureRequirement struct {
    +	VirtualMachineFeatureRequirement []VirtualMachineFeatureRequirement `xml:"VirtualMachineFeatureRequirement,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualMachineFeatureRequirement"] = reflect.TypeOf((*ArrayOfVirtualMachineFeatureRequirement)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualMachineFileLayoutDiskLayout struct {
    +	VirtualMachineFileLayoutDiskLayout []VirtualMachineFileLayoutDiskLayout `xml:"VirtualMachineFileLayoutDiskLayout,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualMachineFileLayoutDiskLayout"] = reflect.TypeOf((*ArrayOfVirtualMachineFileLayoutDiskLayout)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualMachineFileLayoutExDiskLayout struct {
    +	VirtualMachineFileLayoutExDiskLayout []VirtualMachineFileLayoutExDiskLayout `xml:"VirtualMachineFileLayoutExDiskLayout,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualMachineFileLayoutExDiskLayout"] = reflect.TypeOf((*ArrayOfVirtualMachineFileLayoutExDiskLayout)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualMachineFileLayoutExDiskUnit struct {
    +	VirtualMachineFileLayoutExDiskUnit []VirtualMachineFileLayoutExDiskUnit `xml:"VirtualMachineFileLayoutExDiskUnit,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualMachineFileLayoutExDiskUnit"] = reflect.TypeOf((*ArrayOfVirtualMachineFileLayoutExDiskUnit)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualMachineFileLayoutExFileInfo struct {
    +	VirtualMachineFileLayoutExFileInfo []VirtualMachineFileLayoutExFileInfo `xml:"VirtualMachineFileLayoutExFileInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualMachineFileLayoutExFileInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineFileLayoutExFileInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualMachineFileLayoutExSnapshotLayout struct {
    +	VirtualMachineFileLayoutExSnapshotLayout []VirtualMachineFileLayoutExSnapshotLayout `xml:"VirtualMachineFileLayoutExSnapshotLayout,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualMachineFileLayoutExSnapshotLayout"] = reflect.TypeOf((*ArrayOfVirtualMachineFileLayoutExSnapshotLayout)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualMachineFileLayoutSnapshotLayout struct {
    +	VirtualMachineFileLayoutSnapshotLayout []VirtualMachineFileLayoutSnapshotLayout `xml:"VirtualMachineFileLayoutSnapshotLayout,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualMachineFileLayoutSnapshotLayout"] = reflect.TypeOf((*ArrayOfVirtualMachineFileLayoutSnapshotLayout)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualMachineFloppyInfo struct {
    +	VirtualMachineFloppyInfo []VirtualMachineFloppyInfo `xml:"VirtualMachineFloppyInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualMachineFloppyInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineFloppyInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualMachineIdeDiskDeviceInfo struct {
    +	VirtualMachineIdeDiskDeviceInfo []VirtualMachineIdeDiskDeviceInfo `xml:"VirtualMachineIdeDiskDeviceInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualMachineIdeDiskDeviceInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineIdeDiskDeviceInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualMachineIdeDiskDevicePartitionInfo struct {
    +	VirtualMachineIdeDiskDevicePartitionInfo []VirtualMachineIdeDiskDevicePartitionInfo `xml:"VirtualMachineIdeDiskDevicePartitionInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualMachineIdeDiskDevicePartitionInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineIdeDiskDevicePartitionInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualMachineLegacyNetworkSwitchInfo struct {
    +	VirtualMachineLegacyNetworkSwitchInfo []VirtualMachineLegacyNetworkSwitchInfo `xml:"VirtualMachineLegacyNetworkSwitchInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualMachineLegacyNetworkSwitchInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineLegacyNetworkSwitchInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualMachineMessage struct {
    +	VirtualMachineMessage []VirtualMachineMessage `xml:"VirtualMachineMessage,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualMachineMessage"] = reflect.TypeOf((*ArrayOfVirtualMachineMessage)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualMachineMetadataManagerVmMetadataInput struct {
    +	VirtualMachineMetadataManagerVmMetadataInput []VirtualMachineMetadataManagerVmMetadataInput `xml:"VirtualMachineMetadataManagerVmMetadataInput,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualMachineMetadataManagerVmMetadataInput"] = reflect.TypeOf((*ArrayOfVirtualMachineMetadataManagerVmMetadataInput)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualMachineMetadataManagerVmMetadataResult struct {
    +	VirtualMachineMetadataManagerVmMetadataResult []VirtualMachineMetadataManagerVmMetadataResult `xml:"VirtualMachineMetadataManagerVmMetadataResult,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualMachineMetadataManagerVmMetadataResult"] = reflect.TypeOf((*ArrayOfVirtualMachineMetadataManagerVmMetadataResult)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualMachineNetworkInfo struct {
    +	VirtualMachineNetworkInfo []VirtualMachineNetworkInfo `xml:"VirtualMachineNetworkInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualMachineNetworkInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineNetworkInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualMachineParallelInfo struct {
    +	VirtualMachineParallelInfo []VirtualMachineParallelInfo `xml:"VirtualMachineParallelInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualMachineParallelInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineParallelInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualMachinePciPassthroughInfo struct {
    +	VirtualMachinePciPassthroughInfo []BaseVirtualMachinePciPassthroughInfo `xml:"VirtualMachinePciPassthroughInfo,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualMachinePciPassthroughInfo"] = reflect.TypeOf((*ArrayOfVirtualMachinePciPassthroughInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualMachinePciSharedGpuPassthroughInfo struct {
    +	VirtualMachinePciSharedGpuPassthroughInfo []VirtualMachinePciSharedGpuPassthroughInfo `xml:"VirtualMachinePciSharedGpuPassthroughInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualMachinePciSharedGpuPassthroughInfo"] = reflect.TypeOf((*ArrayOfVirtualMachinePciSharedGpuPassthroughInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualMachineProfileDetailsDiskProfileDetails struct {
    +	VirtualMachineProfileDetailsDiskProfileDetails []VirtualMachineProfileDetailsDiskProfileDetails `xml:"VirtualMachineProfileDetailsDiskProfileDetails,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualMachineProfileDetailsDiskProfileDetails"] = reflect.TypeOf((*ArrayOfVirtualMachineProfileDetailsDiskProfileDetails)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualMachineProfileSpec struct {
    +	VirtualMachineProfileSpec []BaseVirtualMachineProfileSpec `xml:"VirtualMachineProfileSpec,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualMachineProfileSpec"] = reflect.TypeOf((*ArrayOfVirtualMachineProfileSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualMachinePropertyRelation struct {
    +	VirtualMachinePropertyRelation []VirtualMachinePropertyRelation `xml:"VirtualMachinePropertyRelation,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualMachinePropertyRelation"] = reflect.TypeOf((*ArrayOfVirtualMachinePropertyRelation)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualMachineRelocateSpecDiskLocator struct {
    +	VirtualMachineRelocateSpecDiskLocator []VirtualMachineRelocateSpecDiskLocator `xml:"VirtualMachineRelocateSpecDiskLocator,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualMachineRelocateSpecDiskLocator"] = reflect.TypeOf((*ArrayOfVirtualMachineRelocateSpecDiskLocator)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualMachineScsiDiskDeviceInfo struct {
    +	VirtualMachineScsiDiskDeviceInfo []VirtualMachineScsiDiskDeviceInfo `xml:"VirtualMachineScsiDiskDeviceInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualMachineScsiDiskDeviceInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineScsiDiskDeviceInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualMachineScsiPassthroughInfo struct {
    +	VirtualMachineScsiPassthroughInfo []VirtualMachineScsiPassthroughInfo `xml:"VirtualMachineScsiPassthroughInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualMachineScsiPassthroughInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineScsiPassthroughInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualMachineSerialInfo struct {
    +	VirtualMachineSerialInfo []VirtualMachineSerialInfo `xml:"VirtualMachineSerialInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualMachineSerialInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineSerialInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualMachineSnapshotTree struct {
    +	VirtualMachineSnapshotTree []VirtualMachineSnapshotTree `xml:"VirtualMachineSnapshotTree,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualMachineSnapshotTree"] = reflect.TypeOf((*ArrayOfVirtualMachineSnapshotTree)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualMachineSoundInfo struct {
    +	VirtualMachineSoundInfo []VirtualMachineSoundInfo `xml:"VirtualMachineSoundInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualMachineSoundInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineSoundInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualMachineSriovInfo struct {
    +	VirtualMachineSriovInfo []VirtualMachineSriovInfo `xml:"VirtualMachineSriovInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualMachineSriovInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineSriovInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualMachineSummary struct {
    +	VirtualMachineSummary []VirtualMachineSummary `xml:"VirtualMachineSummary,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualMachineSummary"] = reflect.TypeOf((*ArrayOfVirtualMachineSummary)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualMachineUsageOnDatastore struct {
    +	VirtualMachineUsageOnDatastore []VirtualMachineUsageOnDatastore `xml:"VirtualMachineUsageOnDatastore,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualMachineUsageOnDatastore"] = reflect.TypeOf((*ArrayOfVirtualMachineUsageOnDatastore)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualMachineUsbInfo struct {
    +	VirtualMachineUsbInfo []VirtualMachineUsbInfo `xml:"VirtualMachineUsbInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualMachineUsbInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineUsbInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualMachineVFlashModuleInfo struct {
    +	VirtualMachineVFlashModuleInfo []VirtualMachineVFlashModuleInfo `xml:"VirtualMachineVFlashModuleInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualMachineVFlashModuleInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineVFlashModuleInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualMachineVMCIDeviceFilterSpec struct {
    +	VirtualMachineVMCIDeviceFilterSpec []VirtualMachineVMCIDeviceFilterSpec `xml:"VirtualMachineVMCIDeviceFilterSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualMachineVMCIDeviceFilterSpec"] = reflect.TypeOf((*ArrayOfVirtualMachineVMCIDeviceFilterSpec)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualNicManagerNetConfig struct {
    +	VirtualNicManagerNetConfig []VirtualNicManagerNetConfig `xml:"VirtualNicManagerNetConfig,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualNicManagerNetConfig"] = reflect.TypeOf((*ArrayOfVirtualNicManagerNetConfig)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualSCSISharing struct {
    +	VirtualSCSISharing []VirtualSCSISharing `xml:"VirtualSCSISharing,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualSCSISharing"] = reflect.TypeOf((*ArrayOfVirtualSCSISharing)(nil)).Elem()
    +}
    +
    +type ArrayOfVirtualSwitchProfile struct {
    +	VirtualSwitchProfile []VirtualSwitchProfile `xml:"VirtualSwitchProfile,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVirtualSwitchProfile"] = reflect.TypeOf((*ArrayOfVirtualSwitchProfile)(nil)).Elem()
    +}
    +
    +type ArrayOfVmEventArgument struct {
    +	VmEventArgument []VmEventArgument `xml:"VmEventArgument,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVmEventArgument"] = reflect.TypeOf((*ArrayOfVmEventArgument)(nil)).Elem()
    +}
    +
    +type ArrayOfVmPodConfigForPlacement struct {
    +	VmPodConfigForPlacement []VmPodConfigForPlacement `xml:"VmPodConfigForPlacement,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVmPodConfigForPlacement"] = reflect.TypeOf((*ArrayOfVmPodConfigForPlacement)(nil)).Elem()
    +}
    +
    +type ArrayOfVmPortGroupProfile struct {
    +	VmPortGroupProfile []VmPortGroupProfile `xml:"VmPortGroupProfile,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVmPortGroupProfile"] = reflect.TypeOf((*ArrayOfVmPortGroupProfile)(nil)).Elem()
    +}
    +
    +type ArrayOfVmfsConfigOption struct {
    +	VmfsConfigOption []VmfsConfigOption `xml:"VmfsConfigOption,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVmfsConfigOption"] = reflect.TypeOf((*ArrayOfVmfsConfigOption)(nil)).Elem()
    +}
    +
    +type ArrayOfVmfsDatastoreOption struct {
    +	VmfsDatastoreOption []VmfsDatastoreOption `xml:"VmfsDatastoreOption,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVmfsDatastoreOption"] = reflect.TypeOf((*ArrayOfVmfsDatastoreOption)(nil)).Elem()
    +}
    +
    +type ArrayOfVnicPortArgument struct {
    +	VnicPortArgument []VnicPortArgument `xml:"VnicPortArgument,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVnicPortArgument"] = reflect.TypeOf((*ArrayOfVnicPortArgument)(nil)).Elem()
    +}
    +
    +type ArrayOfVsanHostConfigInfo struct {
    +	VsanHostConfigInfo []VsanHostConfigInfo `xml:"VsanHostConfigInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVsanHostConfigInfo"] = reflect.TypeOf((*ArrayOfVsanHostConfigInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfVsanHostConfigInfoNetworkInfoPortConfig struct {
    +	VsanHostConfigInfoNetworkInfoPortConfig []VsanHostConfigInfoNetworkInfoPortConfig `xml:"VsanHostConfigInfoNetworkInfoPortConfig,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVsanHostConfigInfoNetworkInfoPortConfig"] = reflect.TypeOf((*ArrayOfVsanHostConfigInfoNetworkInfoPortConfig)(nil)).Elem()
    +}
    +
    +type ArrayOfVsanHostDiskMapInfo struct {
    +	VsanHostDiskMapInfo []VsanHostDiskMapInfo `xml:"VsanHostDiskMapInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVsanHostDiskMapInfo"] = reflect.TypeOf((*ArrayOfVsanHostDiskMapInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfVsanHostDiskMapResult struct {
    +	VsanHostDiskMapResult []VsanHostDiskMapResult `xml:"VsanHostDiskMapResult,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVsanHostDiskMapResult"] = reflect.TypeOf((*ArrayOfVsanHostDiskMapResult)(nil)).Elem()
    +}
    +
    +type ArrayOfVsanHostDiskMapping struct {
    +	VsanHostDiskMapping []VsanHostDiskMapping `xml:"VsanHostDiskMapping,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVsanHostDiskMapping"] = reflect.TypeOf((*ArrayOfVsanHostDiskMapping)(nil)).Elem()
    +}
    +
    +type ArrayOfVsanHostDiskResult struct {
    +	VsanHostDiskResult []VsanHostDiskResult `xml:"VsanHostDiskResult,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVsanHostDiskResult"] = reflect.TypeOf((*ArrayOfVsanHostDiskResult)(nil)).Elem()
    +}
    +
    +type ArrayOfVsanHostMembershipInfo struct {
    +	VsanHostMembershipInfo []VsanHostMembershipInfo `xml:"VsanHostMembershipInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVsanHostMembershipInfo"] = reflect.TypeOf((*ArrayOfVsanHostMembershipInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfVsanHostRuntimeInfoDiskIssue struct {
    +	VsanHostRuntimeInfoDiskIssue []VsanHostRuntimeInfoDiskIssue `xml:"VsanHostRuntimeInfoDiskIssue,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVsanHostRuntimeInfoDiskIssue"] = reflect.TypeOf((*ArrayOfVsanHostRuntimeInfoDiskIssue)(nil)).Elem()
    +}
    +
    +type ArrayOfVsanNewPolicyBatch struct {
    +	VsanNewPolicyBatch []VsanNewPolicyBatch `xml:"VsanNewPolicyBatch,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVsanNewPolicyBatch"] = reflect.TypeOf((*ArrayOfVsanNewPolicyBatch)(nil)).Elem()
    +}
    +
    +type ArrayOfVsanPolicyChangeBatch struct {
    +	VsanPolicyChangeBatch []VsanPolicyChangeBatch `xml:"VsanPolicyChangeBatch,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVsanPolicyChangeBatch"] = reflect.TypeOf((*ArrayOfVsanPolicyChangeBatch)(nil)).Elem()
    +}
    +
    +type ArrayOfVsanPolicySatisfiability struct {
    +	VsanPolicySatisfiability []VsanPolicySatisfiability `xml:"VsanPolicySatisfiability,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVsanPolicySatisfiability"] = reflect.TypeOf((*ArrayOfVsanPolicySatisfiability)(nil)).Elem()
    +}
    +
    +type ArrayOfVsanUpgradeSystemNetworkPartitionInfo struct {
    +	VsanUpgradeSystemNetworkPartitionInfo []VsanUpgradeSystemNetworkPartitionInfo `xml:"VsanUpgradeSystemNetworkPartitionInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVsanUpgradeSystemNetworkPartitionInfo"] = reflect.TypeOf((*ArrayOfVsanUpgradeSystemNetworkPartitionInfo)(nil)).Elem()
    +}
    +
    +type ArrayOfVsanUpgradeSystemPreflightCheckIssue struct {
    +	VsanUpgradeSystemPreflightCheckIssue []BaseVsanUpgradeSystemPreflightCheckIssue `xml:"VsanUpgradeSystemPreflightCheckIssue,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfVsanUpgradeSystemPreflightCheckIssue"] = reflect.TypeOf((*ArrayOfVsanUpgradeSystemPreflightCheckIssue)(nil)).Elem()
    +}
    +
    +type ArrayOfVsanUpgradeSystemUpgradeHistoryItem struct {
    +	VsanUpgradeSystemUpgradeHistoryItem []BaseVsanUpgradeSystemUpgradeHistoryItem `xml:"VsanUpgradeSystemUpgradeHistoryItem,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayOfVsanUpgradeSystemUpgradeHistoryItem"] = reflect.TypeOf((*ArrayOfVsanUpgradeSystemUpgradeHistoryItem)(nil)).Elem()
    +}
    +
    +type ArrayOfVslmTagEntry struct {
    +	VslmTagEntry []VslmTagEntry `xml:"VslmTagEntry,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfVslmTagEntry"] = reflect.TypeOf((*ArrayOfVslmTagEntry)(nil)).Elem()
    +}
    +
    +type ArrayOfVslmInfrastructureObjectPolicy struct {
    +	VslmInfrastructureObjectPolicy []VslmInfrastructureObjectPolicy `xml:"vslmInfrastructureObjectPolicy,omitempty"`
    +}
    +
    +func init() {
    +	t["ArrayOfvslmInfrastructureObjectPolicy"] = reflect.TypeOf((*ArrayOfVslmInfrastructureObjectPolicy)(nil)).Elem()
    +}
    +
    +type ArrayUpdateSpec struct {
    +	DynamicData
    +
    +	Operation ArrayUpdateOperation `xml:"operation"`
    +	RemoveKey AnyType              `xml:"removeKey,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ArrayUpdateSpec"] = reflect.TypeOf((*ArrayUpdateSpec)(nil)).Elem()
    +}
    +
    +type AssignUserToGroup AssignUserToGroupRequestType
    +
    +func init() {
    +	t["AssignUserToGroup"] = reflect.TypeOf((*AssignUserToGroup)(nil)).Elem()
    +}
    +
    +type AssignUserToGroupRequestType struct {
    +	This  ManagedObjectReference `xml:"_this"`
    +	User  string                 `xml:"user"`
    +	Group string                 `xml:"group"`
    +}
    +
    +func init() {
    +	t["AssignUserToGroupRequestType"] = reflect.TypeOf((*AssignUserToGroupRequestType)(nil)).Elem()
    +}
    +
    +type AssignUserToGroupResponse struct {
    +}
    +
    +type AssociateProfile AssociateProfileRequestType
    +
    +func init() {
    +	t["AssociateProfile"] = reflect.TypeOf((*AssociateProfile)(nil)).Elem()
    +}
    +
    +type AssociateProfileRequestType struct {
    +	This   ManagedObjectReference   `xml:"_this"`
    +	Entity []ManagedObjectReference `xml:"entity"`
    +}
    +
    +func init() {
    +	t["AssociateProfileRequestType"] = reflect.TypeOf((*AssociateProfileRequestType)(nil)).Elem()
    +}
    +
    +type AssociateProfileResponse struct {
    +}
    +
    +type AttachDiskRequestType struct {
    +	This          ManagedObjectReference `xml:"_this"`
    +	DiskId        ID                     `xml:"diskId"`
    +	Datastore     ManagedObjectReference `xml:"datastore"`
    +	ControllerKey int32                  `xml:"controllerKey,omitempty"`
    +	UnitNumber    *int32                 `xml:"unitNumber"`
    +}
    +
    +func init() {
    +	t["AttachDiskRequestType"] = reflect.TypeOf((*AttachDiskRequestType)(nil)).Elem()
    +}
    +
    +type AttachDisk_Task AttachDiskRequestType
    +
    +func init() {
    +	t["AttachDisk_Task"] = reflect.TypeOf((*AttachDisk_Task)(nil)).Elem()
    +}
    +
    +type AttachDisk_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type AttachScsiLun AttachScsiLunRequestType
    +
    +func init() {
    +	t["AttachScsiLun"] = reflect.TypeOf((*AttachScsiLun)(nil)).Elem()
    +}
    +
    +type AttachScsiLunExRequestType struct {
    +	This    ManagedObjectReference `xml:"_this"`
    +	LunUuid []string               `xml:"lunUuid"`
    +}
    +
    +func init() {
    +	t["AttachScsiLunExRequestType"] = reflect.TypeOf((*AttachScsiLunExRequestType)(nil)).Elem()
    +}
    +
    +type AttachScsiLunEx_Task AttachScsiLunExRequestType
    +
    +func init() {
    +	t["AttachScsiLunEx_Task"] = reflect.TypeOf((*AttachScsiLunEx_Task)(nil)).Elem()
    +}
    +
    +type AttachScsiLunEx_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type AttachScsiLunRequestType struct {
    +	This    ManagedObjectReference `xml:"_this"`
    +	LunUuid string                 `xml:"lunUuid"`
    +}
    +
    +func init() {
    +	t["AttachScsiLunRequestType"] = reflect.TypeOf((*AttachScsiLunRequestType)(nil)).Elem()
    +}
    +
    +type AttachScsiLunResponse struct {
    +}
    +
    +type AttachTagToVStorageObject AttachTagToVStorageObjectRequestType
    +
    +func init() {
    +	t["AttachTagToVStorageObject"] = reflect.TypeOf((*AttachTagToVStorageObject)(nil)).Elem()
    +}
    +
    +type AttachTagToVStorageObjectRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	Id       ID                     `xml:"id"`
    +	Category string                 `xml:"category"`
    +	Tag      string                 `xml:"tag"`
    +}
    +
    +func init() {
    +	t["AttachTagToVStorageObjectRequestType"] = reflect.TypeOf((*AttachTagToVStorageObjectRequestType)(nil)).Elem()
    +}
    +
    +type AttachTagToVStorageObjectResponse struct {
    +}
    +
    +type AttachVmfsExtent AttachVmfsExtentRequestType
    +
    +func init() {
    +	t["AttachVmfsExtent"] = reflect.TypeOf((*AttachVmfsExtent)(nil)).Elem()
    +}
    +
    +type AttachVmfsExtentRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	VmfsPath string                 `xml:"vmfsPath"`
    +	Extent   HostScsiDiskPartition  `xml:"extent"`
    +}
    +
    +func init() {
    +	t["AttachVmfsExtentRequestType"] = reflect.TypeOf((*AttachVmfsExtentRequestType)(nil)).Elem()
    +}
    +
    +type AttachVmfsExtentResponse struct {
    +}
    +
    +type AuthMinimumAdminPermission struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["AuthMinimumAdminPermission"] = reflect.TypeOf((*AuthMinimumAdminPermission)(nil)).Elem()
    +}
    +
    +type AuthMinimumAdminPermissionFault AuthMinimumAdminPermission
    +
    +func init() {
    +	t["AuthMinimumAdminPermissionFault"] = reflect.TypeOf((*AuthMinimumAdminPermissionFault)(nil)).Elem()
    +}
    +
    +type AuthenticationProfile struct {
    +	ApplyProfile
    +
    +	ActiveDirectory *ActiveDirectoryProfile `xml:"activeDirectory,omitempty"`
    +}
    +
    +func init() {
    +	t["AuthenticationProfile"] = reflect.TypeOf((*AuthenticationProfile)(nil)).Elem()
    +}
    +
    +type AuthorizationDescription struct {
    +	DynamicData
    +
    +	Privilege      []BaseElementDescription `xml:"privilege,typeattr"`
    +	PrivilegeGroup []BaseElementDescription `xml:"privilegeGroup,typeattr"`
    +}
    +
    +func init() {
    +	t["AuthorizationDescription"] = reflect.TypeOf((*AuthorizationDescription)(nil)).Elem()
    +}
    +
    +type AuthorizationEvent struct {
    +	Event
    +}
    +
    +func init() {
    +	t["AuthorizationEvent"] = reflect.TypeOf((*AuthorizationEvent)(nil)).Elem()
    +}
    +
    +type AuthorizationPrivilege struct {
    +	DynamicData
    +
    +	PrivId        string `xml:"privId"`
    +	OnParent      bool   `xml:"onParent"`
    +	Name          string `xml:"name"`
    +	PrivGroupName string `xml:"privGroupName"`
    +}
    +
    +func init() {
    +	t["AuthorizationPrivilege"] = reflect.TypeOf((*AuthorizationPrivilege)(nil)).Elem()
    +}
    +
    +type AuthorizationRole struct {
    +	DynamicData
    +
    +	RoleId    int32           `xml:"roleId"`
    +	System    bool            `xml:"system"`
    +	Name      string          `xml:"name"`
    +	Info      BaseDescription `xml:"info,typeattr"`
    +	Privilege []string        `xml:"privilege,omitempty"`
    +}
    +
    +func init() {
    +	t["AuthorizationRole"] = reflect.TypeOf((*AuthorizationRole)(nil)).Elem()
    +}
    +
    +type AutoStartDefaults struct {
    +	DynamicData
    +
    +	Enabled          *bool  `xml:"enabled"`
    +	StartDelay       int32  `xml:"startDelay,omitempty"`
    +	StopDelay        int32  `xml:"stopDelay,omitempty"`
    +	WaitForHeartbeat *bool  `xml:"waitForHeartbeat"`
    +	StopAction       string `xml:"stopAction,omitempty"`
    +}
    +
    +func init() {
    +	t["AutoStartDefaults"] = reflect.TypeOf((*AutoStartDefaults)(nil)).Elem()
    +}
    +
    +type AutoStartPowerInfo struct {
    +	DynamicData
    +
    +	Key              ManagedObjectReference        `xml:"key"`
    +	StartOrder       int32                         `xml:"startOrder"`
    +	StartDelay       int32                         `xml:"startDelay"`
    +	WaitForHeartbeat AutoStartWaitHeartbeatSetting `xml:"waitForHeartbeat"`
    +	StartAction      string                        `xml:"startAction"`
    +	StopDelay        int32                         `xml:"stopDelay"`
    +	StopAction       string                        `xml:"stopAction"`
    +}
    +
    +func init() {
    +	t["AutoStartPowerInfo"] = reflect.TypeOf((*AutoStartPowerInfo)(nil)).Elem()
    +}
    +
    +type AutoStartPowerOff AutoStartPowerOffRequestType
    +
    +func init() {
    +	t["AutoStartPowerOff"] = reflect.TypeOf((*AutoStartPowerOff)(nil)).Elem()
    +}
    +
    +type AutoStartPowerOffRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["AutoStartPowerOffRequestType"] = reflect.TypeOf((*AutoStartPowerOffRequestType)(nil)).Elem()
    +}
    +
    +type AutoStartPowerOffResponse struct {
    +}
    +
    +type AutoStartPowerOn AutoStartPowerOnRequestType
    +
    +func init() {
    +	t["AutoStartPowerOn"] = reflect.TypeOf((*AutoStartPowerOn)(nil)).Elem()
    +}
    +
    +type AutoStartPowerOnRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["AutoStartPowerOnRequestType"] = reflect.TypeOf((*AutoStartPowerOnRequestType)(nil)).Elem()
    +}
    +
    +type AutoStartPowerOnResponse struct {
    +}
    +
    +type BackupBlobReadFailure struct {
    +	DvsFault
    +
    +	EntityName string               `xml:"entityName"`
    +	EntityType string               `xml:"entityType"`
    +	Fault      LocalizedMethodFault `xml:"fault"`
    +}
    +
    +func init() {
    +	t["BackupBlobReadFailure"] = reflect.TypeOf((*BackupBlobReadFailure)(nil)).Elem()
    +}
    +
    +type BackupBlobReadFailureFault BackupBlobReadFailure
    +
    +func init() {
    +	t["BackupBlobReadFailureFault"] = reflect.TypeOf((*BackupBlobReadFailureFault)(nil)).Elem()
    +}
    +
    +type BackupBlobWriteFailure struct {
    +	DvsFault
    +
    +	EntityName string               `xml:"entityName"`
    +	EntityType string               `xml:"entityType"`
    +	Fault      LocalizedMethodFault `xml:"fault"`
    +}
    +
    +func init() {
    +	t["BackupBlobWriteFailure"] = reflect.TypeOf((*BackupBlobWriteFailure)(nil)).Elem()
    +}
    +
    +type BackupBlobWriteFailureFault BackupBlobWriteFailure
    +
    +func init() {
    +	t["BackupBlobWriteFailureFault"] = reflect.TypeOf((*BackupBlobWriteFailureFault)(nil)).Elem()
    +}
    +
    +type BackupFirmwareConfiguration BackupFirmwareConfigurationRequestType
    +
    +func init() {
    +	t["BackupFirmwareConfiguration"] = reflect.TypeOf((*BackupFirmwareConfiguration)(nil)).Elem()
    +}
    +
    +type BackupFirmwareConfigurationRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["BackupFirmwareConfigurationRequestType"] = reflect.TypeOf((*BackupFirmwareConfigurationRequestType)(nil)).Elem()
    +}
    +
    +type BackupFirmwareConfigurationResponse struct {
    +	Returnval string `xml:"returnval"`
    +}
    +
    +type BadUsernameSessionEvent struct {
    +	SessionEvent
    +
    +	IpAddress string `xml:"ipAddress"`
    +}
    +
    +func init() {
    +	t["BadUsernameSessionEvent"] = reflect.TypeOf((*BadUsernameSessionEvent)(nil)).Elem()
    +}
    +
    +type BaseConfigInfo struct {
    +	DynamicData
    +
    +	Id                          ID                            `xml:"id"`
    +	Name                        string                        `xml:"name"`
    +	CreateTime                  time.Time                     `xml:"createTime"`
    +	KeepAfterDeleteVm           *bool                         `xml:"keepAfterDeleteVm"`
    +	RelocationDisabled          *bool                         `xml:"relocationDisabled"`
    +	NativeSnapshotSupported     *bool                         `xml:"nativeSnapshotSupported"`
    +	ChangedBlockTrackingEnabled *bool                         `xml:"changedBlockTrackingEnabled"`
    +	Backing                     BaseBaseConfigInfoBackingInfo `xml:"backing,typeattr"`
    +	Iofilter                    []string                      `xml:"iofilter,omitempty"`
    +}
    +
    +func init() {
    +	t["BaseConfigInfo"] = reflect.TypeOf((*BaseConfigInfo)(nil)).Elem()
    +}
    +
    +type BaseConfigInfoBackingInfo struct {
    +	DynamicData
    +
    +	Datastore ManagedObjectReference `xml:"datastore"`
    +}
    +
    +func init() {
    +	t["BaseConfigInfoBackingInfo"] = reflect.TypeOf((*BaseConfigInfoBackingInfo)(nil)).Elem()
    +}
    +
    +type BaseConfigInfoDiskFileBackingInfo struct {
    +	BaseConfigInfoFileBackingInfo
    +
    +	ProvisioningType string `xml:"provisioningType"`
    +}
    +
    +func init() {
    +	t["BaseConfigInfoDiskFileBackingInfo"] = reflect.TypeOf((*BaseConfigInfoDiskFileBackingInfo)(nil)).Elem()
    +}
    +
    +type BaseConfigInfoFileBackingInfo struct {
    +	BaseConfigInfoBackingInfo
    +
    +	FilePath        string                            `xml:"filePath"`
    +	BackingObjectId string                            `xml:"backingObjectId,omitempty"`
    +	Parent          BaseBaseConfigInfoFileBackingInfo `xml:"parent,omitempty,typeattr"`
    +	DeltaSizeInMB   int64                             `xml:"deltaSizeInMB,omitempty"`
    +}
    +
    +func init() {
    +	t["BaseConfigInfoFileBackingInfo"] = reflect.TypeOf((*BaseConfigInfoFileBackingInfo)(nil)).Elem()
    +}
    +
    +type BaseConfigInfoRawDiskMappingBackingInfo struct {
    +	BaseConfigInfoFileBackingInfo
    +
    +	LunUuid           string `xml:"lunUuid"`
    +	CompatibilityMode string `xml:"compatibilityMode"`
    +}
    +
    +func init() {
    +	t["BaseConfigInfoRawDiskMappingBackingInfo"] = reflect.TypeOf((*BaseConfigInfoRawDiskMappingBackingInfo)(nil)).Elem()
    +}
    +
    +type BatchResult struct {
    +	DynamicData
    +
    +	Result  string                  `xml:"result"`
    +	HostKey string                  `xml:"hostKey"`
    +	Ds      *ManagedObjectReference `xml:"ds,omitempty"`
    +	Fault   *LocalizedMethodFault   `xml:"fault,omitempty"`
    +}
    +
    +func init() {
    +	t["BatchResult"] = reflect.TypeOf((*BatchResult)(nil)).Elem()
    +}
    +
    +type BindVnic BindVnicRequestType
    +
    +func init() {
    +	t["BindVnic"] = reflect.TypeOf((*BindVnic)(nil)).Elem()
    +}
    +
    +type BindVnicRequestType struct {
    +	This         ManagedObjectReference `xml:"_this"`
    +	IScsiHbaName string                 `xml:"iScsiHbaName"`
    +	VnicDevice   string                 `xml:"vnicDevice"`
    +}
    +
    +func init() {
    +	t["BindVnicRequestType"] = reflect.TypeOf((*BindVnicRequestType)(nil)).Elem()
    +}
    +
    +type BindVnicResponse struct {
    +}
    +
    +type BlockedByFirewall struct {
    +	HostConfigFault
    +}
    +
    +func init() {
    +	t["BlockedByFirewall"] = reflect.TypeOf((*BlockedByFirewall)(nil)).Elem()
    +}
    +
    +type BlockedByFirewallFault BlockedByFirewall
    +
    +func init() {
    +	t["BlockedByFirewallFault"] = reflect.TypeOf((*BlockedByFirewallFault)(nil)).Elem()
    +}
    +
    +type BoolOption struct {
    +	OptionType
    +
    +	Supported    bool `xml:"supported"`
    +	DefaultValue bool `xml:"defaultValue"`
    +}
    +
    +func init() {
    +	t["BoolOption"] = reflect.TypeOf((*BoolOption)(nil)).Elem()
    +}
    +
    +type BoolPolicy struct {
    +	InheritablePolicy
    +
    +	Value *bool `xml:"value"`
    +}
    +
    +func init() {
    +	t["BoolPolicy"] = reflect.TypeOf((*BoolPolicy)(nil)).Elem()
    +}
    +
    +type BrowseDiagnosticLog BrowseDiagnosticLogRequestType
    +
    +func init() {
    +	t["BrowseDiagnosticLog"] = reflect.TypeOf((*BrowseDiagnosticLog)(nil)).Elem()
    +}
    +
    +type BrowseDiagnosticLogRequestType struct {
    +	This  ManagedObjectReference  `xml:"_this"`
    +	Host  *ManagedObjectReference `xml:"host,omitempty"`
    +	Key   string                  `xml:"key"`
    +	Start int32                   `xml:"start,omitempty"`
    +	Lines int32                   `xml:"lines,omitempty"`
    +}
    +
    +func init() {
    +	t["BrowseDiagnosticLogRequestType"] = reflect.TypeOf((*BrowseDiagnosticLogRequestType)(nil)).Elem()
    +}
    +
    +type BrowseDiagnosticLogResponse struct {
    +	Returnval DiagnosticManagerLogHeader `xml:"returnval"`
    +}
    +
    +type CAMServerRefusedConnection struct {
    +	InvalidCAMServer
    +}
    +
    +func init() {
    +	t["CAMServerRefusedConnection"] = reflect.TypeOf((*CAMServerRefusedConnection)(nil)).Elem()
    +}
    +
    +type CAMServerRefusedConnectionFault CAMServerRefusedConnection
    +
    +func init() {
    +	t["CAMServerRefusedConnectionFault"] = reflect.TypeOf((*CAMServerRefusedConnectionFault)(nil)).Elem()
    +}
    +
    +type CanProvisionObjects CanProvisionObjectsRequestType
    +
    +func init() {
    +	t["CanProvisionObjects"] = reflect.TypeOf((*CanProvisionObjects)(nil)).Elem()
    +}
    +
    +type CanProvisionObjectsRequestType struct {
    +	This                 ManagedObjectReference `xml:"_this"`
    +	Npbs                 []VsanNewPolicyBatch   `xml:"npbs"`
    +	IgnoreSatisfiability *bool                  `xml:"ignoreSatisfiability"`
    +}
    +
    +func init() {
    +	t["CanProvisionObjectsRequestType"] = reflect.TypeOf((*CanProvisionObjectsRequestType)(nil)).Elem()
    +}
    +
    +type CanProvisionObjectsResponse struct {
    +	Returnval []VsanPolicySatisfiability `xml:"returnval"`
    +}
    +
    +type CancelRecommendation CancelRecommendationRequestType
    +
    +func init() {
    +	t["CancelRecommendation"] = reflect.TypeOf((*CancelRecommendation)(nil)).Elem()
    +}
    +
    +type CancelRecommendationRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Key  string                 `xml:"key"`
    +}
    +
    +func init() {
    +	t["CancelRecommendationRequestType"] = reflect.TypeOf((*CancelRecommendationRequestType)(nil)).Elem()
    +}
    +
    +type CancelRecommendationResponse struct {
    +}
    +
    +type CancelRetrievePropertiesEx CancelRetrievePropertiesExRequestType
    +
    +func init() {
    +	t["CancelRetrievePropertiesEx"] = reflect.TypeOf((*CancelRetrievePropertiesEx)(nil)).Elem()
    +}
    +
    +type CancelRetrievePropertiesExRequestType struct {
    +	This  ManagedObjectReference `xml:"_this"`
    +	Token string                 `xml:"token"`
    +}
    +
    +func init() {
    +	t["CancelRetrievePropertiesExRequestType"] = reflect.TypeOf((*CancelRetrievePropertiesExRequestType)(nil)).Elem()
    +}
    +
    +type CancelRetrievePropertiesExResponse struct {
    +}
    +
    +type CancelStorageDrsRecommendation CancelStorageDrsRecommendationRequestType
    +
    +func init() {
    +	t["CancelStorageDrsRecommendation"] = reflect.TypeOf((*CancelStorageDrsRecommendation)(nil)).Elem()
    +}
    +
    +type CancelStorageDrsRecommendationRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Key  []string               `xml:"key"`
    +}
    +
    +func init() {
    +	t["CancelStorageDrsRecommendationRequestType"] = reflect.TypeOf((*CancelStorageDrsRecommendationRequestType)(nil)).Elem()
    +}
    +
    +type CancelStorageDrsRecommendationResponse struct {
    +}
    +
    +type CancelTask CancelTaskRequestType
    +
    +func init() {
    +	t["CancelTask"] = reflect.TypeOf((*CancelTask)(nil)).Elem()
    +}
    +
    +type CancelTaskRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["CancelTaskRequestType"] = reflect.TypeOf((*CancelTaskRequestType)(nil)).Elem()
    +}
    +
    +type CancelTaskResponse struct {
    +}
    +
    +type CancelWaitForUpdates CancelWaitForUpdatesRequestType
    +
    +func init() {
    +	t["CancelWaitForUpdates"] = reflect.TypeOf((*CancelWaitForUpdates)(nil)).Elem()
    +}
    +
    +type CancelWaitForUpdatesRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["CancelWaitForUpdatesRequestType"] = reflect.TypeOf((*CancelWaitForUpdatesRequestType)(nil)).Elem()
    +}
    +
    +type CancelWaitForUpdatesResponse struct {
    +}
    +
    +type CanceledHostOperationEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["CanceledHostOperationEvent"] = reflect.TypeOf((*CanceledHostOperationEvent)(nil)).Elem()
    +}
    +
    +type CannotAccessFile struct {
    +	FileFault
    +}
    +
    +func init() {
    +	t["CannotAccessFile"] = reflect.TypeOf((*CannotAccessFile)(nil)).Elem()
    +}
    +
    +type CannotAccessFileFault CannotAccessFile
    +
    +func init() {
    +	t["CannotAccessFileFault"] = reflect.TypeOf((*CannotAccessFileFault)(nil)).Elem()
    +}
    +
    +type CannotAccessLocalSource struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["CannotAccessLocalSource"] = reflect.TypeOf((*CannotAccessLocalSource)(nil)).Elem()
    +}
    +
    +type CannotAccessLocalSourceFault CannotAccessLocalSource
    +
    +func init() {
    +	t["CannotAccessLocalSourceFault"] = reflect.TypeOf((*CannotAccessLocalSourceFault)(nil)).Elem()
    +}
    +
    +type CannotAccessNetwork struct {
    +	CannotAccessVmDevice
    +
    +	Network *ManagedObjectReference `xml:"network,omitempty"`
    +}
    +
    +func init() {
    +	t["CannotAccessNetwork"] = reflect.TypeOf((*CannotAccessNetwork)(nil)).Elem()
    +}
    +
    +type CannotAccessNetworkFault BaseCannotAccessNetwork
    +
    +func init() {
    +	t["CannotAccessNetworkFault"] = reflect.TypeOf((*CannotAccessNetworkFault)(nil)).Elem()
    +}
    +
    +type CannotAccessVmComponent struct {
    +	VmConfigFault
    +}
    +
    +func init() {
    +	t["CannotAccessVmComponent"] = reflect.TypeOf((*CannotAccessVmComponent)(nil)).Elem()
    +}
    +
    +type CannotAccessVmComponentFault BaseCannotAccessVmComponent
    +
    +func init() {
    +	t["CannotAccessVmComponentFault"] = reflect.TypeOf((*CannotAccessVmComponentFault)(nil)).Elem()
    +}
    +
    +type CannotAccessVmConfig struct {
    +	CannotAccessVmComponent
    +
    +	Reason LocalizedMethodFault `xml:"reason"`
    +}
    +
    +func init() {
    +	t["CannotAccessVmConfig"] = reflect.TypeOf((*CannotAccessVmConfig)(nil)).Elem()
    +}
    +
    +type CannotAccessVmConfigFault CannotAccessVmConfig
    +
    +func init() {
    +	t["CannotAccessVmConfigFault"] = reflect.TypeOf((*CannotAccessVmConfigFault)(nil)).Elem()
    +}
    +
    +type CannotAccessVmDevice struct {
    +	CannotAccessVmComponent
    +
    +	Device    string `xml:"device"`
    +	Backing   string `xml:"backing"`
    +	Connected bool   `xml:"connected"`
    +}
    +
    +func init() {
    +	t["CannotAccessVmDevice"] = reflect.TypeOf((*CannotAccessVmDevice)(nil)).Elem()
    +}
    +
    +type CannotAccessVmDeviceFault BaseCannotAccessVmDevice
    +
    +func init() {
    +	t["CannotAccessVmDeviceFault"] = reflect.TypeOf((*CannotAccessVmDeviceFault)(nil)).Elem()
    +}
    +
    +type CannotAccessVmDisk struct {
    +	CannotAccessVmDevice
    +
    +	Fault LocalizedMethodFault `xml:"fault"`
    +}
    +
    +func init() {
    +	t["CannotAccessVmDisk"] = reflect.TypeOf((*CannotAccessVmDisk)(nil)).Elem()
    +}
    +
    +type CannotAccessVmDiskFault BaseCannotAccessVmDisk
    +
    +func init() {
    +	t["CannotAccessVmDiskFault"] = reflect.TypeOf((*CannotAccessVmDiskFault)(nil)).Elem()
    +}
    +
    +type CannotAddHostWithFTVmAsStandalone struct {
    +	HostConnectFault
    +}
    +
    +func init() {
    +	t["CannotAddHostWithFTVmAsStandalone"] = reflect.TypeOf((*CannotAddHostWithFTVmAsStandalone)(nil)).Elem()
    +}
    +
    +type CannotAddHostWithFTVmAsStandaloneFault CannotAddHostWithFTVmAsStandalone
    +
    +func init() {
    +	t["CannotAddHostWithFTVmAsStandaloneFault"] = reflect.TypeOf((*CannotAddHostWithFTVmAsStandaloneFault)(nil)).Elem()
    +}
    +
    +type CannotAddHostWithFTVmToDifferentCluster struct {
    +	HostConnectFault
    +}
    +
    +func init() {
    +	t["CannotAddHostWithFTVmToDifferentCluster"] = reflect.TypeOf((*CannotAddHostWithFTVmToDifferentCluster)(nil)).Elem()
    +}
    +
    +type CannotAddHostWithFTVmToDifferentClusterFault CannotAddHostWithFTVmToDifferentCluster
    +
    +func init() {
    +	t["CannotAddHostWithFTVmToDifferentClusterFault"] = reflect.TypeOf((*CannotAddHostWithFTVmToDifferentClusterFault)(nil)).Elem()
    +}
    +
    +type CannotAddHostWithFTVmToNonHACluster struct {
    +	HostConnectFault
    +}
    +
    +func init() {
    +	t["CannotAddHostWithFTVmToNonHACluster"] = reflect.TypeOf((*CannotAddHostWithFTVmToNonHACluster)(nil)).Elem()
    +}
    +
    +type CannotAddHostWithFTVmToNonHAClusterFault CannotAddHostWithFTVmToNonHACluster
    +
    +func init() {
    +	t["CannotAddHostWithFTVmToNonHAClusterFault"] = reflect.TypeOf((*CannotAddHostWithFTVmToNonHAClusterFault)(nil)).Elem()
    +}
    +
    +type CannotChangeDrsBehaviorForFtSecondary struct {
    +	VmFaultToleranceIssue
    +
    +	Vm     ManagedObjectReference `xml:"vm"`
    +	VmName string                 `xml:"vmName"`
    +}
    +
    +func init() {
    +	t["CannotChangeDrsBehaviorForFtSecondary"] = reflect.TypeOf((*CannotChangeDrsBehaviorForFtSecondary)(nil)).Elem()
    +}
    +
    +type CannotChangeDrsBehaviorForFtSecondaryFault CannotChangeDrsBehaviorForFtSecondary
    +
    +func init() {
    +	t["CannotChangeDrsBehaviorForFtSecondaryFault"] = reflect.TypeOf((*CannotChangeDrsBehaviorForFtSecondaryFault)(nil)).Elem()
    +}
    +
    +type CannotChangeHaSettingsForFtSecondary struct {
    +	VmFaultToleranceIssue
    +
    +	Vm     ManagedObjectReference `xml:"vm"`
    +	VmName string                 `xml:"vmName"`
    +}
    +
    +func init() {
    +	t["CannotChangeHaSettingsForFtSecondary"] = reflect.TypeOf((*CannotChangeHaSettingsForFtSecondary)(nil)).Elem()
    +}
    +
    +type CannotChangeHaSettingsForFtSecondaryFault CannotChangeHaSettingsForFtSecondary
    +
    +func init() {
    +	t["CannotChangeHaSettingsForFtSecondaryFault"] = reflect.TypeOf((*CannotChangeHaSettingsForFtSecondaryFault)(nil)).Elem()
    +}
    +
    +type CannotChangeVsanClusterUuid struct {
    +	VsanFault
    +}
    +
    +func init() {
    +	t["CannotChangeVsanClusterUuid"] = reflect.TypeOf((*CannotChangeVsanClusterUuid)(nil)).Elem()
    +}
    +
    +type CannotChangeVsanClusterUuidFault CannotChangeVsanClusterUuid
    +
    +func init() {
    +	t["CannotChangeVsanClusterUuidFault"] = reflect.TypeOf((*CannotChangeVsanClusterUuidFault)(nil)).Elem()
    +}
    +
    +type CannotChangeVsanNodeUuid struct {
    +	VsanFault
    +}
    +
    +func init() {
    +	t["CannotChangeVsanNodeUuid"] = reflect.TypeOf((*CannotChangeVsanNodeUuid)(nil)).Elem()
    +}
    +
    +type CannotChangeVsanNodeUuidFault CannotChangeVsanNodeUuid
    +
    +func init() {
    +	t["CannotChangeVsanNodeUuidFault"] = reflect.TypeOf((*CannotChangeVsanNodeUuidFault)(nil)).Elem()
    +}
    +
    +type CannotComputeFTCompatibleHosts struct {
    +	VmFaultToleranceIssue
    +
    +	Vm     ManagedObjectReference `xml:"vm"`
    +	VmName string                 `xml:"vmName"`
    +}
    +
    +func init() {
    +	t["CannotComputeFTCompatibleHosts"] = reflect.TypeOf((*CannotComputeFTCompatibleHosts)(nil)).Elem()
    +}
    +
    +type CannotComputeFTCompatibleHostsFault CannotComputeFTCompatibleHosts
    +
    +func init() {
    +	t["CannotComputeFTCompatibleHostsFault"] = reflect.TypeOf((*CannotComputeFTCompatibleHostsFault)(nil)).Elem()
    +}
    +
    +type CannotCreateFile struct {
    +	FileFault
    +}
    +
    +func init() {
    +	t["CannotCreateFile"] = reflect.TypeOf((*CannotCreateFile)(nil)).Elem()
    +}
    +
    +type CannotCreateFileFault CannotCreateFile
    +
    +func init() {
    +	t["CannotCreateFileFault"] = reflect.TypeOf((*CannotCreateFileFault)(nil)).Elem()
    +}
    +
    +type CannotDecryptPasswords struct {
    +	CustomizationFault
    +}
    +
    +func init() {
    +	t["CannotDecryptPasswords"] = reflect.TypeOf((*CannotDecryptPasswords)(nil)).Elem()
    +}
    +
    +type CannotDecryptPasswordsFault CannotDecryptPasswords
    +
    +func init() {
    +	t["CannotDecryptPasswordsFault"] = reflect.TypeOf((*CannotDecryptPasswordsFault)(nil)).Elem()
    +}
    +
    +type CannotDeleteFile struct {
    +	FileFault
    +}
    +
    +func init() {
    +	t["CannotDeleteFile"] = reflect.TypeOf((*CannotDeleteFile)(nil)).Elem()
    +}
    +
    +type CannotDeleteFileFault CannotDeleteFile
    +
    +func init() {
    +	t["CannotDeleteFileFault"] = reflect.TypeOf((*CannotDeleteFileFault)(nil)).Elem()
    +}
    +
    +type CannotDisableDrsOnClustersWithVApps struct {
    +	RuntimeFault
    +}
    +
    +func init() {
    +	t["CannotDisableDrsOnClustersWithVApps"] = reflect.TypeOf((*CannotDisableDrsOnClustersWithVApps)(nil)).Elem()
    +}
    +
    +type CannotDisableDrsOnClustersWithVAppsFault CannotDisableDrsOnClustersWithVApps
    +
    +func init() {
    +	t["CannotDisableDrsOnClustersWithVAppsFault"] = reflect.TypeOf((*CannotDisableDrsOnClustersWithVAppsFault)(nil)).Elem()
    +}
    +
    +type CannotDisableSnapshot struct {
    +	VmConfigFault
    +}
    +
    +func init() {
    +	t["CannotDisableSnapshot"] = reflect.TypeOf((*CannotDisableSnapshot)(nil)).Elem()
    +}
    +
    +type CannotDisableSnapshotFault CannotDisableSnapshot
    +
    +func init() {
    +	t["CannotDisableSnapshotFault"] = reflect.TypeOf((*CannotDisableSnapshotFault)(nil)).Elem()
    +}
    +
    +type CannotDisconnectHostWithFaultToleranceVm struct {
    +	VimFault
    +
    +	HostName string `xml:"hostName"`
    +}
    +
    +func init() {
    +	t["CannotDisconnectHostWithFaultToleranceVm"] = reflect.TypeOf((*CannotDisconnectHostWithFaultToleranceVm)(nil)).Elem()
    +}
    +
    +type CannotDisconnectHostWithFaultToleranceVmFault CannotDisconnectHostWithFaultToleranceVm
    +
    +func init() {
    +	t["CannotDisconnectHostWithFaultToleranceVmFault"] = reflect.TypeOf((*CannotDisconnectHostWithFaultToleranceVmFault)(nil)).Elem()
    +}
    +
    +type CannotEnableVmcpForCluster struct {
    +	VimFault
    +
    +	Host     *ManagedObjectReference `xml:"host,omitempty"`
    +	HostName string                  `xml:"hostName,omitempty"`
    +	Reason   string                  `xml:"reason,omitempty"`
    +}
    +
    +func init() {
    +	t["CannotEnableVmcpForCluster"] = reflect.TypeOf((*CannotEnableVmcpForCluster)(nil)).Elem()
    +}
    +
    +type CannotEnableVmcpForClusterFault CannotEnableVmcpForCluster
    +
    +func init() {
    +	t["CannotEnableVmcpForClusterFault"] = reflect.TypeOf((*CannotEnableVmcpForClusterFault)(nil)).Elem()
    +}
    +
    +type CannotModifyConfigCpuRequirements struct {
    +	MigrationFault
    +}
    +
    +func init() {
    +	t["CannotModifyConfigCpuRequirements"] = reflect.TypeOf((*CannotModifyConfigCpuRequirements)(nil)).Elem()
    +}
    +
    +type CannotModifyConfigCpuRequirementsFault CannotModifyConfigCpuRequirements
    +
    +func init() {
    +	t["CannotModifyConfigCpuRequirementsFault"] = reflect.TypeOf((*CannotModifyConfigCpuRequirementsFault)(nil)).Elem()
    +}
    +
    +type CannotMoveFaultToleranceVm struct {
    +	VimFault
    +
    +	MoveType string `xml:"moveType"`
    +	VmName   string `xml:"vmName"`
    +}
    +
    +func init() {
    +	t["CannotMoveFaultToleranceVm"] = reflect.TypeOf((*CannotMoveFaultToleranceVm)(nil)).Elem()
    +}
    +
    +type CannotMoveFaultToleranceVmFault CannotMoveFaultToleranceVm
    +
    +func init() {
    +	t["CannotMoveFaultToleranceVmFault"] = reflect.TypeOf((*CannotMoveFaultToleranceVmFault)(nil)).Elem()
    +}
    +
    +type CannotMoveHostWithFaultToleranceVm struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["CannotMoveHostWithFaultToleranceVm"] = reflect.TypeOf((*CannotMoveHostWithFaultToleranceVm)(nil)).Elem()
    +}
    +
    +type CannotMoveHostWithFaultToleranceVmFault CannotMoveHostWithFaultToleranceVm
    +
    +func init() {
    +	t["CannotMoveHostWithFaultToleranceVmFault"] = reflect.TypeOf((*CannotMoveHostWithFaultToleranceVmFault)(nil)).Elem()
    +}
    +
    +type CannotMoveVmWithDeltaDisk struct {
    +	MigrationFault
    +
    +	Device string `xml:"device"`
    +}
    +
    +func init() {
    +	t["CannotMoveVmWithDeltaDisk"] = reflect.TypeOf((*CannotMoveVmWithDeltaDisk)(nil)).Elem()
    +}
    +
    +type CannotMoveVmWithDeltaDiskFault CannotMoveVmWithDeltaDisk
    +
    +func init() {
    +	t["CannotMoveVmWithDeltaDiskFault"] = reflect.TypeOf((*CannotMoveVmWithDeltaDiskFault)(nil)).Elem()
    +}
    +
    +type CannotMoveVmWithNativeDeltaDisk struct {
    +	MigrationFault
    +}
    +
    +func init() {
    +	t["CannotMoveVmWithNativeDeltaDisk"] = reflect.TypeOf((*CannotMoveVmWithNativeDeltaDisk)(nil)).Elem()
    +}
    +
    +type CannotMoveVmWithNativeDeltaDiskFault CannotMoveVmWithNativeDeltaDisk
    +
    +func init() {
    +	t["CannotMoveVmWithNativeDeltaDiskFault"] = reflect.TypeOf((*CannotMoveVmWithNativeDeltaDiskFault)(nil)).Elem()
    +}
    +
    +type CannotMoveVsanEnabledHost struct {
    +	VsanFault
    +}
    +
    +func init() {
    +	t["CannotMoveVsanEnabledHost"] = reflect.TypeOf((*CannotMoveVsanEnabledHost)(nil)).Elem()
    +}
    +
    +type CannotMoveVsanEnabledHostFault BaseCannotMoveVsanEnabledHost
    +
    +func init() {
    +	t["CannotMoveVsanEnabledHostFault"] = reflect.TypeOf((*CannotMoveVsanEnabledHostFault)(nil)).Elem()
    +}
    +
    +type CannotPlaceWithoutPrerequisiteMoves struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["CannotPlaceWithoutPrerequisiteMoves"] = reflect.TypeOf((*CannotPlaceWithoutPrerequisiteMoves)(nil)).Elem()
    +}
    +
    +type CannotPlaceWithoutPrerequisiteMovesFault CannotPlaceWithoutPrerequisiteMoves
    +
    +func init() {
    +	t["CannotPlaceWithoutPrerequisiteMovesFault"] = reflect.TypeOf((*CannotPlaceWithoutPrerequisiteMovesFault)(nil)).Elem()
    +}
    +
    +type CannotPowerOffVmInCluster struct {
    +	InvalidState
    +
    +	Operation string                 `xml:"operation"`
    +	Vm        ManagedObjectReference `xml:"vm"`
    +	VmName    string                 `xml:"vmName"`
    +}
    +
    +func init() {
    +	t["CannotPowerOffVmInCluster"] = reflect.TypeOf((*CannotPowerOffVmInCluster)(nil)).Elem()
    +}
    +
    +type CannotPowerOffVmInClusterFault CannotPowerOffVmInCluster
    +
    +func init() {
    +	t["CannotPowerOffVmInClusterFault"] = reflect.TypeOf((*CannotPowerOffVmInClusterFault)(nil)).Elem()
    +}
    +
    +type CannotReconfigureVsanWhenHaEnabled struct {
    +	VsanFault
    +}
    +
    +func init() {
    +	t["CannotReconfigureVsanWhenHaEnabled"] = reflect.TypeOf((*CannotReconfigureVsanWhenHaEnabled)(nil)).Elem()
    +}
    +
    +type CannotReconfigureVsanWhenHaEnabledFault CannotReconfigureVsanWhenHaEnabled
    +
    +func init() {
    +	t["CannotReconfigureVsanWhenHaEnabledFault"] = reflect.TypeOf((*CannotReconfigureVsanWhenHaEnabledFault)(nil)).Elem()
    +}
    +
    +type CannotUseNetwork struct {
    +	VmConfigFault
    +
    +	Device    string                  `xml:"device"`
    +	Backing   string                  `xml:"backing"`
    +	Connected bool                    `xml:"connected"`
    +	Reason    string                  `xml:"reason"`
    +	Network   *ManagedObjectReference `xml:"network,omitempty"`
    +}
    +
    +func init() {
    +	t["CannotUseNetwork"] = reflect.TypeOf((*CannotUseNetwork)(nil)).Elem()
    +}
    +
    +type CannotUseNetworkFault CannotUseNetwork
    +
    +func init() {
    +	t["CannotUseNetworkFault"] = reflect.TypeOf((*CannotUseNetworkFault)(nil)).Elem()
    +}
    +
    +type Capability struct {
    +	DynamicData
    +
    +	ProvisioningSupported            bool      `xml:"provisioningSupported"`
    +	MultiHostSupported               bool      `xml:"multiHostSupported"`
    +	UserShellAccessSupported         bool      `xml:"userShellAccessSupported"`
    +	SupportedEVCMode                 []EVCMode `xml:"supportedEVCMode,omitempty"`
    +	NetworkBackupAndRestoreSupported *bool     `xml:"networkBackupAndRestoreSupported"`
    +	FtDrsWithoutEvcSupported         *bool     `xml:"ftDrsWithoutEvcSupported"`
    +}
    +
    +func init() {
    +	t["Capability"] = reflect.TypeOf((*Capability)(nil)).Elem()
    +}
    +
    +type CertMgrRefreshCACertificatesAndCRLsRequestType struct {
    +	This ManagedObjectReference   `xml:"_this"`
    +	Host []ManagedObjectReference `xml:"host"`
    +}
    +
    +func init() {
    +	t["CertMgrRefreshCACertificatesAndCRLsRequestType"] = reflect.TypeOf((*CertMgrRefreshCACertificatesAndCRLsRequestType)(nil)).Elem()
    +}
    +
    +type CertMgrRefreshCACertificatesAndCRLs_Task CertMgrRefreshCACertificatesAndCRLsRequestType
    +
    +func init() {
    +	t["CertMgrRefreshCACertificatesAndCRLs_Task"] = reflect.TypeOf((*CertMgrRefreshCACertificatesAndCRLs_Task)(nil)).Elem()
    +}
    +
    +type CertMgrRefreshCACertificatesAndCRLs_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CertMgrRefreshCertificatesRequestType struct {
    +	This ManagedObjectReference   `xml:"_this"`
    +	Host []ManagedObjectReference `xml:"host"`
    +}
    +
    +func init() {
    +	t["CertMgrRefreshCertificatesRequestType"] = reflect.TypeOf((*CertMgrRefreshCertificatesRequestType)(nil)).Elem()
    +}
    +
    +type CertMgrRefreshCertificates_Task CertMgrRefreshCertificatesRequestType
    +
    +func init() {
    +	t["CertMgrRefreshCertificates_Task"] = reflect.TypeOf((*CertMgrRefreshCertificates_Task)(nil)).Elem()
    +}
    +
    +type CertMgrRefreshCertificates_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CertMgrRevokeCertificatesRequestType struct {
    +	This ManagedObjectReference   `xml:"_this"`
    +	Host []ManagedObjectReference `xml:"host"`
    +}
    +
    +func init() {
    +	t["CertMgrRevokeCertificatesRequestType"] = reflect.TypeOf((*CertMgrRevokeCertificatesRequestType)(nil)).Elem()
    +}
    +
    +type CertMgrRevokeCertificates_Task CertMgrRevokeCertificatesRequestType
    +
    +func init() {
    +	t["CertMgrRevokeCertificates_Task"] = reflect.TypeOf((*CertMgrRevokeCertificates_Task)(nil)).Elem()
    +}
    +
    +type CertMgrRevokeCertificates_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type ChangeAccessMode ChangeAccessModeRequestType
    +
    +func init() {
    +	t["ChangeAccessMode"] = reflect.TypeOf((*ChangeAccessMode)(nil)).Elem()
    +}
    +
    +type ChangeAccessModeRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	Principal  string                 `xml:"principal"`
    +	IsGroup    bool                   `xml:"isGroup"`
    +	AccessMode HostAccessMode         `xml:"accessMode"`
    +}
    +
    +func init() {
    +	t["ChangeAccessModeRequestType"] = reflect.TypeOf((*ChangeAccessModeRequestType)(nil)).Elem()
    +}
    +
    +type ChangeAccessModeResponse struct {
    +}
    +
    +type ChangeFileAttributesInGuest ChangeFileAttributesInGuestRequestType
    +
    +func init() {
    +	t["ChangeFileAttributesInGuest"] = reflect.TypeOf((*ChangeFileAttributesInGuest)(nil)).Elem()
    +}
    +
    +type ChangeFileAttributesInGuestRequestType struct {
    +	This           ManagedObjectReference  `xml:"_this"`
    +	Vm             ManagedObjectReference  `xml:"vm"`
    +	Auth           BaseGuestAuthentication `xml:"auth,typeattr"`
    +	GuestFilePath  string                  `xml:"guestFilePath"`
    +	FileAttributes BaseGuestFileAttributes `xml:"fileAttributes,typeattr"`
    +}
    +
    +func init() {
    +	t["ChangeFileAttributesInGuestRequestType"] = reflect.TypeOf((*ChangeFileAttributesInGuestRequestType)(nil)).Elem()
    +}
    +
    +type ChangeFileAttributesInGuestResponse struct {
    +}
    +
    +type ChangeKeyRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	NewKey CryptoKeyPlain         `xml:"newKey"`
    +}
    +
    +func init() {
    +	t["ChangeKeyRequestType"] = reflect.TypeOf((*ChangeKeyRequestType)(nil)).Elem()
    +}
    +
    +type ChangeKey_Task ChangeKeyRequestType
    +
    +func init() {
    +	t["ChangeKey_Task"] = reflect.TypeOf((*ChangeKey_Task)(nil)).Elem()
    +}
    +
    +type ChangeKey_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type ChangeLockdownMode ChangeLockdownModeRequestType
    +
    +func init() {
    +	t["ChangeLockdownMode"] = reflect.TypeOf((*ChangeLockdownMode)(nil)).Elem()
    +}
    +
    +type ChangeLockdownModeRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Mode HostLockdownMode       `xml:"mode"`
    +}
    +
    +func init() {
    +	t["ChangeLockdownModeRequestType"] = reflect.TypeOf((*ChangeLockdownModeRequestType)(nil)).Elem()
    +}
    +
    +type ChangeLockdownModeResponse struct {
    +}
    +
    +type ChangeNFSUserPassword ChangeNFSUserPasswordRequestType
    +
    +func init() {
    +	t["ChangeNFSUserPassword"] = reflect.TypeOf((*ChangeNFSUserPassword)(nil)).Elem()
    +}
    +
    +type ChangeNFSUserPasswordRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	Password string                 `xml:"password"`
    +}
    +
    +func init() {
    +	t["ChangeNFSUserPasswordRequestType"] = reflect.TypeOf((*ChangeNFSUserPasswordRequestType)(nil)).Elem()
    +}
    +
    +type ChangeNFSUserPasswordResponse struct {
    +}
    +
    +type ChangeOwner ChangeOwnerRequestType
    +
    +func init() {
    +	t["ChangeOwner"] = reflect.TypeOf((*ChangeOwner)(nil)).Elem()
    +}
    +
    +type ChangeOwnerRequestType struct {
    +	This       ManagedObjectReference  `xml:"_this"`
    +	Name       string                  `xml:"name"`
    +	Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"`
    +	Owner      string                  `xml:"owner"`
    +}
    +
    +func init() {
    +	t["ChangeOwnerRequestType"] = reflect.TypeOf((*ChangeOwnerRequestType)(nil)).Elem()
    +}
    +
    +type ChangeOwnerResponse struct {
    +}
    +
    +type ChangesInfoEventArgument struct {
    +	DynamicData
    +
    +	Modified string `xml:"modified,omitempty"`
    +	Added    string `xml:"added,omitempty"`
    +	Deleted  string `xml:"deleted,omitempty"`
    +}
    +
    +func init() {
    +	t["ChangesInfoEventArgument"] = reflect.TypeOf((*ChangesInfoEventArgument)(nil)).Elem()
    +}
    +
    +type CheckAddHostEvcRequestType struct {
    +	This    ManagedObjectReference `xml:"_this"`
    +	CnxSpec HostConnectSpec        `xml:"cnxSpec"`
    +}
    +
    +func init() {
    +	t["CheckAddHostEvcRequestType"] = reflect.TypeOf((*CheckAddHostEvcRequestType)(nil)).Elem()
    +}
    +
    +type CheckAddHostEvc_Task CheckAddHostEvcRequestType
    +
    +func init() {
    +	t["CheckAddHostEvc_Task"] = reflect.TypeOf((*CheckAddHostEvc_Task)(nil)).Elem()
    +}
    +
    +type CheckAddHostEvc_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CheckAnswerFileStatusRequestType struct {
    +	This ManagedObjectReference   `xml:"_this"`
    +	Host []ManagedObjectReference `xml:"host"`
    +}
    +
    +func init() {
    +	t["CheckAnswerFileStatusRequestType"] = reflect.TypeOf((*CheckAnswerFileStatusRequestType)(nil)).Elem()
    +}
    +
    +type CheckAnswerFileStatus_Task CheckAnswerFileStatusRequestType
    +
    +func init() {
    +	t["CheckAnswerFileStatus_Task"] = reflect.TypeOf((*CheckAnswerFileStatus_Task)(nil)).Elem()
    +}
    +
    +type CheckAnswerFileStatus_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CheckCloneRequestType struct {
    +	This     ManagedObjectReference  `xml:"_this"`
    +	Vm       ManagedObjectReference  `xml:"vm"`
    +	Folder   ManagedObjectReference  `xml:"folder"`
    +	Name     string                  `xml:"name"`
    +	Spec     VirtualMachineCloneSpec `xml:"spec"`
    +	TestType []string                `xml:"testType,omitempty"`
    +}
    +
    +func init() {
    +	t["CheckCloneRequestType"] = reflect.TypeOf((*CheckCloneRequestType)(nil)).Elem()
    +}
    +
    +type CheckClone_Task CheckCloneRequestType
    +
    +func init() {
    +	t["CheckClone_Task"] = reflect.TypeOf((*CheckClone_Task)(nil)).Elem()
    +}
    +
    +type CheckClone_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CheckCompatibilityRequestType struct {
    +	This     ManagedObjectReference  `xml:"_this"`
    +	Vm       ManagedObjectReference  `xml:"vm"`
    +	Host     *ManagedObjectReference `xml:"host,omitempty"`
    +	Pool     *ManagedObjectReference `xml:"pool,omitempty"`
    +	TestType []string                `xml:"testType,omitempty"`
    +}
    +
    +func init() {
    +	t["CheckCompatibilityRequestType"] = reflect.TypeOf((*CheckCompatibilityRequestType)(nil)).Elem()
    +}
    +
    +type CheckCompatibility_Task CheckCompatibilityRequestType
    +
    +func init() {
    +	t["CheckCompatibility_Task"] = reflect.TypeOf((*CheckCompatibility_Task)(nil)).Elem()
    +}
    +
    +type CheckCompatibility_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CheckComplianceRequestType struct {
    +	This    ManagedObjectReference   `xml:"_this"`
    +	Profile []ManagedObjectReference `xml:"profile,omitempty"`
    +	Entity  []ManagedObjectReference `xml:"entity,omitempty"`
    +}
    +
    +func init() {
    +	t["CheckComplianceRequestType"] = reflect.TypeOf((*CheckComplianceRequestType)(nil)).Elem()
    +}
    +
    +type CheckCompliance_Task CheckComplianceRequestType
    +
    +func init() {
    +	t["CheckCompliance_Task"] = reflect.TypeOf((*CheckCompliance_Task)(nil)).Elem()
    +}
    +
    +type CheckCompliance_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CheckConfigureEvcModeRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	EvcModeKey string                 `xml:"evcModeKey"`
    +}
    +
    +func init() {
    +	t["CheckConfigureEvcModeRequestType"] = reflect.TypeOf((*CheckConfigureEvcModeRequestType)(nil)).Elem()
    +}
    +
    +type CheckConfigureEvcMode_Task CheckConfigureEvcModeRequestType
    +
    +func init() {
    +	t["CheckConfigureEvcMode_Task"] = reflect.TypeOf((*CheckConfigureEvcMode_Task)(nil)).Elem()
    +}
    +
    +type CheckConfigureEvcMode_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CheckCustomizationResources CheckCustomizationResourcesRequestType
    +
    +func init() {
    +	t["CheckCustomizationResources"] = reflect.TypeOf((*CheckCustomizationResources)(nil)).Elem()
    +}
    +
    +type CheckCustomizationResourcesRequestType struct {
    +	This    ManagedObjectReference `xml:"_this"`
    +	GuestOs string                 `xml:"guestOs"`
    +}
    +
    +func init() {
    +	t["CheckCustomizationResourcesRequestType"] = reflect.TypeOf((*CheckCustomizationResourcesRequestType)(nil)).Elem()
    +}
    +
    +type CheckCustomizationResourcesResponse struct {
    +}
    +
    +type CheckCustomizationSpec CheckCustomizationSpecRequestType
    +
    +func init() {
    +	t["CheckCustomizationSpec"] = reflect.TypeOf((*CheckCustomizationSpec)(nil)).Elem()
    +}
    +
    +type CheckCustomizationSpecRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Spec CustomizationSpec      `xml:"spec"`
    +}
    +
    +func init() {
    +	t["CheckCustomizationSpecRequestType"] = reflect.TypeOf((*CheckCustomizationSpecRequestType)(nil)).Elem()
    +}
    +
    +type CheckCustomizationSpecResponse struct {
    +}
    +
    +type CheckForUpdates CheckForUpdatesRequestType
    +
    +func init() {
    +	t["CheckForUpdates"] = reflect.TypeOf((*CheckForUpdates)(nil)).Elem()
    +}
    +
    +type CheckForUpdatesRequestType struct {
    +	This    ManagedObjectReference `xml:"_this"`
    +	Version string                 `xml:"version,omitempty"`
    +}
    +
    +func init() {
    +	t["CheckForUpdatesRequestType"] = reflect.TypeOf((*CheckForUpdatesRequestType)(nil)).Elem()
    +}
    +
    +type CheckForUpdatesResponse struct {
    +	Returnval *UpdateSet `xml:"returnval,omitempty"`
    +}
    +
    +type CheckHostPatchRequestType struct {
    +	This       ManagedObjectReference                     `xml:"_this"`
    +	MetaUrls   []string                                   `xml:"metaUrls,omitempty"`
    +	BundleUrls []string                                   `xml:"bundleUrls,omitempty"`
    +	Spec       *HostPatchManagerPatchManagerOperationSpec `xml:"spec,omitempty"`
    +}
    +
    +func init() {
    +	t["CheckHostPatchRequestType"] = reflect.TypeOf((*CheckHostPatchRequestType)(nil)).Elem()
    +}
    +
    +type CheckHostPatch_Task CheckHostPatchRequestType
    +
    +func init() {
    +	t["CheckHostPatch_Task"] = reflect.TypeOf((*CheckHostPatch_Task)(nil)).Elem()
    +}
    +
    +type CheckHostPatch_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CheckInstantCloneRequestType struct {
    +	This     ManagedObjectReference         `xml:"_this"`
    +	Vm       ManagedObjectReference         `xml:"vm"`
    +	Spec     VirtualMachineInstantCloneSpec `xml:"spec"`
    +	TestType []string                       `xml:"testType,omitempty"`
    +}
    +
    +func init() {
    +	t["CheckInstantCloneRequestType"] = reflect.TypeOf((*CheckInstantCloneRequestType)(nil)).Elem()
    +}
    +
    +type CheckInstantClone_Task CheckInstantCloneRequestType
    +
    +func init() {
    +	t["CheckInstantClone_Task"] = reflect.TypeOf((*CheckInstantClone_Task)(nil)).Elem()
    +}
    +
    +type CheckInstantClone_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CheckLicenseFeature CheckLicenseFeatureRequestType
    +
    +func init() {
    +	t["CheckLicenseFeature"] = reflect.TypeOf((*CheckLicenseFeature)(nil)).Elem()
    +}
    +
    +type CheckLicenseFeatureRequestType struct {
    +	This       ManagedObjectReference  `xml:"_this"`
    +	Host       *ManagedObjectReference `xml:"host,omitempty"`
    +	FeatureKey string                  `xml:"featureKey"`
    +}
    +
    +func init() {
    +	t["CheckLicenseFeatureRequestType"] = reflect.TypeOf((*CheckLicenseFeatureRequestType)(nil)).Elem()
    +}
    +
    +type CheckLicenseFeatureResponse struct {
    +	Returnval bool `xml:"returnval"`
    +}
    +
    +type CheckMigrateRequestType struct {
    +	This     ManagedObjectReference   `xml:"_this"`
    +	Vm       ManagedObjectReference   `xml:"vm"`
    +	Host     *ManagedObjectReference  `xml:"host,omitempty"`
    +	Pool     *ManagedObjectReference  `xml:"pool,omitempty"`
    +	State    VirtualMachinePowerState `xml:"state,omitempty"`
    +	TestType []string                 `xml:"testType,omitempty"`
    +}
    +
    +func init() {
    +	t["CheckMigrateRequestType"] = reflect.TypeOf((*CheckMigrateRequestType)(nil)).Elem()
    +}
    +
    +type CheckMigrate_Task CheckMigrateRequestType
    +
    +func init() {
    +	t["CheckMigrate_Task"] = reflect.TypeOf((*CheckMigrate_Task)(nil)).Elem()
    +}
    +
    +type CheckMigrate_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CheckPowerOnRequestType struct {
    +	This     ManagedObjectReference  `xml:"_this"`
    +	Vm       ManagedObjectReference  `xml:"vm"`
    +	Host     *ManagedObjectReference `xml:"host,omitempty"`
    +	Pool     *ManagedObjectReference `xml:"pool,omitempty"`
    +	TestType []string                `xml:"testType,omitempty"`
    +}
    +
    +func init() {
    +	t["CheckPowerOnRequestType"] = reflect.TypeOf((*CheckPowerOnRequestType)(nil)).Elem()
    +}
    +
    +type CheckPowerOn_Task CheckPowerOnRequestType
    +
    +func init() {
    +	t["CheckPowerOn_Task"] = reflect.TypeOf((*CheckPowerOn_Task)(nil)).Elem()
    +}
    +
    +type CheckPowerOn_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CheckProfileComplianceRequestType struct {
    +	This   ManagedObjectReference   `xml:"_this"`
    +	Entity []ManagedObjectReference `xml:"entity,omitempty"`
    +}
    +
    +func init() {
    +	t["CheckProfileComplianceRequestType"] = reflect.TypeOf((*CheckProfileComplianceRequestType)(nil)).Elem()
    +}
    +
    +type CheckProfileCompliance_Task CheckProfileComplianceRequestType
    +
    +func init() {
    +	t["CheckProfileCompliance_Task"] = reflect.TypeOf((*CheckProfileCompliance_Task)(nil)).Elem()
    +}
    +
    +type CheckProfileCompliance_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CheckRelocateRequestType struct {
    +	This     ManagedObjectReference     `xml:"_this"`
    +	Vm       ManagedObjectReference     `xml:"vm"`
    +	Spec     VirtualMachineRelocateSpec `xml:"spec"`
    +	TestType []string                   `xml:"testType,omitempty"`
    +}
    +
    +func init() {
    +	t["CheckRelocateRequestType"] = reflect.TypeOf((*CheckRelocateRequestType)(nil)).Elem()
    +}
    +
    +type CheckRelocate_Task CheckRelocateRequestType
    +
    +func init() {
    +	t["CheckRelocate_Task"] = reflect.TypeOf((*CheckRelocate_Task)(nil)).Elem()
    +}
    +
    +type CheckRelocate_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CheckResult struct {
    +	DynamicData
    +
    +	Vm      *ManagedObjectReference `xml:"vm,omitempty"`
    +	Host    *ManagedObjectReference `xml:"host,omitempty"`
    +	Warning []LocalizedMethodFault  `xml:"warning,omitempty"`
    +	Error   []LocalizedMethodFault  `xml:"error,omitempty"`
    +}
    +
    +func init() {
    +	t["CheckResult"] = reflect.TypeOf((*CheckResult)(nil)).Elem()
    +}
    +
    +type CheckVmConfigRequestType struct {
    +	This     ManagedObjectReference   `xml:"_this"`
    +	Spec     VirtualMachineConfigSpec `xml:"spec"`
    +	Vm       *ManagedObjectReference  `xml:"vm,omitempty"`
    +	Host     *ManagedObjectReference  `xml:"host,omitempty"`
    +	Pool     *ManagedObjectReference  `xml:"pool,omitempty"`
    +	TestType []string                 `xml:"testType,omitempty"`
    +}
    +
    +func init() {
    +	t["CheckVmConfigRequestType"] = reflect.TypeOf((*CheckVmConfigRequestType)(nil)).Elem()
    +}
    +
    +type CheckVmConfig_Task CheckVmConfigRequestType
    +
    +func init() {
    +	t["CheckVmConfig_Task"] = reflect.TypeOf((*CheckVmConfig_Task)(nil)).Elem()
    +}
    +
    +type CheckVmConfig_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type ChoiceOption struct {
    +	OptionType
    +
    +	ChoiceInfo   []BaseElementDescription `xml:"choiceInfo,typeattr"`
    +	DefaultIndex int32                    `xml:"defaultIndex,omitempty"`
    +}
    +
    +func init() {
    +	t["ChoiceOption"] = reflect.TypeOf((*ChoiceOption)(nil)).Elem()
    +}
    +
    +type ClearComplianceStatus ClearComplianceStatusRequestType
    +
    +func init() {
    +	t["ClearComplianceStatus"] = reflect.TypeOf((*ClearComplianceStatus)(nil)).Elem()
    +}
    +
    +type ClearComplianceStatusRequestType struct {
    +	This    ManagedObjectReference   `xml:"_this"`
    +	Profile []ManagedObjectReference `xml:"profile,omitempty"`
    +	Entity  []ManagedObjectReference `xml:"entity,omitempty"`
    +}
    +
    +func init() {
    +	t["ClearComplianceStatusRequestType"] = reflect.TypeOf((*ClearComplianceStatusRequestType)(nil)).Elem()
    +}
    +
    +type ClearComplianceStatusResponse struct {
    +}
    +
    +type ClearNFSUser ClearNFSUserRequestType
    +
    +func init() {
    +	t["ClearNFSUser"] = reflect.TypeOf((*ClearNFSUser)(nil)).Elem()
    +}
    +
    +type ClearNFSUserRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["ClearNFSUserRequestType"] = reflect.TypeOf((*ClearNFSUserRequestType)(nil)).Elem()
    +}
    +
    +type ClearNFSUserResponse struct {
    +}
    +
    +type ClearSystemEventLog ClearSystemEventLogRequestType
    +
    +func init() {
    +	t["ClearSystemEventLog"] = reflect.TypeOf((*ClearSystemEventLog)(nil)).Elem()
    +}
    +
    +type ClearSystemEventLogRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["ClearSystemEventLogRequestType"] = reflect.TypeOf((*ClearSystemEventLogRequestType)(nil)).Elem()
    +}
    +
    +type ClearSystemEventLogResponse struct {
    +}
    +
    +type ClearTriggeredAlarms ClearTriggeredAlarmsRequestType
    +
    +func init() {
    +	t["ClearTriggeredAlarms"] = reflect.TypeOf((*ClearTriggeredAlarms)(nil)).Elem()
    +}
    +
    +type ClearTriggeredAlarmsRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	Filter AlarmFilterSpec        `xml:"filter"`
    +}
    +
    +func init() {
    +	t["ClearTriggeredAlarmsRequestType"] = reflect.TypeOf((*ClearTriggeredAlarmsRequestType)(nil)).Elem()
    +}
    +
    +type ClearTriggeredAlarmsResponse struct {
    +}
    +
    +type ClearVStorageObjectControlFlags ClearVStorageObjectControlFlagsRequestType
    +
    +func init() {
    +	t["ClearVStorageObjectControlFlags"] = reflect.TypeOf((*ClearVStorageObjectControlFlags)(nil)).Elem()
    +}
    +
    +type ClearVStorageObjectControlFlagsRequestType struct {
    +	This         ManagedObjectReference `xml:"_this"`
    +	Id           ID                     `xml:"id"`
    +	Datastore    ManagedObjectReference `xml:"datastore"`
    +	ControlFlags []string               `xml:"controlFlags,omitempty"`
    +}
    +
    +func init() {
    +	t["ClearVStorageObjectControlFlagsRequestType"] = reflect.TypeOf((*ClearVStorageObjectControlFlagsRequestType)(nil)).Elem()
    +}
    +
    +type ClearVStorageObjectControlFlagsResponse struct {
    +}
    +
    +type ClockSkew struct {
    +	HostConfigFault
    +}
    +
    +func init() {
    +	t["ClockSkew"] = reflect.TypeOf((*ClockSkew)(nil)).Elem()
    +}
    +
    +type ClockSkewFault ClockSkew
    +
    +func init() {
    +	t["ClockSkewFault"] = reflect.TypeOf((*ClockSkewFault)(nil)).Elem()
    +}
    +
    +type CloneFromSnapshotNotSupported struct {
    +	MigrationFault
    +}
    +
    +func init() {
    +	t["CloneFromSnapshotNotSupported"] = reflect.TypeOf((*CloneFromSnapshotNotSupported)(nil)).Elem()
    +}
    +
    +type CloneFromSnapshotNotSupportedFault CloneFromSnapshotNotSupported
    +
    +func init() {
    +	t["CloneFromSnapshotNotSupportedFault"] = reflect.TypeOf((*CloneFromSnapshotNotSupportedFault)(nil)).Elem()
    +}
    +
    +type CloneSession CloneSessionRequestType
    +
    +func init() {
    +	t["CloneSession"] = reflect.TypeOf((*CloneSession)(nil)).Elem()
    +}
    +
    +type CloneSessionRequestType struct {
    +	This        ManagedObjectReference `xml:"_this"`
    +	CloneTicket string                 `xml:"cloneTicket"`
    +}
    +
    +func init() {
    +	t["CloneSessionRequestType"] = reflect.TypeOf((*CloneSessionRequestType)(nil)).Elem()
    +}
    +
    +type CloneSessionResponse struct {
    +	Returnval UserSession `xml:"returnval"`
    +}
    +
    +type CloneVAppRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	Name   string                 `xml:"name"`
    +	Target ManagedObjectReference `xml:"target"`
    +	Spec   VAppCloneSpec          `xml:"spec"`
    +}
    +
    +func init() {
    +	t["CloneVAppRequestType"] = reflect.TypeOf((*CloneVAppRequestType)(nil)).Elem()
    +}
    +
    +type CloneVApp_Task CloneVAppRequestType
    +
    +func init() {
    +	t["CloneVApp_Task"] = reflect.TypeOf((*CloneVApp_Task)(nil)).Elem()
    +}
    +
    +type CloneVApp_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CloneVMRequestType struct {
    +	This   ManagedObjectReference  `xml:"_this"`
    +	Folder ManagedObjectReference  `xml:"folder"`
    +	Name   string                  `xml:"name"`
    +	Spec   VirtualMachineCloneSpec `xml:"spec"`
    +}
    +
    +func init() {
    +	t["CloneVMRequestType"] = reflect.TypeOf((*CloneVMRequestType)(nil)).Elem()
    +}
    +
    +type CloneVM_Task CloneVMRequestType
    +
    +func init() {
    +	t["CloneVM_Task"] = reflect.TypeOf((*CloneVM_Task)(nil)).Elem()
    +}
    +
    +type CloneVM_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CloneVStorageObjectRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	Id        ID                     `xml:"id"`
    +	Datastore ManagedObjectReference `xml:"datastore"`
    +	Spec      VslmCloneSpec          `xml:"spec"`
    +}
    +
    +func init() {
    +	t["CloneVStorageObjectRequestType"] = reflect.TypeOf((*CloneVStorageObjectRequestType)(nil)).Elem()
    +}
    +
    +type CloneVStorageObject_Task CloneVStorageObjectRequestType
    +
    +func init() {
    +	t["CloneVStorageObject_Task"] = reflect.TypeOf((*CloneVStorageObject_Task)(nil)).Elem()
    +}
    +
    +type CloneVStorageObject_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CloseInventoryViewFolder CloseInventoryViewFolderRequestType
    +
    +func init() {
    +	t["CloseInventoryViewFolder"] = reflect.TypeOf((*CloseInventoryViewFolder)(nil)).Elem()
    +}
    +
    +type CloseInventoryViewFolderRequestType struct {
    +	This   ManagedObjectReference   `xml:"_this"`
    +	Entity []ManagedObjectReference `xml:"entity"`
    +}
    +
    +func init() {
    +	t["CloseInventoryViewFolderRequestType"] = reflect.TypeOf((*CloseInventoryViewFolderRequestType)(nil)).Elem()
    +}
    +
    +type CloseInventoryViewFolderResponse struct {
    +	Returnval []ManagedObjectReference `xml:"returnval,omitempty"`
    +}
    +
    +type ClusterAction struct {
    +	DynamicData
    +
    +	Type   string                  `xml:"type"`
    +	Target *ManagedObjectReference `xml:"target,omitempty"`
    +}
    +
    +func init() {
    +	t["ClusterAction"] = reflect.TypeOf((*ClusterAction)(nil)).Elem()
    +}
    +
    +type ClusterActionHistory struct {
    +	DynamicData
    +
    +	Action BaseClusterAction `xml:"action,typeattr"`
    +	Time   time.Time         `xml:"time"`
    +}
    +
    +func init() {
    +	t["ClusterActionHistory"] = reflect.TypeOf((*ClusterActionHistory)(nil)).Elem()
    +}
    +
    +type ClusterAffinityRuleSpec struct {
    +	ClusterRuleInfo
    +
    +	Vm []ManagedObjectReference `xml:"vm"`
    +}
    +
    +func init() {
    +	t["ClusterAffinityRuleSpec"] = reflect.TypeOf((*ClusterAffinityRuleSpec)(nil)).Elem()
    +}
    +
    +type ClusterAntiAffinityRuleSpec struct {
    +	ClusterRuleInfo
    +
    +	Vm []ManagedObjectReference `xml:"vm"`
    +}
    +
    +func init() {
    +	t["ClusterAntiAffinityRuleSpec"] = reflect.TypeOf((*ClusterAntiAffinityRuleSpec)(nil)).Elem()
    +}
    +
    +type ClusterAttemptedVmInfo struct {
    +	DynamicData
    +
    +	Vm   ManagedObjectReference  `xml:"vm"`
    +	Task *ManagedObjectReference `xml:"task,omitempty"`
    +}
    +
    +func init() {
    +	t["ClusterAttemptedVmInfo"] = reflect.TypeOf((*ClusterAttemptedVmInfo)(nil)).Elem()
    +}
    +
    +type ClusterComplianceCheckedEvent struct {
    +	ClusterEvent
    +
    +	Profile ProfileEventArgument `xml:"profile"`
    +}
    +
    +func init() {
    +	t["ClusterComplianceCheckedEvent"] = reflect.TypeOf((*ClusterComplianceCheckedEvent)(nil)).Elem()
    +}
    +
    +type ClusterComputeResourceSummary struct {
    +	ComputeResourceSummary
    +
    +	CurrentFailoverLevel int32                              `xml:"currentFailoverLevel"`
    +	AdmissionControlInfo BaseClusterDasAdmissionControlInfo `xml:"admissionControlInfo,omitempty,typeattr"`
    +	NumVmotions          int32                              `xml:"numVmotions"`
    +	TargetBalance        int32                              `xml:"targetBalance,omitempty"`
    +	CurrentBalance       int32                              `xml:"currentBalance,omitempty"`
    +	UsageSummary         *ClusterUsageSummary               `xml:"usageSummary,omitempty"`
    +	CurrentEVCModeKey    string                             `xml:"currentEVCModeKey,omitempty"`
    +	DasData              BaseClusterDasData                 `xml:"dasData,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ClusterComputeResourceSummary"] = reflect.TypeOf((*ClusterComputeResourceSummary)(nil)).Elem()
    +}
    +
    +type ClusterConfigInfo struct {
    +	DynamicData
    +
    +	DasConfig   ClusterDasConfigInfo     `xml:"dasConfig"`
    +	DasVmConfig []ClusterDasVmConfigInfo `xml:"dasVmConfig,omitempty"`
    +	DrsConfig   ClusterDrsConfigInfo     `xml:"drsConfig"`
    +	DrsVmConfig []ClusterDrsVmConfigInfo `xml:"drsVmConfig,omitempty"`
    +	Rule        []BaseClusterRuleInfo    `xml:"rule,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ClusterConfigInfo"] = reflect.TypeOf((*ClusterConfigInfo)(nil)).Elem()
    +}
    +
    +type ClusterConfigInfoEx struct {
    +	ComputeResourceConfigInfo
    +
    +	DasConfig           ClusterDasConfigInfo            `xml:"dasConfig"`
    +	DasVmConfig         []ClusterDasVmConfigInfo        `xml:"dasVmConfig,omitempty"`
    +	DrsConfig           ClusterDrsConfigInfo            `xml:"drsConfig"`
    +	DrsVmConfig         []ClusterDrsVmConfigInfo        `xml:"drsVmConfig,omitempty"`
    +	Rule                []BaseClusterRuleInfo           `xml:"rule,omitempty,typeattr"`
    +	Orchestration       *ClusterOrchestrationInfo       `xml:"orchestration,omitempty"`
    +	VmOrchestration     []ClusterVmOrchestrationInfo    `xml:"vmOrchestration,omitempty"`
    +	DpmConfigInfo       *ClusterDpmConfigInfo           `xml:"dpmConfigInfo,omitempty"`
    +	DpmHostConfig       []ClusterDpmHostConfigInfo      `xml:"dpmHostConfig,omitempty"`
    +	VsanConfigInfo      *VsanClusterConfigInfo          `xml:"vsanConfigInfo,omitempty"`
    +	VsanHostConfig      []VsanHostConfigInfo            `xml:"vsanHostConfig,omitempty"`
    +	Group               []BaseClusterGroupInfo          `xml:"group,omitempty,typeattr"`
    +	InfraUpdateHaConfig *ClusterInfraUpdateHaConfigInfo `xml:"infraUpdateHaConfig,omitempty"`
    +	ProactiveDrsConfig  *ClusterProactiveDrsConfigInfo  `xml:"proactiveDrsConfig,omitempty"`
    +}
    +
    +func init() {
    +	t["ClusterConfigInfoEx"] = reflect.TypeOf((*ClusterConfigInfoEx)(nil)).Elem()
    +}
    +
    +type ClusterConfigSpec struct {
    +	DynamicData
    +
    +	DasConfig       *ClusterDasConfigInfo    `xml:"dasConfig,omitempty"`
    +	DasVmConfigSpec []ClusterDasVmConfigSpec `xml:"dasVmConfigSpec,omitempty"`
    +	DrsConfig       *ClusterDrsConfigInfo    `xml:"drsConfig,omitempty"`
    +	DrsVmConfigSpec []ClusterDrsVmConfigSpec `xml:"drsVmConfigSpec,omitempty"`
    +	RulesSpec       []ClusterRuleSpec        `xml:"rulesSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ClusterConfigSpec"] = reflect.TypeOf((*ClusterConfigSpec)(nil)).Elem()
    +}
    +
    +type ClusterConfigSpecEx struct {
    +	ComputeResourceConfigSpec
    +
    +	DasConfig           *ClusterDasConfigInfo           `xml:"dasConfig,omitempty"`
    +	DasVmConfigSpec     []ClusterDasVmConfigSpec        `xml:"dasVmConfigSpec,omitempty"`
    +	DrsConfig           *ClusterDrsConfigInfo           `xml:"drsConfig,omitempty"`
    +	DrsVmConfigSpec     []ClusterDrsVmConfigSpec        `xml:"drsVmConfigSpec,omitempty"`
    +	RulesSpec           []ClusterRuleSpec               `xml:"rulesSpec,omitempty"`
    +	Orchestration       *ClusterOrchestrationInfo       `xml:"orchestration,omitempty"`
    +	VmOrchestrationSpec []ClusterVmOrchestrationSpec    `xml:"vmOrchestrationSpec,omitempty"`
    +	DpmConfig           *ClusterDpmConfigInfo           `xml:"dpmConfig,omitempty"`
    +	DpmHostConfigSpec   []ClusterDpmHostConfigSpec      `xml:"dpmHostConfigSpec,omitempty"`
    +	VsanConfig          *VsanClusterConfigInfo          `xml:"vsanConfig,omitempty"`
    +	VsanHostConfigSpec  []VsanHostConfigInfo            `xml:"vsanHostConfigSpec,omitempty"`
    +	GroupSpec           []ClusterGroupSpec              `xml:"groupSpec,omitempty"`
    +	InfraUpdateHaConfig *ClusterInfraUpdateHaConfigInfo `xml:"infraUpdateHaConfig,omitempty"`
    +	ProactiveDrsConfig  *ClusterProactiveDrsConfigInfo  `xml:"proactiveDrsConfig,omitempty"`
    +}
    +
    +func init() {
    +	t["ClusterConfigSpecEx"] = reflect.TypeOf((*ClusterConfigSpecEx)(nil)).Elem()
    +}
    +
    +type ClusterCreatedEvent struct {
    +	ClusterEvent
    +
    +	Parent FolderEventArgument `xml:"parent"`
    +}
    +
    +func init() {
    +	t["ClusterCreatedEvent"] = reflect.TypeOf((*ClusterCreatedEvent)(nil)).Elem()
    +}
    +
    +type ClusterDasAamHostInfo struct {
    +	ClusterDasHostInfo
    +
    +	HostDasState []ClusterDasAamNodeState `xml:"hostDasState,omitempty"`
    +	PrimaryHosts []string                 `xml:"primaryHosts,omitempty"`
    +}
    +
    +func init() {
    +	t["ClusterDasAamHostInfo"] = reflect.TypeOf((*ClusterDasAamHostInfo)(nil)).Elem()
    +}
    +
    +type ClusterDasAamNodeState struct {
    +	DynamicData
    +
    +	Host         ManagedObjectReference `xml:"host"`
    +	Name         string                 `xml:"name"`
    +	ConfigState  string                 `xml:"configState"`
    +	RuntimeState string                 `xml:"runtimeState"`
    +}
    +
    +func init() {
    +	t["ClusterDasAamNodeState"] = reflect.TypeOf((*ClusterDasAamNodeState)(nil)).Elem()
    +}
    +
    +type ClusterDasAdmissionControlInfo struct {
    +	DynamicData
    +}
    +
    +func init() {
    +	t["ClusterDasAdmissionControlInfo"] = reflect.TypeOf((*ClusterDasAdmissionControlInfo)(nil)).Elem()
    +}
    +
    +type ClusterDasAdmissionControlPolicy struct {
    +	DynamicData
    +
    +	ResourceReductionToToleratePercent int32 `xml:"resourceReductionToToleratePercent,omitempty"`
    +}
    +
    +func init() {
    +	t["ClusterDasAdmissionControlPolicy"] = reflect.TypeOf((*ClusterDasAdmissionControlPolicy)(nil)).Elem()
    +}
    +
    +type ClusterDasAdvancedRuntimeInfo struct {
    +	DynamicData
    +
    +	DasHostInfo            BaseClusterDasHostInfo                           `xml:"dasHostInfo,omitempty,typeattr"`
    +	VmcpSupported          *ClusterDasAdvancedRuntimeInfoVmcpCapabilityInfo `xml:"vmcpSupported,omitempty"`
    +	HeartbeatDatastoreInfo []DasHeartbeatDatastoreInfo                      `xml:"heartbeatDatastoreInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ClusterDasAdvancedRuntimeInfo"] = reflect.TypeOf((*ClusterDasAdvancedRuntimeInfo)(nil)).Elem()
    +}
    +
    +type ClusterDasAdvancedRuntimeInfoVmcpCapabilityInfo struct {
    +	DynamicData
    +
    +	StorageAPDSupported bool `xml:"storageAPDSupported"`
    +	StoragePDLSupported bool `xml:"storagePDLSupported"`
    +}
    +
    +func init() {
    +	t["ClusterDasAdvancedRuntimeInfoVmcpCapabilityInfo"] = reflect.TypeOf((*ClusterDasAdvancedRuntimeInfoVmcpCapabilityInfo)(nil)).Elem()
    +}
    +
    +type ClusterDasConfigInfo struct {
    +	DynamicData
    +
    +	Enabled                    *bool                                `xml:"enabled"`
    +	VmMonitoring               string                               `xml:"vmMonitoring,omitempty"`
    +	HostMonitoring             string                               `xml:"hostMonitoring,omitempty"`
    +	VmComponentProtecting      string                               `xml:"vmComponentProtecting,omitempty"`
    +	FailoverLevel              int32                                `xml:"failoverLevel,omitempty"`
    +	AdmissionControlPolicy     BaseClusterDasAdmissionControlPolicy `xml:"admissionControlPolicy,omitempty,typeattr"`
    +	AdmissionControlEnabled    *bool                                `xml:"admissionControlEnabled"`
    +	DefaultVmSettings          *ClusterDasVmSettings                `xml:"defaultVmSettings,omitempty"`
    +	Option                     []BaseOptionValue                    `xml:"option,omitempty,typeattr"`
    +	HeartbeatDatastore         []ManagedObjectReference             `xml:"heartbeatDatastore,omitempty"`
    +	HBDatastoreCandidatePolicy string                               `xml:"hBDatastoreCandidatePolicy,omitempty"`
    +}
    +
    +func init() {
    +	t["ClusterDasConfigInfo"] = reflect.TypeOf((*ClusterDasConfigInfo)(nil)).Elem()
    +}
    +
    +type ClusterDasData struct {
    +	DynamicData
    +}
    +
    +func init() {
    +	t["ClusterDasData"] = reflect.TypeOf((*ClusterDasData)(nil)).Elem()
    +}
    +
    +type ClusterDasDataSummary struct {
    +	ClusterDasData
    +
    +	HostListVersion      int64 `xml:"hostListVersion"`
    +	ClusterConfigVersion int64 `xml:"clusterConfigVersion"`
    +	CompatListVersion    int64 `xml:"compatListVersion"`
    +}
    +
    +func init() {
    +	t["ClusterDasDataSummary"] = reflect.TypeOf((*ClusterDasDataSummary)(nil)).Elem()
    +}
    +
    +type ClusterDasFailoverLevelAdvancedRuntimeInfo struct {
    +	ClusterDasAdvancedRuntimeInfo
    +
    +	SlotInfo                  ClusterDasFailoverLevelAdvancedRuntimeInfoSlotInfo    `xml:"slotInfo"`
    +	TotalSlots                int32                                                 `xml:"totalSlots"`
    +	UsedSlots                 int32                                                 `xml:"usedSlots"`
    +	UnreservedSlots           int32                                                 `xml:"unreservedSlots"`
    +	TotalVms                  int32                                                 `xml:"totalVms"`
    +	TotalHosts                int32                                                 `xml:"totalHosts"`
    +	TotalGoodHosts            int32                                                 `xml:"totalGoodHosts"`
    +	HostSlots                 []ClusterDasFailoverLevelAdvancedRuntimeInfoHostSlots `xml:"hostSlots,omitempty"`
    +	VmsRequiringMultipleSlots []ClusterDasFailoverLevelAdvancedRuntimeInfoVmSlots   `xml:"vmsRequiringMultipleSlots,omitempty"`
    +}
    +
    +func init() {
    +	t["ClusterDasFailoverLevelAdvancedRuntimeInfo"] = reflect.TypeOf((*ClusterDasFailoverLevelAdvancedRuntimeInfo)(nil)).Elem()
    +}
    +
    +type ClusterDasFailoverLevelAdvancedRuntimeInfoHostSlots struct {
    +	DynamicData
    +
    +	Host  ManagedObjectReference `xml:"host"`
    +	Slots int32                  `xml:"slots"`
    +}
    +
    +func init() {
    +	t["ClusterDasFailoverLevelAdvancedRuntimeInfoHostSlots"] = reflect.TypeOf((*ClusterDasFailoverLevelAdvancedRuntimeInfoHostSlots)(nil)).Elem()
    +}
    +
    +type ClusterDasFailoverLevelAdvancedRuntimeInfoSlotInfo struct {
    +	DynamicData
    +
    +	NumVcpus int32 `xml:"numVcpus"`
    +	CpuMHz   int32 `xml:"cpuMHz"`
    +	MemoryMB int32 `xml:"memoryMB"`
    +}
    +
    +func init() {
    +	t["ClusterDasFailoverLevelAdvancedRuntimeInfoSlotInfo"] = reflect.TypeOf((*ClusterDasFailoverLevelAdvancedRuntimeInfoSlotInfo)(nil)).Elem()
    +}
    +
    +type ClusterDasFailoverLevelAdvancedRuntimeInfoVmSlots struct {
    +	DynamicData
    +
    +	Vm    ManagedObjectReference `xml:"vm"`
    +	Slots int32                  `xml:"slots"`
    +}
    +
    +func init() {
    +	t["ClusterDasFailoverLevelAdvancedRuntimeInfoVmSlots"] = reflect.TypeOf((*ClusterDasFailoverLevelAdvancedRuntimeInfoVmSlots)(nil)).Elem()
    +}
    +
    +type ClusterDasFdmHostState struct {
    +	DynamicData
    +
    +	State         string                  `xml:"state"`
    +	StateReporter *ManagedObjectReference `xml:"stateReporter,omitempty"`
    +}
    +
    +func init() {
    +	t["ClusterDasFdmHostState"] = reflect.TypeOf((*ClusterDasFdmHostState)(nil)).Elem()
    +}
    +
    +type ClusterDasHostInfo struct {
    +	DynamicData
    +}
    +
    +func init() {
    +	t["ClusterDasHostInfo"] = reflect.TypeOf((*ClusterDasHostInfo)(nil)).Elem()
    +}
    +
    +type ClusterDasHostRecommendation struct {
    +	DynamicData
    +
    +	Host      ManagedObjectReference `xml:"host"`
    +	DrsRating int32                  `xml:"drsRating,omitempty"`
    +}
    +
    +func init() {
    +	t["ClusterDasHostRecommendation"] = reflect.TypeOf((*ClusterDasHostRecommendation)(nil)).Elem()
    +}
    +
    +type ClusterDasVmConfigInfo struct {
    +	DynamicData
    +
    +	Key                 ManagedObjectReference `xml:"key"`
    +	RestartPriority     DasVmPriority          `xml:"restartPriority,omitempty"`
    +	PowerOffOnIsolation *bool                  `xml:"powerOffOnIsolation"`
    +	DasSettings         *ClusterDasVmSettings  `xml:"dasSettings,omitempty"`
    +}
    +
    +func init() {
    +	t["ClusterDasVmConfigInfo"] = reflect.TypeOf((*ClusterDasVmConfigInfo)(nil)).Elem()
    +}
    +
    +type ClusterDasVmConfigSpec struct {
    +	ArrayUpdateSpec
    +
    +	Info *ClusterDasVmConfigInfo `xml:"info,omitempty"`
    +}
    +
    +func init() {
    +	t["ClusterDasVmConfigSpec"] = reflect.TypeOf((*ClusterDasVmConfigSpec)(nil)).Elem()
    +}
    +
    +type ClusterDasVmSettings struct {
    +	DynamicData
    +
    +	RestartPriority               string                                `xml:"restartPriority,omitempty"`
    +	RestartPriorityTimeout        int32                                 `xml:"restartPriorityTimeout,omitempty"`
    +	IsolationResponse             string                                `xml:"isolationResponse,omitempty"`
    +	VmToolsMonitoringSettings     *ClusterVmToolsMonitoringSettings     `xml:"vmToolsMonitoringSettings,omitempty"`
    +	VmComponentProtectionSettings *ClusterVmComponentProtectionSettings `xml:"vmComponentProtectionSettings,omitempty"`
    +}
    +
    +func init() {
    +	t["ClusterDasVmSettings"] = reflect.TypeOf((*ClusterDasVmSettings)(nil)).Elem()
    +}
    +
    +type ClusterDependencyRuleInfo struct {
    +	ClusterRuleInfo
    +
    +	VmGroup          string `xml:"vmGroup"`
    +	DependsOnVmGroup string `xml:"dependsOnVmGroup"`
    +}
    +
    +func init() {
    +	t["ClusterDependencyRuleInfo"] = reflect.TypeOf((*ClusterDependencyRuleInfo)(nil)).Elem()
    +}
    +
    +type ClusterDestroyedEvent struct {
    +	ClusterEvent
    +}
    +
    +func init() {
    +	t["ClusterDestroyedEvent"] = reflect.TypeOf((*ClusterDestroyedEvent)(nil)).Elem()
    +}
    +
    +type ClusterDpmConfigInfo struct {
    +	DynamicData
    +
    +	Enabled             *bool             `xml:"enabled"`
    +	DefaultDpmBehavior  DpmBehavior       `xml:"defaultDpmBehavior,omitempty"`
    +	HostPowerActionRate int32             `xml:"hostPowerActionRate,omitempty"`
    +	Option              []BaseOptionValue `xml:"option,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ClusterDpmConfigInfo"] = reflect.TypeOf((*ClusterDpmConfigInfo)(nil)).Elem()
    +}
    +
    +type ClusterDpmHostConfigInfo struct {
    +	DynamicData
    +
    +	Key      ManagedObjectReference `xml:"key"`
    +	Enabled  *bool                  `xml:"enabled"`
    +	Behavior DpmBehavior            `xml:"behavior,omitempty"`
    +}
    +
    +func init() {
    +	t["ClusterDpmHostConfigInfo"] = reflect.TypeOf((*ClusterDpmHostConfigInfo)(nil)).Elem()
    +}
    +
    +type ClusterDpmHostConfigSpec struct {
    +	ArrayUpdateSpec
    +
    +	Info *ClusterDpmHostConfigInfo `xml:"info,omitempty"`
    +}
    +
    +func init() {
    +	t["ClusterDpmHostConfigSpec"] = reflect.TypeOf((*ClusterDpmHostConfigSpec)(nil)).Elem()
    +}
    +
    +type ClusterDrsConfigInfo struct {
    +	DynamicData
    +
    +	Enabled                   *bool             `xml:"enabled"`
    +	EnableVmBehaviorOverrides *bool             `xml:"enableVmBehaviorOverrides"`
    +	DefaultVmBehavior         DrsBehavior       `xml:"defaultVmBehavior,omitempty"`
    +	VmotionRate               int32             `xml:"vmotionRate,omitempty"`
    +	Option                    []BaseOptionValue `xml:"option,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ClusterDrsConfigInfo"] = reflect.TypeOf((*ClusterDrsConfigInfo)(nil)).Elem()
    +}
    +
    +type ClusterDrsFaults struct {
    +	DynamicData
    +
    +	Reason     string                           `xml:"reason"`
    +	FaultsByVm []BaseClusterDrsFaultsFaultsByVm `xml:"faultsByVm,typeattr"`
    +}
    +
    +func init() {
    +	t["ClusterDrsFaults"] = reflect.TypeOf((*ClusterDrsFaults)(nil)).Elem()
    +}
    +
    +type ClusterDrsFaultsFaultsByVirtualDisk struct {
    +	ClusterDrsFaultsFaultsByVm
    +
    +	Disk *VirtualDiskId `xml:"disk,omitempty"`
    +}
    +
    +func init() {
    +	t["ClusterDrsFaultsFaultsByVirtualDisk"] = reflect.TypeOf((*ClusterDrsFaultsFaultsByVirtualDisk)(nil)).Elem()
    +}
    +
    +type ClusterDrsFaultsFaultsByVm struct {
    +	DynamicData
    +
    +	Vm    *ManagedObjectReference `xml:"vm,omitempty"`
    +	Fault []LocalizedMethodFault  `xml:"fault"`
    +}
    +
    +func init() {
    +	t["ClusterDrsFaultsFaultsByVm"] = reflect.TypeOf((*ClusterDrsFaultsFaultsByVm)(nil)).Elem()
    +}
    +
    +type ClusterDrsMigration struct {
    +	DynamicData
    +
    +	Key                   string                 `xml:"key"`
    +	Time                  time.Time              `xml:"time"`
    +	Vm                    ManagedObjectReference `xml:"vm"`
    +	CpuLoad               int32                  `xml:"cpuLoad,omitempty"`
    +	MemoryLoad            int64                  `xml:"memoryLoad,omitempty"`
    +	Source                ManagedObjectReference `xml:"source"`
    +	SourceCpuLoad         int32                  `xml:"sourceCpuLoad,omitempty"`
    +	SourceMemoryLoad      int64                  `xml:"sourceMemoryLoad,omitempty"`
    +	Destination           ManagedObjectReference `xml:"destination"`
    +	DestinationCpuLoad    int32                  `xml:"destinationCpuLoad,omitempty"`
    +	DestinationMemoryLoad int64                  `xml:"destinationMemoryLoad,omitempty"`
    +}
    +
    +func init() {
    +	t["ClusterDrsMigration"] = reflect.TypeOf((*ClusterDrsMigration)(nil)).Elem()
    +}
    +
    +type ClusterDrsRecommendation struct {
    +	DynamicData
    +
    +	Key           string                `xml:"key"`
    +	Rating        int32                 `xml:"rating"`
    +	Reason        string                `xml:"reason"`
    +	ReasonText    string                `xml:"reasonText"`
    +	MigrationList []ClusterDrsMigration `xml:"migrationList"`
    +}
    +
    +func init() {
    +	t["ClusterDrsRecommendation"] = reflect.TypeOf((*ClusterDrsRecommendation)(nil)).Elem()
    +}
    +
    +type ClusterDrsVmConfigInfo struct {
    +	DynamicData
    +
    +	Key      ManagedObjectReference `xml:"key"`
    +	Enabled  *bool                  `xml:"enabled"`
    +	Behavior DrsBehavior            `xml:"behavior,omitempty"`
    +}
    +
    +func init() {
    +	t["ClusterDrsVmConfigInfo"] = reflect.TypeOf((*ClusterDrsVmConfigInfo)(nil)).Elem()
    +}
    +
    +type ClusterDrsVmConfigSpec struct {
    +	ArrayUpdateSpec
    +
    +	Info *ClusterDrsVmConfigInfo `xml:"info,omitempty"`
    +}
    +
    +func init() {
    +	t["ClusterDrsVmConfigSpec"] = reflect.TypeOf((*ClusterDrsVmConfigSpec)(nil)).Elem()
    +}
    +
    +type ClusterEVCManagerCheckResult struct {
    +	DynamicData
    +
    +	EvcModeKey string                   `xml:"evcModeKey"`
    +	Error      LocalizedMethodFault     `xml:"error"`
    +	Host       []ManagedObjectReference `xml:"host,omitempty"`
    +}
    +
    +func init() {
    +	t["ClusterEVCManagerCheckResult"] = reflect.TypeOf((*ClusterEVCManagerCheckResult)(nil)).Elem()
    +}
    +
    +type ClusterEVCManagerEVCState struct {
    +	DynamicData
    +
    +	SupportedEVCMode      []EVCMode                          `xml:"supportedEVCMode"`
    +	CurrentEVCModeKey     string                             `xml:"currentEVCModeKey,omitempty"`
    +	GuaranteedCPUFeatures []HostCpuIdInfo                    `xml:"guaranteedCPUFeatures,omitempty"`
    +	FeatureCapability     []HostFeatureCapability            `xml:"featureCapability,omitempty"`
    +	FeatureMask           []HostFeatureMask                  `xml:"featureMask,omitempty"`
    +	FeatureRequirement    []VirtualMachineFeatureRequirement `xml:"featureRequirement,omitempty"`
    +}
    +
    +func init() {
    +	t["ClusterEVCManagerEVCState"] = reflect.TypeOf((*ClusterEVCManagerEVCState)(nil)).Elem()
    +}
    +
    +type ClusterEnterMaintenanceMode ClusterEnterMaintenanceModeRequestType
    +
    +func init() {
    +	t["ClusterEnterMaintenanceMode"] = reflect.TypeOf((*ClusterEnterMaintenanceMode)(nil)).Elem()
    +}
    +
    +type ClusterEnterMaintenanceModeRequestType struct {
    +	This   ManagedObjectReference   `xml:"_this"`
    +	Host   []ManagedObjectReference `xml:"host"`
    +	Option []BaseOptionValue        `xml:"option,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ClusterEnterMaintenanceModeRequestType"] = reflect.TypeOf((*ClusterEnterMaintenanceModeRequestType)(nil)).Elem()
    +}
    +
    +type ClusterEnterMaintenanceModeResponse struct {
    +	Returnval ClusterEnterMaintenanceResult `xml:"returnval"`
    +}
    +
    +type ClusterEnterMaintenanceResult struct {
    +	DynamicData
    +
    +	Recommendations []ClusterRecommendation `xml:"recommendations,omitempty"`
    +	Fault           *ClusterDrsFaults       `xml:"fault,omitempty"`
    +}
    +
    +func init() {
    +	t["ClusterEnterMaintenanceResult"] = reflect.TypeOf((*ClusterEnterMaintenanceResult)(nil)).Elem()
    +}
    +
    +type ClusterEvent struct {
    +	Event
    +}
    +
    +func init() {
    +	t["ClusterEvent"] = reflect.TypeOf((*ClusterEvent)(nil)).Elem()
    +}
    +
    +type ClusterFailoverHostAdmissionControlInfo struct {
    +	ClusterDasAdmissionControlInfo
    +
    +	HostStatus []ClusterFailoverHostAdmissionControlInfoHostStatus `xml:"hostStatus,omitempty"`
    +}
    +
    +func init() {
    +	t["ClusterFailoverHostAdmissionControlInfo"] = reflect.TypeOf((*ClusterFailoverHostAdmissionControlInfo)(nil)).Elem()
    +}
    +
    +type ClusterFailoverHostAdmissionControlInfoHostStatus struct {
    +	DynamicData
    +
    +	Host   ManagedObjectReference `xml:"host"`
    +	Status ManagedEntityStatus    `xml:"status"`
    +}
    +
    +func init() {
    +	t["ClusterFailoverHostAdmissionControlInfoHostStatus"] = reflect.TypeOf((*ClusterFailoverHostAdmissionControlInfoHostStatus)(nil)).Elem()
    +}
    +
    +type ClusterFailoverHostAdmissionControlPolicy struct {
    +	ClusterDasAdmissionControlPolicy
    +
    +	FailoverHosts []ManagedObjectReference `xml:"failoverHosts,omitempty"`
    +	FailoverLevel int32                    `xml:"failoverLevel,omitempty"`
    +}
    +
    +func init() {
    +	t["ClusterFailoverHostAdmissionControlPolicy"] = reflect.TypeOf((*ClusterFailoverHostAdmissionControlPolicy)(nil)).Elem()
    +}
    +
    +type ClusterFailoverLevelAdmissionControlInfo struct {
    +	ClusterDasAdmissionControlInfo
    +
    +	CurrentFailoverLevel int32 `xml:"currentFailoverLevel"`
    +}
    +
    +func init() {
    +	t["ClusterFailoverLevelAdmissionControlInfo"] = reflect.TypeOf((*ClusterFailoverLevelAdmissionControlInfo)(nil)).Elem()
    +}
    +
    +type ClusterFailoverLevelAdmissionControlPolicy struct {
    +	ClusterDasAdmissionControlPolicy
    +
    +	FailoverLevel int32                 `xml:"failoverLevel"`
    +	SlotPolicy    BaseClusterSlotPolicy `xml:"slotPolicy,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ClusterFailoverLevelAdmissionControlPolicy"] = reflect.TypeOf((*ClusterFailoverLevelAdmissionControlPolicy)(nil)).Elem()
    +}
    +
    +type ClusterFailoverResourcesAdmissionControlInfo struct {
    +	ClusterDasAdmissionControlInfo
    +
    +	CurrentCpuFailoverResourcesPercent    int32 `xml:"currentCpuFailoverResourcesPercent"`
    +	CurrentMemoryFailoverResourcesPercent int32 `xml:"currentMemoryFailoverResourcesPercent"`
    +}
    +
    +func init() {
    +	t["ClusterFailoverResourcesAdmissionControlInfo"] = reflect.TypeOf((*ClusterFailoverResourcesAdmissionControlInfo)(nil)).Elem()
    +}
    +
    +type ClusterFailoverResourcesAdmissionControlPolicy struct {
    +	ClusterDasAdmissionControlPolicy
    +
    +	CpuFailoverResourcesPercent    int32 `xml:"cpuFailoverResourcesPercent"`
    +	MemoryFailoverResourcesPercent int32 `xml:"memoryFailoverResourcesPercent"`
    +	FailoverLevel                  int32 `xml:"failoverLevel,omitempty"`
    +	AutoComputePercentages         *bool `xml:"autoComputePercentages"`
    +}
    +
    +func init() {
    +	t["ClusterFailoverResourcesAdmissionControlPolicy"] = reflect.TypeOf((*ClusterFailoverResourcesAdmissionControlPolicy)(nil)).Elem()
    +}
    +
    +type ClusterFixedSizeSlotPolicy struct {
    +	ClusterSlotPolicy
    +
    +	Cpu    int32 `xml:"cpu"`
    +	Memory int32 `xml:"memory"`
    +}
    +
    +func init() {
    +	t["ClusterFixedSizeSlotPolicy"] = reflect.TypeOf((*ClusterFixedSizeSlotPolicy)(nil)).Elem()
    +}
    +
    +type ClusterGroupInfo struct {
    +	DynamicData
    +
    +	Name        string `xml:"name"`
    +	UserCreated *bool  `xml:"userCreated"`
    +	UniqueID    string `xml:"uniqueID,omitempty"`
    +}
    +
    +func init() {
    +	t["ClusterGroupInfo"] = reflect.TypeOf((*ClusterGroupInfo)(nil)).Elem()
    +}
    +
    +type ClusterGroupSpec struct {
    +	ArrayUpdateSpec
    +
    +	Info BaseClusterGroupInfo `xml:"info,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ClusterGroupSpec"] = reflect.TypeOf((*ClusterGroupSpec)(nil)).Elem()
    +}
    +
    +type ClusterHostGroup struct {
    +	ClusterGroupInfo
    +
    +	Host []ManagedObjectReference `xml:"host,omitempty"`
    +}
    +
    +func init() {
    +	t["ClusterHostGroup"] = reflect.TypeOf((*ClusterHostGroup)(nil)).Elem()
    +}
    +
    +type ClusterHostInfraUpdateHaModeAction struct {
    +	ClusterAction
    +
    +	OperationType string `xml:"operationType"`
    +}
    +
    +func init() {
    +	t["ClusterHostInfraUpdateHaModeAction"] = reflect.TypeOf((*ClusterHostInfraUpdateHaModeAction)(nil)).Elem()
    +}
    +
    +type ClusterHostPowerAction struct {
    +	ClusterAction
    +
    +	OperationType        HostPowerOperationType `xml:"operationType"`
    +	PowerConsumptionWatt int32                  `xml:"powerConsumptionWatt,omitempty"`
    +	CpuCapacityMHz       int32                  `xml:"cpuCapacityMHz,omitempty"`
    +	MemCapacityMB        int32                  `xml:"memCapacityMB,omitempty"`
    +}
    +
    +func init() {
    +	t["ClusterHostPowerAction"] = reflect.TypeOf((*ClusterHostPowerAction)(nil)).Elem()
    +}
    +
    +type ClusterHostRecommendation struct {
    +	DynamicData
    +
    +	Host   ManagedObjectReference `xml:"host"`
    +	Rating int32                  `xml:"rating"`
    +}
    +
    +func init() {
    +	t["ClusterHostRecommendation"] = reflect.TypeOf((*ClusterHostRecommendation)(nil)).Elem()
    +}
    +
    +type ClusterInfraUpdateHaConfigInfo struct {
    +	DynamicData
    +
    +	Enabled             *bool    `xml:"enabled"`
    +	Behavior            string   `xml:"behavior,omitempty"`
    +	ModerateRemediation string   `xml:"moderateRemediation,omitempty"`
    +	SevereRemediation   string   `xml:"severeRemediation,omitempty"`
    +	Providers           []string `xml:"providers,omitempty"`
    +}
    +
    +func init() {
    +	t["ClusterInfraUpdateHaConfigInfo"] = reflect.TypeOf((*ClusterInfraUpdateHaConfigInfo)(nil)).Elem()
    +}
    +
    +type ClusterInitialPlacementAction struct {
    +	ClusterAction
    +
    +	TargetHost ManagedObjectReference  `xml:"targetHost"`
    +	Pool       *ManagedObjectReference `xml:"pool,omitempty"`
    +}
    +
    +func init() {
    +	t["ClusterInitialPlacementAction"] = reflect.TypeOf((*ClusterInitialPlacementAction)(nil)).Elem()
    +}
    +
    +type ClusterIoFilterInfo struct {
    +	IoFilterInfo
    +
    +	OpType string `xml:"opType"`
    +	VibUrl string `xml:"vibUrl,omitempty"`
    +}
    +
    +func init() {
    +	t["ClusterIoFilterInfo"] = reflect.TypeOf((*ClusterIoFilterInfo)(nil)).Elem()
    +}
    +
    +type ClusterMigrationAction struct {
    +	ClusterAction
    +
    +	DrsMigration *ClusterDrsMigration `xml:"drsMigration,omitempty"`
    +}
    +
    +func init() {
    +	t["ClusterMigrationAction"] = reflect.TypeOf((*ClusterMigrationAction)(nil)).Elem()
    +}
    +
    +type ClusterNetworkConfigSpec struct {
    +	DynamicData
    +
    +	NetworkPortGroup ManagedObjectReference  `xml:"networkPortGroup"`
    +	IpSettings       CustomizationIPSettings `xml:"ipSettings"`
    +}
    +
    +func init() {
    +	t["ClusterNetworkConfigSpec"] = reflect.TypeOf((*ClusterNetworkConfigSpec)(nil)).Elem()
    +}
    +
    +type ClusterNotAttemptedVmInfo struct {
    +	DynamicData
    +
    +	Vm    ManagedObjectReference `xml:"vm"`
    +	Fault LocalizedMethodFault   `xml:"fault"`
    +}
    +
    +func init() {
    +	t["ClusterNotAttemptedVmInfo"] = reflect.TypeOf((*ClusterNotAttemptedVmInfo)(nil)).Elem()
    +}
    +
    +type ClusterOrchestrationInfo struct {
    +	DynamicData
    +
    +	DefaultVmReadiness *ClusterVmReadiness `xml:"defaultVmReadiness,omitempty"`
    +}
    +
    +func init() {
    +	t["ClusterOrchestrationInfo"] = reflect.TypeOf((*ClusterOrchestrationInfo)(nil)).Elem()
    +}
    +
    +type ClusterOvercommittedEvent struct {
    +	ClusterEvent
    +}
    +
    +func init() {
    +	t["ClusterOvercommittedEvent"] = reflect.TypeOf((*ClusterOvercommittedEvent)(nil)).Elem()
    +}
    +
    +type ClusterPowerOnVmResult struct {
    +	DynamicData
    +
    +	Attempted       []ClusterAttemptedVmInfo    `xml:"attempted,omitempty"`
    +	NotAttempted    []ClusterNotAttemptedVmInfo `xml:"notAttempted,omitempty"`
    +	Recommendations []ClusterRecommendation     `xml:"recommendations,omitempty"`
    +}
    +
    +func init() {
    +	t["ClusterPowerOnVmResult"] = reflect.TypeOf((*ClusterPowerOnVmResult)(nil)).Elem()
    +}
    +
    +type ClusterProactiveDrsConfigInfo struct {
    +	DynamicData
    +
    +	Enabled *bool `xml:"enabled"`
    +}
    +
    +func init() {
    +	t["ClusterProactiveDrsConfigInfo"] = reflect.TypeOf((*ClusterProactiveDrsConfigInfo)(nil)).Elem()
    +}
    +
    +type ClusterProfileCompleteConfigSpec struct {
    +	ClusterProfileConfigSpec
    +
    +	ComplyProfile *ComplianceProfile `xml:"complyProfile,omitempty"`
    +}
    +
    +func init() {
    +	t["ClusterProfileCompleteConfigSpec"] = reflect.TypeOf((*ClusterProfileCompleteConfigSpec)(nil)).Elem()
    +}
    +
    +type ClusterProfileConfigInfo struct {
    +	ProfileConfigInfo
    +
    +	ComplyProfile *ComplianceProfile `xml:"complyProfile,omitempty"`
    +}
    +
    +func init() {
    +	t["ClusterProfileConfigInfo"] = reflect.TypeOf((*ClusterProfileConfigInfo)(nil)).Elem()
    +}
    +
    +type ClusterProfileConfigServiceCreateSpec struct {
    +	ClusterProfileConfigSpec
    +
    +	ServiceType []string `xml:"serviceType,omitempty"`
    +}
    +
    +func init() {
    +	t["ClusterProfileConfigServiceCreateSpec"] = reflect.TypeOf((*ClusterProfileConfigServiceCreateSpec)(nil)).Elem()
    +}
    +
    +type ClusterProfileConfigSpec struct {
    +	ClusterProfileCreateSpec
    +}
    +
    +func init() {
    +	t["ClusterProfileConfigSpec"] = reflect.TypeOf((*ClusterProfileConfigSpec)(nil)).Elem()
    +}
    +
    +type ClusterProfileCreateSpec struct {
    +	ProfileCreateSpec
    +}
    +
    +func init() {
    +	t["ClusterProfileCreateSpec"] = reflect.TypeOf((*ClusterProfileCreateSpec)(nil)).Elem()
    +}
    +
    +type ClusterRecommendation struct {
    +	DynamicData
    +
    +	Key            string                  `xml:"key"`
    +	Type           string                  `xml:"type"`
    +	Time           time.Time               `xml:"time"`
    +	Rating         int32                   `xml:"rating"`
    +	Reason         string                  `xml:"reason"`
    +	ReasonText     string                  `xml:"reasonText"`
    +	WarningText    string                  `xml:"warningText,omitempty"`
    +	WarningDetails *LocalizableMessage     `xml:"warningDetails,omitempty"`
    +	Prerequisite   []string                `xml:"prerequisite,omitempty"`
    +	Action         []BaseClusterAction     `xml:"action,omitempty,typeattr"`
    +	Target         *ManagedObjectReference `xml:"target,omitempty"`
    +}
    +
    +func init() {
    +	t["ClusterRecommendation"] = reflect.TypeOf((*ClusterRecommendation)(nil)).Elem()
    +}
    +
    +type ClusterReconfiguredEvent struct {
    +	ClusterEvent
    +
    +	ConfigChanges *ChangesInfoEventArgument `xml:"configChanges,omitempty"`
    +}
    +
    +func init() {
    +	t["ClusterReconfiguredEvent"] = reflect.TypeOf((*ClusterReconfiguredEvent)(nil)).Elem()
    +}
    +
    +type ClusterResourceUsageSummary struct {
    +	DynamicData
    +
    +	CpuUsedMHz        int32 `xml:"cpuUsedMHz"`
    +	CpuCapacityMHz    int32 `xml:"cpuCapacityMHz"`
    +	MemUsedMB         int32 `xml:"memUsedMB"`
    +	MemCapacityMB     int32 `xml:"memCapacityMB"`
    +	PMemAvailableMB   int64 `xml:"pMemAvailableMB,omitempty"`
    +	PMemCapacityMB    int64 `xml:"pMemCapacityMB,omitempty"`
    +	StorageUsedMB     int64 `xml:"storageUsedMB"`
    +	StorageCapacityMB int64 `xml:"storageCapacityMB"`
    +}
    +
    +func init() {
    +	t["ClusterResourceUsageSummary"] = reflect.TypeOf((*ClusterResourceUsageSummary)(nil)).Elem()
    +}
    +
    +type ClusterRuleInfo struct {
    +	DynamicData
    +
    +	Key          int32               `xml:"key,omitempty"`
    +	Status       ManagedEntityStatus `xml:"status,omitempty"`
    +	Enabled      *bool               `xml:"enabled"`
    +	Name         string              `xml:"name,omitempty"`
    +	Mandatory    *bool               `xml:"mandatory"`
    +	UserCreated  *bool               `xml:"userCreated"`
    +	InCompliance *bool               `xml:"inCompliance"`
    +	RuleUuid     string              `xml:"ruleUuid,omitempty"`
    +}
    +
    +func init() {
    +	t["ClusterRuleInfo"] = reflect.TypeOf((*ClusterRuleInfo)(nil)).Elem()
    +}
    +
    +type ClusterRuleSpec struct {
    +	ArrayUpdateSpec
    +
    +	Info BaseClusterRuleInfo `xml:"info,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ClusterRuleSpec"] = reflect.TypeOf((*ClusterRuleSpec)(nil)).Elem()
    +}
    +
    +type ClusterSlotPolicy struct {
    +	DynamicData
    +}
    +
    +func init() {
    +	t["ClusterSlotPolicy"] = reflect.TypeOf((*ClusterSlotPolicy)(nil)).Elem()
    +}
    +
    +type ClusterStatusChangedEvent struct {
    +	ClusterEvent
    +
    +	OldStatus string `xml:"oldStatus"`
    +	NewStatus string `xml:"newStatus"`
    +}
    +
    +func init() {
    +	t["ClusterStatusChangedEvent"] = reflect.TypeOf((*ClusterStatusChangedEvent)(nil)).Elem()
    +}
    +
    +type ClusterUsageSummary struct {
    +	DynamicData
    +
    +	TotalCpuCapacityMhz         int32 `xml:"totalCpuCapacityMhz"`
    +	TotalMemCapacityMB          int32 `xml:"totalMemCapacityMB"`
    +	CpuReservationMhz           int32 `xml:"cpuReservationMhz"`
    +	MemReservationMB            int32 `xml:"memReservationMB"`
    +	PoweredOffCpuReservationMhz int32 `xml:"poweredOffCpuReservationMhz,omitempty"`
    +	PoweredOffMemReservationMB  int32 `xml:"poweredOffMemReservationMB,omitempty"`
    +	CpuDemandMhz                int32 `xml:"cpuDemandMhz"`
    +	MemDemandMB                 int32 `xml:"memDemandMB"`
    +	StatsGenNumber              int64 `xml:"statsGenNumber"`
    +	CpuEntitledMhz              int32 `xml:"cpuEntitledMhz"`
    +	MemEntitledMB               int32 `xml:"memEntitledMB"`
    +	PoweredOffVmCount           int32 `xml:"poweredOffVmCount"`
    +	TotalVmCount                int32 `xml:"totalVmCount"`
    +}
    +
    +func init() {
    +	t["ClusterUsageSummary"] = reflect.TypeOf((*ClusterUsageSummary)(nil)).Elem()
    +}
    +
    +type ClusterVmComponentProtectionSettings struct {
    +	DynamicData
    +
    +	VmStorageProtectionForAPD string `xml:"vmStorageProtectionForAPD,omitempty"`
    +	EnableAPDTimeoutForHosts  *bool  `xml:"enableAPDTimeoutForHosts"`
    +	VmTerminateDelayForAPDSec int32  `xml:"vmTerminateDelayForAPDSec,omitempty"`
    +	VmReactionOnAPDCleared    string `xml:"vmReactionOnAPDCleared,omitempty"`
    +	VmStorageProtectionForPDL string `xml:"vmStorageProtectionForPDL,omitempty"`
    +}
    +
    +func init() {
    +	t["ClusterVmComponentProtectionSettings"] = reflect.TypeOf((*ClusterVmComponentProtectionSettings)(nil)).Elem()
    +}
    +
    +type ClusterVmGroup struct {
    +	ClusterGroupInfo
    +
    +	Vm []ManagedObjectReference `xml:"vm,omitempty"`
    +}
    +
    +func init() {
    +	t["ClusterVmGroup"] = reflect.TypeOf((*ClusterVmGroup)(nil)).Elem()
    +}
    +
    +type ClusterVmHostRuleInfo struct {
    +	ClusterRuleInfo
    +
    +	VmGroupName             string `xml:"vmGroupName,omitempty"`
    +	AffineHostGroupName     string `xml:"affineHostGroupName,omitempty"`
    +	AntiAffineHostGroupName string `xml:"antiAffineHostGroupName,omitempty"`
    +}
    +
    +func init() {
    +	t["ClusterVmHostRuleInfo"] = reflect.TypeOf((*ClusterVmHostRuleInfo)(nil)).Elem()
    +}
    +
    +type ClusterVmOrchestrationInfo struct {
    +	DynamicData
    +
    +	Vm          ManagedObjectReference `xml:"vm"`
    +	VmReadiness ClusterVmReadiness     `xml:"vmReadiness"`
    +}
    +
    +func init() {
    +	t["ClusterVmOrchestrationInfo"] = reflect.TypeOf((*ClusterVmOrchestrationInfo)(nil)).Elem()
    +}
    +
    +type ClusterVmOrchestrationSpec struct {
    +	ArrayUpdateSpec
    +
    +	Info *ClusterVmOrchestrationInfo `xml:"info,omitempty"`
    +}
    +
    +func init() {
    +	t["ClusterVmOrchestrationSpec"] = reflect.TypeOf((*ClusterVmOrchestrationSpec)(nil)).Elem()
    +}
    +
    +type ClusterVmReadiness struct {
    +	DynamicData
    +
    +	ReadyCondition string `xml:"readyCondition,omitempty"`
    +	PostReadyDelay int32  `xml:"postReadyDelay,omitempty"`
    +}
    +
    +func init() {
    +	t["ClusterVmReadiness"] = reflect.TypeOf((*ClusterVmReadiness)(nil)).Elem()
    +}
    +
    +type ClusterVmToolsMonitoringSettings struct {
    +	DynamicData
    +
    +	Enabled          *bool  `xml:"enabled"`
    +	VmMonitoring     string `xml:"vmMonitoring,omitempty"`
    +	ClusterSettings  *bool  `xml:"clusterSettings"`
    +	FailureInterval  int32  `xml:"failureInterval,omitempty"`
    +	MinUpTime        int32  `xml:"minUpTime,omitempty"`
    +	MaxFailures      int32  `xml:"maxFailures,omitempty"`
    +	MaxFailureWindow int32  `xml:"maxFailureWindow,omitempty"`
    +}
    +
    +func init() {
    +	t["ClusterVmToolsMonitoringSettings"] = reflect.TypeOf((*ClusterVmToolsMonitoringSettings)(nil)).Elem()
    +}
    +
    +type CollectorAddressUnset struct {
    +	DvsFault
    +}
    +
    +func init() {
    +	t["CollectorAddressUnset"] = reflect.TypeOf((*CollectorAddressUnset)(nil)).Elem()
    +}
    +
    +type CollectorAddressUnsetFault CollectorAddressUnset
    +
    +func init() {
    +	t["CollectorAddressUnsetFault"] = reflect.TypeOf((*CollectorAddressUnsetFault)(nil)).Elem()
    +}
    +
    +type ComplianceFailure struct {
    +	DynamicData
    +
    +	FailureType    string                                     `xml:"failureType"`
    +	Message        LocalizableMessage                         `xml:"message"`
    +	ExpressionName string                                     `xml:"expressionName,omitempty"`
    +	FailureValues  []ComplianceFailureComplianceFailureValues `xml:"failureValues,omitempty"`
    +}
    +
    +func init() {
    +	t["ComplianceFailure"] = reflect.TypeOf((*ComplianceFailure)(nil)).Elem()
    +}
    +
    +type ComplianceFailureComplianceFailureValues struct {
    +	DynamicData
    +
    +	ComparisonIdentifier string  `xml:"comparisonIdentifier"`
    +	ProfileInstance      string  `xml:"profileInstance,omitempty"`
    +	HostValue            AnyType `xml:"hostValue,omitempty,typeattr"`
    +	ProfileValue         AnyType `xml:"profileValue,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ComplianceFailureComplianceFailureValues"] = reflect.TypeOf((*ComplianceFailureComplianceFailureValues)(nil)).Elem()
    +}
    +
    +type ComplianceLocator struct {
    +	DynamicData
    +
    +	ExpressionName string              `xml:"expressionName"`
    +	ApplyPath      ProfilePropertyPath `xml:"applyPath"`
    +}
    +
    +func init() {
    +	t["ComplianceLocator"] = reflect.TypeOf((*ComplianceLocator)(nil)).Elem()
    +}
    +
    +type ComplianceProfile struct {
    +	DynamicData
    +
    +	Expression     []BaseProfileExpression `xml:"expression,typeattr"`
    +	RootExpression string                  `xml:"rootExpression"`
    +}
    +
    +func init() {
    +	t["ComplianceProfile"] = reflect.TypeOf((*ComplianceProfile)(nil)).Elem()
    +}
    +
    +type ComplianceResult struct {
    +	DynamicData
    +
    +	Profile          *ManagedObjectReference `xml:"profile,omitempty"`
    +	ComplianceStatus string                  `xml:"complianceStatus"`
    +	Entity           *ManagedObjectReference `xml:"entity,omitempty"`
    +	CheckTime        *time.Time              `xml:"checkTime"`
    +	Failure          []ComplianceFailure     `xml:"failure,omitempty"`
    +}
    +
    +func init() {
    +	t["ComplianceResult"] = reflect.TypeOf((*ComplianceResult)(nil)).Elem()
    +}
    +
    +type CompositeHostProfileRequestType struct {
    +	This                   ManagedObjectReference   `xml:"_this"`
    +	Source                 ManagedObjectReference   `xml:"source"`
    +	Targets                []ManagedObjectReference `xml:"targets,omitempty"`
    +	ToBeMerged             *HostApplyProfile        `xml:"toBeMerged,omitempty"`
    +	ToBeReplacedWith       *HostApplyProfile        `xml:"toBeReplacedWith,omitempty"`
    +	ToBeDeleted            *HostApplyProfile        `xml:"toBeDeleted,omitempty"`
    +	EnableStatusToBeCopied *HostApplyProfile        `xml:"enableStatusToBeCopied,omitempty"`
    +}
    +
    +func init() {
    +	t["CompositeHostProfileRequestType"] = reflect.TypeOf((*CompositeHostProfileRequestType)(nil)).Elem()
    +}
    +
    +type CompositeHostProfile_Task CompositeHostProfileRequestType
    +
    +func init() {
    +	t["CompositeHostProfile_Task"] = reflect.TypeOf((*CompositeHostProfile_Task)(nil)).Elem()
    +}
    +
    +type CompositeHostProfile_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CompositePolicyOption struct {
    +	PolicyOption
    +
    +	Option []BasePolicyOption `xml:"option,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["CompositePolicyOption"] = reflect.TypeOf((*CompositePolicyOption)(nil)).Elem()
    +}
    +
    +type ComputeDiskPartitionInfo ComputeDiskPartitionInfoRequestType
    +
    +func init() {
    +	t["ComputeDiskPartitionInfo"] = reflect.TypeOf((*ComputeDiskPartitionInfo)(nil)).Elem()
    +}
    +
    +type ComputeDiskPartitionInfoForResize ComputeDiskPartitionInfoForResizeRequestType
    +
    +func init() {
    +	t["ComputeDiskPartitionInfoForResize"] = reflect.TypeOf((*ComputeDiskPartitionInfoForResize)(nil)).Elem()
    +}
    +
    +type ComputeDiskPartitionInfoForResizeRequestType struct {
    +	This            ManagedObjectReference      `xml:"_this"`
    +	Partition       HostScsiDiskPartition       `xml:"partition"`
    +	BlockRange      HostDiskPartitionBlockRange `xml:"blockRange"`
    +	PartitionFormat string                      `xml:"partitionFormat,omitempty"`
    +}
    +
    +func init() {
    +	t["ComputeDiskPartitionInfoForResizeRequestType"] = reflect.TypeOf((*ComputeDiskPartitionInfoForResizeRequestType)(nil)).Elem()
    +}
    +
    +type ComputeDiskPartitionInfoForResizeResponse struct {
    +	Returnval HostDiskPartitionInfo `xml:"returnval"`
    +}
    +
    +type ComputeDiskPartitionInfoRequestType struct {
    +	This            ManagedObjectReference  `xml:"_this"`
    +	DevicePath      string                  `xml:"devicePath"`
    +	Layout          HostDiskPartitionLayout `xml:"layout"`
    +	PartitionFormat string                  `xml:"partitionFormat,omitempty"`
    +}
    +
    +func init() {
    +	t["ComputeDiskPartitionInfoRequestType"] = reflect.TypeOf((*ComputeDiskPartitionInfoRequestType)(nil)).Elem()
    +}
    +
    +type ComputeDiskPartitionInfoResponse struct {
    +	Returnval HostDiskPartitionInfo `xml:"returnval"`
    +}
    +
    +type ComputeResourceConfigInfo struct {
    +	DynamicData
    +
    +	VmSwapPlacement           string `xml:"vmSwapPlacement"`
    +	SpbmEnabled               *bool  `xml:"spbmEnabled"`
    +	DefaultHardwareVersionKey string `xml:"defaultHardwareVersionKey,omitempty"`
    +}
    +
    +func init() {
    +	t["ComputeResourceConfigInfo"] = reflect.TypeOf((*ComputeResourceConfigInfo)(nil)).Elem()
    +}
    +
    +type ComputeResourceConfigSpec struct {
    +	DynamicData
    +
    +	VmSwapPlacement           string `xml:"vmSwapPlacement,omitempty"`
    +	SpbmEnabled               *bool  `xml:"spbmEnabled"`
    +	DefaultHardwareVersionKey string `xml:"defaultHardwareVersionKey,omitempty"`
    +}
    +
    +func init() {
    +	t["ComputeResourceConfigSpec"] = reflect.TypeOf((*ComputeResourceConfigSpec)(nil)).Elem()
    +}
    +
    +type ComputeResourceEventArgument struct {
    +	EntityEventArgument
    +
    +	ComputeResource ManagedObjectReference `xml:"computeResource"`
    +}
    +
    +func init() {
    +	t["ComputeResourceEventArgument"] = reflect.TypeOf((*ComputeResourceEventArgument)(nil)).Elem()
    +}
    +
    +type ComputeResourceHostSPBMLicenseInfo struct {
    +	DynamicData
    +
    +	Host         ManagedObjectReference                                 `xml:"host"`
    +	LicenseState ComputeResourceHostSPBMLicenseInfoHostSPBMLicenseState `xml:"licenseState"`
    +}
    +
    +func init() {
    +	t["ComputeResourceHostSPBMLicenseInfo"] = reflect.TypeOf((*ComputeResourceHostSPBMLicenseInfo)(nil)).Elem()
    +}
    +
    +type ComputeResourceSummary struct {
    +	DynamicData
    +
    +	TotalCpu          int32               `xml:"totalCpu"`
    +	TotalMemory       int64               `xml:"totalMemory"`
    +	NumCpuCores       int16               `xml:"numCpuCores"`
    +	NumCpuThreads     int16               `xml:"numCpuThreads"`
    +	EffectiveCpu      int32               `xml:"effectiveCpu"`
    +	EffectiveMemory   int64               `xml:"effectiveMemory"`
    +	NumHosts          int32               `xml:"numHosts"`
    +	NumEffectiveHosts int32               `xml:"numEffectiveHosts"`
    +	OverallStatus     ManagedEntityStatus `xml:"overallStatus"`
    +}
    +
    +func init() {
    +	t["ComputeResourceSummary"] = reflect.TypeOf((*ComputeResourceSummary)(nil)).Elem()
    +}
    +
    +type ConcurrentAccess struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["ConcurrentAccess"] = reflect.TypeOf((*ConcurrentAccess)(nil)).Elem()
    +}
    +
    +type ConcurrentAccessFault ConcurrentAccess
    +
    +func init() {
    +	t["ConcurrentAccessFault"] = reflect.TypeOf((*ConcurrentAccessFault)(nil)).Elem()
    +}
    +
    +type ConfigTarget struct {
    +	DynamicData
    +
    +	NumCpus                                int32                                       `xml:"numCpus"`
    +	NumCpuCores                            int32                                       `xml:"numCpuCores"`
    +	NumNumaNodes                           int32                                       `xml:"numNumaNodes"`
    +	SmcPresent                             *bool                                       `xml:"smcPresent"`
    +	Datastore                              []VirtualMachineDatastoreInfo               `xml:"datastore,omitempty"`
    +	Network                                []VirtualMachineNetworkInfo                 `xml:"network,omitempty"`
    +	OpaqueNetwork                          []OpaqueNetworkTargetInfo                   `xml:"opaqueNetwork,omitempty"`
    +	DistributedVirtualPortgroup            []DistributedVirtualPortgroupInfo           `xml:"distributedVirtualPortgroup,omitempty"`
    +	DistributedVirtualSwitch               []DistributedVirtualSwitchInfo              `xml:"distributedVirtualSwitch,omitempty"`
    +	CdRom                                  []VirtualMachineCdromInfo                   `xml:"cdRom,omitempty"`
    +	Serial                                 []VirtualMachineSerialInfo                  `xml:"serial,omitempty"`
    +	Parallel                               []VirtualMachineParallelInfo                `xml:"parallel,omitempty"`
    +	Sound                                  []VirtualMachineSoundInfo                   `xml:"sound,omitempty"`
    +	Usb                                    []VirtualMachineUsbInfo                     `xml:"usb,omitempty"`
    +	Floppy                                 []VirtualMachineFloppyInfo                  `xml:"floppy,omitempty"`
    +	LegacyNetworkInfo                      []VirtualMachineLegacyNetworkSwitchInfo     `xml:"legacyNetworkInfo,omitempty"`
    +	ScsiPassthrough                        []VirtualMachineScsiPassthroughInfo         `xml:"scsiPassthrough,omitempty"`
    +	ScsiDisk                               []VirtualMachineScsiDiskDeviceInfo          `xml:"scsiDisk,omitempty"`
    +	IdeDisk                                []VirtualMachineIdeDiskDeviceInfo           `xml:"ideDisk,omitempty"`
    +	MaxMemMBOptimalPerf                    int32                                       `xml:"maxMemMBOptimalPerf"`
    +	ResourcePool                           *ResourcePoolRuntimeInfo                    `xml:"resourcePool,omitempty"`
    +	AutoVmotion                            *bool                                       `xml:"autoVmotion"`
    +	PciPassthrough                         []BaseVirtualMachinePciPassthroughInfo      `xml:"pciPassthrough,omitempty,typeattr"`
    +	Sriov                                  []VirtualMachineSriovInfo                   `xml:"sriov,omitempty"`
    +	VFlashModule                           []VirtualMachineVFlashModuleInfo            `xml:"vFlashModule,omitempty"`
    +	SharedGpuPassthroughTypes              []VirtualMachinePciSharedGpuPassthroughInfo `xml:"sharedGpuPassthroughTypes,omitempty"`
    +	AvailablePersistentMemoryReservationMB int64                                       `xml:"availablePersistentMemoryReservationMB,omitempty"`
    +}
    +
    +func init() {
    +	t["ConfigTarget"] = reflect.TypeOf((*ConfigTarget)(nil)).Elem()
    +}
    +
    +type ConfigureCryptoKey ConfigureCryptoKeyRequestType
    +
    +func init() {
    +	t["ConfigureCryptoKey"] = reflect.TypeOf((*ConfigureCryptoKey)(nil)).Elem()
    +}
    +
    +type ConfigureCryptoKeyRequestType struct {
    +	This  ManagedObjectReference `xml:"_this"`
    +	KeyId *CryptoKeyId           `xml:"keyId,omitempty"`
    +}
    +
    +func init() {
    +	t["ConfigureCryptoKeyRequestType"] = reflect.TypeOf((*ConfigureCryptoKeyRequestType)(nil)).Elem()
    +}
    +
    +type ConfigureCryptoKeyResponse struct {
    +}
    +
    +type ConfigureDatastoreIORMRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	Datastore ManagedObjectReference `xml:"datastore"`
    +	Spec      StorageIORMConfigSpec  `xml:"spec"`
    +}
    +
    +func init() {
    +	t["ConfigureDatastoreIORMRequestType"] = reflect.TypeOf((*ConfigureDatastoreIORMRequestType)(nil)).Elem()
    +}
    +
    +type ConfigureDatastoreIORM_Task ConfigureDatastoreIORMRequestType
    +
    +func init() {
    +	t["ConfigureDatastoreIORM_Task"] = reflect.TypeOf((*ConfigureDatastoreIORM_Task)(nil)).Elem()
    +}
    +
    +type ConfigureDatastoreIORM_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type ConfigureDatastorePrincipal ConfigureDatastorePrincipalRequestType
    +
    +func init() {
    +	t["ConfigureDatastorePrincipal"] = reflect.TypeOf((*ConfigureDatastorePrincipal)(nil)).Elem()
    +}
    +
    +type ConfigureDatastorePrincipalRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	UserName string                 `xml:"userName"`
    +	Password string                 `xml:"password,omitempty"`
    +}
    +
    +func init() {
    +	t["ConfigureDatastorePrincipalRequestType"] = reflect.TypeOf((*ConfigureDatastorePrincipalRequestType)(nil)).Elem()
    +}
    +
    +type ConfigureDatastorePrincipalResponse struct {
    +}
    +
    +type ConfigureEvcModeRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	EvcModeKey string                 `xml:"evcModeKey"`
    +}
    +
    +func init() {
    +	t["ConfigureEvcModeRequestType"] = reflect.TypeOf((*ConfigureEvcModeRequestType)(nil)).Elem()
    +}
    +
    +type ConfigureEvcMode_Task ConfigureEvcModeRequestType
    +
    +func init() {
    +	t["ConfigureEvcMode_Task"] = reflect.TypeOf((*ConfigureEvcMode_Task)(nil)).Elem()
    +}
    +
    +type ConfigureEvcMode_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type ConfigureHostCacheRequestType struct {
    +	This ManagedObjectReference     `xml:"_this"`
    +	Spec HostCacheConfigurationSpec `xml:"spec"`
    +}
    +
    +func init() {
    +	t["ConfigureHostCacheRequestType"] = reflect.TypeOf((*ConfigureHostCacheRequestType)(nil)).Elem()
    +}
    +
    +type ConfigureHostCache_Task ConfigureHostCacheRequestType
    +
    +func init() {
    +	t["ConfigureHostCache_Task"] = reflect.TypeOf((*ConfigureHostCache_Task)(nil)).Elem()
    +}
    +
    +type ConfigureHostCache_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type ConfigureLicenseSource ConfigureLicenseSourceRequestType
    +
    +func init() {
    +	t["ConfigureLicenseSource"] = reflect.TypeOf((*ConfigureLicenseSource)(nil)).Elem()
    +}
    +
    +type ConfigureLicenseSourceRequestType struct {
    +	This          ManagedObjectReference  `xml:"_this"`
    +	Host          *ManagedObjectReference `xml:"host,omitempty"`
    +	LicenseSource BaseLicenseSource       `xml:"licenseSource,typeattr"`
    +}
    +
    +func init() {
    +	t["ConfigureLicenseSourceRequestType"] = reflect.TypeOf((*ConfigureLicenseSourceRequestType)(nil)).Elem()
    +}
    +
    +type ConfigureLicenseSourceResponse struct {
    +}
    +
    +type ConfigurePowerPolicy ConfigurePowerPolicyRequestType
    +
    +func init() {
    +	t["ConfigurePowerPolicy"] = reflect.TypeOf((*ConfigurePowerPolicy)(nil)).Elem()
    +}
    +
    +type ConfigurePowerPolicyRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Key  int32                  `xml:"key"`
    +}
    +
    +func init() {
    +	t["ConfigurePowerPolicyRequestType"] = reflect.TypeOf((*ConfigurePowerPolicyRequestType)(nil)).Elem()
    +}
    +
    +type ConfigurePowerPolicyResponse struct {
    +}
    +
    +type ConfigureStorageDrsForPodRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	Pod    ManagedObjectReference `xml:"pod"`
    +	Spec   StorageDrsConfigSpec   `xml:"spec"`
    +	Modify bool                   `xml:"modify"`
    +}
    +
    +func init() {
    +	t["ConfigureStorageDrsForPodRequestType"] = reflect.TypeOf((*ConfigureStorageDrsForPodRequestType)(nil)).Elem()
    +}
    +
    +type ConfigureStorageDrsForPod_Task ConfigureStorageDrsForPodRequestType
    +
    +func init() {
    +	t["ConfigureStorageDrsForPod_Task"] = reflect.TypeOf((*ConfigureStorageDrsForPod_Task)(nil)).Elem()
    +}
    +
    +type ConfigureStorageDrsForPod_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type ConfigureVFlashResourceExRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	DevicePath []string               `xml:"devicePath,omitempty"`
    +}
    +
    +func init() {
    +	t["ConfigureVFlashResourceExRequestType"] = reflect.TypeOf((*ConfigureVFlashResourceExRequestType)(nil)).Elem()
    +}
    +
    +type ConfigureVFlashResourceEx_Task ConfigureVFlashResourceExRequestType
    +
    +func init() {
    +	t["ConfigureVFlashResourceEx_Task"] = reflect.TypeOf((*ConfigureVFlashResourceEx_Task)(nil)).Elem()
    +}
    +
    +type ConfigureVFlashResourceEx_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type ConflictingConfiguration struct {
    +	DvsFault
    +
    +	ConfigInConflict []ConflictingConfigurationConfig `xml:"configInConflict"`
    +}
    +
    +func init() {
    +	t["ConflictingConfiguration"] = reflect.TypeOf((*ConflictingConfiguration)(nil)).Elem()
    +}
    +
    +type ConflictingConfigurationConfig struct {
    +	DynamicData
    +
    +	Entity       *ManagedObjectReference `xml:"entity,omitempty"`
    +	PropertyPath string                  `xml:"propertyPath"`
    +}
    +
    +func init() {
    +	t["ConflictingConfigurationConfig"] = reflect.TypeOf((*ConflictingConfigurationConfig)(nil)).Elem()
    +}
    +
    +type ConflictingConfigurationFault ConflictingConfiguration
    +
    +func init() {
    +	t["ConflictingConfigurationFault"] = reflect.TypeOf((*ConflictingConfigurationFault)(nil)).Elem()
    +}
    +
    +type ConflictingDatastoreFound struct {
    +	RuntimeFault
    +
    +	Name string `xml:"name"`
    +	Url  string `xml:"url"`
    +}
    +
    +func init() {
    +	t["ConflictingDatastoreFound"] = reflect.TypeOf((*ConflictingDatastoreFound)(nil)).Elem()
    +}
    +
    +type ConflictingDatastoreFoundFault ConflictingDatastoreFound
    +
    +func init() {
    +	t["ConflictingDatastoreFoundFault"] = reflect.TypeOf((*ConflictingDatastoreFoundFault)(nil)).Elem()
    +}
    +
    +type ConnectedIso struct {
    +	OvfExport
    +
    +	Cdrom    VirtualCdrom `xml:"cdrom"`
    +	Filename string       `xml:"filename"`
    +}
    +
    +func init() {
    +	t["ConnectedIso"] = reflect.TypeOf((*ConnectedIso)(nil)).Elem()
    +}
    +
    +type ConnectedIsoFault ConnectedIso
    +
    +func init() {
    +	t["ConnectedIsoFault"] = reflect.TypeOf((*ConnectedIsoFault)(nil)).Elem()
    +}
    +
    +type ConsolidateVMDisksRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["ConsolidateVMDisksRequestType"] = reflect.TypeOf((*ConsolidateVMDisksRequestType)(nil)).Elem()
    +}
    +
    +type ConsolidateVMDisks_Task ConsolidateVMDisksRequestType
    +
    +func init() {
    +	t["ConsolidateVMDisks_Task"] = reflect.TypeOf((*ConsolidateVMDisks_Task)(nil)).Elem()
    +}
    +
    +type ConsolidateVMDisks_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type ContinueRetrievePropertiesEx ContinueRetrievePropertiesExRequestType
    +
    +func init() {
    +	t["ContinueRetrievePropertiesEx"] = reflect.TypeOf((*ContinueRetrievePropertiesEx)(nil)).Elem()
    +}
    +
    +type ContinueRetrievePropertiesExRequestType struct {
    +	This  ManagedObjectReference `xml:"_this"`
    +	Token string                 `xml:"token"`
    +}
    +
    +func init() {
    +	t["ContinueRetrievePropertiesExRequestType"] = reflect.TypeOf((*ContinueRetrievePropertiesExRequestType)(nil)).Elem()
    +}
    +
    +type ContinueRetrievePropertiesExResponse struct {
    +	Returnval RetrieveResult `xml:"returnval"`
    +}
    +
    +type ConvertNamespacePathToUuidPath ConvertNamespacePathToUuidPathRequestType
    +
    +func init() {
    +	t["ConvertNamespacePathToUuidPath"] = reflect.TypeOf((*ConvertNamespacePathToUuidPath)(nil)).Elem()
    +}
    +
    +type ConvertNamespacePathToUuidPathRequestType struct {
    +	This         ManagedObjectReference  `xml:"_this"`
    +	Datacenter   *ManagedObjectReference `xml:"datacenter,omitempty"`
    +	NamespaceUrl string                  `xml:"namespaceUrl"`
    +}
    +
    +func init() {
    +	t["ConvertNamespacePathToUuidPathRequestType"] = reflect.TypeOf((*ConvertNamespacePathToUuidPathRequestType)(nil)).Elem()
    +}
    +
    +type ConvertNamespacePathToUuidPathResponse struct {
    +	Returnval string `xml:"returnval"`
    +}
    +
    +type CopyDatastoreFileRequestType struct {
    +	This                  ManagedObjectReference  `xml:"_this"`
    +	SourceName            string                  `xml:"sourceName"`
    +	SourceDatacenter      *ManagedObjectReference `xml:"sourceDatacenter,omitempty"`
    +	DestinationName       string                  `xml:"destinationName"`
    +	DestinationDatacenter *ManagedObjectReference `xml:"destinationDatacenter,omitempty"`
    +	Force                 *bool                   `xml:"force"`
    +}
    +
    +func init() {
    +	t["CopyDatastoreFileRequestType"] = reflect.TypeOf((*CopyDatastoreFileRequestType)(nil)).Elem()
    +}
    +
    +type CopyDatastoreFile_Task CopyDatastoreFileRequestType
    +
    +func init() {
    +	t["CopyDatastoreFile_Task"] = reflect.TypeOf((*CopyDatastoreFile_Task)(nil)).Elem()
    +}
    +
    +type CopyDatastoreFile_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CopyVirtualDiskRequestType struct {
    +	This             ManagedObjectReference  `xml:"_this"`
    +	SourceName       string                  `xml:"sourceName"`
    +	SourceDatacenter *ManagedObjectReference `xml:"sourceDatacenter,omitempty"`
    +	DestName         string                  `xml:"destName"`
    +	DestDatacenter   *ManagedObjectReference `xml:"destDatacenter,omitempty"`
    +	DestSpec         BaseVirtualDiskSpec     `xml:"destSpec,omitempty,typeattr"`
    +	Force            *bool                   `xml:"force"`
    +}
    +
    +func init() {
    +	t["CopyVirtualDiskRequestType"] = reflect.TypeOf((*CopyVirtualDiskRequestType)(nil)).Elem()
    +}
    +
    +type CopyVirtualDisk_Task CopyVirtualDiskRequestType
    +
    +func init() {
    +	t["CopyVirtualDisk_Task"] = reflect.TypeOf((*CopyVirtualDisk_Task)(nil)).Elem()
    +}
    +
    +type CopyVirtualDisk_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CpuCompatibilityUnknown struct {
    +	CpuIncompatible
    +}
    +
    +func init() {
    +	t["CpuCompatibilityUnknown"] = reflect.TypeOf((*CpuCompatibilityUnknown)(nil)).Elem()
    +}
    +
    +type CpuCompatibilityUnknownFault CpuCompatibilityUnknown
    +
    +func init() {
    +	t["CpuCompatibilityUnknownFault"] = reflect.TypeOf((*CpuCompatibilityUnknownFault)(nil)).Elem()
    +}
    +
    +type CpuHotPlugNotSupported struct {
    +	VmConfigFault
    +}
    +
    +func init() {
    +	t["CpuHotPlugNotSupported"] = reflect.TypeOf((*CpuHotPlugNotSupported)(nil)).Elem()
    +}
    +
    +type CpuHotPlugNotSupportedFault CpuHotPlugNotSupported
    +
    +func init() {
    +	t["CpuHotPlugNotSupportedFault"] = reflect.TypeOf((*CpuHotPlugNotSupportedFault)(nil)).Elem()
    +}
    +
    +type CpuIncompatible struct {
    +	VirtualHardwareCompatibilityIssue
    +
    +	Level        int32                   `xml:"level"`
    +	RegisterName string                  `xml:"registerName"`
    +	RegisterBits string                  `xml:"registerBits,omitempty"`
    +	DesiredBits  string                  `xml:"desiredBits,omitempty"`
    +	Host         *ManagedObjectReference `xml:"host,omitempty"`
    +}
    +
    +func init() {
    +	t["CpuIncompatible"] = reflect.TypeOf((*CpuIncompatible)(nil)).Elem()
    +}
    +
    +type CpuIncompatible1ECX struct {
    +	CpuIncompatible
    +
    +	Sse3      bool  `xml:"sse3"`
    +	Pclmulqdq *bool `xml:"pclmulqdq"`
    +	Ssse3     bool  `xml:"ssse3"`
    +	Sse41     bool  `xml:"sse41"`
    +	Sse42     bool  `xml:"sse42"`
    +	Aes       *bool `xml:"aes"`
    +	Other     bool  `xml:"other"`
    +	OtherOnly bool  `xml:"otherOnly"`
    +}
    +
    +func init() {
    +	t["CpuIncompatible1ECX"] = reflect.TypeOf((*CpuIncompatible1ECX)(nil)).Elem()
    +}
    +
    +type CpuIncompatible1ECXFault CpuIncompatible1ECX
    +
    +func init() {
    +	t["CpuIncompatible1ECXFault"] = reflect.TypeOf((*CpuIncompatible1ECXFault)(nil)).Elem()
    +}
    +
    +type CpuIncompatible81EDX struct {
    +	CpuIncompatible
    +
    +	Nx        bool `xml:"nx"`
    +	Ffxsr     bool `xml:"ffxsr"`
    +	Rdtscp    bool `xml:"rdtscp"`
    +	Lm        bool `xml:"lm"`
    +	Other     bool `xml:"other"`
    +	OtherOnly bool `xml:"otherOnly"`
    +}
    +
    +func init() {
    +	t["CpuIncompatible81EDX"] = reflect.TypeOf((*CpuIncompatible81EDX)(nil)).Elem()
    +}
    +
    +type CpuIncompatible81EDXFault CpuIncompatible81EDX
    +
    +func init() {
    +	t["CpuIncompatible81EDXFault"] = reflect.TypeOf((*CpuIncompatible81EDXFault)(nil)).Elem()
    +}
    +
    +type CpuIncompatibleFault BaseCpuIncompatible
    +
    +func init() {
    +	t["CpuIncompatibleFault"] = reflect.TypeOf((*CpuIncompatibleFault)(nil)).Elem()
    +}
    +
    +type CreateAlarm CreateAlarmRequestType
    +
    +func init() {
    +	t["CreateAlarm"] = reflect.TypeOf((*CreateAlarm)(nil)).Elem()
    +}
    +
    +type CreateAlarmRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	Entity ManagedObjectReference `xml:"entity"`
    +	Spec   BaseAlarmSpec          `xml:"spec,typeattr"`
    +}
    +
    +func init() {
    +	t["CreateAlarmRequestType"] = reflect.TypeOf((*CreateAlarmRequestType)(nil)).Elem()
    +}
    +
    +type CreateAlarmResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CreateChildVMRequestType struct {
    +	This   ManagedObjectReference   `xml:"_this"`
    +	Config VirtualMachineConfigSpec `xml:"config"`
    +	Host   *ManagedObjectReference  `xml:"host,omitempty"`
    +}
    +
    +func init() {
    +	t["CreateChildVMRequestType"] = reflect.TypeOf((*CreateChildVMRequestType)(nil)).Elem()
    +}
    +
    +type CreateChildVM_Task CreateChildVMRequestType
    +
    +func init() {
    +	t["CreateChildVM_Task"] = reflect.TypeOf((*CreateChildVM_Task)(nil)).Elem()
    +}
    +
    +type CreateChildVM_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CreateCluster CreateClusterRequestType
    +
    +func init() {
    +	t["CreateCluster"] = reflect.TypeOf((*CreateCluster)(nil)).Elem()
    +}
    +
    +type CreateClusterEx CreateClusterExRequestType
    +
    +func init() {
    +	t["CreateClusterEx"] = reflect.TypeOf((*CreateClusterEx)(nil)).Elem()
    +}
    +
    +type CreateClusterExRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Name string                 `xml:"name"`
    +	Spec ClusterConfigSpecEx    `xml:"spec"`
    +}
    +
    +func init() {
    +	t["CreateClusterExRequestType"] = reflect.TypeOf((*CreateClusterExRequestType)(nil)).Elem()
    +}
    +
    +type CreateClusterExResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CreateClusterRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Name string                 `xml:"name"`
    +	Spec ClusterConfigSpec      `xml:"spec"`
    +}
    +
    +func init() {
    +	t["CreateClusterRequestType"] = reflect.TypeOf((*CreateClusterRequestType)(nil)).Elem()
    +}
    +
    +type CreateClusterResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CreateCollectorForEvents CreateCollectorForEventsRequestType
    +
    +func init() {
    +	t["CreateCollectorForEvents"] = reflect.TypeOf((*CreateCollectorForEvents)(nil)).Elem()
    +}
    +
    +type CreateCollectorForEventsRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	Filter EventFilterSpec        `xml:"filter"`
    +}
    +
    +func init() {
    +	t["CreateCollectorForEventsRequestType"] = reflect.TypeOf((*CreateCollectorForEventsRequestType)(nil)).Elem()
    +}
    +
    +type CreateCollectorForEventsResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CreateCollectorForTasks CreateCollectorForTasksRequestType
    +
    +func init() {
    +	t["CreateCollectorForTasks"] = reflect.TypeOf((*CreateCollectorForTasks)(nil)).Elem()
    +}
    +
    +type CreateCollectorForTasksRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	Filter TaskFilterSpec         `xml:"filter"`
    +}
    +
    +func init() {
    +	t["CreateCollectorForTasksRequestType"] = reflect.TypeOf((*CreateCollectorForTasksRequestType)(nil)).Elem()
    +}
    +
    +type CreateCollectorForTasksResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CreateContainerView CreateContainerViewRequestType
    +
    +func init() {
    +	t["CreateContainerView"] = reflect.TypeOf((*CreateContainerView)(nil)).Elem()
    +}
    +
    +type CreateContainerViewRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	Container ManagedObjectReference `xml:"container"`
    +	Type      []string               `xml:"type,omitempty"`
    +	Recursive bool                   `xml:"recursive"`
    +}
    +
    +func init() {
    +	t["CreateContainerViewRequestType"] = reflect.TypeOf((*CreateContainerViewRequestType)(nil)).Elem()
    +}
    +
    +type CreateContainerViewResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CreateCustomizationSpec CreateCustomizationSpecRequestType
    +
    +func init() {
    +	t["CreateCustomizationSpec"] = reflect.TypeOf((*CreateCustomizationSpec)(nil)).Elem()
    +}
    +
    +type CreateCustomizationSpecRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Item CustomizationSpecItem  `xml:"item"`
    +}
    +
    +func init() {
    +	t["CreateCustomizationSpecRequestType"] = reflect.TypeOf((*CreateCustomizationSpecRequestType)(nil)).Elem()
    +}
    +
    +type CreateCustomizationSpecResponse struct {
    +}
    +
    +type CreateDVPortgroupRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Spec DVPortgroupConfigSpec  `xml:"spec"`
    +}
    +
    +func init() {
    +	t["CreateDVPortgroupRequestType"] = reflect.TypeOf((*CreateDVPortgroupRequestType)(nil)).Elem()
    +}
    +
    +type CreateDVPortgroup_Task CreateDVPortgroupRequestType
    +
    +func init() {
    +	t["CreateDVPortgroup_Task"] = reflect.TypeOf((*CreateDVPortgroup_Task)(nil)).Elem()
    +}
    +
    +type CreateDVPortgroup_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CreateDVSRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Spec DVSCreateSpec          `xml:"spec"`
    +}
    +
    +func init() {
    +	t["CreateDVSRequestType"] = reflect.TypeOf((*CreateDVSRequestType)(nil)).Elem()
    +}
    +
    +type CreateDVS_Task CreateDVSRequestType
    +
    +func init() {
    +	t["CreateDVS_Task"] = reflect.TypeOf((*CreateDVS_Task)(nil)).Elem()
    +}
    +
    +type CreateDVS_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CreateDatacenter CreateDatacenterRequestType
    +
    +func init() {
    +	t["CreateDatacenter"] = reflect.TypeOf((*CreateDatacenter)(nil)).Elem()
    +}
    +
    +type CreateDatacenterRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Name string                 `xml:"name"`
    +}
    +
    +func init() {
    +	t["CreateDatacenterRequestType"] = reflect.TypeOf((*CreateDatacenterRequestType)(nil)).Elem()
    +}
    +
    +type CreateDatacenterResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CreateDefaultProfile CreateDefaultProfileRequestType
    +
    +func init() {
    +	t["CreateDefaultProfile"] = reflect.TypeOf((*CreateDefaultProfile)(nil)).Elem()
    +}
    +
    +type CreateDefaultProfileRequestType struct {
    +	This            ManagedObjectReference  `xml:"_this"`
    +	ProfileType     string                  `xml:"profileType"`
    +	ProfileTypeName string                  `xml:"profileTypeName,omitempty"`
    +	Profile         *ManagedObjectReference `xml:"profile,omitempty"`
    +}
    +
    +func init() {
    +	t["CreateDefaultProfileRequestType"] = reflect.TypeOf((*CreateDefaultProfileRequestType)(nil)).Elem()
    +}
    +
    +type CreateDefaultProfileResponse struct {
    +	Returnval BaseApplyProfile `xml:"returnval,typeattr"`
    +}
    +
    +type CreateDescriptor CreateDescriptorRequestType
    +
    +func init() {
    +	t["CreateDescriptor"] = reflect.TypeOf((*CreateDescriptor)(nil)).Elem()
    +}
    +
    +type CreateDescriptorRequestType struct {
    +	This ManagedObjectReference    `xml:"_this"`
    +	Obj  ManagedObjectReference    `xml:"obj"`
    +	Cdp  OvfCreateDescriptorParams `xml:"cdp"`
    +}
    +
    +func init() {
    +	t["CreateDescriptorRequestType"] = reflect.TypeOf((*CreateDescriptorRequestType)(nil)).Elem()
    +}
    +
    +type CreateDescriptorResponse struct {
    +	Returnval OvfCreateDescriptorResult `xml:"returnval"`
    +}
    +
    +type CreateDiagnosticPartition CreateDiagnosticPartitionRequestType
    +
    +func init() {
    +	t["CreateDiagnosticPartition"] = reflect.TypeOf((*CreateDiagnosticPartition)(nil)).Elem()
    +}
    +
    +type CreateDiagnosticPartitionRequestType struct {
    +	This ManagedObjectReference            `xml:"_this"`
    +	Spec HostDiagnosticPartitionCreateSpec `xml:"spec"`
    +}
    +
    +func init() {
    +	t["CreateDiagnosticPartitionRequestType"] = reflect.TypeOf((*CreateDiagnosticPartitionRequestType)(nil)).Elem()
    +}
    +
    +type CreateDiagnosticPartitionResponse struct {
    +}
    +
    +type CreateDirectory CreateDirectoryRequestType
    +
    +func init() {
    +	t["CreateDirectory"] = reflect.TypeOf((*CreateDirectory)(nil)).Elem()
    +}
    +
    +type CreateDirectoryRequestType struct {
    +	This        ManagedObjectReference `xml:"_this"`
    +	Datastore   ManagedObjectReference `xml:"datastore"`
    +	DisplayName string                 `xml:"displayName,omitempty"`
    +	Policy      string                 `xml:"policy,omitempty"`
    +}
    +
    +func init() {
    +	t["CreateDirectoryRequestType"] = reflect.TypeOf((*CreateDirectoryRequestType)(nil)).Elem()
    +}
    +
    +type CreateDirectoryResponse struct {
    +	Returnval string `xml:"returnval"`
    +}
    +
    +type CreateDiskFromSnapshotRequestType struct {
    +	This       ManagedObjectReference          `xml:"_this"`
    +	Id         ID                              `xml:"id"`
    +	Datastore  ManagedObjectReference          `xml:"datastore"`
    +	SnapshotId ID                              `xml:"snapshotId"`
    +	Name       string                          `xml:"name"`
    +	Profile    []BaseVirtualMachineProfileSpec `xml:"profile,omitempty,typeattr"`
    +	Crypto     BaseCryptoSpec                  `xml:"crypto,omitempty,typeattr"`
    +	Path       string                          `xml:"path,omitempty"`
    +}
    +
    +func init() {
    +	t["CreateDiskFromSnapshotRequestType"] = reflect.TypeOf((*CreateDiskFromSnapshotRequestType)(nil)).Elem()
    +}
    +
    +type CreateDiskFromSnapshot_Task CreateDiskFromSnapshotRequestType
    +
    +func init() {
    +	t["CreateDiskFromSnapshot_Task"] = reflect.TypeOf((*CreateDiskFromSnapshot_Task)(nil)).Elem()
    +}
    +
    +type CreateDiskFromSnapshot_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CreateDiskRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Spec VslmCreateSpec         `xml:"spec"`
    +}
    +
    +func init() {
    +	t["CreateDiskRequestType"] = reflect.TypeOf((*CreateDiskRequestType)(nil)).Elem()
    +}
    +
    +type CreateDisk_Task CreateDiskRequestType
    +
    +func init() {
    +	t["CreateDisk_Task"] = reflect.TypeOf((*CreateDisk_Task)(nil)).Elem()
    +}
    +
    +type CreateDisk_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CreateFilter CreateFilterRequestType
    +
    +func init() {
    +	t["CreateFilter"] = reflect.TypeOf((*CreateFilter)(nil)).Elem()
    +}
    +
    +type CreateFilterRequestType struct {
    +	This           ManagedObjectReference `xml:"_this"`
    +	Spec           PropertyFilterSpec     `xml:"spec"`
    +	PartialUpdates bool                   `xml:"partialUpdates"`
    +}
    +
    +func init() {
    +	t["CreateFilterRequestType"] = reflect.TypeOf((*CreateFilterRequestType)(nil)).Elem()
    +}
    +
    +type CreateFilterResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CreateFolder CreateFolderRequestType
    +
    +func init() {
    +	t["CreateFolder"] = reflect.TypeOf((*CreateFolder)(nil)).Elem()
    +}
    +
    +type CreateFolderRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Name string                 `xml:"name"`
    +}
    +
    +func init() {
    +	t["CreateFolderRequestType"] = reflect.TypeOf((*CreateFolderRequestType)(nil)).Elem()
    +}
    +
    +type CreateFolderResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CreateGroup CreateGroupRequestType
    +
    +func init() {
    +	t["CreateGroup"] = reflect.TypeOf((*CreateGroup)(nil)).Elem()
    +}
    +
    +type CreateGroupRequestType struct {
    +	This  ManagedObjectReference `xml:"_this"`
    +	Group BaseHostAccountSpec    `xml:"group,typeattr"`
    +}
    +
    +func init() {
    +	t["CreateGroupRequestType"] = reflect.TypeOf((*CreateGroupRequestType)(nil)).Elem()
    +}
    +
    +type CreateGroupResponse struct {
    +}
    +
    +type CreateImportSpec CreateImportSpecRequestType
    +
    +func init() {
    +	t["CreateImportSpec"] = reflect.TypeOf((*CreateImportSpec)(nil)).Elem()
    +}
    +
    +type CreateImportSpecRequestType struct {
    +	This          ManagedObjectReference    `xml:"_this"`
    +	OvfDescriptor string                    `xml:"ovfDescriptor"`
    +	ResourcePool  ManagedObjectReference    `xml:"resourcePool"`
    +	Datastore     ManagedObjectReference    `xml:"datastore"`
    +	Cisp          OvfCreateImportSpecParams `xml:"cisp"`
    +}
    +
    +func init() {
    +	t["CreateImportSpecRequestType"] = reflect.TypeOf((*CreateImportSpecRequestType)(nil)).Elem()
    +}
    +
    +type CreateImportSpecResponse struct {
    +	Returnval OvfCreateImportSpecResult `xml:"returnval"`
    +}
    +
    +type CreateInventoryView CreateInventoryViewRequestType
    +
    +func init() {
    +	t["CreateInventoryView"] = reflect.TypeOf((*CreateInventoryView)(nil)).Elem()
    +}
    +
    +type CreateInventoryViewRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["CreateInventoryViewRequestType"] = reflect.TypeOf((*CreateInventoryViewRequestType)(nil)).Elem()
    +}
    +
    +type CreateInventoryViewResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CreateIpPool CreateIpPoolRequestType
    +
    +func init() {
    +	t["CreateIpPool"] = reflect.TypeOf((*CreateIpPool)(nil)).Elem()
    +}
    +
    +type CreateIpPoolRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Dc   ManagedObjectReference `xml:"dc"`
    +	Pool IpPool                 `xml:"pool"`
    +}
    +
    +func init() {
    +	t["CreateIpPoolRequestType"] = reflect.TypeOf((*CreateIpPoolRequestType)(nil)).Elem()
    +}
    +
    +type CreateIpPoolResponse struct {
    +	Returnval int32 `xml:"returnval"`
    +}
    +
    +type CreateListView CreateListViewRequestType
    +
    +func init() {
    +	t["CreateListView"] = reflect.TypeOf((*CreateListView)(nil)).Elem()
    +}
    +
    +type CreateListViewFromView CreateListViewFromViewRequestType
    +
    +func init() {
    +	t["CreateListViewFromView"] = reflect.TypeOf((*CreateListViewFromView)(nil)).Elem()
    +}
    +
    +type CreateListViewFromViewRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	View ManagedObjectReference `xml:"view"`
    +}
    +
    +func init() {
    +	t["CreateListViewFromViewRequestType"] = reflect.TypeOf((*CreateListViewFromViewRequestType)(nil)).Elem()
    +}
    +
    +type CreateListViewFromViewResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CreateListViewRequestType struct {
    +	This ManagedObjectReference   `xml:"_this"`
    +	Obj  []ManagedObjectReference `xml:"obj,omitempty"`
    +}
    +
    +func init() {
    +	t["CreateListViewRequestType"] = reflect.TypeOf((*CreateListViewRequestType)(nil)).Elem()
    +}
    +
    +type CreateListViewResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CreateLocalDatastore CreateLocalDatastoreRequestType
    +
    +func init() {
    +	t["CreateLocalDatastore"] = reflect.TypeOf((*CreateLocalDatastore)(nil)).Elem()
    +}
    +
    +type CreateLocalDatastoreRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Name string                 `xml:"name"`
    +	Path string                 `xml:"path"`
    +}
    +
    +func init() {
    +	t["CreateLocalDatastoreRequestType"] = reflect.TypeOf((*CreateLocalDatastoreRequestType)(nil)).Elem()
    +}
    +
    +type CreateLocalDatastoreResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CreateNasDatastore CreateNasDatastoreRequestType
    +
    +func init() {
    +	t["CreateNasDatastore"] = reflect.TypeOf((*CreateNasDatastore)(nil)).Elem()
    +}
    +
    +type CreateNasDatastoreRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Spec HostNasVolumeSpec      `xml:"spec"`
    +}
    +
    +func init() {
    +	t["CreateNasDatastoreRequestType"] = reflect.TypeOf((*CreateNasDatastoreRequestType)(nil)).Elem()
    +}
    +
    +type CreateNasDatastoreResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CreateNvdimmNamespaceRequestType struct {
    +	This       ManagedObjectReference    `xml:"_this"`
    +	CreateSpec NvdimmNamespaceCreateSpec `xml:"createSpec"`
    +}
    +
    +func init() {
    +	t["CreateNvdimmNamespaceRequestType"] = reflect.TypeOf((*CreateNvdimmNamespaceRequestType)(nil)).Elem()
    +}
    +
    +type CreateNvdimmNamespace_Task CreateNvdimmNamespaceRequestType
    +
    +func init() {
    +	t["CreateNvdimmNamespace_Task"] = reflect.TypeOf((*CreateNvdimmNamespace_Task)(nil)).Elem()
    +}
    +
    +type CreateNvdimmNamespace_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CreateObjectScheduledTask CreateObjectScheduledTaskRequestType
    +
    +func init() {
    +	t["CreateObjectScheduledTask"] = reflect.TypeOf((*CreateObjectScheduledTask)(nil)).Elem()
    +}
    +
    +type CreateObjectScheduledTaskRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Obj  ManagedObjectReference `xml:"obj"`
    +	Spec BaseScheduledTaskSpec  `xml:"spec,typeattr"`
    +}
    +
    +func init() {
    +	t["CreateObjectScheduledTaskRequestType"] = reflect.TypeOf((*CreateObjectScheduledTaskRequestType)(nil)).Elem()
    +}
    +
    +type CreateObjectScheduledTaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CreatePerfInterval CreatePerfIntervalRequestType
    +
    +func init() {
    +	t["CreatePerfInterval"] = reflect.TypeOf((*CreatePerfInterval)(nil)).Elem()
    +}
    +
    +type CreatePerfIntervalRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	IntervalId PerfInterval           `xml:"intervalId"`
    +}
    +
    +func init() {
    +	t["CreatePerfIntervalRequestType"] = reflect.TypeOf((*CreatePerfIntervalRequestType)(nil)).Elem()
    +}
    +
    +type CreatePerfIntervalResponse struct {
    +}
    +
    +type CreateProfile CreateProfileRequestType
    +
    +func init() {
    +	t["CreateProfile"] = reflect.TypeOf((*CreateProfile)(nil)).Elem()
    +}
    +
    +type CreateProfileRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	CreateSpec BaseProfileCreateSpec  `xml:"createSpec,typeattr"`
    +}
    +
    +func init() {
    +	t["CreateProfileRequestType"] = reflect.TypeOf((*CreateProfileRequestType)(nil)).Elem()
    +}
    +
    +type CreateProfileResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CreatePropertyCollector CreatePropertyCollectorRequestType
    +
    +func init() {
    +	t["CreatePropertyCollector"] = reflect.TypeOf((*CreatePropertyCollector)(nil)).Elem()
    +}
    +
    +type CreatePropertyCollectorRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["CreatePropertyCollectorRequestType"] = reflect.TypeOf((*CreatePropertyCollectorRequestType)(nil)).Elem()
    +}
    +
    +type CreatePropertyCollectorResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CreateRegistryKeyInGuest CreateRegistryKeyInGuestRequestType
    +
    +func init() {
    +	t["CreateRegistryKeyInGuest"] = reflect.TypeOf((*CreateRegistryKeyInGuest)(nil)).Elem()
    +}
    +
    +type CreateRegistryKeyInGuestRequestType struct {
    +	This       ManagedObjectReference  `xml:"_this"`
    +	Vm         ManagedObjectReference  `xml:"vm"`
    +	Auth       BaseGuestAuthentication `xml:"auth,typeattr"`
    +	KeyName    GuestRegKeyNameSpec     `xml:"keyName"`
    +	IsVolatile bool                    `xml:"isVolatile"`
    +	ClassType  string                  `xml:"classType,omitempty"`
    +}
    +
    +func init() {
    +	t["CreateRegistryKeyInGuestRequestType"] = reflect.TypeOf((*CreateRegistryKeyInGuestRequestType)(nil)).Elem()
    +}
    +
    +type CreateRegistryKeyInGuestResponse struct {
    +}
    +
    +type CreateResourcePool CreateResourcePoolRequestType
    +
    +func init() {
    +	t["CreateResourcePool"] = reflect.TypeOf((*CreateResourcePool)(nil)).Elem()
    +}
    +
    +type CreateResourcePoolRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Name string                 `xml:"name"`
    +	Spec ResourceConfigSpec     `xml:"spec"`
    +}
    +
    +func init() {
    +	t["CreateResourcePoolRequestType"] = reflect.TypeOf((*CreateResourcePoolRequestType)(nil)).Elem()
    +}
    +
    +type CreateResourcePoolResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CreateScheduledTask CreateScheduledTaskRequestType
    +
    +func init() {
    +	t["CreateScheduledTask"] = reflect.TypeOf((*CreateScheduledTask)(nil)).Elem()
    +}
    +
    +type CreateScheduledTaskRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	Entity ManagedObjectReference `xml:"entity"`
    +	Spec   BaseScheduledTaskSpec  `xml:"spec,typeattr"`
    +}
    +
    +func init() {
    +	t["CreateScheduledTaskRequestType"] = reflect.TypeOf((*CreateScheduledTaskRequestType)(nil)).Elem()
    +}
    +
    +type CreateScheduledTaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CreateScreenshotRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["CreateScreenshotRequestType"] = reflect.TypeOf((*CreateScreenshotRequestType)(nil)).Elem()
    +}
    +
    +type CreateScreenshot_Task CreateScreenshotRequestType
    +
    +func init() {
    +	t["CreateScreenshot_Task"] = reflect.TypeOf((*CreateScreenshot_Task)(nil)).Elem()
    +}
    +
    +type CreateScreenshot_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CreateSecondaryVMExRequestType struct {
    +	This ManagedObjectReference    `xml:"_this"`
    +	Host *ManagedObjectReference   `xml:"host,omitempty"`
    +	Spec *FaultToleranceConfigSpec `xml:"spec,omitempty"`
    +}
    +
    +func init() {
    +	t["CreateSecondaryVMExRequestType"] = reflect.TypeOf((*CreateSecondaryVMExRequestType)(nil)).Elem()
    +}
    +
    +type CreateSecondaryVMEx_Task CreateSecondaryVMExRequestType
    +
    +func init() {
    +	t["CreateSecondaryVMEx_Task"] = reflect.TypeOf((*CreateSecondaryVMEx_Task)(nil)).Elem()
    +}
    +
    +type CreateSecondaryVMEx_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CreateSecondaryVMRequestType struct {
    +	This ManagedObjectReference  `xml:"_this"`
    +	Host *ManagedObjectReference `xml:"host,omitempty"`
    +}
    +
    +func init() {
    +	t["CreateSecondaryVMRequestType"] = reflect.TypeOf((*CreateSecondaryVMRequestType)(nil)).Elem()
    +}
    +
    +type CreateSecondaryVM_Task CreateSecondaryVMRequestType
    +
    +func init() {
    +	t["CreateSecondaryVM_Task"] = reflect.TypeOf((*CreateSecondaryVM_Task)(nil)).Elem()
    +}
    +
    +type CreateSecondaryVM_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CreateSnapshotExRequestType struct {
    +	This        ManagedObjectReference             `xml:"_this"`
    +	Name        string                             `xml:"name"`
    +	Description string                             `xml:"description,omitempty"`
    +	Memory      bool                               `xml:"memory"`
    +	QuiesceSpec BaseVirtualMachineGuestQuiesceSpec `xml:"quiesceSpec,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["CreateSnapshotExRequestType"] = reflect.TypeOf((*CreateSnapshotExRequestType)(nil)).Elem()
    +}
    +
    +type CreateSnapshotEx_Task CreateSnapshotExRequestType
    +
    +func init() {
    +	t["CreateSnapshotEx_Task"] = reflect.TypeOf((*CreateSnapshotEx_Task)(nil)).Elem()
    +}
    +
    +type CreateSnapshotEx_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CreateSnapshotRequestType struct {
    +	This        ManagedObjectReference `xml:"_this"`
    +	Name        string                 `xml:"name"`
    +	Description string                 `xml:"description,omitempty"`
    +	Memory      bool                   `xml:"memory"`
    +	Quiesce     bool                   `xml:"quiesce"`
    +}
    +
    +func init() {
    +	t["CreateSnapshotRequestType"] = reflect.TypeOf((*CreateSnapshotRequestType)(nil)).Elem()
    +}
    +
    +type CreateSnapshot_Task CreateSnapshotRequestType
    +
    +func init() {
    +	t["CreateSnapshot_Task"] = reflect.TypeOf((*CreateSnapshot_Task)(nil)).Elem()
    +}
    +
    +type CreateSnapshot_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CreateStoragePod CreateStoragePodRequestType
    +
    +func init() {
    +	t["CreateStoragePod"] = reflect.TypeOf((*CreateStoragePod)(nil)).Elem()
    +}
    +
    +type CreateStoragePodRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Name string                 `xml:"name"`
    +}
    +
    +func init() {
    +	t["CreateStoragePodRequestType"] = reflect.TypeOf((*CreateStoragePodRequestType)(nil)).Elem()
    +}
    +
    +type CreateStoragePodResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CreateTask CreateTaskRequestType
    +
    +func init() {
    +	t["CreateTask"] = reflect.TypeOf((*CreateTask)(nil)).Elem()
    +}
    +
    +type CreateTaskAction struct {
    +	Action
    +
    +	TaskTypeId string `xml:"taskTypeId"`
    +	Cancelable bool   `xml:"cancelable"`
    +}
    +
    +func init() {
    +	t["CreateTaskAction"] = reflect.TypeOf((*CreateTaskAction)(nil)).Elem()
    +}
    +
    +type CreateTaskRequestType struct {
    +	This          ManagedObjectReference `xml:"_this"`
    +	Obj           ManagedObjectReference `xml:"obj"`
    +	TaskTypeId    string                 `xml:"taskTypeId"`
    +	InitiatedBy   string                 `xml:"initiatedBy,omitempty"`
    +	Cancelable    bool                   `xml:"cancelable"`
    +	ParentTaskKey string                 `xml:"parentTaskKey,omitempty"`
    +	ActivationId  string                 `xml:"activationId,omitempty"`
    +}
    +
    +func init() {
    +	t["CreateTaskRequestType"] = reflect.TypeOf((*CreateTaskRequestType)(nil)).Elem()
    +}
    +
    +type CreateTaskResponse struct {
    +	Returnval TaskInfo `xml:"returnval"`
    +}
    +
    +type CreateTemporaryDirectoryInGuest CreateTemporaryDirectoryInGuestRequestType
    +
    +func init() {
    +	t["CreateTemporaryDirectoryInGuest"] = reflect.TypeOf((*CreateTemporaryDirectoryInGuest)(nil)).Elem()
    +}
    +
    +type CreateTemporaryDirectoryInGuestRequestType struct {
    +	This          ManagedObjectReference  `xml:"_this"`
    +	Vm            ManagedObjectReference  `xml:"vm"`
    +	Auth          BaseGuestAuthentication `xml:"auth,typeattr"`
    +	Prefix        string                  `xml:"prefix"`
    +	Suffix        string                  `xml:"suffix"`
    +	DirectoryPath string                  `xml:"directoryPath,omitempty"`
    +}
    +
    +func init() {
    +	t["CreateTemporaryDirectoryInGuestRequestType"] = reflect.TypeOf((*CreateTemporaryDirectoryInGuestRequestType)(nil)).Elem()
    +}
    +
    +type CreateTemporaryDirectoryInGuestResponse struct {
    +	Returnval string `xml:"returnval"`
    +}
    +
    +type CreateTemporaryFileInGuest CreateTemporaryFileInGuestRequestType
    +
    +func init() {
    +	t["CreateTemporaryFileInGuest"] = reflect.TypeOf((*CreateTemporaryFileInGuest)(nil)).Elem()
    +}
    +
    +type CreateTemporaryFileInGuestRequestType struct {
    +	This          ManagedObjectReference  `xml:"_this"`
    +	Vm            ManagedObjectReference  `xml:"vm"`
    +	Auth          BaseGuestAuthentication `xml:"auth,typeattr"`
    +	Prefix        string                  `xml:"prefix"`
    +	Suffix        string                  `xml:"suffix"`
    +	DirectoryPath string                  `xml:"directoryPath,omitempty"`
    +}
    +
    +func init() {
    +	t["CreateTemporaryFileInGuestRequestType"] = reflect.TypeOf((*CreateTemporaryFileInGuestRequestType)(nil)).Elem()
    +}
    +
    +type CreateTemporaryFileInGuestResponse struct {
    +	Returnval string `xml:"returnval"`
    +}
    +
    +type CreateUser CreateUserRequestType
    +
    +func init() {
    +	t["CreateUser"] = reflect.TypeOf((*CreateUser)(nil)).Elem()
    +}
    +
    +type CreateUserRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	User BaseHostAccountSpec    `xml:"user,typeattr"`
    +}
    +
    +func init() {
    +	t["CreateUserRequestType"] = reflect.TypeOf((*CreateUserRequestType)(nil)).Elem()
    +}
    +
    +type CreateUserResponse struct {
    +}
    +
    +type CreateVApp CreateVAppRequestType
    +
    +func init() {
    +	t["CreateVApp"] = reflect.TypeOf((*CreateVApp)(nil)).Elem()
    +}
    +
    +type CreateVAppRequestType struct {
    +	This       ManagedObjectReference  `xml:"_this"`
    +	Name       string                  `xml:"name"`
    +	ResSpec    ResourceConfigSpec      `xml:"resSpec"`
    +	ConfigSpec VAppConfigSpec          `xml:"configSpec"`
    +	VmFolder   *ManagedObjectReference `xml:"vmFolder,omitempty"`
    +}
    +
    +func init() {
    +	t["CreateVAppRequestType"] = reflect.TypeOf((*CreateVAppRequestType)(nil)).Elem()
    +}
    +
    +type CreateVAppResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CreateVMRequestType struct {
    +	This   ManagedObjectReference   `xml:"_this"`
    +	Config VirtualMachineConfigSpec `xml:"config"`
    +	Pool   ManagedObjectReference   `xml:"pool"`
    +	Host   *ManagedObjectReference  `xml:"host,omitempty"`
    +}
    +
    +func init() {
    +	t["CreateVMRequestType"] = reflect.TypeOf((*CreateVMRequestType)(nil)).Elem()
    +}
    +
    +type CreateVM_Task CreateVMRequestType
    +
    +func init() {
    +	t["CreateVM_Task"] = reflect.TypeOf((*CreateVM_Task)(nil)).Elem()
    +}
    +
    +type CreateVM_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CreateVirtualDiskRequestType struct {
    +	This       ManagedObjectReference  `xml:"_this"`
    +	Name       string                  `xml:"name"`
    +	Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"`
    +	Spec       BaseVirtualDiskSpec     `xml:"spec,typeattr"`
    +}
    +
    +func init() {
    +	t["CreateVirtualDiskRequestType"] = reflect.TypeOf((*CreateVirtualDiskRequestType)(nil)).Elem()
    +}
    +
    +type CreateVirtualDisk_Task CreateVirtualDiskRequestType
    +
    +func init() {
    +	t["CreateVirtualDisk_Task"] = reflect.TypeOf((*CreateVirtualDisk_Task)(nil)).Elem()
    +}
    +
    +type CreateVirtualDisk_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CreateVmfsDatastore CreateVmfsDatastoreRequestType
    +
    +func init() {
    +	t["CreateVmfsDatastore"] = reflect.TypeOf((*CreateVmfsDatastore)(nil)).Elem()
    +}
    +
    +type CreateVmfsDatastoreRequestType struct {
    +	This ManagedObjectReference  `xml:"_this"`
    +	Spec VmfsDatastoreCreateSpec `xml:"spec"`
    +}
    +
    +func init() {
    +	t["CreateVmfsDatastoreRequestType"] = reflect.TypeOf((*CreateVmfsDatastoreRequestType)(nil)).Elem()
    +}
    +
    +type CreateVmfsDatastoreResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CreateVvolDatastore CreateVvolDatastoreRequestType
    +
    +func init() {
    +	t["CreateVvolDatastore"] = reflect.TypeOf((*CreateVvolDatastore)(nil)).Elem()
    +}
    +
    +type CreateVvolDatastoreRequestType struct {
    +	This ManagedObjectReference               `xml:"_this"`
    +	Spec HostDatastoreSystemVvolDatastoreSpec `xml:"spec"`
    +}
    +
    +func init() {
    +	t["CreateVvolDatastoreRequestType"] = reflect.TypeOf((*CreateVvolDatastoreRequestType)(nil)).Elem()
    +}
    +
    +type CreateVvolDatastoreResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CryptoKeyId struct {
    +	DynamicData
    +
    +	KeyId      string         `xml:"keyId"`
    +	ProviderId *KeyProviderId `xml:"providerId,omitempty"`
    +}
    +
    +func init() {
    +	t["CryptoKeyId"] = reflect.TypeOf((*CryptoKeyId)(nil)).Elem()
    +}
    +
    +type CryptoKeyPlain struct {
    +	DynamicData
    +
    +	KeyId     CryptoKeyId `xml:"keyId"`
    +	Algorithm string      `xml:"algorithm"`
    +	KeyData   string      `xml:"keyData"`
    +}
    +
    +func init() {
    +	t["CryptoKeyPlain"] = reflect.TypeOf((*CryptoKeyPlain)(nil)).Elem()
    +}
    +
    +type CryptoKeyResult struct {
    +	DynamicData
    +
    +	KeyId   CryptoKeyId `xml:"keyId"`
    +	Success bool        `xml:"success"`
    +	Reason  string      `xml:"reason,omitempty"`
    +}
    +
    +func init() {
    +	t["CryptoKeyResult"] = reflect.TypeOf((*CryptoKeyResult)(nil)).Elem()
    +}
    +
    +type CryptoManagerHostEnable CryptoManagerHostEnableRequestType
    +
    +func init() {
    +	t["CryptoManagerHostEnable"] = reflect.TypeOf((*CryptoManagerHostEnable)(nil)).Elem()
    +}
    +
    +type CryptoManagerHostEnableRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	InitialKey CryptoKeyPlain         `xml:"initialKey"`
    +}
    +
    +func init() {
    +	t["CryptoManagerHostEnableRequestType"] = reflect.TypeOf((*CryptoManagerHostEnableRequestType)(nil)).Elem()
    +}
    +
    +type CryptoManagerHostEnableResponse struct {
    +}
    +
    +type CryptoManagerHostPrepare CryptoManagerHostPrepareRequestType
    +
    +func init() {
    +	t["CryptoManagerHostPrepare"] = reflect.TypeOf((*CryptoManagerHostPrepare)(nil)).Elem()
    +}
    +
    +type CryptoManagerHostPrepareRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["CryptoManagerHostPrepareRequestType"] = reflect.TypeOf((*CryptoManagerHostPrepareRequestType)(nil)).Elem()
    +}
    +
    +type CryptoManagerHostPrepareResponse struct {
    +}
    +
    +type CryptoManagerKmipCertificateInfo struct {
    +	DynamicData
    +
    +	Subject             string    `xml:"subject"`
    +	Issuer              string    `xml:"issuer"`
    +	SerialNumber        string    `xml:"serialNumber"`
    +	NotBefore           time.Time `xml:"notBefore"`
    +	NotAfter            time.Time `xml:"notAfter"`
    +	Fingerprint         string    `xml:"fingerprint"`
    +	CheckTime           time.Time `xml:"checkTime"`
    +	SecondsSinceValid   int32     `xml:"secondsSinceValid,omitempty"`
    +	SecondsBeforeExpire int32     `xml:"secondsBeforeExpire,omitempty"`
    +}
    +
    +func init() {
    +	t["CryptoManagerKmipCertificateInfo"] = reflect.TypeOf((*CryptoManagerKmipCertificateInfo)(nil)).Elem()
    +}
    +
    +type CryptoManagerKmipClusterStatus struct {
    +	DynamicData
    +
    +	ClusterId      KeyProviderId                     `xml:"clusterId"`
    +	Servers        []CryptoManagerKmipServerStatus   `xml:"servers"`
    +	ClientCertInfo *CryptoManagerKmipCertificateInfo `xml:"clientCertInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["CryptoManagerKmipClusterStatus"] = reflect.TypeOf((*CryptoManagerKmipClusterStatus)(nil)).Elem()
    +}
    +
    +type CryptoManagerKmipServerCertInfo struct {
    +	DynamicData
    +
    +	Certificate       string                            `xml:"certificate"`
    +	CertInfo          *CryptoManagerKmipCertificateInfo `xml:"certInfo,omitempty"`
    +	ClientTrustServer *bool                             `xml:"clientTrustServer"`
    +}
    +
    +func init() {
    +	t["CryptoManagerKmipServerCertInfo"] = reflect.TypeOf((*CryptoManagerKmipServerCertInfo)(nil)).Elem()
    +}
    +
    +type CryptoManagerKmipServerStatus struct {
    +	DynamicData
    +
    +	Name              string                            `xml:"name"`
    +	Status            ManagedEntityStatus               `xml:"status"`
    +	ConnectionStatus  string                            `xml:"connectionStatus"`
    +	CertInfo          *CryptoManagerKmipCertificateInfo `xml:"certInfo,omitempty"`
    +	ClientTrustServer *bool                             `xml:"clientTrustServer"`
    +	ServerTrustClient *bool                             `xml:"serverTrustClient"`
    +}
    +
    +func init() {
    +	t["CryptoManagerKmipServerStatus"] = reflect.TypeOf((*CryptoManagerKmipServerStatus)(nil)).Elem()
    +}
    +
    +type CryptoSpec struct {
    +	DynamicData
    +}
    +
    +func init() {
    +	t["CryptoSpec"] = reflect.TypeOf((*CryptoSpec)(nil)).Elem()
    +}
    +
    +type CryptoSpecDecrypt struct {
    +	CryptoSpec
    +}
    +
    +func init() {
    +	t["CryptoSpecDecrypt"] = reflect.TypeOf((*CryptoSpecDecrypt)(nil)).Elem()
    +}
    +
    +type CryptoSpecDeepRecrypt struct {
    +	CryptoSpec
    +
    +	NewKeyId CryptoKeyId `xml:"newKeyId"`
    +}
    +
    +func init() {
    +	t["CryptoSpecDeepRecrypt"] = reflect.TypeOf((*CryptoSpecDeepRecrypt)(nil)).Elem()
    +}
    +
    +type CryptoSpecEncrypt struct {
    +	CryptoSpec
    +
    +	CryptoKeyId CryptoKeyId `xml:"cryptoKeyId"`
    +}
    +
    +func init() {
    +	t["CryptoSpecEncrypt"] = reflect.TypeOf((*CryptoSpecEncrypt)(nil)).Elem()
    +}
    +
    +type CryptoSpecNoOp struct {
    +	CryptoSpec
    +}
    +
    +func init() {
    +	t["CryptoSpecNoOp"] = reflect.TypeOf((*CryptoSpecNoOp)(nil)).Elem()
    +}
    +
    +type CryptoSpecRegister struct {
    +	CryptoSpecNoOp
    +
    +	CryptoKeyId CryptoKeyId `xml:"cryptoKeyId"`
    +}
    +
    +func init() {
    +	t["CryptoSpecRegister"] = reflect.TypeOf((*CryptoSpecRegister)(nil)).Elem()
    +}
    +
    +type CryptoSpecShallowRecrypt struct {
    +	CryptoSpec
    +
    +	NewKeyId CryptoKeyId `xml:"newKeyId"`
    +}
    +
    +func init() {
    +	t["CryptoSpecShallowRecrypt"] = reflect.TypeOf((*CryptoSpecShallowRecrypt)(nil)).Elem()
    +}
    +
    +type CryptoUnlockRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["CryptoUnlockRequestType"] = reflect.TypeOf((*CryptoUnlockRequestType)(nil)).Elem()
    +}
    +
    +type CryptoUnlock_Task CryptoUnlockRequestType
    +
    +func init() {
    +	t["CryptoUnlock_Task"] = reflect.TypeOf((*CryptoUnlock_Task)(nil)).Elem()
    +}
    +
    +type CryptoUnlock_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CurrentTime CurrentTimeRequestType
    +
    +func init() {
    +	t["CurrentTime"] = reflect.TypeOf((*CurrentTime)(nil)).Elem()
    +}
    +
    +type CurrentTimeRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["CurrentTimeRequestType"] = reflect.TypeOf((*CurrentTimeRequestType)(nil)).Elem()
    +}
    +
    +type CurrentTimeResponse struct {
    +	Returnval time.Time `xml:"returnval"`
    +}
    +
    +type CustomFieldDef struct {
    +	DynamicData
    +
    +	Key                     int32               `xml:"key"`
    +	Name                    string              `xml:"name"`
    +	Type                    string              `xml:"type"`
    +	ManagedObjectType       string              `xml:"managedObjectType,omitempty"`
    +	FieldDefPrivileges      *PrivilegePolicyDef `xml:"fieldDefPrivileges,omitempty"`
    +	FieldInstancePrivileges *PrivilegePolicyDef `xml:"fieldInstancePrivileges,omitempty"`
    +}
    +
    +func init() {
    +	t["CustomFieldDef"] = reflect.TypeOf((*CustomFieldDef)(nil)).Elem()
    +}
    +
    +type CustomFieldDefAddedEvent struct {
    +	CustomFieldDefEvent
    +}
    +
    +func init() {
    +	t["CustomFieldDefAddedEvent"] = reflect.TypeOf((*CustomFieldDefAddedEvent)(nil)).Elem()
    +}
    +
    +type CustomFieldDefEvent struct {
    +	CustomFieldEvent
    +
    +	FieldKey int32  `xml:"fieldKey"`
    +	Name     string `xml:"name"`
    +}
    +
    +func init() {
    +	t["CustomFieldDefEvent"] = reflect.TypeOf((*CustomFieldDefEvent)(nil)).Elem()
    +}
    +
    +type CustomFieldDefRemovedEvent struct {
    +	CustomFieldDefEvent
    +}
    +
    +func init() {
    +	t["CustomFieldDefRemovedEvent"] = reflect.TypeOf((*CustomFieldDefRemovedEvent)(nil)).Elem()
    +}
    +
    +type CustomFieldDefRenamedEvent struct {
    +	CustomFieldDefEvent
    +
    +	NewName string `xml:"newName"`
    +}
    +
    +func init() {
    +	t["CustomFieldDefRenamedEvent"] = reflect.TypeOf((*CustomFieldDefRenamedEvent)(nil)).Elem()
    +}
    +
    +type CustomFieldEvent struct {
    +	Event
    +}
    +
    +func init() {
    +	t["CustomFieldEvent"] = reflect.TypeOf((*CustomFieldEvent)(nil)).Elem()
    +}
    +
    +type CustomFieldStringValue struct {
    +	CustomFieldValue
    +
    +	Value string `xml:"value"`
    +}
    +
    +func init() {
    +	t["CustomFieldStringValue"] = reflect.TypeOf((*CustomFieldStringValue)(nil)).Elem()
    +}
    +
    +type CustomFieldValue struct {
    +	DynamicData
    +
    +	Key int32 `xml:"key"`
    +}
    +
    +func init() {
    +	t["CustomFieldValue"] = reflect.TypeOf((*CustomFieldValue)(nil)).Elem()
    +}
    +
    +type CustomFieldValueChangedEvent struct {
    +	CustomFieldEvent
    +
    +	Entity    ManagedEntityEventArgument `xml:"entity"`
    +	FieldKey  int32                      `xml:"fieldKey"`
    +	Name      string                     `xml:"name"`
    +	Value     string                     `xml:"value"`
    +	PrevState string                     `xml:"prevState,omitempty"`
    +}
    +
    +func init() {
    +	t["CustomFieldValueChangedEvent"] = reflect.TypeOf((*CustomFieldValueChangedEvent)(nil)).Elem()
    +}
    +
    +type CustomizationAdapterMapping struct {
    +	DynamicData
    +
    +	MacAddress string                  `xml:"macAddress,omitempty"`
    +	Adapter    CustomizationIPSettings `xml:"adapter"`
    +}
    +
    +func init() {
    +	t["CustomizationAdapterMapping"] = reflect.TypeOf((*CustomizationAdapterMapping)(nil)).Elem()
    +}
    +
    +type CustomizationAutoIpV6Generator struct {
    +	CustomizationIpV6Generator
    +}
    +
    +func init() {
    +	t["CustomizationAutoIpV6Generator"] = reflect.TypeOf((*CustomizationAutoIpV6Generator)(nil)).Elem()
    +}
    +
    +type CustomizationCustomIpGenerator struct {
    +	CustomizationIpGenerator
    +
    +	Argument string `xml:"argument,omitempty"`
    +}
    +
    +func init() {
    +	t["CustomizationCustomIpGenerator"] = reflect.TypeOf((*CustomizationCustomIpGenerator)(nil)).Elem()
    +}
    +
    +type CustomizationCustomIpV6Generator struct {
    +	CustomizationIpV6Generator
    +
    +	Argument string `xml:"argument,omitempty"`
    +}
    +
    +func init() {
    +	t["CustomizationCustomIpV6Generator"] = reflect.TypeOf((*CustomizationCustomIpV6Generator)(nil)).Elem()
    +}
    +
    +type CustomizationCustomName struct {
    +	CustomizationName
    +
    +	Argument string `xml:"argument,omitempty"`
    +}
    +
    +func init() {
    +	t["CustomizationCustomName"] = reflect.TypeOf((*CustomizationCustomName)(nil)).Elem()
    +}
    +
    +type CustomizationDhcpIpGenerator struct {
    +	CustomizationIpGenerator
    +}
    +
    +func init() {
    +	t["CustomizationDhcpIpGenerator"] = reflect.TypeOf((*CustomizationDhcpIpGenerator)(nil)).Elem()
    +}
    +
    +type CustomizationDhcpIpV6Generator struct {
    +	CustomizationIpV6Generator
    +}
    +
    +func init() {
    +	t["CustomizationDhcpIpV6Generator"] = reflect.TypeOf((*CustomizationDhcpIpV6Generator)(nil)).Elem()
    +}
    +
    +type CustomizationEvent struct {
    +	VmEvent
    +
    +	LogLocation string `xml:"logLocation,omitempty"`
    +}
    +
    +func init() {
    +	t["CustomizationEvent"] = reflect.TypeOf((*CustomizationEvent)(nil)).Elem()
    +}
    +
    +type CustomizationFailed struct {
    +	CustomizationEvent
    +}
    +
    +func init() {
    +	t["CustomizationFailed"] = reflect.TypeOf((*CustomizationFailed)(nil)).Elem()
    +}
    +
    +type CustomizationFault struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["CustomizationFault"] = reflect.TypeOf((*CustomizationFault)(nil)).Elem()
    +}
    +
    +type CustomizationFaultFault BaseCustomizationFault
    +
    +func init() {
    +	t["CustomizationFaultFault"] = reflect.TypeOf((*CustomizationFaultFault)(nil)).Elem()
    +}
    +
    +type CustomizationFixedIp struct {
    +	CustomizationIpGenerator
    +
    +	IpAddress string `xml:"ipAddress"`
    +}
    +
    +func init() {
    +	t["CustomizationFixedIp"] = reflect.TypeOf((*CustomizationFixedIp)(nil)).Elem()
    +}
    +
    +type CustomizationFixedIpV6 struct {
    +	CustomizationIpV6Generator
    +
    +	IpAddress  string `xml:"ipAddress"`
    +	SubnetMask int32  `xml:"subnetMask"`
    +}
    +
    +func init() {
    +	t["CustomizationFixedIpV6"] = reflect.TypeOf((*CustomizationFixedIpV6)(nil)).Elem()
    +}
    +
    +type CustomizationFixedName struct {
    +	CustomizationName
    +
    +	Name string `xml:"name"`
    +}
    +
    +func init() {
    +	t["CustomizationFixedName"] = reflect.TypeOf((*CustomizationFixedName)(nil)).Elem()
    +}
    +
    +type CustomizationGlobalIPSettings struct {
    +	DynamicData
    +
    +	DnsSuffixList []string `xml:"dnsSuffixList,omitempty"`
    +	DnsServerList []string `xml:"dnsServerList,omitempty"`
    +}
    +
    +func init() {
    +	t["CustomizationGlobalIPSettings"] = reflect.TypeOf((*CustomizationGlobalIPSettings)(nil)).Elem()
    +}
    +
    +type CustomizationGuiRunOnce struct {
    +	DynamicData
    +
    +	CommandList []string `xml:"commandList"`
    +}
    +
    +func init() {
    +	t["CustomizationGuiRunOnce"] = reflect.TypeOf((*CustomizationGuiRunOnce)(nil)).Elem()
    +}
    +
    +type CustomizationGuiUnattended struct {
    +	DynamicData
    +
    +	Password       *CustomizationPassword `xml:"password,omitempty"`
    +	TimeZone       int32                  `xml:"timeZone"`
    +	AutoLogon      bool                   `xml:"autoLogon"`
    +	AutoLogonCount int32                  `xml:"autoLogonCount"`
    +}
    +
    +func init() {
    +	t["CustomizationGuiUnattended"] = reflect.TypeOf((*CustomizationGuiUnattended)(nil)).Elem()
    +}
    +
    +type CustomizationIPSettings struct {
    +	DynamicData
    +
    +	Ip            BaseCustomizationIpGenerator            `xml:"ip,typeattr"`
    +	SubnetMask    string                                  `xml:"subnetMask,omitempty"`
    +	Gateway       []string                                `xml:"gateway,omitempty"`
    +	IpV6Spec      *CustomizationIPSettingsIpV6AddressSpec `xml:"ipV6Spec,omitempty"`
    +	DnsServerList []string                                `xml:"dnsServerList,omitempty"`
    +	DnsDomain     string                                  `xml:"dnsDomain,omitempty"`
    +	PrimaryWINS   string                                  `xml:"primaryWINS,omitempty"`
    +	SecondaryWINS string                                  `xml:"secondaryWINS,omitempty"`
    +	NetBIOS       CustomizationNetBIOSMode                `xml:"netBIOS,omitempty"`
    +}
    +
    +func init() {
    +	t["CustomizationIPSettings"] = reflect.TypeOf((*CustomizationIPSettings)(nil)).Elem()
    +}
    +
    +type CustomizationIPSettingsIpV6AddressSpec struct {
    +	DynamicData
    +
    +	Ip      []BaseCustomizationIpV6Generator `xml:"ip,typeattr"`
    +	Gateway []string                         `xml:"gateway,omitempty"`
    +}
    +
    +func init() {
    +	t["CustomizationIPSettingsIpV6AddressSpec"] = reflect.TypeOf((*CustomizationIPSettingsIpV6AddressSpec)(nil)).Elem()
    +}
    +
    +type CustomizationIdentification struct {
    +	DynamicData
    +
    +	JoinWorkgroup       string                 `xml:"joinWorkgroup,omitempty"`
    +	JoinDomain          string                 `xml:"joinDomain,omitempty"`
    +	DomainAdmin         string                 `xml:"domainAdmin,omitempty"`
    +	DomainAdminPassword *CustomizationPassword `xml:"domainAdminPassword,omitempty"`
    +}
    +
    +func init() {
    +	t["CustomizationIdentification"] = reflect.TypeOf((*CustomizationIdentification)(nil)).Elem()
    +}
    +
    +type CustomizationIdentitySettings struct {
    +	DynamicData
    +}
    +
    +func init() {
    +	t["CustomizationIdentitySettings"] = reflect.TypeOf((*CustomizationIdentitySettings)(nil)).Elem()
    +}
    +
    +type CustomizationIpGenerator struct {
    +	DynamicData
    +}
    +
    +func init() {
    +	t["CustomizationIpGenerator"] = reflect.TypeOf((*CustomizationIpGenerator)(nil)).Elem()
    +}
    +
    +type CustomizationIpV6Generator struct {
    +	DynamicData
    +}
    +
    +func init() {
    +	t["CustomizationIpV6Generator"] = reflect.TypeOf((*CustomizationIpV6Generator)(nil)).Elem()
    +}
    +
    +type CustomizationLicenseFilePrintData struct {
    +	DynamicData
    +
    +	AutoMode  CustomizationLicenseDataMode `xml:"autoMode"`
    +	AutoUsers int32                        `xml:"autoUsers,omitempty"`
    +}
    +
    +func init() {
    +	t["CustomizationLicenseFilePrintData"] = reflect.TypeOf((*CustomizationLicenseFilePrintData)(nil)).Elem()
    +}
    +
    +type CustomizationLinuxIdentityFailed struct {
    +	CustomizationFailed
    +}
    +
    +func init() {
    +	t["CustomizationLinuxIdentityFailed"] = reflect.TypeOf((*CustomizationLinuxIdentityFailed)(nil)).Elem()
    +}
    +
    +type CustomizationLinuxOptions struct {
    +	CustomizationOptions
    +}
    +
    +func init() {
    +	t["CustomizationLinuxOptions"] = reflect.TypeOf((*CustomizationLinuxOptions)(nil)).Elem()
    +}
    +
    +type CustomizationLinuxPrep struct {
    +	CustomizationIdentitySettings
    +
    +	HostName   BaseCustomizationName `xml:"hostName,typeattr"`
    +	Domain     string                `xml:"domain"`
    +	TimeZone   string                `xml:"timeZone,omitempty"`
    +	HwClockUTC *bool                 `xml:"hwClockUTC"`
    +}
    +
    +func init() {
    +	t["CustomizationLinuxPrep"] = reflect.TypeOf((*CustomizationLinuxPrep)(nil)).Elem()
    +}
    +
    +type CustomizationName struct {
    +	DynamicData
    +}
    +
    +func init() {
    +	t["CustomizationName"] = reflect.TypeOf((*CustomizationName)(nil)).Elem()
    +}
    +
    +type CustomizationNetworkSetupFailed struct {
    +	CustomizationFailed
    +}
    +
    +func init() {
    +	t["CustomizationNetworkSetupFailed"] = reflect.TypeOf((*CustomizationNetworkSetupFailed)(nil)).Elem()
    +}
    +
    +type CustomizationOptions struct {
    +	DynamicData
    +}
    +
    +func init() {
    +	t["CustomizationOptions"] = reflect.TypeOf((*CustomizationOptions)(nil)).Elem()
    +}
    +
    +type CustomizationPassword struct {
    +	DynamicData
    +
    +	Value     string `xml:"value"`
    +	PlainText bool   `xml:"plainText"`
    +}
    +
    +func init() {
    +	t["CustomizationPassword"] = reflect.TypeOf((*CustomizationPassword)(nil)).Elem()
    +}
    +
    +type CustomizationPending struct {
    +	CustomizationFault
    +}
    +
    +func init() {
    +	t["CustomizationPending"] = reflect.TypeOf((*CustomizationPending)(nil)).Elem()
    +}
    +
    +type CustomizationPendingFault CustomizationPending
    +
    +func init() {
    +	t["CustomizationPendingFault"] = reflect.TypeOf((*CustomizationPendingFault)(nil)).Elem()
    +}
    +
    +type CustomizationPrefixName struct {
    +	CustomizationName
    +
    +	Base string `xml:"base"`
    +}
    +
    +func init() {
    +	t["CustomizationPrefixName"] = reflect.TypeOf((*CustomizationPrefixName)(nil)).Elem()
    +}
    +
    +type CustomizationSpec struct {
    +	DynamicData
    +
    +	Options          BaseCustomizationOptions          `xml:"options,omitempty,typeattr"`
    +	Identity         BaseCustomizationIdentitySettings `xml:"identity,typeattr"`
    +	GlobalIPSettings CustomizationGlobalIPSettings     `xml:"globalIPSettings"`
    +	NicSettingMap    []CustomizationAdapterMapping     `xml:"nicSettingMap,omitempty"`
    +	EncryptionKey    []byte                            `xml:"encryptionKey,omitempty"`
    +}
    +
    +func init() {
    +	t["CustomizationSpec"] = reflect.TypeOf((*CustomizationSpec)(nil)).Elem()
    +}
    +
    +type CustomizationSpecInfo struct {
    +	DynamicData
    +
    +	Name           string     `xml:"name"`
    +	Description    string     `xml:"description"`
    +	Type           string     `xml:"type"`
    +	ChangeVersion  string     `xml:"changeVersion,omitempty"`
    +	LastUpdateTime *time.Time `xml:"lastUpdateTime"`
    +}
    +
    +func init() {
    +	t["CustomizationSpecInfo"] = reflect.TypeOf((*CustomizationSpecInfo)(nil)).Elem()
    +}
    +
    +type CustomizationSpecItem struct {
    +	DynamicData
    +
    +	Info CustomizationSpecInfo `xml:"info"`
    +	Spec CustomizationSpec     `xml:"spec"`
    +}
    +
    +func init() {
    +	t["CustomizationSpecItem"] = reflect.TypeOf((*CustomizationSpecItem)(nil)).Elem()
    +}
    +
    +type CustomizationSpecItemToXml CustomizationSpecItemToXmlRequestType
    +
    +func init() {
    +	t["CustomizationSpecItemToXml"] = reflect.TypeOf((*CustomizationSpecItemToXml)(nil)).Elem()
    +}
    +
    +type CustomizationSpecItemToXmlRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Item CustomizationSpecItem  `xml:"item"`
    +}
    +
    +func init() {
    +	t["CustomizationSpecItemToXmlRequestType"] = reflect.TypeOf((*CustomizationSpecItemToXmlRequestType)(nil)).Elem()
    +}
    +
    +type CustomizationSpecItemToXmlResponse struct {
    +	Returnval string `xml:"returnval"`
    +}
    +
    +type CustomizationStartedEvent struct {
    +	CustomizationEvent
    +}
    +
    +func init() {
    +	t["CustomizationStartedEvent"] = reflect.TypeOf((*CustomizationStartedEvent)(nil)).Elem()
    +}
    +
    +type CustomizationStatelessIpV6Generator struct {
    +	CustomizationIpV6Generator
    +}
    +
    +func init() {
    +	t["CustomizationStatelessIpV6Generator"] = reflect.TypeOf((*CustomizationStatelessIpV6Generator)(nil)).Elem()
    +}
    +
    +type CustomizationSucceeded struct {
    +	CustomizationEvent
    +}
    +
    +func init() {
    +	t["CustomizationSucceeded"] = reflect.TypeOf((*CustomizationSucceeded)(nil)).Elem()
    +}
    +
    +type CustomizationSysprep struct {
    +	CustomizationIdentitySettings
    +
    +	GuiUnattended        CustomizationGuiUnattended         `xml:"guiUnattended"`
    +	UserData             CustomizationUserData              `xml:"userData"`
    +	GuiRunOnce           *CustomizationGuiRunOnce           `xml:"guiRunOnce,omitempty"`
    +	Identification       CustomizationIdentification        `xml:"identification"`
    +	LicenseFilePrintData *CustomizationLicenseFilePrintData `xml:"licenseFilePrintData,omitempty"`
    +}
    +
    +func init() {
    +	t["CustomizationSysprep"] = reflect.TypeOf((*CustomizationSysprep)(nil)).Elem()
    +}
    +
    +type CustomizationSysprepFailed struct {
    +	CustomizationFailed
    +
    +	SysprepVersion string `xml:"sysprepVersion"`
    +	SystemVersion  string `xml:"systemVersion"`
    +}
    +
    +func init() {
    +	t["CustomizationSysprepFailed"] = reflect.TypeOf((*CustomizationSysprepFailed)(nil)).Elem()
    +}
    +
    +type CustomizationSysprepText struct {
    +	CustomizationIdentitySettings
    +
    +	Value string `xml:"value"`
    +}
    +
    +func init() {
    +	t["CustomizationSysprepText"] = reflect.TypeOf((*CustomizationSysprepText)(nil)).Elem()
    +}
    +
    +type CustomizationUnknownFailure struct {
    +	CustomizationFailed
    +}
    +
    +func init() {
    +	t["CustomizationUnknownFailure"] = reflect.TypeOf((*CustomizationUnknownFailure)(nil)).Elem()
    +}
    +
    +type CustomizationUnknownIpGenerator struct {
    +	CustomizationIpGenerator
    +}
    +
    +func init() {
    +	t["CustomizationUnknownIpGenerator"] = reflect.TypeOf((*CustomizationUnknownIpGenerator)(nil)).Elem()
    +}
    +
    +type CustomizationUnknownIpV6Generator struct {
    +	CustomizationIpV6Generator
    +}
    +
    +func init() {
    +	t["CustomizationUnknownIpV6Generator"] = reflect.TypeOf((*CustomizationUnknownIpV6Generator)(nil)).Elem()
    +}
    +
    +type CustomizationUnknownName struct {
    +	CustomizationName
    +}
    +
    +func init() {
    +	t["CustomizationUnknownName"] = reflect.TypeOf((*CustomizationUnknownName)(nil)).Elem()
    +}
    +
    +type CustomizationUserData struct {
    +	DynamicData
    +
    +	FullName     string                `xml:"fullName"`
    +	OrgName      string                `xml:"orgName"`
    +	ComputerName BaseCustomizationName `xml:"computerName,typeattr"`
    +	ProductId    string                `xml:"productId"`
    +}
    +
    +func init() {
    +	t["CustomizationUserData"] = reflect.TypeOf((*CustomizationUserData)(nil)).Elem()
    +}
    +
    +type CustomizationVirtualMachineName struct {
    +	CustomizationName
    +}
    +
    +func init() {
    +	t["CustomizationVirtualMachineName"] = reflect.TypeOf((*CustomizationVirtualMachineName)(nil)).Elem()
    +}
    +
    +type CustomizationWinOptions struct {
    +	CustomizationOptions
    +
    +	ChangeSID      bool                             `xml:"changeSID"`
    +	DeleteAccounts bool                             `xml:"deleteAccounts"`
    +	Reboot         CustomizationSysprepRebootOption `xml:"reboot,omitempty"`
    +}
    +
    +func init() {
    +	t["CustomizationWinOptions"] = reflect.TypeOf((*CustomizationWinOptions)(nil)).Elem()
    +}
    +
    +type CustomizeVMRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Spec CustomizationSpec      `xml:"spec"`
    +}
    +
    +func init() {
    +	t["CustomizeVMRequestType"] = reflect.TypeOf((*CustomizeVMRequestType)(nil)).Elem()
    +}
    +
    +type CustomizeVM_Task CustomizeVMRequestType
    +
    +func init() {
    +	t["CustomizeVM_Task"] = reflect.TypeOf((*CustomizeVM_Task)(nil)).Elem()
    +}
    +
    +type CustomizeVM_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type DVPortConfigInfo struct {
    +	DynamicData
    +
    +	Name          string                   `xml:"name,omitempty"`
    +	Scope         []ManagedObjectReference `xml:"scope,omitempty"`
    +	Description   string                   `xml:"description,omitempty"`
    +	Setting       BaseDVPortSetting        `xml:"setting,omitempty,typeattr"`
    +	ConfigVersion string                   `xml:"configVersion"`
    +}
    +
    +func init() {
    +	t["DVPortConfigInfo"] = reflect.TypeOf((*DVPortConfigInfo)(nil)).Elem()
    +}
    +
    +type DVPortConfigSpec struct {
    +	DynamicData
    +
    +	Operation     string                   `xml:"operation"`
    +	Key           string                   `xml:"key,omitempty"`
    +	Name          string                   `xml:"name,omitempty"`
    +	Scope         []ManagedObjectReference `xml:"scope,omitempty"`
    +	Description   string                   `xml:"description,omitempty"`
    +	Setting       BaseDVPortSetting        `xml:"setting,omitempty,typeattr"`
    +	ConfigVersion string                   `xml:"configVersion,omitempty"`
    +}
    +
    +func init() {
    +	t["DVPortConfigSpec"] = reflect.TypeOf((*DVPortConfigSpec)(nil)).Elem()
    +}
    +
    +type DVPortNotSupported struct {
    +	DeviceBackingNotSupported
    +}
    +
    +func init() {
    +	t["DVPortNotSupported"] = reflect.TypeOf((*DVPortNotSupported)(nil)).Elem()
    +}
    +
    +type DVPortNotSupportedFault DVPortNotSupported
    +
    +func init() {
    +	t["DVPortNotSupportedFault"] = reflect.TypeOf((*DVPortNotSupportedFault)(nil)).Elem()
    +}
    +
    +type DVPortSetting struct {
    +	DynamicData
    +
    +	Blocked                 *BoolPolicy              `xml:"blocked,omitempty"`
    +	VmDirectPathGen2Allowed *BoolPolicy              `xml:"vmDirectPathGen2Allowed,omitempty"`
    +	InShapingPolicy         *DVSTrafficShapingPolicy `xml:"inShapingPolicy,omitempty"`
    +	OutShapingPolicy        *DVSTrafficShapingPolicy `xml:"outShapingPolicy,omitempty"`
    +	VendorSpecificConfig    *DVSVendorSpecificConfig `xml:"vendorSpecificConfig,omitempty"`
    +	NetworkResourcePoolKey  *StringPolicy            `xml:"networkResourcePoolKey,omitempty"`
    +	FilterPolicy            *DvsFilterPolicy         `xml:"filterPolicy,omitempty"`
    +}
    +
    +func init() {
    +	t["DVPortSetting"] = reflect.TypeOf((*DVPortSetting)(nil)).Elem()
    +}
    +
    +type DVPortState struct {
    +	DynamicData
    +
    +	RuntimeInfo         *DVPortStatus                             `xml:"runtimeInfo,omitempty"`
    +	Stats               DistributedVirtualSwitchPortStatistics    `xml:"stats"`
    +	VendorSpecificState []DistributedVirtualSwitchKeyedOpaqueBlob `xml:"vendorSpecificState,omitempty"`
    +}
    +
    +func init() {
    +	t["DVPortState"] = reflect.TypeOf((*DVPortState)(nil)).Elem()
    +}
    +
    +type DVPortStatus struct {
    +	DynamicData
    +
    +	LinkUp                                 bool           `xml:"linkUp"`
    +	Blocked                                bool           `xml:"blocked"`
    +	VlanIds                                []NumericRange `xml:"vlanIds,omitempty"`
    +	TrunkingMode                           *bool          `xml:"trunkingMode"`
    +	Mtu                                    int32          `xml:"mtu,omitempty"`
    +	LinkPeer                               string         `xml:"linkPeer,omitempty"`
    +	MacAddress                             string         `xml:"macAddress,omitempty"`
    +	StatusDetail                           string         `xml:"statusDetail,omitempty"`
    +	VmDirectPathGen2Active                 *bool          `xml:"vmDirectPathGen2Active"`
    +	VmDirectPathGen2InactiveReasonNetwork  []string       `xml:"vmDirectPathGen2InactiveReasonNetwork,omitempty"`
    +	VmDirectPathGen2InactiveReasonOther    []string       `xml:"vmDirectPathGen2InactiveReasonOther,omitempty"`
    +	VmDirectPathGen2InactiveReasonExtended string         `xml:"vmDirectPathGen2InactiveReasonExtended,omitempty"`
    +}
    +
    +func init() {
    +	t["DVPortStatus"] = reflect.TypeOf((*DVPortStatus)(nil)).Elem()
    +}
    +
    +type DVPortgroupConfigInfo struct {
    +	DynamicData
    +
    +	Key                          string                                    `xml:"key"`
    +	Name                         string                                    `xml:"name"`
    +	NumPorts                     int32                                     `xml:"numPorts"`
    +	DistributedVirtualSwitch     *ManagedObjectReference                   `xml:"distributedVirtualSwitch,omitempty"`
    +	DefaultPortConfig            BaseDVPortSetting                         `xml:"defaultPortConfig,omitempty,typeattr"`
    +	Description                  string                                    `xml:"description,omitempty"`
    +	Type                         string                                    `xml:"type"`
    +	Policy                       BaseDVPortgroupPolicy                     `xml:"policy,typeattr"`
    +	PortNameFormat               string                                    `xml:"portNameFormat,omitempty"`
    +	Scope                        []ManagedObjectReference                  `xml:"scope,omitempty"`
    +	VendorSpecificConfig         []DistributedVirtualSwitchKeyedOpaqueBlob `xml:"vendorSpecificConfig,omitempty"`
    +	ConfigVersion                string                                    `xml:"configVersion,omitempty"`
    +	AutoExpand                   *bool                                     `xml:"autoExpand"`
    +	VmVnicNetworkResourcePoolKey string                                    `xml:"vmVnicNetworkResourcePoolKey,omitempty"`
    +	Uplink                       *bool                                     `xml:"uplink"`
    +}
    +
    +func init() {
    +	t["DVPortgroupConfigInfo"] = reflect.TypeOf((*DVPortgroupConfigInfo)(nil)).Elem()
    +}
    +
    +type DVPortgroupConfigSpec struct {
    +	DynamicData
    +
    +	ConfigVersion                string                                    `xml:"configVersion,omitempty"`
    +	Name                         string                                    `xml:"name,omitempty"`
    +	NumPorts                     int32                                     `xml:"numPorts,omitempty"`
    +	PortNameFormat               string                                    `xml:"portNameFormat,omitempty"`
    +	DefaultPortConfig            BaseDVPortSetting                         `xml:"defaultPortConfig,omitempty,typeattr"`
    +	Description                  string                                    `xml:"description,omitempty"`
    +	Type                         string                                    `xml:"type,omitempty"`
    +	Scope                        []ManagedObjectReference                  `xml:"scope,omitempty"`
    +	Policy                       BaseDVPortgroupPolicy                     `xml:"policy,omitempty,typeattr"`
    +	VendorSpecificConfig         []DistributedVirtualSwitchKeyedOpaqueBlob `xml:"vendorSpecificConfig,omitempty"`
    +	AutoExpand                   *bool                                     `xml:"autoExpand"`
    +	VmVnicNetworkResourcePoolKey string                                    `xml:"vmVnicNetworkResourcePoolKey,omitempty"`
    +}
    +
    +func init() {
    +	t["DVPortgroupConfigSpec"] = reflect.TypeOf((*DVPortgroupConfigSpec)(nil)).Elem()
    +}
    +
    +type DVPortgroupCreatedEvent struct {
    +	DVPortgroupEvent
    +}
    +
    +func init() {
    +	t["DVPortgroupCreatedEvent"] = reflect.TypeOf((*DVPortgroupCreatedEvent)(nil)).Elem()
    +}
    +
    +type DVPortgroupDestroyedEvent struct {
    +	DVPortgroupEvent
    +}
    +
    +func init() {
    +	t["DVPortgroupDestroyedEvent"] = reflect.TypeOf((*DVPortgroupDestroyedEvent)(nil)).Elem()
    +}
    +
    +type DVPortgroupEvent struct {
    +	Event
    +}
    +
    +func init() {
    +	t["DVPortgroupEvent"] = reflect.TypeOf((*DVPortgroupEvent)(nil)).Elem()
    +}
    +
    +type DVPortgroupPolicy struct {
    +	DynamicData
    +
    +	BlockOverrideAllowed               bool  `xml:"blockOverrideAllowed"`
    +	ShapingOverrideAllowed             bool  `xml:"shapingOverrideAllowed"`
    +	VendorConfigOverrideAllowed        bool  `xml:"vendorConfigOverrideAllowed"`
    +	LivePortMovingAllowed              bool  `xml:"livePortMovingAllowed"`
    +	PortConfigResetAtDisconnect        bool  `xml:"portConfigResetAtDisconnect"`
    +	NetworkResourcePoolOverrideAllowed *bool `xml:"networkResourcePoolOverrideAllowed"`
    +	TrafficFilterOverrideAllowed       *bool `xml:"trafficFilterOverrideAllowed"`
    +}
    +
    +func init() {
    +	t["DVPortgroupPolicy"] = reflect.TypeOf((*DVPortgroupPolicy)(nil)).Elem()
    +}
    +
    +type DVPortgroupReconfiguredEvent struct {
    +	DVPortgroupEvent
    +
    +	ConfigSpec    DVPortgroupConfigSpec     `xml:"configSpec"`
    +	ConfigChanges *ChangesInfoEventArgument `xml:"configChanges,omitempty"`
    +}
    +
    +func init() {
    +	t["DVPortgroupReconfiguredEvent"] = reflect.TypeOf((*DVPortgroupReconfiguredEvent)(nil)).Elem()
    +}
    +
    +type DVPortgroupRenamedEvent struct {
    +	DVPortgroupEvent
    +
    +	OldName string `xml:"oldName"`
    +	NewName string `xml:"newName"`
    +}
    +
    +func init() {
    +	t["DVPortgroupRenamedEvent"] = reflect.TypeOf((*DVPortgroupRenamedEvent)(nil)).Elem()
    +}
    +
    +type DVPortgroupRollbackRequestType struct {
    +	This         ManagedObjectReference `xml:"_this"`
    +	EntityBackup *EntityBackupConfig    `xml:"entityBackup,omitempty"`
    +}
    +
    +func init() {
    +	t["DVPortgroupRollbackRequestType"] = reflect.TypeOf((*DVPortgroupRollbackRequestType)(nil)).Elem()
    +}
    +
    +type DVPortgroupRollback_Task DVPortgroupRollbackRequestType
    +
    +func init() {
    +	t["DVPortgroupRollback_Task"] = reflect.TypeOf((*DVPortgroupRollback_Task)(nil)).Elem()
    +}
    +
    +type DVPortgroupRollback_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type DVPortgroupSelection struct {
    +	SelectionSet
    +
    +	DvsUuid      string   `xml:"dvsUuid"`
    +	PortgroupKey []string `xml:"portgroupKey"`
    +}
    +
    +func init() {
    +	t["DVPortgroupSelection"] = reflect.TypeOf((*DVPortgroupSelection)(nil)).Elem()
    +}
    +
    +type DVSBackupRestoreCapability struct {
    +	DynamicData
    +
    +	BackupRestoreSupported bool `xml:"backupRestoreSupported"`
    +}
    +
    +func init() {
    +	t["DVSBackupRestoreCapability"] = reflect.TypeOf((*DVSBackupRestoreCapability)(nil)).Elem()
    +}
    +
    +type DVSCapability struct {
    +	DynamicData
    +
    +	DvsOperationSupported              *bool                                     `xml:"dvsOperationSupported"`
    +	DvPortGroupOperationSupported      *bool                                     `xml:"dvPortGroupOperationSupported"`
    +	DvPortOperationSupported           *bool                                     `xml:"dvPortOperationSupported"`
    +	CompatibleHostComponentProductInfo []DistributedVirtualSwitchHostProductSpec `xml:"compatibleHostComponentProductInfo,omitempty"`
    +	FeaturesSupported                  BaseDVSFeatureCapability                  `xml:"featuresSupported,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["DVSCapability"] = reflect.TypeOf((*DVSCapability)(nil)).Elem()
    +}
    +
    +type DVSConfigInfo struct {
    +	DynamicData
    +
    +	Uuid                                 string                                    `xml:"uuid"`
    +	Name                                 string                                    `xml:"name"`
    +	NumStandalonePorts                   int32                                     `xml:"numStandalonePorts"`
    +	NumPorts                             int32                                     `xml:"numPorts"`
    +	MaxPorts                             int32                                     `xml:"maxPorts"`
    +	UplinkPortPolicy                     BaseDVSUplinkPortPolicy                   `xml:"uplinkPortPolicy,typeattr"`
    +	UplinkPortgroup                      []ManagedObjectReference                  `xml:"uplinkPortgroup,omitempty"`
    +	DefaultPortConfig                    BaseDVPortSetting                         `xml:"defaultPortConfig,typeattr"`
    +	Host                                 []DistributedVirtualSwitchHostMember      `xml:"host,omitempty"`
    +	ProductInfo                          DistributedVirtualSwitchProductSpec       `xml:"productInfo"`
    +	TargetInfo                           *DistributedVirtualSwitchProductSpec      `xml:"targetInfo,omitempty"`
    +	ExtensionKey                         string                                    `xml:"extensionKey,omitempty"`
    +	VendorSpecificConfig                 []DistributedVirtualSwitchKeyedOpaqueBlob `xml:"vendorSpecificConfig,omitempty"`
    +	Policy                               *DVSPolicy                                `xml:"policy,omitempty"`
    +	Description                          string                                    `xml:"description,omitempty"`
    +	ConfigVersion                        string                                    `xml:"configVersion"`
    +	Contact                              DVSContactInfo                            `xml:"contact"`
    +	SwitchIpAddress                      string                                    `xml:"switchIpAddress,omitempty"`
    +	CreateTime                           time.Time                                 `xml:"createTime"`
    +	NetworkResourceManagementEnabled     *bool                                     `xml:"networkResourceManagementEnabled"`
    +	DefaultProxySwitchMaxNumPorts        int32                                     `xml:"defaultProxySwitchMaxNumPorts,omitempty"`
    +	HealthCheckConfig                    []BaseDVSHealthCheckConfig                `xml:"healthCheckConfig,omitempty,typeattr"`
    +	InfrastructureTrafficResourceConfig  []DvsHostInfrastructureTrafficResource    `xml:"infrastructureTrafficResourceConfig,omitempty"`
    +	NetResourcePoolTrafficResourceConfig []DvsHostInfrastructureTrafficResource    `xml:"netResourcePoolTrafficResourceConfig,omitempty"`
    +	NetworkResourceControlVersion        string                                    `xml:"networkResourceControlVersion,omitempty"`
    +	VmVnicNetworkResourcePool            []DVSVmVnicNetworkResourcePool            `xml:"vmVnicNetworkResourcePool,omitempty"`
    +	PnicCapacityRatioForReservation      int32                                     `xml:"pnicCapacityRatioForReservation,omitempty"`
    +}
    +
    +func init() {
    +	t["DVSConfigInfo"] = reflect.TypeOf((*DVSConfigInfo)(nil)).Elem()
    +}
    +
    +type DVSConfigSpec struct {
    +	DynamicData
    +
    +	ConfigVersion                        string                                         `xml:"configVersion,omitempty"`
    +	Name                                 string                                         `xml:"name,omitempty"`
    +	NumStandalonePorts                   int32                                          `xml:"numStandalonePorts,omitempty"`
    +	MaxPorts                             int32                                          `xml:"maxPorts,omitempty"`
    +	UplinkPortPolicy                     BaseDVSUplinkPortPolicy                        `xml:"uplinkPortPolicy,omitempty,typeattr"`
    +	UplinkPortgroup                      []ManagedObjectReference                       `xml:"uplinkPortgroup,omitempty"`
    +	DefaultPortConfig                    BaseDVPortSetting                              `xml:"defaultPortConfig,omitempty,typeattr"`
    +	Host                                 []DistributedVirtualSwitchHostMemberConfigSpec `xml:"host,omitempty"`
    +	ExtensionKey                         string                                         `xml:"extensionKey,omitempty"`
    +	Description                          string                                         `xml:"description,omitempty"`
    +	Policy                               *DVSPolicy                                     `xml:"policy,omitempty"`
    +	VendorSpecificConfig                 []DistributedVirtualSwitchKeyedOpaqueBlob      `xml:"vendorSpecificConfig,omitempty"`
    +	Contact                              *DVSContactInfo                                `xml:"contact,omitempty"`
    +	SwitchIpAddress                      string                                         `xml:"switchIpAddress,omitempty"`
    +	DefaultProxySwitchMaxNumPorts        int32                                          `xml:"defaultProxySwitchMaxNumPorts,omitempty"`
    +	InfrastructureTrafficResourceConfig  []DvsHostInfrastructureTrafficResource         `xml:"infrastructureTrafficResourceConfig,omitempty"`
    +	NetResourcePoolTrafficResourceConfig []DvsHostInfrastructureTrafficResource         `xml:"netResourcePoolTrafficResourceConfig,omitempty"`
    +	NetworkResourceControlVersion        string                                         `xml:"networkResourceControlVersion,omitempty"`
    +}
    +
    +func init() {
    +	t["DVSConfigSpec"] = reflect.TypeOf((*DVSConfigSpec)(nil)).Elem()
    +}
    +
    +type DVSContactInfo struct {
    +	DynamicData
    +
    +	Name    string `xml:"name,omitempty"`
    +	Contact string `xml:"contact,omitempty"`
    +}
    +
    +func init() {
    +	t["DVSContactInfo"] = reflect.TypeOf((*DVSContactInfo)(nil)).Elem()
    +}
    +
    +type DVSCreateSpec struct {
    +	DynamicData
    +
    +	ConfigSpec  BaseDVSConfigSpec                    `xml:"configSpec,typeattr"`
    +	ProductInfo *DistributedVirtualSwitchProductSpec `xml:"productInfo,omitempty"`
    +	Capability  *DVSCapability                       `xml:"capability,omitempty"`
    +}
    +
    +func init() {
    +	t["DVSCreateSpec"] = reflect.TypeOf((*DVSCreateSpec)(nil)).Elem()
    +}
    +
    +type DVSFailureCriteria struct {
    +	InheritablePolicy
    +
    +	CheckSpeed        *StringPolicy `xml:"checkSpeed,omitempty"`
    +	Speed             *IntPolicy    `xml:"speed,omitempty"`
    +	CheckDuplex       *BoolPolicy   `xml:"checkDuplex,omitempty"`
    +	FullDuplex        *BoolPolicy   `xml:"fullDuplex,omitempty"`
    +	CheckErrorPercent *BoolPolicy   `xml:"checkErrorPercent,omitempty"`
    +	Percentage        *IntPolicy    `xml:"percentage,omitempty"`
    +	CheckBeacon       *BoolPolicy   `xml:"checkBeacon,omitempty"`
    +}
    +
    +func init() {
    +	t["DVSFailureCriteria"] = reflect.TypeOf((*DVSFailureCriteria)(nil)).Elem()
    +}
    +
    +type DVSFeatureCapability struct {
    +	DynamicData
    +
    +	NetworkResourceManagementSupported  bool                                    `xml:"networkResourceManagementSupported"`
    +	VmDirectPathGen2Supported           bool                                    `xml:"vmDirectPathGen2Supported"`
    +	NicTeamingPolicy                    []string                                `xml:"nicTeamingPolicy,omitempty"`
    +	NetworkResourcePoolHighShareValue   int32                                   `xml:"networkResourcePoolHighShareValue,omitempty"`
    +	NetworkResourceManagementCapability *DVSNetworkResourceManagementCapability `xml:"networkResourceManagementCapability,omitempty"`
    +	HealthCheckCapability               BaseDVSHealthCheckCapability            `xml:"healthCheckCapability,omitempty,typeattr"`
    +	RollbackCapability                  *DVSRollbackCapability                  `xml:"rollbackCapability,omitempty"`
    +	BackupRestoreCapability             *DVSBackupRestoreCapability             `xml:"backupRestoreCapability,omitempty"`
    +	NetworkFilterSupported              *bool                                   `xml:"networkFilterSupported"`
    +	MacLearningSupported                *bool                                   `xml:"macLearningSupported"`
    +}
    +
    +func init() {
    +	t["DVSFeatureCapability"] = reflect.TypeOf((*DVSFeatureCapability)(nil)).Elem()
    +}
    +
    +type DVSHealthCheckCapability struct {
    +	DynamicData
    +}
    +
    +func init() {
    +	t["DVSHealthCheckCapability"] = reflect.TypeOf((*DVSHealthCheckCapability)(nil)).Elem()
    +}
    +
    +type DVSHealthCheckConfig struct {
    +	DynamicData
    +
    +	Enable   *bool `xml:"enable"`
    +	Interval int32 `xml:"interval,omitempty"`
    +}
    +
    +func init() {
    +	t["DVSHealthCheckConfig"] = reflect.TypeOf((*DVSHealthCheckConfig)(nil)).Elem()
    +}
    +
    +type DVSHostLocalPortInfo struct {
    +	DynamicData
    +
    +	SwitchUuid string            `xml:"switchUuid"`
    +	PortKey    string            `xml:"portKey"`
    +	Setting    BaseDVPortSetting `xml:"setting,typeattr"`
    +	Vnic       string            `xml:"vnic"`
    +}
    +
    +func init() {
    +	t["DVSHostLocalPortInfo"] = reflect.TypeOf((*DVSHostLocalPortInfo)(nil)).Elem()
    +}
    +
    +type DVSMacLearningPolicy struct {
    +	InheritablePolicy
    +
    +	Enabled              bool   `xml:"enabled"`
    +	AllowUnicastFlooding *bool  `xml:"allowUnicastFlooding"`
    +	Limit                *int32 `xml:"limit"`
    +	LimitPolicy          string `xml:"limitPolicy,omitempty"`
    +}
    +
    +func init() {
    +	t["DVSMacLearningPolicy"] = reflect.TypeOf((*DVSMacLearningPolicy)(nil)).Elem()
    +}
    +
    +type DVSMacManagementPolicy struct {
    +	InheritablePolicy
    +
    +	AllowPromiscuous  *bool                 `xml:"allowPromiscuous"`
    +	MacChanges        *bool                 `xml:"macChanges"`
    +	ForgedTransmits   *bool                 `xml:"forgedTransmits"`
    +	MacLearningPolicy *DVSMacLearningPolicy `xml:"macLearningPolicy,omitempty"`
    +}
    +
    +func init() {
    +	t["DVSMacManagementPolicy"] = reflect.TypeOf((*DVSMacManagementPolicy)(nil)).Elem()
    +}
    +
    +type DVSManagerDvsConfigTarget struct {
    +	DynamicData
    +
    +	DistributedVirtualPortgroup []DistributedVirtualPortgroupInfo `xml:"distributedVirtualPortgroup,omitempty"`
    +	DistributedVirtualSwitch    []DistributedVirtualSwitchInfo    `xml:"distributedVirtualSwitch,omitempty"`
    +}
    +
    +func init() {
    +	t["DVSManagerDvsConfigTarget"] = reflect.TypeOf((*DVSManagerDvsConfigTarget)(nil)).Elem()
    +}
    +
    +type DVSManagerExportEntityRequestType struct {
    +	This         ManagedObjectReference `xml:"_this"`
    +	SelectionSet []BaseSelectionSet     `xml:"selectionSet,typeattr"`
    +}
    +
    +func init() {
    +	t["DVSManagerExportEntityRequestType"] = reflect.TypeOf((*DVSManagerExportEntityRequestType)(nil)).Elem()
    +}
    +
    +type DVSManagerExportEntity_Task DVSManagerExportEntityRequestType
    +
    +func init() {
    +	t["DVSManagerExportEntity_Task"] = reflect.TypeOf((*DVSManagerExportEntity_Task)(nil)).Elem()
    +}
    +
    +type DVSManagerExportEntity_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type DVSManagerImportEntityRequestType struct {
    +	This         ManagedObjectReference `xml:"_this"`
    +	EntityBackup []EntityBackupConfig   `xml:"entityBackup"`
    +	ImportType   string                 `xml:"importType"`
    +}
    +
    +func init() {
    +	t["DVSManagerImportEntityRequestType"] = reflect.TypeOf((*DVSManagerImportEntityRequestType)(nil)).Elem()
    +}
    +
    +type DVSManagerImportEntity_Task DVSManagerImportEntityRequestType
    +
    +func init() {
    +	t["DVSManagerImportEntity_Task"] = reflect.TypeOf((*DVSManagerImportEntity_Task)(nil)).Elem()
    +}
    +
    +type DVSManagerImportEntity_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type DVSManagerLookupDvPortGroup DVSManagerLookupDvPortGroupRequestType
    +
    +func init() {
    +	t["DVSManagerLookupDvPortGroup"] = reflect.TypeOf((*DVSManagerLookupDvPortGroup)(nil)).Elem()
    +}
    +
    +type DVSManagerLookupDvPortGroupRequestType struct {
    +	This         ManagedObjectReference `xml:"_this"`
    +	SwitchUuid   string                 `xml:"switchUuid"`
    +	PortgroupKey string                 `xml:"portgroupKey"`
    +}
    +
    +func init() {
    +	t["DVSManagerLookupDvPortGroupRequestType"] = reflect.TypeOf((*DVSManagerLookupDvPortGroupRequestType)(nil)).Elem()
    +}
    +
    +type DVSManagerLookupDvPortGroupResponse struct {
    +	Returnval *ManagedObjectReference `xml:"returnval,omitempty"`
    +}
    +
    +type DVSNameArrayUplinkPortPolicy struct {
    +	DVSUplinkPortPolicy
    +
    +	UplinkPortName []string `xml:"uplinkPortName"`
    +}
    +
    +func init() {
    +	t["DVSNameArrayUplinkPortPolicy"] = reflect.TypeOf((*DVSNameArrayUplinkPortPolicy)(nil)).Elem()
    +}
    +
    +type DVSNetworkResourceManagementCapability struct {
    +	DynamicData
    +
    +	NetworkResourceManagementSupported       bool  `xml:"networkResourceManagementSupported"`
    +	NetworkResourcePoolHighShareValue        int32 `xml:"networkResourcePoolHighShareValue"`
    +	QosSupported                             bool  `xml:"qosSupported"`
    +	UserDefinedNetworkResourcePoolsSupported bool  `xml:"userDefinedNetworkResourcePoolsSupported"`
    +	NetworkResourceControlVersion3Supported  *bool `xml:"networkResourceControlVersion3Supported"`
    +	UserDefinedInfraTrafficPoolSupported     *bool `xml:"userDefinedInfraTrafficPoolSupported"`
    +}
    +
    +func init() {
    +	t["DVSNetworkResourceManagementCapability"] = reflect.TypeOf((*DVSNetworkResourceManagementCapability)(nil)).Elem()
    +}
    +
    +type DVSNetworkResourcePool struct {
    +	DynamicData
    +
    +	Key            string                               `xml:"key"`
    +	Name           string                               `xml:"name,omitempty"`
    +	Description    string                               `xml:"description,omitempty"`
    +	ConfigVersion  string                               `xml:"configVersion"`
    +	AllocationInfo DVSNetworkResourcePoolAllocationInfo `xml:"allocationInfo"`
    +}
    +
    +func init() {
    +	t["DVSNetworkResourcePool"] = reflect.TypeOf((*DVSNetworkResourcePool)(nil)).Elem()
    +}
    +
    +type DVSNetworkResourcePoolAllocationInfo struct {
    +	DynamicData
    +
    +	Limit       *int64      `xml:"limit"`
    +	Shares      *SharesInfo `xml:"shares,omitempty"`
    +	PriorityTag int32       `xml:"priorityTag,omitempty"`
    +}
    +
    +func init() {
    +	t["DVSNetworkResourcePoolAllocationInfo"] = reflect.TypeOf((*DVSNetworkResourcePoolAllocationInfo)(nil)).Elem()
    +}
    +
    +type DVSNetworkResourcePoolConfigSpec struct {
    +	DynamicData
    +
    +	Key            string                                `xml:"key"`
    +	ConfigVersion  string                                `xml:"configVersion,omitempty"`
    +	AllocationInfo *DVSNetworkResourcePoolAllocationInfo `xml:"allocationInfo,omitempty"`
    +	Name           string                                `xml:"name,omitempty"`
    +	Description    string                                `xml:"description,omitempty"`
    +}
    +
    +func init() {
    +	t["DVSNetworkResourcePoolConfigSpec"] = reflect.TypeOf((*DVSNetworkResourcePoolConfigSpec)(nil)).Elem()
    +}
    +
    +type DVSPolicy struct {
    +	DynamicData
    +
    +	AutoPreInstallAllowed *bool `xml:"autoPreInstallAllowed"`
    +	AutoUpgradeAllowed    *bool `xml:"autoUpgradeAllowed"`
    +	PartialUpgradeAllowed *bool `xml:"partialUpgradeAllowed"`
    +}
    +
    +func init() {
    +	t["DVSPolicy"] = reflect.TypeOf((*DVSPolicy)(nil)).Elem()
    +}
    +
    +type DVSRollbackCapability struct {
    +	DynamicData
    +
    +	RollbackSupported bool `xml:"rollbackSupported"`
    +}
    +
    +func init() {
    +	t["DVSRollbackCapability"] = reflect.TypeOf((*DVSRollbackCapability)(nil)).Elem()
    +}
    +
    +type DVSRollbackRequestType struct {
    +	This         ManagedObjectReference `xml:"_this"`
    +	EntityBackup *EntityBackupConfig    `xml:"entityBackup,omitempty"`
    +}
    +
    +func init() {
    +	t["DVSRollbackRequestType"] = reflect.TypeOf((*DVSRollbackRequestType)(nil)).Elem()
    +}
    +
    +type DVSRollback_Task DVSRollbackRequestType
    +
    +func init() {
    +	t["DVSRollback_Task"] = reflect.TypeOf((*DVSRollback_Task)(nil)).Elem()
    +}
    +
    +type DVSRollback_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type DVSRuntimeInfo struct {
    +	DynamicData
    +
    +	HostMemberRuntime   []HostMemberRuntimeInfo `xml:"hostMemberRuntime,omitempty"`
    +	ResourceRuntimeInfo *DvsResourceRuntimeInfo `xml:"resourceRuntimeInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["DVSRuntimeInfo"] = reflect.TypeOf((*DVSRuntimeInfo)(nil)).Elem()
    +}
    +
    +type DVSSecurityPolicy struct {
    +	InheritablePolicy
    +
    +	AllowPromiscuous *BoolPolicy `xml:"allowPromiscuous,omitempty"`
    +	MacChanges       *BoolPolicy `xml:"macChanges,omitempty"`
    +	ForgedTransmits  *BoolPolicy `xml:"forgedTransmits,omitempty"`
    +}
    +
    +func init() {
    +	t["DVSSecurityPolicy"] = reflect.TypeOf((*DVSSecurityPolicy)(nil)).Elem()
    +}
    +
    +type DVSSelection struct {
    +	SelectionSet
    +
    +	DvsUuid string `xml:"dvsUuid"`
    +}
    +
    +func init() {
    +	t["DVSSelection"] = reflect.TypeOf((*DVSSelection)(nil)).Elem()
    +}
    +
    +type DVSSummary struct {
    +	DynamicData
    +
    +	Name          string                               `xml:"name"`
    +	Uuid          string                               `xml:"uuid"`
    +	NumPorts      int32                                `xml:"numPorts"`
    +	ProductInfo   *DistributedVirtualSwitchProductSpec `xml:"productInfo,omitempty"`
    +	HostMember    []ManagedObjectReference             `xml:"hostMember,omitempty"`
    +	Vm            []ManagedObjectReference             `xml:"vm,omitempty"`
    +	Host          []ManagedObjectReference             `xml:"host,omitempty"`
    +	PortgroupName []string                             `xml:"portgroupName,omitempty"`
    +	Description   string                               `xml:"description,omitempty"`
    +	Contact       *DVSContactInfo                      `xml:"contact,omitempty"`
    +	NumHosts      int32                                `xml:"numHosts,omitempty"`
    +}
    +
    +func init() {
    +	t["DVSSummary"] = reflect.TypeOf((*DVSSummary)(nil)).Elem()
    +}
    +
    +type DVSTrafficShapingPolicy struct {
    +	InheritablePolicy
    +
    +	Enabled          *BoolPolicy `xml:"enabled,omitempty"`
    +	AverageBandwidth *LongPolicy `xml:"averageBandwidth,omitempty"`
    +	PeakBandwidth    *LongPolicy `xml:"peakBandwidth,omitempty"`
    +	BurstSize        *LongPolicy `xml:"burstSize,omitempty"`
    +}
    +
    +func init() {
    +	t["DVSTrafficShapingPolicy"] = reflect.TypeOf((*DVSTrafficShapingPolicy)(nil)).Elem()
    +}
    +
    +type DVSUplinkPortPolicy struct {
    +	DynamicData
    +}
    +
    +func init() {
    +	t["DVSUplinkPortPolicy"] = reflect.TypeOf((*DVSUplinkPortPolicy)(nil)).Elem()
    +}
    +
    +type DVSVendorSpecificConfig struct {
    +	InheritablePolicy
    +
    +	KeyValue []DistributedVirtualSwitchKeyedOpaqueBlob `xml:"keyValue,omitempty"`
    +}
    +
    +func init() {
    +	t["DVSVendorSpecificConfig"] = reflect.TypeOf((*DVSVendorSpecificConfig)(nil)).Elem()
    +}
    +
    +type DVSVmVnicNetworkResourcePool struct {
    +	DynamicData
    +
    +	Key            string                       `xml:"key"`
    +	Name           string                       `xml:"name,omitempty"`
    +	Description    string                       `xml:"description,omitempty"`
    +	ConfigVersion  string                       `xml:"configVersion"`
    +	AllocationInfo *DvsVmVnicResourceAllocation `xml:"allocationInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["DVSVmVnicNetworkResourcePool"] = reflect.TypeOf((*DVSVmVnicNetworkResourcePool)(nil)).Elem()
    +}
    +
    +type DailyTaskScheduler struct {
    +	HourlyTaskScheduler
    +
    +	Hour int32 `xml:"hour"`
    +}
    +
    +func init() {
    +	t["DailyTaskScheduler"] = reflect.TypeOf((*DailyTaskScheduler)(nil)).Elem()
    +}
    +
    +type DasAdmissionControlDisabledEvent struct {
    +	ClusterEvent
    +}
    +
    +func init() {
    +	t["DasAdmissionControlDisabledEvent"] = reflect.TypeOf((*DasAdmissionControlDisabledEvent)(nil)).Elem()
    +}
    +
    +type DasAdmissionControlEnabledEvent struct {
    +	ClusterEvent
    +}
    +
    +func init() {
    +	t["DasAdmissionControlEnabledEvent"] = reflect.TypeOf((*DasAdmissionControlEnabledEvent)(nil)).Elem()
    +}
    +
    +type DasAgentFoundEvent struct {
    +	ClusterEvent
    +}
    +
    +func init() {
    +	t["DasAgentFoundEvent"] = reflect.TypeOf((*DasAgentFoundEvent)(nil)).Elem()
    +}
    +
    +type DasAgentUnavailableEvent struct {
    +	ClusterEvent
    +}
    +
    +func init() {
    +	t["DasAgentUnavailableEvent"] = reflect.TypeOf((*DasAgentUnavailableEvent)(nil)).Elem()
    +}
    +
    +type DasClusterIsolatedEvent struct {
    +	ClusterEvent
    +}
    +
    +func init() {
    +	t["DasClusterIsolatedEvent"] = reflect.TypeOf((*DasClusterIsolatedEvent)(nil)).Elem()
    +}
    +
    +type DasConfigFault struct {
    +	VimFault
    +
    +	Reason string      `xml:"reason,omitempty"`
    +	Output string      `xml:"output,omitempty"`
    +	Event  []BaseEvent `xml:"event,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["DasConfigFault"] = reflect.TypeOf((*DasConfigFault)(nil)).Elem()
    +}
    +
    +type DasConfigFaultFault DasConfigFault
    +
    +func init() {
    +	t["DasConfigFaultFault"] = reflect.TypeOf((*DasConfigFaultFault)(nil)).Elem()
    +}
    +
    +type DasDisabledEvent struct {
    +	ClusterEvent
    +}
    +
    +func init() {
    +	t["DasDisabledEvent"] = reflect.TypeOf((*DasDisabledEvent)(nil)).Elem()
    +}
    +
    +type DasEnabledEvent struct {
    +	ClusterEvent
    +}
    +
    +func init() {
    +	t["DasEnabledEvent"] = reflect.TypeOf((*DasEnabledEvent)(nil)).Elem()
    +}
    +
    +type DasHeartbeatDatastoreInfo struct {
    +	DynamicData
    +
    +	Datastore ManagedObjectReference   `xml:"datastore"`
    +	Hosts     []ManagedObjectReference `xml:"hosts"`
    +}
    +
    +func init() {
    +	t["DasHeartbeatDatastoreInfo"] = reflect.TypeOf((*DasHeartbeatDatastoreInfo)(nil)).Elem()
    +}
    +
    +type DasHostFailedEvent struct {
    +	ClusterEvent
    +
    +	FailedHost HostEventArgument `xml:"failedHost"`
    +}
    +
    +func init() {
    +	t["DasHostFailedEvent"] = reflect.TypeOf((*DasHostFailedEvent)(nil)).Elem()
    +}
    +
    +type DasHostIsolatedEvent struct {
    +	ClusterEvent
    +
    +	IsolatedHost HostEventArgument `xml:"isolatedHost"`
    +}
    +
    +func init() {
    +	t["DasHostIsolatedEvent"] = reflect.TypeOf((*DasHostIsolatedEvent)(nil)).Elem()
    +}
    +
    +type DatabaseError struct {
    +	RuntimeFault
    +}
    +
    +func init() {
    +	t["DatabaseError"] = reflect.TypeOf((*DatabaseError)(nil)).Elem()
    +}
    +
    +type DatabaseErrorFault DatabaseError
    +
    +func init() {
    +	t["DatabaseErrorFault"] = reflect.TypeOf((*DatabaseErrorFault)(nil)).Elem()
    +}
    +
    +type DatabaseSizeEstimate struct {
    +	DynamicData
    +
    +	Size int64 `xml:"size"`
    +}
    +
    +func init() {
    +	t["DatabaseSizeEstimate"] = reflect.TypeOf((*DatabaseSizeEstimate)(nil)).Elem()
    +}
    +
    +type DatabaseSizeParam struct {
    +	DynamicData
    +
    +	InventoryDesc InventoryDescription              `xml:"inventoryDesc"`
    +	PerfStatsDesc *PerformanceStatisticsDescription `xml:"perfStatsDesc,omitempty"`
    +}
    +
    +func init() {
    +	t["DatabaseSizeParam"] = reflect.TypeOf((*DatabaseSizeParam)(nil)).Elem()
    +}
    +
    +type DatacenterConfigInfo struct {
    +	DynamicData
    +
    +	DefaultHardwareVersionKey string `xml:"defaultHardwareVersionKey,omitempty"`
    +}
    +
    +func init() {
    +	t["DatacenterConfigInfo"] = reflect.TypeOf((*DatacenterConfigInfo)(nil)).Elem()
    +}
    +
    +type DatacenterConfigSpec struct {
    +	DynamicData
    +
    +	DefaultHardwareVersionKey string `xml:"defaultHardwareVersionKey,omitempty"`
    +}
    +
    +func init() {
    +	t["DatacenterConfigSpec"] = reflect.TypeOf((*DatacenterConfigSpec)(nil)).Elem()
    +}
    +
    +type DatacenterCreatedEvent struct {
    +	DatacenterEvent
    +
    +	Parent FolderEventArgument `xml:"parent"`
    +}
    +
    +func init() {
    +	t["DatacenterCreatedEvent"] = reflect.TypeOf((*DatacenterCreatedEvent)(nil)).Elem()
    +}
    +
    +type DatacenterEvent struct {
    +	Event
    +}
    +
    +func init() {
    +	t["DatacenterEvent"] = reflect.TypeOf((*DatacenterEvent)(nil)).Elem()
    +}
    +
    +type DatacenterEventArgument struct {
    +	EntityEventArgument
    +
    +	Datacenter ManagedObjectReference `xml:"datacenter"`
    +}
    +
    +func init() {
    +	t["DatacenterEventArgument"] = reflect.TypeOf((*DatacenterEventArgument)(nil)).Elem()
    +}
    +
    +type DatacenterMismatch struct {
    +	MigrationFault
    +
    +	InvalidArgument    []DatacenterMismatchArgument `xml:"invalidArgument"`
    +	ExpectedDatacenter ManagedObjectReference       `xml:"expectedDatacenter"`
    +}
    +
    +func init() {
    +	t["DatacenterMismatch"] = reflect.TypeOf((*DatacenterMismatch)(nil)).Elem()
    +}
    +
    +type DatacenterMismatchArgument struct {
    +	DynamicData
    +
    +	Entity          ManagedObjectReference  `xml:"entity"`
    +	InputDatacenter *ManagedObjectReference `xml:"inputDatacenter,omitempty"`
    +}
    +
    +func init() {
    +	t["DatacenterMismatchArgument"] = reflect.TypeOf((*DatacenterMismatchArgument)(nil)).Elem()
    +}
    +
    +type DatacenterMismatchFault DatacenterMismatch
    +
    +func init() {
    +	t["DatacenterMismatchFault"] = reflect.TypeOf((*DatacenterMismatchFault)(nil)).Elem()
    +}
    +
    +type DatacenterRenamedEvent struct {
    +	DatacenterEvent
    +
    +	OldName string `xml:"oldName"`
    +	NewName string `xml:"newName"`
    +}
    +
    +func init() {
    +	t["DatacenterRenamedEvent"] = reflect.TypeOf((*DatacenterRenamedEvent)(nil)).Elem()
    +}
    +
    +type DatastoreCapability struct {
    +	DynamicData
    +
    +	DirectoryHierarchySupported      bool  `xml:"directoryHierarchySupported"`
    +	RawDiskMappingsSupported         bool  `xml:"rawDiskMappingsSupported"`
    +	PerFileThinProvisioningSupported bool  `xml:"perFileThinProvisioningSupported"`
    +	StorageIORMSupported             *bool `xml:"storageIORMSupported"`
    +	NativeSnapshotSupported          *bool `xml:"nativeSnapshotSupported"`
    +	TopLevelDirectoryCreateSupported *bool `xml:"topLevelDirectoryCreateSupported"`
    +	SeSparseSupported                *bool `xml:"seSparseSupported"`
    +	VmfsSparseSupported              *bool `xml:"vmfsSparseSupported"`
    +	VsanSparseSupported              *bool `xml:"vsanSparseSupported"`
    +	UpitSupported                    *bool `xml:"upitSupported"`
    +	VmdkExpandSupported              *bool `xml:"vmdkExpandSupported"`
    +}
    +
    +func init() {
    +	t["DatastoreCapability"] = reflect.TypeOf((*DatastoreCapability)(nil)).Elem()
    +}
    +
    +type DatastoreCapacityIncreasedEvent struct {
    +	DatastoreEvent
    +
    +	OldCapacity int64 `xml:"oldCapacity"`
    +	NewCapacity int64 `xml:"newCapacity"`
    +}
    +
    +func init() {
    +	t["DatastoreCapacityIncreasedEvent"] = reflect.TypeOf((*DatastoreCapacityIncreasedEvent)(nil)).Elem()
    +}
    +
    +type DatastoreDestroyedEvent struct {
    +	DatastoreEvent
    +}
    +
    +func init() {
    +	t["DatastoreDestroyedEvent"] = reflect.TypeOf((*DatastoreDestroyedEvent)(nil)).Elem()
    +}
    +
    +type DatastoreDiscoveredEvent struct {
    +	HostEvent
    +
    +	Datastore DatastoreEventArgument `xml:"datastore"`
    +}
    +
    +func init() {
    +	t["DatastoreDiscoveredEvent"] = reflect.TypeOf((*DatastoreDiscoveredEvent)(nil)).Elem()
    +}
    +
    +type DatastoreDuplicatedEvent struct {
    +	DatastoreEvent
    +}
    +
    +func init() {
    +	t["DatastoreDuplicatedEvent"] = reflect.TypeOf((*DatastoreDuplicatedEvent)(nil)).Elem()
    +}
    +
    +type DatastoreEnterMaintenanceMode DatastoreEnterMaintenanceModeRequestType
    +
    +func init() {
    +	t["DatastoreEnterMaintenanceMode"] = reflect.TypeOf((*DatastoreEnterMaintenanceMode)(nil)).Elem()
    +}
    +
    +type DatastoreEnterMaintenanceModeRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["DatastoreEnterMaintenanceModeRequestType"] = reflect.TypeOf((*DatastoreEnterMaintenanceModeRequestType)(nil)).Elem()
    +}
    +
    +type DatastoreEnterMaintenanceModeResponse struct {
    +	Returnval StoragePlacementResult `xml:"returnval"`
    +}
    +
    +type DatastoreEvent struct {
    +	Event
    +
    +	Datastore *DatastoreEventArgument `xml:"datastore,omitempty"`
    +}
    +
    +func init() {
    +	t["DatastoreEvent"] = reflect.TypeOf((*DatastoreEvent)(nil)).Elem()
    +}
    +
    +type DatastoreEventArgument struct {
    +	EntityEventArgument
    +
    +	Datastore ManagedObjectReference `xml:"datastore"`
    +}
    +
    +func init() {
    +	t["DatastoreEventArgument"] = reflect.TypeOf((*DatastoreEventArgument)(nil)).Elem()
    +}
    +
    +type DatastoreExitMaintenanceModeRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["DatastoreExitMaintenanceModeRequestType"] = reflect.TypeOf((*DatastoreExitMaintenanceModeRequestType)(nil)).Elem()
    +}
    +
    +type DatastoreExitMaintenanceMode_Task DatastoreExitMaintenanceModeRequestType
    +
    +func init() {
    +	t["DatastoreExitMaintenanceMode_Task"] = reflect.TypeOf((*DatastoreExitMaintenanceMode_Task)(nil)).Elem()
    +}
    +
    +type DatastoreExitMaintenanceMode_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type DatastoreFileCopiedEvent struct {
    +	DatastoreFileEvent
    +
    +	SourceDatastore DatastoreEventArgument `xml:"sourceDatastore"`
    +	SourceFile      string                 `xml:"sourceFile"`
    +}
    +
    +func init() {
    +	t["DatastoreFileCopiedEvent"] = reflect.TypeOf((*DatastoreFileCopiedEvent)(nil)).Elem()
    +}
    +
    +type DatastoreFileDeletedEvent struct {
    +	DatastoreFileEvent
    +}
    +
    +func init() {
    +	t["DatastoreFileDeletedEvent"] = reflect.TypeOf((*DatastoreFileDeletedEvent)(nil)).Elem()
    +}
    +
    +type DatastoreFileEvent struct {
    +	DatastoreEvent
    +
    +	TargetFile        string `xml:"targetFile"`
    +	SourceOfOperation string `xml:"sourceOfOperation,omitempty"`
    +	Succeeded         *bool  `xml:"succeeded"`
    +}
    +
    +func init() {
    +	t["DatastoreFileEvent"] = reflect.TypeOf((*DatastoreFileEvent)(nil)).Elem()
    +}
    +
    +type DatastoreFileMovedEvent struct {
    +	DatastoreFileEvent
    +
    +	SourceDatastore DatastoreEventArgument `xml:"sourceDatastore"`
    +	SourceFile      string                 `xml:"sourceFile"`
    +}
    +
    +func init() {
    +	t["DatastoreFileMovedEvent"] = reflect.TypeOf((*DatastoreFileMovedEvent)(nil)).Elem()
    +}
    +
    +type DatastoreHostMount struct {
    +	DynamicData
    +
    +	Key       ManagedObjectReference `xml:"key"`
    +	MountInfo HostMountInfo          `xml:"mountInfo"`
    +}
    +
    +func init() {
    +	t["DatastoreHostMount"] = reflect.TypeOf((*DatastoreHostMount)(nil)).Elem()
    +}
    +
    +type DatastoreIORMReconfiguredEvent struct {
    +	DatastoreEvent
    +}
    +
    +func init() {
    +	t["DatastoreIORMReconfiguredEvent"] = reflect.TypeOf((*DatastoreIORMReconfiguredEvent)(nil)).Elem()
    +}
    +
    +type DatastoreInfo struct {
    +	DynamicData
    +
    +	Name                   string     `xml:"name"`
    +	Url                    string     `xml:"url"`
    +	FreeSpace              int64      `xml:"freeSpace"`
    +	MaxFileSize            int64      `xml:"maxFileSize"`
    +	MaxVirtualDiskCapacity int64      `xml:"maxVirtualDiskCapacity,omitempty"`
    +	MaxMemoryFileSize      int64      `xml:"maxMemoryFileSize,omitempty"`
    +	Timestamp              *time.Time `xml:"timestamp"`
    +	ContainerId            string     `xml:"containerId,omitempty"`
    +}
    +
    +func init() {
    +	t["DatastoreInfo"] = reflect.TypeOf((*DatastoreInfo)(nil)).Elem()
    +}
    +
    +type DatastoreMountPathDatastorePair struct {
    +	DynamicData
    +
    +	OldMountPath string                 `xml:"oldMountPath"`
    +	Datastore    ManagedObjectReference `xml:"datastore"`
    +}
    +
    +func init() {
    +	t["DatastoreMountPathDatastorePair"] = reflect.TypeOf((*DatastoreMountPathDatastorePair)(nil)).Elem()
    +}
    +
    +type DatastoreNotWritableOnHost struct {
    +	InvalidDatastore
    +
    +	Host ManagedObjectReference `xml:"host"`
    +}
    +
    +func init() {
    +	t["DatastoreNotWritableOnHost"] = reflect.TypeOf((*DatastoreNotWritableOnHost)(nil)).Elem()
    +}
    +
    +type DatastoreNotWritableOnHostFault BaseDatastoreNotWritableOnHost
    +
    +func init() {
    +	t["DatastoreNotWritableOnHostFault"] = reflect.TypeOf((*DatastoreNotWritableOnHostFault)(nil)).Elem()
    +}
    +
    +type DatastoreOption struct {
    +	DynamicData
    +
    +	UnsupportedVolumes []VirtualMachineDatastoreVolumeOption `xml:"unsupportedVolumes,omitempty"`
    +}
    +
    +func init() {
    +	t["DatastoreOption"] = reflect.TypeOf((*DatastoreOption)(nil)).Elem()
    +}
    +
    +type DatastorePrincipalConfigured struct {
    +	HostEvent
    +
    +	DatastorePrincipal string `xml:"datastorePrincipal"`
    +}
    +
    +func init() {
    +	t["DatastorePrincipalConfigured"] = reflect.TypeOf((*DatastorePrincipalConfigured)(nil)).Elem()
    +}
    +
    +type DatastoreRemovedOnHostEvent struct {
    +	HostEvent
    +
    +	Datastore DatastoreEventArgument `xml:"datastore"`
    +}
    +
    +func init() {
    +	t["DatastoreRemovedOnHostEvent"] = reflect.TypeOf((*DatastoreRemovedOnHostEvent)(nil)).Elem()
    +}
    +
    +type DatastoreRenamedEvent struct {
    +	DatastoreEvent
    +
    +	OldName string `xml:"oldName"`
    +	NewName string `xml:"newName"`
    +}
    +
    +func init() {
    +	t["DatastoreRenamedEvent"] = reflect.TypeOf((*DatastoreRenamedEvent)(nil)).Elem()
    +}
    +
    +type DatastoreRenamedOnHostEvent struct {
    +	HostEvent
    +
    +	OldName string `xml:"oldName"`
    +	NewName string `xml:"newName"`
    +}
    +
    +func init() {
    +	t["DatastoreRenamedOnHostEvent"] = reflect.TypeOf((*DatastoreRenamedOnHostEvent)(nil)).Elem()
    +}
    +
    +type DatastoreSummary struct {
    +	DynamicData
    +
    +	Datastore          *ManagedObjectReference `xml:"datastore,omitempty"`
    +	Name               string                  `xml:"name"`
    +	Url                string                  `xml:"url"`
    +	Capacity           int64                   `xml:"capacity"`
    +	FreeSpace          int64                   `xml:"freeSpace"`
    +	Uncommitted        int64                   `xml:"uncommitted,omitempty"`
    +	Accessible         bool                    `xml:"accessible"`
    +	MultipleHostAccess *bool                   `xml:"multipleHostAccess"`
    +	Type               string                  `xml:"type"`
    +	MaintenanceMode    string                  `xml:"maintenanceMode,omitempty"`
    +}
    +
    +func init() {
    +	t["DatastoreSummary"] = reflect.TypeOf((*DatastoreSummary)(nil)).Elem()
    +}
    +
    +type DatastoreVVolContainerFailoverPair struct {
    +	DynamicData
    +
    +	SrcContainer string     `xml:"srcContainer,omitempty"`
    +	TgtContainer string     `xml:"tgtContainer"`
    +	VvolMapping  []KeyValue `xml:"vvolMapping,omitempty"`
    +}
    +
    +func init() {
    +	t["DatastoreVVolContainerFailoverPair"] = reflect.TypeOf((*DatastoreVVolContainerFailoverPair)(nil)).Elem()
    +}
    +
    +type DateTimeProfile struct {
    +	ApplyProfile
    +}
    +
    +func init() {
    +	t["DateTimeProfile"] = reflect.TypeOf((*DateTimeProfile)(nil)).Elem()
    +}
    +
    +type DecodeLicense DecodeLicenseRequestType
    +
    +func init() {
    +	t["DecodeLicense"] = reflect.TypeOf((*DecodeLicense)(nil)).Elem()
    +}
    +
    +type DecodeLicenseRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	LicenseKey string                 `xml:"licenseKey"`
    +}
    +
    +func init() {
    +	t["DecodeLicenseRequestType"] = reflect.TypeOf((*DecodeLicenseRequestType)(nil)).Elem()
    +}
    +
    +type DecodeLicenseResponse struct {
    +	Returnval LicenseManagerLicenseInfo `xml:"returnval"`
    +}
    +
    +type DefragmentAllDisks DefragmentAllDisksRequestType
    +
    +func init() {
    +	t["DefragmentAllDisks"] = reflect.TypeOf((*DefragmentAllDisks)(nil)).Elem()
    +}
    +
    +type DefragmentAllDisksRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["DefragmentAllDisksRequestType"] = reflect.TypeOf((*DefragmentAllDisksRequestType)(nil)).Elem()
    +}
    +
    +type DefragmentAllDisksResponse struct {
    +}
    +
    +type DefragmentVirtualDiskRequestType struct {
    +	This       ManagedObjectReference  `xml:"_this"`
    +	Name       string                  `xml:"name"`
    +	Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"`
    +}
    +
    +func init() {
    +	t["DefragmentVirtualDiskRequestType"] = reflect.TypeOf((*DefragmentVirtualDiskRequestType)(nil)).Elem()
    +}
    +
    +type DefragmentVirtualDisk_Task DefragmentVirtualDiskRequestType
    +
    +func init() {
    +	t["DefragmentVirtualDisk_Task"] = reflect.TypeOf((*DefragmentVirtualDisk_Task)(nil)).Elem()
    +}
    +
    +type DefragmentVirtualDisk_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type DeleteCustomizationSpec DeleteCustomizationSpecRequestType
    +
    +func init() {
    +	t["DeleteCustomizationSpec"] = reflect.TypeOf((*DeleteCustomizationSpec)(nil)).Elem()
    +}
    +
    +type DeleteCustomizationSpecRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Name string                 `xml:"name"`
    +}
    +
    +func init() {
    +	t["DeleteCustomizationSpecRequestType"] = reflect.TypeOf((*DeleteCustomizationSpecRequestType)(nil)).Elem()
    +}
    +
    +type DeleteCustomizationSpecResponse struct {
    +}
    +
    +type DeleteDatastoreFileRequestType struct {
    +	This       ManagedObjectReference  `xml:"_this"`
    +	Name       string                  `xml:"name"`
    +	Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"`
    +}
    +
    +func init() {
    +	t["DeleteDatastoreFileRequestType"] = reflect.TypeOf((*DeleteDatastoreFileRequestType)(nil)).Elem()
    +}
    +
    +type DeleteDatastoreFile_Task DeleteDatastoreFileRequestType
    +
    +func init() {
    +	t["DeleteDatastoreFile_Task"] = reflect.TypeOf((*DeleteDatastoreFile_Task)(nil)).Elem()
    +}
    +
    +type DeleteDatastoreFile_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type DeleteDirectory DeleteDirectoryRequestType
    +
    +func init() {
    +	t["DeleteDirectory"] = reflect.TypeOf((*DeleteDirectory)(nil)).Elem()
    +}
    +
    +type DeleteDirectoryInGuest DeleteDirectoryInGuestRequestType
    +
    +func init() {
    +	t["DeleteDirectoryInGuest"] = reflect.TypeOf((*DeleteDirectoryInGuest)(nil)).Elem()
    +}
    +
    +type DeleteDirectoryInGuestRequestType struct {
    +	This          ManagedObjectReference  `xml:"_this"`
    +	Vm            ManagedObjectReference  `xml:"vm"`
    +	Auth          BaseGuestAuthentication `xml:"auth,typeattr"`
    +	DirectoryPath string                  `xml:"directoryPath"`
    +	Recursive     bool                    `xml:"recursive"`
    +}
    +
    +func init() {
    +	t["DeleteDirectoryInGuestRequestType"] = reflect.TypeOf((*DeleteDirectoryInGuestRequestType)(nil)).Elem()
    +}
    +
    +type DeleteDirectoryInGuestResponse struct {
    +}
    +
    +type DeleteDirectoryRequestType struct {
    +	This          ManagedObjectReference  `xml:"_this"`
    +	Datacenter    *ManagedObjectReference `xml:"datacenter,omitempty"`
    +	DatastorePath string                  `xml:"datastorePath"`
    +}
    +
    +func init() {
    +	t["DeleteDirectoryRequestType"] = reflect.TypeOf((*DeleteDirectoryRequestType)(nil)).Elem()
    +}
    +
    +type DeleteDirectoryResponse struct {
    +}
    +
    +type DeleteFile DeleteFileRequestType
    +
    +func init() {
    +	t["DeleteFile"] = reflect.TypeOf((*DeleteFile)(nil)).Elem()
    +}
    +
    +type DeleteFileInGuest DeleteFileInGuestRequestType
    +
    +func init() {
    +	t["DeleteFileInGuest"] = reflect.TypeOf((*DeleteFileInGuest)(nil)).Elem()
    +}
    +
    +type DeleteFileInGuestRequestType struct {
    +	This     ManagedObjectReference  `xml:"_this"`
    +	Vm       ManagedObjectReference  `xml:"vm"`
    +	Auth     BaseGuestAuthentication `xml:"auth,typeattr"`
    +	FilePath string                  `xml:"filePath"`
    +}
    +
    +func init() {
    +	t["DeleteFileInGuestRequestType"] = reflect.TypeOf((*DeleteFileInGuestRequestType)(nil)).Elem()
    +}
    +
    +type DeleteFileInGuestResponse struct {
    +}
    +
    +type DeleteFileRequestType struct {
    +	This          ManagedObjectReference `xml:"_this"`
    +	DatastorePath string                 `xml:"datastorePath"`
    +}
    +
    +func init() {
    +	t["DeleteFileRequestType"] = reflect.TypeOf((*DeleteFileRequestType)(nil)).Elem()
    +}
    +
    +type DeleteFileResponse struct {
    +}
    +
    +type DeleteHostSpecification DeleteHostSpecificationRequestType
    +
    +func init() {
    +	t["DeleteHostSpecification"] = reflect.TypeOf((*DeleteHostSpecification)(nil)).Elem()
    +}
    +
    +type DeleteHostSpecificationRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Host ManagedObjectReference `xml:"host"`
    +}
    +
    +func init() {
    +	t["DeleteHostSpecificationRequestType"] = reflect.TypeOf((*DeleteHostSpecificationRequestType)(nil)).Elem()
    +}
    +
    +type DeleteHostSpecificationResponse struct {
    +}
    +
    +type DeleteHostSubSpecification DeleteHostSubSpecificationRequestType
    +
    +func init() {
    +	t["DeleteHostSubSpecification"] = reflect.TypeOf((*DeleteHostSubSpecification)(nil)).Elem()
    +}
    +
    +type DeleteHostSubSpecificationRequestType struct {
    +	This        ManagedObjectReference `xml:"_this"`
    +	Host        ManagedObjectReference `xml:"host"`
    +	SubSpecName string                 `xml:"subSpecName"`
    +}
    +
    +func init() {
    +	t["DeleteHostSubSpecificationRequestType"] = reflect.TypeOf((*DeleteHostSubSpecificationRequestType)(nil)).Elem()
    +}
    +
    +type DeleteHostSubSpecificationResponse struct {
    +}
    +
    +type DeleteNvdimmBlockNamespacesRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["DeleteNvdimmBlockNamespacesRequestType"] = reflect.TypeOf((*DeleteNvdimmBlockNamespacesRequestType)(nil)).Elem()
    +}
    +
    +type DeleteNvdimmBlockNamespaces_Task DeleteNvdimmBlockNamespacesRequestType
    +
    +func init() {
    +	t["DeleteNvdimmBlockNamespaces_Task"] = reflect.TypeOf((*DeleteNvdimmBlockNamespaces_Task)(nil)).Elem()
    +}
    +
    +type DeleteNvdimmBlockNamespaces_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type DeleteNvdimmNamespaceRequestType struct {
    +	This       ManagedObjectReference    `xml:"_this"`
    +	DeleteSpec NvdimmNamespaceDeleteSpec `xml:"deleteSpec"`
    +}
    +
    +func init() {
    +	t["DeleteNvdimmNamespaceRequestType"] = reflect.TypeOf((*DeleteNvdimmNamespaceRequestType)(nil)).Elem()
    +}
    +
    +type DeleteNvdimmNamespace_Task DeleteNvdimmNamespaceRequestType
    +
    +func init() {
    +	t["DeleteNvdimmNamespace_Task"] = reflect.TypeOf((*DeleteNvdimmNamespace_Task)(nil)).Elem()
    +}
    +
    +type DeleteNvdimmNamespace_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type DeleteRegistryKeyInGuest DeleteRegistryKeyInGuestRequestType
    +
    +func init() {
    +	t["DeleteRegistryKeyInGuest"] = reflect.TypeOf((*DeleteRegistryKeyInGuest)(nil)).Elem()
    +}
    +
    +type DeleteRegistryKeyInGuestRequestType struct {
    +	This      ManagedObjectReference  `xml:"_this"`
    +	Vm        ManagedObjectReference  `xml:"vm"`
    +	Auth      BaseGuestAuthentication `xml:"auth,typeattr"`
    +	KeyName   GuestRegKeyNameSpec     `xml:"keyName"`
    +	Recursive bool                    `xml:"recursive"`
    +}
    +
    +func init() {
    +	t["DeleteRegistryKeyInGuestRequestType"] = reflect.TypeOf((*DeleteRegistryKeyInGuestRequestType)(nil)).Elem()
    +}
    +
    +type DeleteRegistryKeyInGuestResponse struct {
    +}
    +
    +type DeleteRegistryValueInGuest DeleteRegistryValueInGuestRequestType
    +
    +func init() {
    +	t["DeleteRegistryValueInGuest"] = reflect.TypeOf((*DeleteRegistryValueInGuest)(nil)).Elem()
    +}
    +
    +type DeleteRegistryValueInGuestRequestType struct {
    +	This      ManagedObjectReference  `xml:"_this"`
    +	Vm        ManagedObjectReference  `xml:"vm"`
    +	Auth      BaseGuestAuthentication `xml:"auth,typeattr"`
    +	ValueName GuestRegValueNameSpec   `xml:"valueName"`
    +}
    +
    +func init() {
    +	t["DeleteRegistryValueInGuestRequestType"] = reflect.TypeOf((*DeleteRegistryValueInGuestRequestType)(nil)).Elem()
    +}
    +
    +type DeleteRegistryValueInGuestResponse struct {
    +}
    +
    +type DeleteScsiLunState DeleteScsiLunStateRequestType
    +
    +func init() {
    +	t["DeleteScsiLunState"] = reflect.TypeOf((*DeleteScsiLunState)(nil)).Elem()
    +}
    +
    +type DeleteScsiLunStateRequestType struct {
    +	This             ManagedObjectReference `xml:"_this"`
    +	LunCanonicalName string                 `xml:"lunCanonicalName"`
    +}
    +
    +func init() {
    +	t["DeleteScsiLunStateRequestType"] = reflect.TypeOf((*DeleteScsiLunStateRequestType)(nil)).Elem()
    +}
    +
    +type DeleteScsiLunStateResponse struct {
    +}
    +
    +type DeleteSnapshotRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	Id         ID                     `xml:"id"`
    +	Datastore  ManagedObjectReference `xml:"datastore"`
    +	SnapshotId ID                     `xml:"snapshotId"`
    +}
    +
    +func init() {
    +	t["DeleteSnapshotRequestType"] = reflect.TypeOf((*DeleteSnapshotRequestType)(nil)).Elem()
    +}
    +
    +type DeleteSnapshot_Task DeleteSnapshotRequestType
    +
    +func init() {
    +	t["DeleteSnapshot_Task"] = reflect.TypeOf((*DeleteSnapshot_Task)(nil)).Elem()
    +}
    +
    +type DeleteSnapshot_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type DeleteVStorageObjectRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	Id        ID                     `xml:"id"`
    +	Datastore ManagedObjectReference `xml:"datastore"`
    +}
    +
    +func init() {
    +	t["DeleteVStorageObjectRequestType"] = reflect.TypeOf((*DeleteVStorageObjectRequestType)(nil)).Elem()
    +}
    +
    +type DeleteVStorageObject_Task DeleteVStorageObjectRequestType
    +
    +func init() {
    +	t["DeleteVStorageObject_Task"] = reflect.TypeOf((*DeleteVStorageObject_Task)(nil)).Elem()
    +}
    +
    +type DeleteVStorageObject_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type DeleteVffsVolumeState DeleteVffsVolumeStateRequestType
    +
    +func init() {
    +	t["DeleteVffsVolumeState"] = reflect.TypeOf((*DeleteVffsVolumeState)(nil)).Elem()
    +}
    +
    +type DeleteVffsVolumeStateRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	VffsUuid string                 `xml:"vffsUuid"`
    +}
    +
    +func init() {
    +	t["DeleteVffsVolumeStateRequestType"] = reflect.TypeOf((*DeleteVffsVolumeStateRequestType)(nil)).Elem()
    +}
    +
    +type DeleteVffsVolumeStateResponse struct {
    +}
    +
    +type DeleteVirtualDiskRequestType struct {
    +	This       ManagedObjectReference  `xml:"_this"`
    +	Name       string                  `xml:"name"`
    +	Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"`
    +}
    +
    +func init() {
    +	t["DeleteVirtualDiskRequestType"] = reflect.TypeOf((*DeleteVirtualDiskRequestType)(nil)).Elem()
    +}
    +
    +type DeleteVirtualDisk_Task DeleteVirtualDiskRequestType
    +
    +func init() {
    +	t["DeleteVirtualDisk_Task"] = reflect.TypeOf((*DeleteVirtualDisk_Task)(nil)).Elem()
    +}
    +
    +type DeleteVirtualDisk_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type DeleteVmfsVolumeState DeleteVmfsVolumeStateRequestType
    +
    +func init() {
    +	t["DeleteVmfsVolumeState"] = reflect.TypeOf((*DeleteVmfsVolumeState)(nil)).Elem()
    +}
    +
    +type DeleteVmfsVolumeStateRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	VmfsUuid string                 `xml:"vmfsUuid"`
    +}
    +
    +func init() {
    +	t["DeleteVmfsVolumeStateRequestType"] = reflect.TypeOf((*DeleteVmfsVolumeStateRequestType)(nil)).Elem()
    +}
    +
    +type DeleteVmfsVolumeStateResponse struct {
    +}
    +
    +type DeleteVsanObjects DeleteVsanObjectsRequestType
    +
    +func init() {
    +	t["DeleteVsanObjects"] = reflect.TypeOf((*DeleteVsanObjects)(nil)).Elem()
    +}
    +
    +type DeleteVsanObjectsRequestType struct {
    +	This  ManagedObjectReference `xml:"_this"`
    +	Uuids []string               `xml:"uuids"`
    +	Force *bool                  `xml:"force"`
    +}
    +
    +func init() {
    +	t["DeleteVsanObjectsRequestType"] = reflect.TypeOf((*DeleteVsanObjectsRequestType)(nil)).Elem()
    +}
    +
    +type DeleteVsanObjectsResponse struct {
    +	Returnval []HostVsanInternalSystemDeleteVsanObjectsResult `xml:"returnval"`
    +}
    +
    +type DeltaDiskFormatNotSupported struct {
    +	VmConfigFault
    +
    +	Datastore       []ManagedObjectReference `xml:"datastore,omitempty"`
    +	DeltaDiskFormat string                   `xml:"deltaDiskFormat"`
    +}
    +
    +func init() {
    +	t["DeltaDiskFormatNotSupported"] = reflect.TypeOf((*DeltaDiskFormatNotSupported)(nil)).Elem()
    +}
    +
    +type DeltaDiskFormatNotSupportedFault DeltaDiskFormatNotSupported
    +
    +func init() {
    +	t["DeltaDiskFormatNotSupportedFault"] = reflect.TypeOf((*DeltaDiskFormatNotSupportedFault)(nil)).Elem()
    +}
    +
    +type Description struct {
    +	DynamicData
    +
    +	Label   string `xml:"label"`
    +	Summary string `xml:"summary"`
    +}
    +
    +func init() {
    +	t["Description"] = reflect.TypeOf((*Description)(nil)).Elem()
    +}
    +
    +type DeselectVnic DeselectVnicRequestType
    +
    +func init() {
    +	t["DeselectVnic"] = reflect.TypeOf((*DeselectVnic)(nil)).Elem()
    +}
    +
    +type DeselectVnicForNicType DeselectVnicForNicTypeRequestType
    +
    +func init() {
    +	t["DeselectVnicForNicType"] = reflect.TypeOf((*DeselectVnicForNicType)(nil)).Elem()
    +}
    +
    +type DeselectVnicForNicTypeRequestType struct {
    +	This    ManagedObjectReference `xml:"_this"`
    +	NicType string                 `xml:"nicType"`
    +	Device  string                 `xml:"device"`
    +}
    +
    +func init() {
    +	t["DeselectVnicForNicTypeRequestType"] = reflect.TypeOf((*DeselectVnicForNicTypeRequestType)(nil)).Elem()
    +}
    +
    +type DeselectVnicForNicTypeResponse struct {
    +}
    +
    +type DeselectVnicRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["DeselectVnicRequestType"] = reflect.TypeOf((*DeselectVnicRequestType)(nil)).Elem()
    +}
    +
    +type DeselectVnicResponse struct {
    +}
    +
    +type DestinationSwitchFull struct {
    +	CannotAccessNetwork
    +}
    +
    +func init() {
    +	t["DestinationSwitchFull"] = reflect.TypeOf((*DestinationSwitchFull)(nil)).Elem()
    +}
    +
    +type DestinationSwitchFullFault DestinationSwitchFull
    +
    +func init() {
    +	t["DestinationSwitchFullFault"] = reflect.TypeOf((*DestinationSwitchFullFault)(nil)).Elem()
    +}
    +
    +type DestinationVsanDisabled struct {
    +	CannotMoveVsanEnabledHost
    +
    +	DestinationCluster string `xml:"destinationCluster"`
    +}
    +
    +func init() {
    +	t["DestinationVsanDisabled"] = reflect.TypeOf((*DestinationVsanDisabled)(nil)).Elem()
    +}
    +
    +type DestinationVsanDisabledFault DestinationVsanDisabled
    +
    +func init() {
    +	t["DestinationVsanDisabledFault"] = reflect.TypeOf((*DestinationVsanDisabledFault)(nil)).Elem()
    +}
    +
    +type DestroyChildren DestroyChildrenRequestType
    +
    +func init() {
    +	t["DestroyChildren"] = reflect.TypeOf((*DestroyChildren)(nil)).Elem()
    +}
    +
    +type DestroyChildrenRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["DestroyChildrenRequestType"] = reflect.TypeOf((*DestroyChildrenRequestType)(nil)).Elem()
    +}
    +
    +type DestroyChildrenResponse struct {
    +}
    +
    +type DestroyCollector DestroyCollectorRequestType
    +
    +func init() {
    +	t["DestroyCollector"] = reflect.TypeOf((*DestroyCollector)(nil)).Elem()
    +}
    +
    +type DestroyCollectorRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["DestroyCollectorRequestType"] = reflect.TypeOf((*DestroyCollectorRequestType)(nil)).Elem()
    +}
    +
    +type DestroyCollectorResponse struct {
    +}
    +
    +type DestroyDatastore DestroyDatastoreRequestType
    +
    +func init() {
    +	t["DestroyDatastore"] = reflect.TypeOf((*DestroyDatastore)(nil)).Elem()
    +}
    +
    +type DestroyDatastoreRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["DestroyDatastoreRequestType"] = reflect.TypeOf((*DestroyDatastoreRequestType)(nil)).Elem()
    +}
    +
    +type DestroyDatastoreResponse struct {
    +}
    +
    +type DestroyIpPool DestroyIpPoolRequestType
    +
    +func init() {
    +	t["DestroyIpPool"] = reflect.TypeOf((*DestroyIpPool)(nil)).Elem()
    +}
    +
    +type DestroyIpPoolRequestType struct {
    +	This  ManagedObjectReference `xml:"_this"`
    +	Dc    ManagedObjectReference `xml:"dc"`
    +	Id    int32                  `xml:"id"`
    +	Force bool                   `xml:"force"`
    +}
    +
    +func init() {
    +	t["DestroyIpPoolRequestType"] = reflect.TypeOf((*DestroyIpPoolRequestType)(nil)).Elem()
    +}
    +
    +type DestroyIpPoolResponse struct {
    +}
    +
    +type DestroyNetwork DestroyNetworkRequestType
    +
    +func init() {
    +	t["DestroyNetwork"] = reflect.TypeOf((*DestroyNetwork)(nil)).Elem()
    +}
    +
    +type DestroyNetworkRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["DestroyNetworkRequestType"] = reflect.TypeOf((*DestroyNetworkRequestType)(nil)).Elem()
    +}
    +
    +type DestroyNetworkResponse struct {
    +}
    +
    +type DestroyProfile DestroyProfileRequestType
    +
    +func init() {
    +	t["DestroyProfile"] = reflect.TypeOf((*DestroyProfile)(nil)).Elem()
    +}
    +
    +type DestroyProfileRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["DestroyProfileRequestType"] = reflect.TypeOf((*DestroyProfileRequestType)(nil)).Elem()
    +}
    +
    +type DestroyProfileResponse struct {
    +}
    +
    +type DestroyPropertyCollector DestroyPropertyCollectorRequestType
    +
    +func init() {
    +	t["DestroyPropertyCollector"] = reflect.TypeOf((*DestroyPropertyCollector)(nil)).Elem()
    +}
    +
    +type DestroyPropertyCollectorRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["DestroyPropertyCollectorRequestType"] = reflect.TypeOf((*DestroyPropertyCollectorRequestType)(nil)).Elem()
    +}
    +
    +type DestroyPropertyCollectorResponse struct {
    +}
    +
    +type DestroyPropertyFilter DestroyPropertyFilterRequestType
    +
    +func init() {
    +	t["DestroyPropertyFilter"] = reflect.TypeOf((*DestroyPropertyFilter)(nil)).Elem()
    +}
    +
    +type DestroyPropertyFilterRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["DestroyPropertyFilterRequestType"] = reflect.TypeOf((*DestroyPropertyFilterRequestType)(nil)).Elem()
    +}
    +
    +type DestroyPropertyFilterResponse struct {
    +}
    +
    +type DestroyRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["DestroyRequestType"] = reflect.TypeOf((*DestroyRequestType)(nil)).Elem()
    +}
    +
    +type DestroyVffs DestroyVffsRequestType
    +
    +func init() {
    +	t["DestroyVffs"] = reflect.TypeOf((*DestroyVffs)(nil)).Elem()
    +}
    +
    +type DestroyVffsRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	VffsPath string                 `xml:"vffsPath"`
    +}
    +
    +func init() {
    +	t["DestroyVffsRequestType"] = reflect.TypeOf((*DestroyVffsRequestType)(nil)).Elem()
    +}
    +
    +type DestroyVffsResponse struct {
    +}
    +
    +type DestroyView DestroyViewRequestType
    +
    +func init() {
    +	t["DestroyView"] = reflect.TypeOf((*DestroyView)(nil)).Elem()
    +}
    +
    +type DestroyViewRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["DestroyViewRequestType"] = reflect.TypeOf((*DestroyViewRequestType)(nil)).Elem()
    +}
    +
    +type DestroyViewResponse struct {
    +}
    +
    +type Destroy_Task DestroyRequestType
    +
    +func init() {
    +	t["Destroy_Task"] = reflect.TypeOf((*Destroy_Task)(nil)).Elem()
    +}
    +
    +type Destroy_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type DetachDiskRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	DiskId ID                     `xml:"diskId"`
    +}
    +
    +func init() {
    +	t["DetachDiskRequestType"] = reflect.TypeOf((*DetachDiskRequestType)(nil)).Elem()
    +}
    +
    +type DetachDisk_Task DetachDiskRequestType
    +
    +func init() {
    +	t["DetachDisk_Task"] = reflect.TypeOf((*DetachDisk_Task)(nil)).Elem()
    +}
    +
    +type DetachDisk_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type DetachScsiLun DetachScsiLunRequestType
    +
    +func init() {
    +	t["DetachScsiLun"] = reflect.TypeOf((*DetachScsiLun)(nil)).Elem()
    +}
    +
    +type DetachScsiLunExRequestType struct {
    +	This    ManagedObjectReference `xml:"_this"`
    +	LunUuid []string               `xml:"lunUuid"`
    +}
    +
    +func init() {
    +	t["DetachScsiLunExRequestType"] = reflect.TypeOf((*DetachScsiLunExRequestType)(nil)).Elem()
    +}
    +
    +type DetachScsiLunEx_Task DetachScsiLunExRequestType
    +
    +func init() {
    +	t["DetachScsiLunEx_Task"] = reflect.TypeOf((*DetachScsiLunEx_Task)(nil)).Elem()
    +}
    +
    +type DetachScsiLunEx_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type DetachScsiLunRequestType struct {
    +	This    ManagedObjectReference `xml:"_this"`
    +	LunUuid string                 `xml:"lunUuid"`
    +}
    +
    +func init() {
    +	t["DetachScsiLunRequestType"] = reflect.TypeOf((*DetachScsiLunRequestType)(nil)).Elem()
    +}
    +
    +type DetachScsiLunResponse struct {
    +}
    +
    +type DetachTagFromVStorageObject DetachTagFromVStorageObjectRequestType
    +
    +func init() {
    +	t["DetachTagFromVStorageObject"] = reflect.TypeOf((*DetachTagFromVStorageObject)(nil)).Elem()
    +}
    +
    +type DetachTagFromVStorageObjectRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	Id       ID                     `xml:"id"`
    +	Category string                 `xml:"category"`
    +	Tag      string                 `xml:"tag"`
    +}
    +
    +func init() {
    +	t["DetachTagFromVStorageObjectRequestType"] = reflect.TypeOf((*DetachTagFromVStorageObjectRequestType)(nil)).Elem()
    +}
    +
    +type DetachTagFromVStorageObjectResponse struct {
    +}
    +
    +type DeviceBackedVirtualDiskSpec struct {
    +	VirtualDiskSpec
    +
    +	Device string `xml:"device"`
    +}
    +
    +func init() {
    +	t["DeviceBackedVirtualDiskSpec"] = reflect.TypeOf((*DeviceBackedVirtualDiskSpec)(nil)).Elem()
    +}
    +
    +type DeviceBackingNotSupported struct {
    +	DeviceNotSupported
    +
    +	Backing string `xml:"backing"`
    +}
    +
    +func init() {
    +	t["DeviceBackingNotSupported"] = reflect.TypeOf((*DeviceBackingNotSupported)(nil)).Elem()
    +}
    +
    +type DeviceBackingNotSupportedFault BaseDeviceBackingNotSupported
    +
    +func init() {
    +	t["DeviceBackingNotSupportedFault"] = reflect.TypeOf((*DeviceBackingNotSupportedFault)(nil)).Elem()
    +}
    +
    +type DeviceControllerNotSupported struct {
    +	DeviceNotSupported
    +
    +	Controller string `xml:"controller"`
    +}
    +
    +func init() {
    +	t["DeviceControllerNotSupported"] = reflect.TypeOf((*DeviceControllerNotSupported)(nil)).Elem()
    +}
    +
    +type DeviceControllerNotSupportedFault DeviceControllerNotSupported
    +
    +func init() {
    +	t["DeviceControllerNotSupportedFault"] = reflect.TypeOf((*DeviceControllerNotSupportedFault)(nil)).Elem()
    +}
    +
    +type DeviceGroupId struct {
    +	DynamicData
    +
    +	Id string `xml:"id"`
    +}
    +
    +func init() {
    +	t["DeviceGroupId"] = reflect.TypeOf((*DeviceGroupId)(nil)).Elem()
    +}
    +
    +type DeviceHotPlugNotSupported struct {
    +	InvalidDeviceSpec
    +}
    +
    +func init() {
    +	t["DeviceHotPlugNotSupported"] = reflect.TypeOf((*DeviceHotPlugNotSupported)(nil)).Elem()
    +}
    +
    +type DeviceHotPlugNotSupportedFault DeviceHotPlugNotSupported
    +
    +func init() {
    +	t["DeviceHotPlugNotSupportedFault"] = reflect.TypeOf((*DeviceHotPlugNotSupportedFault)(nil)).Elem()
    +}
    +
    +type DeviceNotFound struct {
    +	InvalidDeviceSpec
    +}
    +
    +func init() {
    +	t["DeviceNotFound"] = reflect.TypeOf((*DeviceNotFound)(nil)).Elem()
    +}
    +
    +type DeviceNotFoundFault DeviceNotFound
    +
    +func init() {
    +	t["DeviceNotFoundFault"] = reflect.TypeOf((*DeviceNotFoundFault)(nil)).Elem()
    +}
    +
    +type DeviceNotSupported struct {
    +	VirtualHardwareCompatibilityIssue
    +
    +	Device string `xml:"device"`
    +	Reason string `xml:"reason,omitempty"`
    +}
    +
    +func init() {
    +	t["DeviceNotSupported"] = reflect.TypeOf((*DeviceNotSupported)(nil)).Elem()
    +}
    +
    +type DeviceNotSupportedFault BaseDeviceNotSupported
    +
    +func init() {
    +	t["DeviceNotSupportedFault"] = reflect.TypeOf((*DeviceNotSupportedFault)(nil)).Elem()
    +}
    +
    +type DeviceUnsupportedForVmPlatform struct {
    +	InvalidDeviceSpec
    +}
    +
    +func init() {
    +	t["DeviceUnsupportedForVmPlatform"] = reflect.TypeOf((*DeviceUnsupportedForVmPlatform)(nil)).Elem()
    +}
    +
    +type DeviceUnsupportedForVmPlatformFault DeviceUnsupportedForVmPlatform
    +
    +func init() {
    +	t["DeviceUnsupportedForVmPlatformFault"] = reflect.TypeOf((*DeviceUnsupportedForVmPlatformFault)(nil)).Elem()
    +}
    +
    +type DeviceUnsupportedForVmVersion struct {
    +	InvalidDeviceSpec
    +
    +	CurrentVersion  string `xml:"currentVersion"`
    +	ExpectedVersion string `xml:"expectedVersion"`
    +}
    +
    +func init() {
    +	t["DeviceUnsupportedForVmVersion"] = reflect.TypeOf((*DeviceUnsupportedForVmVersion)(nil)).Elem()
    +}
    +
    +type DeviceUnsupportedForVmVersionFault DeviceUnsupportedForVmVersion
    +
    +func init() {
    +	t["DeviceUnsupportedForVmVersionFault"] = reflect.TypeOf((*DeviceUnsupportedForVmVersionFault)(nil)).Elem()
    +}
    +
    +type DiagnosticManagerBundleInfo struct {
    +	DynamicData
    +
    +	System *ManagedObjectReference `xml:"system,omitempty"`
    +	Url    string                  `xml:"url"`
    +}
    +
    +func init() {
    +	t["DiagnosticManagerBundleInfo"] = reflect.TypeOf((*DiagnosticManagerBundleInfo)(nil)).Elem()
    +}
    +
    +type DiagnosticManagerLogDescriptor struct {
    +	DynamicData
    +
    +	Key      string          `xml:"key"`
    +	FileName string          `xml:"fileName"`
    +	Creator  string          `xml:"creator"`
    +	Format   string          `xml:"format"`
    +	MimeType string          `xml:"mimeType"`
    +	Info     BaseDescription `xml:"info,typeattr"`
    +}
    +
    +func init() {
    +	t["DiagnosticManagerLogDescriptor"] = reflect.TypeOf((*DiagnosticManagerLogDescriptor)(nil)).Elem()
    +}
    +
    +type DiagnosticManagerLogHeader struct {
    +	DynamicData
    +
    +	LineStart int32    `xml:"lineStart"`
    +	LineEnd   int32    `xml:"lineEnd"`
    +	LineText  []string `xml:"lineText,omitempty"`
    +}
    +
    +func init() {
    +	t["DiagnosticManagerLogHeader"] = reflect.TypeOf((*DiagnosticManagerLogHeader)(nil)).Elem()
    +}
    +
    +type DigestNotSupported struct {
    +	DeviceNotSupported
    +}
    +
    +func init() {
    +	t["DigestNotSupported"] = reflect.TypeOf((*DigestNotSupported)(nil)).Elem()
    +}
    +
    +type DigestNotSupportedFault DigestNotSupported
    +
    +func init() {
    +	t["DigestNotSupportedFault"] = reflect.TypeOf((*DigestNotSupportedFault)(nil)).Elem()
    +}
    +
    +type DirectoryNotEmpty struct {
    +	FileFault
    +}
    +
    +func init() {
    +	t["DirectoryNotEmpty"] = reflect.TypeOf((*DirectoryNotEmpty)(nil)).Elem()
    +}
    +
    +type DirectoryNotEmptyFault DirectoryNotEmpty
    +
    +func init() {
    +	t["DirectoryNotEmptyFault"] = reflect.TypeOf((*DirectoryNotEmptyFault)(nil)).Elem()
    +}
    +
    +type DisableAdminNotSupported struct {
    +	HostConfigFault
    +}
    +
    +func init() {
    +	t["DisableAdminNotSupported"] = reflect.TypeOf((*DisableAdminNotSupported)(nil)).Elem()
    +}
    +
    +type DisableAdminNotSupportedFault DisableAdminNotSupported
    +
    +func init() {
    +	t["DisableAdminNotSupportedFault"] = reflect.TypeOf((*DisableAdminNotSupportedFault)(nil)).Elem()
    +}
    +
    +type DisableEvcModeRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["DisableEvcModeRequestType"] = reflect.TypeOf((*DisableEvcModeRequestType)(nil)).Elem()
    +}
    +
    +type DisableEvcMode_Task DisableEvcModeRequestType
    +
    +func init() {
    +	t["DisableEvcMode_Task"] = reflect.TypeOf((*DisableEvcMode_Task)(nil)).Elem()
    +}
    +
    +type DisableEvcMode_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type DisableFeature DisableFeatureRequestType
    +
    +func init() {
    +	t["DisableFeature"] = reflect.TypeOf((*DisableFeature)(nil)).Elem()
    +}
    +
    +type DisableFeatureRequestType struct {
    +	This       ManagedObjectReference  `xml:"_this"`
    +	Host       *ManagedObjectReference `xml:"host,omitempty"`
    +	FeatureKey string                  `xml:"featureKey"`
    +}
    +
    +func init() {
    +	t["DisableFeatureRequestType"] = reflect.TypeOf((*DisableFeatureRequestType)(nil)).Elem()
    +}
    +
    +type DisableFeatureResponse struct {
    +	Returnval bool `xml:"returnval"`
    +}
    +
    +type DisableHyperThreading DisableHyperThreadingRequestType
    +
    +func init() {
    +	t["DisableHyperThreading"] = reflect.TypeOf((*DisableHyperThreading)(nil)).Elem()
    +}
    +
    +type DisableHyperThreadingRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["DisableHyperThreadingRequestType"] = reflect.TypeOf((*DisableHyperThreadingRequestType)(nil)).Elem()
    +}
    +
    +type DisableHyperThreadingResponse struct {
    +}
    +
    +type DisableMultipathPath DisableMultipathPathRequestType
    +
    +func init() {
    +	t["DisableMultipathPath"] = reflect.TypeOf((*DisableMultipathPath)(nil)).Elem()
    +}
    +
    +type DisableMultipathPathRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	PathName string                 `xml:"pathName"`
    +}
    +
    +func init() {
    +	t["DisableMultipathPathRequestType"] = reflect.TypeOf((*DisableMultipathPathRequestType)(nil)).Elem()
    +}
    +
    +type DisableMultipathPathResponse struct {
    +}
    +
    +type DisableRuleset DisableRulesetRequestType
    +
    +func init() {
    +	t["DisableRuleset"] = reflect.TypeOf((*DisableRuleset)(nil)).Elem()
    +}
    +
    +type DisableRulesetRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Id   string                 `xml:"id"`
    +}
    +
    +func init() {
    +	t["DisableRulesetRequestType"] = reflect.TypeOf((*DisableRulesetRequestType)(nil)).Elem()
    +}
    +
    +type DisableRulesetResponse struct {
    +}
    +
    +type DisableSecondaryVMRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Vm   ManagedObjectReference `xml:"vm"`
    +}
    +
    +func init() {
    +	t["DisableSecondaryVMRequestType"] = reflect.TypeOf((*DisableSecondaryVMRequestType)(nil)).Elem()
    +}
    +
    +type DisableSecondaryVM_Task DisableSecondaryVMRequestType
    +
    +func init() {
    +	t["DisableSecondaryVM_Task"] = reflect.TypeOf((*DisableSecondaryVM_Task)(nil)).Elem()
    +}
    +
    +type DisableSecondaryVM_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type DisableSmartCardAuthentication DisableSmartCardAuthenticationRequestType
    +
    +func init() {
    +	t["DisableSmartCardAuthentication"] = reflect.TypeOf((*DisableSmartCardAuthentication)(nil)).Elem()
    +}
    +
    +type DisableSmartCardAuthenticationRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["DisableSmartCardAuthenticationRequestType"] = reflect.TypeOf((*DisableSmartCardAuthenticationRequestType)(nil)).Elem()
    +}
    +
    +type DisableSmartCardAuthenticationResponse struct {
    +}
    +
    +type DisallowedChangeByService struct {
    +	RuntimeFault
    +
    +	ServiceName      string `xml:"serviceName"`
    +	DisallowedChange string `xml:"disallowedChange,omitempty"`
    +}
    +
    +func init() {
    +	t["DisallowedChangeByService"] = reflect.TypeOf((*DisallowedChangeByService)(nil)).Elem()
    +}
    +
    +type DisallowedChangeByServiceFault DisallowedChangeByService
    +
    +func init() {
    +	t["DisallowedChangeByServiceFault"] = reflect.TypeOf((*DisallowedChangeByServiceFault)(nil)).Elem()
    +}
    +
    +type DisallowedDiskModeChange struct {
    +	InvalidDeviceSpec
    +}
    +
    +func init() {
    +	t["DisallowedDiskModeChange"] = reflect.TypeOf((*DisallowedDiskModeChange)(nil)).Elem()
    +}
    +
    +type DisallowedDiskModeChangeFault DisallowedDiskModeChange
    +
    +func init() {
    +	t["DisallowedDiskModeChangeFault"] = reflect.TypeOf((*DisallowedDiskModeChangeFault)(nil)).Elem()
    +}
    +
    +type DisallowedMigrationDeviceAttached struct {
    +	MigrationFault
    +
    +	Fault LocalizedMethodFault `xml:"fault"`
    +}
    +
    +func init() {
    +	t["DisallowedMigrationDeviceAttached"] = reflect.TypeOf((*DisallowedMigrationDeviceAttached)(nil)).Elem()
    +}
    +
    +type DisallowedMigrationDeviceAttachedFault DisallowedMigrationDeviceAttached
    +
    +func init() {
    +	t["DisallowedMigrationDeviceAttachedFault"] = reflect.TypeOf((*DisallowedMigrationDeviceAttachedFault)(nil)).Elem()
    +}
    +
    +type DisallowedOperationOnFailoverHost struct {
    +	RuntimeFault
    +
    +	Host     ManagedObjectReference `xml:"host"`
    +	Hostname string                 `xml:"hostname"`
    +}
    +
    +func init() {
    +	t["DisallowedOperationOnFailoverHost"] = reflect.TypeOf((*DisallowedOperationOnFailoverHost)(nil)).Elem()
    +}
    +
    +type DisallowedOperationOnFailoverHostFault DisallowedOperationOnFailoverHost
    +
    +func init() {
    +	t["DisallowedOperationOnFailoverHostFault"] = reflect.TypeOf((*DisallowedOperationOnFailoverHostFault)(nil)).Elem()
    +}
    +
    +type DisconnectHostRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["DisconnectHostRequestType"] = reflect.TypeOf((*DisconnectHostRequestType)(nil)).Elem()
    +}
    +
    +type DisconnectHost_Task DisconnectHostRequestType
    +
    +func init() {
    +	t["DisconnectHost_Task"] = reflect.TypeOf((*DisconnectHost_Task)(nil)).Elem()
    +}
    +
    +type DisconnectHost_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type DisconnectedHostsBlockingEVC struct {
    +	EVCConfigFault
    +}
    +
    +func init() {
    +	t["DisconnectedHostsBlockingEVC"] = reflect.TypeOf((*DisconnectedHostsBlockingEVC)(nil)).Elem()
    +}
    +
    +type DisconnectedHostsBlockingEVCFault DisconnectedHostsBlockingEVC
    +
    +func init() {
    +	t["DisconnectedHostsBlockingEVCFault"] = reflect.TypeOf((*DisconnectedHostsBlockingEVCFault)(nil)).Elem()
    +}
    +
    +type DiscoverFcoeHbas DiscoverFcoeHbasRequestType
    +
    +func init() {
    +	t["DiscoverFcoeHbas"] = reflect.TypeOf((*DiscoverFcoeHbas)(nil)).Elem()
    +}
    +
    +type DiscoverFcoeHbasRequestType struct {
    +	This     ManagedObjectReference      `xml:"_this"`
    +	FcoeSpec FcoeConfigFcoeSpecification `xml:"fcoeSpec"`
    +}
    +
    +func init() {
    +	t["DiscoverFcoeHbasRequestType"] = reflect.TypeOf((*DiscoverFcoeHbasRequestType)(nil)).Elem()
    +}
    +
    +type DiscoverFcoeHbasResponse struct {
    +}
    +
    +type DiskChangeExtent struct {
    +	DynamicData
    +
    +	Start  int64 `xml:"start"`
    +	Length int64 `xml:"length"`
    +}
    +
    +func init() {
    +	t["DiskChangeExtent"] = reflect.TypeOf((*DiskChangeExtent)(nil)).Elem()
    +}
    +
    +type DiskChangeInfo struct {
    +	DynamicData
    +
    +	StartOffset int64              `xml:"startOffset"`
    +	Length      int64              `xml:"length"`
    +	ChangedArea []DiskChangeExtent `xml:"changedArea,omitempty"`
    +}
    +
    +func init() {
    +	t["DiskChangeInfo"] = reflect.TypeOf((*DiskChangeInfo)(nil)).Elem()
    +}
    +
    +type DiskHasPartitions struct {
    +	VsanDiskFault
    +}
    +
    +func init() {
    +	t["DiskHasPartitions"] = reflect.TypeOf((*DiskHasPartitions)(nil)).Elem()
    +}
    +
    +type DiskHasPartitionsFault DiskHasPartitions
    +
    +func init() {
    +	t["DiskHasPartitionsFault"] = reflect.TypeOf((*DiskHasPartitionsFault)(nil)).Elem()
    +}
    +
    +type DiskIsLastRemainingNonSSD struct {
    +	VsanDiskFault
    +}
    +
    +func init() {
    +	t["DiskIsLastRemainingNonSSD"] = reflect.TypeOf((*DiskIsLastRemainingNonSSD)(nil)).Elem()
    +}
    +
    +type DiskIsLastRemainingNonSSDFault DiskIsLastRemainingNonSSD
    +
    +func init() {
    +	t["DiskIsLastRemainingNonSSDFault"] = reflect.TypeOf((*DiskIsLastRemainingNonSSDFault)(nil)).Elem()
    +}
    +
    +type DiskIsNonLocal struct {
    +	VsanDiskFault
    +}
    +
    +func init() {
    +	t["DiskIsNonLocal"] = reflect.TypeOf((*DiskIsNonLocal)(nil)).Elem()
    +}
    +
    +type DiskIsNonLocalFault DiskIsNonLocal
    +
    +func init() {
    +	t["DiskIsNonLocalFault"] = reflect.TypeOf((*DiskIsNonLocalFault)(nil)).Elem()
    +}
    +
    +type DiskIsUSB struct {
    +	VsanDiskFault
    +}
    +
    +func init() {
    +	t["DiskIsUSB"] = reflect.TypeOf((*DiskIsUSB)(nil)).Elem()
    +}
    +
    +type DiskIsUSBFault DiskIsUSB
    +
    +func init() {
    +	t["DiskIsUSBFault"] = reflect.TypeOf((*DiskIsUSBFault)(nil)).Elem()
    +}
    +
    +type DiskMoveTypeNotSupported struct {
    +	MigrationFault
    +}
    +
    +func init() {
    +	t["DiskMoveTypeNotSupported"] = reflect.TypeOf((*DiskMoveTypeNotSupported)(nil)).Elem()
    +}
    +
    +type DiskMoveTypeNotSupportedFault DiskMoveTypeNotSupported
    +
    +func init() {
    +	t["DiskMoveTypeNotSupportedFault"] = reflect.TypeOf((*DiskMoveTypeNotSupportedFault)(nil)).Elem()
    +}
    +
    +type DiskNotSupported struct {
    +	VirtualHardwareCompatibilityIssue
    +
    +	Disk int32 `xml:"disk"`
    +}
    +
    +func init() {
    +	t["DiskNotSupported"] = reflect.TypeOf((*DiskNotSupported)(nil)).Elem()
    +}
    +
    +type DiskNotSupportedFault BaseDiskNotSupported
    +
    +func init() {
    +	t["DiskNotSupportedFault"] = reflect.TypeOf((*DiskNotSupportedFault)(nil)).Elem()
    +}
    +
    +type DiskTooSmall struct {
    +	VsanDiskFault
    +}
    +
    +func init() {
    +	t["DiskTooSmall"] = reflect.TypeOf((*DiskTooSmall)(nil)).Elem()
    +}
    +
    +type DiskTooSmallFault DiskTooSmall
    +
    +func init() {
    +	t["DiskTooSmallFault"] = reflect.TypeOf((*DiskTooSmallFault)(nil)).Elem()
    +}
    +
    +type DissociateProfile DissociateProfileRequestType
    +
    +func init() {
    +	t["DissociateProfile"] = reflect.TypeOf((*DissociateProfile)(nil)).Elem()
    +}
    +
    +type DissociateProfileRequestType struct {
    +	This   ManagedObjectReference   `xml:"_this"`
    +	Entity []ManagedObjectReference `xml:"entity,omitempty"`
    +}
    +
    +func init() {
    +	t["DissociateProfileRequestType"] = reflect.TypeOf((*DissociateProfileRequestType)(nil)).Elem()
    +}
    +
    +type DissociateProfileResponse struct {
    +}
    +
    +type DistributedVirtualPort struct {
    +	DynamicData
    +
    +	Key              string                                 `xml:"key"`
    +	Config           DVPortConfigInfo                       `xml:"config"`
    +	DvsUuid          string                                 `xml:"dvsUuid"`
    +	PortgroupKey     string                                 `xml:"portgroupKey,omitempty"`
    +	ProxyHost        *ManagedObjectReference                `xml:"proxyHost,omitempty"`
    +	Connectee        *DistributedVirtualSwitchPortConnectee `xml:"connectee,omitempty"`
    +	Conflict         bool                                   `xml:"conflict"`
    +	ConflictPortKey  string                                 `xml:"conflictPortKey,omitempty"`
    +	State            *DVPortState                           `xml:"state,omitempty"`
    +	ConnectionCookie int32                                  `xml:"connectionCookie,omitempty"`
    +	LastStatusChange time.Time                              `xml:"lastStatusChange"`
    +	HostLocalPort    *bool                                  `xml:"hostLocalPort"`
    +}
    +
    +func init() {
    +	t["DistributedVirtualPort"] = reflect.TypeOf((*DistributedVirtualPort)(nil)).Elem()
    +}
    +
    +type DistributedVirtualPortgroupInfo struct {
    +	DynamicData
    +
    +	SwitchName                  string                 `xml:"switchName"`
    +	SwitchUuid                  string                 `xml:"switchUuid"`
    +	PortgroupName               string                 `xml:"portgroupName"`
    +	PortgroupKey                string                 `xml:"portgroupKey"`
    +	PortgroupType               string                 `xml:"portgroupType"`
    +	UplinkPortgroup             bool                   `xml:"uplinkPortgroup"`
    +	Portgroup                   ManagedObjectReference `xml:"portgroup"`
    +	NetworkReservationSupported *bool                  `xml:"networkReservationSupported"`
    +}
    +
    +func init() {
    +	t["DistributedVirtualPortgroupInfo"] = reflect.TypeOf((*DistributedVirtualPortgroupInfo)(nil)).Elem()
    +}
    +
    +type DistributedVirtualSwitchHostMember struct {
    +	DynamicData
    +
    +	RuntimeState  *DistributedVirtualSwitchHostMemberRuntimeState `xml:"runtimeState,omitempty"`
    +	Config        DistributedVirtualSwitchHostMemberConfigInfo    `xml:"config"`
    +	ProductInfo   *DistributedVirtualSwitchProductSpec            `xml:"productInfo,omitempty"`
    +	UplinkPortKey []string                                        `xml:"uplinkPortKey,omitempty"`
    +	Status        string                                          `xml:"status"`
    +	StatusDetail  string                                          `xml:"statusDetail,omitempty"`
    +}
    +
    +func init() {
    +	t["DistributedVirtualSwitchHostMember"] = reflect.TypeOf((*DistributedVirtualSwitchHostMember)(nil)).Elem()
    +}
    +
    +type DistributedVirtualSwitchHostMemberBacking struct {
    +	DynamicData
    +}
    +
    +func init() {
    +	t["DistributedVirtualSwitchHostMemberBacking"] = reflect.TypeOf((*DistributedVirtualSwitchHostMemberBacking)(nil)).Elem()
    +}
    +
    +type DistributedVirtualSwitchHostMemberConfigInfo struct {
    +	DynamicData
    +
    +	Host                 *ManagedObjectReference                       `xml:"host,omitempty"`
    +	MaxProxySwitchPorts  int32                                         `xml:"maxProxySwitchPorts"`
    +	VendorSpecificConfig []DistributedVirtualSwitchKeyedOpaqueBlob     `xml:"vendorSpecificConfig,omitempty"`
    +	Backing              BaseDistributedVirtualSwitchHostMemberBacking `xml:"backing,typeattr"`
    +}
    +
    +func init() {
    +	t["DistributedVirtualSwitchHostMemberConfigInfo"] = reflect.TypeOf((*DistributedVirtualSwitchHostMemberConfigInfo)(nil)).Elem()
    +}
    +
    +type DistributedVirtualSwitchHostMemberConfigSpec struct {
    +	DynamicData
    +
    +	Operation            string                                        `xml:"operation"`
    +	Host                 ManagedObjectReference                        `xml:"host"`
    +	Backing              BaseDistributedVirtualSwitchHostMemberBacking `xml:"backing,omitempty,typeattr"`
    +	MaxProxySwitchPorts  int32                                         `xml:"maxProxySwitchPorts,omitempty"`
    +	VendorSpecificConfig []DistributedVirtualSwitchKeyedOpaqueBlob     `xml:"vendorSpecificConfig,omitempty"`
    +}
    +
    +func init() {
    +	t["DistributedVirtualSwitchHostMemberConfigSpec"] = reflect.TypeOf((*DistributedVirtualSwitchHostMemberConfigSpec)(nil)).Elem()
    +}
    +
    +type DistributedVirtualSwitchHostMemberPnicBacking struct {
    +	DistributedVirtualSwitchHostMemberBacking
    +
    +	PnicSpec []DistributedVirtualSwitchHostMemberPnicSpec `xml:"pnicSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["DistributedVirtualSwitchHostMemberPnicBacking"] = reflect.TypeOf((*DistributedVirtualSwitchHostMemberPnicBacking)(nil)).Elem()
    +}
    +
    +type DistributedVirtualSwitchHostMemberPnicSpec struct {
    +	DynamicData
    +
    +	PnicDevice         string `xml:"pnicDevice"`
    +	UplinkPortKey      string `xml:"uplinkPortKey,omitempty"`
    +	UplinkPortgroupKey string `xml:"uplinkPortgroupKey,omitempty"`
    +	ConnectionCookie   int32  `xml:"connectionCookie,omitempty"`
    +}
    +
    +func init() {
    +	t["DistributedVirtualSwitchHostMemberPnicSpec"] = reflect.TypeOf((*DistributedVirtualSwitchHostMemberPnicSpec)(nil)).Elem()
    +}
    +
    +type DistributedVirtualSwitchHostMemberRuntimeState struct {
    +	DynamicData
    +
    +	CurrentMaxProxySwitchPorts int32 `xml:"currentMaxProxySwitchPorts"`
    +}
    +
    +func init() {
    +	t["DistributedVirtualSwitchHostMemberRuntimeState"] = reflect.TypeOf((*DistributedVirtualSwitchHostMemberRuntimeState)(nil)).Elem()
    +}
    +
    +type DistributedVirtualSwitchHostProductSpec struct {
    +	DynamicData
    +
    +	ProductLineId string `xml:"productLineId,omitempty"`
    +	Version       string `xml:"version,omitempty"`
    +}
    +
    +func init() {
    +	t["DistributedVirtualSwitchHostProductSpec"] = reflect.TypeOf((*DistributedVirtualSwitchHostProductSpec)(nil)).Elem()
    +}
    +
    +type DistributedVirtualSwitchInfo struct {
    +	DynamicData
    +
    +	SwitchName                  string                 `xml:"switchName"`
    +	SwitchUuid                  string                 `xml:"switchUuid"`
    +	DistributedVirtualSwitch    ManagedObjectReference `xml:"distributedVirtualSwitch"`
    +	NetworkReservationSupported *bool                  `xml:"networkReservationSupported"`
    +}
    +
    +func init() {
    +	t["DistributedVirtualSwitchInfo"] = reflect.TypeOf((*DistributedVirtualSwitchInfo)(nil)).Elem()
    +}
    +
    +type DistributedVirtualSwitchKeyedOpaqueBlob struct {
    +	DynamicData
    +
    +	Key        string `xml:"key"`
    +	OpaqueData string `xml:"opaqueData"`
    +}
    +
    +func init() {
    +	t["DistributedVirtualSwitchKeyedOpaqueBlob"] = reflect.TypeOf((*DistributedVirtualSwitchKeyedOpaqueBlob)(nil)).Elem()
    +}
    +
    +type DistributedVirtualSwitchManagerCompatibilityResult struct {
    +	DynamicData
    +
    +	Host  ManagedObjectReference `xml:"host"`
    +	Error []LocalizedMethodFault `xml:"error,omitempty"`
    +}
    +
    +func init() {
    +	t["DistributedVirtualSwitchManagerCompatibilityResult"] = reflect.TypeOf((*DistributedVirtualSwitchManagerCompatibilityResult)(nil)).Elem()
    +}
    +
    +type DistributedVirtualSwitchManagerDvsProductSpec struct {
    +	DynamicData
    +
    +	NewSwitchProductSpec     *DistributedVirtualSwitchProductSpec `xml:"newSwitchProductSpec,omitempty"`
    +	DistributedVirtualSwitch *ManagedObjectReference              `xml:"distributedVirtualSwitch,omitempty"`
    +}
    +
    +func init() {
    +	t["DistributedVirtualSwitchManagerDvsProductSpec"] = reflect.TypeOf((*DistributedVirtualSwitchManagerDvsProductSpec)(nil)).Elem()
    +}
    +
    +type DistributedVirtualSwitchManagerHostArrayFilter struct {
    +	DistributedVirtualSwitchManagerHostDvsFilterSpec
    +
    +	Host []ManagedObjectReference `xml:"host"`
    +}
    +
    +func init() {
    +	t["DistributedVirtualSwitchManagerHostArrayFilter"] = reflect.TypeOf((*DistributedVirtualSwitchManagerHostArrayFilter)(nil)).Elem()
    +}
    +
    +type DistributedVirtualSwitchManagerHostContainer struct {
    +	DynamicData
    +
    +	Container ManagedObjectReference `xml:"container"`
    +	Recursive bool                   `xml:"recursive"`
    +}
    +
    +func init() {
    +	t["DistributedVirtualSwitchManagerHostContainer"] = reflect.TypeOf((*DistributedVirtualSwitchManagerHostContainer)(nil)).Elem()
    +}
    +
    +type DistributedVirtualSwitchManagerHostContainerFilter struct {
    +	DistributedVirtualSwitchManagerHostDvsFilterSpec
    +
    +	HostContainer DistributedVirtualSwitchManagerHostContainer `xml:"hostContainer"`
    +}
    +
    +func init() {
    +	t["DistributedVirtualSwitchManagerHostContainerFilter"] = reflect.TypeOf((*DistributedVirtualSwitchManagerHostContainerFilter)(nil)).Elem()
    +}
    +
    +type DistributedVirtualSwitchManagerHostDvsFilterSpec struct {
    +	DynamicData
    +
    +	Inclusive bool `xml:"inclusive"`
    +}
    +
    +func init() {
    +	t["DistributedVirtualSwitchManagerHostDvsFilterSpec"] = reflect.TypeOf((*DistributedVirtualSwitchManagerHostDvsFilterSpec)(nil)).Elem()
    +}
    +
    +type DistributedVirtualSwitchManagerHostDvsMembershipFilter struct {
    +	DistributedVirtualSwitchManagerHostDvsFilterSpec
    +
    +	DistributedVirtualSwitch ManagedObjectReference `xml:"distributedVirtualSwitch"`
    +}
    +
    +func init() {
    +	t["DistributedVirtualSwitchManagerHostDvsMembershipFilter"] = reflect.TypeOf((*DistributedVirtualSwitchManagerHostDvsMembershipFilter)(nil)).Elem()
    +}
    +
    +type DistributedVirtualSwitchManagerImportResult struct {
    +	DynamicData
    +
    +	DistributedVirtualSwitch    []ManagedObjectReference                `xml:"distributedVirtualSwitch,omitempty"`
    +	DistributedVirtualPortgroup []ManagedObjectReference                `xml:"distributedVirtualPortgroup,omitempty"`
    +	ImportFault                 []ImportOperationBulkFaultFaultOnImport `xml:"importFault,omitempty"`
    +}
    +
    +func init() {
    +	t["DistributedVirtualSwitchManagerImportResult"] = reflect.TypeOf((*DistributedVirtualSwitchManagerImportResult)(nil)).Elem()
    +}
    +
    +type DistributedVirtualSwitchPortConnectee struct {
    +	DynamicData
    +
    +	ConnectedEntity *ManagedObjectReference `xml:"connectedEntity,omitempty"`
    +	NicKey          string                  `xml:"nicKey,omitempty"`
    +	Type            string                  `xml:"type,omitempty"`
    +	AddressHint     string                  `xml:"addressHint,omitempty"`
    +}
    +
    +func init() {
    +	t["DistributedVirtualSwitchPortConnectee"] = reflect.TypeOf((*DistributedVirtualSwitchPortConnectee)(nil)).Elem()
    +}
    +
    +type DistributedVirtualSwitchPortConnection struct {
    +	DynamicData
    +
    +	SwitchUuid       string `xml:"switchUuid"`
    +	PortgroupKey     string `xml:"portgroupKey,omitempty"`
    +	PortKey          string `xml:"portKey,omitempty"`
    +	ConnectionCookie int32  `xml:"connectionCookie,omitempty"`
    +}
    +
    +func init() {
    +	t["DistributedVirtualSwitchPortConnection"] = reflect.TypeOf((*DistributedVirtualSwitchPortConnection)(nil)).Elem()
    +}
    +
    +type DistributedVirtualSwitchPortCriteria struct {
    +	DynamicData
    +
    +	Connected    *bool                    `xml:"connected"`
    +	Active       *bool                    `xml:"active"`
    +	UplinkPort   *bool                    `xml:"uplinkPort"`
    +	Scope        *ManagedObjectReference  `xml:"scope,omitempty"`
    +	PortgroupKey []string                 `xml:"portgroupKey,omitempty"`
    +	Inside       *bool                    `xml:"inside"`
    +	PortKey      []string                 `xml:"portKey,omitempty"`
    +	Host         []ManagedObjectReference `xml:"host,omitempty"`
    +}
    +
    +func init() {
    +	t["DistributedVirtualSwitchPortCriteria"] = reflect.TypeOf((*DistributedVirtualSwitchPortCriteria)(nil)).Elem()
    +}
    +
    +type DistributedVirtualSwitchPortStatistics struct {
    +	DynamicData
    +
    +	PacketsInMulticast  int64 `xml:"packetsInMulticast"`
    +	PacketsOutMulticast int64 `xml:"packetsOutMulticast"`
    +	BytesInMulticast    int64 `xml:"bytesInMulticast"`
    +	BytesOutMulticast   int64 `xml:"bytesOutMulticast"`
    +	PacketsInUnicast    int64 `xml:"packetsInUnicast"`
    +	PacketsOutUnicast   int64 `xml:"packetsOutUnicast"`
    +	BytesInUnicast      int64 `xml:"bytesInUnicast"`
    +	BytesOutUnicast     int64 `xml:"bytesOutUnicast"`
    +	PacketsInBroadcast  int64 `xml:"packetsInBroadcast"`
    +	PacketsOutBroadcast int64 `xml:"packetsOutBroadcast"`
    +	BytesInBroadcast    int64 `xml:"bytesInBroadcast"`
    +	BytesOutBroadcast   int64 `xml:"bytesOutBroadcast"`
    +	PacketsInDropped    int64 `xml:"packetsInDropped"`
    +	PacketsOutDropped   int64 `xml:"packetsOutDropped"`
    +	PacketsInException  int64 `xml:"packetsInException"`
    +	PacketsOutException int64 `xml:"packetsOutException"`
    +	BytesInFromPnic     int64 `xml:"bytesInFromPnic,omitempty"`
    +	BytesOutToPnic      int64 `xml:"bytesOutToPnic,omitempty"`
    +}
    +
    +func init() {
    +	t["DistributedVirtualSwitchPortStatistics"] = reflect.TypeOf((*DistributedVirtualSwitchPortStatistics)(nil)).Elem()
    +}
    +
    +type DistributedVirtualSwitchProductSpec struct {
    +	DynamicData
    +
    +	Name            string `xml:"name,omitempty"`
    +	Vendor          string `xml:"vendor,omitempty"`
    +	Version         string `xml:"version,omitempty"`
    +	Build           string `xml:"build,omitempty"`
    +	ForwardingClass string `xml:"forwardingClass,omitempty"`
    +	BundleId        string `xml:"bundleId,omitempty"`
    +	BundleUrl       string `xml:"bundleUrl,omitempty"`
    +}
    +
    +func init() {
    +	t["DistributedVirtualSwitchProductSpec"] = reflect.TypeOf((*DistributedVirtualSwitchProductSpec)(nil)).Elem()
    +}
    +
    +type DoesCustomizationSpecExist DoesCustomizationSpecExistRequestType
    +
    +func init() {
    +	t["DoesCustomizationSpecExist"] = reflect.TypeOf((*DoesCustomizationSpecExist)(nil)).Elem()
    +}
    +
    +type DoesCustomizationSpecExistRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Name string                 `xml:"name"`
    +}
    +
    +func init() {
    +	t["DoesCustomizationSpecExistRequestType"] = reflect.TypeOf((*DoesCustomizationSpecExistRequestType)(nil)).Elem()
    +}
    +
    +type DoesCustomizationSpecExistResponse struct {
    +	Returnval bool `xml:"returnval"`
    +}
    +
    +type DomainNotFound struct {
    +	ActiveDirectoryFault
    +
    +	DomainName string `xml:"domainName"`
    +}
    +
    +func init() {
    +	t["DomainNotFound"] = reflect.TypeOf((*DomainNotFound)(nil)).Elem()
    +}
    +
    +type DomainNotFoundFault DomainNotFound
    +
    +func init() {
    +	t["DomainNotFoundFault"] = reflect.TypeOf((*DomainNotFoundFault)(nil)).Elem()
    +}
    +
    +type DrsDisabledEvent struct {
    +	ClusterEvent
    +}
    +
    +func init() {
    +	t["DrsDisabledEvent"] = reflect.TypeOf((*DrsDisabledEvent)(nil)).Elem()
    +}
    +
    +type DrsDisabledOnVm struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["DrsDisabledOnVm"] = reflect.TypeOf((*DrsDisabledOnVm)(nil)).Elem()
    +}
    +
    +type DrsDisabledOnVmFault DrsDisabledOnVm
    +
    +func init() {
    +	t["DrsDisabledOnVmFault"] = reflect.TypeOf((*DrsDisabledOnVmFault)(nil)).Elem()
    +}
    +
    +type DrsEnabledEvent struct {
    +	ClusterEvent
    +
    +	Behavior string `xml:"behavior"`
    +}
    +
    +func init() {
    +	t["DrsEnabledEvent"] = reflect.TypeOf((*DrsEnabledEvent)(nil)).Elem()
    +}
    +
    +type DrsEnteredStandbyModeEvent struct {
    +	EnteredStandbyModeEvent
    +}
    +
    +func init() {
    +	t["DrsEnteredStandbyModeEvent"] = reflect.TypeOf((*DrsEnteredStandbyModeEvent)(nil)).Elem()
    +}
    +
    +type DrsEnteringStandbyModeEvent struct {
    +	EnteringStandbyModeEvent
    +}
    +
    +func init() {
    +	t["DrsEnteringStandbyModeEvent"] = reflect.TypeOf((*DrsEnteringStandbyModeEvent)(nil)).Elem()
    +}
    +
    +type DrsExitStandbyModeFailedEvent struct {
    +	ExitStandbyModeFailedEvent
    +}
    +
    +func init() {
    +	t["DrsExitStandbyModeFailedEvent"] = reflect.TypeOf((*DrsExitStandbyModeFailedEvent)(nil)).Elem()
    +}
    +
    +type DrsExitedStandbyModeEvent struct {
    +	ExitedStandbyModeEvent
    +}
    +
    +func init() {
    +	t["DrsExitedStandbyModeEvent"] = reflect.TypeOf((*DrsExitedStandbyModeEvent)(nil)).Elem()
    +}
    +
    +type DrsExitingStandbyModeEvent struct {
    +	ExitingStandbyModeEvent
    +}
    +
    +func init() {
    +	t["DrsExitingStandbyModeEvent"] = reflect.TypeOf((*DrsExitingStandbyModeEvent)(nil)).Elem()
    +}
    +
    +type DrsInvocationFailedEvent struct {
    +	ClusterEvent
    +}
    +
    +func init() {
    +	t["DrsInvocationFailedEvent"] = reflect.TypeOf((*DrsInvocationFailedEvent)(nil)).Elem()
    +}
    +
    +type DrsRecoveredFromFailureEvent struct {
    +	ClusterEvent
    +}
    +
    +func init() {
    +	t["DrsRecoveredFromFailureEvent"] = reflect.TypeOf((*DrsRecoveredFromFailureEvent)(nil)).Elem()
    +}
    +
    +type DrsResourceConfigureFailedEvent struct {
    +	HostEvent
    +
    +	Reason LocalizedMethodFault `xml:"reason"`
    +}
    +
    +func init() {
    +	t["DrsResourceConfigureFailedEvent"] = reflect.TypeOf((*DrsResourceConfigureFailedEvent)(nil)).Elem()
    +}
    +
    +type DrsResourceConfigureSyncedEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["DrsResourceConfigureSyncedEvent"] = reflect.TypeOf((*DrsResourceConfigureSyncedEvent)(nil)).Elem()
    +}
    +
    +type DrsRuleComplianceEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["DrsRuleComplianceEvent"] = reflect.TypeOf((*DrsRuleComplianceEvent)(nil)).Elem()
    +}
    +
    +type DrsRuleViolationEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["DrsRuleViolationEvent"] = reflect.TypeOf((*DrsRuleViolationEvent)(nil)).Elem()
    +}
    +
    +type DrsSoftRuleViolationEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["DrsSoftRuleViolationEvent"] = reflect.TypeOf((*DrsSoftRuleViolationEvent)(nil)).Elem()
    +}
    +
    +type DrsVmMigratedEvent struct {
    +	VmMigratedEvent
    +}
    +
    +func init() {
    +	t["DrsVmMigratedEvent"] = reflect.TypeOf((*DrsVmMigratedEvent)(nil)).Elem()
    +}
    +
    +type DrsVmPoweredOnEvent struct {
    +	VmPoweredOnEvent
    +}
    +
    +func init() {
    +	t["DrsVmPoweredOnEvent"] = reflect.TypeOf((*DrsVmPoweredOnEvent)(nil)).Elem()
    +}
    +
    +type DrsVmotionIncompatibleFault struct {
    +	VirtualHardwareCompatibilityIssue
    +
    +	Host ManagedObjectReference `xml:"host"`
    +}
    +
    +func init() {
    +	t["DrsVmotionIncompatibleFault"] = reflect.TypeOf((*DrsVmotionIncompatibleFault)(nil)).Elem()
    +}
    +
    +type DrsVmotionIncompatibleFaultFault DrsVmotionIncompatibleFault
    +
    +func init() {
    +	t["DrsVmotionIncompatibleFaultFault"] = reflect.TypeOf((*DrsVmotionIncompatibleFaultFault)(nil)).Elem()
    +}
    +
    +type DuplicateCustomizationSpec DuplicateCustomizationSpecRequestType
    +
    +func init() {
    +	t["DuplicateCustomizationSpec"] = reflect.TypeOf((*DuplicateCustomizationSpec)(nil)).Elem()
    +}
    +
    +type DuplicateCustomizationSpecRequestType struct {
    +	This    ManagedObjectReference `xml:"_this"`
    +	Name    string                 `xml:"name"`
    +	NewName string                 `xml:"newName"`
    +}
    +
    +func init() {
    +	t["DuplicateCustomizationSpecRequestType"] = reflect.TypeOf((*DuplicateCustomizationSpecRequestType)(nil)).Elem()
    +}
    +
    +type DuplicateCustomizationSpecResponse struct {
    +}
    +
    +type DuplicateDisks struct {
    +	VsanDiskFault
    +}
    +
    +func init() {
    +	t["DuplicateDisks"] = reflect.TypeOf((*DuplicateDisks)(nil)).Elem()
    +}
    +
    +type DuplicateDisksFault DuplicateDisks
    +
    +func init() {
    +	t["DuplicateDisksFault"] = reflect.TypeOf((*DuplicateDisksFault)(nil)).Elem()
    +}
    +
    +type DuplicateIpDetectedEvent struct {
    +	HostEvent
    +
    +	DuplicateIP string `xml:"duplicateIP"`
    +	MacAddress  string `xml:"macAddress"`
    +}
    +
    +func init() {
    +	t["DuplicateIpDetectedEvent"] = reflect.TypeOf((*DuplicateIpDetectedEvent)(nil)).Elem()
    +}
    +
    +type DuplicateName struct {
    +	VimFault
    +
    +	Name   string                 `xml:"name"`
    +	Object ManagedObjectReference `xml:"object"`
    +}
    +
    +func init() {
    +	t["DuplicateName"] = reflect.TypeOf((*DuplicateName)(nil)).Elem()
    +}
    +
    +type DuplicateNameFault DuplicateName
    +
    +func init() {
    +	t["DuplicateNameFault"] = reflect.TypeOf((*DuplicateNameFault)(nil)).Elem()
    +}
    +
    +type DuplicateVsanNetworkInterface struct {
    +	VsanFault
    +
    +	Device string `xml:"device"`
    +}
    +
    +func init() {
    +	t["DuplicateVsanNetworkInterface"] = reflect.TypeOf((*DuplicateVsanNetworkInterface)(nil)).Elem()
    +}
    +
    +type DuplicateVsanNetworkInterfaceFault DuplicateVsanNetworkInterface
    +
    +func init() {
    +	t["DuplicateVsanNetworkInterfaceFault"] = reflect.TypeOf((*DuplicateVsanNetworkInterfaceFault)(nil)).Elem()
    +}
    +
    +type DvpgImportEvent struct {
    +	DVPortgroupEvent
    +
    +	ImportType string `xml:"importType"`
    +}
    +
    +func init() {
    +	t["DvpgImportEvent"] = reflect.TypeOf((*DvpgImportEvent)(nil)).Elem()
    +}
    +
    +type DvpgRestoreEvent struct {
    +	DVPortgroupEvent
    +}
    +
    +func init() {
    +	t["DvpgRestoreEvent"] = reflect.TypeOf((*DvpgRestoreEvent)(nil)).Elem()
    +}
    +
    +type DvsAcceptNetworkRuleAction struct {
    +	DvsNetworkRuleAction
    +}
    +
    +func init() {
    +	t["DvsAcceptNetworkRuleAction"] = reflect.TypeOf((*DvsAcceptNetworkRuleAction)(nil)).Elem()
    +}
    +
    +type DvsApplyOperationFault struct {
    +	DvsFault
    +
    +	ObjectFault []DvsApplyOperationFaultFaultOnObject `xml:"objectFault"`
    +}
    +
    +func init() {
    +	t["DvsApplyOperationFault"] = reflect.TypeOf((*DvsApplyOperationFault)(nil)).Elem()
    +}
    +
    +type DvsApplyOperationFaultFault DvsApplyOperationFault
    +
    +func init() {
    +	t["DvsApplyOperationFaultFault"] = reflect.TypeOf((*DvsApplyOperationFaultFault)(nil)).Elem()
    +}
    +
    +type DvsApplyOperationFaultFaultOnObject struct {
    +	DynamicData
    +
    +	ObjectId string               `xml:"objectId"`
    +	Type     string               `xml:"type"`
    +	Fault    LocalizedMethodFault `xml:"fault"`
    +}
    +
    +func init() {
    +	t["DvsApplyOperationFaultFaultOnObject"] = reflect.TypeOf((*DvsApplyOperationFaultFaultOnObject)(nil)).Elem()
    +}
    +
    +type DvsCopyNetworkRuleAction struct {
    +	DvsNetworkRuleAction
    +}
    +
    +func init() {
    +	t["DvsCopyNetworkRuleAction"] = reflect.TypeOf((*DvsCopyNetworkRuleAction)(nil)).Elem()
    +}
    +
    +type DvsCreatedEvent struct {
    +	DvsEvent
    +
    +	Parent FolderEventArgument `xml:"parent"`
    +}
    +
    +func init() {
    +	t["DvsCreatedEvent"] = reflect.TypeOf((*DvsCreatedEvent)(nil)).Elem()
    +}
    +
    +type DvsDestroyedEvent struct {
    +	DvsEvent
    +}
    +
    +func init() {
    +	t["DvsDestroyedEvent"] = reflect.TypeOf((*DvsDestroyedEvent)(nil)).Elem()
    +}
    +
    +type DvsDropNetworkRuleAction struct {
    +	DvsNetworkRuleAction
    +}
    +
    +func init() {
    +	t["DvsDropNetworkRuleAction"] = reflect.TypeOf((*DvsDropNetworkRuleAction)(nil)).Elem()
    +}
    +
    +type DvsEvent struct {
    +	Event
    +}
    +
    +func init() {
    +	t["DvsEvent"] = reflect.TypeOf((*DvsEvent)(nil)).Elem()
    +}
    +
    +type DvsEventArgument struct {
    +	EntityEventArgument
    +
    +	Dvs ManagedObjectReference `xml:"dvs"`
    +}
    +
    +func init() {
    +	t["DvsEventArgument"] = reflect.TypeOf((*DvsEventArgument)(nil)).Elem()
    +}
    +
    +type DvsFault struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["DvsFault"] = reflect.TypeOf((*DvsFault)(nil)).Elem()
    +}
    +
    +type DvsFaultFault BaseDvsFault
    +
    +func init() {
    +	t["DvsFaultFault"] = reflect.TypeOf((*DvsFaultFault)(nil)).Elem()
    +}
    +
    +type DvsFilterConfig struct {
    +	InheritablePolicy
    +
    +	Key        string              `xml:"key,omitempty"`
    +	AgentName  string              `xml:"agentName,omitempty"`
    +	SlotNumber string              `xml:"slotNumber,omitempty"`
    +	Parameters *DvsFilterParameter `xml:"parameters,omitempty"`
    +	OnFailure  string              `xml:"onFailure,omitempty"`
    +}
    +
    +func init() {
    +	t["DvsFilterConfig"] = reflect.TypeOf((*DvsFilterConfig)(nil)).Elem()
    +}
    +
    +type DvsFilterConfigSpec struct {
    +	DvsFilterConfig
    +
    +	Operation string `xml:"operation"`
    +}
    +
    +func init() {
    +	t["DvsFilterConfigSpec"] = reflect.TypeOf((*DvsFilterConfigSpec)(nil)).Elem()
    +}
    +
    +type DvsFilterParameter struct {
    +	DynamicData
    +
    +	Parameters []string `xml:"parameters,omitempty"`
    +}
    +
    +func init() {
    +	t["DvsFilterParameter"] = reflect.TypeOf((*DvsFilterParameter)(nil)).Elem()
    +}
    +
    +type DvsFilterPolicy struct {
    +	InheritablePolicy
    +
    +	FilterConfig []BaseDvsFilterConfig `xml:"filterConfig,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["DvsFilterPolicy"] = reflect.TypeOf((*DvsFilterPolicy)(nil)).Elem()
    +}
    +
    +type DvsGreEncapNetworkRuleAction struct {
    +	DvsNetworkRuleAction
    +
    +	EncapsulationIp SingleIp `xml:"encapsulationIp"`
    +}
    +
    +func init() {
    +	t["DvsGreEncapNetworkRuleAction"] = reflect.TypeOf((*DvsGreEncapNetworkRuleAction)(nil)).Elem()
    +}
    +
    +type DvsHealthStatusChangeEvent struct {
    +	HostEvent
    +
    +	SwitchUuid   string                          `xml:"switchUuid"`
    +	HealthResult BaseHostMemberHealthCheckResult `xml:"healthResult,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["DvsHealthStatusChangeEvent"] = reflect.TypeOf((*DvsHealthStatusChangeEvent)(nil)).Elem()
    +}
    +
    +type DvsHostBackInSyncEvent struct {
    +	DvsEvent
    +
    +	HostBackInSync HostEventArgument `xml:"hostBackInSync"`
    +}
    +
    +func init() {
    +	t["DvsHostBackInSyncEvent"] = reflect.TypeOf((*DvsHostBackInSyncEvent)(nil)).Elem()
    +}
    +
    +type DvsHostInfrastructureTrafficResource struct {
    +	DynamicData
    +
    +	Key            string                                         `xml:"key"`
    +	Description    string                                         `xml:"description,omitempty"`
    +	AllocationInfo DvsHostInfrastructureTrafficResourceAllocation `xml:"allocationInfo"`
    +}
    +
    +func init() {
    +	t["DvsHostInfrastructureTrafficResource"] = reflect.TypeOf((*DvsHostInfrastructureTrafficResource)(nil)).Elem()
    +}
    +
    +type DvsHostInfrastructureTrafficResourceAllocation struct {
    +	DynamicData
    +
    +	Limit       *int64      `xml:"limit"`
    +	Shares      *SharesInfo `xml:"shares,omitempty"`
    +	Reservation *int64      `xml:"reservation"`
    +}
    +
    +func init() {
    +	t["DvsHostInfrastructureTrafficResourceAllocation"] = reflect.TypeOf((*DvsHostInfrastructureTrafficResourceAllocation)(nil)).Elem()
    +}
    +
    +type DvsHostJoinedEvent struct {
    +	DvsEvent
    +
    +	HostJoined HostEventArgument `xml:"hostJoined"`
    +}
    +
    +func init() {
    +	t["DvsHostJoinedEvent"] = reflect.TypeOf((*DvsHostJoinedEvent)(nil)).Elem()
    +}
    +
    +type DvsHostLeftEvent struct {
    +	DvsEvent
    +
    +	HostLeft HostEventArgument `xml:"hostLeft"`
    +}
    +
    +func init() {
    +	t["DvsHostLeftEvent"] = reflect.TypeOf((*DvsHostLeftEvent)(nil)).Elem()
    +}
    +
    +type DvsHostStatusUpdated struct {
    +	DvsEvent
    +
    +	HostMember      HostEventArgument `xml:"hostMember"`
    +	OldStatus       string            `xml:"oldStatus,omitempty"`
    +	NewStatus       string            `xml:"newStatus,omitempty"`
    +	OldStatusDetail string            `xml:"oldStatusDetail,omitempty"`
    +	NewStatusDetail string            `xml:"newStatusDetail,omitempty"`
    +}
    +
    +func init() {
    +	t["DvsHostStatusUpdated"] = reflect.TypeOf((*DvsHostStatusUpdated)(nil)).Elem()
    +}
    +
    +type DvsHostVNicProfile struct {
    +	DvsVNicProfile
    +}
    +
    +func init() {
    +	t["DvsHostVNicProfile"] = reflect.TypeOf((*DvsHostVNicProfile)(nil)).Elem()
    +}
    +
    +type DvsHostWentOutOfSyncEvent struct {
    +	DvsEvent
    +
    +	HostOutOfSync DvsOutOfSyncHostArgument `xml:"hostOutOfSync"`
    +}
    +
    +func init() {
    +	t["DvsHostWentOutOfSyncEvent"] = reflect.TypeOf((*DvsHostWentOutOfSyncEvent)(nil)).Elem()
    +}
    +
    +type DvsImportEvent struct {
    +	DvsEvent
    +
    +	ImportType string `xml:"importType"`
    +}
    +
    +func init() {
    +	t["DvsImportEvent"] = reflect.TypeOf((*DvsImportEvent)(nil)).Elem()
    +}
    +
    +type DvsIpNetworkRuleQualifier struct {
    +	DvsNetworkRuleQualifier
    +
    +	SourceAddress      BaseIpAddress  `xml:"sourceAddress,omitempty,typeattr"`
    +	DestinationAddress BaseIpAddress  `xml:"destinationAddress,omitempty,typeattr"`
    +	Protocol           *IntExpression `xml:"protocol,omitempty"`
    +	SourceIpPort       BaseDvsIpPort  `xml:"sourceIpPort,omitempty,typeattr"`
    +	DestinationIpPort  BaseDvsIpPort  `xml:"destinationIpPort,omitempty,typeattr"`
    +	TcpFlags           *IntExpression `xml:"tcpFlags,omitempty"`
    +}
    +
    +func init() {
    +	t["DvsIpNetworkRuleQualifier"] = reflect.TypeOf((*DvsIpNetworkRuleQualifier)(nil)).Elem()
    +}
    +
    +type DvsIpPort struct {
    +	NegatableExpression
    +}
    +
    +func init() {
    +	t["DvsIpPort"] = reflect.TypeOf((*DvsIpPort)(nil)).Elem()
    +}
    +
    +type DvsIpPortRange struct {
    +	DvsIpPort
    +
    +	StartPortNumber int32 `xml:"startPortNumber"`
    +	EndPortNumber   int32 `xml:"endPortNumber"`
    +}
    +
    +func init() {
    +	t["DvsIpPortRange"] = reflect.TypeOf((*DvsIpPortRange)(nil)).Elem()
    +}
    +
    +type DvsLogNetworkRuleAction struct {
    +	DvsNetworkRuleAction
    +}
    +
    +func init() {
    +	t["DvsLogNetworkRuleAction"] = reflect.TypeOf((*DvsLogNetworkRuleAction)(nil)).Elem()
    +}
    +
    +type DvsMacNetworkRuleQualifier struct {
    +	DvsNetworkRuleQualifier
    +
    +	SourceAddress      BaseMacAddress `xml:"sourceAddress,omitempty,typeattr"`
    +	DestinationAddress BaseMacAddress `xml:"destinationAddress,omitempty,typeattr"`
    +	Protocol           *IntExpression `xml:"protocol,omitempty"`
    +	VlanId             *IntExpression `xml:"vlanId,omitempty"`
    +}
    +
    +func init() {
    +	t["DvsMacNetworkRuleQualifier"] = reflect.TypeOf((*DvsMacNetworkRuleQualifier)(nil)).Elem()
    +}
    +
    +type DvsMacRewriteNetworkRuleAction struct {
    +	DvsNetworkRuleAction
    +
    +	RewriteMac string `xml:"rewriteMac"`
    +}
    +
    +func init() {
    +	t["DvsMacRewriteNetworkRuleAction"] = reflect.TypeOf((*DvsMacRewriteNetworkRuleAction)(nil)).Elem()
    +}
    +
    +type DvsMergedEvent struct {
    +	DvsEvent
    +
    +	SourceDvs      DvsEventArgument `xml:"sourceDvs"`
    +	DestinationDvs DvsEventArgument `xml:"destinationDvs"`
    +}
    +
    +func init() {
    +	t["DvsMergedEvent"] = reflect.TypeOf((*DvsMergedEvent)(nil)).Elem()
    +}
    +
    +type DvsNetworkRuleAction struct {
    +	DynamicData
    +}
    +
    +func init() {
    +	t["DvsNetworkRuleAction"] = reflect.TypeOf((*DvsNetworkRuleAction)(nil)).Elem()
    +}
    +
    +type DvsNetworkRuleQualifier struct {
    +	DynamicData
    +
    +	Key string `xml:"key,omitempty"`
    +}
    +
    +func init() {
    +	t["DvsNetworkRuleQualifier"] = reflect.TypeOf((*DvsNetworkRuleQualifier)(nil)).Elem()
    +}
    +
    +type DvsNotAuthorized struct {
    +	DvsFault
    +
    +	SessionExtensionKey string `xml:"sessionExtensionKey,omitempty"`
    +	DvsExtensionKey     string `xml:"dvsExtensionKey,omitempty"`
    +}
    +
    +func init() {
    +	t["DvsNotAuthorized"] = reflect.TypeOf((*DvsNotAuthorized)(nil)).Elem()
    +}
    +
    +type DvsNotAuthorizedFault DvsNotAuthorized
    +
    +func init() {
    +	t["DvsNotAuthorizedFault"] = reflect.TypeOf((*DvsNotAuthorizedFault)(nil)).Elem()
    +}
    +
    +type DvsOperationBulkFault struct {
    +	DvsFault
    +
    +	HostFault []DvsOperationBulkFaultFaultOnHost `xml:"hostFault"`
    +}
    +
    +func init() {
    +	t["DvsOperationBulkFault"] = reflect.TypeOf((*DvsOperationBulkFault)(nil)).Elem()
    +}
    +
    +type DvsOperationBulkFaultFault DvsOperationBulkFault
    +
    +func init() {
    +	t["DvsOperationBulkFaultFault"] = reflect.TypeOf((*DvsOperationBulkFaultFault)(nil)).Elem()
    +}
    +
    +type DvsOperationBulkFaultFaultOnHost struct {
    +	DynamicData
    +
    +	Host  ManagedObjectReference `xml:"host"`
    +	Fault LocalizedMethodFault   `xml:"fault"`
    +}
    +
    +func init() {
    +	t["DvsOperationBulkFaultFaultOnHost"] = reflect.TypeOf((*DvsOperationBulkFaultFaultOnHost)(nil)).Elem()
    +}
    +
    +type DvsOutOfSyncHostArgument struct {
    +	DynamicData
    +
    +	OutOfSyncHost   HostEventArgument `xml:"outOfSyncHost"`
    +	ConfigParamters []string          `xml:"configParamters"`
    +}
    +
    +func init() {
    +	t["DvsOutOfSyncHostArgument"] = reflect.TypeOf((*DvsOutOfSyncHostArgument)(nil)).Elem()
    +}
    +
    +type DvsPortBlockedEvent struct {
    +	DvsEvent
    +
    +	PortKey        string        `xml:"portKey"`
    +	StatusDetail   string        `xml:"statusDetail,omitempty"`
    +	RuntimeInfo    *DVPortStatus `xml:"runtimeInfo,omitempty"`
    +	PrevBlockState string        `xml:"prevBlockState,omitempty"`
    +}
    +
    +func init() {
    +	t["DvsPortBlockedEvent"] = reflect.TypeOf((*DvsPortBlockedEvent)(nil)).Elem()
    +}
    +
    +type DvsPortConnectedEvent struct {
    +	DvsEvent
    +
    +	PortKey   string                                 `xml:"portKey"`
    +	Connectee *DistributedVirtualSwitchPortConnectee `xml:"connectee,omitempty"`
    +}
    +
    +func init() {
    +	t["DvsPortConnectedEvent"] = reflect.TypeOf((*DvsPortConnectedEvent)(nil)).Elem()
    +}
    +
    +type DvsPortCreatedEvent struct {
    +	DvsEvent
    +
    +	PortKey []string `xml:"portKey"`
    +}
    +
    +func init() {
    +	t["DvsPortCreatedEvent"] = reflect.TypeOf((*DvsPortCreatedEvent)(nil)).Elem()
    +}
    +
    +type DvsPortDeletedEvent struct {
    +	DvsEvent
    +
    +	PortKey []string `xml:"portKey"`
    +}
    +
    +func init() {
    +	t["DvsPortDeletedEvent"] = reflect.TypeOf((*DvsPortDeletedEvent)(nil)).Elem()
    +}
    +
    +type DvsPortDisconnectedEvent struct {
    +	DvsEvent
    +
    +	PortKey   string                                 `xml:"portKey"`
    +	Connectee *DistributedVirtualSwitchPortConnectee `xml:"connectee,omitempty"`
    +}
    +
    +func init() {
    +	t["DvsPortDisconnectedEvent"] = reflect.TypeOf((*DvsPortDisconnectedEvent)(nil)).Elem()
    +}
    +
    +type DvsPortEnteredPassthruEvent struct {
    +	DvsEvent
    +
    +	PortKey     string        `xml:"portKey"`
    +	RuntimeInfo *DVPortStatus `xml:"runtimeInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["DvsPortEnteredPassthruEvent"] = reflect.TypeOf((*DvsPortEnteredPassthruEvent)(nil)).Elem()
    +}
    +
    +type DvsPortExitedPassthruEvent struct {
    +	DvsEvent
    +
    +	PortKey     string        `xml:"portKey"`
    +	RuntimeInfo *DVPortStatus `xml:"runtimeInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["DvsPortExitedPassthruEvent"] = reflect.TypeOf((*DvsPortExitedPassthruEvent)(nil)).Elem()
    +}
    +
    +type DvsPortJoinPortgroupEvent struct {
    +	DvsEvent
    +
    +	PortKey       string `xml:"portKey"`
    +	PortgroupKey  string `xml:"portgroupKey"`
    +	PortgroupName string `xml:"portgroupName"`
    +}
    +
    +func init() {
    +	t["DvsPortJoinPortgroupEvent"] = reflect.TypeOf((*DvsPortJoinPortgroupEvent)(nil)).Elem()
    +}
    +
    +type DvsPortLeavePortgroupEvent struct {
    +	DvsEvent
    +
    +	PortKey       string `xml:"portKey"`
    +	PortgroupKey  string `xml:"portgroupKey"`
    +	PortgroupName string `xml:"portgroupName"`
    +}
    +
    +func init() {
    +	t["DvsPortLeavePortgroupEvent"] = reflect.TypeOf((*DvsPortLeavePortgroupEvent)(nil)).Elem()
    +}
    +
    +type DvsPortLinkDownEvent struct {
    +	DvsEvent
    +
    +	PortKey     string        `xml:"portKey"`
    +	RuntimeInfo *DVPortStatus `xml:"runtimeInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["DvsPortLinkDownEvent"] = reflect.TypeOf((*DvsPortLinkDownEvent)(nil)).Elem()
    +}
    +
    +type DvsPortLinkUpEvent struct {
    +	DvsEvent
    +
    +	PortKey     string        `xml:"portKey"`
    +	RuntimeInfo *DVPortStatus `xml:"runtimeInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["DvsPortLinkUpEvent"] = reflect.TypeOf((*DvsPortLinkUpEvent)(nil)).Elem()
    +}
    +
    +type DvsPortReconfiguredEvent struct {
    +	DvsEvent
    +
    +	PortKey       []string                   `xml:"portKey"`
    +	ConfigChanges []ChangesInfoEventArgument `xml:"configChanges,omitempty"`
    +}
    +
    +func init() {
    +	t["DvsPortReconfiguredEvent"] = reflect.TypeOf((*DvsPortReconfiguredEvent)(nil)).Elem()
    +}
    +
    +type DvsPortRuntimeChangeEvent struct {
    +	DvsEvent
    +
    +	PortKey     string       `xml:"portKey"`
    +	RuntimeInfo DVPortStatus `xml:"runtimeInfo"`
    +}
    +
    +func init() {
    +	t["DvsPortRuntimeChangeEvent"] = reflect.TypeOf((*DvsPortRuntimeChangeEvent)(nil)).Elem()
    +}
    +
    +type DvsPortUnblockedEvent struct {
    +	DvsEvent
    +
    +	PortKey        string        `xml:"portKey"`
    +	RuntimeInfo    *DVPortStatus `xml:"runtimeInfo,omitempty"`
    +	PrevBlockState string        `xml:"prevBlockState,omitempty"`
    +}
    +
    +func init() {
    +	t["DvsPortUnblockedEvent"] = reflect.TypeOf((*DvsPortUnblockedEvent)(nil)).Elem()
    +}
    +
    +type DvsPortVendorSpecificStateChangeEvent struct {
    +	DvsEvent
    +
    +	PortKey string `xml:"portKey"`
    +}
    +
    +func init() {
    +	t["DvsPortVendorSpecificStateChangeEvent"] = reflect.TypeOf((*DvsPortVendorSpecificStateChangeEvent)(nil)).Elem()
    +}
    +
    +type DvsProfile struct {
    +	ApplyProfile
    +
    +	Key    string              `xml:"key"`
    +	Name   string              `xml:"name"`
    +	Uplink []PnicUplinkProfile `xml:"uplink,omitempty"`
    +}
    +
    +func init() {
    +	t["DvsProfile"] = reflect.TypeOf((*DvsProfile)(nil)).Elem()
    +}
    +
    +type DvsPuntNetworkRuleAction struct {
    +	DvsNetworkRuleAction
    +}
    +
    +func init() {
    +	t["DvsPuntNetworkRuleAction"] = reflect.TypeOf((*DvsPuntNetworkRuleAction)(nil)).Elem()
    +}
    +
    +type DvsRateLimitNetworkRuleAction struct {
    +	DvsNetworkRuleAction
    +
    +	PacketsPerSecond int32 `xml:"packetsPerSecond"`
    +}
    +
    +func init() {
    +	t["DvsRateLimitNetworkRuleAction"] = reflect.TypeOf((*DvsRateLimitNetworkRuleAction)(nil)).Elem()
    +}
    +
    +type DvsReconfigureVmVnicNetworkResourcePoolRequestType struct {
    +	This       ManagedObjectReference            `xml:"_this"`
    +	ConfigSpec []DvsVmVnicResourcePoolConfigSpec `xml:"configSpec"`
    +}
    +
    +func init() {
    +	t["DvsReconfigureVmVnicNetworkResourcePoolRequestType"] = reflect.TypeOf((*DvsReconfigureVmVnicNetworkResourcePoolRequestType)(nil)).Elem()
    +}
    +
    +type DvsReconfigureVmVnicNetworkResourcePool_Task DvsReconfigureVmVnicNetworkResourcePoolRequestType
    +
    +func init() {
    +	t["DvsReconfigureVmVnicNetworkResourcePool_Task"] = reflect.TypeOf((*DvsReconfigureVmVnicNetworkResourcePool_Task)(nil)).Elem()
    +}
    +
    +type DvsReconfigureVmVnicNetworkResourcePool_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type DvsReconfiguredEvent struct {
    +	DvsEvent
    +
    +	ConfigSpec    BaseDVSConfigSpec         `xml:"configSpec,typeattr"`
    +	ConfigChanges *ChangesInfoEventArgument `xml:"configChanges,omitempty"`
    +}
    +
    +func init() {
    +	t["DvsReconfiguredEvent"] = reflect.TypeOf((*DvsReconfiguredEvent)(nil)).Elem()
    +}
    +
    +type DvsRenamedEvent struct {
    +	DvsEvent
    +
    +	OldName string `xml:"oldName"`
    +	NewName string `xml:"newName"`
    +}
    +
    +func init() {
    +	t["DvsRenamedEvent"] = reflect.TypeOf((*DvsRenamedEvent)(nil)).Elem()
    +}
    +
    +type DvsResourceRuntimeInfo struct {
    +	DynamicData
    +
    +	Capacity                         int32                                     `xml:"capacity,omitempty"`
    +	Usage                            int32                                     `xml:"usage,omitempty"`
    +	Available                        int32                                     `xml:"available,omitempty"`
    +	AllocatedResource                []DvsVnicAllocatedResource                `xml:"allocatedResource,omitempty"`
    +	VmVnicNetworkResourcePoolRuntime []DvsVmVnicNetworkResourcePoolRuntimeInfo `xml:"vmVnicNetworkResourcePoolRuntime,omitempty"`
    +}
    +
    +func init() {
    +	t["DvsResourceRuntimeInfo"] = reflect.TypeOf((*DvsResourceRuntimeInfo)(nil)).Elem()
    +}
    +
    +type DvsRestoreEvent struct {
    +	DvsEvent
    +}
    +
    +func init() {
    +	t["DvsRestoreEvent"] = reflect.TypeOf((*DvsRestoreEvent)(nil)).Elem()
    +}
    +
    +type DvsScopeViolated struct {
    +	DvsFault
    +
    +	Scope  []ManagedObjectReference `xml:"scope"`
    +	Entity ManagedObjectReference   `xml:"entity"`
    +}
    +
    +func init() {
    +	t["DvsScopeViolated"] = reflect.TypeOf((*DvsScopeViolated)(nil)).Elem()
    +}
    +
    +type DvsScopeViolatedFault DvsScopeViolated
    +
    +func init() {
    +	t["DvsScopeViolatedFault"] = reflect.TypeOf((*DvsScopeViolatedFault)(nil)).Elem()
    +}
    +
    +type DvsServiceConsoleVNicProfile struct {
    +	DvsVNicProfile
    +}
    +
    +func init() {
    +	t["DvsServiceConsoleVNicProfile"] = reflect.TypeOf((*DvsServiceConsoleVNicProfile)(nil)).Elem()
    +}
    +
    +type DvsSingleIpPort struct {
    +	DvsIpPort
    +
    +	PortNumber int32 `xml:"portNumber"`
    +}
    +
    +func init() {
    +	t["DvsSingleIpPort"] = reflect.TypeOf((*DvsSingleIpPort)(nil)).Elem()
    +}
    +
    +type DvsSystemTrafficNetworkRuleQualifier struct {
    +	DvsNetworkRuleQualifier
    +
    +	TypeOfSystemTraffic *StringExpression `xml:"typeOfSystemTraffic,omitempty"`
    +}
    +
    +func init() {
    +	t["DvsSystemTrafficNetworkRuleQualifier"] = reflect.TypeOf((*DvsSystemTrafficNetworkRuleQualifier)(nil)).Elem()
    +}
    +
    +type DvsTrafficFilterConfig struct {
    +	DvsFilterConfig
    +
    +	TrafficRuleset *DvsTrafficRuleset `xml:"trafficRuleset,omitempty"`
    +}
    +
    +func init() {
    +	t["DvsTrafficFilterConfig"] = reflect.TypeOf((*DvsTrafficFilterConfig)(nil)).Elem()
    +}
    +
    +type DvsTrafficFilterConfigSpec struct {
    +	DvsTrafficFilterConfig
    +
    +	Operation string `xml:"operation"`
    +}
    +
    +func init() {
    +	t["DvsTrafficFilterConfigSpec"] = reflect.TypeOf((*DvsTrafficFilterConfigSpec)(nil)).Elem()
    +}
    +
    +type DvsTrafficRule struct {
    +	DynamicData
    +
    +	Key         string                        `xml:"key,omitempty"`
    +	Description string                        `xml:"description,omitempty"`
    +	Sequence    int32                         `xml:"sequence,omitempty"`
    +	Qualifier   []BaseDvsNetworkRuleQualifier `xml:"qualifier,omitempty,typeattr"`
    +	Action      BaseDvsNetworkRuleAction      `xml:"action,omitempty,typeattr"`
    +	Direction   string                        `xml:"direction,omitempty"`
    +}
    +
    +func init() {
    +	t["DvsTrafficRule"] = reflect.TypeOf((*DvsTrafficRule)(nil)).Elem()
    +}
    +
    +type DvsTrafficRuleset struct {
    +	DynamicData
    +
    +	Key        string           `xml:"key,omitempty"`
    +	Enabled    *bool            `xml:"enabled"`
    +	Precedence int32            `xml:"precedence,omitempty"`
    +	Rules      []DvsTrafficRule `xml:"rules,omitempty"`
    +}
    +
    +func init() {
    +	t["DvsTrafficRuleset"] = reflect.TypeOf((*DvsTrafficRuleset)(nil)).Elem()
    +}
    +
    +type DvsUpdateTagNetworkRuleAction struct {
    +	DvsNetworkRuleAction
    +
    +	QosTag  int32 `xml:"qosTag,omitempty"`
    +	DscpTag int32 `xml:"dscpTag,omitempty"`
    +}
    +
    +func init() {
    +	t["DvsUpdateTagNetworkRuleAction"] = reflect.TypeOf((*DvsUpdateTagNetworkRuleAction)(nil)).Elem()
    +}
    +
    +type DvsUpgradeAvailableEvent struct {
    +	DvsEvent
    +
    +	ProductInfo DistributedVirtualSwitchProductSpec `xml:"productInfo"`
    +}
    +
    +func init() {
    +	t["DvsUpgradeAvailableEvent"] = reflect.TypeOf((*DvsUpgradeAvailableEvent)(nil)).Elem()
    +}
    +
    +type DvsUpgradeInProgressEvent struct {
    +	DvsEvent
    +
    +	ProductInfo DistributedVirtualSwitchProductSpec `xml:"productInfo"`
    +}
    +
    +func init() {
    +	t["DvsUpgradeInProgressEvent"] = reflect.TypeOf((*DvsUpgradeInProgressEvent)(nil)).Elem()
    +}
    +
    +type DvsUpgradeRejectedEvent struct {
    +	DvsEvent
    +
    +	ProductInfo DistributedVirtualSwitchProductSpec `xml:"productInfo"`
    +}
    +
    +func init() {
    +	t["DvsUpgradeRejectedEvent"] = reflect.TypeOf((*DvsUpgradeRejectedEvent)(nil)).Elem()
    +}
    +
    +type DvsUpgradedEvent struct {
    +	DvsEvent
    +
    +	ProductInfo DistributedVirtualSwitchProductSpec `xml:"productInfo"`
    +}
    +
    +func init() {
    +	t["DvsUpgradedEvent"] = reflect.TypeOf((*DvsUpgradedEvent)(nil)).Elem()
    +}
    +
    +type DvsVNicProfile struct {
    +	ApplyProfile
    +
    +	Key      string           `xml:"key"`
    +	IpConfig IpAddressProfile `xml:"ipConfig"`
    +}
    +
    +func init() {
    +	t["DvsVNicProfile"] = reflect.TypeOf((*DvsVNicProfile)(nil)).Elem()
    +}
    +
    +type DvsVmVnicNetworkResourcePoolRuntimeInfo struct {
    +	DynamicData
    +
    +	Key               string                     `xml:"key"`
    +	Name              string                     `xml:"name,omitempty"`
    +	Capacity          int32                      `xml:"capacity,omitempty"`
    +	Usage             int32                      `xml:"usage,omitempty"`
    +	Available         int32                      `xml:"available,omitempty"`
    +	Status            string                     `xml:"status"`
    +	AllocatedResource []DvsVnicAllocatedResource `xml:"allocatedResource,omitempty"`
    +}
    +
    +func init() {
    +	t["DvsVmVnicNetworkResourcePoolRuntimeInfo"] = reflect.TypeOf((*DvsVmVnicNetworkResourcePoolRuntimeInfo)(nil)).Elem()
    +}
    +
    +type DvsVmVnicResourceAllocation struct {
    +	DynamicData
    +
    +	ReservationQuota int64 `xml:"reservationQuota,omitempty"`
    +}
    +
    +func init() {
    +	t["DvsVmVnicResourceAllocation"] = reflect.TypeOf((*DvsVmVnicResourceAllocation)(nil)).Elem()
    +}
    +
    +type DvsVmVnicResourcePoolConfigSpec struct {
    +	DynamicData
    +
    +	Operation      string                       `xml:"operation"`
    +	Key            string                       `xml:"key,omitempty"`
    +	ConfigVersion  string                       `xml:"configVersion,omitempty"`
    +	AllocationInfo *DvsVmVnicResourceAllocation `xml:"allocationInfo,omitempty"`
    +	Name           string                       `xml:"name,omitempty"`
    +	Description    string                       `xml:"description,omitempty"`
    +}
    +
    +func init() {
    +	t["DvsVmVnicResourcePoolConfigSpec"] = reflect.TypeOf((*DvsVmVnicResourcePoolConfigSpec)(nil)).Elem()
    +}
    +
    +type DvsVnicAllocatedResource struct {
    +	DynamicData
    +
    +	Vm          ManagedObjectReference `xml:"vm"`
    +	VnicKey     string                 `xml:"vnicKey"`
    +	Reservation *int64                 `xml:"reservation"`
    +}
    +
    +func init() {
    +	t["DvsVnicAllocatedResource"] = reflect.TypeOf((*DvsVnicAllocatedResource)(nil)).Elem()
    +}
    +
    +type DynamicArray struct {
    +	Val []AnyType `xml:"val,typeattr"`
    +}
    +
    +func init() {
    +	t["DynamicArray"] = reflect.TypeOf((*DynamicArray)(nil)).Elem()
    +}
    +
    +type DynamicData struct {
    +}
    +
    +func init() {
    +	t["DynamicData"] = reflect.TypeOf((*DynamicData)(nil)).Elem()
    +}
    +
    +type DynamicProperty struct {
    +	Name string  `xml:"name"`
    +	Val  AnyType `xml:"val,typeattr"`
    +}
    +
    +func init() {
    +	t["DynamicProperty"] = reflect.TypeOf((*DynamicProperty)(nil)).Elem()
    +}
    +
    +type EVCAdmissionFailed struct {
    +	NotSupportedHostInCluster
    +
    +	Faults []LocalizedMethodFault `xml:"faults,omitempty"`
    +}
    +
    +func init() {
    +	t["EVCAdmissionFailed"] = reflect.TypeOf((*EVCAdmissionFailed)(nil)).Elem()
    +}
    +
    +type EVCAdmissionFailedCPUFeaturesForMode struct {
    +	EVCAdmissionFailed
    +
    +	CurrentEVCModeKey string `xml:"currentEVCModeKey"`
    +}
    +
    +func init() {
    +	t["EVCAdmissionFailedCPUFeaturesForMode"] = reflect.TypeOf((*EVCAdmissionFailedCPUFeaturesForMode)(nil)).Elem()
    +}
    +
    +type EVCAdmissionFailedCPUFeaturesForModeFault EVCAdmissionFailedCPUFeaturesForMode
    +
    +func init() {
    +	t["EVCAdmissionFailedCPUFeaturesForModeFault"] = reflect.TypeOf((*EVCAdmissionFailedCPUFeaturesForModeFault)(nil)).Elem()
    +}
    +
    +type EVCAdmissionFailedCPUModel struct {
    +	EVCAdmissionFailed
    +}
    +
    +func init() {
    +	t["EVCAdmissionFailedCPUModel"] = reflect.TypeOf((*EVCAdmissionFailedCPUModel)(nil)).Elem()
    +}
    +
    +type EVCAdmissionFailedCPUModelFault EVCAdmissionFailedCPUModel
    +
    +func init() {
    +	t["EVCAdmissionFailedCPUModelFault"] = reflect.TypeOf((*EVCAdmissionFailedCPUModelFault)(nil)).Elem()
    +}
    +
    +type EVCAdmissionFailedCPUModelForMode struct {
    +	EVCAdmissionFailed
    +
    +	CurrentEVCModeKey string `xml:"currentEVCModeKey"`
    +}
    +
    +func init() {
    +	t["EVCAdmissionFailedCPUModelForMode"] = reflect.TypeOf((*EVCAdmissionFailedCPUModelForMode)(nil)).Elem()
    +}
    +
    +type EVCAdmissionFailedCPUModelForModeFault EVCAdmissionFailedCPUModelForMode
    +
    +func init() {
    +	t["EVCAdmissionFailedCPUModelForModeFault"] = reflect.TypeOf((*EVCAdmissionFailedCPUModelForModeFault)(nil)).Elem()
    +}
    +
    +type EVCAdmissionFailedCPUVendor struct {
    +	EVCAdmissionFailed
    +
    +	ClusterCPUVendor string `xml:"clusterCPUVendor"`
    +	HostCPUVendor    string `xml:"hostCPUVendor"`
    +}
    +
    +func init() {
    +	t["EVCAdmissionFailedCPUVendor"] = reflect.TypeOf((*EVCAdmissionFailedCPUVendor)(nil)).Elem()
    +}
    +
    +type EVCAdmissionFailedCPUVendorFault EVCAdmissionFailedCPUVendor
    +
    +func init() {
    +	t["EVCAdmissionFailedCPUVendorFault"] = reflect.TypeOf((*EVCAdmissionFailedCPUVendorFault)(nil)).Elem()
    +}
    +
    +type EVCAdmissionFailedCPUVendorUnknown struct {
    +	EVCAdmissionFailed
    +}
    +
    +func init() {
    +	t["EVCAdmissionFailedCPUVendorUnknown"] = reflect.TypeOf((*EVCAdmissionFailedCPUVendorUnknown)(nil)).Elem()
    +}
    +
    +type EVCAdmissionFailedCPUVendorUnknownFault EVCAdmissionFailedCPUVendorUnknown
    +
    +func init() {
    +	t["EVCAdmissionFailedCPUVendorUnknownFault"] = reflect.TypeOf((*EVCAdmissionFailedCPUVendorUnknownFault)(nil)).Elem()
    +}
    +
    +type EVCAdmissionFailedFault BaseEVCAdmissionFailed
    +
    +func init() {
    +	t["EVCAdmissionFailedFault"] = reflect.TypeOf((*EVCAdmissionFailedFault)(nil)).Elem()
    +}
    +
    +type EVCAdmissionFailedHostDisconnected struct {
    +	EVCAdmissionFailed
    +}
    +
    +func init() {
    +	t["EVCAdmissionFailedHostDisconnected"] = reflect.TypeOf((*EVCAdmissionFailedHostDisconnected)(nil)).Elem()
    +}
    +
    +type EVCAdmissionFailedHostDisconnectedFault EVCAdmissionFailedHostDisconnected
    +
    +func init() {
    +	t["EVCAdmissionFailedHostDisconnectedFault"] = reflect.TypeOf((*EVCAdmissionFailedHostDisconnectedFault)(nil)).Elem()
    +}
    +
    +type EVCAdmissionFailedHostSoftware struct {
    +	EVCAdmissionFailed
    +}
    +
    +func init() {
    +	t["EVCAdmissionFailedHostSoftware"] = reflect.TypeOf((*EVCAdmissionFailedHostSoftware)(nil)).Elem()
    +}
    +
    +type EVCAdmissionFailedHostSoftwareFault EVCAdmissionFailedHostSoftware
    +
    +func init() {
    +	t["EVCAdmissionFailedHostSoftwareFault"] = reflect.TypeOf((*EVCAdmissionFailedHostSoftwareFault)(nil)).Elem()
    +}
    +
    +type EVCAdmissionFailedHostSoftwareForMode struct {
    +	EVCAdmissionFailed
    +}
    +
    +func init() {
    +	t["EVCAdmissionFailedHostSoftwareForMode"] = reflect.TypeOf((*EVCAdmissionFailedHostSoftwareForMode)(nil)).Elem()
    +}
    +
    +type EVCAdmissionFailedHostSoftwareForModeFault EVCAdmissionFailedHostSoftwareForMode
    +
    +func init() {
    +	t["EVCAdmissionFailedHostSoftwareForModeFault"] = reflect.TypeOf((*EVCAdmissionFailedHostSoftwareForModeFault)(nil)).Elem()
    +}
    +
    +type EVCAdmissionFailedVmActive struct {
    +	EVCAdmissionFailed
    +}
    +
    +func init() {
    +	t["EVCAdmissionFailedVmActive"] = reflect.TypeOf((*EVCAdmissionFailedVmActive)(nil)).Elem()
    +}
    +
    +type EVCAdmissionFailedVmActiveFault EVCAdmissionFailedVmActive
    +
    +func init() {
    +	t["EVCAdmissionFailedVmActiveFault"] = reflect.TypeOf((*EVCAdmissionFailedVmActiveFault)(nil)).Elem()
    +}
    +
    +type EVCConfigFault struct {
    +	VimFault
    +
    +	Faults []LocalizedMethodFault `xml:"faults,omitempty"`
    +}
    +
    +func init() {
    +	t["EVCConfigFault"] = reflect.TypeOf((*EVCConfigFault)(nil)).Elem()
    +}
    +
    +type EVCConfigFaultFault BaseEVCConfigFault
    +
    +func init() {
    +	t["EVCConfigFaultFault"] = reflect.TypeOf((*EVCConfigFaultFault)(nil)).Elem()
    +}
    +
    +type EVCMode struct {
    +	ElementDescription
    +
    +	GuaranteedCPUFeatures []HostCpuIdInfo                    `xml:"guaranteedCPUFeatures,omitempty"`
    +	FeatureCapability     []HostFeatureCapability            `xml:"featureCapability,omitempty"`
    +	FeatureMask           []HostFeatureMask                  `xml:"featureMask,omitempty"`
    +	FeatureRequirement    []VirtualMachineFeatureRequirement `xml:"featureRequirement,omitempty"`
    +	Vendor                string                             `xml:"vendor"`
    +	Track                 []string                           `xml:"track,omitempty"`
    +	VendorTier            int32                              `xml:"vendorTier"`
    +}
    +
    +func init() {
    +	t["EVCMode"] = reflect.TypeOf((*EVCMode)(nil)).Elem()
    +}
    +
    +type EVCModeIllegalByVendor struct {
    +	EVCConfigFault
    +
    +	ClusterCPUVendor string `xml:"clusterCPUVendor"`
    +	ModeCPUVendor    string `xml:"modeCPUVendor"`
    +}
    +
    +func init() {
    +	t["EVCModeIllegalByVendor"] = reflect.TypeOf((*EVCModeIllegalByVendor)(nil)).Elem()
    +}
    +
    +type EVCModeIllegalByVendorFault EVCModeIllegalByVendor
    +
    +func init() {
    +	t["EVCModeIllegalByVendorFault"] = reflect.TypeOf((*EVCModeIllegalByVendorFault)(nil)).Elem()
    +}
    +
    +type EVCModeUnsupportedByHosts struct {
    +	EVCConfigFault
    +
    +	EvcMode  string                   `xml:"evcMode,omitempty"`
    +	Host     []ManagedObjectReference `xml:"host,omitempty"`
    +	HostName []string                 `xml:"hostName,omitempty"`
    +}
    +
    +func init() {
    +	t["EVCModeUnsupportedByHosts"] = reflect.TypeOf((*EVCModeUnsupportedByHosts)(nil)).Elem()
    +}
    +
    +type EVCModeUnsupportedByHostsFault EVCModeUnsupportedByHosts
    +
    +func init() {
    +	t["EVCModeUnsupportedByHostsFault"] = reflect.TypeOf((*EVCModeUnsupportedByHostsFault)(nil)).Elem()
    +}
    +
    +type EVCUnsupportedByHostHardware struct {
    +	EVCConfigFault
    +
    +	Host     []ManagedObjectReference `xml:"host"`
    +	HostName []string                 `xml:"hostName"`
    +}
    +
    +func init() {
    +	t["EVCUnsupportedByHostHardware"] = reflect.TypeOf((*EVCUnsupportedByHostHardware)(nil)).Elem()
    +}
    +
    +type EVCUnsupportedByHostHardwareFault EVCUnsupportedByHostHardware
    +
    +func init() {
    +	t["EVCUnsupportedByHostHardwareFault"] = reflect.TypeOf((*EVCUnsupportedByHostHardwareFault)(nil)).Elem()
    +}
    +
    +type EVCUnsupportedByHostSoftware struct {
    +	EVCConfigFault
    +
    +	Host     []ManagedObjectReference `xml:"host"`
    +	HostName []string                 `xml:"hostName"`
    +}
    +
    +func init() {
    +	t["EVCUnsupportedByHostSoftware"] = reflect.TypeOf((*EVCUnsupportedByHostSoftware)(nil)).Elem()
    +}
    +
    +type EVCUnsupportedByHostSoftwareFault EVCUnsupportedByHostSoftware
    +
    +func init() {
    +	t["EVCUnsupportedByHostSoftwareFault"] = reflect.TypeOf((*EVCUnsupportedByHostSoftwareFault)(nil)).Elem()
    +}
    +
    +type EagerZeroVirtualDiskRequestType struct {
    +	This       ManagedObjectReference  `xml:"_this"`
    +	Name       string                  `xml:"name"`
    +	Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"`
    +}
    +
    +func init() {
    +	t["EagerZeroVirtualDiskRequestType"] = reflect.TypeOf((*EagerZeroVirtualDiskRequestType)(nil)).Elem()
    +}
    +
    +type EagerZeroVirtualDisk_Task EagerZeroVirtualDiskRequestType
    +
    +func init() {
    +	t["EagerZeroVirtualDisk_Task"] = reflect.TypeOf((*EagerZeroVirtualDisk_Task)(nil)).Elem()
    +}
    +
    +type EagerZeroVirtualDisk_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type EightHostLimitViolated struct {
    +	VmConfigFault
    +}
    +
    +func init() {
    +	t["EightHostLimitViolated"] = reflect.TypeOf((*EightHostLimitViolated)(nil)).Elem()
    +}
    +
    +type EightHostLimitViolatedFault EightHostLimitViolated
    +
    +func init() {
    +	t["EightHostLimitViolatedFault"] = reflect.TypeOf((*EightHostLimitViolatedFault)(nil)).Elem()
    +}
    +
    +type ElementDescription struct {
    +	Description
    +
    +	Key string `xml:"key"`
    +}
    +
    +func init() {
    +	t["ElementDescription"] = reflect.TypeOf((*ElementDescription)(nil)).Elem()
    +}
    +
    +type EnableAlarmActions EnableAlarmActionsRequestType
    +
    +func init() {
    +	t["EnableAlarmActions"] = reflect.TypeOf((*EnableAlarmActions)(nil)).Elem()
    +}
    +
    +type EnableAlarmActionsRequestType struct {
    +	This    ManagedObjectReference `xml:"_this"`
    +	Entity  ManagedObjectReference `xml:"entity"`
    +	Enabled bool                   `xml:"enabled"`
    +}
    +
    +func init() {
    +	t["EnableAlarmActionsRequestType"] = reflect.TypeOf((*EnableAlarmActionsRequestType)(nil)).Elem()
    +}
    +
    +type EnableAlarmActionsResponse struct {
    +}
    +
    +type EnableCrypto EnableCryptoRequestType
    +
    +func init() {
    +	t["EnableCrypto"] = reflect.TypeOf((*EnableCrypto)(nil)).Elem()
    +}
    +
    +type EnableCryptoRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	KeyPlain CryptoKeyPlain         `xml:"keyPlain"`
    +}
    +
    +func init() {
    +	t["EnableCryptoRequestType"] = reflect.TypeOf((*EnableCryptoRequestType)(nil)).Elem()
    +}
    +
    +type EnableCryptoResponse struct {
    +}
    +
    +type EnableFeature EnableFeatureRequestType
    +
    +func init() {
    +	t["EnableFeature"] = reflect.TypeOf((*EnableFeature)(nil)).Elem()
    +}
    +
    +type EnableFeatureRequestType struct {
    +	This       ManagedObjectReference  `xml:"_this"`
    +	Host       *ManagedObjectReference `xml:"host,omitempty"`
    +	FeatureKey string                  `xml:"featureKey"`
    +}
    +
    +func init() {
    +	t["EnableFeatureRequestType"] = reflect.TypeOf((*EnableFeatureRequestType)(nil)).Elem()
    +}
    +
    +type EnableFeatureResponse struct {
    +	Returnval bool `xml:"returnval"`
    +}
    +
    +type EnableHyperThreading EnableHyperThreadingRequestType
    +
    +func init() {
    +	t["EnableHyperThreading"] = reflect.TypeOf((*EnableHyperThreading)(nil)).Elem()
    +}
    +
    +type EnableHyperThreadingRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["EnableHyperThreadingRequestType"] = reflect.TypeOf((*EnableHyperThreadingRequestType)(nil)).Elem()
    +}
    +
    +type EnableHyperThreadingResponse struct {
    +}
    +
    +type EnableMultipathPath EnableMultipathPathRequestType
    +
    +func init() {
    +	t["EnableMultipathPath"] = reflect.TypeOf((*EnableMultipathPath)(nil)).Elem()
    +}
    +
    +type EnableMultipathPathRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	PathName string                 `xml:"pathName"`
    +}
    +
    +func init() {
    +	t["EnableMultipathPathRequestType"] = reflect.TypeOf((*EnableMultipathPathRequestType)(nil)).Elem()
    +}
    +
    +type EnableMultipathPathResponse struct {
    +}
    +
    +type EnableNetworkResourceManagement EnableNetworkResourceManagementRequestType
    +
    +func init() {
    +	t["EnableNetworkResourceManagement"] = reflect.TypeOf((*EnableNetworkResourceManagement)(nil)).Elem()
    +}
    +
    +type EnableNetworkResourceManagementRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	Enable bool                   `xml:"enable"`
    +}
    +
    +func init() {
    +	t["EnableNetworkResourceManagementRequestType"] = reflect.TypeOf((*EnableNetworkResourceManagementRequestType)(nil)).Elem()
    +}
    +
    +type EnableNetworkResourceManagementResponse struct {
    +}
    +
    +type EnableRuleset EnableRulesetRequestType
    +
    +func init() {
    +	t["EnableRuleset"] = reflect.TypeOf((*EnableRuleset)(nil)).Elem()
    +}
    +
    +type EnableRulesetRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Id   string                 `xml:"id"`
    +}
    +
    +func init() {
    +	t["EnableRulesetRequestType"] = reflect.TypeOf((*EnableRulesetRequestType)(nil)).Elem()
    +}
    +
    +type EnableRulesetResponse struct {
    +}
    +
    +type EnableSecondaryVMRequestType struct {
    +	This ManagedObjectReference  `xml:"_this"`
    +	Vm   ManagedObjectReference  `xml:"vm"`
    +	Host *ManagedObjectReference `xml:"host,omitempty"`
    +}
    +
    +func init() {
    +	t["EnableSecondaryVMRequestType"] = reflect.TypeOf((*EnableSecondaryVMRequestType)(nil)).Elem()
    +}
    +
    +type EnableSecondaryVM_Task EnableSecondaryVMRequestType
    +
    +func init() {
    +	t["EnableSecondaryVM_Task"] = reflect.TypeOf((*EnableSecondaryVM_Task)(nil)).Elem()
    +}
    +
    +type EnableSecondaryVM_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type EnableSmartCardAuthentication EnableSmartCardAuthenticationRequestType
    +
    +func init() {
    +	t["EnableSmartCardAuthentication"] = reflect.TypeOf((*EnableSmartCardAuthentication)(nil)).Elem()
    +}
    +
    +type EnableSmartCardAuthenticationRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["EnableSmartCardAuthenticationRequestType"] = reflect.TypeOf((*EnableSmartCardAuthenticationRequestType)(nil)).Elem()
    +}
    +
    +type EnableSmartCardAuthenticationResponse struct {
    +}
    +
    +type EncryptionKeyRequired struct {
    +	InvalidState
    +
    +	RequiredKey []CryptoKeyId `xml:"requiredKey,omitempty"`
    +}
    +
    +func init() {
    +	t["EncryptionKeyRequired"] = reflect.TypeOf((*EncryptionKeyRequired)(nil)).Elem()
    +}
    +
    +type EncryptionKeyRequiredFault EncryptionKeyRequired
    +
    +func init() {
    +	t["EncryptionKeyRequiredFault"] = reflect.TypeOf((*EncryptionKeyRequiredFault)(nil)).Elem()
    +}
    +
    +type EnterLockdownMode EnterLockdownModeRequestType
    +
    +func init() {
    +	t["EnterLockdownMode"] = reflect.TypeOf((*EnterLockdownMode)(nil)).Elem()
    +}
    +
    +type EnterLockdownModeRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["EnterLockdownModeRequestType"] = reflect.TypeOf((*EnterLockdownModeRequestType)(nil)).Elem()
    +}
    +
    +type EnterLockdownModeResponse struct {
    +}
    +
    +type EnterMaintenanceModeRequestType struct {
    +	This                  ManagedObjectReference `xml:"_this"`
    +	Timeout               int32                  `xml:"timeout"`
    +	EvacuatePoweredOffVms *bool                  `xml:"evacuatePoweredOffVms"`
    +	MaintenanceSpec       *HostMaintenanceSpec   `xml:"maintenanceSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["EnterMaintenanceModeRequestType"] = reflect.TypeOf((*EnterMaintenanceModeRequestType)(nil)).Elem()
    +}
    +
    +type EnterMaintenanceMode_Task EnterMaintenanceModeRequestType
    +
    +func init() {
    +	t["EnterMaintenanceMode_Task"] = reflect.TypeOf((*EnterMaintenanceMode_Task)(nil)).Elem()
    +}
    +
    +type EnterMaintenanceMode_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type EnteredMaintenanceModeEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["EnteredMaintenanceModeEvent"] = reflect.TypeOf((*EnteredMaintenanceModeEvent)(nil)).Elem()
    +}
    +
    +type EnteredStandbyModeEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["EnteredStandbyModeEvent"] = reflect.TypeOf((*EnteredStandbyModeEvent)(nil)).Elem()
    +}
    +
    +type EnteringMaintenanceModeEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["EnteringMaintenanceModeEvent"] = reflect.TypeOf((*EnteringMaintenanceModeEvent)(nil)).Elem()
    +}
    +
    +type EnteringStandbyModeEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["EnteringStandbyModeEvent"] = reflect.TypeOf((*EnteringStandbyModeEvent)(nil)).Elem()
    +}
    +
    +type EntityBackup struct {
    +	DynamicData
    +}
    +
    +func init() {
    +	t["EntityBackup"] = reflect.TypeOf((*EntityBackup)(nil)).Elem()
    +}
    +
    +type EntityBackupConfig struct {
    +	DynamicData
    +
    +	EntityType    string                  `xml:"entityType"`
    +	ConfigBlob    []byte                  `xml:"configBlob"`
    +	Key           string                  `xml:"key,omitempty"`
    +	Name          string                  `xml:"name,omitempty"`
    +	Container     *ManagedObjectReference `xml:"container,omitempty"`
    +	ConfigVersion string                  `xml:"configVersion,omitempty"`
    +}
    +
    +func init() {
    +	t["EntityBackupConfig"] = reflect.TypeOf((*EntityBackupConfig)(nil)).Elem()
    +}
    +
    +type EntityEventArgument struct {
    +	EventArgument
    +
    +	Name string `xml:"name"`
    +}
    +
    +func init() {
    +	t["EntityEventArgument"] = reflect.TypeOf((*EntityEventArgument)(nil)).Elem()
    +}
    +
    +type EntityPrivilege struct {
    +	DynamicData
    +
    +	Entity           ManagedObjectReference  `xml:"entity"`
    +	PrivAvailability []PrivilegeAvailability `xml:"privAvailability"`
    +}
    +
    +func init() {
    +	t["EntityPrivilege"] = reflect.TypeOf((*EntityPrivilege)(nil)).Elem()
    +}
    +
    +type EnumDescription struct {
    +	DynamicData
    +
    +	Key  string                   `xml:"key"`
    +	Tags []BaseElementDescription `xml:"tags,typeattr"`
    +}
    +
    +func init() {
    +	t["EnumDescription"] = reflect.TypeOf((*EnumDescription)(nil)).Elem()
    +}
    +
    +type EnvironmentBrowserConfigOptionQuerySpec struct {
    +	DynamicData
    +
    +	Key     string                  `xml:"key,omitempty"`
    +	Host    *ManagedObjectReference `xml:"host,omitempty"`
    +	GuestId []string                `xml:"guestId,omitempty"`
    +}
    +
    +func init() {
    +	t["EnvironmentBrowserConfigOptionQuerySpec"] = reflect.TypeOf((*EnvironmentBrowserConfigOptionQuerySpec)(nil)).Elem()
    +}
    +
    +type ErrorUpgradeEvent struct {
    +	UpgradeEvent
    +}
    +
    +func init() {
    +	t["ErrorUpgradeEvent"] = reflect.TypeOf((*ErrorUpgradeEvent)(nil)).Elem()
    +}
    +
    +type EstimateDatabaseSize EstimateDatabaseSizeRequestType
    +
    +func init() {
    +	t["EstimateDatabaseSize"] = reflect.TypeOf((*EstimateDatabaseSize)(nil)).Elem()
    +}
    +
    +type EstimateDatabaseSizeRequestType struct {
    +	This        ManagedObjectReference `xml:"_this"`
    +	DbSizeParam DatabaseSizeParam      `xml:"dbSizeParam"`
    +}
    +
    +func init() {
    +	t["EstimateDatabaseSizeRequestType"] = reflect.TypeOf((*EstimateDatabaseSizeRequestType)(nil)).Elem()
    +}
    +
    +type EstimateDatabaseSizeResponse struct {
    +	Returnval DatabaseSizeEstimate `xml:"returnval"`
    +}
    +
    +type EstimateStorageForConsolidateSnapshotsRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["EstimateStorageForConsolidateSnapshotsRequestType"] = reflect.TypeOf((*EstimateStorageForConsolidateSnapshotsRequestType)(nil)).Elem()
    +}
    +
    +type EstimateStorageForConsolidateSnapshots_Task EstimateStorageForConsolidateSnapshotsRequestType
    +
    +func init() {
    +	t["EstimateStorageForConsolidateSnapshots_Task"] = reflect.TypeOf((*EstimateStorageForConsolidateSnapshots_Task)(nil)).Elem()
    +}
    +
    +type EstimateStorageForConsolidateSnapshots_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type EsxAgentHostManagerUpdateConfig EsxAgentHostManagerUpdateConfigRequestType
    +
    +func init() {
    +	t["EsxAgentHostManagerUpdateConfig"] = reflect.TypeOf((*EsxAgentHostManagerUpdateConfig)(nil)).Elem()
    +}
    +
    +type EsxAgentHostManagerUpdateConfigRequestType struct {
    +	This       ManagedObjectReference            `xml:"_this"`
    +	ConfigInfo HostEsxAgentHostManagerConfigInfo `xml:"configInfo"`
    +}
    +
    +func init() {
    +	t["EsxAgentHostManagerUpdateConfigRequestType"] = reflect.TypeOf((*EsxAgentHostManagerUpdateConfigRequestType)(nil)).Elem()
    +}
    +
    +type EsxAgentHostManagerUpdateConfigResponse struct {
    +}
    +
    +type EvacuateVsanNodeRequestType struct {
    +	This            ManagedObjectReference `xml:"_this"`
    +	MaintenanceSpec HostMaintenanceSpec    `xml:"maintenanceSpec"`
    +	Timeout         int32                  `xml:"timeout"`
    +}
    +
    +func init() {
    +	t["EvacuateVsanNodeRequestType"] = reflect.TypeOf((*EvacuateVsanNodeRequestType)(nil)).Elem()
    +}
    +
    +type EvacuateVsanNode_Task EvacuateVsanNodeRequestType
    +
    +func init() {
    +	t["EvacuateVsanNode_Task"] = reflect.TypeOf((*EvacuateVsanNode_Task)(nil)).Elem()
    +}
    +
    +type EvacuateVsanNode_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type EvaluationLicenseSource struct {
    +	LicenseSource
    +
    +	RemainingHours int64 `xml:"remainingHours,omitempty"`
    +}
    +
    +func init() {
    +	t["EvaluationLicenseSource"] = reflect.TypeOf((*EvaluationLicenseSource)(nil)).Elem()
    +}
    +
    +type EvcManager EvcManagerRequestType
    +
    +func init() {
    +	t["EvcManager"] = reflect.TypeOf((*EvcManager)(nil)).Elem()
    +}
    +
    +type EvcManagerRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["EvcManagerRequestType"] = reflect.TypeOf((*EvcManagerRequestType)(nil)).Elem()
    +}
    +
    +type EvcManagerResponse struct {
    +	Returnval *ManagedObjectReference `xml:"returnval,omitempty"`
    +}
    +
    +type Event struct {
    +	DynamicData
    +
    +	Key                  int32                         `xml:"key"`
    +	ChainId              int32                         `xml:"chainId"`
    +	CreatedTime          time.Time                     `xml:"createdTime"`
    +	UserName             string                        `xml:"userName"`
    +	Datacenter           *DatacenterEventArgument      `xml:"datacenter,omitempty"`
    +	ComputeResource      *ComputeResourceEventArgument `xml:"computeResource,omitempty"`
    +	Host                 *HostEventArgument            `xml:"host,omitempty"`
    +	Vm                   *VmEventArgument              `xml:"vm,omitempty"`
    +	Ds                   *DatastoreEventArgument       `xml:"ds,omitempty"`
    +	Net                  *NetworkEventArgument         `xml:"net,omitempty"`
    +	Dvs                  *DvsEventArgument             `xml:"dvs,omitempty"`
    +	FullFormattedMessage string                        `xml:"fullFormattedMessage,omitempty"`
    +	ChangeTag            string                        `xml:"changeTag,omitempty"`
    +}
    +
    +func init() {
    +	t["Event"] = reflect.TypeOf((*Event)(nil)).Elem()
    +}
    +
    +type EventAlarmExpression struct {
    +	AlarmExpression
    +
    +	Comparisons []EventAlarmExpressionComparison `xml:"comparisons,omitempty"`
    +	EventType   string                           `xml:"eventType"`
    +	EventTypeId string                           `xml:"eventTypeId,omitempty"`
    +	ObjectType  string                           `xml:"objectType,omitempty"`
    +	Status      ManagedEntityStatus              `xml:"status,omitempty"`
    +}
    +
    +func init() {
    +	t["EventAlarmExpression"] = reflect.TypeOf((*EventAlarmExpression)(nil)).Elem()
    +}
    +
    +type EventAlarmExpressionComparison struct {
    +	DynamicData
    +
    +	AttributeName string `xml:"attributeName"`
    +	Operator      string `xml:"operator"`
    +	Value         string `xml:"value"`
    +}
    +
    +func init() {
    +	t["EventAlarmExpressionComparison"] = reflect.TypeOf((*EventAlarmExpressionComparison)(nil)).Elem()
    +}
    +
    +type EventArgDesc struct {
    +	DynamicData
    +
    +	Name        string                 `xml:"name"`
    +	Type        string                 `xml:"type"`
    +	Description BaseElementDescription `xml:"description,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["EventArgDesc"] = reflect.TypeOf((*EventArgDesc)(nil)).Elem()
    +}
    +
    +type EventArgument struct {
    +	DynamicData
    +}
    +
    +func init() {
    +	t["EventArgument"] = reflect.TypeOf((*EventArgument)(nil)).Elem()
    +}
    +
    +type EventDescription struct {
    +	DynamicData
    +
    +	Category        []BaseElementDescription      `xml:"category,typeattr"`
    +	EventInfo       []EventDescriptionEventDetail `xml:"eventInfo"`
    +	EnumeratedTypes []EnumDescription             `xml:"enumeratedTypes,omitempty"`
    +}
    +
    +func init() {
    +	t["EventDescription"] = reflect.TypeOf((*EventDescription)(nil)).Elem()
    +}
    +
    +type EventDescriptionEventDetail struct {
    +	DynamicData
    +
    +	Key                     string `xml:"key"`
    +	Description             string `xml:"description,omitempty"`
    +	Category                string `xml:"category"`
    +	FormatOnDatacenter      string `xml:"formatOnDatacenter"`
    +	FormatOnComputeResource string `xml:"formatOnComputeResource"`
    +	FormatOnHost            string `xml:"formatOnHost"`
    +	FormatOnVm              string `xml:"formatOnVm"`
    +	FullFormat              string `xml:"fullFormat"`
    +	LongDescription         string `xml:"longDescription,omitempty"`
    +}
    +
    +func init() {
    +	t["EventDescriptionEventDetail"] = reflect.TypeOf((*EventDescriptionEventDetail)(nil)).Elem()
    +}
    +
    +type EventEx struct {
    +	Event
    +
    +	EventTypeId string                `xml:"eventTypeId"`
    +	Severity    string                `xml:"severity,omitempty"`
    +	Message     string                `xml:"message,omitempty"`
    +	Arguments   []KeyAnyValue         `xml:"arguments,omitempty"`
    +	ObjectId    string                `xml:"objectId,omitempty"`
    +	ObjectType  string                `xml:"objectType,omitempty"`
    +	ObjectName  string                `xml:"objectName,omitempty"`
    +	Fault       *LocalizedMethodFault `xml:"fault,omitempty"`
    +}
    +
    +func init() {
    +	t["EventEx"] = reflect.TypeOf((*EventEx)(nil)).Elem()
    +}
    +
    +type EventFilterSpec struct {
    +	DynamicData
    +
    +	Entity             *EventFilterSpecByEntity   `xml:"entity,omitempty"`
    +	Time               *EventFilterSpecByTime     `xml:"time,omitempty"`
    +	UserName           *EventFilterSpecByUsername `xml:"userName,omitempty"`
    +	EventChainId       int32                      `xml:"eventChainId,omitempty"`
    +	Alarm              *ManagedObjectReference    `xml:"alarm,omitempty"`
    +	ScheduledTask      *ManagedObjectReference    `xml:"scheduledTask,omitempty"`
    +	DisableFullMessage *bool                      `xml:"disableFullMessage"`
    +	Category           []string                   `xml:"category,omitempty"`
    +	Type               []string                   `xml:"type,omitempty"`
    +	Tag                []string                   `xml:"tag,omitempty"`
    +	EventTypeId        []string                   `xml:"eventTypeId,omitempty"`
    +	MaxCount           int32                      `xml:"maxCount,omitempty"`
    +}
    +
    +func init() {
    +	t["EventFilterSpec"] = reflect.TypeOf((*EventFilterSpec)(nil)).Elem()
    +}
    +
    +type EventFilterSpecByEntity struct {
    +	DynamicData
    +
    +	Entity    ManagedObjectReference         `xml:"entity"`
    +	Recursion EventFilterSpecRecursionOption `xml:"recursion"`
    +}
    +
    +func init() {
    +	t["EventFilterSpecByEntity"] = reflect.TypeOf((*EventFilterSpecByEntity)(nil)).Elem()
    +}
    +
    +type EventFilterSpecByTime struct {
    +	DynamicData
    +
    +	BeginTime *time.Time `xml:"beginTime"`
    +	EndTime   *time.Time `xml:"endTime"`
    +}
    +
    +func init() {
    +	t["EventFilterSpecByTime"] = reflect.TypeOf((*EventFilterSpecByTime)(nil)).Elem()
    +}
    +
    +type EventFilterSpecByUsername struct {
    +	DynamicData
    +
    +	SystemUser bool     `xml:"systemUser"`
    +	UserList   []string `xml:"userList,omitempty"`
    +}
    +
    +func init() {
    +	t["EventFilterSpecByUsername"] = reflect.TypeOf((*EventFilterSpecByUsername)(nil)).Elem()
    +}
    +
    +type ExecuteHostProfile ExecuteHostProfileRequestType
    +
    +func init() {
    +	t["ExecuteHostProfile"] = reflect.TypeOf((*ExecuteHostProfile)(nil)).Elem()
    +}
    +
    +type ExecuteHostProfileRequestType struct {
    +	This          ManagedObjectReference                 `xml:"_this"`
    +	Host          ManagedObjectReference                 `xml:"host"`
    +	DeferredParam []ProfileDeferredPolicyOptionParameter `xml:"deferredParam,omitempty"`
    +}
    +
    +func init() {
    +	t["ExecuteHostProfileRequestType"] = reflect.TypeOf((*ExecuteHostProfileRequestType)(nil)).Elem()
    +}
    +
    +type ExecuteHostProfileResponse struct {
    +	Returnval BaseProfileExecuteResult `xml:"returnval,typeattr"`
    +}
    +
    +type ExecuteSimpleCommand ExecuteSimpleCommandRequestType
    +
    +func init() {
    +	t["ExecuteSimpleCommand"] = reflect.TypeOf((*ExecuteSimpleCommand)(nil)).Elem()
    +}
    +
    +type ExecuteSimpleCommandRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	Arguments []string               `xml:"arguments,omitempty"`
    +}
    +
    +func init() {
    +	t["ExecuteSimpleCommandRequestType"] = reflect.TypeOf((*ExecuteSimpleCommandRequestType)(nil)).Elem()
    +}
    +
    +type ExecuteSimpleCommandResponse struct {
    +	Returnval string `xml:"returnval"`
    +}
    +
    +type ExitLockdownMode ExitLockdownModeRequestType
    +
    +func init() {
    +	t["ExitLockdownMode"] = reflect.TypeOf((*ExitLockdownMode)(nil)).Elem()
    +}
    +
    +type ExitLockdownModeRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["ExitLockdownModeRequestType"] = reflect.TypeOf((*ExitLockdownModeRequestType)(nil)).Elem()
    +}
    +
    +type ExitLockdownModeResponse struct {
    +}
    +
    +type ExitMaintenanceModeEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["ExitMaintenanceModeEvent"] = reflect.TypeOf((*ExitMaintenanceModeEvent)(nil)).Elem()
    +}
    +
    +type ExitMaintenanceModeRequestType struct {
    +	This    ManagedObjectReference `xml:"_this"`
    +	Timeout int32                  `xml:"timeout"`
    +}
    +
    +func init() {
    +	t["ExitMaintenanceModeRequestType"] = reflect.TypeOf((*ExitMaintenanceModeRequestType)(nil)).Elem()
    +}
    +
    +type ExitMaintenanceMode_Task ExitMaintenanceModeRequestType
    +
    +func init() {
    +	t["ExitMaintenanceMode_Task"] = reflect.TypeOf((*ExitMaintenanceMode_Task)(nil)).Elem()
    +}
    +
    +type ExitMaintenanceMode_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type ExitStandbyModeFailedEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["ExitStandbyModeFailedEvent"] = reflect.TypeOf((*ExitStandbyModeFailedEvent)(nil)).Elem()
    +}
    +
    +type ExitedStandbyModeEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["ExitedStandbyModeEvent"] = reflect.TypeOf((*ExitedStandbyModeEvent)(nil)).Elem()
    +}
    +
    +type ExitingStandbyModeEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["ExitingStandbyModeEvent"] = reflect.TypeOf((*ExitingStandbyModeEvent)(nil)).Elem()
    +}
    +
    +type ExpandVmfsDatastore ExpandVmfsDatastoreRequestType
    +
    +func init() {
    +	t["ExpandVmfsDatastore"] = reflect.TypeOf((*ExpandVmfsDatastore)(nil)).Elem()
    +}
    +
    +type ExpandVmfsDatastoreRequestType struct {
    +	This      ManagedObjectReference  `xml:"_this"`
    +	Datastore ManagedObjectReference  `xml:"datastore"`
    +	Spec      VmfsDatastoreExpandSpec `xml:"spec"`
    +}
    +
    +func init() {
    +	t["ExpandVmfsDatastoreRequestType"] = reflect.TypeOf((*ExpandVmfsDatastoreRequestType)(nil)).Elem()
    +}
    +
    +type ExpandVmfsDatastoreResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type ExpandVmfsExtent ExpandVmfsExtentRequestType
    +
    +func init() {
    +	t["ExpandVmfsExtent"] = reflect.TypeOf((*ExpandVmfsExtent)(nil)).Elem()
    +}
    +
    +type ExpandVmfsExtentRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	VmfsPath string                 `xml:"vmfsPath"`
    +	Extent   HostScsiDiskPartition  `xml:"extent"`
    +}
    +
    +func init() {
    +	t["ExpandVmfsExtentRequestType"] = reflect.TypeOf((*ExpandVmfsExtentRequestType)(nil)).Elem()
    +}
    +
    +type ExpandVmfsExtentResponse struct {
    +}
    +
    +type ExpiredAddonLicense struct {
    +	ExpiredFeatureLicense
    +}
    +
    +func init() {
    +	t["ExpiredAddonLicense"] = reflect.TypeOf((*ExpiredAddonLicense)(nil)).Elem()
    +}
    +
    +type ExpiredAddonLicenseFault ExpiredAddonLicense
    +
    +func init() {
    +	t["ExpiredAddonLicenseFault"] = reflect.TypeOf((*ExpiredAddonLicenseFault)(nil)).Elem()
    +}
    +
    +type ExpiredEditionLicense struct {
    +	ExpiredFeatureLicense
    +}
    +
    +func init() {
    +	t["ExpiredEditionLicense"] = reflect.TypeOf((*ExpiredEditionLicense)(nil)).Elem()
    +}
    +
    +type ExpiredEditionLicenseFault ExpiredEditionLicense
    +
    +func init() {
    +	t["ExpiredEditionLicenseFault"] = reflect.TypeOf((*ExpiredEditionLicenseFault)(nil)).Elem()
    +}
    +
    +type ExpiredFeatureLicense struct {
    +	NotEnoughLicenses
    +
    +	Feature        string    `xml:"feature"`
    +	Count          int32     `xml:"count"`
    +	ExpirationDate time.Time `xml:"expirationDate"`
    +}
    +
    +func init() {
    +	t["ExpiredFeatureLicense"] = reflect.TypeOf((*ExpiredFeatureLicense)(nil)).Elem()
    +}
    +
    +type ExpiredFeatureLicenseFault BaseExpiredFeatureLicense
    +
    +func init() {
    +	t["ExpiredFeatureLicenseFault"] = reflect.TypeOf((*ExpiredFeatureLicenseFault)(nil)).Elem()
    +}
    +
    +type ExportAnswerFileRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Host ManagedObjectReference `xml:"host"`
    +}
    +
    +func init() {
    +	t["ExportAnswerFileRequestType"] = reflect.TypeOf((*ExportAnswerFileRequestType)(nil)).Elem()
    +}
    +
    +type ExportAnswerFile_Task ExportAnswerFileRequestType
    +
    +func init() {
    +	t["ExportAnswerFile_Task"] = reflect.TypeOf((*ExportAnswerFile_Task)(nil)).Elem()
    +}
    +
    +type ExportAnswerFile_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type ExportProfile ExportProfileRequestType
    +
    +func init() {
    +	t["ExportProfile"] = reflect.TypeOf((*ExportProfile)(nil)).Elem()
    +}
    +
    +type ExportProfileRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["ExportProfileRequestType"] = reflect.TypeOf((*ExportProfileRequestType)(nil)).Elem()
    +}
    +
    +type ExportProfileResponse struct {
    +	Returnval string `xml:"returnval"`
    +}
    +
    +type ExportSnapshot ExportSnapshotRequestType
    +
    +func init() {
    +	t["ExportSnapshot"] = reflect.TypeOf((*ExportSnapshot)(nil)).Elem()
    +}
    +
    +type ExportSnapshotRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["ExportSnapshotRequestType"] = reflect.TypeOf((*ExportSnapshotRequestType)(nil)).Elem()
    +}
    +
    +type ExportSnapshotResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type ExportVApp ExportVAppRequestType
    +
    +func init() {
    +	t["ExportVApp"] = reflect.TypeOf((*ExportVApp)(nil)).Elem()
    +}
    +
    +type ExportVAppRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["ExportVAppRequestType"] = reflect.TypeOf((*ExportVAppRequestType)(nil)).Elem()
    +}
    +
    +type ExportVAppResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type ExportVm ExportVmRequestType
    +
    +func init() {
    +	t["ExportVm"] = reflect.TypeOf((*ExportVm)(nil)).Elem()
    +}
    +
    +type ExportVmRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["ExportVmRequestType"] = reflect.TypeOf((*ExportVmRequestType)(nil)).Elem()
    +}
    +
    +type ExportVmResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type ExtExtendedProductInfo struct {
    +	DynamicData
    +
    +	CompanyUrl    string                  `xml:"companyUrl,omitempty"`
    +	ProductUrl    string                  `xml:"productUrl,omitempty"`
    +	ManagementUrl string                  `xml:"managementUrl,omitempty"`
    +	Self          *ManagedObjectReference `xml:"self,omitempty"`
    +}
    +
    +func init() {
    +	t["ExtExtendedProductInfo"] = reflect.TypeOf((*ExtExtendedProductInfo)(nil)).Elem()
    +}
    +
    +type ExtManagedEntityInfo struct {
    +	DynamicData
    +
    +	Type         string `xml:"type"`
    +	SmallIconUrl string `xml:"smallIconUrl,omitempty"`
    +	IconUrl      string `xml:"iconUrl,omitempty"`
    +	Description  string `xml:"description,omitempty"`
    +}
    +
    +func init() {
    +	t["ExtManagedEntityInfo"] = reflect.TypeOf((*ExtManagedEntityInfo)(nil)).Elem()
    +}
    +
    +type ExtSolutionManagerInfo struct {
    +	DynamicData
    +
    +	Tab          []ExtSolutionManagerInfoTabInfo `xml:"tab,omitempty"`
    +	SmallIconUrl string                          `xml:"smallIconUrl,omitempty"`
    +}
    +
    +func init() {
    +	t["ExtSolutionManagerInfo"] = reflect.TypeOf((*ExtSolutionManagerInfo)(nil)).Elem()
    +}
    +
    +type ExtSolutionManagerInfoTabInfo struct {
    +	DynamicData
    +
    +	Label string `xml:"label"`
    +	Url   string `xml:"url"`
    +}
    +
    +func init() {
    +	t["ExtSolutionManagerInfoTabInfo"] = reflect.TypeOf((*ExtSolutionManagerInfoTabInfo)(nil)).Elem()
    +}
    +
    +type ExtendDiskRequestType struct {
    +	This            ManagedObjectReference `xml:"_this"`
    +	Id              ID                     `xml:"id"`
    +	Datastore       ManagedObjectReference `xml:"datastore"`
    +	NewCapacityInMB int64                  `xml:"newCapacityInMB"`
    +}
    +
    +func init() {
    +	t["ExtendDiskRequestType"] = reflect.TypeOf((*ExtendDiskRequestType)(nil)).Elem()
    +}
    +
    +type ExtendDisk_Task ExtendDiskRequestType
    +
    +func init() {
    +	t["ExtendDisk_Task"] = reflect.TypeOf((*ExtendDisk_Task)(nil)).Elem()
    +}
    +
    +type ExtendDisk_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type ExtendVffs ExtendVffsRequestType
    +
    +func init() {
    +	t["ExtendVffs"] = reflect.TypeOf((*ExtendVffs)(nil)).Elem()
    +}
    +
    +type ExtendVffsRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	VffsPath   string                 `xml:"vffsPath"`
    +	DevicePath string                 `xml:"devicePath"`
    +	Spec       *HostDiskPartitionSpec `xml:"spec,omitempty"`
    +}
    +
    +func init() {
    +	t["ExtendVffsRequestType"] = reflect.TypeOf((*ExtendVffsRequestType)(nil)).Elem()
    +}
    +
    +type ExtendVffsResponse struct {
    +}
    +
    +type ExtendVirtualDiskRequestType struct {
    +	This          ManagedObjectReference  `xml:"_this"`
    +	Name          string                  `xml:"name"`
    +	Datacenter    *ManagedObjectReference `xml:"datacenter,omitempty"`
    +	NewCapacityKb int64                   `xml:"newCapacityKb"`
    +	EagerZero     *bool                   `xml:"eagerZero"`
    +}
    +
    +func init() {
    +	t["ExtendVirtualDiskRequestType"] = reflect.TypeOf((*ExtendVirtualDiskRequestType)(nil)).Elem()
    +}
    +
    +type ExtendVirtualDisk_Task ExtendVirtualDiskRequestType
    +
    +func init() {
    +	t["ExtendVirtualDisk_Task"] = reflect.TypeOf((*ExtendVirtualDisk_Task)(nil)).Elem()
    +}
    +
    +type ExtendVirtualDisk_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type ExtendVmfsDatastore ExtendVmfsDatastoreRequestType
    +
    +func init() {
    +	t["ExtendVmfsDatastore"] = reflect.TypeOf((*ExtendVmfsDatastore)(nil)).Elem()
    +}
    +
    +type ExtendVmfsDatastoreRequestType struct {
    +	This      ManagedObjectReference  `xml:"_this"`
    +	Datastore ManagedObjectReference  `xml:"datastore"`
    +	Spec      VmfsDatastoreExtendSpec `xml:"spec"`
    +}
    +
    +func init() {
    +	t["ExtendVmfsDatastoreRequestType"] = reflect.TypeOf((*ExtendVmfsDatastoreRequestType)(nil)).Elem()
    +}
    +
    +type ExtendVmfsDatastoreResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type ExtendedDescription struct {
    +	Description
    +
    +	MessageCatalogKeyPrefix string        `xml:"messageCatalogKeyPrefix"`
    +	MessageArg              []KeyAnyValue `xml:"messageArg,omitempty"`
    +}
    +
    +func init() {
    +	t["ExtendedDescription"] = reflect.TypeOf((*ExtendedDescription)(nil)).Elem()
    +}
    +
    +type ExtendedElementDescription struct {
    +	ElementDescription
    +
    +	MessageCatalogKeyPrefix string        `xml:"messageCatalogKeyPrefix"`
    +	MessageArg              []KeyAnyValue `xml:"messageArg,omitempty"`
    +}
    +
    +func init() {
    +	t["ExtendedElementDescription"] = reflect.TypeOf((*ExtendedElementDescription)(nil)).Elem()
    +}
    +
    +type ExtendedEvent struct {
    +	GeneralEvent
    +
    +	EventTypeId   string                 `xml:"eventTypeId"`
    +	ManagedObject ManagedObjectReference `xml:"managedObject"`
    +	Data          []ExtendedEventPair    `xml:"data,omitempty"`
    +}
    +
    +func init() {
    +	t["ExtendedEvent"] = reflect.TypeOf((*ExtendedEvent)(nil)).Elem()
    +}
    +
    +type ExtendedEventPair struct {
    +	DynamicData
    +
    +	Key   string `xml:"key"`
    +	Value string `xml:"value"`
    +}
    +
    +func init() {
    +	t["ExtendedEventPair"] = reflect.TypeOf((*ExtendedEventPair)(nil)).Elem()
    +}
    +
    +type ExtendedFault struct {
    +	VimFault
    +
    +	FaultTypeId string     `xml:"faultTypeId"`
    +	Data        []KeyValue `xml:"data,omitempty"`
    +}
    +
    +func init() {
    +	t["ExtendedFault"] = reflect.TypeOf((*ExtendedFault)(nil)).Elem()
    +}
    +
    +type ExtendedFaultFault ExtendedFault
    +
    +func init() {
    +	t["ExtendedFaultFault"] = reflect.TypeOf((*ExtendedFaultFault)(nil)).Elem()
    +}
    +
    +type Extension struct {
    +	DynamicData
    +
    +	Description            BaseDescription           `xml:"description,typeattr"`
    +	Key                    string                    `xml:"key"`
    +	Company                string                    `xml:"company,omitempty"`
    +	Type                   string                    `xml:"type,omitempty"`
    +	Version                string                    `xml:"version"`
    +	SubjectName            string                    `xml:"subjectName,omitempty"`
    +	Server                 []ExtensionServerInfo     `xml:"server,omitempty"`
    +	Client                 []ExtensionClientInfo     `xml:"client,omitempty"`
    +	TaskList               []ExtensionTaskTypeInfo   `xml:"taskList,omitempty"`
    +	EventList              []ExtensionEventTypeInfo  `xml:"eventList,omitempty"`
    +	FaultList              []ExtensionFaultTypeInfo  `xml:"faultList,omitempty"`
    +	PrivilegeList          []ExtensionPrivilegeInfo  `xml:"privilegeList,omitempty"`
    +	ResourceList           []ExtensionResourceInfo   `xml:"resourceList,omitempty"`
    +	LastHeartbeatTime      time.Time                 `xml:"lastHeartbeatTime"`
    +	HealthInfo             *ExtensionHealthInfo      `xml:"healthInfo,omitempty"`
    +	OvfConsumerInfo        *ExtensionOvfConsumerInfo `xml:"ovfConsumerInfo,omitempty"`
    +	ExtendedProductInfo    *ExtExtendedProductInfo   `xml:"extendedProductInfo,omitempty"`
    +	ManagedEntityInfo      []ExtManagedEntityInfo    `xml:"managedEntityInfo,omitempty"`
    +	ShownInSolutionManager *bool                     `xml:"shownInSolutionManager"`
    +	SolutionManagerInfo    *ExtSolutionManagerInfo   `xml:"solutionManagerInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["Extension"] = reflect.TypeOf((*Extension)(nil)).Elem()
    +}
    +
    +type ExtensionClientInfo struct {
    +	DynamicData
    +
    +	Version     string          `xml:"version"`
    +	Description BaseDescription `xml:"description,typeattr"`
    +	Company     string          `xml:"company"`
    +	Type        string          `xml:"type"`
    +	Url         string          `xml:"url"`
    +}
    +
    +func init() {
    +	t["ExtensionClientInfo"] = reflect.TypeOf((*ExtensionClientInfo)(nil)).Elem()
    +}
    +
    +type ExtensionEventTypeInfo struct {
    +	DynamicData
    +
    +	EventID         string `xml:"eventID"`
    +	EventTypeSchema string `xml:"eventTypeSchema,omitempty"`
    +}
    +
    +func init() {
    +	t["ExtensionEventTypeInfo"] = reflect.TypeOf((*ExtensionEventTypeInfo)(nil)).Elem()
    +}
    +
    +type ExtensionFaultTypeInfo struct {
    +	DynamicData
    +
    +	FaultID string `xml:"faultID"`
    +}
    +
    +func init() {
    +	t["ExtensionFaultTypeInfo"] = reflect.TypeOf((*ExtensionFaultTypeInfo)(nil)).Elem()
    +}
    +
    +type ExtensionHealthInfo struct {
    +	DynamicData
    +
    +	Url string `xml:"url"`
    +}
    +
    +func init() {
    +	t["ExtensionHealthInfo"] = reflect.TypeOf((*ExtensionHealthInfo)(nil)).Elem()
    +}
    +
    +type ExtensionManagerIpAllocationUsage struct {
    +	DynamicData
    +
    +	ExtensionKey string `xml:"extensionKey"`
    +	NumAddresses int32  `xml:"numAddresses"`
    +}
    +
    +func init() {
    +	t["ExtensionManagerIpAllocationUsage"] = reflect.TypeOf((*ExtensionManagerIpAllocationUsage)(nil)).Elem()
    +}
    +
    +type ExtensionOvfConsumerInfo struct {
    +	DynamicData
    +
    +	CallbackUrl string   `xml:"callbackUrl"`
    +	SectionType []string `xml:"sectionType"`
    +}
    +
    +func init() {
    +	t["ExtensionOvfConsumerInfo"] = reflect.TypeOf((*ExtensionOvfConsumerInfo)(nil)).Elem()
    +}
    +
    +type ExtensionPrivilegeInfo struct {
    +	DynamicData
    +
    +	PrivID        string `xml:"privID"`
    +	PrivGroupName string `xml:"privGroupName"`
    +}
    +
    +func init() {
    +	t["ExtensionPrivilegeInfo"] = reflect.TypeOf((*ExtensionPrivilegeInfo)(nil)).Elem()
    +}
    +
    +type ExtensionResourceInfo struct {
    +	DynamicData
    +
    +	Locale string     `xml:"locale"`
    +	Module string     `xml:"module"`
    +	Data   []KeyValue `xml:"data"`
    +}
    +
    +func init() {
    +	t["ExtensionResourceInfo"] = reflect.TypeOf((*ExtensionResourceInfo)(nil)).Elem()
    +}
    +
    +type ExtensionServerInfo struct {
    +	DynamicData
    +
    +	Url              string          `xml:"url"`
    +	Description      BaseDescription `xml:"description,typeattr"`
    +	Company          string          `xml:"company"`
    +	Type             string          `xml:"type"`
    +	AdminEmail       []string        `xml:"adminEmail"`
    +	ServerThumbprint string          `xml:"serverThumbprint,omitempty"`
    +}
    +
    +func init() {
    +	t["ExtensionServerInfo"] = reflect.TypeOf((*ExtensionServerInfo)(nil)).Elem()
    +}
    +
    +type ExtensionTaskTypeInfo struct {
    +	DynamicData
    +
    +	TaskID string `xml:"taskID"`
    +}
    +
    +func init() {
    +	t["ExtensionTaskTypeInfo"] = reflect.TypeOf((*ExtensionTaskTypeInfo)(nil)).Elem()
    +}
    +
    +type ExtractOvfEnvironment ExtractOvfEnvironmentRequestType
    +
    +func init() {
    +	t["ExtractOvfEnvironment"] = reflect.TypeOf((*ExtractOvfEnvironment)(nil)).Elem()
    +}
    +
    +type ExtractOvfEnvironmentRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["ExtractOvfEnvironmentRequestType"] = reflect.TypeOf((*ExtractOvfEnvironmentRequestType)(nil)).Elem()
    +}
    +
    +type ExtractOvfEnvironmentResponse struct {
    +	Returnval string `xml:"returnval"`
    +}
    +
    +type FailToEnableSPBM struct {
    +	NotEnoughLicenses
    +
    +	Cs                ManagedObjectReference               `xml:"cs"`
    +	CsName            string                               `xml:"csName"`
    +	HostLicenseStates []ComputeResourceHostSPBMLicenseInfo `xml:"hostLicenseStates"`
    +}
    +
    +func init() {
    +	t["FailToEnableSPBM"] = reflect.TypeOf((*FailToEnableSPBM)(nil)).Elem()
    +}
    +
    +type FailToEnableSPBMFault FailToEnableSPBM
    +
    +func init() {
    +	t["FailToEnableSPBMFault"] = reflect.TypeOf((*FailToEnableSPBMFault)(nil)).Elem()
    +}
    +
    +type FailToLockFaultToleranceVMs struct {
    +	RuntimeFault
    +
    +	VmName          string                 `xml:"vmName"`
    +	Vm              ManagedObjectReference `xml:"vm"`
    +	AlreadyLockedVm ManagedObjectReference `xml:"alreadyLockedVm"`
    +}
    +
    +func init() {
    +	t["FailToLockFaultToleranceVMs"] = reflect.TypeOf((*FailToLockFaultToleranceVMs)(nil)).Elem()
    +}
    +
    +type FailToLockFaultToleranceVMsFault FailToLockFaultToleranceVMs
    +
    +func init() {
    +	t["FailToLockFaultToleranceVMsFault"] = reflect.TypeOf((*FailToLockFaultToleranceVMsFault)(nil)).Elem()
    +}
    +
    +type FailoverLevelRestored struct {
    +	ClusterEvent
    +}
    +
    +func init() {
    +	t["FailoverLevelRestored"] = reflect.TypeOf((*FailoverLevelRestored)(nil)).Elem()
    +}
    +
    +type FailoverNodeInfo struct {
    +	DynamicData
    +
    +	ClusterIpSettings CustomizationIPSettings  `xml:"clusterIpSettings"`
    +	FailoverIp        *CustomizationIPSettings `xml:"failoverIp,omitempty"`
    +	BiosUuid          string                   `xml:"biosUuid,omitempty"`
    +}
    +
    +func init() {
    +	t["FailoverNodeInfo"] = reflect.TypeOf((*FailoverNodeInfo)(nil)).Elem()
    +}
    +
    +type FaultDomainId struct {
    +	DynamicData
    +
    +	Id string `xml:"id"`
    +}
    +
    +func init() {
    +	t["FaultDomainId"] = reflect.TypeOf((*FaultDomainId)(nil)).Elem()
    +}
    +
    +type FaultToleranceAntiAffinityViolated struct {
    +	MigrationFault
    +
    +	HostName string                 `xml:"hostName"`
    +	Host     ManagedObjectReference `xml:"host"`
    +}
    +
    +func init() {
    +	t["FaultToleranceAntiAffinityViolated"] = reflect.TypeOf((*FaultToleranceAntiAffinityViolated)(nil)).Elem()
    +}
    +
    +type FaultToleranceAntiAffinityViolatedFault FaultToleranceAntiAffinityViolated
    +
    +func init() {
    +	t["FaultToleranceAntiAffinityViolatedFault"] = reflect.TypeOf((*FaultToleranceAntiAffinityViolatedFault)(nil)).Elem()
    +}
    +
    +type FaultToleranceCannotEditMem struct {
    +	VmConfigFault
    +
    +	VmName string                 `xml:"vmName"`
    +	Vm     ManagedObjectReference `xml:"vm"`
    +}
    +
    +func init() {
    +	t["FaultToleranceCannotEditMem"] = reflect.TypeOf((*FaultToleranceCannotEditMem)(nil)).Elem()
    +}
    +
    +type FaultToleranceCannotEditMemFault FaultToleranceCannotEditMem
    +
    +func init() {
    +	t["FaultToleranceCannotEditMemFault"] = reflect.TypeOf((*FaultToleranceCannotEditMemFault)(nil)).Elem()
    +}
    +
    +type FaultToleranceConfigInfo struct {
    +	DynamicData
    +
    +	Role          int32    `xml:"role"`
    +	InstanceUuids []string `xml:"instanceUuids"`
    +	ConfigPaths   []string `xml:"configPaths"`
    +	Orphaned      *bool    `xml:"orphaned"`
    +}
    +
    +func init() {
    +	t["FaultToleranceConfigInfo"] = reflect.TypeOf((*FaultToleranceConfigInfo)(nil)).Elem()
    +}
    +
    +type FaultToleranceConfigSpec struct {
    +	DynamicData
    +
    +	MetaDataPath    *FaultToleranceMetaSpec     `xml:"metaDataPath,omitempty"`
    +	SecondaryVmSpec *FaultToleranceVMConfigSpec `xml:"secondaryVmSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["FaultToleranceConfigSpec"] = reflect.TypeOf((*FaultToleranceConfigSpec)(nil)).Elem()
    +}
    +
    +type FaultToleranceCpuIncompatible struct {
    +	CpuIncompatible
    +
    +	Model    bool `xml:"model"`
    +	Family   bool `xml:"family"`
    +	Stepping bool `xml:"stepping"`
    +}
    +
    +func init() {
    +	t["FaultToleranceCpuIncompatible"] = reflect.TypeOf((*FaultToleranceCpuIncompatible)(nil)).Elem()
    +}
    +
    +type FaultToleranceCpuIncompatibleFault FaultToleranceCpuIncompatible
    +
    +func init() {
    +	t["FaultToleranceCpuIncompatibleFault"] = reflect.TypeOf((*FaultToleranceCpuIncompatibleFault)(nil)).Elem()
    +}
    +
    +type FaultToleranceDiskSpec struct {
    +	DynamicData
    +
    +	Disk      BaseVirtualDevice      `xml:"disk,typeattr"`
    +	Datastore ManagedObjectReference `xml:"datastore"`
    +}
    +
    +func init() {
    +	t["FaultToleranceDiskSpec"] = reflect.TypeOf((*FaultToleranceDiskSpec)(nil)).Elem()
    +}
    +
    +type FaultToleranceMetaSpec struct {
    +	DynamicData
    +
    +	MetaDataDatastore ManagedObjectReference `xml:"metaDataDatastore"`
    +}
    +
    +func init() {
    +	t["FaultToleranceMetaSpec"] = reflect.TypeOf((*FaultToleranceMetaSpec)(nil)).Elem()
    +}
    +
    +type FaultToleranceNeedsThickDisk struct {
    +	MigrationFault
    +
    +	VmName string `xml:"vmName"`
    +}
    +
    +func init() {
    +	t["FaultToleranceNeedsThickDisk"] = reflect.TypeOf((*FaultToleranceNeedsThickDisk)(nil)).Elem()
    +}
    +
    +type FaultToleranceNeedsThickDiskFault FaultToleranceNeedsThickDisk
    +
    +func init() {
    +	t["FaultToleranceNeedsThickDiskFault"] = reflect.TypeOf((*FaultToleranceNeedsThickDiskFault)(nil)).Elem()
    +}
    +
    +type FaultToleranceNotLicensed struct {
    +	VmFaultToleranceIssue
    +
    +	HostName string `xml:"hostName,omitempty"`
    +}
    +
    +func init() {
    +	t["FaultToleranceNotLicensed"] = reflect.TypeOf((*FaultToleranceNotLicensed)(nil)).Elem()
    +}
    +
    +type FaultToleranceNotLicensedFault FaultToleranceNotLicensed
    +
    +func init() {
    +	t["FaultToleranceNotLicensedFault"] = reflect.TypeOf((*FaultToleranceNotLicensedFault)(nil)).Elem()
    +}
    +
    +type FaultToleranceNotSameBuild struct {
    +	MigrationFault
    +
    +	Build string `xml:"build"`
    +}
    +
    +func init() {
    +	t["FaultToleranceNotSameBuild"] = reflect.TypeOf((*FaultToleranceNotSameBuild)(nil)).Elem()
    +}
    +
    +type FaultToleranceNotSameBuildFault FaultToleranceNotSameBuild
    +
    +func init() {
    +	t["FaultToleranceNotSameBuildFault"] = reflect.TypeOf((*FaultToleranceNotSameBuildFault)(nil)).Elem()
    +}
    +
    +type FaultTolerancePrimaryConfigInfo struct {
    +	FaultToleranceConfigInfo
    +
    +	Secondaries []ManagedObjectReference `xml:"secondaries"`
    +}
    +
    +func init() {
    +	t["FaultTolerancePrimaryConfigInfo"] = reflect.TypeOf((*FaultTolerancePrimaryConfigInfo)(nil)).Elem()
    +}
    +
    +type FaultTolerancePrimaryPowerOnNotAttempted struct {
    +	VmFaultToleranceIssue
    +
    +	SecondaryVm ManagedObjectReference `xml:"secondaryVm"`
    +	PrimaryVm   ManagedObjectReference `xml:"primaryVm"`
    +}
    +
    +func init() {
    +	t["FaultTolerancePrimaryPowerOnNotAttempted"] = reflect.TypeOf((*FaultTolerancePrimaryPowerOnNotAttempted)(nil)).Elem()
    +}
    +
    +type FaultTolerancePrimaryPowerOnNotAttemptedFault FaultTolerancePrimaryPowerOnNotAttempted
    +
    +func init() {
    +	t["FaultTolerancePrimaryPowerOnNotAttemptedFault"] = reflect.TypeOf((*FaultTolerancePrimaryPowerOnNotAttemptedFault)(nil)).Elem()
    +}
    +
    +type FaultToleranceSecondaryConfigInfo struct {
    +	FaultToleranceConfigInfo
    +
    +	PrimaryVM ManagedObjectReference `xml:"primaryVM"`
    +}
    +
    +func init() {
    +	t["FaultToleranceSecondaryConfigInfo"] = reflect.TypeOf((*FaultToleranceSecondaryConfigInfo)(nil)).Elem()
    +}
    +
    +type FaultToleranceSecondaryOpResult struct {
    +	DynamicData
    +
    +	Vm               ManagedObjectReference  `xml:"vm"`
    +	PowerOnAttempted bool                    `xml:"powerOnAttempted"`
    +	PowerOnResult    *ClusterPowerOnVmResult `xml:"powerOnResult,omitempty"`
    +}
    +
    +func init() {
    +	t["FaultToleranceSecondaryOpResult"] = reflect.TypeOf((*FaultToleranceSecondaryOpResult)(nil)).Elem()
    +}
    +
    +type FaultToleranceVMConfigSpec struct {
    +	DynamicData
    +
    +	VmConfig *ManagedObjectReference  `xml:"vmConfig,omitempty"`
    +	Disks    []FaultToleranceDiskSpec `xml:"disks,omitempty"`
    +}
    +
    +func init() {
    +	t["FaultToleranceVMConfigSpec"] = reflect.TypeOf((*FaultToleranceVMConfigSpec)(nil)).Elem()
    +}
    +
    +type FaultToleranceVmNotDasProtected struct {
    +	VimFault
    +
    +	Vm     ManagedObjectReference `xml:"vm"`
    +	VmName string                 `xml:"vmName"`
    +}
    +
    +func init() {
    +	t["FaultToleranceVmNotDasProtected"] = reflect.TypeOf((*FaultToleranceVmNotDasProtected)(nil)).Elem()
    +}
    +
    +type FaultToleranceVmNotDasProtectedFault FaultToleranceVmNotDasProtected
    +
    +func init() {
    +	t["FaultToleranceVmNotDasProtectedFault"] = reflect.TypeOf((*FaultToleranceVmNotDasProtectedFault)(nil)).Elem()
    +}
    +
    +type FaultsByHost struct {
    +	DynamicData
    +
    +	Host   ManagedObjectReference `xml:"host"`
    +	Faults []LocalizedMethodFault `xml:"faults,omitempty"`
    +}
    +
    +func init() {
    +	t["FaultsByHost"] = reflect.TypeOf((*FaultsByHost)(nil)).Elem()
    +}
    +
    +type FaultsByVM struct {
    +	DynamicData
    +
    +	Vm     ManagedObjectReference `xml:"vm"`
    +	Faults []LocalizedMethodFault `xml:"faults,omitempty"`
    +}
    +
    +func init() {
    +	t["FaultsByVM"] = reflect.TypeOf((*FaultsByVM)(nil)).Elem()
    +}
    +
    +type FcoeConfig struct {
    +	DynamicData
    +
    +	PriorityClass int32                      `xml:"priorityClass"`
    +	SourceMac     string                     `xml:"sourceMac"`
    +	VlanRange     []FcoeConfigVlanRange      `xml:"vlanRange"`
    +	Capabilities  FcoeConfigFcoeCapabilities `xml:"capabilities"`
    +	FcoeActive    bool                       `xml:"fcoeActive"`
    +}
    +
    +func init() {
    +	t["FcoeConfig"] = reflect.TypeOf((*FcoeConfig)(nil)).Elem()
    +}
    +
    +type FcoeConfigFcoeCapabilities struct {
    +	DynamicData
    +
    +	PriorityClass    bool `xml:"priorityClass"`
    +	SourceMacAddress bool `xml:"sourceMacAddress"`
    +	VlanRange        bool `xml:"vlanRange"`
    +}
    +
    +func init() {
    +	t["FcoeConfigFcoeCapabilities"] = reflect.TypeOf((*FcoeConfigFcoeCapabilities)(nil)).Elem()
    +}
    +
    +type FcoeConfigFcoeSpecification struct {
    +	DynamicData
    +
    +	UnderlyingPnic string                `xml:"underlyingPnic"`
    +	PriorityClass  int32                 `xml:"priorityClass,omitempty"`
    +	SourceMac      string                `xml:"sourceMac,omitempty"`
    +	VlanRange      []FcoeConfigVlanRange `xml:"vlanRange,omitempty"`
    +}
    +
    +func init() {
    +	t["FcoeConfigFcoeSpecification"] = reflect.TypeOf((*FcoeConfigFcoeSpecification)(nil)).Elem()
    +}
    +
    +type FcoeConfigVlanRange struct {
    +	DynamicData
    +
    +	VlanLow  int32 `xml:"vlanLow"`
    +	VlanHigh int32 `xml:"vlanHigh"`
    +}
    +
    +func init() {
    +	t["FcoeConfigVlanRange"] = reflect.TypeOf((*FcoeConfigVlanRange)(nil)).Elem()
    +}
    +
    +type FcoeFault struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["FcoeFault"] = reflect.TypeOf((*FcoeFault)(nil)).Elem()
    +}
    +
    +type FcoeFaultFault BaseFcoeFault
    +
    +func init() {
    +	t["FcoeFaultFault"] = reflect.TypeOf((*FcoeFaultFault)(nil)).Elem()
    +}
    +
    +type FcoeFaultPnicHasNoPortSet struct {
    +	FcoeFault
    +
    +	NicDevice string `xml:"nicDevice"`
    +}
    +
    +func init() {
    +	t["FcoeFaultPnicHasNoPortSet"] = reflect.TypeOf((*FcoeFaultPnicHasNoPortSet)(nil)).Elem()
    +}
    +
    +type FcoeFaultPnicHasNoPortSetFault FcoeFaultPnicHasNoPortSet
    +
    +func init() {
    +	t["FcoeFaultPnicHasNoPortSetFault"] = reflect.TypeOf((*FcoeFaultPnicHasNoPortSetFault)(nil)).Elem()
    +}
    +
    +type FeatureRequirementsNotMet struct {
    +	VirtualHardwareCompatibilityIssue
    +
    +	FeatureRequirement []VirtualMachineFeatureRequirement `xml:"featureRequirement,omitempty"`
    +	Vm                 *ManagedObjectReference            `xml:"vm,omitempty"`
    +	Host               *ManagedObjectReference            `xml:"host,omitempty"`
    +}
    +
    +func init() {
    +	t["FeatureRequirementsNotMet"] = reflect.TypeOf((*FeatureRequirementsNotMet)(nil)).Elem()
    +}
    +
    +type FeatureRequirementsNotMetFault FeatureRequirementsNotMet
    +
    +func init() {
    +	t["FeatureRequirementsNotMetFault"] = reflect.TypeOf((*FeatureRequirementsNotMetFault)(nil)).Elem()
    +}
    +
    +type FetchDVPortKeys FetchDVPortKeysRequestType
    +
    +func init() {
    +	t["FetchDVPortKeys"] = reflect.TypeOf((*FetchDVPortKeys)(nil)).Elem()
    +}
    +
    +type FetchDVPortKeysRequestType struct {
    +	This     ManagedObjectReference                `xml:"_this"`
    +	Criteria *DistributedVirtualSwitchPortCriteria `xml:"criteria,omitempty"`
    +}
    +
    +func init() {
    +	t["FetchDVPortKeysRequestType"] = reflect.TypeOf((*FetchDVPortKeysRequestType)(nil)).Elem()
    +}
    +
    +type FetchDVPortKeysResponse struct {
    +	Returnval []string `xml:"returnval,omitempty"`
    +}
    +
    +type FetchDVPorts FetchDVPortsRequestType
    +
    +func init() {
    +	t["FetchDVPorts"] = reflect.TypeOf((*FetchDVPorts)(nil)).Elem()
    +}
    +
    +type FetchDVPortsRequestType struct {
    +	This     ManagedObjectReference                `xml:"_this"`
    +	Criteria *DistributedVirtualSwitchPortCriteria `xml:"criteria,omitempty"`
    +}
    +
    +func init() {
    +	t["FetchDVPortsRequestType"] = reflect.TypeOf((*FetchDVPortsRequestType)(nil)).Elem()
    +}
    +
    +type FetchDVPortsResponse struct {
    +	Returnval []DistributedVirtualPort `xml:"returnval,omitempty"`
    +}
    +
    +type FetchSystemEventLog FetchSystemEventLogRequestType
    +
    +func init() {
    +	t["FetchSystemEventLog"] = reflect.TypeOf((*FetchSystemEventLog)(nil)).Elem()
    +}
    +
    +type FetchSystemEventLogRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["FetchSystemEventLogRequestType"] = reflect.TypeOf((*FetchSystemEventLogRequestType)(nil)).Elem()
    +}
    +
    +type FetchSystemEventLogResponse struct {
    +	Returnval []SystemEventInfo `xml:"returnval,omitempty"`
    +}
    +
    +type FetchUserPrivilegeOnEntities FetchUserPrivilegeOnEntitiesRequestType
    +
    +func init() {
    +	t["FetchUserPrivilegeOnEntities"] = reflect.TypeOf((*FetchUserPrivilegeOnEntities)(nil)).Elem()
    +}
    +
    +type FetchUserPrivilegeOnEntitiesRequestType struct {
    +	This     ManagedObjectReference   `xml:"_this"`
    +	Entities []ManagedObjectReference `xml:"entities"`
    +	UserName string                   `xml:"userName"`
    +}
    +
    +func init() {
    +	t["FetchUserPrivilegeOnEntitiesRequestType"] = reflect.TypeOf((*FetchUserPrivilegeOnEntitiesRequestType)(nil)).Elem()
    +}
    +
    +type FetchUserPrivilegeOnEntitiesResponse struct {
    +	Returnval []UserPrivilegeResult `xml:"returnval,omitempty"`
    +}
    +
    +type FileAlreadyExists struct {
    +	FileFault
    +}
    +
    +func init() {
    +	t["FileAlreadyExists"] = reflect.TypeOf((*FileAlreadyExists)(nil)).Elem()
    +}
    +
    +type FileAlreadyExistsFault FileAlreadyExists
    +
    +func init() {
    +	t["FileAlreadyExistsFault"] = reflect.TypeOf((*FileAlreadyExistsFault)(nil)).Elem()
    +}
    +
    +type FileBackedPortNotSupported struct {
    +	DeviceNotSupported
    +}
    +
    +func init() {
    +	t["FileBackedPortNotSupported"] = reflect.TypeOf((*FileBackedPortNotSupported)(nil)).Elem()
    +}
    +
    +type FileBackedPortNotSupportedFault FileBackedPortNotSupported
    +
    +func init() {
    +	t["FileBackedPortNotSupportedFault"] = reflect.TypeOf((*FileBackedPortNotSupportedFault)(nil)).Elem()
    +}
    +
    +type FileBackedVirtualDiskSpec struct {
    +	VirtualDiskSpec
    +
    +	CapacityKb int64                           `xml:"capacityKb"`
    +	Profile    []BaseVirtualMachineProfileSpec `xml:"profile,omitempty,typeattr"`
    +	Crypto     BaseCryptoSpec                  `xml:"crypto,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["FileBackedVirtualDiskSpec"] = reflect.TypeOf((*FileBackedVirtualDiskSpec)(nil)).Elem()
    +}
    +
    +type FileFault struct {
    +	VimFault
    +
    +	File string `xml:"file"`
    +}
    +
    +func init() {
    +	t["FileFault"] = reflect.TypeOf((*FileFault)(nil)).Elem()
    +}
    +
    +type FileFaultFault BaseFileFault
    +
    +func init() {
    +	t["FileFaultFault"] = reflect.TypeOf((*FileFaultFault)(nil)).Elem()
    +}
    +
    +type FileInfo struct {
    +	DynamicData
    +
    +	Path         string     `xml:"path"`
    +	FriendlyName string     `xml:"friendlyName,omitempty"`
    +	FileSize     int64      `xml:"fileSize,omitempty"`
    +	Modification *time.Time `xml:"modification"`
    +	Owner        string     `xml:"owner,omitempty"`
    +}
    +
    +func init() {
    +	t["FileInfo"] = reflect.TypeOf((*FileInfo)(nil)).Elem()
    +}
    +
    +type FileLocked struct {
    +	FileFault
    +}
    +
    +func init() {
    +	t["FileLocked"] = reflect.TypeOf((*FileLocked)(nil)).Elem()
    +}
    +
    +type FileLockedFault FileLocked
    +
    +func init() {
    +	t["FileLockedFault"] = reflect.TypeOf((*FileLockedFault)(nil)).Elem()
    +}
    +
    +type FileNameTooLong struct {
    +	FileFault
    +}
    +
    +func init() {
    +	t["FileNameTooLong"] = reflect.TypeOf((*FileNameTooLong)(nil)).Elem()
    +}
    +
    +type FileNameTooLongFault FileNameTooLong
    +
    +func init() {
    +	t["FileNameTooLongFault"] = reflect.TypeOf((*FileNameTooLongFault)(nil)).Elem()
    +}
    +
    +type FileNotFound struct {
    +	FileFault
    +}
    +
    +func init() {
    +	t["FileNotFound"] = reflect.TypeOf((*FileNotFound)(nil)).Elem()
    +}
    +
    +type FileNotFoundFault FileNotFound
    +
    +func init() {
    +	t["FileNotFoundFault"] = reflect.TypeOf((*FileNotFoundFault)(nil)).Elem()
    +}
    +
    +type FileNotWritable struct {
    +	FileFault
    +}
    +
    +func init() {
    +	t["FileNotWritable"] = reflect.TypeOf((*FileNotWritable)(nil)).Elem()
    +}
    +
    +type FileNotWritableFault FileNotWritable
    +
    +func init() {
    +	t["FileNotWritableFault"] = reflect.TypeOf((*FileNotWritableFault)(nil)).Elem()
    +}
    +
    +type FileQuery struct {
    +	DynamicData
    +}
    +
    +func init() {
    +	t["FileQuery"] = reflect.TypeOf((*FileQuery)(nil)).Elem()
    +}
    +
    +type FileQueryFlags struct {
    +	DynamicData
    +
    +	FileType     bool  `xml:"fileType"`
    +	FileSize     bool  `xml:"fileSize"`
    +	Modification bool  `xml:"modification"`
    +	FileOwner    *bool `xml:"fileOwner"`
    +}
    +
    +func init() {
    +	t["FileQueryFlags"] = reflect.TypeOf((*FileQueryFlags)(nil)).Elem()
    +}
    +
    +type FileTooLarge struct {
    +	FileFault
    +
    +	Datastore   string `xml:"datastore"`
    +	FileSize    int64  `xml:"fileSize"`
    +	MaxFileSize int64  `xml:"maxFileSize,omitempty"`
    +}
    +
    +func init() {
    +	t["FileTooLarge"] = reflect.TypeOf((*FileTooLarge)(nil)).Elem()
    +}
    +
    +type FileTooLargeFault FileTooLarge
    +
    +func init() {
    +	t["FileTooLargeFault"] = reflect.TypeOf((*FileTooLargeFault)(nil)).Elem()
    +}
    +
    +type FileTransferInformation struct {
    +	DynamicData
    +
    +	Attributes BaseGuestFileAttributes `xml:"attributes,typeattr"`
    +	Size       int64                   `xml:"size"`
    +	Url        string                  `xml:"url"`
    +}
    +
    +func init() {
    +	t["FileTransferInformation"] = reflect.TypeOf((*FileTransferInformation)(nil)).Elem()
    +}
    +
    +type FilesystemQuiesceFault struct {
    +	SnapshotFault
    +}
    +
    +func init() {
    +	t["FilesystemQuiesceFault"] = reflect.TypeOf((*FilesystemQuiesceFault)(nil)).Elem()
    +}
    +
    +type FilesystemQuiesceFaultFault FilesystemQuiesceFault
    +
    +func init() {
    +	t["FilesystemQuiesceFaultFault"] = reflect.TypeOf((*FilesystemQuiesceFaultFault)(nil)).Elem()
    +}
    +
    +type FilterInUse struct {
    +	ResourceInUse
    +
    +	Disk []VirtualDiskId `xml:"disk,omitempty"`
    +}
    +
    +func init() {
    +	t["FilterInUse"] = reflect.TypeOf((*FilterInUse)(nil)).Elem()
    +}
    +
    +type FilterInUseFault FilterInUse
    +
    +func init() {
    +	t["FilterInUseFault"] = reflect.TypeOf((*FilterInUseFault)(nil)).Elem()
    +}
    +
    +type FindAllByDnsName FindAllByDnsNameRequestType
    +
    +func init() {
    +	t["FindAllByDnsName"] = reflect.TypeOf((*FindAllByDnsName)(nil)).Elem()
    +}
    +
    +type FindAllByDnsNameRequestType struct {
    +	This       ManagedObjectReference  `xml:"_this"`
    +	Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"`
    +	DnsName    string                  `xml:"dnsName"`
    +	VmSearch   bool                    `xml:"vmSearch"`
    +}
    +
    +func init() {
    +	t["FindAllByDnsNameRequestType"] = reflect.TypeOf((*FindAllByDnsNameRequestType)(nil)).Elem()
    +}
    +
    +type FindAllByDnsNameResponse struct {
    +	Returnval []ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type FindAllByIp FindAllByIpRequestType
    +
    +func init() {
    +	t["FindAllByIp"] = reflect.TypeOf((*FindAllByIp)(nil)).Elem()
    +}
    +
    +type FindAllByIpRequestType struct {
    +	This       ManagedObjectReference  `xml:"_this"`
    +	Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"`
    +	Ip         string                  `xml:"ip"`
    +	VmSearch   bool                    `xml:"vmSearch"`
    +}
    +
    +func init() {
    +	t["FindAllByIpRequestType"] = reflect.TypeOf((*FindAllByIpRequestType)(nil)).Elem()
    +}
    +
    +type FindAllByIpResponse struct {
    +	Returnval []ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type FindAllByUuid FindAllByUuidRequestType
    +
    +func init() {
    +	t["FindAllByUuid"] = reflect.TypeOf((*FindAllByUuid)(nil)).Elem()
    +}
    +
    +type FindAllByUuidRequestType struct {
    +	This         ManagedObjectReference  `xml:"_this"`
    +	Datacenter   *ManagedObjectReference `xml:"datacenter,omitempty"`
    +	Uuid         string                  `xml:"uuid"`
    +	VmSearch     bool                    `xml:"vmSearch"`
    +	InstanceUuid *bool                   `xml:"instanceUuid"`
    +}
    +
    +func init() {
    +	t["FindAllByUuidRequestType"] = reflect.TypeOf((*FindAllByUuidRequestType)(nil)).Elem()
    +}
    +
    +type FindAllByUuidResponse struct {
    +	Returnval []ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type FindAssociatedProfile FindAssociatedProfileRequestType
    +
    +func init() {
    +	t["FindAssociatedProfile"] = reflect.TypeOf((*FindAssociatedProfile)(nil)).Elem()
    +}
    +
    +type FindAssociatedProfileRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	Entity ManagedObjectReference `xml:"entity"`
    +}
    +
    +func init() {
    +	t["FindAssociatedProfileRequestType"] = reflect.TypeOf((*FindAssociatedProfileRequestType)(nil)).Elem()
    +}
    +
    +type FindAssociatedProfileResponse struct {
    +	Returnval []ManagedObjectReference `xml:"returnval,omitempty"`
    +}
    +
    +type FindByDatastorePath FindByDatastorePathRequestType
    +
    +func init() {
    +	t["FindByDatastorePath"] = reflect.TypeOf((*FindByDatastorePath)(nil)).Elem()
    +}
    +
    +type FindByDatastorePathRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	Datacenter ManagedObjectReference `xml:"datacenter"`
    +	Path       string                 `xml:"path"`
    +}
    +
    +func init() {
    +	t["FindByDatastorePathRequestType"] = reflect.TypeOf((*FindByDatastorePathRequestType)(nil)).Elem()
    +}
    +
    +type FindByDatastorePathResponse struct {
    +	Returnval *ManagedObjectReference `xml:"returnval,omitempty"`
    +}
    +
    +type FindByDnsName FindByDnsNameRequestType
    +
    +func init() {
    +	t["FindByDnsName"] = reflect.TypeOf((*FindByDnsName)(nil)).Elem()
    +}
    +
    +type FindByDnsNameRequestType struct {
    +	This       ManagedObjectReference  `xml:"_this"`
    +	Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"`
    +	DnsName    string                  `xml:"dnsName"`
    +	VmSearch   bool                    `xml:"vmSearch"`
    +}
    +
    +func init() {
    +	t["FindByDnsNameRequestType"] = reflect.TypeOf((*FindByDnsNameRequestType)(nil)).Elem()
    +}
    +
    +type FindByDnsNameResponse struct {
    +	Returnval *ManagedObjectReference `xml:"returnval,omitempty"`
    +}
    +
    +type FindByInventoryPath FindByInventoryPathRequestType
    +
    +func init() {
    +	t["FindByInventoryPath"] = reflect.TypeOf((*FindByInventoryPath)(nil)).Elem()
    +}
    +
    +type FindByInventoryPathRequestType struct {
    +	This          ManagedObjectReference `xml:"_this"`
    +	InventoryPath string                 `xml:"inventoryPath"`
    +}
    +
    +func init() {
    +	t["FindByInventoryPathRequestType"] = reflect.TypeOf((*FindByInventoryPathRequestType)(nil)).Elem()
    +}
    +
    +type FindByInventoryPathResponse struct {
    +	Returnval *ManagedObjectReference `xml:"returnval,omitempty"`
    +}
    +
    +type FindByIp FindByIpRequestType
    +
    +func init() {
    +	t["FindByIp"] = reflect.TypeOf((*FindByIp)(nil)).Elem()
    +}
    +
    +type FindByIpRequestType struct {
    +	This       ManagedObjectReference  `xml:"_this"`
    +	Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"`
    +	Ip         string                  `xml:"ip"`
    +	VmSearch   bool                    `xml:"vmSearch"`
    +}
    +
    +func init() {
    +	t["FindByIpRequestType"] = reflect.TypeOf((*FindByIpRequestType)(nil)).Elem()
    +}
    +
    +type FindByIpResponse struct {
    +	Returnval *ManagedObjectReference `xml:"returnval,omitempty"`
    +}
    +
    +type FindByUuid FindByUuidRequestType
    +
    +func init() {
    +	t["FindByUuid"] = reflect.TypeOf((*FindByUuid)(nil)).Elem()
    +}
    +
    +type FindByUuidRequestType struct {
    +	This         ManagedObjectReference  `xml:"_this"`
    +	Datacenter   *ManagedObjectReference `xml:"datacenter,omitempty"`
    +	Uuid         string                  `xml:"uuid"`
    +	VmSearch     bool                    `xml:"vmSearch"`
    +	InstanceUuid *bool                   `xml:"instanceUuid"`
    +}
    +
    +func init() {
    +	t["FindByUuidRequestType"] = reflect.TypeOf((*FindByUuidRequestType)(nil)).Elem()
    +}
    +
    +type FindByUuidResponse struct {
    +	Returnval *ManagedObjectReference `xml:"returnval,omitempty"`
    +}
    +
    +type FindChild FindChildRequestType
    +
    +func init() {
    +	t["FindChild"] = reflect.TypeOf((*FindChild)(nil)).Elem()
    +}
    +
    +type FindChildRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	Entity ManagedObjectReference `xml:"entity"`
    +	Name   string                 `xml:"name"`
    +}
    +
    +func init() {
    +	t["FindChildRequestType"] = reflect.TypeOf((*FindChildRequestType)(nil)).Elem()
    +}
    +
    +type FindChildResponse struct {
    +	Returnval *ManagedObjectReference `xml:"returnval,omitempty"`
    +}
    +
    +type FindExtension FindExtensionRequestType
    +
    +func init() {
    +	t["FindExtension"] = reflect.TypeOf((*FindExtension)(nil)).Elem()
    +}
    +
    +type FindExtensionRequestType struct {
    +	This         ManagedObjectReference `xml:"_this"`
    +	ExtensionKey string                 `xml:"extensionKey"`
    +}
    +
    +func init() {
    +	t["FindExtensionRequestType"] = reflect.TypeOf((*FindExtensionRequestType)(nil)).Elem()
    +}
    +
    +type FindExtensionResponse struct {
    +	Returnval *Extension `xml:"returnval,omitempty"`
    +}
    +
    +type FindRulesForVm FindRulesForVmRequestType
    +
    +func init() {
    +	t["FindRulesForVm"] = reflect.TypeOf((*FindRulesForVm)(nil)).Elem()
    +}
    +
    +type FindRulesForVmRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Vm   ManagedObjectReference `xml:"vm"`
    +}
    +
    +func init() {
    +	t["FindRulesForVmRequestType"] = reflect.TypeOf((*FindRulesForVmRequestType)(nil)).Elem()
    +}
    +
    +type FindRulesForVmResponse struct {
    +	Returnval []BaseClusterRuleInfo `xml:"returnval,omitempty,typeattr"`
    +}
    +
    +type FirewallProfile struct {
    +	ApplyProfile
    +
    +	Ruleset []FirewallProfileRulesetProfile `xml:"ruleset,omitempty"`
    +}
    +
    +func init() {
    +	t["FirewallProfile"] = reflect.TypeOf((*FirewallProfile)(nil)).Elem()
    +}
    +
    +type FirewallProfileRulesetProfile struct {
    +	ApplyProfile
    +
    +	Key string `xml:"key"`
    +}
    +
    +func init() {
    +	t["FirewallProfileRulesetProfile"] = reflect.TypeOf((*FirewallProfileRulesetProfile)(nil)).Elem()
    +}
    +
    +type FloatOption struct {
    +	OptionType
    +
    +	Min          float32 `xml:"min"`
    +	Max          float32 `xml:"max"`
    +	DefaultValue float32 `xml:"defaultValue"`
    +}
    +
    +func init() {
    +	t["FloatOption"] = reflect.TypeOf((*FloatOption)(nil)).Elem()
    +}
    +
    +type FloppyImageFileInfo struct {
    +	FileInfo
    +}
    +
    +func init() {
    +	t["FloppyImageFileInfo"] = reflect.TypeOf((*FloppyImageFileInfo)(nil)).Elem()
    +}
    +
    +type FloppyImageFileQuery struct {
    +	FileQuery
    +}
    +
    +func init() {
    +	t["FloppyImageFileQuery"] = reflect.TypeOf((*FloppyImageFileQuery)(nil)).Elem()
    +}
    +
    +type FolderEventArgument struct {
    +	EntityEventArgument
    +
    +	Folder ManagedObjectReference `xml:"folder"`
    +}
    +
    +func init() {
    +	t["FolderEventArgument"] = reflect.TypeOf((*FolderEventArgument)(nil)).Elem()
    +}
    +
    +type FolderFileInfo struct {
    +	FileInfo
    +}
    +
    +func init() {
    +	t["FolderFileInfo"] = reflect.TypeOf((*FolderFileInfo)(nil)).Elem()
    +}
    +
    +type FolderFileQuery struct {
    +	FileQuery
    +}
    +
    +func init() {
    +	t["FolderFileQuery"] = reflect.TypeOf((*FolderFileQuery)(nil)).Elem()
    +}
    +
    +type FormatVffs FormatVffsRequestType
    +
    +func init() {
    +	t["FormatVffs"] = reflect.TypeOf((*FormatVffs)(nil)).Elem()
    +}
    +
    +type FormatVffsRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	CreateSpec HostVffsSpec           `xml:"createSpec"`
    +}
    +
    +func init() {
    +	t["FormatVffsRequestType"] = reflect.TypeOf((*FormatVffsRequestType)(nil)).Elem()
    +}
    +
    +type FormatVffsResponse struct {
    +	Returnval HostVffsVolume `xml:"returnval"`
    +}
    +
    +type FormatVmfs FormatVmfsRequestType
    +
    +func init() {
    +	t["FormatVmfs"] = reflect.TypeOf((*FormatVmfs)(nil)).Elem()
    +}
    +
    +type FormatVmfsRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	CreateSpec HostVmfsSpec           `xml:"createSpec"`
    +}
    +
    +func init() {
    +	t["FormatVmfsRequestType"] = reflect.TypeOf((*FormatVmfsRequestType)(nil)).Elem()
    +}
    +
    +type FormatVmfsResponse struct {
    +	Returnval HostVmfsVolume `xml:"returnval"`
    +}
    +
    +type FtIssuesOnHost struct {
    +	VmFaultToleranceIssue
    +
    +	Host     ManagedObjectReference `xml:"host"`
    +	HostName string                 `xml:"hostName"`
    +	Errors   []LocalizedMethodFault `xml:"errors,omitempty"`
    +}
    +
    +func init() {
    +	t["FtIssuesOnHost"] = reflect.TypeOf((*FtIssuesOnHost)(nil)).Elem()
    +}
    +
    +type FtIssuesOnHostFault FtIssuesOnHost
    +
    +func init() {
    +	t["FtIssuesOnHostFault"] = reflect.TypeOf((*FtIssuesOnHostFault)(nil)).Elem()
    +}
    +
    +type FullStorageVMotionNotSupported struct {
    +	MigrationFeatureNotSupported
    +}
    +
    +func init() {
    +	t["FullStorageVMotionNotSupported"] = reflect.TypeOf((*FullStorageVMotionNotSupported)(nil)).Elem()
    +}
    +
    +type FullStorageVMotionNotSupportedFault FullStorageVMotionNotSupported
    +
    +func init() {
    +	t["FullStorageVMotionNotSupportedFault"] = reflect.TypeOf((*FullStorageVMotionNotSupportedFault)(nil)).Elem()
    +}
    +
    +type GatewayConnectFault struct {
    +	HostConnectFault
    +
    +	GatewayType string              `xml:"gatewayType"`
    +	GatewayId   string              `xml:"gatewayId"`
    +	GatewayInfo string              `xml:"gatewayInfo"`
    +	Details     *LocalizableMessage `xml:"details,omitempty"`
    +}
    +
    +func init() {
    +	t["GatewayConnectFault"] = reflect.TypeOf((*GatewayConnectFault)(nil)).Elem()
    +}
    +
    +type GatewayConnectFaultFault BaseGatewayConnectFault
    +
    +func init() {
    +	t["GatewayConnectFaultFault"] = reflect.TypeOf((*GatewayConnectFaultFault)(nil)).Elem()
    +}
    +
    +type GatewayHostNotReachable struct {
    +	GatewayToHostConnectFault
    +}
    +
    +func init() {
    +	t["GatewayHostNotReachable"] = reflect.TypeOf((*GatewayHostNotReachable)(nil)).Elem()
    +}
    +
    +type GatewayHostNotReachableFault GatewayHostNotReachable
    +
    +func init() {
    +	t["GatewayHostNotReachableFault"] = reflect.TypeOf((*GatewayHostNotReachableFault)(nil)).Elem()
    +}
    +
    +type GatewayNotFound struct {
    +	GatewayConnectFault
    +}
    +
    +func init() {
    +	t["GatewayNotFound"] = reflect.TypeOf((*GatewayNotFound)(nil)).Elem()
    +}
    +
    +type GatewayNotFoundFault GatewayNotFound
    +
    +func init() {
    +	t["GatewayNotFoundFault"] = reflect.TypeOf((*GatewayNotFoundFault)(nil)).Elem()
    +}
    +
    +type GatewayNotReachable struct {
    +	GatewayConnectFault
    +}
    +
    +func init() {
    +	t["GatewayNotReachable"] = reflect.TypeOf((*GatewayNotReachable)(nil)).Elem()
    +}
    +
    +type GatewayNotReachableFault GatewayNotReachable
    +
    +func init() {
    +	t["GatewayNotReachableFault"] = reflect.TypeOf((*GatewayNotReachableFault)(nil)).Elem()
    +}
    +
    +type GatewayOperationRefused struct {
    +	GatewayConnectFault
    +}
    +
    +func init() {
    +	t["GatewayOperationRefused"] = reflect.TypeOf((*GatewayOperationRefused)(nil)).Elem()
    +}
    +
    +type GatewayOperationRefusedFault GatewayOperationRefused
    +
    +func init() {
    +	t["GatewayOperationRefusedFault"] = reflect.TypeOf((*GatewayOperationRefusedFault)(nil)).Elem()
    +}
    +
    +type GatewayToHostAuthFault struct {
    +	GatewayToHostConnectFault
    +
    +	InvalidProperties []string `xml:"invalidProperties"`
    +	MissingProperties []string `xml:"missingProperties"`
    +}
    +
    +func init() {
    +	t["GatewayToHostAuthFault"] = reflect.TypeOf((*GatewayToHostAuthFault)(nil)).Elem()
    +}
    +
    +type GatewayToHostAuthFaultFault GatewayToHostAuthFault
    +
    +func init() {
    +	t["GatewayToHostAuthFaultFault"] = reflect.TypeOf((*GatewayToHostAuthFaultFault)(nil)).Elem()
    +}
    +
    +type GatewayToHostConnectFault struct {
    +	GatewayConnectFault
    +
    +	Hostname string `xml:"hostname"`
    +	Port     int32  `xml:"port,omitempty"`
    +}
    +
    +func init() {
    +	t["GatewayToHostConnectFault"] = reflect.TypeOf((*GatewayToHostConnectFault)(nil)).Elem()
    +}
    +
    +type GatewayToHostConnectFaultFault BaseGatewayToHostConnectFault
    +
    +func init() {
    +	t["GatewayToHostConnectFaultFault"] = reflect.TypeOf((*GatewayToHostConnectFaultFault)(nil)).Elem()
    +}
    +
    +type GatewayToHostTrustVerifyFault struct {
    +	GatewayToHostConnectFault
    +
    +	VerificationToken  string     `xml:"verificationToken"`
    +	PropertiesToVerify []KeyValue `xml:"propertiesToVerify"`
    +}
    +
    +func init() {
    +	t["GatewayToHostTrustVerifyFault"] = reflect.TypeOf((*GatewayToHostTrustVerifyFault)(nil)).Elem()
    +}
    +
    +type GatewayToHostTrustVerifyFaultFault GatewayToHostTrustVerifyFault
    +
    +func init() {
    +	t["GatewayToHostTrustVerifyFaultFault"] = reflect.TypeOf((*GatewayToHostTrustVerifyFaultFault)(nil)).Elem()
    +}
    +
    +type GeneralEvent struct {
    +	Event
    +
    +	Message string `xml:"message"`
    +}
    +
    +func init() {
    +	t["GeneralEvent"] = reflect.TypeOf((*GeneralEvent)(nil)).Elem()
    +}
    +
    +type GeneralHostErrorEvent struct {
    +	GeneralEvent
    +}
    +
    +func init() {
    +	t["GeneralHostErrorEvent"] = reflect.TypeOf((*GeneralHostErrorEvent)(nil)).Elem()
    +}
    +
    +type GeneralHostInfoEvent struct {
    +	GeneralEvent
    +}
    +
    +func init() {
    +	t["GeneralHostInfoEvent"] = reflect.TypeOf((*GeneralHostInfoEvent)(nil)).Elem()
    +}
    +
    +type GeneralHostWarningEvent struct {
    +	GeneralEvent
    +}
    +
    +func init() {
    +	t["GeneralHostWarningEvent"] = reflect.TypeOf((*GeneralHostWarningEvent)(nil)).Elem()
    +}
    +
    +type GeneralUserEvent struct {
    +	GeneralEvent
    +
    +	Entity *ManagedEntityEventArgument `xml:"entity,omitempty"`
    +}
    +
    +func init() {
    +	t["GeneralUserEvent"] = reflect.TypeOf((*GeneralUserEvent)(nil)).Elem()
    +}
    +
    +type GeneralVmErrorEvent struct {
    +	GeneralEvent
    +}
    +
    +func init() {
    +	t["GeneralVmErrorEvent"] = reflect.TypeOf((*GeneralVmErrorEvent)(nil)).Elem()
    +}
    +
    +type GeneralVmInfoEvent struct {
    +	GeneralEvent
    +}
    +
    +func init() {
    +	t["GeneralVmInfoEvent"] = reflect.TypeOf((*GeneralVmInfoEvent)(nil)).Elem()
    +}
    +
    +type GeneralVmWarningEvent struct {
    +	GeneralEvent
    +}
    +
    +func init() {
    +	t["GeneralVmWarningEvent"] = reflect.TypeOf((*GeneralVmWarningEvent)(nil)).Elem()
    +}
    +
    +type GenerateCertificateSigningRequest GenerateCertificateSigningRequestRequestType
    +
    +func init() {
    +	t["GenerateCertificateSigningRequest"] = reflect.TypeOf((*GenerateCertificateSigningRequest)(nil)).Elem()
    +}
    +
    +type GenerateCertificateSigningRequestByDn GenerateCertificateSigningRequestByDnRequestType
    +
    +func init() {
    +	t["GenerateCertificateSigningRequestByDn"] = reflect.TypeOf((*GenerateCertificateSigningRequestByDn)(nil)).Elem()
    +}
    +
    +type GenerateCertificateSigningRequestByDnRequestType struct {
    +	This              ManagedObjectReference `xml:"_this"`
    +	DistinguishedName string                 `xml:"distinguishedName"`
    +}
    +
    +func init() {
    +	t["GenerateCertificateSigningRequestByDnRequestType"] = reflect.TypeOf((*GenerateCertificateSigningRequestByDnRequestType)(nil)).Elem()
    +}
    +
    +type GenerateCertificateSigningRequestByDnResponse struct {
    +	Returnval string `xml:"returnval"`
    +}
    +
    +type GenerateCertificateSigningRequestRequestType struct {
    +	This                     ManagedObjectReference `xml:"_this"`
    +	UseIpAddressAsCommonName bool                   `xml:"useIpAddressAsCommonName"`
    +}
    +
    +func init() {
    +	t["GenerateCertificateSigningRequestRequestType"] = reflect.TypeOf((*GenerateCertificateSigningRequestRequestType)(nil)).Elem()
    +}
    +
    +type GenerateCertificateSigningRequestResponse struct {
    +	Returnval string `xml:"returnval"`
    +}
    +
    +type GenerateClientCsr GenerateClientCsrRequestType
    +
    +func init() {
    +	t["GenerateClientCsr"] = reflect.TypeOf((*GenerateClientCsr)(nil)).Elem()
    +}
    +
    +type GenerateClientCsrRequestType struct {
    +	This    ManagedObjectReference `xml:"_this"`
    +	Cluster KeyProviderId          `xml:"cluster"`
    +}
    +
    +func init() {
    +	t["GenerateClientCsrRequestType"] = reflect.TypeOf((*GenerateClientCsrRequestType)(nil)).Elem()
    +}
    +
    +type GenerateClientCsrResponse struct {
    +	Returnval string `xml:"returnval"`
    +}
    +
    +type GenerateConfigTaskList GenerateConfigTaskListRequestType
    +
    +func init() {
    +	t["GenerateConfigTaskList"] = reflect.TypeOf((*GenerateConfigTaskList)(nil)).Elem()
    +}
    +
    +type GenerateConfigTaskListRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	ConfigSpec HostConfigSpec         `xml:"configSpec"`
    +	Host       ManagedObjectReference `xml:"host"`
    +}
    +
    +func init() {
    +	t["GenerateConfigTaskListRequestType"] = reflect.TypeOf((*GenerateConfigTaskListRequestType)(nil)).Elem()
    +}
    +
    +type GenerateConfigTaskListResponse struct {
    +	Returnval HostProfileManagerConfigTaskList `xml:"returnval"`
    +}
    +
    +type GenerateHostConfigTaskSpecRequestType struct {
    +	This      ManagedObjectReference     `xml:"_this"`
    +	HostsInfo []StructuredCustomizations `xml:"hostsInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["GenerateHostConfigTaskSpecRequestType"] = reflect.TypeOf((*GenerateHostConfigTaskSpecRequestType)(nil)).Elem()
    +}
    +
    +type GenerateHostConfigTaskSpec_Task GenerateHostConfigTaskSpecRequestType
    +
    +func init() {
    +	t["GenerateHostConfigTaskSpec_Task"] = reflect.TypeOf((*GenerateHostConfigTaskSpec_Task)(nil)).Elem()
    +}
    +
    +type GenerateHostConfigTaskSpec_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type GenerateHostProfileTaskListRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	ConfigSpec HostConfigSpec         `xml:"configSpec"`
    +	Host       ManagedObjectReference `xml:"host"`
    +}
    +
    +func init() {
    +	t["GenerateHostProfileTaskListRequestType"] = reflect.TypeOf((*GenerateHostProfileTaskListRequestType)(nil)).Elem()
    +}
    +
    +type GenerateHostProfileTaskList_Task GenerateHostProfileTaskListRequestType
    +
    +func init() {
    +	t["GenerateHostProfileTaskList_Task"] = reflect.TypeOf((*GenerateHostProfileTaskList_Task)(nil)).Elem()
    +}
    +
    +type GenerateHostProfileTaskList_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type GenerateKey GenerateKeyRequestType
    +
    +func init() {
    +	t["GenerateKey"] = reflect.TypeOf((*GenerateKey)(nil)).Elem()
    +}
    +
    +type GenerateKeyRequestType struct {
    +	This        ManagedObjectReference `xml:"_this"`
    +	KeyProvider *KeyProviderId         `xml:"keyProvider,omitempty"`
    +}
    +
    +func init() {
    +	t["GenerateKeyRequestType"] = reflect.TypeOf((*GenerateKeyRequestType)(nil)).Elem()
    +}
    +
    +type GenerateKeyResponse struct {
    +	Returnval CryptoKeyResult `xml:"returnval"`
    +}
    +
    +type GenerateLogBundlesRequestType struct {
    +	This           ManagedObjectReference   `xml:"_this"`
    +	IncludeDefault bool                     `xml:"includeDefault"`
    +	Host           []ManagedObjectReference `xml:"host,omitempty"`
    +}
    +
    +func init() {
    +	t["GenerateLogBundlesRequestType"] = reflect.TypeOf((*GenerateLogBundlesRequestType)(nil)).Elem()
    +}
    +
    +type GenerateLogBundles_Task GenerateLogBundlesRequestType
    +
    +func init() {
    +	t["GenerateLogBundles_Task"] = reflect.TypeOf((*GenerateLogBundles_Task)(nil)).Elem()
    +}
    +
    +type GenerateLogBundles_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type GenerateSelfSignedClientCert GenerateSelfSignedClientCertRequestType
    +
    +func init() {
    +	t["GenerateSelfSignedClientCert"] = reflect.TypeOf((*GenerateSelfSignedClientCert)(nil)).Elem()
    +}
    +
    +type GenerateSelfSignedClientCertRequestType struct {
    +	This    ManagedObjectReference `xml:"_this"`
    +	Cluster KeyProviderId          `xml:"cluster"`
    +}
    +
    +func init() {
    +	t["GenerateSelfSignedClientCertRequestType"] = reflect.TypeOf((*GenerateSelfSignedClientCertRequestType)(nil)).Elem()
    +}
    +
    +type GenerateSelfSignedClientCertResponse struct {
    +	Returnval string `xml:"returnval"`
    +}
    +
    +type GenericDrsFault struct {
    +	VimFault
    +
    +	HostFaults []LocalizedMethodFault `xml:"hostFaults,omitempty"`
    +}
    +
    +func init() {
    +	t["GenericDrsFault"] = reflect.TypeOf((*GenericDrsFault)(nil)).Elem()
    +}
    +
    +type GenericDrsFaultFault GenericDrsFault
    +
    +func init() {
    +	t["GenericDrsFaultFault"] = reflect.TypeOf((*GenericDrsFaultFault)(nil)).Elem()
    +}
    +
    +type GenericVmConfigFault struct {
    +	VmConfigFault
    +
    +	Reason string `xml:"reason"`
    +}
    +
    +func init() {
    +	t["GenericVmConfigFault"] = reflect.TypeOf((*GenericVmConfigFault)(nil)).Elem()
    +}
    +
    +type GenericVmConfigFaultFault GenericVmConfigFault
    +
    +func init() {
    +	t["GenericVmConfigFaultFault"] = reflect.TypeOf((*GenericVmConfigFaultFault)(nil)).Elem()
    +}
    +
    +type GetAlarm GetAlarmRequestType
    +
    +func init() {
    +	t["GetAlarm"] = reflect.TypeOf((*GetAlarm)(nil)).Elem()
    +}
    +
    +type GetAlarmRequestType struct {
    +	This   ManagedObjectReference  `xml:"_this"`
    +	Entity *ManagedObjectReference `xml:"entity,omitempty"`
    +}
    +
    +func init() {
    +	t["GetAlarmRequestType"] = reflect.TypeOf((*GetAlarmRequestType)(nil)).Elem()
    +}
    +
    +type GetAlarmResponse struct {
    +	Returnval []ManagedObjectReference `xml:"returnval,omitempty"`
    +}
    +
    +type GetAlarmState GetAlarmStateRequestType
    +
    +func init() {
    +	t["GetAlarmState"] = reflect.TypeOf((*GetAlarmState)(nil)).Elem()
    +}
    +
    +type GetAlarmStateRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	Entity ManagedObjectReference `xml:"entity"`
    +}
    +
    +func init() {
    +	t["GetAlarmStateRequestType"] = reflect.TypeOf((*GetAlarmStateRequestType)(nil)).Elem()
    +}
    +
    +type GetAlarmStateResponse struct {
    +	Returnval []AlarmState `xml:"returnval,omitempty"`
    +}
    +
    +type GetCustomizationSpec GetCustomizationSpecRequestType
    +
    +func init() {
    +	t["GetCustomizationSpec"] = reflect.TypeOf((*GetCustomizationSpec)(nil)).Elem()
    +}
    +
    +type GetCustomizationSpecRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Name string                 `xml:"name"`
    +}
    +
    +func init() {
    +	t["GetCustomizationSpecRequestType"] = reflect.TypeOf((*GetCustomizationSpecRequestType)(nil)).Elem()
    +}
    +
    +type GetCustomizationSpecResponse struct {
    +	Returnval CustomizationSpecItem `xml:"returnval"`
    +}
    +
    +type GetPublicKey GetPublicKeyRequestType
    +
    +func init() {
    +	t["GetPublicKey"] = reflect.TypeOf((*GetPublicKey)(nil)).Elem()
    +}
    +
    +type GetPublicKeyRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["GetPublicKeyRequestType"] = reflect.TypeOf((*GetPublicKeyRequestType)(nil)).Elem()
    +}
    +
    +type GetPublicKeyResponse struct {
    +	Returnval string `xml:"returnval"`
    +}
    +
    +type GetResourceUsage GetResourceUsageRequestType
    +
    +func init() {
    +	t["GetResourceUsage"] = reflect.TypeOf((*GetResourceUsage)(nil)).Elem()
    +}
    +
    +type GetResourceUsageRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["GetResourceUsageRequestType"] = reflect.TypeOf((*GetResourceUsageRequestType)(nil)).Elem()
    +}
    +
    +type GetResourceUsageResponse struct {
    +	Returnval ClusterResourceUsageSummary `xml:"returnval"`
    +}
    +
    +type GetVchaClusterHealth GetVchaClusterHealthRequestType
    +
    +func init() {
    +	t["GetVchaClusterHealth"] = reflect.TypeOf((*GetVchaClusterHealth)(nil)).Elem()
    +}
    +
    +type GetVchaClusterHealthRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["GetVchaClusterHealthRequestType"] = reflect.TypeOf((*GetVchaClusterHealthRequestType)(nil)).Elem()
    +}
    +
    +type GetVchaClusterHealthResponse struct {
    +	Returnval VchaClusterHealth `xml:"returnval"`
    +}
    +
    +type GetVsanObjExtAttrs GetVsanObjExtAttrsRequestType
    +
    +func init() {
    +	t["GetVsanObjExtAttrs"] = reflect.TypeOf((*GetVsanObjExtAttrs)(nil)).Elem()
    +}
    +
    +type GetVsanObjExtAttrsRequestType struct {
    +	This  ManagedObjectReference `xml:"_this"`
    +	Uuids []string               `xml:"uuids"`
    +}
    +
    +func init() {
    +	t["GetVsanObjExtAttrsRequestType"] = reflect.TypeOf((*GetVsanObjExtAttrsRequestType)(nil)).Elem()
    +}
    +
    +type GetVsanObjExtAttrsResponse struct {
    +	Returnval string `xml:"returnval"`
    +}
    +
    +type GhostDvsProxySwitchDetectedEvent struct {
    +	HostEvent
    +
    +	SwitchUuid []string `xml:"switchUuid"`
    +}
    +
    +func init() {
    +	t["GhostDvsProxySwitchDetectedEvent"] = reflect.TypeOf((*GhostDvsProxySwitchDetectedEvent)(nil)).Elem()
    +}
    +
    +type GhostDvsProxySwitchRemovedEvent struct {
    +	HostEvent
    +
    +	SwitchUuid []string `xml:"switchUuid"`
    +}
    +
    +func init() {
    +	t["GhostDvsProxySwitchRemovedEvent"] = reflect.TypeOf((*GhostDvsProxySwitchRemovedEvent)(nil)).Elem()
    +}
    +
    +type GlobalMessageChangedEvent struct {
    +	SessionEvent
    +
    +	Message     string `xml:"message"`
    +	PrevMessage string `xml:"prevMessage,omitempty"`
    +}
    +
    +func init() {
    +	t["GlobalMessageChangedEvent"] = reflect.TypeOf((*GlobalMessageChangedEvent)(nil)).Elem()
    +}
    +
    +type GroupAlarmAction struct {
    +	AlarmAction
    +
    +	Action []BaseAlarmAction `xml:"action,typeattr"`
    +}
    +
    +func init() {
    +	t["GroupAlarmAction"] = reflect.TypeOf((*GroupAlarmAction)(nil)).Elem()
    +}
    +
    +type GuestAliases struct {
    +	DynamicData
    +
    +	Base64Cert string               `xml:"base64Cert"`
    +	Aliases    []GuestAuthAliasInfo `xml:"aliases"`
    +}
    +
    +func init() {
    +	t["GuestAliases"] = reflect.TypeOf((*GuestAliases)(nil)).Elem()
    +}
    +
    +type GuestAuthAliasInfo struct {
    +	DynamicData
    +
    +	Subject BaseGuestAuthSubject `xml:"subject,typeattr"`
    +	Comment string               `xml:"comment"`
    +}
    +
    +func init() {
    +	t["GuestAuthAliasInfo"] = reflect.TypeOf((*GuestAuthAliasInfo)(nil)).Elem()
    +}
    +
    +type GuestAuthAnySubject struct {
    +	GuestAuthSubject
    +}
    +
    +func init() {
    +	t["GuestAuthAnySubject"] = reflect.TypeOf((*GuestAuthAnySubject)(nil)).Elem()
    +}
    +
    +type GuestAuthNamedSubject struct {
    +	GuestAuthSubject
    +
    +	Name string `xml:"name"`
    +}
    +
    +func init() {
    +	t["GuestAuthNamedSubject"] = reflect.TypeOf((*GuestAuthNamedSubject)(nil)).Elem()
    +}
    +
    +type GuestAuthSubject struct {
    +	DynamicData
    +}
    +
    +func init() {
    +	t["GuestAuthSubject"] = reflect.TypeOf((*GuestAuthSubject)(nil)).Elem()
    +}
    +
    +type GuestAuthentication struct {
    +	DynamicData
    +
    +	InteractiveSession bool `xml:"interactiveSession"`
    +}
    +
    +func init() {
    +	t["GuestAuthentication"] = reflect.TypeOf((*GuestAuthentication)(nil)).Elem()
    +}
    +
    +type GuestAuthenticationChallenge struct {
    +	GuestOperationsFault
    +
    +	ServerChallenge BaseGuestAuthentication `xml:"serverChallenge,typeattr"`
    +	SessionID       int64                   `xml:"sessionID"`
    +}
    +
    +func init() {
    +	t["GuestAuthenticationChallenge"] = reflect.TypeOf((*GuestAuthenticationChallenge)(nil)).Elem()
    +}
    +
    +type GuestAuthenticationChallengeFault GuestAuthenticationChallenge
    +
    +func init() {
    +	t["GuestAuthenticationChallengeFault"] = reflect.TypeOf((*GuestAuthenticationChallengeFault)(nil)).Elem()
    +}
    +
    +type GuestComponentsOutOfDate struct {
    +	GuestOperationsFault
    +}
    +
    +func init() {
    +	t["GuestComponentsOutOfDate"] = reflect.TypeOf((*GuestComponentsOutOfDate)(nil)).Elem()
    +}
    +
    +type GuestComponentsOutOfDateFault GuestComponentsOutOfDate
    +
    +func init() {
    +	t["GuestComponentsOutOfDateFault"] = reflect.TypeOf((*GuestComponentsOutOfDateFault)(nil)).Elem()
    +}
    +
    +type GuestDiskInfo struct {
    +	DynamicData
    +
    +	DiskPath  string `xml:"diskPath,omitempty"`
    +	Capacity  int64  `xml:"capacity,omitempty"`
    +	FreeSpace int64  `xml:"freeSpace,omitempty"`
    +}
    +
    +func init() {
    +	t["GuestDiskInfo"] = reflect.TypeOf((*GuestDiskInfo)(nil)).Elem()
    +}
    +
    +type GuestFileAttributes struct {
    +	DynamicData
    +
    +	ModificationTime *time.Time `xml:"modificationTime"`
    +	AccessTime       *time.Time `xml:"accessTime"`
    +	SymlinkTarget    string     `xml:"symlinkTarget,omitempty"`
    +}
    +
    +func init() {
    +	t["GuestFileAttributes"] = reflect.TypeOf((*GuestFileAttributes)(nil)).Elem()
    +}
    +
    +type GuestFileInfo struct {
    +	DynamicData
    +
    +	Path       string                  `xml:"path"`
    +	Type       string                  `xml:"type"`
    +	Size       int64                   `xml:"size"`
    +	Attributes BaseGuestFileAttributes `xml:"attributes,typeattr"`
    +}
    +
    +func init() {
    +	t["GuestFileInfo"] = reflect.TypeOf((*GuestFileInfo)(nil)).Elem()
    +}
    +
    +type GuestInfo struct {
    +	DynamicData
    +
    +	ToolsStatus                     VirtualMachineToolsStatus          `xml:"toolsStatus,omitempty"`
    +	ToolsVersionStatus              string                             `xml:"toolsVersionStatus,omitempty"`
    +	ToolsVersionStatus2             string                             `xml:"toolsVersionStatus2,omitempty"`
    +	ToolsRunningStatus              string                             `xml:"toolsRunningStatus,omitempty"`
    +	ToolsVersion                    string                             `xml:"toolsVersion,omitempty"`
    +	ToolsInstallType                string                             `xml:"toolsInstallType,omitempty"`
    +	GuestId                         string                             `xml:"guestId,omitempty"`
    +	GuestFamily                     string                             `xml:"guestFamily,omitempty"`
    +	GuestFullName                   string                             `xml:"guestFullName,omitempty"`
    +	HostName                        string                             `xml:"hostName,omitempty"`
    +	IpAddress                       string                             `xml:"ipAddress,omitempty"`
    +	Net                             []GuestNicInfo                     `xml:"net,omitempty"`
    +	IpStack                         []GuestStackInfo                   `xml:"ipStack,omitempty"`
    +	Disk                            []GuestDiskInfo                    `xml:"disk,omitempty"`
    +	Screen                          *GuestScreenInfo                   `xml:"screen,omitempty"`
    +	GuestState                      string                             `xml:"guestState"`
    +	AppHeartbeatStatus              string                             `xml:"appHeartbeatStatus,omitempty"`
    +	GuestKernelCrashed              *bool                              `xml:"guestKernelCrashed"`
    +	AppState                        string                             `xml:"appState,omitempty"`
    +	GuestOperationsReady            *bool                              `xml:"guestOperationsReady"`
    +	InteractiveGuestOperationsReady *bool                              `xml:"interactiveGuestOperationsReady"`
    +	GuestStateChangeSupported       *bool                              `xml:"guestStateChangeSupported"`
    +	GenerationInfo                  []GuestInfoNamespaceGenerationInfo `xml:"generationInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["GuestInfo"] = reflect.TypeOf((*GuestInfo)(nil)).Elem()
    +}
    +
    +type GuestInfoNamespaceGenerationInfo struct {
    +	DynamicData
    +
    +	Key          string `xml:"key"`
    +	GenerationNo int32  `xml:"generationNo"`
    +}
    +
    +func init() {
    +	t["GuestInfoNamespaceGenerationInfo"] = reflect.TypeOf((*GuestInfoNamespaceGenerationInfo)(nil)).Elem()
    +}
    +
    +type GuestListFileInfo struct {
    +	DynamicData
    +
    +	Files     []GuestFileInfo `xml:"files,omitempty"`
    +	Remaining int32           `xml:"remaining"`
    +}
    +
    +func init() {
    +	t["GuestListFileInfo"] = reflect.TypeOf((*GuestListFileInfo)(nil)).Elem()
    +}
    +
    +type GuestMappedAliases struct {
    +	DynamicData
    +
    +	Base64Cert string                 `xml:"base64Cert"`
    +	Username   string                 `xml:"username"`
    +	Subjects   []BaseGuestAuthSubject `xml:"subjects,typeattr"`
    +}
    +
    +func init() {
    +	t["GuestMappedAliases"] = reflect.TypeOf((*GuestMappedAliases)(nil)).Elem()
    +}
    +
    +type GuestMultipleMappings struct {
    +	GuestOperationsFault
    +}
    +
    +func init() {
    +	t["GuestMultipleMappings"] = reflect.TypeOf((*GuestMultipleMappings)(nil)).Elem()
    +}
    +
    +type GuestMultipleMappingsFault GuestMultipleMappings
    +
    +func init() {
    +	t["GuestMultipleMappingsFault"] = reflect.TypeOf((*GuestMultipleMappingsFault)(nil)).Elem()
    +}
    +
    +type GuestNicInfo struct {
    +	DynamicData
    +
    +	Network        string                `xml:"network,omitempty"`
    +	IpAddress      []string              `xml:"ipAddress,omitempty"`
    +	MacAddress     string                `xml:"macAddress,omitempty"`
    +	Connected      bool                  `xml:"connected"`
    +	DeviceConfigId int32                 `xml:"deviceConfigId"`
    +	DnsConfig      *NetDnsConfigInfo     `xml:"dnsConfig,omitempty"`
    +	IpConfig       *NetIpConfigInfo      `xml:"ipConfig,omitempty"`
    +	NetBIOSConfig  BaseNetBIOSConfigInfo `xml:"netBIOSConfig,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["GuestNicInfo"] = reflect.TypeOf((*GuestNicInfo)(nil)).Elem()
    +}
    +
    +type GuestOperationsFault struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["GuestOperationsFault"] = reflect.TypeOf((*GuestOperationsFault)(nil)).Elem()
    +}
    +
    +type GuestOperationsFaultFault BaseGuestOperationsFault
    +
    +func init() {
    +	t["GuestOperationsFaultFault"] = reflect.TypeOf((*GuestOperationsFaultFault)(nil)).Elem()
    +}
    +
    +type GuestOperationsUnavailable struct {
    +	GuestOperationsFault
    +}
    +
    +func init() {
    +	t["GuestOperationsUnavailable"] = reflect.TypeOf((*GuestOperationsUnavailable)(nil)).Elem()
    +}
    +
    +type GuestOperationsUnavailableFault GuestOperationsUnavailable
    +
    +func init() {
    +	t["GuestOperationsUnavailableFault"] = reflect.TypeOf((*GuestOperationsUnavailableFault)(nil)).Elem()
    +}
    +
    +type GuestOsDescriptor struct {
    +	DynamicData
    +
    +	Id                                      string          `xml:"id"`
    +	Family                                  string          `xml:"family"`
    +	FullName                                string          `xml:"fullName"`
    +	SupportedMaxCPUs                        int32           `xml:"supportedMaxCPUs"`
    +	NumSupportedPhysicalSockets             int32           `xml:"numSupportedPhysicalSockets,omitempty"`
    +	NumSupportedCoresPerSocket              int32           `xml:"numSupportedCoresPerSocket,omitempty"`
    +	SupportedMinMemMB                       int32           `xml:"supportedMinMemMB"`
    +	SupportedMaxMemMB                       int32           `xml:"supportedMaxMemMB"`
    +	RecommendedMemMB                        int32           `xml:"recommendedMemMB"`
    +	RecommendedColorDepth                   int32           `xml:"recommendedColorDepth"`
    +	SupportedDiskControllerList             []string        `xml:"supportedDiskControllerList"`
    +	RecommendedSCSIController               string          `xml:"recommendedSCSIController,omitempty"`
    +	RecommendedDiskController               string          `xml:"recommendedDiskController"`
    +	SupportedNumDisks                       int32           `xml:"supportedNumDisks"`
    +	RecommendedDiskSizeMB                   int32           `xml:"recommendedDiskSizeMB"`
    +	RecommendedCdromController              string          `xml:"recommendedCdromController,omitempty"`
    +	SupportedEthernetCard                   []string        `xml:"supportedEthernetCard"`
    +	RecommendedEthernetCard                 string          `xml:"recommendedEthernetCard,omitempty"`
    +	SupportsSlaveDisk                       *bool           `xml:"supportsSlaveDisk"`
    +	CpuFeatureMask                          []HostCpuIdInfo `xml:"cpuFeatureMask,omitempty"`
    +	SmcRequired                             *bool           `xml:"smcRequired"`
    +	SupportsWakeOnLan                       bool            `xml:"supportsWakeOnLan"`
    +	SupportsVMI                             *bool           `xml:"supportsVMI"`
    +	SupportsMemoryHotAdd                    *bool           `xml:"supportsMemoryHotAdd"`
    +	SupportsCpuHotAdd                       *bool           `xml:"supportsCpuHotAdd"`
    +	SupportsCpuHotRemove                    *bool           `xml:"supportsCpuHotRemove"`
    +	SupportedFirmware                       []string        `xml:"supportedFirmware,omitempty"`
    +	RecommendedFirmware                     string          `xml:"recommendedFirmware,omitempty"`
    +	SupportedUSBControllerList              []string        `xml:"supportedUSBControllerList,omitempty"`
    +	RecommendedUSBController                string          `xml:"recommendedUSBController,omitempty"`
    +	Supports3D                              *bool           `xml:"supports3D"`
    +	Recommended3D                           *bool           `xml:"recommended3D"`
    +	SmcRecommended                          *bool           `xml:"smcRecommended"`
    +	Ich7mRecommended                        *bool           `xml:"ich7mRecommended"`
    +	UsbRecommended                          *bool           `xml:"usbRecommended"`
    +	SupportLevel                            string          `xml:"supportLevel,omitempty"`
    +	SupportedForCreate                      *bool           `xml:"supportedForCreate"`
    +	VRAMSizeInKB                            *IntOption      `xml:"vRAMSizeInKB,omitempty"`
    +	NumSupportedFloppyDevices               int32           `xml:"numSupportedFloppyDevices,omitempty"`
    +	WakeOnLanEthernetCard                   []string        `xml:"wakeOnLanEthernetCard,omitempty"`
    +	SupportsPvscsiControllerForBoot         *bool           `xml:"supportsPvscsiControllerForBoot"`
    +	DiskUuidEnabled                         *bool           `xml:"diskUuidEnabled"`
    +	SupportsHotPlugPCI                      *bool           `xml:"supportsHotPlugPCI"`
    +	SupportsSecureBoot                      *bool           `xml:"supportsSecureBoot"`
    +	DefaultSecureBoot                       *bool           `xml:"defaultSecureBoot"`
    +	PersistentMemorySupported               *bool           `xml:"persistentMemorySupported"`
    +	SupportedMinPersistentMemoryMB          int64           `xml:"supportedMinPersistentMemoryMB,omitempty"`
    +	SupportedMaxPersistentMemoryMB          int64           `xml:"supportedMaxPersistentMemoryMB,omitempty"`
    +	RecommendedPersistentMemoryMB           int64           `xml:"recommendedPersistentMemoryMB,omitempty"`
    +	PersistentMemoryHotAddSupported         *bool           `xml:"persistentMemoryHotAddSupported"`
    +	PersistentMemoryHotRemoveSupported      *bool           `xml:"persistentMemoryHotRemoveSupported"`
    +	PersistentMemoryColdGrowthSupported     *bool           `xml:"persistentMemoryColdGrowthSupported"`
    +	PersistentMemoryColdGrowthGranularityMB int64           `xml:"persistentMemoryColdGrowthGranularityMB,omitempty"`
    +	PersistentMemoryHotGrowthSupported      *bool           `xml:"persistentMemoryHotGrowthSupported"`
    +	PersistentMemoryHotGrowthGranularityMB  int64           `xml:"persistentMemoryHotGrowthGranularityMB,omitempty"`
    +	NumRecommendedPhysicalSockets           int32           `xml:"numRecommendedPhysicalSockets,omitempty"`
    +	NumRecommendedCoresPerSocket            int32           `xml:"numRecommendedCoresPerSocket,omitempty"`
    +	VvtdSupported                           *BoolOption     `xml:"vvtdSupported,omitempty"`
    +	VbsSupported                            *BoolOption     `xml:"vbsSupported,omitempty"`
    +	SupportsTPM20                           *bool           `xml:"supportsTPM20"`
    +}
    +
    +func init() {
    +	t["GuestOsDescriptor"] = reflect.TypeOf((*GuestOsDescriptor)(nil)).Elem()
    +}
    +
    +type GuestPermissionDenied struct {
    +	GuestOperationsFault
    +}
    +
    +func init() {
    +	t["GuestPermissionDenied"] = reflect.TypeOf((*GuestPermissionDenied)(nil)).Elem()
    +}
    +
    +type GuestPermissionDeniedFault GuestPermissionDenied
    +
    +func init() {
    +	t["GuestPermissionDeniedFault"] = reflect.TypeOf((*GuestPermissionDeniedFault)(nil)).Elem()
    +}
    +
    +type GuestPosixFileAttributes struct {
    +	GuestFileAttributes
    +
    +	OwnerId     *int32 `xml:"ownerId"`
    +	GroupId     *int32 `xml:"groupId"`
    +	Permissions int64  `xml:"permissions,omitempty"`
    +}
    +
    +func init() {
    +	t["GuestPosixFileAttributes"] = reflect.TypeOf((*GuestPosixFileAttributes)(nil)).Elem()
    +}
    +
    +type GuestProcessInfo struct {
    +	DynamicData
    +
    +	Name      string     `xml:"name"`
    +	Pid       int64      `xml:"pid"`
    +	Owner     string     `xml:"owner"`
    +	CmdLine   string     `xml:"cmdLine"`
    +	StartTime time.Time  `xml:"startTime"`
    +	EndTime   *time.Time `xml:"endTime"`
    +	ExitCode  int32      `xml:"exitCode,omitempty"`
    +}
    +
    +func init() {
    +	t["GuestProcessInfo"] = reflect.TypeOf((*GuestProcessInfo)(nil)).Elem()
    +}
    +
    +type GuestProcessNotFound struct {
    +	GuestOperationsFault
    +
    +	Pid int64 `xml:"pid"`
    +}
    +
    +func init() {
    +	t["GuestProcessNotFound"] = reflect.TypeOf((*GuestProcessNotFound)(nil)).Elem()
    +}
    +
    +type GuestProcessNotFoundFault GuestProcessNotFound
    +
    +func init() {
    +	t["GuestProcessNotFoundFault"] = reflect.TypeOf((*GuestProcessNotFoundFault)(nil)).Elem()
    +}
    +
    +type GuestProgramSpec struct {
    +	DynamicData
    +
    +	ProgramPath      string   `xml:"programPath"`
    +	Arguments        string   `xml:"arguments"`
    +	WorkingDirectory string   `xml:"workingDirectory,omitempty"`
    +	EnvVariables     []string `xml:"envVariables,omitempty"`
    +}
    +
    +func init() {
    +	t["GuestProgramSpec"] = reflect.TypeOf((*GuestProgramSpec)(nil)).Elem()
    +}
    +
    +type GuestRegKeyNameSpec struct {
    +	DynamicData
    +
    +	RegistryPath string `xml:"registryPath"`
    +	WowBitness   string `xml:"wowBitness"`
    +}
    +
    +func init() {
    +	t["GuestRegKeyNameSpec"] = reflect.TypeOf((*GuestRegKeyNameSpec)(nil)).Elem()
    +}
    +
    +type GuestRegKeyRecordSpec struct {
    +	DynamicData
    +
    +	Key   GuestRegKeySpec       `xml:"key"`
    +	Fault *LocalizedMethodFault `xml:"fault,omitempty"`
    +}
    +
    +func init() {
    +	t["GuestRegKeyRecordSpec"] = reflect.TypeOf((*GuestRegKeyRecordSpec)(nil)).Elem()
    +}
    +
    +type GuestRegKeySpec struct {
    +	DynamicData
    +
    +	KeyName     GuestRegKeyNameSpec `xml:"keyName"`
    +	ClassType   string              `xml:"classType"`
    +	LastWritten time.Time           `xml:"lastWritten"`
    +}
    +
    +func init() {
    +	t["GuestRegKeySpec"] = reflect.TypeOf((*GuestRegKeySpec)(nil)).Elem()
    +}
    +
    +type GuestRegValueBinarySpec struct {
    +	GuestRegValueDataSpec
    +
    +	Value []byte `xml:"value,omitempty"`
    +}
    +
    +func init() {
    +	t["GuestRegValueBinarySpec"] = reflect.TypeOf((*GuestRegValueBinarySpec)(nil)).Elem()
    +}
    +
    +type GuestRegValueDataSpec struct {
    +	DynamicData
    +}
    +
    +func init() {
    +	t["GuestRegValueDataSpec"] = reflect.TypeOf((*GuestRegValueDataSpec)(nil)).Elem()
    +}
    +
    +type GuestRegValueDwordSpec struct {
    +	GuestRegValueDataSpec
    +
    +	Value int32 `xml:"value"`
    +}
    +
    +func init() {
    +	t["GuestRegValueDwordSpec"] = reflect.TypeOf((*GuestRegValueDwordSpec)(nil)).Elem()
    +}
    +
    +type GuestRegValueExpandStringSpec struct {
    +	GuestRegValueDataSpec
    +
    +	Value string `xml:"value,omitempty"`
    +}
    +
    +func init() {
    +	t["GuestRegValueExpandStringSpec"] = reflect.TypeOf((*GuestRegValueExpandStringSpec)(nil)).Elem()
    +}
    +
    +type GuestRegValueMultiStringSpec struct {
    +	GuestRegValueDataSpec
    +
    +	Value []string `xml:"value,omitempty"`
    +}
    +
    +func init() {
    +	t["GuestRegValueMultiStringSpec"] = reflect.TypeOf((*GuestRegValueMultiStringSpec)(nil)).Elem()
    +}
    +
    +type GuestRegValueNameSpec struct {
    +	DynamicData
    +
    +	KeyName GuestRegKeyNameSpec `xml:"keyName"`
    +	Name    string              `xml:"name"`
    +}
    +
    +func init() {
    +	t["GuestRegValueNameSpec"] = reflect.TypeOf((*GuestRegValueNameSpec)(nil)).Elem()
    +}
    +
    +type GuestRegValueQwordSpec struct {
    +	GuestRegValueDataSpec
    +
    +	Value int64 `xml:"value"`
    +}
    +
    +func init() {
    +	t["GuestRegValueQwordSpec"] = reflect.TypeOf((*GuestRegValueQwordSpec)(nil)).Elem()
    +}
    +
    +type GuestRegValueSpec struct {
    +	DynamicData
    +
    +	Name GuestRegValueNameSpec     `xml:"name"`
    +	Data BaseGuestRegValueDataSpec `xml:"data,typeattr"`
    +}
    +
    +func init() {
    +	t["GuestRegValueSpec"] = reflect.TypeOf((*GuestRegValueSpec)(nil)).Elem()
    +}
    +
    +type GuestRegValueStringSpec struct {
    +	GuestRegValueDataSpec
    +
    +	Value string `xml:"value,omitempty"`
    +}
    +
    +func init() {
    +	t["GuestRegValueStringSpec"] = reflect.TypeOf((*GuestRegValueStringSpec)(nil)).Elem()
    +}
    +
    +type GuestRegistryFault struct {
    +	GuestOperationsFault
    +
    +	WindowsSystemErrorCode int64 `xml:"windowsSystemErrorCode"`
    +}
    +
    +func init() {
    +	t["GuestRegistryFault"] = reflect.TypeOf((*GuestRegistryFault)(nil)).Elem()
    +}
    +
    +type GuestRegistryFaultFault BaseGuestRegistryFault
    +
    +func init() {
    +	t["GuestRegistryFaultFault"] = reflect.TypeOf((*GuestRegistryFaultFault)(nil)).Elem()
    +}
    +
    +type GuestRegistryKeyAlreadyExists struct {
    +	GuestRegistryKeyFault
    +}
    +
    +func init() {
    +	t["GuestRegistryKeyAlreadyExists"] = reflect.TypeOf((*GuestRegistryKeyAlreadyExists)(nil)).Elem()
    +}
    +
    +type GuestRegistryKeyAlreadyExistsFault GuestRegistryKeyAlreadyExists
    +
    +func init() {
    +	t["GuestRegistryKeyAlreadyExistsFault"] = reflect.TypeOf((*GuestRegistryKeyAlreadyExistsFault)(nil)).Elem()
    +}
    +
    +type GuestRegistryKeyFault struct {
    +	GuestRegistryFault
    +
    +	KeyName string `xml:"keyName"`
    +}
    +
    +func init() {
    +	t["GuestRegistryKeyFault"] = reflect.TypeOf((*GuestRegistryKeyFault)(nil)).Elem()
    +}
    +
    +type GuestRegistryKeyFaultFault BaseGuestRegistryKeyFault
    +
    +func init() {
    +	t["GuestRegistryKeyFaultFault"] = reflect.TypeOf((*GuestRegistryKeyFaultFault)(nil)).Elem()
    +}
    +
    +type GuestRegistryKeyHasSubkeys struct {
    +	GuestRegistryKeyFault
    +}
    +
    +func init() {
    +	t["GuestRegistryKeyHasSubkeys"] = reflect.TypeOf((*GuestRegistryKeyHasSubkeys)(nil)).Elem()
    +}
    +
    +type GuestRegistryKeyHasSubkeysFault GuestRegistryKeyHasSubkeys
    +
    +func init() {
    +	t["GuestRegistryKeyHasSubkeysFault"] = reflect.TypeOf((*GuestRegistryKeyHasSubkeysFault)(nil)).Elem()
    +}
    +
    +type GuestRegistryKeyInvalid struct {
    +	GuestRegistryKeyFault
    +}
    +
    +func init() {
    +	t["GuestRegistryKeyInvalid"] = reflect.TypeOf((*GuestRegistryKeyInvalid)(nil)).Elem()
    +}
    +
    +type GuestRegistryKeyInvalidFault GuestRegistryKeyInvalid
    +
    +func init() {
    +	t["GuestRegistryKeyInvalidFault"] = reflect.TypeOf((*GuestRegistryKeyInvalidFault)(nil)).Elem()
    +}
    +
    +type GuestRegistryKeyParentVolatile struct {
    +	GuestRegistryKeyFault
    +}
    +
    +func init() {
    +	t["GuestRegistryKeyParentVolatile"] = reflect.TypeOf((*GuestRegistryKeyParentVolatile)(nil)).Elem()
    +}
    +
    +type GuestRegistryKeyParentVolatileFault GuestRegistryKeyParentVolatile
    +
    +func init() {
    +	t["GuestRegistryKeyParentVolatileFault"] = reflect.TypeOf((*GuestRegistryKeyParentVolatileFault)(nil)).Elem()
    +}
    +
    +type GuestRegistryValueFault struct {
    +	GuestRegistryFault
    +
    +	KeyName   string `xml:"keyName"`
    +	ValueName string `xml:"valueName"`
    +}
    +
    +func init() {
    +	t["GuestRegistryValueFault"] = reflect.TypeOf((*GuestRegistryValueFault)(nil)).Elem()
    +}
    +
    +type GuestRegistryValueFaultFault BaseGuestRegistryValueFault
    +
    +func init() {
    +	t["GuestRegistryValueFaultFault"] = reflect.TypeOf((*GuestRegistryValueFaultFault)(nil)).Elem()
    +}
    +
    +type GuestRegistryValueNotFound struct {
    +	GuestRegistryValueFault
    +}
    +
    +func init() {
    +	t["GuestRegistryValueNotFound"] = reflect.TypeOf((*GuestRegistryValueNotFound)(nil)).Elem()
    +}
    +
    +type GuestRegistryValueNotFoundFault GuestRegistryValueNotFound
    +
    +func init() {
    +	t["GuestRegistryValueNotFoundFault"] = reflect.TypeOf((*GuestRegistryValueNotFoundFault)(nil)).Elem()
    +}
    +
    +type GuestScreenInfo struct {
    +	DynamicData
    +
    +	Width  int32 `xml:"width"`
    +	Height int32 `xml:"height"`
    +}
    +
    +func init() {
    +	t["GuestScreenInfo"] = reflect.TypeOf((*GuestScreenInfo)(nil)).Elem()
    +}
    +
    +type GuestStackInfo struct {
    +	DynamicData
    +
    +	DnsConfig     *NetDnsConfigInfo     `xml:"dnsConfig,omitempty"`
    +	IpRouteConfig *NetIpRouteConfigInfo `xml:"ipRouteConfig,omitempty"`
    +	IpStackConfig []KeyValue            `xml:"ipStackConfig,omitempty"`
    +	DhcpConfig    *NetDhcpConfigInfo    `xml:"dhcpConfig,omitempty"`
    +}
    +
    +func init() {
    +	t["GuestStackInfo"] = reflect.TypeOf((*GuestStackInfo)(nil)).Elem()
    +}
    +
    +type GuestWindowsFileAttributes struct {
    +	GuestFileAttributes
    +
    +	Hidden     *bool      `xml:"hidden"`
    +	ReadOnly   *bool      `xml:"readOnly"`
    +	CreateTime *time.Time `xml:"createTime"`
    +}
    +
    +func init() {
    +	t["GuestWindowsFileAttributes"] = reflect.TypeOf((*GuestWindowsFileAttributes)(nil)).Elem()
    +}
    +
    +type GuestWindowsProgramSpec struct {
    +	GuestProgramSpec
    +
    +	StartMinimized bool `xml:"startMinimized"`
    +}
    +
    +func init() {
    +	t["GuestWindowsProgramSpec"] = reflect.TypeOf((*GuestWindowsProgramSpec)(nil)).Elem()
    +}
    +
    +type HAErrorsAtDest struct {
    +	MigrationFault
    +}
    +
    +func init() {
    +	t["HAErrorsAtDest"] = reflect.TypeOf((*HAErrorsAtDest)(nil)).Elem()
    +}
    +
    +type HAErrorsAtDestFault HAErrorsAtDest
    +
    +func init() {
    +	t["HAErrorsAtDestFault"] = reflect.TypeOf((*HAErrorsAtDestFault)(nil)).Elem()
    +}
    +
    +type HasMonitoredEntity HasMonitoredEntityRequestType
    +
    +func init() {
    +	t["HasMonitoredEntity"] = reflect.TypeOf((*HasMonitoredEntity)(nil)).Elem()
    +}
    +
    +type HasMonitoredEntityRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	ProviderId string                 `xml:"providerId"`
    +	Entity     ManagedObjectReference `xml:"entity"`
    +}
    +
    +func init() {
    +	t["HasMonitoredEntityRequestType"] = reflect.TypeOf((*HasMonitoredEntityRequestType)(nil)).Elem()
    +}
    +
    +type HasMonitoredEntityResponse struct {
    +	Returnval bool `xml:"returnval"`
    +}
    +
    +type HasPrivilegeOnEntities HasPrivilegeOnEntitiesRequestType
    +
    +func init() {
    +	t["HasPrivilegeOnEntities"] = reflect.TypeOf((*HasPrivilegeOnEntities)(nil)).Elem()
    +}
    +
    +type HasPrivilegeOnEntitiesRequestType struct {
    +	This      ManagedObjectReference   `xml:"_this"`
    +	Entity    []ManagedObjectReference `xml:"entity"`
    +	SessionId string                   `xml:"sessionId"`
    +	PrivId    []string                 `xml:"privId,omitempty"`
    +}
    +
    +func init() {
    +	t["HasPrivilegeOnEntitiesRequestType"] = reflect.TypeOf((*HasPrivilegeOnEntitiesRequestType)(nil)).Elem()
    +}
    +
    +type HasPrivilegeOnEntitiesResponse struct {
    +	Returnval []EntityPrivilege `xml:"returnval,omitempty"`
    +}
    +
    +type HasPrivilegeOnEntity HasPrivilegeOnEntityRequestType
    +
    +func init() {
    +	t["HasPrivilegeOnEntity"] = reflect.TypeOf((*HasPrivilegeOnEntity)(nil)).Elem()
    +}
    +
    +type HasPrivilegeOnEntityRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	Entity    ManagedObjectReference `xml:"entity"`
    +	SessionId string                 `xml:"sessionId"`
    +	PrivId    []string               `xml:"privId,omitempty"`
    +}
    +
    +func init() {
    +	t["HasPrivilegeOnEntityRequestType"] = reflect.TypeOf((*HasPrivilegeOnEntityRequestType)(nil)).Elem()
    +}
    +
    +type HasPrivilegeOnEntityResponse struct {
    +	Returnval []bool `xml:"returnval,omitempty"`
    +}
    +
    +type HasProvider HasProviderRequestType
    +
    +func init() {
    +	t["HasProvider"] = reflect.TypeOf((*HasProvider)(nil)).Elem()
    +}
    +
    +type HasProviderRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Id   string                 `xml:"id"`
    +}
    +
    +func init() {
    +	t["HasProviderRequestType"] = reflect.TypeOf((*HasProviderRequestType)(nil)).Elem()
    +}
    +
    +type HasProviderResponse struct {
    +	Returnval bool `xml:"returnval"`
    +}
    +
    +type HasUserPrivilegeOnEntities HasUserPrivilegeOnEntitiesRequestType
    +
    +func init() {
    +	t["HasUserPrivilegeOnEntities"] = reflect.TypeOf((*HasUserPrivilegeOnEntities)(nil)).Elem()
    +}
    +
    +type HasUserPrivilegeOnEntitiesRequestType struct {
    +	This     ManagedObjectReference   `xml:"_this"`
    +	Entities []ManagedObjectReference `xml:"entities"`
    +	UserName string                   `xml:"userName"`
    +	PrivId   []string                 `xml:"privId,omitempty"`
    +}
    +
    +func init() {
    +	t["HasUserPrivilegeOnEntitiesRequestType"] = reflect.TypeOf((*HasUserPrivilegeOnEntitiesRequestType)(nil)).Elem()
    +}
    +
    +type HasUserPrivilegeOnEntitiesResponse struct {
    +	Returnval []EntityPrivilege `xml:"returnval,omitempty"`
    +}
    +
    +type HbrDiskMigrationAction struct {
    +	ClusterAction
    +
    +	CollectionId       string                 `xml:"collectionId"`
    +	CollectionName     string                 `xml:"collectionName"`
    +	DiskIds            []string               `xml:"diskIds"`
    +	Source             ManagedObjectReference `xml:"source"`
    +	Destination        ManagedObjectReference `xml:"destination"`
    +	SizeTransferred    int64                  `xml:"sizeTransferred"`
    +	SpaceUtilSrcBefore float32                `xml:"spaceUtilSrcBefore,omitempty"`
    +	SpaceUtilDstBefore float32                `xml:"spaceUtilDstBefore,omitempty"`
    +	SpaceUtilSrcAfter  float32                `xml:"spaceUtilSrcAfter,omitempty"`
    +	SpaceUtilDstAfter  float32                `xml:"spaceUtilDstAfter,omitempty"`
    +	IoLatencySrcBefore float32                `xml:"ioLatencySrcBefore,omitempty"`
    +	IoLatencyDstBefore float32                `xml:"ioLatencyDstBefore,omitempty"`
    +}
    +
    +func init() {
    +	t["HbrDiskMigrationAction"] = reflect.TypeOf((*HbrDiskMigrationAction)(nil)).Elem()
    +}
    +
    +type HbrManagerReplicationVmInfo struct {
    +	DynamicData
    +
    +	State        string                     `xml:"state"`
    +	ProgressInfo *ReplicationVmProgressInfo `xml:"progressInfo,omitempty"`
    +	ImageId      string                     `xml:"imageId,omitempty"`
    +	LastError    *LocalizedMethodFault      `xml:"lastError,omitempty"`
    +}
    +
    +func init() {
    +	t["HbrManagerReplicationVmInfo"] = reflect.TypeOf((*HbrManagerReplicationVmInfo)(nil)).Elem()
    +}
    +
    +type HbrManagerVmReplicationCapability struct {
    +	DynamicData
    +
    +	Vm                             ManagedObjectReference `xml:"vm"`
    +	SupportedQuiesceMode           string                 `xml:"supportedQuiesceMode"`
    +	CompressionSupported           bool                   `xml:"compressionSupported"`
    +	MaxSupportedSourceDiskCapacity int64                  `xml:"maxSupportedSourceDiskCapacity"`
    +	MinRpo                         int64                  `xml:"minRpo,omitempty"`
    +	Fault                          *LocalizedMethodFault  `xml:"fault,omitempty"`
    +}
    +
    +func init() {
    +	t["HbrManagerVmReplicationCapability"] = reflect.TypeOf((*HbrManagerVmReplicationCapability)(nil)).Elem()
    +}
    +
    +type HealthStatusChangedEvent struct {
    +	Event
    +
    +	ComponentId   string `xml:"componentId"`
    +	OldStatus     string `xml:"oldStatus"`
    +	NewStatus     string `xml:"newStatus"`
    +	ComponentName string `xml:"componentName"`
    +	ServiceId     string `xml:"serviceId,omitempty"`
    +}
    +
    +func init() {
    +	t["HealthStatusChangedEvent"] = reflect.TypeOf((*HealthStatusChangedEvent)(nil)).Elem()
    +}
    +
    +type HealthSystemRuntime struct {
    +	DynamicData
    +
    +	SystemHealthInfo   *HostSystemHealthInfo   `xml:"systemHealthInfo,omitempty"`
    +	HardwareStatusInfo *HostHardwareStatusInfo `xml:"hardwareStatusInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["HealthSystemRuntime"] = reflect.TypeOf((*HealthSystemRuntime)(nil)).Elem()
    +}
    +
    +type HealthUpdate struct {
    +	DynamicData
    +
    +	Entity             ManagedObjectReference `xml:"entity"`
    +	HealthUpdateInfoId string                 `xml:"healthUpdateInfoId"`
    +	Id                 string                 `xml:"id"`
    +	Status             ManagedEntityStatus    `xml:"status"`
    +	Remediation        string                 `xml:"remediation"`
    +}
    +
    +func init() {
    +	t["HealthUpdate"] = reflect.TypeOf((*HealthUpdate)(nil)).Elem()
    +}
    +
    +type HealthUpdateInfo struct {
    +	DynamicData
    +
    +	Id            string `xml:"id"`
    +	ComponentType string `xml:"componentType"`
    +	Description   string `xml:"description"`
    +}
    +
    +func init() {
    +	t["HealthUpdateInfo"] = reflect.TypeOf((*HealthUpdateInfo)(nil)).Elem()
    +}
    +
    +type HeterogenousHostsBlockingEVC struct {
    +	EVCConfigFault
    +}
    +
    +func init() {
    +	t["HeterogenousHostsBlockingEVC"] = reflect.TypeOf((*HeterogenousHostsBlockingEVC)(nil)).Elem()
    +}
    +
    +type HeterogenousHostsBlockingEVCFault HeterogenousHostsBlockingEVC
    +
    +func init() {
    +	t["HeterogenousHostsBlockingEVCFault"] = reflect.TypeOf((*HeterogenousHostsBlockingEVCFault)(nil)).Elem()
    +}
    +
    +type HostAccessControlEntry struct {
    +	DynamicData
    +
    +	Principal  string         `xml:"principal"`
    +	Group      bool           `xml:"group"`
    +	AccessMode HostAccessMode `xml:"accessMode"`
    +}
    +
    +func init() {
    +	t["HostAccessControlEntry"] = reflect.TypeOf((*HostAccessControlEntry)(nil)).Elem()
    +}
    +
    +type HostAccessRestrictedToManagementServer struct {
    +	NotSupported
    +
    +	ManagementServer string `xml:"managementServer"`
    +}
    +
    +func init() {
    +	t["HostAccessRestrictedToManagementServer"] = reflect.TypeOf((*HostAccessRestrictedToManagementServer)(nil)).Elem()
    +}
    +
    +type HostAccessRestrictedToManagementServerFault HostAccessRestrictedToManagementServer
    +
    +func init() {
    +	t["HostAccessRestrictedToManagementServerFault"] = reflect.TypeOf((*HostAccessRestrictedToManagementServerFault)(nil)).Elem()
    +}
    +
    +type HostAccountSpec struct {
    +	DynamicData
    +
    +	Id          string `xml:"id"`
    +	Password    string `xml:"password,omitempty"`
    +	Description string `xml:"description,omitempty"`
    +}
    +
    +func init() {
    +	t["HostAccountSpec"] = reflect.TypeOf((*HostAccountSpec)(nil)).Elem()
    +}
    +
    +type HostActiveDirectory struct {
    +	DynamicData
    +
    +	ChangeOperation string                   `xml:"changeOperation"`
    +	Spec            *HostActiveDirectorySpec `xml:"spec,omitempty"`
    +}
    +
    +func init() {
    +	t["HostActiveDirectory"] = reflect.TypeOf((*HostActiveDirectory)(nil)).Elem()
    +}
    +
    +type HostActiveDirectoryInfo struct {
    +	HostDirectoryStoreInfo
    +
    +	JoinedDomain                   string   `xml:"joinedDomain,omitempty"`
    +	TrustedDomain                  []string `xml:"trustedDomain,omitempty"`
    +	DomainMembershipStatus         string   `xml:"domainMembershipStatus,omitempty"`
    +	SmartCardAuthenticationEnabled *bool    `xml:"smartCardAuthenticationEnabled"`
    +}
    +
    +func init() {
    +	t["HostActiveDirectoryInfo"] = reflect.TypeOf((*HostActiveDirectoryInfo)(nil)).Elem()
    +}
    +
    +type HostActiveDirectorySpec struct {
    +	DynamicData
    +
    +	DomainName                     string   `xml:"domainName,omitempty"`
    +	UserName                       string   `xml:"userName,omitempty"`
    +	Password                       string   `xml:"password,omitempty"`
    +	CamServer                      string   `xml:"camServer,omitempty"`
    +	Thumbprint                     string   `xml:"thumbprint,omitempty"`
    +	SmartCardAuthenticationEnabled *bool    `xml:"smartCardAuthenticationEnabled"`
    +	SmartCardTrustAnchors          []string `xml:"smartCardTrustAnchors,omitempty"`
    +}
    +
    +func init() {
    +	t["HostActiveDirectorySpec"] = reflect.TypeOf((*HostActiveDirectorySpec)(nil)).Elem()
    +}
    +
    +type HostAddFailedEvent struct {
    +	HostEvent
    +
    +	Hostname string `xml:"hostname"`
    +}
    +
    +func init() {
    +	t["HostAddFailedEvent"] = reflect.TypeOf((*HostAddFailedEvent)(nil)).Elem()
    +}
    +
    +type HostAddedEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["HostAddedEvent"] = reflect.TypeOf((*HostAddedEvent)(nil)).Elem()
    +}
    +
    +type HostAdminDisableEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["HostAdminDisableEvent"] = reflect.TypeOf((*HostAdminDisableEvent)(nil)).Elem()
    +}
    +
    +type HostAdminEnableEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["HostAdminEnableEvent"] = reflect.TypeOf((*HostAdminEnableEvent)(nil)).Elem()
    +}
    +
    +type HostApplyProfile struct {
    +	ApplyProfile
    +
    +	Memory           *HostMemoryProfile     `xml:"memory,omitempty"`
    +	Storage          *StorageProfile        `xml:"storage,omitempty"`
    +	Network          *NetworkProfile        `xml:"network,omitempty"`
    +	Datetime         *DateTimeProfile       `xml:"datetime,omitempty"`
    +	Firewall         *FirewallProfile       `xml:"firewall,omitempty"`
    +	Security         *SecurityProfile       `xml:"security,omitempty"`
    +	Service          []ServiceProfile       `xml:"service,omitempty"`
    +	Option           []OptionProfile        `xml:"option,omitempty"`
    +	UserAccount      []UserProfile          `xml:"userAccount,omitempty"`
    +	UsergroupAccount []UserGroupProfile     `xml:"usergroupAccount,omitempty"`
    +	Authentication   *AuthenticationProfile `xml:"authentication,omitempty"`
    +}
    +
    +func init() {
    +	t["HostApplyProfile"] = reflect.TypeOf((*HostApplyProfile)(nil)).Elem()
    +}
    +
    +type HostAuthenticationManagerInfo struct {
    +	DynamicData
    +
    +	AuthConfig []BaseHostAuthenticationStoreInfo `xml:"authConfig,typeattr"`
    +}
    +
    +func init() {
    +	t["HostAuthenticationManagerInfo"] = reflect.TypeOf((*HostAuthenticationManagerInfo)(nil)).Elem()
    +}
    +
    +type HostAuthenticationStoreInfo struct {
    +	DynamicData
    +
    +	Enabled bool `xml:"enabled"`
    +}
    +
    +func init() {
    +	t["HostAuthenticationStoreInfo"] = reflect.TypeOf((*HostAuthenticationStoreInfo)(nil)).Elem()
    +}
    +
    +type HostAutoStartManagerConfig struct {
    +	DynamicData
    +
    +	Defaults  *AutoStartDefaults   `xml:"defaults,omitempty"`
    +	PowerInfo []AutoStartPowerInfo `xml:"powerInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["HostAutoStartManagerConfig"] = reflect.TypeOf((*HostAutoStartManagerConfig)(nil)).Elem()
    +}
    +
    +type HostBIOSInfo struct {
    +	DynamicData
    +
    +	BiosVersion          string     `xml:"biosVersion,omitempty"`
    +	ReleaseDate          *time.Time `xml:"releaseDate"`
    +	Vendor               string     `xml:"vendor,omitempty"`
    +	MajorRelease         int32      `xml:"majorRelease,omitempty"`
    +	MinorRelease         int32      `xml:"minorRelease,omitempty"`
    +	FirmwareMajorRelease int32      `xml:"firmwareMajorRelease,omitempty"`
    +	FirmwareMinorRelease int32      `xml:"firmwareMinorRelease,omitempty"`
    +}
    +
    +func init() {
    +	t["HostBIOSInfo"] = reflect.TypeOf((*HostBIOSInfo)(nil)).Elem()
    +}
    +
    +type HostBlockAdapterTargetTransport struct {
    +	HostTargetTransport
    +}
    +
    +func init() {
    +	t["HostBlockAdapterTargetTransport"] = reflect.TypeOf((*HostBlockAdapterTargetTransport)(nil)).Elem()
    +}
    +
    +type HostBlockHba struct {
    +	HostHostBusAdapter
    +}
    +
    +func init() {
    +	t["HostBlockHba"] = reflect.TypeOf((*HostBlockHba)(nil)).Elem()
    +}
    +
    +type HostBootDevice struct {
    +	DynamicData
    +
    +	Key         string `xml:"key"`
    +	Description string `xml:"description"`
    +}
    +
    +func init() {
    +	t["HostBootDevice"] = reflect.TypeOf((*HostBootDevice)(nil)).Elem()
    +}
    +
    +type HostBootDeviceInfo struct {
    +	DynamicData
    +
    +	BootDevices          []HostBootDevice `xml:"bootDevices,omitempty"`
    +	CurrentBootDeviceKey string           `xml:"currentBootDeviceKey,omitempty"`
    +}
    +
    +func init() {
    +	t["HostBootDeviceInfo"] = reflect.TypeOf((*HostBootDeviceInfo)(nil)).Elem()
    +}
    +
    +type HostCacheConfigurationInfo struct {
    +	DynamicData
    +
    +	Key      ManagedObjectReference `xml:"key"`
    +	SwapSize int64                  `xml:"swapSize"`
    +}
    +
    +func init() {
    +	t["HostCacheConfigurationInfo"] = reflect.TypeOf((*HostCacheConfigurationInfo)(nil)).Elem()
    +}
    +
    +type HostCacheConfigurationSpec struct {
    +	DynamicData
    +
    +	Datastore ManagedObjectReference `xml:"datastore"`
    +	SwapSize  int64                  `xml:"swapSize"`
    +}
    +
    +func init() {
    +	t["HostCacheConfigurationSpec"] = reflect.TypeOf((*HostCacheConfigurationSpec)(nil)).Elem()
    +}
    +
    +type HostCapability struct {
    +	DynamicData
    +
    +	RecursiveResourcePoolsSupported           bool            `xml:"recursiveResourcePoolsSupported"`
    +	CpuMemoryResourceConfigurationSupported   bool            `xml:"cpuMemoryResourceConfigurationSupported"`
    +	RebootSupported                           bool            `xml:"rebootSupported"`
    +	ShutdownSupported                         bool            `xml:"shutdownSupported"`
    +	VmotionSupported                          bool            `xml:"vmotionSupported"`
    +	StandbySupported                          bool            `xml:"standbySupported"`
    +	IpmiSupported                             *bool           `xml:"ipmiSupported"`
    +	MaxSupportedVMs                           int32           `xml:"maxSupportedVMs,omitempty"`
    +	MaxRunningVMs                             int32           `xml:"maxRunningVMs,omitempty"`
    +	MaxSupportedVcpus                         int32           `xml:"maxSupportedVcpus,omitempty"`
    +	MaxRegisteredVMs                          int32           `xml:"maxRegisteredVMs,omitempty"`
    +	DatastorePrincipalSupported               bool            `xml:"datastorePrincipalSupported"`
    +	SanSupported                              bool            `xml:"sanSupported"`
    +	NfsSupported                              bool            `xml:"nfsSupported"`
    +	IscsiSupported                            bool            `xml:"iscsiSupported"`
    +	VlanTaggingSupported                      bool            `xml:"vlanTaggingSupported"`
    +	NicTeamingSupported                       bool            `xml:"nicTeamingSupported"`
    +	HighGuestMemSupported                     bool            `xml:"highGuestMemSupported"`
    +	MaintenanceModeSupported                  bool            `xml:"maintenanceModeSupported"`
    +	SuspendedRelocateSupported                bool            `xml:"suspendedRelocateSupported"`
    +	RestrictedSnapshotRelocateSupported       bool            `xml:"restrictedSnapshotRelocateSupported"`
    +	PerVmSwapFiles                            bool            `xml:"perVmSwapFiles"`
    +	LocalSwapDatastoreSupported               bool            `xml:"localSwapDatastoreSupported"`
    +	UnsharedSwapVMotionSupported              bool            `xml:"unsharedSwapVMotionSupported"`
    +	BackgroundSnapshotsSupported              bool            `xml:"backgroundSnapshotsSupported"`
    +	PreAssignedPCIUnitNumbersSupported        bool            `xml:"preAssignedPCIUnitNumbersSupported"`
    +	ScreenshotSupported                       bool            `xml:"screenshotSupported"`
    +	ScaledScreenshotSupported                 bool            `xml:"scaledScreenshotSupported"`
    +	StorageVMotionSupported                   *bool           `xml:"storageVMotionSupported"`
    +	VmotionWithStorageVMotionSupported        *bool           `xml:"vmotionWithStorageVMotionSupported"`
    +	VmotionAcrossNetworkSupported             *bool           `xml:"vmotionAcrossNetworkSupported"`
    +	MaxNumDisksSVMotion                       int32           `xml:"maxNumDisksSVMotion,omitempty"`
    +	HbrNicSelectionSupported                  *bool           `xml:"hbrNicSelectionSupported"`
    +	VrNfcNicSelectionSupported                *bool           `xml:"vrNfcNicSelectionSupported"`
    +	RecordReplaySupported                     *bool           `xml:"recordReplaySupported"`
    +	FtSupported                               *bool           `xml:"ftSupported"`
    +	ReplayUnsupportedReason                   string          `xml:"replayUnsupportedReason,omitempty"`
    +	ReplayCompatibilityIssues                 []string        `xml:"replayCompatibilityIssues,omitempty"`
    +	SmpFtSupported                            *bool           `xml:"smpFtSupported"`
    +	FtCompatibilityIssues                     []string        `xml:"ftCompatibilityIssues,omitempty"`
    +	SmpFtCompatibilityIssues                  []string        `xml:"smpFtCompatibilityIssues,omitempty"`
    +	MaxVcpusPerFtVm                           int32           `xml:"maxVcpusPerFtVm,omitempty"`
    +	LoginBySSLThumbprintSupported             *bool           `xml:"loginBySSLThumbprintSupported"`
    +	CloneFromSnapshotSupported                *bool           `xml:"cloneFromSnapshotSupported"`
    +	DeltaDiskBackingsSupported                *bool           `xml:"deltaDiskBackingsSupported"`
    +	PerVMNetworkTrafficShapingSupported       *bool           `xml:"perVMNetworkTrafficShapingSupported"`
    +	TpmSupported                              *bool           `xml:"tpmSupported"`
    +	TpmVersion                                string          `xml:"tpmVersion,omitempty"`
    +	TxtEnabled                                *bool           `xml:"txtEnabled"`
    +	SupportedCpuFeature                       []HostCpuIdInfo `xml:"supportedCpuFeature,omitempty"`
    +	VirtualExecUsageSupported                 *bool           `xml:"virtualExecUsageSupported"`
    +	StorageIORMSupported                      *bool           `xml:"storageIORMSupported"`
    +	VmDirectPathGen2Supported                 *bool           `xml:"vmDirectPathGen2Supported"`
    +	VmDirectPathGen2UnsupportedReason         []string        `xml:"vmDirectPathGen2UnsupportedReason,omitempty"`
    +	VmDirectPathGen2UnsupportedReasonExtended string          `xml:"vmDirectPathGen2UnsupportedReasonExtended,omitempty"`
    +	SupportedVmfsMajorVersion                 []int32         `xml:"supportedVmfsMajorVersion,omitempty"`
    +	VStorageCapable                           *bool           `xml:"vStorageCapable"`
    +	SnapshotRelayoutSupported                 *bool           `xml:"snapshotRelayoutSupported"`
    +	FirewallIpRulesSupported                  *bool           `xml:"firewallIpRulesSupported"`
    +	ServicePackageInfoSupported               *bool           `xml:"servicePackageInfoSupported"`
    +	MaxHostRunningVms                         int32           `xml:"maxHostRunningVms,omitempty"`
    +	MaxHostSupportedVcpus                     int32           `xml:"maxHostSupportedVcpus,omitempty"`
    +	VmfsDatastoreMountCapable                 *bool           `xml:"vmfsDatastoreMountCapable"`
    +	EightPlusHostVmfsSharedAccessSupported    *bool           `xml:"eightPlusHostVmfsSharedAccessSupported"`
    +	NestedHVSupported                         *bool           `xml:"nestedHVSupported"`
    +	VPMCSupported                             *bool           `xml:"vPMCSupported"`
    +	InterVMCommunicationThroughVMCISupported  *bool           `xml:"interVMCommunicationThroughVMCISupported"`
    +	ScheduledHardwareUpgradeSupported         *bool           `xml:"scheduledHardwareUpgradeSupported"`
    +	FeatureCapabilitiesSupported              *bool           `xml:"featureCapabilitiesSupported"`
    +	LatencySensitivitySupported               *bool           `xml:"latencySensitivitySupported"`
    +	StoragePolicySupported                    *bool           `xml:"storagePolicySupported"`
    +	Accel3dSupported                          *bool           `xml:"accel3dSupported"`
    +	ReliableMemoryAware                       *bool           `xml:"reliableMemoryAware"`
    +	MultipleNetworkStackInstanceSupported     *bool           `xml:"multipleNetworkStackInstanceSupported"`
    +	MessageBusProxySupported                  *bool           `xml:"messageBusProxySupported"`
    +	VsanSupported                             *bool           `xml:"vsanSupported"`
    +	VFlashSupported                           *bool           `xml:"vFlashSupported"`
    +	HostAccessManagerSupported                *bool           `xml:"hostAccessManagerSupported"`
    +	ProvisioningNicSelectionSupported         *bool           `xml:"provisioningNicSelectionSupported"`
    +	Nfs41Supported                            *bool           `xml:"nfs41Supported"`
    +	Nfs41Krb5iSupported                       *bool           `xml:"nfs41Krb5iSupported"`
    +	TurnDiskLocatorLedSupported               *bool           `xml:"turnDiskLocatorLedSupported"`
    +	VirtualVolumeDatastoreSupported           *bool           `xml:"virtualVolumeDatastoreSupported"`
    +	MarkAsSsdSupported                        *bool           `xml:"markAsSsdSupported"`
    +	MarkAsLocalSupported                      *bool           `xml:"markAsLocalSupported"`
    +	SmartCardAuthenticationSupported          *bool           `xml:"smartCardAuthenticationSupported"`
    +	PMemSupported                             *bool           `xml:"pMemSupported"`
    +	PMemSnapshotSupported                     *bool           `xml:"pMemSnapshotSupported"`
    +	CryptoSupported                           *bool           `xml:"cryptoSupported"`
    +	OneKVolumeAPIsSupported                   *bool           `xml:"oneKVolumeAPIsSupported"`
    +	GatewayOnNicSupported                     *bool           `xml:"gatewayOnNicSupported"`
    +	UpitSupported                             *bool           `xml:"upitSupported"`
    +	CpuHwMmuSupported                         *bool           `xml:"cpuHwMmuSupported"`
    +	EncryptedVMotionSupported                 *bool           `xml:"encryptedVMotionSupported"`
    +	EncryptionChangeOnAddRemoveSupported      *bool           `xml:"encryptionChangeOnAddRemoveSupported"`
    +	EncryptionHotOperationSupported           *bool           `xml:"encryptionHotOperationSupported"`
    +	EncryptionWithSnapshotsSupported          *bool           `xml:"encryptionWithSnapshotsSupported"`
    +	EncryptionFaultToleranceSupported         *bool           `xml:"encryptionFaultToleranceSupported"`
    +	EncryptionMemorySaveSupported             *bool           `xml:"encryptionMemorySaveSupported"`
    +	EncryptionRDMSupported                    *bool           `xml:"encryptionRDMSupported"`
    +	EncryptionVFlashSupported                 *bool           `xml:"encryptionVFlashSupported"`
    +	EncryptionCBRCSupported                   *bool           `xml:"encryptionCBRCSupported"`
    +	EncryptionHBRSupported                    *bool           `xml:"encryptionHBRSupported"`
    +	FtEfiSupported                            *bool           `xml:"ftEfiSupported"`
    +	UnmapMethodSupported                      string          `xml:"unmapMethodSupported,omitempty"`
    +	MaxMemMBPerFtVm                           int32           `xml:"maxMemMBPerFtVm,omitempty"`
    +	VirtualMmuUsageIgnored                    *bool           `xml:"virtualMmuUsageIgnored"`
    +	VirtualExecUsageIgnored                   *bool           `xml:"virtualExecUsageIgnored"`
    +	VmCreateDateSupported                     *bool           `xml:"vmCreateDateSupported"`
    +	Vmfs3EOLSupported                         *bool           `xml:"vmfs3EOLSupported"`
    +	FtVmcpSupported                           *bool           `xml:"ftVmcpSupported"`
    +}
    +
    +func init() {
    +	t["HostCapability"] = reflect.TypeOf((*HostCapability)(nil)).Elem()
    +}
    +
    +type HostCertificateManagerCertificateInfo struct {
    +	DynamicData
    +
    +	Issuer    string     `xml:"issuer,omitempty"`
    +	NotBefore *time.Time `xml:"notBefore"`
    +	NotAfter  *time.Time `xml:"notAfter"`
    +	Subject   string     `xml:"subject,omitempty"`
    +	Status    string     `xml:"status"`
    +}
    +
    +func init() {
    +	t["HostCertificateManagerCertificateInfo"] = reflect.TypeOf((*HostCertificateManagerCertificateInfo)(nil)).Elem()
    +}
    +
    +type HostClearVStorageObjectControlFlags HostClearVStorageObjectControlFlagsRequestType
    +
    +func init() {
    +	t["HostClearVStorageObjectControlFlags"] = reflect.TypeOf((*HostClearVStorageObjectControlFlags)(nil)).Elem()
    +}
    +
    +type HostClearVStorageObjectControlFlagsRequestType struct {
    +	This         ManagedObjectReference `xml:"_this"`
    +	Id           ID                     `xml:"id"`
    +	Datastore    ManagedObjectReference `xml:"datastore"`
    +	ControlFlags []string               `xml:"controlFlags,omitempty"`
    +}
    +
    +func init() {
    +	t["HostClearVStorageObjectControlFlagsRequestType"] = reflect.TypeOf((*HostClearVStorageObjectControlFlagsRequestType)(nil)).Elem()
    +}
    +
    +type HostClearVStorageObjectControlFlagsResponse struct {
    +}
    +
    +type HostCloneVStorageObjectRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	Id        ID                     `xml:"id"`
    +	Datastore ManagedObjectReference `xml:"datastore"`
    +	Spec      VslmCloneSpec          `xml:"spec"`
    +}
    +
    +func init() {
    +	t["HostCloneVStorageObjectRequestType"] = reflect.TypeOf((*HostCloneVStorageObjectRequestType)(nil)).Elem()
    +}
    +
    +type HostCloneVStorageObject_Task HostCloneVStorageObjectRequestType
    +
    +func init() {
    +	t["HostCloneVStorageObject_Task"] = reflect.TypeOf((*HostCloneVStorageObject_Task)(nil)).Elem()
    +}
    +
    +type HostCloneVStorageObject_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type HostCnxFailedAccountFailedEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["HostCnxFailedAccountFailedEvent"] = reflect.TypeOf((*HostCnxFailedAccountFailedEvent)(nil)).Elem()
    +}
    +
    +type HostCnxFailedAlreadyManagedEvent struct {
    +	HostEvent
    +
    +	ServerName string `xml:"serverName"`
    +}
    +
    +func init() {
    +	t["HostCnxFailedAlreadyManagedEvent"] = reflect.TypeOf((*HostCnxFailedAlreadyManagedEvent)(nil)).Elem()
    +}
    +
    +type HostCnxFailedBadCcagentEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["HostCnxFailedBadCcagentEvent"] = reflect.TypeOf((*HostCnxFailedBadCcagentEvent)(nil)).Elem()
    +}
    +
    +type HostCnxFailedBadUsernameEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["HostCnxFailedBadUsernameEvent"] = reflect.TypeOf((*HostCnxFailedBadUsernameEvent)(nil)).Elem()
    +}
    +
    +type HostCnxFailedBadVersionEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["HostCnxFailedBadVersionEvent"] = reflect.TypeOf((*HostCnxFailedBadVersionEvent)(nil)).Elem()
    +}
    +
    +type HostCnxFailedCcagentUpgradeEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["HostCnxFailedCcagentUpgradeEvent"] = reflect.TypeOf((*HostCnxFailedCcagentUpgradeEvent)(nil)).Elem()
    +}
    +
    +type HostCnxFailedEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["HostCnxFailedEvent"] = reflect.TypeOf((*HostCnxFailedEvent)(nil)).Elem()
    +}
    +
    +type HostCnxFailedNetworkErrorEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["HostCnxFailedNetworkErrorEvent"] = reflect.TypeOf((*HostCnxFailedNetworkErrorEvent)(nil)).Elem()
    +}
    +
    +type HostCnxFailedNoAccessEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["HostCnxFailedNoAccessEvent"] = reflect.TypeOf((*HostCnxFailedNoAccessEvent)(nil)).Elem()
    +}
    +
    +type HostCnxFailedNoConnectionEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["HostCnxFailedNoConnectionEvent"] = reflect.TypeOf((*HostCnxFailedNoConnectionEvent)(nil)).Elem()
    +}
    +
    +type HostCnxFailedNoLicenseEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["HostCnxFailedNoLicenseEvent"] = reflect.TypeOf((*HostCnxFailedNoLicenseEvent)(nil)).Elem()
    +}
    +
    +type HostCnxFailedNotFoundEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["HostCnxFailedNotFoundEvent"] = reflect.TypeOf((*HostCnxFailedNotFoundEvent)(nil)).Elem()
    +}
    +
    +type HostCnxFailedTimeoutEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["HostCnxFailedTimeoutEvent"] = reflect.TypeOf((*HostCnxFailedTimeoutEvent)(nil)).Elem()
    +}
    +
    +type HostCommunication struct {
    +	RuntimeFault
    +}
    +
    +func init() {
    +	t["HostCommunication"] = reflect.TypeOf((*HostCommunication)(nil)).Elem()
    +}
    +
    +type HostCommunicationFault BaseHostCommunication
    +
    +func init() {
    +	t["HostCommunicationFault"] = reflect.TypeOf((*HostCommunicationFault)(nil)).Elem()
    +}
    +
    +type HostComplianceCheckedEvent struct {
    +	HostEvent
    +
    +	Profile ProfileEventArgument `xml:"profile"`
    +}
    +
    +func init() {
    +	t["HostComplianceCheckedEvent"] = reflect.TypeOf((*HostComplianceCheckedEvent)(nil)).Elem()
    +}
    +
    +type HostCompliantEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["HostCompliantEvent"] = reflect.TypeOf((*HostCompliantEvent)(nil)).Elem()
    +}
    +
    +type HostConfigAppliedEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["HostConfigAppliedEvent"] = reflect.TypeOf((*HostConfigAppliedEvent)(nil)).Elem()
    +}
    +
    +type HostConfigChange struct {
    +	DynamicData
    +}
    +
    +func init() {
    +	t["HostConfigChange"] = reflect.TypeOf((*HostConfigChange)(nil)).Elem()
    +}
    +
    +type HostConfigFailed struct {
    +	HostConfigFault
    +
    +	Failure []LocalizedMethodFault `xml:"failure"`
    +}
    +
    +func init() {
    +	t["HostConfigFailed"] = reflect.TypeOf((*HostConfigFailed)(nil)).Elem()
    +}
    +
    +type HostConfigFailedFault HostConfigFailed
    +
    +func init() {
    +	t["HostConfigFailedFault"] = reflect.TypeOf((*HostConfigFailedFault)(nil)).Elem()
    +}
    +
    +type HostConfigFault struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["HostConfigFault"] = reflect.TypeOf((*HostConfigFault)(nil)).Elem()
    +}
    +
    +type HostConfigFaultFault BaseHostConfigFault
    +
    +func init() {
    +	t["HostConfigFaultFault"] = reflect.TypeOf((*HostConfigFaultFault)(nil)).Elem()
    +}
    +
    +type HostConfigInfo struct {
    +	DynamicData
    +
    +	Host                      ManagedObjectReference               `xml:"host"`
    +	Product                   AboutInfo                            `xml:"product"`
    +	DeploymentInfo            *HostDeploymentInfo                  `xml:"deploymentInfo,omitempty"`
    +	HyperThread               *HostHyperThreadScheduleInfo         `xml:"hyperThread,omitempty"`
    +	ConsoleReservation        *ServiceConsoleReservationInfo       `xml:"consoleReservation,omitempty"`
    +	VirtualMachineReservation *VirtualMachineMemoryReservationInfo `xml:"virtualMachineReservation,omitempty"`
    +	StorageDevice             *HostStorageDeviceInfo               `xml:"storageDevice,omitempty"`
    +	MultipathState            *HostMultipathStateInfo              `xml:"multipathState,omitempty"`
    +	FileSystemVolume          *HostFileSystemVolumeInfo            `xml:"fileSystemVolume,omitempty"`
    +	SystemFile                []string                             `xml:"systemFile,omitempty"`
    +	Network                   *HostNetworkInfo                     `xml:"network,omitempty"`
    +	Vmotion                   *HostVMotionInfo                     `xml:"vmotion,omitempty"`
    +	VirtualNicManagerInfo     *HostVirtualNicManagerInfo           `xml:"virtualNicManagerInfo,omitempty"`
    +	Capabilities              *HostNetCapabilities                 `xml:"capabilities,omitempty"`
    +	DatastoreCapabilities     *HostDatastoreSystemCapabilities     `xml:"datastoreCapabilities,omitempty"`
    +	OffloadCapabilities       *HostNetOffloadCapabilities          `xml:"offloadCapabilities,omitempty"`
    +	Service                   *HostServiceInfo                     `xml:"service,omitempty"`
    +	Firewall                  *HostFirewallInfo                    `xml:"firewall,omitempty"`
    +	AutoStart                 *HostAutoStartManagerConfig          `xml:"autoStart,omitempty"`
    +	ActiveDiagnosticPartition *HostDiagnosticPartition             `xml:"activeDiagnosticPartition,omitempty"`
    +	Option                    []BaseOptionValue                    `xml:"option,omitempty,typeattr"`
    +	OptionDef                 []OptionDef                          `xml:"optionDef,omitempty"`
    +	DatastorePrincipal        string                               `xml:"datastorePrincipal,omitempty"`
    +	LocalSwapDatastore        *ManagedObjectReference              `xml:"localSwapDatastore,omitempty"`
    +	SystemSwapConfiguration   *HostSystemSwapConfiguration         `xml:"systemSwapConfiguration,omitempty"`
    +	SystemResources           *HostSystemResourceInfo              `xml:"systemResources,omitempty"`
    +	DateTimeInfo              *HostDateTimeInfo                    `xml:"dateTimeInfo,omitempty"`
    +	Flags                     *HostFlagInfo                        `xml:"flags,omitempty"`
    +	AdminDisabled             *bool                                `xml:"adminDisabled"`
    +	LockdownMode              HostLockdownMode                     `xml:"lockdownMode,omitempty"`
    +	Ipmi                      *HostIpmiInfo                        `xml:"ipmi,omitempty"`
    +	SslThumbprintInfo         *HostSslThumbprintInfo               `xml:"sslThumbprintInfo,omitempty"`
    +	SslThumbprintData         []HostSslThumbprintInfo              `xml:"sslThumbprintData,omitempty"`
    +	Certificate               []byte                               `xml:"certificate,omitempty"`
    +	PciPassthruInfo           []BaseHostPciPassthruInfo            `xml:"pciPassthruInfo,omitempty,typeattr"`
    +	AuthenticationManagerInfo *HostAuthenticationManagerInfo       `xml:"authenticationManagerInfo,omitempty"`
    +	FeatureVersion            []HostFeatureVersionInfo             `xml:"featureVersion,omitempty"`
    +	PowerSystemCapability     *PowerSystemCapability               `xml:"powerSystemCapability,omitempty"`
    +	PowerSystemInfo           *PowerSystemInfo                     `xml:"powerSystemInfo,omitempty"`
    +	CacheConfigurationInfo    []HostCacheConfigurationInfo         `xml:"cacheConfigurationInfo,omitempty"`
    +	WakeOnLanCapable          *bool                                `xml:"wakeOnLanCapable"`
    +	FeatureCapability         []HostFeatureCapability              `xml:"featureCapability,omitempty"`
    +	MaskedFeatureCapability   []HostFeatureCapability              `xml:"maskedFeatureCapability,omitempty"`
    +	VFlashConfigInfo          *HostVFlashManagerVFlashConfigInfo   `xml:"vFlashConfigInfo,omitempty"`
    +	VsanHostConfig            *VsanHostConfigInfo                  `xml:"vsanHostConfig,omitempty"`
    +	DomainList                []string                             `xml:"domainList,omitempty"`
    +	ScriptCheckSum            []byte                               `xml:"scriptCheckSum,omitempty"`
    +	HostConfigCheckSum        []byte                               `xml:"hostConfigCheckSum,omitempty"`
    +	GraphicsInfo              []HostGraphicsInfo                   `xml:"graphicsInfo,omitempty"`
    +	SharedPassthruGpuTypes    []string                             `xml:"sharedPassthruGpuTypes,omitempty"`
    +	GraphicsConfig            *HostGraphicsConfig                  `xml:"graphicsConfig,omitempty"`
    +	SharedGpuCapabilities     []HostSharedGpuCapabilities          `xml:"sharedGpuCapabilities,omitempty"`
    +	IoFilterInfo              []HostIoFilterInfo                   `xml:"ioFilterInfo,omitempty"`
    +	SriovDevicePool           []BaseHostSriovDevicePoolInfo        `xml:"sriovDevicePool,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["HostConfigInfo"] = reflect.TypeOf((*HostConfigInfo)(nil)).Elem()
    +}
    +
    +type HostConfigManager struct {
    +	DynamicData
    +
    +	CpuScheduler              *ManagedObjectReference `xml:"cpuScheduler,omitempty"`
    +	DatastoreSystem           *ManagedObjectReference `xml:"datastoreSystem,omitempty"`
    +	MemoryManager             *ManagedObjectReference `xml:"memoryManager,omitempty"`
    +	StorageSystem             *ManagedObjectReference `xml:"storageSystem,omitempty"`
    +	NetworkSystem             *ManagedObjectReference `xml:"networkSystem,omitempty"`
    +	VmotionSystem             *ManagedObjectReference `xml:"vmotionSystem,omitempty"`
    +	VirtualNicManager         *ManagedObjectReference `xml:"virtualNicManager,omitempty"`
    +	ServiceSystem             *ManagedObjectReference `xml:"serviceSystem,omitempty"`
    +	FirewallSystem            *ManagedObjectReference `xml:"firewallSystem,omitempty"`
    +	AdvancedOption            *ManagedObjectReference `xml:"advancedOption,omitempty"`
    +	DiagnosticSystem          *ManagedObjectReference `xml:"diagnosticSystem,omitempty"`
    +	AutoStartManager          *ManagedObjectReference `xml:"autoStartManager,omitempty"`
    +	SnmpSystem                *ManagedObjectReference `xml:"snmpSystem,omitempty"`
    +	DateTimeSystem            *ManagedObjectReference `xml:"dateTimeSystem,omitempty"`
    +	PatchManager              *ManagedObjectReference `xml:"patchManager,omitempty"`
    +	ImageConfigManager        *ManagedObjectReference `xml:"imageConfigManager,omitempty"`
    +	BootDeviceSystem          *ManagedObjectReference `xml:"bootDeviceSystem,omitempty"`
    +	FirmwareSystem            *ManagedObjectReference `xml:"firmwareSystem,omitempty"`
    +	HealthStatusSystem        *ManagedObjectReference `xml:"healthStatusSystem,omitempty"`
    +	PciPassthruSystem         *ManagedObjectReference `xml:"pciPassthruSystem,omitempty"`
    +	LicenseManager            *ManagedObjectReference `xml:"licenseManager,omitempty"`
    +	KernelModuleSystem        *ManagedObjectReference `xml:"kernelModuleSystem,omitempty"`
    +	AuthenticationManager     *ManagedObjectReference `xml:"authenticationManager,omitempty"`
    +	PowerSystem               *ManagedObjectReference `xml:"powerSystem,omitempty"`
    +	CacheConfigurationManager *ManagedObjectReference `xml:"cacheConfigurationManager,omitempty"`
    +	EsxAgentHostManager       *ManagedObjectReference `xml:"esxAgentHostManager,omitempty"`
    +	IscsiManager              *ManagedObjectReference `xml:"iscsiManager,omitempty"`
    +	VFlashManager             *ManagedObjectReference `xml:"vFlashManager,omitempty"`
    +	VsanSystem                *ManagedObjectReference `xml:"vsanSystem,omitempty"`
    +	MessageBusProxy           *ManagedObjectReference `xml:"messageBusProxy,omitempty"`
    +	UserDirectory             *ManagedObjectReference `xml:"userDirectory,omitempty"`
    +	AccountManager            *ManagedObjectReference `xml:"accountManager,omitempty"`
    +	HostAccessManager         *ManagedObjectReference `xml:"hostAccessManager,omitempty"`
    +	GraphicsManager           *ManagedObjectReference `xml:"graphicsManager,omitempty"`
    +	VsanInternalSystem        *ManagedObjectReference `xml:"vsanInternalSystem,omitempty"`
    +	CertificateManager        *ManagedObjectReference `xml:"certificateManager,omitempty"`
    +	CryptoManager             *ManagedObjectReference `xml:"cryptoManager,omitempty"`
    +	NvdimmSystem              *ManagedObjectReference `xml:"nvdimmSystem,omitempty"`
    +}
    +
    +func init() {
    +	t["HostConfigManager"] = reflect.TypeOf((*HostConfigManager)(nil)).Elem()
    +}
    +
    +type HostConfigSpec struct {
    +	DynamicData
    +
    +	NasDatastore             []HostNasVolumeConfig                   `xml:"nasDatastore,omitempty"`
    +	Network                  *HostNetworkConfig                      `xml:"network,omitempty"`
    +	NicTypeSelection         []HostVirtualNicManagerNicTypeSelection `xml:"nicTypeSelection,omitempty"`
    +	Service                  []HostServiceConfig                     `xml:"service,omitempty"`
    +	Firewall                 *HostFirewallConfig                     `xml:"firewall,omitempty"`
    +	Option                   []BaseOptionValue                       `xml:"option,omitempty,typeattr"`
    +	DatastorePrincipal       string                                  `xml:"datastorePrincipal,omitempty"`
    +	DatastorePrincipalPasswd string                                  `xml:"datastorePrincipalPasswd,omitempty"`
    +	Datetime                 *HostDateTimeConfig                     `xml:"datetime,omitempty"`
    +	StorageDevice            *HostStorageDeviceInfo                  `xml:"storageDevice,omitempty"`
    +	License                  *HostLicenseSpec                        `xml:"license,omitempty"`
    +	Security                 *HostSecuritySpec                       `xml:"security,omitempty"`
    +	UserAccount              []BaseHostAccountSpec                   `xml:"userAccount,omitempty,typeattr"`
    +	UsergroupAccount         []BaseHostAccountSpec                   `xml:"usergroupAccount,omitempty,typeattr"`
    +	Memory                   *HostMemorySpec                         `xml:"memory,omitempty"`
    +	ActiveDirectory          []HostActiveDirectory                   `xml:"activeDirectory,omitempty"`
    +	GenericConfig            []KeyAnyValue                           `xml:"genericConfig,omitempty"`
    +	GraphicsConfig           *HostGraphicsConfig                     `xml:"graphicsConfig,omitempty"`
    +}
    +
    +func init() {
    +	t["HostConfigSpec"] = reflect.TypeOf((*HostConfigSpec)(nil)).Elem()
    +}
    +
    +type HostConfigSummary struct {
    +	DynamicData
    +
    +	Name                  string                   `xml:"name"`
    +	Port                  int32                    `xml:"port"`
    +	SslThumbprint         string                   `xml:"sslThumbprint,omitempty"`
    +	Product               *AboutInfo               `xml:"product,omitempty"`
    +	VmotionEnabled        bool                     `xml:"vmotionEnabled"`
    +	FaultToleranceEnabled *bool                    `xml:"faultToleranceEnabled"`
    +	FeatureVersion        []HostFeatureVersionInfo `xml:"featureVersion,omitempty"`
    +	AgentVmDatastore      *ManagedObjectReference  `xml:"agentVmDatastore,omitempty"`
    +	AgentVmNetwork        *ManagedObjectReference  `xml:"agentVmNetwork,omitempty"`
    +}
    +
    +func init() {
    +	t["HostConfigSummary"] = reflect.TypeOf((*HostConfigSummary)(nil)).Elem()
    +}
    +
    +type HostConfigVFlashCache HostConfigVFlashCacheRequestType
    +
    +func init() {
    +	t["HostConfigVFlashCache"] = reflect.TypeOf((*HostConfigVFlashCache)(nil)).Elem()
    +}
    +
    +type HostConfigVFlashCacheRequestType struct {
    +	This ManagedObjectReference                 `xml:"_this"`
    +	Spec HostVFlashManagerVFlashCacheConfigSpec `xml:"spec"`
    +}
    +
    +func init() {
    +	t["HostConfigVFlashCacheRequestType"] = reflect.TypeOf((*HostConfigVFlashCacheRequestType)(nil)).Elem()
    +}
    +
    +type HostConfigVFlashCacheResponse struct {
    +}
    +
    +type HostConfigureVFlashResource HostConfigureVFlashResourceRequestType
    +
    +func init() {
    +	t["HostConfigureVFlashResource"] = reflect.TypeOf((*HostConfigureVFlashResource)(nil)).Elem()
    +}
    +
    +type HostConfigureVFlashResourceRequestType struct {
    +	This ManagedObjectReference                    `xml:"_this"`
    +	Spec HostVFlashManagerVFlashResourceConfigSpec `xml:"spec"`
    +}
    +
    +func init() {
    +	t["HostConfigureVFlashResourceRequestType"] = reflect.TypeOf((*HostConfigureVFlashResourceRequestType)(nil)).Elem()
    +}
    +
    +type HostConfigureVFlashResourceResponse struct {
    +}
    +
    +type HostConnectFault struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["HostConnectFault"] = reflect.TypeOf((*HostConnectFault)(nil)).Elem()
    +}
    +
    +type HostConnectFaultFault BaseHostConnectFault
    +
    +func init() {
    +	t["HostConnectFaultFault"] = reflect.TypeOf((*HostConnectFaultFault)(nil)).Elem()
    +}
    +
    +type HostConnectInfo struct {
    +	DynamicData
    +
    +	ServerIp               string                           `xml:"serverIp,omitempty"`
    +	InDasCluster           *bool                            `xml:"inDasCluster"`
    +	Host                   HostListSummary                  `xml:"host"`
    +	Vm                     []VirtualMachineSummary          `xml:"vm,omitempty"`
    +	VimAccountNameRequired *bool                            `xml:"vimAccountNameRequired"`
    +	ClusterSupported       *bool                            `xml:"clusterSupported"`
    +	Network                []BaseHostConnectInfoNetworkInfo `xml:"network,omitempty,typeattr"`
    +	Datastore              []BaseHostDatastoreConnectInfo   `xml:"datastore,omitempty,typeattr"`
    +	License                *HostLicenseConnectInfo          `xml:"license,omitempty"`
    +	Capability             *HostCapability                  `xml:"capability,omitempty"`
    +}
    +
    +func init() {
    +	t["HostConnectInfo"] = reflect.TypeOf((*HostConnectInfo)(nil)).Elem()
    +}
    +
    +type HostConnectInfoNetworkInfo struct {
    +	DynamicData
    +
    +	Summary BaseNetworkSummary `xml:"summary,typeattr"`
    +}
    +
    +func init() {
    +	t["HostConnectInfoNetworkInfo"] = reflect.TypeOf((*HostConnectInfoNetworkInfo)(nil)).Elem()
    +}
    +
    +type HostConnectSpec struct {
    +	DynamicData
    +
    +	HostName           string                  `xml:"hostName,omitempty"`
    +	Port               int32                   `xml:"port,omitempty"`
    +	SslThumbprint      string                  `xml:"sslThumbprint,omitempty"`
    +	UserName           string                  `xml:"userName,omitempty"`
    +	Password           string                  `xml:"password,omitempty"`
    +	VmFolder           *ManagedObjectReference `xml:"vmFolder,omitempty"`
    +	Force              bool                    `xml:"force"`
    +	VimAccountName     string                  `xml:"vimAccountName,omitempty"`
    +	VimAccountPassword string                  `xml:"vimAccountPassword,omitempty"`
    +	ManagementIp       string                  `xml:"managementIp,omitempty"`
    +	LockdownMode       HostLockdownMode        `xml:"lockdownMode,omitempty"`
    +	HostGateway        *HostGatewaySpec        `xml:"hostGateway,omitempty"`
    +}
    +
    +func init() {
    +	t["HostConnectSpec"] = reflect.TypeOf((*HostConnectSpec)(nil)).Elem()
    +}
    +
    +type HostConnectedEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["HostConnectedEvent"] = reflect.TypeOf((*HostConnectedEvent)(nil)).Elem()
    +}
    +
    +type HostConnectionLostEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["HostConnectionLostEvent"] = reflect.TypeOf((*HostConnectionLostEvent)(nil)).Elem()
    +}
    +
    +type HostCpuIdInfo struct {
    +	DynamicData
    +
    +	Level  int32  `xml:"level"`
    +	Vendor string `xml:"vendor,omitempty"`
    +	Eax    string `xml:"eax,omitempty"`
    +	Ebx    string `xml:"ebx,omitempty"`
    +	Ecx    string `xml:"ecx,omitempty"`
    +	Edx    string `xml:"edx,omitempty"`
    +}
    +
    +func init() {
    +	t["HostCpuIdInfo"] = reflect.TypeOf((*HostCpuIdInfo)(nil)).Elem()
    +}
    +
    +type HostCpuInfo struct {
    +	DynamicData
    +
    +	NumCpuPackages int16 `xml:"numCpuPackages"`
    +	NumCpuCores    int16 `xml:"numCpuCores"`
    +	NumCpuThreads  int16 `xml:"numCpuThreads"`
    +	Hz             int64 `xml:"hz"`
    +}
    +
    +func init() {
    +	t["HostCpuInfo"] = reflect.TypeOf((*HostCpuInfo)(nil)).Elem()
    +}
    +
    +type HostCpuPackage struct {
    +	DynamicData
    +
    +	Index       int16           `xml:"index"`
    +	Vendor      string          `xml:"vendor"`
    +	Hz          int64           `xml:"hz"`
    +	BusHz       int64           `xml:"busHz"`
    +	Description string          `xml:"description"`
    +	ThreadId    []int16         `xml:"threadId"`
    +	CpuFeature  []HostCpuIdInfo `xml:"cpuFeature,omitempty"`
    +}
    +
    +func init() {
    +	t["HostCpuPackage"] = reflect.TypeOf((*HostCpuPackage)(nil)).Elem()
    +}
    +
    +type HostCpuPowerManagementInfo struct {
    +	DynamicData
    +
    +	CurrentPolicy   string `xml:"currentPolicy,omitempty"`
    +	HardwareSupport string `xml:"hardwareSupport,omitempty"`
    +}
    +
    +func init() {
    +	t["HostCpuPowerManagementInfo"] = reflect.TypeOf((*HostCpuPowerManagementInfo)(nil)).Elem()
    +}
    +
    +type HostCreateDiskRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Spec VslmCreateSpec         `xml:"spec"`
    +}
    +
    +func init() {
    +	t["HostCreateDiskRequestType"] = reflect.TypeOf((*HostCreateDiskRequestType)(nil)).Elem()
    +}
    +
    +type HostCreateDisk_Task HostCreateDiskRequestType
    +
    +func init() {
    +	t["HostCreateDisk_Task"] = reflect.TypeOf((*HostCreateDisk_Task)(nil)).Elem()
    +}
    +
    +type HostCreateDisk_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type HostDasDisabledEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["HostDasDisabledEvent"] = reflect.TypeOf((*HostDasDisabledEvent)(nil)).Elem()
    +}
    +
    +type HostDasDisablingEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["HostDasDisablingEvent"] = reflect.TypeOf((*HostDasDisablingEvent)(nil)).Elem()
    +}
    +
    +type HostDasEnabledEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["HostDasEnabledEvent"] = reflect.TypeOf((*HostDasEnabledEvent)(nil)).Elem()
    +}
    +
    +type HostDasEnablingEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["HostDasEnablingEvent"] = reflect.TypeOf((*HostDasEnablingEvent)(nil)).Elem()
    +}
    +
    +type HostDasErrorEvent struct {
    +	HostEvent
    +
    +	Message string `xml:"message,omitempty"`
    +	Reason  string `xml:"reason,omitempty"`
    +}
    +
    +func init() {
    +	t["HostDasErrorEvent"] = reflect.TypeOf((*HostDasErrorEvent)(nil)).Elem()
    +}
    +
    +type HostDasEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["HostDasEvent"] = reflect.TypeOf((*HostDasEvent)(nil)).Elem()
    +}
    +
    +type HostDasOkEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["HostDasOkEvent"] = reflect.TypeOf((*HostDasOkEvent)(nil)).Elem()
    +}
    +
    +type HostDatastoreBrowserSearchResults struct {
    +	DynamicData
    +
    +	Datastore  *ManagedObjectReference `xml:"datastore,omitempty"`
    +	FolderPath string                  `xml:"folderPath,omitempty"`
    +	File       []BaseFileInfo          `xml:"file,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["HostDatastoreBrowserSearchResults"] = reflect.TypeOf((*HostDatastoreBrowserSearchResults)(nil)).Elem()
    +}
    +
    +type HostDatastoreBrowserSearchSpec struct {
    +	DynamicData
    +
    +	Query                 []BaseFileQuery `xml:"query,omitempty,typeattr"`
    +	Details               *FileQueryFlags `xml:"details,omitempty"`
    +	SearchCaseInsensitive *bool           `xml:"searchCaseInsensitive"`
    +	MatchPattern          []string        `xml:"matchPattern,omitempty"`
    +	SortFoldersFirst      *bool           `xml:"sortFoldersFirst"`
    +}
    +
    +func init() {
    +	t["HostDatastoreBrowserSearchSpec"] = reflect.TypeOf((*HostDatastoreBrowserSearchSpec)(nil)).Elem()
    +}
    +
    +type HostDatastoreConnectInfo struct {
    +	DynamicData
    +
    +	Summary DatastoreSummary `xml:"summary"`
    +}
    +
    +func init() {
    +	t["HostDatastoreConnectInfo"] = reflect.TypeOf((*HostDatastoreConnectInfo)(nil)).Elem()
    +}
    +
    +type HostDatastoreExistsConnectInfo struct {
    +	HostDatastoreConnectInfo
    +
    +	NewDatastoreName string `xml:"newDatastoreName"`
    +}
    +
    +func init() {
    +	t["HostDatastoreExistsConnectInfo"] = reflect.TypeOf((*HostDatastoreExistsConnectInfo)(nil)).Elem()
    +}
    +
    +type HostDatastoreNameConflictConnectInfo struct {
    +	HostDatastoreConnectInfo
    +
    +	NewDatastoreName string `xml:"newDatastoreName"`
    +}
    +
    +func init() {
    +	t["HostDatastoreNameConflictConnectInfo"] = reflect.TypeOf((*HostDatastoreNameConflictConnectInfo)(nil)).Elem()
    +}
    +
    +type HostDatastoreSystemCapabilities struct {
    +	DynamicData
    +
    +	NfsMountCreationRequired     bool  `xml:"nfsMountCreationRequired"`
    +	NfsMountCreationSupported    bool  `xml:"nfsMountCreationSupported"`
    +	LocalDatastoreSupported      bool  `xml:"localDatastoreSupported"`
    +	VmfsExtentExpansionSupported *bool `xml:"vmfsExtentExpansionSupported"`
    +}
    +
    +func init() {
    +	t["HostDatastoreSystemCapabilities"] = reflect.TypeOf((*HostDatastoreSystemCapabilities)(nil)).Elem()
    +}
    +
    +type HostDatastoreSystemDatastoreResult struct {
    +	DynamicData
    +
    +	Key   ManagedObjectReference `xml:"key"`
    +	Fault *LocalizedMethodFault  `xml:"fault,omitempty"`
    +}
    +
    +func init() {
    +	t["HostDatastoreSystemDatastoreResult"] = reflect.TypeOf((*HostDatastoreSystemDatastoreResult)(nil)).Elem()
    +}
    +
    +type HostDatastoreSystemVvolDatastoreSpec struct {
    +	DynamicData
    +
    +	Name string `xml:"name"`
    +	ScId string `xml:"scId"`
    +}
    +
    +func init() {
    +	t["HostDatastoreSystemVvolDatastoreSpec"] = reflect.TypeOf((*HostDatastoreSystemVvolDatastoreSpec)(nil)).Elem()
    +}
    +
    +type HostDateTimeConfig struct {
    +	DynamicData
    +
    +	TimeZone  string         `xml:"timeZone,omitempty"`
    +	NtpConfig *HostNtpConfig `xml:"ntpConfig,omitempty"`
    +}
    +
    +func init() {
    +	t["HostDateTimeConfig"] = reflect.TypeOf((*HostDateTimeConfig)(nil)).Elem()
    +}
    +
    +type HostDateTimeInfo struct {
    +	DynamicData
    +
    +	TimeZone  HostDateTimeSystemTimeZone `xml:"timeZone"`
    +	NtpConfig *HostNtpConfig             `xml:"ntpConfig,omitempty"`
    +}
    +
    +func init() {
    +	t["HostDateTimeInfo"] = reflect.TypeOf((*HostDateTimeInfo)(nil)).Elem()
    +}
    +
    +type HostDateTimeSystemTimeZone struct {
    +	DynamicData
    +
    +	Key         string `xml:"key"`
    +	Name        string `xml:"name"`
    +	Description string `xml:"description"`
    +	GmtOffset   int32  `xml:"gmtOffset"`
    +}
    +
    +func init() {
    +	t["HostDateTimeSystemTimeZone"] = reflect.TypeOf((*HostDateTimeSystemTimeZone)(nil)).Elem()
    +}
    +
    +type HostDeleteVStorageObjectRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	Id        ID                     `xml:"id"`
    +	Datastore ManagedObjectReference `xml:"datastore"`
    +}
    +
    +func init() {
    +	t["HostDeleteVStorageObjectRequestType"] = reflect.TypeOf((*HostDeleteVStorageObjectRequestType)(nil)).Elem()
    +}
    +
    +type HostDeleteVStorageObject_Task HostDeleteVStorageObjectRequestType
    +
    +func init() {
    +	t["HostDeleteVStorageObject_Task"] = reflect.TypeOf((*HostDeleteVStorageObject_Task)(nil)).Elem()
    +}
    +
    +type HostDeleteVStorageObject_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type HostDeploymentInfo struct {
    +	DynamicData
    +
    +	BootedFromStatelessCache *bool `xml:"bootedFromStatelessCache"`
    +}
    +
    +func init() {
    +	t["HostDeploymentInfo"] = reflect.TypeOf((*HostDeploymentInfo)(nil)).Elem()
    +}
    +
    +type HostDevice struct {
    +	DynamicData
    +
    +	DeviceName string `xml:"deviceName"`
    +	DeviceType string `xml:"deviceType"`
    +}
    +
    +func init() {
    +	t["HostDevice"] = reflect.TypeOf((*HostDevice)(nil)).Elem()
    +}
    +
    +type HostDhcpService struct {
    +	DynamicData
    +
    +	Key  string              `xml:"key"`
    +	Spec HostDhcpServiceSpec `xml:"spec"`
    +}
    +
    +func init() {
    +	t["HostDhcpService"] = reflect.TypeOf((*HostDhcpService)(nil)).Elem()
    +}
    +
    +type HostDhcpServiceConfig struct {
    +	DynamicData
    +
    +	ChangeOperation string              `xml:"changeOperation,omitempty"`
    +	Key             string              `xml:"key"`
    +	Spec            HostDhcpServiceSpec `xml:"spec"`
    +}
    +
    +func init() {
    +	t["HostDhcpServiceConfig"] = reflect.TypeOf((*HostDhcpServiceConfig)(nil)).Elem()
    +}
    +
    +type HostDhcpServiceSpec struct {
    +	DynamicData
    +
    +	VirtualSwitch        string `xml:"virtualSwitch"`
    +	DefaultLeaseDuration int32  `xml:"defaultLeaseDuration"`
    +	LeaseBeginIp         string `xml:"leaseBeginIp"`
    +	LeaseEndIp           string `xml:"leaseEndIp"`
    +	MaxLeaseDuration     int32  `xml:"maxLeaseDuration"`
    +	UnlimitedLease       bool   `xml:"unlimitedLease"`
    +	IpSubnetAddr         string `xml:"ipSubnetAddr"`
    +	IpSubnetMask         string `xml:"ipSubnetMask"`
    +}
    +
    +func init() {
    +	t["HostDhcpServiceSpec"] = reflect.TypeOf((*HostDhcpServiceSpec)(nil)).Elem()
    +}
    +
    +type HostDiagnosticPartition struct {
    +	DynamicData
    +
    +	StorageType    string                `xml:"storageType"`
    +	DiagnosticType string                `xml:"diagnosticType"`
    +	Slots          int32                 `xml:"slots"`
    +	Id             HostScsiDiskPartition `xml:"id"`
    +}
    +
    +func init() {
    +	t["HostDiagnosticPartition"] = reflect.TypeOf((*HostDiagnosticPartition)(nil)).Elem()
    +}
    +
    +type HostDiagnosticPartitionCreateDescription struct {
    +	DynamicData
    +
    +	Layout   HostDiskPartitionLayout           `xml:"layout"`
    +	DiskUuid string                            `xml:"diskUuid"`
    +	Spec     HostDiagnosticPartitionCreateSpec `xml:"spec"`
    +}
    +
    +func init() {
    +	t["HostDiagnosticPartitionCreateDescription"] = reflect.TypeOf((*HostDiagnosticPartitionCreateDescription)(nil)).Elem()
    +}
    +
    +type HostDiagnosticPartitionCreateOption struct {
    +	DynamicData
    +
    +	StorageType    string       `xml:"storageType"`
    +	DiagnosticType string       `xml:"diagnosticType"`
    +	Disk           HostScsiDisk `xml:"disk"`
    +}
    +
    +func init() {
    +	t["HostDiagnosticPartitionCreateOption"] = reflect.TypeOf((*HostDiagnosticPartitionCreateOption)(nil)).Elem()
    +}
    +
    +type HostDiagnosticPartitionCreateSpec struct {
    +	DynamicData
    +
    +	StorageType    string                `xml:"storageType"`
    +	DiagnosticType string                `xml:"diagnosticType"`
    +	Id             HostScsiDiskPartition `xml:"id"`
    +	Partition      HostDiskPartitionSpec `xml:"partition"`
    +	Active         *bool                 `xml:"active"`
    +}
    +
    +func init() {
    +	t["HostDiagnosticPartitionCreateSpec"] = reflect.TypeOf((*HostDiagnosticPartitionCreateSpec)(nil)).Elem()
    +}
    +
    +type HostDigestInfo struct {
    +	DynamicData
    +
    +	DigestMethod string `xml:"digestMethod"`
    +	DigestValue  []byte `xml:"digestValue"`
    +	ObjectName   string `xml:"objectName,omitempty"`
    +}
    +
    +func init() {
    +	t["HostDigestInfo"] = reflect.TypeOf((*HostDigestInfo)(nil)).Elem()
    +}
    +
    +type HostDirectoryStoreInfo struct {
    +	HostAuthenticationStoreInfo
    +}
    +
    +func init() {
    +	t["HostDirectoryStoreInfo"] = reflect.TypeOf((*HostDirectoryStoreInfo)(nil)).Elem()
    +}
    +
    +type HostDisconnectedEvent struct {
    +	HostEvent
    +
    +	Reason string `xml:"reason,omitempty"`
    +}
    +
    +func init() {
    +	t["HostDisconnectedEvent"] = reflect.TypeOf((*HostDisconnectedEvent)(nil)).Elem()
    +}
    +
    +type HostDiskConfigurationResult struct {
    +	DynamicData
    +
    +	DevicePath string                `xml:"devicePath,omitempty"`
    +	Success    *bool                 `xml:"success"`
    +	Fault      *LocalizedMethodFault `xml:"fault,omitempty"`
    +}
    +
    +func init() {
    +	t["HostDiskConfigurationResult"] = reflect.TypeOf((*HostDiskConfigurationResult)(nil)).Elem()
    +}
    +
    +type HostDiskDimensions struct {
    +	DynamicData
    +}
    +
    +func init() {
    +	t["HostDiskDimensions"] = reflect.TypeOf((*HostDiskDimensions)(nil)).Elem()
    +}
    +
    +type HostDiskDimensionsChs struct {
    +	DynamicData
    +
    +	Cylinder int64 `xml:"cylinder"`
    +	Head     int32 `xml:"head"`
    +	Sector   int32 `xml:"sector"`
    +}
    +
    +func init() {
    +	t["HostDiskDimensionsChs"] = reflect.TypeOf((*HostDiskDimensionsChs)(nil)).Elem()
    +}
    +
    +type HostDiskDimensionsLba struct {
    +	DynamicData
    +
    +	BlockSize int32 `xml:"blockSize"`
    +	Block     int64 `xml:"block"`
    +}
    +
    +func init() {
    +	t["HostDiskDimensionsLba"] = reflect.TypeOf((*HostDiskDimensionsLba)(nil)).Elem()
    +}
    +
    +type HostDiskMappingInfo struct {
    +	DynamicData
    +
    +	PhysicalPartition *HostDiskMappingPartitionInfo `xml:"physicalPartition,omitempty"`
    +	Name              string                        `xml:"name"`
    +	Exclusive         *bool                         `xml:"exclusive"`
    +}
    +
    +func init() {
    +	t["HostDiskMappingInfo"] = reflect.TypeOf((*HostDiskMappingInfo)(nil)).Elem()
    +}
    +
    +type HostDiskMappingOption struct {
    +	DynamicData
    +
    +	PhysicalPartition []HostDiskMappingPartitionOption `xml:"physicalPartition,omitempty"`
    +	Name              string                           `xml:"name"`
    +}
    +
    +func init() {
    +	t["HostDiskMappingOption"] = reflect.TypeOf((*HostDiskMappingOption)(nil)).Elem()
    +}
    +
    +type HostDiskMappingPartitionInfo struct {
    +	DynamicData
    +
    +	Name         string `xml:"name"`
    +	FileSystem   string `xml:"fileSystem"`
    +	CapacityInKb int64  `xml:"capacityInKb"`
    +}
    +
    +func init() {
    +	t["HostDiskMappingPartitionInfo"] = reflect.TypeOf((*HostDiskMappingPartitionInfo)(nil)).Elem()
    +}
    +
    +type HostDiskMappingPartitionOption struct {
    +	DynamicData
    +
    +	Name         string `xml:"name"`
    +	FileSystem   string `xml:"fileSystem"`
    +	CapacityInKb int64  `xml:"capacityInKb"`
    +}
    +
    +func init() {
    +	t["HostDiskMappingPartitionOption"] = reflect.TypeOf((*HostDiskMappingPartitionOption)(nil)).Elem()
    +}
    +
    +type HostDiskPartitionAttributes struct {
    +	DynamicData
    +
    +	Partition          int32  `xml:"partition"`
    +	StartSector        int64  `xml:"startSector"`
    +	EndSector          int64  `xml:"endSector"`
    +	Type               string `xml:"type"`
    +	Guid               string `xml:"guid,omitempty"`
    +	Logical            bool   `xml:"logical"`
    +	Attributes         byte   `xml:"attributes"`
    +	PartitionAlignment int64  `xml:"partitionAlignment,omitempty"`
    +}
    +
    +func init() {
    +	t["HostDiskPartitionAttributes"] = reflect.TypeOf((*HostDiskPartitionAttributes)(nil)).Elem()
    +}
    +
    +type HostDiskPartitionBlockRange struct {
    +	DynamicData
    +
    +	Partition int32                 `xml:"partition,omitempty"`
    +	Type      string                `xml:"type"`
    +	Start     HostDiskDimensionsLba `xml:"start"`
    +	End       HostDiskDimensionsLba `xml:"end"`
    +}
    +
    +func init() {
    +	t["HostDiskPartitionBlockRange"] = reflect.TypeOf((*HostDiskPartitionBlockRange)(nil)).Elem()
    +}
    +
    +type HostDiskPartitionInfo struct {
    +	DynamicData
    +
    +	DeviceName string                  `xml:"deviceName"`
    +	Spec       HostDiskPartitionSpec   `xml:"spec"`
    +	Layout     HostDiskPartitionLayout `xml:"layout"`
    +}
    +
    +func init() {
    +	t["HostDiskPartitionInfo"] = reflect.TypeOf((*HostDiskPartitionInfo)(nil)).Elem()
    +}
    +
    +type HostDiskPartitionLayout struct {
    +	DynamicData
    +
    +	Total     *HostDiskDimensionsLba        `xml:"total,omitempty"`
    +	Partition []HostDiskPartitionBlockRange `xml:"partition"`
    +}
    +
    +func init() {
    +	t["HostDiskPartitionLayout"] = reflect.TypeOf((*HostDiskPartitionLayout)(nil)).Elem()
    +}
    +
    +type HostDiskPartitionSpec struct {
    +	DynamicData
    +
    +	PartitionFormat string                        `xml:"partitionFormat,omitempty"`
    +	Chs             *HostDiskDimensionsChs        `xml:"chs,omitempty"`
    +	TotalSectors    int64                         `xml:"totalSectors,omitempty"`
    +	Partition       []HostDiskPartitionAttributes `xml:"partition,omitempty"`
    +}
    +
    +func init() {
    +	t["HostDiskPartitionSpec"] = reflect.TypeOf((*HostDiskPartitionSpec)(nil)).Elem()
    +}
    +
    +type HostDnsConfig struct {
    +	DynamicData
    +
    +	Dhcp                 bool     `xml:"dhcp"`
    +	VirtualNicDevice     string   `xml:"virtualNicDevice,omitempty"`
    +	Ipv6VirtualNicDevice string   `xml:"ipv6VirtualNicDevice,omitempty"`
    +	HostName             string   `xml:"hostName"`
    +	DomainName           string   `xml:"domainName"`
    +	Address              []string `xml:"address,omitempty"`
    +	SearchDomain         []string `xml:"searchDomain,omitempty"`
    +}
    +
    +func init() {
    +	t["HostDnsConfig"] = reflect.TypeOf((*HostDnsConfig)(nil)).Elem()
    +}
    +
    +type HostDnsConfigSpec struct {
    +	HostDnsConfig
    +
    +	VirtualNicConnection   *HostVirtualNicConnection `xml:"virtualNicConnection,omitempty"`
    +	VirtualNicConnectionV6 *HostVirtualNicConnection `xml:"virtualNicConnectionV6,omitempty"`
    +}
    +
    +func init() {
    +	t["HostDnsConfigSpec"] = reflect.TypeOf((*HostDnsConfigSpec)(nil)).Elem()
    +}
    +
    +type HostEnableAdminFailedEvent struct {
    +	HostEvent
    +
    +	Permissions []Permission `xml:"permissions"`
    +}
    +
    +func init() {
    +	t["HostEnableAdminFailedEvent"] = reflect.TypeOf((*HostEnableAdminFailedEvent)(nil)).Elem()
    +}
    +
    +type HostEnterMaintenanceResult struct {
    +	DynamicData
    +
    +	VmFaults   []FaultsByVM   `xml:"vmFaults,omitempty"`
    +	HostFaults []FaultsByHost `xml:"hostFaults,omitempty"`
    +}
    +
    +func init() {
    +	t["HostEnterMaintenanceResult"] = reflect.TypeOf((*HostEnterMaintenanceResult)(nil)).Elem()
    +}
    +
    +type HostEsxAgentHostManagerConfigInfo struct {
    +	DynamicData
    +
    +	AgentVmDatastore *ManagedObjectReference `xml:"agentVmDatastore,omitempty"`
    +	AgentVmNetwork   *ManagedObjectReference `xml:"agentVmNetwork,omitempty"`
    +}
    +
    +func init() {
    +	t["HostEsxAgentHostManagerConfigInfo"] = reflect.TypeOf((*HostEsxAgentHostManagerConfigInfo)(nil)).Elem()
    +}
    +
    +type HostEvent struct {
    +	Event
    +}
    +
    +func init() {
    +	t["HostEvent"] = reflect.TypeOf((*HostEvent)(nil)).Elem()
    +}
    +
    +type HostEventArgument struct {
    +	EntityEventArgument
    +
    +	Host ManagedObjectReference `xml:"host"`
    +}
    +
    +func init() {
    +	t["HostEventArgument"] = reflect.TypeOf((*HostEventArgument)(nil)).Elem()
    +}
    +
    +type HostExtendDiskRequestType struct {
    +	This            ManagedObjectReference `xml:"_this"`
    +	Id              ID                     `xml:"id"`
    +	Datastore       ManagedObjectReference `xml:"datastore"`
    +	NewCapacityInMB int64                  `xml:"newCapacityInMB"`
    +}
    +
    +func init() {
    +	t["HostExtendDiskRequestType"] = reflect.TypeOf((*HostExtendDiskRequestType)(nil)).Elem()
    +}
    +
    +type HostExtendDisk_Task HostExtendDiskRequestType
    +
    +func init() {
    +	t["HostExtendDisk_Task"] = reflect.TypeOf((*HostExtendDisk_Task)(nil)).Elem()
    +}
    +
    +type HostExtendDisk_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type HostExtraNetworksEvent struct {
    +	HostDasEvent
    +
    +	Ips string `xml:"ips,omitempty"`
    +}
    +
    +func init() {
    +	t["HostExtraNetworksEvent"] = reflect.TypeOf((*HostExtraNetworksEvent)(nil)).Elem()
    +}
    +
    +type HostFaultToleranceManagerComponentHealthInfo struct {
    +	DynamicData
    +
    +	IsStorageHealthy bool `xml:"isStorageHealthy"`
    +	IsNetworkHealthy bool `xml:"isNetworkHealthy"`
    +}
    +
    +func init() {
    +	t["HostFaultToleranceManagerComponentHealthInfo"] = reflect.TypeOf((*HostFaultToleranceManagerComponentHealthInfo)(nil)).Elem()
    +}
    +
    +type HostFeatureCapability struct {
    +	DynamicData
    +
    +	Key         string `xml:"key"`
    +	FeatureName string `xml:"featureName"`
    +	Value       string `xml:"value"`
    +}
    +
    +func init() {
    +	t["HostFeatureCapability"] = reflect.TypeOf((*HostFeatureCapability)(nil)).Elem()
    +}
    +
    +type HostFeatureMask struct {
    +	DynamicData
    +
    +	Key         string `xml:"key"`
    +	FeatureName string `xml:"featureName"`
    +	Value       string `xml:"value"`
    +}
    +
    +func init() {
    +	t["HostFeatureMask"] = reflect.TypeOf((*HostFeatureMask)(nil)).Elem()
    +}
    +
    +type HostFeatureVersionInfo struct {
    +	DynamicData
    +
    +	Key   string `xml:"key"`
    +	Value string `xml:"value"`
    +}
    +
    +func init() {
    +	t["HostFeatureVersionInfo"] = reflect.TypeOf((*HostFeatureVersionInfo)(nil)).Elem()
    +}
    +
    +type HostFibreChannelHba struct {
    +	HostHostBusAdapter
    +
    +	PortWorldWideName int64                `xml:"portWorldWideName"`
    +	NodeWorldWideName int64                `xml:"nodeWorldWideName"`
    +	PortType          FibreChannelPortType `xml:"portType"`
    +	Speed             int64                `xml:"speed"`
    +}
    +
    +func init() {
    +	t["HostFibreChannelHba"] = reflect.TypeOf((*HostFibreChannelHba)(nil)).Elem()
    +}
    +
    +type HostFibreChannelOverEthernetHba struct {
    +	HostFibreChannelHba
    +
    +	UnderlyingNic    string                                  `xml:"underlyingNic"`
    +	LinkInfo         HostFibreChannelOverEthernetHbaLinkInfo `xml:"linkInfo"`
    +	IsSoftwareFcoe   bool                                    `xml:"isSoftwareFcoe"`
    +	MarkedForRemoval bool                                    `xml:"markedForRemoval"`
    +}
    +
    +func init() {
    +	t["HostFibreChannelOverEthernetHba"] = reflect.TypeOf((*HostFibreChannelOverEthernetHba)(nil)).Elem()
    +}
    +
    +type HostFibreChannelOverEthernetHbaLinkInfo struct {
    +	DynamicData
    +
    +	VnportMac string `xml:"vnportMac"`
    +	FcfMac    string `xml:"fcfMac"`
    +	VlanId    int32  `xml:"vlanId"`
    +}
    +
    +func init() {
    +	t["HostFibreChannelOverEthernetHbaLinkInfo"] = reflect.TypeOf((*HostFibreChannelOverEthernetHbaLinkInfo)(nil)).Elem()
    +}
    +
    +type HostFibreChannelOverEthernetTargetTransport struct {
    +	HostFibreChannelTargetTransport
    +
    +	VnportMac string `xml:"vnportMac"`
    +	FcfMac    string `xml:"fcfMac"`
    +	VlanId    int32  `xml:"vlanId"`
    +}
    +
    +func init() {
    +	t["HostFibreChannelOverEthernetTargetTransport"] = reflect.TypeOf((*HostFibreChannelOverEthernetTargetTransport)(nil)).Elem()
    +}
    +
    +type HostFibreChannelTargetTransport struct {
    +	HostTargetTransport
    +
    +	PortWorldWideName int64 `xml:"portWorldWideName"`
    +	NodeWorldWideName int64 `xml:"nodeWorldWideName"`
    +}
    +
    +func init() {
    +	t["HostFibreChannelTargetTransport"] = reflect.TypeOf((*HostFibreChannelTargetTransport)(nil)).Elem()
    +}
    +
    +type HostFileAccess struct {
    +	DynamicData
    +
    +	Who  string `xml:"who"`
    +	What string `xml:"what"`
    +}
    +
    +func init() {
    +	t["HostFileAccess"] = reflect.TypeOf((*HostFileAccess)(nil)).Elem()
    +}
    +
    +type HostFileSystemMountInfo struct {
    +	DynamicData
    +
    +	MountInfo       HostMountInfo            `xml:"mountInfo"`
    +	Volume          BaseHostFileSystemVolume `xml:"volume,typeattr"`
    +	VStorageSupport string                   `xml:"vStorageSupport,omitempty"`
    +}
    +
    +func init() {
    +	t["HostFileSystemMountInfo"] = reflect.TypeOf((*HostFileSystemMountInfo)(nil)).Elem()
    +}
    +
    +type HostFileSystemVolume struct {
    +	DynamicData
    +
    +	Type     string `xml:"type"`
    +	Name     string `xml:"name"`
    +	Capacity int64  `xml:"capacity"`
    +}
    +
    +func init() {
    +	t["HostFileSystemVolume"] = reflect.TypeOf((*HostFileSystemVolume)(nil)).Elem()
    +}
    +
    +type HostFileSystemVolumeInfo struct {
    +	DynamicData
    +
    +	VolumeTypeList []string                  `xml:"volumeTypeList,omitempty"`
    +	MountInfo      []HostFileSystemMountInfo `xml:"mountInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["HostFileSystemVolumeInfo"] = reflect.TypeOf((*HostFileSystemVolumeInfo)(nil)).Elem()
    +}
    +
    +type HostFirewallConfig struct {
    +	DynamicData
    +
    +	Rule                  []HostFirewallConfigRuleSetConfig `xml:"rule,omitempty"`
    +	DefaultBlockingPolicy HostFirewallDefaultPolicy         `xml:"defaultBlockingPolicy"`
    +}
    +
    +func init() {
    +	t["HostFirewallConfig"] = reflect.TypeOf((*HostFirewallConfig)(nil)).Elem()
    +}
    +
    +type HostFirewallConfigRuleSetConfig struct {
    +	DynamicData
    +
    +	RulesetId    string                     `xml:"rulesetId"`
    +	Enabled      bool                       `xml:"enabled"`
    +	AllowedHosts *HostFirewallRulesetIpList `xml:"allowedHosts,omitempty"`
    +}
    +
    +func init() {
    +	t["HostFirewallConfigRuleSetConfig"] = reflect.TypeOf((*HostFirewallConfigRuleSetConfig)(nil)).Elem()
    +}
    +
    +type HostFirewallDefaultPolicy struct {
    +	DynamicData
    +
    +	IncomingBlocked *bool `xml:"incomingBlocked"`
    +	OutgoingBlocked *bool `xml:"outgoingBlocked"`
    +}
    +
    +func init() {
    +	t["HostFirewallDefaultPolicy"] = reflect.TypeOf((*HostFirewallDefaultPolicy)(nil)).Elem()
    +}
    +
    +type HostFirewallInfo struct {
    +	DynamicData
    +
    +	DefaultPolicy HostFirewallDefaultPolicy `xml:"defaultPolicy"`
    +	Ruleset       []HostFirewallRuleset     `xml:"ruleset,omitempty"`
    +}
    +
    +func init() {
    +	t["HostFirewallInfo"] = reflect.TypeOf((*HostFirewallInfo)(nil)).Elem()
    +}
    +
    +type HostFirewallRule struct {
    +	DynamicData
    +
    +	Port      int32                     `xml:"port"`
    +	EndPort   int32                     `xml:"endPort,omitempty"`
    +	Direction HostFirewallRuleDirection `xml:"direction"`
    +	PortType  HostFirewallRulePortType  `xml:"portType,omitempty"`
    +	Protocol  string                    `xml:"protocol"`
    +}
    +
    +func init() {
    +	t["HostFirewallRule"] = reflect.TypeOf((*HostFirewallRule)(nil)).Elem()
    +}
    +
    +type HostFirewallRuleset struct {
    +	DynamicData
    +
    +	Key          string                     `xml:"key"`
    +	Label        string                     `xml:"label"`
    +	Required     bool                       `xml:"required"`
    +	Rule         []HostFirewallRule         `xml:"rule"`
    +	Service      string                     `xml:"service,omitempty"`
    +	Enabled      bool                       `xml:"enabled"`
    +	AllowedHosts *HostFirewallRulesetIpList `xml:"allowedHosts,omitempty"`
    +}
    +
    +func init() {
    +	t["HostFirewallRuleset"] = reflect.TypeOf((*HostFirewallRuleset)(nil)).Elem()
    +}
    +
    +type HostFirewallRulesetIpList struct {
    +	DynamicData
    +
    +	IpAddress []string                       `xml:"ipAddress,omitempty"`
    +	IpNetwork []HostFirewallRulesetIpNetwork `xml:"ipNetwork,omitempty"`
    +	AllIp     bool                           `xml:"allIp"`
    +}
    +
    +func init() {
    +	t["HostFirewallRulesetIpList"] = reflect.TypeOf((*HostFirewallRulesetIpList)(nil)).Elem()
    +}
    +
    +type HostFirewallRulesetIpNetwork struct {
    +	DynamicData
    +
    +	Network      string `xml:"network"`
    +	PrefixLength int32  `xml:"prefixLength"`
    +}
    +
    +func init() {
    +	t["HostFirewallRulesetIpNetwork"] = reflect.TypeOf((*HostFirewallRulesetIpNetwork)(nil)).Elem()
    +}
    +
    +type HostFirewallRulesetRulesetSpec struct {
    +	DynamicData
    +
    +	AllowedHosts HostFirewallRulesetIpList `xml:"allowedHosts"`
    +}
    +
    +func init() {
    +	t["HostFirewallRulesetRulesetSpec"] = reflect.TypeOf((*HostFirewallRulesetRulesetSpec)(nil)).Elem()
    +}
    +
    +type HostFlagInfo struct {
    +	DynamicData
    +
    +	BackgroundSnapshotsEnabled *bool `xml:"backgroundSnapshotsEnabled"`
    +}
    +
    +func init() {
    +	t["HostFlagInfo"] = reflect.TypeOf((*HostFlagInfo)(nil)).Elem()
    +}
    +
    +type HostForceMountedInfo struct {
    +	DynamicData
    +
    +	Persist bool `xml:"persist"`
    +	Mounted bool `xml:"mounted"`
    +}
    +
    +func init() {
    +	t["HostForceMountedInfo"] = reflect.TypeOf((*HostForceMountedInfo)(nil)).Elem()
    +}
    +
    +type HostGatewaySpec struct {
    +	DynamicData
    +
    +	GatewayType            string     `xml:"gatewayType"`
    +	GatewayId              string     `xml:"gatewayId,omitempty"`
    +	TrustVerificationToken string     `xml:"trustVerificationToken,omitempty"`
    +	HostAuthParams         []KeyValue `xml:"hostAuthParams,omitempty"`
    +}
    +
    +func init() {
    +	t["HostGatewaySpec"] = reflect.TypeOf((*HostGatewaySpec)(nil)).Elem()
    +}
    +
    +type HostGetShortNameFailedEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["HostGetShortNameFailedEvent"] = reflect.TypeOf((*HostGetShortNameFailedEvent)(nil)).Elem()
    +}
    +
    +type HostGetVFlashModuleDefaultConfig HostGetVFlashModuleDefaultConfigRequestType
    +
    +func init() {
    +	t["HostGetVFlashModuleDefaultConfig"] = reflect.TypeOf((*HostGetVFlashModuleDefaultConfig)(nil)).Elem()
    +}
    +
    +type HostGetVFlashModuleDefaultConfigRequestType struct {
    +	This         ManagedObjectReference `xml:"_this"`
    +	VFlashModule string                 `xml:"vFlashModule"`
    +}
    +
    +func init() {
    +	t["HostGetVFlashModuleDefaultConfigRequestType"] = reflect.TypeOf((*HostGetVFlashModuleDefaultConfigRequestType)(nil)).Elem()
    +}
    +
    +type HostGetVFlashModuleDefaultConfigResponse struct {
    +	Returnval VirtualDiskVFlashCacheConfigInfo `xml:"returnval"`
    +}
    +
    +type HostGraphicsConfig struct {
    +	DynamicData
    +
    +	HostDefaultGraphicsType        string                         `xml:"hostDefaultGraphicsType"`
    +	SharedPassthruAssignmentPolicy string                         `xml:"sharedPassthruAssignmentPolicy"`
    +	DeviceType                     []HostGraphicsConfigDeviceType `xml:"deviceType,omitempty"`
    +}
    +
    +func init() {
    +	t["HostGraphicsConfig"] = reflect.TypeOf((*HostGraphicsConfig)(nil)).Elem()
    +}
    +
    +type HostGraphicsConfigDeviceType struct {
    +	DynamicData
    +
    +	DeviceId     string `xml:"deviceId"`
    +	GraphicsType string `xml:"graphicsType"`
    +}
    +
    +func init() {
    +	t["HostGraphicsConfigDeviceType"] = reflect.TypeOf((*HostGraphicsConfigDeviceType)(nil)).Elem()
    +}
    +
    +type HostGraphicsInfo struct {
    +	DynamicData
    +
    +	DeviceName     string                   `xml:"deviceName"`
    +	VendorName     string                   `xml:"vendorName"`
    +	PciId          string                   `xml:"pciId"`
    +	GraphicsType   string                   `xml:"graphicsType"`
    +	MemorySizeInKB int64                    `xml:"memorySizeInKB"`
    +	Vm             []ManagedObjectReference `xml:"vm,omitempty"`
    +}
    +
    +func init() {
    +	t["HostGraphicsInfo"] = reflect.TypeOf((*HostGraphicsInfo)(nil)).Elem()
    +}
    +
    +type HostHardwareElementInfo struct {
    +	DynamicData
    +
    +	Name   string                 `xml:"name"`
    +	Status BaseElementDescription `xml:"status,typeattr"`
    +}
    +
    +func init() {
    +	t["HostHardwareElementInfo"] = reflect.TypeOf((*HostHardwareElementInfo)(nil)).Elem()
    +}
    +
    +type HostHardwareInfo struct {
    +	DynamicData
    +
    +	SystemInfo             HostSystemInfo              `xml:"systemInfo"`
    +	CpuPowerManagementInfo *HostCpuPowerManagementInfo `xml:"cpuPowerManagementInfo,omitempty"`
    +	CpuInfo                HostCpuInfo                 `xml:"cpuInfo"`
    +	CpuPkg                 []HostCpuPackage            `xml:"cpuPkg"`
    +	MemorySize             int64                       `xml:"memorySize"`
    +	NumaInfo               *HostNumaInfo               `xml:"numaInfo,omitempty"`
    +	SmcPresent             *bool                       `xml:"smcPresent"`
    +	PciDevice              []HostPciDevice             `xml:"pciDevice,omitempty"`
    +	CpuFeature             []HostCpuIdInfo             `xml:"cpuFeature,omitempty"`
    +	BiosInfo               *HostBIOSInfo               `xml:"biosInfo,omitempty"`
    +	ReliableMemoryInfo     *HostReliableMemoryInfo     `xml:"reliableMemoryInfo,omitempty"`
    +	PersistentMemoryInfo   *HostPersistentMemoryInfo   `xml:"persistentMemoryInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["HostHardwareInfo"] = reflect.TypeOf((*HostHardwareInfo)(nil)).Elem()
    +}
    +
    +type HostHardwareStatusInfo struct {
    +	DynamicData
    +
    +	MemoryStatusInfo  []BaseHostHardwareElementInfo `xml:"memoryStatusInfo,omitempty,typeattr"`
    +	CpuStatusInfo     []BaseHostHardwareElementInfo `xml:"cpuStatusInfo,omitempty,typeattr"`
    +	StorageStatusInfo []HostStorageElementInfo      `xml:"storageStatusInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["HostHardwareStatusInfo"] = reflect.TypeOf((*HostHardwareStatusInfo)(nil)).Elem()
    +}
    +
    +type HostHardwareSummary struct {
    +	DynamicData
    +
    +	Vendor               string                         `xml:"vendor"`
    +	Model                string                         `xml:"model"`
    +	Uuid                 string                         `xml:"uuid"`
    +	OtherIdentifyingInfo []HostSystemIdentificationInfo `xml:"otherIdentifyingInfo,omitempty"`
    +	MemorySize           int64                          `xml:"memorySize"`
    +	CpuModel             string                         `xml:"cpuModel"`
    +	CpuMhz               int32                          `xml:"cpuMhz"`
    +	NumCpuPkgs           int16                          `xml:"numCpuPkgs"`
    +	NumCpuCores          int16                          `xml:"numCpuCores"`
    +	NumCpuThreads        int16                          `xml:"numCpuThreads"`
    +	NumNics              int32                          `xml:"numNics"`
    +	NumHBAs              int32                          `xml:"numHBAs"`
    +}
    +
    +func init() {
    +	t["HostHardwareSummary"] = reflect.TypeOf((*HostHardwareSummary)(nil)).Elem()
    +}
    +
    +type HostHasComponentFailure struct {
    +	VimFault
    +
    +	HostName      string `xml:"hostName"`
    +	ComponentType string `xml:"componentType"`
    +	ComponentName string `xml:"componentName"`
    +}
    +
    +func init() {
    +	t["HostHasComponentFailure"] = reflect.TypeOf((*HostHasComponentFailure)(nil)).Elem()
    +}
    +
    +type HostHasComponentFailureFault HostHasComponentFailure
    +
    +func init() {
    +	t["HostHasComponentFailureFault"] = reflect.TypeOf((*HostHasComponentFailureFault)(nil)).Elem()
    +}
    +
    +type HostHostBusAdapter struct {
    +	DynamicData
    +
    +	Key    string `xml:"key,omitempty"`
    +	Device string `xml:"device"`
    +	Bus    int32  `xml:"bus"`
    +	Status string `xml:"status"`
    +	Model  string `xml:"model"`
    +	Driver string `xml:"driver,omitempty"`
    +	Pci    string `xml:"pci,omitempty"`
    +}
    +
    +func init() {
    +	t["HostHostBusAdapter"] = reflect.TypeOf((*HostHostBusAdapter)(nil)).Elem()
    +}
    +
    +type HostHyperThreadScheduleInfo struct {
    +	DynamicData
    +
    +	Available bool `xml:"available"`
    +	Active    bool `xml:"active"`
    +	Config    bool `xml:"config"`
    +}
    +
    +func init() {
    +	t["HostHyperThreadScheduleInfo"] = reflect.TypeOf((*HostHyperThreadScheduleInfo)(nil)).Elem()
    +}
    +
    +type HostImageConfigGetAcceptance HostImageConfigGetAcceptanceRequestType
    +
    +func init() {
    +	t["HostImageConfigGetAcceptance"] = reflect.TypeOf((*HostImageConfigGetAcceptance)(nil)).Elem()
    +}
    +
    +type HostImageConfigGetAcceptanceRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["HostImageConfigGetAcceptanceRequestType"] = reflect.TypeOf((*HostImageConfigGetAcceptanceRequestType)(nil)).Elem()
    +}
    +
    +type HostImageConfigGetAcceptanceResponse struct {
    +	Returnval string `xml:"returnval"`
    +}
    +
    +type HostImageConfigGetProfile HostImageConfigGetProfileRequestType
    +
    +func init() {
    +	t["HostImageConfigGetProfile"] = reflect.TypeOf((*HostImageConfigGetProfile)(nil)).Elem()
    +}
    +
    +type HostImageConfigGetProfileRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["HostImageConfigGetProfileRequestType"] = reflect.TypeOf((*HostImageConfigGetProfileRequestType)(nil)).Elem()
    +}
    +
    +type HostImageConfigGetProfileResponse struct {
    +	Returnval HostImageProfileSummary `xml:"returnval"`
    +}
    +
    +type HostImageProfileSummary struct {
    +	DynamicData
    +
    +	Name   string `xml:"name"`
    +	Vendor string `xml:"vendor"`
    +}
    +
    +func init() {
    +	t["HostImageProfileSummary"] = reflect.TypeOf((*HostImageProfileSummary)(nil)).Elem()
    +}
    +
    +type HostInAuditModeEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["HostInAuditModeEvent"] = reflect.TypeOf((*HostInAuditModeEvent)(nil)).Elem()
    +}
    +
    +type HostInDomain struct {
    +	HostConfigFault
    +}
    +
    +func init() {
    +	t["HostInDomain"] = reflect.TypeOf((*HostInDomain)(nil)).Elem()
    +}
    +
    +type HostInDomainFault HostInDomain
    +
    +func init() {
    +	t["HostInDomainFault"] = reflect.TypeOf((*HostInDomainFault)(nil)).Elem()
    +}
    +
    +type HostIncompatibleForFaultTolerance struct {
    +	VmFaultToleranceIssue
    +
    +	HostName string `xml:"hostName,omitempty"`
    +	Reason   string `xml:"reason,omitempty"`
    +}
    +
    +func init() {
    +	t["HostIncompatibleForFaultTolerance"] = reflect.TypeOf((*HostIncompatibleForFaultTolerance)(nil)).Elem()
    +}
    +
    +type HostIncompatibleForFaultToleranceFault HostIncompatibleForFaultTolerance
    +
    +func init() {
    +	t["HostIncompatibleForFaultToleranceFault"] = reflect.TypeOf((*HostIncompatibleForFaultToleranceFault)(nil)).Elem()
    +}
    +
    +type HostIncompatibleForRecordReplay struct {
    +	VimFault
    +
    +	HostName string `xml:"hostName,omitempty"`
    +	Reason   string `xml:"reason,omitempty"`
    +}
    +
    +func init() {
    +	t["HostIncompatibleForRecordReplay"] = reflect.TypeOf((*HostIncompatibleForRecordReplay)(nil)).Elem()
    +}
    +
    +type HostIncompatibleForRecordReplayFault HostIncompatibleForRecordReplay
    +
    +func init() {
    +	t["HostIncompatibleForRecordReplayFault"] = reflect.TypeOf((*HostIncompatibleForRecordReplayFault)(nil)).Elem()
    +}
    +
    +type HostInflateDiskRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	Id        ID                     `xml:"id"`
    +	Datastore ManagedObjectReference `xml:"datastore"`
    +}
    +
    +func init() {
    +	t["HostInflateDiskRequestType"] = reflect.TypeOf((*HostInflateDiskRequestType)(nil)).Elem()
    +}
    +
    +type HostInflateDisk_Task HostInflateDiskRequestType
    +
    +func init() {
    +	t["HostInflateDisk_Task"] = reflect.TypeOf((*HostInflateDisk_Task)(nil)).Elem()
    +}
    +
    +type HostInflateDisk_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type HostInternetScsiHba struct {
    +	HostHostBusAdapter
    +
    +	IsSoftwareBased            bool                                          `xml:"isSoftwareBased"`
    +	CanBeDisabled              *bool                                         `xml:"canBeDisabled"`
    +	NetworkBindingSupport      HostInternetScsiHbaNetworkBindingSupportType  `xml:"networkBindingSupport,omitempty"`
    +	DiscoveryCapabilities      HostInternetScsiHbaDiscoveryCapabilities      `xml:"discoveryCapabilities"`
    +	DiscoveryProperties        HostInternetScsiHbaDiscoveryProperties        `xml:"discoveryProperties"`
    +	AuthenticationCapabilities HostInternetScsiHbaAuthenticationCapabilities `xml:"authenticationCapabilities"`
    +	AuthenticationProperties   HostInternetScsiHbaAuthenticationProperties   `xml:"authenticationProperties"`
    +	DigestCapabilities         *HostInternetScsiHbaDigestCapabilities        `xml:"digestCapabilities,omitempty"`
    +	DigestProperties           *HostInternetScsiHbaDigestProperties          `xml:"digestProperties,omitempty"`
    +	IpCapabilities             HostInternetScsiHbaIPCapabilities             `xml:"ipCapabilities"`
    +	IpProperties               HostInternetScsiHbaIPProperties               `xml:"ipProperties"`
    +	SupportedAdvancedOptions   []OptionDef                                   `xml:"supportedAdvancedOptions,omitempty"`
    +	AdvancedOptions            []HostInternetScsiHbaParamValue               `xml:"advancedOptions,omitempty"`
    +	IScsiName                  string                                        `xml:"iScsiName"`
    +	IScsiAlias                 string                                        `xml:"iScsiAlias,omitempty"`
    +	ConfiguredSendTarget       []HostInternetScsiHbaSendTarget               `xml:"configuredSendTarget,omitempty"`
    +	ConfiguredStaticTarget     []HostInternetScsiHbaStaticTarget             `xml:"configuredStaticTarget,omitempty"`
    +	MaxSpeedMb                 int32                                         `xml:"maxSpeedMb,omitempty"`
    +	CurrentSpeedMb             int32                                         `xml:"currentSpeedMb,omitempty"`
    +}
    +
    +func init() {
    +	t["HostInternetScsiHba"] = reflect.TypeOf((*HostInternetScsiHba)(nil)).Elem()
    +}
    +
    +type HostInternetScsiHbaAuthenticationCapabilities struct {
    +	DynamicData
    +
    +	ChapAuthSettable         bool  `xml:"chapAuthSettable"`
    +	Krb5AuthSettable         bool  `xml:"krb5AuthSettable"`
    +	SrpAuthSettable          bool  `xml:"srpAuthSettable"`
    +	SpkmAuthSettable         bool  `xml:"spkmAuthSettable"`
    +	MutualChapSettable       *bool `xml:"mutualChapSettable"`
    +	TargetChapSettable       *bool `xml:"targetChapSettable"`
    +	TargetMutualChapSettable *bool `xml:"targetMutualChapSettable"`
    +}
    +
    +func init() {
    +	t["HostInternetScsiHbaAuthenticationCapabilities"] = reflect.TypeOf((*HostInternetScsiHbaAuthenticationCapabilities)(nil)).Elem()
    +}
    +
    +type HostInternetScsiHbaAuthenticationProperties struct {
    +	DynamicData
    +
    +	ChapAuthEnabled              bool   `xml:"chapAuthEnabled"`
    +	ChapName                     string `xml:"chapName,omitempty"`
    +	ChapSecret                   string `xml:"chapSecret,omitempty"`
    +	ChapAuthenticationType       string `xml:"chapAuthenticationType,omitempty"`
    +	ChapInherited                *bool  `xml:"chapInherited"`
    +	MutualChapName               string `xml:"mutualChapName,omitempty"`
    +	MutualChapSecret             string `xml:"mutualChapSecret,omitempty"`
    +	MutualChapAuthenticationType string `xml:"mutualChapAuthenticationType,omitempty"`
    +	MutualChapInherited          *bool  `xml:"mutualChapInherited"`
    +}
    +
    +func init() {
    +	t["HostInternetScsiHbaAuthenticationProperties"] = reflect.TypeOf((*HostInternetScsiHbaAuthenticationProperties)(nil)).Elem()
    +}
    +
    +type HostInternetScsiHbaDigestCapabilities struct {
    +	DynamicData
    +
    +	HeaderDigestSettable       *bool `xml:"headerDigestSettable"`
    +	DataDigestSettable         *bool `xml:"dataDigestSettable"`
    +	TargetHeaderDigestSettable *bool `xml:"targetHeaderDigestSettable"`
    +	TargetDataDigestSettable   *bool `xml:"targetDataDigestSettable"`
    +}
    +
    +func init() {
    +	t["HostInternetScsiHbaDigestCapabilities"] = reflect.TypeOf((*HostInternetScsiHbaDigestCapabilities)(nil)).Elem()
    +}
    +
    +type HostInternetScsiHbaDigestProperties struct {
    +	DynamicData
    +
    +	HeaderDigestType      string `xml:"headerDigestType,omitempty"`
    +	HeaderDigestInherited *bool  `xml:"headerDigestInherited"`
    +	DataDigestType        string `xml:"dataDigestType,omitempty"`
    +	DataDigestInherited   *bool  `xml:"dataDigestInherited"`
    +}
    +
    +func init() {
    +	t["HostInternetScsiHbaDigestProperties"] = reflect.TypeOf((*HostInternetScsiHbaDigestProperties)(nil)).Elem()
    +}
    +
    +type HostInternetScsiHbaDiscoveryCapabilities struct {
    +	DynamicData
    +
    +	ISnsDiscoverySettable         bool `xml:"iSnsDiscoverySettable"`
    +	SlpDiscoverySettable          bool `xml:"slpDiscoverySettable"`
    +	StaticTargetDiscoverySettable bool `xml:"staticTargetDiscoverySettable"`
    +	SendTargetsDiscoverySettable  bool `xml:"sendTargetsDiscoverySettable"`
    +}
    +
    +func init() {
    +	t["HostInternetScsiHbaDiscoveryCapabilities"] = reflect.TypeOf((*HostInternetScsiHbaDiscoveryCapabilities)(nil)).Elem()
    +}
    +
    +type HostInternetScsiHbaDiscoveryProperties struct {
    +	DynamicData
    +
    +	ISnsDiscoveryEnabled         bool   `xml:"iSnsDiscoveryEnabled"`
    +	ISnsDiscoveryMethod          string `xml:"iSnsDiscoveryMethod,omitempty"`
    +	ISnsHost                     string `xml:"iSnsHost,omitempty"`
    +	SlpDiscoveryEnabled          bool   `xml:"slpDiscoveryEnabled"`
    +	SlpDiscoveryMethod           string `xml:"slpDiscoveryMethod,omitempty"`
    +	SlpHost                      string `xml:"slpHost,omitempty"`
    +	StaticTargetDiscoveryEnabled bool   `xml:"staticTargetDiscoveryEnabled"`
    +	SendTargetsDiscoveryEnabled  bool   `xml:"sendTargetsDiscoveryEnabled"`
    +}
    +
    +func init() {
    +	t["HostInternetScsiHbaDiscoveryProperties"] = reflect.TypeOf((*HostInternetScsiHbaDiscoveryProperties)(nil)).Elem()
    +}
    +
    +type HostInternetScsiHbaIPCapabilities struct {
    +	DynamicData
    +
    +	AddressSettable                              bool  `xml:"addressSettable"`
    +	IpConfigurationMethodSettable                bool  `xml:"ipConfigurationMethodSettable"`
    +	SubnetMaskSettable                           bool  `xml:"subnetMaskSettable"`
    +	DefaultGatewaySettable                       bool  `xml:"defaultGatewaySettable"`
    +	PrimaryDnsServerAddressSettable              bool  `xml:"primaryDnsServerAddressSettable"`
    +	AlternateDnsServerAddressSettable            bool  `xml:"alternateDnsServerAddressSettable"`
    +	Ipv6Supported                                *bool `xml:"ipv6Supported"`
    +	ArpRedirectSettable                          *bool `xml:"arpRedirectSettable"`
    +	MtuSettable                                  *bool `xml:"mtuSettable"`
    +	HostNameAsTargetAddress                      *bool `xml:"hostNameAsTargetAddress"`
    +	NameAliasSettable                            *bool `xml:"nameAliasSettable"`
    +	Ipv4EnableSettable                           *bool `xml:"ipv4EnableSettable"`
    +	Ipv6EnableSettable                           *bool `xml:"ipv6EnableSettable"`
    +	Ipv6PrefixLengthSettable                     *bool `xml:"ipv6PrefixLengthSettable"`
    +	Ipv6PrefixLength                             int32 `xml:"ipv6PrefixLength,omitempty"`
    +	Ipv6DhcpConfigurationSettable                *bool `xml:"ipv6DhcpConfigurationSettable"`
    +	Ipv6LinkLocalAutoConfigurationSettable       *bool `xml:"ipv6LinkLocalAutoConfigurationSettable"`
    +	Ipv6RouterAdvertisementConfigurationSettable *bool `xml:"ipv6RouterAdvertisementConfigurationSettable"`
    +	Ipv6DefaultGatewaySettable                   *bool `xml:"ipv6DefaultGatewaySettable"`
    +	Ipv6MaxStaticAddressesSupported              int32 `xml:"ipv6MaxStaticAddressesSupported,omitempty"`
    +}
    +
    +func init() {
    +	t["HostInternetScsiHbaIPCapabilities"] = reflect.TypeOf((*HostInternetScsiHbaIPCapabilities)(nil)).Elem()
    +}
    +
    +type HostInternetScsiHbaIPProperties struct {
    +	DynamicData
    +
    +	Mac                       string                             `xml:"mac,omitempty"`
    +	Address                   string                             `xml:"address,omitempty"`
    +	DhcpConfigurationEnabled  bool                               `xml:"dhcpConfigurationEnabled"`
    +	SubnetMask                string                             `xml:"subnetMask,omitempty"`
    +	DefaultGateway            string                             `xml:"defaultGateway,omitempty"`
    +	PrimaryDnsServerAddress   string                             `xml:"primaryDnsServerAddress,omitempty"`
    +	AlternateDnsServerAddress string                             `xml:"alternateDnsServerAddress,omitempty"`
    +	Ipv6Address               string                             `xml:"ipv6Address,omitempty"`
    +	Ipv6SubnetMask            string                             `xml:"ipv6SubnetMask,omitempty"`
    +	Ipv6DefaultGateway        string                             `xml:"ipv6DefaultGateway,omitempty"`
    +	ArpRedirectEnabled        *bool                              `xml:"arpRedirectEnabled"`
    +	Mtu                       int32                              `xml:"mtu,omitempty"`
    +	JumboFramesEnabled        *bool                              `xml:"jumboFramesEnabled"`
    +	Ipv4Enabled               *bool                              `xml:"ipv4Enabled"`
    +	Ipv6Enabled               *bool                              `xml:"ipv6Enabled"`
    +	Ipv6properties            *HostInternetScsiHbaIPv6Properties `xml:"ipv6properties,omitempty"`
    +}
    +
    +func init() {
    +	t["HostInternetScsiHbaIPProperties"] = reflect.TypeOf((*HostInternetScsiHbaIPProperties)(nil)).Elem()
    +}
    +
    +type HostInternetScsiHbaIPv6Properties struct {
    +	DynamicData
    +
    +	IscsiIpv6Address                            []HostInternetScsiHbaIscsiIpv6Address `xml:"iscsiIpv6Address,omitempty"`
    +	Ipv6DhcpConfigurationEnabled                *bool                                 `xml:"ipv6DhcpConfigurationEnabled"`
    +	Ipv6LinkLocalAutoConfigurationEnabled       *bool                                 `xml:"ipv6LinkLocalAutoConfigurationEnabled"`
    +	Ipv6RouterAdvertisementConfigurationEnabled *bool                                 `xml:"ipv6RouterAdvertisementConfigurationEnabled"`
    +	Ipv6DefaultGateway                          string                                `xml:"ipv6DefaultGateway,omitempty"`
    +}
    +
    +func init() {
    +	t["HostInternetScsiHbaIPv6Properties"] = reflect.TypeOf((*HostInternetScsiHbaIPv6Properties)(nil)).Elem()
    +}
    +
    +type HostInternetScsiHbaIscsiIpv6Address struct {
    +	DynamicData
    +
    +	Address      string `xml:"address"`
    +	PrefixLength int32  `xml:"prefixLength"`
    +	Origin       string `xml:"origin"`
    +	Operation    string `xml:"operation,omitempty"`
    +}
    +
    +func init() {
    +	t["HostInternetScsiHbaIscsiIpv6Address"] = reflect.TypeOf((*HostInternetScsiHbaIscsiIpv6Address)(nil)).Elem()
    +}
    +
    +type HostInternetScsiHbaParamValue struct {
    +	OptionValue
    +
    +	IsInherited *bool `xml:"isInherited"`
    +}
    +
    +func init() {
    +	t["HostInternetScsiHbaParamValue"] = reflect.TypeOf((*HostInternetScsiHbaParamValue)(nil)).Elem()
    +}
    +
    +type HostInternetScsiHbaSendTarget struct {
    +	DynamicData
    +
    +	Address                  string                                       `xml:"address"`
    +	Port                     int32                                        `xml:"port,omitempty"`
    +	AuthenticationProperties *HostInternetScsiHbaAuthenticationProperties `xml:"authenticationProperties,omitempty"`
    +	DigestProperties         *HostInternetScsiHbaDigestProperties         `xml:"digestProperties,omitempty"`
    +	SupportedAdvancedOptions []OptionDef                                  `xml:"supportedAdvancedOptions,omitempty"`
    +	AdvancedOptions          []HostInternetScsiHbaParamValue              `xml:"advancedOptions,omitempty"`
    +	Parent                   string                                       `xml:"parent,omitempty"`
    +}
    +
    +func init() {
    +	t["HostInternetScsiHbaSendTarget"] = reflect.TypeOf((*HostInternetScsiHbaSendTarget)(nil)).Elem()
    +}
    +
    +type HostInternetScsiHbaStaticTarget struct {
    +	DynamicData
    +
    +	Address                  string                                       `xml:"address"`
    +	Port                     int32                                        `xml:"port,omitempty"`
    +	IScsiName                string                                       `xml:"iScsiName"`
    +	DiscoveryMethod          string                                       `xml:"discoveryMethod,omitempty"`
    +	AuthenticationProperties *HostInternetScsiHbaAuthenticationProperties `xml:"authenticationProperties,omitempty"`
    +	DigestProperties         *HostInternetScsiHbaDigestProperties         `xml:"digestProperties,omitempty"`
    +	SupportedAdvancedOptions []OptionDef                                  `xml:"supportedAdvancedOptions,omitempty"`
    +	AdvancedOptions          []HostInternetScsiHbaParamValue              `xml:"advancedOptions,omitempty"`
    +	Parent                   string                                       `xml:"parent,omitempty"`
    +}
    +
    +func init() {
    +	t["HostInternetScsiHbaStaticTarget"] = reflect.TypeOf((*HostInternetScsiHbaStaticTarget)(nil)).Elem()
    +}
    +
    +type HostInternetScsiHbaTargetSet struct {
    +	DynamicData
    +
    +	StaticTargets []HostInternetScsiHbaStaticTarget `xml:"staticTargets,omitempty"`
    +	SendTargets   []HostInternetScsiHbaSendTarget   `xml:"sendTargets,omitempty"`
    +}
    +
    +func init() {
    +	t["HostInternetScsiHbaTargetSet"] = reflect.TypeOf((*HostInternetScsiHbaTargetSet)(nil)).Elem()
    +}
    +
    +type HostInternetScsiTargetTransport struct {
    +	HostTargetTransport
    +
    +	IScsiName  string   `xml:"iScsiName"`
    +	IScsiAlias string   `xml:"iScsiAlias"`
    +	Address    []string `xml:"address,omitempty"`
    +}
    +
    +func init() {
    +	t["HostInternetScsiTargetTransport"] = reflect.TypeOf((*HostInternetScsiTargetTransport)(nil)).Elem()
    +}
    +
    +type HostInventoryFull struct {
    +	NotEnoughLicenses
    +
    +	Capacity int32 `xml:"capacity"`
    +}
    +
    +func init() {
    +	t["HostInventoryFull"] = reflect.TypeOf((*HostInventoryFull)(nil)).Elem()
    +}
    +
    +type HostInventoryFullEvent struct {
    +	LicenseEvent
    +
    +	Capacity int32 `xml:"capacity"`
    +}
    +
    +func init() {
    +	t["HostInventoryFullEvent"] = reflect.TypeOf((*HostInventoryFullEvent)(nil)).Elem()
    +}
    +
    +type HostInventoryFullFault HostInventoryFull
    +
    +func init() {
    +	t["HostInventoryFullFault"] = reflect.TypeOf((*HostInventoryFullFault)(nil)).Elem()
    +}
    +
    +type HostInventoryUnreadableEvent struct {
    +	Event
    +}
    +
    +func init() {
    +	t["HostInventoryUnreadableEvent"] = reflect.TypeOf((*HostInventoryUnreadableEvent)(nil)).Elem()
    +}
    +
    +type HostIoFilterInfo struct {
    +	IoFilterInfo
    +
    +	Available bool `xml:"available"`
    +}
    +
    +func init() {
    +	t["HostIoFilterInfo"] = reflect.TypeOf((*HostIoFilterInfo)(nil)).Elem()
    +}
    +
    +type HostIpChangedEvent struct {
    +	HostEvent
    +
    +	OldIP string `xml:"oldIP"`
    +	NewIP string `xml:"newIP"`
    +}
    +
    +func init() {
    +	t["HostIpChangedEvent"] = reflect.TypeOf((*HostIpChangedEvent)(nil)).Elem()
    +}
    +
    +type HostIpConfig struct {
    +	DynamicData
    +
    +	Dhcp       bool                                  `xml:"dhcp"`
    +	IpAddress  string                                `xml:"ipAddress,omitempty"`
    +	SubnetMask string                                `xml:"subnetMask,omitempty"`
    +	IpV6Config *HostIpConfigIpV6AddressConfiguration `xml:"ipV6Config,omitempty"`
    +}
    +
    +func init() {
    +	t["HostIpConfig"] = reflect.TypeOf((*HostIpConfig)(nil)).Elem()
    +}
    +
    +type HostIpConfigIpV6Address struct {
    +	DynamicData
    +
    +	IpAddress    string     `xml:"ipAddress"`
    +	PrefixLength int32      `xml:"prefixLength"`
    +	Origin       string     `xml:"origin,omitempty"`
    +	DadState     string     `xml:"dadState,omitempty"`
    +	Lifetime     *time.Time `xml:"lifetime"`
    +	Operation    string     `xml:"operation,omitempty"`
    +}
    +
    +func init() {
    +	t["HostIpConfigIpV6Address"] = reflect.TypeOf((*HostIpConfigIpV6Address)(nil)).Elem()
    +}
    +
    +type HostIpConfigIpV6AddressConfiguration struct {
    +	DynamicData
    +
    +	IpV6Address              []HostIpConfigIpV6Address `xml:"ipV6Address,omitempty"`
    +	AutoConfigurationEnabled *bool                     `xml:"autoConfigurationEnabled"`
    +	DhcpV6Enabled            *bool                     `xml:"dhcpV6Enabled"`
    +}
    +
    +func init() {
    +	t["HostIpConfigIpV6AddressConfiguration"] = reflect.TypeOf((*HostIpConfigIpV6AddressConfiguration)(nil)).Elem()
    +}
    +
    +type HostIpInconsistentEvent struct {
    +	HostEvent
    +
    +	IpAddress  string `xml:"ipAddress"`
    +	IpAddress2 string `xml:"ipAddress2"`
    +}
    +
    +func init() {
    +	t["HostIpInconsistentEvent"] = reflect.TypeOf((*HostIpInconsistentEvent)(nil)).Elem()
    +}
    +
    +type HostIpRouteConfig struct {
    +	DynamicData
    +
    +	DefaultGateway     string `xml:"defaultGateway,omitempty"`
    +	GatewayDevice      string `xml:"gatewayDevice,omitempty"`
    +	IpV6DefaultGateway string `xml:"ipV6DefaultGateway,omitempty"`
    +	IpV6GatewayDevice  string `xml:"ipV6GatewayDevice,omitempty"`
    +}
    +
    +func init() {
    +	t["HostIpRouteConfig"] = reflect.TypeOf((*HostIpRouteConfig)(nil)).Elem()
    +}
    +
    +type HostIpRouteConfigSpec struct {
    +	HostIpRouteConfig
    +
    +	GatewayDeviceConnection     *HostVirtualNicConnection `xml:"gatewayDeviceConnection,omitempty"`
    +	IpV6GatewayDeviceConnection *HostVirtualNicConnection `xml:"ipV6GatewayDeviceConnection,omitempty"`
    +}
    +
    +func init() {
    +	t["HostIpRouteConfigSpec"] = reflect.TypeOf((*HostIpRouteConfigSpec)(nil)).Elem()
    +}
    +
    +type HostIpRouteEntry struct {
    +	DynamicData
    +
    +	Network      string `xml:"network"`
    +	PrefixLength int32  `xml:"prefixLength"`
    +	Gateway      string `xml:"gateway"`
    +	DeviceName   string `xml:"deviceName,omitempty"`
    +}
    +
    +func init() {
    +	t["HostIpRouteEntry"] = reflect.TypeOf((*HostIpRouteEntry)(nil)).Elem()
    +}
    +
    +type HostIpRouteOp struct {
    +	DynamicData
    +
    +	ChangeOperation string           `xml:"changeOperation"`
    +	Route           HostIpRouteEntry `xml:"route"`
    +}
    +
    +func init() {
    +	t["HostIpRouteOp"] = reflect.TypeOf((*HostIpRouteOp)(nil)).Elem()
    +}
    +
    +type HostIpRouteTableConfig struct {
    +	DynamicData
    +
    +	IpRoute   []HostIpRouteOp `xml:"ipRoute,omitempty"`
    +	Ipv6Route []HostIpRouteOp `xml:"ipv6Route,omitempty"`
    +}
    +
    +func init() {
    +	t["HostIpRouteTableConfig"] = reflect.TypeOf((*HostIpRouteTableConfig)(nil)).Elem()
    +}
    +
    +type HostIpRouteTableInfo struct {
    +	DynamicData
    +
    +	IpRoute   []HostIpRouteEntry `xml:"ipRoute,omitempty"`
    +	Ipv6Route []HostIpRouteEntry `xml:"ipv6Route,omitempty"`
    +}
    +
    +func init() {
    +	t["HostIpRouteTableInfo"] = reflect.TypeOf((*HostIpRouteTableInfo)(nil)).Elem()
    +}
    +
    +type HostIpToShortNameFailedEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["HostIpToShortNameFailedEvent"] = reflect.TypeOf((*HostIpToShortNameFailedEvent)(nil)).Elem()
    +}
    +
    +type HostIpmiInfo struct {
    +	DynamicData
    +
    +	BmcIpAddress  string `xml:"bmcIpAddress,omitempty"`
    +	BmcMacAddress string `xml:"bmcMacAddress,omitempty"`
    +	Login         string `xml:"login,omitempty"`
    +	Password      string `xml:"password,omitempty"`
    +}
    +
    +func init() {
    +	t["HostIpmiInfo"] = reflect.TypeOf((*HostIpmiInfo)(nil)).Elem()
    +}
    +
    +type HostIsolationIpPingFailedEvent struct {
    +	HostDasEvent
    +
    +	IsolationIp string `xml:"isolationIp"`
    +}
    +
    +func init() {
    +	t["HostIsolationIpPingFailedEvent"] = reflect.TypeOf((*HostIsolationIpPingFailedEvent)(nil)).Elem()
    +}
    +
    +type HostLicensableResourceInfo struct {
    +	DynamicData
    +
    +	Resource []KeyAnyValue `xml:"resource"`
    +}
    +
    +func init() {
    +	t["HostLicensableResourceInfo"] = reflect.TypeOf((*HostLicensableResourceInfo)(nil)).Elem()
    +}
    +
    +type HostLicenseConnectInfo struct {
    +	DynamicData
    +
    +	License    LicenseManagerLicenseInfo    `xml:"license"`
    +	Evaluation LicenseManagerEvaluationInfo `xml:"evaluation"`
    +	Resource   *HostLicensableResourceInfo  `xml:"resource,omitempty"`
    +}
    +
    +func init() {
    +	t["HostLicenseConnectInfo"] = reflect.TypeOf((*HostLicenseConnectInfo)(nil)).Elem()
    +}
    +
    +type HostLicenseExpiredEvent struct {
    +	LicenseEvent
    +}
    +
    +func init() {
    +	t["HostLicenseExpiredEvent"] = reflect.TypeOf((*HostLicenseExpiredEvent)(nil)).Elem()
    +}
    +
    +type HostLicenseSpec struct {
    +	DynamicData
    +
    +	Source             BaseLicenseSource `xml:"source,omitempty,typeattr"`
    +	EditionKey         string            `xml:"editionKey,omitempty"`
    +	DisabledFeatureKey []string          `xml:"disabledFeatureKey,omitempty"`
    +	EnabledFeatureKey  []string          `xml:"enabledFeatureKey,omitempty"`
    +}
    +
    +func init() {
    +	t["HostLicenseSpec"] = reflect.TypeOf((*HostLicenseSpec)(nil)).Elem()
    +}
    +
    +type HostListSummary struct {
    +	DynamicData
    +
    +	Host               *ManagedObjectReference        `xml:"host,omitempty"`
    +	Hardware           *HostHardwareSummary           `xml:"hardware,omitempty"`
    +	Runtime            *HostRuntimeInfo               `xml:"runtime,omitempty"`
    +	Config             HostConfigSummary              `xml:"config"`
    +	QuickStats         HostListSummaryQuickStats      `xml:"quickStats"`
    +	OverallStatus      ManagedEntityStatus            `xml:"overallStatus"`
    +	RebootRequired     bool                           `xml:"rebootRequired"`
    +	CustomValue        []BaseCustomFieldValue         `xml:"customValue,omitempty,typeattr"`
    +	ManagementServerIp string                         `xml:"managementServerIp,omitempty"`
    +	MaxEVCModeKey      string                         `xml:"maxEVCModeKey,omitempty"`
    +	CurrentEVCModeKey  string                         `xml:"currentEVCModeKey,omitempty"`
    +	Gateway            *HostListSummaryGatewaySummary `xml:"gateway,omitempty"`
    +	TpmAttestation     *HostTpmAttestationInfo        `xml:"tpmAttestation,omitempty"`
    +}
    +
    +func init() {
    +	t["HostListSummary"] = reflect.TypeOf((*HostListSummary)(nil)).Elem()
    +}
    +
    +type HostListSummaryGatewaySummary struct {
    +	DynamicData
    +
    +	GatewayType string `xml:"gatewayType"`
    +	GatewayId   string `xml:"gatewayId"`
    +}
    +
    +func init() {
    +	t["HostListSummaryGatewaySummary"] = reflect.TypeOf((*HostListSummaryGatewaySummary)(nil)).Elem()
    +}
    +
    +type HostListSummaryQuickStats struct {
    +	DynamicData
    +
    +	OverallCpuUsage           int32 `xml:"overallCpuUsage,omitempty"`
    +	OverallMemoryUsage        int32 `xml:"overallMemoryUsage,omitempty"`
    +	DistributedCpuFairness    int32 `xml:"distributedCpuFairness,omitempty"`
    +	DistributedMemoryFairness int32 `xml:"distributedMemoryFairness,omitempty"`
    +	AvailablePMemCapacity     int32 `xml:"availablePMemCapacity,omitempty"`
    +	Uptime                    int32 `xml:"uptime,omitempty"`
    +}
    +
    +func init() {
    +	t["HostListSummaryQuickStats"] = reflect.TypeOf((*HostListSummaryQuickStats)(nil)).Elem()
    +}
    +
    +type HostListVStorageObject HostListVStorageObjectRequestType
    +
    +func init() {
    +	t["HostListVStorageObject"] = reflect.TypeOf((*HostListVStorageObject)(nil)).Elem()
    +}
    +
    +type HostListVStorageObjectRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	Datastore ManagedObjectReference `xml:"datastore"`
    +}
    +
    +func init() {
    +	t["HostListVStorageObjectRequestType"] = reflect.TypeOf((*HostListVStorageObjectRequestType)(nil)).Elem()
    +}
    +
    +type HostListVStorageObjectResponse struct {
    +	Returnval []ID `xml:"returnval,omitempty"`
    +}
    +
    +type HostLocalAuthenticationInfo struct {
    +	HostAuthenticationStoreInfo
    +}
    +
    +func init() {
    +	t["HostLocalAuthenticationInfo"] = reflect.TypeOf((*HostLocalAuthenticationInfo)(nil)).Elem()
    +}
    +
    +type HostLocalFileSystemVolume struct {
    +	HostFileSystemVolume
    +
    +	Device string `xml:"device"`
    +}
    +
    +func init() {
    +	t["HostLocalFileSystemVolume"] = reflect.TypeOf((*HostLocalFileSystemVolume)(nil)).Elem()
    +}
    +
    +type HostLocalFileSystemVolumeSpec struct {
    +	DynamicData
    +
    +	Device    string `xml:"device"`
    +	LocalPath string `xml:"localPath"`
    +}
    +
    +func init() {
    +	t["HostLocalFileSystemVolumeSpec"] = reflect.TypeOf((*HostLocalFileSystemVolumeSpec)(nil)).Elem()
    +}
    +
    +type HostLocalPortCreatedEvent struct {
    +	DvsEvent
    +
    +	HostLocalPort DVSHostLocalPortInfo `xml:"hostLocalPort"`
    +}
    +
    +func init() {
    +	t["HostLocalPortCreatedEvent"] = reflect.TypeOf((*HostLocalPortCreatedEvent)(nil)).Elem()
    +}
    +
    +type HostLowLevelProvisioningManagerDiskLayoutSpec struct {
    +	DynamicData
    +
    +	ControllerType string `xml:"controllerType"`
    +	BusNumber      int32  `xml:"busNumber"`
    +	UnitNumber     *int32 `xml:"unitNumber"`
    +	SrcFilename    string `xml:"srcFilename"`
    +	DstFilename    string `xml:"dstFilename"`
    +}
    +
    +func init() {
    +	t["HostLowLevelProvisioningManagerDiskLayoutSpec"] = reflect.TypeOf((*HostLowLevelProvisioningManagerDiskLayoutSpec)(nil)).Elem()
    +}
    +
    +type HostLowLevelProvisioningManagerFileDeleteResult struct {
    +	DynamicData
    +
    +	FileName string               `xml:"fileName"`
    +	Fault    LocalizedMethodFault `xml:"fault"`
    +}
    +
    +func init() {
    +	t["HostLowLevelProvisioningManagerFileDeleteResult"] = reflect.TypeOf((*HostLowLevelProvisioningManagerFileDeleteResult)(nil)).Elem()
    +}
    +
    +type HostLowLevelProvisioningManagerFileDeleteSpec struct {
    +	DynamicData
    +
    +	FileName string `xml:"fileName"`
    +	FileType string `xml:"fileType"`
    +}
    +
    +func init() {
    +	t["HostLowLevelProvisioningManagerFileDeleteSpec"] = reflect.TypeOf((*HostLowLevelProvisioningManagerFileDeleteSpec)(nil)).Elem()
    +}
    +
    +type HostLowLevelProvisioningManagerFileReserveResult struct {
    +	DynamicData
    +
    +	BaseName     string `xml:"baseName"`
    +	ParentDir    string `xml:"parentDir"`
    +	ReservedName string `xml:"reservedName"`
    +}
    +
    +func init() {
    +	t["HostLowLevelProvisioningManagerFileReserveResult"] = reflect.TypeOf((*HostLowLevelProvisioningManagerFileReserveResult)(nil)).Elem()
    +}
    +
    +type HostLowLevelProvisioningManagerFileReserveSpec struct {
    +	DynamicData
    +
    +	BaseName       string `xml:"baseName"`
    +	ParentDir      string `xml:"parentDir"`
    +	FileType       string `xml:"fileType"`
    +	StorageProfile string `xml:"storageProfile"`
    +}
    +
    +func init() {
    +	t["HostLowLevelProvisioningManagerFileReserveSpec"] = reflect.TypeOf((*HostLowLevelProvisioningManagerFileReserveSpec)(nil)).Elem()
    +}
    +
    +type HostLowLevelProvisioningManagerSnapshotLayoutSpec struct {
    +	DynamicData
    +
    +	Id          int32                                           `xml:"id"`
    +	SrcFilename string                                          `xml:"srcFilename"`
    +	DstFilename string                                          `xml:"dstFilename"`
    +	Disk        []HostLowLevelProvisioningManagerDiskLayoutSpec `xml:"disk,omitempty"`
    +}
    +
    +func init() {
    +	t["HostLowLevelProvisioningManagerSnapshotLayoutSpec"] = reflect.TypeOf((*HostLowLevelProvisioningManagerSnapshotLayoutSpec)(nil)).Elem()
    +}
    +
    +type HostLowLevelProvisioningManagerVmMigrationStatus struct {
    +	DynamicData
    +
    +	MigrationId          int64  `xml:"migrationId"`
    +	Type                 string `xml:"type"`
    +	Source               bool   `xml:"source"`
    +	ConsideredSuccessful bool   `xml:"consideredSuccessful"`
    +}
    +
    +func init() {
    +	t["HostLowLevelProvisioningManagerVmMigrationStatus"] = reflect.TypeOf((*HostLowLevelProvisioningManagerVmMigrationStatus)(nil)).Elem()
    +}
    +
    +type HostLowLevelProvisioningManagerVmRecoveryInfo struct {
    +	DynamicData
    +
    +	Version      string                       `xml:"version"`
    +	BiosUUID     string                       `xml:"biosUUID"`
    +	InstanceUUID string                       `xml:"instanceUUID"`
    +	FtInfo       BaseFaultToleranceConfigInfo `xml:"ftInfo,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["HostLowLevelProvisioningManagerVmRecoveryInfo"] = reflect.TypeOf((*HostLowLevelProvisioningManagerVmRecoveryInfo)(nil)).Elem()
    +}
    +
    +type HostMaintenanceSpec struct {
    +	DynamicData
    +
    +	VsanMode *VsanHostDecommissionMode `xml:"vsanMode,omitempty"`
    +}
    +
    +func init() {
    +	t["HostMaintenanceSpec"] = reflect.TypeOf((*HostMaintenanceSpec)(nil)).Elem()
    +}
    +
    +type HostMemberHealthCheckResult struct {
    +	DynamicData
    +
    +	Summary string `xml:"summary,omitempty"`
    +}
    +
    +func init() {
    +	t["HostMemberHealthCheckResult"] = reflect.TypeOf((*HostMemberHealthCheckResult)(nil)).Elem()
    +}
    +
    +type HostMemberRuntimeInfo struct {
    +	DynamicData
    +
    +	Host              ManagedObjectReference            `xml:"host"`
    +	Status            string                            `xml:"status,omitempty"`
    +	StatusDetail      string                            `xml:"statusDetail,omitempty"`
    +	HealthCheckResult []BaseHostMemberHealthCheckResult `xml:"healthCheckResult,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["HostMemberRuntimeInfo"] = reflect.TypeOf((*HostMemberRuntimeInfo)(nil)).Elem()
    +}
    +
    +type HostMemberUplinkHealthCheckResult struct {
    +	HostMemberHealthCheckResult
    +
    +	UplinkPortKey string `xml:"uplinkPortKey"`
    +}
    +
    +func init() {
    +	t["HostMemberUplinkHealthCheckResult"] = reflect.TypeOf((*HostMemberUplinkHealthCheckResult)(nil)).Elem()
    +}
    +
    +type HostMemoryProfile struct {
    +	ApplyProfile
    +}
    +
    +func init() {
    +	t["HostMemoryProfile"] = reflect.TypeOf((*HostMemoryProfile)(nil)).Elem()
    +}
    +
    +type HostMemorySpec struct {
    +	DynamicData
    +
    +	ServiceConsoleReservation int64 `xml:"serviceConsoleReservation,omitempty"`
    +}
    +
    +func init() {
    +	t["HostMemorySpec"] = reflect.TypeOf((*HostMemorySpec)(nil)).Elem()
    +}
    +
    +type HostMissingNetworksEvent struct {
    +	HostDasEvent
    +
    +	Ips string `xml:"ips,omitempty"`
    +}
    +
    +func init() {
    +	t["HostMissingNetworksEvent"] = reflect.TypeOf((*HostMissingNetworksEvent)(nil)).Elem()
    +}
    +
    +type HostMonitoringStateChangedEvent struct {
    +	ClusterEvent
    +
    +	State     string `xml:"state"`
    +	PrevState string `xml:"prevState,omitempty"`
    +}
    +
    +func init() {
    +	t["HostMonitoringStateChangedEvent"] = reflect.TypeOf((*HostMonitoringStateChangedEvent)(nil)).Elem()
    +}
    +
    +type HostMountInfo struct {
    +	DynamicData
    +
    +	Path               string `xml:"path,omitempty"`
    +	AccessMode         string `xml:"accessMode"`
    +	Mounted            *bool  `xml:"mounted"`
    +	Accessible         *bool  `xml:"accessible"`
    +	InaccessibleReason string `xml:"inaccessibleReason,omitempty"`
    +}
    +
    +func init() {
    +	t["HostMountInfo"] = reflect.TypeOf((*HostMountInfo)(nil)).Elem()
    +}
    +
    +type HostMultipathInfo struct {
    +	DynamicData
    +
    +	Lun []HostMultipathInfoLogicalUnit `xml:"lun,omitempty"`
    +}
    +
    +func init() {
    +	t["HostMultipathInfo"] = reflect.TypeOf((*HostMultipathInfo)(nil)).Elem()
    +}
    +
    +type HostMultipathInfoFixedLogicalUnitPolicy struct {
    +	HostMultipathInfoLogicalUnitPolicy
    +
    +	Prefer string `xml:"prefer"`
    +}
    +
    +func init() {
    +	t["HostMultipathInfoFixedLogicalUnitPolicy"] = reflect.TypeOf((*HostMultipathInfoFixedLogicalUnitPolicy)(nil)).Elem()
    +}
    +
    +type HostMultipathInfoLogicalUnit struct {
    +	DynamicData
    +
    +	Key                    string                                              `xml:"key"`
    +	Id                     string                                              `xml:"id"`
    +	Lun                    string                                              `xml:"lun"`
    +	Path                   []HostMultipathInfoPath                             `xml:"path"`
    +	Policy                 BaseHostMultipathInfoLogicalUnitPolicy              `xml:"policy,typeattr"`
    +	StorageArrayTypePolicy *HostMultipathInfoLogicalUnitStorageArrayTypePolicy `xml:"storageArrayTypePolicy,omitempty"`
    +}
    +
    +func init() {
    +	t["HostMultipathInfoLogicalUnit"] = reflect.TypeOf((*HostMultipathInfoLogicalUnit)(nil)).Elem()
    +}
    +
    +type HostMultipathInfoLogicalUnitPolicy struct {
    +	DynamicData
    +
    +	Policy string `xml:"policy"`
    +}
    +
    +func init() {
    +	t["HostMultipathInfoLogicalUnitPolicy"] = reflect.TypeOf((*HostMultipathInfoLogicalUnitPolicy)(nil)).Elem()
    +}
    +
    +type HostMultipathInfoLogicalUnitStorageArrayTypePolicy struct {
    +	DynamicData
    +
    +	Policy string `xml:"policy"`
    +}
    +
    +func init() {
    +	t["HostMultipathInfoLogicalUnitStorageArrayTypePolicy"] = reflect.TypeOf((*HostMultipathInfoLogicalUnitStorageArrayTypePolicy)(nil)).Elem()
    +}
    +
    +type HostMultipathInfoPath struct {
    +	DynamicData
    +
    +	Key           string                  `xml:"key"`
    +	Name          string                  `xml:"name"`
    +	PathState     string                  `xml:"pathState"`
    +	State         string                  `xml:"state,omitempty"`
    +	IsWorkingPath *bool                   `xml:"isWorkingPath"`
    +	Adapter       string                  `xml:"adapter"`
    +	Lun           string                  `xml:"lun"`
    +	Transport     BaseHostTargetTransport `xml:"transport,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["HostMultipathInfoPath"] = reflect.TypeOf((*HostMultipathInfoPath)(nil)).Elem()
    +}
    +
    +type HostMultipathStateInfo struct {
    +	DynamicData
    +
    +	Path []HostMultipathStateInfoPath `xml:"path,omitempty"`
    +}
    +
    +func init() {
    +	t["HostMultipathStateInfo"] = reflect.TypeOf((*HostMultipathStateInfo)(nil)).Elem()
    +}
    +
    +type HostMultipathStateInfoPath struct {
    +	DynamicData
    +
    +	Name      string `xml:"name"`
    +	PathState string `xml:"pathState"`
    +}
    +
    +func init() {
    +	t["HostMultipathStateInfoPath"] = reflect.TypeOf((*HostMultipathStateInfoPath)(nil)).Elem()
    +}
    +
    +type HostNasVolume struct {
    +	HostFileSystemVolume
    +
    +	RemoteHost       string   `xml:"remoteHost"`
    +	RemotePath       string   `xml:"remotePath"`
    +	UserName         string   `xml:"userName,omitempty"`
    +	RemoteHostNames  []string `xml:"remoteHostNames,omitempty"`
    +	SecurityType     string   `xml:"securityType,omitempty"`
    +	ProtocolEndpoint *bool    `xml:"protocolEndpoint"`
    +}
    +
    +func init() {
    +	t["HostNasVolume"] = reflect.TypeOf((*HostNasVolume)(nil)).Elem()
    +}
    +
    +type HostNasVolumeConfig struct {
    +	DynamicData
    +
    +	ChangeOperation string             `xml:"changeOperation,omitempty"`
    +	Spec            *HostNasVolumeSpec `xml:"spec,omitempty"`
    +}
    +
    +func init() {
    +	t["HostNasVolumeConfig"] = reflect.TypeOf((*HostNasVolumeConfig)(nil)).Elem()
    +}
    +
    +type HostNasVolumeSpec struct {
    +	DynamicData
    +
    +	RemoteHost      string   `xml:"remoteHost"`
    +	RemotePath      string   `xml:"remotePath"`
    +	LocalPath       string   `xml:"localPath"`
    +	AccessMode      string   `xml:"accessMode"`
    +	Type            string   `xml:"type,omitempty"`
    +	UserName        string   `xml:"userName,omitempty"`
    +	Password        string   `xml:"password,omitempty"`
    +	RemoteHostNames []string `xml:"remoteHostNames,omitempty"`
    +	SecurityType    string   `xml:"securityType,omitempty"`
    +}
    +
    +func init() {
    +	t["HostNasVolumeSpec"] = reflect.TypeOf((*HostNasVolumeSpec)(nil)).Elem()
    +}
    +
    +type HostNasVolumeUserInfo struct {
    +	DynamicData
    +
    +	User string `xml:"user"`
    +}
    +
    +func init() {
    +	t["HostNasVolumeUserInfo"] = reflect.TypeOf((*HostNasVolumeUserInfo)(nil)).Elem()
    +}
    +
    +type HostNatService struct {
    +	DynamicData
    +
    +	Key  string             `xml:"key"`
    +	Spec HostNatServiceSpec `xml:"spec"`
    +}
    +
    +func init() {
    +	t["HostNatService"] = reflect.TypeOf((*HostNatService)(nil)).Elem()
    +}
    +
    +type HostNatServiceConfig struct {
    +	DynamicData
    +
    +	ChangeOperation string             `xml:"changeOperation,omitempty"`
    +	Key             string             `xml:"key"`
    +	Spec            HostNatServiceSpec `xml:"spec"`
    +}
    +
    +func init() {
    +	t["HostNatServiceConfig"] = reflect.TypeOf((*HostNatServiceConfig)(nil)).Elem()
    +}
    +
    +type HostNatServiceNameServiceSpec struct {
    +	DynamicData
    +
    +	DnsAutoDetect bool     `xml:"dnsAutoDetect"`
    +	DnsPolicy     string   `xml:"dnsPolicy"`
    +	DnsRetries    int32    `xml:"dnsRetries"`
    +	DnsTimeout    int32    `xml:"dnsTimeout"`
    +	DnsNameServer []string `xml:"dnsNameServer,omitempty"`
    +	NbdsTimeout   int32    `xml:"nbdsTimeout"`
    +	NbnsRetries   int32    `xml:"nbnsRetries"`
    +	NbnsTimeout   int32    `xml:"nbnsTimeout"`
    +}
    +
    +func init() {
    +	t["HostNatServiceNameServiceSpec"] = reflect.TypeOf((*HostNatServiceNameServiceSpec)(nil)).Elem()
    +}
    +
    +type HostNatServicePortForwardSpec struct {
    +	DynamicData
    +
    +	Type           string `xml:"type"`
    +	Name           string `xml:"name"`
    +	HostPort       int32  `xml:"hostPort"`
    +	GuestPort      int32  `xml:"guestPort"`
    +	GuestIpAddress string `xml:"guestIpAddress"`
    +}
    +
    +func init() {
    +	t["HostNatServicePortForwardSpec"] = reflect.TypeOf((*HostNatServicePortForwardSpec)(nil)).Elem()
    +}
    +
    +type HostNatServiceSpec struct {
    +	DynamicData
    +
    +	VirtualSwitch    string                          `xml:"virtualSwitch"`
    +	ActiveFtp        bool                            `xml:"activeFtp"`
    +	AllowAnyOui      bool                            `xml:"allowAnyOui"`
    +	ConfigPort       bool                            `xml:"configPort"`
    +	IpGatewayAddress string                          `xml:"ipGatewayAddress"`
    +	UdpTimeout       int32                           `xml:"udpTimeout"`
    +	PortForward      []HostNatServicePortForwardSpec `xml:"portForward,omitempty"`
    +	NameService      *HostNatServiceNameServiceSpec  `xml:"nameService,omitempty"`
    +}
    +
    +func init() {
    +	t["HostNatServiceSpec"] = reflect.TypeOf((*HostNatServiceSpec)(nil)).Elem()
    +}
    +
    +type HostNetCapabilities struct {
    +	DynamicData
    +
    +	CanSetPhysicalNicLinkSpeed bool     `xml:"canSetPhysicalNicLinkSpeed"`
    +	SupportsNicTeaming         bool     `xml:"supportsNicTeaming"`
    +	NicTeamingPolicy           []string `xml:"nicTeamingPolicy,omitempty"`
    +	SupportsVlan               bool     `xml:"supportsVlan"`
    +	UsesServiceConsoleNic      bool     `xml:"usesServiceConsoleNic"`
    +	SupportsNetworkHints       bool     `xml:"supportsNetworkHints"`
    +	MaxPortGroupsPerVswitch    int32    `xml:"maxPortGroupsPerVswitch,omitempty"`
    +	VswitchConfigSupported     bool     `xml:"vswitchConfigSupported"`
    +	VnicConfigSupported        bool     `xml:"vnicConfigSupported"`
    +	IpRouteConfigSupported     bool     `xml:"ipRouteConfigSupported"`
    +	DnsConfigSupported         bool     `xml:"dnsConfigSupported"`
    +	DhcpOnVnicSupported        bool     `xml:"dhcpOnVnicSupported"`
    +	IpV6Supported              *bool    `xml:"ipV6Supported"`
    +}
    +
    +func init() {
    +	t["HostNetCapabilities"] = reflect.TypeOf((*HostNetCapabilities)(nil)).Elem()
    +}
    +
    +type HostNetOffloadCapabilities struct {
    +	DynamicData
    +
    +	CsumOffload     *bool `xml:"csumOffload"`
    +	TcpSegmentation *bool `xml:"tcpSegmentation"`
    +	ZeroCopyXmit    *bool `xml:"zeroCopyXmit"`
    +}
    +
    +func init() {
    +	t["HostNetOffloadCapabilities"] = reflect.TypeOf((*HostNetOffloadCapabilities)(nil)).Elem()
    +}
    +
    +type HostNetStackInstance struct {
    +	DynamicData
    +
    +	Key                             string                  `xml:"key,omitempty"`
    +	Name                            string                  `xml:"name,omitempty"`
    +	DnsConfig                       BaseHostDnsConfig       `xml:"dnsConfig,omitempty,typeattr"`
    +	IpRouteConfig                   BaseHostIpRouteConfig   `xml:"ipRouteConfig,omitempty,typeattr"`
    +	RequestedMaxNumberOfConnections int32                   `xml:"requestedMaxNumberOfConnections,omitempty"`
    +	CongestionControlAlgorithm      string                  `xml:"congestionControlAlgorithm,omitempty"`
    +	IpV6Enabled                     *bool                   `xml:"ipV6Enabled"`
    +	RouteTableConfig                *HostIpRouteTableConfig `xml:"routeTableConfig,omitempty"`
    +}
    +
    +func init() {
    +	t["HostNetStackInstance"] = reflect.TypeOf((*HostNetStackInstance)(nil)).Elem()
    +}
    +
    +type HostNetworkConfig struct {
    +	DynamicData
    +
    +	Vswitch              []HostVirtualSwitchConfig       `xml:"vswitch,omitempty"`
    +	ProxySwitch          []HostProxySwitchConfig         `xml:"proxySwitch,omitempty"`
    +	Portgroup            []HostPortGroupConfig           `xml:"portgroup,omitempty"`
    +	Pnic                 []PhysicalNicConfig             `xml:"pnic,omitempty"`
    +	Vnic                 []HostVirtualNicConfig          `xml:"vnic,omitempty"`
    +	ConsoleVnic          []HostVirtualNicConfig          `xml:"consoleVnic,omitempty"`
    +	DnsConfig            BaseHostDnsConfig               `xml:"dnsConfig,omitempty,typeattr"`
    +	IpRouteConfig        BaseHostIpRouteConfig           `xml:"ipRouteConfig,omitempty,typeattr"`
    +	ConsoleIpRouteConfig BaseHostIpRouteConfig           `xml:"consoleIpRouteConfig,omitempty,typeattr"`
    +	RouteTableConfig     *HostIpRouteTableConfig         `xml:"routeTableConfig,omitempty"`
    +	Dhcp                 []HostDhcpServiceConfig         `xml:"dhcp,omitempty"`
    +	Nat                  []HostNatServiceConfig          `xml:"nat,omitempty"`
    +	IpV6Enabled          *bool                           `xml:"ipV6Enabled"`
    +	NetStackSpec         []HostNetworkConfigNetStackSpec `xml:"netStackSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["HostNetworkConfig"] = reflect.TypeOf((*HostNetworkConfig)(nil)).Elem()
    +}
    +
    +type HostNetworkConfigNetStackSpec struct {
    +	DynamicData
    +
    +	NetStackInstance HostNetStackInstance `xml:"netStackInstance"`
    +	Operation        string               `xml:"operation,omitempty"`
    +}
    +
    +func init() {
    +	t["HostNetworkConfigNetStackSpec"] = reflect.TypeOf((*HostNetworkConfigNetStackSpec)(nil)).Elem()
    +}
    +
    +type HostNetworkConfigResult struct {
    +	DynamicData
    +
    +	VnicDevice        []string `xml:"vnicDevice,omitempty"`
    +	ConsoleVnicDevice []string `xml:"consoleVnicDevice,omitempty"`
    +}
    +
    +func init() {
    +	t["HostNetworkConfigResult"] = reflect.TypeOf((*HostNetworkConfigResult)(nil)).Elem()
    +}
    +
    +type HostNetworkInfo struct {
    +	DynamicData
    +
    +	Vswitch              []HostVirtualSwitch     `xml:"vswitch,omitempty"`
    +	ProxySwitch          []HostProxySwitch       `xml:"proxySwitch,omitempty"`
    +	Portgroup            []HostPortGroup         `xml:"portgroup,omitempty"`
    +	Pnic                 []PhysicalNic           `xml:"pnic,omitempty"`
    +	Vnic                 []HostVirtualNic        `xml:"vnic,omitempty"`
    +	ConsoleVnic          []HostVirtualNic        `xml:"consoleVnic,omitempty"`
    +	DnsConfig            BaseHostDnsConfig       `xml:"dnsConfig,omitempty,typeattr"`
    +	IpRouteConfig        BaseHostIpRouteConfig   `xml:"ipRouteConfig,omitempty,typeattr"`
    +	ConsoleIpRouteConfig BaseHostIpRouteConfig   `xml:"consoleIpRouteConfig,omitempty,typeattr"`
    +	RouteTableInfo       *HostIpRouteTableInfo   `xml:"routeTableInfo,omitempty"`
    +	Dhcp                 []HostDhcpService       `xml:"dhcp,omitempty"`
    +	Nat                  []HostNatService        `xml:"nat,omitempty"`
    +	IpV6Enabled          *bool                   `xml:"ipV6Enabled"`
    +	AtBootIpV6Enabled    *bool                   `xml:"atBootIpV6Enabled"`
    +	NetStackInstance     []HostNetStackInstance  `xml:"netStackInstance,omitempty"`
    +	OpaqueSwitch         []HostOpaqueSwitch      `xml:"opaqueSwitch,omitempty"`
    +	OpaqueNetwork        []HostOpaqueNetworkInfo `xml:"opaqueNetwork,omitempty"`
    +}
    +
    +func init() {
    +	t["HostNetworkInfo"] = reflect.TypeOf((*HostNetworkInfo)(nil)).Elem()
    +}
    +
    +type HostNetworkPolicy struct {
    +	DynamicData
    +
    +	Security      *HostNetworkSecurityPolicy       `xml:"security,omitempty"`
    +	NicTeaming    *HostNicTeamingPolicy            `xml:"nicTeaming,omitempty"`
    +	OffloadPolicy *HostNetOffloadCapabilities      `xml:"offloadPolicy,omitempty"`
    +	ShapingPolicy *HostNetworkTrafficShapingPolicy `xml:"shapingPolicy,omitempty"`
    +}
    +
    +func init() {
    +	t["HostNetworkPolicy"] = reflect.TypeOf((*HostNetworkPolicy)(nil)).Elem()
    +}
    +
    +type HostNetworkResourceRuntime struct {
    +	DynamicData
    +
    +	PnicResourceInfo []HostPnicNetworkResourceInfo `xml:"pnicResourceInfo"`
    +}
    +
    +func init() {
    +	t["HostNetworkResourceRuntime"] = reflect.TypeOf((*HostNetworkResourceRuntime)(nil)).Elem()
    +}
    +
    +type HostNetworkSecurityPolicy struct {
    +	DynamicData
    +
    +	AllowPromiscuous *bool `xml:"allowPromiscuous"`
    +	MacChanges       *bool `xml:"macChanges"`
    +	ForgedTransmits  *bool `xml:"forgedTransmits"`
    +}
    +
    +func init() {
    +	t["HostNetworkSecurityPolicy"] = reflect.TypeOf((*HostNetworkSecurityPolicy)(nil)).Elem()
    +}
    +
    +type HostNetworkTrafficShapingPolicy struct {
    +	DynamicData
    +
    +	Enabled          *bool `xml:"enabled"`
    +	AverageBandwidth int64 `xml:"averageBandwidth,omitempty"`
    +	PeakBandwidth    int64 `xml:"peakBandwidth,omitempty"`
    +	BurstSize        int64 `xml:"burstSize,omitempty"`
    +}
    +
    +func init() {
    +	t["HostNetworkTrafficShapingPolicy"] = reflect.TypeOf((*HostNetworkTrafficShapingPolicy)(nil)).Elem()
    +}
    +
    +type HostNewNetworkConnectInfo struct {
    +	HostConnectInfoNetworkInfo
    +}
    +
    +func init() {
    +	t["HostNewNetworkConnectInfo"] = reflect.TypeOf((*HostNewNetworkConnectInfo)(nil)).Elem()
    +}
    +
    +type HostNicFailureCriteria struct {
    +	DynamicData
    +
    +	CheckSpeed        string `xml:"checkSpeed,omitempty"`
    +	Speed             int32  `xml:"speed,omitempty"`
    +	CheckDuplex       *bool  `xml:"checkDuplex"`
    +	FullDuplex        *bool  `xml:"fullDuplex"`
    +	CheckErrorPercent *bool  `xml:"checkErrorPercent"`
    +	Percentage        int32  `xml:"percentage,omitempty"`
    +	CheckBeacon       *bool  `xml:"checkBeacon"`
    +}
    +
    +func init() {
    +	t["HostNicFailureCriteria"] = reflect.TypeOf((*HostNicFailureCriteria)(nil)).Elem()
    +}
    +
    +type HostNicOrderPolicy struct {
    +	DynamicData
    +
    +	ActiveNic  []string `xml:"activeNic,omitempty"`
    +	StandbyNic []string `xml:"standbyNic,omitempty"`
    +}
    +
    +func init() {
    +	t["HostNicOrderPolicy"] = reflect.TypeOf((*HostNicOrderPolicy)(nil)).Elem()
    +}
    +
    +type HostNicTeamingPolicy struct {
    +	DynamicData
    +
    +	Policy          string                  `xml:"policy,omitempty"`
    +	ReversePolicy   *bool                   `xml:"reversePolicy"`
    +	NotifySwitches  *bool                   `xml:"notifySwitches"`
    +	RollingOrder    *bool                   `xml:"rollingOrder"`
    +	FailureCriteria *HostNicFailureCriteria `xml:"failureCriteria,omitempty"`
    +	NicOrder        *HostNicOrderPolicy     `xml:"nicOrder,omitempty"`
    +}
    +
    +func init() {
    +	t["HostNicTeamingPolicy"] = reflect.TypeOf((*HostNicTeamingPolicy)(nil)).Elem()
    +}
    +
    +type HostNoAvailableNetworksEvent struct {
    +	HostDasEvent
    +
    +	Ips string `xml:"ips,omitempty"`
    +}
    +
    +func init() {
    +	t["HostNoAvailableNetworksEvent"] = reflect.TypeOf((*HostNoAvailableNetworksEvent)(nil)).Elem()
    +}
    +
    +type HostNoHAEnabledPortGroupsEvent struct {
    +	HostDasEvent
    +}
    +
    +func init() {
    +	t["HostNoHAEnabledPortGroupsEvent"] = reflect.TypeOf((*HostNoHAEnabledPortGroupsEvent)(nil)).Elem()
    +}
    +
    +type HostNoRedundantManagementNetworkEvent struct {
    +	HostDasEvent
    +}
    +
    +func init() {
    +	t["HostNoRedundantManagementNetworkEvent"] = reflect.TypeOf((*HostNoRedundantManagementNetworkEvent)(nil)).Elem()
    +}
    +
    +type HostNonCompliantEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["HostNonCompliantEvent"] = reflect.TypeOf((*HostNonCompliantEvent)(nil)).Elem()
    +}
    +
    +type HostNotConnected struct {
    +	HostCommunication
    +}
    +
    +func init() {
    +	t["HostNotConnected"] = reflect.TypeOf((*HostNotConnected)(nil)).Elem()
    +}
    +
    +type HostNotConnectedFault HostNotConnected
    +
    +func init() {
    +	t["HostNotConnectedFault"] = reflect.TypeOf((*HostNotConnectedFault)(nil)).Elem()
    +}
    +
    +type HostNotInClusterEvent struct {
    +	HostDasEvent
    +}
    +
    +func init() {
    +	t["HostNotInClusterEvent"] = reflect.TypeOf((*HostNotInClusterEvent)(nil)).Elem()
    +}
    +
    +type HostNotReachable struct {
    +	HostCommunication
    +}
    +
    +func init() {
    +	t["HostNotReachable"] = reflect.TypeOf((*HostNotReachable)(nil)).Elem()
    +}
    +
    +type HostNotReachableFault HostNotReachable
    +
    +func init() {
    +	t["HostNotReachableFault"] = reflect.TypeOf((*HostNotReachableFault)(nil)).Elem()
    +}
    +
    +type HostNtpConfig struct {
    +	DynamicData
    +
    +	Server     []string `xml:"server,omitempty"`
    +	ConfigFile []string `xml:"configFile,omitempty"`
    +}
    +
    +func init() {
    +	t["HostNtpConfig"] = reflect.TypeOf((*HostNtpConfig)(nil)).Elem()
    +}
    +
    +type HostNumaInfo struct {
    +	DynamicData
    +
    +	Type     string         `xml:"type"`
    +	NumNodes int32          `xml:"numNodes"`
    +	NumaNode []HostNumaNode `xml:"numaNode,omitempty"`
    +}
    +
    +func init() {
    +	t["HostNumaInfo"] = reflect.TypeOf((*HostNumaInfo)(nil)).Elem()
    +}
    +
    +type HostNumaNode struct {
    +	DynamicData
    +
    +	TypeId            byte     `xml:"typeId"`
    +	CpuID             []int16  `xml:"cpuID"`
    +	MemoryRangeBegin  int64    `xml:"memoryRangeBegin"`
    +	MemoryRangeLength int64    `xml:"memoryRangeLength"`
    +	PciId             []string `xml:"pciId,omitempty"`
    +}
    +
    +func init() {
    +	t["HostNumaNode"] = reflect.TypeOf((*HostNumaNode)(nil)).Elem()
    +}
    +
    +type HostNumericSensorInfo struct {
    +	DynamicData
    +
    +	Name           string                 `xml:"name"`
    +	HealthState    BaseElementDescription `xml:"healthState,omitempty,typeattr"`
    +	CurrentReading int64                  `xml:"currentReading"`
    +	UnitModifier   int32                  `xml:"unitModifier"`
    +	BaseUnits      string                 `xml:"baseUnits"`
    +	RateUnits      string                 `xml:"rateUnits,omitempty"`
    +	SensorType     string                 `xml:"sensorType"`
    +	Id             string                 `xml:"id,omitempty"`
    +	TimeStamp      string                 `xml:"timeStamp,omitempty"`
    +}
    +
    +func init() {
    +	t["HostNumericSensorInfo"] = reflect.TypeOf((*HostNumericSensorInfo)(nil)).Elem()
    +}
    +
    +type HostOpaqueNetworkInfo struct {
    +	DynamicData
    +
    +	OpaqueNetworkId   string                   `xml:"opaqueNetworkId"`
    +	OpaqueNetworkName string                   `xml:"opaqueNetworkName"`
    +	OpaqueNetworkType string                   `xml:"opaqueNetworkType"`
    +	PnicZone          []string                 `xml:"pnicZone,omitempty"`
    +	Capability        *OpaqueNetworkCapability `xml:"capability,omitempty"`
    +	ExtraConfig       []BaseOptionValue        `xml:"extraConfig,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["HostOpaqueNetworkInfo"] = reflect.TypeOf((*HostOpaqueNetworkInfo)(nil)).Elem()
    +}
    +
    +type HostOpaqueSwitch struct {
    +	DynamicData
    +
    +	Key               string                            `xml:"key"`
    +	Name              string                            `xml:"name,omitempty"`
    +	Pnic              []string                          `xml:"pnic,omitempty"`
    +	PnicZone          []HostOpaqueSwitchPhysicalNicZone `xml:"pnicZone,omitempty"`
    +	Status            string                            `xml:"status,omitempty"`
    +	Vtep              []HostVirtualNic                  `xml:"vtep,omitempty"`
    +	ExtraConfig       []BaseOptionValue                 `xml:"extraConfig,omitempty,typeattr"`
    +	FeatureCapability []HostFeatureCapability           `xml:"featureCapability,omitempty"`
    +}
    +
    +func init() {
    +	t["HostOpaqueSwitch"] = reflect.TypeOf((*HostOpaqueSwitch)(nil)).Elem()
    +}
    +
    +type HostOpaqueSwitchPhysicalNicZone struct {
    +	DynamicData
    +
    +	Key        string   `xml:"key"`
    +	PnicDevice []string `xml:"pnicDevice,omitempty"`
    +}
    +
    +func init() {
    +	t["HostOpaqueSwitchPhysicalNicZone"] = reflect.TypeOf((*HostOpaqueSwitchPhysicalNicZone)(nil)).Elem()
    +}
    +
    +type HostOvercommittedEvent struct {
    +	ClusterOvercommittedEvent
    +}
    +
    +func init() {
    +	t["HostOvercommittedEvent"] = reflect.TypeOf((*HostOvercommittedEvent)(nil)).Elem()
    +}
    +
    +type HostPMemVolume struct {
    +	HostFileSystemVolume
    +
    +	Uuid    string `xml:"uuid"`
    +	Version string `xml:"version"`
    +}
    +
    +func init() {
    +	t["HostPMemVolume"] = reflect.TypeOf((*HostPMemVolume)(nil)).Elem()
    +}
    +
    +type HostParallelScsiHba struct {
    +	HostHostBusAdapter
    +}
    +
    +func init() {
    +	t["HostParallelScsiHba"] = reflect.TypeOf((*HostParallelScsiHba)(nil)).Elem()
    +}
    +
    +type HostParallelScsiTargetTransport struct {
    +	HostTargetTransport
    +}
    +
    +func init() {
    +	t["HostParallelScsiTargetTransport"] = reflect.TypeOf((*HostParallelScsiTargetTransport)(nil)).Elem()
    +}
    +
    +type HostPatchManagerLocator struct {
    +	DynamicData
    +
    +	Url   string `xml:"url"`
    +	Proxy string `xml:"proxy,omitempty"`
    +}
    +
    +func init() {
    +	t["HostPatchManagerLocator"] = reflect.TypeOf((*HostPatchManagerLocator)(nil)).Elem()
    +}
    +
    +type HostPatchManagerPatchManagerOperationSpec struct {
    +	DynamicData
    +
    +	Proxy     string `xml:"proxy,omitempty"`
    +	Port      int32  `xml:"port,omitempty"`
    +	UserName  string `xml:"userName,omitempty"`
    +	Password  string `xml:"password,omitempty"`
    +	CmdOption string `xml:"cmdOption,omitempty"`
    +}
    +
    +func init() {
    +	t["HostPatchManagerPatchManagerOperationSpec"] = reflect.TypeOf((*HostPatchManagerPatchManagerOperationSpec)(nil)).Elem()
    +}
    +
    +type HostPatchManagerResult struct {
    +	DynamicData
    +
    +	Version   string                   `xml:"version"`
    +	Status    []HostPatchManagerStatus `xml:"status,omitempty"`
    +	XmlResult string                   `xml:"xmlResult,omitempty"`
    +}
    +
    +func init() {
    +	t["HostPatchManagerResult"] = reflect.TypeOf((*HostPatchManagerResult)(nil)).Elem()
    +}
    +
    +type HostPatchManagerStatus struct {
    +	DynamicData
    +
    +	Id                 string                                    `xml:"id"`
    +	Applicable         bool                                      `xml:"applicable"`
    +	Reason             []string                                  `xml:"reason,omitempty"`
    +	Integrity          string                                    `xml:"integrity,omitempty"`
    +	Installed          bool                                      `xml:"installed"`
    +	InstallState       []string                                  `xml:"installState,omitempty"`
    +	PrerequisitePatch  []HostPatchManagerStatusPrerequisitePatch `xml:"prerequisitePatch,omitempty"`
    +	RestartRequired    bool                                      `xml:"restartRequired"`
    +	ReconnectRequired  bool                                      `xml:"reconnectRequired"`
    +	VmOffRequired      bool                                      `xml:"vmOffRequired"`
    +	SupersededPatchIds []string                                  `xml:"supersededPatchIds,omitempty"`
    +}
    +
    +func init() {
    +	t["HostPatchManagerStatus"] = reflect.TypeOf((*HostPatchManagerStatus)(nil)).Elem()
    +}
    +
    +type HostPatchManagerStatusPrerequisitePatch struct {
    +	DynamicData
    +
    +	Id           string   `xml:"id"`
    +	InstallState []string `xml:"installState,omitempty"`
    +}
    +
    +func init() {
    +	t["HostPatchManagerStatusPrerequisitePatch"] = reflect.TypeOf((*HostPatchManagerStatusPrerequisitePatch)(nil)).Elem()
    +}
    +
    +type HostPathSelectionPolicyOption struct {
    +	DynamicData
    +
    +	Policy BaseElementDescription `xml:"policy,typeattr"`
    +}
    +
    +func init() {
    +	t["HostPathSelectionPolicyOption"] = reflect.TypeOf((*HostPathSelectionPolicyOption)(nil)).Elem()
    +}
    +
    +type HostPciDevice struct {
    +	DynamicData
    +
    +	Id           string `xml:"id"`
    +	ClassId      int16  `xml:"classId"`
    +	Bus          byte   `xml:"bus"`
    +	Slot         byte   `xml:"slot"`
    +	Function     byte   `xml:"function"`
    +	VendorId     int16  `xml:"vendorId"`
    +	SubVendorId  int16  `xml:"subVendorId"`
    +	VendorName   string `xml:"vendorName"`
    +	DeviceId     int16  `xml:"deviceId"`
    +	SubDeviceId  int16  `xml:"subDeviceId"`
    +	ParentBridge string `xml:"parentBridge,omitempty"`
    +	DeviceName   string `xml:"deviceName"`
    +}
    +
    +func init() {
    +	t["HostPciDevice"] = reflect.TypeOf((*HostPciDevice)(nil)).Elem()
    +}
    +
    +type HostPciPassthruConfig struct {
    +	DynamicData
    +
    +	Id              string `xml:"id"`
    +	PassthruEnabled bool   `xml:"passthruEnabled"`
    +}
    +
    +func init() {
    +	t["HostPciPassthruConfig"] = reflect.TypeOf((*HostPciPassthruConfig)(nil)).Elem()
    +}
    +
    +type HostPciPassthruInfo struct {
    +	DynamicData
    +
    +	Id              string `xml:"id"`
    +	DependentDevice string `xml:"dependentDevice"`
    +	PassthruEnabled bool   `xml:"passthruEnabled"`
    +	PassthruCapable bool   `xml:"passthruCapable"`
    +	PassthruActive  bool   `xml:"passthruActive"`
    +}
    +
    +func init() {
    +	t["HostPciPassthruInfo"] = reflect.TypeOf((*HostPciPassthruInfo)(nil)).Elem()
    +}
    +
    +type HostPersistentMemoryInfo struct {
    +	DynamicData
    +
    +	CapacityInMB int64  `xml:"capacityInMB,omitempty"`
    +	VolumeUUID   string `xml:"volumeUUID,omitempty"`
    +}
    +
    +func init() {
    +	t["HostPersistentMemoryInfo"] = reflect.TypeOf((*HostPersistentMemoryInfo)(nil)).Elem()
    +}
    +
    +type HostPlacedVirtualNicIdentifier struct {
    +	DynamicData
    +
    +	Vm          ManagedObjectReference `xml:"vm"`
    +	VnicKey     string                 `xml:"vnicKey"`
    +	Reservation *int32                 `xml:"reservation"`
    +}
    +
    +func init() {
    +	t["HostPlacedVirtualNicIdentifier"] = reflect.TypeOf((*HostPlacedVirtualNicIdentifier)(nil)).Elem()
    +}
    +
    +type HostPlugStoreTopology struct {
    +	DynamicData
    +
    +	Adapter []HostPlugStoreTopologyAdapter `xml:"adapter,omitempty"`
    +	Path    []HostPlugStoreTopologyPath    `xml:"path,omitempty"`
    +	Target  []HostPlugStoreTopologyTarget  `xml:"target,omitempty"`
    +	Device  []HostPlugStoreTopologyDevice  `xml:"device,omitempty"`
    +	Plugin  []HostPlugStoreTopologyPlugin  `xml:"plugin,omitempty"`
    +}
    +
    +func init() {
    +	t["HostPlugStoreTopology"] = reflect.TypeOf((*HostPlugStoreTopology)(nil)).Elem()
    +}
    +
    +type HostPlugStoreTopologyAdapter struct {
    +	DynamicData
    +
    +	Key     string   `xml:"key"`
    +	Adapter string   `xml:"adapter"`
    +	Path    []string `xml:"path,omitempty"`
    +}
    +
    +func init() {
    +	t["HostPlugStoreTopologyAdapter"] = reflect.TypeOf((*HostPlugStoreTopologyAdapter)(nil)).Elem()
    +}
    +
    +type HostPlugStoreTopologyDevice struct {
    +	DynamicData
    +
    +	Key  string   `xml:"key"`
    +	Lun  string   `xml:"lun"`
    +	Path []string `xml:"path,omitempty"`
    +}
    +
    +func init() {
    +	t["HostPlugStoreTopologyDevice"] = reflect.TypeOf((*HostPlugStoreTopologyDevice)(nil)).Elem()
    +}
    +
    +type HostPlugStoreTopologyPath struct {
    +	DynamicData
    +
    +	Key           string `xml:"key"`
    +	Name          string `xml:"name"`
    +	ChannelNumber int32  `xml:"channelNumber,omitempty"`
    +	TargetNumber  int32  `xml:"targetNumber,omitempty"`
    +	LunNumber     int32  `xml:"lunNumber,omitempty"`
    +	Adapter       string `xml:"adapter,omitempty"`
    +	Target        string `xml:"target,omitempty"`
    +	Device        string `xml:"device,omitempty"`
    +}
    +
    +func init() {
    +	t["HostPlugStoreTopologyPath"] = reflect.TypeOf((*HostPlugStoreTopologyPath)(nil)).Elem()
    +}
    +
    +type HostPlugStoreTopologyPlugin struct {
    +	DynamicData
    +
    +	Key         string   `xml:"key"`
    +	Name        string   `xml:"name"`
    +	Device      []string `xml:"device,omitempty"`
    +	ClaimedPath []string `xml:"claimedPath,omitempty"`
    +}
    +
    +func init() {
    +	t["HostPlugStoreTopologyPlugin"] = reflect.TypeOf((*HostPlugStoreTopologyPlugin)(nil)).Elem()
    +}
    +
    +type HostPlugStoreTopologyTarget struct {
    +	DynamicData
    +
    +	Key       string                  `xml:"key"`
    +	Transport BaseHostTargetTransport `xml:"transport,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["HostPlugStoreTopologyTarget"] = reflect.TypeOf((*HostPlugStoreTopologyTarget)(nil)).Elem()
    +}
    +
    +type HostPnicNetworkResourceInfo struct {
    +	DynamicData
    +
    +	PnicDevice                     string                           `xml:"pnicDevice"`
    +	AvailableBandwidthForVMTraffic int64                            `xml:"availableBandwidthForVMTraffic,omitempty"`
    +	UnusedBandwidthForVMTraffic    int64                            `xml:"unusedBandwidthForVMTraffic,omitempty"`
    +	PlacedVirtualNics              []HostPlacedVirtualNicIdentifier `xml:"placedVirtualNics,omitempty"`
    +}
    +
    +func init() {
    +	t["HostPnicNetworkResourceInfo"] = reflect.TypeOf((*HostPnicNetworkResourceInfo)(nil)).Elem()
    +}
    +
    +type HostPortGroup struct {
    +	DynamicData
    +
    +	Key            string              `xml:"key,omitempty"`
    +	Port           []HostPortGroupPort `xml:"port,omitempty"`
    +	Vswitch        string              `xml:"vswitch,omitempty"`
    +	ComputedPolicy HostNetworkPolicy   `xml:"computedPolicy"`
    +	Spec           HostPortGroupSpec   `xml:"spec"`
    +}
    +
    +func init() {
    +	t["HostPortGroup"] = reflect.TypeOf((*HostPortGroup)(nil)).Elem()
    +}
    +
    +type HostPortGroupConfig struct {
    +	DynamicData
    +
    +	ChangeOperation string             `xml:"changeOperation,omitempty"`
    +	Spec            *HostPortGroupSpec `xml:"spec,omitempty"`
    +}
    +
    +func init() {
    +	t["HostPortGroupConfig"] = reflect.TypeOf((*HostPortGroupConfig)(nil)).Elem()
    +}
    +
    +type HostPortGroupPort struct {
    +	DynamicData
    +
    +	Key  string   `xml:"key,omitempty"`
    +	Mac  []string `xml:"mac,omitempty"`
    +	Type string   `xml:"type"`
    +}
    +
    +func init() {
    +	t["HostPortGroupPort"] = reflect.TypeOf((*HostPortGroupPort)(nil)).Elem()
    +}
    +
    +type HostPortGroupProfile struct {
    +	PortGroupProfile
    +
    +	IpConfig IpAddressProfile `xml:"ipConfig"`
    +}
    +
    +func init() {
    +	t["HostPortGroupProfile"] = reflect.TypeOf((*HostPortGroupProfile)(nil)).Elem()
    +}
    +
    +type HostPortGroupSpec struct {
    +	DynamicData
    +
    +	Name        string            `xml:"name"`
    +	VlanId      int32             `xml:"vlanId"`
    +	VswitchName string            `xml:"vswitchName"`
    +	Policy      HostNetworkPolicy `xml:"policy"`
    +}
    +
    +func init() {
    +	t["HostPortGroupSpec"] = reflect.TypeOf((*HostPortGroupSpec)(nil)).Elem()
    +}
    +
    +type HostPosixAccountSpec struct {
    +	HostAccountSpec
    +
    +	PosixId     int32 `xml:"posixId,omitempty"`
    +	ShellAccess *bool `xml:"shellAccess"`
    +}
    +
    +func init() {
    +	t["HostPosixAccountSpec"] = reflect.TypeOf((*HostPosixAccountSpec)(nil)).Elem()
    +}
    +
    +type HostPowerOpFailed struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["HostPowerOpFailed"] = reflect.TypeOf((*HostPowerOpFailed)(nil)).Elem()
    +}
    +
    +type HostPowerOpFailedFault BaseHostPowerOpFailed
    +
    +func init() {
    +	t["HostPowerOpFailedFault"] = reflect.TypeOf((*HostPowerOpFailedFault)(nil)).Elem()
    +}
    +
    +type HostPowerPolicy struct {
    +	DynamicData
    +
    +	Key         int32  `xml:"key"`
    +	Name        string `xml:"name"`
    +	ShortName   string `xml:"shortName"`
    +	Description string `xml:"description"`
    +}
    +
    +func init() {
    +	t["HostPowerPolicy"] = reflect.TypeOf((*HostPowerPolicy)(nil)).Elem()
    +}
    +
    +type HostPrimaryAgentNotShortNameEvent struct {
    +	HostDasEvent
    +
    +	PrimaryAgent string `xml:"primaryAgent"`
    +}
    +
    +func init() {
    +	t["HostPrimaryAgentNotShortNameEvent"] = reflect.TypeOf((*HostPrimaryAgentNotShortNameEvent)(nil)).Elem()
    +}
    +
    +type HostProfileAppliedEvent struct {
    +	HostEvent
    +
    +	Profile ProfileEventArgument `xml:"profile"`
    +}
    +
    +func init() {
    +	t["HostProfileAppliedEvent"] = reflect.TypeOf((*HostProfileAppliedEvent)(nil)).Elem()
    +}
    +
    +type HostProfileCompleteConfigSpec struct {
    +	HostProfileConfigSpec
    +
    +	ApplyProfile                  *HostApplyProfile       `xml:"applyProfile,omitempty"`
    +	CustomComplyProfile           *ComplianceProfile      `xml:"customComplyProfile,omitempty"`
    +	DisabledExpressionListChanged bool                    `xml:"disabledExpressionListChanged"`
    +	DisabledExpressionList        []string                `xml:"disabledExpressionList,omitempty"`
    +	ValidatorHost                 *ManagedObjectReference `xml:"validatorHost,omitempty"`
    +	Validating                    *bool                   `xml:"validating"`
    +	HostConfig                    *HostProfileConfigInfo  `xml:"hostConfig,omitempty"`
    +}
    +
    +func init() {
    +	t["HostProfileCompleteConfigSpec"] = reflect.TypeOf((*HostProfileCompleteConfigSpec)(nil)).Elem()
    +}
    +
    +type HostProfileConfigInfo struct {
    +	ProfileConfigInfo
    +
    +	ApplyProfile           *HostApplyProfile   `xml:"applyProfile,omitempty"`
    +	DefaultComplyProfile   *ComplianceProfile  `xml:"defaultComplyProfile,omitempty"`
    +	DefaultComplyLocator   []ComplianceLocator `xml:"defaultComplyLocator,omitempty"`
    +	CustomComplyProfile    *ComplianceProfile  `xml:"customComplyProfile,omitempty"`
    +	DisabledExpressionList []string            `xml:"disabledExpressionList,omitempty"`
    +	Description            *ProfileDescription `xml:"description,omitempty"`
    +}
    +
    +func init() {
    +	t["HostProfileConfigInfo"] = reflect.TypeOf((*HostProfileConfigInfo)(nil)).Elem()
    +}
    +
    +type HostProfileConfigSpec struct {
    +	ProfileCreateSpec
    +}
    +
    +func init() {
    +	t["HostProfileConfigSpec"] = reflect.TypeOf((*HostProfileConfigSpec)(nil)).Elem()
    +}
    +
    +type HostProfileHostBasedConfigSpec struct {
    +	HostProfileConfigSpec
    +
    +	Host                 ManagedObjectReference `xml:"host"`
    +	UseHostProfileEngine *bool                  `xml:"useHostProfileEngine"`
    +}
    +
    +func init() {
    +	t["HostProfileHostBasedConfigSpec"] = reflect.TypeOf((*HostProfileHostBasedConfigSpec)(nil)).Elem()
    +}
    +
    +type HostProfileManagerCompositionResult struct {
    +	DynamicData
    +
    +	Errors  []LocalizableMessage                               `xml:"errors,omitempty"`
    +	Results []HostProfileManagerCompositionResultResultElement `xml:"results,omitempty"`
    +}
    +
    +func init() {
    +	t["HostProfileManagerCompositionResult"] = reflect.TypeOf((*HostProfileManagerCompositionResult)(nil)).Elem()
    +}
    +
    +type HostProfileManagerCompositionResultResultElement struct {
    +	DynamicData
    +
    +	Target ManagedObjectReference `xml:"target"`
    +	Status string                 `xml:"status"`
    +	Errors []LocalizableMessage   `xml:"errors,omitempty"`
    +}
    +
    +func init() {
    +	t["HostProfileManagerCompositionResultResultElement"] = reflect.TypeOf((*HostProfileManagerCompositionResultResultElement)(nil)).Elem()
    +}
    +
    +type HostProfileManagerCompositionValidationResult struct {
    +	DynamicData
    +
    +	Results []HostProfileManagerCompositionValidationResultResultElement `xml:"results,omitempty"`
    +	Errors  []LocalizableMessage                                         `xml:"errors,omitempty"`
    +}
    +
    +func init() {
    +	t["HostProfileManagerCompositionValidationResult"] = reflect.TypeOf((*HostProfileManagerCompositionValidationResult)(nil)).Elem()
    +}
    +
    +type HostProfileManagerCompositionValidationResultResultElement struct {
    +	DynamicData
    +
    +	Target                  ManagedObjectReference `xml:"target"`
    +	Status                  string                 `xml:"status"`
    +	Errors                  []LocalizableMessage   `xml:"errors,omitempty"`
    +	SourceDiffForToBeMerged *HostApplyProfile      `xml:"sourceDiffForToBeMerged,omitempty"`
    +	TargetDiffForToBeMerged *HostApplyProfile      `xml:"targetDiffForToBeMerged,omitempty"`
    +	ToBeAdded               *HostApplyProfile      `xml:"toBeAdded,omitempty"`
    +	ToBeDeleted             *HostApplyProfile      `xml:"toBeDeleted,omitempty"`
    +	ToBeDisabled            *HostApplyProfile      `xml:"toBeDisabled,omitempty"`
    +	ToBeEnabled             *HostApplyProfile      `xml:"toBeEnabled,omitempty"`
    +	ToBeReenableCC          *HostApplyProfile      `xml:"toBeReenableCC,omitempty"`
    +}
    +
    +func init() {
    +	t["HostProfileManagerCompositionValidationResultResultElement"] = reflect.TypeOf((*HostProfileManagerCompositionValidationResultResultElement)(nil)).Elem()
    +}
    +
    +type HostProfileManagerConfigTaskList struct {
    +	DynamicData
    +
    +	ConfigSpec          *HostConfigSpec      `xml:"configSpec,omitempty"`
    +	TaskDescription     []LocalizableMessage `xml:"taskDescription,omitempty"`
    +	TaskListRequirement []string             `xml:"taskListRequirement,omitempty"`
    +}
    +
    +func init() {
    +	t["HostProfileManagerConfigTaskList"] = reflect.TypeOf((*HostProfileManagerConfigTaskList)(nil)).Elem()
    +}
    +
    +type HostProfileManagerHostToConfigSpecMap struct {
    +	DynamicData
    +
    +	Host       ManagedObjectReference   `xml:"host"`
    +	ConfigSpec BaseAnswerFileCreateSpec `xml:"configSpec,typeattr"`
    +}
    +
    +func init() {
    +	t["HostProfileManagerHostToConfigSpecMap"] = reflect.TypeOf((*HostProfileManagerHostToConfigSpecMap)(nil)).Elem()
    +}
    +
    +type HostProfileResetValidationState HostProfileResetValidationStateRequestType
    +
    +func init() {
    +	t["HostProfileResetValidationState"] = reflect.TypeOf((*HostProfileResetValidationState)(nil)).Elem()
    +}
    +
    +type HostProfileResetValidationStateRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["HostProfileResetValidationStateRequestType"] = reflect.TypeOf((*HostProfileResetValidationStateRequestType)(nil)).Elem()
    +}
    +
    +type HostProfileResetValidationStateResponse struct {
    +}
    +
    +type HostProfileSerializedHostProfileSpec struct {
    +	ProfileSerializedCreateSpec
    +
    +	ValidatorHost *ManagedObjectReference `xml:"validatorHost,omitempty"`
    +	Validating    *bool                   `xml:"validating"`
    +}
    +
    +func init() {
    +	t["HostProfileSerializedHostProfileSpec"] = reflect.TypeOf((*HostProfileSerializedHostProfileSpec)(nil)).Elem()
    +}
    +
    +type HostProfileValidationFailureInfo struct {
    +	DynamicData
    +
    +	Name         string                             `xml:"name"`
    +	Annotation   string                             `xml:"annotation"`
    +	UpdateType   string                             `xml:"updateType"`
    +	Host         *ManagedObjectReference            `xml:"host,omitempty"`
    +	ApplyProfile *HostApplyProfile                  `xml:"applyProfile,omitempty"`
    +	Failures     []ProfileUpdateFailedUpdateFailure `xml:"failures,omitempty"`
    +	Faults       []LocalizedMethodFault             `xml:"faults,omitempty"`
    +}
    +
    +func init() {
    +	t["HostProfileValidationFailureInfo"] = reflect.TypeOf((*HostProfileValidationFailureInfo)(nil)).Elem()
    +}
    +
    +type HostProfilesEntityCustomizations struct {
    +	DynamicData
    +}
    +
    +func init() {
    +	t["HostProfilesEntityCustomizations"] = reflect.TypeOf((*HostProfilesEntityCustomizations)(nil)).Elem()
    +}
    +
    +type HostProtocolEndpoint struct {
    +	DynamicData
    +
    +	PeType            string                   `xml:"peType"`
    +	Type              string                   `xml:"type,omitempty"`
    +	Uuid              string                   `xml:"uuid"`
    +	HostKey           []ManagedObjectReference `xml:"hostKey,omitempty"`
    +	StorageArray      string                   `xml:"storageArray,omitempty"`
    +	NfsServer         string                   `xml:"nfsServer,omitempty"`
    +	NfsDir            string                   `xml:"nfsDir,omitempty"`
    +	NfsServerScope    string                   `xml:"nfsServerScope,omitempty"`
    +	NfsServerMajor    string                   `xml:"nfsServerMajor,omitempty"`
    +	NfsServerAuthType string                   `xml:"nfsServerAuthType,omitempty"`
    +	NfsServerUser     string                   `xml:"nfsServerUser,omitempty"`
    +	DeviceId          string                   `xml:"deviceId,omitempty"`
    +}
    +
    +func init() {
    +	t["HostProtocolEndpoint"] = reflect.TypeOf((*HostProtocolEndpoint)(nil)).Elem()
    +}
    +
    +type HostProxySwitch struct {
    +	DynamicData
    +
    +	DvsUuid                     string                         `xml:"dvsUuid"`
    +	DvsName                     string                         `xml:"dvsName"`
    +	Key                         string                         `xml:"key"`
    +	NumPorts                    int32                          `xml:"numPorts"`
    +	ConfigNumPorts              int32                          `xml:"configNumPorts,omitempty"`
    +	NumPortsAvailable           int32                          `xml:"numPortsAvailable"`
    +	UplinkPort                  []KeyValue                     `xml:"uplinkPort,omitempty"`
    +	Mtu                         int32                          `xml:"mtu,omitempty"`
    +	Pnic                        []string                       `xml:"pnic,omitempty"`
    +	Spec                        HostProxySwitchSpec            `xml:"spec"`
    +	HostLag                     []HostProxySwitchHostLagConfig `xml:"hostLag,omitempty"`
    +	NetworkReservationSupported *bool                          `xml:"networkReservationSupported"`
    +}
    +
    +func init() {
    +	t["HostProxySwitch"] = reflect.TypeOf((*HostProxySwitch)(nil)).Elem()
    +}
    +
    +type HostProxySwitchConfig struct {
    +	DynamicData
    +
    +	ChangeOperation string               `xml:"changeOperation,omitempty"`
    +	Uuid            string               `xml:"uuid"`
    +	Spec            *HostProxySwitchSpec `xml:"spec,omitempty"`
    +}
    +
    +func init() {
    +	t["HostProxySwitchConfig"] = reflect.TypeOf((*HostProxySwitchConfig)(nil)).Elem()
    +}
    +
    +type HostProxySwitchHostLagConfig struct {
    +	DynamicData
    +
    +	LagKey     string     `xml:"lagKey"`
    +	LagName    string     `xml:"lagName,omitempty"`
    +	UplinkPort []KeyValue `xml:"uplinkPort,omitempty"`
    +}
    +
    +func init() {
    +	t["HostProxySwitchHostLagConfig"] = reflect.TypeOf((*HostProxySwitchHostLagConfig)(nil)).Elem()
    +}
    +
    +type HostProxySwitchSpec struct {
    +	DynamicData
    +
    +	Backing BaseDistributedVirtualSwitchHostMemberBacking `xml:"backing,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["HostProxySwitchSpec"] = reflect.TypeOf((*HostProxySwitchSpec)(nil)).Elem()
    +}
    +
    +type HostReconcileDatastoreInventoryRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	Datastore ManagedObjectReference `xml:"datastore"`
    +}
    +
    +func init() {
    +	t["HostReconcileDatastoreInventoryRequestType"] = reflect.TypeOf((*HostReconcileDatastoreInventoryRequestType)(nil)).Elem()
    +}
    +
    +type HostReconcileDatastoreInventory_Task HostReconcileDatastoreInventoryRequestType
    +
    +func init() {
    +	t["HostReconcileDatastoreInventory_Task"] = reflect.TypeOf((*HostReconcileDatastoreInventory_Task)(nil)).Elem()
    +}
    +
    +type HostReconcileDatastoreInventory_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type HostReconnectionFailedEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["HostReconnectionFailedEvent"] = reflect.TypeOf((*HostReconnectionFailedEvent)(nil)).Elem()
    +}
    +
    +type HostRegisterDisk HostRegisterDiskRequestType
    +
    +func init() {
    +	t["HostRegisterDisk"] = reflect.TypeOf((*HostRegisterDisk)(nil)).Elem()
    +}
    +
    +type HostRegisterDiskRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Path string                 `xml:"path"`
    +	Name string                 `xml:"name,omitempty"`
    +}
    +
    +func init() {
    +	t["HostRegisterDiskRequestType"] = reflect.TypeOf((*HostRegisterDiskRequestType)(nil)).Elem()
    +}
    +
    +type HostRegisterDiskResponse struct {
    +	Returnval VStorageObject `xml:"returnval"`
    +}
    +
    +type HostReliableMemoryInfo struct {
    +	DynamicData
    +
    +	MemorySize int64 `xml:"memorySize"`
    +}
    +
    +func init() {
    +	t["HostReliableMemoryInfo"] = reflect.TypeOf((*HostReliableMemoryInfo)(nil)).Elem()
    +}
    +
    +type HostRelocateVStorageObjectRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	Id        ID                     `xml:"id"`
    +	Datastore ManagedObjectReference `xml:"datastore"`
    +	Spec      VslmRelocateSpec       `xml:"spec"`
    +}
    +
    +func init() {
    +	t["HostRelocateVStorageObjectRequestType"] = reflect.TypeOf((*HostRelocateVStorageObjectRequestType)(nil)).Elem()
    +}
    +
    +type HostRelocateVStorageObject_Task HostRelocateVStorageObjectRequestType
    +
    +func init() {
    +	t["HostRelocateVStorageObject_Task"] = reflect.TypeOf((*HostRelocateVStorageObject_Task)(nil)).Elem()
    +}
    +
    +type HostRelocateVStorageObject_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type HostRemoveVFlashResource HostRemoveVFlashResourceRequestType
    +
    +func init() {
    +	t["HostRemoveVFlashResource"] = reflect.TypeOf((*HostRemoveVFlashResource)(nil)).Elem()
    +}
    +
    +type HostRemoveVFlashResourceRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["HostRemoveVFlashResourceRequestType"] = reflect.TypeOf((*HostRemoveVFlashResourceRequestType)(nil)).Elem()
    +}
    +
    +type HostRemoveVFlashResourceResponse struct {
    +}
    +
    +type HostRemovedEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["HostRemovedEvent"] = reflect.TypeOf((*HostRemovedEvent)(nil)).Elem()
    +}
    +
    +type HostRenameVStorageObject HostRenameVStorageObjectRequestType
    +
    +func init() {
    +	t["HostRenameVStorageObject"] = reflect.TypeOf((*HostRenameVStorageObject)(nil)).Elem()
    +}
    +
    +type HostRenameVStorageObjectRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	Id        ID                     `xml:"id"`
    +	Datastore ManagedObjectReference `xml:"datastore"`
    +	Name      string                 `xml:"name"`
    +}
    +
    +func init() {
    +	t["HostRenameVStorageObjectRequestType"] = reflect.TypeOf((*HostRenameVStorageObjectRequestType)(nil)).Elem()
    +}
    +
    +type HostRenameVStorageObjectResponse struct {
    +}
    +
    +type HostResignatureRescanResult struct {
    +	DynamicData
    +
    +	Rescan []HostVmfsRescanResult `xml:"rescan,omitempty"`
    +	Result ManagedObjectReference `xml:"result"`
    +}
    +
    +func init() {
    +	t["HostResignatureRescanResult"] = reflect.TypeOf((*HostResignatureRescanResult)(nil)).Elem()
    +}
    +
    +type HostRetrieveVStorageInfrastructureObjectPolicy HostRetrieveVStorageInfrastructureObjectPolicyRequestType
    +
    +func init() {
    +	t["HostRetrieveVStorageInfrastructureObjectPolicy"] = reflect.TypeOf((*HostRetrieveVStorageInfrastructureObjectPolicy)(nil)).Elem()
    +}
    +
    +type HostRetrieveVStorageInfrastructureObjectPolicyRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	Datastore ManagedObjectReference `xml:"datastore"`
    +}
    +
    +func init() {
    +	t["HostRetrieveVStorageInfrastructureObjectPolicyRequestType"] = reflect.TypeOf((*HostRetrieveVStorageInfrastructureObjectPolicyRequestType)(nil)).Elem()
    +}
    +
    +type HostRetrieveVStorageInfrastructureObjectPolicyResponse struct {
    +	Returnval []VslmInfrastructureObjectPolicy `xml:"returnval,omitempty"`
    +}
    +
    +type HostRetrieveVStorageObject HostRetrieveVStorageObjectRequestType
    +
    +func init() {
    +	t["HostRetrieveVStorageObject"] = reflect.TypeOf((*HostRetrieveVStorageObject)(nil)).Elem()
    +}
    +
    +type HostRetrieveVStorageObjectRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	Id        ID                     `xml:"id"`
    +	Datastore ManagedObjectReference `xml:"datastore"`
    +}
    +
    +func init() {
    +	t["HostRetrieveVStorageObjectRequestType"] = reflect.TypeOf((*HostRetrieveVStorageObjectRequestType)(nil)).Elem()
    +}
    +
    +type HostRetrieveVStorageObjectResponse struct {
    +	Returnval VStorageObject `xml:"returnval"`
    +}
    +
    +type HostRetrieveVStorageObjectState HostRetrieveVStorageObjectStateRequestType
    +
    +func init() {
    +	t["HostRetrieveVStorageObjectState"] = reflect.TypeOf((*HostRetrieveVStorageObjectState)(nil)).Elem()
    +}
    +
    +type HostRetrieveVStorageObjectStateRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	Id        ID                     `xml:"id"`
    +	Datastore ManagedObjectReference `xml:"datastore"`
    +}
    +
    +func init() {
    +	t["HostRetrieveVStorageObjectStateRequestType"] = reflect.TypeOf((*HostRetrieveVStorageObjectStateRequestType)(nil)).Elem()
    +}
    +
    +type HostRetrieveVStorageObjectStateResponse struct {
    +	Returnval VStorageObjectStateInfo `xml:"returnval"`
    +}
    +
    +type HostRuntimeInfo struct {
    +	DynamicData
    +
    +	ConnectionState            HostSystemConnectionState                   `xml:"connectionState"`
    +	PowerState                 HostSystemPowerState                        `xml:"powerState"`
    +	StandbyMode                string                                      `xml:"standbyMode,omitempty"`
    +	InMaintenanceMode          bool                                        `xml:"inMaintenanceMode"`
    +	InQuarantineMode           *bool                                       `xml:"inQuarantineMode"`
    +	BootTime                   *time.Time                                  `xml:"bootTime"`
    +	HealthSystemRuntime        *HealthSystemRuntime                        `xml:"healthSystemRuntime,omitempty"`
    +	DasHostState               *ClusterDasFdmHostState                     `xml:"dasHostState,omitempty"`
    +	TpmPcrValues               []HostTpmDigestInfo                         `xml:"tpmPcrValues,omitempty"`
    +	VsanRuntimeInfo            *VsanHostRuntimeInfo                        `xml:"vsanRuntimeInfo,omitempty"`
    +	NetworkRuntimeInfo         *HostRuntimeInfoNetworkRuntimeInfo          `xml:"networkRuntimeInfo,omitempty"`
    +	VFlashResourceRuntimeInfo  *HostVFlashManagerVFlashResourceRunTimeInfo `xml:"vFlashResourceRuntimeInfo,omitempty"`
    +	HostMaxVirtualDiskCapacity int64                                       `xml:"hostMaxVirtualDiskCapacity,omitempty"`
    +	CryptoState                string                                      `xml:"cryptoState,omitempty"`
    +	CryptoKeyId                *CryptoKeyId                                `xml:"cryptoKeyId,omitempty"`
    +}
    +
    +func init() {
    +	t["HostRuntimeInfo"] = reflect.TypeOf((*HostRuntimeInfo)(nil)).Elem()
    +}
    +
    +type HostRuntimeInfoNetStackInstanceRuntimeInfo struct {
    +	DynamicData
    +
    +	NetStackInstanceKey    string   `xml:"netStackInstanceKey"`
    +	State                  string   `xml:"state,omitempty"`
    +	VmknicKeys             []string `xml:"vmknicKeys,omitempty"`
    +	MaxNumberOfConnections int32    `xml:"maxNumberOfConnections,omitempty"`
    +	CurrentIpV6Enabled     *bool    `xml:"currentIpV6Enabled"`
    +}
    +
    +func init() {
    +	t["HostRuntimeInfoNetStackInstanceRuntimeInfo"] = reflect.TypeOf((*HostRuntimeInfoNetStackInstanceRuntimeInfo)(nil)).Elem()
    +}
    +
    +type HostRuntimeInfoNetworkRuntimeInfo struct {
    +	DynamicData
    +
    +	NetStackInstanceRuntimeInfo []HostRuntimeInfoNetStackInstanceRuntimeInfo `xml:"netStackInstanceRuntimeInfo,omitempty"`
    +	NetworkResourceRuntime      *HostNetworkResourceRuntime                  `xml:"networkResourceRuntime,omitempty"`
    +}
    +
    +func init() {
    +	t["HostRuntimeInfoNetworkRuntimeInfo"] = reflect.TypeOf((*HostRuntimeInfoNetworkRuntimeInfo)(nil)).Elem()
    +}
    +
    +type HostScheduleReconcileDatastoreInventory HostScheduleReconcileDatastoreInventoryRequestType
    +
    +func init() {
    +	t["HostScheduleReconcileDatastoreInventory"] = reflect.TypeOf((*HostScheduleReconcileDatastoreInventory)(nil)).Elem()
    +}
    +
    +type HostScheduleReconcileDatastoreInventoryRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	Datastore ManagedObjectReference `xml:"datastore"`
    +}
    +
    +func init() {
    +	t["HostScheduleReconcileDatastoreInventoryRequestType"] = reflect.TypeOf((*HostScheduleReconcileDatastoreInventoryRequestType)(nil)).Elem()
    +}
    +
    +type HostScheduleReconcileDatastoreInventoryResponse struct {
    +}
    +
    +type HostScsiDisk struct {
    +	ScsiLun
    +
    +	Capacity              HostDiskDimensionsLba `xml:"capacity"`
    +	DevicePath            string                `xml:"devicePath"`
    +	Ssd                   *bool                 `xml:"ssd"`
    +	LocalDisk             *bool                 `xml:"localDisk"`
    +	PhysicalLocation      []string              `xml:"physicalLocation,omitempty"`
    +	EmulatedDIXDIFEnabled *bool                 `xml:"emulatedDIXDIFEnabled"`
    +	VsanDiskInfo          *VsanHostVsanDiskInfo `xml:"vsanDiskInfo,omitempty"`
    +	ScsiDiskType          string                `xml:"scsiDiskType,omitempty"`
    +}
    +
    +func init() {
    +	t["HostScsiDisk"] = reflect.TypeOf((*HostScsiDisk)(nil)).Elem()
    +}
    +
    +type HostScsiDiskPartition struct {
    +	DynamicData
    +
    +	DiskName  string `xml:"diskName"`
    +	Partition int32  `xml:"partition"`
    +}
    +
    +func init() {
    +	t["HostScsiDiskPartition"] = reflect.TypeOf((*HostScsiDiskPartition)(nil)).Elem()
    +}
    +
    +type HostScsiTopology struct {
    +	DynamicData
    +
    +	Adapter []HostScsiTopologyInterface `xml:"adapter,omitempty"`
    +}
    +
    +func init() {
    +	t["HostScsiTopology"] = reflect.TypeOf((*HostScsiTopology)(nil)).Elem()
    +}
    +
    +type HostScsiTopologyInterface struct {
    +	DynamicData
    +
    +	Key     string                   `xml:"key"`
    +	Adapter string                   `xml:"adapter"`
    +	Target  []HostScsiTopologyTarget `xml:"target,omitempty"`
    +}
    +
    +func init() {
    +	t["HostScsiTopologyInterface"] = reflect.TypeOf((*HostScsiTopologyInterface)(nil)).Elem()
    +}
    +
    +type HostScsiTopologyLun struct {
    +	DynamicData
    +
    +	Key     string `xml:"key"`
    +	Lun     int32  `xml:"lun"`
    +	ScsiLun string `xml:"scsiLun"`
    +}
    +
    +func init() {
    +	t["HostScsiTopologyLun"] = reflect.TypeOf((*HostScsiTopologyLun)(nil)).Elem()
    +}
    +
    +type HostScsiTopologyTarget struct {
    +	DynamicData
    +
    +	Key       string                  `xml:"key"`
    +	Target    int32                   `xml:"target"`
    +	Lun       []HostScsiTopologyLun   `xml:"lun,omitempty"`
    +	Transport BaseHostTargetTransport `xml:"transport,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["HostScsiTopologyTarget"] = reflect.TypeOf((*HostScsiTopologyTarget)(nil)).Elem()
    +}
    +
    +type HostSecuritySpec struct {
    +	DynamicData
    +
    +	AdminPassword    string       `xml:"adminPassword,omitempty"`
    +	RemovePermission []Permission `xml:"removePermission,omitempty"`
    +	AddPermission    []Permission `xml:"addPermission,omitempty"`
    +}
    +
    +func init() {
    +	t["HostSecuritySpec"] = reflect.TypeOf((*HostSecuritySpec)(nil)).Elem()
    +}
    +
    +type HostSerialAttachedHba struct {
    +	HostHostBusAdapter
    +
    +	NodeWorldWideName string `xml:"nodeWorldWideName"`
    +}
    +
    +func init() {
    +	t["HostSerialAttachedHba"] = reflect.TypeOf((*HostSerialAttachedHba)(nil)).Elem()
    +}
    +
    +type HostSerialAttachedTargetTransport struct {
    +	HostTargetTransport
    +}
    +
    +func init() {
    +	t["HostSerialAttachedTargetTransport"] = reflect.TypeOf((*HostSerialAttachedTargetTransport)(nil)).Elem()
    +}
    +
    +type HostService struct {
    +	DynamicData
    +
    +	Key           string                    `xml:"key"`
    +	Label         string                    `xml:"label"`
    +	Required      bool                      `xml:"required"`
    +	Uninstallable bool                      `xml:"uninstallable"`
    +	Running       bool                      `xml:"running"`
    +	Ruleset       []string                  `xml:"ruleset,omitempty"`
    +	Policy        string                    `xml:"policy"`
    +	SourcePackage *HostServiceSourcePackage `xml:"sourcePackage,omitempty"`
    +}
    +
    +func init() {
    +	t["HostService"] = reflect.TypeOf((*HostService)(nil)).Elem()
    +}
    +
    +type HostServiceConfig struct {
    +	DynamicData
    +
    +	ServiceId     string `xml:"serviceId"`
    +	StartupPolicy string `xml:"startupPolicy"`
    +}
    +
    +func init() {
    +	t["HostServiceConfig"] = reflect.TypeOf((*HostServiceConfig)(nil)).Elem()
    +}
    +
    +type HostServiceInfo struct {
    +	DynamicData
    +
    +	Service []HostService `xml:"service,omitempty"`
    +}
    +
    +func init() {
    +	t["HostServiceInfo"] = reflect.TypeOf((*HostServiceInfo)(nil)).Elem()
    +}
    +
    +type HostServiceSourcePackage struct {
    +	DynamicData
    +
    +	SourcePackageName string `xml:"sourcePackageName"`
    +	Description       string `xml:"description"`
    +}
    +
    +func init() {
    +	t["HostServiceSourcePackage"] = reflect.TypeOf((*HostServiceSourcePackage)(nil)).Elem()
    +}
    +
    +type HostServiceTicket struct {
    +	DynamicData
    +
    +	Host           string `xml:"host,omitempty"`
    +	Port           int32  `xml:"port,omitempty"`
    +	SslThumbprint  string `xml:"sslThumbprint,omitempty"`
    +	Service        string `xml:"service"`
    +	ServiceVersion string `xml:"serviceVersion"`
    +	SessionId      string `xml:"sessionId"`
    +}
    +
    +func init() {
    +	t["HostServiceTicket"] = reflect.TypeOf((*HostServiceTicket)(nil)).Elem()
    +}
    +
    +type HostSetVStorageObjectControlFlags HostSetVStorageObjectControlFlagsRequestType
    +
    +func init() {
    +	t["HostSetVStorageObjectControlFlags"] = reflect.TypeOf((*HostSetVStorageObjectControlFlags)(nil)).Elem()
    +}
    +
    +type HostSetVStorageObjectControlFlagsRequestType struct {
    +	This         ManagedObjectReference `xml:"_this"`
    +	Id           ID                     `xml:"id"`
    +	Datastore    ManagedObjectReference `xml:"datastore"`
    +	ControlFlags []string               `xml:"controlFlags,omitempty"`
    +}
    +
    +func init() {
    +	t["HostSetVStorageObjectControlFlagsRequestType"] = reflect.TypeOf((*HostSetVStorageObjectControlFlagsRequestType)(nil)).Elem()
    +}
    +
    +type HostSetVStorageObjectControlFlagsResponse struct {
    +}
    +
    +type HostSharedGpuCapabilities struct {
    +	DynamicData
    +
    +	Vgpu                    string `xml:"vgpu"`
    +	DiskSnapshotSupported   bool   `xml:"diskSnapshotSupported"`
    +	MemorySnapshotSupported bool   `xml:"memorySnapshotSupported"`
    +	SuspendSupported        bool   `xml:"suspendSupported"`
    +	MigrateSupported        bool   `xml:"migrateSupported"`
    +}
    +
    +func init() {
    +	t["HostSharedGpuCapabilities"] = reflect.TypeOf((*HostSharedGpuCapabilities)(nil)).Elem()
    +}
    +
    +type HostShortNameInconsistentEvent struct {
    +	HostDasEvent
    +
    +	ShortName  string `xml:"shortName"`
    +	ShortName2 string `xml:"shortName2"`
    +}
    +
    +func init() {
    +	t["HostShortNameInconsistentEvent"] = reflect.TypeOf((*HostShortNameInconsistentEvent)(nil)).Elem()
    +}
    +
    +type HostShortNameToIpFailedEvent struct {
    +	HostEvent
    +
    +	ShortName string `xml:"shortName"`
    +}
    +
    +func init() {
    +	t["HostShortNameToIpFailedEvent"] = reflect.TypeOf((*HostShortNameToIpFailedEvent)(nil)).Elem()
    +}
    +
    +type HostShutdownEvent struct {
    +	HostEvent
    +
    +	Reason string `xml:"reason"`
    +}
    +
    +func init() {
    +	t["HostShutdownEvent"] = reflect.TypeOf((*HostShutdownEvent)(nil)).Elem()
    +}
    +
    +type HostSnmpConfigSpec struct {
    +	DynamicData
    +
    +	Enabled             *bool                 `xml:"enabled"`
    +	Port                int32                 `xml:"port,omitempty"`
    +	ReadOnlyCommunities []string              `xml:"readOnlyCommunities,omitempty"`
    +	TrapTargets         []HostSnmpDestination `xml:"trapTargets,omitempty"`
    +	Option              []KeyValue            `xml:"option,omitempty"`
    +}
    +
    +func init() {
    +	t["HostSnmpConfigSpec"] = reflect.TypeOf((*HostSnmpConfigSpec)(nil)).Elem()
    +}
    +
    +type HostSnmpDestination struct {
    +	DynamicData
    +
    +	HostName  string `xml:"hostName"`
    +	Port      int32  `xml:"port"`
    +	Community string `xml:"community"`
    +}
    +
    +func init() {
    +	t["HostSnmpDestination"] = reflect.TypeOf((*HostSnmpDestination)(nil)).Elem()
    +}
    +
    +type HostSnmpSystemAgentLimits struct {
    +	DynamicData
    +
    +	MaxReadOnlyCommunities int32                   `xml:"maxReadOnlyCommunities"`
    +	MaxTrapDestinations    int32                   `xml:"maxTrapDestinations"`
    +	MaxCommunityLength     int32                   `xml:"maxCommunityLength"`
    +	MaxBufferSize          int32                   `xml:"maxBufferSize"`
    +	Capability             HostSnmpAgentCapability `xml:"capability,omitempty"`
    +}
    +
    +func init() {
    +	t["HostSnmpSystemAgentLimits"] = reflect.TypeOf((*HostSnmpSystemAgentLimits)(nil)).Elem()
    +}
    +
    +type HostSpecGetUpdatedHosts HostSpecGetUpdatedHostsRequestType
    +
    +func init() {
    +	t["HostSpecGetUpdatedHosts"] = reflect.TypeOf((*HostSpecGetUpdatedHosts)(nil)).Elem()
    +}
    +
    +type HostSpecGetUpdatedHostsRequestType struct {
    +	This          ManagedObjectReference `xml:"_this"`
    +	StartChangeID string                 `xml:"startChangeID,omitempty"`
    +	EndChangeID   string                 `xml:"endChangeID,omitempty"`
    +}
    +
    +func init() {
    +	t["HostSpecGetUpdatedHostsRequestType"] = reflect.TypeOf((*HostSpecGetUpdatedHostsRequestType)(nil)).Elem()
    +}
    +
    +type HostSpecGetUpdatedHostsResponse struct {
    +	Returnval []ManagedObjectReference `xml:"returnval,omitempty"`
    +}
    +
    +type HostSpecification struct {
    +	DynamicData
    +
    +	CreatedTime  time.Time              `xml:"createdTime"`
    +	LastModified *time.Time             `xml:"lastModified"`
    +	Host         ManagedObjectReference `xml:"host"`
    +	SubSpecs     []HostSubSpecification `xml:"subSpecs,omitempty"`
    +	ChangeID     string                 `xml:"changeID,omitempty"`
    +}
    +
    +func init() {
    +	t["HostSpecification"] = reflect.TypeOf((*HostSpecification)(nil)).Elem()
    +}
    +
    +type HostSpecificationOperationFailed struct {
    +	VimFault
    +
    +	Host ManagedObjectReference `xml:"host"`
    +}
    +
    +func init() {
    +	t["HostSpecificationOperationFailed"] = reflect.TypeOf((*HostSpecificationOperationFailed)(nil)).Elem()
    +}
    +
    +type HostSpecificationOperationFailedFault HostSpecificationOperationFailed
    +
    +func init() {
    +	t["HostSpecificationOperationFailedFault"] = reflect.TypeOf((*HostSpecificationOperationFailedFault)(nil)).Elem()
    +}
    +
    +type HostSriovConfig struct {
    +	HostPciPassthruConfig
    +
    +	SriovEnabled       bool  `xml:"sriovEnabled"`
    +	NumVirtualFunction int32 `xml:"numVirtualFunction"`
    +}
    +
    +func init() {
    +	t["HostSriovConfig"] = reflect.TypeOf((*HostSriovConfig)(nil)).Elem()
    +}
    +
    +type HostSriovDevicePoolInfo struct {
    +	DynamicData
    +
    +	Key string `xml:"key"`
    +}
    +
    +func init() {
    +	t["HostSriovDevicePoolInfo"] = reflect.TypeOf((*HostSriovDevicePoolInfo)(nil)).Elem()
    +}
    +
    +type HostSriovInfo struct {
    +	HostPciPassthruInfo
    +
    +	SriovEnabled                bool  `xml:"sriovEnabled"`
    +	SriovCapable                bool  `xml:"sriovCapable"`
    +	SriovActive                 bool  `xml:"sriovActive"`
    +	NumVirtualFunctionRequested int32 `xml:"numVirtualFunctionRequested"`
    +	NumVirtualFunction          int32 `xml:"numVirtualFunction"`
    +	MaxVirtualFunctionSupported int32 `xml:"maxVirtualFunctionSupported"`
    +}
    +
    +func init() {
    +	t["HostSriovInfo"] = reflect.TypeOf((*HostSriovInfo)(nil)).Elem()
    +}
    +
    +type HostSriovNetworkDevicePoolInfo struct {
    +	HostSriovDevicePoolInfo
    +
    +	SwitchKey  string        `xml:"switchKey,omitempty"`
    +	SwitchUuid string        `xml:"switchUuid,omitempty"`
    +	Pnic       []PhysicalNic `xml:"pnic,omitempty"`
    +}
    +
    +func init() {
    +	t["HostSriovNetworkDevicePoolInfo"] = reflect.TypeOf((*HostSriovNetworkDevicePoolInfo)(nil)).Elem()
    +}
    +
    +type HostSslThumbprintInfo struct {
    +	DynamicData
    +
    +	Principal      string   `xml:"principal"`
    +	OwnerTag       string   `xml:"ownerTag,omitempty"`
    +	SslThumbprints []string `xml:"sslThumbprints,omitempty"`
    +}
    +
    +func init() {
    +	t["HostSslThumbprintInfo"] = reflect.TypeOf((*HostSslThumbprintInfo)(nil)).Elem()
    +}
    +
    +type HostStatusChangedEvent struct {
    +	ClusterStatusChangedEvent
    +}
    +
    +func init() {
    +	t["HostStatusChangedEvent"] = reflect.TypeOf((*HostStatusChangedEvent)(nil)).Elem()
    +}
    +
    +type HostStorageArrayTypePolicyOption struct {
    +	DynamicData
    +
    +	Policy BaseElementDescription `xml:"policy,typeattr"`
    +}
    +
    +func init() {
    +	t["HostStorageArrayTypePolicyOption"] = reflect.TypeOf((*HostStorageArrayTypePolicyOption)(nil)).Elem()
    +}
    +
    +type HostStorageDeviceInfo struct {
    +	DynamicData
    +
    +	HostBusAdapter              []BaseHostHostBusAdapter `xml:"hostBusAdapter,omitempty,typeattr"`
    +	ScsiLun                     []BaseScsiLun            `xml:"scsiLun,omitempty,typeattr"`
    +	ScsiTopology                *HostScsiTopology        `xml:"scsiTopology,omitempty"`
    +	MultipathInfo               *HostMultipathInfo       `xml:"multipathInfo,omitempty"`
    +	PlugStoreTopology           *HostPlugStoreTopology   `xml:"plugStoreTopology,omitempty"`
    +	SoftwareInternetScsiEnabled bool                     `xml:"softwareInternetScsiEnabled"`
    +}
    +
    +func init() {
    +	t["HostStorageDeviceInfo"] = reflect.TypeOf((*HostStorageDeviceInfo)(nil)).Elem()
    +}
    +
    +type HostStorageElementInfo struct {
    +	HostHardwareElementInfo
    +
    +	OperationalInfo []HostStorageOperationalInfo `xml:"operationalInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["HostStorageElementInfo"] = reflect.TypeOf((*HostStorageElementInfo)(nil)).Elem()
    +}
    +
    +type HostStorageOperationalInfo struct {
    +	DynamicData
    +
    +	Property string `xml:"property"`
    +	Value    string `xml:"value"`
    +}
    +
    +func init() {
    +	t["HostStorageOperationalInfo"] = reflect.TypeOf((*HostStorageOperationalInfo)(nil)).Elem()
    +}
    +
    +type HostStorageSystemDiskLocatorLedResult struct {
    +	DynamicData
    +
    +	Key   string               `xml:"key"`
    +	Fault LocalizedMethodFault `xml:"fault"`
    +}
    +
    +func init() {
    +	t["HostStorageSystemDiskLocatorLedResult"] = reflect.TypeOf((*HostStorageSystemDiskLocatorLedResult)(nil)).Elem()
    +}
    +
    +type HostStorageSystemScsiLunResult struct {
    +	DynamicData
    +
    +	Key   string                `xml:"key"`
    +	Fault *LocalizedMethodFault `xml:"fault,omitempty"`
    +}
    +
    +func init() {
    +	t["HostStorageSystemScsiLunResult"] = reflect.TypeOf((*HostStorageSystemScsiLunResult)(nil)).Elem()
    +}
    +
    +type HostStorageSystemVmfsVolumeResult struct {
    +	DynamicData
    +
    +	Key   string                `xml:"key"`
    +	Fault *LocalizedMethodFault `xml:"fault,omitempty"`
    +}
    +
    +func init() {
    +	t["HostStorageSystemVmfsVolumeResult"] = reflect.TypeOf((*HostStorageSystemVmfsVolumeResult)(nil)).Elem()
    +}
    +
    +type HostSubSpecification struct {
    +	DynamicData
    +
    +	Name        string    `xml:"name"`
    +	CreatedTime time.Time `xml:"createdTime"`
    +	Data        []byte    `xml:"data,omitempty"`
    +	BinaryData  []byte    `xml:"binaryData,omitempty"`
    +}
    +
    +func init() {
    +	t["HostSubSpecification"] = reflect.TypeOf((*HostSubSpecification)(nil)).Elem()
    +}
    +
    +type HostSyncFailedEvent struct {
    +	HostEvent
    +
    +	Reason LocalizedMethodFault `xml:"reason"`
    +}
    +
    +func init() {
    +	t["HostSyncFailedEvent"] = reflect.TypeOf((*HostSyncFailedEvent)(nil)).Elem()
    +}
    +
    +type HostSystemComplianceCheckState struct {
    +	DynamicData
    +
    +	State     string    `xml:"state"`
    +	CheckTime time.Time `xml:"checkTime"`
    +}
    +
    +func init() {
    +	t["HostSystemComplianceCheckState"] = reflect.TypeOf((*HostSystemComplianceCheckState)(nil)).Elem()
    +}
    +
    +type HostSystemHealthInfo struct {
    +	DynamicData
    +
    +	NumericSensorInfo []HostNumericSensorInfo `xml:"numericSensorInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["HostSystemHealthInfo"] = reflect.TypeOf((*HostSystemHealthInfo)(nil)).Elem()
    +}
    +
    +type HostSystemIdentificationInfo struct {
    +	DynamicData
    +
    +	IdentifierValue string                 `xml:"identifierValue"`
    +	IdentifierType  BaseElementDescription `xml:"identifierType,typeattr"`
    +}
    +
    +func init() {
    +	t["HostSystemIdentificationInfo"] = reflect.TypeOf((*HostSystemIdentificationInfo)(nil)).Elem()
    +}
    +
    +type HostSystemInfo struct {
    +	DynamicData
    +
    +	Vendor               string                         `xml:"vendor"`
    +	Model                string                         `xml:"model"`
    +	Uuid                 string                         `xml:"uuid"`
    +	OtherIdentifyingInfo []HostSystemIdentificationInfo `xml:"otherIdentifyingInfo,omitempty"`
    +	SerialNumber         string                         `xml:"serialNumber,omitempty"`
    +}
    +
    +func init() {
    +	t["HostSystemInfo"] = reflect.TypeOf((*HostSystemInfo)(nil)).Elem()
    +}
    +
    +type HostSystemReconnectSpec struct {
    +	DynamicData
    +
    +	SyncState *bool `xml:"syncState"`
    +}
    +
    +func init() {
    +	t["HostSystemReconnectSpec"] = reflect.TypeOf((*HostSystemReconnectSpec)(nil)).Elem()
    +}
    +
    +type HostSystemRemediationState struct {
    +	DynamicData
    +
    +	State         string    `xml:"state"`
    +	OperationTime time.Time `xml:"operationTime"`
    +}
    +
    +func init() {
    +	t["HostSystemRemediationState"] = reflect.TypeOf((*HostSystemRemediationState)(nil)).Elem()
    +}
    +
    +type HostSystemResourceInfo struct {
    +	DynamicData
    +
    +	Key    string                   `xml:"key"`
    +	Config *ResourceConfigSpec      `xml:"config,omitempty"`
    +	Child  []HostSystemResourceInfo `xml:"child,omitempty"`
    +}
    +
    +func init() {
    +	t["HostSystemResourceInfo"] = reflect.TypeOf((*HostSystemResourceInfo)(nil)).Elem()
    +}
    +
    +type HostSystemSwapConfiguration struct {
    +	DynamicData
    +
    +	Option []BaseHostSystemSwapConfigurationSystemSwapOption `xml:"option,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["HostSystemSwapConfiguration"] = reflect.TypeOf((*HostSystemSwapConfiguration)(nil)).Elem()
    +}
    +
    +type HostSystemSwapConfigurationDatastoreOption struct {
    +	HostSystemSwapConfigurationSystemSwapOption
    +
    +	Datastore string `xml:"datastore"`
    +}
    +
    +func init() {
    +	t["HostSystemSwapConfigurationDatastoreOption"] = reflect.TypeOf((*HostSystemSwapConfigurationDatastoreOption)(nil)).Elem()
    +}
    +
    +type HostSystemSwapConfigurationDisabledOption struct {
    +	HostSystemSwapConfigurationSystemSwapOption
    +}
    +
    +func init() {
    +	t["HostSystemSwapConfigurationDisabledOption"] = reflect.TypeOf((*HostSystemSwapConfigurationDisabledOption)(nil)).Elem()
    +}
    +
    +type HostSystemSwapConfigurationHostCacheOption struct {
    +	HostSystemSwapConfigurationSystemSwapOption
    +}
    +
    +func init() {
    +	t["HostSystemSwapConfigurationHostCacheOption"] = reflect.TypeOf((*HostSystemSwapConfigurationHostCacheOption)(nil)).Elem()
    +}
    +
    +type HostSystemSwapConfigurationHostLocalSwapOption struct {
    +	HostSystemSwapConfigurationSystemSwapOption
    +}
    +
    +func init() {
    +	t["HostSystemSwapConfigurationHostLocalSwapOption"] = reflect.TypeOf((*HostSystemSwapConfigurationHostLocalSwapOption)(nil)).Elem()
    +}
    +
    +type HostSystemSwapConfigurationSystemSwapOption struct {
    +	DynamicData
    +
    +	Key int32 `xml:"key"`
    +}
    +
    +func init() {
    +	t["HostSystemSwapConfigurationSystemSwapOption"] = reflect.TypeOf((*HostSystemSwapConfigurationSystemSwapOption)(nil)).Elem()
    +}
    +
    +type HostTargetTransport struct {
    +	DynamicData
    +}
    +
    +func init() {
    +	t["HostTargetTransport"] = reflect.TypeOf((*HostTargetTransport)(nil)).Elem()
    +}
    +
    +type HostTpmAttestationInfo struct {
    +	DynamicData
    +
    +	Time    time.Time                              `xml:"time"`
    +	Status  HostTpmAttestationInfoAcceptanceStatus `xml:"status"`
    +	Message *LocalizableMessage                    `xml:"message,omitempty"`
    +}
    +
    +func init() {
    +	t["HostTpmAttestationInfo"] = reflect.TypeOf((*HostTpmAttestationInfo)(nil)).Elem()
    +}
    +
    +type HostTpmAttestationReport struct {
    +	DynamicData
    +
    +	TpmPcrValues   []HostTpmDigestInfo    `xml:"tpmPcrValues"`
    +	TpmEvents      []HostTpmEventLogEntry `xml:"tpmEvents"`
    +	TpmLogReliable bool                   `xml:"tpmLogReliable"`
    +}
    +
    +func init() {
    +	t["HostTpmAttestationReport"] = reflect.TypeOf((*HostTpmAttestationReport)(nil)).Elem()
    +}
    +
    +type HostTpmBootSecurityOptionEventDetails struct {
    +	HostTpmEventDetails
    +
    +	BootSecurityOption string `xml:"bootSecurityOption"`
    +}
    +
    +func init() {
    +	t["HostTpmBootSecurityOptionEventDetails"] = reflect.TypeOf((*HostTpmBootSecurityOptionEventDetails)(nil)).Elem()
    +}
    +
    +type HostTpmCommandEventDetails struct {
    +	HostTpmEventDetails
    +
    +	CommandLine string `xml:"commandLine"`
    +}
    +
    +func init() {
    +	t["HostTpmCommandEventDetails"] = reflect.TypeOf((*HostTpmCommandEventDetails)(nil)).Elem()
    +}
    +
    +type HostTpmDigestInfo struct {
    +	HostDigestInfo
    +
    +	PcrNumber int32 `xml:"pcrNumber"`
    +}
    +
    +func init() {
    +	t["HostTpmDigestInfo"] = reflect.TypeOf((*HostTpmDigestInfo)(nil)).Elem()
    +}
    +
    +type HostTpmEventDetails struct {
    +	DynamicData
    +
    +	DataHash       []byte `xml:"dataHash"`
    +	DataHashMethod string `xml:"dataHashMethod,omitempty"`
    +}
    +
    +func init() {
    +	t["HostTpmEventDetails"] = reflect.TypeOf((*HostTpmEventDetails)(nil)).Elem()
    +}
    +
    +type HostTpmEventLogEntry struct {
    +	DynamicData
    +
    +	PcrIndex     int32                   `xml:"pcrIndex"`
    +	EventDetails BaseHostTpmEventDetails `xml:"eventDetails,typeattr"`
    +}
    +
    +func init() {
    +	t["HostTpmEventLogEntry"] = reflect.TypeOf((*HostTpmEventLogEntry)(nil)).Elem()
    +}
    +
    +type HostTpmOptionEventDetails struct {
    +	HostTpmEventDetails
    +
    +	OptionsFileName string `xml:"optionsFileName"`
    +	BootOptions     []byte `xml:"bootOptions,omitempty"`
    +}
    +
    +func init() {
    +	t["HostTpmOptionEventDetails"] = reflect.TypeOf((*HostTpmOptionEventDetails)(nil)).Elem()
    +}
    +
    +type HostTpmSoftwareComponentEventDetails struct {
    +	HostTpmEventDetails
    +
    +	ComponentName string `xml:"componentName"`
    +	VibName       string `xml:"vibName"`
    +	VibVersion    string `xml:"vibVersion"`
    +	VibVendor     string `xml:"vibVendor"`
    +}
    +
    +func init() {
    +	t["HostTpmSoftwareComponentEventDetails"] = reflect.TypeOf((*HostTpmSoftwareComponentEventDetails)(nil)).Elem()
    +}
    +
    +type HostUnresolvedVmfsExtent struct {
    +	DynamicData
    +
    +	Device       HostScsiDiskPartition `xml:"device"`
    +	DevicePath   string                `xml:"devicePath"`
    +	VmfsUuid     string                `xml:"vmfsUuid"`
    +	IsHeadExtent bool                  `xml:"isHeadExtent"`
    +	Ordinal      int32                 `xml:"ordinal"`
    +	StartBlock   int32                 `xml:"startBlock"`
    +	EndBlock     int32                 `xml:"endBlock"`
    +	Reason       string                `xml:"reason"`
    +}
    +
    +func init() {
    +	t["HostUnresolvedVmfsExtent"] = reflect.TypeOf((*HostUnresolvedVmfsExtent)(nil)).Elem()
    +}
    +
    +type HostUnresolvedVmfsResignatureSpec struct {
    +	DynamicData
    +
    +	ExtentDevicePath []string `xml:"extentDevicePath"`
    +}
    +
    +func init() {
    +	t["HostUnresolvedVmfsResignatureSpec"] = reflect.TypeOf((*HostUnresolvedVmfsResignatureSpec)(nil)).Elem()
    +}
    +
    +type HostUnresolvedVmfsResolutionResult struct {
    +	DynamicData
    +
    +	Spec  HostUnresolvedVmfsResolutionSpec `xml:"spec"`
    +	Vmfs  *HostVmfsVolume                  `xml:"vmfs,omitempty"`
    +	Fault *LocalizedMethodFault            `xml:"fault,omitempty"`
    +}
    +
    +func init() {
    +	t["HostUnresolvedVmfsResolutionResult"] = reflect.TypeOf((*HostUnresolvedVmfsResolutionResult)(nil)).Elem()
    +}
    +
    +type HostUnresolvedVmfsResolutionSpec struct {
    +	DynamicData
    +
    +	ExtentDevicePath []string `xml:"extentDevicePath"`
    +	UuidResolution   string   `xml:"uuidResolution"`
    +}
    +
    +func init() {
    +	t["HostUnresolvedVmfsResolutionSpec"] = reflect.TypeOf((*HostUnresolvedVmfsResolutionSpec)(nil)).Elem()
    +}
    +
    +type HostUnresolvedVmfsVolume struct {
    +	DynamicData
    +
    +	Extent        []HostUnresolvedVmfsExtent            `xml:"extent"`
    +	VmfsLabel     string                                `xml:"vmfsLabel"`
    +	VmfsUuid      string                                `xml:"vmfsUuid"`
    +	TotalBlocks   int32                                 `xml:"totalBlocks"`
    +	ResolveStatus HostUnresolvedVmfsVolumeResolveStatus `xml:"resolveStatus"`
    +}
    +
    +func init() {
    +	t["HostUnresolvedVmfsVolume"] = reflect.TypeOf((*HostUnresolvedVmfsVolume)(nil)).Elem()
    +}
    +
    +type HostUnresolvedVmfsVolumeResolveStatus struct {
    +	DynamicData
    +
    +	Resolvable        bool  `xml:"resolvable"`
    +	IncompleteExtents *bool `xml:"incompleteExtents"`
    +	MultipleCopies    *bool `xml:"multipleCopies"`
    +}
    +
    +func init() {
    +	t["HostUnresolvedVmfsVolumeResolveStatus"] = reflect.TypeOf((*HostUnresolvedVmfsVolumeResolveStatus)(nil)).Elem()
    +}
    +
    +type HostUpgradeFailedEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["HostUpgradeFailedEvent"] = reflect.TypeOf((*HostUpgradeFailedEvent)(nil)).Elem()
    +}
    +
    +type HostUserWorldSwapNotEnabledEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["HostUserWorldSwapNotEnabledEvent"] = reflect.TypeOf((*HostUserWorldSwapNotEnabledEvent)(nil)).Elem()
    +}
    +
    +type HostVFlashManagerVFlashCacheConfigInfo struct {
    +	DynamicData
    +
    +	VFlashModuleConfigOption []HostVFlashManagerVFlashCacheConfigInfoVFlashModuleConfigOption `xml:"vFlashModuleConfigOption,omitempty"`
    +	DefaultVFlashModule      string                                                           `xml:"defaultVFlashModule,omitempty"`
    +	SwapCacheReservationInGB int64                                                            `xml:"swapCacheReservationInGB,omitempty"`
    +}
    +
    +func init() {
    +	t["HostVFlashManagerVFlashCacheConfigInfo"] = reflect.TypeOf((*HostVFlashManagerVFlashCacheConfigInfo)(nil)).Elem()
    +}
    +
    +type HostVFlashManagerVFlashCacheConfigInfoVFlashModuleConfigOption struct {
    +	DynamicData
    +
    +	VFlashModule              string       `xml:"vFlashModule"`
    +	VFlashModuleVersion       string       `xml:"vFlashModuleVersion"`
    +	MinSupportedModuleVersion string       `xml:"minSupportedModuleVersion"`
    +	CacheConsistencyType      ChoiceOption `xml:"cacheConsistencyType"`
    +	CacheMode                 ChoiceOption `xml:"cacheMode"`
    +	BlockSizeInKBOption       LongOption   `xml:"blockSizeInKBOption"`
    +	ReservationInMBOption     LongOption   `xml:"reservationInMBOption"`
    +	MaxDiskSizeInKB           int64        `xml:"maxDiskSizeInKB"`
    +}
    +
    +func init() {
    +	t["HostVFlashManagerVFlashCacheConfigInfoVFlashModuleConfigOption"] = reflect.TypeOf((*HostVFlashManagerVFlashCacheConfigInfoVFlashModuleConfigOption)(nil)).Elem()
    +}
    +
    +type HostVFlashManagerVFlashCacheConfigSpec struct {
    +	DynamicData
    +
    +	DefaultVFlashModule      string `xml:"defaultVFlashModule"`
    +	SwapCacheReservationInGB int64  `xml:"swapCacheReservationInGB"`
    +}
    +
    +func init() {
    +	t["HostVFlashManagerVFlashCacheConfigSpec"] = reflect.TypeOf((*HostVFlashManagerVFlashCacheConfigSpec)(nil)).Elem()
    +}
    +
    +type HostVFlashManagerVFlashConfigInfo struct {
    +	DynamicData
    +
    +	VFlashResourceConfigInfo *HostVFlashManagerVFlashResourceConfigInfo `xml:"vFlashResourceConfigInfo,omitempty"`
    +	VFlashCacheConfigInfo    *HostVFlashManagerVFlashCacheConfigInfo    `xml:"vFlashCacheConfigInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["HostVFlashManagerVFlashConfigInfo"] = reflect.TypeOf((*HostVFlashManagerVFlashConfigInfo)(nil)).Elem()
    +}
    +
    +type HostVFlashManagerVFlashResourceConfigInfo struct {
    +	DynamicData
    +
    +	Vffs     *HostVffsVolume `xml:"vffs,omitempty"`
    +	Capacity int64           `xml:"capacity"`
    +}
    +
    +func init() {
    +	t["HostVFlashManagerVFlashResourceConfigInfo"] = reflect.TypeOf((*HostVFlashManagerVFlashResourceConfigInfo)(nil)).Elem()
    +}
    +
    +type HostVFlashManagerVFlashResourceConfigSpec struct {
    +	DynamicData
    +
    +	VffsUuid string `xml:"vffsUuid"`
    +}
    +
    +func init() {
    +	t["HostVFlashManagerVFlashResourceConfigSpec"] = reflect.TypeOf((*HostVFlashManagerVFlashResourceConfigSpec)(nil)).Elem()
    +}
    +
    +type HostVFlashManagerVFlashResourceRunTimeInfo struct {
    +	DynamicData
    +
    +	Usage              int64 `xml:"usage"`
    +	Capacity           int64 `xml:"capacity"`
    +	Accessible         bool  `xml:"accessible"`
    +	CapacityForVmCache int64 `xml:"capacityForVmCache"`
    +	FreeForVmCache     int64 `xml:"freeForVmCache"`
    +}
    +
    +func init() {
    +	t["HostVFlashManagerVFlashResourceRunTimeInfo"] = reflect.TypeOf((*HostVFlashManagerVFlashResourceRunTimeInfo)(nil)).Elem()
    +}
    +
    +type HostVFlashResourceConfigurationResult struct {
    +	DynamicData
    +
    +	DevicePath              []string                      `xml:"devicePath,omitempty"`
    +	Vffs                    *HostVffsVolume               `xml:"vffs,omitempty"`
    +	DiskConfigurationResult []HostDiskConfigurationResult `xml:"diskConfigurationResult,omitempty"`
    +}
    +
    +func init() {
    +	t["HostVFlashResourceConfigurationResult"] = reflect.TypeOf((*HostVFlashResourceConfigurationResult)(nil)).Elem()
    +}
    +
    +type HostVMotionCompatibility struct {
    +	DynamicData
    +
    +	Host          ManagedObjectReference `xml:"host"`
    +	Compatibility []string               `xml:"compatibility,omitempty"`
    +}
    +
    +func init() {
    +	t["HostVMotionCompatibility"] = reflect.TypeOf((*HostVMotionCompatibility)(nil)).Elem()
    +}
    +
    +type HostVMotionConfig struct {
    +	DynamicData
    +
    +	VmotionNicKey string `xml:"vmotionNicKey,omitempty"`
    +	Enabled       bool   `xml:"enabled"`
    +}
    +
    +func init() {
    +	t["HostVMotionConfig"] = reflect.TypeOf((*HostVMotionConfig)(nil)).Elem()
    +}
    +
    +type HostVMotionInfo struct {
    +	DynamicData
    +
    +	NetConfig *HostVMotionNetConfig `xml:"netConfig,omitempty"`
    +	IpConfig  *HostIpConfig         `xml:"ipConfig,omitempty"`
    +}
    +
    +func init() {
    +	t["HostVMotionInfo"] = reflect.TypeOf((*HostVMotionInfo)(nil)).Elem()
    +}
    +
    +type HostVMotionNetConfig struct {
    +	DynamicData
    +
    +	CandidateVnic []HostVirtualNic `xml:"candidateVnic,omitempty"`
    +	SelectedVnic  string           `xml:"selectedVnic,omitempty"`
    +}
    +
    +func init() {
    +	t["HostVMotionNetConfig"] = reflect.TypeOf((*HostVMotionNetConfig)(nil)).Elem()
    +}
    +
    +type HostVStorageObjectCreateDiskFromSnapshotRequestType struct {
    +	This       ManagedObjectReference          `xml:"_this"`
    +	Id         ID                              `xml:"id"`
    +	Datastore  ManagedObjectReference          `xml:"datastore"`
    +	SnapshotId ID                              `xml:"snapshotId"`
    +	Name       string                          `xml:"name"`
    +	Profile    []BaseVirtualMachineProfileSpec `xml:"profile,omitempty,typeattr"`
    +	Crypto     BaseCryptoSpec                  `xml:"crypto,omitempty,typeattr"`
    +	Path       string                          `xml:"path,omitempty"`
    +}
    +
    +func init() {
    +	t["HostVStorageObjectCreateDiskFromSnapshotRequestType"] = reflect.TypeOf((*HostVStorageObjectCreateDiskFromSnapshotRequestType)(nil)).Elem()
    +}
    +
    +type HostVStorageObjectCreateDiskFromSnapshot_Task HostVStorageObjectCreateDiskFromSnapshotRequestType
    +
    +func init() {
    +	t["HostVStorageObjectCreateDiskFromSnapshot_Task"] = reflect.TypeOf((*HostVStorageObjectCreateDiskFromSnapshot_Task)(nil)).Elem()
    +}
    +
    +type HostVStorageObjectCreateDiskFromSnapshot_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type HostVStorageObjectCreateSnapshotRequestType struct {
    +	This        ManagedObjectReference `xml:"_this"`
    +	Id          ID                     `xml:"id"`
    +	Datastore   ManagedObjectReference `xml:"datastore"`
    +	Description string                 `xml:"description"`
    +}
    +
    +func init() {
    +	t["HostVStorageObjectCreateSnapshotRequestType"] = reflect.TypeOf((*HostVStorageObjectCreateSnapshotRequestType)(nil)).Elem()
    +}
    +
    +type HostVStorageObjectCreateSnapshot_Task HostVStorageObjectCreateSnapshotRequestType
    +
    +func init() {
    +	t["HostVStorageObjectCreateSnapshot_Task"] = reflect.TypeOf((*HostVStorageObjectCreateSnapshot_Task)(nil)).Elem()
    +}
    +
    +type HostVStorageObjectCreateSnapshot_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type HostVStorageObjectDeleteSnapshotRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	Id         ID                     `xml:"id"`
    +	Datastore  ManagedObjectReference `xml:"datastore"`
    +	SnapshotId ID                     `xml:"snapshotId"`
    +}
    +
    +func init() {
    +	t["HostVStorageObjectDeleteSnapshotRequestType"] = reflect.TypeOf((*HostVStorageObjectDeleteSnapshotRequestType)(nil)).Elem()
    +}
    +
    +type HostVStorageObjectDeleteSnapshot_Task HostVStorageObjectDeleteSnapshotRequestType
    +
    +func init() {
    +	t["HostVStorageObjectDeleteSnapshot_Task"] = reflect.TypeOf((*HostVStorageObjectDeleteSnapshot_Task)(nil)).Elem()
    +}
    +
    +type HostVStorageObjectDeleteSnapshot_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type HostVStorageObjectRetrieveSnapshotInfo HostVStorageObjectRetrieveSnapshotInfoRequestType
    +
    +func init() {
    +	t["HostVStorageObjectRetrieveSnapshotInfo"] = reflect.TypeOf((*HostVStorageObjectRetrieveSnapshotInfo)(nil)).Elem()
    +}
    +
    +type HostVStorageObjectRetrieveSnapshotInfoRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	Id        ID                     `xml:"id"`
    +	Datastore ManagedObjectReference `xml:"datastore"`
    +}
    +
    +func init() {
    +	t["HostVStorageObjectRetrieveSnapshotInfoRequestType"] = reflect.TypeOf((*HostVStorageObjectRetrieveSnapshotInfoRequestType)(nil)).Elem()
    +}
    +
    +type HostVStorageObjectRetrieveSnapshotInfoResponse struct {
    +	Returnval VStorageObjectSnapshotInfo `xml:"returnval"`
    +}
    +
    +type HostVStorageObjectRevertRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	Id         ID                     `xml:"id"`
    +	Datastore  ManagedObjectReference `xml:"datastore"`
    +	SnapshotId ID                     `xml:"snapshotId"`
    +}
    +
    +func init() {
    +	t["HostVStorageObjectRevertRequestType"] = reflect.TypeOf((*HostVStorageObjectRevertRequestType)(nil)).Elem()
    +}
    +
    +type HostVStorageObjectRevert_Task HostVStorageObjectRevertRequestType
    +
    +func init() {
    +	t["HostVStorageObjectRevert_Task"] = reflect.TypeOf((*HostVStorageObjectRevert_Task)(nil)).Elem()
    +}
    +
    +type HostVStorageObjectRevert_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type HostVfatVolume struct {
    +	HostFileSystemVolume
    +}
    +
    +func init() {
    +	t["HostVfatVolume"] = reflect.TypeOf((*HostVfatVolume)(nil)).Elem()
    +}
    +
    +type HostVffsSpec struct {
    +	DynamicData
    +
    +	DevicePath   string                 `xml:"devicePath"`
    +	Partition    *HostDiskPartitionSpec `xml:"partition,omitempty"`
    +	MajorVersion int32                  `xml:"majorVersion"`
    +	VolumeName   string                 `xml:"volumeName"`
    +}
    +
    +func init() {
    +	t["HostVffsSpec"] = reflect.TypeOf((*HostVffsSpec)(nil)).Elem()
    +}
    +
    +type HostVffsVolume struct {
    +	HostFileSystemVolume
    +
    +	MajorVersion int32                   `xml:"majorVersion"`
    +	Version      string                  `xml:"version"`
    +	Uuid         string                  `xml:"uuid"`
    +	Extent       []HostScsiDiskPartition `xml:"extent"`
    +}
    +
    +func init() {
    +	t["HostVffsVolume"] = reflect.TypeOf((*HostVffsVolume)(nil)).Elem()
    +}
    +
    +type HostVirtualNic struct {
    +	DynamicData
    +
    +	Device    string             `xml:"device"`
    +	Key       string             `xml:"key"`
    +	Portgroup string             `xml:"portgroup"`
    +	Spec      HostVirtualNicSpec `xml:"spec"`
    +	Port      string             `xml:"port,omitempty"`
    +}
    +
    +func init() {
    +	t["HostVirtualNic"] = reflect.TypeOf((*HostVirtualNic)(nil)).Elem()
    +}
    +
    +type HostVirtualNicConfig struct {
    +	DynamicData
    +
    +	ChangeOperation string              `xml:"changeOperation,omitempty"`
    +	Device          string              `xml:"device,omitempty"`
    +	Portgroup       string              `xml:"portgroup"`
    +	Spec            *HostVirtualNicSpec `xml:"spec,omitempty"`
    +}
    +
    +func init() {
    +	t["HostVirtualNicConfig"] = reflect.TypeOf((*HostVirtualNicConfig)(nil)).Elem()
    +}
    +
    +type HostVirtualNicConnection struct {
    +	DynamicData
    +
    +	Portgroup string                                  `xml:"portgroup,omitempty"`
    +	DvPort    *DistributedVirtualSwitchPortConnection `xml:"dvPort,omitempty"`
    +	OpNetwork *HostVirtualNicOpaqueNetworkSpec        `xml:"opNetwork,omitempty"`
    +}
    +
    +func init() {
    +	t["HostVirtualNicConnection"] = reflect.TypeOf((*HostVirtualNicConnection)(nil)).Elem()
    +}
    +
    +type HostVirtualNicIpRouteSpec struct {
    +	DynamicData
    +
    +	IpRouteConfig BaseHostIpRouteConfig `xml:"ipRouteConfig,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["HostVirtualNicIpRouteSpec"] = reflect.TypeOf((*HostVirtualNicIpRouteSpec)(nil)).Elem()
    +}
    +
    +type HostVirtualNicManagerInfo struct {
    +	DynamicData
    +
    +	NetConfig []VirtualNicManagerNetConfig `xml:"netConfig,omitempty"`
    +}
    +
    +func init() {
    +	t["HostVirtualNicManagerInfo"] = reflect.TypeOf((*HostVirtualNicManagerInfo)(nil)).Elem()
    +}
    +
    +type HostVirtualNicManagerNicTypeSelection struct {
    +	DynamicData
    +
    +	Vnic    HostVirtualNicConnection `xml:"vnic"`
    +	NicType []string                 `xml:"nicType,omitempty"`
    +}
    +
    +func init() {
    +	t["HostVirtualNicManagerNicTypeSelection"] = reflect.TypeOf((*HostVirtualNicManagerNicTypeSelection)(nil)).Elem()
    +}
    +
    +type HostVirtualNicOpaqueNetworkSpec struct {
    +	DynamicData
    +
    +	OpaqueNetworkId   string `xml:"opaqueNetworkId"`
    +	OpaqueNetworkType string `xml:"opaqueNetworkType"`
    +}
    +
    +func init() {
    +	t["HostVirtualNicOpaqueNetworkSpec"] = reflect.TypeOf((*HostVirtualNicOpaqueNetworkSpec)(nil)).Elem()
    +}
    +
    +type HostVirtualNicSpec struct {
    +	DynamicData
    +
    +	Ip                     *HostIpConfig                           `xml:"ip,omitempty"`
    +	Mac                    string                                  `xml:"mac,omitempty"`
    +	DistributedVirtualPort *DistributedVirtualSwitchPortConnection `xml:"distributedVirtualPort,omitempty"`
    +	Portgroup              string                                  `xml:"portgroup,omitempty"`
    +	Mtu                    int32                                   `xml:"mtu,omitempty"`
    +	TsoEnabled             *bool                                   `xml:"tsoEnabled"`
    +	NetStackInstanceKey    string                                  `xml:"netStackInstanceKey,omitempty"`
    +	OpaqueNetwork          *HostVirtualNicOpaqueNetworkSpec        `xml:"opaqueNetwork,omitempty"`
    +	ExternalId             string                                  `xml:"externalId,omitempty"`
    +	PinnedPnic             string                                  `xml:"pinnedPnic,omitempty"`
    +	IpRouteSpec            *HostVirtualNicIpRouteSpec              `xml:"ipRouteSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["HostVirtualNicSpec"] = reflect.TypeOf((*HostVirtualNicSpec)(nil)).Elem()
    +}
    +
    +type HostVirtualSwitch struct {
    +	DynamicData
    +
    +	Name              string                `xml:"name"`
    +	Key               string                `xml:"key"`
    +	NumPorts          int32                 `xml:"numPorts"`
    +	NumPortsAvailable int32                 `xml:"numPortsAvailable"`
    +	Mtu               int32                 `xml:"mtu,omitempty"`
    +	Portgroup         []string              `xml:"portgroup,omitempty"`
    +	Pnic              []string              `xml:"pnic,omitempty"`
    +	Spec              HostVirtualSwitchSpec `xml:"spec"`
    +}
    +
    +func init() {
    +	t["HostVirtualSwitch"] = reflect.TypeOf((*HostVirtualSwitch)(nil)).Elem()
    +}
    +
    +type HostVirtualSwitchAutoBridge struct {
    +	HostVirtualSwitchBridge
    +
    +	ExcludedNicDevice []string `xml:"excludedNicDevice,omitempty"`
    +}
    +
    +func init() {
    +	t["HostVirtualSwitchAutoBridge"] = reflect.TypeOf((*HostVirtualSwitchAutoBridge)(nil)).Elem()
    +}
    +
    +type HostVirtualSwitchBeaconConfig struct {
    +	DynamicData
    +
    +	Interval int32 `xml:"interval"`
    +}
    +
    +func init() {
    +	t["HostVirtualSwitchBeaconConfig"] = reflect.TypeOf((*HostVirtualSwitchBeaconConfig)(nil)).Elem()
    +}
    +
    +type HostVirtualSwitchBondBridge struct {
    +	HostVirtualSwitchBridge
    +
    +	NicDevice                   []string                       `xml:"nicDevice"`
    +	Beacon                      *HostVirtualSwitchBeaconConfig `xml:"beacon,omitempty"`
    +	LinkDiscoveryProtocolConfig *LinkDiscoveryProtocolConfig   `xml:"linkDiscoveryProtocolConfig,omitempty"`
    +}
    +
    +func init() {
    +	t["HostVirtualSwitchBondBridge"] = reflect.TypeOf((*HostVirtualSwitchBondBridge)(nil)).Elem()
    +}
    +
    +type HostVirtualSwitchBridge struct {
    +	DynamicData
    +}
    +
    +func init() {
    +	t["HostVirtualSwitchBridge"] = reflect.TypeOf((*HostVirtualSwitchBridge)(nil)).Elem()
    +}
    +
    +type HostVirtualSwitchConfig struct {
    +	DynamicData
    +
    +	ChangeOperation string                 `xml:"changeOperation,omitempty"`
    +	Name            string                 `xml:"name"`
    +	Spec            *HostVirtualSwitchSpec `xml:"spec,omitempty"`
    +}
    +
    +func init() {
    +	t["HostVirtualSwitchConfig"] = reflect.TypeOf((*HostVirtualSwitchConfig)(nil)).Elem()
    +}
    +
    +type HostVirtualSwitchSimpleBridge struct {
    +	HostVirtualSwitchBridge
    +
    +	NicDevice string `xml:"nicDevice"`
    +}
    +
    +func init() {
    +	t["HostVirtualSwitchSimpleBridge"] = reflect.TypeOf((*HostVirtualSwitchSimpleBridge)(nil)).Elem()
    +}
    +
    +type HostVirtualSwitchSpec struct {
    +	DynamicData
    +
    +	NumPorts int32                       `xml:"numPorts"`
    +	Bridge   BaseHostVirtualSwitchBridge `xml:"bridge,omitempty,typeattr"`
    +	Policy   *HostNetworkPolicy          `xml:"policy,omitempty"`
    +	Mtu      int32                       `xml:"mtu,omitempty"`
    +}
    +
    +func init() {
    +	t["HostVirtualSwitchSpec"] = reflect.TypeOf((*HostVirtualSwitchSpec)(nil)).Elem()
    +}
    +
    +type HostVmciAccessManagerAccessSpec struct {
    +	DynamicData
    +
    +	Vm       ManagedObjectReference `xml:"vm"`
    +	Services []string               `xml:"services,omitempty"`
    +	Mode     string                 `xml:"mode"`
    +}
    +
    +func init() {
    +	t["HostVmciAccessManagerAccessSpec"] = reflect.TypeOf((*HostVmciAccessManagerAccessSpec)(nil)).Elem()
    +}
    +
    +type HostVmfsRescanResult struct {
    +	DynamicData
    +
    +	Host  ManagedObjectReference `xml:"host"`
    +	Fault *LocalizedMethodFault  `xml:"fault,omitempty"`
    +}
    +
    +func init() {
    +	t["HostVmfsRescanResult"] = reflect.TypeOf((*HostVmfsRescanResult)(nil)).Elem()
    +}
    +
    +type HostVmfsSpec struct {
    +	DynamicData
    +
    +	Extent             HostScsiDiskPartition   `xml:"extent"`
    +	BlockSizeMb        int32                   `xml:"blockSizeMb,omitempty"`
    +	MajorVersion       int32                   `xml:"majorVersion"`
    +	VolumeName         string                  `xml:"volumeName"`
    +	BlockSize          int32                   `xml:"blockSize,omitempty"`
    +	UnmapGranularity   int32                   `xml:"unmapGranularity,omitempty"`
    +	UnmapPriority      string                  `xml:"unmapPriority,omitempty"`
    +	UnmapBandwidthSpec *VmfsUnmapBandwidthSpec `xml:"unmapBandwidthSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["HostVmfsSpec"] = reflect.TypeOf((*HostVmfsSpec)(nil)).Elem()
    +}
    +
    +type HostVmfsVolume struct {
    +	HostFileSystemVolume
    +
    +	BlockSizeMb        int32                   `xml:"blockSizeMb"`
    +	BlockSize          int32                   `xml:"blockSize,omitempty"`
    +	UnmapGranularity   int32                   `xml:"unmapGranularity,omitempty"`
    +	UnmapPriority      string                  `xml:"unmapPriority,omitempty"`
    +	UnmapBandwidthSpec *VmfsUnmapBandwidthSpec `xml:"unmapBandwidthSpec,omitempty"`
    +	MaxBlocks          int32                   `xml:"maxBlocks"`
    +	MajorVersion       int32                   `xml:"majorVersion"`
    +	Version            string                  `xml:"version"`
    +	Uuid               string                  `xml:"uuid"`
    +	Extent             []HostScsiDiskPartition `xml:"extent"`
    +	VmfsUpgradable     bool                    `xml:"vmfsUpgradable"`
    +	ForceMountedInfo   *HostForceMountedInfo   `xml:"forceMountedInfo,omitempty"`
    +	Ssd                *bool                   `xml:"ssd"`
    +	Local              *bool                   `xml:"local"`
    +	ScsiDiskType       string                  `xml:"scsiDiskType,omitempty"`
    +}
    +
    +func init() {
    +	t["HostVmfsVolume"] = reflect.TypeOf((*HostVmfsVolume)(nil)).Elem()
    +}
    +
    +type HostVnicConnectedToCustomizedDVPortEvent struct {
    +	HostEvent
    +
    +	Vnic        VnicPortArgument `xml:"vnic"`
    +	PrevPortKey string           `xml:"prevPortKey,omitempty"`
    +}
    +
    +func init() {
    +	t["HostVnicConnectedToCustomizedDVPortEvent"] = reflect.TypeOf((*HostVnicConnectedToCustomizedDVPortEvent)(nil)).Elem()
    +}
    +
    +type HostVsanInternalSystemCmmdsQuery struct {
    +	DynamicData
    +
    +	Type  string `xml:"type,omitempty"`
    +	Uuid  string `xml:"uuid,omitempty"`
    +	Owner string `xml:"owner,omitempty"`
    +}
    +
    +func init() {
    +	t["HostVsanInternalSystemCmmdsQuery"] = reflect.TypeOf((*HostVsanInternalSystemCmmdsQuery)(nil)).Elem()
    +}
    +
    +type HostVsanInternalSystemDeleteVsanObjectsResult struct {
    +	DynamicData
    +
    +	Uuid          string               `xml:"uuid"`
    +	Success       bool                 `xml:"success"`
    +	FailureReason []LocalizableMessage `xml:"failureReason,omitempty"`
    +}
    +
    +func init() {
    +	t["HostVsanInternalSystemDeleteVsanObjectsResult"] = reflect.TypeOf((*HostVsanInternalSystemDeleteVsanObjectsResult)(nil)).Elem()
    +}
    +
    +type HostVsanInternalSystemVsanObjectOperationResult struct {
    +	DynamicData
    +
    +	Uuid          string               `xml:"uuid"`
    +	FailureReason []LocalizableMessage `xml:"failureReason,omitempty"`
    +}
    +
    +func init() {
    +	t["HostVsanInternalSystemVsanObjectOperationResult"] = reflect.TypeOf((*HostVsanInternalSystemVsanObjectOperationResult)(nil)).Elem()
    +}
    +
    +type HostVsanInternalSystemVsanPhysicalDiskDiagnosticsResult struct {
    +	DynamicData
    +
    +	DiskUuid      string `xml:"diskUuid"`
    +	Success       bool   `xml:"success"`
    +	FailureReason string `xml:"failureReason,omitempty"`
    +}
    +
    +func init() {
    +	t["HostVsanInternalSystemVsanPhysicalDiskDiagnosticsResult"] = reflect.TypeOf((*HostVsanInternalSystemVsanPhysicalDiskDiagnosticsResult)(nil)).Elem()
    +}
    +
    +type HostVvolVolume struct {
    +	HostFileSystemVolume
    +
    +	ScId             string                `xml:"scId"`
    +	HostPE           []VVolHostPE          `xml:"hostPE,omitempty"`
    +	VasaProviderInfo []VimVasaProviderInfo `xml:"vasaProviderInfo,omitempty"`
    +	StorageArray     []VASAStorageArray    `xml:"storageArray,omitempty"`
    +}
    +
    +func init() {
    +	t["HostVvolVolume"] = reflect.TypeOf((*HostVvolVolume)(nil)).Elem()
    +}
    +
    +type HostVvolVolumeSpecification struct {
    +	DynamicData
    +
    +	MaxSizeInMB      int64                 `xml:"maxSizeInMB"`
    +	VolumeName       string                `xml:"volumeName"`
    +	VasaProviderInfo []VimVasaProviderInfo `xml:"vasaProviderInfo,omitempty"`
    +	StorageArray     []VASAStorageArray    `xml:"storageArray,omitempty"`
    +	Uuid             string                `xml:"uuid"`
    +}
    +
    +func init() {
    +	t["HostVvolVolumeSpecification"] = reflect.TypeOf((*HostVvolVolumeSpecification)(nil)).Elem()
    +}
    +
    +type HostWwnChangedEvent struct {
    +	HostEvent
    +
    +	OldNodeWwns []int64 `xml:"oldNodeWwns,omitempty"`
    +	OldPortWwns []int64 `xml:"oldPortWwns,omitempty"`
    +	NewNodeWwns []int64 `xml:"newNodeWwns,omitempty"`
    +	NewPortWwns []int64 `xml:"newPortWwns,omitempty"`
    +}
    +
    +func init() {
    +	t["HostWwnChangedEvent"] = reflect.TypeOf((*HostWwnChangedEvent)(nil)).Elem()
    +}
    +
    +type HostWwnConflictEvent struct {
    +	HostEvent
    +
    +	ConflictedVms   []VmEventArgument   `xml:"conflictedVms,omitempty"`
    +	ConflictedHosts []HostEventArgument `xml:"conflictedHosts,omitempty"`
    +	Wwn             int64               `xml:"wwn"`
    +}
    +
    +func init() {
    +	t["HostWwnConflictEvent"] = reflect.TypeOf((*HostWwnConflictEvent)(nil)).Elem()
    +}
    +
    +type HotSnapshotMoveNotSupported struct {
    +	SnapshotCopyNotSupported
    +}
    +
    +func init() {
    +	t["HotSnapshotMoveNotSupported"] = reflect.TypeOf((*HotSnapshotMoveNotSupported)(nil)).Elem()
    +}
    +
    +type HotSnapshotMoveNotSupportedFault HotSnapshotMoveNotSupported
    +
    +func init() {
    +	t["HotSnapshotMoveNotSupportedFault"] = reflect.TypeOf((*HotSnapshotMoveNotSupportedFault)(nil)).Elem()
    +}
    +
    +type HourlyTaskScheduler struct {
    +	RecurrentTaskScheduler
    +
    +	Minute int32 `xml:"minute"`
    +}
    +
    +func init() {
    +	t["HourlyTaskScheduler"] = reflect.TypeOf((*HourlyTaskScheduler)(nil)).Elem()
    +}
    +
    +type HttpFault struct {
    +	VimFault
    +
    +	StatusCode    int32  `xml:"statusCode"`
    +	StatusMessage string `xml:"statusMessage"`
    +}
    +
    +func init() {
    +	t["HttpFault"] = reflect.TypeOf((*HttpFault)(nil)).Elem()
    +}
    +
    +type HttpFaultFault HttpFault
    +
    +func init() {
    +	t["HttpFaultFault"] = reflect.TypeOf((*HttpFaultFault)(nil)).Elem()
    +}
    +
    +type HttpNfcLeaseAbort HttpNfcLeaseAbortRequestType
    +
    +func init() {
    +	t["HttpNfcLeaseAbort"] = reflect.TypeOf((*HttpNfcLeaseAbort)(nil)).Elem()
    +}
    +
    +type HttpNfcLeaseAbortRequestType struct {
    +	This  ManagedObjectReference `xml:"_this"`
    +	Fault *LocalizedMethodFault  `xml:"fault,omitempty"`
    +}
    +
    +func init() {
    +	t["HttpNfcLeaseAbortRequestType"] = reflect.TypeOf((*HttpNfcLeaseAbortRequestType)(nil)).Elem()
    +}
    +
    +type HttpNfcLeaseAbortResponse struct {
    +}
    +
    +type HttpNfcLeaseCapabilities struct {
    +	DynamicData
    +
    +	PullModeSupported bool `xml:"pullModeSupported"`
    +	CorsSupported     bool `xml:"corsSupported"`
    +}
    +
    +func init() {
    +	t["HttpNfcLeaseCapabilities"] = reflect.TypeOf((*HttpNfcLeaseCapabilities)(nil)).Elem()
    +}
    +
    +type HttpNfcLeaseComplete HttpNfcLeaseCompleteRequestType
    +
    +func init() {
    +	t["HttpNfcLeaseComplete"] = reflect.TypeOf((*HttpNfcLeaseComplete)(nil)).Elem()
    +}
    +
    +type HttpNfcLeaseCompleteRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["HttpNfcLeaseCompleteRequestType"] = reflect.TypeOf((*HttpNfcLeaseCompleteRequestType)(nil)).Elem()
    +}
    +
    +type HttpNfcLeaseCompleteResponse struct {
    +}
    +
    +type HttpNfcLeaseDatastoreLeaseInfo struct {
    +	DynamicData
    +
    +	DatastoreKey string                 `xml:"datastoreKey"`
    +	Hosts        []HttpNfcLeaseHostInfo `xml:"hosts"`
    +}
    +
    +func init() {
    +	t["HttpNfcLeaseDatastoreLeaseInfo"] = reflect.TypeOf((*HttpNfcLeaseDatastoreLeaseInfo)(nil)).Elem()
    +}
    +
    +type HttpNfcLeaseDeviceUrl struct {
    +	DynamicData
    +
    +	Key           string `xml:"key"`
    +	ImportKey     string `xml:"importKey"`
    +	Url           string `xml:"url"`
    +	SslThumbprint string `xml:"sslThumbprint"`
    +	Disk          *bool  `xml:"disk"`
    +	TargetId      string `xml:"targetId,omitempty"`
    +	DatastoreKey  string `xml:"datastoreKey,omitempty"`
    +	FileSize      int64  `xml:"fileSize,omitempty"`
    +}
    +
    +func init() {
    +	t["HttpNfcLeaseDeviceUrl"] = reflect.TypeOf((*HttpNfcLeaseDeviceUrl)(nil)).Elem()
    +}
    +
    +type HttpNfcLeaseGetManifest HttpNfcLeaseGetManifestRequestType
    +
    +func init() {
    +	t["HttpNfcLeaseGetManifest"] = reflect.TypeOf((*HttpNfcLeaseGetManifest)(nil)).Elem()
    +}
    +
    +type HttpNfcLeaseGetManifestRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["HttpNfcLeaseGetManifestRequestType"] = reflect.TypeOf((*HttpNfcLeaseGetManifestRequestType)(nil)).Elem()
    +}
    +
    +type HttpNfcLeaseGetManifestResponse struct {
    +	Returnval []HttpNfcLeaseManifestEntry `xml:"returnval,omitempty"`
    +}
    +
    +type HttpNfcLeaseHostInfo struct {
    +	DynamicData
    +
    +	Url           string `xml:"url"`
    +	SslThumbprint string `xml:"sslThumbprint"`
    +}
    +
    +func init() {
    +	t["HttpNfcLeaseHostInfo"] = reflect.TypeOf((*HttpNfcLeaseHostInfo)(nil)).Elem()
    +}
    +
    +type HttpNfcLeaseInfo struct {
    +	DynamicData
    +
    +	Lease                 ManagedObjectReference           `xml:"lease"`
    +	Entity                ManagedObjectReference           `xml:"entity"`
    +	DeviceUrl             []HttpNfcLeaseDeviceUrl          `xml:"deviceUrl,omitempty"`
    +	TotalDiskCapacityInKB int64                            `xml:"totalDiskCapacityInKB"`
    +	LeaseTimeout          int32                            `xml:"leaseTimeout"`
    +	HostMap               []HttpNfcLeaseDatastoreLeaseInfo `xml:"hostMap,omitempty"`
    +}
    +
    +func init() {
    +	t["HttpNfcLeaseInfo"] = reflect.TypeOf((*HttpNfcLeaseInfo)(nil)).Elem()
    +}
    +
    +type HttpNfcLeaseManifestEntry struct {
    +	DynamicData
    +
    +	Key           string `xml:"key"`
    +	Sha1          string `xml:"sha1"`
    +	Checksum      string `xml:"checksum,omitempty"`
    +	ChecksumType  string `xml:"checksumType,omitempty"`
    +	Size          int64  `xml:"size"`
    +	Disk          bool   `xml:"disk"`
    +	Capacity      int64  `xml:"capacity,omitempty"`
    +	PopulatedSize int64  `xml:"populatedSize,omitempty"`
    +}
    +
    +func init() {
    +	t["HttpNfcLeaseManifestEntry"] = reflect.TypeOf((*HttpNfcLeaseManifestEntry)(nil)).Elem()
    +}
    +
    +type HttpNfcLeaseProgress HttpNfcLeaseProgressRequestType
    +
    +func init() {
    +	t["HttpNfcLeaseProgress"] = reflect.TypeOf((*HttpNfcLeaseProgress)(nil)).Elem()
    +}
    +
    +type HttpNfcLeaseProgressRequestType struct {
    +	This    ManagedObjectReference `xml:"_this"`
    +	Percent int32                  `xml:"percent"`
    +}
    +
    +func init() {
    +	t["HttpNfcLeaseProgressRequestType"] = reflect.TypeOf((*HttpNfcLeaseProgressRequestType)(nil)).Elem()
    +}
    +
    +type HttpNfcLeaseProgressResponse struct {
    +}
    +
    +type HttpNfcLeasePullFromUrlsRequestType struct {
    +	This  ManagedObjectReference   `xml:"_this"`
    +	Files []HttpNfcLeaseSourceFile `xml:"files,omitempty"`
    +}
    +
    +func init() {
    +	t["HttpNfcLeasePullFromUrlsRequestType"] = reflect.TypeOf((*HttpNfcLeasePullFromUrlsRequestType)(nil)).Elem()
    +}
    +
    +type HttpNfcLeasePullFromUrls_Task HttpNfcLeasePullFromUrlsRequestType
    +
    +func init() {
    +	t["HttpNfcLeasePullFromUrls_Task"] = reflect.TypeOf((*HttpNfcLeasePullFromUrls_Task)(nil)).Elem()
    +}
    +
    +type HttpNfcLeasePullFromUrls_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type HttpNfcLeaseSetManifestChecksumType HttpNfcLeaseSetManifestChecksumTypeRequestType
    +
    +func init() {
    +	t["HttpNfcLeaseSetManifestChecksumType"] = reflect.TypeOf((*HttpNfcLeaseSetManifestChecksumType)(nil)).Elem()
    +}
    +
    +type HttpNfcLeaseSetManifestChecksumTypeRequestType struct {
    +	This                      ManagedObjectReference `xml:"_this"`
    +	DeviceUrlsToChecksumTypes []KeyValue             `xml:"deviceUrlsToChecksumTypes,omitempty"`
    +}
    +
    +func init() {
    +	t["HttpNfcLeaseSetManifestChecksumTypeRequestType"] = reflect.TypeOf((*HttpNfcLeaseSetManifestChecksumTypeRequestType)(nil)).Elem()
    +}
    +
    +type HttpNfcLeaseSetManifestChecksumTypeResponse struct {
    +}
    +
    +type HttpNfcLeaseSourceFile struct {
    +	DynamicData
    +
    +	TargetDeviceId string     `xml:"targetDeviceId"`
    +	Url            string     `xml:"url"`
    +	MemberName     string     `xml:"memberName,omitempty"`
    +	Create         bool       `xml:"create"`
    +	SslThumbprint  string     `xml:"sslThumbprint,omitempty"`
    +	HttpHeaders    []KeyValue `xml:"httpHeaders,omitempty"`
    +	Size           int64      `xml:"size,omitempty"`
    +}
    +
    +func init() {
    +	t["HttpNfcLeaseSourceFile"] = reflect.TypeOf((*HttpNfcLeaseSourceFile)(nil)).Elem()
    +}
    +
    +type ID struct {
    +	DynamicData
    +
    +	Id string `xml:"id"`
    +}
    +
    +func init() {
    +	t["ID"] = reflect.TypeOf((*ID)(nil)).Elem()
    +}
    +
    +type IDEDiskNotSupported struct {
    +	DiskNotSupported
    +}
    +
    +func init() {
    +	t["IDEDiskNotSupported"] = reflect.TypeOf((*IDEDiskNotSupported)(nil)).Elem()
    +}
    +
    +type IDEDiskNotSupportedFault IDEDiskNotSupported
    +
    +func init() {
    +	t["IDEDiskNotSupportedFault"] = reflect.TypeOf((*IDEDiskNotSupportedFault)(nil)).Elem()
    +}
    +
    +type IORMNotSupportedHostOnDatastore struct {
    +	VimFault
    +
    +	Datastore     ManagedObjectReference   `xml:"datastore"`
    +	DatastoreName string                   `xml:"datastoreName"`
    +	Host          []ManagedObjectReference `xml:"host,omitempty"`
    +}
    +
    +func init() {
    +	t["IORMNotSupportedHostOnDatastore"] = reflect.TypeOf((*IORMNotSupportedHostOnDatastore)(nil)).Elem()
    +}
    +
    +type IORMNotSupportedHostOnDatastoreFault IORMNotSupportedHostOnDatastore
    +
    +func init() {
    +	t["IORMNotSupportedHostOnDatastoreFault"] = reflect.TypeOf((*IORMNotSupportedHostOnDatastoreFault)(nil)).Elem()
    +}
    +
    +type IScsiBootFailureEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["IScsiBootFailureEvent"] = reflect.TypeOf((*IScsiBootFailureEvent)(nil)).Elem()
    +}
    +
    +type ImpersonateUser ImpersonateUserRequestType
    +
    +func init() {
    +	t["ImpersonateUser"] = reflect.TypeOf((*ImpersonateUser)(nil)).Elem()
    +}
    +
    +type ImpersonateUserRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	UserName string                 `xml:"userName"`
    +	Locale   string                 `xml:"locale,omitempty"`
    +}
    +
    +func init() {
    +	t["ImpersonateUserRequestType"] = reflect.TypeOf((*ImpersonateUserRequestType)(nil)).Elem()
    +}
    +
    +type ImpersonateUserResponse struct {
    +	Returnval UserSession `xml:"returnval"`
    +}
    +
    +type ImportCertificateForCAMRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	CertPath  string                 `xml:"certPath"`
    +	CamServer string                 `xml:"camServer"`
    +}
    +
    +func init() {
    +	t["ImportCertificateForCAMRequestType"] = reflect.TypeOf((*ImportCertificateForCAMRequestType)(nil)).Elem()
    +}
    +
    +type ImportCertificateForCAM_Task ImportCertificateForCAMRequestType
    +
    +func init() {
    +	t["ImportCertificateForCAM_Task"] = reflect.TypeOf((*ImportCertificateForCAM_Task)(nil)).Elem()
    +}
    +
    +type ImportCertificateForCAM_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type ImportHostAddFailure struct {
    +	DvsFault
    +
    +	HostIp []string `xml:"hostIp"`
    +}
    +
    +func init() {
    +	t["ImportHostAddFailure"] = reflect.TypeOf((*ImportHostAddFailure)(nil)).Elem()
    +}
    +
    +type ImportHostAddFailureFault ImportHostAddFailure
    +
    +func init() {
    +	t["ImportHostAddFailureFault"] = reflect.TypeOf((*ImportHostAddFailureFault)(nil)).Elem()
    +}
    +
    +type ImportOperationBulkFault struct {
    +	DvsFault
    +
    +	ImportFaults []ImportOperationBulkFaultFaultOnImport `xml:"importFaults"`
    +}
    +
    +func init() {
    +	t["ImportOperationBulkFault"] = reflect.TypeOf((*ImportOperationBulkFault)(nil)).Elem()
    +}
    +
    +type ImportOperationBulkFaultFault ImportOperationBulkFault
    +
    +func init() {
    +	t["ImportOperationBulkFaultFault"] = reflect.TypeOf((*ImportOperationBulkFaultFault)(nil)).Elem()
    +}
    +
    +type ImportOperationBulkFaultFaultOnImport struct {
    +	DynamicData
    +
    +	EntityType string               `xml:"entityType,omitempty"`
    +	Key        string               `xml:"key,omitempty"`
    +	Fault      LocalizedMethodFault `xml:"fault"`
    +}
    +
    +func init() {
    +	t["ImportOperationBulkFaultFaultOnImport"] = reflect.TypeOf((*ImportOperationBulkFaultFaultOnImport)(nil)).Elem()
    +}
    +
    +type ImportSpec struct {
    +	DynamicData
    +
    +	EntityConfig     *VAppEntityConfigInfo `xml:"entityConfig,omitempty"`
    +	InstantiationOst *OvfConsumerOstNode   `xml:"instantiationOst,omitempty"`
    +}
    +
    +func init() {
    +	t["ImportSpec"] = reflect.TypeOf((*ImportSpec)(nil)).Elem()
    +}
    +
    +type ImportUnmanagedSnapshot ImportUnmanagedSnapshotRequestType
    +
    +func init() {
    +	t["ImportUnmanagedSnapshot"] = reflect.TypeOf((*ImportUnmanagedSnapshot)(nil)).Elem()
    +}
    +
    +type ImportUnmanagedSnapshotRequestType struct {
    +	This       ManagedObjectReference  `xml:"_this"`
    +	Vdisk      string                  `xml:"vdisk"`
    +	Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"`
    +	VvolId     string                  `xml:"vvolId"`
    +}
    +
    +func init() {
    +	t["ImportUnmanagedSnapshotRequestType"] = reflect.TypeOf((*ImportUnmanagedSnapshotRequestType)(nil)).Elem()
    +}
    +
    +type ImportUnmanagedSnapshotResponse struct {
    +}
    +
    +type ImportVApp ImportVAppRequestType
    +
    +func init() {
    +	t["ImportVApp"] = reflect.TypeOf((*ImportVApp)(nil)).Elem()
    +}
    +
    +type ImportVAppRequestType struct {
    +	This   ManagedObjectReference  `xml:"_this"`
    +	Spec   BaseImportSpec          `xml:"spec,typeattr"`
    +	Folder *ManagedObjectReference `xml:"folder,omitempty"`
    +	Host   *ManagedObjectReference `xml:"host,omitempty"`
    +}
    +
    +func init() {
    +	t["ImportVAppRequestType"] = reflect.TypeOf((*ImportVAppRequestType)(nil)).Elem()
    +}
    +
    +type ImportVAppResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type InUseFeatureManipulationDisallowed struct {
    +	NotEnoughLicenses
    +}
    +
    +func init() {
    +	t["InUseFeatureManipulationDisallowed"] = reflect.TypeOf((*InUseFeatureManipulationDisallowed)(nil)).Elem()
    +}
    +
    +type InUseFeatureManipulationDisallowedFault InUseFeatureManipulationDisallowed
    +
    +func init() {
    +	t["InUseFeatureManipulationDisallowedFault"] = reflect.TypeOf((*InUseFeatureManipulationDisallowedFault)(nil)).Elem()
    +}
    +
    +type InaccessibleDatastore struct {
    +	InvalidDatastore
    +
    +	Detail string `xml:"detail,omitempty"`
    +}
    +
    +func init() {
    +	t["InaccessibleDatastore"] = reflect.TypeOf((*InaccessibleDatastore)(nil)).Elem()
    +}
    +
    +type InaccessibleDatastoreFault BaseInaccessibleDatastore
    +
    +func init() {
    +	t["InaccessibleDatastoreFault"] = reflect.TypeOf((*InaccessibleDatastoreFault)(nil)).Elem()
    +}
    +
    +type InaccessibleFTMetadataDatastore struct {
    +	InaccessibleDatastore
    +}
    +
    +func init() {
    +	t["InaccessibleFTMetadataDatastore"] = reflect.TypeOf((*InaccessibleFTMetadataDatastore)(nil)).Elem()
    +}
    +
    +type InaccessibleFTMetadataDatastoreFault InaccessibleFTMetadataDatastore
    +
    +func init() {
    +	t["InaccessibleFTMetadataDatastoreFault"] = reflect.TypeOf((*InaccessibleFTMetadataDatastoreFault)(nil)).Elem()
    +}
    +
    +type InaccessibleVFlashSource struct {
    +	VimFault
    +
    +	HostName string `xml:"hostName"`
    +}
    +
    +func init() {
    +	t["InaccessibleVFlashSource"] = reflect.TypeOf((*InaccessibleVFlashSource)(nil)).Elem()
    +}
    +
    +type InaccessibleVFlashSourceFault InaccessibleVFlashSource
    +
    +func init() {
    +	t["InaccessibleVFlashSourceFault"] = reflect.TypeOf((*InaccessibleVFlashSourceFault)(nil)).Elem()
    +}
    +
    +type IncompatibleDefaultDevice struct {
    +	MigrationFault
    +
    +	Device string `xml:"device"`
    +}
    +
    +func init() {
    +	t["IncompatibleDefaultDevice"] = reflect.TypeOf((*IncompatibleDefaultDevice)(nil)).Elem()
    +}
    +
    +type IncompatibleDefaultDeviceFault IncompatibleDefaultDevice
    +
    +func init() {
    +	t["IncompatibleDefaultDeviceFault"] = reflect.TypeOf((*IncompatibleDefaultDeviceFault)(nil)).Elem()
    +}
    +
    +type IncompatibleHostForFtSecondary struct {
    +	VmFaultToleranceIssue
    +
    +	Host  ManagedObjectReference `xml:"host"`
    +	Error []LocalizedMethodFault `xml:"error,omitempty"`
    +}
    +
    +func init() {
    +	t["IncompatibleHostForFtSecondary"] = reflect.TypeOf((*IncompatibleHostForFtSecondary)(nil)).Elem()
    +}
    +
    +type IncompatibleHostForFtSecondaryFault IncompatibleHostForFtSecondary
    +
    +func init() {
    +	t["IncompatibleHostForFtSecondaryFault"] = reflect.TypeOf((*IncompatibleHostForFtSecondaryFault)(nil)).Elem()
    +}
    +
    +type IncompatibleHostForVmReplication struct {
    +	ReplicationFault
    +
    +	VmName   string `xml:"vmName"`
    +	HostName string `xml:"hostName"`
    +	Reason   string `xml:"reason"`
    +}
    +
    +func init() {
    +	t["IncompatibleHostForVmReplication"] = reflect.TypeOf((*IncompatibleHostForVmReplication)(nil)).Elem()
    +}
    +
    +type IncompatibleHostForVmReplicationFault IncompatibleHostForVmReplication
    +
    +func init() {
    +	t["IncompatibleHostForVmReplicationFault"] = reflect.TypeOf((*IncompatibleHostForVmReplicationFault)(nil)).Elem()
    +}
    +
    +type IncompatibleSetting struct {
    +	InvalidArgument
    +
    +	ConflictingProperty string `xml:"conflictingProperty"`
    +}
    +
    +func init() {
    +	t["IncompatibleSetting"] = reflect.TypeOf((*IncompatibleSetting)(nil)).Elem()
    +}
    +
    +type IncompatibleSettingFault IncompatibleSetting
    +
    +func init() {
    +	t["IncompatibleSettingFault"] = reflect.TypeOf((*IncompatibleSettingFault)(nil)).Elem()
    +}
    +
    +type IncorrectFileType struct {
    +	FileFault
    +}
    +
    +func init() {
    +	t["IncorrectFileType"] = reflect.TypeOf((*IncorrectFileType)(nil)).Elem()
    +}
    +
    +type IncorrectFileTypeFault IncorrectFileType
    +
    +func init() {
    +	t["IncorrectFileTypeFault"] = reflect.TypeOf((*IncorrectFileTypeFault)(nil)).Elem()
    +}
    +
    +type IncorrectHostInformation struct {
    +	NotEnoughLicenses
    +}
    +
    +func init() {
    +	t["IncorrectHostInformation"] = reflect.TypeOf((*IncorrectHostInformation)(nil)).Elem()
    +}
    +
    +type IncorrectHostInformationEvent struct {
    +	LicenseEvent
    +}
    +
    +func init() {
    +	t["IncorrectHostInformationEvent"] = reflect.TypeOf((*IncorrectHostInformationEvent)(nil)).Elem()
    +}
    +
    +type IncorrectHostInformationFault IncorrectHostInformation
    +
    +func init() {
    +	t["IncorrectHostInformationFault"] = reflect.TypeOf((*IncorrectHostInformationFault)(nil)).Elem()
    +}
    +
    +type IndependentDiskVMotionNotSupported struct {
    +	MigrationFeatureNotSupported
    +}
    +
    +func init() {
    +	t["IndependentDiskVMotionNotSupported"] = reflect.TypeOf((*IndependentDiskVMotionNotSupported)(nil)).Elem()
    +}
    +
    +type IndependentDiskVMotionNotSupportedFault IndependentDiskVMotionNotSupported
    +
    +func init() {
    +	t["IndependentDiskVMotionNotSupportedFault"] = reflect.TypeOf((*IndependentDiskVMotionNotSupportedFault)(nil)).Elem()
    +}
    +
    +type InflateDiskRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	Id        ID                     `xml:"id"`
    +	Datastore ManagedObjectReference `xml:"datastore"`
    +}
    +
    +func init() {
    +	t["InflateDiskRequestType"] = reflect.TypeOf((*InflateDiskRequestType)(nil)).Elem()
    +}
    +
    +type InflateDisk_Task InflateDiskRequestType
    +
    +func init() {
    +	t["InflateDisk_Task"] = reflect.TypeOf((*InflateDisk_Task)(nil)).Elem()
    +}
    +
    +type InflateDisk_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type InflateVirtualDiskRequestType struct {
    +	This       ManagedObjectReference  `xml:"_this"`
    +	Name       string                  `xml:"name"`
    +	Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"`
    +}
    +
    +func init() {
    +	t["InflateVirtualDiskRequestType"] = reflect.TypeOf((*InflateVirtualDiskRequestType)(nil)).Elem()
    +}
    +
    +type InflateVirtualDisk_Task InflateVirtualDiskRequestType
    +
    +func init() {
    +	t["InflateVirtualDisk_Task"] = reflect.TypeOf((*InflateVirtualDisk_Task)(nil)).Elem()
    +}
    +
    +type InflateVirtualDisk_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type InfoUpgradeEvent struct {
    +	UpgradeEvent
    +}
    +
    +func init() {
    +	t["InfoUpgradeEvent"] = reflect.TypeOf((*InfoUpgradeEvent)(nil)).Elem()
    +}
    +
    +type InheritablePolicy struct {
    +	DynamicData
    +
    +	Inherited bool `xml:"inherited"`
    +}
    +
    +func init() {
    +	t["InheritablePolicy"] = reflect.TypeOf((*InheritablePolicy)(nil)).Elem()
    +}
    +
    +type InitializeDisksRequestType struct {
    +	This    ManagedObjectReference `xml:"_this"`
    +	Mapping []VsanHostDiskMapping  `xml:"mapping"`
    +}
    +
    +func init() {
    +	t["InitializeDisksRequestType"] = reflect.TypeOf((*InitializeDisksRequestType)(nil)).Elem()
    +}
    +
    +type InitializeDisks_Task InitializeDisksRequestType
    +
    +func init() {
    +	t["InitializeDisks_Task"] = reflect.TypeOf((*InitializeDisks_Task)(nil)).Elem()
    +}
    +
    +type InitializeDisks_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type InitiateFileTransferFromGuest InitiateFileTransferFromGuestRequestType
    +
    +func init() {
    +	t["InitiateFileTransferFromGuest"] = reflect.TypeOf((*InitiateFileTransferFromGuest)(nil)).Elem()
    +}
    +
    +type InitiateFileTransferFromGuestRequestType struct {
    +	This          ManagedObjectReference  `xml:"_this"`
    +	Vm            ManagedObjectReference  `xml:"vm"`
    +	Auth          BaseGuestAuthentication `xml:"auth,typeattr"`
    +	GuestFilePath string                  `xml:"guestFilePath"`
    +}
    +
    +func init() {
    +	t["InitiateFileTransferFromGuestRequestType"] = reflect.TypeOf((*InitiateFileTransferFromGuestRequestType)(nil)).Elem()
    +}
    +
    +type InitiateFileTransferFromGuestResponse struct {
    +	Returnval FileTransferInformation `xml:"returnval"`
    +}
    +
    +type InitiateFileTransferToGuest InitiateFileTransferToGuestRequestType
    +
    +func init() {
    +	t["InitiateFileTransferToGuest"] = reflect.TypeOf((*InitiateFileTransferToGuest)(nil)).Elem()
    +}
    +
    +type InitiateFileTransferToGuestRequestType struct {
    +	This           ManagedObjectReference  `xml:"_this"`
    +	Vm             ManagedObjectReference  `xml:"vm"`
    +	Auth           BaseGuestAuthentication `xml:"auth,typeattr"`
    +	GuestFilePath  string                  `xml:"guestFilePath"`
    +	FileAttributes BaseGuestFileAttributes `xml:"fileAttributes,typeattr"`
    +	FileSize       int64                   `xml:"fileSize"`
    +	Overwrite      bool                    `xml:"overwrite"`
    +}
    +
    +func init() {
    +	t["InitiateFileTransferToGuestRequestType"] = reflect.TypeOf((*InitiateFileTransferToGuestRequestType)(nil)).Elem()
    +}
    +
    +type InitiateFileTransferToGuestResponse struct {
    +	Returnval string `xml:"returnval"`
    +}
    +
    +type InstallHostPatchRequestType struct {
    +	This       ManagedObjectReference  `xml:"_this"`
    +	Repository HostPatchManagerLocator `xml:"repository"`
    +	UpdateID   string                  `xml:"updateID"`
    +	Force      *bool                   `xml:"force"`
    +}
    +
    +func init() {
    +	t["InstallHostPatchRequestType"] = reflect.TypeOf((*InstallHostPatchRequestType)(nil)).Elem()
    +}
    +
    +type InstallHostPatchV2RequestType struct {
    +	This       ManagedObjectReference                     `xml:"_this"`
    +	MetaUrls   []string                                   `xml:"metaUrls,omitempty"`
    +	BundleUrls []string                                   `xml:"bundleUrls,omitempty"`
    +	VibUrls    []string                                   `xml:"vibUrls,omitempty"`
    +	Spec       *HostPatchManagerPatchManagerOperationSpec `xml:"spec,omitempty"`
    +}
    +
    +func init() {
    +	t["InstallHostPatchV2RequestType"] = reflect.TypeOf((*InstallHostPatchV2RequestType)(nil)).Elem()
    +}
    +
    +type InstallHostPatchV2_Task InstallHostPatchV2RequestType
    +
    +func init() {
    +	t["InstallHostPatchV2_Task"] = reflect.TypeOf((*InstallHostPatchV2_Task)(nil)).Elem()
    +}
    +
    +type InstallHostPatchV2_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type InstallHostPatch_Task InstallHostPatchRequestType
    +
    +func init() {
    +	t["InstallHostPatch_Task"] = reflect.TypeOf((*InstallHostPatch_Task)(nil)).Elem()
    +}
    +
    +type InstallHostPatch_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type InstallIoFilterRequestType struct {
    +	This    ManagedObjectReference `xml:"_this"`
    +	VibUrl  string                 `xml:"vibUrl"`
    +	CompRes ManagedObjectReference `xml:"compRes"`
    +}
    +
    +func init() {
    +	t["InstallIoFilterRequestType"] = reflect.TypeOf((*InstallIoFilterRequestType)(nil)).Elem()
    +}
    +
    +type InstallIoFilter_Task InstallIoFilterRequestType
    +
    +func init() {
    +	t["InstallIoFilter_Task"] = reflect.TypeOf((*InstallIoFilter_Task)(nil)).Elem()
    +}
    +
    +type InstallIoFilter_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type InstallServerCertificate InstallServerCertificateRequestType
    +
    +func init() {
    +	t["InstallServerCertificate"] = reflect.TypeOf((*InstallServerCertificate)(nil)).Elem()
    +}
    +
    +type InstallServerCertificateRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Cert string                 `xml:"cert"`
    +}
    +
    +func init() {
    +	t["InstallServerCertificateRequestType"] = reflect.TypeOf((*InstallServerCertificateRequestType)(nil)).Elem()
    +}
    +
    +type InstallServerCertificateResponse struct {
    +}
    +
    +type InstallSmartCardTrustAnchor InstallSmartCardTrustAnchorRequestType
    +
    +func init() {
    +	t["InstallSmartCardTrustAnchor"] = reflect.TypeOf((*InstallSmartCardTrustAnchor)(nil)).Elem()
    +}
    +
    +type InstallSmartCardTrustAnchorRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Cert string                 `xml:"cert"`
    +}
    +
    +func init() {
    +	t["InstallSmartCardTrustAnchorRequestType"] = reflect.TypeOf((*InstallSmartCardTrustAnchorRequestType)(nil)).Elem()
    +}
    +
    +type InstallSmartCardTrustAnchorResponse struct {
    +}
    +
    +type InstantCloneRequestType struct {
    +	This ManagedObjectReference         `xml:"_this"`
    +	Spec VirtualMachineInstantCloneSpec `xml:"spec"`
    +}
    +
    +func init() {
    +	t["InstantCloneRequestType"] = reflect.TypeOf((*InstantCloneRequestType)(nil)).Elem()
    +}
    +
    +type InstantClone_Task InstantCloneRequestType
    +
    +func init() {
    +	t["InstantClone_Task"] = reflect.TypeOf((*InstantClone_Task)(nil)).Elem()
    +}
    +
    +type InstantClone_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type InsufficientAgentVmsDeployed struct {
    +	InsufficientResourcesFault
    +
    +	HostName            string `xml:"hostName"`
    +	RequiredNumAgentVms int32  `xml:"requiredNumAgentVms"`
    +	CurrentNumAgentVms  int32  `xml:"currentNumAgentVms"`
    +}
    +
    +func init() {
    +	t["InsufficientAgentVmsDeployed"] = reflect.TypeOf((*InsufficientAgentVmsDeployed)(nil)).Elem()
    +}
    +
    +type InsufficientAgentVmsDeployedFault InsufficientAgentVmsDeployed
    +
    +func init() {
    +	t["InsufficientAgentVmsDeployedFault"] = reflect.TypeOf((*InsufficientAgentVmsDeployedFault)(nil)).Elem()
    +}
    +
    +type InsufficientCpuResourcesFault struct {
    +	InsufficientResourcesFault
    +
    +	Unreserved int64 `xml:"unreserved"`
    +	Requested  int64 `xml:"requested"`
    +}
    +
    +func init() {
    +	t["InsufficientCpuResourcesFault"] = reflect.TypeOf((*InsufficientCpuResourcesFault)(nil)).Elem()
    +}
    +
    +type InsufficientCpuResourcesFaultFault InsufficientCpuResourcesFault
    +
    +func init() {
    +	t["InsufficientCpuResourcesFaultFault"] = reflect.TypeOf((*InsufficientCpuResourcesFaultFault)(nil)).Elem()
    +}
    +
    +type InsufficientDisks struct {
    +	VsanDiskFault
    +}
    +
    +func init() {
    +	t["InsufficientDisks"] = reflect.TypeOf((*InsufficientDisks)(nil)).Elem()
    +}
    +
    +type InsufficientDisksFault InsufficientDisks
    +
    +func init() {
    +	t["InsufficientDisksFault"] = reflect.TypeOf((*InsufficientDisksFault)(nil)).Elem()
    +}
    +
    +type InsufficientFailoverResourcesEvent struct {
    +	ClusterEvent
    +}
    +
    +func init() {
    +	t["InsufficientFailoverResourcesEvent"] = reflect.TypeOf((*InsufficientFailoverResourcesEvent)(nil)).Elem()
    +}
    +
    +type InsufficientFailoverResourcesFault struct {
    +	InsufficientResourcesFault
    +}
    +
    +func init() {
    +	t["InsufficientFailoverResourcesFault"] = reflect.TypeOf((*InsufficientFailoverResourcesFault)(nil)).Elem()
    +}
    +
    +type InsufficientFailoverResourcesFaultFault InsufficientFailoverResourcesFault
    +
    +func init() {
    +	t["InsufficientFailoverResourcesFaultFault"] = reflect.TypeOf((*InsufficientFailoverResourcesFaultFault)(nil)).Elem()
    +}
    +
    +type InsufficientGraphicsResourcesFault struct {
    +	InsufficientResourcesFault
    +}
    +
    +func init() {
    +	t["InsufficientGraphicsResourcesFault"] = reflect.TypeOf((*InsufficientGraphicsResourcesFault)(nil)).Elem()
    +}
    +
    +type InsufficientGraphicsResourcesFaultFault InsufficientGraphicsResourcesFault
    +
    +func init() {
    +	t["InsufficientGraphicsResourcesFaultFault"] = reflect.TypeOf((*InsufficientGraphicsResourcesFaultFault)(nil)).Elem()
    +}
    +
    +type InsufficientHostCapacityFault struct {
    +	InsufficientResourcesFault
    +
    +	Host *ManagedObjectReference `xml:"host,omitempty"`
    +}
    +
    +func init() {
    +	t["InsufficientHostCapacityFault"] = reflect.TypeOf((*InsufficientHostCapacityFault)(nil)).Elem()
    +}
    +
    +type InsufficientHostCapacityFaultFault BaseInsufficientHostCapacityFault
    +
    +func init() {
    +	t["InsufficientHostCapacityFaultFault"] = reflect.TypeOf((*InsufficientHostCapacityFaultFault)(nil)).Elem()
    +}
    +
    +type InsufficientHostCpuCapacityFault struct {
    +	InsufficientHostCapacityFault
    +
    +	Unreserved int64 `xml:"unreserved"`
    +	Requested  int64 `xml:"requested"`
    +}
    +
    +func init() {
    +	t["InsufficientHostCpuCapacityFault"] = reflect.TypeOf((*InsufficientHostCpuCapacityFault)(nil)).Elem()
    +}
    +
    +type InsufficientHostCpuCapacityFaultFault InsufficientHostCpuCapacityFault
    +
    +func init() {
    +	t["InsufficientHostCpuCapacityFaultFault"] = reflect.TypeOf((*InsufficientHostCpuCapacityFaultFault)(nil)).Elem()
    +}
    +
    +type InsufficientHostMemoryCapacityFault struct {
    +	InsufficientHostCapacityFault
    +
    +	Unreserved int64 `xml:"unreserved"`
    +	Requested  int64 `xml:"requested"`
    +}
    +
    +func init() {
    +	t["InsufficientHostMemoryCapacityFault"] = reflect.TypeOf((*InsufficientHostMemoryCapacityFault)(nil)).Elem()
    +}
    +
    +type InsufficientHostMemoryCapacityFaultFault InsufficientHostMemoryCapacityFault
    +
    +func init() {
    +	t["InsufficientHostMemoryCapacityFaultFault"] = reflect.TypeOf((*InsufficientHostMemoryCapacityFaultFault)(nil)).Elem()
    +}
    +
    +type InsufficientMemoryResourcesFault struct {
    +	InsufficientResourcesFault
    +
    +	Unreserved int64 `xml:"unreserved"`
    +	Requested  int64 `xml:"requested"`
    +}
    +
    +func init() {
    +	t["InsufficientMemoryResourcesFault"] = reflect.TypeOf((*InsufficientMemoryResourcesFault)(nil)).Elem()
    +}
    +
    +type InsufficientMemoryResourcesFaultFault InsufficientMemoryResourcesFault
    +
    +func init() {
    +	t["InsufficientMemoryResourcesFaultFault"] = reflect.TypeOf((*InsufficientMemoryResourcesFaultFault)(nil)).Elem()
    +}
    +
    +type InsufficientNetworkCapacity struct {
    +	InsufficientResourcesFault
    +}
    +
    +func init() {
    +	t["InsufficientNetworkCapacity"] = reflect.TypeOf((*InsufficientNetworkCapacity)(nil)).Elem()
    +}
    +
    +type InsufficientNetworkCapacityFault InsufficientNetworkCapacity
    +
    +func init() {
    +	t["InsufficientNetworkCapacityFault"] = reflect.TypeOf((*InsufficientNetworkCapacityFault)(nil)).Elem()
    +}
    +
    +type InsufficientNetworkResourcePoolCapacity struct {
    +	InsufficientResourcesFault
    +
    +	DvsName         string   `xml:"dvsName"`
    +	DvsUuid         string   `xml:"dvsUuid"`
    +	ResourcePoolKey string   `xml:"resourcePoolKey"`
    +	Available       int64    `xml:"available"`
    +	Requested       int64    `xml:"requested"`
    +	Device          []string `xml:"device"`
    +}
    +
    +func init() {
    +	t["InsufficientNetworkResourcePoolCapacity"] = reflect.TypeOf((*InsufficientNetworkResourcePoolCapacity)(nil)).Elem()
    +}
    +
    +type InsufficientNetworkResourcePoolCapacityFault InsufficientNetworkResourcePoolCapacity
    +
    +func init() {
    +	t["InsufficientNetworkResourcePoolCapacityFault"] = reflect.TypeOf((*InsufficientNetworkResourcePoolCapacityFault)(nil)).Elem()
    +}
    +
    +type InsufficientPerCpuCapacity struct {
    +	InsufficientHostCapacityFault
    +}
    +
    +func init() {
    +	t["InsufficientPerCpuCapacity"] = reflect.TypeOf((*InsufficientPerCpuCapacity)(nil)).Elem()
    +}
    +
    +type InsufficientPerCpuCapacityFault InsufficientPerCpuCapacity
    +
    +func init() {
    +	t["InsufficientPerCpuCapacityFault"] = reflect.TypeOf((*InsufficientPerCpuCapacityFault)(nil)).Elem()
    +}
    +
    +type InsufficientResourcesFault struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["InsufficientResourcesFault"] = reflect.TypeOf((*InsufficientResourcesFault)(nil)).Elem()
    +}
    +
    +type InsufficientResourcesFaultFault BaseInsufficientResourcesFault
    +
    +func init() {
    +	t["InsufficientResourcesFaultFault"] = reflect.TypeOf((*InsufficientResourcesFaultFault)(nil)).Elem()
    +}
    +
    +type InsufficientStandbyCpuResource struct {
    +	InsufficientStandbyResource
    +
    +	Available int64 `xml:"available"`
    +	Requested int64 `xml:"requested"`
    +}
    +
    +func init() {
    +	t["InsufficientStandbyCpuResource"] = reflect.TypeOf((*InsufficientStandbyCpuResource)(nil)).Elem()
    +}
    +
    +type InsufficientStandbyCpuResourceFault InsufficientStandbyCpuResource
    +
    +func init() {
    +	t["InsufficientStandbyCpuResourceFault"] = reflect.TypeOf((*InsufficientStandbyCpuResourceFault)(nil)).Elem()
    +}
    +
    +type InsufficientStandbyMemoryResource struct {
    +	InsufficientStandbyResource
    +
    +	Available int64 `xml:"available"`
    +	Requested int64 `xml:"requested"`
    +}
    +
    +func init() {
    +	t["InsufficientStandbyMemoryResource"] = reflect.TypeOf((*InsufficientStandbyMemoryResource)(nil)).Elem()
    +}
    +
    +type InsufficientStandbyMemoryResourceFault InsufficientStandbyMemoryResource
    +
    +func init() {
    +	t["InsufficientStandbyMemoryResourceFault"] = reflect.TypeOf((*InsufficientStandbyMemoryResourceFault)(nil)).Elem()
    +}
    +
    +type InsufficientStandbyResource struct {
    +	InsufficientResourcesFault
    +}
    +
    +func init() {
    +	t["InsufficientStandbyResource"] = reflect.TypeOf((*InsufficientStandbyResource)(nil)).Elem()
    +}
    +
    +type InsufficientStandbyResourceFault BaseInsufficientStandbyResource
    +
    +func init() {
    +	t["InsufficientStandbyResourceFault"] = reflect.TypeOf((*InsufficientStandbyResourceFault)(nil)).Elem()
    +}
    +
    +type InsufficientStorageIops struct {
    +	VimFault
    +
    +	UnreservedIops int64  `xml:"unreservedIops"`
    +	RequestedIops  int64  `xml:"requestedIops"`
    +	DatastoreName  string `xml:"datastoreName"`
    +}
    +
    +func init() {
    +	t["InsufficientStorageIops"] = reflect.TypeOf((*InsufficientStorageIops)(nil)).Elem()
    +}
    +
    +type InsufficientStorageIopsFault InsufficientStorageIops
    +
    +func init() {
    +	t["InsufficientStorageIopsFault"] = reflect.TypeOf((*InsufficientStorageIopsFault)(nil)).Elem()
    +}
    +
    +type InsufficientStorageSpace struct {
    +	InsufficientResourcesFault
    +}
    +
    +func init() {
    +	t["InsufficientStorageSpace"] = reflect.TypeOf((*InsufficientStorageSpace)(nil)).Elem()
    +}
    +
    +type InsufficientStorageSpaceFault InsufficientStorageSpace
    +
    +func init() {
    +	t["InsufficientStorageSpaceFault"] = reflect.TypeOf((*InsufficientStorageSpaceFault)(nil)).Elem()
    +}
    +
    +type InsufficientVFlashResourcesFault struct {
    +	InsufficientResourcesFault
    +
    +	FreeSpaceInMB      int64 `xml:"freeSpaceInMB,omitempty"`
    +	FreeSpace          int64 `xml:"freeSpace"`
    +	RequestedSpaceInMB int64 `xml:"requestedSpaceInMB,omitempty"`
    +	RequestedSpace     int64 `xml:"requestedSpace"`
    +}
    +
    +func init() {
    +	t["InsufficientVFlashResourcesFault"] = reflect.TypeOf((*InsufficientVFlashResourcesFault)(nil)).Elem()
    +}
    +
    +type InsufficientVFlashResourcesFaultFault InsufficientVFlashResourcesFault
    +
    +func init() {
    +	t["InsufficientVFlashResourcesFaultFault"] = reflect.TypeOf((*InsufficientVFlashResourcesFaultFault)(nil)).Elem()
    +}
    +
    +type IntExpression struct {
    +	NegatableExpression
    +
    +	Value int32 `xml:"value,omitempty"`
    +}
    +
    +func init() {
    +	t["IntExpression"] = reflect.TypeOf((*IntExpression)(nil)).Elem()
    +}
    +
    +type IntOption struct {
    +	OptionType
    +
    +	Min          int32 `xml:"min"`
    +	Max          int32 `xml:"max"`
    +	DefaultValue int32 `xml:"defaultValue"`
    +}
    +
    +func init() {
    +	t["IntOption"] = reflect.TypeOf((*IntOption)(nil)).Elem()
    +}
    +
    +type IntPolicy struct {
    +	InheritablePolicy
    +
    +	Value int32 `xml:"value,omitempty"`
    +}
    +
    +func init() {
    +	t["IntPolicy"] = reflect.TypeOf((*IntPolicy)(nil)).Elem()
    +}
    +
    +type InvalidAffinitySettingFault struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["InvalidAffinitySettingFault"] = reflect.TypeOf((*InvalidAffinitySettingFault)(nil)).Elem()
    +}
    +
    +type InvalidAffinitySettingFaultFault InvalidAffinitySettingFault
    +
    +func init() {
    +	t["InvalidAffinitySettingFaultFault"] = reflect.TypeOf((*InvalidAffinitySettingFaultFault)(nil)).Elem()
    +}
    +
    +type InvalidArgument struct {
    +	RuntimeFault
    +
    +	InvalidProperty string `xml:"invalidProperty,omitempty"`
    +}
    +
    +func init() {
    +	t["InvalidArgument"] = reflect.TypeOf((*InvalidArgument)(nil)).Elem()
    +}
    +
    +type InvalidArgumentFault BaseInvalidArgument
    +
    +func init() {
    +	t["InvalidArgumentFault"] = reflect.TypeOf((*InvalidArgumentFault)(nil)).Elem()
    +}
    +
    +type InvalidBmcRole struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["InvalidBmcRole"] = reflect.TypeOf((*InvalidBmcRole)(nil)).Elem()
    +}
    +
    +type InvalidBmcRoleFault InvalidBmcRole
    +
    +func init() {
    +	t["InvalidBmcRoleFault"] = reflect.TypeOf((*InvalidBmcRoleFault)(nil)).Elem()
    +}
    +
    +type InvalidBundle struct {
    +	PlatformConfigFault
    +}
    +
    +func init() {
    +	t["InvalidBundle"] = reflect.TypeOf((*InvalidBundle)(nil)).Elem()
    +}
    +
    +type InvalidBundleFault InvalidBundle
    +
    +func init() {
    +	t["InvalidBundleFault"] = reflect.TypeOf((*InvalidBundleFault)(nil)).Elem()
    +}
    +
    +type InvalidCAMCertificate struct {
    +	InvalidCAMServer
    +}
    +
    +func init() {
    +	t["InvalidCAMCertificate"] = reflect.TypeOf((*InvalidCAMCertificate)(nil)).Elem()
    +}
    +
    +type InvalidCAMCertificateFault InvalidCAMCertificate
    +
    +func init() {
    +	t["InvalidCAMCertificateFault"] = reflect.TypeOf((*InvalidCAMCertificateFault)(nil)).Elem()
    +}
    +
    +type InvalidCAMServer struct {
    +	ActiveDirectoryFault
    +
    +	CamServer string `xml:"camServer"`
    +}
    +
    +func init() {
    +	t["InvalidCAMServer"] = reflect.TypeOf((*InvalidCAMServer)(nil)).Elem()
    +}
    +
    +type InvalidCAMServerFault BaseInvalidCAMServer
    +
    +func init() {
    +	t["InvalidCAMServerFault"] = reflect.TypeOf((*InvalidCAMServerFault)(nil)).Elem()
    +}
    +
    +type InvalidClientCertificate struct {
    +	InvalidLogin
    +}
    +
    +func init() {
    +	t["InvalidClientCertificate"] = reflect.TypeOf((*InvalidClientCertificate)(nil)).Elem()
    +}
    +
    +type InvalidClientCertificateFault InvalidClientCertificate
    +
    +func init() {
    +	t["InvalidClientCertificateFault"] = reflect.TypeOf((*InvalidClientCertificateFault)(nil)).Elem()
    +}
    +
    +type InvalidCollectorVersion struct {
    +	MethodFault
    +}
    +
    +func init() {
    +	t["InvalidCollectorVersion"] = reflect.TypeOf((*InvalidCollectorVersion)(nil)).Elem()
    +}
    +
    +type InvalidCollectorVersionFault InvalidCollectorVersion
    +
    +func init() {
    +	t["InvalidCollectorVersionFault"] = reflect.TypeOf((*InvalidCollectorVersionFault)(nil)).Elem()
    +}
    +
    +type InvalidController struct {
    +	InvalidDeviceSpec
    +
    +	ControllerKey int32 `xml:"controllerKey"`
    +}
    +
    +func init() {
    +	t["InvalidController"] = reflect.TypeOf((*InvalidController)(nil)).Elem()
    +}
    +
    +type InvalidControllerFault InvalidController
    +
    +func init() {
    +	t["InvalidControllerFault"] = reflect.TypeOf((*InvalidControllerFault)(nil)).Elem()
    +}
    +
    +type InvalidDasConfigArgument struct {
    +	InvalidArgument
    +
    +	Entry       string `xml:"entry,omitempty"`
    +	ClusterName string `xml:"clusterName,omitempty"`
    +}
    +
    +func init() {
    +	t["InvalidDasConfigArgument"] = reflect.TypeOf((*InvalidDasConfigArgument)(nil)).Elem()
    +}
    +
    +type InvalidDasConfigArgumentFault InvalidDasConfigArgument
    +
    +func init() {
    +	t["InvalidDasConfigArgumentFault"] = reflect.TypeOf((*InvalidDasConfigArgumentFault)(nil)).Elem()
    +}
    +
    +type InvalidDasRestartPriorityForFtVm struct {
    +	InvalidArgument
    +
    +	Vm     ManagedObjectReference `xml:"vm"`
    +	VmName string                 `xml:"vmName"`
    +}
    +
    +func init() {
    +	t["InvalidDasRestartPriorityForFtVm"] = reflect.TypeOf((*InvalidDasRestartPriorityForFtVm)(nil)).Elem()
    +}
    +
    +type InvalidDasRestartPriorityForFtVmFault InvalidDasRestartPriorityForFtVm
    +
    +func init() {
    +	t["InvalidDasRestartPriorityForFtVmFault"] = reflect.TypeOf((*InvalidDasRestartPriorityForFtVmFault)(nil)).Elem()
    +}
    +
    +type InvalidDatastore struct {
    +	VimFault
    +
    +	Datastore *ManagedObjectReference `xml:"datastore,omitempty"`
    +	Name      string                  `xml:"name,omitempty"`
    +}
    +
    +func init() {
    +	t["InvalidDatastore"] = reflect.TypeOf((*InvalidDatastore)(nil)).Elem()
    +}
    +
    +type InvalidDatastoreFault BaseInvalidDatastore
    +
    +func init() {
    +	t["InvalidDatastoreFault"] = reflect.TypeOf((*InvalidDatastoreFault)(nil)).Elem()
    +}
    +
    +type InvalidDatastorePath struct {
    +	InvalidDatastore
    +
    +	DatastorePath string `xml:"datastorePath"`
    +}
    +
    +func init() {
    +	t["InvalidDatastorePath"] = reflect.TypeOf((*InvalidDatastorePath)(nil)).Elem()
    +}
    +
    +type InvalidDatastorePathFault InvalidDatastorePath
    +
    +func init() {
    +	t["InvalidDatastorePathFault"] = reflect.TypeOf((*InvalidDatastorePathFault)(nil)).Elem()
    +}
    +
    +type InvalidDatastoreState struct {
    +	InvalidState
    +
    +	DatastoreName string `xml:"datastoreName,omitempty"`
    +}
    +
    +func init() {
    +	t["InvalidDatastoreState"] = reflect.TypeOf((*InvalidDatastoreState)(nil)).Elem()
    +}
    +
    +type InvalidDatastoreStateFault InvalidDatastoreState
    +
    +func init() {
    +	t["InvalidDatastoreStateFault"] = reflect.TypeOf((*InvalidDatastoreStateFault)(nil)).Elem()
    +}
    +
    +type InvalidDeviceBacking struct {
    +	InvalidDeviceSpec
    +}
    +
    +func init() {
    +	t["InvalidDeviceBacking"] = reflect.TypeOf((*InvalidDeviceBacking)(nil)).Elem()
    +}
    +
    +type InvalidDeviceBackingFault InvalidDeviceBacking
    +
    +func init() {
    +	t["InvalidDeviceBackingFault"] = reflect.TypeOf((*InvalidDeviceBackingFault)(nil)).Elem()
    +}
    +
    +type InvalidDeviceOperation struct {
    +	InvalidDeviceSpec
    +
    +	BadOp     VirtualDeviceConfigSpecOperation     `xml:"badOp,omitempty"`
    +	BadFileOp VirtualDeviceConfigSpecFileOperation `xml:"badFileOp,omitempty"`
    +}
    +
    +func init() {
    +	t["InvalidDeviceOperation"] = reflect.TypeOf((*InvalidDeviceOperation)(nil)).Elem()
    +}
    +
    +type InvalidDeviceOperationFault InvalidDeviceOperation
    +
    +func init() {
    +	t["InvalidDeviceOperationFault"] = reflect.TypeOf((*InvalidDeviceOperationFault)(nil)).Elem()
    +}
    +
    +type InvalidDeviceSpec struct {
    +	InvalidVmConfig
    +
    +	DeviceIndex int32 `xml:"deviceIndex"`
    +}
    +
    +func init() {
    +	t["InvalidDeviceSpec"] = reflect.TypeOf((*InvalidDeviceSpec)(nil)).Elem()
    +}
    +
    +type InvalidDeviceSpecFault BaseInvalidDeviceSpec
    +
    +func init() {
    +	t["InvalidDeviceSpecFault"] = reflect.TypeOf((*InvalidDeviceSpecFault)(nil)).Elem()
    +}
    +
    +type InvalidDiskFormat struct {
    +	InvalidFormat
    +}
    +
    +func init() {
    +	t["InvalidDiskFormat"] = reflect.TypeOf((*InvalidDiskFormat)(nil)).Elem()
    +}
    +
    +type InvalidDiskFormatFault InvalidDiskFormat
    +
    +func init() {
    +	t["InvalidDiskFormatFault"] = reflect.TypeOf((*InvalidDiskFormatFault)(nil)).Elem()
    +}
    +
    +type InvalidDrsBehaviorForFtVm struct {
    +	InvalidArgument
    +
    +	Vm     ManagedObjectReference `xml:"vm"`
    +	VmName string                 `xml:"vmName"`
    +}
    +
    +func init() {
    +	t["InvalidDrsBehaviorForFtVm"] = reflect.TypeOf((*InvalidDrsBehaviorForFtVm)(nil)).Elem()
    +}
    +
    +type InvalidDrsBehaviorForFtVmFault InvalidDrsBehaviorForFtVm
    +
    +func init() {
    +	t["InvalidDrsBehaviorForFtVmFault"] = reflect.TypeOf((*InvalidDrsBehaviorForFtVmFault)(nil)).Elem()
    +}
    +
    +type InvalidEditionEvent struct {
    +	LicenseEvent
    +
    +	Feature string `xml:"feature"`
    +}
    +
    +func init() {
    +	t["InvalidEditionEvent"] = reflect.TypeOf((*InvalidEditionEvent)(nil)).Elem()
    +}
    +
    +type InvalidEditionLicense struct {
    +	NotEnoughLicenses
    +
    +	Feature string `xml:"feature"`
    +}
    +
    +func init() {
    +	t["InvalidEditionLicense"] = reflect.TypeOf((*InvalidEditionLicense)(nil)).Elem()
    +}
    +
    +type InvalidEditionLicenseFault InvalidEditionLicense
    +
    +func init() {
    +	t["InvalidEditionLicenseFault"] = reflect.TypeOf((*InvalidEditionLicenseFault)(nil)).Elem()
    +}
    +
    +type InvalidEvent struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["InvalidEvent"] = reflect.TypeOf((*InvalidEvent)(nil)).Elem()
    +}
    +
    +type InvalidEventFault InvalidEvent
    +
    +func init() {
    +	t["InvalidEventFault"] = reflect.TypeOf((*InvalidEventFault)(nil)).Elem()
    +}
    +
    +type InvalidFolder struct {
    +	VimFault
    +
    +	Target ManagedObjectReference `xml:"target"`
    +}
    +
    +func init() {
    +	t["InvalidFolder"] = reflect.TypeOf((*InvalidFolder)(nil)).Elem()
    +}
    +
    +type InvalidFolderFault BaseInvalidFolder
    +
    +func init() {
    +	t["InvalidFolderFault"] = reflect.TypeOf((*InvalidFolderFault)(nil)).Elem()
    +}
    +
    +type InvalidFormat struct {
    +	VmConfigFault
    +}
    +
    +func init() {
    +	t["InvalidFormat"] = reflect.TypeOf((*InvalidFormat)(nil)).Elem()
    +}
    +
    +type InvalidFormatFault BaseInvalidFormat
    +
    +func init() {
    +	t["InvalidFormatFault"] = reflect.TypeOf((*InvalidFormatFault)(nil)).Elem()
    +}
    +
    +type InvalidGuestLogin struct {
    +	GuestOperationsFault
    +}
    +
    +func init() {
    +	t["InvalidGuestLogin"] = reflect.TypeOf((*InvalidGuestLogin)(nil)).Elem()
    +}
    +
    +type InvalidGuestLoginFault InvalidGuestLogin
    +
    +func init() {
    +	t["InvalidGuestLoginFault"] = reflect.TypeOf((*InvalidGuestLoginFault)(nil)).Elem()
    +}
    +
    +type InvalidHostConnectionState struct {
    +	InvalidHostState
    +}
    +
    +func init() {
    +	t["InvalidHostConnectionState"] = reflect.TypeOf((*InvalidHostConnectionState)(nil)).Elem()
    +}
    +
    +type InvalidHostConnectionStateFault InvalidHostConnectionState
    +
    +func init() {
    +	t["InvalidHostConnectionStateFault"] = reflect.TypeOf((*InvalidHostConnectionStateFault)(nil)).Elem()
    +}
    +
    +type InvalidHostName struct {
    +	HostConfigFault
    +}
    +
    +func init() {
    +	t["InvalidHostName"] = reflect.TypeOf((*InvalidHostName)(nil)).Elem()
    +}
    +
    +type InvalidHostNameFault InvalidHostName
    +
    +func init() {
    +	t["InvalidHostNameFault"] = reflect.TypeOf((*InvalidHostNameFault)(nil)).Elem()
    +}
    +
    +type InvalidHostState struct {
    +	InvalidState
    +
    +	Host *ManagedObjectReference `xml:"host,omitempty"`
    +}
    +
    +func init() {
    +	t["InvalidHostState"] = reflect.TypeOf((*InvalidHostState)(nil)).Elem()
    +}
    +
    +type InvalidHostStateFault BaseInvalidHostState
    +
    +func init() {
    +	t["InvalidHostStateFault"] = reflect.TypeOf((*InvalidHostStateFault)(nil)).Elem()
    +}
    +
    +type InvalidIndexArgument struct {
    +	InvalidArgument
    +
    +	Key string `xml:"key"`
    +}
    +
    +func init() {
    +	t["InvalidIndexArgument"] = reflect.TypeOf((*InvalidIndexArgument)(nil)).Elem()
    +}
    +
    +type InvalidIndexArgumentFault InvalidIndexArgument
    +
    +func init() {
    +	t["InvalidIndexArgumentFault"] = reflect.TypeOf((*InvalidIndexArgumentFault)(nil)).Elem()
    +}
    +
    +type InvalidIpfixConfig struct {
    +	DvsFault
    +
    +	Property string `xml:"property,omitempty"`
    +}
    +
    +func init() {
    +	t["InvalidIpfixConfig"] = reflect.TypeOf((*InvalidIpfixConfig)(nil)).Elem()
    +}
    +
    +type InvalidIpfixConfigFault InvalidIpfixConfig
    +
    +func init() {
    +	t["InvalidIpfixConfigFault"] = reflect.TypeOf((*InvalidIpfixConfigFault)(nil)).Elem()
    +}
    +
    +type InvalidIpmiLoginInfo struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["InvalidIpmiLoginInfo"] = reflect.TypeOf((*InvalidIpmiLoginInfo)(nil)).Elem()
    +}
    +
    +type InvalidIpmiLoginInfoFault InvalidIpmiLoginInfo
    +
    +func init() {
    +	t["InvalidIpmiLoginInfoFault"] = reflect.TypeOf((*InvalidIpmiLoginInfoFault)(nil)).Elem()
    +}
    +
    +type InvalidIpmiMacAddress struct {
    +	VimFault
    +
    +	UserProvidedMacAddress string `xml:"userProvidedMacAddress"`
    +	ObservedMacAddress     string `xml:"observedMacAddress"`
    +}
    +
    +func init() {
    +	t["InvalidIpmiMacAddress"] = reflect.TypeOf((*InvalidIpmiMacAddress)(nil)).Elem()
    +}
    +
    +type InvalidIpmiMacAddressFault InvalidIpmiMacAddress
    +
    +func init() {
    +	t["InvalidIpmiMacAddressFault"] = reflect.TypeOf((*InvalidIpmiMacAddressFault)(nil)).Elem()
    +}
    +
    +type InvalidLicense struct {
    +	VimFault
    +
    +	LicenseContent string `xml:"licenseContent"`
    +}
    +
    +func init() {
    +	t["InvalidLicense"] = reflect.TypeOf((*InvalidLicense)(nil)).Elem()
    +}
    +
    +type InvalidLicenseFault InvalidLicense
    +
    +func init() {
    +	t["InvalidLicenseFault"] = reflect.TypeOf((*InvalidLicenseFault)(nil)).Elem()
    +}
    +
    +type InvalidLocale struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["InvalidLocale"] = reflect.TypeOf((*InvalidLocale)(nil)).Elem()
    +}
    +
    +type InvalidLocaleFault InvalidLocale
    +
    +func init() {
    +	t["InvalidLocaleFault"] = reflect.TypeOf((*InvalidLocaleFault)(nil)).Elem()
    +}
    +
    +type InvalidLogin struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["InvalidLogin"] = reflect.TypeOf((*InvalidLogin)(nil)).Elem()
    +}
    +
    +type InvalidLoginFault BaseInvalidLogin
    +
    +func init() {
    +	t["InvalidLoginFault"] = reflect.TypeOf((*InvalidLoginFault)(nil)).Elem()
    +}
    +
    +type InvalidName struct {
    +	VimFault
    +
    +	Name   string                  `xml:"name"`
    +	Entity *ManagedObjectReference `xml:"entity,omitempty"`
    +}
    +
    +func init() {
    +	t["InvalidName"] = reflect.TypeOf((*InvalidName)(nil)).Elem()
    +}
    +
    +type InvalidNameFault InvalidName
    +
    +func init() {
    +	t["InvalidNameFault"] = reflect.TypeOf((*InvalidNameFault)(nil)).Elem()
    +}
    +
    +type InvalidNasCredentials struct {
    +	NasConfigFault
    +
    +	UserName string `xml:"userName"`
    +}
    +
    +func init() {
    +	t["InvalidNasCredentials"] = reflect.TypeOf((*InvalidNasCredentials)(nil)).Elem()
    +}
    +
    +type InvalidNasCredentialsFault InvalidNasCredentials
    +
    +func init() {
    +	t["InvalidNasCredentialsFault"] = reflect.TypeOf((*InvalidNasCredentialsFault)(nil)).Elem()
    +}
    +
    +type InvalidNetworkInType struct {
    +	VAppPropertyFault
    +}
    +
    +func init() {
    +	t["InvalidNetworkInType"] = reflect.TypeOf((*InvalidNetworkInType)(nil)).Elem()
    +}
    +
    +type InvalidNetworkInTypeFault InvalidNetworkInType
    +
    +func init() {
    +	t["InvalidNetworkInTypeFault"] = reflect.TypeOf((*InvalidNetworkInTypeFault)(nil)).Elem()
    +}
    +
    +type InvalidNetworkResource struct {
    +	NasConfigFault
    +
    +	RemoteHost string `xml:"remoteHost"`
    +	RemotePath string `xml:"remotePath"`
    +}
    +
    +func init() {
    +	t["InvalidNetworkResource"] = reflect.TypeOf((*InvalidNetworkResource)(nil)).Elem()
    +}
    +
    +type InvalidNetworkResourceFault InvalidNetworkResource
    +
    +func init() {
    +	t["InvalidNetworkResourceFault"] = reflect.TypeOf((*InvalidNetworkResourceFault)(nil)).Elem()
    +}
    +
    +type InvalidOperationOnSecondaryVm struct {
    +	VmFaultToleranceIssue
    +
    +	InstanceUuid string `xml:"instanceUuid,omitempty"`
    +}
    +
    +func init() {
    +	t["InvalidOperationOnSecondaryVm"] = reflect.TypeOf((*InvalidOperationOnSecondaryVm)(nil)).Elem()
    +}
    +
    +type InvalidOperationOnSecondaryVmFault InvalidOperationOnSecondaryVm
    +
    +func init() {
    +	t["InvalidOperationOnSecondaryVmFault"] = reflect.TypeOf((*InvalidOperationOnSecondaryVmFault)(nil)).Elem()
    +}
    +
    +type InvalidPowerState struct {
    +	InvalidState
    +
    +	RequestedState VirtualMachinePowerState `xml:"requestedState,omitempty"`
    +	ExistingState  VirtualMachinePowerState `xml:"existingState"`
    +}
    +
    +func init() {
    +	t["InvalidPowerState"] = reflect.TypeOf((*InvalidPowerState)(nil)).Elem()
    +}
    +
    +type InvalidPowerStateFault InvalidPowerState
    +
    +func init() {
    +	t["InvalidPowerStateFault"] = reflect.TypeOf((*InvalidPowerStateFault)(nil)).Elem()
    +}
    +
    +type InvalidPrivilege struct {
    +	VimFault
    +
    +	Privilege string `xml:"privilege"`
    +}
    +
    +func init() {
    +	t["InvalidPrivilege"] = reflect.TypeOf((*InvalidPrivilege)(nil)).Elem()
    +}
    +
    +type InvalidPrivilegeFault InvalidPrivilege
    +
    +func init() {
    +	t["InvalidPrivilegeFault"] = reflect.TypeOf((*InvalidPrivilegeFault)(nil)).Elem()
    +}
    +
    +type InvalidProfileReferenceHost struct {
    +	RuntimeFault
    +
    +	Reason      string                  `xml:"reason,omitempty"`
    +	Host        *ManagedObjectReference `xml:"host,omitempty"`
    +	Profile     *ManagedObjectReference `xml:"profile,omitempty"`
    +	ProfileName string                  `xml:"profileName,omitempty"`
    +}
    +
    +func init() {
    +	t["InvalidProfileReferenceHost"] = reflect.TypeOf((*InvalidProfileReferenceHost)(nil)).Elem()
    +}
    +
    +type InvalidProfileReferenceHostFault InvalidProfileReferenceHost
    +
    +func init() {
    +	t["InvalidProfileReferenceHostFault"] = reflect.TypeOf((*InvalidProfileReferenceHostFault)(nil)).Elem()
    +}
    +
    +type InvalidProperty struct {
    +	MethodFault
    +
    +	Name string `xml:"name"`
    +}
    +
    +func init() {
    +	t["InvalidProperty"] = reflect.TypeOf((*InvalidProperty)(nil)).Elem()
    +}
    +
    +type InvalidPropertyFault InvalidProperty
    +
    +func init() {
    +	t["InvalidPropertyFault"] = reflect.TypeOf((*InvalidPropertyFault)(nil)).Elem()
    +}
    +
    +type InvalidPropertyType struct {
    +	VAppPropertyFault
    +}
    +
    +func init() {
    +	t["InvalidPropertyType"] = reflect.TypeOf((*InvalidPropertyType)(nil)).Elem()
    +}
    +
    +type InvalidPropertyTypeFault InvalidPropertyType
    +
    +func init() {
    +	t["InvalidPropertyTypeFault"] = reflect.TypeOf((*InvalidPropertyTypeFault)(nil)).Elem()
    +}
    +
    +type InvalidPropertyValue struct {
    +	VAppPropertyFault
    +}
    +
    +func init() {
    +	t["InvalidPropertyValue"] = reflect.TypeOf((*InvalidPropertyValue)(nil)).Elem()
    +}
    +
    +type InvalidPropertyValueFault BaseInvalidPropertyValue
    +
    +func init() {
    +	t["InvalidPropertyValueFault"] = reflect.TypeOf((*InvalidPropertyValueFault)(nil)).Elem()
    +}
    +
    +type InvalidRequest struct {
    +	RuntimeFault
    +}
    +
    +func init() {
    +	t["InvalidRequest"] = reflect.TypeOf((*InvalidRequest)(nil)).Elem()
    +}
    +
    +type InvalidRequestFault BaseInvalidRequest
    +
    +func init() {
    +	t["InvalidRequestFault"] = reflect.TypeOf((*InvalidRequestFault)(nil)).Elem()
    +}
    +
    +type InvalidResourcePoolStructureFault struct {
    +	InsufficientResourcesFault
    +}
    +
    +func init() {
    +	t["InvalidResourcePoolStructureFault"] = reflect.TypeOf((*InvalidResourcePoolStructureFault)(nil)).Elem()
    +}
    +
    +type InvalidResourcePoolStructureFaultFault InvalidResourcePoolStructureFault
    +
    +func init() {
    +	t["InvalidResourcePoolStructureFaultFault"] = reflect.TypeOf((*InvalidResourcePoolStructureFaultFault)(nil)).Elem()
    +}
    +
    +type InvalidSnapshotFormat struct {
    +	InvalidFormat
    +}
    +
    +func init() {
    +	t["InvalidSnapshotFormat"] = reflect.TypeOf((*InvalidSnapshotFormat)(nil)).Elem()
    +}
    +
    +type InvalidSnapshotFormatFault InvalidSnapshotFormat
    +
    +func init() {
    +	t["InvalidSnapshotFormatFault"] = reflect.TypeOf((*InvalidSnapshotFormatFault)(nil)).Elem()
    +}
    +
    +type InvalidState struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["InvalidState"] = reflect.TypeOf((*InvalidState)(nil)).Elem()
    +}
    +
    +type InvalidStateFault BaseInvalidState
    +
    +func init() {
    +	t["InvalidStateFault"] = reflect.TypeOf((*InvalidStateFault)(nil)).Elem()
    +}
    +
    +type InvalidType struct {
    +	InvalidRequest
    +
    +	Argument string `xml:"argument,omitempty"`
    +}
    +
    +func init() {
    +	t["InvalidType"] = reflect.TypeOf((*InvalidType)(nil)).Elem()
    +}
    +
    +type InvalidTypeFault InvalidType
    +
    +func init() {
    +	t["InvalidTypeFault"] = reflect.TypeOf((*InvalidTypeFault)(nil)).Elem()
    +}
    +
    +type InvalidVmConfig struct {
    +	VmConfigFault
    +
    +	Property string `xml:"property,omitempty"`
    +}
    +
    +func init() {
    +	t["InvalidVmConfig"] = reflect.TypeOf((*InvalidVmConfig)(nil)).Elem()
    +}
    +
    +type InvalidVmConfigFault BaseInvalidVmConfig
    +
    +func init() {
    +	t["InvalidVmConfigFault"] = reflect.TypeOf((*InvalidVmConfigFault)(nil)).Elem()
    +}
    +
    +type InvalidVmState struct {
    +	InvalidState
    +
    +	Vm ManagedObjectReference `xml:"vm"`
    +}
    +
    +func init() {
    +	t["InvalidVmState"] = reflect.TypeOf((*InvalidVmState)(nil)).Elem()
    +}
    +
    +type InvalidVmStateFault InvalidVmState
    +
    +func init() {
    +	t["InvalidVmStateFault"] = reflect.TypeOf((*InvalidVmStateFault)(nil)).Elem()
    +}
    +
    +type InventoryDescription struct {
    +	DynamicData
    +
    +	NumHosts           int32 `xml:"numHosts"`
    +	NumVirtualMachines int32 `xml:"numVirtualMachines"`
    +	NumResourcePools   int32 `xml:"numResourcePools,omitempty"`
    +	NumClusters        int32 `xml:"numClusters,omitempty"`
    +	NumCpuDev          int32 `xml:"numCpuDev,omitempty"`
    +	NumNetDev          int32 `xml:"numNetDev,omitempty"`
    +	NumDiskDev         int32 `xml:"numDiskDev,omitempty"`
    +	NumvCpuDev         int32 `xml:"numvCpuDev,omitempty"`
    +	NumvNetDev         int32 `xml:"numvNetDev,omitempty"`
    +	NumvDiskDev        int32 `xml:"numvDiskDev,omitempty"`
    +}
    +
    +func init() {
    +	t["InventoryDescription"] = reflect.TypeOf((*InventoryDescription)(nil)).Elem()
    +}
    +
    +type InventoryHasStandardAloneHosts struct {
    +	NotEnoughLicenses
    +
    +	Hosts []string `xml:"hosts"`
    +}
    +
    +func init() {
    +	t["InventoryHasStandardAloneHosts"] = reflect.TypeOf((*InventoryHasStandardAloneHosts)(nil)).Elem()
    +}
    +
    +type InventoryHasStandardAloneHostsFault InventoryHasStandardAloneHosts
    +
    +func init() {
    +	t["InventoryHasStandardAloneHostsFault"] = reflect.TypeOf((*InventoryHasStandardAloneHostsFault)(nil)).Elem()
    +}
    +
    +type IoFilterHostIssue struct {
    +	DynamicData
    +
    +	Host  ManagedObjectReference `xml:"host"`
    +	Issue []LocalizedMethodFault `xml:"issue"`
    +}
    +
    +func init() {
    +	t["IoFilterHostIssue"] = reflect.TypeOf((*IoFilterHostIssue)(nil)).Elem()
    +}
    +
    +type IoFilterInfo struct {
    +	DynamicData
    +
    +	Id          string `xml:"id"`
    +	Name        string `xml:"name"`
    +	Vendor      string `xml:"vendor"`
    +	Version     string `xml:"version"`
    +	Type        string `xml:"type,omitempty"`
    +	Summary     string `xml:"summary,omitempty"`
    +	ReleaseDate string `xml:"releaseDate,omitempty"`
    +}
    +
    +func init() {
    +	t["IoFilterInfo"] = reflect.TypeOf((*IoFilterInfo)(nil)).Elem()
    +}
    +
    +type IoFilterQueryIssueResult struct {
    +	DynamicData
    +
    +	OpType    string              `xml:"opType"`
    +	HostIssue []IoFilterHostIssue `xml:"hostIssue,omitempty"`
    +}
    +
    +func init() {
    +	t["IoFilterQueryIssueResult"] = reflect.TypeOf((*IoFilterQueryIssueResult)(nil)).Elem()
    +}
    +
    +type IpAddress struct {
    +	NegatableExpression
    +}
    +
    +func init() {
    +	t["IpAddress"] = reflect.TypeOf((*IpAddress)(nil)).Elem()
    +}
    +
    +type IpAddressProfile struct {
    +	ApplyProfile
    +}
    +
    +func init() {
    +	t["IpAddressProfile"] = reflect.TypeOf((*IpAddressProfile)(nil)).Elem()
    +}
    +
    +type IpHostnameGeneratorError struct {
    +	CustomizationFault
    +}
    +
    +func init() {
    +	t["IpHostnameGeneratorError"] = reflect.TypeOf((*IpHostnameGeneratorError)(nil)).Elem()
    +}
    +
    +type IpHostnameGeneratorErrorFault IpHostnameGeneratorError
    +
    +func init() {
    +	t["IpHostnameGeneratorErrorFault"] = reflect.TypeOf((*IpHostnameGeneratorErrorFault)(nil)).Elem()
    +}
    +
    +type IpPool struct {
    +	DynamicData
    +
    +	Id                     int32                   `xml:"id,omitempty"`
    +	Name                   string                  `xml:"name,omitempty"`
    +	Ipv4Config             *IpPoolIpPoolConfigInfo `xml:"ipv4Config,omitempty"`
    +	Ipv6Config             *IpPoolIpPoolConfigInfo `xml:"ipv6Config,omitempty"`
    +	DnsDomain              string                  `xml:"dnsDomain,omitempty"`
    +	DnsSearchPath          string                  `xml:"dnsSearchPath,omitempty"`
    +	HostPrefix             string                  `xml:"hostPrefix,omitempty"`
    +	HttpProxy              string                  `xml:"httpProxy,omitempty"`
    +	NetworkAssociation     []IpPoolAssociation     `xml:"networkAssociation,omitempty"`
    +	AvailableIpv4Addresses int32                   `xml:"availableIpv4Addresses,omitempty"`
    +	AvailableIpv6Addresses int32                   `xml:"availableIpv6Addresses,omitempty"`
    +	AllocatedIpv4Addresses int32                   `xml:"allocatedIpv4Addresses,omitempty"`
    +	AllocatedIpv6Addresses int32                   `xml:"allocatedIpv6Addresses,omitempty"`
    +}
    +
    +func init() {
    +	t["IpPool"] = reflect.TypeOf((*IpPool)(nil)).Elem()
    +}
    +
    +type IpPoolAssociation struct {
    +	DynamicData
    +
    +	Network     *ManagedObjectReference `xml:"network,omitempty"`
    +	NetworkName string                  `xml:"networkName"`
    +}
    +
    +func init() {
    +	t["IpPoolAssociation"] = reflect.TypeOf((*IpPoolAssociation)(nil)).Elem()
    +}
    +
    +type IpPoolIpPoolConfigInfo struct {
    +	DynamicData
    +
    +	SubnetAddress       string   `xml:"subnetAddress,omitempty"`
    +	Netmask             string   `xml:"netmask,omitempty"`
    +	Gateway             string   `xml:"gateway,omitempty"`
    +	Range               string   `xml:"range,omitempty"`
    +	Dns                 []string `xml:"dns,omitempty"`
    +	DhcpServerAvailable *bool    `xml:"dhcpServerAvailable"`
    +	IpPoolEnabled       *bool    `xml:"ipPoolEnabled"`
    +}
    +
    +func init() {
    +	t["IpPoolIpPoolConfigInfo"] = reflect.TypeOf((*IpPoolIpPoolConfigInfo)(nil)).Elem()
    +}
    +
    +type IpPoolManagerIpAllocation struct {
    +	DynamicData
    +
    +	IpAddress    string `xml:"ipAddress"`
    +	AllocationId string `xml:"allocationId"`
    +}
    +
    +func init() {
    +	t["IpPoolManagerIpAllocation"] = reflect.TypeOf((*IpPoolManagerIpAllocation)(nil)).Elem()
    +}
    +
    +type IpRange struct {
    +	IpAddress
    +
    +	AddressPrefix string `xml:"addressPrefix"`
    +	PrefixLength  int32  `xml:"prefixLength,omitempty"`
    +}
    +
    +func init() {
    +	t["IpRange"] = reflect.TypeOf((*IpRange)(nil)).Elem()
    +}
    +
    +type IpRouteProfile struct {
    +	ApplyProfile
    +
    +	StaticRoute []StaticRouteProfile `xml:"staticRoute,omitempty"`
    +}
    +
    +func init() {
    +	t["IpRouteProfile"] = reflect.TypeOf((*IpRouteProfile)(nil)).Elem()
    +}
    +
    +type IsSharedGraphicsActive IsSharedGraphicsActiveRequestType
    +
    +func init() {
    +	t["IsSharedGraphicsActive"] = reflect.TypeOf((*IsSharedGraphicsActive)(nil)).Elem()
    +}
    +
    +type IsSharedGraphicsActiveRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["IsSharedGraphicsActiveRequestType"] = reflect.TypeOf((*IsSharedGraphicsActiveRequestType)(nil)).Elem()
    +}
    +
    +type IsSharedGraphicsActiveResponse struct {
    +	Returnval bool `xml:"returnval"`
    +}
    +
    +type IscsiDependencyEntity struct {
    +	DynamicData
    +
    +	PnicDevice string `xml:"pnicDevice"`
    +	VnicDevice string `xml:"vnicDevice"`
    +	VmhbaName  string `xml:"vmhbaName"`
    +}
    +
    +func init() {
    +	t["IscsiDependencyEntity"] = reflect.TypeOf((*IscsiDependencyEntity)(nil)).Elem()
    +}
    +
    +type IscsiFault struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["IscsiFault"] = reflect.TypeOf((*IscsiFault)(nil)).Elem()
    +}
    +
    +type IscsiFaultFault BaseIscsiFault
    +
    +func init() {
    +	t["IscsiFaultFault"] = reflect.TypeOf((*IscsiFaultFault)(nil)).Elem()
    +}
    +
    +type IscsiFaultInvalidVnic struct {
    +	IscsiFault
    +
    +	VnicDevice string `xml:"vnicDevice"`
    +}
    +
    +func init() {
    +	t["IscsiFaultInvalidVnic"] = reflect.TypeOf((*IscsiFaultInvalidVnic)(nil)).Elem()
    +}
    +
    +type IscsiFaultInvalidVnicFault IscsiFaultInvalidVnic
    +
    +func init() {
    +	t["IscsiFaultInvalidVnicFault"] = reflect.TypeOf((*IscsiFaultInvalidVnicFault)(nil)).Elem()
    +}
    +
    +type IscsiFaultPnicInUse struct {
    +	IscsiFault
    +
    +	PnicDevice string `xml:"pnicDevice"`
    +}
    +
    +func init() {
    +	t["IscsiFaultPnicInUse"] = reflect.TypeOf((*IscsiFaultPnicInUse)(nil)).Elem()
    +}
    +
    +type IscsiFaultPnicInUseFault IscsiFaultPnicInUse
    +
    +func init() {
    +	t["IscsiFaultPnicInUseFault"] = reflect.TypeOf((*IscsiFaultPnicInUseFault)(nil)).Elem()
    +}
    +
    +type IscsiFaultVnicAlreadyBound struct {
    +	IscsiFault
    +
    +	VnicDevice string `xml:"vnicDevice"`
    +}
    +
    +func init() {
    +	t["IscsiFaultVnicAlreadyBound"] = reflect.TypeOf((*IscsiFaultVnicAlreadyBound)(nil)).Elem()
    +}
    +
    +type IscsiFaultVnicAlreadyBoundFault IscsiFaultVnicAlreadyBound
    +
    +func init() {
    +	t["IscsiFaultVnicAlreadyBoundFault"] = reflect.TypeOf((*IscsiFaultVnicAlreadyBoundFault)(nil)).Elem()
    +}
    +
    +type IscsiFaultVnicHasActivePaths struct {
    +	IscsiFault
    +
    +	VnicDevice string `xml:"vnicDevice"`
    +}
    +
    +func init() {
    +	t["IscsiFaultVnicHasActivePaths"] = reflect.TypeOf((*IscsiFaultVnicHasActivePaths)(nil)).Elem()
    +}
    +
    +type IscsiFaultVnicHasActivePathsFault IscsiFaultVnicHasActivePaths
    +
    +func init() {
    +	t["IscsiFaultVnicHasActivePathsFault"] = reflect.TypeOf((*IscsiFaultVnicHasActivePathsFault)(nil)).Elem()
    +}
    +
    +type IscsiFaultVnicHasMultipleUplinks struct {
    +	IscsiFault
    +
    +	VnicDevice string `xml:"vnicDevice"`
    +}
    +
    +func init() {
    +	t["IscsiFaultVnicHasMultipleUplinks"] = reflect.TypeOf((*IscsiFaultVnicHasMultipleUplinks)(nil)).Elem()
    +}
    +
    +type IscsiFaultVnicHasMultipleUplinksFault IscsiFaultVnicHasMultipleUplinks
    +
    +func init() {
    +	t["IscsiFaultVnicHasMultipleUplinksFault"] = reflect.TypeOf((*IscsiFaultVnicHasMultipleUplinksFault)(nil)).Elem()
    +}
    +
    +type IscsiFaultVnicHasNoUplinks struct {
    +	IscsiFault
    +
    +	VnicDevice string `xml:"vnicDevice"`
    +}
    +
    +func init() {
    +	t["IscsiFaultVnicHasNoUplinks"] = reflect.TypeOf((*IscsiFaultVnicHasNoUplinks)(nil)).Elem()
    +}
    +
    +type IscsiFaultVnicHasNoUplinksFault IscsiFaultVnicHasNoUplinks
    +
    +func init() {
    +	t["IscsiFaultVnicHasNoUplinksFault"] = reflect.TypeOf((*IscsiFaultVnicHasNoUplinksFault)(nil)).Elem()
    +}
    +
    +type IscsiFaultVnicHasWrongUplink struct {
    +	IscsiFault
    +
    +	VnicDevice string `xml:"vnicDevice"`
    +}
    +
    +func init() {
    +	t["IscsiFaultVnicHasWrongUplink"] = reflect.TypeOf((*IscsiFaultVnicHasWrongUplink)(nil)).Elem()
    +}
    +
    +type IscsiFaultVnicHasWrongUplinkFault IscsiFaultVnicHasWrongUplink
    +
    +func init() {
    +	t["IscsiFaultVnicHasWrongUplinkFault"] = reflect.TypeOf((*IscsiFaultVnicHasWrongUplinkFault)(nil)).Elem()
    +}
    +
    +type IscsiFaultVnicInUse struct {
    +	IscsiFault
    +
    +	VnicDevice string `xml:"vnicDevice"`
    +}
    +
    +func init() {
    +	t["IscsiFaultVnicInUse"] = reflect.TypeOf((*IscsiFaultVnicInUse)(nil)).Elem()
    +}
    +
    +type IscsiFaultVnicInUseFault IscsiFaultVnicInUse
    +
    +func init() {
    +	t["IscsiFaultVnicInUseFault"] = reflect.TypeOf((*IscsiFaultVnicInUseFault)(nil)).Elem()
    +}
    +
    +type IscsiFaultVnicIsLastPath struct {
    +	IscsiFault
    +
    +	VnicDevice string `xml:"vnicDevice"`
    +}
    +
    +func init() {
    +	t["IscsiFaultVnicIsLastPath"] = reflect.TypeOf((*IscsiFaultVnicIsLastPath)(nil)).Elem()
    +}
    +
    +type IscsiFaultVnicIsLastPathFault IscsiFaultVnicIsLastPath
    +
    +func init() {
    +	t["IscsiFaultVnicIsLastPathFault"] = reflect.TypeOf((*IscsiFaultVnicIsLastPathFault)(nil)).Elem()
    +}
    +
    +type IscsiFaultVnicNotBound struct {
    +	IscsiFault
    +
    +	VnicDevice string `xml:"vnicDevice"`
    +}
    +
    +func init() {
    +	t["IscsiFaultVnicNotBound"] = reflect.TypeOf((*IscsiFaultVnicNotBound)(nil)).Elem()
    +}
    +
    +type IscsiFaultVnicNotBoundFault IscsiFaultVnicNotBound
    +
    +func init() {
    +	t["IscsiFaultVnicNotBoundFault"] = reflect.TypeOf((*IscsiFaultVnicNotBoundFault)(nil)).Elem()
    +}
    +
    +type IscsiFaultVnicNotFound struct {
    +	IscsiFault
    +
    +	VnicDevice string `xml:"vnicDevice"`
    +}
    +
    +func init() {
    +	t["IscsiFaultVnicNotFound"] = reflect.TypeOf((*IscsiFaultVnicNotFound)(nil)).Elem()
    +}
    +
    +type IscsiFaultVnicNotFoundFault IscsiFaultVnicNotFound
    +
    +func init() {
    +	t["IscsiFaultVnicNotFoundFault"] = reflect.TypeOf((*IscsiFaultVnicNotFoundFault)(nil)).Elem()
    +}
    +
    +type IscsiMigrationDependency struct {
    +	DynamicData
    +
    +	MigrationAllowed bool                    `xml:"migrationAllowed"`
    +	DisallowReason   *IscsiStatus            `xml:"disallowReason,omitempty"`
    +	Dependency       []IscsiDependencyEntity `xml:"dependency,omitempty"`
    +}
    +
    +func init() {
    +	t["IscsiMigrationDependency"] = reflect.TypeOf((*IscsiMigrationDependency)(nil)).Elem()
    +}
    +
    +type IscsiPortInfo struct {
    +	DynamicData
    +
    +	VnicDevice        string          `xml:"vnicDevice,omitempty"`
    +	Vnic              *HostVirtualNic `xml:"vnic,omitempty"`
    +	PnicDevice        string          `xml:"pnicDevice,omitempty"`
    +	Pnic              *PhysicalNic    `xml:"pnic,omitempty"`
    +	SwitchName        string          `xml:"switchName,omitempty"`
    +	SwitchUuid        string          `xml:"switchUuid,omitempty"`
    +	PortgroupName     string          `xml:"portgroupName,omitempty"`
    +	PortgroupKey      string          `xml:"portgroupKey,omitempty"`
    +	PortKey           string          `xml:"portKey,omitempty"`
    +	OpaqueNetworkId   string          `xml:"opaqueNetworkId,omitempty"`
    +	OpaqueNetworkType string          `xml:"opaqueNetworkType,omitempty"`
    +	OpaqueNetworkName string          `xml:"opaqueNetworkName,omitempty"`
    +	ExternalId        string          `xml:"externalId,omitempty"`
    +	ComplianceStatus  *IscsiStatus    `xml:"complianceStatus,omitempty"`
    +	PathStatus        string          `xml:"pathStatus,omitempty"`
    +}
    +
    +func init() {
    +	t["IscsiPortInfo"] = reflect.TypeOf((*IscsiPortInfo)(nil)).Elem()
    +}
    +
    +type IscsiStatus struct {
    +	DynamicData
    +
    +	Reason []LocalizedMethodFault `xml:"reason,omitempty"`
    +}
    +
    +func init() {
    +	t["IscsiStatus"] = reflect.TypeOf((*IscsiStatus)(nil)).Elem()
    +}
    +
    +type IsoImageFileInfo struct {
    +	FileInfo
    +}
    +
    +func init() {
    +	t["IsoImageFileInfo"] = reflect.TypeOf((*IsoImageFileInfo)(nil)).Elem()
    +}
    +
    +type IsoImageFileQuery struct {
    +	FileQuery
    +}
    +
    +func init() {
    +	t["IsoImageFileQuery"] = reflect.TypeOf((*IsoImageFileQuery)(nil)).Elem()
    +}
    +
    +type JoinDomainRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	DomainName string                 `xml:"domainName"`
    +	UserName   string                 `xml:"userName"`
    +	Password   string                 `xml:"password"`
    +}
    +
    +func init() {
    +	t["JoinDomainRequestType"] = reflect.TypeOf((*JoinDomainRequestType)(nil)).Elem()
    +}
    +
    +type JoinDomainWithCAMRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	DomainName string                 `xml:"domainName"`
    +	CamServer  string                 `xml:"camServer"`
    +}
    +
    +func init() {
    +	t["JoinDomainWithCAMRequestType"] = reflect.TypeOf((*JoinDomainWithCAMRequestType)(nil)).Elem()
    +}
    +
    +type JoinDomainWithCAM_Task JoinDomainWithCAMRequestType
    +
    +func init() {
    +	t["JoinDomainWithCAM_Task"] = reflect.TypeOf((*JoinDomainWithCAM_Task)(nil)).Elem()
    +}
    +
    +type JoinDomainWithCAM_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type JoinDomain_Task JoinDomainRequestType
    +
    +func init() {
    +	t["JoinDomain_Task"] = reflect.TypeOf((*JoinDomain_Task)(nil)).Elem()
    +}
    +
    +type JoinDomain_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type KernelModuleInfo struct {
    +	DynamicData
    +
    +	Id              int32                   `xml:"id"`
    +	Name            string                  `xml:"name"`
    +	Version         string                  `xml:"version"`
    +	Filename        string                  `xml:"filename"`
    +	OptionString    string                  `xml:"optionString"`
    +	Loaded          bool                    `xml:"loaded"`
    +	Enabled         bool                    `xml:"enabled"`
    +	UseCount        int32                   `xml:"useCount"`
    +	ReadOnlySection KernelModuleSectionInfo `xml:"readOnlySection"`
    +	WritableSection KernelModuleSectionInfo `xml:"writableSection"`
    +	TextSection     KernelModuleSectionInfo `xml:"textSection"`
    +	DataSection     KernelModuleSectionInfo `xml:"dataSection"`
    +	BssSection      KernelModuleSectionInfo `xml:"bssSection"`
    +}
    +
    +func init() {
    +	t["KernelModuleInfo"] = reflect.TypeOf((*KernelModuleInfo)(nil)).Elem()
    +}
    +
    +type KernelModuleSectionInfo struct {
    +	DynamicData
    +
    +	Address int64 `xml:"address"`
    +	Length  int32 `xml:"length,omitempty"`
    +}
    +
    +func init() {
    +	t["KernelModuleSectionInfo"] = reflect.TypeOf((*KernelModuleSectionInfo)(nil)).Elem()
    +}
    +
    +type KeyAnyValue struct {
    +	DynamicData
    +
    +	Key   string  `xml:"key"`
    +	Value AnyType `xml:"value,typeattr"`
    +}
    +
    +func init() {
    +	t["KeyAnyValue"] = reflect.TypeOf((*KeyAnyValue)(nil)).Elem()
    +}
    +
    +type KeyProviderId struct {
    +	DynamicData
    +
    +	Id string `xml:"id"`
    +}
    +
    +func init() {
    +	t["KeyProviderId"] = reflect.TypeOf((*KeyProviderId)(nil)).Elem()
    +}
    +
    +type KeyValue struct {
    +	DynamicData
    +
    +	Key   string `xml:"key"`
    +	Value string `xml:"value"`
    +}
    +
    +func init() {
    +	t["KeyValue"] = reflect.TypeOf((*KeyValue)(nil)).Elem()
    +}
    +
    +type KmipClusterInfo struct {
    +	DynamicData
    +
    +	ClusterId    KeyProviderId    `xml:"clusterId"`
    +	Servers      []KmipServerInfo `xml:"servers,omitempty"`
    +	UseAsDefault bool             `xml:"useAsDefault"`
    +}
    +
    +func init() {
    +	t["KmipClusterInfo"] = reflect.TypeOf((*KmipClusterInfo)(nil)).Elem()
    +}
    +
    +type KmipServerInfo struct {
    +	DynamicData
    +
    +	Name         string `xml:"name"`
    +	Address      string `xml:"address"`
    +	Port         int32  `xml:"port"`
    +	ProxyAddress string `xml:"proxyAddress,omitempty"`
    +	ProxyPort    int32  `xml:"proxyPort,omitempty"`
    +	Reconnect    int32  `xml:"reconnect,omitempty"`
    +	Protocol     string `xml:"protocol,omitempty"`
    +	Nbio         int32  `xml:"nbio,omitempty"`
    +	Timeout      int32  `xml:"timeout,omitempty"`
    +	UserName     string `xml:"userName,omitempty"`
    +}
    +
    +func init() {
    +	t["KmipServerInfo"] = reflect.TypeOf((*KmipServerInfo)(nil)).Elem()
    +}
    +
    +type KmipServerSpec struct {
    +	DynamicData
    +
    +	ClusterId KeyProviderId  `xml:"clusterId"`
    +	Info      KmipServerInfo `xml:"info"`
    +	Password  string         `xml:"password,omitempty"`
    +}
    +
    +func init() {
    +	t["KmipServerSpec"] = reflect.TypeOf((*KmipServerSpec)(nil)).Elem()
    +}
    +
    +type KmipServerStatus struct {
    +	DynamicData
    +
    +	ClusterId   KeyProviderId       `xml:"clusterId"`
    +	Name        string              `xml:"name"`
    +	Status      ManagedEntityStatus `xml:"status"`
    +	Description string              `xml:"description"`
    +}
    +
    +func init() {
    +	t["KmipServerStatus"] = reflect.TypeOf((*KmipServerStatus)(nil)).Elem()
    +}
    +
    +type LargeRDMConversionNotSupported struct {
    +	MigrationFault
    +
    +	Device string `xml:"device"`
    +}
    +
    +func init() {
    +	t["LargeRDMConversionNotSupported"] = reflect.TypeOf((*LargeRDMConversionNotSupported)(nil)).Elem()
    +}
    +
    +type LargeRDMConversionNotSupportedFault LargeRDMConversionNotSupported
    +
    +func init() {
    +	t["LargeRDMConversionNotSupportedFault"] = reflect.TypeOf((*LargeRDMConversionNotSupportedFault)(nil)).Elem()
    +}
    +
    +type LargeRDMNotSupportedOnDatastore struct {
    +	VmConfigFault
    +
    +	Device        string                 `xml:"device"`
    +	Datastore     ManagedObjectReference `xml:"datastore"`
    +	DatastoreName string                 `xml:"datastoreName"`
    +}
    +
    +func init() {
    +	t["LargeRDMNotSupportedOnDatastore"] = reflect.TypeOf((*LargeRDMNotSupportedOnDatastore)(nil)).Elem()
    +}
    +
    +type LargeRDMNotSupportedOnDatastoreFault LargeRDMNotSupportedOnDatastore
    +
    +func init() {
    +	t["LargeRDMNotSupportedOnDatastoreFault"] = reflect.TypeOf((*LargeRDMNotSupportedOnDatastoreFault)(nil)).Elem()
    +}
    +
    +type LatencySensitivity struct {
    +	DynamicData
    +
    +	Level       LatencySensitivitySensitivityLevel `xml:"level"`
    +	Sensitivity int32                              `xml:"sensitivity,omitempty"`
    +}
    +
    +func init() {
    +	t["LatencySensitivity"] = reflect.TypeOf((*LatencySensitivity)(nil)).Elem()
    +}
    +
    +type LeaveCurrentDomainRequestType struct {
    +	This  ManagedObjectReference `xml:"_this"`
    +	Force bool                   `xml:"force"`
    +}
    +
    +func init() {
    +	t["LeaveCurrentDomainRequestType"] = reflect.TypeOf((*LeaveCurrentDomainRequestType)(nil)).Elem()
    +}
    +
    +type LeaveCurrentDomain_Task LeaveCurrentDomainRequestType
    +
    +func init() {
    +	t["LeaveCurrentDomain_Task"] = reflect.TypeOf((*LeaveCurrentDomain_Task)(nil)).Elem()
    +}
    +
    +type LeaveCurrentDomain_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type LegacyNetworkInterfaceInUse struct {
    +	CannotAccessNetwork
    +}
    +
    +func init() {
    +	t["LegacyNetworkInterfaceInUse"] = reflect.TypeOf((*LegacyNetworkInterfaceInUse)(nil)).Elem()
    +}
    +
    +type LegacyNetworkInterfaceInUseFault LegacyNetworkInterfaceInUse
    +
    +func init() {
    +	t["LegacyNetworkInterfaceInUseFault"] = reflect.TypeOf((*LegacyNetworkInterfaceInUseFault)(nil)).Elem()
    +}
    +
    +type LicenseAssignmentFailed struct {
    +	RuntimeFault
    +
    +	Reason string `xml:"reason,omitempty"`
    +}
    +
    +func init() {
    +	t["LicenseAssignmentFailed"] = reflect.TypeOf((*LicenseAssignmentFailed)(nil)).Elem()
    +}
    +
    +type LicenseAssignmentFailedFault LicenseAssignmentFailed
    +
    +func init() {
    +	t["LicenseAssignmentFailedFault"] = reflect.TypeOf((*LicenseAssignmentFailedFault)(nil)).Elem()
    +}
    +
    +type LicenseAssignmentManagerLicenseAssignment struct {
    +	DynamicData
    +
    +	EntityId          string                    `xml:"entityId"`
    +	Scope             string                    `xml:"scope,omitempty"`
    +	EntityDisplayName string                    `xml:"entityDisplayName,omitempty"`
    +	AssignedLicense   LicenseManagerLicenseInfo `xml:"assignedLicense"`
    +	Properties        []KeyAnyValue             `xml:"properties,omitempty"`
    +}
    +
    +func init() {
    +	t["LicenseAssignmentManagerLicenseAssignment"] = reflect.TypeOf((*LicenseAssignmentManagerLicenseAssignment)(nil)).Elem()
    +}
    +
    +type LicenseAvailabilityInfo struct {
    +	DynamicData
    +
    +	Feature   LicenseFeatureInfo `xml:"feature"`
    +	Total     int32              `xml:"total"`
    +	Available int32              `xml:"available"`
    +}
    +
    +func init() {
    +	t["LicenseAvailabilityInfo"] = reflect.TypeOf((*LicenseAvailabilityInfo)(nil)).Elem()
    +}
    +
    +type LicenseDiagnostics struct {
    +	DynamicData
    +
    +	SourceLastChanged      time.Time           `xml:"sourceLastChanged"`
    +	SourceLost             string              `xml:"sourceLost"`
    +	SourceLatency          float32             `xml:"sourceLatency"`
    +	LicenseRequests        string              `xml:"licenseRequests"`
    +	LicenseRequestFailures string              `xml:"licenseRequestFailures"`
    +	LicenseFeatureUnknowns string              `xml:"licenseFeatureUnknowns"`
    +	OpState                LicenseManagerState `xml:"opState"`
    +	LastStatusUpdate       time.Time           `xml:"lastStatusUpdate"`
    +	OpFailureMessage       string              `xml:"opFailureMessage"`
    +}
    +
    +func init() {
    +	t["LicenseDiagnostics"] = reflect.TypeOf((*LicenseDiagnostics)(nil)).Elem()
    +}
    +
    +type LicenseDowngradeDisallowed struct {
    +	NotEnoughLicenses
    +
    +	Edition  string        `xml:"edition"`
    +	EntityId string        `xml:"entityId"`
    +	Features []KeyAnyValue `xml:"features"`
    +}
    +
    +func init() {
    +	t["LicenseDowngradeDisallowed"] = reflect.TypeOf((*LicenseDowngradeDisallowed)(nil)).Elem()
    +}
    +
    +type LicenseDowngradeDisallowedFault LicenseDowngradeDisallowed
    +
    +func init() {
    +	t["LicenseDowngradeDisallowedFault"] = reflect.TypeOf((*LicenseDowngradeDisallowedFault)(nil)).Elem()
    +}
    +
    +type LicenseEntityNotFound struct {
    +	VimFault
    +
    +	EntityId string `xml:"entityId"`
    +}
    +
    +func init() {
    +	t["LicenseEntityNotFound"] = reflect.TypeOf((*LicenseEntityNotFound)(nil)).Elem()
    +}
    +
    +type LicenseEntityNotFoundFault LicenseEntityNotFound
    +
    +func init() {
    +	t["LicenseEntityNotFoundFault"] = reflect.TypeOf((*LicenseEntityNotFoundFault)(nil)).Elem()
    +}
    +
    +type LicenseEvent struct {
    +	Event
    +}
    +
    +func init() {
    +	t["LicenseEvent"] = reflect.TypeOf((*LicenseEvent)(nil)).Elem()
    +}
    +
    +type LicenseExpired struct {
    +	NotEnoughLicenses
    +
    +	LicenseKey string `xml:"licenseKey"`
    +}
    +
    +func init() {
    +	t["LicenseExpired"] = reflect.TypeOf((*LicenseExpired)(nil)).Elem()
    +}
    +
    +type LicenseExpiredEvent struct {
    +	Event
    +
    +	Feature LicenseFeatureInfo `xml:"feature"`
    +}
    +
    +func init() {
    +	t["LicenseExpiredEvent"] = reflect.TypeOf((*LicenseExpiredEvent)(nil)).Elem()
    +}
    +
    +type LicenseExpiredFault LicenseExpired
    +
    +func init() {
    +	t["LicenseExpiredFault"] = reflect.TypeOf((*LicenseExpiredFault)(nil)).Elem()
    +}
    +
    +type LicenseFeatureInfo struct {
    +	DynamicData
    +
    +	Key                string                  `xml:"key"`
    +	FeatureName        string                  `xml:"featureName"`
    +	FeatureDescription string                  `xml:"featureDescription,omitempty"`
    +	State              LicenseFeatureInfoState `xml:"state,omitempty"`
    +	CostUnit           string                  `xml:"costUnit"`
    +	SourceRestriction  string                  `xml:"sourceRestriction,omitempty"`
    +	DependentKey       []string                `xml:"dependentKey,omitempty"`
    +	Edition            *bool                   `xml:"edition"`
    +	ExpiresOn          *time.Time              `xml:"expiresOn"`
    +}
    +
    +func init() {
    +	t["LicenseFeatureInfo"] = reflect.TypeOf((*LicenseFeatureInfo)(nil)).Elem()
    +}
    +
    +type LicenseKeyEntityMismatch struct {
    +	NotEnoughLicenses
    +}
    +
    +func init() {
    +	t["LicenseKeyEntityMismatch"] = reflect.TypeOf((*LicenseKeyEntityMismatch)(nil)).Elem()
    +}
    +
    +type LicenseKeyEntityMismatchFault LicenseKeyEntityMismatch
    +
    +func init() {
    +	t["LicenseKeyEntityMismatchFault"] = reflect.TypeOf((*LicenseKeyEntityMismatchFault)(nil)).Elem()
    +}
    +
    +type LicenseManagerEvaluationInfo struct {
    +	DynamicData
    +
    +	Properties []KeyAnyValue `xml:"properties"`
    +}
    +
    +func init() {
    +	t["LicenseManagerEvaluationInfo"] = reflect.TypeOf((*LicenseManagerEvaluationInfo)(nil)).Elem()
    +}
    +
    +type LicenseManagerLicenseInfo struct {
    +	DynamicData
    +
    +	LicenseKey string        `xml:"licenseKey"`
    +	EditionKey string        `xml:"editionKey"`
    +	Name       string        `xml:"name"`
    +	Total      int32         `xml:"total"`
    +	Used       int32         `xml:"used,omitempty"`
    +	CostUnit   string        `xml:"costUnit"`
    +	Properties []KeyAnyValue `xml:"properties,omitempty"`
    +	Labels     []KeyValue    `xml:"labels,omitempty"`
    +}
    +
    +func init() {
    +	t["LicenseManagerLicenseInfo"] = reflect.TypeOf((*LicenseManagerLicenseInfo)(nil)).Elem()
    +}
    +
    +type LicenseNonComplianceEvent struct {
    +	LicenseEvent
    +
    +	Url string `xml:"url"`
    +}
    +
    +func init() {
    +	t["LicenseNonComplianceEvent"] = reflect.TypeOf((*LicenseNonComplianceEvent)(nil)).Elem()
    +}
    +
    +type LicenseReservationInfo struct {
    +	DynamicData
    +
    +	Key      string                      `xml:"key"`
    +	State    LicenseReservationInfoState `xml:"state"`
    +	Required int32                       `xml:"required"`
    +}
    +
    +func init() {
    +	t["LicenseReservationInfo"] = reflect.TypeOf((*LicenseReservationInfo)(nil)).Elem()
    +}
    +
    +type LicenseRestricted struct {
    +	NotEnoughLicenses
    +}
    +
    +func init() {
    +	t["LicenseRestricted"] = reflect.TypeOf((*LicenseRestricted)(nil)).Elem()
    +}
    +
    +type LicenseRestrictedEvent struct {
    +	LicenseEvent
    +}
    +
    +func init() {
    +	t["LicenseRestrictedEvent"] = reflect.TypeOf((*LicenseRestrictedEvent)(nil)).Elem()
    +}
    +
    +type LicenseRestrictedFault LicenseRestricted
    +
    +func init() {
    +	t["LicenseRestrictedFault"] = reflect.TypeOf((*LicenseRestrictedFault)(nil)).Elem()
    +}
    +
    +type LicenseServerAvailableEvent struct {
    +	LicenseEvent
    +
    +	LicenseServer string `xml:"licenseServer"`
    +}
    +
    +func init() {
    +	t["LicenseServerAvailableEvent"] = reflect.TypeOf((*LicenseServerAvailableEvent)(nil)).Elem()
    +}
    +
    +type LicenseServerSource struct {
    +	LicenseSource
    +
    +	LicenseServer string `xml:"licenseServer"`
    +}
    +
    +func init() {
    +	t["LicenseServerSource"] = reflect.TypeOf((*LicenseServerSource)(nil)).Elem()
    +}
    +
    +type LicenseServerUnavailable struct {
    +	VimFault
    +
    +	LicenseServer string `xml:"licenseServer"`
    +}
    +
    +func init() {
    +	t["LicenseServerUnavailable"] = reflect.TypeOf((*LicenseServerUnavailable)(nil)).Elem()
    +}
    +
    +type LicenseServerUnavailableEvent struct {
    +	LicenseEvent
    +
    +	LicenseServer string `xml:"licenseServer"`
    +}
    +
    +func init() {
    +	t["LicenseServerUnavailableEvent"] = reflect.TypeOf((*LicenseServerUnavailableEvent)(nil)).Elem()
    +}
    +
    +type LicenseServerUnavailableFault LicenseServerUnavailable
    +
    +func init() {
    +	t["LicenseServerUnavailableFault"] = reflect.TypeOf((*LicenseServerUnavailableFault)(nil)).Elem()
    +}
    +
    +type LicenseSource struct {
    +	DynamicData
    +}
    +
    +func init() {
    +	t["LicenseSource"] = reflect.TypeOf((*LicenseSource)(nil)).Elem()
    +}
    +
    +type LicenseSourceUnavailable struct {
    +	NotEnoughLicenses
    +
    +	LicenseSource BaseLicenseSource `xml:"licenseSource,typeattr"`
    +}
    +
    +func init() {
    +	t["LicenseSourceUnavailable"] = reflect.TypeOf((*LicenseSourceUnavailable)(nil)).Elem()
    +}
    +
    +type LicenseSourceUnavailableFault LicenseSourceUnavailable
    +
    +func init() {
    +	t["LicenseSourceUnavailableFault"] = reflect.TypeOf((*LicenseSourceUnavailableFault)(nil)).Elem()
    +}
    +
    +type LicenseUsageInfo struct {
    +	DynamicData
    +
    +	Source          BaseLicenseSource        `xml:"source,typeattr"`
    +	SourceAvailable bool                     `xml:"sourceAvailable"`
    +	ReservationInfo []LicenseReservationInfo `xml:"reservationInfo,omitempty"`
    +	FeatureInfo     []LicenseFeatureInfo     `xml:"featureInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["LicenseUsageInfo"] = reflect.TypeOf((*LicenseUsageInfo)(nil)).Elem()
    +}
    +
    +type LimitExceeded struct {
    +	VimFault
    +
    +	Property string `xml:"property,omitempty"`
    +	Limit    *int32 `xml:"limit"`
    +}
    +
    +func init() {
    +	t["LimitExceeded"] = reflect.TypeOf((*LimitExceeded)(nil)).Elem()
    +}
    +
    +type LimitExceededFault LimitExceeded
    +
    +func init() {
    +	t["LimitExceededFault"] = reflect.TypeOf((*LimitExceededFault)(nil)).Elem()
    +}
    +
    +type LinkDiscoveryProtocolConfig struct {
    +	DynamicData
    +
    +	Protocol  string `xml:"protocol"`
    +	Operation string `xml:"operation"`
    +}
    +
    +func init() {
    +	t["LinkDiscoveryProtocolConfig"] = reflect.TypeOf((*LinkDiscoveryProtocolConfig)(nil)).Elem()
    +}
    +
    +type LinkLayerDiscoveryProtocolInfo struct {
    +	DynamicData
    +
    +	ChassisId  string        `xml:"chassisId"`
    +	PortId     string        `xml:"portId"`
    +	TimeToLive int32         `xml:"timeToLive"`
    +	Parameter  []KeyAnyValue `xml:"parameter,omitempty"`
    +}
    +
    +func init() {
    +	t["LinkLayerDiscoveryProtocolInfo"] = reflect.TypeOf((*LinkLayerDiscoveryProtocolInfo)(nil)).Elem()
    +}
    +
    +type LinkProfile struct {
    +	ApplyProfile
    +}
    +
    +func init() {
    +	t["LinkProfile"] = reflect.TypeOf((*LinkProfile)(nil)).Elem()
    +}
    +
    +type LinuxVolumeNotClean struct {
    +	CustomizationFault
    +}
    +
    +func init() {
    +	t["LinuxVolumeNotClean"] = reflect.TypeOf((*LinuxVolumeNotClean)(nil)).Elem()
    +}
    +
    +type LinuxVolumeNotCleanFault LinuxVolumeNotClean
    +
    +func init() {
    +	t["LinuxVolumeNotCleanFault"] = reflect.TypeOf((*LinuxVolumeNotCleanFault)(nil)).Elem()
    +}
    +
    +type ListCACertificateRevocationLists ListCACertificateRevocationListsRequestType
    +
    +func init() {
    +	t["ListCACertificateRevocationLists"] = reflect.TypeOf((*ListCACertificateRevocationLists)(nil)).Elem()
    +}
    +
    +type ListCACertificateRevocationListsRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["ListCACertificateRevocationListsRequestType"] = reflect.TypeOf((*ListCACertificateRevocationListsRequestType)(nil)).Elem()
    +}
    +
    +type ListCACertificateRevocationListsResponse struct {
    +	Returnval []string `xml:"returnval,omitempty"`
    +}
    +
    +type ListCACertificates ListCACertificatesRequestType
    +
    +func init() {
    +	t["ListCACertificates"] = reflect.TypeOf((*ListCACertificates)(nil)).Elem()
    +}
    +
    +type ListCACertificatesRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["ListCACertificatesRequestType"] = reflect.TypeOf((*ListCACertificatesRequestType)(nil)).Elem()
    +}
    +
    +type ListCACertificatesResponse struct {
    +	Returnval []string `xml:"returnval,omitempty"`
    +}
    +
    +type ListFilesInGuest ListFilesInGuestRequestType
    +
    +func init() {
    +	t["ListFilesInGuest"] = reflect.TypeOf((*ListFilesInGuest)(nil)).Elem()
    +}
    +
    +type ListFilesInGuestRequestType struct {
    +	This         ManagedObjectReference  `xml:"_this"`
    +	Vm           ManagedObjectReference  `xml:"vm"`
    +	Auth         BaseGuestAuthentication `xml:"auth,typeattr"`
    +	FilePath     string                  `xml:"filePath"`
    +	Index        int32                   `xml:"index,omitempty"`
    +	MaxResults   int32                   `xml:"maxResults,omitempty"`
    +	MatchPattern string                  `xml:"matchPattern,omitempty"`
    +}
    +
    +func init() {
    +	t["ListFilesInGuestRequestType"] = reflect.TypeOf((*ListFilesInGuestRequestType)(nil)).Elem()
    +}
    +
    +type ListFilesInGuestResponse struct {
    +	Returnval GuestListFileInfo `xml:"returnval"`
    +}
    +
    +type ListGuestAliases ListGuestAliasesRequestType
    +
    +func init() {
    +	t["ListGuestAliases"] = reflect.TypeOf((*ListGuestAliases)(nil)).Elem()
    +}
    +
    +type ListGuestAliasesRequestType struct {
    +	This     ManagedObjectReference  `xml:"_this"`
    +	Vm       ManagedObjectReference  `xml:"vm"`
    +	Auth     BaseGuestAuthentication `xml:"auth,typeattr"`
    +	Username string                  `xml:"username"`
    +}
    +
    +func init() {
    +	t["ListGuestAliasesRequestType"] = reflect.TypeOf((*ListGuestAliasesRequestType)(nil)).Elem()
    +}
    +
    +type ListGuestAliasesResponse struct {
    +	Returnval []GuestAliases `xml:"returnval,omitempty"`
    +}
    +
    +type ListGuestMappedAliases ListGuestMappedAliasesRequestType
    +
    +func init() {
    +	t["ListGuestMappedAliases"] = reflect.TypeOf((*ListGuestMappedAliases)(nil)).Elem()
    +}
    +
    +type ListGuestMappedAliasesRequestType struct {
    +	This ManagedObjectReference  `xml:"_this"`
    +	Vm   ManagedObjectReference  `xml:"vm"`
    +	Auth BaseGuestAuthentication `xml:"auth,typeattr"`
    +}
    +
    +func init() {
    +	t["ListGuestMappedAliasesRequestType"] = reflect.TypeOf((*ListGuestMappedAliasesRequestType)(nil)).Elem()
    +}
    +
    +type ListGuestMappedAliasesResponse struct {
    +	Returnval []GuestMappedAliases `xml:"returnval,omitempty"`
    +}
    +
    +type ListKeys ListKeysRequestType
    +
    +func init() {
    +	t["ListKeys"] = reflect.TypeOf((*ListKeys)(nil)).Elem()
    +}
    +
    +type ListKeysRequestType struct {
    +	This  ManagedObjectReference `xml:"_this"`
    +	Limit *int32                 `xml:"limit"`
    +}
    +
    +func init() {
    +	t["ListKeysRequestType"] = reflect.TypeOf((*ListKeysRequestType)(nil)).Elem()
    +}
    +
    +type ListKeysResponse struct {
    +	Returnval []CryptoKeyId `xml:"returnval,omitempty"`
    +}
    +
    +type ListKmipServers ListKmipServersRequestType
    +
    +func init() {
    +	t["ListKmipServers"] = reflect.TypeOf((*ListKmipServers)(nil)).Elem()
    +}
    +
    +type ListKmipServersRequestType struct {
    +	This  ManagedObjectReference `xml:"_this"`
    +	Limit *int32                 `xml:"limit"`
    +}
    +
    +func init() {
    +	t["ListKmipServersRequestType"] = reflect.TypeOf((*ListKmipServersRequestType)(nil)).Elem()
    +}
    +
    +type ListKmipServersResponse struct {
    +	Returnval []KmipClusterInfo `xml:"returnval,omitempty"`
    +}
    +
    +type ListProcessesInGuest ListProcessesInGuestRequestType
    +
    +func init() {
    +	t["ListProcessesInGuest"] = reflect.TypeOf((*ListProcessesInGuest)(nil)).Elem()
    +}
    +
    +type ListProcessesInGuestRequestType struct {
    +	This ManagedObjectReference  `xml:"_this"`
    +	Vm   ManagedObjectReference  `xml:"vm"`
    +	Auth BaseGuestAuthentication `xml:"auth,typeattr"`
    +	Pids []int64                 `xml:"pids,omitempty"`
    +}
    +
    +func init() {
    +	t["ListProcessesInGuestRequestType"] = reflect.TypeOf((*ListProcessesInGuestRequestType)(nil)).Elem()
    +}
    +
    +type ListProcessesInGuestResponse struct {
    +	Returnval []GuestProcessInfo `xml:"returnval,omitempty"`
    +}
    +
    +type ListRegistryKeysInGuest ListRegistryKeysInGuestRequestType
    +
    +func init() {
    +	t["ListRegistryKeysInGuest"] = reflect.TypeOf((*ListRegistryKeysInGuest)(nil)).Elem()
    +}
    +
    +type ListRegistryKeysInGuestRequestType struct {
    +	This         ManagedObjectReference  `xml:"_this"`
    +	Vm           ManagedObjectReference  `xml:"vm"`
    +	Auth         BaseGuestAuthentication `xml:"auth,typeattr"`
    +	KeyName      GuestRegKeyNameSpec     `xml:"keyName"`
    +	Recursive    bool                    `xml:"recursive"`
    +	MatchPattern string                  `xml:"matchPattern,omitempty"`
    +}
    +
    +func init() {
    +	t["ListRegistryKeysInGuestRequestType"] = reflect.TypeOf((*ListRegistryKeysInGuestRequestType)(nil)).Elem()
    +}
    +
    +type ListRegistryKeysInGuestResponse struct {
    +	Returnval []GuestRegKeyRecordSpec `xml:"returnval,omitempty"`
    +}
    +
    +type ListRegistryValuesInGuest ListRegistryValuesInGuestRequestType
    +
    +func init() {
    +	t["ListRegistryValuesInGuest"] = reflect.TypeOf((*ListRegistryValuesInGuest)(nil)).Elem()
    +}
    +
    +type ListRegistryValuesInGuestRequestType struct {
    +	This          ManagedObjectReference  `xml:"_this"`
    +	Vm            ManagedObjectReference  `xml:"vm"`
    +	Auth          BaseGuestAuthentication `xml:"auth,typeattr"`
    +	KeyName       GuestRegKeyNameSpec     `xml:"keyName"`
    +	ExpandStrings bool                    `xml:"expandStrings"`
    +	MatchPattern  string                  `xml:"matchPattern,omitempty"`
    +}
    +
    +func init() {
    +	t["ListRegistryValuesInGuestRequestType"] = reflect.TypeOf((*ListRegistryValuesInGuestRequestType)(nil)).Elem()
    +}
    +
    +type ListRegistryValuesInGuestResponse struct {
    +	Returnval []GuestRegValueSpec `xml:"returnval,omitempty"`
    +}
    +
    +type ListSmartCardTrustAnchors ListSmartCardTrustAnchorsRequestType
    +
    +func init() {
    +	t["ListSmartCardTrustAnchors"] = reflect.TypeOf((*ListSmartCardTrustAnchors)(nil)).Elem()
    +}
    +
    +type ListSmartCardTrustAnchorsRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["ListSmartCardTrustAnchorsRequestType"] = reflect.TypeOf((*ListSmartCardTrustAnchorsRequestType)(nil)).Elem()
    +}
    +
    +type ListSmartCardTrustAnchorsResponse struct {
    +	Returnval []string `xml:"returnval,omitempty"`
    +}
    +
    +type ListTagsAttachedToVStorageObject ListTagsAttachedToVStorageObjectRequestType
    +
    +func init() {
    +	t["ListTagsAttachedToVStorageObject"] = reflect.TypeOf((*ListTagsAttachedToVStorageObject)(nil)).Elem()
    +}
    +
    +type ListTagsAttachedToVStorageObjectRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Id   ID                     `xml:"id"`
    +}
    +
    +func init() {
    +	t["ListTagsAttachedToVStorageObjectRequestType"] = reflect.TypeOf((*ListTagsAttachedToVStorageObjectRequestType)(nil)).Elem()
    +}
    +
    +type ListTagsAttachedToVStorageObjectResponse struct {
    +	Returnval []VslmTagEntry `xml:"returnval,omitempty"`
    +}
    +
    +type ListVStorageObject ListVStorageObjectRequestType
    +
    +func init() {
    +	t["ListVStorageObject"] = reflect.TypeOf((*ListVStorageObject)(nil)).Elem()
    +}
    +
    +type ListVStorageObjectRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	Datastore ManagedObjectReference `xml:"datastore"`
    +}
    +
    +func init() {
    +	t["ListVStorageObjectRequestType"] = reflect.TypeOf((*ListVStorageObjectRequestType)(nil)).Elem()
    +}
    +
    +type ListVStorageObjectResponse struct {
    +	Returnval []ID `xml:"returnval,omitempty"`
    +}
    +
    +type ListVStorageObjectsAttachedToTag ListVStorageObjectsAttachedToTagRequestType
    +
    +func init() {
    +	t["ListVStorageObjectsAttachedToTag"] = reflect.TypeOf((*ListVStorageObjectsAttachedToTag)(nil)).Elem()
    +}
    +
    +type ListVStorageObjectsAttachedToTagRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	Category string                 `xml:"category"`
    +	Tag      string                 `xml:"tag"`
    +}
    +
    +func init() {
    +	t["ListVStorageObjectsAttachedToTagRequestType"] = reflect.TypeOf((*ListVStorageObjectsAttachedToTagRequestType)(nil)).Elem()
    +}
    +
    +type ListVStorageObjectsAttachedToTagResponse struct {
    +	Returnval []ID `xml:"returnval,omitempty"`
    +}
    +
    +type LocalDatastoreCreatedEvent struct {
    +	HostEvent
    +
    +	Datastore    DatastoreEventArgument `xml:"datastore"`
    +	DatastoreUrl string                 `xml:"datastoreUrl,omitempty"`
    +}
    +
    +func init() {
    +	t["LocalDatastoreCreatedEvent"] = reflect.TypeOf((*LocalDatastoreCreatedEvent)(nil)).Elem()
    +}
    +
    +type LocalDatastoreInfo struct {
    +	DatastoreInfo
    +
    +	Path string `xml:"path,omitempty"`
    +}
    +
    +func init() {
    +	t["LocalDatastoreInfo"] = reflect.TypeOf((*LocalDatastoreInfo)(nil)).Elem()
    +}
    +
    +type LocalLicenseSource struct {
    +	LicenseSource
    +
    +	LicenseKeys string `xml:"licenseKeys"`
    +}
    +
    +func init() {
    +	t["LocalLicenseSource"] = reflect.TypeOf((*LocalLicenseSource)(nil)).Elem()
    +}
    +
    +type LocalTSMEnabledEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["LocalTSMEnabledEvent"] = reflect.TypeOf((*LocalTSMEnabledEvent)(nil)).Elem()
    +}
    +
    +type LocalizableMessage struct {
    +	DynamicData
    +
    +	Key     string        `xml:"key"`
    +	Arg     []KeyAnyValue `xml:"arg,omitempty"`
    +	Message string        `xml:"message,omitempty"`
    +}
    +
    +func init() {
    +	t["LocalizableMessage"] = reflect.TypeOf((*LocalizableMessage)(nil)).Elem()
    +}
    +
    +type LocalizationManagerMessageCatalog struct {
    +	DynamicData
    +
    +	ModuleName   string     `xml:"moduleName"`
    +	CatalogName  string     `xml:"catalogName"`
    +	Locale       string     `xml:"locale"`
    +	CatalogUri   string     `xml:"catalogUri"`
    +	LastModified *time.Time `xml:"lastModified"`
    +	Md5sum       string     `xml:"md5sum,omitempty"`
    +	Version      string     `xml:"version,omitempty"`
    +}
    +
    +func init() {
    +	t["LocalizationManagerMessageCatalog"] = reflect.TypeOf((*LocalizationManagerMessageCatalog)(nil)).Elem()
    +}
    +
    +type LocalizedMethodFault struct {
    +	DynamicData
    +
    +	Fault            BaseMethodFault `xml:"fault,typeattr"`
    +	LocalizedMessage string          `xml:"localizedMessage,omitempty"`
    +}
    +
    +func init() {
    +	t["LocalizedMethodFault"] = reflect.TypeOf((*LocalizedMethodFault)(nil)).Elem()
    +}
    +
    +type LockerMisconfiguredEvent struct {
    +	Event
    +
    +	Datastore DatastoreEventArgument `xml:"datastore"`
    +}
    +
    +func init() {
    +	t["LockerMisconfiguredEvent"] = reflect.TypeOf((*LockerMisconfiguredEvent)(nil)).Elem()
    +}
    +
    +type LockerReconfiguredEvent struct {
    +	Event
    +
    +	OldDatastore *DatastoreEventArgument `xml:"oldDatastore,omitempty"`
    +	NewDatastore *DatastoreEventArgument `xml:"newDatastore,omitempty"`
    +}
    +
    +func init() {
    +	t["LockerReconfiguredEvent"] = reflect.TypeOf((*LockerReconfiguredEvent)(nil)).Elem()
    +}
    +
    +type LogBundlingFailed struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["LogBundlingFailed"] = reflect.TypeOf((*LogBundlingFailed)(nil)).Elem()
    +}
    +
    +type LogBundlingFailedFault LogBundlingFailed
    +
    +func init() {
    +	t["LogBundlingFailedFault"] = reflect.TypeOf((*LogBundlingFailedFault)(nil)).Elem()
    +}
    +
    +type LogUserEvent LogUserEventRequestType
    +
    +func init() {
    +	t["LogUserEvent"] = reflect.TypeOf((*LogUserEvent)(nil)).Elem()
    +}
    +
    +type LogUserEventRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	Entity ManagedObjectReference `xml:"entity"`
    +	Msg    string                 `xml:"msg"`
    +}
    +
    +func init() {
    +	t["LogUserEventRequestType"] = reflect.TypeOf((*LogUserEventRequestType)(nil)).Elem()
    +}
    +
    +type LogUserEventResponse struct {
    +}
    +
    +type Login LoginRequestType
    +
    +func init() {
    +	t["Login"] = reflect.TypeOf((*Login)(nil)).Elem()
    +}
    +
    +type LoginBySSPI LoginBySSPIRequestType
    +
    +func init() {
    +	t["LoginBySSPI"] = reflect.TypeOf((*LoginBySSPI)(nil)).Elem()
    +}
    +
    +type LoginBySSPIRequestType struct {
    +	This        ManagedObjectReference `xml:"_this"`
    +	Base64Token string                 `xml:"base64Token"`
    +	Locale      string                 `xml:"locale,omitempty"`
    +}
    +
    +func init() {
    +	t["LoginBySSPIRequestType"] = reflect.TypeOf((*LoginBySSPIRequestType)(nil)).Elem()
    +}
    +
    +type LoginBySSPIResponse struct {
    +	Returnval UserSession `xml:"returnval"`
    +}
    +
    +type LoginByToken LoginByTokenRequestType
    +
    +func init() {
    +	t["LoginByToken"] = reflect.TypeOf((*LoginByToken)(nil)).Elem()
    +}
    +
    +type LoginByTokenRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	Locale string                 `xml:"locale,omitempty"`
    +}
    +
    +func init() {
    +	t["LoginByTokenRequestType"] = reflect.TypeOf((*LoginByTokenRequestType)(nil)).Elem()
    +}
    +
    +type LoginByTokenResponse struct {
    +	Returnval UserSession `xml:"returnval"`
    +}
    +
    +type LoginExtensionByCertificate LoginExtensionByCertificateRequestType
    +
    +func init() {
    +	t["LoginExtensionByCertificate"] = reflect.TypeOf((*LoginExtensionByCertificate)(nil)).Elem()
    +}
    +
    +type LoginExtensionByCertificateRequestType struct {
    +	This         ManagedObjectReference `xml:"_this"`
    +	ExtensionKey string                 `xml:"extensionKey"`
    +	Locale       string                 `xml:"locale,omitempty"`
    +}
    +
    +func init() {
    +	t["LoginExtensionByCertificateRequestType"] = reflect.TypeOf((*LoginExtensionByCertificateRequestType)(nil)).Elem()
    +}
    +
    +type LoginExtensionByCertificateResponse struct {
    +	Returnval UserSession `xml:"returnval"`
    +}
    +
    +type LoginExtensionBySubjectName LoginExtensionBySubjectNameRequestType
    +
    +func init() {
    +	t["LoginExtensionBySubjectName"] = reflect.TypeOf((*LoginExtensionBySubjectName)(nil)).Elem()
    +}
    +
    +type LoginExtensionBySubjectNameRequestType struct {
    +	This         ManagedObjectReference `xml:"_this"`
    +	ExtensionKey string                 `xml:"extensionKey"`
    +	Locale       string                 `xml:"locale,omitempty"`
    +}
    +
    +func init() {
    +	t["LoginExtensionBySubjectNameRequestType"] = reflect.TypeOf((*LoginExtensionBySubjectNameRequestType)(nil)).Elem()
    +}
    +
    +type LoginExtensionBySubjectNameResponse struct {
    +	Returnval UserSession `xml:"returnval"`
    +}
    +
    +type LoginRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	UserName string                 `xml:"userName"`
    +	Password string                 `xml:"password"`
    +	Locale   string                 `xml:"locale,omitempty"`
    +}
    +
    +func init() {
    +	t["LoginRequestType"] = reflect.TypeOf((*LoginRequestType)(nil)).Elem()
    +}
    +
    +type LoginResponse struct {
    +	Returnval UserSession `xml:"returnval"`
    +}
    +
    +type Logout LogoutRequestType
    +
    +func init() {
    +	t["Logout"] = reflect.TypeOf((*Logout)(nil)).Elem()
    +}
    +
    +type LogoutRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["LogoutRequestType"] = reflect.TypeOf((*LogoutRequestType)(nil)).Elem()
    +}
    +
    +type LogoutResponse struct {
    +}
    +
    +type LongOption struct {
    +	OptionType
    +
    +	Min          int64 `xml:"min"`
    +	Max          int64 `xml:"max"`
    +	DefaultValue int64 `xml:"defaultValue"`
    +}
    +
    +func init() {
    +	t["LongOption"] = reflect.TypeOf((*LongOption)(nil)).Elem()
    +}
    +
    +type LongPolicy struct {
    +	InheritablePolicy
    +
    +	Value int64 `xml:"value,omitempty"`
    +}
    +
    +func init() {
    +	t["LongPolicy"] = reflect.TypeOf((*LongPolicy)(nil)).Elem()
    +}
    +
    +type LookupDvPortGroup LookupDvPortGroupRequestType
    +
    +func init() {
    +	t["LookupDvPortGroup"] = reflect.TypeOf((*LookupDvPortGroup)(nil)).Elem()
    +}
    +
    +type LookupDvPortGroupRequestType struct {
    +	This         ManagedObjectReference `xml:"_this"`
    +	PortgroupKey string                 `xml:"portgroupKey"`
    +}
    +
    +func init() {
    +	t["LookupDvPortGroupRequestType"] = reflect.TypeOf((*LookupDvPortGroupRequestType)(nil)).Elem()
    +}
    +
    +type LookupDvPortGroupResponse struct {
    +	Returnval *ManagedObjectReference `xml:"returnval,omitempty"`
    +}
    +
    +type LookupVmOverheadMemory LookupVmOverheadMemoryRequestType
    +
    +func init() {
    +	t["LookupVmOverheadMemory"] = reflect.TypeOf((*LookupVmOverheadMemory)(nil)).Elem()
    +}
    +
    +type LookupVmOverheadMemoryRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Vm   ManagedObjectReference `xml:"vm"`
    +	Host ManagedObjectReference `xml:"host"`
    +}
    +
    +func init() {
    +	t["LookupVmOverheadMemoryRequestType"] = reflect.TypeOf((*LookupVmOverheadMemoryRequestType)(nil)).Elem()
    +}
    +
    +type LookupVmOverheadMemoryResponse struct {
    +	Returnval int64 `xml:"returnval"`
    +}
    +
    +type MacAddress struct {
    +	NegatableExpression
    +}
    +
    +func init() {
    +	t["MacAddress"] = reflect.TypeOf((*MacAddress)(nil)).Elem()
    +}
    +
    +type MacRange struct {
    +	MacAddress
    +
    +	Address string `xml:"address"`
    +	Mask    string `xml:"mask"`
    +}
    +
    +func init() {
    +	t["MacRange"] = reflect.TypeOf((*MacRange)(nil)).Elem()
    +}
    +
    +type MaintenanceModeFileMove struct {
    +	MigrationFault
    +}
    +
    +func init() {
    +	t["MaintenanceModeFileMove"] = reflect.TypeOf((*MaintenanceModeFileMove)(nil)).Elem()
    +}
    +
    +type MaintenanceModeFileMoveFault MaintenanceModeFileMove
    +
    +func init() {
    +	t["MaintenanceModeFileMoveFault"] = reflect.TypeOf((*MaintenanceModeFileMoveFault)(nil)).Elem()
    +}
    +
    +type MakeDirectory MakeDirectoryRequestType
    +
    +func init() {
    +	t["MakeDirectory"] = reflect.TypeOf((*MakeDirectory)(nil)).Elem()
    +}
    +
    +type MakeDirectoryInGuest MakeDirectoryInGuestRequestType
    +
    +func init() {
    +	t["MakeDirectoryInGuest"] = reflect.TypeOf((*MakeDirectoryInGuest)(nil)).Elem()
    +}
    +
    +type MakeDirectoryInGuestRequestType struct {
    +	This                    ManagedObjectReference  `xml:"_this"`
    +	Vm                      ManagedObjectReference  `xml:"vm"`
    +	Auth                    BaseGuestAuthentication `xml:"auth,typeattr"`
    +	DirectoryPath           string                  `xml:"directoryPath"`
    +	CreateParentDirectories bool                    `xml:"createParentDirectories"`
    +}
    +
    +func init() {
    +	t["MakeDirectoryInGuestRequestType"] = reflect.TypeOf((*MakeDirectoryInGuestRequestType)(nil)).Elem()
    +}
    +
    +type MakeDirectoryInGuestResponse struct {
    +}
    +
    +type MakeDirectoryRequestType struct {
    +	This                    ManagedObjectReference  `xml:"_this"`
    +	Name                    string                  `xml:"name"`
    +	Datacenter              *ManagedObjectReference `xml:"datacenter,omitempty"`
    +	CreateParentDirectories *bool                   `xml:"createParentDirectories"`
    +}
    +
    +func init() {
    +	t["MakeDirectoryRequestType"] = reflect.TypeOf((*MakeDirectoryRequestType)(nil)).Elem()
    +}
    +
    +type MakeDirectoryResponse struct {
    +}
    +
    +type MakePrimaryVMRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Vm   ManagedObjectReference `xml:"vm"`
    +}
    +
    +func init() {
    +	t["MakePrimaryVMRequestType"] = reflect.TypeOf((*MakePrimaryVMRequestType)(nil)).Elem()
    +}
    +
    +type MakePrimaryVM_Task MakePrimaryVMRequestType
    +
    +func init() {
    +	t["MakePrimaryVM_Task"] = reflect.TypeOf((*MakePrimaryVM_Task)(nil)).Elem()
    +}
    +
    +type MakePrimaryVM_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type ManagedByInfo struct {
    +	DynamicData
    +
    +	ExtensionKey string `xml:"extensionKey"`
    +	Type         string `xml:"type"`
    +}
    +
    +func init() {
    +	t["ManagedByInfo"] = reflect.TypeOf((*ManagedByInfo)(nil)).Elem()
    +}
    +
    +type ManagedEntityEventArgument struct {
    +	EntityEventArgument
    +
    +	Entity ManagedObjectReference `xml:"entity"`
    +}
    +
    +func init() {
    +	t["ManagedEntityEventArgument"] = reflect.TypeOf((*ManagedEntityEventArgument)(nil)).Elem()
    +}
    +
    +type ManagedObjectNotFound struct {
    +	RuntimeFault
    +
    +	Obj ManagedObjectReference `xml:"obj"`
    +}
    +
    +func init() {
    +	t["ManagedObjectNotFound"] = reflect.TypeOf((*ManagedObjectNotFound)(nil)).Elem()
    +}
    +
    +type ManagedObjectNotFoundFault ManagedObjectNotFound
    +
    +func init() {
    +	t["ManagedObjectNotFoundFault"] = reflect.TypeOf((*ManagedObjectNotFoundFault)(nil)).Elem()
    +}
    +
    +type ManagedObjectReference struct {
    +	Type  string `xml:"type,attr"`
    +	Value string `xml:",chardata"`
    +}
    +
    +func init() {
    +	t["ManagedObjectReference"] = reflect.TypeOf((*ManagedObjectReference)(nil)).Elem()
    +}
    +
    +type MarkAsLocalRequestType struct {
    +	This         ManagedObjectReference `xml:"_this"`
    +	ScsiDiskUuid string                 `xml:"scsiDiskUuid"`
    +}
    +
    +func init() {
    +	t["MarkAsLocalRequestType"] = reflect.TypeOf((*MarkAsLocalRequestType)(nil)).Elem()
    +}
    +
    +type MarkAsLocal_Task MarkAsLocalRequestType
    +
    +func init() {
    +	t["MarkAsLocal_Task"] = reflect.TypeOf((*MarkAsLocal_Task)(nil)).Elem()
    +}
    +
    +type MarkAsLocal_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type MarkAsNonLocalRequestType struct {
    +	This         ManagedObjectReference `xml:"_this"`
    +	ScsiDiskUuid string                 `xml:"scsiDiskUuid"`
    +}
    +
    +func init() {
    +	t["MarkAsNonLocalRequestType"] = reflect.TypeOf((*MarkAsNonLocalRequestType)(nil)).Elem()
    +}
    +
    +type MarkAsNonLocal_Task MarkAsNonLocalRequestType
    +
    +func init() {
    +	t["MarkAsNonLocal_Task"] = reflect.TypeOf((*MarkAsNonLocal_Task)(nil)).Elem()
    +}
    +
    +type MarkAsNonLocal_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type MarkAsNonSsdRequestType struct {
    +	This         ManagedObjectReference `xml:"_this"`
    +	ScsiDiskUuid string                 `xml:"scsiDiskUuid"`
    +}
    +
    +func init() {
    +	t["MarkAsNonSsdRequestType"] = reflect.TypeOf((*MarkAsNonSsdRequestType)(nil)).Elem()
    +}
    +
    +type MarkAsNonSsd_Task MarkAsNonSsdRequestType
    +
    +func init() {
    +	t["MarkAsNonSsd_Task"] = reflect.TypeOf((*MarkAsNonSsd_Task)(nil)).Elem()
    +}
    +
    +type MarkAsNonSsd_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type MarkAsSsdRequestType struct {
    +	This         ManagedObjectReference `xml:"_this"`
    +	ScsiDiskUuid string                 `xml:"scsiDiskUuid"`
    +}
    +
    +func init() {
    +	t["MarkAsSsdRequestType"] = reflect.TypeOf((*MarkAsSsdRequestType)(nil)).Elem()
    +}
    +
    +type MarkAsSsd_Task MarkAsSsdRequestType
    +
    +func init() {
    +	t["MarkAsSsd_Task"] = reflect.TypeOf((*MarkAsSsd_Task)(nil)).Elem()
    +}
    +
    +type MarkAsSsd_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type MarkAsTemplate MarkAsTemplateRequestType
    +
    +func init() {
    +	t["MarkAsTemplate"] = reflect.TypeOf((*MarkAsTemplate)(nil)).Elem()
    +}
    +
    +type MarkAsTemplateRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["MarkAsTemplateRequestType"] = reflect.TypeOf((*MarkAsTemplateRequestType)(nil)).Elem()
    +}
    +
    +type MarkAsTemplateResponse struct {
    +}
    +
    +type MarkAsVirtualMachine MarkAsVirtualMachineRequestType
    +
    +func init() {
    +	t["MarkAsVirtualMachine"] = reflect.TypeOf((*MarkAsVirtualMachine)(nil)).Elem()
    +}
    +
    +type MarkAsVirtualMachineRequestType struct {
    +	This ManagedObjectReference  `xml:"_this"`
    +	Pool ManagedObjectReference  `xml:"pool"`
    +	Host *ManagedObjectReference `xml:"host,omitempty"`
    +}
    +
    +func init() {
    +	t["MarkAsVirtualMachineRequestType"] = reflect.TypeOf((*MarkAsVirtualMachineRequestType)(nil)).Elem()
    +}
    +
    +type MarkAsVirtualMachineResponse struct {
    +}
    +
    +type MarkDefault MarkDefaultRequestType
    +
    +func init() {
    +	t["MarkDefault"] = reflect.TypeOf((*MarkDefault)(nil)).Elem()
    +}
    +
    +type MarkDefaultRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	ClusterId KeyProviderId          `xml:"clusterId"`
    +}
    +
    +func init() {
    +	t["MarkDefaultRequestType"] = reflect.TypeOf((*MarkDefaultRequestType)(nil)).Elem()
    +}
    +
    +type MarkDefaultResponse struct {
    +}
    +
    +type MarkForRemoval MarkForRemovalRequestType
    +
    +func init() {
    +	t["MarkForRemoval"] = reflect.TypeOf((*MarkForRemoval)(nil)).Elem()
    +}
    +
    +type MarkForRemovalRequestType struct {
    +	This    ManagedObjectReference `xml:"_this"`
    +	HbaName string                 `xml:"hbaName"`
    +	Remove  bool                   `xml:"remove"`
    +}
    +
    +func init() {
    +	t["MarkForRemovalRequestType"] = reflect.TypeOf((*MarkForRemovalRequestType)(nil)).Elem()
    +}
    +
    +type MarkForRemovalResponse struct {
    +}
    +
    +type MemoryFileFormatNotSupportedByDatastore struct {
    +	UnsupportedDatastore
    +
    +	DatastoreName string `xml:"datastoreName"`
    +	Type          string `xml:"type"`
    +}
    +
    +func init() {
    +	t["MemoryFileFormatNotSupportedByDatastore"] = reflect.TypeOf((*MemoryFileFormatNotSupportedByDatastore)(nil)).Elem()
    +}
    +
    +type MemoryFileFormatNotSupportedByDatastoreFault MemoryFileFormatNotSupportedByDatastore
    +
    +func init() {
    +	t["MemoryFileFormatNotSupportedByDatastoreFault"] = reflect.TypeOf((*MemoryFileFormatNotSupportedByDatastoreFault)(nil)).Elem()
    +}
    +
    +type MemoryHotPlugNotSupported struct {
    +	VmConfigFault
    +}
    +
    +func init() {
    +	t["MemoryHotPlugNotSupported"] = reflect.TypeOf((*MemoryHotPlugNotSupported)(nil)).Elem()
    +}
    +
    +type MemoryHotPlugNotSupportedFault MemoryHotPlugNotSupported
    +
    +func init() {
    +	t["MemoryHotPlugNotSupportedFault"] = reflect.TypeOf((*MemoryHotPlugNotSupportedFault)(nil)).Elem()
    +}
    +
    +type MemorySizeNotRecommended struct {
    +	VirtualHardwareCompatibilityIssue
    +
    +	MemorySizeMB    int32 `xml:"memorySizeMB"`
    +	MinMemorySizeMB int32 `xml:"minMemorySizeMB"`
    +	MaxMemorySizeMB int32 `xml:"maxMemorySizeMB"`
    +}
    +
    +func init() {
    +	t["MemorySizeNotRecommended"] = reflect.TypeOf((*MemorySizeNotRecommended)(nil)).Elem()
    +}
    +
    +type MemorySizeNotRecommendedFault MemorySizeNotRecommended
    +
    +func init() {
    +	t["MemorySizeNotRecommendedFault"] = reflect.TypeOf((*MemorySizeNotRecommendedFault)(nil)).Elem()
    +}
    +
    +type MemorySizeNotSupported struct {
    +	VirtualHardwareCompatibilityIssue
    +
    +	MemorySizeMB    int32 `xml:"memorySizeMB"`
    +	MinMemorySizeMB int32 `xml:"minMemorySizeMB"`
    +	MaxMemorySizeMB int32 `xml:"maxMemorySizeMB"`
    +}
    +
    +func init() {
    +	t["MemorySizeNotSupported"] = reflect.TypeOf((*MemorySizeNotSupported)(nil)).Elem()
    +}
    +
    +type MemorySizeNotSupportedByDatastore struct {
    +	VirtualHardwareCompatibilityIssue
    +
    +	Datastore       ManagedObjectReference `xml:"datastore"`
    +	MemorySizeMB    int32                  `xml:"memorySizeMB"`
    +	MaxMemorySizeMB int32                  `xml:"maxMemorySizeMB"`
    +}
    +
    +func init() {
    +	t["MemorySizeNotSupportedByDatastore"] = reflect.TypeOf((*MemorySizeNotSupportedByDatastore)(nil)).Elem()
    +}
    +
    +type MemorySizeNotSupportedByDatastoreFault MemorySizeNotSupportedByDatastore
    +
    +func init() {
    +	t["MemorySizeNotSupportedByDatastoreFault"] = reflect.TypeOf((*MemorySizeNotSupportedByDatastoreFault)(nil)).Elem()
    +}
    +
    +type MemorySizeNotSupportedFault MemorySizeNotSupported
    +
    +func init() {
    +	t["MemorySizeNotSupportedFault"] = reflect.TypeOf((*MemorySizeNotSupportedFault)(nil)).Elem()
    +}
    +
    +type MemorySnapshotOnIndependentDisk struct {
    +	SnapshotFault
    +}
    +
    +func init() {
    +	t["MemorySnapshotOnIndependentDisk"] = reflect.TypeOf((*MemorySnapshotOnIndependentDisk)(nil)).Elem()
    +}
    +
    +type MemorySnapshotOnIndependentDiskFault MemorySnapshotOnIndependentDisk
    +
    +func init() {
    +	t["MemorySnapshotOnIndependentDiskFault"] = reflect.TypeOf((*MemorySnapshotOnIndependentDiskFault)(nil)).Elem()
    +}
    +
    +type MergeDvsRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Dvs  ManagedObjectReference `xml:"dvs"`
    +}
    +
    +func init() {
    +	t["MergeDvsRequestType"] = reflect.TypeOf((*MergeDvsRequestType)(nil)).Elem()
    +}
    +
    +type MergeDvs_Task MergeDvsRequestType
    +
    +func init() {
    +	t["MergeDvs_Task"] = reflect.TypeOf((*MergeDvs_Task)(nil)).Elem()
    +}
    +
    +type MergeDvs_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type MergePermissions MergePermissionsRequestType
    +
    +func init() {
    +	t["MergePermissions"] = reflect.TypeOf((*MergePermissions)(nil)).Elem()
    +}
    +
    +type MergePermissionsRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	SrcRoleId int32                  `xml:"srcRoleId"`
    +	DstRoleId int32                  `xml:"dstRoleId"`
    +}
    +
    +func init() {
    +	t["MergePermissionsRequestType"] = reflect.TypeOf((*MergePermissionsRequestType)(nil)).Elem()
    +}
    +
    +type MergePermissionsResponse struct {
    +}
    +
    +type MethodAction struct {
    +	Action
    +
    +	Name     string                 `xml:"name"`
    +	Argument []MethodActionArgument `xml:"argument,omitempty"`
    +}
    +
    +func init() {
    +	t["MethodAction"] = reflect.TypeOf((*MethodAction)(nil)).Elem()
    +}
    +
    +type MethodActionArgument struct {
    +	DynamicData
    +
    +	Value AnyType `xml:"value,typeattr"`
    +}
    +
    +func init() {
    +	t["MethodActionArgument"] = reflect.TypeOf((*MethodActionArgument)(nil)).Elem()
    +}
    +
    +type MethodAlreadyDisabledFault struct {
    +	RuntimeFault
    +
    +	SourceId string `xml:"sourceId"`
    +}
    +
    +func init() {
    +	t["MethodAlreadyDisabledFault"] = reflect.TypeOf((*MethodAlreadyDisabledFault)(nil)).Elem()
    +}
    +
    +type MethodAlreadyDisabledFaultFault MethodAlreadyDisabledFault
    +
    +func init() {
    +	t["MethodAlreadyDisabledFaultFault"] = reflect.TypeOf((*MethodAlreadyDisabledFaultFault)(nil)).Elem()
    +}
    +
    +type MethodDescription struct {
    +	Description
    +
    +	Key string `xml:"key"`
    +}
    +
    +func init() {
    +	t["MethodDescription"] = reflect.TypeOf((*MethodDescription)(nil)).Elem()
    +}
    +
    +type MethodDisabled struct {
    +	RuntimeFault
    +
    +	Source string `xml:"source,omitempty"`
    +}
    +
    +func init() {
    +	t["MethodDisabled"] = reflect.TypeOf((*MethodDisabled)(nil)).Elem()
    +}
    +
    +type MethodDisabledFault MethodDisabled
    +
    +func init() {
    +	t["MethodDisabledFault"] = reflect.TypeOf((*MethodDisabledFault)(nil)).Elem()
    +}
    +
    +type MethodFault struct {
    +	FaultCause   *LocalizedMethodFault `xml:"faultCause,omitempty"`
    +	FaultMessage []LocalizableMessage  `xml:"faultMessage,omitempty"`
    +}
    +
    +func init() {
    +	t["MethodFault"] = reflect.TypeOf((*MethodFault)(nil)).Elem()
    +}
    +
    +type MethodFaultFault BaseMethodFault
    +
    +func init() {
    +	t["MethodFaultFault"] = reflect.TypeOf((*MethodFaultFault)(nil)).Elem()
    +}
    +
    +type MethodNotFound struct {
    +	InvalidRequest
    +
    +	Receiver ManagedObjectReference `xml:"receiver"`
    +	Method   string                 `xml:"method"`
    +}
    +
    +func init() {
    +	t["MethodNotFound"] = reflect.TypeOf((*MethodNotFound)(nil)).Elem()
    +}
    +
    +type MethodNotFoundFault MethodNotFound
    +
    +func init() {
    +	t["MethodNotFoundFault"] = reflect.TypeOf((*MethodNotFoundFault)(nil)).Elem()
    +}
    +
    +type MetricAlarmExpression struct {
    +	AlarmExpression
    +
    +	Operator       MetricAlarmOperator `xml:"operator"`
    +	Type           string              `xml:"type"`
    +	Metric         PerfMetricId        `xml:"metric"`
    +	Yellow         int32               `xml:"yellow,omitempty"`
    +	YellowInterval int32               `xml:"yellowInterval,omitempty"`
    +	Red            int32               `xml:"red,omitempty"`
    +	RedInterval    int32               `xml:"redInterval,omitempty"`
    +}
    +
    +func init() {
    +	t["MetricAlarmExpression"] = reflect.TypeOf((*MetricAlarmExpression)(nil)).Elem()
    +}
    +
    +type MigrateVMRequestType struct {
    +	This     ManagedObjectReference     `xml:"_this"`
    +	Pool     *ManagedObjectReference    `xml:"pool,omitempty"`
    +	Host     *ManagedObjectReference    `xml:"host,omitempty"`
    +	Priority VirtualMachineMovePriority `xml:"priority"`
    +	State    VirtualMachinePowerState   `xml:"state,omitempty"`
    +}
    +
    +func init() {
    +	t["MigrateVMRequestType"] = reflect.TypeOf((*MigrateVMRequestType)(nil)).Elem()
    +}
    +
    +type MigrateVM_Task MigrateVMRequestType
    +
    +func init() {
    +	t["MigrateVM_Task"] = reflect.TypeOf((*MigrateVM_Task)(nil)).Elem()
    +}
    +
    +type MigrateVM_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type MigrationDisabled struct {
    +	MigrationFault
    +}
    +
    +func init() {
    +	t["MigrationDisabled"] = reflect.TypeOf((*MigrationDisabled)(nil)).Elem()
    +}
    +
    +type MigrationDisabledFault MigrationDisabled
    +
    +func init() {
    +	t["MigrationDisabledFault"] = reflect.TypeOf((*MigrationDisabledFault)(nil)).Elem()
    +}
    +
    +type MigrationErrorEvent struct {
    +	MigrationEvent
    +}
    +
    +func init() {
    +	t["MigrationErrorEvent"] = reflect.TypeOf((*MigrationErrorEvent)(nil)).Elem()
    +}
    +
    +type MigrationEvent struct {
    +	VmEvent
    +
    +	Fault LocalizedMethodFault `xml:"fault"`
    +}
    +
    +func init() {
    +	t["MigrationEvent"] = reflect.TypeOf((*MigrationEvent)(nil)).Elem()
    +}
    +
    +type MigrationFault struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["MigrationFault"] = reflect.TypeOf((*MigrationFault)(nil)).Elem()
    +}
    +
    +type MigrationFaultFault BaseMigrationFault
    +
    +func init() {
    +	t["MigrationFaultFault"] = reflect.TypeOf((*MigrationFaultFault)(nil)).Elem()
    +}
    +
    +type MigrationFeatureNotSupported struct {
    +	MigrationFault
    +
    +	AtSourceHost   bool                   `xml:"atSourceHost"`
    +	FailedHostName string                 `xml:"failedHostName"`
    +	FailedHost     ManagedObjectReference `xml:"failedHost"`
    +}
    +
    +func init() {
    +	t["MigrationFeatureNotSupported"] = reflect.TypeOf((*MigrationFeatureNotSupported)(nil)).Elem()
    +}
    +
    +type MigrationFeatureNotSupportedFault BaseMigrationFeatureNotSupported
    +
    +func init() {
    +	t["MigrationFeatureNotSupportedFault"] = reflect.TypeOf((*MigrationFeatureNotSupportedFault)(nil)).Elem()
    +}
    +
    +type MigrationHostErrorEvent struct {
    +	MigrationEvent
    +
    +	DstHost HostEventArgument `xml:"dstHost"`
    +}
    +
    +func init() {
    +	t["MigrationHostErrorEvent"] = reflect.TypeOf((*MigrationHostErrorEvent)(nil)).Elem()
    +}
    +
    +type MigrationHostWarningEvent struct {
    +	MigrationEvent
    +
    +	DstHost HostEventArgument `xml:"dstHost"`
    +}
    +
    +func init() {
    +	t["MigrationHostWarningEvent"] = reflect.TypeOf((*MigrationHostWarningEvent)(nil)).Elem()
    +}
    +
    +type MigrationNotReady struct {
    +	MigrationFault
    +
    +	Reason string `xml:"reason"`
    +}
    +
    +func init() {
    +	t["MigrationNotReady"] = reflect.TypeOf((*MigrationNotReady)(nil)).Elem()
    +}
    +
    +type MigrationNotReadyFault MigrationNotReady
    +
    +func init() {
    +	t["MigrationNotReadyFault"] = reflect.TypeOf((*MigrationNotReadyFault)(nil)).Elem()
    +}
    +
    +type MigrationResourceErrorEvent struct {
    +	MigrationEvent
    +
    +	DstPool ResourcePoolEventArgument `xml:"dstPool"`
    +	DstHost HostEventArgument         `xml:"dstHost"`
    +}
    +
    +func init() {
    +	t["MigrationResourceErrorEvent"] = reflect.TypeOf((*MigrationResourceErrorEvent)(nil)).Elem()
    +}
    +
    +type MigrationResourceWarningEvent struct {
    +	MigrationEvent
    +
    +	DstPool ResourcePoolEventArgument `xml:"dstPool"`
    +	DstHost HostEventArgument         `xml:"dstHost"`
    +}
    +
    +func init() {
    +	t["MigrationResourceWarningEvent"] = reflect.TypeOf((*MigrationResourceWarningEvent)(nil)).Elem()
    +}
    +
    +type MigrationWarningEvent struct {
    +	MigrationEvent
    +}
    +
    +func init() {
    +	t["MigrationWarningEvent"] = reflect.TypeOf((*MigrationWarningEvent)(nil)).Elem()
    +}
    +
    +type MismatchedBundle struct {
    +	VimFault
    +
    +	BundleUuid        string `xml:"bundleUuid"`
    +	HostUuid          string `xml:"hostUuid"`
    +	BundleBuildNumber int32  `xml:"bundleBuildNumber"`
    +	HostBuildNumber   int32  `xml:"hostBuildNumber"`
    +}
    +
    +func init() {
    +	t["MismatchedBundle"] = reflect.TypeOf((*MismatchedBundle)(nil)).Elem()
    +}
    +
    +type MismatchedBundleFault MismatchedBundle
    +
    +func init() {
    +	t["MismatchedBundleFault"] = reflect.TypeOf((*MismatchedBundleFault)(nil)).Elem()
    +}
    +
    +type MismatchedNetworkPolicies struct {
    +	MigrationFault
    +
    +	Device    string `xml:"device"`
    +	Backing   string `xml:"backing"`
    +	Connected bool   `xml:"connected"`
    +}
    +
    +func init() {
    +	t["MismatchedNetworkPolicies"] = reflect.TypeOf((*MismatchedNetworkPolicies)(nil)).Elem()
    +}
    +
    +type MismatchedNetworkPoliciesFault MismatchedNetworkPolicies
    +
    +func init() {
    +	t["MismatchedNetworkPoliciesFault"] = reflect.TypeOf((*MismatchedNetworkPoliciesFault)(nil)).Elem()
    +}
    +
    +type MismatchedVMotionNetworkNames struct {
    +	MigrationFault
    +
    +	SourceNetwork string `xml:"sourceNetwork"`
    +	DestNetwork   string `xml:"destNetwork"`
    +}
    +
    +func init() {
    +	t["MismatchedVMotionNetworkNames"] = reflect.TypeOf((*MismatchedVMotionNetworkNames)(nil)).Elem()
    +}
    +
    +type MismatchedVMotionNetworkNamesFault MismatchedVMotionNetworkNames
    +
    +func init() {
    +	t["MismatchedVMotionNetworkNamesFault"] = reflect.TypeOf((*MismatchedVMotionNetworkNamesFault)(nil)).Elem()
    +}
    +
    +type MissingBmcSupport struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["MissingBmcSupport"] = reflect.TypeOf((*MissingBmcSupport)(nil)).Elem()
    +}
    +
    +type MissingBmcSupportFault MissingBmcSupport
    +
    +func init() {
    +	t["MissingBmcSupportFault"] = reflect.TypeOf((*MissingBmcSupportFault)(nil)).Elem()
    +}
    +
    +type MissingController struct {
    +	InvalidDeviceSpec
    +}
    +
    +func init() {
    +	t["MissingController"] = reflect.TypeOf((*MissingController)(nil)).Elem()
    +}
    +
    +type MissingControllerFault MissingController
    +
    +func init() {
    +	t["MissingControllerFault"] = reflect.TypeOf((*MissingControllerFault)(nil)).Elem()
    +}
    +
    +type MissingIpPool struct {
    +	VAppPropertyFault
    +}
    +
    +func init() {
    +	t["MissingIpPool"] = reflect.TypeOf((*MissingIpPool)(nil)).Elem()
    +}
    +
    +type MissingIpPoolFault MissingIpPool
    +
    +func init() {
    +	t["MissingIpPoolFault"] = reflect.TypeOf((*MissingIpPoolFault)(nil)).Elem()
    +}
    +
    +type MissingLinuxCustResources struct {
    +	CustomizationFault
    +}
    +
    +func init() {
    +	t["MissingLinuxCustResources"] = reflect.TypeOf((*MissingLinuxCustResources)(nil)).Elem()
    +}
    +
    +type MissingLinuxCustResourcesFault MissingLinuxCustResources
    +
    +func init() {
    +	t["MissingLinuxCustResourcesFault"] = reflect.TypeOf((*MissingLinuxCustResourcesFault)(nil)).Elem()
    +}
    +
    +type MissingNetworkIpConfig struct {
    +	VAppPropertyFault
    +}
    +
    +func init() {
    +	t["MissingNetworkIpConfig"] = reflect.TypeOf((*MissingNetworkIpConfig)(nil)).Elem()
    +}
    +
    +type MissingNetworkIpConfigFault MissingNetworkIpConfig
    +
    +func init() {
    +	t["MissingNetworkIpConfigFault"] = reflect.TypeOf((*MissingNetworkIpConfigFault)(nil)).Elem()
    +}
    +
    +type MissingObject struct {
    +	DynamicData
    +
    +	Obj   ManagedObjectReference `xml:"obj"`
    +	Fault LocalizedMethodFault   `xml:"fault"`
    +}
    +
    +func init() {
    +	t["MissingObject"] = reflect.TypeOf((*MissingObject)(nil)).Elem()
    +}
    +
    +type MissingPowerOffConfiguration struct {
    +	VAppConfigFault
    +}
    +
    +func init() {
    +	t["MissingPowerOffConfiguration"] = reflect.TypeOf((*MissingPowerOffConfiguration)(nil)).Elem()
    +}
    +
    +type MissingPowerOffConfigurationFault MissingPowerOffConfiguration
    +
    +func init() {
    +	t["MissingPowerOffConfigurationFault"] = reflect.TypeOf((*MissingPowerOffConfigurationFault)(nil)).Elem()
    +}
    +
    +type MissingPowerOnConfiguration struct {
    +	VAppConfigFault
    +}
    +
    +func init() {
    +	t["MissingPowerOnConfiguration"] = reflect.TypeOf((*MissingPowerOnConfiguration)(nil)).Elem()
    +}
    +
    +type MissingPowerOnConfigurationFault MissingPowerOnConfiguration
    +
    +func init() {
    +	t["MissingPowerOnConfigurationFault"] = reflect.TypeOf((*MissingPowerOnConfigurationFault)(nil)).Elem()
    +}
    +
    +type MissingProperty struct {
    +	DynamicData
    +
    +	Path  string               `xml:"path"`
    +	Fault LocalizedMethodFault `xml:"fault"`
    +}
    +
    +func init() {
    +	t["MissingProperty"] = reflect.TypeOf((*MissingProperty)(nil)).Elem()
    +}
    +
    +type MissingWindowsCustResources struct {
    +	CustomizationFault
    +}
    +
    +func init() {
    +	t["MissingWindowsCustResources"] = reflect.TypeOf((*MissingWindowsCustResources)(nil)).Elem()
    +}
    +
    +type MissingWindowsCustResourcesFault MissingWindowsCustResources
    +
    +func init() {
    +	t["MissingWindowsCustResourcesFault"] = reflect.TypeOf((*MissingWindowsCustResourcesFault)(nil)).Elem()
    +}
    +
    +type MksConnectionLimitReached struct {
    +	InvalidState
    +
    +	ConnectionLimit int32 `xml:"connectionLimit"`
    +}
    +
    +func init() {
    +	t["MksConnectionLimitReached"] = reflect.TypeOf((*MksConnectionLimitReached)(nil)).Elem()
    +}
    +
    +type MksConnectionLimitReachedFault MksConnectionLimitReached
    +
    +func init() {
    +	t["MksConnectionLimitReachedFault"] = reflect.TypeOf((*MksConnectionLimitReachedFault)(nil)).Elem()
    +}
    +
    +type ModeInfo struct {
    +	DynamicData
    +
    +	Browse string `xml:"browse,omitempty"`
    +	Read   string `xml:"read"`
    +	Modify string `xml:"modify"`
    +	Use    string `xml:"use"`
    +	Admin  string `xml:"admin,omitempty"`
    +	Full   string `xml:"full"`
    +}
    +
    +func init() {
    +	t["ModeInfo"] = reflect.TypeOf((*ModeInfo)(nil)).Elem()
    +}
    +
    +type ModifyListView ModifyListViewRequestType
    +
    +func init() {
    +	t["ModifyListView"] = reflect.TypeOf((*ModifyListView)(nil)).Elem()
    +}
    +
    +type ModifyListViewRequestType struct {
    +	This   ManagedObjectReference   `xml:"_this"`
    +	Add    []ManagedObjectReference `xml:"add,omitempty"`
    +	Remove []ManagedObjectReference `xml:"remove,omitempty"`
    +}
    +
    +func init() {
    +	t["ModifyListViewRequestType"] = reflect.TypeOf((*ModifyListViewRequestType)(nil)).Elem()
    +}
    +
    +type ModifyListViewResponse struct {
    +	Returnval []ManagedObjectReference `xml:"returnval,omitempty"`
    +}
    +
    +type MonthlyByDayTaskScheduler struct {
    +	MonthlyTaskScheduler
    +
    +	Day int32 `xml:"day"`
    +}
    +
    +func init() {
    +	t["MonthlyByDayTaskScheduler"] = reflect.TypeOf((*MonthlyByDayTaskScheduler)(nil)).Elem()
    +}
    +
    +type MonthlyByWeekdayTaskScheduler struct {
    +	MonthlyTaskScheduler
    +
    +	Offset  WeekOfMonth `xml:"offset"`
    +	Weekday DayOfWeek   `xml:"weekday"`
    +}
    +
    +func init() {
    +	t["MonthlyByWeekdayTaskScheduler"] = reflect.TypeOf((*MonthlyByWeekdayTaskScheduler)(nil)).Elem()
    +}
    +
    +type MonthlyTaskScheduler struct {
    +	DailyTaskScheduler
    +}
    +
    +func init() {
    +	t["MonthlyTaskScheduler"] = reflect.TypeOf((*MonthlyTaskScheduler)(nil)).Elem()
    +}
    +
    +type MountError struct {
    +	CustomizationFault
    +
    +	Vm        ManagedObjectReference `xml:"vm"`
    +	DiskIndex int32                  `xml:"diskIndex"`
    +}
    +
    +func init() {
    +	t["MountError"] = reflect.TypeOf((*MountError)(nil)).Elem()
    +}
    +
    +type MountErrorFault MountError
    +
    +func init() {
    +	t["MountErrorFault"] = reflect.TypeOf((*MountErrorFault)(nil)).Elem()
    +}
    +
    +type MountToolsInstaller MountToolsInstallerRequestType
    +
    +func init() {
    +	t["MountToolsInstaller"] = reflect.TypeOf((*MountToolsInstaller)(nil)).Elem()
    +}
    +
    +type MountToolsInstallerRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["MountToolsInstallerRequestType"] = reflect.TypeOf((*MountToolsInstallerRequestType)(nil)).Elem()
    +}
    +
    +type MountToolsInstallerResponse struct {
    +}
    +
    +type MountVffsVolume MountVffsVolumeRequestType
    +
    +func init() {
    +	t["MountVffsVolume"] = reflect.TypeOf((*MountVffsVolume)(nil)).Elem()
    +}
    +
    +type MountVffsVolumeRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	VffsUuid string                 `xml:"vffsUuid"`
    +}
    +
    +func init() {
    +	t["MountVffsVolumeRequestType"] = reflect.TypeOf((*MountVffsVolumeRequestType)(nil)).Elem()
    +}
    +
    +type MountVffsVolumeResponse struct {
    +}
    +
    +type MountVmfsVolume MountVmfsVolumeRequestType
    +
    +func init() {
    +	t["MountVmfsVolume"] = reflect.TypeOf((*MountVmfsVolume)(nil)).Elem()
    +}
    +
    +type MountVmfsVolumeExRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	VmfsUuid []string               `xml:"vmfsUuid"`
    +}
    +
    +func init() {
    +	t["MountVmfsVolumeExRequestType"] = reflect.TypeOf((*MountVmfsVolumeExRequestType)(nil)).Elem()
    +}
    +
    +type MountVmfsVolumeEx_Task MountVmfsVolumeExRequestType
    +
    +func init() {
    +	t["MountVmfsVolumeEx_Task"] = reflect.TypeOf((*MountVmfsVolumeEx_Task)(nil)).Elem()
    +}
    +
    +type MountVmfsVolumeEx_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type MountVmfsVolumeRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	VmfsUuid string                 `xml:"vmfsUuid"`
    +}
    +
    +func init() {
    +	t["MountVmfsVolumeRequestType"] = reflect.TypeOf((*MountVmfsVolumeRequestType)(nil)).Elem()
    +}
    +
    +type MountVmfsVolumeResponse struct {
    +}
    +
    +type MoveDVPortRequestType struct {
    +	This                    ManagedObjectReference `xml:"_this"`
    +	PortKey                 []string               `xml:"portKey"`
    +	DestinationPortgroupKey string                 `xml:"destinationPortgroupKey,omitempty"`
    +}
    +
    +func init() {
    +	t["MoveDVPortRequestType"] = reflect.TypeOf((*MoveDVPortRequestType)(nil)).Elem()
    +}
    +
    +type MoveDVPort_Task MoveDVPortRequestType
    +
    +func init() {
    +	t["MoveDVPort_Task"] = reflect.TypeOf((*MoveDVPort_Task)(nil)).Elem()
    +}
    +
    +type MoveDVPort_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type MoveDatastoreFileRequestType struct {
    +	This                  ManagedObjectReference  `xml:"_this"`
    +	SourceName            string                  `xml:"sourceName"`
    +	SourceDatacenter      *ManagedObjectReference `xml:"sourceDatacenter,omitempty"`
    +	DestinationName       string                  `xml:"destinationName"`
    +	DestinationDatacenter *ManagedObjectReference `xml:"destinationDatacenter,omitempty"`
    +	Force                 *bool                   `xml:"force"`
    +}
    +
    +func init() {
    +	t["MoveDatastoreFileRequestType"] = reflect.TypeOf((*MoveDatastoreFileRequestType)(nil)).Elem()
    +}
    +
    +type MoveDatastoreFile_Task MoveDatastoreFileRequestType
    +
    +func init() {
    +	t["MoveDatastoreFile_Task"] = reflect.TypeOf((*MoveDatastoreFile_Task)(nil)).Elem()
    +}
    +
    +type MoveDatastoreFile_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type MoveDirectoryInGuest MoveDirectoryInGuestRequestType
    +
    +func init() {
    +	t["MoveDirectoryInGuest"] = reflect.TypeOf((*MoveDirectoryInGuest)(nil)).Elem()
    +}
    +
    +type MoveDirectoryInGuestRequestType struct {
    +	This             ManagedObjectReference  `xml:"_this"`
    +	Vm               ManagedObjectReference  `xml:"vm"`
    +	Auth             BaseGuestAuthentication `xml:"auth,typeattr"`
    +	SrcDirectoryPath string                  `xml:"srcDirectoryPath"`
    +	DstDirectoryPath string                  `xml:"dstDirectoryPath"`
    +}
    +
    +func init() {
    +	t["MoveDirectoryInGuestRequestType"] = reflect.TypeOf((*MoveDirectoryInGuestRequestType)(nil)).Elem()
    +}
    +
    +type MoveDirectoryInGuestResponse struct {
    +}
    +
    +type MoveFileInGuest MoveFileInGuestRequestType
    +
    +func init() {
    +	t["MoveFileInGuest"] = reflect.TypeOf((*MoveFileInGuest)(nil)).Elem()
    +}
    +
    +type MoveFileInGuestRequestType struct {
    +	This        ManagedObjectReference  `xml:"_this"`
    +	Vm          ManagedObjectReference  `xml:"vm"`
    +	Auth        BaseGuestAuthentication `xml:"auth,typeattr"`
    +	SrcFilePath string                  `xml:"srcFilePath"`
    +	DstFilePath string                  `xml:"dstFilePath"`
    +	Overwrite   bool                    `xml:"overwrite"`
    +}
    +
    +func init() {
    +	t["MoveFileInGuestRequestType"] = reflect.TypeOf((*MoveFileInGuestRequestType)(nil)).Elem()
    +}
    +
    +type MoveFileInGuestResponse struct {
    +}
    +
    +type MoveHostIntoRequestType struct {
    +	This         ManagedObjectReference  `xml:"_this"`
    +	Host         ManagedObjectReference  `xml:"host"`
    +	ResourcePool *ManagedObjectReference `xml:"resourcePool,omitempty"`
    +}
    +
    +func init() {
    +	t["MoveHostIntoRequestType"] = reflect.TypeOf((*MoveHostIntoRequestType)(nil)).Elem()
    +}
    +
    +type MoveHostInto_Task MoveHostIntoRequestType
    +
    +func init() {
    +	t["MoveHostInto_Task"] = reflect.TypeOf((*MoveHostInto_Task)(nil)).Elem()
    +}
    +
    +type MoveHostInto_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type MoveIntoFolderRequestType struct {
    +	This ManagedObjectReference   `xml:"_this"`
    +	List []ManagedObjectReference `xml:"list"`
    +}
    +
    +func init() {
    +	t["MoveIntoFolderRequestType"] = reflect.TypeOf((*MoveIntoFolderRequestType)(nil)).Elem()
    +}
    +
    +type MoveIntoFolder_Task MoveIntoFolderRequestType
    +
    +func init() {
    +	t["MoveIntoFolder_Task"] = reflect.TypeOf((*MoveIntoFolder_Task)(nil)).Elem()
    +}
    +
    +type MoveIntoFolder_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type MoveIntoRequestType struct {
    +	This ManagedObjectReference   `xml:"_this"`
    +	Host []ManagedObjectReference `xml:"host"`
    +}
    +
    +func init() {
    +	t["MoveIntoRequestType"] = reflect.TypeOf((*MoveIntoRequestType)(nil)).Elem()
    +}
    +
    +type MoveIntoResourcePool MoveIntoResourcePoolRequestType
    +
    +func init() {
    +	t["MoveIntoResourcePool"] = reflect.TypeOf((*MoveIntoResourcePool)(nil)).Elem()
    +}
    +
    +type MoveIntoResourcePoolRequestType struct {
    +	This ManagedObjectReference   `xml:"_this"`
    +	List []ManagedObjectReference `xml:"list"`
    +}
    +
    +func init() {
    +	t["MoveIntoResourcePoolRequestType"] = reflect.TypeOf((*MoveIntoResourcePoolRequestType)(nil)).Elem()
    +}
    +
    +type MoveIntoResourcePoolResponse struct {
    +}
    +
    +type MoveInto_Task MoveIntoRequestType
    +
    +func init() {
    +	t["MoveInto_Task"] = reflect.TypeOf((*MoveInto_Task)(nil)).Elem()
    +}
    +
    +type MoveInto_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type MoveVirtualDiskRequestType struct {
    +	This             ManagedObjectReference          `xml:"_this"`
    +	SourceName       string                          `xml:"sourceName"`
    +	SourceDatacenter *ManagedObjectReference         `xml:"sourceDatacenter,omitempty"`
    +	DestName         string                          `xml:"destName"`
    +	DestDatacenter   *ManagedObjectReference         `xml:"destDatacenter,omitempty"`
    +	Force            *bool                           `xml:"force"`
    +	Profile          []BaseVirtualMachineProfileSpec `xml:"profile,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["MoveVirtualDiskRequestType"] = reflect.TypeOf((*MoveVirtualDiskRequestType)(nil)).Elem()
    +}
    +
    +type MoveVirtualDisk_Task MoveVirtualDiskRequestType
    +
    +func init() {
    +	t["MoveVirtualDisk_Task"] = reflect.TypeOf((*MoveVirtualDisk_Task)(nil)).Elem()
    +}
    +
    +type MoveVirtualDisk_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type MtuMatchEvent struct {
    +	DvsHealthStatusChangeEvent
    +}
    +
    +func init() {
    +	t["MtuMatchEvent"] = reflect.TypeOf((*MtuMatchEvent)(nil)).Elem()
    +}
    +
    +type MtuMismatchEvent struct {
    +	DvsHealthStatusChangeEvent
    +}
    +
    +func init() {
    +	t["MtuMismatchEvent"] = reflect.TypeOf((*MtuMismatchEvent)(nil)).Elem()
    +}
    +
    +type MultiWriterNotSupported struct {
    +	DeviceNotSupported
    +}
    +
    +func init() {
    +	t["MultiWriterNotSupported"] = reflect.TypeOf((*MultiWriterNotSupported)(nil)).Elem()
    +}
    +
    +type MultiWriterNotSupportedFault MultiWriterNotSupported
    +
    +func init() {
    +	t["MultiWriterNotSupportedFault"] = reflect.TypeOf((*MultiWriterNotSupportedFault)(nil)).Elem()
    +}
    +
    +type MultipleCertificatesVerifyFault struct {
    +	HostConnectFault
    +
    +	ThumbprintData []MultipleCertificatesVerifyFaultThumbprintData `xml:"thumbprintData"`
    +}
    +
    +func init() {
    +	t["MultipleCertificatesVerifyFault"] = reflect.TypeOf((*MultipleCertificatesVerifyFault)(nil)).Elem()
    +}
    +
    +type MultipleCertificatesVerifyFaultFault MultipleCertificatesVerifyFault
    +
    +func init() {
    +	t["MultipleCertificatesVerifyFaultFault"] = reflect.TypeOf((*MultipleCertificatesVerifyFaultFault)(nil)).Elem()
    +}
    +
    +type MultipleCertificatesVerifyFaultThumbprintData struct {
    +	DynamicData
    +
    +	Port       int32  `xml:"port"`
    +	Thumbprint string `xml:"thumbprint"`
    +}
    +
    +func init() {
    +	t["MultipleCertificatesVerifyFaultThumbprintData"] = reflect.TypeOf((*MultipleCertificatesVerifyFaultThumbprintData)(nil)).Elem()
    +}
    +
    +type MultipleSnapshotsNotSupported struct {
    +	SnapshotFault
    +}
    +
    +func init() {
    +	t["MultipleSnapshotsNotSupported"] = reflect.TypeOf((*MultipleSnapshotsNotSupported)(nil)).Elem()
    +}
    +
    +type MultipleSnapshotsNotSupportedFault MultipleSnapshotsNotSupported
    +
    +func init() {
    +	t["MultipleSnapshotsNotSupportedFault"] = reflect.TypeOf((*MultipleSnapshotsNotSupportedFault)(nil)).Elem()
    +}
    +
    +type NASDatastoreCreatedEvent struct {
    +	HostEvent
    +
    +	Datastore    DatastoreEventArgument `xml:"datastore"`
    +	DatastoreUrl string                 `xml:"datastoreUrl,omitempty"`
    +}
    +
    +func init() {
    +	t["NASDatastoreCreatedEvent"] = reflect.TypeOf((*NASDatastoreCreatedEvent)(nil)).Elem()
    +}
    +
    +type NamePasswordAuthentication struct {
    +	GuestAuthentication
    +
    +	Username string `xml:"username"`
    +	Password string `xml:"password"`
    +}
    +
    +func init() {
    +	t["NamePasswordAuthentication"] = reflect.TypeOf((*NamePasswordAuthentication)(nil)).Elem()
    +}
    +
    +type NamespaceFull struct {
    +	VimFault
    +
    +	Name           string `xml:"name"`
    +	CurrentMaxSize int64  `xml:"currentMaxSize"`
    +	RequiredSize   int64  `xml:"requiredSize,omitempty"`
    +}
    +
    +func init() {
    +	t["NamespaceFull"] = reflect.TypeOf((*NamespaceFull)(nil)).Elem()
    +}
    +
    +type NamespaceFullFault NamespaceFull
    +
    +func init() {
    +	t["NamespaceFullFault"] = reflect.TypeOf((*NamespaceFullFault)(nil)).Elem()
    +}
    +
    +type NamespaceLimitReached struct {
    +	VimFault
    +
    +	Limit *int32 `xml:"limit"`
    +}
    +
    +func init() {
    +	t["NamespaceLimitReached"] = reflect.TypeOf((*NamespaceLimitReached)(nil)).Elem()
    +}
    +
    +type NamespaceLimitReachedFault NamespaceLimitReached
    +
    +func init() {
    +	t["NamespaceLimitReachedFault"] = reflect.TypeOf((*NamespaceLimitReachedFault)(nil)).Elem()
    +}
    +
    +type NamespaceWriteProtected struct {
    +	VimFault
    +
    +	Name string `xml:"name"`
    +}
    +
    +func init() {
    +	t["NamespaceWriteProtected"] = reflect.TypeOf((*NamespaceWriteProtected)(nil)).Elem()
    +}
    +
    +type NamespaceWriteProtectedFault NamespaceWriteProtected
    +
    +func init() {
    +	t["NamespaceWriteProtectedFault"] = reflect.TypeOf((*NamespaceWriteProtectedFault)(nil)).Elem()
    +}
    +
    +type NasConfigFault struct {
    +	HostConfigFault
    +
    +	Name string `xml:"name"`
    +}
    +
    +func init() {
    +	t["NasConfigFault"] = reflect.TypeOf((*NasConfigFault)(nil)).Elem()
    +}
    +
    +type NasConfigFaultFault BaseNasConfigFault
    +
    +func init() {
    +	t["NasConfigFaultFault"] = reflect.TypeOf((*NasConfigFaultFault)(nil)).Elem()
    +}
    +
    +type NasConnectionLimitReached struct {
    +	NasConfigFault
    +
    +	RemoteHost string `xml:"remoteHost"`
    +	RemotePath string `xml:"remotePath"`
    +}
    +
    +func init() {
    +	t["NasConnectionLimitReached"] = reflect.TypeOf((*NasConnectionLimitReached)(nil)).Elem()
    +}
    +
    +type NasConnectionLimitReachedFault NasConnectionLimitReached
    +
    +func init() {
    +	t["NasConnectionLimitReachedFault"] = reflect.TypeOf((*NasConnectionLimitReachedFault)(nil)).Elem()
    +}
    +
    +type NasDatastoreInfo struct {
    +	DatastoreInfo
    +
    +	Nas *HostNasVolume `xml:"nas,omitempty"`
    +}
    +
    +func init() {
    +	t["NasDatastoreInfo"] = reflect.TypeOf((*NasDatastoreInfo)(nil)).Elem()
    +}
    +
    +type NasSessionCredentialConflict struct {
    +	NasConfigFault
    +
    +	RemoteHost string `xml:"remoteHost"`
    +	RemotePath string `xml:"remotePath"`
    +	UserName   string `xml:"userName"`
    +}
    +
    +func init() {
    +	t["NasSessionCredentialConflict"] = reflect.TypeOf((*NasSessionCredentialConflict)(nil)).Elem()
    +}
    +
    +type NasSessionCredentialConflictFault NasSessionCredentialConflict
    +
    +func init() {
    +	t["NasSessionCredentialConflictFault"] = reflect.TypeOf((*NasSessionCredentialConflictFault)(nil)).Elem()
    +}
    +
    +type NasStorageProfile struct {
    +	ApplyProfile
    +
    +	Key string `xml:"key"`
    +}
    +
    +func init() {
    +	t["NasStorageProfile"] = reflect.TypeOf((*NasStorageProfile)(nil)).Elem()
    +}
    +
    +type NasVolumeNotMounted struct {
    +	NasConfigFault
    +
    +	RemoteHost string `xml:"remoteHost"`
    +	RemotePath string `xml:"remotePath"`
    +}
    +
    +func init() {
    +	t["NasVolumeNotMounted"] = reflect.TypeOf((*NasVolumeNotMounted)(nil)).Elem()
    +}
    +
    +type NasVolumeNotMountedFault NasVolumeNotMounted
    +
    +func init() {
    +	t["NasVolumeNotMountedFault"] = reflect.TypeOf((*NasVolumeNotMountedFault)(nil)).Elem()
    +}
    +
    +type NegatableExpression struct {
    +	DynamicData
    +
    +	Negate *bool `xml:"negate"`
    +}
    +
    +func init() {
    +	t["NegatableExpression"] = reflect.TypeOf((*NegatableExpression)(nil)).Elem()
    +}
    +
    +type NetBIOSConfigInfo struct {
    +	DynamicData
    +
    +	Mode string `xml:"mode"`
    +}
    +
    +func init() {
    +	t["NetBIOSConfigInfo"] = reflect.TypeOf((*NetBIOSConfigInfo)(nil)).Elem()
    +}
    +
    +type NetDhcpConfigInfo struct {
    +	DynamicData
    +
    +	Ipv6 *NetDhcpConfigInfoDhcpOptions `xml:"ipv6,omitempty"`
    +	Ipv4 *NetDhcpConfigInfoDhcpOptions `xml:"ipv4,omitempty"`
    +}
    +
    +func init() {
    +	t["NetDhcpConfigInfo"] = reflect.TypeOf((*NetDhcpConfigInfo)(nil)).Elem()
    +}
    +
    +type NetDhcpConfigInfoDhcpOptions struct {
    +	DynamicData
    +
    +	Enable bool       `xml:"enable"`
    +	Config []KeyValue `xml:"config,omitempty"`
    +}
    +
    +func init() {
    +	t["NetDhcpConfigInfoDhcpOptions"] = reflect.TypeOf((*NetDhcpConfigInfoDhcpOptions)(nil)).Elem()
    +}
    +
    +type NetDhcpConfigSpec struct {
    +	DynamicData
    +
    +	Ipv6 *NetDhcpConfigSpecDhcpOptionsSpec `xml:"ipv6,omitempty"`
    +	Ipv4 *NetDhcpConfigSpecDhcpOptionsSpec `xml:"ipv4,omitempty"`
    +}
    +
    +func init() {
    +	t["NetDhcpConfigSpec"] = reflect.TypeOf((*NetDhcpConfigSpec)(nil)).Elem()
    +}
    +
    +type NetDhcpConfigSpecDhcpOptionsSpec struct {
    +	DynamicData
    +
    +	Enable    *bool      `xml:"enable"`
    +	Config    []KeyValue `xml:"config"`
    +	Operation string     `xml:"operation"`
    +}
    +
    +func init() {
    +	t["NetDhcpConfigSpecDhcpOptionsSpec"] = reflect.TypeOf((*NetDhcpConfigSpecDhcpOptionsSpec)(nil)).Elem()
    +}
    +
    +type NetDnsConfigInfo struct {
    +	DynamicData
    +
    +	Dhcp         bool     `xml:"dhcp"`
    +	HostName     string   `xml:"hostName"`
    +	DomainName   string   `xml:"domainName"`
    +	IpAddress    []string `xml:"ipAddress,omitempty"`
    +	SearchDomain []string `xml:"searchDomain,omitempty"`
    +}
    +
    +func init() {
    +	t["NetDnsConfigInfo"] = reflect.TypeOf((*NetDnsConfigInfo)(nil)).Elem()
    +}
    +
    +type NetDnsConfigSpec struct {
    +	DynamicData
    +
    +	Dhcp         *bool    `xml:"dhcp"`
    +	HostName     string   `xml:"hostName,omitempty"`
    +	DomainName   string   `xml:"domainName,omitempty"`
    +	IpAddress    []string `xml:"ipAddress,omitempty"`
    +	SearchDomain []string `xml:"searchDomain,omitempty"`
    +}
    +
    +func init() {
    +	t["NetDnsConfigSpec"] = reflect.TypeOf((*NetDnsConfigSpec)(nil)).Elem()
    +}
    +
    +type NetIpConfigInfo struct {
    +	DynamicData
    +
    +	IpAddress                []NetIpConfigInfoIpAddress `xml:"ipAddress,omitempty"`
    +	Dhcp                     *NetDhcpConfigInfo         `xml:"dhcp,omitempty"`
    +	AutoConfigurationEnabled *bool                      `xml:"autoConfigurationEnabled"`
    +}
    +
    +func init() {
    +	t["NetIpConfigInfo"] = reflect.TypeOf((*NetIpConfigInfo)(nil)).Elem()
    +}
    +
    +type NetIpConfigInfoIpAddress struct {
    +	DynamicData
    +
    +	IpAddress    string     `xml:"ipAddress"`
    +	PrefixLength int32      `xml:"prefixLength"`
    +	Origin       string     `xml:"origin,omitempty"`
    +	State        string     `xml:"state,omitempty"`
    +	Lifetime     *time.Time `xml:"lifetime"`
    +}
    +
    +func init() {
    +	t["NetIpConfigInfoIpAddress"] = reflect.TypeOf((*NetIpConfigInfoIpAddress)(nil)).Elem()
    +}
    +
    +type NetIpConfigSpec struct {
    +	DynamicData
    +
    +	IpAddress                []NetIpConfigSpecIpAddressSpec `xml:"ipAddress,omitempty"`
    +	Dhcp                     *NetDhcpConfigSpec             `xml:"dhcp,omitempty"`
    +	AutoConfigurationEnabled *bool                          `xml:"autoConfigurationEnabled"`
    +}
    +
    +func init() {
    +	t["NetIpConfigSpec"] = reflect.TypeOf((*NetIpConfigSpec)(nil)).Elem()
    +}
    +
    +type NetIpConfigSpecIpAddressSpec struct {
    +	DynamicData
    +
    +	IpAddress    string `xml:"ipAddress"`
    +	PrefixLength int32  `xml:"prefixLength"`
    +	Operation    string `xml:"operation"`
    +}
    +
    +func init() {
    +	t["NetIpConfigSpecIpAddressSpec"] = reflect.TypeOf((*NetIpConfigSpecIpAddressSpec)(nil)).Elem()
    +}
    +
    +type NetIpRouteConfigInfo struct {
    +	DynamicData
    +
    +	IpRoute []NetIpRouteConfigInfoIpRoute `xml:"ipRoute,omitempty"`
    +}
    +
    +func init() {
    +	t["NetIpRouteConfigInfo"] = reflect.TypeOf((*NetIpRouteConfigInfo)(nil)).Elem()
    +}
    +
    +type NetIpRouteConfigInfoGateway struct {
    +	DynamicData
    +
    +	IpAddress string `xml:"ipAddress,omitempty"`
    +	Device    string `xml:"device,omitempty"`
    +}
    +
    +func init() {
    +	t["NetIpRouteConfigInfoGateway"] = reflect.TypeOf((*NetIpRouteConfigInfoGateway)(nil)).Elem()
    +}
    +
    +type NetIpRouteConfigInfoIpRoute struct {
    +	DynamicData
    +
    +	Network      string                      `xml:"network"`
    +	PrefixLength int32                       `xml:"prefixLength"`
    +	Gateway      NetIpRouteConfigInfoGateway `xml:"gateway"`
    +}
    +
    +func init() {
    +	t["NetIpRouteConfigInfoIpRoute"] = reflect.TypeOf((*NetIpRouteConfigInfoIpRoute)(nil)).Elem()
    +}
    +
    +type NetIpRouteConfigSpec struct {
    +	DynamicData
    +
    +	IpRoute []NetIpRouteConfigSpecIpRouteSpec `xml:"ipRoute,omitempty"`
    +}
    +
    +func init() {
    +	t["NetIpRouteConfigSpec"] = reflect.TypeOf((*NetIpRouteConfigSpec)(nil)).Elem()
    +}
    +
    +type NetIpRouteConfigSpecGatewaySpec struct {
    +	DynamicData
    +
    +	IpAddress string `xml:"ipAddress,omitempty"`
    +	Device    string `xml:"device,omitempty"`
    +}
    +
    +func init() {
    +	t["NetIpRouteConfigSpecGatewaySpec"] = reflect.TypeOf((*NetIpRouteConfigSpecGatewaySpec)(nil)).Elem()
    +}
    +
    +type NetIpRouteConfigSpecIpRouteSpec struct {
    +	DynamicData
    +
    +	Network      string                          `xml:"network"`
    +	PrefixLength int32                           `xml:"prefixLength"`
    +	Gateway      NetIpRouteConfigSpecGatewaySpec `xml:"gateway"`
    +	Operation    string                          `xml:"operation"`
    +}
    +
    +func init() {
    +	t["NetIpRouteConfigSpecIpRouteSpec"] = reflect.TypeOf((*NetIpRouteConfigSpecIpRouteSpec)(nil)).Elem()
    +}
    +
    +type NetIpStackInfo struct {
    +	DynamicData
    +
    +	Neighbor      []NetIpStackInfoNetToMedia    `xml:"neighbor,omitempty"`
    +	DefaultRouter []NetIpStackInfoDefaultRouter `xml:"defaultRouter,omitempty"`
    +}
    +
    +func init() {
    +	t["NetIpStackInfo"] = reflect.TypeOf((*NetIpStackInfo)(nil)).Elem()
    +}
    +
    +type NetIpStackInfoDefaultRouter struct {
    +	DynamicData
    +
    +	IpAddress  string    `xml:"ipAddress"`
    +	Device     string    `xml:"device"`
    +	Lifetime   time.Time `xml:"lifetime"`
    +	Preference string    `xml:"preference"`
    +}
    +
    +func init() {
    +	t["NetIpStackInfoDefaultRouter"] = reflect.TypeOf((*NetIpStackInfoDefaultRouter)(nil)).Elem()
    +}
    +
    +type NetIpStackInfoNetToMedia struct {
    +	DynamicData
    +
    +	IpAddress       string `xml:"ipAddress"`
    +	PhysicalAddress string `xml:"physicalAddress"`
    +	Device          string `xml:"device"`
    +	Type            string `xml:"type"`
    +}
    +
    +func init() {
    +	t["NetIpStackInfoNetToMedia"] = reflect.TypeOf((*NetIpStackInfoNetToMedia)(nil)).Elem()
    +}
    +
    +type NetStackInstanceProfile struct {
    +	ApplyProfile
    +
    +	Key           string                         `xml:"key"`
    +	DnsConfig     NetworkProfileDnsConfigProfile `xml:"dnsConfig"`
    +	IpRouteConfig IpRouteProfile                 `xml:"ipRouteConfig"`
    +}
    +
    +func init() {
    +	t["NetStackInstanceProfile"] = reflect.TypeOf((*NetStackInstanceProfile)(nil)).Elem()
    +}
    +
    +type NetworkCopyFault struct {
    +	FileFault
    +}
    +
    +func init() {
    +	t["NetworkCopyFault"] = reflect.TypeOf((*NetworkCopyFault)(nil)).Elem()
    +}
    +
    +type NetworkCopyFaultFault NetworkCopyFault
    +
    +func init() {
    +	t["NetworkCopyFaultFault"] = reflect.TypeOf((*NetworkCopyFaultFault)(nil)).Elem()
    +}
    +
    +type NetworkDisruptedAndConfigRolledBack struct {
    +	VimFault
    +
    +	Host string `xml:"host"`
    +}
    +
    +func init() {
    +	t["NetworkDisruptedAndConfigRolledBack"] = reflect.TypeOf((*NetworkDisruptedAndConfigRolledBack)(nil)).Elem()
    +}
    +
    +type NetworkDisruptedAndConfigRolledBackFault NetworkDisruptedAndConfigRolledBack
    +
    +func init() {
    +	t["NetworkDisruptedAndConfigRolledBackFault"] = reflect.TypeOf((*NetworkDisruptedAndConfigRolledBackFault)(nil)).Elem()
    +}
    +
    +type NetworkEventArgument struct {
    +	EntityEventArgument
    +
    +	Network ManagedObjectReference `xml:"network"`
    +}
    +
    +func init() {
    +	t["NetworkEventArgument"] = reflect.TypeOf((*NetworkEventArgument)(nil)).Elem()
    +}
    +
    +type NetworkInaccessible struct {
    +	NasConfigFault
    +}
    +
    +func init() {
    +	t["NetworkInaccessible"] = reflect.TypeOf((*NetworkInaccessible)(nil)).Elem()
    +}
    +
    +type NetworkInaccessibleFault NetworkInaccessible
    +
    +func init() {
    +	t["NetworkInaccessibleFault"] = reflect.TypeOf((*NetworkInaccessibleFault)(nil)).Elem()
    +}
    +
    +type NetworkPolicyProfile struct {
    +	ApplyProfile
    +}
    +
    +func init() {
    +	t["NetworkPolicyProfile"] = reflect.TypeOf((*NetworkPolicyProfile)(nil)).Elem()
    +}
    +
    +type NetworkProfile struct {
    +	ApplyProfile
    +
    +	Vswitch                 []VirtualSwitchProfile           `xml:"vswitch,omitempty"`
    +	VmPortGroup             []VmPortGroupProfile             `xml:"vmPortGroup,omitempty"`
    +	HostPortGroup           []HostPortGroupProfile           `xml:"hostPortGroup,omitempty"`
    +	ServiceConsolePortGroup []ServiceConsolePortGroupProfile `xml:"serviceConsolePortGroup,omitempty"`
    +	DnsConfig               *NetworkProfileDnsConfigProfile  `xml:"dnsConfig,omitempty"`
    +	IpRouteConfig           *IpRouteProfile                  `xml:"ipRouteConfig,omitempty"`
    +	ConsoleIpRouteConfig    *IpRouteProfile                  `xml:"consoleIpRouteConfig,omitempty"`
    +	Pnic                    []PhysicalNicProfile             `xml:"pnic,omitempty"`
    +	Dvswitch                []DvsProfile                     `xml:"dvswitch,omitempty"`
    +	DvsServiceConsoleNic    []DvsServiceConsoleVNicProfile   `xml:"dvsServiceConsoleNic,omitempty"`
    +	DvsHostNic              []DvsHostVNicProfile             `xml:"dvsHostNic,omitempty"`
    +	NsxHostNic              []NsxHostVNicProfile             `xml:"nsxHostNic,omitempty"`
    +	NetStackInstance        []NetStackInstanceProfile        `xml:"netStackInstance,omitempty"`
    +}
    +
    +func init() {
    +	t["NetworkProfile"] = reflect.TypeOf((*NetworkProfile)(nil)).Elem()
    +}
    +
    +type NetworkProfileDnsConfigProfile struct {
    +	ApplyProfile
    +}
    +
    +func init() {
    +	t["NetworkProfileDnsConfigProfile"] = reflect.TypeOf((*NetworkProfileDnsConfigProfile)(nil)).Elem()
    +}
    +
    +type NetworkRollbackEvent struct {
    +	Event
    +
    +	MethodName    string `xml:"methodName"`
    +	TransactionId string `xml:"transactionId"`
    +}
    +
    +func init() {
    +	t["NetworkRollbackEvent"] = reflect.TypeOf((*NetworkRollbackEvent)(nil)).Elem()
    +}
    +
    +type NetworkSummary struct {
    +	DynamicData
    +
    +	Network    *ManagedObjectReference `xml:"network,omitempty"`
    +	Name       string                  `xml:"name"`
    +	Accessible bool                    `xml:"accessible"`
    +	IpPoolName string                  `xml:"ipPoolName,omitempty"`
    +	IpPoolId   int32                   `xml:"ipPoolId,omitempty"`
    +}
    +
    +func init() {
    +	t["NetworkSummary"] = reflect.TypeOf((*NetworkSummary)(nil)).Elem()
    +}
    +
    +type NetworksMayNotBeTheSame struct {
    +	MigrationFault
    +
    +	Name string `xml:"name,omitempty"`
    +}
    +
    +func init() {
    +	t["NetworksMayNotBeTheSame"] = reflect.TypeOf((*NetworksMayNotBeTheSame)(nil)).Elem()
    +}
    +
    +type NetworksMayNotBeTheSameFault NetworksMayNotBeTheSame
    +
    +func init() {
    +	t["NetworksMayNotBeTheSameFault"] = reflect.TypeOf((*NetworksMayNotBeTheSameFault)(nil)).Elem()
    +}
    +
    +type NicSettingMismatch struct {
    +	CustomizationFault
    +
    +	NumberOfNicsInSpec int32 `xml:"numberOfNicsInSpec"`
    +	NumberOfNicsInVM   int32 `xml:"numberOfNicsInVM"`
    +}
    +
    +func init() {
    +	t["NicSettingMismatch"] = reflect.TypeOf((*NicSettingMismatch)(nil)).Elem()
    +}
    +
    +type NicSettingMismatchFault NicSettingMismatch
    +
    +func init() {
    +	t["NicSettingMismatchFault"] = reflect.TypeOf((*NicSettingMismatchFault)(nil)).Elem()
    +}
    +
    +type NoAccessUserEvent struct {
    +	SessionEvent
    +
    +	IpAddress string `xml:"ipAddress"`
    +}
    +
    +func init() {
    +	t["NoAccessUserEvent"] = reflect.TypeOf((*NoAccessUserEvent)(nil)).Elem()
    +}
    +
    +type NoActiveHostInCluster struct {
    +	InvalidState
    +
    +	ComputeResource ManagedObjectReference `xml:"computeResource"`
    +}
    +
    +func init() {
    +	t["NoActiveHostInCluster"] = reflect.TypeOf((*NoActiveHostInCluster)(nil)).Elem()
    +}
    +
    +type NoActiveHostInClusterFault NoActiveHostInCluster
    +
    +func init() {
    +	t["NoActiveHostInClusterFault"] = reflect.TypeOf((*NoActiveHostInClusterFault)(nil)).Elem()
    +}
    +
    +type NoAvailableIp struct {
    +	VAppPropertyFault
    +
    +	Network ManagedObjectReference `xml:"network"`
    +}
    +
    +func init() {
    +	t["NoAvailableIp"] = reflect.TypeOf((*NoAvailableIp)(nil)).Elem()
    +}
    +
    +type NoAvailableIpFault NoAvailableIp
    +
    +func init() {
    +	t["NoAvailableIpFault"] = reflect.TypeOf((*NoAvailableIpFault)(nil)).Elem()
    +}
    +
    +type NoClientCertificate struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["NoClientCertificate"] = reflect.TypeOf((*NoClientCertificate)(nil)).Elem()
    +}
    +
    +type NoClientCertificateFault NoClientCertificate
    +
    +func init() {
    +	t["NoClientCertificateFault"] = reflect.TypeOf((*NoClientCertificateFault)(nil)).Elem()
    +}
    +
    +type NoCompatibleDatastore struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["NoCompatibleDatastore"] = reflect.TypeOf((*NoCompatibleDatastore)(nil)).Elem()
    +}
    +
    +type NoCompatibleDatastoreFault NoCompatibleDatastore
    +
    +func init() {
    +	t["NoCompatibleDatastoreFault"] = reflect.TypeOf((*NoCompatibleDatastoreFault)(nil)).Elem()
    +}
    +
    +type NoCompatibleHardAffinityHost struct {
    +	VmConfigFault
    +
    +	VmName string `xml:"vmName"`
    +}
    +
    +func init() {
    +	t["NoCompatibleHardAffinityHost"] = reflect.TypeOf((*NoCompatibleHardAffinityHost)(nil)).Elem()
    +}
    +
    +type NoCompatibleHardAffinityHostFault NoCompatibleHardAffinityHost
    +
    +func init() {
    +	t["NoCompatibleHardAffinityHostFault"] = reflect.TypeOf((*NoCompatibleHardAffinityHostFault)(nil)).Elem()
    +}
    +
    +type NoCompatibleHost struct {
    +	VimFault
    +
    +	Host  []ManagedObjectReference `xml:"host,omitempty"`
    +	Error []LocalizedMethodFault   `xml:"error,omitempty"`
    +}
    +
    +func init() {
    +	t["NoCompatibleHost"] = reflect.TypeOf((*NoCompatibleHost)(nil)).Elem()
    +}
    +
    +type NoCompatibleHostFault BaseNoCompatibleHost
    +
    +func init() {
    +	t["NoCompatibleHostFault"] = reflect.TypeOf((*NoCompatibleHostFault)(nil)).Elem()
    +}
    +
    +type NoCompatibleHostWithAccessToDevice struct {
    +	NoCompatibleHost
    +}
    +
    +func init() {
    +	t["NoCompatibleHostWithAccessToDevice"] = reflect.TypeOf((*NoCompatibleHostWithAccessToDevice)(nil)).Elem()
    +}
    +
    +type NoCompatibleHostWithAccessToDeviceFault NoCompatibleHostWithAccessToDevice
    +
    +func init() {
    +	t["NoCompatibleHostWithAccessToDeviceFault"] = reflect.TypeOf((*NoCompatibleHostWithAccessToDeviceFault)(nil)).Elem()
    +}
    +
    +type NoCompatibleSoftAffinityHost struct {
    +	VmConfigFault
    +
    +	VmName string `xml:"vmName"`
    +}
    +
    +func init() {
    +	t["NoCompatibleSoftAffinityHost"] = reflect.TypeOf((*NoCompatibleSoftAffinityHost)(nil)).Elem()
    +}
    +
    +type NoCompatibleSoftAffinityHostFault NoCompatibleSoftAffinityHost
    +
    +func init() {
    +	t["NoCompatibleSoftAffinityHostFault"] = reflect.TypeOf((*NoCompatibleSoftAffinityHostFault)(nil)).Elem()
    +}
    +
    +type NoConnectedDatastore struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["NoConnectedDatastore"] = reflect.TypeOf((*NoConnectedDatastore)(nil)).Elem()
    +}
    +
    +type NoConnectedDatastoreFault NoConnectedDatastore
    +
    +func init() {
    +	t["NoConnectedDatastoreFault"] = reflect.TypeOf((*NoConnectedDatastoreFault)(nil)).Elem()
    +}
    +
    +type NoDatastoresConfiguredEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["NoDatastoresConfiguredEvent"] = reflect.TypeOf((*NoDatastoresConfiguredEvent)(nil)).Elem()
    +}
    +
    +type NoDiskFound struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["NoDiskFound"] = reflect.TypeOf((*NoDiskFound)(nil)).Elem()
    +}
    +
    +type NoDiskFoundFault NoDiskFound
    +
    +func init() {
    +	t["NoDiskFoundFault"] = reflect.TypeOf((*NoDiskFoundFault)(nil)).Elem()
    +}
    +
    +type NoDiskSpace struct {
    +	FileFault
    +
    +	Datastore string `xml:"datastore"`
    +}
    +
    +func init() {
    +	t["NoDiskSpace"] = reflect.TypeOf((*NoDiskSpace)(nil)).Elem()
    +}
    +
    +type NoDiskSpaceFault NoDiskSpace
    +
    +func init() {
    +	t["NoDiskSpaceFault"] = reflect.TypeOf((*NoDiskSpaceFault)(nil)).Elem()
    +}
    +
    +type NoDisksToCustomize struct {
    +	CustomizationFault
    +}
    +
    +func init() {
    +	t["NoDisksToCustomize"] = reflect.TypeOf((*NoDisksToCustomize)(nil)).Elem()
    +}
    +
    +type NoDisksToCustomizeFault NoDisksToCustomize
    +
    +func init() {
    +	t["NoDisksToCustomizeFault"] = reflect.TypeOf((*NoDisksToCustomizeFault)(nil)).Elem()
    +}
    +
    +type NoGateway struct {
    +	HostConfigFault
    +}
    +
    +func init() {
    +	t["NoGateway"] = reflect.TypeOf((*NoGateway)(nil)).Elem()
    +}
    +
    +type NoGatewayFault NoGateway
    +
    +func init() {
    +	t["NoGatewayFault"] = reflect.TypeOf((*NoGatewayFault)(nil)).Elem()
    +}
    +
    +type NoGuestHeartbeat struct {
    +	MigrationFault
    +}
    +
    +func init() {
    +	t["NoGuestHeartbeat"] = reflect.TypeOf((*NoGuestHeartbeat)(nil)).Elem()
    +}
    +
    +type NoGuestHeartbeatFault NoGuestHeartbeat
    +
    +func init() {
    +	t["NoGuestHeartbeatFault"] = reflect.TypeOf((*NoGuestHeartbeatFault)(nil)).Elem()
    +}
    +
    +type NoHost struct {
    +	HostConnectFault
    +
    +	Name string `xml:"name,omitempty"`
    +}
    +
    +func init() {
    +	t["NoHost"] = reflect.TypeOf((*NoHost)(nil)).Elem()
    +}
    +
    +type NoHostFault NoHost
    +
    +func init() {
    +	t["NoHostFault"] = reflect.TypeOf((*NoHostFault)(nil)).Elem()
    +}
    +
    +type NoHostSuitableForFtSecondary struct {
    +	VmFaultToleranceIssue
    +
    +	Vm     ManagedObjectReference `xml:"vm"`
    +	VmName string                 `xml:"vmName"`
    +}
    +
    +func init() {
    +	t["NoHostSuitableForFtSecondary"] = reflect.TypeOf((*NoHostSuitableForFtSecondary)(nil)).Elem()
    +}
    +
    +type NoHostSuitableForFtSecondaryFault NoHostSuitableForFtSecondary
    +
    +func init() {
    +	t["NoHostSuitableForFtSecondaryFault"] = reflect.TypeOf((*NoHostSuitableForFtSecondaryFault)(nil)).Elem()
    +}
    +
    +type NoLicenseEvent struct {
    +	LicenseEvent
    +
    +	Feature LicenseFeatureInfo `xml:"feature"`
    +}
    +
    +func init() {
    +	t["NoLicenseEvent"] = reflect.TypeOf((*NoLicenseEvent)(nil)).Elem()
    +}
    +
    +type NoLicenseServerConfigured struct {
    +	NotEnoughLicenses
    +}
    +
    +func init() {
    +	t["NoLicenseServerConfigured"] = reflect.TypeOf((*NoLicenseServerConfigured)(nil)).Elem()
    +}
    +
    +type NoLicenseServerConfiguredFault NoLicenseServerConfigured
    +
    +func init() {
    +	t["NoLicenseServerConfiguredFault"] = reflect.TypeOf((*NoLicenseServerConfiguredFault)(nil)).Elem()
    +}
    +
    +type NoMaintenanceModeDrsRecommendationForVM struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["NoMaintenanceModeDrsRecommendationForVM"] = reflect.TypeOf((*NoMaintenanceModeDrsRecommendationForVM)(nil)).Elem()
    +}
    +
    +type NoPeerHostFound struct {
    +	HostPowerOpFailed
    +}
    +
    +func init() {
    +	t["NoPeerHostFound"] = reflect.TypeOf((*NoPeerHostFound)(nil)).Elem()
    +}
    +
    +type NoPeerHostFoundFault NoPeerHostFound
    +
    +func init() {
    +	t["NoPeerHostFoundFault"] = reflect.TypeOf((*NoPeerHostFoundFault)(nil)).Elem()
    +}
    +
    +type NoPermission struct {
    +	SecurityError
    +
    +	Object      ManagedObjectReference `xml:"object"`
    +	PrivilegeId string                 `xml:"privilegeId"`
    +}
    +
    +func init() {
    +	t["NoPermission"] = reflect.TypeOf((*NoPermission)(nil)).Elem()
    +}
    +
    +type NoPermissionFault BaseNoPermission
    +
    +func init() {
    +	t["NoPermissionFault"] = reflect.TypeOf((*NoPermissionFault)(nil)).Elem()
    +}
    +
    +type NoPermissionOnAD struct {
    +	ActiveDirectoryFault
    +}
    +
    +func init() {
    +	t["NoPermissionOnAD"] = reflect.TypeOf((*NoPermissionOnAD)(nil)).Elem()
    +}
    +
    +type NoPermissionOnADFault NoPermissionOnAD
    +
    +func init() {
    +	t["NoPermissionOnADFault"] = reflect.TypeOf((*NoPermissionOnADFault)(nil)).Elem()
    +}
    +
    +type NoPermissionOnHost struct {
    +	HostConnectFault
    +}
    +
    +func init() {
    +	t["NoPermissionOnHost"] = reflect.TypeOf((*NoPermissionOnHost)(nil)).Elem()
    +}
    +
    +type NoPermissionOnHostFault NoPermissionOnHost
    +
    +func init() {
    +	t["NoPermissionOnHostFault"] = reflect.TypeOf((*NoPermissionOnHostFault)(nil)).Elem()
    +}
    +
    +type NoPermissionOnNasVolume struct {
    +	NasConfigFault
    +
    +	UserName string `xml:"userName,omitempty"`
    +}
    +
    +func init() {
    +	t["NoPermissionOnNasVolume"] = reflect.TypeOf((*NoPermissionOnNasVolume)(nil)).Elem()
    +}
    +
    +type NoPermissionOnNasVolumeFault NoPermissionOnNasVolume
    +
    +func init() {
    +	t["NoPermissionOnNasVolumeFault"] = reflect.TypeOf((*NoPermissionOnNasVolumeFault)(nil)).Elem()
    +}
    +
    +type NoSubjectName struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["NoSubjectName"] = reflect.TypeOf((*NoSubjectName)(nil)).Elem()
    +}
    +
    +type NoSubjectNameFault NoSubjectName
    +
    +func init() {
    +	t["NoSubjectNameFault"] = reflect.TypeOf((*NoSubjectNameFault)(nil)).Elem()
    +}
    +
    +type NoVcManagedIpConfigured struct {
    +	VAppPropertyFault
    +}
    +
    +func init() {
    +	t["NoVcManagedIpConfigured"] = reflect.TypeOf((*NoVcManagedIpConfigured)(nil)).Elem()
    +}
    +
    +type NoVcManagedIpConfiguredFault NoVcManagedIpConfigured
    +
    +func init() {
    +	t["NoVcManagedIpConfiguredFault"] = reflect.TypeOf((*NoVcManagedIpConfiguredFault)(nil)).Elem()
    +}
    +
    +type NoVirtualNic struct {
    +	HostConfigFault
    +}
    +
    +func init() {
    +	t["NoVirtualNic"] = reflect.TypeOf((*NoVirtualNic)(nil)).Elem()
    +}
    +
    +type NoVirtualNicFault NoVirtualNic
    +
    +func init() {
    +	t["NoVirtualNicFault"] = reflect.TypeOf((*NoVirtualNicFault)(nil)).Elem()
    +}
    +
    +type NoVmInVApp struct {
    +	VAppConfigFault
    +}
    +
    +func init() {
    +	t["NoVmInVApp"] = reflect.TypeOf((*NoVmInVApp)(nil)).Elem()
    +}
    +
    +type NoVmInVAppFault NoVmInVApp
    +
    +func init() {
    +	t["NoVmInVAppFault"] = reflect.TypeOf((*NoVmInVAppFault)(nil)).Elem()
    +}
    +
    +type NodeDeploymentSpec struct {
    +	DynamicData
    +
    +	EsxHost                 *ManagedObjectReference `xml:"esxHost,omitempty"`
    +	Datastore               *ManagedObjectReference `xml:"datastore,omitempty"`
    +	PublicNetworkPortGroup  *ManagedObjectReference `xml:"publicNetworkPortGroup,omitempty"`
    +	ClusterNetworkPortGroup *ManagedObjectReference `xml:"clusterNetworkPortGroup,omitempty"`
    +	Folder                  ManagedObjectReference  `xml:"folder"`
    +	ResourcePool            *ManagedObjectReference `xml:"resourcePool,omitempty"`
    +	ManagementVc            *ServiceLocator         `xml:"managementVc,omitempty"`
    +	NodeName                string                  `xml:"nodeName"`
    +	IpSettings              CustomizationIPSettings `xml:"ipSettings"`
    +}
    +
    +func init() {
    +	t["NodeDeploymentSpec"] = reflect.TypeOf((*NodeDeploymentSpec)(nil)).Elem()
    +}
    +
    +type NodeNetworkSpec struct {
    +	DynamicData
    +
    +	IpSettings CustomizationIPSettings `xml:"ipSettings"`
    +}
    +
    +func init() {
    +	t["NodeNetworkSpec"] = reflect.TypeOf((*NodeNetworkSpec)(nil)).Elem()
    +}
    +
    +type NonADUserRequired struct {
    +	ActiveDirectoryFault
    +}
    +
    +func init() {
    +	t["NonADUserRequired"] = reflect.TypeOf((*NonADUserRequired)(nil)).Elem()
    +}
    +
    +type NonADUserRequiredFault NonADUserRequired
    +
    +func init() {
    +	t["NonADUserRequiredFault"] = reflect.TypeOf((*NonADUserRequiredFault)(nil)).Elem()
    +}
    +
    +type NonHomeRDMVMotionNotSupported struct {
    +	MigrationFeatureNotSupported
    +
    +	Device string `xml:"device"`
    +}
    +
    +func init() {
    +	t["NonHomeRDMVMotionNotSupported"] = reflect.TypeOf((*NonHomeRDMVMotionNotSupported)(nil)).Elem()
    +}
    +
    +type NonHomeRDMVMotionNotSupportedFault NonHomeRDMVMotionNotSupported
    +
    +func init() {
    +	t["NonHomeRDMVMotionNotSupportedFault"] = reflect.TypeOf((*NonHomeRDMVMotionNotSupportedFault)(nil)).Elem()
    +}
    +
    +type NonPersistentDisksNotSupported struct {
    +	DeviceNotSupported
    +}
    +
    +func init() {
    +	t["NonPersistentDisksNotSupported"] = reflect.TypeOf((*NonPersistentDisksNotSupported)(nil)).Elem()
    +}
    +
    +type NonPersistentDisksNotSupportedFault NonPersistentDisksNotSupported
    +
    +func init() {
    +	t["NonPersistentDisksNotSupportedFault"] = reflect.TypeOf((*NonPersistentDisksNotSupportedFault)(nil)).Elem()
    +}
    +
    +type NonVIWorkloadDetectedOnDatastoreEvent struct {
    +	DatastoreEvent
    +}
    +
    +func init() {
    +	t["NonVIWorkloadDetectedOnDatastoreEvent"] = reflect.TypeOf((*NonVIWorkloadDetectedOnDatastoreEvent)(nil)).Elem()
    +}
    +
    +type NonVmwareOuiMacNotSupportedHost struct {
    +	NotSupportedHost
    +
    +	HostName string `xml:"hostName"`
    +}
    +
    +func init() {
    +	t["NonVmwareOuiMacNotSupportedHost"] = reflect.TypeOf((*NonVmwareOuiMacNotSupportedHost)(nil)).Elem()
    +}
    +
    +type NonVmwareOuiMacNotSupportedHostFault NonVmwareOuiMacNotSupportedHost
    +
    +func init() {
    +	t["NonVmwareOuiMacNotSupportedHostFault"] = reflect.TypeOf((*NonVmwareOuiMacNotSupportedHostFault)(nil)).Elem()
    +}
    +
    +type NotADirectory struct {
    +	FileFault
    +}
    +
    +func init() {
    +	t["NotADirectory"] = reflect.TypeOf((*NotADirectory)(nil)).Elem()
    +}
    +
    +type NotADirectoryFault NotADirectory
    +
    +func init() {
    +	t["NotADirectoryFault"] = reflect.TypeOf((*NotADirectoryFault)(nil)).Elem()
    +}
    +
    +type NotAFile struct {
    +	FileFault
    +}
    +
    +func init() {
    +	t["NotAFile"] = reflect.TypeOf((*NotAFile)(nil)).Elem()
    +}
    +
    +type NotAFileFault NotAFile
    +
    +func init() {
    +	t["NotAFileFault"] = reflect.TypeOf((*NotAFileFault)(nil)).Elem()
    +}
    +
    +type NotAuthenticated struct {
    +	NoPermission
    +}
    +
    +func init() {
    +	t["NotAuthenticated"] = reflect.TypeOf((*NotAuthenticated)(nil)).Elem()
    +}
    +
    +type NotAuthenticatedFault NotAuthenticated
    +
    +func init() {
    +	t["NotAuthenticatedFault"] = reflect.TypeOf((*NotAuthenticatedFault)(nil)).Elem()
    +}
    +
    +type NotEnoughCpus struct {
    +	VirtualHardwareCompatibilityIssue
    +
    +	NumCpuDest int32 `xml:"numCpuDest"`
    +	NumCpuVm   int32 `xml:"numCpuVm"`
    +}
    +
    +func init() {
    +	t["NotEnoughCpus"] = reflect.TypeOf((*NotEnoughCpus)(nil)).Elem()
    +}
    +
    +type NotEnoughCpusFault BaseNotEnoughCpus
    +
    +func init() {
    +	t["NotEnoughCpusFault"] = reflect.TypeOf((*NotEnoughCpusFault)(nil)).Elem()
    +}
    +
    +type NotEnoughLicenses struct {
    +	RuntimeFault
    +}
    +
    +func init() {
    +	t["NotEnoughLicenses"] = reflect.TypeOf((*NotEnoughLicenses)(nil)).Elem()
    +}
    +
    +type NotEnoughLicensesFault BaseNotEnoughLicenses
    +
    +func init() {
    +	t["NotEnoughLicensesFault"] = reflect.TypeOf((*NotEnoughLicensesFault)(nil)).Elem()
    +}
    +
    +type NotEnoughLogicalCpus struct {
    +	NotEnoughCpus
    +
    +	Host *ManagedObjectReference `xml:"host,omitempty"`
    +}
    +
    +func init() {
    +	t["NotEnoughLogicalCpus"] = reflect.TypeOf((*NotEnoughLogicalCpus)(nil)).Elem()
    +}
    +
    +type NotEnoughLogicalCpusFault NotEnoughLogicalCpus
    +
    +func init() {
    +	t["NotEnoughLogicalCpusFault"] = reflect.TypeOf((*NotEnoughLogicalCpusFault)(nil)).Elem()
    +}
    +
    +type NotEnoughResourcesToStartVmEvent struct {
    +	VmEvent
    +
    +	Reason string `xml:"reason,omitempty"`
    +}
    +
    +func init() {
    +	t["NotEnoughResourcesToStartVmEvent"] = reflect.TypeOf((*NotEnoughResourcesToStartVmEvent)(nil)).Elem()
    +}
    +
    +type NotFound struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["NotFound"] = reflect.TypeOf((*NotFound)(nil)).Elem()
    +}
    +
    +type NotFoundFault NotFound
    +
    +func init() {
    +	t["NotFoundFault"] = reflect.TypeOf((*NotFoundFault)(nil)).Elem()
    +}
    +
    +type NotImplemented struct {
    +	RuntimeFault
    +}
    +
    +func init() {
    +	t["NotImplemented"] = reflect.TypeOf((*NotImplemented)(nil)).Elem()
    +}
    +
    +type NotImplementedFault NotImplemented
    +
    +func init() {
    +	t["NotImplementedFault"] = reflect.TypeOf((*NotImplementedFault)(nil)).Elem()
    +}
    +
    +type NotSupported struct {
    +	RuntimeFault
    +}
    +
    +func init() {
    +	t["NotSupported"] = reflect.TypeOf((*NotSupported)(nil)).Elem()
    +}
    +
    +type NotSupportedDeviceForFT struct {
    +	VmFaultToleranceIssue
    +
    +	Host        ManagedObjectReference `xml:"host"`
    +	HostName    string                 `xml:"hostName,omitempty"`
    +	Vm          ManagedObjectReference `xml:"vm"`
    +	VmName      string                 `xml:"vmName,omitempty"`
    +	DeviceType  string                 `xml:"deviceType"`
    +	DeviceLabel string                 `xml:"deviceLabel,omitempty"`
    +}
    +
    +func init() {
    +	t["NotSupportedDeviceForFT"] = reflect.TypeOf((*NotSupportedDeviceForFT)(nil)).Elem()
    +}
    +
    +type NotSupportedDeviceForFTFault NotSupportedDeviceForFT
    +
    +func init() {
    +	t["NotSupportedDeviceForFTFault"] = reflect.TypeOf((*NotSupportedDeviceForFTFault)(nil)).Elem()
    +}
    +
    +type NotSupportedFault BaseNotSupported
    +
    +func init() {
    +	t["NotSupportedFault"] = reflect.TypeOf((*NotSupportedFault)(nil)).Elem()
    +}
    +
    +type NotSupportedHost struct {
    +	HostConnectFault
    +
    +	ProductName    string `xml:"productName,omitempty"`
    +	ProductVersion string `xml:"productVersion,omitempty"`
    +}
    +
    +func init() {
    +	t["NotSupportedHost"] = reflect.TypeOf((*NotSupportedHost)(nil)).Elem()
    +}
    +
    +type NotSupportedHostFault BaseNotSupportedHost
    +
    +func init() {
    +	t["NotSupportedHostFault"] = reflect.TypeOf((*NotSupportedHostFault)(nil)).Elem()
    +}
    +
    +type NotSupportedHostForChecksum struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["NotSupportedHostForChecksum"] = reflect.TypeOf((*NotSupportedHostForChecksum)(nil)).Elem()
    +}
    +
    +type NotSupportedHostForChecksumFault NotSupportedHostForChecksum
    +
    +func init() {
    +	t["NotSupportedHostForChecksumFault"] = reflect.TypeOf((*NotSupportedHostForChecksumFault)(nil)).Elem()
    +}
    +
    +type NotSupportedHostForVFlash struct {
    +	NotSupportedHost
    +
    +	HostName string `xml:"hostName"`
    +}
    +
    +func init() {
    +	t["NotSupportedHostForVFlash"] = reflect.TypeOf((*NotSupportedHostForVFlash)(nil)).Elem()
    +}
    +
    +type NotSupportedHostForVFlashFault NotSupportedHostForVFlash
    +
    +func init() {
    +	t["NotSupportedHostForVFlashFault"] = reflect.TypeOf((*NotSupportedHostForVFlashFault)(nil)).Elem()
    +}
    +
    +type NotSupportedHostForVmcp struct {
    +	NotSupportedHost
    +
    +	HostName string `xml:"hostName"`
    +}
    +
    +func init() {
    +	t["NotSupportedHostForVmcp"] = reflect.TypeOf((*NotSupportedHostForVmcp)(nil)).Elem()
    +}
    +
    +type NotSupportedHostForVmcpFault NotSupportedHostForVmcp
    +
    +func init() {
    +	t["NotSupportedHostForVmcpFault"] = reflect.TypeOf((*NotSupportedHostForVmcpFault)(nil)).Elem()
    +}
    +
    +type NotSupportedHostForVmemFile struct {
    +	NotSupportedHost
    +
    +	HostName string `xml:"hostName"`
    +}
    +
    +func init() {
    +	t["NotSupportedHostForVmemFile"] = reflect.TypeOf((*NotSupportedHostForVmemFile)(nil)).Elem()
    +}
    +
    +type NotSupportedHostForVmemFileFault NotSupportedHostForVmemFile
    +
    +func init() {
    +	t["NotSupportedHostForVmemFileFault"] = reflect.TypeOf((*NotSupportedHostForVmemFileFault)(nil)).Elem()
    +}
    +
    +type NotSupportedHostForVsan struct {
    +	NotSupportedHost
    +
    +	HostName string `xml:"hostName"`
    +}
    +
    +func init() {
    +	t["NotSupportedHostForVsan"] = reflect.TypeOf((*NotSupportedHostForVsan)(nil)).Elem()
    +}
    +
    +type NotSupportedHostForVsanFault NotSupportedHostForVsan
    +
    +func init() {
    +	t["NotSupportedHostForVsanFault"] = reflect.TypeOf((*NotSupportedHostForVsanFault)(nil)).Elem()
    +}
    +
    +type NotSupportedHostInCluster struct {
    +	NotSupportedHost
    +}
    +
    +func init() {
    +	t["NotSupportedHostInCluster"] = reflect.TypeOf((*NotSupportedHostInCluster)(nil)).Elem()
    +}
    +
    +type NotSupportedHostInClusterFault BaseNotSupportedHostInCluster
    +
    +func init() {
    +	t["NotSupportedHostInClusterFault"] = reflect.TypeOf((*NotSupportedHostInClusterFault)(nil)).Elem()
    +}
    +
    +type NotSupportedHostInDvs struct {
    +	NotSupportedHost
    +
    +	SwitchProductSpec DistributedVirtualSwitchProductSpec `xml:"switchProductSpec"`
    +}
    +
    +func init() {
    +	t["NotSupportedHostInDvs"] = reflect.TypeOf((*NotSupportedHostInDvs)(nil)).Elem()
    +}
    +
    +type NotSupportedHostInDvsFault NotSupportedHostInDvs
    +
    +func init() {
    +	t["NotSupportedHostInDvsFault"] = reflect.TypeOf((*NotSupportedHostInDvsFault)(nil)).Elem()
    +}
    +
    +type NotSupportedHostInHACluster struct {
    +	NotSupportedHost
    +
    +	HostName string `xml:"hostName"`
    +	Build    string `xml:"build"`
    +}
    +
    +func init() {
    +	t["NotSupportedHostInHACluster"] = reflect.TypeOf((*NotSupportedHostInHACluster)(nil)).Elem()
    +}
    +
    +type NotSupportedHostInHAClusterFault NotSupportedHostInHACluster
    +
    +func init() {
    +	t["NotSupportedHostInHAClusterFault"] = reflect.TypeOf((*NotSupportedHostInHAClusterFault)(nil)).Elem()
    +}
    +
    +type NotUserConfigurableProperty struct {
    +	VAppPropertyFault
    +}
    +
    +func init() {
    +	t["NotUserConfigurableProperty"] = reflect.TypeOf((*NotUserConfigurableProperty)(nil)).Elem()
    +}
    +
    +type NotUserConfigurablePropertyFault NotUserConfigurableProperty
    +
    +func init() {
    +	t["NotUserConfigurablePropertyFault"] = reflect.TypeOf((*NotUserConfigurablePropertyFault)(nil)).Elem()
    +}
    +
    +type NsxHostVNicProfile struct {
    +	ApplyProfile
    +
    +	Key      string           `xml:"key"`
    +	IpConfig IpAddressProfile `xml:"ipConfig"`
    +}
    +
    +func init() {
    +	t["NsxHostVNicProfile"] = reflect.TypeOf((*NsxHostVNicProfile)(nil)).Elem()
    +}
    +
    +type NumPortsProfile struct {
    +	ApplyProfile
    +}
    +
    +func init() {
    +	t["NumPortsProfile"] = reflect.TypeOf((*NumPortsProfile)(nil)).Elem()
    +}
    +
    +type NumVirtualCoresPerSocketNotSupported struct {
    +	VirtualHardwareCompatibilityIssue
    +
    +	MaxSupportedCoresPerSocketDest int32 `xml:"maxSupportedCoresPerSocketDest"`
    +	NumCoresPerSocketVm            int32 `xml:"numCoresPerSocketVm"`
    +}
    +
    +func init() {
    +	t["NumVirtualCoresPerSocketNotSupported"] = reflect.TypeOf((*NumVirtualCoresPerSocketNotSupported)(nil)).Elem()
    +}
    +
    +type NumVirtualCoresPerSocketNotSupportedFault NumVirtualCoresPerSocketNotSupported
    +
    +func init() {
    +	t["NumVirtualCoresPerSocketNotSupportedFault"] = reflect.TypeOf((*NumVirtualCoresPerSocketNotSupportedFault)(nil)).Elem()
    +}
    +
    +type NumVirtualCpusExceedsLimit struct {
    +	InsufficientResourcesFault
    +
    +	MaxSupportedVcpus int32 `xml:"maxSupportedVcpus"`
    +}
    +
    +func init() {
    +	t["NumVirtualCpusExceedsLimit"] = reflect.TypeOf((*NumVirtualCpusExceedsLimit)(nil)).Elem()
    +}
    +
    +type NumVirtualCpusExceedsLimitFault NumVirtualCpusExceedsLimit
    +
    +func init() {
    +	t["NumVirtualCpusExceedsLimitFault"] = reflect.TypeOf((*NumVirtualCpusExceedsLimitFault)(nil)).Elem()
    +}
    +
    +type NumVirtualCpusIncompatible struct {
    +	VmConfigFault
    +
    +	Reason string `xml:"reason"`
    +	NumCpu int32  `xml:"numCpu"`
    +}
    +
    +func init() {
    +	t["NumVirtualCpusIncompatible"] = reflect.TypeOf((*NumVirtualCpusIncompatible)(nil)).Elem()
    +}
    +
    +type NumVirtualCpusIncompatibleFault NumVirtualCpusIncompatible
    +
    +func init() {
    +	t["NumVirtualCpusIncompatibleFault"] = reflect.TypeOf((*NumVirtualCpusIncompatibleFault)(nil)).Elem()
    +}
    +
    +type NumVirtualCpusNotSupported struct {
    +	VirtualHardwareCompatibilityIssue
    +
    +	MaxSupportedVcpusDest int32 `xml:"maxSupportedVcpusDest"`
    +	NumCpuVm              int32 `xml:"numCpuVm"`
    +}
    +
    +func init() {
    +	t["NumVirtualCpusNotSupported"] = reflect.TypeOf((*NumVirtualCpusNotSupported)(nil)).Elem()
    +}
    +
    +type NumVirtualCpusNotSupportedFault NumVirtualCpusNotSupported
    +
    +func init() {
    +	t["NumVirtualCpusNotSupportedFault"] = reflect.TypeOf((*NumVirtualCpusNotSupportedFault)(nil)).Elem()
    +}
    +
    +type NumericRange struct {
    +	DynamicData
    +
    +	Start int32 `xml:"start"`
    +	End   int32 `xml:"end"`
    +}
    +
    +func init() {
    +	t["NumericRange"] = reflect.TypeOf((*NumericRange)(nil)).Elem()
    +}
    +
    +type NvdimmDimmInfo struct {
    +	DynamicData
    +
    +	DimmHandle                  int32              `xml:"dimmHandle"`
    +	HealthInfo                  NvdimmHealthInfo   `xml:"healthInfo"`
    +	TotalCapacity               int64              `xml:"totalCapacity"`
    +	PersistentCapacity          int64              `xml:"persistentCapacity"`
    +	AvailablePersistentCapacity int64              `xml:"availablePersistentCapacity"`
    +	VolatileCapacity            int64              `xml:"volatileCapacity"`
    +	AvailableVolatileCapacity   int64              `xml:"availableVolatileCapacity"`
    +	BlockCapacity               int64              `xml:"blockCapacity"`
    +	RegionInfo                  []NvdimmRegionInfo `xml:"regionInfo,omitempty"`
    +	RepresentationString        string             `xml:"representationString"`
    +}
    +
    +func init() {
    +	t["NvdimmDimmInfo"] = reflect.TypeOf((*NvdimmDimmInfo)(nil)).Elem()
    +}
    +
    +type NvdimmGuid struct {
    +	DynamicData
    +
    +	Uuid string `xml:"uuid"`
    +}
    +
    +func init() {
    +	t["NvdimmGuid"] = reflect.TypeOf((*NvdimmGuid)(nil)).Elem()
    +}
    +
    +type NvdimmHealthInfo struct {
    +	DynamicData
    +
    +	HealthStatus             string   `xml:"healthStatus"`
    +	HealthInformation        string   `xml:"healthInformation"`
    +	StateFlagInfo            []string `xml:"stateFlagInfo,omitempty"`
    +	DimmTemperature          int32    `xml:"dimmTemperature"`
    +	DimmTemperatureThreshold int32    `xml:"dimmTemperatureThreshold"`
    +	SpareBlocksPercentage    int32    `xml:"spareBlocksPercentage"`
    +	SpareBlockThreshold      int32    `xml:"spareBlockThreshold"`
    +	DimmLifespanPercentage   int32    `xml:"dimmLifespanPercentage"`
    +	EsTemperature            int32    `xml:"esTemperature,omitempty"`
    +	EsTemperatureThreshold   int32    `xml:"esTemperatureThreshold,omitempty"`
    +	EsLifespanPercentage     int32    `xml:"esLifespanPercentage,omitempty"`
    +}
    +
    +func init() {
    +	t["NvdimmHealthInfo"] = reflect.TypeOf((*NvdimmHealthInfo)(nil)).Elem()
    +}
    +
    +type NvdimmInterleaveSetInfo struct {
    +	DynamicData
    +
    +	SetId         int32   `xml:"setId"`
    +	RangeType     string  `xml:"rangeType"`
    +	BaseAddress   int64   `xml:"baseAddress"`
    +	Size          int64   `xml:"size"`
    +	AvailableSize int64   `xml:"availableSize"`
    +	DeviceList    []int32 `xml:"deviceList,omitempty"`
    +	State         string  `xml:"state"`
    +}
    +
    +func init() {
    +	t["NvdimmInterleaveSetInfo"] = reflect.TypeOf((*NvdimmInterleaveSetInfo)(nil)).Elem()
    +}
    +
    +type NvdimmNamespaceCreateSpec struct {
    +	DynamicData
    +
    +	FriendlyName string `xml:"friendlyName,omitempty"`
    +	BlockSize    int64  `xml:"blockSize"`
    +	BlockCount   int64  `xml:"blockCount"`
    +	Type         string `xml:"type"`
    +	LocationID   int32  `xml:"locationID"`
    +}
    +
    +func init() {
    +	t["NvdimmNamespaceCreateSpec"] = reflect.TypeOf((*NvdimmNamespaceCreateSpec)(nil)).Elem()
    +}
    +
    +type NvdimmNamespaceDeleteSpec struct {
    +	DynamicData
    +
    +	Uuid string `xml:"uuid"`
    +}
    +
    +func init() {
    +	t["NvdimmNamespaceDeleteSpec"] = reflect.TypeOf((*NvdimmNamespaceDeleteSpec)(nil)).Elem()
    +}
    +
    +type NvdimmNamespaceInfo struct {
    +	DynamicData
    +
    +	Uuid                  string `xml:"uuid"`
    +	FriendlyName          string `xml:"friendlyName"`
    +	BlockSize             int64  `xml:"blockSize"`
    +	BlockCount            int64  `xml:"blockCount"`
    +	Type                  string `xml:"type"`
    +	NamespaceHealthStatus string `xml:"namespaceHealthStatus"`
    +	LocationID            int32  `xml:"locationID"`
    +	State                 string `xml:"state"`
    +}
    +
    +func init() {
    +	t["NvdimmNamespaceInfo"] = reflect.TypeOf((*NvdimmNamespaceInfo)(nil)).Elem()
    +}
    +
    +type NvdimmRegionInfo struct {
    +	DynamicData
    +
    +	RegionId  int32  `xml:"regionId"`
    +	SetId     int32  `xml:"setId"`
    +	RangeType string `xml:"rangeType"`
    +	StartAddr int64  `xml:"startAddr"`
    +	Size      int64  `xml:"size"`
    +	Offset    int64  `xml:"offset"`
    +}
    +
    +func init() {
    +	t["NvdimmRegionInfo"] = reflect.TypeOf((*NvdimmRegionInfo)(nil)).Elem()
    +}
    +
    +type NvdimmSummary struct {
    +	DynamicData
    +
    +	NumDimms           int32  `xml:"numDimms"`
    +	HealthStatus       string `xml:"healthStatus"`
    +	TotalCapacity      int64  `xml:"totalCapacity"`
    +	PersistentCapacity int64  `xml:"persistentCapacity"`
    +	BlockCapacity      int64  `xml:"blockCapacity"`
    +	AvailableCapacity  int64  `xml:"availableCapacity"`
    +	NumInterleavesets  int32  `xml:"numInterleavesets"`
    +	NumNamespaces      int32  `xml:"numNamespaces"`
    +}
    +
    +func init() {
    +	t["NvdimmSummary"] = reflect.TypeOf((*NvdimmSummary)(nil)).Elem()
    +}
    +
    +type NvdimmSystemInfo struct {
    +	DynamicData
    +
    +	Summary       *NvdimmSummary            `xml:"summary,omitempty"`
    +	Dimms         []int32                   `xml:"dimms,omitempty"`
    +	DimmInfo      []NvdimmDimmInfo          `xml:"dimmInfo,omitempty"`
    +	InterleaveSet []int32                   `xml:"interleaveSet,omitempty"`
    +	ISetInfo      []NvdimmInterleaveSetInfo `xml:"iSetInfo,omitempty"`
    +	Namespace     []NvdimmGuid              `xml:"namespace,omitempty"`
    +	NsInfo        []NvdimmNamespaceInfo     `xml:"nsInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["NvdimmSystemInfo"] = reflect.TypeOf((*NvdimmSystemInfo)(nil)).Elem()
    +}
    +
    +type ObjectContent struct {
    +	DynamicData
    +
    +	Obj        ManagedObjectReference `xml:"obj"`
    +	PropSet    []DynamicProperty      `xml:"propSet,omitempty"`
    +	MissingSet []MissingProperty      `xml:"missingSet,omitempty"`
    +}
    +
    +func init() {
    +	t["ObjectContent"] = reflect.TypeOf((*ObjectContent)(nil)).Elem()
    +}
    +
    +type ObjectSpec struct {
    +	DynamicData
    +
    +	Obj       ManagedObjectReference `xml:"obj"`
    +	Skip      *bool                  `xml:"skip"`
    +	SelectSet []BaseSelectionSpec    `xml:"selectSet,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ObjectSpec"] = reflect.TypeOf((*ObjectSpec)(nil)).Elem()
    +}
    +
    +type ObjectUpdate struct {
    +	DynamicData
    +
    +	Kind       ObjectUpdateKind       `xml:"kind"`
    +	Obj        ManagedObjectReference `xml:"obj"`
    +	ChangeSet  []PropertyChange       `xml:"changeSet,omitempty"`
    +	MissingSet []MissingProperty      `xml:"missingSet,omitempty"`
    +}
    +
    +func init() {
    +	t["ObjectUpdate"] = reflect.TypeOf((*ObjectUpdate)(nil)).Elem()
    +}
    +
    +type OnceTaskScheduler struct {
    +	TaskScheduler
    +
    +	RunAt *time.Time `xml:"runAt"`
    +}
    +
    +func init() {
    +	t["OnceTaskScheduler"] = reflect.TypeOf((*OnceTaskScheduler)(nil)).Elem()
    +}
    +
    +type OpaqueNetworkCapability struct {
    +	DynamicData
    +
    +	NetworkReservationSupported bool `xml:"networkReservationSupported"`
    +}
    +
    +func init() {
    +	t["OpaqueNetworkCapability"] = reflect.TypeOf((*OpaqueNetworkCapability)(nil)).Elem()
    +}
    +
    +type OpaqueNetworkSummary struct {
    +	NetworkSummary
    +
    +	OpaqueNetworkId   string `xml:"opaqueNetworkId"`
    +	OpaqueNetworkType string `xml:"opaqueNetworkType"`
    +}
    +
    +func init() {
    +	t["OpaqueNetworkSummary"] = reflect.TypeOf((*OpaqueNetworkSummary)(nil)).Elem()
    +}
    +
    +type OpaqueNetworkTargetInfo struct {
    +	VirtualMachineTargetInfo
    +
    +	Network                     OpaqueNetworkSummary `xml:"network"`
    +	NetworkReservationSupported *bool                `xml:"networkReservationSupported"`
    +}
    +
    +func init() {
    +	t["OpaqueNetworkTargetInfo"] = reflect.TypeOf((*OpaqueNetworkTargetInfo)(nil)).Elem()
    +}
    +
    +type OpenInventoryViewFolder OpenInventoryViewFolderRequestType
    +
    +func init() {
    +	t["OpenInventoryViewFolder"] = reflect.TypeOf((*OpenInventoryViewFolder)(nil)).Elem()
    +}
    +
    +type OpenInventoryViewFolderRequestType struct {
    +	This   ManagedObjectReference   `xml:"_this"`
    +	Entity []ManagedObjectReference `xml:"entity"`
    +}
    +
    +func init() {
    +	t["OpenInventoryViewFolderRequestType"] = reflect.TypeOf((*OpenInventoryViewFolderRequestType)(nil)).Elem()
    +}
    +
    +type OpenInventoryViewFolderResponse struct {
    +	Returnval []ManagedObjectReference `xml:"returnval,omitempty"`
    +}
    +
    +type OperationDisabledByGuest struct {
    +	GuestOperationsFault
    +}
    +
    +func init() {
    +	t["OperationDisabledByGuest"] = reflect.TypeOf((*OperationDisabledByGuest)(nil)).Elem()
    +}
    +
    +type OperationDisabledByGuestFault OperationDisabledByGuest
    +
    +func init() {
    +	t["OperationDisabledByGuestFault"] = reflect.TypeOf((*OperationDisabledByGuestFault)(nil)).Elem()
    +}
    +
    +type OperationDisallowedOnHost struct {
    +	RuntimeFault
    +}
    +
    +func init() {
    +	t["OperationDisallowedOnHost"] = reflect.TypeOf((*OperationDisallowedOnHost)(nil)).Elem()
    +}
    +
    +type OperationDisallowedOnHostFault OperationDisallowedOnHost
    +
    +func init() {
    +	t["OperationDisallowedOnHostFault"] = reflect.TypeOf((*OperationDisallowedOnHostFault)(nil)).Elem()
    +}
    +
    +type OperationNotSupportedByGuest struct {
    +	GuestOperationsFault
    +}
    +
    +func init() {
    +	t["OperationNotSupportedByGuest"] = reflect.TypeOf((*OperationNotSupportedByGuest)(nil)).Elem()
    +}
    +
    +type OperationNotSupportedByGuestFault OperationNotSupportedByGuest
    +
    +func init() {
    +	t["OperationNotSupportedByGuestFault"] = reflect.TypeOf((*OperationNotSupportedByGuestFault)(nil)).Elem()
    +}
    +
    +type OptionDef struct {
    +	ElementDescription
    +
    +	OptionType BaseOptionType `xml:"optionType,typeattr"`
    +}
    +
    +func init() {
    +	t["OptionDef"] = reflect.TypeOf((*OptionDef)(nil)).Elem()
    +}
    +
    +type OptionProfile struct {
    +	ApplyProfile
    +
    +	Key string `xml:"key"`
    +}
    +
    +func init() {
    +	t["OptionProfile"] = reflect.TypeOf((*OptionProfile)(nil)).Elem()
    +}
    +
    +type OptionType struct {
    +	DynamicData
    +
    +	ValueIsReadonly *bool `xml:"valueIsReadonly"`
    +}
    +
    +func init() {
    +	t["OptionType"] = reflect.TypeOf((*OptionType)(nil)).Elem()
    +}
    +
    +type OptionValue struct {
    +	DynamicData
    +
    +	Key   string  `xml:"key"`
    +	Value AnyType `xml:"value,typeattr"`
    +}
    +
    +func init() {
    +	t["OptionValue"] = reflect.TypeOf((*OptionValue)(nil)).Elem()
    +}
    +
    +type OrAlarmExpression struct {
    +	AlarmExpression
    +
    +	Expression []BaseAlarmExpression `xml:"expression,typeattr"`
    +}
    +
    +func init() {
    +	t["OrAlarmExpression"] = reflect.TypeOf((*OrAlarmExpression)(nil)).Elem()
    +}
    +
    +type OutOfBounds struct {
    +	VimFault
    +
    +	ArgumentName string `xml:"argumentName"`
    +}
    +
    +func init() {
    +	t["OutOfBounds"] = reflect.TypeOf((*OutOfBounds)(nil)).Elem()
    +}
    +
    +type OutOfBoundsFault OutOfBounds
    +
    +func init() {
    +	t["OutOfBoundsFault"] = reflect.TypeOf((*OutOfBoundsFault)(nil)).Elem()
    +}
    +
    +type OutOfSyncDvsHost struct {
    +	DvsEvent
    +
    +	HostOutOfSync []DvsOutOfSyncHostArgument `xml:"hostOutOfSync"`
    +}
    +
    +func init() {
    +	t["OutOfSyncDvsHost"] = reflect.TypeOf((*OutOfSyncDvsHost)(nil)).Elem()
    +}
    +
    +type OverwriteCustomizationSpec OverwriteCustomizationSpecRequestType
    +
    +func init() {
    +	t["OverwriteCustomizationSpec"] = reflect.TypeOf((*OverwriteCustomizationSpec)(nil)).Elem()
    +}
    +
    +type OverwriteCustomizationSpecRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Item CustomizationSpecItem  `xml:"item"`
    +}
    +
    +func init() {
    +	t["OverwriteCustomizationSpecRequestType"] = reflect.TypeOf((*OverwriteCustomizationSpecRequestType)(nil)).Elem()
    +}
    +
    +type OverwriteCustomizationSpecResponse struct {
    +}
    +
    +type OvfAttribute struct {
    +	OvfInvalidPackage
    +
    +	ElementName   string `xml:"elementName"`
    +	AttributeName string `xml:"attributeName"`
    +}
    +
    +func init() {
    +	t["OvfAttribute"] = reflect.TypeOf((*OvfAttribute)(nil)).Elem()
    +}
    +
    +type OvfAttributeFault BaseOvfAttribute
    +
    +func init() {
    +	t["OvfAttributeFault"] = reflect.TypeOf((*OvfAttributeFault)(nil)).Elem()
    +}
    +
    +type OvfConnectedDevice struct {
    +	OvfHardwareExport
    +}
    +
    +func init() {
    +	t["OvfConnectedDevice"] = reflect.TypeOf((*OvfConnectedDevice)(nil)).Elem()
    +}
    +
    +type OvfConnectedDeviceFault BaseOvfConnectedDevice
    +
    +func init() {
    +	t["OvfConnectedDeviceFault"] = reflect.TypeOf((*OvfConnectedDeviceFault)(nil)).Elem()
    +}
    +
    +type OvfConnectedDeviceFloppy struct {
    +	OvfConnectedDevice
    +
    +	Filename string `xml:"filename"`
    +}
    +
    +func init() {
    +	t["OvfConnectedDeviceFloppy"] = reflect.TypeOf((*OvfConnectedDeviceFloppy)(nil)).Elem()
    +}
    +
    +type OvfConnectedDeviceFloppyFault OvfConnectedDeviceFloppy
    +
    +func init() {
    +	t["OvfConnectedDeviceFloppyFault"] = reflect.TypeOf((*OvfConnectedDeviceFloppyFault)(nil)).Elem()
    +}
    +
    +type OvfConnectedDeviceIso struct {
    +	OvfConnectedDevice
    +
    +	Filename string `xml:"filename"`
    +}
    +
    +func init() {
    +	t["OvfConnectedDeviceIso"] = reflect.TypeOf((*OvfConnectedDeviceIso)(nil)).Elem()
    +}
    +
    +type OvfConnectedDeviceIsoFault OvfConnectedDeviceIso
    +
    +func init() {
    +	t["OvfConnectedDeviceIsoFault"] = reflect.TypeOf((*OvfConnectedDeviceIsoFault)(nil)).Elem()
    +}
    +
    +type OvfConstraint struct {
    +	OvfInvalidPackage
    +
    +	Name string `xml:"name"`
    +}
    +
    +func init() {
    +	t["OvfConstraint"] = reflect.TypeOf((*OvfConstraint)(nil)).Elem()
    +}
    +
    +type OvfConstraintFault BaseOvfConstraint
    +
    +func init() {
    +	t["OvfConstraintFault"] = reflect.TypeOf((*OvfConstraintFault)(nil)).Elem()
    +}
    +
    +type OvfConsumerCallbackFault struct {
    +	OvfFault
    +
    +	ExtensionKey  string `xml:"extensionKey"`
    +	ExtensionName string `xml:"extensionName"`
    +}
    +
    +func init() {
    +	t["OvfConsumerCallbackFault"] = reflect.TypeOf((*OvfConsumerCallbackFault)(nil)).Elem()
    +}
    +
    +type OvfConsumerCallbackFaultFault BaseOvfConsumerCallbackFault
    +
    +func init() {
    +	t["OvfConsumerCallbackFaultFault"] = reflect.TypeOf((*OvfConsumerCallbackFaultFault)(nil)).Elem()
    +}
    +
    +type OvfConsumerCommunicationError struct {
    +	OvfConsumerCallbackFault
    +
    +	Description string `xml:"description"`
    +}
    +
    +func init() {
    +	t["OvfConsumerCommunicationError"] = reflect.TypeOf((*OvfConsumerCommunicationError)(nil)).Elem()
    +}
    +
    +type OvfConsumerCommunicationErrorFault OvfConsumerCommunicationError
    +
    +func init() {
    +	t["OvfConsumerCommunicationErrorFault"] = reflect.TypeOf((*OvfConsumerCommunicationErrorFault)(nil)).Elem()
    +}
    +
    +type OvfConsumerFault struct {
    +	OvfConsumerCallbackFault
    +
    +	ErrorKey string     `xml:"errorKey"`
    +	Message  string     `xml:"message"`
    +	Params   []KeyValue `xml:"params,omitempty"`
    +}
    +
    +func init() {
    +	t["OvfConsumerFault"] = reflect.TypeOf((*OvfConsumerFault)(nil)).Elem()
    +}
    +
    +type OvfConsumerFaultFault OvfConsumerFault
    +
    +func init() {
    +	t["OvfConsumerFaultFault"] = reflect.TypeOf((*OvfConsumerFaultFault)(nil)).Elem()
    +}
    +
    +type OvfConsumerInvalidSection struct {
    +	OvfConsumerCallbackFault
    +
    +	LineNumber  int32  `xml:"lineNumber"`
    +	Description string `xml:"description"`
    +}
    +
    +func init() {
    +	t["OvfConsumerInvalidSection"] = reflect.TypeOf((*OvfConsumerInvalidSection)(nil)).Elem()
    +}
    +
    +type OvfConsumerInvalidSectionFault OvfConsumerInvalidSection
    +
    +func init() {
    +	t["OvfConsumerInvalidSectionFault"] = reflect.TypeOf((*OvfConsumerInvalidSectionFault)(nil)).Elem()
    +}
    +
    +type OvfConsumerOstNode struct {
    +	DynamicData
    +
    +	Id      string                  `xml:"id"`
    +	Type    string                  `xml:"type"`
    +	Section []OvfConsumerOvfSection `xml:"section,omitempty"`
    +	Child   []OvfConsumerOstNode    `xml:"child,omitempty"`
    +	Entity  *ManagedObjectReference `xml:"entity,omitempty"`
    +}
    +
    +func init() {
    +	t["OvfConsumerOstNode"] = reflect.TypeOf((*OvfConsumerOstNode)(nil)).Elem()
    +}
    +
    +type OvfConsumerOvfSection struct {
    +	DynamicData
    +
    +	LineNumber int32  `xml:"lineNumber"`
    +	Xml        string `xml:"xml"`
    +}
    +
    +func init() {
    +	t["OvfConsumerOvfSection"] = reflect.TypeOf((*OvfConsumerOvfSection)(nil)).Elem()
    +}
    +
    +type OvfConsumerPowerOnFault struct {
    +	InvalidState
    +
    +	ExtensionKey  string `xml:"extensionKey"`
    +	ExtensionName string `xml:"extensionName"`
    +	Description   string `xml:"description"`
    +}
    +
    +func init() {
    +	t["OvfConsumerPowerOnFault"] = reflect.TypeOf((*OvfConsumerPowerOnFault)(nil)).Elem()
    +}
    +
    +type OvfConsumerPowerOnFaultFault OvfConsumerPowerOnFault
    +
    +func init() {
    +	t["OvfConsumerPowerOnFaultFault"] = reflect.TypeOf((*OvfConsumerPowerOnFaultFault)(nil)).Elem()
    +}
    +
    +type OvfConsumerUndeclaredSection struct {
    +	OvfConsumerCallbackFault
    +
    +	QualifiedSectionType string `xml:"qualifiedSectionType"`
    +}
    +
    +func init() {
    +	t["OvfConsumerUndeclaredSection"] = reflect.TypeOf((*OvfConsumerUndeclaredSection)(nil)).Elem()
    +}
    +
    +type OvfConsumerUndeclaredSectionFault OvfConsumerUndeclaredSection
    +
    +func init() {
    +	t["OvfConsumerUndeclaredSectionFault"] = reflect.TypeOf((*OvfConsumerUndeclaredSectionFault)(nil)).Elem()
    +}
    +
    +type OvfConsumerUndefinedPrefix struct {
    +	OvfConsumerCallbackFault
    +
    +	Prefix string `xml:"prefix"`
    +}
    +
    +func init() {
    +	t["OvfConsumerUndefinedPrefix"] = reflect.TypeOf((*OvfConsumerUndefinedPrefix)(nil)).Elem()
    +}
    +
    +type OvfConsumerUndefinedPrefixFault OvfConsumerUndefinedPrefix
    +
    +func init() {
    +	t["OvfConsumerUndefinedPrefixFault"] = reflect.TypeOf((*OvfConsumerUndefinedPrefixFault)(nil)).Elem()
    +}
    +
    +type OvfConsumerValidationFault struct {
    +	VmConfigFault
    +
    +	ExtensionKey  string `xml:"extensionKey"`
    +	ExtensionName string `xml:"extensionName"`
    +	Message       string `xml:"message"`
    +}
    +
    +func init() {
    +	t["OvfConsumerValidationFault"] = reflect.TypeOf((*OvfConsumerValidationFault)(nil)).Elem()
    +}
    +
    +type OvfConsumerValidationFaultFault OvfConsumerValidationFault
    +
    +func init() {
    +	t["OvfConsumerValidationFaultFault"] = reflect.TypeOf((*OvfConsumerValidationFaultFault)(nil)).Elem()
    +}
    +
    +type OvfCpuCompatibility struct {
    +	OvfImport
    +
    +	RegisterName         string `xml:"registerName"`
    +	Level                int32  `xml:"level"`
    +	RegisterValue        string `xml:"registerValue"`
    +	DesiredRegisterValue string `xml:"desiredRegisterValue"`
    +}
    +
    +func init() {
    +	t["OvfCpuCompatibility"] = reflect.TypeOf((*OvfCpuCompatibility)(nil)).Elem()
    +}
    +
    +type OvfCpuCompatibilityCheckNotSupported struct {
    +	OvfImport
    +}
    +
    +func init() {
    +	t["OvfCpuCompatibilityCheckNotSupported"] = reflect.TypeOf((*OvfCpuCompatibilityCheckNotSupported)(nil)).Elem()
    +}
    +
    +type OvfCpuCompatibilityCheckNotSupportedFault OvfCpuCompatibilityCheckNotSupported
    +
    +func init() {
    +	t["OvfCpuCompatibilityCheckNotSupportedFault"] = reflect.TypeOf((*OvfCpuCompatibilityCheckNotSupportedFault)(nil)).Elem()
    +}
    +
    +type OvfCpuCompatibilityFault OvfCpuCompatibility
    +
    +func init() {
    +	t["OvfCpuCompatibilityFault"] = reflect.TypeOf((*OvfCpuCompatibilityFault)(nil)).Elem()
    +}
    +
    +type OvfCreateDescriptorParams struct {
    +	DynamicData
    +
    +	OvfFiles          []OvfFile               `xml:"ovfFiles,omitempty"`
    +	Name              string                  `xml:"name,omitempty"`
    +	Description       string                  `xml:"description,omitempty"`
    +	IncludeImageFiles *bool                   `xml:"includeImageFiles"`
    +	ExportOption      []string                `xml:"exportOption,omitempty"`
    +	Snapshot          *ManagedObjectReference `xml:"snapshot,omitempty"`
    +}
    +
    +func init() {
    +	t["OvfCreateDescriptorParams"] = reflect.TypeOf((*OvfCreateDescriptorParams)(nil)).Elem()
    +}
    +
    +type OvfCreateDescriptorResult struct {
    +	DynamicData
    +
    +	OvfDescriptor     string                 `xml:"ovfDescriptor"`
    +	Error             []LocalizedMethodFault `xml:"error,omitempty"`
    +	Warning           []LocalizedMethodFault `xml:"warning,omitempty"`
    +	IncludeImageFiles *bool                  `xml:"includeImageFiles"`
    +}
    +
    +func init() {
    +	t["OvfCreateDescriptorResult"] = reflect.TypeOf((*OvfCreateDescriptorResult)(nil)).Elem()
    +}
    +
    +type OvfCreateImportSpecParams struct {
    +	OvfManagerCommonParams
    +
    +	EntityName         string                  `xml:"entityName"`
    +	HostSystem         *ManagedObjectReference `xml:"hostSystem,omitempty"`
    +	NetworkMapping     []OvfNetworkMapping     `xml:"networkMapping,omitempty"`
    +	IpAllocationPolicy string                  `xml:"ipAllocationPolicy,omitempty"`
    +	IpProtocol         string                  `xml:"ipProtocol,omitempty"`
    +	PropertyMapping    []KeyValue              `xml:"propertyMapping,omitempty"`
    +	ResourceMapping    []OvfResourceMap        `xml:"resourceMapping,omitempty"`
    +	DiskProvisioning   string                  `xml:"diskProvisioning,omitempty"`
    +	InstantiationOst   *OvfConsumerOstNode     `xml:"instantiationOst,omitempty"`
    +}
    +
    +func init() {
    +	t["OvfCreateImportSpecParams"] = reflect.TypeOf((*OvfCreateImportSpecParams)(nil)).Elem()
    +}
    +
    +type OvfCreateImportSpecResult struct {
    +	DynamicData
    +
    +	ImportSpec BaseImportSpec         `xml:"importSpec,omitempty,typeattr"`
    +	FileItem   []OvfFileItem          `xml:"fileItem,omitempty"`
    +	Warning    []LocalizedMethodFault `xml:"warning,omitempty"`
    +	Error      []LocalizedMethodFault `xml:"error,omitempty"`
    +}
    +
    +func init() {
    +	t["OvfCreateImportSpecResult"] = reflect.TypeOf((*OvfCreateImportSpecResult)(nil)).Elem()
    +}
    +
    +type OvfDeploymentOption struct {
    +	DynamicData
    +
    +	Key         string `xml:"key"`
    +	Label       string `xml:"label"`
    +	Description string `xml:"description"`
    +}
    +
    +func init() {
    +	t["OvfDeploymentOption"] = reflect.TypeOf((*OvfDeploymentOption)(nil)).Elem()
    +}
    +
    +type OvfDiskMappingNotFound struct {
    +	OvfSystemFault
    +
    +	DiskName string `xml:"diskName"`
    +	VmName   string `xml:"vmName"`
    +}
    +
    +func init() {
    +	t["OvfDiskMappingNotFound"] = reflect.TypeOf((*OvfDiskMappingNotFound)(nil)).Elem()
    +}
    +
    +type OvfDiskMappingNotFoundFault OvfDiskMappingNotFound
    +
    +func init() {
    +	t["OvfDiskMappingNotFoundFault"] = reflect.TypeOf((*OvfDiskMappingNotFoundFault)(nil)).Elem()
    +}
    +
    +type OvfDiskOrderConstraint struct {
    +	OvfConstraint
    +}
    +
    +func init() {
    +	t["OvfDiskOrderConstraint"] = reflect.TypeOf((*OvfDiskOrderConstraint)(nil)).Elem()
    +}
    +
    +type OvfDiskOrderConstraintFault OvfDiskOrderConstraint
    +
    +func init() {
    +	t["OvfDiskOrderConstraintFault"] = reflect.TypeOf((*OvfDiskOrderConstraintFault)(nil)).Elem()
    +}
    +
    +type OvfDuplicateElement struct {
    +	OvfElement
    +}
    +
    +func init() {
    +	t["OvfDuplicateElement"] = reflect.TypeOf((*OvfDuplicateElement)(nil)).Elem()
    +}
    +
    +type OvfDuplicateElementFault OvfDuplicateElement
    +
    +func init() {
    +	t["OvfDuplicateElementFault"] = reflect.TypeOf((*OvfDuplicateElementFault)(nil)).Elem()
    +}
    +
    +type OvfDuplicatedElementBoundary struct {
    +	OvfElement
    +
    +	Boundary string `xml:"boundary"`
    +}
    +
    +func init() {
    +	t["OvfDuplicatedElementBoundary"] = reflect.TypeOf((*OvfDuplicatedElementBoundary)(nil)).Elem()
    +}
    +
    +type OvfDuplicatedElementBoundaryFault OvfDuplicatedElementBoundary
    +
    +func init() {
    +	t["OvfDuplicatedElementBoundaryFault"] = reflect.TypeOf((*OvfDuplicatedElementBoundaryFault)(nil)).Elem()
    +}
    +
    +type OvfDuplicatedPropertyIdExport struct {
    +	OvfExport
    +
    +	Fqid string `xml:"fqid"`
    +}
    +
    +func init() {
    +	t["OvfDuplicatedPropertyIdExport"] = reflect.TypeOf((*OvfDuplicatedPropertyIdExport)(nil)).Elem()
    +}
    +
    +type OvfDuplicatedPropertyIdExportFault OvfDuplicatedPropertyIdExport
    +
    +func init() {
    +	t["OvfDuplicatedPropertyIdExportFault"] = reflect.TypeOf((*OvfDuplicatedPropertyIdExportFault)(nil)).Elem()
    +}
    +
    +type OvfDuplicatedPropertyIdImport struct {
    +	OvfExport
    +}
    +
    +func init() {
    +	t["OvfDuplicatedPropertyIdImport"] = reflect.TypeOf((*OvfDuplicatedPropertyIdImport)(nil)).Elem()
    +}
    +
    +type OvfDuplicatedPropertyIdImportFault OvfDuplicatedPropertyIdImport
    +
    +func init() {
    +	t["OvfDuplicatedPropertyIdImportFault"] = reflect.TypeOf((*OvfDuplicatedPropertyIdImportFault)(nil)).Elem()
    +}
    +
    +type OvfElement struct {
    +	OvfInvalidPackage
    +
    +	Name string `xml:"name"`
    +}
    +
    +func init() {
    +	t["OvfElement"] = reflect.TypeOf((*OvfElement)(nil)).Elem()
    +}
    +
    +type OvfElementFault BaseOvfElement
    +
    +func init() {
    +	t["OvfElementFault"] = reflect.TypeOf((*OvfElementFault)(nil)).Elem()
    +}
    +
    +type OvfElementInvalidValue struct {
    +	OvfElement
    +
    +	Value string `xml:"value"`
    +}
    +
    +func init() {
    +	t["OvfElementInvalidValue"] = reflect.TypeOf((*OvfElementInvalidValue)(nil)).Elem()
    +}
    +
    +type OvfElementInvalidValueFault OvfElementInvalidValue
    +
    +func init() {
    +	t["OvfElementInvalidValueFault"] = reflect.TypeOf((*OvfElementInvalidValueFault)(nil)).Elem()
    +}
    +
    +type OvfExport struct {
    +	OvfFault
    +}
    +
    +func init() {
    +	t["OvfExport"] = reflect.TypeOf((*OvfExport)(nil)).Elem()
    +}
    +
    +type OvfExportFailed struct {
    +	OvfExport
    +}
    +
    +func init() {
    +	t["OvfExportFailed"] = reflect.TypeOf((*OvfExportFailed)(nil)).Elem()
    +}
    +
    +type OvfExportFailedFault OvfExportFailed
    +
    +func init() {
    +	t["OvfExportFailedFault"] = reflect.TypeOf((*OvfExportFailedFault)(nil)).Elem()
    +}
    +
    +type OvfExportFault BaseOvfExport
    +
    +func init() {
    +	t["OvfExportFault"] = reflect.TypeOf((*OvfExportFault)(nil)).Elem()
    +}
    +
    +type OvfFault struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["OvfFault"] = reflect.TypeOf((*OvfFault)(nil)).Elem()
    +}
    +
    +type OvfFaultFault BaseOvfFault
    +
    +func init() {
    +	t["OvfFaultFault"] = reflect.TypeOf((*OvfFaultFault)(nil)).Elem()
    +}
    +
    +type OvfFile struct {
    +	DynamicData
    +
    +	DeviceId          string `xml:"deviceId"`
    +	Path              string `xml:"path"`
    +	CompressionMethod string `xml:"compressionMethod,omitempty"`
    +	ChunkSize         int64  `xml:"chunkSize,omitempty"`
    +	Size              int64  `xml:"size"`
    +	Capacity          int64  `xml:"capacity,omitempty"`
    +	PopulatedSize     int64  `xml:"populatedSize,omitempty"`
    +}
    +
    +func init() {
    +	t["OvfFile"] = reflect.TypeOf((*OvfFile)(nil)).Elem()
    +}
    +
    +type OvfFileItem struct {
    +	DynamicData
    +
    +	DeviceId          string `xml:"deviceId"`
    +	Path              string `xml:"path"`
    +	CompressionMethod string `xml:"compressionMethod,omitempty"`
    +	ChunkSize         int64  `xml:"chunkSize,omitempty"`
    +	Size              int64  `xml:"size,omitempty"`
    +	CimType           int32  `xml:"cimType"`
    +	Create            bool   `xml:"create"`
    +}
    +
    +func init() {
    +	t["OvfFileItem"] = reflect.TypeOf((*OvfFileItem)(nil)).Elem()
    +}
    +
    +type OvfHardwareCheck struct {
    +	OvfImport
    +}
    +
    +func init() {
    +	t["OvfHardwareCheck"] = reflect.TypeOf((*OvfHardwareCheck)(nil)).Elem()
    +}
    +
    +type OvfHardwareCheckFault OvfHardwareCheck
    +
    +func init() {
    +	t["OvfHardwareCheckFault"] = reflect.TypeOf((*OvfHardwareCheckFault)(nil)).Elem()
    +}
    +
    +type OvfHardwareExport struct {
    +	OvfExport
    +
    +	Device BaseVirtualDevice `xml:"device,omitempty,typeattr"`
    +	VmPath string            `xml:"vmPath"`
    +}
    +
    +func init() {
    +	t["OvfHardwareExport"] = reflect.TypeOf((*OvfHardwareExport)(nil)).Elem()
    +}
    +
    +type OvfHardwareExportFault BaseOvfHardwareExport
    +
    +func init() {
    +	t["OvfHardwareExportFault"] = reflect.TypeOf((*OvfHardwareExportFault)(nil)).Elem()
    +}
    +
    +type OvfHostResourceConstraint struct {
    +	OvfConstraint
    +
    +	Value string `xml:"value"`
    +}
    +
    +func init() {
    +	t["OvfHostResourceConstraint"] = reflect.TypeOf((*OvfHostResourceConstraint)(nil)).Elem()
    +}
    +
    +type OvfHostResourceConstraintFault OvfHostResourceConstraint
    +
    +func init() {
    +	t["OvfHostResourceConstraintFault"] = reflect.TypeOf((*OvfHostResourceConstraintFault)(nil)).Elem()
    +}
    +
    +type OvfHostValueNotParsed struct {
    +	OvfSystemFault
    +
    +	Property string `xml:"property"`
    +	Value    string `xml:"value"`
    +}
    +
    +func init() {
    +	t["OvfHostValueNotParsed"] = reflect.TypeOf((*OvfHostValueNotParsed)(nil)).Elem()
    +}
    +
    +type OvfHostValueNotParsedFault OvfHostValueNotParsed
    +
    +func init() {
    +	t["OvfHostValueNotParsedFault"] = reflect.TypeOf((*OvfHostValueNotParsedFault)(nil)).Elem()
    +}
    +
    +type OvfImport struct {
    +	OvfFault
    +}
    +
    +func init() {
    +	t["OvfImport"] = reflect.TypeOf((*OvfImport)(nil)).Elem()
    +}
    +
    +type OvfImportFailed struct {
    +	OvfImport
    +}
    +
    +func init() {
    +	t["OvfImportFailed"] = reflect.TypeOf((*OvfImportFailed)(nil)).Elem()
    +}
    +
    +type OvfImportFailedFault OvfImportFailed
    +
    +func init() {
    +	t["OvfImportFailedFault"] = reflect.TypeOf((*OvfImportFailedFault)(nil)).Elem()
    +}
    +
    +type OvfImportFault BaseOvfImport
    +
    +func init() {
    +	t["OvfImportFault"] = reflect.TypeOf((*OvfImportFault)(nil)).Elem()
    +}
    +
    +type OvfInternalError struct {
    +	OvfSystemFault
    +}
    +
    +func init() {
    +	t["OvfInternalError"] = reflect.TypeOf((*OvfInternalError)(nil)).Elem()
    +}
    +
    +type OvfInternalErrorFault OvfInternalError
    +
    +func init() {
    +	t["OvfInternalErrorFault"] = reflect.TypeOf((*OvfInternalErrorFault)(nil)).Elem()
    +}
    +
    +type OvfInvalidPackage struct {
    +	OvfFault
    +
    +	LineNumber int32 `xml:"lineNumber"`
    +}
    +
    +func init() {
    +	t["OvfInvalidPackage"] = reflect.TypeOf((*OvfInvalidPackage)(nil)).Elem()
    +}
    +
    +type OvfInvalidPackageFault BaseOvfInvalidPackage
    +
    +func init() {
    +	t["OvfInvalidPackageFault"] = reflect.TypeOf((*OvfInvalidPackageFault)(nil)).Elem()
    +}
    +
    +type OvfInvalidValue struct {
    +	OvfAttribute
    +
    +	Value string `xml:"value"`
    +}
    +
    +func init() {
    +	t["OvfInvalidValue"] = reflect.TypeOf((*OvfInvalidValue)(nil)).Elem()
    +}
    +
    +type OvfInvalidValueConfiguration struct {
    +	OvfInvalidValue
    +}
    +
    +func init() {
    +	t["OvfInvalidValueConfiguration"] = reflect.TypeOf((*OvfInvalidValueConfiguration)(nil)).Elem()
    +}
    +
    +type OvfInvalidValueConfigurationFault OvfInvalidValueConfiguration
    +
    +func init() {
    +	t["OvfInvalidValueConfigurationFault"] = reflect.TypeOf((*OvfInvalidValueConfigurationFault)(nil)).Elem()
    +}
    +
    +type OvfInvalidValueEmpty struct {
    +	OvfInvalidValue
    +}
    +
    +func init() {
    +	t["OvfInvalidValueEmpty"] = reflect.TypeOf((*OvfInvalidValueEmpty)(nil)).Elem()
    +}
    +
    +type OvfInvalidValueEmptyFault OvfInvalidValueEmpty
    +
    +func init() {
    +	t["OvfInvalidValueEmptyFault"] = reflect.TypeOf((*OvfInvalidValueEmptyFault)(nil)).Elem()
    +}
    +
    +type OvfInvalidValueFault BaseOvfInvalidValue
    +
    +func init() {
    +	t["OvfInvalidValueFault"] = reflect.TypeOf((*OvfInvalidValueFault)(nil)).Elem()
    +}
    +
    +type OvfInvalidValueFormatMalformed struct {
    +	OvfInvalidValue
    +}
    +
    +func init() {
    +	t["OvfInvalidValueFormatMalformed"] = reflect.TypeOf((*OvfInvalidValueFormatMalformed)(nil)).Elem()
    +}
    +
    +type OvfInvalidValueFormatMalformedFault OvfInvalidValueFormatMalformed
    +
    +func init() {
    +	t["OvfInvalidValueFormatMalformedFault"] = reflect.TypeOf((*OvfInvalidValueFormatMalformedFault)(nil)).Elem()
    +}
    +
    +type OvfInvalidValueReference struct {
    +	OvfInvalidValue
    +}
    +
    +func init() {
    +	t["OvfInvalidValueReference"] = reflect.TypeOf((*OvfInvalidValueReference)(nil)).Elem()
    +}
    +
    +type OvfInvalidValueReferenceFault OvfInvalidValueReference
    +
    +func init() {
    +	t["OvfInvalidValueReferenceFault"] = reflect.TypeOf((*OvfInvalidValueReferenceFault)(nil)).Elem()
    +}
    +
    +type OvfInvalidVmName struct {
    +	OvfUnsupportedPackage
    +
    +	Name string `xml:"name"`
    +}
    +
    +func init() {
    +	t["OvfInvalidVmName"] = reflect.TypeOf((*OvfInvalidVmName)(nil)).Elem()
    +}
    +
    +type OvfInvalidVmNameFault OvfInvalidVmName
    +
    +func init() {
    +	t["OvfInvalidVmNameFault"] = reflect.TypeOf((*OvfInvalidVmNameFault)(nil)).Elem()
    +}
    +
    +type OvfManagerCommonParams struct {
    +	DynamicData
    +
    +	Locale           string     `xml:"locale"`
    +	DeploymentOption string     `xml:"deploymentOption"`
    +	MsgBundle        []KeyValue `xml:"msgBundle,omitempty"`
    +	ImportOption     []string   `xml:"importOption,omitempty"`
    +}
    +
    +func init() {
    +	t["OvfManagerCommonParams"] = reflect.TypeOf((*OvfManagerCommonParams)(nil)).Elem()
    +}
    +
    +type OvfMappedOsId struct {
    +	OvfImport
    +
    +	OvfId             int32  `xml:"ovfId"`
    +	OvfDescription    string `xml:"ovfDescription"`
    +	TargetDescription string `xml:"targetDescription"`
    +}
    +
    +func init() {
    +	t["OvfMappedOsId"] = reflect.TypeOf((*OvfMappedOsId)(nil)).Elem()
    +}
    +
    +type OvfMappedOsIdFault OvfMappedOsId
    +
    +func init() {
    +	t["OvfMappedOsIdFault"] = reflect.TypeOf((*OvfMappedOsIdFault)(nil)).Elem()
    +}
    +
    +type OvfMissingAttribute struct {
    +	OvfAttribute
    +}
    +
    +func init() {
    +	t["OvfMissingAttribute"] = reflect.TypeOf((*OvfMissingAttribute)(nil)).Elem()
    +}
    +
    +type OvfMissingAttributeFault OvfMissingAttribute
    +
    +func init() {
    +	t["OvfMissingAttributeFault"] = reflect.TypeOf((*OvfMissingAttributeFault)(nil)).Elem()
    +}
    +
    +type OvfMissingElement struct {
    +	OvfElement
    +}
    +
    +func init() {
    +	t["OvfMissingElement"] = reflect.TypeOf((*OvfMissingElement)(nil)).Elem()
    +}
    +
    +type OvfMissingElementFault BaseOvfMissingElement
    +
    +func init() {
    +	t["OvfMissingElementFault"] = reflect.TypeOf((*OvfMissingElementFault)(nil)).Elem()
    +}
    +
    +type OvfMissingElementNormalBoundary struct {
    +	OvfMissingElement
    +
    +	Boundary string `xml:"boundary"`
    +}
    +
    +func init() {
    +	t["OvfMissingElementNormalBoundary"] = reflect.TypeOf((*OvfMissingElementNormalBoundary)(nil)).Elem()
    +}
    +
    +type OvfMissingElementNormalBoundaryFault OvfMissingElementNormalBoundary
    +
    +func init() {
    +	t["OvfMissingElementNormalBoundaryFault"] = reflect.TypeOf((*OvfMissingElementNormalBoundaryFault)(nil)).Elem()
    +}
    +
    +type OvfMissingHardware struct {
    +	OvfImport
    +
    +	Name         string `xml:"name"`
    +	ResourceType int32  `xml:"resourceType"`
    +}
    +
    +func init() {
    +	t["OvfMissingHardware"] = reflect.TypeOf((*OvfMissingHardware)(nil)).Elem()
    +}
    +
    +type OvfMissingHardwareFault OvfMissingHardware
    +
    +func init() {
    +	t["OvfMissingHardwareFault"] = reflect.TypeOf((*OvfMissingHardwareFault)(nil)).Elem()
    +}
    +
    +type OvfNetworkInfo struct {
    +	DynamicData
    +
    +	Name        string `xml:"name"`
    +	Description string `xml:"description"`
    +}
    +
    +func init() {
    +	t["OvfNetworkInfo"] = reflect.TypeOf((*OvfNetworkInfo)(nil)).Elem()
    +}
    +
    +type OvfNetworkMapping struct {
    +	DynamicData
    +
    +	Name    string                 `xml:"name"`
    +	Network ManagedObjectReference `xml:"network"`
    +}
    +
    +func init() {
    +	t["OvfNetworkMapping"] = reflect.TypeOf((*OvfNetworkMapping)(nil)).Elem()
    +}
    +
    +type OvfNetworkMappingNotSupported struct {
    +	OvfImport
    +}
    +
    +func init() {
    +	t["OvfNetworkMappingNotSupported"] = reflect.TypeOf((*OvfNetworkMappingNotSupported)(nil)).Elem()
    +}
    +
    +type OvfNetworkMappingNotSupportedFault OvfNetworkMappingNotSupported
    +
    +func init() {
    +	t["OvfNetworkMappingNotSupportedFault"] = reflect.TypeOf((*OvfNetworkMappingNotSupportedFault)(nil)).Elem()
    +}
    +
    +type OvfNoHostNic struct {
    +	OvfUnsupportedPackage
    +}
    +
    +func init() {
    +	t["OvfNoHostNic"] = reflect.TypeOf((*OvfNoHostNic)(nil)).Elem()
    +}
    +
    +type OvfNoHostNicFault OvfNoHostNic
    +
    +func init() {
    +	t["OvfNoHostNicFault"] = reflect.TypeOf((*OvfNoHostNicFault)(nil)).Elem()
    +}
    +
    +type OvfNoSpaceOnController struct {
    +	OvfUnsupportedElement
    +
    +	Parent string `xml:"parent"`
    +}
    +
    +func init() {
    +	t["OvfNoSpaceOnController"] = reflect.TypeOf((*OvfNoSpaceOnController)(nil)).Elem()
    +}
    +
    +type OvfNoSpaceOnControllerFault OvfNoSpaceOnController
    +
    +func init() {
    +	t["OvfNoSpaceOnControllerFault"] = reflect.TypeOf((*OvfNoSpaceOnControllerFault)(nil)).Elem()
    +}
    +
    +type OvfNoSupportedHardwareFamily struct {
    +	OvfUnsupportedPackage
    +
    +	Version string `xml:"version"`
    +}
    +
    +func init() {
    +	t["OvfNoSupportedHardwareFamily"] = reflect.TypeOf((*OvfNoSupportedHardwareFamily)(nil)).Elem()
    +}
    +
    +type OvfNoSupportedHardwareFamilyFault OvfNoSupportedHardwareFamily
    +
    +func init() {
    +	t["OvfNoSupportedHardwareFamilyFault"] = reflect.TypeOf((*OvfNoSupportedHardwareFamilyFault)(nil)).Elem()
    +}
    +
    +type OvfOptionInfo struct {
    +	DynamicData
    +
    +	Option      string             `xml:"option"`
    +	Description LocalizableMessage `xml:"description"`
    +}
    +
    +func init() {
    +	t["OvfOptionInfo"] = reflect.TypeOf((*OvfOptionInfo)(nil)).Elem()
    +}
    +
    +type OvfParseDescriptorParams struct {
    +	OvfManagerCommonParams
    +}
    +
    +func init() {
    +	t["OvfParseDescriptorParams"] = reflect.TypeOf((*OvfParseDescriptorParams)(nil)).Elem()
    +}
    +
    +type OvfParseDescriptorResult struct {
    +	DynamicData
    +
    +	Eula                            []string               `xml:"eula,omitempty"`
    +	Network                         []OvfNetworkInfo       `xml:"network,omitempty"`
    +	IpAllocationScheme              []string               `xml:"ipAllocationScheme,omitempty"`
    +	IpProtocols                     []string               `xml:"ipProtocols,omitempty"`
    +	Property                        []VAppPropertyInfo     `xml:"property,omitempty"`
    +	ProductInfo                     *VAppProductInfo       `xml:"productInfo,omitempty"`
    +	Annotation                      string                 `xml:"annotation"`
    +	ApproximateDownloadSize         int64                  `xml:"approximateDownloadSize,omitempty"`
    +	ApproximateFlatDeploymentSize   int64                  `xml:"approximateFlatDeploymentSize,omitempty"`
    +	ApproximateSparseDeploymentSize int64                  `xml:"approximateSparseDeploymentSize,omitempty"`
    +	DefaultEntityName               string                 `xml:"defaultEntityName"`
    +	VirtualApp                      bool                   `xml:"virtualApp"`
    +	DeploymentOption                []OvfDeploymentOption  `xml:"deploymentOption,omitempty"`
    +	DefaultDeploymentOption         string                 `xml:"defaultDeploymentOption"`
    +	EntityName                      []KeyValue             `xml:"entityName,omitempty"`
    +	AnnotatedOst                    *OvfConsumerOstNode    `xml:"annotatedOst,omitempty"`
    +	Error                           []LocalizedMethodFault `xml:"error,omitempty"`
    +	Warning                         []LocalizedMethodFault `xml:"warning,omitempty"`
    +}
    +
    +func init() {
    +	t["OvfParseDescriptorResult"] = reflect.TypeOf((*OvfParseDescriptorResult)(nil)).Elem()
    +}
    +
    +type OvfProperty struct {
    +	OvfInvalidPackage
    +
    +	Type  string `xml:"type"`
    +	Value string `xml:"value"`
    +}
    +
    +func init() {
    +	t["OvfProperty"] = reflect.TypeOf((*OvfProperty)(nil)).Elem()
    +}
    +
    +type OvfPropertyExport struct {
    +	OvfExport
    +
    +	Type  string `xml:"type"`
    +	Value string `xml:"value"`
    +}
    +
    +func init() {
    +	t["OvfPropertyExport"] = reflect.TypeOf((*OvfPropertyExport)(nil)).Elem()
    +}
    +
    +type OvfPropertyExportFault OvfPropertyExport
    +
    +func init() {
    +	t["OvfPropertyExportFault"] = reflect.TypeOf((*OvfPropertyExportFault)(nil)).Elem()
    +}
    +
    +type OvfPropertyFault BaseOvfProperty
    +
    +func init() {
    +	t["OvfPropertyFault"] = reflect.TypeOf((*OvfPropertyFault)(nil)).Elem()
    +}
    +
    +type OvfPropertyNetwork struct {
    +	OvfProperty
    +}
    +
    +func init() {
    +	t["OvfPropertyNetwork"] = reflect.TypeOf((*OvfPropertyNetwork)(nil)).Elem()
    +}
    +
    +type OvfPropertyNetworkExport struct {
    +	OvfExport
    +
    +	Network string `xml:"network"`
    +}
    +
    +func init() {
    +	t["OvfPropertyNetworkExport"] = reflect.TypeOf((*OvfPropertyNetworkExport)(nil)).Elem()
    +}
    +
    +type OvfPropertyNetworkExportFault OvfPropertyNetworkExport
    +
    +func init() {
    +	t["OvfPropertyNetworkExportFault"] = reflect.TypeOf((*OvfPropertyNetworkExportFault)(nil)).Elem()
    +}
    +
    +type OvfPropertyNetworkFault OvfPropertyNetwork
    +
    +func init() {
    +	t["OvfPropertyNetworkFault"] = reflect.TypeOf((*OvfPropertyNetworkFault)(nil)).Elem()
    +}
    +
    +type OvfPropertyQualifier struct {
    +	OvfProperty
    +
    +	Qualifier string `xml:"qualifier"`
    +}
    +
    +func init() {
    +	t["OvfPropertyQualifier"] = reflect.TypeOf((*OvfPropertyQualifier)(nil)).Elem()
    +}
    +
    +type OvfPropertyQualifierDuplicate struct {
    +	OvfProperty
    +
    +	Qualifier string `xml:"qualifier"`
    +}
    +
    +func init() {
    +	t["OvfPropertyQualifierDuplicate"] = reflect.TypeOf((*OvfPropertyQualifierDuplicate)(nil)).Elem()
    +}
    +
    +type OvfPropertyQualifierDuplicateFault OvfPropertyQualifierDuplicate
    +
    +func init() {
    +	t["OvfPropertyQualifierDuplicateFault"] = reflect.TypeOf((*OvfPropertyQualifierDuplicateFault)(nil)).Elem()
    +}
    +
    +type OvfPropertyQualifierFault OvfPropertyQualifier
    +
    +func init() {
    +	t["OvfPropertyQualifierFault"] = reflect.TypeOf((*OvfPropertyQualifierFault)(nil)).Elem()
    +}
    +
    +type OvfPropertyQualifierIgnored struct {
    +	OvfProperty
    +
    +	Qualifier string `xml:"qualifier"`
    +}
    +
    +func init() {
    +	t["OvfPropertyQualifierIgnored"] = reflect.TypeOf((*OvfPropertyQualifierIgnored)(nil)).Elem()
    +}
    +
    +type OvfPropertyQualifierIgnoredFault OvfPropertyQualifierIgnored
    +
    +func init() {
    +	t["OvfPropertyQualifierIgnoredFault"] = reflect.TypeOf((*OvfPropertyQualifierIgnoredFault)(nil)).Elem()
    +}
    +
    +type OvfPropertyType struct {
    +	OvfProperty
    +}
    +
    +func init() {
    +	t["OvfPropertyType"] = reflect.TypeOf((*OvfPropertyType)(nil)).Elem()
    +}
    +
    +type OvfPropertyTypeFault OvfPropertyType
    +
    +func init() {
    +	t["OvfPropertyTypeFault"] = reflect.TypeOf((*OvfPropertyTypeFault)(nil)).Elem()
    +}
    +
    +type OvfPropertyValue struct {
    +	OvfProperty
    +}
    +
    +func init() {
    +	t["OvfPropertyValue"] = reflect.TypeOf((*OvfPropertyValue)(nil)).Elem()
    +}
    +
    +type OvfPropertyValueFault OvfPropertyValue
    +
    +func init() {
    +	t["OvfPropertyValueFault"] = reflect.TypeOf((*OvfPropertyValueFault)(nil)).Elem()
    +}
    +
    +type OvfResourceMap struct {
    +	DynamicData
    +
    +	Source       string                  `xml:"source"`
    +	Parent       *ManagedObjectReference `xml:"parent,omitempty"`
    +	ResourceSpec *ResourceConfigSpec     `xml:"resourceSpec,omitempty"`
    +	Datastore    *ManagedObjectReference `xml:"datastore,omitempty"`
    +}
    +
    +func init() {
    +	t["OvfResourceMap"] = reflect.TypeOf((*OvfResourceMap)(nil)).Elem()
    +}
    +
    +type OvfSystemFault struct {
    +	OvfFault
    +}
    +
    +func init() {
    +	t["OvfSystemFault"] = reflect.TypeOf((*OvfSystemFault)(nil)).Elem()
    +}
    +
    +type OvfSystemFaultFault BaseOvfSystemFault
    +
    +func init() {
    +	t["OvfSystemFaultFault"] = reflect.TypeOf((*OvfSystemFaultFault)(nil)).Elem()
    +}
    +
    +type OvfToXmlUnsupportedElement struct {
    +	OvfSystemFault
    +
    +	Name string `xml:"name,omitempty"`
    +}
    +
    +func init() {
    +	t["OvfToXmlUnsupportedElement"] = reflect.TypeOf((*OvfToXmlUnsupportedElement)(nil)).Elem()
    +}
    +
    +type OvfToXmlUnsupportedElementFault OvfToXmlUnsupportedElement
    +
    +func init() {
    +	t["OvfToXmlUnsupportedElementFault"] = reflect.TypeOf((*OvfToXmlUnsupportedElementFault)(nil)).Elem()
    +}
    +
    +type OvfUnableToExportDisk struct {
    +	OvfHardwareExport
    +
    +	DiskName string `xml:"diskName"`
    +}
    +
    +func init() {
    +	t["OvfUnableToExportDisk"] = reflect.TypeOf((*OvfUnableToExportDisk)(nil)).Elem()
    +}
    +
    +type OvfUnableToExportDiskFault OvfUnableToExportDisk
    +
    +func init() {
    +	t["OvfUnableToExportDiskFault"] = reflect.TypeOf((*OvfUnableToExportDiskFault)(nil)).Elem()
    +}
    +
    +type OvfUnexpectedElement struct {
    +	OvfElement
    +}
    +
    +func init() {
    +	t["OvfUnexpectedElement"] = reflect.TypeOf((*OvfUnexpectedElement)(nil)).Elem()
    +}
    +
    +type OvfUnexpectedElementFault OvfUnexpectedElement
    +
    +func init() {
    +	t["OvfUnexpectedElementFault"] = reflect.TypeOf((*OvfUnexpectedElementFault)(nil)).Elem()
    +}
    +
    +type OvfUnknownDevice struct {
    +	OvfSystemFault
    +
    +	Device BaseVirtualDevice `xml:"device,omitempty,typeattr"`
    +	VmName string            `xml:"vmName"`
    +}
    +
    +func init() {
    +	t["OvfUnknownDevice"] = reflect.TypeOf((*OvfUnknownDevice)(nil)).Elem()
    +}
    +
    +type OvfUnknownDeviceBacking struct {
    +	OvfHardwareExport
    +
    +	Backing BaseVirtualDeviceBackingInfo `xml:"backing,typeattr"`
    +}
    +
    +func init() {
    +	t["OvfUnknownDeviceBacking"] = reflect.TypeOf((*OvfUnknownDeviceBacking)(nil)).Elem()
    +}
    +
    +type OvfUnknownDeviceBackingFault OvfUnknownDeviceBacking
    +
    +func init() {
    +	t["OvfUnknownDeviceBackingFault"] = reflect.TypeOf((*OvfUnknownDeviceBackingFault)(nil)).Elem()
    +}
    +
    +type OvfUnknownDeviceFault OvfUnknownDevice
    +
    +func init() {
    +	t["OvfUnknownDeviceFault"] = reflect.TypeOf((*OvfUnknownDeviceFault)(nil)).Elem()
    +}
    +
    +type OvfUnknownEntity struct {
    +	OvfSystemFault
    +
    +	LineNumber int32 `xml:"lineNumber"`
    +}
    +
    +func init() {
    +	t["OvfUnknownEntity"] = reflect.TypeOf((*OvfUnknownEntity)(nil)).Elem()
    +}
    +
    +type OvfUnknownEntityFault OvfUnknownEntity
    +
    +func init() {
    +	t["OvfUnknownEntityFault"] = reflect.TypeOf((*OvfUnknownEntityFault)(nil)).Elem()
    +}
    +
    +type OvfUnsupportedAttribute struct {
    +	OvfUnsupportedPackage
    +
    +	ElementName   string `xml:"elementName"`
    +	AttributeName string `xml:"attributeName"`
    +}
    +
    +func init() {
    +	t["OvfUnsupportedAttribute"] = reflect.TypeOf((*OvfUnsupportedAttribute)(nil)).Elem()
    +}
    +
    +type OvfUnsupportedAttributeFault BaseOvfUnsupportedAttribute
    +
    +func init() {
    +	t["OvfUnsupportedAttributeFault"] = reflect.TypeOf((*OvfUnsupportedAttributeFault)(nil)).Elem()
    +}
    +
    +type OvfUnsupportedAttributeValue struct {
    +	OvfUnsupportedAttribute
    +
    +	Value string `xml:"value"`
    +}
    +
    +func init() {
    +	t["OvfUnsupportedAttributeValue"] = reflect.TypeOf((*OvfUnsupportedAttributeValue)(nil)).Elem()
    +}
    +
    +type OvfUnsupportedAttributeValueFault OvfUnsupportedAttributeValue
    +
    +func init() {
    +	t["OvfUnsupportedAttributeValueFault"] = reflect.TypeOf((*OvfUnsupportedAttributeValueFault)(nil)).Elem()
    +}
    +
    +type OvfUnsupportedDeviceBackingInfo struct {
    +	OvfSystemFault
    +
    +	ElementName string `xml:"elementName,omitempty"`
    +	InstanceId  string `xml:"instanceId,omitempty"`
    +	DeviceName  string `xml:"deviceName"`
    +	BackingName string `xml:"backingName,omitempty"`
    +}
    +
    +func init() {
    +	t["OvfUnsupportedDeviceBackingInfo"] = reflect.TypeOf((*OvfUnsupportedDeviceBackingInfo)(nil)).Elem()
    +}
    +
    +type OvfUnsupportedDeviceBackingInfoFault OvfUnsupportedDeviceBackingInfo
    +
    +func init() {
    +	t["OvfUnsupportedDeviceBackingInfoFault"] = reflect.TypeOf((*OvfUnsupportedDeviceBackingInfoFault)(nil)).Elem()
    +}
    +
    +type OvfUnsupportedDeviceBackingOption struct {
    +	OvfSystemFault
    +
    +	ElementName string `xml:"elementName,omitempty"`
    +	InstanceId  string `xml:"instanceId,omitempty"`
    +	DeviceName  string `xml:"deviceName"`
    +	BackingName string `xml:"backingName,omitempty"`
    +}
    +
    +func init() {
    +	t["OvfUnsupportedDeviceBackingOption"] = reflect.TypeOf((*OvfUnsupportedDeviceBackingOption)(nil)).Elem()
    +}
    +
    +type OvfUnsupportedDeviceBackingOptionFault OvfUnsupportedDeviceBackingOption
    +
    +func init() {
    +	t["OvfUnsupportedDeviceBackingOptionFault"] = reflect.TypeOf((*OvfUnsupportedDeviceBackingOptionFault)(nil)).Elem()
    +}
    +
    +type OvfUnsupportedDeviceExport struct {
    +	OvfHardwareExport
    +}
    +
    +func init() {
    +	t["OvfUnsupportedDeviceExport"] = reflect.TypeOf((*OvfUnsupportedDeviceExport)(nil)).Elem()
    +}
    +
    +type OvfUnsupportedDeviceExportFault OvfUnsupportedDeviceExport
    +
    +func init() {
    +	t["OvfUnsupportedDeviceExportFault"] = reflect.TypeOf((*OvfUnsupportedDeviceExportFault)(nil)).Elem()
    +}
    +
    +type OvfUnsupportedDiskProvisioning struct {
    +	OvfImport
    +
    +	DiskProvisioning          string `xml:"diskProvisioning"`
    +	SupportedDiskProvisioning string `xml:"supportedDiskProvisioning"`
    +}
    +
    +func init() {
    +	t["OvfUnsupportedDiskProvisioning"] = reflect.TypeOf((*OvfUnsupportedDiskProvisioning)(nil)).Elem()
    +}
    +
    +type OvfUnsupportedDiskProvisioningFault OvfUnsupportedDiskProvisioning
    +
    +func init() {
    +	t["OvfUnsupportedDiskProvisioningFault"] = reflect.TypeOf((*OvfUnsupportedDiskProvisioningFault)(nil)).Elem()
    +}
    +
    +type OvfUnsupportedElement struct {
    +	OvfUnsupportedPackage
    +
    +	Name string `xml:"name"`
    +}
    +
    +func init() {
    +	t["OvfUnsupportedElement"] = reflect.TypeOf((*OvfUnsupportedElement)(nil)).Elem()
    +}
    +
    +type OvfUnsupportedElementFault BaseOvfUnsupportedElement
    +
    +func init() {
    +	t["OvfUnsupportedElementFault"] = reflect.TypeOf((*OvfUnsupportedElementFault)(nil)).Elem()
    +}
    +
    +type OvfUnsupportedElementValue struct {
    +	OvfUnsupportedElement
    +
    +	Value string `xml:"value"`
    +}
    +
    +func init() {
    +	t["OvfUnsupportedElementValue"] = reflect.TypeOf((*OvfUnsupportedElementValue)(nil)).Elem()
    +}
    +
    +type OvfUnsupportedElementValueFault OvfUnsupportedElementValue
    +
    +func init() {
    +	t["OvfUnsupportedElementValueFault"] = reflect.TypeOf((*OvfUnsupportedElementValueFault)(nil)).Elem()
    +}
    +
    +type OvfUnsupportedPackage struct {
    +	OvfFault
    +
    +	LineNumber int32 `xml:"lineNumber,omitempty"`
    +}
    +
    +func init() {
    +	t["OvfUnsupportedPackage"] = reflect.TypeOf((*OvfUnsupportedPackage)(nil)).Elem()
    +}
    +
    +type OvfUnsupportedPackageFault BaseOvfUnsupportedPackage
    +
    +func init() {
    +	t["OvfUnsupportedPackageFault"] = reflect.TypeOf((*OvfUnsupportedPackageFault)(nil)).Elem()
    +}
    +
    +type OvfUnsupportedSection struct {
    +	OvfUnsupportedElement
    +
    +	Info string `xml:"info"`
    +}
    +
    +func init() {
    +	t["OvfUnsupportedSection"] = reflect.TypeOf((*OvfUnsupportedSection)(nil)).Elem()
    +}
    +
    +type OvfUnsupportedSectionFault OvfUnsupportedSection
    +
    +func init() {
    +	t["OvfUnsupportedSectionFault"] = reflect.TypeOf((*OvfUnsupportedSectionFault)(nil)).Elem()
    +}
    +
    +type OvfUnsupportedSubType struct {
    +	OvfUnsupportedPackage
    +
    +	ElementName   string `xml:"elementName"`
    +	InstanceId    string `xml:"instanceId"`
    +	DeviceType    int32  `xml:"deviceType"`
    +	DeviceSubType string `xml:"deviceSubType"`
    +}
    +
    +func init() {
    +	t["OvfUnsupportedSubType"] = reflect.TypeOf((*OvfUnsupportedSubType)(nil)).Elem()
    +}
    +
    +type OvfUnsupportedSubTypeFault OvfUnsupportedSubType
    +
    +func init() {
    +	t["OvfUnsupportedSubTypeFault"] = reflect.TypeOf((*OvfUnsupportedSubTypeFault)(nil)).Elem()
    +}
    +
    +type OvfUnsupportedType struct {
    +	OvfUnsupportedPackage
    +
    +	Name       string `xml:"name"`
    +	InstanceId string `xml:"instanceId"`
    +	DeviceType int32  `xml:"deviceType"`
    +}
    +
    +func init() {
    +	t["OvfUnsupportedType"] = reflect.TypeOf((*OvfUnsupportedType)(nil)).Elem()
    +}
    +
    +type OvfUnsupportedTypeFault OvfUnsupportedType
    +
    +func init() {
    +	t["OvfUnsupportedTypeFault"] = reflect.TypeOf((*OvfUnsupportedTypeFault)(nil)).Elem()
    +}
    +
    +type OvfValidateHostParams struct {
    +	OvfManagerCommonParams
    +}
    +
    +func init() {
    +	t["OvfValidateHostParams"] = reflect.TypeOf((*OvfValidateHostParams)(nil)).Elem()
    +}
    +
    +type OvfValidateHostResult struct {
    +	DynamicData
    +
    +	DownloadSize              int64                  `xml:"downloadSize,omitempty"`
    +	FlatDeploymentSize        int64                  `xml:"flatDeploymentSize,omitempty"`
    +	SparseDeploymentSize      int64                  `xml:"sparseDeploymentSize,omitempty"`
    +	Error                     []LocalizedMethodFault `xml:"error,omitempty"`
    +	Warning                   []LocalizedMethodFault `xml:"warning,omitempty"`
    +	SupportedDiskProvisioning []string               `xml:"supportedDiskProvisioning,omitempty"`
    +}
    +
    +func init() {
    +	t["OvfValidateHostResult"] = reflect.TypeOf((*OvfValidateHostResult)(nil)).Elem()
    +}
    +
    +type OvfWrongElement struct {
    +	OvfElement
    +}
    +
    +func init() {
    +	t["OvfWrongElement"] = reflect.TypeOf((*OvfWrongElement)(nil)).Elem()
    +}
    +
    +type OvfWrongElementFault OvfWrongElement
    +
    +func init() {
    +	t["OvfWrongElementFault"] = reflect.TypeOf((*OvfWrongElementFault)(nil)).Elem()
    +}
    +
    +type OvfWrongNamespace struct {
    +	OvfInvalidPackage
    +
    +	NamespaceName string `xml:"namespaceName"`
    +}
    +
    +func init() {
    +	t["OvfWrongNamespace"] = reflect.TypeOf((*OvfWrongNamespace)(nil)).Elem()
    +}
    +
    +type OvfWrongNamespaceFault OvfWrongNamespace
    +
    +func init() {
    +	t["OvfWrongNamespaceFault"] = reflect.TypeOf((*OvfWrongNamespaceFault)(nil)).Elem()
    +}
    +
    +type OvfXmlFormat struct {
    +	OvfInvalidPackage
    +
    +	Description string `xml:"description"`
    +}
    +
    +func init() {
    +	t["OvfXmlFormat"] = reflect.TypeOf((*OvfXmlFormat)(nil)).Elem()
    +}
    +
    +type OvfXmlFormatFault OvfXmlFormat
    +
    +func init() {
    +	t["OvfXmlFormatFault"] = reflect.TypeOf((*OvfXmlFormatFault)(nil)).Elem()
    +}
    +
    +type PMemDatastoreInfo struct {
    +	DatastoreInfo
    +
    +	Pmem HostPMemVolume `xml:"pmem"`
    +}
    +
    +func init() {
    +	t["PMemDatastoreInfo"] = reflect.TypeOf((*PMemDatastoreInfo)(nil)).Elem()
    +}
    +
    +type ParaVirtualSCSIController struct {
    +	VirtualSCSIController
    +}
    +
    +func init() {
    +	t["ParaVirtualSCSIController"] = reflect.TypeOf((*ParaVirtualSCSIController)(nil)).Elem()
    +}
    +
    +type ParaVirtualSCSIControllerOption struct {
    +	VirtualSCSIControllerOption
    +}
    +
    +func init() {
    +	t["ParaVirtualSCSIControllerOption"] = reflect.TypeOf((*ParaVirtualSCSIControllerOption)(nil)).Elem()
    +}
    +
    +type ParseDescriptor ParseDescriptorRequestType
    +
    +func init() {
    +	t["ParseDescriptor"] = reflect.TypeOf((*ParseDescriptor)(nil)).Elem()
    +}
    +
    +type ParseDescriptorRequestType struct {
    +	This          ManagedObjectReference   `xml:"_this"`
    +	OvfDescriptor string                   `xml:"ovfDescriptor"`
    +	Pdp           OvfParseDescriptorParams `xml:"pdp"`
    +}
    +
    +func init() {
    +	t["ParseDescriptorRequestType"] = reflect.TypeOf((*ParseDescriptorRequestType)(nil)).Elem()
    +}
    +
    +type ParseDescriptorResponse struct {
    +	Returnval OvfParseDescriptorResult `xml:"returnval"`
    +}
    +
    +type PassiveNodeDeploymentSpec struct {
    +	NodeDeploymentSpec
    +
    +	FailoverIpSettings *CustomizationIPSettings `xml:"failoverIpSettings,omitempty"`
    +}
    +
    +func init() {
    +	t["PassiveNodeDeploymentSpec"] = reflect.TypeOf((*PassiveNodeDeploymentSpec)(nil)).Elem()
    +}
    +
    +type PassiveNodeNetworkSpec struct {
    +	NodeNetworkSpec
    +
    +	FailoverIpSettings *CustomizationIPSettings `xml:"failoverIpSettings,omitempty"`
    +}
    +
    +func init() {
    +	t["PassiveNodeNetworkSpec"] = reflect.TypeOf((*PassiveNodeNetworkSpec)(nil)).Elem()
    +}
    +
    +type PasswordField struct {
    +	DynamicData
    +
    +	Value string `xml:"value"`
    +}
    +
    +func init() {
    +	t["PasswordField"] = reflect.TypeOf((*PasswordField)(nil)).Elem()
    +}
    +
    +type PatchAlreadyInstalled struct {
    +	PatchNotApplicable
    +}
    +
    +func init() {
    +	t["PatchAlreadyInstalled"] = reflect.TypeOf((*PatchAlreadyInstalled)(nil)).Elem()
    +}
    +
    +type PatchAlreadyInstalledFault PatchAlreadyInstalled
    +
    +func init() {
    +	t["PatchAlreadyInstalledFault"] = reflect.TypeOf((*PatchAlreadyInstalledFault)(nil)).Elem()
    +}
    +
    +type PatchBinariesNotFound struct {
    +	VimFault
    +
    +	PatchID string   `xml:"patchID"`
    +	Binary  []string `xml:"binary,omitempty"`
    +}
    +
    +func init() {
    +	t["PatchBinariesNotFound"] = reflect.TypeOf((*PatchBinariesNotFound)(nil)).Elem()
    +}
    +
    +type PatchBinariesNotFoundFault PatchBinariesNotFound
    +
    +func init() {
    +	t["PatchBinariesNotFoundFault"] = reflect.TypeOf((*PatchBinariesNotFoundFault)(nil)).Elem()
    +}
    +
    +type PatchInstallFailed struct {
    +	PlatformConfigFault
    +
    +	RolledBack bool `xml:"rolledBack"`
    +}
    +
    +func init() {
    +	t["PatchInstallFailed"] = reflect.TypeOf((*PatchInstallFailed)(nil)).Elem()
    +}
    +
    +type PatchInstallFailedFault PatchInstallFailed
    +
    +func init() {
    +	t["PatchInstallFailedFault"] = reflect.TypeOf((*PatchInstallFailedFault)(nil)).Elem()
    +}
    +
    +type PatchIntegrityError struct {
    +	PlatformConfigFault
    +}
    +
    +func init() {
    +	t["PatchIntegrityError"] = reflect.TypeOf((*PatchIntegrityError)(nil)).Elem()
    +}
    +
    +type PatchIntegrityErrorFault PatchIntegrityError
    +
    +func init() {
    +	t["PatchIntegrityErrorFault"] = reflect.TypeOf((*PatchIntegrityErrorFault)(nil)).Elem()
    +}
    +
    +type PatchMetadataCorrupted struct {
    +	PatchMetadataInvalid
    +}
    +
    +func init() {
    +	t["PatchMetadataCorrupted"] = reflect.TypeOf((*PatchMetadataCorrupted)(nil)).Elem()
    +}
    +
    +type PatchMetadataCorruptedFault PatchMetadataCorrupted
    +
    +func init() {
    +	t["PatchMetadataCorruptedFault"] = reflect.TypeOf((*PatchMetadataCorruptedFault)(nil)).Elem()
    +}
    +
    +type PatchMetadataInvalid struct {
    +	VimFault
    +
    +	PatchID  string   `xml:"patchID"`
    +	MetaData []string `xml:"metaData,omitempty"`
    +}
    +
    +func init() {
    +	t["PatchMetadataInvalid"] = reflect.TypeOf((*PatchMetadataInvalid)(nil)).Elem()
    +}
    +
    +type PatchMetadataInvalidFault BasePatchMetadataInvalid
    +
    +func init() {
    +	t["PatchMetadataInvalidFault"] = reflect.TypeOf((*PatchMetadataInvalidFault)(nil)).Elem()
    +}
    +
    +type PatchMetadataNotFound struct {
    +	PatchMetadataInvalid
    +}
    +
    +func init() {
    +	t["PatchMetadataNotFound"] = reflect.TypeOf((*PatchMetadataNotFound)(nil)).Elem()
    +}
    +
    +type PatchMetadataNotFoundFault PatchMetadataNotFound
    +
    +func init() {
    +	t["PatchMetadataNotFoundFault"] = reflect.TypeOf((*PatchMetadataNotFoundFault)(nil)).Elem()
    +}
    +
    +type PatchMissingDependencies struct {
    +	PatchNotApplicable
    +
    +	PrerequisitePatch []string `xml:"prerequisitePatch,omitempty"`
    +	PrerequisiteLib   []string `xml:"prerequisiteLib,omitempty"`
    +}
    +
    +func init() {
    +	t["PatchMissingDependencies"] = reflect.TypeOf((*PatchMissingDependencies)(nil)).Elem()
    +}
    +
    +type PatchMissingDependenciesFault PatchMissingDependencies
    +
    +func init() {
    +	t["PatchMissingDependenciesFault"] = reflect.TypeOf((*PatchMissingDependenciesFault)(nil)).Elem()
    +}
    +
    +type PatchNotApplicable struct {
    +	VimFault
    +
    +	PatchID string `xml:"patchID"`
    +}
    +
    +func init() {
    +	t["PatchNotApplicable"] = reflect.TypeOf((*PatchNotApplicable)(nil)).Elem()
    +}
    +
    +type PatchNotApplicableFault BasePatchNotApplicable
    +
    +func init() {
    +	t["PatchNotApplicableFault"] = reflect.TypeOf((*PatchNotApplicableFault)(nil)).Elem()
    +}
    +
    +type PatchSuperseded struct {
    +	PatchNotApplicable
    +
    +	Supersede []string `xml:"supersede,omitempty"`
    +}
    +
    +func init() {
    +	t["PatchSuperseded"] = reflect.TypeOf((*PatchSuperseded)(nil)).Elem()
    +}
    +
    +type PatchSupersededFault PatchSuperseded
    +
    +func init() {
    +	t["PatchSupersededFault"] = reflect.TypeOf((*PatchSupersededFault)(nil)).Elem()
    +}
    +
    +type PerfCompositeMetric struct {
    +	DynamicData
    +
    +	Entity      BasePerfEntityMetricBase   `xml:"entity,omitempty,typeattr"`
    +	ChildEntity []BasePerfEntityMetricBase `xml:"childEntity,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["PerfCompositeMetric"] = reflect.TypeOf((*PerfCompositeMetric)(nil)).Elem()
    +}
    +
    +type PerfCounterInfo struct {
    +	DynamicData
    +
    +	Key                 int32                  `xml:"key"`
    +	NameInfo            BaseElementDescription `xml:"nameInfo,typeattr"`
    +	GroupInfo           BaseElementDescription `xml:"groupInfo,typeattr"`
    +	UnitInfo            BaseElementDescription `xml:"unitInfo,typeattr"`
    +	RollupType          PerfSummaryType        `xml:"rollupType"`
    +	StatsType           PerfStatsType          `xml:"statsType"`
    +	Level               int32                  `xml:"level,omitempty"`
    +	PerDeviceLevel      int32                  `xml:"perDeviceLevel,omitempty"`
    +	AssociatedCounterId []int32                `xml:"associatedCounterId,omitempty"`
    +}
    +
    +func init() {
    +	t["PerfCounterInfo"] = reflect.TypeOf((*PerfCounterInfo)(nil)).Elem()
    +}
    +
    +type PerfEntityMetric struct {
    +	PerfEntityMetricBase
    +
    +	SampleInfo []PerfSampleInfo       `xml:"sampleInfo,omitempty"`
    +	Value      []BasePerfMetricSeries `xml:"value,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["PerfEntityMetric"] = reflect.TypeOf((*PerfEntityMetric)(nil)).Elem()
    +}
    +
    +type PerfEntityMetricBase struct {
    +	DynamicData
    +
    +	Entity ManagedObjectReference `xml:"entity"`
    +}
    +
    +func init() {
    +	t["PerfEntityMetricBase"] = reflect.TypeOf((*PerfEntityMetricBase)(nil)).Elem()
    +}
    +
    +type PerfEntityMetricCSV struct {
    +	PerfEntityMetricBase
    +
    +	SampleInfoCSV string                `xml:"sampleInfoCSV"`
    +	Value         []PerfMetricSeriesCSV `xml:"value,omitempty"`
    +}
    +
    +func init() {
    +	t["PerfEntityMetricCSV"] = reflect.TypeOf((*PerfEntityMetricCSV)(nil)).Elem()
    +}
    +
    +type PerfInterval struct {
    +	DynamicData
    +
    +	Key            int32  `xml:"key"`
    +	SamplingPeriod int32  `xml:"samplingPeriod"`
    +	Name           string `xml:"name"`
    +	Length         int32  `xml:"length"`
    +	Level          int32  `xml:"level,omitempty"`
    +	Enabled        bool   `xml:"enabled"`
    +}
    +
    +func init() {
    +	t["PerfInterval"] = reflect.TypeOf((*PerfInterval)(nil)).Elem()
    +}
    +
    +type PerfMetricId struct {
    +	DynamicData
    +
    +	CounterId int32  `xml:"counterId"`
    +	Instance  string `xml:"instance"`
    +}
    +
    +func init() {
    +	t["PerfMetricId"] = reflect.TypeOf((*PerfMetricId)(nil)).Elem()
    +}
    +
    +type PerfMetricIntSeries struct {
    +	PerfMetricSeries
    +
    +	Value []int64 `xml:"value,omitempty"`
    +}
    +
    +func init() {
    +	t["PerfMetricIntSeries"] = reflect.TypeOf((*PerfMetricIntSeries)(nil)).Elem()
    +}
    +
    +type PerfMetricSeries struct {
    +	DynamicData
    +
    +	Id PerfMetricId `xml:"id"`
    +}
    +
    +func init() {
    +	t["PerfMetricSeries"] = reflect.TypeOf((*PerfMetricSeries)(nil)).Elem()
    +}
    +
    +type PerfMetricSeriesCSV struct {
    +	PerfMetricSeries
    +
    +	Value string `xml:"value,omitempty"`
    +}
    +
    +func init() {
    +	t["PerfMetricSeriesCSV"] = reflect.TypeOf((*PerfMetricSeriesCSV)(nil)).Elem()
    +}
    +
    +type PerfProviderSummary struct {
    +	DynamicData
    +
    +	Entity           ManagedObjectReference `xml:"entity"`
    +	CurrentSupported bool                   `xml:"currentSupported"`
    +	SummarySupported bool                   `xml:"summarySupported"`
    +	RefreshRate      int32                  `xml:"refreshRate,omitempty"`
    +}
    +
    +func init() {
    +	t["PerfProviderSummary"] = reflect.TypeOf((*PerfProviderSummary)(nil)).Elem()
    +}
    +
    +type PerfQuerySpec struct {
    +	DynamicData
    +
    +	Entity     ManagedObjectReference `xml:"entity"`
    +	StartTime  *time.Time             `xml:"startTime"`
    +	EndTime    *time.Time             `xml:"endTime"`
    +	MaxSample  int32                  `xml:"maxSample,omitempty"`
    +	MetricId   []PerfMetricId         `xml:"metricId,omitempty"`
    +	IntervalId int32                  `xml:"intervalId,omitempty"`
    +	Format     string                 `xml:"format,omitempty"`
    +}
    +
    +func init() {
    +	t["PerfQuerySpec"] = reflect.TypeOf((*PerfQuerySpec)(nil)).Elem()
    +}
    +
    +type PerfSampleInfo struct {
    +	DynamicData
    +
    +	Timestamp time.Time `xml:"timestamp"`
    +	Interval  int32     `xml:"interval"`
    +}
    +
    +func init() {
    +	t["PerfSampleInfo"] = reflect.TypeOf((*PerfSampleInfo)(nil)).Elem()
    +}
    +
    +type PerformDvsProductSpecOperationRequestType struct {
    +	This        ManagedObjectReference               `xml:"_this"`
    +	Operation   string                               `xml:"operation"`
    +	ProductSpec *DistributedVirtualSwitchProductSpec `xml:"productSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["PerformDvsProductSpecOperationRequestType"] = reflect.TypeOf((*PerformDvsProductSpecOperationRequestType)(nil)).Elem()
    +}
    +
    +type PerformDvsProductSpecOperation_Task PerformDvsProductSpecOperationRequestType
    +
    +func init() {
    +	t["PerformDvsProductSpecOperation_Task"] = reflect.TypeOf((*PerformDvsProductSpecOperation_Task)(nil)).Elem()
    +}
    +
    +type PerformDvsProductSpecOperation_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type PerformVsanUpgradePreflightCheck PerformVsanUpgradePreflightCheckRequestType
    +
    +func init() {
    +	t["PerformVsanUpgradePreflightCheck"] = reflect.TypeOf((*PerformVsanUpgradePreflightCheck)(nil)).Elem()
    +}
    +
    +type PerformVsanUpgradePreflightCheckRequestType struct {
    +	This            ManagedObjectReference `xml:"_this"`
    +	Cluster         ManagedObjectReference `xml:"cluster"`
    +	DowngradeFormat *bool                  `xml:"downgradeFormat"`
    +}
    +
    +func init() {
    +	t["PerformVsanUpgradePreflightCheckRequestType"] = reflect.TypeOf((*PerformVsanUpgradePreflightCheckRequestType)(nil)).Elem()
    +}
    +
    +type PerformVsanUpgradePreflightCheckResponse struct {
    +	Returnval VsanUpgradeSystemPreflightCheckResult `xml:"returnval"`
    +}
    +
    +type PerformVsanUpgradeRequestType struct {
    +	This                   ManagedObjectReference   `xml:"_this"`
    +	Cluster                ManagedObjectReference   `xml:"cluster"`
    +	PerformObjectUpgrade   *bool                    `xml:"performObjectUpgrade"`
    +	DowngradeFormat        *bool                    `xml:"downgradeFormat"`
    +	AllowReducedRedundancy *bool                    `xml:"allowReducedRedundancy"`
    +	ExcludeHosts           []ManagedObjectReference `xml:"excludeHosts,omitempty"`
    +}
    +
    +func init() {
    +	t["PerformVsanUpgradeRequestType"] = reflect.TypeOf((*PerformVsanUpgradeRequestType)(nil)).Elem()
    +}
    +
    +type PerformVsanUpgrade_Task PerformVsanUpgradeRequestType
    +
    +func init() {
    +	t["PerformVsanUpgrade_Task"] = reflect.TypeOf((*PerformVsanUpgrade_Task)(nil)).Elem()
    +}
    +
    +type PerformVsanUpgrade_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type PerformanceDescription struct {
    +	DynamicData
    +
    +	CounterType []BaseElementDescription `xml:"counterType,typeattr"`
    +	StatsType   []BaseElementDescription `xml:"statsType,typeattr"`
    +}
    +
    +func init() {
    +	t["PerformanceDescription"] = reflect.TypeOf((*PerformanceDescription)(nil)).Elem()
    +}
    +
    +type PerformanceManagerCounterLevelMapping struct {
    +	DynamicData
    +
    +	CounterId      int32 `xml:"counterId"`
    +	AggregateLevel int32 `xml:"aggregateLevel,omitempty"`
    +	PerDeviceLevel int32 `xml:"perDeviceLevel,omitempty"`
    +}
    +
    +func init() {
    +	t["PerformanceManagerCounterLevelMapping"] = reflect.TypeOf((*PerformanceManagerCounterLevelMapping)(nil)).Elem()
    +}
    +
    +type PerformanceStatisticsDescription struct {
    +	DynamicData
    +
    +	Intervals []PerfInterval `xml:"intervals,omitempty"`
    +}
    +
    +func init() {
    +	t["PerformanceStatisticsDescription"] = reflect.TypeOf((*PerformanceStatisticsDescription)(nil)).Elem()
    +}
    +
    +type Permission struct {
    +	DynamicData
    +
    +	Entity    *ManagedObjectReference `xml:"entity,omitempty"`
    +	Principal string                  `xml:"principal"`
    +	Group     bool                    `xml:"group"`
    +	RoleId    int32                   `xml:"roleId"`
    +	Propagate bool                    `xml:"propagate"`
    +}
    +
    +func init() {
    +	t["Permission"] = reflect.TypeOf((*Permission)(nil)).Elem()
    +}
    +
    +type PermissionAddedEvent struct {
    +	PermissionEvent
    +
    +	Role      RoleEventArgument `xml:"role"`
    +	Propagate bool              `xml:"propagate"`
    +}
    +
    +func init() {
    +	t["PermissionAddedEvent"] = reflect.TypeOf((*PermissionAddedEvent)(nil)).Elem()
    +}
    +
    +type PermissionEvent struct {
    +	AuthorizationEvent
    +
    +	Entity    ManagedEntityEventArgument `xml:"entity"`
    +	Principal string                     `xml:"principal"`
    +	Group     bool                       `xml:"group"`
    +}
    +
    +func init() {
    +	t["PermissionEvent"] = reflect.TypeOf((*PermissionEvent)(nil)).Elem()
    +}
    +
    +type PermissionProfile struct {
    +	ApplyProfile
    +
    +	Key string `xml:"key"`
    +}
    +
    +func init() {
    +	t["PermissionProfile"] = reflect.TypeOf((*PermissionProfile)(nil)).Elem()
    +}
    +
    +type PermissionRemovedEvent struct {
    +	PermissionEvent
    +}
    +
    +func init() {
    +	t["PermissionRemovedEvent"] = reflect.TypeOf((*PermissionRemovedEvent)(nil)).Elem()
    +}
    +
    +type PermissionUpdatedEvent struct {
    +	PermissionEvent
    +
    +	Role          RoleEventArgument  `xml:"role"`
    +	Propagate     bool               `xml:"propagate"`
    +	PrevRole      *RoleEventArgument `xml:"prevRole,omitempty"`
    +	PrevPropagate *bool              `xml:"prevPropagate"`
    +}
    +
    +func init() {
    +	t["PermissionUpdatedEvent"] = reflect.TypeOf((*PermissionUpdatedEvent)(nil)).Elem()
    +}
    +
    +type PhysCompatRDMNotSupported struct {
    +	RDMNotSupported
    +}
    +
    +func init() {
    +	t["PhysCompatRDMNotSupported"] = reflect.TypeOf((*PhysCompatRDMNotSupported)(nil)).Elem()
    +}
    +
    +type PhysCompatRDMNotSupportedFault PhysCompatRDMNotSupported
    +
    +func init() {
    +	t["PhysCompatRDMNotSupportedFault"] = reflect.TypeOf((*PhysCompatRDMNotSupportedFault)(nil)).Elem()
    +}
    +
    +type PhysicalNic struct {
    +	DynamicData
    +
    +	Key                                   string                `xml:"key,omitempty"`
    +	Device                                string                `xml:"device"`
    +	Pci                                   string                `xml:"pci"`
    +	Driver                                string                `xml:"driver,omitempty"`
    +	LinkSpeed                             *PhysicalNicLinkInfo  `xml:"linkSpeed,omitempty"`
    +	ValidLinkSpecification                []PhysicalNicLinkInfo `xml:"validLinkSpecification,omitempty"`
    +	Spec                                  PhysicalNicSpec       `xml:"spec"`
    +	WakeOnLanSupported                    bool                  `xml:"wakeOnLanSupported"`
    +	Mac                                   string                `xml:"mac"`
    +	FcoeConfiguration                     *FcoeConfig           `xml:"fcoeConfiguration,omitempty"`
    +	VmDirectPathGen2Supported             *bool                 `xml:"vmDirectPathGen2Supported"`
    +	VmDirectPathGen2SupportedMode         string                `xml:"vmDirectPathGen2SupportedMode,omitempty"`
    +	ResourcePoolSchedulerAllowed          *bool                 `xml:"resourcePoolSchedulerAllowed"`
    +	ResourcePoolSchedulerDisallowedReason []string              `xml:"resourcePoolSchedulerDisallowedReason,omitempty"`
    +	AutoNegotiateSupported                *bool                 `xml:"autoNegotiateSupported"`
    +	EnhancedNetworkingStackSupported      *bool                 `xml:"enhancedNetworkingStackSupported"`
    +}
    +
    +func init() {
    +	t["PhysicalNic"] = reflect.TypeOf((*PhysicalNic)(nil)).Elem()
    +}
    +
    +type PhysicalNicCdpDeviceCapability struct {
    +	DynamicData
    +
    +	Router            bool `xml:"router"`
    +	TransparentBridge bool `xml:"transparentBridge"`
    +	SourceRouteBridge bool `xml:"sourceRouteBridge"`
    +	NetworkSwitch     bool `xml:"networkSwitch"`
    +	Host              bool `xml:"host"`
    +	IgmpEnabled       bool `xml:"igmpEnabled"`
    +	Repeater          bool `xml:"repeater"`
    +}
    +
    +func init() {
    +	t["PhysicalNicCdpDeviceCapability"] = reflect.TypeOf((*PhysicalNicCdpDeviceCapability)(nil)).Elem()
    +}
    +
    +type PhysicalNicCdpInfo struct {
    +	DynamicData
    +
    +	CdpVersion       int32                           `xml:"cdpVersion,omitempty"`
    +	Timeout          int32                           `xml:"timeout,omitempty"`
    +	Ttl              int32                           `xml:"ttl,omitempty"`
    +	Samples          int32                           `xml:"samples,omitempty"`
    +	DevId            string                          `xml:"devId,omitempty"`
    +	Address          string                          `xml:"address,omitempty"`
    +	PortId           string                          `xml:"portId,omitempty"`
    +	DeviceCapability *PhysicalNicCdpDeviceCapability `xml:"deviceCapability,omitempty"`
    +	SoftwareVersion  string                          `xml:"softwareVersion,omitempty"`
    +	HardwarePlatform string                          `xml:"hardwarePlatform,omitempty"`
    +	IpPrefix         string                          `xml:"ipPrefix,omitempty"`
    +	IpPrefixLen      int32                           `xml:"ipPrefixLen,omitempty"`
    +	Vlan             int32                           `xml:"vlan,omitempty"`
    +	FullDuplex       *bool                           `xml:"fullDuplex"`
    +	Mtu              int32                           `xml:"mtu,omitempty"`
    +	SystemName       string                          `xml:"systemName,omitempty"`
    +	SystemOID        string                          `xml:"systemOID,omitempty"`
    +	MgmtAddr         string                          `xml:"mgmtAddr,omitempty"`
    +	Location         string                          `xml:"location,omitempty"`
    +}
    +
    +func init() {
    +	t["PhysicalNicCdpInfo"] = reflect.TypeOf((*PhysicalNicCdpInfo)(nil)).Elem()
    +}
    +
    +type PhysicalNicConfig struct {
    +	DynamicData
    +
    +	Device string          `xml:"device"`
    +	Spec   PhysicalNicSpec `xml:"spec"`
    +}
    +
    +func init() {
    +	t["PhysicalNicConfig"] = reflect.TypeOf((*PhysicalNicConfig)(nil)).Elem()
    +}
    +
    +type PhysicalNicHint struct {
    +	DynamicData
    +
    +	VlanId int32 `xml:"vlanId,omitempty"`
    +}
    +
    +func init() {
    +	t["PhysicalNicHint"] = reflect.TypeOf((*PhysicalNicHint)(nil)).Elem()
    +}
    +
    +type PhysicalNicHintInfo struct {
    +	DynamicData
    +
    +	Device              string                          `xml:"device"`
    +	Subnet              []PhysicalNicIpHint             `xml:"subnet,omitempty"`
    +	Network             []PhysicalNicNameHint           `xml:"network,omitempty"`
    +	ConnectedSwitchPort *PhysicalNicCdpInfo             `xml:"connectedSwitchPort,omitempty"`
    +	LldpInfo            *LinkLayerDiscoveryProtocolInfo `xml:"lldpInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["PhysicalNicHintInfo"] = reflect.TypeOf((*PhysicalNicHintInfo)(nil)).Elem()
    +}
    +
    +type PhysicalNicIpHint struct {
    +	PhysicalNicHint
    +
    +	IpSubnet string `xml:"ipSubnet"`
    +}
    +
    +func init() {
    +	t["PhysicalNicIpHint"] = reflect.TypeOf((*PhysicalNicIpHint)(nil)).Elem()
    +}
    +
    +type PhysicalNicLinkInfo struct {
    +	DynamicData
    +
    +	SpeedMb int32 `xml:"speedMb"`
    +	Duplex  bool  `xml:"duplex"`
    +}
    +
    +func init() {
    +	t["PhysicalNicLinkInfo"] = reflect.TypeOf((*PhysicalNicLinkInfo)(nil)).Elem()
    +}
    +
    +type PhysicalNicNameHint struct {
    +	PhysicalNicHint
    +
    +	Network string `xml:"network"`
    +}
    +
    +func init() {
    +	t["PhysicalNicNameHint"] = reflect.TypeOf((*PhysicalNicNameHint)(nil)).Elem()
    +}
    +
    +type PhysicalNicProfile struct {
    +	ApplyProfile
    +
    +	Key string `xml:"key"`
    +}
    +
    +func init() {
    +	t["PhysicalNicProfile"] = reflect.TypeOf((*PhysicalNicProfile)(nil)).Elem()
    +}
    +
    +type PhysicalNicSpec struct {
    +	DynamicData
    +
    +	Ip                            *HostIpConfig        `xml:"ip,omitempty"`
    +	LinkSpeed                     *PhysicalNicLinkInfo `xml:"linkSpeed,omitempty"`
    +	EnableEnhancedNetworkingStack *bool                `xml:"enableEnhancedNetworkingStack"`
    +}
    +
    +func init() {
    +	t["PhysicalNicSpec"] = reflect.TypeOf((*PhysicalNicSpec)(nil)).Elem()
    +}
    +
    +type PlaceVm PlaceVmRequestType
    +
    +func init() {
    +	t["PlaceVm"] = reflect.TypeOf((*PlaceVm)(nil)).Elem()
    +}
    +
    +type PlaceVmRequestType struct {
    +	This          ManagedObjectReference `xml:"_this"`
    +	PlacementSpec PlacementSpec          `xml:"placementSpec"`
    +}
    +
    +func init() {
    +	t["PlaceVmRequestType"] = reflect.TypeOf((*PlaceVmRequestType)(nil)).Elem()
    +}
    +
    +type PlaceVmResponse struct {
    +	Returnval PlacementResult `xml:"returnval"`
    +}
    +
    +type PlacementAction struct {
    +	ClusterAction
    +
    +	Vm           *ManagedObjectReference     `xml:"vm,omitempty"`
    +	TargetHost   *ManagedObjectReference     `xml:"targetHost,omitempty"`
    +	RelocateSpec *VirtualMachineRelocateSpec `xml:"relocateSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["PlacementAction"] = reflect.TypeOf((*PlacementAction)(nil)).Elem()
    +}
    +
    +type PlacementAffinityRule struct {
    +	DynamicData
    +
    +	RuleType  string                   `xml:"ruleType"`
    +	RuleScope string                   `xml:"ruleScope"`
    +	Vms       []ManagedObjectReference `xml:"vms,omitempty"`
    +	Keys      []string                 `xml:"keys,omitempty"`
    +}
    +
    +func init() {
    +	t["PlacementAffinityRule"] = reflect.TypeOf((*PlacementAffinityRule)(nil)).Elem()
    +}
    +
    +type PlacementRankResult struct {
    +	DynamicData
    +
    +	Key             string                 `xml:"key"`
    +	Candidate       ManagedObjectReference `xml:"candidate"`
    +	ReservedSpaceMB int64                  `xml:"reservedSpaceMB"`
    +	UsedSpaceMB     int64                  `xml:"usedSpaceMB"`
    +	TotalSpaceMB    int64                  `xml:"totalSpaceMB"`
    +	Utilization     float64                `xml:"utilization"`
    +	Faults          []LocalizedMethodFault `xml:"faults,omitempty"`
    +}
    +
    +func init() {
    +	t["PlacementRankResult"] = reflect.TypeOf((*PlacementRankResult)(nil)).Elem()
    +}
    +
    +type PlacementRankSpec struct {
    +	DynamicData
    +
    +	Specs             []PlacementSpec                 `xml:"specs"`
    +	Clusters          []ManagedObjectReference        `xml:"clusters"`
    +	Rules             []PlacementAffinityRule         `xml:"rules,omitempty"`
    +	PlacementRankByVm []StorageDrsPlacementRankVmSpec `xml:"placementRankByVm,omitempty"`
    +}
    +
    +func init() {
    +	t["PlacementRankSpec"] = reflect.TypeOf((*PlacementRankSpec)(nil)).Elem()
    +}
    +
    +type PlacementResult struct {
    +	DynamicData
    +
    +	Recommendations []ClusterRecommendation `xml:"recommendations,omitempty"`
    +	DrsFault        *ClusterDrsFaults       `xml:"drsFault,omitempty"`
    +}
    +
    +func init() {
    +	t["PlacementResult"] = reflect.TypeOf((*PlacementResult)(nil)).Elem()
    +}
    +
    +type PlacementSpec struct {
    +	DynamicData
    +
    +	Priority                  VirtualMachineMovePriority  `xml:"priority,omitempty"`
    +	Vm                        *ManagedObjectReference     `xml:"vm,omitempty"`
    +	ConfigSpec                *VirtualMachineConfigSpec   `xml:"configSpec,omitempty"`
    +	RelocateSpec              *VirtualMachineRelocateSpec `xml:"relocateSpec,omitempty"`
    +	Hosts                     []ManagedObjectReference    `xml:"hosts,omitempty"`
    +	Datastores                []ManagedObjectReference    `xml:"datastores,omitempty"`
    +	StoragePods               []ManagedObjectReference    `xml:"storagePods,omitempty"`
    +	DisallowPrerequisiteMoves *bool                       `xml:"disallowPrerequisiteMoves"`
    +	Rules                     []BaseClusterRuleInfo       `xml:"rules,omitempty,typeattr"`
    +	Key                       string                      `xml:"key,omitempty"`
    +	PlacementType             string                      `xml:"placementType,omitempty"`
    +	CloneSpec                 *VirtualMachineCloneSpec    `xml:"cloneSpec,omitempty"`
    +	CloneName                 string                      `xml:"cloneName,omitempty"`
    +}
    +
    +func init() {
    +	t["PlacementSpec"] = reflect.TypeOf((*PlacementSpec)(nil)).Elem()
    +}
    +
    +type PlatformConfigFault struct {
    +	HostConfigFault
    +
    +	Text string `xml:"text"`
    +}
    +
    +func init() {
    +	t["PlatformConfigFault"] = reflect.TypeOf((*PlatformConfigFault)(nil)).Elem()
    +}
    +
    +type PlatformConfigFaultFault BasePlatformConfigFault
    +
    +func init() {
    +	t["PlatformConfigFaultFault"] = reflect.TypeOf((*PlatformConfigFaultFault)(nil)).Elem()
    +}
    +
    +type PnicUplinkProfile struct {
    +	ApplyProfile
    +
    +	Key string `xml:"key"`
    +}
    +
    +func init() {
    +	t["PnicUplinkProfile"] = reflect.TypeOf((*PnicUplinkProfile)(nil)).Elem()
    +}
    +
    +type PodDiskLocator struct {
    +	DynamicData
    +
    +	DiskId          int32                           `xml:"diskId"`
    +	DiskMoveType    string                          `xml:"diskMoveType,omitempty"`
    +	DiskBackingInfo BaseVirtualDeviceBackingInfo    `xml:"diskBackingInfo,omitempty,typeattr"`
    +	Profile         []BaseVirtualMachineProfileSpec `xml:"profile,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["PodDiskLocator"] = reflect.TypeOf((*PodDiskLocator)(nil)).Elem()
    +}
    +
    +type PodStorageDrsEntry struct {
    +	DynamicData
    +
    +	StorageDrsConfig StorageDrsConfigInfo    `xml:"storageDrsConfig"`
    +	Recommendation   []ClusterRecommendation `xml:"recommendation,omitempty"`
    +	DrsFault         []ClusterDrsFaults      `xml:"drsFault,omitempty"`
    +	ActionHistory    []ClusterActionHistory  `xml:"actionHistory,omitempty"`
    +}
    +
    +func init() {
    +	t["PodStorageDrsEntry"] = reflect.TypeOf((*PodStorageDrsEntry)(nil)).Elem()
    +}
    +
    +type PolicyOption struct {
    +	DynamicData
    +
    +	Id        string        `xml:"id"`
    +	Parameter []KeyAnyValue `xml:"parameter,omitempty"`
    +}
    +
    +func init() {
    +	t["PolicyOption"] = reflect.TypeOf((*PolicyOption)(nil)).Elem()
    +}
    +
    +type PortGroupProfile struct {
    +	ApplyProfile
    +
    +	Key           string                        `xml:"key"`
    +	Name          string                        `xml:"name"`
    +	Vlan          VlanProfile                   `xml:"vlan"`
    +	Vswitch       VirtualSwitchSelectionProfile `xml:"vswitch"`
    +	NetworkPolicy NetworkPolicyProfile          `xml:"networkPolicy"`
    +}
    +
    +func init() {
    +	t["PortGroupProfile"] = reflect.TypeOf((*PortGroupProfile)(nil)).Elem()
    +}
    +
    +type PosixUserSearchResult struct {
    +	UserSearchResult
    +
    +	Id          int32 `xml:"id"`
    +	ShellAccess *bool `xml:"shellAccess"`
    +}
    +
    +func init() {
    +	t["PosixUserSearchResult"] = reflect.TypeOf((*PosixUserSearchResult)(nil)).Elem()
    +}
    +
    +type PostEvent PostEventRequestType
    +
    +func init() {
    +	t["PostEvent"] = reflect.TypeOf((*PostEvent)(nil)).Elem()
    +}
    +
    +type PostEventRequestType struct {
    +	This        ManagedObjectReference `xml:"_this"`
    +	EventToPost BaseEvent              `xml:"eventToPost,typeattr"`
    +	TaskInfo    *TaskInfo              `xml:"taskInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["PostEventRequestType"] = reflect.TypeOf((*PostEventRequestType)(nil)).Elem()
    +}
    +
    +type PostEventResponse struct {
    +}
    +
    +type PostHealthUpdates PostHealthUpdatesRequestType
    +
    +func init() {
    +	t["PostHealthUpdates"] = reflect.TypeOf((*PostHealthUpdates)(nil)).Elem()
    +}
    +
    +type PostHealthUpdatesRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	ProviderId string                 `xml:"providerId"`
    +	Updates    []HealthUpdate         `xml:"updates,omitempty"`
    +}
    +
    +func init() {
    +	t["PostHealthUpdatesRequestType"] = reflect.TypeOf((*PostHealthUpdatesRequestType)(nil)).Elem()
    +}
    +
    +type PostHealthUpdatesResponse struct {
    +}
    +
    +type PowerDownHostToStandByRequestType struct {
    +	This                  ManagedObjectReference `xml:"_this"`
    +	TimeoutSec            int32                  `xml:"timeoutSec"`
    +	EvacuatePoweredOffVms *bool                  `xml:"evacuatePoweredOffVms"`
    +}
    +
    +func init() {
    +	t["PowerDownHostToStandByRequestType"] = reflect.TypeOf((*PowerDownHostToStandByRequestType)(nil)).Elem()
    +}
    +
    +type PowerDownHostToStandBy_Task PowerDownHostToStandByRequestType
    +
    +func init() {
    +	t["PowerDownHostToStandBy_Task"] = reflect.TypeOf((*PowerDownHostToStandBy_Task)(nil)).Elem()
    +}
    +
    +type PowerDownHostToStandBy_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type PowerOffVAppRequestType struct {
    +	This  ManagedObjectReference `xml:"_this"`
    +	Force bool                   `xml:"force"`
    +}
    +
    +func init() {
    +	t["PowerOffVAppRequestType"] = reflect.TypeOf((*PowerOffVAppRequestType)(nil)).Elem()
    +}
    +
    +type PowerOffVApp_Task PowerOffVAppRequestType
    +
    +func init() {
    +	t["PowerOffVApp_Task"] = reflect.TypeOf((*PowerOffVApp_Task)(nil)).Elem()
    +}
    +
    +type PowerOffVApp_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type PowerOffVMRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["PowerOffVMRequestType"] = reflect.TypeOf((*PowerOffVMRequestType)(nil)).Elem()
    +}
    +
    +type PowerOffVM_Task PowerOffVMRequestType
    +
    +func init() {
    +	t["PowerOffVM_Task"] = reflect.TypeOf((*PowerOffVM_Task)(nil)).Elem()
    +}
    +
    +type PowerOffVM_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type PowerOnFtSecondaryFailed struct {
    +	VmFaultToleranceIssue
    +
    +	Vm              ManagedObjectReference          `xml:"vm"`
    +	VmName          string                          `xml:"vmName"`
    +	HostSelectionBy FtIssuesOnHostHostSelectionType `xml:"hostSelectionBy"`
    +	HostErrors      []LocalizedMethodFault          `xml:"hostErrors,omitempty"`
    +	RootCause       LocalizedMethodFault            `xml:"rootCause"`
    +}
    +
    +func init() {
    +	t["PowerOnFtSecondaryFailed"] = reflect.TypeOf((*PowerOnFtSecondaryFailed)(nil)).Elem()
    +}
    +
    +type PowerOnFtSecondaryFailedFault PowerOnFtSecondaryFailed
    +
    +func init() {
    +	t["PowerOnFtSecondaryFailedFault"] = reflect.TypeOf((*PowerOnFtSecondaryFailedFault)(nil)).Elem()
    +}
    +
    +type PowerOnFtSecondaryTimedout struct {
    +	Timedout
    +
    +	Vm      ManagedObjectReference `xml:"vm"`
    +	VmName  string                 `xml:"vmName"`
    +	Timeout int32                  `xml:"timeout"`
    +}
    +
    +func init() {
    +	t["PowerOnFtSecondaryTimedout"] = reflect.TypeOf((*PowerOnFtSecondaryTimedout)(nil)).Elem()
    +}
    +
    +type PowerOnFtSecondaryTimedoutFault PowerOnFtSecondaryTimedout
    +
    +func init() {
    +	t["PowerOnFtSecondaryTimedoutFault"] = reflect.TypeOf((*PowerOnFtSecondaryTimedoutFault)(nil)).Elem()
    +}
    +
    +type PowerOnMultiVMRequestType struct {
    +	This   ManagedObjectReference   `xml:"_this"`
    +	Vm     []ManagedObjectReference `xml:"vm"`
    +	Option []BaseOptionValue        `xml:"option,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["PowerOnMultiVMRequestType"] = reflect.TypeOf((*PowerOnMultiVMRequestType)(nil)).Elem()
    +}
    +
    +type PowerOnMultiVM_Task PowerOnMultiVMRequestType
    +
    +func init() {
    +	t["PowerOnMultiVM_Task"] = reflect.TypeOf((*PowerOnMultiVM_Task)(nil)).Elem()
    +}
    +
    +type PowerOnMultiVM_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type PowerOnVAppRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["PowerOnVAppRequestType"] = reflect.TypeOf((*PowerOnVAppRequestType)(nil)).Elem()
    +}
    +
    +type PowerOnVApp_Task PowerOnVAppRequestType
    +
    +func init() {
    +	t["PowerOnVApp_Task"] = reflect.TypeOf((*PowerOnVApp_Task)(nil)).Elem()
    +}
    +
    +type PowerOnVApp_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type PowerOnVMRequestType struct {
    +	This ManagedObjectReference  `xml:"_this"`
    +	Host *ManagedObjectReference `xml:"host,omitempty"`
    +}
    +
    +func init() {
    +	t["PowerOnVMRequestType"] = reflect.TypeOf((*PowerOnVMRequestType)(nil)).Elem()
    +}
    +
    +type PowerOnVM_Task PowerOnVMRequestType
    +
    +func init() {
    +	t["PowerOnVM_Task"] = reflect.TypeOf((*PowerOnVM_Task)(nil)).Elem()
    +}
    +
    +type PowerOnVM_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type PowerSystemCapability struct {
    +	DynamicData
    +
    +	AvailablePolicy []HostPowerPolicy `xml:"availablePolicy"`
    +}
    +
    +func init() {
    +	t["PowerSystemCapability"] = reflect.TypeOf((*PowerSystemCapability)(nil)).Elem()
    +}
    +
    +type PowerSystemInfo struct {
    +	DynamicData
    +
    +	CurrentPolicy HostPowerPolicy `xml:"currentPolicy"`
    +}
    +
    +func init() {
    +	t["PowerSystemInfo"] = reflect.TypeOf((*PowerSystemInfo)(nil)).Elem()
    +}
    +
    +type PowerUpHostFromStandByRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	TimeoutSec int32                  `xml:"timeoutSec"`
    +}
    +
    +func init() {
    +	t["PowerUpHostFromStandByRequestType"] = reflect.TypeOf((*PowerUpHostFromStandByRequestType)(nil)).Elem()
    +}
    +
    +type PowerUpHostFromStandBy_Task PowerUpHostFromStandByRequestType
    +
    +func init() {
    +	t["PowerUpHostFromStandBy_Task"] = reflect.TypeOf((*PowerUpHostFromStandBy_Task)(nil)).Elem()
    +}
    +
    +type PowerUpHostFromStandBy_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type PrepareCrypto PrepareCryptoRequestType
    +
    +func init() {
    +	t["PrepareCrypto"] = reflect.TypeOf((*PrepareCrypto)(nil)).Elem()
    +}
    +
    +type PrepareCryptoRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["PrepareCryptoRequestType"] = reflect.TypeOf((*PrepareCryptoRequestType)(nil)).Elem()
    +}
    +
    +type PrepareCryptoResponse struct {
    +}
    +
    +type PrivilegeAvailability struct {
    +	DynamicData
    +
    +	PrivId    string `xml:"privId"`
    +	IsGranted bool   `xml:"isGranted"`
    +}
    +
    +func init() {
    +	t["PrivilegeAvailability"] = reflect.TypeOf((*PrivilegeAvailability)(nil)).Elem()
    +}
    +
    +type PrivilegePolicyDef struct {
    +	DynamicData
    +
    +	CreatePrivilege string `xml:"createPrivilege"`
    +	ReadPrivilege   string `xml:"readPrivilege"`
    +	UpdatePrivilege string `xml:"updatePrivilege"`
    +	DeletePrivilege string `xml:"deletePrivilege"`
    +}
    +
    +func init() {
    +	t["PrivilegePolicyDef"] = reflect.TypeOf((*PrivilegePolicyDef)(nil)).Elem()
    +}
    +
    +type ProductComponentInfo struct {
    +	DynamicData
    +
    +	Id      string `xml:"id"`
    +	Name    string `xml:"name"`
    +	Version string `xml:"version"`
    +	Release int32  `xml:"release"`
    +}
    +
    +func init() {
    +	t["ProductComponentInfo"] = reflect.TypeOf((*ProductComponentInfo)(nil)).Elem()
    +}
    +
    +type ProfileApplyProfileElement struct {
    +	ApplyProfile
    +
    +	Key string `xml:"key"`
    +}
    +
    +func init() {
    +	t["ProfileApplyProfileElement"] = reflect.TypeOf((*ProfileApplyProfileElement)(nil)).Elem()
    +}
    +
    +type ProfileApplyProfileProperty struct {
    +	DynamicData
    +
    +	PropertyName string             `xml:"propertyName"`
    +	Array        bool               `xml:"array"`
    +	Profile      []BaseApplyProfile `xml:"profile,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["ProfileApplyProfileProperty"] = reflect.TypeOf((*ProfileApplyProfileProperty)(nil)).Elem()
    +}
    +
    +type ProfileAssociatedEvent struct {
    +	ProfileEvent
    +}
    +
    +func init() {
    +	t["ProfileAssociatedEvent"] = reflect.TypeOf((*ProfileAssociatedEvent)(nil)).Elem()
    +}
    +
    +type ProfileChangedEvent struct {
    +	ProfileEvent
    +}
    +
    +func init() {
    +	t["ProfileChangedEvent"] = reflect.TypeOf((*ProfileChangedEvent)(nil)).Elem()
    +}
    +
    +type ProfileCompositeExpression struct {
    +	ProfileExpression
    +
    +	Operator       string   `xml:"operator"`
    +	ExpressionName []string `xml:"expressionName"`
    +}
    +
    +func init() {
    +	t["ProfileCompositeExpression"] = reflect.TypeOf((*ProfileCompositeExpression)(nil)).Elem()
    +}
    +
    +type ProfileCompositePolicyOptionMetadata struct {
    +	ProfilePolicyOptionMetadata
    +
    +	Option []string `xml:"option"`
    +}
    +
    +func init() {
    +	t["ProfileCompositePolicyOptionMetadata"] = reflect.TypeOf((*ProfileCompositePolicyOptionMetadata)(nil)).Elem()
    +}
    +
    +type ProfileConfigInfo struct {
    +	DynamicData
    +
    +	Name       string `xml:"name"`
    +	Annotation string `xml:"annotation,omitempty"`
    +	Enabled    bool   `xml:"enabled"`
    +}
    +
    +func init() {
    +	t["ProfileConfigInfo"] = reflect.TypeOf((*ProfileConfigInfo)(nil)).Elem()
    +}
    +
    +type ProfileCreateSpec struct {
    +	DynamicData
    +
    +	Name       string `xml:"name,omitempty"`
    +	Annotation string `xml:"annotation,omitempty"`
    +	Enabled    *bool  `xml:"enabled"`
    +}
    +
    +func init() {
    +	t["ProfileCreateSpec"] = reflect.TypeOf((*ProfileCreateSpec)(nil)).Elem()
    +}
    +
    +type ProfileCreatedEvent struct {
    +	ProfileEvent
    +}
    +
    +func init() {
    +	t["ProfileCreatedEvent"] = reflect.TypeOf((*ProfileCreatedEvent)(nil)).Elem()
    +}
    +
    +type ProfileDeferredPolicyOptionParameter struct {
    +	DynamicData
    +
    +	InputPath ProfilePropertyPath `xml:"inputPath"`
    +	Parameter []KeyAnyValue       `xml:"parameter,omitempty"`
    +}
    +
    +func init() {
    +	t["ProfileDeferredPolicyOptionParameter"] = reflect.TypeOf((*ProfileDeferredPolicyOptionParameter)(nil)).Elem()
    +}
    +
    +type ProfileDescription struct {
    +	DynamicData
    +
    +	Section []ProfileDescriptionSection `xml:"section"`
    +}
    +
    +func init() {
    +	t["ProfileDescription"] = reflect.TypeOf((*ProfileDescription)(nil)).Elem()
    +}
    +
    +type ProfileDescriptionSection struct {
    +	DynamicData
    +
    +	Description ExtendedElementDescription `xml:"description"`
    +	Message     []LocalizableMessage       `xml:"message,omitempty"`
    +}
    +
    +func init() {
    +	t["ProfileDescriptionSection"] = reflect.TypeOf((*ProfileDescriptionSection)(nil)).Elem()
    +}
    +
    +type ProfileDissociatedEvent struct {
    +	ProfileEvent
    +}
    +
    +func init() {
    +	t["ProfileDissociatedEvent"] = reflect.TypeOf((*ProfileDissociatedEvent)(nil)).Elem()
    +}
    +
    +type ProfileEvent struct {
    +	Event
    +
    +	Profile ProfileEventArgument `xml:"profile"`
    +}
    +
    +func init() {
    +	t["ProfileEvent"] = reflect.TypeOf((*ProfileEvent)(nil)).Elem()
    +}
    +
    +type ProfileEventArgument struct {
    +	EventArgument
    +
    +	Profile ManagedObjectReference `xml:"profile"`
    +	Name    string                 `xml:"name"`
    +}
    +
    +func init() {
    +	t["ProfileEventArgument"] = reflect.TypeOf((*ProfileEventArgument)(nil)).Elem()
    +}
    +
    +type ProfileExecuteError struct {
    +	DynamicData
    +
    +	Path    *ProfilePropertyPath `xml:"path,omitempty"`
    +	Message LocalizableMessage   `xml:"message"`
    +}
    +
    +func init() {
    +	t["ProfileExecuteError"] = reflect.TypeOf((*ProfileExecuteError)(nil)).Elem()
    +}
    +
    +type ProfileExecuteResult struct {
    +	DynamicData
    +
    +	Status           string                                 `xml:"status"`
    +	ConfigSpec       *HostConfigSpec                        `xml:"configSpec,omitempty"`
    +	InapplicablePath []string                               `xml:"inapplicablePath,omitempty"`
    +	RequireInput     []ProfileDeferredPolicyOptionParameter `xml:"requireInput,omitempty"`
    +	Error            []ProfileExecuteError                  `xml:"error,omitempty"`
    +}
    +
    +func init() {
    +	t["ProfileExecuteResult"] = reflect.TypeOf((*ProfileExecuteResult)(nil)).Elem()
    +}
    +
    +type ProfileExpression struct {
    +	DynamicData
    +
    +	Id          string `xml:"id"`
    +	DisplayName string `xml:"displayName"`
    +	Negated     bool   `xml:"negated"`
    +}
    +
    +func init() {
    +	t["ProfileExpression"] = reflect.TypeOf((*ProfileExpression)(nil)).Elem()
    +}
    +
    +type ProfileExpressionMetadata struct {
    +	DynamicData
    +
    +	ExpressionId ExtendedElementDescription `xml:"expressionId"`
    +	Parameter    []ProfileParameterMetadata `xml:"parameter,omitempty"`
    +}
    +
    +func init() {
    +	t["ProfileExpressionMetadata"] = reflect.TypeOf((*ProfileExpressionMetadata)(nil)).Elem()
    +}
    +
    +type ProfileMetadata struct {
    +	DynamicData
    +
    +	Key               string                                   `xml:"key"`
    +	ProfileTypeName   string                                   `xml:"profileTypeName,omitempty"`
    +	Description       *ExtendedDescription                     `xml:"description,omitempty"`
    +	SortSpec          []ProfileMetadataProfileSortSpec         `xml:"sortSpec,omitempty"`
    +	ProfileCategory   string                                   `xml:"profileCategory,omitempty"`
    +	ProfileComponent  string                                   `xml:"profileComponent,omitempty"`
    +	OperationMessages []ProfileMetadataProfileOperationMessage `xml:"operationMessages,omitempty"`
    +}
    +
    +func init() {
    +	t["ProfileMetadata"] = reflect.TypeOf((*ProfileMetadata)(nil)).Elem()
    +}
    +
    +type ProfileMetadataProfileOperationMessage struct {
    +	DynamicData
    +
    +	OperationName string             `xml:"operationName"`
    +	Message       LocalizableMessage `xml:"message"`
    +}
    +
    +func init() {
    +	t["ProfileMetadataProfileOperationMessage"] = reflect.TypeOf((*ProfileMetadataProfileOperationMessage)(nil)).Elem()
    +}
    +
    +type ProfileMetadataProfileSortSpec struct {
    +	DynamicData
    +
    +	PolicyId  string `xml:"policyId"`
    +	Parameter string `xml:"parameter"`
    +}
    +
    +func init() {
    +	t["ProfileMetadataProfileSortSpec"] = reflect.TypeOf((*ProfileMetadataProfileSortSpec)(nil)).Elem()
    +}
    +
    +type ProfileParameterMetadata struct {
    +	DynamicData
    +
    +	Id                 ExtendedElementDescription                          `xml:"id"`
    +	Type               string                                              `xml:"type"`
    +	Optional           bool                                                `xml:"optional"`
    +	DefaultValue       AnyType                                             `xml:"defaultValue,omitempty,typeattr"`
    +	Hidden             *bool                                               `xml:"hidden"`
    +	SecuritySensitive  *bool                                               `xml:"securitySensitive"`
    +	ReadOnly           *bool                                               `xml:"readOnly"`
    +	ParameterRelations []ProfileParameterMetadataParameterRelationMetadata `xml:"parameterRelations,omitempty"`
    +}
    +
    +func init() {
    +	t["ProfileParameterMetadata"] = reflect.TypeOf((*ProfileParameterMetadata)(nil)).Elem()
    +}
    +
    +type ProfileParameterMetadataParameterRelationMetadata struct {
    +	DynamicData
    +
    +	RelationTypes []string             `xml:"relationTypes,omitempty"`
    +	Values        []AnyType            `xml:"values,omitempty,typeattr"`
    +	Path          *ProfilePropertyPath `xml:"path,omitempty"`
    +	MinCount      int32                `xml:"minCount"`
    +	MaxCount      int32                `xml:"maxCount"`
    +}
    +
    +func init() {
    +	t["ProfileParameterMetadataParameterRelationMetadata"] = reflect.TypeOf((*ProfileParameterMetadataParameterRelationMetadata)(nil)).Elem()
    +}
    +
    +type ProfilePolicy struct {
    +	DynamicData
    +
    +	Id           string           `xml:"id"`
    +	PolicyOption BasePolicyOption `xml:"policyOption,typeattr"`
    +}
    +
    +func init() {
    +	t["ProfilePolicy"] = reflect.TypeOf((*ProfilePolicy)(nil)).Elem()
    +}
    +
    +type ProfilePolicyMetadata struct {
    +	DynamicData
    +
    +	Id             ExtendedElementDescription        `xml:"id"`
    +	PossibleOption []BaseProfilePolicyOptionMetadata `xml:"possibleOption,typeattr"`
    +}
    +
    +func init() {
    +	t["ProfilePolicyMetadata"] = reflect.TypeOf((*ProfilePolicyMetadata)(nil)).Elem()
    +}
    +
    +type ProfilePolicyOptionMetadata struct {
    +	DynamicData
    +
    +	Id        ExtendedElementDescription `xml:"id"`
    +	Parameter []ProfileParameterMetadata `xml:"parameter,omitempty"`
    +}
    +
    +func init() {
    +	t["ProfilePolicyOptionMetadata"] = reflect.TypeOf((*ProfilePolicyOptionMetadata)(nil)).Elem()
    +}
    +
    +type ProfileProfileStructure struct {
    +	DynamicData
    +
    +	ProfileTypeName string                            `xml:"profileTypeName"`
    +	Child           []ProfileProfileStructureProperty `xml:"child,omitempty"`
    +}
    +
    +func init() {
    +	t["ProfileProfileStructure"] = reflect.TypeOf((*ProfileProfileStructure)(nil)).Elem()
    +}
    +
    +type ProfileProfileStructureProperty struct {
    +	DynamicData
    +
    +	PropertyName string                  `xml:"propertyName"`
    +	Array        bool                    `xml:"array"`
    +	Element      ProfileProfileStructure `xml:"element"`
    +}
    +
    +func init() {
    +	t["ProfileProfileStructureProperty"] = reflect.TypeOf((*ProfileProfileStructureProperty)(nil)).Elem()
    +}
    +
    +type ProfilePropertyPath struct {
    +	DynamicData
    +
    +	ProfilePath    string `xml:"profilePath"`
    +	PolicyId       string `xml:"policyId,omitempty"`
    +	ParameterId    string `xml:"parameterId,omitempty"`
    +	PolicyOptionId string `xml:"policyOptionId,omitempty"`
    +}
    +
    +func init() {
    +	t["ProfilePropertyPath"] = reflect.TypeOf((*ProfilePropertyPath)(nil)).Elem()
    +}
    +
    +type ProfileReferenceHostChangedEvent struct {
    +	ProfileEvent
    +
    +	ReferenceHost         *ManagedObjectReference `xml:"referenceHost,omitempty"`
    +	ReferenceHostName     string                  `xml:"referenceHostName,omitempty"`
    +	PrevReferenceHostName string                  `xml:"prevReferenceHostName,omitempty"`
    +}
    +
    +func init() {
    +	t["ProfileReferenceHostChangedEvent"] = reflect.TypeOf((*ProfileReferenceHostChangedEvent)(nil)).Elem()
    +}
    +
    +type ProfileRemovedEvent struct {
    +	ProfileEvent
    +}
    +
    +func init() {
    +	t["ProfileRemovedEvent"] = reflect.TypeOf((*ProfileRemovedEvent)(nil)).Elem()
    +}
    +
    +type ProfileSerializedCreateSpec struct {
    +	ProfileCreateSpec
    +
    +	ProfileConfigString string `xml:"profileConfigString"`
    +}
    +
    +func init() {
    +	t["ProfileSerializedCreateSpec"] = reflect.TypeOf((*ProfileSerializedCreateSpec)(nil)).Elem()
    +}
    +
    +type ProfileSimpleExpression struct {
    +	ProfileExpression
    +
    +	ExpressionType string        `xml:"expressionType"`
    +	Parameter      []KeyAnyValue `xml:"parameter,omitempty"`
    +}
    +
    +func init() {
    +	t["ProfileSimpleExpression"] = reflect.TypeOf((*ProfileSimpleExpression)(nil)).Elem()
    +}
    +
    +type ProfileUpdateFailed struct {
    +	VimFault
    +
    +	Failure  []ProfileUpdateFailedUpdateFailure `xml:"failure"`
    +	Warnings []ProfileUpdateFailedUpdateFailure `xml:"warnings,omitempty"`
    +}
    +
    +func init() {
    +	t["ProfileUpdateFailed"] = reflect.TypeOf((*ProfileUpdateFailed)(nil)).Elem()
    +}
    +
    +type ProfileUpdateFailedFault ProfileUpdateFailed
    +
    +func init() {
    +	t["ProfileUpdateFailedFault"] = reflect.TypeOf((*ProfileUpdateFailedFault)(nil)).Elem()
    +}
    +
    +type ProfileUpdateFailedUpdateFailure struct {
    +	DynamicData
    +
    +	ProfilePath ProfilePropertyPath `xml:"profilePath"`
    +	ErrMsg      LocalizableMessage  `xml:"errMsg"`
    +}
    +
    +func init() {
    +	t["ProfileUpdateFailedUpdateFailure"] = reflect.TypeOf((*ProfileUpdateFailedUpdateFailure)(nil)).Elem()
    +}
    +
    +type PromoteDisksRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	Unlink bool                   `xml:"unlink"`
    +	Disks  []VirtualDisk          `xml:"disks,omitempty"`
    +}
    +
    +func init() {
    +	t["PromoteDisksRequestType"] = reflect.TypeOf((*PromoteDisksRequestType)(nil)).Elem()
    +}
    +
    +type PromoteDisks_Task PromoteDisksRequestType
    +
    +func init() {
    +	t["PromoteDisks_Task"] = reflect.TypeOf((*PromoteDisks_Task)(nil)).Elem()
    +}
    +
    +type PromoteDisks_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type PropertyChange struct {
    +	DynamicData
    +
    +	Name string           `xml:"name"`
    +	Op   PropertyChangeOp `xml:"op"`
    +	Val  AnyType          `xml:"val,typeattr"`
    +}
    +
    +func init() {
    +	t["PropertyChange"] = reflect.TypeOf((*PropertyChange)(nil)).Elem()
    +}
    +
    +type PropertyFilterSpec struct {
    +	DynamicData
    +
    +	PropSet                       []PropertySpec `xml:"propSet"`
    +	ObjectSet                     []ObjectSpec   `xml:"objectSet"`
    +	ReportMissingObjectsInResults *bool          `xml:"reportMissingObjectsInResults"`
    +}
    +
    +func init() {
    +	t["PropertyFilterSpec"] = reflect.TypeOf((*PropertyFilterSpec)(nil)).Elem()
    +}
    +
    +type PropertyFilterUpdate struct {
    +	DynamicData
    +
    +	Filter     ManagedObjectReference `xml:"filter"`
    +	ObjectSet  []ObjectUpdate         `xml:"objectSet,omitempty"`
    +	MissingSet []MissingObject        `xml:"missingSet,omitempty"`
    +}
    +
    +func init() {
    +	t["PropertyFilterUpdate"] = reflect.TypeOf((*PropertyFilterUpdate)(nil)).Elem()
    +}
    +
    +type PropertySpec struct {
    +	DynamicData
    +
    +	Type    string   `xml:"type"`
    +	All     *bool    `xml:"all"`
    +	PathSet []string `xml:"pathSet,omitempty"`
    +}
    +
    +func init() {
    +	t["PropertySpec"] = reflect.TypeOf((*PropertySpec)(nil)).Elem()
    +}
    +
    +type PutUsbScanCodes PutUsbScanCodesRequestType
    +
    +func init() {
    +	t["PutUsbScanCodes"] = reflect.TypeOf((*PutUsbScanCodes)(nil)).Elem()
    +}
    +
    +type PutUsbScanCodesRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Spec UsbScanCodeSpec        `xml:"spec"`
    +}
    +
    +func init() {
    +	t["PutUsbScanCodesRequestType"] = reflect.TypeOf((*PutUsbScanCodesRequestType)(nil)).Elem()
    +}
    +
    +type PutUsbScanCodesResponse struct {
    +	Returnval int32 `xml:"returnval"`
    +}
    +
    +type QuarantineModeFault struct {
    +	VmConfigFault
    +
    +	VmName    string `xml:"vmName"`
    +	FaultType string `xml:"faultType"`
    +}
    +
    +func init() {
    +	t["QuarantineModeFault"] = reflect.TypeOf((*QuarantineModeFault)(nil)).Elem()
    +}
    +
    +type QuarantineModeFaultFault QuarantineModeFault
    +
    +func init() {
    +	t["QuarantineModeFaultFault"] = reflect.TypeOf((*QuarantineModeFaultFault)(nil)).Elem()
    +}
    +
    +type QueryAnswerFileStatus QueryAnswerFileStatusRequestType
    +
    +func init() {
    +	t["QueryAnswerFileStatus"] = reflect.TypeOf((*QueryAnswerFileStatus)(nil)).Elem()
    +}
    +
    +type QueryAnswerFileStatusRequestType struct {
    +	This ManagedObjectReference   `xml:"_this"`
    +	Host []ManagedObjectReference `xml:"host"`
    +}
    +
    +func init() {
    +	t["QueryAnswerFileStatusRequestType"] = reflect.TypeOf((*QueryAnswerFileStatusRequestType)(nil)).Elem()
    +}
    +
    +type QueryAnswerFileStatusResponse struct {
    +	Returnval []AnswerFileStatusResult `xml:"returnval,omitempty"`
    +}
    +
    +type QueryAssignedLicenses QueryAssignedLicensesRequestType
    +
    +func init() {
    +	t["QueryAssignedLicenses"] = reflect.TypeOf((*QueryAssignedLicenses)(nil)).Elem()
    +}
    +
    +type QueryAssignedLicensesRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	EntityId string                 `xml:"entityId,omitempty"`
    +}
    +
    +func init() {
    +	t["QueryAssignedLicensesRequestType"] = reflect.TypeOf((*QueryAssignedLicensesRequestType)(nil)).Elem()
    +}
    +
    +type QueryAssignedLicensesResponse struct {
    +	Returnval []LicenseAssignmentManagerLicenseAssignment `xml:"returnval,omitempty"`
    +}
    +
    +type QueryAvailableDisksForVmfs QueryAvailableDisksForVmfsRequestType
    +
    +func init() {
    +	t["QueryAvailableDisksForVmfs"] = reflect.TypeOf((*QueryAvailableDisksForVmfs)(nil)).Elem()
    +}
    +
    +type QueryAvailableDisksForVmfsRequestType struct {
    +	This      ManagedObjectReference  `xml:"_this"`
    +	Datastore *ManagedObjectReference `xml:"datastore,omitempty"`
    +}
    +
    +func init() {
    +	t["QueryAvailableDisksForVmfsRequestType"] = reflect.TypeOf((*QueryAvailableDisksForVmfsRequestType)(nil)).Elem()
    +}
    +
    +type QueryAvailableDisksForVmfsResponse struct {
    +	Returnval []HostScsiDisk `xml:"returnval,omitempty"`
    +}
    +
    +type QueryAvailableDvsSpec QueryAvailableDvsSpecRequestType
    +
    +func init() {
    +	t["QueryAvailableDvsSpec"] = reflect.TypeOf((*QueryAvailableDvsSpec)(nil)).Elem()
    +}
    +
    +type QueryAvailableDvsSpecRequestType struct {
    +	This        ManagedObjectReference `xml:"_this"`
    +	Recommended *bool                  `xml:"recommended"`
    +}
    +
    +func init() {
    +	t["QueryAvailableDvsSpecRequestType"] = reflect.TypeOf((*QueryAvailableDvsSpecRequestType)(nil)).Elem()
    +}
    +
    +type QueryAvailableDvsSpecResponse struct {
    +	Returnval []DistributedVirtualSwitchProductSpec `xml:"returnval,omitempty"`
    +}
    +
    +type QueryAvailablePartition QueryAvailablePartitionRequestType
    +
    +func init() {
    +	t["QueryAvailablePartition"] = reflect.TypeOf((*QueryAvailablePartition)(nil)).Elem()
    +}
    +
    +type QueryAvailablePartitionRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["QueryAvailablePartitionRequestType"] = reflect.TypeOf((*QueryAvailablePartitionRequestType)(nil)).Elem()
    +}
    +
    +type QueryAvailablePartitionResponse struct {
    +	Returnval []HostDiagnosticPartition `xml:"returnval,omitempty"`
    +}
    +
    +type QueryAvailablePerfMetric QueryAvailablePerfMetricRequestType
    +
    +func init() {
    +	t["QueryAvailablePerfMetric"] = reflect.TypeOf((*QueryAvailablePerfMetric)(nil)).Elem()
    +}
    +
    +type QueryAvailablePerfMetricRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	Entity     ManagedObjectReference `xml:"entity"`
    +	BeginTime  *time.Time             `xml:"beginTime"`
    +	EndTime    *time.Time             `xml:"endTime"`
    +	IntervalId int32                  `xml:"intervalId,omitempty"`
    +}
    +
    +func init() {
    +	t["QueryAvailablePerfMetricRequestType"] = reflect.TypeOf((*QueryAvailablePerfMetricRequestType)(nil)).Elem()
    +}
    +
    +type QueryAvailablePerfMetricResponse struct {
    +	Returnval []PerfMetricId `xml:"returnval,omitempty"`
    +}
    +
    +type QueryAvailableSsds QueryAvailableSsdsRequestType
    +
    +func init() {
    +	t["QueryAvailableSsds"] = reflect.TypeOf((*QueryAvailableSsds)(nil)).Elem()
    +}
    +
    +type QueryAvailableSsdsRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	VffsPath string                 `xml:"vffsPath,omitempty"`
    +}
    +
    +func init() {
    +	t["QueryAvailableSsdsRequestType"] = reflect.TypeOf((*QueryAvailableSsdsRequestType)(nil)).Elem()
    +}
    +
    +type QueryAvailableSsdsResponse struct {
    +	Returnval []HostScsiDisk `xml:"returnval,omitempty"`
    +}
    +
    +type QueryAvailableTimeZones QueryAvailableTimeZonesRequestType
    +
    +func init() {
    +	t["QueryAvailableTimeZones"] = reflect.TypeOf((*QueryAvailableTimeZones)(nil)).Elem()
    +}
    +
    +type QueryAvailableTimeZonesRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["QueryAvailableTimeZonesRequestType"] = reflect.TypeOf((*QueryAvailableTimeZonesRequestType)(nil)).Elem()
    +}
    +
    +type QueryAvailableTimeZonesResponse struct {
    +	Returnval []HostDateTimeSystemTimeZone `xml:"returnval,omitempty"`
    +}
    +
    +type QueryBootDevices QueryBootDevicesRequestType
    +
    +func init() {
    +	t["QueryBootDevices"] = reflect.TypeOf((*QueryBootDevices)(nil)).Elem()
    +}
    +
    +type QueryBootDevicesRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["QueryBootDevicesRequestType"] = reflect.TypeOf((*QueryBootDevicesRequestType)(nil)).Elem()
    +}
    +
    +type QueryBootDevicesResponse struct {
    +	Returnval *HostBootDeviceInfo `xml:"returnval,omitempty"`
    +}
    +
    +type QueryBoundVnics QueryBoundVnicsRequestType
    +
    +func init() {
    +	t["QueryBoundVnics"] = reflect.TypeOf((*QueryBoundVnics)(nil)).Elem()
    +}
    +
    +type QueryBoundVnicsRequestType struct {
    +	This         ManagedObjectReference `xml:"_this"`
    +	IScsiHbaName string                 `xml:"iScsiHbaName"`
    +}
    +
    +func init() {
    +	t["QueryBoundVnicsRequestType"] = reflect.TypeOf((*QueryBoundVnicsRequestType)(nil)).Elem()
    +}
    +
    +type QueryBoundVnicsResponse struct {
    +	Returnval []IscsiPortInfo `xml:"returnval,omitempty"`
    +}
    +
    +type QueryCandidateNics QueryCandidateNicsRequestType
    +
    +func init() {
    +	t["QueryCandidateNics"] = reflect.TypeOf((*QueryCandidateNics)(nil)).Elem()
    +}
    +
    +type QueryCandidateNicsRequestType struct {
    +	This         ManagedObjectReference `xml:"_this"`
    +	IScsiHbaName string                 `xml:"iScsiHbaName"`
    +}
    +
    +func init() {
    +	t["QueryCandidateNicsRequestType"] = reflect.TypeOf((*QueryCandidateNicsRequestType)(nil)).Elem()
    +}
    +
    +type QueryCandidateNicsResponse struct {
    +	Returnval []IscsiPortInfo `xml:"returnval,omitempty"`
    +}
    +
    +type QueryChangedDiskAreas QueryChangedDiskAreasRequestType
    +
    +func init() {
    +	t["QueryChangedDiskAreas"] = reflect.TypeOf((*QueryChangedDiskAreas)(nil)).Elem()
    +}
    +
    +type QueryChangedDiskAreasRequestType struct {
    +	This        ManagedObjectReference  `xml:"_this"`
    +	Snapshot    *ManagedObjectReference `xml:"snapshot,omitempty"`
    +	DeviceKey   int32                   `xml:"deviceKey"`
    +	StartOffset int64                   `xml:"startOffset"`
    +	ChangeId    string                  `xml:"changeId"`
    +}
    +
    +func init() {
    +	t["QueryChangedDiskAreasRequestType"] = reflect.TypeOf((*QueryChangedDiskAreasRequestType)(nil)).Elem()
    +}
    +
    +type QueryChangedDiskAreasResponse struct {
    +	Returnval DiskChangeInfo `xml:"returnval"`
    +}
    +
    +type QueryCmmds QueryCmmdsRequestType
    +
    +func init() {
    +	t["QueryCmmds"] = reflect.TypeOf((*QueryCmmds)(nil)).Elem()
    +}
    +
    +type QueryCmmdsRequestType struct {
    +	This    ManagedObjectReference             `xml:"_this"`
    +	Queries []HostVsanInternalSystemCmmdsQuery `xml:"queries"`
    +}
    +
    +func init() {
    +	t["QueryCmmdsRequestType"] = reflect.TypeOf((*QueryCmmdsRequestType)(nil)).Elem()
    +}
    +
    +type QueryCmmdsResponse struct {
    +	Returnval string `xml:"returnval"`
    +}
    +
    +type QueryCompatibleHostForExistingDvs QueryCompatibleHostForExistingDvsRequestType
    +
    +func init() {
    +	t["QueryCompatibleHostForExistingDvs"] = reflect.TypeOf((*QueryCompatibleHostForExistingDvs)(nil)).Elem()
    +}
    +
    +type QueryCompatibleHostForExistingDvsRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	Container ManagedObjectReference `xml:"container"`
    +	Recursive bool                   `xml:"recursive"`
    +	Dvs       ManagedObjectReference `xml:"dvs"`
    +}
    +
    +func init() {
    +	t["QueryCompatibleHostForExistingDvsRequestType"] = reflect.TypeOf((*QueryCompatibleHostForExistingDvsRequestType)(nil)).Elem()
    +}
    +
    +type QueryCompatibleHostForExistingDvsResponse struct {
    +	Returnval []ManagedObjectReference `xml:"returnval,omitempty"`
    +}
    +
    +type QueryCompatibleHostForNewDvs QueryCompatibleHostForNewDvsRequestType
    +
    +func init() {
    +	t["QueryCompatibleHostForNewDvs"] = reflect.TypeOf((*QueryCompatibleHostForNewDvs)(nil)).Elem()
    +}
    +
    +type QueryCompatibleHostForNewDvsRequestType struct {
    +	This              ManagedObjectReference               `xml:"_this"`
    +	Container         ManagedObjectReference               `xml:"container"`
    +	Recursive         bool                                 `xml:"recursive"`
    +	SwitchProductSpec *DistributedVirtualSwitchProductSpec `xml:"switchProductSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["QueryCompatibleHostForNewDvsRequestType"] = reflect.TypeOf((*QueryCompatibleHostForNewDvsRequestType)(nil)).Elem()
    +}
    +
    +type QueryCompatibleHostForNewDvsResponse struct {
    +	Returnval []ManagedObjectReference `xml:"returnval,omitempty"`
    +}
    +
    +type QueryComplianceStatus QueryComplianceStatusRequestType
    +
    +func init() {
    +	t["QueryComplianceStatus"] = reflect.TypeOf((*QueryComplianceStatus)(nil)).Elem()
    +}
    +
    +type QueryComplianceStatusRequestType struct {
    +	This    ManagedObjectReference   `xml:"_this"`
    +	Profile []ManagedObjectReference `xml:"profile,omitempty"`
    +	Entity  []ManagedObjectReference `xml:"entity,omitempty"`
    +}
    +
    +func init() {
    +	t["QueryComplianceStatusRequestType"] = reflect.TypeOf((*QueryComplianceStatusRequestType)(nil)).Elem()
    +}
    +
    +type QueryComplianceStatusResponse struct {
    +	Returnval []ComplianceResult `xml:"returnval,omitempty"`
    +}
    +
    +type QueryConfigOption QueryConfigOptionRequestType
    +
    +func init() {
    +	t["QueryConfigOption"] = reflect.TypeOf((*QueryConfigOption)(nil)).Elem()
    +}
    +
    +type QueryConfigOptionDescriptor QueryConfigOptionDescriptorRequestType
    +
    +func init() {
    +	t["QueryConfigOptionDescriptor"] = reflect.TypeOf((*QueryConfigOptionDescriptor)(nil)).Elem()
    +}
    +
    +type QueryConfigOptionDescriptorRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["QueryConfigOptionDescriptorRequestType"] = reflect.TypeOf((*QueryConfigOptionDescriptorRequestType)(nil)).Elem()
    +}
    +
    +type QueryConfigOptionDescriptorResponse struct {
    +	Returnval []VirtualMachineConfigOptionDescriptor `xml:"returnval,omitempty"`
    +}
    +
    +type QueryConfigOptionEx QueryConfigOptionExRequestType
    +
    +func init() {
    +	t["QueryConfigOptionEx"] = reflect.TypeOf((*QueryConfigOptionEx)(nil)).Elem()
    +}
    +
    +type QueryConfigOptionExRequestType struct {
    +	This ManagedObjectReference                   `xml:"_this"`
    +	Spec *EnvironmentBrowserConfigOptionQuerySpec `xml:"spec,omitempty"`
    +}
    +
    +func init() {
    +	t["QueryConfigOptionExRequestType"] = reflect.TypeOf((*QueryConfigOptionExRequestType)(nil)).Elem()
    +}
    +
    +type QueryConfigOptionExResponse struct {
    +	Returnval *VirtualMachineConfigOption `xml:"returnval,omitempty"`
    +}
    +
    +type QueryConfigOptionRequestType struct {
    +	This ManagedObjectReference  `xml:"_this"`
    +	Key  string                  `xml:"key,omitempty"`
    +	Host *ManagedObjectReference `xml:"host,omitempty"`
    +}
    +
    +func init() {
    +	t["QueryConfigOptionRequestType"] = reflect.TypeOf((*QueryConfigOptionRequestType)(nil)).Elem()
    +}
    +
    +type QueryConfigOptionResponse struct {
    +	Returnval *VirtualMachineConfigOption `xml:"returnval,omitempty"`
    +}
    +
    +type QueryConfigTarget QueryConfigTargetRequestType
    +
    +func init() {
    +	t["QueryConfigTarget"] = reflect.TypeOf((*QueryConfigTarget)(nil)).Elem()
    +}
    +
    +type QueryConfigTargetRequestType struct {
    +	This ManagedObjectReference  `xml:"_this"`
    +	Host *ManagedObjectReference `xml:"host,omitempty"`
    +}
    +
    +func init() {
    +	t["QueryConfigTargetRequestType"] = reflect.TypeOf((*QueryConfigTargetRequestType)(nil)).Elem()
    +}
    +
    +type QueryConfigTargetResponse struct {
    +	Returnval *ConfigTarget `xml:"returnval,omitempty"`
    +}
    +
    +type QueryConfiguredModuleOptionString QueryConfiguredModuleOptionStringRequestType
    +
    +func init() {
    +	t["QueryConfiguredModuleOptionString"] = reflect.TypeOf((*QueryConfiguredModuleOptionString)(nil)).Elem()
    +}
    +
    +type QueryConfiguredModuleOptionStringRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Name string                 `xml:"name"`
    +}
    +
    +func init() {
    +	t["QueryConfiguredModuleOptionStringRequestType"] = reflect.TypeOf((*QueryConfiguredModuleOptionStringRequestType)(nil)).Elem()
    +}
    +
    +type QueryConfiguredModuleOptionStringResponse struct {
    +	Returnval string `xml:"returnval"`
    +}
    +
    +type QueryConnectionInfo QueryConnectionInfoRequestType
    +
    +func init() {
    +	t["QueryConnectionInfo"] = reflect.TypeOf((*QueryConnectionInfo)(nil)).Elem()
    +}
    +
    +type QueryConnectionInfoRequestType struct {
    +	This          ManagedObjectReference `xml:"_this"`
    +	Hostname      string                 `xml:"hostname"`
    +	Port          int32                  `xml:"port"`
    +	Username      string                 `xml:"username"`
    +	Password      string                 `xml:"password"`
    +	SslThumbprint string                 `xml:"sslThumbprint,omitempty"`
    +}
    +
    +func init() {
    +	t["QueryConnectionInfoRequestType"] = reflect.TypeOf((*QueryConnectionInfoRequestType)(nil)).Elem()
    +}
    +
    +type QueryConnectionInfoResponse struct {
    +	Returnval HostConnectInfo `xml:"returnval"`
    +}
    +
    +type QueryConnectionInfoViaSpec QueryConnectionInfoViaSpecRequestType
    +
    +func init() {
    +	t["QueryConnectionInfoViaSpec"] = reflect.TypeOf((*QueryConnectionInfoViaSpec)(nil)).Elem()
    +}
    +
    +type QueryConnectionInfoViaSpecRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Spec HostConnectSpec        `xml:"spec"`
    +}
    +
    +func init() {
    +	t["QueryConnectionInfoViaSpecRequestType"] = reflect.TypeOf((*QueryConnectionInfoViaSpecRequestType)(nil)).Elem()
    +}
    +
    +type QueryConnectionInfoViaSpecResponse struct {
    +	Returnval HostConnectInfo `xml:"returnval"`
    +}
    +
    +type QueryDatastorePerformanceSummary QueryDatastorePerformanceSummaryRequestType
    +
    +func init() {
    +	t["QueryDatastorePerformanceSummary"] = reflect.TypeOf((*QueryDatastorePerformanceSummary)(nil)).Elem()
    +}
    +
    +type QueryDatastorePerformanceSummaryRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	Datastore ManagedObjectReference `xml:"datastore"`
    +}
    +
    +func init() {
    +	t["QueryDatastorePerformanceSummaryRequestType"] = reflect.TypeOf((*QueryDatastorePerformanceSummaryRequestType)(nil)).Elem()
    +}
    +
    +type QueryDatastorePerformanceSummaryResponse struct {
    +	Returnval []StoragePerformanceSummary `xml:"returnval,omitempty"`
    +}
    +
    +type QueryDateTime QueryDateTimeRequestType
    +
    +func init() {
    +	t["QueryDateTime"] = reflect.TypeOf((*QueryDateTime)(nil)).Elem()
    +}
    +
    +type QueryDateTimeRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["QueryDateTimeRequestType"] = reflect.TypeOf((*QueryDateTimeRequestType)(nil)).Elem()
    +}
    +
    +type QueryDateTimeResponse struct {
    +	Returnval time.Time `xml:"returnval"`
    +}
    +
    +type QueryDescriptions QueryDescriptionsRequestType
    +
    +func init() {
    +	t["QueryDescriptions"] = reflect.TypeOf((*QueryDescriptions)(nil)).Elem()
    +}
    +
    +type QueryDescriptionsRequestType struct {
    +	This ManagedObjectReference  `xml:"_this"`
    +	Host *ManagedObjectReference `xml:"host,omitempty"`
    +}
    +
    +func init() {
    +	t["QueryDescriptionsRequestType"] = reflect.TypeOf((*QueryDescriptionsRequestType)(nil)).Elem()
    +}
    +
    +type QueryDescriptionsResponse struct {
    +	Returnval []DiagnosticManagerLogDescriptor `xml:"returnval,omitempty"`
    +}
    +
    +type QueryDisksForVsan QueryDisksForVsanRequestType
    +
    +func init() {
    +	t["QueryDisksForVsan"] = reflect.TypeOf((*QueryDisksForVsan)(nil)).Elem()
    +}
    +
    +type QueryDisksForVsanRequestType struct {
    +	This          ManagedObjectReference `xml:"_this"`
    +	CanonicalName []string               `xml:"canonicalName,omitempty"`
    +}
    +
    +func init() {
    +	t["QueryDisksForVsanRequestType"] = reflect.TypeOf((*QueryDisksForVsanRequestType)(nil)).Elem()
    +}
    +
    +type QueryDisksForVsanResponse struct {
    +	Returnval []VsanHostDiskResult `xml:"returnval,omitempty"`
    +}
    +
    +type QueryDisksUsingFilter QueryDisksUsingFilterRequestType
    +
    +func init() {
    +	t["QueryDisksUsingFilter"] = reflect.TypeOf((*QueryDisksUsingFilter)(nil)).Elem()
    +}
    +
    +type QueryDisksUsingFilterRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	FilterId string                 `xml:"filterId"`
    +	CompRes  ManagedObjectReference `xml:"compRes"`
    +}
    +
    +func init() {
    +	t["QueryDisksUsingFilterRequestType"] = reflect.TypeOf((*QueryDisksUsingFilterRequestType)(nil)).Elem()
    +}
    +
    +type QueryDisksUsingFilterResponse struct {
    +	Returnval []VirtualDiskId `xml:"returnval"`
    +}
    +
    +type QueryDvsByUuid QueryDvsByUuidRequestType
    +
    +func init() {
    +	t["QueryDvsByUuid"] = reflect.TypeOf((*QueryDvsByUuid)(nil)).Elem()
    +}
    +
    +type QueryDvsByUuidRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Uuid string                 `xml:"uuid"`
    +}
    +
    +func init() {
    +	t["QueryDvsByUuidRequestType"] = reflect.TypeOf((*QueryDvsByUuidRequestType)(nil)).Elem()
    +}
    +
    +type QueryDvsByUuidResponse struct {
    +	Returnval *ManagedObjectReference `xml:"returnval,omitempty"`
    +}
    +
    +type QueryDvsCheckCompatibility QueryDvsCheckCompatibilityRequestType
    +
    +func init() {
    +	t["QueryDvsCheckCompatibility"] = reflect.TypeOf((*QueryDvsCheckCompatibility)(nil)).Elem()
    +}
    +
    +type QueryDvsCheckCompatibilityRequestType struct {
    +	This           ManagedObjectReference                                 `xml:"_this"`
    +	HostContainer  DistributedVirtualSwitchManagerHostContainer           `xml:"hostContainer"`
    +	DvsProductSpec *DistributedVirtualSwitchManagerDvsProductSpec         `xml:"dvsProductSpec,omitempty"`
    +	HostFilterSpec []BaseDistributedVirtualSwitchManagerHostDvsFilterSpec `xml:"hostFilterSpec,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["QueryDvsCheckCompatibilityRequestType"] = reflect.TypeOf((*QueryDvsCheckCompatibilityRequestType)(nil)).Elem()
    +}
    +
    +type QueryDvsCheckCompatibilityResponse struct {
    +	Returnval []DistributedVirtualSwitchManagerCompatibilityResult `xml:"returnval,omitempty"`
    +}
    +
    +type QueryDvsCompatibleHostSpec QueryDvsCompatibleHostSpecRequestType
    +
    +func init() {
    +	t["QueryDvsCompatibleHostSpec"] = reflect.TypeOf((*QueryDvsCompatibleHostSpec)(nil)).Elem()
    +}
    +
    +type QueryDvsCompatibleHostSpecRequestType struct {
    +	This              ManagedObjectReference               `xml:"_this"`
    +	SwitchProductSpec *DistributedVirtualSwitchProductSpec `xml:"switchProductSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["QueryDvsCompatibleHostSpecRequestType"] = reflect.TypeOf((*QueryDvsCompatibleHostSpecRequestType)(nil)).Elem()
    +}
    +
    +type QueryDvsCompatibleHostSpecResponse struct {
    +	Returnval []DistributedVirtualSwitchHostProductSpec `xml:"returnval,omitempty"`
    +}
    +
    +type QueryDvsConfigTarget QueryDvsConfigTargetRequestType
    +
    +func init() {
    +	t["QueryDvsConfigTarget"] = reflect.TypeOf((*QueryDvsConfigTarget)(nil)).Elem()
    +}
    +
    +type QueryDvsConfigTargetRequestType struct {
    +	This ManagedObjectReference  `xml:"_this"`
    +	Host *ManagedObjectReference `xml:"host,omitempty"`
    +	Dvs  *ManagedObjectReference `xml:"dvs,omitempty"`
    +}
    +
    +func init() {
    +	t["QueryDvsConfigTargetRequestType"] = reflect.TypeOf((*QueryDvsConfigTargetRequestType)(nil)).Elem()
    +}
    +
    +type QueryDvsConfigTargetResponse struct {
    +	Returnval DVSManagerDvsConfigTarget `xml:"returnval"`
    +}
    +
    +type QueryDvsFeatureCapability QueryDvsFeatureCapabilityRequestType
    +
    +func init() {
    +	t["QueryDvsFeatureCapability"] = reflect.TypeOf((*QueryDvsFeatureCapability)(nil)).Elem()
    +}
    +
    +type QueryDvsFeatureCapabilityRequestType struct {
    +	This              ManagedObjectReference               `xml:"_this"`
    +	SwitchProductSpec *DistributedVirtualSwitchProductSpec `xml:"switchProductSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["QueryDvsFeatureCapabilityRequestType"] = reflect.TypeOf((*QueryDvsFeatureCapabilityRequestType)(nil)).Elem()
    +}
    +
    +type QueryDvsFeatureCapabilityResponse struct {
    +	Returnval BaseDVSFeatureCapability `xml:"returnval,omitempty,typeattr"`
    +}
    +
    +type QueryEvents QueryEventsRequestType
    +
    +func init() {
    +	t["QueryEvents"] = reflect.TypeOf((*QueryEvents)(nil)).Elem()
    +}
    +
    +type QueryEventsRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	Filter EventFilterSpec        `xml:"filter"`
    +}
    +
    +func init() {
    +	t["QueryEventsRequestType"] = reflect.TypeOf((*QueryEventsRequestType)(nil)).Elem()
    +}
    +
    +type QueryEventsResponse struct {
    +	Returnval []BaseEvent `xml:"returnval,omitempty,typeattr"`
    +}
    +
    +type QueryExpressionMetadata QueryExpressionMetadataRequestType
    +
    +func init() {
    +	t["QueryExpressionMetadata"] = reflect.TypeOf((*QueryExpressionMetadata)(nil)).Elem()
    +}
    +
    +type QueryExpressionMetadataRequestType struct {
    +	This           ManagedObjectReference  `xml:"_this"`
    +	ExpressionName []string                `xml:"expressionName,omitempty"`
    +	Profile        *ManagedObjectReference `xml:"profile,omitempty"`
    +}
    +
    +func init() {
    +	t["QueryExpressionMetadataRequestType"] = reflect.TypeOf((*QueryExpressionMetadataRequestType)(nil)).Elem()
    +}
    +
    +type QueryExpressionMetadataResponse struct {
    +	Returnval []ProfileExpressionMetadata `xml:"returnval,omitempty"`
    +}
    +
    +type QueryExtensionIpAllocationUsage QueryExtensionIpAllocationUsageRequestType
    +
    +func init() {
    +	t["QueryExtensionIpAllocationUsage"] = reflect.TypeOf((*QueryExtensionIpAllocationUsage)(nil)).Elem()
    +}
    +
    +type QueryExtensionIpAllocationUsageRequestType struct {
    +	This          ManagedObjectReference `xml:"_this"`
    +	ExtensionKeys []string               `xml:"extensionKeys,omitempty"`
    +}
    +
    +func init() {
    +	t["QueryExtensionIpAllocationUsageRequestType"] = reflect.TypeOf((*QueryExtensionIpAllocationUsageRequestType)(nil)).Elem()
    +}
    +
    +type QueryExtensionIpAllocationUsageResponse struct {
    +	Returnval []ExtensionManagerIpAllocationUsage `xml:"returnval,omitempty"`
    +}
    +
    +type QueryFaultToleranceCompatibility QueryFaultToleranceCompatibilityRequestType
    +
    +func init() {
    +	t["QueryFaultToleranceCompatibility"] = reflect.TypeOf((*QueryFaultToleranceCompatibility)(nil)).Elem()
    +}
    +
    +type QueryFaultToleranceCompatibilityEx QueryFaultToleranceCompatibilityExRequestType
    +
    +func init() {
    +	t["QueryFaultToleranceCompatibilityEx"] = reflect.TypeOf((*QueryFaultToleranceCompatibilityEx)(nil)).Elem()
    +}
    +
    +type QueryFaultToleranceCompatibilityExRequestType struct {
    +	This        ManagedObjectReference `xml:"_this"`
    +	ForLegacyFt *bool                  `xml:"forLegacyFt"`
    +}
    +
    +func init() {
    +	t["QueryFaultToleranceCompatibilityExRequestType"] = reflect.TypeOf((*QueryFaultToleranceCompatibilityExRequestType)(nil)).Elem()
    +}
    +
    +type QueryFaultToleranceCompatibilityExResponse struct {
    +	Returnval []LocalizedMethodFault `xml:"returnval,omitempty"`
    +}
    +
    +type QueryFaultToleranceCompatibilityRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["QueryFaultToleranceCompatibilityRequestType"] = reflect.TypeOf((*QueryFaultToleranceCompatibilityRequestType)(nil)).Elem()
    +}
    +
    +type QueryFaultToleranceCompatibilityResponse struct {
    +	Returnval []LocalizedMethodFault `xml:"returnval,omitempty"`
    +}
    +
    +type QueryFilterEntities QueryFilterEntitiesRequestType
    +
    +func init() {
    +	t["QueryFilterEntities"] = reflect.TypeOf((*QueryFilterEntities)(nil)).Elem()
    +}
    +
    +type QueryFilterEntitiesRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	FilterId string                 `xml:"filterId"`
    +}
    +
    +func init() {
    +	t["QueryFilterEntitiesRequestType"] = reflect.TypeOf((*QueryFilterEntitiesRequestType)(nil)).Elem()
    +}
    +
    +type QueryFilterEntitiesResponse struct {
    +	Returnval []ManagedObjectReference `xml:"returnval,omitempty"`
    +}
    +
    +type QueryFilterInfoIds QueryFilterInfoIdsRequestType
    +
    +func init() {
    +	t["QueryFilterInfoIds"] = reflect.TypeOf((*QueryFilterInfoIds)(nil)).Elem()
    +}
    +
    +type QueryFilterInfoIdsRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	FilterId string                 `xml:"filterId"`
    +}
    +
    +func init() {
    +	t["QueryFilterInfoIdsRequestType"] = reflect.TypeOf((*QueryFilterInfoIdsRequestType)(nil)).Elem()
    +}
    +
    +type QueryFilterInfoIdsResponse struct {
    +	Returnval []string `xml:"returnval,omitempty"`
    +}
    +
    +type QueryFilterList QueryFilterListRequestType
    +
    +func init() {
    +	t["QueryFilterList"] = reflect.TypeOf((*QueryFilterList)(nil)).Elem()
    +}
    +
    +type QueryFilterListRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	ProviderId string                 `xml:"providerId"`
    +}
    +
    +func init() {
    +	t["QueryFilterListRequestType"] = reflect.TypeOf((*QueryFilterListRequestType)(nil)).Elem()
    +}
    +
    +type QueryFilterListResponse struct {
    +	Returnval []string `xml:"returnval,omitempty"`
    +}
    +
    +type QueryFilterName QueryFilterNameRequestType
    +
    +func init() {
    +	t["QueryFilterName"] = reflect.TypeOf((*QueryFilterName)(nil)).Elem()
    +}
    +
    +type QueryFilterNameRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	FilterId string                 `xml:"filterId"`
    +}
    +
    +func init() {
    +	t["QueryFilterNameRequestType"] = reflect.TypeOf((*QueryFilterNameRequestType)(nil)).Elem()
    +}
    +
    +type QueryFilterNameResponse struct {
    +	Returnval string `xml:"returnval"`
    +}
    +
    +type QueryFirmwareConfigUploadURL QueryFirmwareConfigUploadURLRequestType
    +
    +func init() {
    +	t["QueryFirmwareConfigUploadURL"] = reflect.TypeOf((*QueryFirmwareConfigUploadURL)(nil)).Elem()
    +}
    +
    +type QueryFirmwareConfigUploadURLRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["QueryFirmwareConfigUploadURLRequestType"] = reflect.TypeOf((*QueryFirmwareConfigUploadURLRequestType)(nil)).Elem()
    +}
    +
    +type QueryFirmwareConfigUploadURLResponse struct {
    +	Returnval string `xml:"returnval"`
    +}
    +
    +type QueryHealthUpdateInfos QueryHealthUpdateInfosRequestType
    +
    +func init() {
    +	t["QueryHealthUpdateInfos"] = reflect.TypeOf((*QueryHealthUpdateInfos)(nil)).Elem()
    +}
    +
    +type QueryHealthUpdateInfosRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	ProviderId string                 `xml:"providerId"`
    +}
    +
    +func init() {
    +	t["QueryHealthUpdateInfosRequestType"] = reflect.TypeOf((*QueryHealthUpdateInfosRequestType)(nil)).Elem()
    +}
    +
    +type QueryHealthUpdateInfosResponse struct {
    +	Returnval []HealthUpdateInfo `xml:"returnval,omitempty"`
    +}
    +
    +type QueryHealthUpdates QueryHealthUpdatesRequestType
    +
    +func init() {
    +	t["QueryHealthUpdates"] = reflect.TypeOf((*QueryHealthUpdates)(nil)).Elem()
    +}
    +
    +type QueryHealthUpdatesRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	ProviderId string                 `xml:"providerId"`
    +}
    +
    +func init() {
    +	t["QueryHealthUpdatesRequestType"] = reflect.TypeOf((*QueryHealthUpdatesRequestType)(nil)).Elem()
    +}
    +
    +type QueryHealthUpdatesResponse struct {
    +	Returnval []HealthUpdate `xml:"returnval,omitempty"`
    +}
    +
    +type QueryHostConnectionInfo QueryHostConnectionInfoRequestType
    +
    +func init() {
    +	t["QueryHostConnectionInfo"] = reflect.TypeOf((*QueryHostConnectionInfo)(nil)).Elem()
    +}
    +
    +type QueryHostConnectionInfoRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["QueryHostConnectionInfoRequestType"] = reflect.TypeOf((*QueryHostConnectionInfoRequestType)(nil)).Elem()
    +}
    +
    +type QueryHostConnectionInfoResponse struct {
    +	Returnval HostConnectInfo `xml:"returnval"`
    +}
    +
    +type QueryHostPatchRequestType struct {
    +	This ManagedObjectReference                     `xml:"_this"`
    +	Spec *HostPatchManagerPatchManagerOperationSpec `xml:"spec,omitempty"`
    +}
    +
    +func init() {
    +	t["QueryHostPatchRequestType"] = reflect.TypeOf((*QueryHostPatchRequestType)(nil)).Elem()
    +}
    +
    +type QueryHostPatch_Task QueryHostPatchRequestType
    +
    +func init() {
    +	t["QueryHostPatch_Task"] = reflect.TypeOf((*QueryHostPatch_Task)(nil)).Elem()
    +}
    +
    +type QueryHostPatch_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type QueryHostProfileMetadata QueryHostProfileMetadataRequestType
    +
    +func init() {
    +	t["QueryHostProfileMetadata"] = reflect.TypeOf((*QueryHostProfileMetadata)(nil)).Elem()
    +}
    +
    +type QueryHostProfileMetadataRequestType struct {
    +	This        ManagedObjectReference  `xml:"_this"`
    +	ProfileName []string                `xml:"profileName,omitempty"`
    +	Profile     *ManagedObjectReference `xml:"profile,omitempty"`
    +}
    +
    +func init() {
    +	t["QueryHostProfileMetadataRequestType"] = reflect.TypeOf((*QueryHostProfileMetadataRequestType)(nil)).Elem()
    +}
    +
    +type QueryHostProfileMetadataResponse struct {
    +	Returnval []ProfileMetadata `xml:"returnval,omitempty"`
    +}
    +
    +type QueryHostStatus QueryHostStatusRequestType
    +
    +func init() {
    +	t["QueryHostStatus"] = reflect.TypeOf((*QueryHostStatus)(nil)).Elem()
    +}
    +
    +type QueryHostStatusRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["QueryHostStatusRequestType"] = reflect.TypeOf((*QueryHostStatusRequestType)(nil)).Elem()
    +}
    +
    +type QueryHostStatusResponse struct {
    +	Returnval VsanHostClusterStatus `xml:"returnval"`
    +}
    +
    +type QueryIORMConfigOption QueryIORMConfigOptionRequestType
    +
    +func init() {
    +	t["QueryIORMConfigOption"] = reflect.TypeOf((*QueryIORMConfigOption)(nil)).Elem()
    +}
    +
    +type QueryIORMConfigOptionRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Host ManagedObjectReference `xml:"host"`
    +}
    +
    +func init() {
    +	t["QueryIORMConfigOptionRequestType"] = reflect.TypeOf((*QueryIORMConfigOptionRequestType)(nil)).Elem()
    +}
    +
    +type QueryIORMConfigOptionResponse struct {
    +	Returnval StorageIORMConfigOption `xml:"returnval"`
    +}
    +
    +type QueryIPAllocations QueryIPAllocationsRequestType
    +
    +func init() {
    +	t["QueryIPAllocations"] = reflect.TypeOf((*QueryIPAllocations)(nil)).Elem()
    +}
    +
    +type QueryIPAllocationsRequestType struct {
    +	This         ManagedObjectReference `xml:"_this"`
    +	Dc           ManagedObjectReference `xml:"dc"`
    +	PoolId       int32                  `xml:"poolId"`
    +	ExtensionKey string                 `xml:"extensionKey"`
    +}
    +
    +func init() {
    +	t["QueryIPAllocationsRequestType"] = reflect.TypeOf((*QueryIPAllocationsRequestType)(nil)).Elem()
    +}
    +
    +type QueryIPAllocationsResponse struct {
    +	Returnval []IpPoolManagerIpAllocation `xml:"returnval"`
    +}
    +
    +type QueryIoFilterInfo QueryIoFilterInfoRequestType
    +
    +func init() {
    +	t["QueryIoFilterInfo"] = reflect.TypeOf((*QueryIoFilterInfo)(nil)).Elem()
    +}
    +
    +type QueryIoFilterInfoRequestType struct {
    +	This    ManagedObjectReference `xml:"_this"`
    +	CompRes ManagedObjectReference `xml:"compRes"`
    +}
    +
    +func init() {
    +	t["QueryIoFilterInfoRequestType"] = reflect.TypeOf((*QueryIoFilterInfoRequestType)(nil)).Elem()
    +}
    +
    +type QueryIoFilterInfoResponse struct {
    +	Returnval []ClusterIoFilterInfo `xml:"returnval,omitempty"`
    +}
    +
    +type QueryIoFilterIssues QueryIoFilterIssuesRequestType
    +
    +func init() {
    +	t["QueryIoFilterIssues"] = reflect.TypeOf((*QueryIoFilterIssues)(nil)).Elem()
    +}
    +
    +type QueryIoFilterIssuesRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	FilterId string                 `xml:"filterId"`
    +	CompRes  ManagedObjectReference `xml:"compRes"`
    +}
    +
    +func init() {
    +	t["QueryIoFilterIssuesRequestType"] = reflect.TypeOf((*QueryIoFilterIssuesRequestType)(nil)).Elem()
    +}
    +
    +type QueryIoFilterIssuesResponse struct {
    +	Returnval IoFilterQueryIssueResult `xml:"returnval"`
    +}
    +
    +type QueryIpPools QueryIpPoolsRequestType
    +
    +func init() {
    +	t["QueryIpPools"] = reflect.TypeOf((*QueryIpPools)(nil)).Elem()
    +}
    +
    +type QueryIpPoolsRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Dc   ManagedObjectReference `xml:"dc"`
    +}
    +
    +func init() {
    +	t["QueryIpPoolsRequestType"] = reflect.TypeOf((*QueryIpPoolsRequestType)(nil)).Elem()
    +}
    +
    +type QueryIpPoolsResponse struct {
    +	Returnval []IpPool `xml:"returnval,omitempty"`
    +}
    +
    +type QueryLicenseSourceAvailability QueryLicenseSourceAvailabilityRequestType
    +
    +func init() {
    +	t["QueryLicenseSourceAvailability"] = reflect.TypeOf((*QueryLicenseSourceAvailability)(nil)).Elem()
    +}
    +
    +type QueryLicenseSourceAvailabilityRequestType struct {
    +	This ManagedObjectReference  `xml:"_this"`
    +	Host *ManagedObjectReference `xml:"host,omitempty"`
    +}
    +
    +func init() {
    +	t["QueryLicenseSourceAvailabilityRequestType"] = reflect.TypeOf((*QueryLicenseSourceAvailabilityRequestType)(nil)).Elem()
    +}
    +
    +type QueryLicenseSourceAvailabilityResponse struct {
    +	Returnval []LicenseAvailabilityInfo `xml:"returnval,omitempty"`
    +}
    +
    +type QueryLicenseUsage QueryLicenseUsageRequestType
    +
    +func init() {
    +	t["QueryLicenseUsage"] = reflect.TypeOf((*QueryLicenseUsage)(nil)).Elem()
    +}
    +
    +type QueryLicenseUsageRequestType struct {
    +	This ManagedObjectReference  `xml:"_this"`
    +	Host *ManagedObjectReference `xml:"host,omitempty"`
    +}
    +
    +func init() {
    +	t["QueryLicenseUsageRequestType"] = reflect.TypeOf((*QueryLicenseUsageRequestType)(nil)).Elem()
    +}
    +
    +type QueryLicenseUsageResponse struct {
    +	Returnval LicenseUsageInfo `xml:"returnval"`
    +}
    +
    +type QueryLockdownExceptions QueryLockdownExceptionsRequestType
    +
    +func init() {
    +	t["QueryLockdownExceptions"] = reflect.TypeOf((*QueryLockdownExceptions)(nil)).Elem()
    +}
    +
    +type QueryLockdownExceptionsRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["QueryLockdownExceptionsRequestType"] = reflect.TypeOf((*QueryLockdownExceptionsRequestType)(nil)).Elem()
    +}
    +
    +type QueryLockdownExceptionsResponse struct {
    +	Returnval []string `xml:"returnval,omitempty"`
    +}
    +
    +type QueryManagedBy QueryManagedByRequestType
    +
    +func init() {
    +	t["QueryManagedBy"] = reflect.TypeOf((*QueryManagedBy)(nil)).Elem()
    +}
    +
    +type QueryManagedByRequestType struct {
    +	This         ManagedObjectReference `xml:"_this"`
    +	ExtensionKey string                 `xml:"extensionKey"`
    +}
    +
    +func init() {
    +	t["QueryManagedByRequestType"] = reflect.TypeOf((*QueryManagedByRequestType)(nil)).Elem()
    +}
    +
    +type QueryManagedByResponse struct {
    +	Returnval []ManagedObjectReference `xml:"returnval,omitempty"`
    +}
    +
    +type QueryMemoryOverhead QueryMemoryOverheadRequestType
    +
    +func init() {
    +	t["QueryMemoryOverhead"] = reflect.TypeOf((*QueryMemoryOverhead)(nil)).Elem()
    +}
    +
    +type QueryMemoryOverheadEx QueryMemoryOverheadExRequestType
    +
    +func init() {
    +	t["QueryMemoryOverheadEx"] = reflect.TypeOf((*QueryMemoryOverheadEx)(nil)).Elem()
    +}
    +
    +type QueryMemoryOverheadExRequestType struct {
    +	This         ManagedObjectReference   `xml:"_this"`
    +	VmConfigInfo VirtualMachineConfigInfo `xml:"vmConfigInfo"`
    +}
    +
    +func init() {
    +	t["QueryMemoryOverheadExRequestType"] = reflect.TypeOf((*QueryMemoryOverheadExRequestType)(nil)).Elem()
    +}
    +
    +type QueryMemoryOverheadExResponse struct {
    +	Returnval int64 `xml:"returnval"`
    +}
    +
    +type QueryMemoryOverheadRequestType struct {
    +	This         ManagedObjectReference `xml:"_this"`
    +	MemorySize   int64                  `xml:"memorySize"`
    +	VideoRamSize int32                  `xml:"videoRamSize,omitempty"`
    +	NumVcpus     int32                  `xml:"numVcpus"`
    +}
    +
    +func init() {
    +	t["QueryMemoryOverheadRequestType"] = reflect.TypeOf((*QueryMemoryOverheadRequestType)(nil)).Elem()
    +}
    +
    +type QueryMemoryOverheadResponse struct {
    +	Returnval int64 `xml:"returnval"`
    +}
    +
    +type QueryMigrationDependencies QueryMigrationDependenciesRequestType
    +
    +func init() {
    +	t["QueryMigrationDependencies"] = reflect.TypeOf((*QueryMigrationDependencies)(nil)).Elem()
    +}
    +
    +type QueryMigrationDependenciesRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	PnicDevice []string               `xml:"pnicDevice"`
    +}
    +
    +func init() {
    +	t["QueryMigrationDependenciesRequestType"] = reflect.TypeOf((*QueryMigrationDependenciesRequestType)(nil)).Elem()
    +}
    +
    +type QueryMigrationDependenciesResponse struct {
    +	Returnval IscsiMigrationDependency `xml:"returnval"`
    +}
    +
    +type QueryModules QueryModulesRequestType
    +
    +func init() {
    +	t["QueryModules"] = reflect.TypeOf((*QueryModules)(nil)).Elem()
    +}
    +
    +type QueryModulesRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["QueryModulesRequestType"] = reflect.TypeOf((*QueryModulesRequestType)(nil)).Elem()
    +}
    +
    +type QueryModulesResponse struct {
    +	Returnval []KernelModuleInfo `xml:"returnval,omitempty"`
    +}
    +
    +type QueryMonitoredEntities QueryMonitoredEntitiesRequestType
    +
    +func init() {
    +	t["QueryMonitoredEntities"] = reflect.TypeOf((*QueryMonitoredEntities)(nil)).Elem()
    +}
    +
    +type QueryMonitoredEntitiesRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	ProviderId string                 `xml:"providerId"`
    +}
    +
    +func init() {
    +	t["QueryMonitoredEntitiesRequestType"] = reflect.TypeOf((*QueryMonitoredEntitiesRequestType)(nil)).Elem()
    +}
    +
    +type QueryMonitoredEntitiesResponse struct {
    +	Returnval []ManagedObjectReference `xml:"returnval,omitempty"`
    +}
    +
    +type QueryNFSUser QueryNFSUserRequestType
    +
    +func init() {
    +	t["QueryNFSUser"] = reflect.TypeOf((*QueryNFSUser)(nil)).Elem()
    +}
    +
    +type QueryNFSUserRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["QueryNFSUserRequestType"] = reflect.TypeOf((*QueryNFSUserRequestType)(nil)).Elem()
    +}
    +
    +type QueryNFSUserResponse struct {
    +	Returnval *HostNasVolumeUserInfo `xml:"returnval,omitempty"`
    +}
    +
    +type QueryNetConfig QueryNetConfigRequestType
    +
    +func init() {
    +	t["QueryNetConfig"] = reflect.TypeOf((*QueryNetConfig)(nil)).Elem()
    +}
    +
    +type QueryNetConfigRequestType struct {
    +	This    ManagedObjectReference `xml:"_this"`
    +	NicType string                 `xml:"nicType"`
    +}
    +
    +func init() {
    +	t["QueryNetConfigRequestType"] = reflect.TypeOf((*QueryNetConfigRequestType)(nil)).Elem()
    +}
    +
    +type QueryNetConfigResponse struct {
    +	Returnval *VirtualNicManagerNetConfig `xml:"returnval,omitempty"`
    +}
    +
    +type QueryNetworkHint QueryNetworkHintRequestType
    +
    +func init() {
    +	t["QueryNetworkHint"] = reflect.TypeOf((*QueryNetworkHint)(nil)).Elem()
    +}
    +
    +type QueryNetworkHintRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	Device []string               `xml:"device,omitempty"`
    +}
    +
    +func init() {
    +	t["QueryNetworkHintRequestType"] = reflect.TypeOf((*QueryNetworkHintRequestType)(nil)).Elem()
    +}
    +
    +type QueryNetworkHintResponse struct {
    +	Returnval []PhysicalNicHintInfo `xml:"returnval,omitempty"`
    +}
    +
    +type QueryObjectsOnPhysicalVsanDisk QueryObjectsOnPhysicalVsanDiskRequestType
    +
    +func init() {
    +	t["QueryObjectsOnPhysicalVsanDisk"] = reflect.TypeOf((*QueryObjectsOnPhysicalVsanDisk)(nil)).Elem()
    +}
    +
    +type QueryObjectsOnPhysicalVsanDiskRequestType struct {
    +	This  ManagedObjectReference `xml:"_this"`
    +	Disks []string               `xml:"disks"`
    +}
    +
    +func init() {
    +	t["QueryObjectsOnPhysicalVsanDiskRequestType"] = reflect.TypeOf((*QueryObjectsOnPhysicalVsanDiskRequestType)(nil)).Elem()
    +}
    +
    +type QueryObjectsOnPhysicalVsanDiskResponse struct {
    +	Returnval string `xml:"returnval"`
    +}
    +
    +type QueryOptions QueryOptionsRequestType
    +
    +func init() {
    +	t["QueryOptions"] = reflect.TypeOf((*QueryOptions)(nil)).Elem()
    +}
    +
    +type QueryOptionsRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Name string                 `xml:"name,omitempty"`
    +}
    +
    +func init() {
    +	t["QueryOptionsRequestType"] = reflect.TypeOf((*QueryOptionsRequestType)(nil)).Elem()
    +}
    +
    +type QueryOptionsResponse struct {
    +	Returnval []BaseOptionValue `xml:"returnval,omitempty,typeattr"`
    +}
    +
    +type QueryPartitionCreateDesc QueryPartitionCreateDescRequestType
    +
    +func init() {
    +	t["QueryPartitionCreateDesc"] = reflect.TypeOf((*QueryPartitionCreateDesc)(nil)).Elem()
    +}
    +
    +type QueryPartitionCreateDescRequestType struct {
    +	This           ManagedObjectReference `xml:"_this"`
    +	DiskUuid       string                 `xml:"diskUuid"`
    +	DiagnosticType string                 `xml:"diagnosticType"`
    +}
    +
    +func init() {
    +	t["QueryPartitionCreateDescRequestType"] = reflect.TypeOf((*QueryPartitionCreateDescRequestType)(nil)).Elem()
    +}
    +
    +type QueryPartitionCreateDescResponse struct {
    +	Returnval HostDiagnosticPartitionCreateDescription `xml:"returnval"`
    +}
    +
    +type QueryPartitionCreateOptions QueryPartitionCreateOptionsRequestType
    +
    +func init() {
    +	t["QueryPartitionCreateOptions"] = reflect.TypeOf((*QueryPartitionCreateOptions)(nil)).Elem()
    +}
    +
    +type QueryPartitionCreateOptionsRequestType struct {
    +	This           ManagedObjectReference `xml:"_this"`
    +	StorageType    string                 `xml:"storageType"`
    +	DiagnosticType string                 `xml:"diagnosticType"`
    +}
    +
    +func init() {
    +	t["QueryPartitionCreateOptionsRequestType"] = reflect.TypeOf((*QueryPartitionCreateOptionsRequestType)(nil)).Elem()
    +}
    +
    +type QueryPartitionCreateOptionsResponse struct {
    +	Returnval []HostDiagnosticPartitionCreateOption `xml:"returnval,omitempty"`
    +}
    +
    +type QueryPathSelectionPolicyOptions QueryPathSelectionPolicyOptionsRequestType
    +
    +func init() {
    +	t["QueryPathSelectionPolicyOptions"] = reflect.TypeOf((*QueryPathSelectionPolicyOptions)(nil)).Elem()
    +}
    +
    +type QueryPathSelectionPolicyOptionsRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["QueryPathSelectionPolicyOptionsRequestType"] = reflect.TypeOf((*QueryPathSelectionPolicyOptionsRequestType)(nil)).Elem()
    +}
    +
    +type QueryPathSelectionPolicyOptionsResponse struct {
    +	Returnval []HostPathSelectionPolicyOption `xml:"returnval,omitempty"`
    +}
    +
    +type QueryPerf QueryPerfRequestType
    +
    +func init() {
    +	t["QueryPerf"] = reflect.TypeOf((*QueryPerf)(nil)).Elem()
    +}
    +
    +type QueryPerfComposite QueryPerfCompositeRequestType
    +
    +func init() {
    +	t["QueryPerfComposite"] = reflect.TypeOf((*QueryPerfComposite)(nil)).Elem()
    +}
    +
    +type QueryPerfCompositeRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	QuerySpec PerfQuerySpec          `xml:"querySpec"`
    +}
    +
    +func init() {
    +	t["QueryPerfCompositeRequestType"] = reflect.TypeOf((*QueryPerfCompositeRequestType)(nil)).Elem()
    +}
    +
    +type QueryPerfCompositeResponse struct {
    +	Returnval PerfCompositeMetric `xml:"returnval"`
    +}
    +
    +type QueryPerfCounter QueryPerfCounterRequestType
    +
    +func init() {
    +	t["QueryPerfCounter"] = reflect.TypeOf((*QueryPerfCounter)(nil)).Elem()
    +}
    +
    +type QueryPerfCounterByLevel QueryPerfCounterByLevelRequestType
    +
    +func init() {
    +	t["QueryPerfCounterByLevel"] = reflect.TypeOf((*QueryPerfCounterByLevel)(nil)).Elem()
    +}
    +
    +type QueryPerfCounterByLevelRequestType struct {
    +	This  ManagedObjectReference `xml:"_this"`
    +	Level int32                  `xml:"level"`
    +}
    +
    +func init() {
    +	t["QueryPerfCounterByLevelRequestType"] = reflect.TypeOf((*QueryPerfCounterByLevelRequestType)(nil)).Elem()
    +}
    +
    +type QueryPerfCounterByLevelResponse struct {
    +	Returnval []PerfCounterInfo `xml:"returnval"`
    +}
    +
    +type QueryPerfCounterRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	CounterId []int32                `xml:"counterId"`
    +}
    +
    +func init() {
    +	t["QueryPerfCounterRequestType"] = reflect.TypeOf((*QueryPerfCounterRequestType)(nil)).Elem()
    +}
    +
    +type QueryPerfCounterResponse struct {
    +	Returnval []PerfCounterInfo `xml:"returnval,omitempty"`
    +}
    +
    +type QueryPerfProviderSummary QueryPerfProviderSummaryRequestType
    +
    +func init() {
    +	t["QueryPerfProviderSummary"] = reflect.TypeOf((*QueryPerfProviderSummary)(nil)).Elem()
    +}
    +
    +type QueryPerfProviderSummaryRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	Entity ManagedObjectReference `xml:"entity"`
    +}
    +
    +func init() {
    +	t["QueryPerfProviderSummaryRequestType"] = reflect.TypeOf((*QueryPerfProviderSummaryRequestType)(nil)).Elem()
    +}
    +
    +type QueryPerfProviderSummaryResponse struct {
    +	Returnval PerfProviderSummary `xml:"returnval"`
    +}
    +
    +type QueryPerfRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	QuerySpec []PerfQuerySpec        `xml:"querySpec"`
    +}
    +
    +func init() {
    +	t["QueryPerfRequestType"] = reflect.TypeOf((*QueryPerfRequestType)(nil)).Elem()
    +}
    +
    +type QueryPerfResponse struct {
    +	Returnval []BasePerfEntityMetricBase `xml:"returnval,omitempty,typeattr"`
    +}
    +
    +type QueryPhysicalVsanDisks QueryPhysicalVsanDisksRequestType
    +
    +func init() {
    +	t["QueryPhysicalVsanDisks"] = reflect.TypeOf((*QueryPhysicalVsanDisks)(nil)).Elem()
    +}
    +
    +type QueryPhysicalVsanDisksRequestType struct {
    +	This  ManagedObjectReference `xml:"_this"`
    +	Props []string               `xml:"props,omitempty"`
    +}
    +
    +func init() {
    +	t["QueryPhysicalVsanDisksRequestType"] = reflect.TypeOf((*QueryPhysicalVsanDisksRequestType)(nil)).Elem()
    +}
    +
    +type QueryPhysicalVsanDisksResponse struct {
    +	Returnval string `xml:"returnval"`
    +}
    +
    +type QueryPnicStatus QueryPnicStatusRequestType
    +
    +func init() {
    +	t["QueryPnicStatus"] = reflect.TypeOf((*QueryPnicStatus)(nil)).Elem()
    +}
    +
    +type QueryPnicStatusRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	PnicDevice string                 `xml:"pnicDevice"`
    +}
    +
    +func init() {
    +	t["QueryPnicStatusRequestType"] = reflect.TypeOf((*QueryPnicStatusRequestType)(nil)).Elem()
    +}
    +
    +type QueryPnicStatusResponse struct {
    +	Returnval IscsiStatus `xml:"returnval"`
    +}
    +
    +type QueryPolicyMetadata QueryPolicyMetadataRequestType
    +
    +func init() {
    +	t["QueryPolicyMetadata"] = reflect.TypeOf((*QueryPolicyMetadata)(nil)).Elem()
    +}
    +
    +type QueryPolicyMetadataRequestType struct {
    +	This       ManagedObjectReference  `xml:"_this"`
    +	PolicyName []string                `xml:"policyName,omitempty"`
    +	Profile    *ManagedObjectReference `xml:"profile,omitempty"`
    +}
    +
    +func init() {
    +	t["QueryPolicyMetadataRequestType"] = reflect.TypeOf((*QueryPolicyMetadataRequestType)(nil)).Elem()
    +}
    +
    +type QueryPolicyMetadataResponse struct {
    +	Returnval []ProfilePolicyMetadata `xml:"returnval,omitempty"`
    +}
    +
    +type QueryProfileStructure QueryProfileStructureRequestType
    +
    +func init() {
    +	t["QueryProfileStructure"] = reflect.TypeOf((*QueryProfileStructure)(nil)).Elem()
    +}
    +
    +type QueryProfileStructureRequestType struct {
    +	This    ManagedObjectReference  `xml:"_this"`
    +	Profile *ManagedObjectReference `xml:"profile,omitempty"`
    +}
    +
    +func init() {
    +	t["QueryProfileStructureRequestType"] = reflect.TypeOf((*QueryProfileStructureRequestType)(nil)).Elem()
    +}
    +
    +type QueryProfileStructureResponse struct {
    +	Returnval ProfileProfileStructure `xml:"returnval"`
    +}
    +
    +type QueryProviderList QueryProviderListRequestType
    +
    +func init() {
    +	t["QueryProviderList"] = reflect.TypeOf((*QueryProviderList)(nil)).Elem()
    +}
    +
    +type QueryProviderListRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["QueryProviderListRequestType"] = reflect.TypeOf((*QueryProviderListRequestType)(nil)).Elem()
    +}
    +
    +type QueryProviderListResponse struct {
    +	Returnval []string `xml:"returnval,omitempty"`
    +}
    +
    +type QueryProviderName QueryProviderNameRequestType
    +
    +func init() {
    +	t["QueryProviderName"] = reflect.TypeOf((*QueryProviderName)(nil)).Elem()
    +}
    +
    +type QueryProviderNameRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Id   string                 `xml:"id"`
    +}
    +
    +func init() {
    +	t["QueryProviderNameRequestType"] = reflect.TypeOf((*QueryProviderNameRequestType)(nil)).Elem()
    +}
    +
    +type QueryProviderNameResponse struct {
    +	Returnval string `xml:"returnval"`
    +}
    +
    +type QueryResourceConfigOption QueryResourceConfigOptionRequestType
    +
    +func init() {
    +	t["QueryResourceConfigOption"] = reflect.TypeOf((*QueryResourceConfigOption)(nil)).Elem()
    +}
    +
    +type QueryResourceConfigOptionRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["QueryResourceConfigOptionRequestType"] = reflect.TypeOf((*QueryResourceConfigOptionRequestType)(nil)).Elem()
    +}
    +
    +type QueryResourceConfigOptionResponse struct {
    +	Returnval ResourceConfigOption `xml:"returnval"`
    +}
    +
    +type QueryServiceList QueryServiceListRequestType
    +
    +func init() {
    +	t["QueryServiceList"] = reflect.TypeOf((*QueryServiceList)(nil)).Elem()
    +}
    +
    +type QueryServiceListRequestType struct {
    +	This        ManagedObjectReference `xml:"_this"`
    +	ServiceName string                 `xml:"serviceName,omitempty"`
    +	Location    []string               `xml:"location,omitempty"`
    +}
    +
    +func init() {
    +	t["QueryServiceListRequestType"] = reflect.TypeOf((*QueryServiceListRequestType)(nil)).Elem()
    +}
    +
    +type QueryServiceListResponse struct {
    +	Returnval []ServiceManagerServiceInfo `xml:"returnval,omitempty"`
    +}
    +
    +type QueryStorageArrayTypePolicyOptions QueryStorageArrayTypePolicyOptionsRequestType
    +
    +func init() {
    +	t["QueryStorageArrayTypePolicyOptions"] = reflect.TypeOf((*QueryStorageArrayTypePolicyOptions)(nil)).Elem()
    +}
    +
    +type QueryStorageArrayTypePolicyOptionsRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["QueryStorageArrayTypePolicyOptionsRequestType"] = reflect.TypeOf((*QueryStorageArrayTypePolicyOptionsRequestType)(nil)).Elem()
    +}
    +
    +type QueryStorageArrayTypePolicyOptionsResponse struct {
    +	Returnval []HostStorageArrayTypePolicyOption `xml:"returnval,omitempty"`
    +}
    +
    +type QuerySupportedFeatures QuerySupportedFeaturesRequestType
    +
    +func init() {
    +	t["QuerySupportedFeatures"] = reflect.TypeOf((*QuerySupportedFeatures)(nil)).Elem()
    +}
    +
    +type QuerySupportedFeaturesRequestType struct {
    +	This ManagedObjectReference  `xml:"_this"`
    +	Host *ManagedObjectReference `xml:"host,omitempty"`
    +}
    +
    +func init() {
    +	t["QuerySupportedFeaturesRequestType"] = reflect.TypeOf((*QuerySupportedFeaturesRequestType)(nil)).Elem()
    +}
    +
    +type QuerySupportedFeaturesResponse struct {
    +	Returnval []LicenseFeatureInfo `xml:"returnval,omitempty"`
    +}
    +
    +type QuerySyncingVsanObjects QuerySyncingVsanObjectsRequestType
    +
    +func init() {
    +	t["QuerySyncingVsanObjects"] = reflect.TypeOf((*QuerySyncingVsanObjects)(nil)).Elem()
    +}
    +
    +type QuerySyncingVsanObjectsRequestType struct {
    +	This  ManagedObjectReference `xml:"_this"`
    +	Uuids []string               `xml:"uuids,omitempty"`
    +}
    +
    +func init() {
    +	t["QuerySyncingVsanObjectsRequestType"] = reflect.TypeOf((*QuerySyncingVsanObjectsRequestType)(nil)).Elem()
    +}
    +
    +type QuerySyncingVsanObjectsResponse struct {
    +	Returnval string `xml:"returnval"`
    +}
    +
    +type QuerySystemUsers QuerySystemUsersRequestType
    +
    +func init() {
    +	t["QuerySystemUsers"] = reflect.TypeOf((*QuerySystemUsers)(nil)).Elem()
    +}
    +
    +type QuerySystemUsersRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["QuerySystemUsersRequestType"] = reflect.TypeOf((*QuerySystemUsersRequestType)(nil)).Elem()
    +}
    +
    +type QuerySystemUsersResponse struct {
    +	Returnval []string `xml:"returnval,omitempty"`
    +}
    +
    +type QueryTargetCapabilities QueryTargetCapabilitiesRequestType
    +
    +func init() {
    +	t["QueryTargetCapabilities"] = reflect.TypeOf((*QueryTargetCapabilities)(nil)).Elem()
    +}
    +
    +type QueryTargetCapabilitiesRequestType struct {
    +	This ManagedObjectReference  `xml:"_this"`
    +	Host *ManagedObjectReference `xml:"host,omitempty"`
    +}
    +
    +func init() {
    +	t["QueryTargetCapabilitiesRequestType"] = reflect.TypeOf((*QueryTargetCapabilitiesRequestType)(nil)).Elem()
    +}
    +
    +type QueryTargetCapabilitiesResponse struct {
    +	Returnval *HostCapability `xml:"returnval,omitempty"`
    +}
    +
    +type QueryTpmAttestationReport QueryTpmAttestationReportRequestType
    +
    +func init() {
    +	t["QueryTpmAttestationReport"] = reflect.TypeOf((*QueryTpmAttestationReport)(nil)).Elem()
    +}
    +
    +type QueryTpmAttestationReportRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["QueryTpmAttestationReportRequestType"] = reflect.TypeOf((*QueryTpmAttestationReportRequestType)(nil)).Elem()
    +}
    +
    +type QueryTpmAttestationReportResponse struct {
    +	Returnval *HostTpmAttestationReport `xml:"returnval,omitempty"`
    +}
    +
    +type QueryUnmonitoredHosts QueryUnmonitoredHostsRequestType
    +
    +func init() {
    +	t["QueryUnmonitoredHosts"] = reflect.TypeOf((*QueryUnmonitoredHosts)(nil)).Elem()
    +}
    +
    +type QueryUnmonitoredHostsRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	ProviderId string                 `xml:"providerId"`
    +	Cluster    ManagedObjectReference `xml:"cluster"`
    +}
    +
    +func init() {
    +	t["QueryUnmonitoredHostsRequestType"] = reflect.TypeOf((*QueryUnmonitoredHostsRequestType)(nil)).Elem()
    +}
    +
    +type QueryUnmonitoredHostsResponse struct {
    +	Returnval []ManagedObjectReference `xml:"returnval,omitempty"`
    +}
    +
    +type QueryUnownedFiles QueryUnownedFilesRequestType
    +
    +func init() {
    +	t["QueryUnownedFiles"] = reflect.TypeOf((*QueryUnownedFiles)(nil)).Elem()
    +}
    +
    +type QueryUnownedFilesRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["QueryUnownedFilesRequestType"] = reflect.TypeOf((*QueryUnownedFilesRequestType)(nil)).Elem()
    +}
    +
    +type QueryUnownedFilesResponse struct {
    +	Returnval []string `xml:"returnval,omitempty"`
    +}
    +
    +type QueryUnresolvedVmfsVolume QueryUnresolvedVmfsVolumeRequestType
    +
    +func init() {
    +	t["QueryUnresolvedVmfsVolume"] = reflect.TypeOf((*QueryUnresolvedVmfsVolume)(nil)).Elem()
    +}
    +
    +type QueryUnresolvedVmfsVolumeRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["QueryUnresolvedVmfsVolumeRequestType"] = reflect.TypeOf((*QueryUnresolvedVmfsVolumeRequestType)(nil)).Elem()
    +}
    +
    +type QueryUnresolvedVmfsVolumeResponse struct {
    +	Returnval []HostUnresolvedVmfsVolume `xml:"returnval,omitempty"`
    +}
    +
    +type QueryUnresolvedVmfsVolumes QueryUnresolvedVmfsVolumesRequestType
    +
    +func init() {
    +	t["QueryUnresolvedVmfsVolumes"] = reflect.TypeOf((*QueryUnresolvedVmfsVolumes)(nil)).Elem()
    +}
    +
    +type QueryUnresolvedVmfsVolumesRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["QueryUnresolvedVmfsVolumesRequestType"] = reflect.TypeOf((*QueryUnresolvedVmfsVolumesRequestType)(nil)).Elem()
    +}
    +
    +type QueryUnresolvedVmfsVolumesResponse struct {
    +	Returnval []HostUnresolvedVmfsVolume `xml:"returnval,omitempty"`
    +}
    +
    +type QueryUsedVlanIdInDvs QueryUsedVlanIdInDvsRequestType
    +
    +func init() {
    +	t["QueryUsedVlanIdInDvs"] = reflect.TypeOf((*QueryUsedVlanIdInDvs)(nil)).Elem()
    +}
    +
    +type QueryUsedVlanIdInDvsRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["QueryUsedVlanIdInDvsRequestType"] = reflect.TypeOf((*QueryUsedVlanIdInDvsRequestType)(nil)).Elem()
    +}
    +
    +type QueryUsedVlanIdInDvsResponse struct {
    +	Returnval []int32 `xml:"returnval,omitempty"`
    +}
    +
    +type QueryVMotionCompatibility QueryVMotionCompatibilityRequestType
    +
    +func init() {
    +	t["QueryVMotionCompatibility"] = reflect.TypeOf((*QueryVMotionCompatibility)(nil)).Elem()
    +}
    +
    +type QueryVMotionCompatibilityExRequestType struct {
    +	This ManagedObjectReference   `xml:"_this"`
    +	Vm   []ManagedObjectReference `xml:"vm"`
    +	Host []ManagedObjectReference `xml:"host"`
    +}
    +
    +func init() {
    +	t["QueryVMotionCompatibilityExRequestType"] = reflect.TypeOf((*QueryVMotionCompatibilityExRequestType)(nil)).Elem()
    +}
    +
    +type QueryVMotionCompatibilityEx_Task QueryVMotionCompatibilityExRequestType
    +
    +func init() {
    +	t["QueryVMotionCompatibilityEx_Task"] = reflect.TypeOf((*QueryVMotionCompatibilityEx_Task)(nil)).Elem()
    +}
    +
    +type QueryVMotionCompatibilityEx_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type QueryVMotionCompatibilityRequestType struct {
    +	This          ManagedObjectReference   `xml:"_this"`
    +	Vm            ManagedObjectReference   `xml:"vm"`
    +	Host          []ManagedObjectReference `xml:"host"`
    +	Compatibility []string                 `xml:"compatibility,omitempty"`
    +}
    +
    +func init() {
    +	t["QueryVMotionCompatibilityRequestType"] = reflect.TypeOf((*QueryVMotionCompatibilityRequestType)(nil)).Elem()
    +}
    +
    +type QueryVMotionCompatibilityResponse struct {
    +	Returnval []HostVMotionCompatibility `xml:"returnval,omitempty"`
    +}
    +
    +type QueryVirtualDiskFragmentation QueryVirtualDiskFragmentationRequestType
    +
    +func init() {
    +	t["QueryVirtualDiskFragmentation"] = reflect.TypeOf((*QueryVirtualDiskFragmentation)(nil)).Elem()
    +}
    +
    +type QueryVirtualDiskFragmentationRequestType struct {
    +	This       ManagedObjectReference  `xml:"_this"`
    +	Name       string                  `xml:"name"`
    +	Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"`
    +}
    +
    +func init() {
    +	t["QueryVirtualDiskFragmentationRequestType"] = reflect.TypeOf((*QueryVirtualDiskFragmentationRequestType)(nil)).Elem()
    +}
    +
    +type QueryVirtualDiskFragmentationResponse struct {
    +	Returnval int32 `xml:"returnval"`
    +}
    +
    +type QueryVirtualDiskGeometry QueryVirtualDiskGeometryRequestType
    +
    +func init() {
    +	t["QueryVirtualDiskGeometry"] = reflect.TypeOf((*QueryVirtualDiskGeometry)(nil)).Elem()
    +}
    +
    +type QueryVirtualDiskGeometryRequestType struct {
    +	This       ManagedObjectReference  `xml:"_this"`
    +	Name       string                  `xml:"name"`
    +	Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"`
    +}
    +
    +func init() {
    +	t["QueryVirtualDiskGeometryRequestType"] = reflect.TypeOf((*QueryVirtualDiskGeometryRequestType)(nil)).Elem()
    +}
    +
    +type QueryVirtualDiskGeometryResponse struct {
    +	Returnval HostDiskDimensionsChs `xml:"returnval"`
    +}
    +
    +type QueryVirtualDiskUuid QueryVirtualDiskUuidRequestType
    +
    +func init() {
    +	t["QueryVirtualDiskUuid"] = reflect.TypeOf((*QueryVirtualDiskUuid)(nil)).Elem()
    +}
    +
    +type QueryVirtualDiskUuidRequestType struct {
    +	This       ManagedObjectReference  `xml:"_this"`
    +	Name       string                  `xml:"name"`
    +	Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"`
    +}
    +
    +func init() {
    +	t["QueryVirtualDiskUuidRequestType"] = reflect.TypeOf((*QueryVirtualDiskUuidRequestType)(nil)).Elem()
    +}
    +
    +type QueryVirtualDiskUuidResponse struct {
    +	Returnval string `xml:"returnval"`
    +}
    +
    +type QueryVmfsConfigOption QueryVmfsConfigOptionRequestType
    +
    +func init() {
    +	t["QueryVmfsConfigOption"] = reflect.TypeOf((*QueryVmfsConfigOption)(nil)).Elem()
    +}
    +
    +type QueryVmfsConfigOptionRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["QueryVmfsConfigOptionRequestType"] = reflect.TypeOf((*QueryVmfsConfigOptionRequestType)(nil)).Elem()
    +}
    +
    +type QueryVmfsConfigOptionResponse struct {
    +	Returnval []VmfsConfigOption `xml:"returnval,omitempty"`
    +}
    +
    +type QueryVmfsDatastoreCreateOptions QueryVmfsDatastoreCreateOptionsRequestType
    +
    +func init() {
    +	t["QueryVmfsDatastoreCreateOptions"] = reflect.TypeOf((*QueryVmfsDatastoreCreateOptions)(nil)).Elem()
    +}
    +
    +type QueryVmfsDatastoreCreateOptionsRequestType struct {
    +	This             ManagedObjectReference `xml:"_this"`
    +	DevicePath       string                 `xml:"devicePath"`
    +	VmfsMajorVersion int32                  `xml:"vmfsMajorVersion,omitempty"`
    +}
    +
    +func init() {
    +	t["QueryVmfsDatastoreCreateOptionsRequestType"] = reflect.TypeOf((*QueryVmfsDatastoreCreateOptionsRequestType)(nil)).Elem()
    +}
    +
    +type QueryVmfsDatastoreCreateOptionsResponse struct {
    +	Returnval []VmfsDatastoreOption `xml:"returnval,omitempty"`
    +}
    +
    +type QueryVmfsDatastoreExpandOptions QueryVmfsDatastoreExpandOptionsRequestType
    +
    +func init() {
    +	t["QueryVmfsDatastoreExpandOptions"] = reflect.TypeOf((*QueryVmfsDatastoreExpandOptions)(nil)).Elem()
    +}
    +
    +type QueryVmfsDatastoreExpandOptionsRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	Datastore ManagedObjectReference `xml:"datastore"`
    +}
    +
    +func init() {
    +	t["QueryVmfsDatastoreExpandOptionsRequestType"] = reflect.TypeOf((*QueryVmfsDatastoreExpandOptionsRequestType)(nil)).Elem()
    +}
    +
    +type QueryVmfsDatastoreExpandOptionsResponse struct {
    +	Returnval []VmfsDatastoreOption `xml:"returnval,omitempty"`
    +}
    +
    +type QueryVmfsDatastoreExtendOptions QueryVmfsDatastoreExtendOptionsRequestType
    +
    +func init() {
    +	t["QueryVmfsDatastoreExtendOptions"] = reflect.TypeOf((*QueryVmfsDatastoreExtendOptions)(nil)).Elem()
    +}
    +
    +type QueryVmfsDatastoreExtendOptionsRequestType struct {
    +	This                     ManagedObjectReference `xml:"_this"`
    +	Datastore                ManagedObjectReference `xml:"datastore"`
    +	DevicePath               string                 `xml:"devicePath"`
    +	SuppressExpandCandidates *bool                  `xml:"suppressExpandCandidates"`
    +}
    +
    +func init() {
    +	t["QueryVmfsDatastoreExtendOptionsRequestType"] = reflect.TypeOf((*QueryVmfsDatastoreExtendOptionsRequestType)(nil)).Elem()
    +}
    +
    +type QueryVmfsDatastoreExtendOptionsResponse struct {
    +	Returnval []VmfsDatastoreOption `xml:"returnval,omitempty"`
    +}
    +
    +type QueryVnicStatus QueryVnicStatusRequestType
    +
    +func init() {
    +	t["QueryVnicStatus"] = reflect.TypeOf((*QueryVnicStatus)(nil)).Elem()
    +}
    +
    +type QueryVnicStatusRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	VnicDevice string                 `xml:"vnicDevice"`
    +}
    +
    +func init() {
    +	t["QueryVnicStatusRequestType"] = reflect.TypeOf((*QueryVnicStatusRequestType)(nil)).Elem()
    +}
    +
    +type QueryVnicStatusResponse struct {
    +	Returnval IscsiStatus `xml:"returnval"`
    +}
    +
    +type QueryVsanObjectUuidsByFilter QueryVsanObjectUuidsByFilterRequestType
    +
    +func init() {
    +	t["QueryVsanObjectUuidsByFilter"] = reflect.TypeOf((*QueryVsanObjectUuidsByFilter)(nil)).Elem()
    +}
    +
    +type QueryVsanObjectUuidsByFilterRequestType struct {
    +	This    ManagedObjectReference `xml:"_this"`
    +	Uuids   []string               `xml:"uuids,omitempty"`
    +	Limit   *int32                 `xml:"limit"`
    +	Version int32                  `xml:"version,omitempty"`
    +}
    +
    +func init() {
    +	t["QueryVsanObjectUuidsByFilterRequestType"] = reflect.TypeOf((*QueryVsanObjectUuidsByFilterRequestType)(nil)).Elem()
    +}
    +
    +type QueryVsanObjectUuidsByFilterResponse struct {
    +	Returnval []string `xml:"returnval,omitempty"`
    +}
    +
    +type QueryVsanObjects QueryVsanObjectsRequestType
    +
    +func init() {
    +	t["QueryVsanObjects"] = reflect.TypeOf((*QueryVsanObjects)(nil)).Elem()
    +}
    +
    +type QueryVsanObjectsRequestType struct {
    +	This  ManagedObjectReference `xml:"_this"`
    +	Uuids []string               `xml:"uuids,omitempty"`
    +}
    +
    +func init() {
    +	t["QueryVsanObjectsRequestType"] = reflect.TypeOf((*QueryVsanObjectsRequestType)(nil)).Elem()
    +}
    +
    +type QueryVsanObjectsResponse struct {
    +	Returnval string `xml:"returnval"`
    +}
    +
    +type QueryVsanStatistics QueryVsanStatisticsRequestType
    +
    +func init() {
    +	t["QueryVsanStatistics"] = reflect.TypeOf((*QueryVsanStatistics)(nil)).Elem()
    +}
    +
    +type QueryVsanStatisticsRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	Labels []string               `xml:"labels"`
    +}
    +
    +func init() {
    +	t["QueryVsanStatisticsRequestType"] = reflect.TypeOf((*QueryVsanStatisticsRequestType)(nil)).Elem()
    +}
    +
    +type QueryVsanStatisticsResponse struct {
    +	Returnval string `xml:"returnval"`
    +}
    +
    +type QueryVsanUpgradeStatus QueryVsanUpgradeStatusRequestType
    +
    +func init() {
    +	t["QueryVsanUpgradeStatus"] = reflect.TypeOf((*QueryVsanUpgradeStatus)(nil)).Elem()
    +}
    +
    +type QueryVsanUpgradeStatusRequestType struct {
    +	This    ManagedObjectReference `xml:"_this"`
    +	Cluster ManagedObjectReference `xml:"cluster"`
    +}
    +
    +func init() {
    +	t["QueryVsanUpgradeStatusRequestType"] = reflect.TypeOf((*QueryVsanUpgradeStatusRequestType)(nil)).Elem()
    +}
    +
    +type QueryVsanUpgradeStatusResponse struct {
    +	Returnval VsanUpgradeSystemUpgradeStatus `xml:"returnval"`
    +}
    +
    +type QuestionPending struct {
    +	InvalidState
    +
    +	Text string `xml:"text"`
    +}
    +
    +func init() {
    +	t["QuestionPending"] = reflect.TypeOf((*QuestionPending)(nil)).Elem()
    +}
    +
    +type QuestionPendingFault QuestionPending
    +
    +func init() {
    +	t["QuestionPendingFault"] = reflect.TypeOf((*QuestionPendingFault)(nil)).Elem()
    +}
    +
    +type QuiesceDatastoreIOForHAFailed struct {
    +	ResourceInUse
    +
    +	Host     ManagedObjectReference `xml:"host"`
    +	HostName string                 `xml:"hostName"`
    +	Ds       ManagedObjectReference `xml:"ds"`
    +	DsName   string                 `xml:"dsName"`
    +}
    +
    +func init() {
    +	t["QuiesceDatastoreIOForHAFailed"] = reflect.TypeOf((*QuiesceDatastoreIOForHAFailed)(nil)).Elem()
    +}
    +
    +type QuiesceDatastoreIOForHAFailedFault QuiesceDatastoreIOForHAFailed
    +
    +func init() {
    +	t["QuiesceDatastoreIOForHAFailedFault"] = reflect.TypeOf((*QuiesceDatastoreIOForHAFailedFault)(nil)).Elem()
    +}
    +
    +type RDMConversionNotSupported struct {
    +	MigrationFault
    +
    +	Device string `xml:"device"`
    +}
    +
    +func init() {
    +	t["RDMConversionNotSupported"] = reflect.TypeOf((*RDMConversionNotSupported)(nil)).Elem()
    +}
    +
    +type RDMConversionNotSupportedFault RDMConversionNotSupported
    +
    +func init() {
    +	t["RDMConversionNotSupportedFault"] = reflect.TypeOf((*RDMConversionNotSupportedFault)(nil)).Elem()
    +}
    +
    +type RDMNotPreserved struct {
    +	MigrationFault
    +
    +	Device string `xml:"device"`
    +}
    +
    +func init() {
    +	t["RDMNotPreserved"] = reflect.TypeOf((*RDMNotPreserved)(nil)).Elem()
    +}
    +
    +type RDMNotPreservedFault RDMNotPreserved
    +
    +func init() {
    +	t["RDMNotPreservedFault"] = reflect.TypeOf((*RDMNotPreservedFault)(nil)).Elem()
    +}
    +
    +type RDMNotSupported struct {
    +	DeviceNotSupported
    +}
    +
    +func init() {
    +	t["RDMNotSupported"] = reflect.TypeOf((*RDMNotSupported)(nil)).Elem()
    +}
    +
    +type RDMNotSupportedFault BaseRDMNotSupported
    +
    +func init() {
    +	t["RDMNotSupportedFault"] = reflect.TypeOf((*RDMNotSupportedFault)(nil)).Elem()
    +}
    +
    +type RDMNotSupportedOnDatastore struct {
    +	VmConfigFault
    +
    +	Device        string                 `xml:"device"`
    +	Datastore     ManagedObjectReference `xml:"datastore"`
    +	DatastoreName string                 `xml:"datastoreName"`
    +}
    +
    +func init() {
    +	t["RDMNotSupportedOnDatastore"] = reflect.TypeOf((*RDMNotSupportedOnDatastore)(nil)).Elem()
    +}
    +
    +type RDMNotSupportedOnDatastoreFault RDMNotSupportedOnDatastore
    +
    +func init() {
    +	t["RDMNotSupportedOnDatastoreFault"] = reflect.TypeOf((*RDMNotSupportedOnDatastoreFault)(nil)).Elem()
    +}
    +
    +type RDMPointsToInaccessibleDisk struct {
    +	CannotAccessVmDisk
    +}
    +
    +func init() {
    +	t["RDMPointsToInaccessibleDisk"] = reflect.TypeOf((*RDMPointsToInaccessibleDisk)(nil)).Elem()
    +}
    +
    +type RDMPointsToInaccessibleDiskFault RDMPointsToInaccessibleDisk
    +
    +func init() {
    +	t["RDMPointsToInaccessibleDiskFault"] = reflect.TypeOf((*RDMPointsToInaccessibleDiskFault)(nil)).Elem()
    +}
    +
    +type RawDiskNotSupported struct {
    +	DeviceNotSupported
    +}
    +
    +func init() {
    +	t["RawDiskNotSupported"] = reflect.TypeOf((*RawDiskNotSupported)(nil)).Elem()
    +}
    +
    +type RawDiskNotSupportedFault RawDiskNotSupported
    +
    +func init() {
    +	t["RawDiskNotSupportedFault"] = reflect.TypeOf((*RawDiskNotSupportedFault)(nil)).Elem()
    +}
    +
    +type ReadEnvironmentVariableInGuest ReadEnvironmentVariableInGuestRequestType
    +
    +func init() {
    +	t["ReadEnvironmentVariableInGuest"] = reflect.TypeOf((*ReadEnvironmentVariableInGuest)(nil)).Elem()
    +}
    +
    +type ReadEnvironmentVariableInGuestRequestType struct {
    +	This  ManagedObjectReference  `xml:"_this"`
    +	Vm    ManagedObjectReference  `xml:"vm"`
    +	Auth  BaseGuestAuthentication `xml:"auth,typeattr"`
    +	Names []string                `xml:"names,omitempty"`
    +}
    +
    +func init() {
    +	t["ReadEnvironmentVariableInGuestRequestType"] = reflect.TypeOf((*ReadEnvironmentVariableInGuestRequestType)(nil)).Elem()
    +}
    +
    +type ReadEnvironmentVariableInGuestResponse struct {
    +	Returnval []string `xml:"returnval,omitempty"`
    +}
    +
    +type ReadHostResourcePoolTreeFailed struct {
    +	HostConnectFault
    +}
    +
    +func init() {
    +	t["ReadHostResourcePoolTreeFailed"] = reflect.TypeOf((*ReadHostResourcePoolTreeFailed)(nil)).Elem()
    +}
    +
    +type ReadHostResourcePoolTreeFailedFault ReadHostResourcePoolTreeFailed
    +
    +func init() {
    +	t["ReadHostResourcePoolTreeFailedFault"] = reflect.TypeOf((*ReadHostResourcePoolTreeFailedFault)(nil)).Elem()
    +}
    +
    +type ReadNextEvents ReadNextEventsRequestType
    +
    +func init() {
    +	t["ReadNextEvents"] = reflect.TypeOf((*ReadNextEvents)(nil)).Elem()
    +}
    +
    +type ReadNextEventsRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	MaxCount int32                  `xml:"maxCount"`
    +}
    +
    +func init() {
    +	t["ReadNextEventsRequestType"] = reflect.TypeOf((*ReadNextEventsRequestType)(nil)).Elem()
    +}
    +
    +type ReadNextEventsResponse struct {
    +	Returnval []BaseEvent `xml:"returnval,omitempty,typeattr"`
    +}
    +
    +type ReadNextTasks ReadNextTasksRequestType
    +
    +func init() {
    +	t["ReadNextTasks"] = reflect.TypeOf((*ReadNextTasks)(nil)).Elem()
    +}
    +
    +type ReadNextTasksRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	MaxCount int32                  `xml:"maxCount"`
    +}
    +
    +func init() {
    +	t["ReadNextTasksRequestType"] = reflect.TypeOf((*ReadNextTasksRequestType)(nil)).Elem()
    +}
    +
    +type ReadNextTasksResponse struct {
    +	Returnval []TaskInfo `xml:"returnval,omitempty"`
    +}
    +
    +type ReadOnlyDisksWithLegacyDestination struct {
    +	MigrationFault
    +
    +	RoDiskCount   int32 `xml:"roDiskCount"`
    +	TimeoutDanger bool  `xml:"timeoutDanger"`
    +}
    +
    +func init() {
    +	t["ReadOnlyDisksWithLegacyDestination"] = reflect.TypeOf((*ReadOnlyDisksWithLegacyDestination)(nil)).Elem()
    +}
    +
    +type ReadOnlyDisksWithLegacyDestinationFault ReadOnlyDisksWithLegacyDestination
    +
    +func init() {
    +	t["ReadOnlyDisksWithLegacyDestinationFault"] = reflect.TypeOf((*ReadOnlyDisksWithLegacyDestinationFault)(nil)).Elem()
    +}
    +
    +type ReadPreviousEvents ReadPreviousEventsRequestType
    +
    +func init() {
    +	t["ReadPreviousEvents"] = reflect.TypeOf((*ReadPreviousEvents)(nil)).Elem()
    +}
    +
    +type ReadPreviousEventsRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	MaxCount int32                  `xml:"maxCount"`
    +}
    +
    +func init() {
    +	t["ReadPreviousEventsRequestType"] = reflect.TypeOf((*ReadPreviousEventsRequestType)(nil)).Elem()
    +}
    +
    +type ReadPreviousEventsResponse struct {
    +	Returnval []BaseEvent `xml:"returnval,omitempty,typeattr"`
    +}
    +
    +type ReadPreviousTasks ReadPreviousTasksRequestType
    +
    +func init() {
    +	t["ReadPreviousTasks"] = reflect.TypeOf((*ReadPreviousTasks)(nil)).Elem()
    +}
    +
    +type ReadPreviousTasksRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	MaxCount int32                  `xml:"maxCount"`
    +}
    +
    +func init() {
    +	t["ReadPreviousTasksRequestType"] = reflect.TypeOf((*ReadPreviousTasksRequestType)(nil)).Elem()
    +}
    +
    +type ReadPreviousTasksResponse struct {
    +	Returnval []TaskInfo `xml:"returnval,omitempty"`
    +}
    +
    +type RebootGuest RebootGuestRequestType
    +
    +func init() {
    +	t["RebootGuest"] = reflect.TypeOf((*RebootGuest)(nil)).Elem()
    +}
    +
    +type RebootGuestRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["RebootGuestRequestType"] = reflect.TypeOf((*RebootGuestRequestType)(nil)).Elem()
    +}
    +
    +type RebootGuestResponse struct {
    +}
    +
    +type RebootHostRequestType struct {
    +	This  ManagedObjectReference `xml:"_this"`
    +	Force bool                   `xml:"force"`
    +}
    +
    +func init() {
    +	t["RebootHostRequestType"] = reflect.TypeOf((*RebootHostRequestType)(nil)).Elem()
    +}
    +
    +type RebootHost_Task RebootHostRequestType
    +
    +func init() {
    +	t["RebootHost_Task"] = reflect.TypeOf((*RebootHost_Task)(nil)).Elem()
    +}
    +
    +type RebootHost_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type RebootRequired struct {
    +	VimFault
    +
    +	Patch string `xml:"patch,omitempty"`
    +}
    +
    +func init() {
    +	t["RebootRequired"] = reflect.TypeOf((*RebootRequired)(nil)).Elem()
    +}
    +
    +type RebootRequiredFault RebootRequired
    +
    +func init() {
    +	t["RebootRequiredFault"] = reflect.TypeOf((*RebootRequiredFault)(nil)).Elem()
    +}
    +
    +type RecommendDatastores RecommendDatastoresRequestType
    +
    +func init() {
    +	t["RecommendDatastores"] = reflect.TypeOf((*RecommendDatastores)(nil)).Elem()
    +}
    +
    +type RecommendDatastoresRequestType struct {
    +	This        ManagedObjectReference `xml:"_this"`
    +	StorageSpec StoragePlacementSpec   `xml:"storageSpec"`
    +}
    +
    +func init() {
    +	t["RecommendDatastoresRequestType"] = reflect.TypeOf((*RecommendDatastoresRequestType)(nil)).Elem()
    +}
    +
    +type RecommendDatastoresResponse struct {
    +	Returnval StoragePlacementResult `xml:"returnval"`
    +}
    +
    +type RecommendHostsForVm RecommendHostsForVmRequestType
    +
    +func init() {
    +	t["RecommendHostsForVm"] = reflect.TypeOf((*RecommendHostsForVm)(nil)).Elem()
    +}
    +
    +type RecommendHostsForVmRequestType struct {
    +	This ManagedObjectReference  `xml:"_this"`
    +	Vm   ManagedObjectReference  `xml:"vm"`
    +	Pool *ManagedObjectReference `xml:"pool,omitempty"`
    +}
    +
    +func init() {
    +	t["RecommendHostsForVmRequestType"] = reflect.TypeOf((*RecommendHostsForVmRequestType)(nil)).Elem()
    +}
    +
    +type RecommendHostsForVmResponse struct {
    +	Returnval []ClusterHostRecommendation `xml:"returnval,omitempty"`
    +}
    +
    +type RecommissionVsanNodeRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["RecommissionVsanNodeRequestType"] = reflect.TypeOf((*RecommissionVsanNodeRequestType)(nil)).Elem()
    +}
    +
    +type RecommissionVsanNode_Task RecommissionVsanNodeRequestType
    +
    +func init() {
    +	t["RecommissionVsanNode_Task"] = reflect.TypeOf((*RecommissionVsanNode_Task)(nil)).Elem()
    +}
    +
    +type RecommissionVsanNode_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type ReconcileDatastoreInventoryRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	Datastore ManagedObjectReference `xml:"datastore"`
    +}
    +
    +func init() {
    +	t["ReconcileDatastoreInventoryRequestType"] = reflect.TypeOf((*ReconcileDatastoreInventoryRequestType)(nil)).Elem()
    +}
    +
    +type ReconcileDatastoreInventory_Task ReconcileDatastoreInventoryRequestType
    +
    +func init() {
    +	t["ReconcileDatastoreInventory_Task"] = reflect.TypeOf((*ReconcileDatastoreInventory_Task)(nil)).Elem()
    +}
    +
    +type ReconcileDatastoreInventory_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type ReconfigVMRequestType struct {
    +	This ManagedObjectReference   `xml:"_this"`
    +	Spec VirtualMachineConfigSpec `xml:"spec"`
    +}
    +
    +func init() {
    +	t["ReconfigVMRequestType"] = reflect.TypeOf((*ReconfigVMRequestType)(nil)).Elem()
    +}
    +
    +type ReconfigVM_Task ReconfigVMRequestType
    +
    +func init() {
    +	t["ReconfigVM_Task"] = reflect.TypeOf((*ReconfigVM_Task)(nil)).Elem()
    +}
    +
    +type ReconfigVM_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type ReconfigurationSatisfiable ReconfigurationSatisfiableRequestType
    +
    +func init() {
    +	t["ReconfigurationSatisfiable"] = reflect.TypeOf((*ReconfigurationSatisfiable)(nil)).Elem()
    +}
    +
    +type ReconfigurationSatisfiableRequestType struct {
    +	This                 ManagedObjectReference  `xml:"_this"`
    +	Pcbs                 []VsanPolicyChangeBatch `xml:"pcbs"`
    +	IgnoreSatisfiability *bool                   `xml:"ignoreSatisfiability"`
    +}
    +
    +func init() {
    +	t["ReconfigurationSatisfiableRequestType"] = reflect.TypeOf((*ReconfigurationSatisfiableRequestType)(nil)).Elem()
    +}
    +
    +type ReconfigurationSatisfiableResponse struct {
    +	Returnval []VsanPolicySatisfiability `xml:"returnval"`
    +}
    +
    +type ReconfigureAlarm ReconfigureAlarmRequestType
    +
    +func init() {
    +	t["ReconfigureAlarm"] = reflect.TypeOf((*ReconfigureAlarm)(nil)).Elem()
    +}
    +
    +type ReconfigureAlarmRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Spec BaseAlarmSpec          `xml:"spec,typeattr"`
    +}
    +
    +func init() {
    +	t["ReconfigureAlarmRequestType"] = reflect.TypeOf((*ReconfigureAlarmRequestType)(nil)).Elem()
    +}
    +
    +type ReconfigureAlarmResponse struct {
    +}
    +
    +type ReconfigureAutostart ReconfigureAutostartRequestType
    +
    +func init() {
    +	t["ReconfigureAutostart"] = reflect.TypeOf((*ReconfigureAutostart)(nil)).Elem()
    +}
    +
    +type ReconfigureAutostartRequestType struct {
    +	This ManagedObjectReference     `xml:"_this"`
    +	Spec HostAutoStartManagerConfig `xml:"spec"`
    +}
    +
    +func init() {
    +	t["ReconfigureAutostartRequestType"] = reflect.TypeOf((*ReconfigureAutostartRequestType)(nil)).Elem()
    +}
    +
    +type ReconfigureAutostartResponse struct {
    +}
    +
    +type ReconfigureClusterRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	Spec   ClusterConfigSpec      `xml:"spec"`
    +	Modify bool                   `xml:"modify"`
    +}
    +
    +func init() {
    +	t["ReconfigureClusterRequestType"] = reflect.TypeOf((*ReconfigureClusterRequestType)(nil)).Elem()
    +}
    +
    +type ReconfigureCluster_Task ReconfigureClusterRequestType
    +
    +func init() {
    +	t["ReconfigureCluster_Task"] = reflect.TypeOf((*ReconfigureCluster_Task)(nil)).Elem()
    +}
    +
    +type ReconfigureCluster_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type ReconfigureComputeResourceRequestType struct {
    +	This   ManagedObjectReference        `xml:"_this"`
    +	Spec   BaseComputeResourceConfigSpec `xml:"spec,typeattr"`
    +	Modify bool                          `xml:"modify"`
    +}
    +
    +func init() {
    +	t["ReconfigureComputeResourceRequestType"] = reflect.TypeOf((*ReconfigureComputeResourceRequestType)(nil)).Elem()
    +}
    +
    +type ReconfigureComputeResource_Task ReconfigureComputeResourceRequestType
    +
    +func init() {
    +	t["ReconfigureComputeResource_Task"] = reflect.TypeOf((*ReconfigureComputeResource_Task)(nil)).Elem()
    +}
    +
    +type ReconfigureComputeResource_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type ReconfigureDVPortRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Port []DVPortConfigSpec     `xml:"port"`
    +}
    +
    +func init() {
    +	t["ReconfigureDVPortRequestType"] = reflect.TypeOf((*ReconfigureDVPortRequestType)(nil)).Elem()
    +}
    +
    +type ReconfigureDVPort_Task ReconfigureDVPortRequestType
    +
    +func init() {
    +	t["ReconfigureDVPort_Task"] = reflect.TypeOf((*ReconfigureDVPort_Task)(nil)).Elem()
    +}
    +
    +type ReconfigureDVPort_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type ReconfigureDVPortgroupRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Spec DVPortgroupConfigSpec  `xml:"spec"`
    +}
    +
    +func init() {
    +	t["ReconfigureDVPortgroupRequestType"] = reflect.TypeOf((*ReconfigureDVPortgroupRequestType)(nil)).Elem()
    +}
    +
    +type ReconfigureDVPortgroup_Task ReconfigureDVPortgroupRequestType
    +
    +func init() {
    +	t["ReconfigureDVPortgroup_Task"] = reflect.TypeOf((*ReconfigureDVPortgroup_Task)(nil)).Elem()
    +}
    +
    +type ReconfigureDVPortgroup_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type ReconfigureDatacenterRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	Spec   DatacenterConfigSpec   `xml:"spec"`
    +	Modify bool                   `xml:"modify"`
    +}
    +
    +func init() {
    +	t["ReconfigureDatacenterRequestType"] = reflect.TypeOf((*ReconfigureDatacenterRequestType)(nil)).Elem()
    +}
    +
    +type ReconfigureDatacenter_Task ReconfigureDatacenterRequestType
    +
    +func init() {
    +	t["ReconfigureDatacenter_Task"] = reflect.TypeOf((*ReconfigureDatacenter_Task)(nil)).Elem()
    +}
    +
    +type ReconfigureDatacenter_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type ReconfigureDomObject ReconfigureDomObjectRequestType
    +
    +func init() {
    +	t["ReconfigureDomObject"] = reflect.TypeOf((*ReconfigureDomObject)(nil)).Elem()
    +}
    +
    +type ReconfigureDomObjectRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	Uuid   string                 `xml:"uuid"`
    +	Policy string                 `xml:"policy"`
    +}
    +
    +func init() {
    +	t["ReconfigureDomObjectRequestType"] = reflect.TypeOf((*ReconfigureDomObjectRequestType)(nil)).Elem()
    +}
    +
    +type ReconfigureDomObjectResponse struct {
    +}
    +
    +type ReconfigureDvsRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Spec BaseDVSConfigSpec      `xml:"spec,typeattr"`
    +}
    +
    +func init() {
    +	t["ReconfigureDvsRequestType"] = reflect.TypeOf((*ReconfigureDvsRequestType)(nil)).Elem()
    +}
    +
    +type ReconfigureDvs_Task ReconfigureDvsRequestType
    +
    +func init() {
    +	t["ReconfigureDvs_Task"] = reflect.TypeOf((*ReconfigureDvs_Task)(nil)).Elem()
    +}
    +
    +type ReconfigureDvs_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type ReconfigureHostForDASRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["ReconfigureHostForDASRequestType"] = reflect.TypeOf((*ReconfigureHostForDASRequestType)(nil)).Elem()
    +}
    +
    +type ReconfigureHostForDAS_Task ReconfigureHostForDASRequestType
    +
    +func init() {
    +	t["ReconfigureHostForDAS_Task"] = reflect.TypeOf((*ReconfigureHostForDAS_Task)(nil)).Elem()
    +}
    +
    +type ReconfigureHostForDAS_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type ReconfigureScheduledTask ReconfigureScheduledTaskRequestType
    +
    +func init() {
    +	t["ReconfigureScheduledTask"] = reflect.TypeOf((*ReconfigureScheduledTask)(nil)).Elem()
    +}
    +
    +type ReconfigureScheduledTaskRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Spec BaseScheduledTaskSpec  `xml:"spec,typeattr"`
    +}
    +
    +func init() {
    +	t["ReconfigureScheduledTaskRequestType"] = reflect.TypeOf((*ReconfigureScheduledTaskRequestType)(nil)).Elem()
    +}
    +
    +type ReconfigureScheduledTaskResponse struct {
    +}
    +
    +type ReconfigureServiceConsoleReservation ReconfigureServiceConsoleReservationRequestType
    +
    +func init() {
    +	t["ReconfigureServiceConsoleReservation"] = reflect.TypeOf((*ReconfigureServiceConsoleReservation)(nil)).Elem()
    +}
    +
    +type ReconfigureServiceConsoleReservationRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	CfgBytes int64                  `xml:"cfgBytes"`
    +}
    +
    +func init() {
    +	t["ReconfigureServiceConsoleReservationRequestType"] = reflect.TypeOf((*ReconfigureServiceConsoleReservationRequestType)(nil)).Elem()
    +}
    +
    +type ReconfigureServiceConsoleReservationResponse struct {
    +}
    +
    +type ReconfigureSnmpAgent ReconfigureSnmpAgentRequestType
    +
    +func init() {
    +	t["ReconfigureSnmpAgent"] = reflect.TypeOf((*ReconfigureSnmpAgent)(nil)).Elem()
    +}
    +
    +type ReconfigureSnmpAgentRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Spec HostSnmpConfigSpec     `xml:"spec"`
    +}
    +
    +func init() {
    +	t["ReconfigureSnmpAgentRequestType"] = reflect.TypeOf((*ReconfigureSnmpAgentRequestType)(nil)).Elem()
    +}
    +
    +type ReconfigureSnmpAgentResponse struct {
    +}
    +
    +type ReconfigureVirtualMachineReservation ReconfigureVirtualMachineReservationRequestType
    +
    +func init() {
    +	t["ReconfigureVirtualMachineReservation"] = reflect.TypeOf((*ReconfigureVirtualMachineReservation)(nil)).Elem()
    +}
    +
    +type ReconfigureVirtualMachineReservationRequestType struct {
    +	This ManagedObjectReference              `xml:"_this"`
    +	Spec VirtualMachineMemoryReservationSpec `xml:"spec"`
    +}
    +
    +func init() {
    +	t["ReconfigureVirtualMachineReservationRequestType"] = reflect.TypeOf((*ReconfigureVirtualMachineReservationRequestType)(nil)).Elem()
    +}
    +
    +type ReconfigureVirtualMachineReservationResponse struct {
    +}
    +
    +type ReconnectHostRequestType struct {
    +	This          ManagedObjectReference   `xml:"_this"`
    +	CnxSpec       *HostConnectSpec         `xml:"cnxSpec,omitempty"`
    +	ReconnectSpec *HostSystemReconnectSpec `xml:"reconnectSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["ReconnectHostRequestType"] = reflect.TypeOf((*ReconnectHostRequestType)(nil)).Elem()
    +}
    +
    +type ReconnectHost_Task ReconnectHostRequestType
    +
    +func init() {
    +	t["ReconnectHost_Task"] = reflect.TypeOf((*ReconnectHost_Task)(nil)).Elem()
    +}
    +
    +type ReconnectHost_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type RecordReplayDisabled struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["RecordReplayDisabled"] = reflect.TypeOf((*RecordReplayDisabled)(nil)).Elem()
    +}
    +
    +type RecordReplayDisabledFault RecordReplayDisabled
    +
    +func init() {
    +	t["RecordReplayDisabledFault"] = reflect.TypeOf((*RecordReplayDisabledFault)(nil)).Elem()
    +}
    +
    +type RecoveryEvent struct {
    +	DvsEvent
    +
    +	HostName string `xml:"hostName"`
    +	PortKey  string `xml:"portKey"`
    +	DvsUuid  string `xml:"dvsUuid,omitempty"`
    +	Vnic     string `xml:"vnic,omitempty"`
    +}
    +
    +func init() {
    +	t["RecoveryEvent"] = reflect.TypeOf((*RecoveryEvent)(nil)).Elem()
    +}
    +
    +type RectifyDvsHostRequestType struct {
    +	This  ManagedObjectReference   `xml:"_this"`
    +	Hosts []ManagedObjectReference `xml:"hosts,omitempty"`
    +}
    +
    +func init() {
    +	t["RectifyDvsHostRequestType"] = reflect.TypeOf((*RectifyDvsHostRequestType)(nil)).Elem()
    +}
    +
    +type RectifyDvsHost_Task RectifyDvsHostRequestType
    +
    +func init() {
    +	t["RectifyDvsHost_Task"] = reflect.TypeOf((*RectifyDvsHost_Task)(nil)).Elem()
    +}
    +
    +type RectifyDvsHost_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type RectifyDvsOnHostRequestType struct {
    +	This  ManagedObjectReference   `xml:"_this"`
    +	Hosts []ManagedObjectReference `xml:"hosts"`
    +}
    +
    +func init() {
    +	t["RectifyDvsOnHostRequestType"] = reflect.TypeOf((*RectifyDvsOnHostRequestType)(nil)).Elem()
    +}
    +
    +type RectifyDvsOnHost_Task RectifyDvsOnHostRequestType
    +
    +func init() {
    +	t["RectifyDvsOnHost_Task"] = reflect.TypeOf((*RectifyDvsOnHost_Task)(nil)).Elem()
    +}
    +
    +type RectifyDvsOnHost_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type RecurrentTaskScheduler struct {
    +	TaskScheduler
    +
    +	Interval int32 `xml:"interval"`
    +}
    +
    +func init() {
    +	t["RecurrentTaskScheduler"] = reflect.TypeOf((*RecurrentTaskScheduler)(nil)).Elem()
    +}
    +
    +type Refresh RefreshRequestType
    +
    +func init() {
    +	t["Refresh"] = reflect.TypeOf((*Refresh)(nil)).Elem()
    +}
    +
    +type RefreshDVPortState RefreshDVPortStateRequestType
    +
    +func init() {
    +	t["RefreshDVPortState"] = reflect.TypeOf((*RefreshDVPortState)(nil)).Elem()
    +}
    +
    +type RefreshDVPortStateRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	PortKeys []string               `xml:"portKeys,omitempty"`
    +}
    +
    +func init() {
    +	t["RefreshDVPortStateRequestType"] = reflect.TypeOf((*RefreshDVPortStateRequestType)(nil)).Elem()
    +}
    +
    +type RefreshDVPortStateResponse struct {
    +}
    +
    +type RefreshDatastore RefreshDatastoreRequestType
    +
    +func init() {
    +	t["RefreshDatastore"] = reflect.TypeOf((*RefreshDatastore)(nil)).Elem()
    +}
    +
    +type RefreshDatastoreRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["RefreshDatastoreRequestType"] = reflect.TypeOf((*RefreshDatastoreRequestType)(nil)).Elem()
    +}
    +
    +type RefreshDatastoreResponse struct {
    +}
    +
    +type RefreshDatastoreStorageInfo RefreshDatastoreStorageInfoRequestType
    +
    +func init() {
    +	t["RefreshDatastoreStorageInfo"] = reflect.TypeOf((*RefreshDatastoreStorageInfo)(nil)).Elem()
    +}
    +
    +type RefreshDatastoreStorageInfoRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["RefreshDatastoreStorageInfoRequestType"] = reflect.TypeOf((*RefreshDatastoreStorageInfoRequestType)(nil)).Elem()
    +}
    +
    +type RefreshDatastoreStorageInfoResponse struct {
    +}
    +
    +type RefreshDateTimeSystem RefreshDateTimeSystemRequestType
    +
    +func init() {
    +	t["RefreshDateTimeSystem"] = reflect.TypeOf((*RefreshDateTimeSystem)(nil)).Elem()
    +}
    +
    +type RefreshDateTimeSystemRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["RefreshDateTimeSystemRequestType"] = reflect.TypeOf((*RefreshDateTimeSystemRequestType)(nil)).Elem()
    +}
    +
    +type RefreshDateTimeSystemResponse struct {
    +}
    +
    +type RefreshFirewall RefreshFirewallRequestType
    +
    +func init() {
    +	t["RefreshFirewall"] = reflect.TypeOf((*RefreshFirewall)(nil)).Elem()
    +}
    +
    +type RefreshFirewallRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["RefreshFirewallRequestType"] = reflect.TypeOf((*RefreshFirewallRequestType)(nil)).Elem()
    +}
    +
    +type RefreshFirewallResponse struct {
    +}
    +
    +type RefreshGraphicsManager RefreshGraphicsManagerRequestType
    +
    +func init() {
    +	t["RefreshGraphicsManager"] = reflect.TypeOf((*RefreshGraphicsManager)(nil)).Elem()
    +}
    +
    +type RefreshGraphicsManagerRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["RefreshGraphicsManagerRequestType"] = reflect.TypeOf((*RefreshGraphicsManagerRequestType)(nil)).Elem()
    +}
    +
    +type RefreshGraphicsManagerResponse struct {
    +}
    +
    +type RefreshHealthStatusSystem RefreshHealthStatusSystemRequestType
    +
    +func init() {
    +	t["RefreshHealthStatusSystem"] = reflect.TypeOf((*RefreshHealthStatusSystem)(nil)).Elem()
    +}
    +
    +type RefreshHealthStatusSystemRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["RefreshHealthStatusSystemRequestType"] = reflect.TypeOf((*RefreshHealthStatusSystemRequestType)(nil)).Elem()
    +}
    +
    +type RefreshHealthStatusSystemResponse struct {
    +}
    +
    +type RefreshNetworkSystem RefreshNetworkSystemRequestType
    +
    +func init() {
    +	t["RefreshNetworkSystem"] = reflect.TypeOf((*RefreshNetworkSystem)(nil)).Elem()
    +}
    +
    +type RefreshNetworkSystemRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["RefreshNetworkSystemRequestType"] = reflect.TypeOf((*RefreshNetworkSystemRequestType)(nil)).Elem()
    +}
    +
    +type RefreshNetworkSystemResponse struct {
    +}
    +
    +type RefreshRecommendation RefreshRecommendationRequestType
    +
    +func init() {
    +	t["RefreshRecommendation"] = reflect.TypeOf((*RefreshRecommendation)(nil)).Elem()
    +}
    +
    +type RefreshRecommendationRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["RefreshRecommendationRequestType"] = reflect.TypeOf((*RefreshRecommendationRequestType)(nil)).Elem()
    +}
    +
    +type RefreshRecommendationResponse struct {
    +}
    +
    +type RefreshRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["RefreshRequestType"] = reflect.TypeOf((*RefreshRequestType)(nil)).Elem()
    +}
    +
    +type RefreshResponse struct {
    +}
    +
    +type RefreshRuntime RefreshRuntimeRequestType
    +
    +func init() {
    +	t["RefreshRuntime"] = reflect.TypeOf((*RefreshRuntime)(nil)).Elem()
    +}
    +
    +type RefreshRuntimeRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["RefreshRuntimeRequestType"] = reflect.TypeOf((*RefreshRuntimeRequestType)(nil)).Elem()
    +}
    +
    +type RefreshRuntimeResponse struct {
    +}
    +
    +type RefreshServices RefreshServicesRequestType
    +
    +func init() {
    +	t["RefreshServices"] = reflect.TypeOf((*RefreshServices)(nil)).Elem()
    +}
    +
    +type RefreshServicesRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["RefreshServicesRequestType"] = reflect.TypeOf((*RefreshServicesRequestType)(nil)).Elem()
    +}
    +
    +type RefreshServicesResponse struct {
    +}
    +
    +type RefreshStorageDrsRecommendation RefreshStorageDrsRecommendationRequestType
    +
    +func init() {
    +	t["RefreshStorageDrsRecommendation"] = reflect.TypeOf((*RefreshStorageDrsRecommendation)(nil)).Elem()
    +}
    +
    +type RefreshStorageDrsRecommendationRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Pod  ManagedObjectReference `xml:"pod"`
    +}
    +
    +func init() {
    +	t["RefreshStorageDrsRecommendationRequestType"] = reflect.TypeOf((*RefreshStorageDrsRecommendationRequestType)(nil)).Elem()
    +}
    +
    +type RefreshStorageDrsRecommendationResponse struct {
    +}
    +
    +type RefreshStorageDrsRecommendationsForPodRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Pod  ManagedObjectReference `xml:"pod"`
    +}
    +
    +func init() {
    +	t["RefreshStorageDrsRecommendationsForPodRequestType"] = reflect.TypeOf((*RefreshStorageDrsRecommendationsForPodRequestType)(nil)).Elem()
    +}
    +
    +type RefreshStorageDrsRecommendationsForPod_Task RefreshStorageDrsRecommendationsForPodRequestType
    +
    +func init() {
    +	t["RefreshStorageDrsRecommendationsForPod_Task"] = reflect.TypeOf((*RefreshStorageDrsRecommendationsForPod_Task)(nil)).Elem()
    +}
    +
    +type RefreshStorageDrsRecommendationsForPod_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type RefreshStorageInfo RefreshStorageInfoRequestType
    +
    +func init() {
    +	t["RefreshStorageInfo"] = reflect.TypeOf((*RefreshStorageInfo)(nil)).Elem()
    +}
    +
    +type RefreshStorageInfoRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["RefreshStorageInfoRequestType"] = reflect.TypeOf((*RefreshStorageInfoRequestType)(nil)).Elem()
    +}
    +
    +type RefreshStorageInfoResponse struct {
    +}
    +
    +type RefreshStorageSystem RefreshStorageSystemRequestType
    +
    +func init() {
    +	t["RefreshStorageSystem"] = reflect.TypeOf((*RefreshStorageSystem)(nil)).Elem()
    +}
    +
    +type RefreshStorageSystemRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["RefreshStorageSystemRequestType"] = reflect.TypeOf((*RefreshStorageSystemRequestType)(nil)).Elem()
    +}
    +
    +type RefreshStorageSystemResponse struct {
    +}
    +
    +type RegisterChildVMRequestType struct {
    +	This ManagedObjectReference  `xml:"_this"`
    +	Path string                  `xml:"path"`
    +	Name string                  `xml:"name,omitempty"`
    +	Host *ManagedObjectReference `xml:"host,omitempty"`
    +}
    +
    +func init() {
    +	t["RegisterChildVMRequestType"] = reflect.TypeOf((*RegisterChildVMRequestType)(nil)).Elem()
    +}
    +
    +type RegisterChildVM_Task RegisterChildVMRequestType
    +
    +func init() {
    +	t["RegisterChildVM_Task"] = reflect.TypeOf((*RegisterChildVM_Task)(nil)).Elem()
    +}
    +
    +type RegisterChildVM_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type RegisterDisk RegisterDiskRequestType
    +
    +func init() {
    +	t["RegisterDisk"] = reflect.TypeOf((*RegisterDisk)(nil)).Elem()
    +}
    +
    +type RegisterDiskRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Path string                 `xml:"path"`
    +	Name string                 `xml:"name,omitempty"`
    +}
    +
    +func init() {
    +	t["RegisterDiskRequestType"] = reflect.TypeOf((*RegisterDiskRequestType)(nil)).Elem()
    +}
    +
    +type RegisterDiskResponse struct {
    +	Returnval VStorageObject `xml:"returnval"`
    +}
    +
    +type RegisterExtension RegisterExtensionRequestType
    +
    +func init() {
    +	t["RegisterExtension"] = reflect.TypeOf((*RegisterExtension)(nil)).Elem()
    +}
    +
    +type RegisterExtensionRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	Extension Extension              `xml:"extension"`
    +}
    +
    +func init() {
    +	t["RegisterExtensionRequestType"] = reflect.TypeOf((*RegisterExtensionRequestType)(nil)).Elem()
    +}
    +
    +type RegisterExtensionResponse struct {
    +}
    +
    +type RegisterHealthUpdateProvider RegisterHealthUpdateProviderRequestType
    +
    +func init() {
    +	t["RegisterHealthUpdateProvider"] = reflect.TypeOf((*RegisterHealthUpdateProvider)(nil)).Elem()
    +}
    +
    +type RegisterHealthUpdateProviderRequestType struct {
    +	This             ManagedObjectReference `xml:"_this"`
    +	Name             string                 `xml:"name"`
    +	HealthUpdateInfo []HealthUpdateInfo     `xml:"healthUpdateInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["RegisterHealthUpdateProviderRequestType"] = reflect.TypeOf((*RegisterHealthUpdateProviderRequestType)(nil)).Elem()
    +}
    +
    +type RegisterHealthUpdateProviderResponse struct {
    +	Returnval string `xml:"returnval"`
    +}
    +
    +type RegisterKmipServer RegisterKmipServerRequestType
    +
    +func init() {
    +	t["RegisterKmipServer"] = reflect.TypeOf((*RegisterKmipServer)(nil)).Elem()
    +}
    +
    +type RegisterKmipServerRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	Server KmipServerSpec         `xml:"server"`
    +}
    +
    +func init() {
    +	t["RegisterKmipServerRequestType"] = reflect.TypeOf((*RegisterKmipServerRequestType)(nil)).Elem()
    +}
    +
    +type RegisterKmipServerResponse struct {
    +}
    +
    +type RegisterVMRequestType struct {
    +	This       ManagedObjectReference  `xml:"_this"`
    +	Path       string                  `xml:"path"`
    +	Name       string                  `xml:"name,omitempty"`
    +	AsTemplate bool                    `xml:"asTemplate"`
    +	Pool       *ManagedObjectReference `xml:"pool,omitempty"`
    +	Host       *ManagedObjectReference `xml:"host,omitempty"`
    +}
    +
    +func init() {
    +	t["RegisterVMRequestType"] = reflect.TypeOf((*RegisterVMRequestType)(nil)).Elem()
    +}
    +
    +type RegisterVM_Task RegisterVMRequestType
    +
    +func init() {
    +	t["RegisterVM_Task"] = reflect.TypeOf((*RegisterVM_Task)(nil)).Elem()
    +}
    +
    +type RegisterVM_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type Relation struct {
    +	DynamicData
    +
    +	Constraint string `xml:"constraint,omitempty"`
    +	Name       string `xml:"name"`
    +	Version    string `xml:"version,omitempty"`
    +}
    +
    +func init() {
    +	t["Relation"] = reflect.TypeOf((*Relation)(nil)).Elem()
    +}
    +
    +type ReleaseCredentialsInGuest ReleaseCredentialsInGuestRequestType
    +
    +func init() {
    +	t["ReleaseCredentialsInGuest"] = reflect.TypeOf((*ReleaseCredentialsInGuest)(nil)).Elem()
    +}
    +
    +type ReleaseCredentialsInGuestRequestType struct {
    +	This ManagedObjectReference  `xml:"_this"`
    +	Vm   ManagedObjectReference  `xml:"vm"`
    +	Auth BaseGuestAuthentication `xml:"auth,typeattr"`
    +}
    +
    +func init() {
    +	t["ReleaseCredentialsInGuestRequestType"] = reflect.TypeOf((*ReleaseCredentialsInGuestRequestType)(nil)).Elem()
    +}
    +
    +type ReleaseCredentialsInGuestResponse struct {
    +}
    +
    +type ReleaseIpAllocation ReleaseIpAllocationRequestType
    +
    +func init() {
    +	t["ReleaseIpAllocation"] = reflect.TypeOf((*ReleaseIpAllocation)(nil)).Elem()
    +}
    +
    +type ReleaseIpAllocationRequestType struct {
    +	This         ManagedObjectReference `xml:"_this"`
    +	Dc           ManagedObjectReference `xml:"dc"`
    +	PoolId       int32                  `xml:"poolId"`
    +	AllocationId string                 `xml:"allocationId"`
    +}
    +
    +func init() {
    +	t["ReleaseIpAllocationRequestType"] = reflect.TypeOf((*ReleaseIpAllocationRequestType)(nil)).Elem()
    +}
    +
    +type ReleaseIpAllocationResponse struct {
    +}
    +
    +type ReleaseManagedSnapshot ReleaseManagedSnapshotRequestType
    +
    +func init() {
    +	t["ReleaseManagedSnapshot"] = reflect.TypeOf((*ReleaseManagedSnapshot)(nil)).Elem()
    +}
    +
    +type ReleaseManagedSnapshotRequestType struct {
    +	This       ManagedObjectReference  `xml:"_this"`
    +	Vdisk      string                  `xml:"vdisk"`
    +	Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"`
    +}
    +
    +func init() {
    +	t["ReleaseManagedSnapshotRequestType"] = reflect.TypeOf((*ReleaseManagedSnapshotRequestType)(nil)).Elem()
    +}
    +
    +type ReleaseManagedSnapshotResponse struct {
    +}
    +
    +type Reload ReloadRequestType
    +
    +func init() {
    +	t["Reload"] = reflect.TypeOf((*Reload)(nil)).Elem()
    +}
    +
    +type ReloadRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["ReloadRequestType"] = reflect.TypeOf((*ReloadRequestType)(nil)).Elem()
    +}
    +
    +type ReloadResponse struct {
    +}
    +
    +type RelocateVMRequestType struct {
    +	This     ManagedObjectReference     `xml:"_this"`
    +	Spec     VirtualMachineRelocateSpec `xml:"spec"`
    +	Priority VirtualMachineMovePriority `xml:"priority,omitempty"`
    +}
    +
    +func init() {
    +	t["RelocateVMRequestType"] = reflect.TypeOf((*RelocateVMRequestType)(nil)).Elem()
    +}
    +
    +type RelocateVM_Task RelocateVMRequestType
    +
    +func init() {
    +	t["RelocateVM_Task"] = reflect.TypeOf((*RelocateVM_Task)(nil)).Elem()
    +}
    +
    +type RelocateVM_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type RelocateVStorageObjectRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	Id        ID                     `xml:"id"`
    +	Datastore ManagedObjectReference `xml:"datastore"`
    +	Spec      VslmRelocateSpec       `xml:"spec"`
    +}
    +
    +func init() {
    +	t["RelocateVStorageObjectRequestType"] = reflect.TypeOf((*RelocateVStorageObjectRequestType)(nil)).Elem()
    +}
    +
    +type RelocateVStorageObject_Task RelocateVStorageObjectRequestType
    +
    +func init() {
    +	t["RelocateVStorageObject_Task"] = reflect.TypeOf((*RelocateVStorageObject_Task)(nil)).Elem()
    +}
    +
    +type RelocateVStorageObject_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type RemoteDeviceNotSupported struct {
    +	DeviceNotSupported
    +}
    +
    +func init() {
    +	t["RemoteDeviceNotSupported"] = reflect.TypeOf((*RemoteDeviceNotSupported)(nil)).Elem()
    +}
    +
    +type RemoteDeviceNotSupportedFault RemoteDeviceNotSupported
    +
    +func init() {
    +	t["RemoteDeviceNotSupportedFault"] = reflect.TypeOf((*RemoteDeviceNotSupportedFault)(nil)).Elem()
    +}
    +
    +type RemoteTSMEnabledEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["RemoteTSMEnabledEvent"] = reflect.TypeOf((*RemoteTSMEnabledEvent)(nil)).Elem()
    +}
    +
    +type RemoveAlarm RemoveAlarmRequestType
    +
    +func init() {
    +	t["RemoveAlarm"] = reflect.TypeOf((*RemoveAlarm)(nil)).Elem()
    +}
    +
    +type RemoveAlarmRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["RemoveAlarmRequestType"] = reflect.TypeOf((*RemoveAlarmRequestType)(nil)).Elem()
    +}
    +
    +type RemoveAlarmResponse struct {
    +}
    +
    +type RemoveAllSnapshotsRequestType struct {
    +	This        ManagedObjectReference `xml:"_this"`
    +	Consolidate *bool                  `xml:"consolidate"`
    +}
    +
    +func init() {
    +	t["RemoveAllSnapshotsRequestType"] = reflect.TypeOf((*RemoveAllSnapshotsRequestType)(nil)).Elem()
    +}
    +
    +type RemoveAllSnapshots_Task RemoveAllSnapshotsRequestType
    +
    +func init() {
    +	t["RemoveAllSnapshots_Task"] = reflect.TypeOf((*RemoveAllSnapshots_Task)(nil)).Elem()
    +}
    +
    +type RemoveAllSnapshots_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type RemoveAssignedLicense RemoveAssignedLicenseRequestType
    +
    +func init() {
    +	t["RemoveAssignedLicense"] = reflect.TypeOf((*RemoveAssignedLicense)(nil)).Elem()
    +}
    +
    +type RemoveAssignedLicenseRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	EntityId string                 `xml:"entityId"`
    +}
    +
    +func init() {
    +	t["RemoveAssignedLicenseRequestType"] = reflect.TypeOf((*RemoveAssignedLicenseRequestType)(nil)).Elem()
    +}
    +
    +type RemoveAssignedLicenseResponse struct {
    +}
    +
    +type RemoveAuthorizationRole RemoveAuthorizationRoleRequestType
    +
    +func init() {
    +	t["RemoveAuthorizationRole"] = reflect.TypeOf((*RemoveAuthorizationRole)(nil)).Elem()
    +}
    +
    +type RemoveAuthorizationRoleRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	RoleId     int32                  `xml:"roleId"`
    +	FailIfUsed bool                   `xml:"failIfUsed"`
    +}
    +
    +func init() {
    +	t["RemoveAuthorizationRoleRequestType"] = reflect.TypeOf((*RemoveAuthorizationRoleRequestType)(nil)).Elem()
    +}
    +
    +type RemoveAuthorizationRoleResponse struct {
    +}
    +
    +type RemoveCustomFieldDef RemoveCustomFieldDefRequestType
    +
    +func init() {
    +	t["RemoveCustomFieldDef"] = reflect.TypeOf((*RemoveCustomFieldDef)(nil)).Elem()
    +}
    +
    +type RemoveCustomFieldDefRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Key  int32                  `xml:"key"`
    +}
    +
    +func init() {
    +	t["RemoveCustomFieldDefRequestType"] = reflect.TypeOf((*RemoveCustomFieldDefRequestType)(nil)).Elem()
    +}
    +
    +type RemoveCustomFieldDefResponse struct {
    +}
    +
    +type RemoveDatastore RemoveDatastoreRequestType
    +
    +func init() {
    +	t["RemoveDatastore"] = reflect.TypeOf((*RemoveDatastore)(nil)).Elem()
    +}
    +
    +type RemoveDatastoreExRequestType struct {
    +	This      ManagedObjectReference   `xml:"_this"`
    +	Datastore []ManagedObjectReference `xml:"datastore"`
    +}
    +
    +func init() {
    +	t["RemoveDatastoreExRequestType"] = reflect.TypeOf((*RemoveDatastoreExRequestType)(nil)).Elem()
    +}
    +
    +type RemoveDatastoreEx_Task RemoveDatastoreExRequestType
    +
    +func init() {
    +	t["RemoveDatastoreEx_Task"] = reflect.TypeOf((*RemoveDatastoreEx_Task)(nil)).Elem()
    +}
    +
    +type RemoveDatastoreEx_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type RemoveDatastoreRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	Datastore ManagedObjectReference `xml:"datastore"`
    +}
    +
    +func init() {
    +	t["RemoveDatastoreRequestType"] = reflect.TypeOf((*RemoveDatastoreRequestType)(nil)).Elem()
    +}
    +
    +type RemoveDatastoreResponse struct {
    +}
    +
    +type RemoveDiskMappingRequestType struct {
    +	This            ManagedObjectReference `xml:"_this"`
    +	Mapping         []VsanHostDiskMapping  `xml:"mapping"`
    +	MaintenanceSpec *HostMaintenanceSpec   `xml:"maintenanceSpec,omitempty"`
    +	Timeout         int32                  `xml:"timeout,omitempty"`
    +}
    +
    +func init() {
    +	t["RemoveDiskMappingRequestType"] = reflect.TypeOf((*RemoveDiskMappingRequestType)(nil)).Elem()
    +}
    +
    +type RemoveDiskMapping_Task RemoveDiskMappingRequestType
    +
    +func init() {
    +	t["RemoveDiskMapping_Task"] = reflect.TypeOf((*RemoveDiskMapping_Task)(nil)).Elem()
    +}
    +
    +type RemoveDiskMapping_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type RemoveDiskRequestType struct {
    +	This            ManagedObjectReference `xml:"_this"`
    +	Disk            []HostScsiDisk         `xml:"disk"`
    +	MaintenanceSpec *HostMaintenanceSpec   `xml:"maintenanceSpec,omitempty"`
    +	Timeout         int32                  `xml:"timeout,omitempty"`
    +}
    +
    +func init() {
    +	t["RemoveDiskRequestType"] = reflect.TypeOf((*RemoveDiskRequestType)(nil)).Elem()
    +}
    +
    +type RemoveDisk_Task RemoveDiskRequestType
    +
    +func init() {
    +	t["RemoveDisk_Task"] = reflect.TypeOf((*RemoveDisk_Task)(nil)).Elem()
    +}
    +
    +type RemoveDisk_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type RemoveEntityPermission RemoveEntityPermissionRequestType
    +
    +func init() {
    +	t["RemoveEntityPermission"] = reflect.TypeOf((*RemoveEntityPermission)(nil)).Elem()
    +}
    +
    +type RemoveEntityPermissionRequestType struct {
    +	This    ManagedObjectReference `xml:"_this"`
    +	Entity  ManagedObjectReference `xml:"entity"`
    +	User    string                 `xml:"user"`
    +	IsGroup bool                   `xml:"isGroup"`
    +}
    +
    +func init() {
    +	t["RemoveEntityPermissionRequestType"] = reflect.TypeOf((*RemoveEntityPermissionRequestType)(nil)).Elem()
    +}
    +
    +type RemoveEntityPermissionResponse struct {
    +}
    +
    +type RemoveFailed struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["RemoveFailed"] = reflect.TypeOf((*RemoveFailed)(nil)).Elem()
    +}
    +
    +type RemoveFailedFault RemoveFailed
    +
    +func init() {
    +	t["RemoveFailedFault"] = reflect.TypeOf((*RemoveFailedFault)(nil)).Elem()
    +}
    +
    +type RemoveFilter RemoveFilterRequestType
    +
    +func init() {
    +	t["RemoveFilter"] = reflect.TypeOf((*RemoveFilter)(nil)).Elem()
    +}
    +
    +type RemoveFilterEntities RemoveFilterEntitiesRequestType
    +
    +func init() {
    +	t["RemoveFilterEntities"] = reflect.TypeOf((*RemoveFilterEntities)(nil)).Elem()
    +}
    +
    +type RemoveFilterEntitiesRequestType struct {
    +	This     ManagedObjectReference   `xml:"_this"`
    +	FilterId string                   `xml:"filterId"`
    +	Entities []ManagedObjectReference `xml:"entities,omitempty"`
    +}
    +
    +func init() {
    +	t["RemoveFilterEntitiesRequestType"] = reflect.TypeOf((*RemoveFilterEntitiesRequestType)(nil)).Elem()
    +}
    +
    +type RemoveFilterEntitiesResponse struct {
    +}
    +
    +type RemoveFilterRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	FilterId string                 `xml:"filterId"`
    +}
    +
    +func init() {
    +	t["RemoveFilterRequestType"] = reflect.TypeOf((*RemoveFilterRequestType)(nil)).Elem()
    +}
    +
    +type RemoveFilterResponse struct {
    +}
    +
    +type RemoveGroup RemoveGroupRequestType
    +
    +func init() {
    +	t["RemoveGroup"] = reflect.TypeOf((*RemoveGroup)(nil)).Elem()
    +}
    +
    +type RemoveGroupRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	GroupName string                 `xml:"groupName"`
    +}
    +
    +func init() {
    +	t["RemoveGroupRequestType"] = reflect.TypeOf((*RemoveGroupRequestType)(nil)).Elem()
    +}
    +
    +type RemoveGroupResponse struct {
    +}
    +
    +type RemoveGuestAlias RemoveGuestAliasRequestType
    +
    +func init() {
    +	t["RemoveGuestAlias"] = reflect.TypeOf((*RemoveGuestAlias)(nil)).Elem()
    +}
    +
    +type RemoveGuestAliasByCert RemoveGuestAliasByCertRequestType
    +
    +func init() {
    +	t["RemoveGuestAliasByCert"] = reflect.TypeOf((*RemoveGuestAliasByCert)(nil)).Elem()
    +}
    +
    +type RemoveGuestAliasByCertRequestType struct {
    +	This       ManagedObjectReference  `xml:"_this"`
    +	Vm         ManagedObjectReference  `xml:"vm"`
    +	Auth       BaseGuestAuthentication `xml:"auth,typeattr"`
    +	Username   string                  `xml:"username"`
    +	Base64Cert string                  `xml:"base64Cert"`
    +}
    +
    +func init() {
    +	t["RemoveGuestAliasByCertRequestType"] = reflect.TypeOf((*RemoveGuestAliasByCertRequestType)(nil)).Elem()
    +}
    +
    +type RemoveGuestAliasByCertResponse struct {
    +}
    +
    +type RemoveGuestAliasRequestType struct {
    +	This       ManagedObjectReference  `xml:"_this"`
    +	Vm         ManagedObjectReference  `xml:"vm"`
    +	Auth       BaseGuestAuthentication `xml:"auth,typeattr"`
    +	Username   string                  `xml:"username"`
    +	Base64Cert string                  `xml:"base64Cert"`
    +	Subject    BaseGuestAuthSubject    `xml:"subject,typeattr"`
    +}
    +
    +func init() {
    +	t["RemoveGuestAliasRequestType"] = reflect.TypeOf((*RemoveGuestAliasRequestType)(nil)).Elem()
    +}
    +
    +type RemoveGuestAliasResponse struct {
    +}
    +
    +type RemoveInternetScsiSendTargets RemoveInternetScsiSendTargetsRequestType
    +
    +func init() {
    +	t["RemoveInternetScsiSendTargets"] = reflect.TypeOf((*RemoveInternetScsiSendTargets)(nil)).Elem()
    +}
    +
    +type RemoveInternetScsiSendTargetsRequestType struct {
    +	This           ManagedObjectReference          `xml:"_this"`
    +	IScsiHbaDevice string                          `xml:"iScsiHbaDevice"`
    +	Targets        []HostInternetScsiHbaSendTarget `xml:"targets"`
    +}
    +
    +func init() {
    +	t["RemoveInternetScsiSendTargetsRequestType"] = reflect.TypeOf((*RemoveInternetScsiSendTargetsRequestType)(nil)).Elem()
    +}
    +
    +type RemoveInternetScsiSendTargetsResponse struct {
    +}
    +
    +type RemoveInternetScsiStaticTargets RemoveInternetScsiStaticTargetsRequestType
    +
    +func init() {
    +	t["RemoveInternetScsiStaticTargets"] = reflect.TypeOf((*RemoveInternetScsiStaticTargets)(nil)).Elem()
    +}
    +
    +type RemoveInternetScsiStaticTargetsRequestType struct {
    +	This           ManagedObjectReference            `xml:"_this"`
    +	IScsiHbaDevice string                            `xml:"iScsiHbaDevice"`
    +	Targets        []HostInternetScsiHbaStaticTarget `xml:"targets"`
    +}
    +
    +func init() {
    +	t["RemoveInternetScsiStaticTargetsRequestType"] = reflect.TypeOf((*RemoveInternetScsiStaticTargetsRequestType)(nil)).Elem()
    +}
    +
    +type RemoveInternetScsiStaticTargetsResponse struct {
    +}
    +
    +type RemoveKey RemoveKeyRequestType
    +
    +func init() {
    +	t["RemoveKey"] = reflect.TypeOf((*RemoveKey)(nil)).Elem()
    +}
    +
    +type RemoveKeyRequestType struct {
    +	This  ManagedObjectReference `xml:"_this"`
    +	Key   CryptoKeyId            `xml:"key"`
    +	Force bool                   `xml:"force"`
    +}
    +
    +func init() {
    +	t["RemoveKeyRequestType"] = reflect.TypeOf((*RemoveKeyRequestType)(nil)).Elem()
    +}
    +
    +type RemoveKeyResponse struct {
    +}
    +
    +type RemoveKeys RemoveKeysRequestType
    +
    +func init() {
    +	t["RemoveKeys"] = reflect.TypeOf((*RemoveKeys)(nil)).Elem()
    +}
    +
    +type RemoveKeysRequestType struct {
    +	This  ManagedObjectReference `xml:"_this"`
    +	Keys  []CryptoKeyId          `xml:"keys,omitempty"`
    +	Force bool                   `xml:"force"`
    +}
    +
    +func init() {
    +	t["RemoveKeysRequestType"] = reflect.TypeOf((*RemoveKeysRequestType)(nil)).Elem()
    +}
    +
    +type RemoveKeysResponse struct {
    +	Returnval []CryptoKeyResult `xml:"returnval,omitempty"`
    +}
    +
    +type RemoveKmipServer RemoveKmipServerRequestType
    +
    +func init() {
    +	t["RemoveKmipServer"] = reflect.TypeOf((*RemoveKmipServer)(nil)).Elem()
    +}
    +
    +type RemoveKmipServerRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	ClusterId  KeyProviderId          `xml:"clusterId"`
    +	ServerName string                 `xml:"serverName"`
    +}
    +
    +func init() {
    +	t["RemoveKmipServerRequestType"] = reflect.TypeOf((*RemoveKmipServerRequestType)(nil)).Elem()
    +}
    +
    +type RemoveKmipServerResponse struct {
    +}
    +
    +type RemoveLicense RemoveLicenseRequestType
    +
    +func init() {
    +	t["RemoveLicense"] = reflect.TypeOf((*RemoveLicense)(nil)).Elem()
    +}
    +
    +type RemoveLicenseLabel RemoveLicenseLabelRequestType
    +
    +func init() {
    +	t["RemoveLicenseLabel"] = reflect.TypeOf((*RemoveLicenseLabel)(nil)).Elem()
    +}
    +
    +type RemoveLicenseLabelRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	LicenseKey string                 `xml:"licenseKey"`
    +	LabelKey   string                 `xml:"labelKey"`
    +}
    +
    +func init() {
    +	t["RemoveLicenseLabelRequestType"] = reflect.TypeOf((*RemoveLicenseLabelRequestType)(nil)).Elem()
    +}
    +
    +type RemoveLicenseLabelResponse struct {
    +}
    +
    +type RemoveLicenseRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	LicenseKey string                 `xml:"licenseKey"`
    +}
    +
    +func init() {
    +	t["RemoveLicenseRequestType"] = reflect.TypeOf((*RemoveLicenseRequestType)(nil)).Elem()
    +}
    +
    +type RemoveLicenseResponse struct {
    +}
    +
    +type RemoveMonitoredEntities RemoveMonitoredEntitiesRequestType
    +
    +func init() {
    +	t["RemoveMonitoredEntities"] = reflect.TypeOf((*RemoveMonitoredEntities)(nil)).Elem()
    +}
    +
    +type RemoveMonitoredEntitiesRequestType struct {
    +	This       ManagedObjectReference   `xml:"_this"`
    +	ProviderId string                   `xml:"providerId"`
    +	Entities   []ManagedObjectReference `xml:"entities,omitempty"`
    +}
    +
    +func init() {
    +	t["RemoveMonitoredEntitiesRequestType"] = reflect.TypeOf((*RemoveMonitoredEntitiesRequestType)(nil)).Elem()
    +}
    +
    +type RemoveMonitoredEntitiesResponse struct {
    +}
    +
    +type RemoveNetworkResourcePool RemoveNetworkResourcePoolRequestType
    +
    +func init() {
    +	t["RemoveNetworkResourcePool"] = reflect.TypeOf((*RemoveNetworkResourcePool)(nil)).Elem()
    +}
    +
    +type RemoveNetworkResourcePoolRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Key  []string               `xml:"key"`
    +}
    +
    +func init() {
    +	t["RemoveNetworkResourcePoolRequestType"] = reflect.TypeOf((*RemoveNetworkResourcePoolRequestType)(nil)).Elem()
    +}
    +
    +type RemoveNetworkResourcePoolResponse struct {
    +}
    +
    +type RemovePerfInterval RemovePerfIntervalRequestType
    +
    +func init() {
    +	t["RemovePerfInterval"] = reflect.TypeOf((*RemovePerfInterval)(nil)).Elem()
    +}
    +
    +type RemovePerfIntervalRequestType struct {
    +	This         ManagedObjectReference `xml:"_this"`
    +	SamplePeriod int32                  `xml:"samplePeriod"`
    +}
    +
    +func init() {
    +	t["RemovePerfIntervalRequestType"] = reflect.TypeOf((*RemovePerfIntervalRequestType)(nil)).Elem()
    +}
    +
    +type RemovePerfIntervalResponse struct {
    +}
    +
    +type RemovePortGroup RemovePortGroupRequestType
    +
    +func init() {
    +	t["RemovePortGroup"] = reflect.TypeOf((*RemovePortGroup)(nil)).Elem()
    +}
    +
    +type RemovePortGroupRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	PgName string                 `xml:"pgName"`
    +}
    +
    +func init() {
    +	t["RemovePortGroupRequestType"] = reflect.TypeOf((*RemovePortGroupRequestType)(nil)).Elem()
    +}
    +
    +type RemovePortGroupResponse struct {
    +}
    +
    +type RemoveScheduledTask RemoveScheduledTaskRequestType
    +
    +func init() {
    +	t["RemoveScheduledTask"] = reflect.TypeOf((*RemoveScheduledTask)(nil)).Elem()
    +}
    +
    +type RemoveScheduledTaskRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["RemoveScheduledTaskRequestType"] = reflect.TypeOf((*RemoveScheduledTaskRequestType)(nil)).Elem()
    +}
    +
    +type RemoveScheduledTaskResponse struct {
    +}
    +
    +type RemoveServiceConsoleVirtualNic RemoveServiceConsoleVirtualNicRequestType
    +
    +func init() {
    +	t["RemoveServiceConsoleVirtualNic"] = reflect.TypeOf((*RemoveServiceConsoleVirtualNic)(nil)).Elem()
    +}
    +
    +type RemoveServiceConsoleVirtualNicRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	Device string                 `xml:"device"`
    +}
    +
    +func init() {
    +	t["RemoveServiceConsoleVirtualNicRequestType"] = reflect.TypeOf((*RemoveServiceConsoleVirtualNicRequestType)(nil)).Elem()
    +}
    +
    +type RemoveServiceConsoleVirtualNicResponse struct {
    +}
    +
    +type RemoveSmartCardTrustAnchor RemoveSmartCardTrustAnchorRequestType
    +
    +func init() {
    +	t["RemoveSmartCardTrustAnchor"] = reflect.TypeOf((*RemoveSmartCardTrustAnchor)(nil)).Elem()
    +}
    +
    +type RemoveSmartCardTrustAnchorByFingerprint RemoveSmartCardTrustAnchorByFingerprintRequestType
    +
    +func init() {
    +	t["RemoveSmartCardTrustAnchorByFingerprint"] = reflect.TypeOf((*RemoveSmartCardTrustAnchorByFingerprint)(nil)).Elem()
    +}
    +
    +type RemoveSmartCardTrustAnchorByFingerprintRequestType struct {
    +	This        ManagedObjectReference `xml:"_this"`
    +	Fingerprint string                 `xml:"fingerprint"`
    +	Digest      string                 `xml:"digest"`
    +}
    +
    +func init() {
    +	t["RemoveSmartCardTrustAnchorByFingerprintRequestType"] = reflect.TypeOf((*RemoveSmartCardTrustAnchorByFingerprintRequestType)(nil)).Elem()
    +}
    +
    +type RemoveSmartCardTrustAnchorByFingerprintResponse struct {
    +}
    +
    +type RemoveSmartCardTrustAnchorRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	Issuer string                 `xml:"issuer"`
    +	Serial string                 `xml:"serial"`
    +}
    +
    +func init() {
    +	t["RemoveSmartCardTrustAnchorRequestType"] = reflect.TypeOf((*RemoveSmartCardTrustAnchorRequestType)(nil)).Elem()
    +}
    +
    +type RemoveSmartCardTrustAnchorResponse struct {
    +}
    +
    +type RemoveSnapshotRequestType struct {
    +	This           ManagedObjectReference `xml:"_this"`
    +	RemoveChildren bool                   `xml:"removeChildren"`
    +	Consolidate    *bool                  `xml:"consolidate"`
    +}
    +
    +func init() {
    +	t["RemoveSnapshotRequestType"] = reflect.TypeOf((*RemoveSnapshotRequestType)(nil)).Elem()
    +}
    +
    +type RemoveSnapshot_Task RemoveSnapshotRequestType
    +
    +func init() {
    +	t["RemoveSnapshot_Task"] = reflect.TypeOf((*RemoveSnapshot_Task)(nil)).Elem()
    +}
    +
    +type RemoveSnapshot_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type RemoveUser RemoveUserRequestType
    +
    +func init() {
    +	t["RemoveUser"] = reflect.TypeOf((*RemoveUser)(nil)).Elem()
    +}
    +
    +type RemoveUserRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	UserName string                 `xml:"userName"`
    +}
    +
    +func init() {
    +	t["RemoveUserRequestType"] = reflect.TypeOf((*RemoveUserRequestType)(nil)).Elem()
    +}
    +
    +type RemoveUserResponse struct {
    +}
    +
    +type RemoveVirtualNic RemoveVirtualNicRequestType
    +
    +func init() {
    +	t["RemoveVirtualNic"] = reflect.TypeOf((*RemoveVirtualNic)(nil)).Elem()
    +}
    +
    +type RemoveVirtualNicRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	Device string                 `xml:"device"`
    +}
    +
    +func init() {
    +	t["RemoveVirtualNicRequestType"] = reflect.TypeOf((*RemoveVirtualNicRequestType)(nil)).Elem()
    +}
    +
    +type RemoveVirtualNicResponse struct {
    +}
    +
    +type RemoveVirtualSwitch RemoveVirtualSwitchRequestType
    +
    +func init() {
    +	t["RemoveVirtualSwitch"] = reflect.TypeOf((*RemoveVirtualSwitch)(nil)).Elem()
    +}
    +
    +type RemoveVirtualSwitchRequestType struct {
    +	This        ManagedObjectReference `xml:"_this"`
    +	VswitchName string                 `xml:"vswitchName"`
    +}
    +
    +func init() {
    +	t["RemoveVirtualSwitchRequestType"] = reflect.TypeOf((*RemoveVirtualSwitchRequestType)(nil)).Elem()
    +}
    +
    +type RemoveVirtualSwitchResponse struct {
    +}
    +
    +type RenameCustomFieldDef RenameCustomFieldDefRequestType
    +
    +func init() {
    +	t["RenameCustomFieldDef"] = reflect.TypeOf((*RenameCustomFieldDef)(nil)).Elem()
    +}
    +
    +type RenameCustomFieldDefRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Key  int32                  `xml:"key"`
    +	Name string                 `xml:"name"`
    +}
    +
    +func init() {
    +	t["RenameCustomFieldDefRequestType"] = reflect.TypeOf((*RenameCustomFieldDefRequestType)(nil)).Elem()
    +}
    +
    +type RenameCustomFieldDefResponse struct {
    +}
    +
    +type RenameCustomizationSpec RenameCustomizationSpecRequestType
    +
    +func init() {
    +	t["RenameCustomizationSpec"] = reflect.TypeOf((*RenameCustomizationSpec)(nil)).Elem()
    +}
    +
    +type RenameCustomizationSpecRequestType struct {
    +	This    ManagedObjectReference `xml:"_this"`
    +	Name    string                 `xml:"name"`
    +	NewName string                 `xml:"newName"`
    +}
    +
    +func init() {
    +	t["RenameCustomizationSpecRequestType"] = reflect.TypeOf((*RenameCustomizationSpecRequestType)(nil)).Elem()
    +}
    +
    +type RenameCustomizationSpecResponse struct {
    +}
    +
    +type RenameDatastore RenameDatastoreRequestType
    +
    +func init() {
    +	t["RenameDatastore"] = reflect.TypeOf((*RenameDatastore)(nil)).Elem()
    +}
    +
    +type RenameDatastoreRequestType struct {
    +	This    ManagedObjectReference `xml:"_this"`
    +	NewName string                 `xml:"newName"`
    +}
    +
    +func init() {
    +	t["RenameDatastoreRequestType"] = reflect.TypeOf((*RenameDatastoreRequestType)(nil)).Elem()
    +}
    +
    +type RenameDatastoreResponse struct {
    +}
    +
    +type RenameRequestType struct {
    +	This    ManagedObjectReference `xml:"_this"`
    +	NewName string                 `xml:"newName"`
    +}
    +
    +func init() {
    +	t["RenameRequestType"] = reflect.TypeOf((*RenameRequestType)(nil)).Elem()
    +}
    +
    +type RenameSnapshot RenameSnapshotRequestType
    +
    +func init() {
    +	t["RenameSnapshot"] = reflect.TypeOf((*RenameSnapshot)(nil)).Elem()
    +}
    +
    +type RenameSnapshotRequestType struct {
    +	This        ManagedObjectReference `xml:"_this"`
    +	Name        string                 `xml:"name,omitempty"`
    +	Description string                 `xml:"description,omitempty"`
    +}
    +
    +func init() {
    +	t["RenameSnapshotRequestType"] = reflect.TypeOf((*RenameSnapshotRequestType)(nil)).Elem()
    +}
    +
    +type RenameSnapshotResponse struct {
    +}
    +
    +type RenameVStorageObject RenameVStorageObjectRequestType
    +
    +func init() {
    +	t["RenameVStorageObject"] = reflect.TypeOf((*RenameVStorageObject)(nil)).Elem()
    +}
    +
    +type RenameVStorageObjectRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	Id        ID                     `xml:"id"`
    +	Datastore ManagedObjectReference `xml:"datastore"`
    +	Name      string                 `xml:"name"`
    +}
    +
    +func init() {
    +	t["RenameVStorageObjectRequestType"] = reflect.TypeOf((*RenameVStorageObjectRequestType)(nil)).Elem()
    +}
    +
    +type RenameVStorageObjectResponse struct {
    +}
    +
    +type Rename_Task RenameRequestType
    +
    +func init() {
    +	t["Rename_Task"] = reflect.TypeOf((*Rename_Task)(nil)).Elem()
    +}
    +
    +type Rename_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type ReplaceCACertificatesAndCRLs ReplaceCACertificatesAndCRLsRequestType
    +
    +func init() {
    +	t["ReplaceCACertificatesAndCRLs"] = reflect.TypeOf((*ReplaceCACertificatesAndCRLs)(nil)).Elem()
    +}
    +
    +type ReplaceCACertificatesAndCRLsRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	CaCert []string               `xml:"caCert"`
    +	CaCrl  []string               `xml:"caCrl,omitempty"`
    +}
    +
    +func init() {
    +	t["ReplaceCACertificatesAndCRLsRequestType"] = reflect.TypeOf((*ReplaceCACertificatesAndCRLsRequestType)(nil)).Elem()
    +}
    +
    +type ReplaceCACertificatesAndCRLsResponse struct {
    +}
    +
    +type ReplaceSmartCardTrustAnchors ReplaceSmartCardTrustAnchorsRequestType
    +
    +func init() {
    +	t["ReplaceSmartCardTrustAnchors"] = reflect.TypeOf((*ReplaceSmartCardTrustAnchors)(nil)).Elem()
    +}
    +
    +type ReplaceSmartCardTrustAnchorsRequestType struct {
    +	This  ManagedObjectReference `xml:"_this"`
    +	Certs []string               `xml:"certs,omitempty"`
    +}
    +
    +func init() {
    +	t["ReplaceSmartCardTrustAnchorsRequestType"] = reflect.TypeOf((*ReplaceSmartCardTrustAnchorsRequestType)(nil)).Elem()
    +}
    +
    +type ReplaceSmartCardTrustAnchorsResponse struct {
    +}
    +
    +type ReplicationConfigFault struct {
    +	ReplicationFault
    +}
    +
    +func init() {
    +	t["ReplicationConfigFault"] = reflect.TypeOf((*ReplicationConfigFault)(nil)).Elem()
    +}
    +
    +type ReplicationConfigFaultFault BaseReplicationConfigFault
    +
    +func init() {
    +	t["ReplicationConfigFaultFault"] = reflect.TypeOf((*ReplicationConfigFaultFault)(nil)).Elem()
    +}
    +
    +type ReplicationConfigSpec struct {
    +	DynamicData
    +
    +	Generation                  int64                         `xml:"generation"`
    +	VmReplicationId             string                        `xml:"vmReplicationId"`
    +	Destination                 string                        `xml:"destination"`
    +	Port                        int32                         `xml:"port"`
    +	Rpo                         int64                         `xml:"rpo"`
    +	QuiesceGuestEnabled         bool                          `xml:"quiesceGuestEnabled"`
    +	Paused                      bool                          `xml:"paused"`
    +	OppUpdatesEnabled           bool                          `xml:"oppUpdatesEnabled"`
    +	NetCompressionEnabled       *bool                         `xml:"netCompressionEnabled"`
    +	NetEncryptionEnabled        *bool                         `xml:"netEncryptionEnabled"`
    +	EncryptionDestination       string                        `xml:"encryptionDestination,omitempty"`
    +	EncryptionPort              int32                         `xml:"encryptionPort,omitempty"`
    +	RemoteCertificateThumbprint string                        `xml:"remoteCertificateThumbprint,omitempty"`
    +	Disk                        []ReplicationInfoDiskSettings `xml:"disk,omitempty"`
    +}
    +
    +func init() {
    +	t["ReplicationConfigSpec"] = reflect.TypeOf((*ReplicationConfigSpec)(nil)).Elem()
    +}
    +
    +type ReplicationDiskConfigFault struct {
    +	ReplicationConfigFault
    +
    +	Reason string                  `xml:"reason,omitempty"`
    +	VmRef  *ManagedObjectReference `xml:"vmRef,omitempty"`
    +	Key    int32                   `xml:"key,omitempty"`
    +}
    +
    +func init() {
    +	t["ReplicationDiskConfigFault"] = reflect.TypeOf((*ReplicationDiskConfigFault)(nil)).Elem()
    +}
    +
    +type ReplicationDiskConfigFaultFault ReplicationDiskConfigFault
    +
    +func init() {
    +	t["ReplicationDiskConfigFaultFault"] = reflect.TypeOf((*ReplicationDiskConfigFaultFault)(nil)).Elem()
    +}
    +
    +type ReplicationFault struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["ReplicationFault"] = reflect.TypeOf((*ReplicationFault)(nil)).Elem()
    +}
    +
    +type ReplicationFaultFault BaseReplicationFault
    +
    +func init() {
    +	t["ReplicationFaultFault"] = reflect.TypeOf((*ReplicationFaultFault)(nil)).Elem()
    +}
    +
    +type ReplicationGroupId struct {
    +	DynamicData
    +
    +	FaultDomainId FaultDomainId `xml:"faultDomainId"`
    +	DeviceGroupId DeviceGroupId `xml:"deviceGroupId"`
    +}
    +
    +func init() {
    +	t["ReplicationGroupId"] = reflect.TypeOf((*ReplicationGroupId)(nil)).Elem()
    +}
    +
    +type ReplicationIncompatibleWithFT struct {
    +	ReplicationFault
    +}
    +
    +func init() {
    +	t["ReplicationIncompatibleWithFT"] = reflect.TypeOf((*ReplicationIncompatibleWithFT)(nil)).Elem()
    +}
    +
    +type ReplicationIncompatibleWithFTFault ReplicationIncompatibleWithFT
    +
    +func init() {
    +	t["ReplicationIncompatibleWithFTFault"] = reflect.TypeOf((*ReplicationIncompatibleWithFTFault)(nil)).Elem()
    +}
    +
    +type ReplicationInfoDiskSettings struct {
    +	DynamicData
    +
    +	Key               int32  `xml:"key"`
    +	DiskReplicationId string `xml:"diskReplicationId"`
    +}
    +
    +func init() {
    +	t["ReplicationInfoDiskSettings"] = reflect.TypeOf((*ReplicationInfoDiskSettings)(nil)).Elem()
    +}
    +
    +type ReplicationInvalidOptions struct {
    +	ReplicationFault
    +
    +	Options string                  `xml:"options"`
    +	Entity  *ManagedObjectReference `xml:"entity,omitempty"`
    +}
    +
    +func init() {
    +	t["ReplicationInvalidOptions"] = reflect.TypeOf((*ReplicationInvalidOptions)(nil)).Elem()
    +}
    +
    +type ReplicationInvalidOptionsFault ReplicationInvalidOptions
    +
    +func init() {
    +	t["ReplicationInvalidOptionsFault"] = reflect.TypeOf((*ReplicationInvalidOptionsFault)(nil)).Elem()
    +}
    +
    +type ReplicationNotSupportedOnHost struct {
    +	ReplicationFault
    +}
    +
    +func init() {
    +	t["ReplicationNotSupportedOnHost"] = reflect.TypeOf((*ReplicationNotSupportedOnHost)(nil)).Elem()
    +}
    +
    +type ReplicationNotSupportedOnHostFault ReplicationNotSupportedOnHost
    +
    +func init() {
    +	t["ReplicationNotSupportedOnHostFault"] = reflect.TypeOf((*ReplicationNotSupportedOnHostFault)(nil)).Elem()
    +}
    +
    +type ReplicationSpec struct {
    +	DynamicData
    +
    +	ReplicationGroupId ReplicationGroupId `xml:"replicationGroupId"`
    +}
    +
    +func init() {
    +	t["ReplicationSpec"] = reflect.TypeOf((*ReplicationSpec)(nil)).Elem()
    +}
    +
    +type ReplicationVmConfigFault struct {
    +	ReplicationConfigFault
    +
    +	Reason string                  `xml:"reason,omitempty"`
    +	VmRef  *ManagedObjectReference `xml:"vmRef,omitempty"`
    +}
    +
    +func init() {
    +	t["ReplicationVmConfigFault"] = reflect.TypeOf((*ReplicationVmConfigFault)(nil)).Elem()
    +}
    +
    +type ReplicationVmConfigFaultFault ReplicationVmConfigFault
    +
    +func init() {
    +	t["ReplicationVmConfigFaultFault"] = reflect.TypeOf((*ReplicationVmConfigFaultFault)(nil)).Elem()
    +}
    +
    +type ReplicationVmFault struct {
    +	ReplicationFault
    +
    +	Reason     string                  `xml:"reason,omitempty"`
    +	State      string                  `xml:"state,omitempty"`
    +	InstanceId string                  `xml:"instanceId,omitempty"`
    +	Vm         *ManagedObjectReference `xml:"vm,omitempty"`
    +}
    +
    +func init() {
    +	t["ReplicationVmFault"] = reflect.TypeOf((*ReplicationVmFault)(nil)).Elem()
    +}
    +
    +type ReplicationVmFaultFault BaseReplicationVmFault
    +
    +func init() {
    +	t["ReplicationVmFaultFault"] = reflect.TypeOf((*ReplicationVmFaultFault)(nil)).Elem()
    +}
    +
    +type ReplicationVmInProgressFault struct {
    +	ReplicationVmFault
    +
    +	RequestedActivity  string `xml:"requestedActivity"`
    +	InProgressActivity string `xml:"inProgressActivity"`
    +}
    +
    +func init() {
    +	t["ReplicationVmInProgressFault"] = reflect.TypeOf((*ReplicationVmInProgressFault)(nil)).Elem()
    +}
    +
    +type ReplicationVmInProgressFaultFault ReplicationVmInProgressFault
    +
    +func init() {
    +	t["ReplicationVmInProgressFaultFault"] = reflect.TypeOf((*ReplicationVmInProgressFaultFault)(nil)).Elem()
    +}
    +
    +type ReplicationVmProgressInfo struct {
    +	DynamicData
    +
    +	Progress              int32 `xml:"progress"`
    +	BytesTransferred      int64 `xml:"bytesTransferred"`
    +	BytesToTransfer       int64 `xml:"bytesToTransfer"`
    +	ChecksumTotalBytes    int64 `xml:"checksumTotalBytes,omitempty"`
    +	ChecksumComparedBytes int64 `xml:"checksumComparedBytes,omitempty"`
    +}
    +
    +func init() {
    +	t["ReplicationVmProgressInfo"] = reflect.TypeOf((*ReplicationVmProgressInfo)(nil)).Elem()
    +}
    +
    +type RequestCanceled struct {
    +	RuntimeFault
    +}
    +
    +func init() {
    +	t["RequestCanceled"] = reflect.TypeOf((*RequestCanceled)(nil)).Elem()
    +}
    +
    +type RequestCanceledFault RequestCanceled
    +
    +func init() {
    +	t["RequestCanceledFault"] = reflect.TypeOf((*RequestCanceledFault)(nil)).Elem()
    +}
    +
    +type RescanAllHba RescanAllHbaRequestType
    +
    +func init() {
    +	t["RescanAllHba"] = reflect.TypeOf((*RescanAllHba)(nil)).Elem()
    +}
    +
    +type RescanAllHbaRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["RescanAllHbaRequestType"] = reflect.TypeOf((*RescanAllHbaRequestType)(nil)).Elem()
    +}
    +
    +type RescanAllHbaResponse struct {
    +}
    +
    +type RescanHba RescanHbaRequestType
    +
    +func init() {
    +	t["RescanHba"] = reflect.TypeOf((*RescanHba)(nil)).Elem()
    +}
    +
    +type RescanHbaRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	HbaDevice string                 `xml:"hbaDevice"`
    +}
    +
    +func init() {
    +	t["RescanHbaRequestType"] = reflect.TypeOf((*RescanHbaRequestType)(nil)).Elem()
    +}
    +
    +type RescanHbaResponse struct {
    +}
    +
    +type RescanVffs RescanVffsRequestType
    +
    +func init() {
    +	t["RescanVffs"] = reflect.TypeOf((*RescanVffs)(nil)).Elem()
    +}
    +
    +type RescanVffsRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["RescanVffsRequestType"] = reflect.TypeOf((*RescanVffsRequestType)(nil)).Elem()
    +}
    +
    +type RescanVffsResponse struct {
    +}
    +
    +type RescanVmfs RescanVmfsRequestType
    +
    +func init() {
    +	t["RescanVmfs"] = reflect.TypeOf((*RescanVmfs)(nil)).Elem()
    +}
    +
    +type RescanVmfsRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["RescanVmfsRequestType"] = reflect.TypeOf((*RescanVmfsRequestType)(nil)).Elem()
    +}
    +
    +type RescanVmfsResponse struct {
    +}
    +
    +type ResetCollector ResetCollectorRequestType
    +
    +func init() {
    +	t["ResetCollector"] = reflect.TypeOf((*ResetCollector)(nil)).Elem()
    +}
    +
    +type ResetCollectorRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["ResetCollectorRequestType"] = reflect.TypeOf((*ResetCollectorRequestType)(nil)).Elem()
    +}
    +
    +type ResetCollectorResponse struct {
    +}
    +
    +type ResetCounterLevelMapping ResetCounterLevelMappingRequestType
    +
    +func init() {
    +	t["ResetCounterLevelMapping"] = reflect.TypeOf((*ResetCounterLevelMapping)(nil)).Elem()
    +}
    +
    +type ResetCounterLevelMappingRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	Counters []int32                `xml:"counters"`
    +}
    +
    +func init() {
    +	t["ResetCounterLevelMappingRequestType"] = reflect.TypeOf((*ResetCounterLevelMappingRequestType)(nil)).Elem()
    +}
    +
    +type ResetCounterLevelMappingResponse struct {
    +}
    +
    +type ResetEntityPermissions ResetEntityPermissionsRequestType
    +
    +func init() {
    +	t["ResetEntityPermissions"] = reflect.TypeOf((*ResetEntityPermissions)(nil)).Elem()
    +}
    +
    +type ResetEntityPermissionsRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	Entity     ManagedObjectReference `xml:"entity"`
    +	Permission []Permission           `xml:"permission,omitempty"`
    +}
    +
    +func init() {
    +	t["ResetEntityPermissionsRequestType"] = reflect.TypeOf((*ResetEntityPermissionsRequestType)(nil)).Elem()
    +}
    +
    +type ResetEntityPermissionsResponse struct {
    +}
    +
    +type ResetFirmwareToFactoryDefaults ResetFirmwareToFactoryDefaultsRequestType
    +
    +func init() {
    +	t["ResetFirmwareToFactoryDefaults"] = reflect.TypeOf((*ResetFirmwareToFactoryDefaults)(nil)).Elem()
    +}
    +
    +type ResetFirmwareToFactoryDefaultsRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["ResetFirmwareToFactoryDefaultsRequestType"] = reflect.TypeOf((*ResetFirmwareToFactoryDefaultsRequestType)(nil)).Elem()
    +}
    +
    +type ResetFirmwareToFactoryDefaultsResponse struct {
    +}
    +
    +type ResetGuestInformation ResetGuestInformationRequestType
    +
    +func init() {
    +	t["ResetGuestInformation"] = reflect.TypeOf((*ResetGuestInformation)(nil)).Elem()
    +}
    +
    +type ResetGuestInformationRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["ResetGuestInformationRequestType"] = reflect.TypeOf((*ResetGuestInformationRequestType)(nil)).Elem()
    +}
    +
    +type ResetGuestInformationResponse struct {
    +}
    +
    +type ResetListView ResetListViewRequestType
    +
    +func init() {
    +	t["ResetListView"] = reflect.TypeOf((*ResetListView)(nil)).Elem()
    +}
    +
    +type ResetListViewFromView ResetListViewFromViewRequestType
    +
    +func init() {
    +	t["ResetListViewFromView"] = reflect.TypeOf((*ResetListViewFromView)(nil)).Elem()
    +}
    +
    +type ResetListViewFromViewRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	View ManagedObjectReference `xml:"view"`
    +}
    +
    +func init() {
    +	t["ResetListViewFromViewRequestType"] = reflect.TypeOf((*ResetListViewFromViewRequestType)(nil)).Elem()
    +}
    +
    +type ResetListViewFromViewResponse struct {
    +}
    +
    +type ResetListViewRequestType struct {
    +	This ManagedObjectReference   `xml:"_this"`
    +	Obj  []ManagedObjectReference `xml:"obj,omitempty"`
    +}
    +
    +func init() {
    +	t["ResetListViewRequestType"] = reflect.TypeOf((*ResetListViewRequestType)(nil)).Elem()
    +}
    +
    +type ResetListViewResponse struct {
    +	Returnval []ManagedObjectReference `xml:"returnval,omitempty"`
    +}
    +
    +type ResetSystemHealthInfo ResetSystemHealthInfoRequestType
    +
    +func init() {
    +	t["ResetSystemHealthInfo"] = reflect.TypeOf((*ResetSystemHealthInfo)(nil)).Elem()
    +}
    +
    +type ResetSystemHealthInfoRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["ResetSystemHealthInfoRequestType"] = reflect.TypeOf((*ResetSystemHealthInfoRequestType)(nil)).Elem()
    +}
    +
    +type ResetSystemHealthInfoResponse struct {
    +}
    +
    +type ResetVMRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["ResetVMRequestType"] = reflect.TypeOf((*ResetVMRequestType)(nil)).Elem()
    +}
    +
    +type ResetVM_Task ResetVMRequestType
    +
    +func init() {
    +	t["ResetVM_Task"] = reflect.TypeOf((*ResetVM_Task)(nil)).Elem()
    +}
    +
    +type ResetVM_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type ResignatureUnresolvedVmfsVolumeRequestType struct {
    +	This           ManagedObjectReference            `xml:"_this"`
    +	ResolutionSpec HostUnresolvedVmfsResignatureSpec `xml:"resolutionSpec"`
    +}
    +
    +func init() {
    +	t["ResignatureUnresolvedVmfsVolumeRequestType"] = reflect.TypeOf((*ResignatureUnresolvedVmfsVolumeRequestType)(nil)).Elem()
    +}
    +
    +type ResignatureUnresolvedVmfsVolume_Task ResignatureUnresolvedVmfsVolumeRequestType
    +
    +func init() {
    +	t["ResignatureUnresolvedVmfsVolume_Task"] = reflect.TypeOf((*ResignatureUnresolvedVmfsVolume_Task)(nil)).Elem()
    +}
    +
    +type ResignatureUnresolvedVmfsVolume_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type ResolveInstallationErrorsOnClusterRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	FilterId string                 `xml:"filterId"`
    +	Cluster  ManagedObjectReference `xml:"cluster"`
    +}
    +
    +func init() {
    +	t["ResolveInstallationErrorsOnClusterRequestType"] = reflect.TypeOf((*ResolveInstallationErrorsOnClusterRequestType)(nil)).Elem()
    +}
    +
    +type ResolveInstallationErrorsOnCluster_Task ResolveInstallationErrorsOnClusterRequestType
    +
    +func init() {
    +	t["ResolveInstallationErrorsOnCluster_Task"] = reflect.TypeOf((*ResolveInstallationErrorsOnCluster_Task)(nil)).Elem()
    +}
    +
    +type ResolveInstallationErrorsOnCluster_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type ResolveInstallationErrorsOnHostRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	FilterId string                 `xml:"filterId"`
    +	Host     ManagedObjectReference `xml:"host"`
    +}
    +
    +func init() {
    +	t["ResolveInstallationErrorsOnHostRequestType"] = reflect.TypeOf((*ResolveInstallationErrorsOnHostRequestType)(nil)).Elem()
    +}
    +
    +type ResolveInstallationErrorsOnHost_Task ResolveInstallationErrorsOnHostRequestType
    +
    +func init() {
    +	t["ResolveInstallationErrorsOnHost_Task"] = reflect.TypeOf((*ResolveInstallationErrorsOnHost_Task)(nil)).Elem()
    +}
    +
    +type ResolveInstallationErrorsOnHost_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type ResolveMultipleUnresolvedVmfsVolumes ResolveMultipleUnresolvedVmfsVolumesRequestType
    +
    +func init() {
    +	t["ResolveMultipleUnresolvedVmfsVolumes"] = reflect.TypeOf((*ResolveMultipleUnresolvedVmfsVolumes)(nil)).Elem()
    +}
    +
    +type ResolveMultipleUnresolvedVmfsVolumesExRequestType struct {
    +	This           ManagedObjectReference             `xml:"_this"`
    +	ResolutionSpec []HostUnresolvedVmfsResolutionSpec `xml:"resolutionSpec"`
    +}
    +
    +func init() {
    +	t["ResolveMultipleUnresolvedVmfsVolumesExRequestType"] = reflect.TypeOf((*ResolveMultipleUnresolvedVmfsVolumesExRequestType)(nil)).Elem()
    +}
    +
    +type ResolveMultipleUnresolvedVmfsVolumesEx_Task ResolveMultipleUnresolvedVmfsVolumesExRequestType
    +
    +func init() {
    +	t["ResolveMultipleUnresolvedVmfsVolumesEx_Task"] = reflect.TypeOf((*ResolveMultipleUnresolvedVmfsVolumesEx_Task)(nil)).Elem()
    +}
    +
    +type ResolveMultipleUnresolvedVmfsVolumesEx_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type ResolveMultipleUnresolvedVmfsVolumesRequestType struct {
    +	This           ManagedObjectReference             `xml:"_this"`
    +	ResolutionSpec []HostUnresolvedVmfsResolutionSpec `xml:"resolutionSpec"`
    +}
    +
    +func init() {
    +	t["ResolveMultipleUnresolvedVmfsVolumesRequestType"] = reflect.TypeOf((*ResolveMultipleUnresolvedVmfsVolumesRequestType)(nil)).Elem()
    +}
    +
    +type ResolveMultipleUnresolvedVmfsVolumesResponse struct {
    +	Returnval []HostUnresolvedVmfsResolutionResult `xml:"returnval,omitempty"`
    +}
    +
    +type ResourceAllocationInfo struct {
    +	DynamicData
    +
    +	Reservation           *int64      `xml:"reservation"`
    +	ExpandableReservation *bool       `xml:"expandableReservation"`
    +	Limit                 *int64      `xml:"limit"`
    +	Shares                *SharesInfo `xml:"shares,omitempty"`
    +	OverheadLimit         *int64      `xml:"overheadLimit"`
    +}
    +
    +func init() {
    +	t["ResourceAllocationInfo"] = reflect.TypeOf((*ResourceAllocationInfo)(nil)).Elem()
    +}
    +
    +type ResourceAllocationOption struct {
    +	DynamicData
    +
    +	SharesOption SharesOption `xml:"sharesOption"`
    +}
    +
    +func init() {
    +	t["ResourceAllocationOption"] = reflect.TypeOf((*ResourceAllocationOption)(nil)).Elem()
    +}
    +
    +type ResourceConfigOption struct {
    +	DynamicData
    +
    +	CpuAllocationOption    ResourceAllocationOption `xml:"cpuAllocationOption"`
    +	MemoryAllocationOption ResourceAllocationOption `xml:"memoryAllocationOption"`
    +}
    +
    +func init() {
    +	t["ResourceConfigOption"] = reflect.TypeOf((*ResourceConfigOption)(nil)).Elem()
    +}
    +
    +type ResourceConfigSpec struct {
    +	DynamicData
    +
    +	Entity           *ManagedObjectReference `xml:"entity,omitempty"`
    +	ChangeVersion    string                  `xml:"changeVersion,omitempty"`
    +	LastModified     *time.Time              `xml:"lastModified"`
    +	CpuAllocation    ResourceAllocationInfo  `xml:"cpuAllocation"`
    +	MemoryAllocation ResourceAllocationInfo  `xml:"memoryAllocation"`
    +}
    +
    +func init() {
    +	t["ResourceConfigSpec"] = reflect.TypeOf((*ResourceConfigSpec)(nil)).Elem()
    +}
    +
    +type ResourceInUse struct {
    +	VimFault
    +
    +	Type string `xml:"type,omitempty"`
    +	Name string `xml:"name,omitempty"`
    +}
    +
    +func init() {
    +	t["ResourceInUse"] = reflect.TypeOf((*ResourceInUse)(nil)).Elem()
    +}
    +
    +type ResourceInUseFault BaseResourceInUse
    +
    +func init() {
    +	t["ResourceInUseFault"] = reflect.TypeOf((*ResourceInUseFault)(nil)).Elem()
    +}
    +
    +type ResourceNotAvailable struct {
    +	VimFault
    +
    +	ContainerType string `xml:"containerType,omitempty"`
    +	ContainerName string `xml:"containerName,omitempty"`
    +	Type          string `xml:"type,omitempty"`
    +}
    +
    +func init() {
    +	t["ResourceNotAvailable"] = reflect.TypeOf((*ResourceNotAvailable)(nil)).Elem()
    +}
    +
    +type ResourceNotAvailableFault ResourceNotAvailable
    +
    +func init() {
    +	t["ResourceNotAvailableFault"] = reflect.TypeOf((*ResourceNotAvailableFault)(nil)).Elem()
    +}
    +
    +type ResourcePoolCreatedEvent struct {
    +	ResourcePoolEvent
    +
    +	Parent ResourcePoolEventArgument `xml:"parent"`
    +}
    +
    +func init() {
    +	t["ResourcePoolCreatedEvent"] = reflect.TypeOf((*ResourcePoolCreatedEvent)(nil)).Elem()
    +}
    +
    +type ResourcePoolDestroyedEvent struct {
    +	ResourcePoolEvent
    +}
    +
    +func init() {
    +	t["ResourcePoolDestroyedEvent"] = reflect.TypeOf((*ResourcePoolDestroyedEvent)(nil)).Elem()
    +}
    +
    +type ResourcePoolEvent struct {
    +	Event
    +
    +	ResourcePool ResourcePoolEventArgument `xml:"resourcePool"`
    +}
    +
    +func init() {
    +	t["ResourcePoolEvent"] = reflect.TypeOf((*ResourcePoolEvent)(nil)).Elem()
    +}
    +
    +type ResourcePoolEventArgument struct {
    +	EntityEventArgument
    +
    +	ResourcePool ManagedObjectReference `xml:"resourcePool"`
    +}
    +
    +func init() {
    +	t["ResourcePoolEventArgument"] = reflect.TypeOf((*ResourcePoolEventArgument)(nil)).Elem()
    +}
    +
    +type ResourcePoolMovedEvent struct {
    +	ResourcePoolEvent
    +
    +	OldParent ResourcePoolEventArgument `xml:"oldParent"`
    +	NewParent ResourcePoolEventArgument `xml:"newParent"`
    +}
    +
    +func init() {
    +	t["ResourcePoolMovedEvent"] = reflect.TypeOf((*ResourcePoolMovedEvent)(nil)).Elem()
    +}
    +
    +type ResourcePoolQuickStats struct {
    +	DynamicData
    +
    +	OverallCpuUsage              int64 `xml:"overallCpuUsage,omitempty"`
    +	OverallCpuDemand             int64 `xml:"overallCpuDemand,omitempty"`
    +	GuestMemoryUsage             int64 `xml:"guestMemoryUsage,omitempty"`
    +	HostMemoryUsage              int64 `xml:"hostMemoryUsage,omitempty"`
    +	DistributedCpuEntitlement    int64 `xml:"distributedCpuEntitlement,omitempty"`
    +	DistributedMemoryEntitlement int64 `xml:"distributedMemoryEntitlement,omitempty"`
    +	StaticCpuEntitlement         int32 `xml:"staticCpuEntitlement,omitempty"`
    +	StaticMemoryEntitlement      int32 `xml:"staticMemoryEntitlement,omitempty"`
    +	PrivateMemory                int64 `xml:"privateMemory,omitempty"`
    +	SharedMemory                 int64 `xml:"sharedMemory,omitempty"`
    +	SwappedMemory                int64 `xml:"swappedMemory,omitempty"`
    +	BalloonedMemory              int64 `xml:"balloonedMemory,omitempty"`
    +	OverheadMemory               int64 `xml:"overheadMemory,omitempty"`
    +	ConsumedOverheadMemory       int64 `xml:"consumedOverheadMemory,omitempty"`
    +	CompressedMemory             int64 `xml:"compressedMemory,omitempty"`
    +}
    +
    +func init() {
    +	t["ResourcePoolQuickStats"] = reflect.TypeOf((*ResourcePoolQuickStats)(nil)).Elem()
    +}
    +
    +type ResourcePoolReconfiguredEvent struct {
    +	ResourcePoolEvent
    +
    +	ConfigChanges *ChangesInfoEventArgument `xml:"configChanges,omitempty"`
    +}
    +
    +func init() {
    +	t["ResourcePoolReconfiguredEvent"] = reflect.TypeOf((*ResourcePoolReconfiguredEvent)(nil)).Elem()
    +}
    +
    +type ResourcePoolResourceUsage struct {
    +	DynamicData
    +
    +	ReservationUsed      int64 `xml:"reservationUsed"`
    +	ReservationUsedForVm int64 `xml:"reservationUsedForVm"`
    +	UnreservedForPool    int64 `xml:"unreservedForPool"`
    +	UnreservedForVm      int64 `xml:"unreservedForVm"`
    +	OverallUsage         int64 `xml:"overallUsage"`
    +	MaxUsage             int64 `xml:"maxUsage"`
    +}
    +
    +func init() {
    +	t["ResourcePoolResourceUsage"] = reflect.TypeOf((*ResourcePoolResourceUsage)(nil)).Elem()
    +}
    +
    +type ResourcePoolRuntimeInfo struct {
    +	DynamicData
    +
    +	Memory        ResourcePoolResourceUsage `xml:"memory"`
    +	Cpu           ResourcePoolResourceUsage `xml:"cpu"`
    +	OverallStatus ManagedEntityStatus       `xml:"overallStatus"`
    +}
    +
    +func init() {
    +	t["ResourcePoolRuntimeInfo"] = reflect.TypeOf((*ResourcePoolRuntimeInfo)(nil)).Elem()
    +}
    +
    +type ResourcePoolSummary struct {
    +	DynamicData
    +
    +	Name               string                  `xml:"name"`
    +	Config             ResourceConfigSpec      `xml:"config"`
    +	Runtime            ResourcePoolRuntimeInfo `xml:"runtime"`
    +	QuickStats         *ResourcePoolQuickStats `xml:"quickStats,omitempty"`
    +	ConfiguredMemoryMB int32                   `xml:"configuredMemoryMB,omitempty"`
    +}
    +
    +func init() {
    +	t["ResourcePoolSummary"] = reflect.TypeOf((*ResourcePoolSummary)(nil)).Elem()
    +}
    +
    +type ResourceViolatedEvent struct {
    +	ResourcePoolEvent
    +}
    +
    +func init() {
    +	t["ResourceViolatedEvent"] = reflect.TypeOf((*ResourceViolatedEvent)(nil)).Elem()
    +}
    +
    +type RestartService RestartServiceRequestType
    +
    +func init() {
    +	t["RestartService"] = reflect.TypeOf((*RestartService)(nil)).Elem()
    +}
    +
    +type RestartServiceConsoleVirtualNic RestartServiceConsoleVirtualNicRequestType
    +
    +func init() {
    +	t["RestartServiceConsoleVirtualNic"] = reflect.TypeOf((*RestartServiceConsoleVirtualNic)(nil)).Elem()
    +}
    +
    +type RestartServiceConsoleVirtualNicRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	Device string                 `xml:"device"`
    +}
    +
    +func init() {
    +	t["RestartServiceConsoleVirtualNicRequestType"] = reflect.TypeOf((*RestartServiceConsoleVirtualNicRequestType)(nil)).Elem()
    +}
    +
    +type RestartServiceConsoleVirtualNicResponse struct {
    +}
    +
    +type RestartServiceRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Id   string                 `xml:"id"`
    +}
    +
    +func init() {
    +	t["RestartServiceRequestType"] = reflect.TypeOf((*RestartServiceRequestType)(nil)).Elem()
    +}
    +
    +type RestartServiceResponse struct {
    +}
    +
    +type RestoreFirmwareConfiguration RestoreFirmwareConfigurationRequestType
    +
    +func init() {
    +	t["RestoreFirmwareConfiguration"] = reflect.TypeOf((*RestoreFirmwareConfiguration)(nil)).Elem()
    +}
    +
    +type RestoreFirmwareConfigurationRequestType struct {
    +	This  ManagedObjectReference `xml:"_this"`
    +	Force bool                   `xml:"force"`
    +}
    +
    +func init() {
    +	t["RestoreFirmwareConfigurationRequestType"] = reflect.TypeOf((*RestoreFirmwareConfigurationRequestType)(nil)).Elem()
    +}
    +
    +type RestoreFirmwareConfigurationResponse struct {
    +}
    +
    +type RestrictedByAdministrator struct {
    +	RuntimeFault
    +
    +	Details string `xml:"details"`
    +}
    +
    +func init() {
    +	t["RestrictedByAdministrator"] = reflect.TypeOf((*RestrictedByAdministrator)(nil)).Elem()
    +}
    +
    +type RestrictedByAdministratorFault RestrictedByAdministrator
    +
    +func init() {
    +	t["RestrictedByAdministratorFault"] = reflect.TypeOf((*RestrictedByAdministratorFault)(nil)).Elem()
    +}
    +
    +type RestrictedVersion struct {
    +	SecurityError
    +}
    +
    +func init() {
    +	t["RestrictedVersion"] = reflect.TypeOf((*RestrictedVersion)(nil)).Elem()
    +}
    +
    +type RestrictedVersionFault RestrictedVersion
    +
    +func init() {
    +	t["RestrictedVersionFault"] = reflect.TypeOf((*RestrictedVersionFault)(nil)).Elem()
    +}
    +
    +type RetrieveAllPermissions RetrieveAllPermissionsRequestType
    +
    +func init() {
    +	t["RetrieveAllPermissions"] = reflect.TypeOf((*RetrieveAllPermissions)(nil)).Elem()
    +}
    +
    +type RetrieveAllPermissionsRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["RetrieveAllPermissionsRequestType"] = reflect.TypeOf((*RetrieveAllPermissionsRequestType)(nil)).Elem()
    +}
    +
    +type RetrieveAllPermissionsResponse struct {
    +	Returnval []Permission `xml:"returnval,omitempty"`
    +}
    +
    +type RetrieveAnswerFile RetrieveAnswerFileRequestType
    +
    +func init() {
    +	t["RetrieveAnswerFile"] = reflect.TypeOf((*RetrieveAnswerFile)(nil)).Elem()
    +}
    +
    +type RetrieveAnswerFileForProfile RetrieveAnswerFileForProfileRequestType
    +
    +func init() {
    +	t["RetrieveAnswerFileForProfile"] = reflect.TypeOf((*RetrieveAnswerFileForProfile)(nil)).Elem()
    +}
    +
    +type RetrieveAnswerFileForProfileRequestType struct {
    +	This         ManagedObjectReference `xml:"_this"`
    +	Host         ManagedObjectReference `xml:"host"`
    +	ApplyProfile HostApplyProfile       `xml:"applyProfile"`
    +}
    +
    +func init() {
    +	t["RetrieveAnswerFileForProfileRequestType"] = reflect.TypeOf((*RetrieveAnswerFileForProfileRequestType)(nil)).Elem()
    +}
    +
    +type RetrieveAnswerFileForProfileResponse struct {
    +	Returnval *AnswerFile `xml:"returnval,omitempty"`
    +}
    +
    +type RetrieveAnswerFileRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Host ManagedObjectReference `xml:"host"`
    +}
    +
    +func init() {
    +	t["RetrieveAnswerFileRequestType"] = reflect.TypeOf((*RetrieveAnswerFileRequestType)(nil)).Elem()
    +}
    +
    +type RetrieveAnswerFileResponse struct {
    +	Returnval *AnswerFile `xml:"returnval,omitempty"`
    +}
    +
    +type RetrieveArgumentDescription RetrieveArgumentDescriptionRequestType
    +
    +func init() {
    +	t["RetrieveArgumentDescription"] = reflect.TypeOf((*RetrieveArgumentDescription)(nil)).Elem()
    +}
    +
    +type RetrieveArgumentDescriptionRequestType struct {
    +	This        ManagedObjectReference `xml:"_this"`
    +	EventTypeId string                 `xml:"eventTypeId"`
    +}
    +
    +func init() {
    +	t["RetrieveArgumentDescriptionRequestType"] = reflect.TypeOf((*RetrieveArgumentDescriptionRequestType)(nil)).Elem()
    +}
    +
    +type RetrieveArgumentDescriptionResponse struct {
    +	Returnval []EventArgDesc `xml:"returnval,omitempty"`
    +}
    +
    +type RetrieveClientCert RetrieveClientCertRequestType
    +
    +func init() {
    +	t["RetrieveClientCert"] = reflect.TypeOf((*RetrieveClientCert)(nil)).Elem()
    +}
    +
    +type RetrieveClientCertRequestType struct {
    +	This    ManagedObjectReference `xml:"_this"`
    +	Cluster KeyProviderId          `xml:"cluster"`
    +}
    +
    +func init() {
    +	t["RetrieveClientCertRequestType"] = reflect.TypeOf((*RetrieveClientCertRequestType)(nil)).Elem()
    +}
    +
    +type RetrieveClientCertResponse struct {
    +	Returnval string `xml:"returnval"`
    +}
    +
    +type RetrieveClientCsr RetrieveClientCsrRequestType
    +
    +func init() {
    +	t["RetrieveClientCsr"] = reflect.TypeOf((*RetrieveClientCsr)(nil)).Elem()
    +}
    +
    +type RetrieveClientCsrRequestType struct {
    +	This    ManagedObjectReference `xml:"_this"`
    +	Cluster KeyProviderId          `xml:"cluster"`
    +}
    +
    +func init() {
    +	t["RetrieveClientCsrRequestType"] = reflect.TypeOf((*RetrieveClientCsrRequestType)(nil)).Elem()
    +}
    +
    +type RetrieveClientCsrResponse struct {
    +	Returnval string `xml:"returnval"`
    +}
    +
    +type RetrieveDasAdvancedRuntimeInfo RetrieveDasAdvancedRuntimeInfoRequestType
    +
    +func init() {
    +	t["RetrieveDasAdvancedRuntimeInfo"] = reflect.TypeOf((*RetrieveDasAdvancedRuntimeInfo)(nil)).Elem()
    +}
    +
    +type RetrieveDasAdvancedRuntimeInfoRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["RetrieveDasAdvancedRuntimeInfoRequestType"] = reflect.TypeOf((*RetrieveDasAdvancedRuntimeInfoRequestType)(nil)).Elem()
    +}
    +
    +type RetrieveDasAdvancedRuntimeInfoResponse struct {
    +	Returnval BaseClusterDasAdvancedRuntimeInfo `xml:"returnval,omitempty,typeattr"`
    +}
    +
    +type RetrieveDescription RetrieveDescriptionRequestType
    +
    +func init() {
    +	t["RetrieveDescription"] = reflect.TypeOf((*RetrieveDescription)(nil)).Elem()
    +}
    +
    +type RetrieveDescriptionRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["RetrieveDescriptionRequestType"] = reflect.TypeOf((*RetrieveDescriptionRequestType)(nil)).Elem()
    +}
    +
    +type RetrieveDescriptionResponse struct {
    +	Returnval *ProfileDescription `xml:"returnval,omitempty"`
    +}
    +
    +type RetrieveDiskPartitionInfo RetrieveDiskPartitionInfoRequestType
    +
    +func init() {
    +	t["RetrieveDiskPartitionInfo"] = reflect.TypeOf((*RetrieveDiskPartitionInfo)(nil)).Elem()
    +}
    +
    +type RetrieveDiskPartitionInfoRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	DevicePath []string               `xml:"devicePath"`
    +}
    +
    +func init() {
    +	t["RetrieveDiskPartitionInfoRequestType"] = reflect.TypeOf((*RetrieveDiskPartitionInfoRequestType)(nil)).Elem()
    +}
    +
    +type RetrieveDiskPartitionInfoResponse struct {
    +	Returnval []HostDiskPartitionInfo `xml:"returnval,omitempty"`
    +}
    +
    +type RetrieveEntityPermissions RetrieveEntityPermissionsRequestType
    +
    +func init() {
    +	t["RetrieveEntityPermissions"] = reflect.TypeOf((*RetrieveEntityPermissions)(nil)).Elem()
    +}
    +
    +type RetrieveEntityPermissionsRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	Entity    ManagedObjectReference `xml:"entity"`
    +	Inherited bool                   `xml:"inherited"`
    +}
    +
    +func init() {
    +	t["RetrieveEntityPermissionsRequestType"] = reflect.TypeOf((*RetrieveEntityPermissionsRequestType)(nil)).Elem()
    +}
    +
    +type RetrieveEntityPermissionsResponse struct {
    +	Returnval []Permission `xml:"returnval,omitempty"`
    +}
    +
    +type RetrieveEntityScheduledTask RetrieveEntityScheduledTaskRequestType
    +
    +func init() {
    +	t["RetrieveEntityScheduledTask"] = reflect.TypeOf((*RetrieveEntityScheduledTask)(nil)).Elem()
    +}
    +
    +type RetrieveEntityScheduledTaskRequestType struct {
    +	This   ManagedObjectReference  `xml:"_this"`
    +	Entity *ManagedObjectReference `xml:"entity,omitempty"`
    +}
    +
    +func init() {
    +	t["RetrieveEntityScheduledTaskRequestType"] = reflect.TypeOf((*RetrieveEntityScheduledTaskRequestType)(nil)).Elem()
    +}
    +
    +type RetrieveEntityScheduledTaskResponse struct {
    +	Returnval []ManagedObjectReference `xml:"returnval,omitempty"`
    +}
    +
    +type RetrieveHardwareUptime RetrieveHardwareUptimeRequestType
    +
    +func init() {
    +	t["RetrieveHardwareUptime"] = reflect.TypeOf((*RetrieveHardwareUptime)(nil)).Elem()
    +}
    +
    +type RetrieveHardwareUptimeRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["RetrieveHardwareUptimeRequestType"] = reflect.TypeOf((*RetrieveHardwareUptimeRequestType)(nil)).Elem()
    +}
    +
    +type RetrieveHardwareUptimeResponse struct {
    +	Returnval int64 `xml:"returnval"`
    +}
    +
    +type RetrieveHostAccessControlEntries RetrieveHostAccessControlEntriesRequestType
    +
    +func init() {
    +	t["RetrieveHostAccessControlEntries"] = reflect.TypeOf((*RetrieveHostAccessControlEntries)(nil)).Elem()
    +}
    +
    +type RetrieveHostAccessControlEntriesRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["RetrieveHostAccessControlEntriesRequestType"] = reflect.TypeOf((*RetrieveHostAccessControlEntriesRequestType)(nil)).Elem()
    +}
    +
    +type RetrieveHostAccessControlEntriesResponse struct {
    +	Returnval []HostAccessControlEntry `xml:"returnval,omitempty"`
    +}
    +
    +type RetrieveHostCustomizations RetrieveHostCustomizationsRequestType
    +
    +func init() {
    +	t["RetrieveHostCustomizations"] = reflect.TypeOf((*RetrieveHostCustomizations)(nil)).Elem()
    +}
    +
    +type RetrieveHostCustomizationsForProfile RetrieveHostCustomizationsForProfileRequestType
    +
    +func init() {
    +	t["RetrieveHostCustomizationsForProfile"] = reflect.TypeOf((*RetrieveHostCustomizationsForProfile)(nil)).Elem()
    +}
    +
    +type RetrieveHostCustomizationsForProfileRequestType struct {
    +	This         ManagedObjectReference   `xml:"_this"`
    +	Hosts        []ManagedObjectReference `xml:"hosts,omitempty"`
    +	ApplyProfile HostApplyProfile         `xml:"applyProfile"`
    +}
    +
    +func init() {
    +	t["RetrieveHostCustomizationsForProfileRequestType"] = reflect.TypeOf((*RetrieveHostCustomizationsForProfileRequestType)(nil)).Elem()
    +}
    +
    +type RetrieveHostCustomizationsForProfileResponse struct {
    +	Returnval []StructuredCustomizations `xml:"returnval,omitempty"`
    +}
    +
    +type RetrieveHostCustomizationsRequestType struct {
    +	This  ManagedObjectReference   `xml:"_this"`
    +	Hosts []ManagedObjectReference `xml:"hosts,omitempty"`
    +}
    +
    +func init() {
    +	t["RetrieveHostCustomizationsRequestType"] = reflect.TypeOf((*RetrieveHostCustomizationsRequestType)(nil)).Elem()
    +}
    +
    +type RetrieveHostCustomizationsResponse struct {
    +	Returnval []StructuredCustomizations `xml:"returnval,omitempty"`
    +}
    +
    +type RetrieveHostSpecification RetrieveHostSpecificationRequestType
    +
    +func init() {
    +	t["RetrieveHostSpecification"] = reflect.TypeOf((*RetrieveHostSpecification)(nil)).Elem()
    +}
    +
    +type RetrieveHostSpecificationRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	Host     ManagedObjectReference `xml:"host"`
    +	FromHost bool                   `xml:"fromHost"`
    +}
    +
    +func init() {
    +	t["RetrieveHostSpecificationRequestType"] = reflect.TypeOf((*RetrieveHostSpecificationRequestType)(nil)).Elem()
    +}
    +
    +type RetrieveHostSpecificationResponse struct {
    +	Returnval HostSpecification `xml:"returnval"`
    +}
    +
    +type RetrieveKmipServerCert RetrieveKmipServerCertRequestType
    +
    +func init() {
    +	t["RetrieveKmipServerCert"] = reflect.TypeOf((*RetrieveKmipServerCert)(nil)).Elem()
    +}
    +
    +type RetrieveKmipServerCertRequestType struct {
    +	This        ManagedObjectReference `xml:"_this"`
    +	KeyProvider KeyProviderId          `xml:"keyProvider"`
    +	Server      KmipServerInfo         `xml:"server"`
    +}
    +
    +func init() {
    +	t["RetrieveKmipServerCertRequestType"] = reflect.TypeOf((*RetrieveKmipServerCertRequestType)(nil)).Elem()
    +}
    +
    +type RetrieveKmipServerCertResponse struct {
    +	Returnval CryptoManagerKmipServerCertInfo `xml:"returnval"`
    +}
    +
    +type RetrieveKmipServersStatusRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	Clusters []KmipClusterInfo      `xml:"clusters,omitempty"`
    +}
    +
    +func init() {
    +	t["RetrieveKmipServersStatusRequestType"] = reflect.TypeOf((*RetrieveKmipServersStatusRequestType)(nil)).Elem()
    +}
    +
    +type RetrieveKmipServersStatus_Task RetrieveKmipServersStatusRequestType
    +
    +func init() {
    +	t["RetrieveKmipServersStatus_Task"] = reflect.TypeOf((*RetrieveKmipServersStatus_Task)(nil)).Elem()
    +}
    +
    +type RetrieveKmipServersStatus_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type RetrieveObjectScheduledTask RetrieveObjectScheduledTaskRequestType
    +
    +func init() {
    +	t["RetrieveObjectScheduledTask"] = reflect.TypeOf((*RetrieveObjectScheduledTask)(nil)).Elem()
    +}
    +
    +type RetrieveObjectScheduledTaskRequestType struct {
    +	This ManagedObjectReference  `xml:"_this"`
    +	Obj  *ManagedObjectReference `xml:"obj,omitempty"`
    +}
    +
    +func init() {
    +	t["RetrieveObjectScheduledTaskRequestType"] = reflect.TypeOf((*RetrieveObjectScheduledTaskRequestType)(nil)).Elem()
    +}
    +
    +type RetrieveObjectScheduledTaskResponse struct {
    +	Returnval []ManagedObjectReference `xml:"returnval,omitempty"`
    +}
    +
    +type RetrieveOptions struct {
    +	DynamicData
    +
    +	MaxObjects int32 `xml:"maxObjects,omitempty"`
    +}
    +
    +func init() {
    +	t["RetrieveOptions"] = reflect.TypeOf((*RetrieveOptions)(nil)).Elem()
    +}
    +
    +type RetrieveProductComponents RetrieveProductComponentsRequestType
    +
    +func init() {
    +	t["RetrieveProductComponents"] = reflect.TypeOf((*RetrieveProductComponents)(nil)).Elem()
    +}
    +
    +type RetrieveProductComponentsRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["RetrieveProductComponentsRequestType"] = reflect.TypeOf((*RetrieveProductComponentsRequestType)(nil)).Elem()
    +}
    +
    +type RetrieveProductComponentsResponse struct {
    +	Returnval []ProductComponentInfo `xml:"returnval,omitempty"`
    +}
    +
    +type RetrieveProperties RetrievePropertiesRequestType
    +
    +func init() {
    +	t["RetrieveProperties"] = reflect.TypeOf((*RetrieveProperties)(nil)).Elem()
    +}
    +
    +type RetrievePropertiesEx RetrievePropertiesExRequestType
    +
    +func init() {
    +	t["RetrievePropertiesEx"] = reflect.TypeOf((*RetrievePropertiesEx)(nil)).Elem()
    +}
    +
    +type RetrievePropertiesExRequestType struct {
    +	This    ManagedObjectReference `xml:"_this"`
    +	SpecSet []PropertyFilterSpec   `xml:"specSet"`
    +	Options RetrieveOptions        `xml:"options"`
    +}
    +
    +func init() {
    +	t["RetrievePropertiesExRequestType"] = reflect.TypeOf((*RetrievePropertiesExRequestType)(nil)).Elem()
    +}
    +
    +type RetrievePropertiesExResponse struct {
    +	Returnval *RetrieveResult `xml:"returnval,omitempty"`
    +}
    +
    +type RetrievePropertiesRequestType struct {
    +	This    ManagedObjectReference `xml:"_this"`
    +	SpecSet []PropertyFilterSpec   `xml:"specSet"`
    +}
    +
    +func init() {
    +	t["RetrievePropertiesRequestType"] = reflect.TypeOf((*RetrievePropertiesRequestType)(nil)).Elem()
    +}
    +
    +type RetrievePropertiesResponse struct {
    +	Returnval []ObjectContent `xml:"returnval,omitempty"`
    +}
    +
    +type RetrieveResult struct {
    +	DynamicData
    +
    +	Token   string          `xml:"token,omitempty"`
    +	Objects []ObjectContent `xml:"objects"`
    +}
    +
    +func init() {
    +	t["RetrieveResult"] = reflect.TypeOf((*RetrieveResult)(nil)).Elem()
    +}
    +
    +type RetrieveRolePermissions RetrieveRolePermissionsRequestType
    +
    +func init() {
    +	t["RetrieveRolePermissions"] = reflect.TypeOf((*RetrieveRolePermissions)(nil)).Elem()
    +}
    +
    +type RetrieveRolePermissionsRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	RoleId int32                  `xml:"roleId"`
    +}
    +
    +func init() {
    +	t["RetrieveRolePermissionsRequestType"] = reflect.TypeOf((*RetrieveRolePermissionsRequestType)(nil)).Elem()
    +}
    +
    +type RetrieveRolePermissionsResponse struct {
    +	Returnval []Permission `xml:"returnval,omitempty"`
    +}
    +
    +type RetrieveSelfSignedClientCert RetrieveSelfSignedClientCertRequestType
    +
    +func init() {
    +	t["RetrieveSelfSignedClientCert"] = reflect.TypeOf((*RetrieveSelfSignedClientCert)(nil)).Elem()
    +}
    +
    +type RetrieveSelfSignedClientCertRequestType struct {
    +	This    ManagedObjectReference `xml:"_this"`
    +	Cluster KeyProviderId          `xml:"cluster"`
    +}
    +
    +func init() {
    +	t["RetrieveSelfSignedClientCertRequestType"] = reflect.TypeOf((*RetrieveSelfSignedClientCertRequestType)(nil)).Elem()
    +}
    +
    +type RetrieveSelfSignedClientCertResponse struct {
    +	Returnval string `xml:"returnval"`
    +}
    +
    +type RetrieveServiceContent RetrieveServiceContentRequestType
    +
    +func init() {
    +	t["RetrieveServiceContent"] = reflect.TypeOf((*RetrieveServiceContent)(nil)).Elem()
    +}
    +
    +type RetrieveServiceContentRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["RetrieveServiceContentRequestType"] = reflect.TypeOf((*RetrieveServiceContentRequestType)(nil)).Elem()
    +}
    +
    +type RetrieveServiceContentResponse struct {
    +	Returnval ServiceContent `xml:"returnval"`
    +}
    +
    +type RetrieveSnapshotInfo RetrieveSnapshotInfoRequestType
    +
    +func init() {
    +	t["RetrieveSnapshotInfo"] = reflect.TypeOf((*RetrieveSnapshotInfo)(nil)).Elem()
    +}
    +
    +type RetrieveSnapshotInfoRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	Id        ID                     `xml:"id"`
    +	Datastore ManagedObjectReference `xml:"datastore"`
    +}
    +
    +func init() {
    +	t["RetrieveSnapshotInfoRequestType"] = reflect.TypeOf((*RetrieveSnapshotInfoRequestType)(nil)).Elem()
    +}
    +
    +type RetrieveSnapshotInfoResponse struct {
    +	Returnval VStorageObjectSnapshotInfo `xml:"returnval"`
    +}
    +
    +type RetrieveUserGroups RetrieveUserGroupsRequestType
    +
    +func init() {
    +	t["RetrieveUserGroups"] = reflect.TypeOf((*RetrieveUserGroups)(nil)).Elem()
    +}
    +
    +type RetrieveUserGroupsRequestType struct {
    +	This           ManagedObjectReference `xml:"_this"`
    +	Domain         string                 `xml:"domain,omitempty"`
    +	SearchStr      string                 `xml:"searchStr"`
    +	BelongsToGroup string                 `xml:"belongsToGroup,omitempty"`
    +	BelongsToUser  string                 `xml:"belongsToUser,omitempty"`
    +	ExactMatch     bool                   `xml:"exactMatch"`
    +	FindUsers      bool                   `xml:"findUsers"`
    +	FindGroups     bool                   `xml:"findGroups"`
    +}
    +
    +func init() {
    +	t["RetrieveUserGroupsRequestType"] = reflect.TypeOf((*RetrieveUserGroupsRequestType)(nil)).Elem()
    +}
    +
    +type RetrieveUserGroupsResponse struct {
    +	Returnval []BaseUserSearchResult `xml:"returnval,omitempty,typeattr"`
    +}
    +
    +type RetrieveVStorageInfrastructureObjectPolicy RetrieveVStorageInfrastructureObjectPolicyRequestType
    +
    +func init() {
    +	t["RetrieveVStorageInfrastructureObjectPolicy"] = reflect.TypeOf((*RetrieveVStorageInfrastructureObjectPolicy)(nil)).Elem()
    +}
    +
    +type RetrieveVStorageInfrastructureObjectPolicyRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	Datastore ManagedObjectReference `xml:"datastore"`
    +}
    +
    +func init() {
    +	t["RetrieveVStorageInfrastructureObjectPolicyRequestType"] = reflect.TypeOf((*RetrieveVStorageInfrastructureObjectPolicyRequestType)(nil)).Elem()
    +}
    +
    +type RetrieveVStorageInfrastructureObjectPolicyResponse struct {
    +	Returnval []VslmInfrastructureObjectPolicy `xml:"returnval,omitempty"`
    +}
    +
    +type RetrieveVStorageObjSpec struct {
    +	DynamicData
    +
    +	Id        ID                     `xml:"id"`
    +	Datastore ManagedObjectReference `xml:"datastore"`
    +}
    +
    +func init() {
    +	t["RetrieveVStorageObjSpec"] = reflect.TypeOf((*RetrieveVStorageObjSpec)(nil)).Elem()
    +}
    +
    +type RetrieveVStorageObject RetrieveVStorageObjectRequestType
    +
    +func init() {
    +	t["RetrieveVStorageObject"] = reflect.TypeOf((*RetrieveVStorageObject)(nil)).Elem()
    +}
    +
    +type RetrieveVStorageObjectAssociations RetrieveVStorageObjectAssociationsRequestType
    +
    +func init() {
    +	t["RetrieveVStorageObjectAssociations"] = reflect.TypeOf((*RetrieveVStorageObjectAssociations)(nil)).Elem()
    +}
    +
    +type RetrieveVStorageObjectAssociationsRequestType struct {
    +	This ManagedObjectReference    `xml:"_this"`
    +	Ids  []RetrieveVStorageObjSpec `xml:"ids,omitempty"`
    +}
    +
    +func init() {
    +	t["RetrieveVStorageObjectAssociationsRequestType"] = reflect.TypeOf((*RetrieveVStorageObjectAssociationsRequestType)(nil)).Elem()
    +}
    +
    +type RetrieveVStorageObjectAssociationsResponse struct {
    +	Returnval []VStorageObjectAssociations `xml:"returnval,omitempty"`
    +}
    +
    +type RetrieveVStorageObjectRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	Id        ID                     `xml:"id"`
    +	Datastore ManagedObjectReference `xml:"datastore"`
    +}
    +
    +func init() {
    +	t["RetrieveVStorageObjectRequestType"] = reflect.TypeOf((*RetrieveVStorageObjectRequestType)(nil)).Elem()
    +}
    +
    +type RetrieveVStorageObjectResponse struct {
    +	Returnval VStorageObject `xml:"returnval"`
    +}
    +
    +type RetrieveVStorageObjectState RetrieveVStorageObjectStateRequestType
    +
    +func init() {
    +	t["RetrieveVStorageObjectState"] = reflect.TypeOf((*RetrieveVStorageObjectState)(nil)).Elem()
    +}
    +
    +type RetrieveVStorageObjectStateRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	Id        ID                     `xml:"id"`
    +	Datastore ManagedObjectReference `xml:"datastore"`
    +}
    +
    +func init() {
    +	t["RetrieveVStorageObjectStateRequestType"] = reflect.TypeOf((*RetrieveVStorageObjectStateRequestType)(nil)).Elem()
    +}
    +
    +type RetrieveVStorageObjectStateResponse struct {
    +	Returnval VStorageObjectStateInfo `xml:"returnval"`
    +}
    +
    +type RevertToCurrentSnapshotRequestType struct {
    +	This            ManagedObjectReference  `xml:"_this"`
    +	Host            *ManagedObjectReference `xml:"host,omitempty"`
    +	SuppressPowerOn *bool                   `xml:"suppressPowerOn"`
    +}
    +
    +func init() {
    +	t["RevertToCurrentSnapshotRequestType"] = reflect.TypeOf((*RevertToCurrentSnapshotRequestType)(nil)).Elem()
    +}
    +
    +type RevertToCurrentSnapshot_Task RevertToCurrentSnapshotRequestType
    +
    +func init() {
    +	t["RevertToCurrentSnapshot_Task"] = reflect.TypeOf((*RevertToCurrentSnapshot_Task)(nil)).Elem()
    +}
    +
    +type RevertToCurrentSnapshot_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type RevertToSnapshotRequestType struct {
    +	This            ManagedObjectReference  `xml:"_this"`
    +	Host            *ManagedObjectReference `xml:"host,omitempty"`
    +	SuppressPowerOn *bool                   `xml:"suppressPowerOn"`
    +}
    +
    +func init() {
    +	t["RevertToSnapshotRequestType"] = reflect.TypeOf((*RevertToSnapshotRequestType)(nil)).Elem()
    +}
    +
    +type RevertToSnapshot_Task RevertToSnapshotRequestType
    +
    +func init() {
    +	t["RevertToSnapshot_Task"] = reflect.TypeOf((*RevertToSnapshot_Task)(nil)).Elem()
    +}
    +
    +type RevertToSnapshot_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type RevertVStorageObjectRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	Id         ID                     `xml:"id"`
    +	Datastore  ManagedObjectReference `xml:"datastore"`
    +	SnapshotId ID                     `xml:"snapshotId"`
    +}
    +
    +func init() {
    +	t["RevertVStorageObjectRequestType"] = reflect.TypeOf((*RevertVStorageObjectRequestType)(nil)).Elem()
    +}
    +
    +type RevertVStorageObject_Task RevertVStorageObjectRequestType
    +
    +func init() {
    +	t["RevertVStorageObject_Task"] = reflect.TypeOf((*RevertVStorageObject_Task)(nil)).Elem()
    +}
    +
    +type RevertVStorageObject_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type RewindCollector RewindCollectorRequestType
    +
    +func init() {
    +	t["RewindCollector"] = reflect.TypeOf((*RewindCollector)(nil)).Elem()
    +}
    +
    +type RewindCollectorRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["RewindCollectorRequestType"] = reflect.TypeOf((*RewindCollectorRequestType)(nil)).Elem()
    +}
    +
    +type RewindCollectorResponse struct {
    +}
    +
    +type RoleAddedEvent struct {
    +	RoleEvent
    +
    +	PrivilegeList []string `xml:"privilegeList,omitempty"`
    +}
    +
    +func init() {
    +	t["RoleAddedEvent"] = reflect.TypeOf((*RoleAddedEvent)(nil)).Elem()
    +}
    +
    +type RoleEvent struct {
    +	AuthorizationEvent
    +
    +	Role RoleEventArgument `xml:"role"`
    +}
    +
    +func init() {
    +	t["RoleEvent"] = reflect.TypeOf((*RoleEvent)(nil)).Elem()
    +}
    +
    +type RoleEventArgument struct {
    +	EventArgument
    +
    +	RoleId int32  `xml:"roleId"`
    +	Name   string `xml:"name"`
    +}
    +
    +func init() {
    +	t["RoleEventArgument"] = reflect.TypeOf((*RoleEventArgument)(nil)).Elem()
    +}
    +
    +type RoleRemovedEvent struct {
    +	RoleEvent
    +}
    +
    +func init() {
    +	t["RoleRemovedEvent"] = reflect.TypeOf((*RoleRemovedEvent)(nil)).Elem()
    +}
    +
    +type RoleUpdatedEvent struct {
    +	RoleEvent
    +
    +	PrivilegeList     []string `xml:"privilegeList,omitempty"`
    +	PrevRoleName      string   `xml:"prevRoleName,omitempty"`
    +	PrivilegesAdded   []string `xml:"privilegesAdded,omitempty"`
    +	PrivilegesRemoved []string `xml:"privilegesRemoved,omitempty"`
    +}
    +
    +func init() {
    +	t["RoleUpdatedEvent"] = reflect.TypeOf((*RoleUpdatedEvent)(nil)).Elem()
    +}
    +
    +type RollbackEvent struct {
    +	DvsEvent
    +
    +	HostName   string `xml:"hostName"`
    +	MethodName string `xml:"methodName,omitempty"`
    +}
    +
    +func init() {
    +	t["RollbackEvent"] = reflect.TypeOf((*RollbackEvent)(nil)).Elem()
    +}
    +
    +type RollbackFailure struct {
    +	DvsFault
    +
    +	EntityName string `xml:"entityName"`
    +	EntityType string `xml:"entityType"`
    +}
    +
    +func init() {
    +	t["RollbackFailure"] = reflect.TypeOf((*RollbackFailure)(nil)).Elem()
    +}
    +
    +type RollbackFailureFault RollbackFailure
    +
    +func init() {
    +	t["RollbackFailureFault"] = reflect.TypeOf((*RollbackFailureFault)(nil)).Elem()
    +}
    +
    +type RuleViolation struct {
    +	VmConfigFault
    +
    +	Host *ManagedObjectReference `xml:"host,omitempty"`
    +	Rule BaseClusterRuleInfo     `xml:"rule,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["RuleViolation"] = reflect.TypeOf((*RuleViolation)(nil)).Elem()
    +}
    +
    +type RuleViolationFault RuleViolation
    +
    +func init() {
    +	t["RuleViolationFault"] = reflect.TypeOf((*RuleViolationFault)(nil)).Elem()
    +}
    +
    +type RunScheduledTask RunScheduledTaskRequestType
    +
    +func init() {
    +	t["RunScheduledTask"] = reflect.TypeOf((*RunScheduledTask)(nil)).Elem()
    +}
    +
    +type RunScheduledTaskRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["RunScheduledTaskRequestType"] = reflect.TypeOf((*RunScheduledTaskRequestType)(nil)).Elem()
    +}
    +
    +type RunScheduledTaskResponse struct {
    +}
    +
    +type RunScriptAction struct {
    +	Action
    +
    +	Script string `xml:"script"`
    +}
    +
    +func init() {
    +	t["RunScriptAction"] = reflect.TypeOf((*RunScriptAction)(nil)).Elem()
    +}
    +
    +type RunVsanPhysicalDiskDiagnostics RunVsanPhysicalDiskDiagnosticsRequestType
    +
    +func init() {
    +	t["RunVsanPhysicalDiskDiagnostics"] = reflect.TypeOf((*RunVsanPhysicalDiskDiagnostics)(nil)).Elem()
    +}
    +
    +type RunVsanPhysicalDiskDiagnosticsRequestType struct {
    +	This  ManagedObjectReference `xml:"_this"`
    +	Disks []string               `xml:"disks,omitempty"`
    +}
    +
    +func init() {
    +	t["RunVsanPhysicalDiskDiagnosticsRequestType"] = reflect.TypeOf((*RunVsanPhysicalDiskDiagnosticsRequestType)(nil)).Elem()
    +}
    +
    +type RunVsanPhysicalDiskDiagnosticsResponse struct {
    +	Returnval []HostVsanInternalSystemVsanPhysicalDiskDiagnosticsResult `xml:"returnval"`
    +}
    +
    +type RuntimeFault struct {
    +	MethodFault
    +}
    +
    +func init() {
    +	t["RuntimeFault"] = reflect.TypeOf((*RuntimeFault)(nil)).Elem()
    +}
    +
    +type RuntimeFaultFault BaseRuntimeFault
    +
    +func init() {
    +	t["RuntimeFaultFault"] = reflect.TypeOf((*RuntimeFaultFault)(nil)).Elem()
    +}
    +
    +type SAMLTokenAuthentication struct {
    +	GuestAuthentication
    +
    +	Token    string `xml:"token"`
    +	Username string `xml:"username,omitempty"`
    +}
    +
    +func init() {
    +	t["SAMLTokenAuthentication"] = reflect.TypeOf((*SAMLTokenAuthentication)(nil)).Elem()
    +}
    +
    +type SDDCBase struct {
    +	DynamicData
    +}
    +
    +func init() {
    +	t["SDDCBase"] = reflect.TypeOf((*SDDCBase)(nil)).Elem()
    +}
    +
    +type SSLDisabledFault struct {
    +	HostConnectFault
    +}
    +
    +func init() {
    +	t["SSLDisabledFault"] = reflect.TypeOf((*SSLDisabledFault)(nil)).Elem()
    +}
    +
    +type SSLDisabledFaultFault SSLDisabledFault
    +
    +func init() {
    +	t["SSLDisabledFaultFault"] = reflect.TypeOf((*SSLDisabledFaultFault)(nil)).Elem()
    +}
    +
    +type SSLVerifyFault struct {
    +	HostConnectFault
    +
    +	SelfSigned bool   `xml:"selfSigned"`
    +	Thumbprint string `xml:"thumbprint"`
    +}
    +
    +func init() {
    +	t["SSLVerifyFault"] = reflect.TypeOf((*SSLVerifyFault)(nil)).Elem()
    +}
    +
    +type SSLVerifyFaultFault SSLVerifyFault
    +
    +func init() {
    +	t["SSLVerifyFaultFault"] = reflect.TypeOf((*SSLVerifyFaultFault)(nil)).Elem()
    +}
    +
    +type SSPIAuthentication struct {
    +	GuestAuthentication
    +
    +	SspiToken string `xml:"sspiToken"`
    +}
    +
    +func init() {
    +	t["SSPIAuthentication"] = reflect.TypeOf((*SSPIAuthentication)(nil)).Elem()
    +}
    +
    +type SSPIChallenge struct {
    +	VimFault
    +
    +	Base64Token string `xml:"base64Token"`
    +}
    +
    +func init() {
    +	t["SSPIChallenge"] = reflect.TypeOf((*SSPIChallenge)(nil)).Elem()
    +}
    +
    +type SSPIChallengeFault SSPIChallenge
    +
    +func init() {
    +	t["SSPIChallengeFault"] = reflect.TypeOf((*SSPIChallengeFault)(nil)).Elem()
    +}
    +
    +type ScanHostPatchRequestType struct {
    +	This       ManagedObjectReference  `xml:"_this"`
    +	Repository HostPatchManagerLocator `xml:"repository"`
    +	UpdateID   []string                `xml:"updateID,omitempty"`
    +}
    +
    +func init() {
    +	t["ScanHostPatchRequestType"] = reflect.TypeOf((*ScanHostPatchRequestType)(nil)).Elem()
    +}
    +
    +type ScanHostPatchV2RequestType struct {
    +	This       ManagedObjectReference                     `xml:"_this"`
    +	MetaUrls   []string                                   `xml:"metaUrls,omitempty"`
    +	BundleUrls []string                                   `xml:"bundleUrls,omitempty"`
    +	Spec       *HostPatchManagerPatchManagerOperationSpec `xml:"spec,omitempty"`
    +}
    +
    +func init() {
    +	t["ScanHostPatchV2RequestType"] = reflect.TypeOf((*ScanHostPatchV2RequestType)(nil)).Elem()
    +}
    +
    +type ScanHostPatchV2_Task ScanHostPatchV2RequestType
    +
    +func init() {
    +	t["ScanHostPatchV2_Task"] = reflect.TypeOf((*ScanHostPatchV2_Task)(nil)).Elem()
    +}
    +
    +type ScanHostPatchV2_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type ScanHostPatch_Task ScanHostPatchRequestType
    +
    +func init() {
    +	t["ScanHostPatch_Task"] = reflect.TypeOf((*ScanHostPatch_Task)(nil)).Elem()
    +}
    +
    +type ScanHostPatch_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type ScheduleReconcileDatastoreInventory ScheduleReconcileDatastoreInventoryRequestType
    +
    +func init() {
    +	t["ScheduleReconcileDatastoreInventory"] = reflect.TypeOf((*ScheduleReconcileDatastoreInventory)(nil)).Elem()
    +}
    +
    +type ScheduleReconcileDatastoreInventoryRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	Datastore ManagedObjectReference `xml:"datastore"`
    +}
    +
    +func init() {
    +	t["ScheduleReconcileDatastoreInventoryRequestType"] = reflect.TypeOf((*ScheduleReconcileDatastoreInventoryRequestType)(nil)).Elem()
    +}
    +
    +type ScheduleReconcileDatastoreInventoryResponse struct {
    +}
    +
    +type ScheduledHardwareUpgradeInfo struct {
    +	DynamicData
    +
    +	UpgradePolicy                  string                `xml:"upgradePolicy,omitempty"`
    +	VersionKey                     string                `xml:"versionKey,omitempty"`
    +	ScheduledHardwareUpgradeStatus string                `xml:"scheduledHardwareUpgradeStatus,omitempty"`
    +	Fault                          *LocalizedMethodFault `xml:"fault,omitempty"`
    +}
    +
    +func init() {
    +	t["ScheduledHardwareUpgradeInfo"] = reflect.TypeOf((*ScheduledHardwareUpgradeInfo)(nil)).Elem()
    +}
    +
    +type ScheduledTaskCompletedEvent struct {
    +	ScheduledTaskEvent
    +}
    +
    +func init() {
    +	t["ScheduledTaskCompletedEvent"] = reflect.TypeOf((*ScheduledTaskCompletedEvent)(nil)).Elem()
    +}
    +
    +type ScheduledTaskCreatedEvent struct {
    +	ScheduledTaskEvent
    +}
    +
    +func init() {
    +	t["ScheduledTaskCreatedEvent"] = reflect.TypeOf((*ScheduledTaskCreatedEvent)(nil)).Elem()
    +}
    +
    +type ScheduledTaskDescription struct {
    +	DynamicData
    +
    +	Action        []BaseTypeDescription    `xml:"action,typeattr"`
    +	SchedulerInfo []ScheduledTaskDetail    `xml:"schedulerInfo"`
    +	State         []BaseElementDescription `xml:"state,typeattr"`
    +	DayOfWeek     []BaseElementDescription `xml:"dayOfWeek,typeattr"`
    +	WeekOfMonth   []BaseElementDescription `xml:"weekOfMonth,typeattr"`
    +}
    +
    +func init() {
    +	t["ScheduledTaskDescription"] = reflect.TypeOf((*ScheduledTaskDescription)(nil)).Elem()
    +}
    +
    +type ScheduledTaskDetail struct {
    +	TypeDescription
    +
    +	Frequency string `xml:"frequency"`
    +}
    +
    +func init() {
    +	t["ScheduledTaskDetail"] = reflect.TypeOf((*ScheduledTaskDetail)(nil)).Elem()
    +}
    +
    +type ScheduledTaskEmailCompletedEvent struct {
    +	ScheduledTaskEvent
    +
    +	To string `xml:"to"`
    +}
    +
    +func init() {
    +	t["ScheduledTaskEmailCompletedEvent"] = reflect.TypeOf((*ScheduledTaskEmailCompletedEvent)(nil)).Elem()
    +}
    +
    +type ScheduledTaskEmailFailedEvent struct {
    +	ScheduledTaskEvent
    +
    +	To     string               `xml:"to"`
    +	Reason LocalizedMethodFault `xml:"reason"`
    +}
    +
    +func init() {
    +	t["ScheduledTaskEmailFailedEvent"] = reflect.TypeOf((*ScheduledTaskEmailFailedEvent)(nil)).Elem()
    +}
    +
    +type ScheduledTaskEvent struct {
    +	Event
    +
    +	ScheduledTask ScheduledTaskEventArgument `xml:"scheduledTask"`
    +	Entity        ManagedEntityEventArgument `xml:"entity"`
    +}
    +
    +func init() {
    +	t["ScheduledTaskEvent"] = reflect.TypeOf((*ScheduledTaskEvent)(nil)).Elem()
    +}
    +
    +type ScheduledTaskEventArgument struct {
    +	EntityEventArgument
    +
    +	ScheduledTask ManagedObjectReference `xml:"scheduledTask"`
    +}
    +
    +func init() {
    +	t["ScheduledTaskEventArgument"] = reflect.TypeOf((*ScheduledTaskEventArgument)(nil)).Elem()
    +}
    +
    +type ScheduledTaskFailedEvent struct {
    +	ScheduledTaskEvent
    +
    +	Reason LocalizedMethodFault `xml:"reason"`
    +}
    +
    +func init() {
    +	t["ScheduledTaskFailedEvent"] = reflect.TypeOf((*ScheduledTaskFailedEvent)(nil)).Elem()
    +}
    +
    +type ScheduledTaskInfo struct {
    +	ScheduledTaskSpec
    +
    +	ScheduledTask    ManagedObjectReference  `xml:"scheduledTask"`
    +	Entity           ManagedObjectReference  `xml:"entity"`
    +	LastModifiedTime time.Time               `xml:"lastModifiedTime"`
    +	LastModifiedUser string                  `xml:"lastModifiedUser"`
    +	NextRunTime      *time.Time              `xml:"nextRunTime"`
    +	PrevRunTime      *time.Time              `xml:"prevRunTime"`
    +	State            TaskInfoState           `xml:"state"`
    +	Error            *LocalizedMethodFault   `xml:"error,omitempty"`
    +	Result           AnyType                 `xml:"result,omitempty,typeattr"`
    +	Progress         int32                   `xml:"progress,omitempty"`
    +	ActiveTask       *ManagedObjectReference `xml:"activeTask,omitempty"`
    +	TaskObject       *ManagedObjectReference `xml:"taskObject,omitempty"`
    +}
    +
    +func init() {
    +	t["ScheduledTaskInfo"] = reflect.TypeOf((*ScheduledTaskInfo)(nil)).Elem()
    +}
    +
    +type ScheduledTaskReconfiguredEvent struct {
    +	ScheduledTaskEvent
    +
    +	ConfigChanges *ChangesInfoEventArgument `xml:"configChanges,omitempty"`
    +}
    +
    +func init() {
    +	t["ScheduledTaskReconfiguredEvent"] = reflect.TypeOf((*ScheduledTaskReconfiguredEvent)(nil)).Elem()
    +}
    +
    +type ScheduledTaskRemovedEvent struct {
    +	ScheduledTaskEvent
    +}
    +
    +func init() {
    +	t["ScheduledTaskRemovedEvent"] = reflect.TypeOf((*ScheduledTaskRemovedEvent)(nil)).Elem()
    +}
    +
    +type ScheduledTaskSpec struct {
    +	DynamicData
    +
    +	Name         string            `xml:"name"`
    +	Description  string            `xml:"description"`
    +	Enabled      bool              `xml:"enabled"`
    +	Scheduler    BaseTaskScheduler `xml:"scheduler,typeattr"`
    +	Action       BaseAction        `xml:"action,typeattr"`
    +	Notification string            `xml:"notification,omitempty"`
    +}
    +
    +func init() {
    +	t["ScheduledTaskSpec"] = reflect.TypeOf((*ScheduledTaskSpec)(nil)).Elem()
    +}
    +
    +type ScheduledTaskStartedEvent struct {
    +	ScheduledTaskEvent
    +}
    +
    +func init() {
    +	t["ScheduledTaskStartedEvent"] = reflect.TypeOf((*ScheduledTaskStartedEvent)(nil)).Elem()
    +}
    +
    +type ScsiLun struct {
    +	HostDevice
    +
    +	Key              string               `xml:"key,omitempty"`
    +	Uuid             string               `xml:"uuid"`
    +	Descriptor       []ScsiLunDescriptor  `xml:"descriptor,omitempty"`
    +	CanonicalName    string               `xml:"canonicalName,omitempty"`
    +	DisplayName      string               `xml:"displayName,omitempty"`
    +	LunType          string               `xml:"lunType"`
    +	Vendor           string               `xml:"vendor,omitempty"`
    +	Model            string               `xml:"model,omitempty"`
    +	Revision         string               `xml:"revision,omitempty"`
    +	ScsiLevel        int32                `xml:"scsiLevel,omitempty"`
    +	SerialNumber     string               `xml:"serialNumber,omitempty"`
    +	DurableName      *ScsiLunDurableName  `xml:"durableName,omitempty"`
    +	AlternateName    []ScsiLunDurableName `xml:"alternateName,omitempty"`
    +	StandardInquiry  []byte               `xml:"standardInquiry,omitempty"`
    +	QueueDepth       int32                `xml:"queueDepth,omitempty"`
    +	OperationalState []string             `xml:"operationalState"`
    +	Capabilities     *ScsiLunCapabilities `xml:"capabilities,omitempty"`
    +	VStorageSupport  string               `xml:"vStorageSupport,omitempty"`
    +	ProtocolEndpoint *bool                `xml:"protocolEndpoint"`
    +}
    +
    +func init() {
    +	t["ScsiLun"] = reflect.TypeOf((*ScsiLun)(nil)).Elem()
    +}
    +
    +type ScsiLunCapabilities struct {
    +	DynamicData
    +
    +	UpdateDisplayNameSupported bool `xml:"updateDisplayNameSupported"`
    +}
    +
    +func init() {
    +	t["ScsiLunCapabilities"] = reflect.TypeOf((*ScsiLunCapabilities)(nil)).Elem()
    +}
    +
    +type ScsiLunDescriptor struct {
    +	DynamicData
    +
    +	Quality string `xml:"quality"`
    +	Id      string `xml:"id"`
    +}
    +
    +func init() {
    +	t["ScsiLunDescriptor"] = reflect.TypeOf((*ScsiLunDescriptor)(nil)).Elem()
    +}
    +
    +type ScsiLunDurableName struct {
    +	DynamicData
    +
    +	Namespace   string `xml:"namespace"`
    +	NamespaceId byte   `xml:"namespaceId"`
    +	Data        []byte `xml:"data,omitempty"`
    +}
    +
    +func init() {
    +	t["ScsiLunDurableName"] = reflect.TypeOf((*ScsiLunDurableName)(nil)).Elem()
    +}
    +
    +type SeSparseVirtualDiskSpec struct {
    +	FileBackedVirtualDiskSpec
    +
    +	GrainSizeKb int32 `xml:"grainSizeKb,omitempty"`
    +}
    +
    +func init() {
    +	t["SeSparseVirtualDiskSpec"] = reflect.TypeOf((*SeSparseVirtualDiskSpec)(nil)).Elem()
    +}
    +
    +type SearchDatastoreRequestType struct {
    +	This          ManagedObjectReference          `xml:"_this"`
    +	DatastorePath string                          `xml:"datastorePath"`
    +	SearchSpec    *HostDatastoreBrowserSearchSpec `xml:"searchSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["SearchDatastoreRequestType"] = reflect.TypeOf((*SearchDatastoreRequestType)(nil)).Elem()
    +}
    +
    +type SearchDatastoreSubFoldersRequestType struct {
    +	This          ManagedObjectReference          `xml:"_this"`
    +	DatastorePath string                          `xml:"datastorePath"`
    +	SearchSpec    *HostDatastoreBrowserSearchSpec `xml:"searchSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["SearchDatastoreSubFoldersRequestType"] = reflect.TypeOf((*SearchDatastoreSubFoldersRequestType)(nil)).Elem()
    +}
    +
    +type SearchDatastoreSubFolders_Task SearchDatastoreSubFoldersRequestType
    +
    +func init() {
    +	t["SearchDatastoreSubFolders_Task"] = reflect.TypeOf((*SearchDatastoreSubFolders_Task)(nil)).Elem()
    +}
    +
    +type SearchDatastoreSubFolders_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type SearchDatastore_Task SearchDatastoreRequestType
    +
    +func init() {
    +	t["SearchDatastore_Task"] = reflect.TypeOf((*SearchDatastore_Task)(nil)).Elem()
    +}
    +
    +type SearchDatastore_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type SecondaryVmAlreadyDisabled struct {
    +	VmFaultToleranceIssue
    +
    +	InstanceUuid string `xml:"instanceUuid"`
    +}
    +
    +func init() {
    +	t["SecondaryVmAlreadyDisabled"] = reflect.TypeOf((*SecondaryVmAlreadyDisabled)(nil)).Elem()
    +}
    +
    +type SecondaryVmAlreadyDisabledFault SecondaryVmAlreadyDisabled
    +
    +func init() {
    +	t["SecondaryVmAlreadyDisabledFault"] = reflect.TypeOf((*SecondaryVmAlreadyDisabledFault)(nil)).Elem()
    +}
    +
    +type SecondaryVmAlreadyEnabled struct {
    +	VmFaultToleranceIssue
    +
    +	InstanceUuid string `xml:"instanceUuid"`
    +}
    +
    +func init() {
    +	t["SecondaryVmAlreadyEnabled"] = reflect.TypeOf((*SecondaryVmAlreadyEnabled)(nil)).Elem()
    +}
    +
    +type SecondaryVmAlreadyEnabledFault SecondaryVmAlreadyEnabled
    +
    +func init() {
    +	t["SecondaryVmAlreadyEnabledFault"] = reflect.TypeOf((*SecondaryVmAlreadyEnabledFault)(nil)).Elem()
    +}
    +
    +type SecondaryVmAlreadyRegistered struct {
    +	VmFaultToleranceIssue
    +
    +	InstanceUuid string `xml:"instanceUuid,omitempty"`
    +}
    +
    +func init() {
    +	t["SecondaryVmAlreadyRegistered"] = reflect.TypeOf((*SecondaryVmAlreadyRegistered)(nil)).Elem()
    +}
    +
    +type SecondaryVmAlreadyRegisteredFault SecondaryVmAlreadyRegistered
    +
    +func init() {
    +	t["SecondaryVmAlreadyRegisteredFault"] = reflect.TypeOf((*SecondaryVmAlreadyRegisteredFault)(nil)).Elem()
    +}
    +
    +type SecondaryVmNotRegistered struct {
    +	VmFaultToleranceIssue
    +
    +	InstanceUuid string `xml:"instanceUuid,omitempty"`
    +}
    +
    +func init() {
    +	t["SecondaryVmNotRegistered"] = reflect.TypeOf((*SecondaryVmNotRegistered)(nil)).Elem()
    +}
    +
    +type SecondaryVmNotRegisteredFault SecondaryVmNotRegistered
    +
    +func init() {
    +	t["SecondaryVmNotRegisteredFault"] = reflect.TypeOf((*SecondaryVmNotRegisteredFault)(nil)).Elem()
    +}
    +
    +type SecurityError struct {
    +	RuntimeFault
    +}
    +
    +func init() {
    +	t["SecurityError"] = reflect.TypeOf((*SecurityError)(nil)).Elem()
    +}
    +
    +type SecurityErrorFault BaseSecurityError
    +
    +func init() {
    +	t["SecurityErrorFault"] = reflect.TypeOf((*SecurityErrorFault)(nil)).Elem()
    +}
    +
    +type SecurityProfile struct {
    +	ApplyProfile
    +
    +	Permission []PermissionProfile `xml:"permission,omitempty"`
    +}
    +
    +func init() {
    +	t["SecurityProfile"] = reflect.TypeOf((*SecurityProfile)(nil)).Elem()
    +}
    +
    +type SelectActivePartition SelectActivePartitionRequestType
    +
    +func init() {
    +	t["SelectActivePartition"] = reflect.TypeOf((*SelectActivePartition)(nil)).Elem()
    +}
    +
    +type SelectActivePartitionRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	Partition *HostScsiDiskPartition `xml:"partition,omitempty"`
    +}
    +
    +func init() {
    +	t["SelectActivePartitionRequestType"] = reflect.TypeOf((*SelectActivePartitionRequestType)(nil)).Elem()
    +}
    +
    +type SelectActivePartitionResponse struct {
    +}
    +
    +type SelectVnic SelectVnicRequestType
    +
    +func init() {
    +	t["SelectVnic"] = reflect.TypeOf((*SelectVnic)(nil)).Elem()
    +}
    +
    +type SelectVnicForNicType SelectVnicForNicTypeRequestType
    +
    +func init() {
    +	t["SelectVnicForNicType"] = reflect.TypeOf((*SelectVnicForNicType)(nil)).Elem()
    +}
    +
    +type SelectVnicForNicTypeRequestType struct {
    +	This    ManagedObjectReference `xml:"_this"`
    +	NicType string                 `xml:"nicType"`
    +	Device  string                 `xml:"device"`
    +}
    +
    +func init() {
    +	t["SelectVnicForNicTypeRequestType"] = reflect.TypeOf((*SelectVnicForNicTypeRequestType)(nil)).Elem()
    +}
    +
    +type SelectVnicForNicTypeResponse struct {
    +}
    +
    +type SelectVnicRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	Device string                 `xml:"device"`
    +}
    +
    +func init() {
    +	t["SelectVnicRequestType"] = reflect.TypeOf((*SelectVnicRequestType)(nil)).Elem()
    +}
    +
    +type SelectVnicResponse struct {
    +}
    +
    +type SelectionSet struct {
    +	DynamicData
    +}
    +
    +func init() {
    +	t["SelectionSet"] = reflect.TypeOf((*SelectionSet)(nil)).Elem()
    +}
    +
    +type SelectionSpec struct {
    +	DynamicData
    +
    +	Name string `xml:"name,omitempty"`
    +}
    +
    +func init() {
    +	t["SelectionSpec"] = reflect.TypeOf((*SelectionSpec)(nil)).Elem()
    +}
    +
    +type SendEmailAction struct {
    +	Action
    +
    +	ToList  string `xml:"toList"`
    +	CcList  string `xml:"ccList"`
    +	Subject string `xml:"subject"`
    +	Body    string `xml:"body"`
    +}
    +
    +func init() {
    +	t["SendEmailAction"] = reflect.TypeOf((*SendEmailAction)(nil)).Elem()
    +}
    +
    +type SendNMI SendNMIRequestType
    +
    +func init() {
    +	t["SendNMI"] = reflect.TypeOf((*SendNMI)(nil)).Elem()
    +}
    +
    +type SendNMIRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["SendNMIRequestType"] = reflect.TypeOf((*SendNMIRequestType)(nil)).Elem()
    +}
    +
    +type SendNMIResponse struct {
    +}
    +
    +type SendSNMPAction struct {
    +	Action
    +}
    +
    +func init() {
    +	t["SendSNMPAction"] = reflect.TypeOf((*SendSNMPAction)(nil)).Elem()
    +}
    +
    +type SendTestNotification SendTestNotificationRequestType
    +
    +func init() {
    +	t["SendTestNotification"] = reflect.TypeOf((*SendTestNotification)(nil)).Elem()
    +}
    +
    +type SendTestNotificationRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["SendTestNotificationRequestType"] = reflect.TypeOf((*SendTestNotificationRequestType)(nil)).Elem()
    +}
    +
    +type SendTestNotificationResponse struct {
    +}
    +
    +type ServerLicenseExpiredEvent struct {
    +	LicenseEvent
    +
    +	Product string `xml:"product"`
    +}
    +
    +func init() {
    +	t["ServerLicenseExpiredEvent"] = reflect.TypeOf((*ServerLicenseExpiredEvent)(nil)).Elem()
    +}
    +
    +type ServerStartedSessionEvent struct {
    +	SessionEvent
    +}
    +
    +func init() {
    +	t["ServerStartedSessionEvent"] = reflect.TypeOf((*ServerStartedSessionEvent)(nil)).Elem()
    +}
    +
    +type ServiceConsolePortGroupProfile struct {
    +	PortGroupProfile
    +
    +	IpConfig IpAddressProfile `xml:"ipConfig"`
    +}
    +
    +func init() {
    +	t["ServiceConsolePortGroupProfile"] = reflect.TypeOf((*ServiceConsolePortGroupProfile)(nil)).Elem()
    +}
    +
    +type ServiceConsoleReservationInfo struct {
    +	DynamicData
    +
    +	ServiceConsoleReservedCfg int64 `xml:"serviceConsoleReservedCfg"`
    +	ServiceConsoleReserved    int64 `xml:"serviceConsoleReserved"`
    +	Unreserved                int64 `xml:"unreserved"`
    +}
    +
    +func init() {
    +	t["ServiceConsoleReservationInfo"] = reflect.TypeOf((*ServiceConsoleReservationInfo)(nil)).Elem()
    +}
    +
    +type ServiceContent struct {
    +	DynamicData
    +
    +	RootFolder                  ManagedObjectReference  `xml:"rootFolder"`
    +	PropertyCollector           ManagedObjectReference  `xml:"propertyCollector"`
    +	ViewManager                 *ManagedObjectReference `xml:"viewManager,omitempty"`
    +	About                       AboutInfo               `xml:"about"`
    +	Setting                     *ManagedObjectReference `xml:"setting,omitempty"`
    +	UserDirectory               *ManagedObjectReference `xml:"userDirectory,omitempty"`
    +	SessionManager              *ManagedObjectReference `xml:"sessionManager,omitempty"`
    +	AuthorizationManager        *ManagedObjectReference `xml:"authorizationManager,omitempty"`
    +	ServiceManager              *ManagedObjectReference `xml:"serviceManager,omitempty"`
    +	PerfManager                 *ManagedObjectReference `xml:"perfManager,omitempty"`
    +	ScheduledTaskManager        *ManagedObjectReference `xml:"scheduledTaskManager,omitempty"`
    +	AlarmManager                *ManagedObjectReference `xml:"alarmManager,omitempty"`
    +	EventManager                *ManagedObjectReference `xml:"eventManager,omitempty"`
    +	TaskManager                 *ManagedObjectReference `xml:"taskManager,omitempty"`
    +	ExtensionManager            *ManagedObjectReference `xml:"extensionManager,omitempty"`
    +	CustomizationSpecManager    *ManagedObjectReference `xml:"customizationSpecManager,omitempty"`
    +	CustomFieldsManager         *ManagedObjectReference `xml:"customFieldsManager,omitempty"`
    +	AccountManager              *ManagedObjectReference `xml:"accountManager,omitempty"`
    +	DiagnosticManager           *ManagedObjectReference `xml:"diagnosticManager,omitempty"`
    +	LicenseManager              *ManagedObjectReference `xml:"licenseManager,omitempty"`
    +	SearchIndex                 *ManagedObjectReference `xml:"searchIndex,omitempty"`
    +	FileManager                 *ManagedObjectReference `xml:"fileManager,omitempty"`
    +	DatastoreNamespaceManager   *ManagedObjectReference `xml:"datastoreNamespaceManager,omitempty"`
    +	VirtualDiskManager          *ManagedObjectReference `xml:"virtualDiskManager,omitempty"`
    +	VirtualizationManager       *ManagedObjectReference `xml:"virtualizationManager,omitempty"`
    +	SnmpSystem                  *ManagedObjectReference `xml:"snmpSystem,omitempty"`
    +	VmProvisioningChecker       *ManagedObjectReference `xml:"vmProvisioningChecker,omitempty"`
    +	VmCompatibilityChecker      *ManagedObjectReference `xml:"vmCompatibilityChecker,omitempty"`
    +	OvfManager                  *ManagedObjectReference `xml:"ovfManager,omitempty"`
    +	IpPoolManager               *ManagedObjectReference `xml:"ipPoolManager,omitempty"`
    +	DvSwitchManager             *ManagedObjectReference `xml:"dvSwitchManager,omitempty"`
    +	HostProfileManager          *ManagedObjectReference `xml:"hostProfileManager,omitempty"`
    +	ClusterProfileManager       *ManagedObjectReference `xml:"clusterProfileManager,omitempty"`
    +	ComplianceManager           *ManagedObjectReference `xml:"complianceManager,omitempty"`
    +	LocalizationManager         *ManagedObjectReference `xml:"localizationManager,omitempty"`
    +	StorageResourceManager      *ManagedObjectReference `xml:"storageResourceManager,omitempty"`
    +	GuestOperationsManager      *ManagedObjectReference `xml:"guestOperationsManager,omitempty"`
    +	OverheadMemoryManager       *ManagedObjectReference `xml:"overheadMemoryManager,omitempty"`
    +	CertificateManager          *ManagedObjectReference `xml:"certificateManager,omitempty"`
    +	IoFilterManager             *ManagedObjectReference `xml:"ioFilterManager,omitempty"`
    +	VStorageObjectManager       *ManagedObjectReference `xml:"vStorageObjectManager,omitempty"`
    +	HostSpecManager             *ManagedObjectReference `xml:"hostSpecManager,omitempty"`
    +	CryptoManager               *ManagedObjectReference `xml:"cryptoManager,omitempty"`
    +	HealthUpdateManager         *ManagedObjectReference `xml:"healthUpdateManager,omitempty"`
    +	FailoverClusterConfigurator *ManagedObjectReference `xml:"failoverClusterConfigurator,omitempty"`
    +	FailoverClusterManager      *ManagedObjectReference `xml:"failoverClusterManager,omitempty"`
    +}
    +
    +func init() {
    +	t["ServiceContent"] = reflect.TypeOf((*ServiceContent)(nil)).Elem()
    +}
    +
    +type ServiceLocator struct {
    +	DynamicData
    +
    +	InstanceUuid  string                       `xml:"instanceUuid"`
    +	Url           string                       `xml:"url"`
    +	Credential    BaseServiceLocatorCredential `xml:"credential,typeattr"`
    +	SslThumbprint string                       `xml:"sslThumbprint,omitempty"`
    +}
    +
    +func init() {
    +	t["ServiceLocator"] = reflect.TypeOf((*ServiceLocator)(nil)).Elem()
    +}
    +
    +type ServiceLocatorCredential struct {
    +	DynamicData
    +}
    +
    +func init() {
    +	t["ServiceLocatorCredential"] = reflect.TypeOf((*ServiceLocatorCredential)(nil)).Elem()
    +}
    +
    +type ServiceLocatorNamePassword struct {
    +	ServiceLocatorCredential
    +
    +	Username string `xml:"username"`
    +	Password string `xml:"password"`
    +}
    +
    +func init() {
    +	t["ServiceLocatorNamePassword"] = reflect.TypeOf((*ServiceLocatorNamePassword)(nil)).Elem()
    +}
    +
    +type ServiceLocatorSAMLCredential struct {
    +	ServiceLocatorCredential
    +
    +	Token string `xml:"token,omitempty"`
    +}
    +
    +func init() {
    +	t["ServiceLocatorSAMLCredential"] = reflect.TypeOf((*ServiceLocatorSAMLCredential)(nil)).Elem()
    +}
    +
    +type ServiceManagerServiceInfo struct {
    +	DynamicData
    +
    +	ServiceName string                 `xml:"serviceName"`
    +	Location    []string               `xml:"location,omitempty"`
    +	Service     ManagedObjectReference `xml:"service"`
    +	Description string                 `xml:"description"`
    +}
    +
    +func init() {
    +	t["ServiceManagerServiceInfo"] = reflect.TypeOf((*ServiceManagerServiceInfo)(nil)).Elem()
    +}
    +
    +type ServiceProfile struct {
    +	ApplyProfile
    +
    +	Key string `xml:"key"`
    +}
    +
    +func init() {
    +	t["ServiceProfile"] = reflect.TypeOf((*ServiceProfile)(nil)).Elem()
    +}
    +
    +type SessionEvent struct {
    +	Event
    +}
    +
    +func init() {
    +	t["SessionEvent"] = reflect.TypeOf((*SessionEvent)(nil)).Elem()
    +}
    +
    +type SessionIsActive SessionIsActiveRequestType
    +
    +func init() {
    +	t["SessionIsActive"] = reflect.TypeOf((*SessionIsActive)(nil)).Elem()
    +}
    +
    +type SessionIsActiveRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	SessionID string                 `xml:"sessionID"`
    +	UserName  string                 `xml:"userName"`
    +}
    +
    +func init() {
    +	t["SessionIsActiveRequestType"] = reflect.TypeOf((*SessionIsActiveRequestType)(nil)).Elem()
    +}
    +
    +type SessionIsActiveResponse struct {
    +	Returnval bool `xml:"returnval"`
    +}
    +
    +type SessionManagerGenericServiceTicket struct {
    +	DynamicData
    +
    +	Id            string `xml:"id"`
    +	HostName      string `xml:"hostName,omitempty"`
    +	SslThumbprint string `xml:"sslThumbprint,omitempty"`
    +}
    +
    +func init() {
    +	t["SessionManagerGenericServiceTicket"] = reflect.TypeOf((*SessionManagerGenericServiceTicket)(nil)).Elem()
    +}
    +
    +type SessionManagerHttpServiceRequestSpec struct {
    +	SessionManagerServiceRequestSpec
    +
    +	Method string `xml:"method,omitempty"`
    +	Url    string `xml:"url"`
    +}
    +
    +func init() {
    +	t["SessionManagerHttpServiceRequestSpec"] = reflect.TypeOf((*SessionManagerHttpServiceRequestSpec)(nil)).Elem()
    +}
    +
    +type SessionManagerLocalTicket struct {
    +	DynamicData
    +
    +	UserName         string `xml:"userName"`
    +	PasswordFilePath string `xml:"passwordFilePath"`
    +}
    +
    +func init() {
    +	t["SessionManagerLocalTicket"] = reflect.TypeOf((*SessionManagerLocalTicket)(nil)).Elem()
    +}
    +
    +type SessionManagerServiceRequestSpec struct {
    +	DynamicData
    +}
    +
    +func init() {
    +	t["SessionManagerServiceRequestSpec"] = reflect.TypeOf((*SessionManagerServiceRequestSpec)(nil)).Elem()
    +}
    +
    +type SessionManagerVmomiServiceRequestSpec struct {
    +	SessionManagerServiceRequestSpec
    +
    +	Method string `xml:"method"`
    +}
    +
    +func init() {
    +	t["SessionManagerVmomiServiceRequestSpec"] = reflect.TypeOf((*SessionManagerVmomiServiceRequestSpec)(nil)).Elem()
    +}
    +
    +type SessionTerminatedEvent struct {
    +	SessionEvent
    +
    +	SessionId          string `xml:"sessionId"`
    +	TerminatedUsername string `xml:"terminatedUsername"`
    +}
    +
    +func init() {
    +	t["SessionTerminatedEvent"] = reflect.TypeOf((*SessionTerminatedEvent)(nil)).Elem()
    +}
    +
    +type SetCollectorPageSize SetCollectorPageSizeRequestType
    +
    +func init() {
    +	t["SetCollectorPageSize"] = reflect.TypeOf((*SetCollectorPageSize)(nil)).Elem()
    +}
    +
    +type SetCollectorPageSizeRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	MaxCount int32                  `xml:"maxCount"`
    +}
    +
    +func init() {
    +	t["SetCollectorPageSizeRequestType"] = reflect.TypeOf((*SetCollectorPageSizeRequestType)(nil)).Elem()
    +}
    +
    +type SetCollectorPageSizeResponse struct {
    +}
    +
    +type SetDisplayTopology SetDisplayTopologyRequestType
    +
    +func init() {
    +	t["SetDisplayTopology"] = reflect.TypeOf((*SetDisplayTopology)(nil)).Elem()
    +}
    +
    +type SetDisplayTopologyRequestType struct {
    +	This     ManagedObjectReference          `xml:"_this"`
    +	Displays []VirtualMachineDisplayTopology `xml:"displays"`
    +}
    +
    +func init() {
    +	t["SetDisplayTopologyRequestType"] = reflect.TypeOf((*SetDisplayTopologyRequestType)(nil)).Elem()
    +}
    +
    +type SetDisplayTopologyResponse struct {
    +}
    +
    +type SetEntityPermissions SetEntityPermissionsRequestType
    +
    +func init() {
    +	t["SetEntityPermissions"] = reflect.TypeOf((*SetEntityPermissions)(nil)).Elem()
    +}
    +
    +type SetEntityPermissionsRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	Entity     ManagedObjectReference `xml:"entity"`
    +	Permission []Permission           `xml:"permission,omitempty"`
    +}
    +
    +func init() {
    +	t["SetEntityPermissionsRequestType"] = reflect.TypeOf((*SetEntityPermissionsRequestType)(nil)).Elem()
    +}
    +
    +type SetEntityPermissionsResponse struct {
    +}
    +
    +type SetExtensionCertificate SetExtensionCertificateRequestType
    +
    +func init() {
    +	t["SetExtensionCertificate"] = reflect.TypeOf((*SetExtensionCertificate)(nil)).Elem()
    +}
    +
    +type SetExtensionCertificateRequestType struct {
    +	This           ManagedObjectReference `xml:"_this"`
    +	ExtensionKey   string                 `xml:"extensionKey"`
    +	CertificatePem string                 `xml:"certificatePem,omitempty"`
    +}
    +
    +func init() {
    +	t["SetExtensionCertificateRequestType"] = reflect.TypeOf((*SetExtensionCertificateRequestType)(nil)).Elem()
    +}
    +
    +type SetExtensionCertificateResponse struct {
    +}
    +
    +type SetField SetFieldRequestType
    +
    +func init() {
    +	t["SetField"] = reflect.TypeOf((*SetField)(nil)).Elem()
    +}
    +
    +type SetFieldRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	Entity ManagedObjectReference `xml:"entity"`
    +	Key    int32                  `xml:"key"`
    +	Value  string                 `xml:"value"`
    +}
    +
    +func init() {
    +	t["SetFieldRequestType"] = reflect.TypeOf((*SetFieldRequestType)(nil)).Elem()
    +}
    +
    +type SetFieldResponse struct {
    +}
    +
    +type SetLicenseEdition SetLicenseEditionRequestType
    +
    +func init() {
    +	t["SetLicenseEdition"] = reflect.TypeOf((*SetLicenseEdition)(nil)).Elem()
    +}
    +
    +type SetLicenseEditionRequestType struct {
    +	This       ManagedObjectReference  `xml:"_this"`
    +	Host       *ManagedObjectReference `xml:"host,omitempty"`
    +	FeatureKey string                  `xml:"featureKey,omitempty"`
    +}
    +
    +func init() {
    +	t["SetLicenseEditionRequestType"] = reflect.TypeOf((*SetLicenseEditionRequestType)(nil)).Elem()
    +}
    +
    +type SetLicenseEditionResponse struct {
    +}
    +
    +type SetLocale SetLocaleRequestType
    +
    +func init() {
    +	t["SetLocale"] = reflect.TypeOf((*SetLocale)(nil)).Elem()
    +}
    +
    +type SetLocaleRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	Locale string                 `xml:"locale"`
    +}
    +
    +func init() {
    +	t["SetLocaleRequestType"] = reflect.TypeOf((*SetLocaleRequestType)(nil)).Elem()
    +}
    +
    +type SetLocaleResponse struct {
    +}
    +
    +type SetMultipathLunPolicy SetMultipathLunPolicyRequestType
    +
    +func init() {
    +	t["SetMultipathLunPolicy"] = reflect.TypeOf((*SetMultipathLunPolicy)(nil)).Elem()
    +}
    +
    +type SetMultipathLunPolicyRequestType struct {
    +	This   ManagedObjectReference                 `xml:"_this"`
    +	LunId  string                                 `xml:"lunId"`
    +	Policy BaseHostMultipathInfoLogicalUnitPolicy `xml:"policy,typeattr"`
    +}
    +
    +func init() {
    +	t["SetMultipathLunPolicyRequestType"] = reflect.TypeOf((*SetMultipathLunPolicyRequestType)(nil)).Elem()
    +}
    +
    +type SetMultipathLunPolicyResponse struct {
    +}
    +
    +type SetNFSUser SetNFSUserRequestType
    +
    +func init() {
    +	t["SetNFSUser"] = reflect.TypeOf((*SetNFSUser)(nil)).Elem()
    +}
    +
    +type SetNFSUserRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	User     string                 `xml:"user"`
    +	Password string                 `xml:"password"`
    +}
    +
    +func init() {
    +	t["SetNFSUserRequestType"] = reflect.TypeOf((*SetNFSUserRequestType)(nil)).Elem()
    +}
    +
    +type SetNFSUserResponse struct {
    +}
    +
    +type SetPublicKey SetPublicKeyRequestType
    +
    +func init() {
    +	t["SetPublicKey"] = reflect.TypeOf((*SetPublicKey)(nil)).Elem()
    +}
    +
    +type SetPublicKeyRequestType struct {
    +	This         ManagedObjectReference `xml:"_this"`
    +	ExtensionKey string                 `xml:"extensionKey"`
    +	PublicKey    string                 `xml:"publicKey"`
    +}
    +
    +func init() {
    +	t["SetPublicKeyRequestType"] = reflect.TypeOf((*SetPublicKeyRequestType)(nil)).Elem()
    +}
    +
    +type SetPublicKeyResponse struct {
    +}
    +
    +type SetRegistryValueInGuest SetRegistryValueInGuestRequestType
    +
    +func init() {
    +	t["SetRegistryValueInGuest"] = reflect.TypeOf((*SetRegistryValueInGuest)(nil)).Elem()
    +}
    +
    +type SetRegistryValueInGuestRequestType struct {
    +	This  ManagedObjectReference  `xml:"_this"`
    +	Vm    ManagedObjectReference  `xml:"vm"`
    +	Auth  BaseGuestAuthentication `xml:"auth,typeattr"`
    +	Value GuestRegValueSpec       `xml:"value"`
    +}
    +
    +func init() {
    +	t["SetRegistryValueInGuestRequestType"] = reflect.TypeOf((*SetRegistryValueInGuestRequestType)(nil)).Elem()
    +}
    +
    +type SetRegistryValueInGuestResponse struct {
    +}
    +
    +type SetScreenResolution SetScreenResolutionRequestType
    +
    +func init() {
    +	t["SetScreenResolution"] = reflect.TypeOf((*SetScreenResolution)(nil)).Elem()
    +}
    +
    +type SetScreenResolutionRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	Width  int32                  `xml:"width"`
    +	Height int32                  `xml:"height"`
    +}
    +
    +func init() {
    +	t["SetScreenResolutionRequestType"] = reflect.TypeOf((*SetScreenResolutionRequestType)(nil)).Elem()
    +}
    +
    +type SetScreenResolutionResponse struct {
    +}
    +
    +type SetTaskDescription SetTaskDescriptionRequestType
    +
    +func init() {
    +	t["SetTaskDescription"] = reflect.TypeOf((*SetTaskDescription)(nil)).Elem()
    +}
    +
    +type SetTaskDescriptionRequestType struct {
    +	This        ManagedObjectReference `xml:"_this"`
    +	Description LocalizableMessage     `xml:"description"`
    +}
    +
    +func init() {
    +	t["SetTaskDescriptionRequestType"] = reflect.TypeOf((*SetTaskDescriptionRequestType)(nil)).Elem()
    +}
    +
    +type SetTaskDescriptionResponse struct {
    +}
    +
    +type SetTaskState SetTaskStateRequestType
    +
    +func init() {
    +	t["SetTaskState"] = reflect.TypeOf((*SetTaskState)(nil)).Elem()
    +}
    +
    +type SetTaskStateRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	State  TaskInfoState          `xml:"state"`
    +	Result AnyType                `xml:"result,omitempty,typeattr"`
    +	Fault  *LocalizedMethodFault  `xml:"fault,omitempty"`
    +}
    +
    +func init() {
    +	t["SetTaskStateRequestType"] = reflect.TypeOf((*SetTaskStateRequestType)(nil)).Elem()
    +}
    +
    +type SetTaskStateResponse struct {
    +}
    +
    +type SetVStorageObjectControlFlags SetVStorageObjectControlFlagsRequestType
    +
    +func init() {
    +	t["SetVStorageObjectControlFlags"] = reflect.TypeOf((*SetVStorageObjectControlFlags)(nil)).Elem()
    +}
    +
    +type SetVStorageObjectControlFlagsRequestType struct {
    +	This         ManagedObjectReference `xml:"_this"`
    +	Id           ID                     `xml:"id"`
    +	Datastore    ManagedObjectReference `xml:"datastore"`
    +	ControlFlags []string               `xml:"controlFlags,omitempty"`
    +}
    +
    +func init() {
    +	t["SetVStorageObjectControlFlagsRequestType"] = reflect.TypeOf((*SetVStorageObjectControlFlagsRequestType)(nil)).Elem()
    +}
    +
    +type SetVStorageObjectControlFlagsResponse struct {
    +}
    +
    +type SetVirtualDiskUuid SetVirtualDiskUuidRequestType
    +
    +func init() {
    +	t["SetVirtualDiskUuid"] = reflect.TypeOf((*SetVirtualDiskUuid)(nil)).Elem()
    +}
    +
    +type SetVirtualDiskUuidRequestType struct {
    +	This       ManagedObjectReference  `xml:"_this"`
    +	Name       string                  `xml:"name"`
    +	Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"`
    +	Uuid       string                  `xml:"uuid"`
    +}
    +
    +func init() {
    +	t["SetVirtualDiskUuidRequestType"] = reflect.TypeOf((*SetVirtualDiskUuidRequestType)(nil)).Elem()
    +}
    +
    +type SetVirtualDiskUuidResponse struct {
    +}
    +
    +type SharedBusControllerNotSupported struct {
    +	DeviceNotSupported
    +}
    +
    +func init() {
    +	t["SharedBusControllerNotSupported"] = reflect.TypeOf((*SharedBusControllerNotSupported)(nil)).Elem()
    +}
    +
    +type SharedBusControllerNotSupportedFault SharedBusControllerNotSupported
    +
    +func init() {
    +	t["SharedBusControllerNotSupportedFault"] = reflect.TypeOf((*SharedBusControllerNotSupportedFault)(nil)).Elem()
    +}
    +
    +type SharesInfo struct {
    +	DynamicData
    +
    +	Shares int32       `xml:"shares"`
    +	Level  SharesLevel `xml:"level"`
    +}
    +
    +func init() {
    +	t["SharesInfo"] = reflect.TypeOf((*SharesInfo)(nil)).Elem()
    +}
    +
    +type SharesOption struct {
    +	DynamicData
    +
    +	SharesOption IntOption   `xml:"sharesOption"`
    +	DefaultLevel SharesLevel `xml:"defaultLevel"`
    +}
    +
    +func init() {
    +	t["SharesOption"] = reflect.TypeOf((*SharesOption)(nil)).Elem()
    +}
    +
    +type ShrinkDiskFault struct {
    +	VimFault
    +
    +	DiskId int32 `xml:"diskId,omitempty"`
    +}
    +
    +func init() {
    +	t["ShrinkDiskFault"] = reflect.TypeOf((*ShrinkDiskFault)(nil)).Elem()
    +}
    +
    +type ShrinkDiskFaultFault ShrinkDiskFault
    +
    +func init() {
    +	t["ShrinkDiskFaultFault"] = reflect.TypeOf((*ShrinkDiskFaultFault)(nil)).Elem()
    +}
    +
    +type ShrinkVirtualDiskRequestType struct {
    +	This       ManagedObjectReference  `xml:"_this"`
    +	Name       string                  `xml:"name"`
    +	Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"`
    +	Copy       *bool                   `xml:"copy"`
    +}
    +
    +func init() {
    +	t["ShrinkVirtualDiskRequestType"] = reflect.TypeOf((*ShrinkVirtualDiskRequestType)(nil)).Elem()
    +}
    +
    +type ShrinkVirtualDisk_Task ShrinkVirtualDiskRequestType
    +
    +func init() {
    +	t["ShrinkVirtualDisk_Task"] = reflect.TypeOf((*ShrinkVirtualDisk_Task)(nil)).Elem()
    +}
    +
    +type ShrinkVirtualDisk_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type ShutdownGuest ShutdownGuestRequestType
    +
    +func init() {
    +	t["ShutdownGuest"] = reflect.TypeOf((*ShutdownGuest)(nil)).Elem()
    +}
    +
    +type ShutdownGuestRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["ShutdownGuestRequestType"] = reflect.TypeOf((*ShutdownGuestRequestType)(nil)).Elem()
    +}
    +
    +type ShutdownGuestResponse struct {
    +}
    +
    +type ShutdownHostRequestType struct {
    +	This  ManagedObjectReference `xml:"_this"`
    +	Force bool                   `xml:"force"`
    +}
    +
    +func init() {
    +	t["ShutdownHostRequestType"] = reflect.TypeOf((*ShutdownHostRequestType)(nil)).Elem()
    +}
    +
    +type ShutdownHost_Task ShutdownHostRequestType
    +
    +func init() {
    +	t["ShutdownHost_Task"] = reflect.TypeOf((*ShutdownHost_Task)(nil)).Elem()
    +}
    +
    +type ShutdownHost_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type SingleIp struct {
    +	IpAddress
    +
    +	Address string `xml:"address"`
    +}
    +
    +func init() {
    +	t["SingleIp"] = reflect.TypeOf((*SingleIp)(nil)).Elem()
    +}
    +
    +type SingleMac struct {
    +	MacAddress
    +
    +	Address string `xml:"address"`
    +}
    +
    +func init() {
    +	t["SingleMac"] = reflect.TypeOf((*SingleMac)(nil)).Elem()
    +}
    +
    +type SnapshotCloneNotSupported struct {
    +	SnapshotCopyNotSupported
    +}
    +
    +func init() {
    +	t["SnapshotCloneNotSupported"] = reflect.TypeOf((*SnapshotCloneNotSupported)(nil)).Elem()
    +}
    +
    +type SnapshotCloneNotSupportedFault SnapshotCloneNotSupported
    +
    +func init() {
    +	t["SnapshotCloneNotSupportedFault"] = reflect.TypeOf((*SnapshotCloneNotSupportedFault)(nil)).Elem()
    +}
    +
    +type SnapshotCopyNotSupported struct {
    +	MigrationFault
    +}
    +
    +func init() {
    +	t["SnapshotCopyNotSupported"] = reflect.TypeOf((*SnapshotCopyNotSupported)(nil)).Elem()
    +}
    +
    +type SnapshotCopyNotSupportedFault BaseSnapshotCopyNotSupported
    +
    +func init() {
    +	t["SnapshotCopyNotSupportedFault"] = reflect.TypeOf((*SnapshotCopyNotSupportedFault)(nil)).Elem()
    +}
    +
    +type SnapshotDisabled struct {
    +	SnapshotFault
    +}
    +
    +func init() {
    +	t["SnapshotDisabled"] = reflect.TypeOf((*SnapshotDisabled)(nil)).Elem()
    +}
    +
    +type SnapshotDisabledFault SnapshotDisabled
    +
    +func init() {
    +	t["SnapshotDisabledFault"] = reflect.TypeOf((*SnapshotDisabledFault)(nil)).Elem()
    +}
    +
    +type SnapshotFault struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["SnapshotFault"] = reflect.TypeOf((*SnapshotFault)(nil)).Elem()
    +}
    +
    +type SnapshotFaultFault BaseSnapshotFault
    +
    +func init() {
    +	t["SnapshotFaultFault"] = reflect.TypeOf((*SnapshotFaultFault)(nil)).Elem()
    +}
    +
    +type SnapshotIncompatibleDeviceInVm struct {
    +	SnapshotFault
    +
    +	Fault LocalizedMethodFault `xml:"fault"`
    +}
    +
    +func init() {
    +	t["SnapshotIncompatibleDeviceInVm"] = reflect.TypeOf((*SnapshotIncompatibleDeviceInVm)(nil)).Elem()
    +}
    +
    +type SnapshotIncompatibleDeviceInVmFault SnapshotIncompatibleDeviceInVm
    +
    +func init() {
    +	t["SnapshotIncompatibleDeviceInVmFault"] = reflect.TypeOf((*SnapshotIncompatibleDeviceInVmFault)(nil)).Elem()
    +}
    +
    +type SnapshotLocked struct {
    +	SnapshotFault
    +}
    +
    +func init() {
    +	t["SnapshotLocked"] = reflect.TypeOf((*SnapshotLocked)(nil)).Elem()
    +}
    +
    +type SnapshotLockedFault SnapshotLocked
    +
    +func init() {
    +	t["SnapshotLockedFault"] = reflect.TypeOf((*SnapshotLockedFault)(nil)).Elem()
    +}
    +
    +type SnapshotMoveFromNonHomeNotSupported struct {
    +	SnapshotCopyNotSupported
    +}
    +
    +func init() {
    +	t["SnapshotMoveFromNonHomeNotSupported"] = reflect.TypeOf((*SnapshotMoveFromNonHomeNotSupported)(nil)).Elem()
    +}
    +
    +type SnapshotMoveFromNonHomeNotSupportedFault SnapshotMoveFromNonHomeNotSupported
    +
    +func init() {
    +	t["SnapshotMoveFromNonHomeNotSupportedFault"] = reflect.TypeOf((*SnapshotMoveFromNonHomeNotSupportedFault)(nil)).Elem()
    +}
    +
    +type SnapshotMoveNotSupported struct {
    +	SnapshotCopyNotSupported
    +}
    +
    +func init() {
    +	t["SnapshotMoveNotSupported"] = reflect.TypeOf((*SnapshotMoveNotSupported)(nil)).Elem()
    +}
    +
    +type SnapshotMoveNotSupportedFault SnapshotMoveNotSupported
    +
    +func init() {
    +	t["SnapshotMoveNotSupportedFault"] = reflect.TypeOf((*SnapshotMoveNotSupportedFault)(nil)).Elem()
    +}
    +
    +type SnapshotMoveToNonHomeNotSupported struct {
    +	SnapshotCopyNotSupported
    +}
    +
    +func init() {
    +	t["SnapshotMoveToNonHomeNotSupported"] = reflect.TypeOf((*SnapshotMoveToNonHomeNotSupported)(nil)).Elem()
    +}
    +
    +type SnapshotMoveToNonHomeNotSupportedFault SnapshotMoveToNonHomeNotSupported
    +
    +func init() {
    +	t["SnapshotMoveToNonHomeNotSupportedFault"] = reflect.TypeOf((*SnapshotMoveToNonHomeNotSupportedFault)(nil)).Elem()
    +}
    +
    +type SnapshotNoChange struct {
    +	SnapshotFault
    +}
    +
    +func init() {
    +	t["SnapshotNoChange"] = reflect.TypeOf((*SnapshotNoChange)(nil)).Elem()
    +}
    +
    +type SnapshotNoChangeFault SnapshotNoChange
    +
    +func init() {
    +	t["SnapshotNoChangeFault"] = reflect.TypeOf((*SnapshotNoChangeFault)(nil)).Elem()
    +}
    +
    +type SnapshotRevertIssue struct {
    +	MigrationFault
    +
    +	SnapshotName string      `xml:"snapshotName,omitempty"`
    +	Event        []BaseEvent `xml:"event,omitempty,typeattr"`
    +	Errors       bool        `xml:"errors"`
    +}
    +
    +func init() {
    +	t["SnapshotRevertIssue"] = reflect.TypeOf((*SnapshotRevertIssue)(nil)).Elem()
    +}
    +
    +type SnapshotRevertIssueFault SnapshotRevertIssue
    +
    +func init() {
    +	t["SnapshotRevertIssueFault"] = reflect.TypeOf((*SnapshotRevertIssueFault)(nil)).Elem()
    +}
    +
    +type SoftRuleVioCorrectionDisallowed struct {
    +	VmConfigFault
    +
    +	VmName string `xml:"vmName"`
    +}
    +
    +func init() {
    +	t["SoftRuleVioCorrectionDisallowed"] = reflect.TypeOf((*SoftRuleVioCorrectionDisallowed)(nil)).Elem()
    +}
    +
    +type SoftRuleVioCorrectionDisallowedFault SoftRuleVioCorrectionDisallowed
    +
    +func init() {
    +	t["SoftRuleVioCorrectionDisallowedFault"] = reflect.TypeOf((*SoftRuleVioCorrectionDisallowedFault)(nil)).Elem()
    +}
    +
    +type SoftRuleVioCorrectionImpact struct {
    +	VmConfigFault
    +
    +	VmName string `xml:"vmName"`
    +}
    +
    +func init() {
    +	t["SoftRuleVioCorrectionImpact"] = reflect.TypeOf((*SoftRuleVioCorrectionImpact)(nil)).Elem()
    +}
    +
    +type SoftRuleVioCorrectionImpactFault SoftRuleVioCorrectionImpact
    +
    +func init() {
    +	t["SoftRuleVioCorrectionImpactFault"] = reflect.TypeOf((*SoftRuleVioCorrectionImpactFault)(nil)).Elem()
    +}
    +
    +type SoftwarePackage struct {
    +	DynamicData
    +
    +	Name                      string                    `xml:"name"`
    +	Version                   string                    `xml:"version"`
    +	Type                      string                    `xml:"type"`
    +	Vendor                    string                    `xml:"vendor"`
    +	AcceptanceLevel           string                    `xml:"acceptanceLevel"`
    +	Summary                   string                    `xml:"summary"`
    +	Description               string                    `xml:"description"`
    +	ReferenceURL              []string                  `xml:"referenceURL,omitempty"`
    +	CreationDate              *time.Time                `xml:"creationDate"`
    +	Depends                   []Relation                `xml:"depends,omitempty"`
    +	Conflicts                 []Relation                `xml:"conflicts,omitempty"`
    +	Replaces                  []Relation                `xml:"replaces,omitempty"`
    +	Provides                  []string                  `xml:"provides,omitempty"`
    +	MaintenanceModeRequired   *bool                     `xml:"maintenanceModeRequired"`
    +	HardwarePlatformsRequired []string                  `xml:"hardwarePlatformsRequired,omitempty"`
    +	Capability                SoftwarePackageCapability `xml:"capability"`
    +	Tag                       []string                  `xml:"tag,omitempty"`
    +	Payload                   []string                  `xml:"payload,omitempty"`
    +}
    +
    +func init() {
    +	t["SoftwarePackage"] = reflect.TypeOf((*SoftwarePackage)(nil)).Elem()
    +}
    +
    +type SoftwarePackageCapability struct {
    +	DynamicData
    +
    +	LiveInstallAllowed *bool `xml:"liveInstallAllowed"`
    +	LiveRemoveAllowed  *bool `xml:"liveRemoveAllowed"`
    +	StatelessReady     *bool `xml:"statelessReady"`
    +	Overlay            *bool `xml:"overlay"`
    +}
    +
    +func init() {
    +	t["SoftwarePackageCapability"] = reflect.TypeOf((*SoftwarePackageCapability)(nil)).Elem()
    +}
    +
    +type SourceNodeSpec struct {
    +	DynamicData
    +
    +	ManagementVc ServiceLocator         `xml:"managementVc"`
    +	ActiveVc     ManagedObjectReference `xml:"activeVc"`
    +}
    +
    +func init() {
    +	t["SourceNodeSpec"] = reflect.TypeOf((*SourceNodeSpec)(nil)).Elem()
    +}
    +
    +type SsdDiskNotAvailable struct {
    +	VimFault
    +
    +	DevicePath string `xml:"devicePath"`
    +}
    +
    +func init() {
    +	t["SsdDiskNotAvailable"] = reflect.TypeOf((*SsdDiskNotAvailable)(nil)).Elem()
    +}
    +
    +type SsdDiskNotAvailableFault SsdDiskNotAvailable
    +
    +func init() {
    +	t["SsdDiskNotAvailableFault"] = reflect.TypeOf((*SsdDiskNotAvailableFault)(nil)).Elem()
    +}
    +
    +type StageHostPatchRequestType struct {
    +	This       ManagedObjectReference                     `xml:"_this"`
    +	MetaUrls   []string                                   `xml:"metaUrls,omitempty"`
    +	BundleUrls []string                                   `xml:"bundleUrls,omitempty"`
    +	VibUrls    []string                                   `xml:"vibUrls,omitempty"`
    +	Spec       *HostPatchManagerPatchManagerOperationSpec `xml:"spec,omitempty"`
    +}
    +
    +func init() {
    +	t["StageHostPatchRequestType"] = reflect.TypeOf((*StageHostPatchRequestType)(nil)).Elem()
    +}
    +
    +type StageHostPatch_Task StageHostPatchRequestType
    +
    +func init() {
    +	t["StageHostPatch_Task"] = reflect.TypeOf((*StageHostPatch_Task)(nil)).Elem()
    +}
    +
    +type StageHostPatch_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type StampAllRulesWithUuidRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["StampAllRulesWithUuidRequestType"] = reflect.TypeOf((*StampAllRulesWithUuidRequestType)(nil)).Elem()
    +}
    +
    +type StampAllRulesWithUuid_Task StampAllRulesWithUuidRequestType
    +
    +func init() {
    +	t["StampAllRulesWithUuid_Task"] = reflect.TypeOf((*StampAllRulesWithUuid_Task)(nil)).Elem()
    +}
    +
    +type StampAllRulesWithUuid_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type StandbyGuest StandbyGuestRequestType
    +
    +func init() {
    +	t["StandbyGuest"] = reflect.TypeOf((*StandbyGuest)(nil)).Elem()
    +}
    +
    +type StandbyGuestRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["StandbyGuestRequestType"] = reflect.TypeOf((*StandbyGuestRequestType)(nil)).Elem()
    +}
    +
    +type StandbyGuestResponse struct {
    +}
    +
    +type StartProgramInGuest StartProgramInGuestRequestType
    +
    +func init() {
    +	t["StartProgramInGuest"] = reflect.TypeOf((*StartProgramInGuest)(nil)).Elem()
    +}
    +
    +type StartProgramInGuestRequestType struct {
    +	This ManagedObjectReference  `xml:"_this"`
    +	Vm   ManagedObjectReference  `xml:"vm"`
    +	Auth BaseGuestAuthentication `xml:"auth,typeattr"`
    +	Spec BaseGuestProgramSpec    `xml:"spec,typeattr"`
    +}
    +
    +func init() {
    +	t["StartProgramInGuestRequestType"] = reflect.TypeOf((*StartProgramInGuestRequestType)(nil)).Elem()
    +}
    +
    +type StartProgramInGuestResponse struct {
    +	Returnval int64 `xml:"returnval"`
    +}
    +
    +type StartRecordingRequestType struct {
    +	This        ManagedObjectReference `xml:"_this"`
    +	Name        string                 `xml:"name"`
    +	Description string                 `xml:"description,omitempty"`
    +}
    +
    +func init() {
    +	t["StartRecordingRequestType"] = reflect.TypeOf((*StartRecordingRequestType)(nil)).Elem()
    +}
    +
    +type StartRecording_Task StartRecordingRequestType
    +
    +func init() {
    +	t["StartRecording_Task"] = reflect.TypeOf((*StartRecording_Task)(nil)).Elem()
    +}
    +
    +type StartRecording_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type StartReplayingRequestType struct {
    +	This           ManagedObjectReference `xml:"_this"`
    +	ReplaySnapshot ManagedObjectReference `xml:"replaySnapshot"`
    +}
    +
    +func init() {
    +	t["StartReplayingRequestType"] = reflect.TypeOf((*StartReplayingRequestType)(nil)).Elem()
    +}
    +
    +type StartReplaying_Task StartReplayingRequestType
    +
    +func init() {
    +	t["StartReplaying_Task"] = reflect.TypeOf((*StartReplaying_Task)(nil)).Elem()
    +}
    +
    +type StartReplaying_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type StartService StartServiceRequestType
    +
    +func init() {
    +	t["StartService"] = reflect.TypeOf((*StartService)(nil)).Elem()
    +}
    +
    +type StartServiceRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Id   string                 `xml:"id"`
    +}
    +
    +func init() {
    +	t["StartServiceRequestType"] = reflect.TypeOf((*StartServiceRequestType)(nil)).Elem()
    +}
    +
    +type StartServiceResponse struct {
    +}
    +
    +type StateAlarmExpression struct {
    +	AlarmExpression
    +
    +	Operator  StateAlarmOperator `xml:"operator"`
    +	Type      string             `xml:"type"`
    +	StatePath string             `xml:"statePath"`
    +	Yellow    string             `xml:"yellow,omitempty"`
    +	Red       string             `xml:"red,omitempty"`
    +}
    +
    +func init() {
    +	t["StateAlarmExpression"] = reflect.TypeOf((*StateAlarmExpression)(nil)).Elem()
    +}
    +
    +type StaticRouteProfile struct {
    +	ApplyProfile
    +
    +	Key string `xml:"key,omitempty"`
    +}
    +
    +func init() {
    +	t["StaticRouteProfile"] = reflect.TypeOf((*StaticRouteProfile)(nil)).Elem()
    +}
    +
    +type StopRecordingRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["StopRecordingRequestType"] = reflect.TypeOf((*StopRecordingRequestType)(nil)).Elem()
    +}
    +
    +type StopRecording_Task StopRecordingRequestType
    +
    +func init() {
    +	t["StopRecording_Task"] = reflect.TypeOf((*StopRecording_Task)(nil)).Elem()
    +}
    +
    +type StopRecording_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type StopReplayingRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["StopReplayingRequestType"] = reflect.TypeOf((*StopReplayingRequestType)(nil)).Elem()
    +}
    +
    +type StopReplaying_Task StopReplayingRequestType
    +
    +func init() {
    +	t["StopReplaying_Task"] = reflect.TypeOf((*StopReplaying_Task)(nil)).Elem()
    +}
    +
    +type StopReplaying_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type StopService StopServiceRequestType
    +
    +func init() {
    +	t["StopService"] = reflect.TypeOf((*StopService)(nil)).Elem()
    +}
    +
    +type StopServiceRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Id   string                 `xml:"id"`
    +}
    +
    +func init() {
    +	t["StopServiceRequestType"] = reflect.TypeOf((*StopServiceRequestType)(nil)).Elem()
    +}
    +
    +type StopServiceResponse struct {
    +}
    +
    +type StorageDrsAutomationConfig struct {
    +	DynamicData
    +
    +	SpaceLoadBalanceAutomationMode  string `xml:"spaceLoadBalanceAutomationMode,omitempty"`
    +	IoLoadBalanceAutomationMode     string `xml:"ioLoadBalanceAutomationMode,omitempty"`
    +	RuleEnforcementAutomationMode   string `xml:"ruleEnforcementAutomationMode,omitempty"`
    +	PolicyEnforcementAutomationMode string `xml:"policyEnforcementAutomationMode,omitempty"`
    +	VmEvacuationAutomationMode      string `xml:"vmEvacuationAutomationMode,omitempty"`
    +}
    +
    +func init() {
    +	t["StorageDrsAutomationConfig"] = reflect.TypeOf((*StorageDrsAutomationConfig)(nil)).Elem()
    +}
    +
    +type StorageDrsCannotMoveDiskInMultiWriterMode struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["StorageDrsCannotMoveDiskInMultiWriterMode"] = reflect.TypeOf((*StorageDrsCannotMoveDiskInMultiWriterMode)(nil)).Elem()
    +}
    +
    +type StorageDrsCannotMoveDiskInMultiWriterModeFault StorageDrsCannotMoveDiskInMultiWriterMode
    +
    +func init() {
    +	t["StorageDrsCannotMoveDiskInMultiWriterModeFault"] = reflect.TypeOf((*StorageDrsCannotMoveDiskInMultiWriterModeFault)(nil)).Elem()
    +}
    +
    +type StorageDrsCannotMoveFTVm struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["StorageDrsCannotMoveFTVm"] = reflect.TypeOf((*StorageDrsCannotMoveFTVm)(nil)).Elem()
    +}
    +
    +type StorageDrsCannotMoveFTVmFault StorageDrsCannotMoveFTVm
    +
    +func init() {
    +	t["StorageDrsCannotMoveFTVmFault"] = reflect.TypeOf((*StorageDrsCannotMoveFTVmFault)(nil)).Elem()
    +}
    +
    +type StorageDrsCannotMoveIndependentDisk struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["StorageDrsCannotMoveIndependentDisk"] = reflect.TypeOf((*StorageDrsCannotMoveIndependentDisk)(nil)).Elem()
    +}
    +
    +type StorageDrsCannotMoveIndependentDiskFault StorageDrsCannotMoveIndependentDisk
    +
    +func init() {
    +	t["StorageDrsCannotMoveIndependentDiskFault"] = reflect.TypeOf((*StorageDrsCannotMoveIndependentDiskFault)(nil)).Elem()
    +}
    +
    +type StorageDrsCannotMoveManuallyPlacedSwapFile struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["StorageDrsCannotMoveManuallyPlacedSwapFile"] = reflect.TypeOf((*StorageDrsCannotMoveManuallyPlacedSwapFile)(nil)).Elem()
    +}
    +
    +type StorageDrsCannotMoveManuallyPlacedSwapFileFault StorageDrsCannotMoveManuallyPlacedSwapFile
    +
    +func init() {
    +	t["StorageDrsCannotMoveManuallyPlacedSwapFileFault"] = reflect.TypeOf((*StorageDrsCannotMoveManuallyPlacedSwapFileFault)(nil)).Elem()
    +}
    +
    +type StorageDrsCannotMoveManuallyPlacedVm struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["StorageDrsCannotMoveManuallyPlacedVm"] = reflect.TypeOf((*StorageDrsCannotMoveManuallyPlacedVm)(nil)).Elem()
    +}
    +
    +type StorageDrsCannotMoveManuallyPlacedVmFault StorageDrsCannotMoveManuallyPlacedVm
    +
    +func init() {
    +	t["StorageDrsCannotMoveManuallyPlacedVmFault"] = reflect.TypeOf((*StorageDrsCannotMoveManuallyPlacedVmFault)(nil)).Elem()
    +}
    +
    +type StorageDrsCannotMoveSharedDisk struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["StorageDrsCannotMoveSharedDisk"] = reflect.TypeOf((*StorageDrsCannotMoveSharedDisk)(nil)).Elem()
    +}
    +
    +type StorageDrsCannotMoveSharedDiskFault StorageDrsCannotMoveSharedDisk
    +
    +func init() {
    +	t["StorageDrsCannotMoveSharedDiskFault"] = reflect.TypeOf((*StorageDrsCannotMoveSharedDiskFault)(nil)).Elem()
    +}
    +
    +type StorageDrsCannotMoveTemplate struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["StorageDrsCannotMoveTemplate"] = reflect.TypeOf((*StorageDrsCannotMoveTemplate)(nil)).Elem()
    +}
    +
    +type StorageDrsCannotMoveTemplateFault StorageDrsCannotMoveTemplate
    +
    +func init() {
    +	t["StorageDrsCannotMoveTemplateFault"] = reflect.TypeOf((*StorageDrsCannotMoveTemplateFault)(nil)).Elem()
    +}
    +
    +type StorageDrsCannotMoveVmInUserFolder struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["StorageDrsCannotMoveVmInUserFolder"] = reflect.TypeOf((*StorageDrsCannotMoveVmInUserFolder)(nil)).Elem()
    +}
    +
    +type StorageDrsCannotMoveVmInUserFolderFault StorageDrsCannotMoveVmInUserFolder
    +
    +func init() {
    +	t["StorageDrsCannotMoveVmInUserFolderFault"] = reflect.TypeOf((*StorageDrsCannotMoveVmInUserFolderFault)(nil)).Elem()
    +}
    +
    +type StorageDrsCannotMoveVmWithMountedCDROM struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["StorageDrsCannotMoveVmWithMountedCDROM"] = reflect.TypeOf((*StorageDrsCannotMoveVmWithMountedCDROM)(nil)).Elem()
    +}
    +
    +type StorageDrsCannotMoveVmWithMountedCDROMFault StorageDrsCannotMoveVmWithMountedCDROM
    +
    +func init() {
    +	t["StorageDrsCannotMoveVmWithMountedCDROMFault"] = reflect.TypeOf((*StorageDrsCannotMoveVmWithMountedCDROMFault)(nil)).Elem()
    +}
    +
    +type StorageDrsCannotMoveVmWithNoFilesInLayout struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["StorageDrsCannotMoveVmWithNoFilesInLayout"] = reflect.TypeOf((*StorageDrsCannotMoveVmWithNoFilesInLayout)(nil)).Elem()
    +}
    +
    +type StorageDrsCannotMoveVmWithNoFilesInLayoutFault StorageDrsCannotMoveVmWithNoFilesInLayout
    +
    +func init() {
    +	t["StorageDrsCannotMoveVmWithNoFilesInLayoutFault"] = reflect.TypeOf((*StorageDrsCannotMoveVmWithNoFilesInLayoutFault)(nil)).Elem()
    +}
    +
    +type StorageDrsConfigInfo struct {
    +	DynamicData
    +
    +	PodConfig StorageDrsPodConfigInfo  `xml:"podConfig"`
    +	VmConfig  []StorageDrsVmConfigInfo `xml:"vmConfig,omitempty"`
    +}
    +
    +func init() {
    +	t["StorageDrsConfigInfo"] = reflect.TypeOf((*StorageDrsConfigInfo)(nil)).Elem()
    +}
    +
    +type StorageDrsConfigSpec struct {
    +	DynamicData
    +
    +	PodConfigSpec *StorageDrsPodConfigSpec `xml:"podConfigSpec,omitempty"`
    +	VmConfigSpec  []StorageDrsVmConfigSpec `xml:"vmConfigSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["StorageDrsConfigSpec"] = reflect.TypeOf((*StorageDrsConfigSpec)(nil)).Elem()
    +}
    +
    +type StorageDrsDatacentersCannotShareDatastore struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["StorageDrsDatacentersCannotShareDatastore"] = reflect.TypeOf((*StorageDrsDatacentersCannotShareDatastore)(nil)).Elem()
    +}
    +
    +type StorageDrsDatacentersCannotShareDatastoreFault StorageDrsDatacentersCannotShareDatastore
    +
    +func init() {
    +	t["StorageDrsDatacentersCannotShareDatastoreFault"] = reflect.TypeOf((*StorageDrsDatacentersCannotShareDatastoreFault)(nil)).Elem()
    +}
    +
    +type StorageDrsDisabledOnVm struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["StorageDrsDisabledOnVm"] = reflect.TypeOf((*StorageDrsDisabledOnVm)(nil)).Elem()
    +}
    +
    +type StorageDrsDisabledOnVmFault StorageDrsDisabledOnVm
    +
    +func init() {
    +	t["StorageDrsDisabledOnVmFault"] = reflect.TypeOf((*StorageDrsDisabledOnVmFault)(nil)).Elem()
    +}
    +
    +type StorageDrsHbrDiskNotMovable struct {
    +	VimFault
    +
    +	NonMovableDiskIds string `xml:"nonMovableDiskIds"`
    +}
    +
    +func init() {
    +	t["StorageDrsHbrDiskNotMovable"] = reflect.TypeOf((*StorageDrsHbrDiskNotMovable)(nil)).Elem()
    +}
    +
    +type StorageDrsHbrDiskNotMovableFault StorageDrsHbrDiskNotMovable
    +
    +func init() {
    +	t["StorageDrsHbrDiskNotMovableFault"] = reflect.TypeOf((*StorageDrsHbrDiskNotMovableFault)(nil)).Elem()
    +}
    +
    +type StorageDrsHmsMoveInProgress struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["StorageDrsHmsMoveInProgress"] = reflect.TypeOf((*StorageDrsHmsMoveInProgress)(nil)).Elem()
    +}
    +
    +type StorageDrsHmsMoveInProgressFault StorageDrsHmsMoveInProgress
    +
    +func init() {
    +	t["StorageDrsHmsMoveInProgressFault"] = reflect.TypeOf((*StorageDrsHmsMoveInProgressFault)(nil)).Elem()
    +}
    +
    +type StorageDrsHmsUnreachable struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["StorageDrsHmsUnreachable"] = reflect.TypeOf((*StorageDrsHmsUnreachable)(nil)).Elem()
    +}
    +
    +type StorageDrsHmsUnreachableFault StorageDrsHmsUnreachable
    +
    +func init() {
    +	t["StorageDrsHmsUnreachableFault"] = reflect.TypeOf((*StorageDrsHmsUnreachableFault)(nil)).Elem()
    +}
    +
    +type StorageDrsIoLoadBalanceConfig struct {
    +	DynamicData
    +
    +	ReservablePercentThreshold int32  `xml:"reservablePercentThreshold,omitempty"`
    +	ReservableIopsThreshold    int32  `xml:"reservableIopsThreshold,omitempty"`
    +	ReservableThresholdMode    string `xml:"reservableThresholdMode,omitempty"`
    +	IoLatencyThreshold         int32  `xml:"ioLatencyThreshold,omitempty"`
    +	IoLoadImbalanceThreshold   int32  `xml:"ioLoadImbalanceThreshold,omitempty"`
    +}
    +
    +func init() {
    +	t["StorageDrsIoLoadBalanceConfig"] = reflect.TypeOf((*StorageDrsIoLoadBalanceConfig)(nil)).Elem()
    +}
    +
    +type StorageDrsIolbDisabledInternally struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["StorageDrsIolbDisabledInternally"] = reflect.TypeOf((*StorageDrsIolbDisabledInternally)(nil)).Elem()
    +}
    +
    +type StorageDrsIolbDisabledInternallyFault StorageDrsIolbDisabledInternally
    +
    +func init() {
    +	t["StorageDrsIolbDisabledInternallyFault"] = reflect.TypeOf((*StorageDrsIolbDisabledInternallyFault)(nil)).Elem()
    +}
    +
    +type StorageDrsOptionSpec struct {
    +	ArrayUpdateSpec
    +
    +	Option BaseOptionValue `xml:"option,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["StorageDrsOptionSpec"] = reflect.TypeOf((*StorageDrsOptionSpec)(nil)).Elem()
    +}
    +
    +type StorageDrsPlacementRankVmSpec struct {
    +	DynamicData
    +
    +	VmPlacementSpec PlacementSpec            `xml:"vmPlacementSpec"`
    +	VmClusters      []ManagedObjectReference `xml:"vmClusters"`
    +}
    +
    +func init() {
    +	t["StorageDrsPlacementRankVmSpec"] = reflect.TypeOf((*StorageDrsPlacementRankVmSpec)(nil)).Elem()
    +}
    +
    +type StorageDrsPodConfigInfo struct {
    +	DynamicData
    +
    +	Enabled                bool                              `xml:"enabled"`
    +	IoLoadBalanceEnabled   bool                              `xml:"ioLoadBalanceEnabled"`
    +	DefaultVmBehavior      string                            `xml:"defaultVmBehavior"`
    +	LoadBalanceInterval    int32                             `xml:"loadBalanceInterval,omitempty"`
    +	DefaultIntraVmAffinity *bool                             `xml:"defaultIntraVmAffinity"`
    +	SpaceLoadBalanceConfig *StorageDrsSpaceLoadBalanceConfig `xml:"spaceLoadBalanceConfig,omitempty"`
    +	IoLoadBalanceConfig    *StorageDrsIoLoadBalanceConfig    `xml:"ioLoadBalanceConfig,omitempty"`
    +	AutomationOverrides    *StorageDrsAutomationConfig       `xml:"automationOverrides,omitempty"`
    +	Rule                   []BaseClusterRuleInfo             `xml:"rule,omitempty,typeattr"`
    +	Option                 []BaseOptionValue                 `xml:"option,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["StorageDrsPodConfigInfo"] = reflect.TypeOf((*StorageDrsPodConfigInfo)(nil)).Elem()
    +}
    +
    +type StorageDrsPodConfigSpec struct {
    +	DynamicData
    +
    +	Enabled                *bool                             `xml:"enabled"`
    +	IoLoadBalanceEnabled   *bool                             `xml:"ioLoadBalanceEnabled"`
    +	DefaultVmBehavior      string                            `xml:"defaultVmBehavior,omitempty"`
    +	LoadBalanceInterval    int32                             `xml:"loadBalanceInterval,omitempty"`
    +	DefaultIntraVmAffinity *bool                             `xml:"defaultIntraVmAffinity"`
    +	SpaceLoadBalanceConfig *StorageDrsSpaceLoadBalanceConfig `xml:"spaceLoadBalanceConfig,omitempty"`
    +	IoLoadBalanceConfig    *StorageDrsIoLoadBalanceConfig    `xml:"ioLoadBalanceConfig,omitempty"`
    +	AutomationOverrides    *StorageDrsAutomationConfig       `xml:"automationOverrides,omitempty"`
    +	Rule                   []ClusterRuleSpec                 `xml:"rule,omitempty"`
    +	Option                 []StorageDrsOptionSpec            `xml:"option,omitempty"`
    +}
    +
    +func init() {
    +	t["StorageDrsPodConfigSpec"] = reflect.TypeOf((*StorageDrsPodConfigSpec)(nil)).Elem()
    +}
    +
    +type StorageDrsPodSelectionSpec struct {
    +	DynamicData
    +
    +	InitialVmConfig []VmPodConfigForPlacement `xml:"initialVmConfig,omitempty"`
    +	StoragePod      *ManagedObjectReference   `xml:"storagePod,omitempty"`
    +}
    +
    +func init() {
    +	t["StorageDrsPodSelectionSpec"] = reflect.TypeOf((*StorageDrsPodSelectionSpec)(nil)).Elem()
    +}
    +
    +type StorageDrsRelocateDisabled struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["StorageDrsRelocateDisabled"] = reflect.TypeOf((*StorageDrsRelocateDisabled)(nil)).Elem()
    +}
    +
    +type StorageDrsRelocateDisabledFault StorageDrsRelocateDisabled
    +
    +func init() {
    +	t["StorageDrsRelocateDisabledFault"] = reflect.TypeOf((*StorageDrsRelocateDisabledFault)(nil)).Elem()
    +}
    +
    +type StorageDrsSpaceLoadBalanceConfig struct {
    +	DynamicData
    +
    +	SpaceThresholdMode            string `xml:"spaceThresholdMode,omitempty"`
    +	SpaceUtilizationThreshold     int32  `xml:"spaceUtilizationThreshold,omitempty"`
    +	FreeSpaceThresholdGB          int32  `xml:"freeSpaceThresholdGB,omitempty"`
    +	MinSpaceUtilizationDifference int32  `xml:"minSpaceUtilizationDifference,omitempty"`
    +}
    +
    +func init() {
    +	t["StorageDrsSpaceLoadBalanceConfig"] = reflect.TypeOf((*StorageDrsSpaceLoadBalanceConfig)(nil)).Elem()
    +}
    +
    +type StorageDrsStaleHmsCollection struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["StorageDrsStaleHmsCollection"] = reflect.TypeOf((*StorageDrsStaleHmsCollection)(nil)).Elem()
    +}
    +
    +type StorageDrsStaleHmsCollectionFault StorageDrsStaleHmsCollection
    +
    +func init() {
    +	t["StorageDrsStaleHmsCollectionFault"] = reflect.TypeOf((*StorageDrsStaleHmsCollectionFault)(nil)).Elem()
    +}
    +
    +type StorageDrsUnableToMoveFiles struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["StorageDrsUnableToMoveFiles"] = reflect.TypeOf((*StorageDrsUnableToMoveFiles)(nil)).Elem()
    +}
    +
    +type StorageDrsUnableToMoveFilesFault StorageDrsUnableToMoveFiles
    +
    +func init() {
    +	t["StorageDrsUnableToMoveFilesFault"] = reflect.TypeOf((*StorageDrsUnableToMoveFilesFault)(nil)).Elem()
    +}
    +
    +type StorageDrsVmConfigInfo struct {
    +	DynamicData
    +
    +	Vm                  *ManagedObjectReference          `xml:"vm,omitempty"`
    +	Enabled             *bool                            `xml:"enabled"`
    +	Behavior            string                           `xml:"behavior,omitempty"`
    +	IntraVmAffinity     *bool                            `xml:"intraVmAffinity"`
    +	IntraVmAntiAffinity *VirtualDiskAntiAffinityRuleSpec `xml:"intraVmAntiAffinity,omitempty"`
    +	VirtualDiskRules    []VirtualDiskRuleSpec            `xml:"virtualDiskRules,omitempty"`
    +}
    +
    +func init() {
    +	t["StorageDrsVmConfigInfo"] = reflect.TypeOf((*StorageDrsVmConfigInfo)(nil)).Elem()
    +}
    +
    +type StorageDrsVmConfigSpec struct {
    +	ArrayUpdateSpec
    +
    +	Info *StorageDrsVmConfigInfo `xml:"info,omitempty"`
    +}
    +
    +func init() {
    +	t["StorageDrsVmConfigSpec"] = reflect.TypeOf((*StorageDrsVmConfigSpec)(nil)).Elem()
    +}
    +
    +type StorageIOAllocationInfo struct {
    +	DynamicData
    +
    +	Limit       *int64      `xml:"limit"`
    +	Shares      *SharesInfo `xml:"shares,omitempty"`
    +	Reservation *int32      `xml:"reservation"`
    +}
    +
    +func init() {
    +	t["StorageIOAllocationInfo"] = reflect.TypeOf((*StorageIOAllocationInfo)(nil)).Elem()
    +}
    +
    +type StorageIOAllocationOption struct {
    +	DynamicData
    +
    +	LimitOption  LongOption   `xml:"limitOption"`
    +	SharesOption SharesOption `xml:"sharesOption"`
    +}
    +
    +func init() {
    +	t["StorageIOAllocationOption"] = reflect.TypeOf((*StorageIOAllocationOption)(nil)).Elem()
    +}
    +
    +type StorageIORMConfigOption struct {
    +	DynamicData
    +
    +	EnabledOption                BoolOption  `xml:"enabledOption"`
    +	CongestionThresholdOption    IntOption   `xml:"congestionThresholdOption"`
    +	StatsCollectionEnabledOption *BoolOption `xml:"statsCollectionEnabledOption,omitempty"`
    +	ReservationEnabledOption     *BoolOption `xml:"reservationEnabledOption,omitempty"`
    +}
    +
    +func init() {
    +	t["StorageIORMConfigOption"] = reflect.TypeOf((*StorageIORMConfigOption)(nil)).Elem()
    +}
    +
    +type StorageIORMConfigSpec struct {
    +	DynamicData
    +
    +	Enabled                  *bool  `xml:"enabled"`
    +	CongestionThresholdMode  string `xml:"congestionThresholdMode,omitempty"`
    +	CongestionThreshold      int32  `xml:"congestionThreshold,omitempty"`
    +	PercentOfPeakThroughput  int32  `xml:"percentOfPeakThroughput,omitempty"`
    +	StatsCollectionEnabled   *bool  `xml:"statsCollectionEnabled"`
    +	ReservationEnabled       *bool  `xml:"reservationEnabled"`
    +	StatsAggregationDisabled *bool  `xml:"statsAggregationDisabled"`
    +	ReservableIopsThreshold  int32  `xml:"reservableIopsThreshold,omitempty"`
    +}
    +
    +func init() {
    +	t["StorageIORMConfigSpec"] = reflect.TypeOf((*StorageIORMConfigSpec)(nil)).Elem()
    +}
    +
    +type StorageIORMInfo struct {
    +	DynamicData
    +
    +	Enabled                  bool   `xml:"enabled"`
    +	CongestionThresholdMode  string `xml:"congestionThresholdMode,omitempty"`
    +	CongestionThreshold      int32  `xml:"congestionThreshold"`
    +	PercentOfPeakThroughput  int32  `xml:"percentOfPeakThroughput,omitempty"`
    +	StatsCollectionEnabled   *bool  `xml:"statsCollectionEnabled"`
    +	ReservationEnabled       *bool  `xml:"reservationEnabled"`
    +	StatsAggregationDisabled *bool  `xml:"statsAggregationDisabled"`
    +	ReservableIopsThreshold  int32  `xml:"reservableIopsThreshold,omitempty"`
    +}
    +
    +func init() {
    +	t["StorageIORMInfo"] = reflect.TypeOf((*StorageIORMInfo)(nil)).Elem()
    +}
    +
    +type StorageMigrationAction struct {
    +	ClusterAction
    +
    +	Vm                 ManagedObjectReference     `xml:"vm"`
    +	RelocateSpec       VirtualMachineRelocateSpec `xml:"relocateSpec"`
    +	Source             ManagedObjectReference     `xml:"source"`
    +	Destination        ManagedObjectReference     `xml:"destination"`
    +	SizeTransferred    int64                      `xml:"sizeTransferred"`
    +	SpaceUtilSrcBefore float32                    `xml:"spaceUtilSrcBefore,omitempty"`
    +	SpaceUtilDstBefore float32                    `xml:"spaceUtilDstBefore,omitempty"`
    +	SpaceUtilSrcAfter  float32                    `xml:"spaceUtilSrcAfter,omitempty"`
    +	SpaceUtilDstAfter  float32                    `xml:"spaceUtilDstAfter,omitempty"`
    +	IoLatencySrcBefore float32                    `xml:"ioLatencySrcBefore,omitempty"`
    +	IoLatencyDstBefore float32                    `xml:"ioLatencyDstBefore,omitempty"`
    +}
    +
    +func init() {
    +	t["StorageMigrationAction"] = reflect.TypeOf((*StorageMigrationAction)(nil)).Elem()
    +}
    +
    +type StoragePerformanceSummary struct {
    +	DynamicData
    +
    +	Interval              int32     `xml:"interval"`
    +	Percentile            []int32   `xml:"percentile"`
    +	DatastoreReadLatency  []float64 `xml:"datastoreReadLatency"`
    +	DatastoreWriteLatency []float64 `xml:"datastoreWriteLatency"`
    +	DatastoreVmLatency    []float64 `xml:"datastoreVmLatency"`
    +	DatastoreReadIops     []float64 `xml:"datastoreReadIops"`
    +	DatastoreWriteIops    []float64 `xml:"datastoreWriteIops"`
    +	SiocActivityDuration  int32     `xml:"siocActivityDuration"`
    +}
    +
    +func init() {
    +	t["StoragePerformanceSummary"] = reflect.TypeOf((*StoragePerformanceSummary)(nil)).Elem()
    +}
    +
    +type StoragePlacementAction struct {
    +	ClusterAction
    +
    +	Vm                *ManagedObjectReference    `xml:"vm,omitempty"`
    +	RelocateSpec      VirtualMachineRelocateSpec `xml:"relocateSpec"`
    +	Destination       ManagedObjectReference     `xml:"destination"`
    +	SpaceUtilBefore   float32                    `xml:"spaceUtilBefore,omitempty"`
    +	SpaceDemandBefore float32                    `xml:"spaceDemandBefore,omitempty"`
    +	SpaceUtilAfter    float32                    `xml:"spaceUtilAfter,omitempty"`
    +	SpaceDemandAfter  float32                    `xml:"spaceDemandAfter,omitempty"`
    +	IoLatencyBefore   float32                    `xml:"ioLatencyBefore,omitempty"`
    +}
    +
    +func init() {
    +	t["StoragePlacementAction"] = reflect.TypeOf((*StoragePlacementAction)(nil)).Elem()
    +}
    +
    +type StoragePlacementResult struct {
    +	DynamicData
    +
    +	Recommendations []ClusterRecommendation `xml:"recommendations,omitempty"`
    +	DrsFault        *ClusterDrsFaults       `xml:"drsFault,omitempty"`
    +	Task            *ManagedObjectReference `xml:"task,omitempty"`
    +}
    +
    +func init() {
    +	t["StoragePlacementResult"] = reflect.TypeOf((*StoragePlacementResult)(nil)).Elem()
    +}
    +
    +type StoragePlacementSpec struct {
    +	DynamicData
    +
    +	Type                      string                      `xml:"type"`
    +	Priority                  VirtualMachineMovePriority  `xml:"priority,omitempty"`
    +	Vm                        *ManagedObjectReference     `xml:"vm,omitempty"`
    +	PodSelectionSpec          StorageDrsPodSelectionSpec  `xml:"podSelectionSpec"`
    +	CloneSpec                 *VirtualMachineCloneSpec    `xml:"cloneSpec,omitempty"`
    +	CloneName                 string                      `xml:"cloneName,omitempty"`
    +	ConfigSpec                *VirtualMachineConfigSpec   `xml:"configSpec,omitempty"`
    +	RelocateSpec              *VirtualMachineRelocateSpec `xml:"relocateSpec,omitempty"`
    +	ResourcePool              *ManagedObjectReference     `xml:"resourcePool,omitempty"`
    +	Host                      *ManagedObjectReference     `xml:"host,omitempty"`
    +	Folder                    *ManagedObjectReference     `xml:"folder,omitempty"`
    +	DisallowPrerequisiteMoves *bool                       `xml:"disallowPrerequisiteMoves"`
    +	ResourceLeaseDurationSec  int32                       `xml:"resourceLeaseDurationSec,omitempty"`
    +}
    +
    +func init() {
    +	t["StoragePlacementSpec"] = reflect.TypeOf((*StoragePlacementSpec)(nil)).Elem()
    +}
    +
    +type StoragePodSummary struct {
    +	DynamicData
    +
    +	Name      string `xml:"name"`
    +	Capacity  int64  `xml:"capacity"`
    +	FreeSpace int64  `xml:"freeSpace"`
    +}
    +
    +func init() {
    +	t["StoragePodSummary"] = reflect.TypeOf((*StoragePodSummary)(nil)).Elem()
    +}
    +
    +type StorageProfile struct {
    +	ApplyProfile
    +
    +	NasStorage []NasStorageProfile `xml:"nasStorage,omitempty"`
    +}
    +
    +func init() {
    +	t["StorageProfile"] = reflect.TypeOf((*StorageProfile)(nil)).Elem()
    +}
    +
    +type StorageRequirement struct {
    +	DynamicData
    +
    +	Datastore             ManagedObjectReference `xml:"datastore"`
    +	FreeSpaceRequiredInKb int64                  `xml:"freeSpaceRequiredInKb"`
    +}
    +
    +func init() {
    +	t["StorageRequirement"] = reflect.TypeOf((*StorageRequirement)(nil)).Elem()
    +}
    +
    +type StorageResourceManagerStorageProfileStatistics struct {
    +	DynamicData
    +
    +	ProfileId    string `xml:"profileId"`
    +	TotalSpaceMB int64  `xml:"totalSpaceMB"`
    +	UsedSpaceMB  int64  `xml:"usedSpaceMB"`
    +}
    +
    +func init() {
    +	t["StorageResourceManagerStorageProfileStatistics"] = reflect.TypeOf((*StorageResourceManagerStorageProfileStatistics)(nil)).Elem()
    +}
    +
    +type StorageVMotionNotSupported struct {
    +	MigrationFeatureNotSupported
    +}
    +
    +func init() {
    +	t["StorageVMotionNotSupported"] = reflect.TypeOf((*StorageVMotionNotSupported)(nil)).Elem()
    +}
    +
    +type StorageVMotionNotSupportedFault StorageVMotionNotSupported
    +
    +func init() {
    +	t["StorageVMotionNotSupportedFault"] = reflect.TypeOf((*StorageVMotionNotSupportedFault)(nil)).Elem()
    +}
    +
    +type StorageVmotionIncompatible struct {
    +	VirtualHardwareCompatibilityIssue
    +
    +	Datastore *ManagedObjectReference `xml:"datastore,omitempty"`
    +}
    +
    +func init() {
    +	t["StorageVmotionIncompatible"] = reflect.TypeOf((*StorageVmotionIncompatible)(nil)).Elem()
    +}
    +
    +type StorageVmotionIncompatibleFault StorageVmotionIncompatible
    +
    +func init() {
    +	t["StorageVmotionIncompatibleFault"] = reflect.TypeOf((*StorageVmotionIncompatibleFault)(nil)).Elem()
    +}
    +
    +type StringExpression struct {
    +	NegatableExpression
    +
    +	Value string `xml:"value,omitempty"`
    +}
    +
    +func init() {
    +	t["StringExpression"] = reflect.TypeOf((*StringExpression)(nil)).Elem()
    +}
    +
    +type StringOption struct {
    +	OptionType
    +
    +	DefaultValue    string `xml:"defaultValue"`
    +	ValidCharacters string `xml:"validCharacters,omitempty"`
    +}
    +
    +func init() {
    +	t["StringOption"] = reflect.TypeOf((*StringOption)(nil)).Elem()
    +}
    +
    +type StringPolicy struct {
    +	InheritablePolicy
    +
    +	Value string `xml:"value,omitempty"`
    +}
    +
    +func init() {
    +	t["StringPolicy"] = reflect.TypeOf((*StringPolicy)(nil)).Elem()
    +}
    +
    +type StructuredCustomizations struct {
    +	HostProfilesEntityCustomizations
    +
    +	Entity         ManagedObjectReference `xml:"entity"`
    +	Customizations *AnswerFile            `xml:"customizations,omitempty"`
    +}
    +
    +func init() {
    +	t["StructuredCustomizations"] = reflect.TypeOf((*StructuredCustomizations)(nil)).Elem()
    +}
    +
    +type SuspendVAppRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["SuspendVAppRequestType"] = reflect.TypeOf((*SuspendVAppRequestType)(nil)).Elem()
    +}
    +
    +type SuspendVApp_Task SuspendVAppRequestType
    +
    +func init() {
    +	t["SuspendVApp_Task"] = reflect.TypeOf((*SuspendVApp_Task)(nil)).Elem()
    +}
    +
    +type SuspendVApp_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type SuspendVMRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["SuspendVMRequestType"] = reflect.TypeOf((*SuspendVMRequestType)(nil)).Elem()
    +}
    +
    +type SuspendVM_Task SuspendVMRequestType
    +
    +func init() {
    +	t["SuspendVM_Task"] = reflect.TypeOf((*SuspendVM_Task)(nil)).Elem()
    +}
    +
    +type SuspendVM_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type SuspendedRelocateNotSupported struct {
    +	MigrationFault
    +}
    +
    +func init() {
    +	t["SuspendedRelocateNotSupported"] = reflect.TypeOf((*SuspendedRelocateNotSupported)(nil)).Elem()
    +}
    +
    +type SuspendedRelocateNotSupportedFault SuspendedRelocateNotSupported
    +
    +func init() {
    +	t["SuspendedRelocateNotSupportedFault"] = reflect.TypeOf((*SuspendedRelocateNotSupportedFault)(nil)).Elem()
    +}
    +
    +type SwapDatastoreNotWritableOnHost struct {
    +	DatastoreNotWritableOnHost
    +}
    +
    +func init() {
    +	t["SwapDatastoreNotWritableOnHost"] = reflect.TypeOf((*SwapDatastoreNotWritableOnHost)(nil)).Elem()
    +}
    +
    +type SwapDatastoreNotWritableOnHostFault SwapDatastoreNotWritableOnHost
    +
    +func init() {
    +	t["SwapDatastoreNotWritableOnHostFault"] = reflect.TypeOf((*SwapDatastoreNotWritableOnHostFault)(nil)).Elem()
    +}
    +
    +type SwapDatastoreUnset struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["SwapDatastoreUnset"] = reflect.TypeOf((*SwapDatastoreUnset)(nil)).Elem()
    +}
    +
    +type SwapDatastoreUnsetFault SwapDatastoreUnset
    +
    +func init() {
    +	t["SwapDatastoreUnsetFault"] = reflect.TypeOf((*SwapDatastoreUnsetFault)(nil)).Elem()
    +}
    +
    +type SwapPlacementOverrideNotSupported struct {
    +	InvalidVmConfig
    +}
    +
    +func init() {
    +	t["SwapPlacementOverrideNotSupported"] = reflect.TypeOf((*SwapPlacementOverrideNotSupported)(nil)).Elem()
    +}
    +
    +type SwapPlacementOverrideNotSupportedFault SwapPlacementOverrideNotSupported
    +
    +func init() {
    +	t["SwapPlacementOverrideNotSupportedFault"] = reflect.TypeOf((*SwapPlacementOverrideNotSupportedFault)(nil)).Elem()
    +}
    +
    +type SwitchIpUnset struct {
    +	DvsFault
    +}
    +
    +func init() {
    +	t["SwitchIpUnset"] = reflect.TypeOf((*SwitchIpUnset)(nil)).Elem()
    +}
    +
    +type SwitchIpUnsetFault SwitchIpUnset
    +
    +func init() {
    +	t["SwitchIpUnsetFault"] = reflect.TypeOf((*SwitchIpUnsetFault)(nil)).Elem()
    +}
    +
    +type SwitchNotInUpgradeMode struct {
    +	DvsFault
    +}
    +
    +func init() {
    +	t["SwitchNotInUpgradeMode"] = reflect.TypeOf((*SwitchNotInUpgradeMode)(nil)).Elem()
    +}
    +
    +type SwitchNotInUpgradeModeFault SwitchNotInUpgradeMode
    +
    +func init() {
    +	t["SwitchNotInUpgradeModeFault"] = reflect.TypeOf((*SwitchNotInUpgradeModeFault)(nil)).Elem()
    +}
    +
    +type SystemError struct {
    +	RuntimeFault
    +
    +	Reason string `xml:"reason"`
    +}
    +
    +func init() {
    +	t["SystemError"] = reflect.TypeOf((*SystemError)(nil)).Elem()
    +}
    +
    +type SystemErrorFault SystemError
    +
    +func init() {
    +	t["SystemErrorFault"] = reflect.TypeOf((*SystemErrorFault)(nil)).Elem()
    +}
    +
    +type SystemEventInfo struct {
    +	DynamicData
    +
    +	RecordId     int64  `xml:"recordId"`
    +	When         string `xml:"when"`
    +	SelType      int64  `xml:"selType"`
    +	Message      string `xml:"message"`
    +	SensorNumber int64  `xml:"sensorNumber"`
    +}
    +
    +func init() {
    +	t["SystemEventInfo"] = reflect.TypeOf((*SystemEventInfo)(nil)).Elem()
    +}
    +
    +type Tag struct {
    +	DynamicData
    +
    +	Key string `xml:"key"`
    +}
    +
    +func init() {
    +	t["Tag"] = reflect.TypeOf((*Tag)(nil)).Elem()
    +}
    +
    +type TaskDescription struct {
    +	DynamicData
    +
    +	MethodInfo []BaseElementDescription `xml:"methodInfo,typeattr"`
    +	State      []BaseElementDescription `xml:"state,typeattr"`
    +	Reason     []BaseTypeDescription    `xml:"reason,typeattr"`
    +}
    +
    +func init() {
    +	t["TaskDescription"] = reflect.TypeOf((*TaskDescription)(nil)).Elem()
    +}
    +
    +type TaskEvent struct {
    +	Event
    +
    +	Info TaskInfo `xml:"info"`
    +}
    +
    +func init() {
    +	t["TaskEvent"] = reflect.TypeOf((*TaskEvent)(nil)).Elem()
    +}
    +
    +type TaskFilterSpec struct {
    +	DynamicData
    +
    +	Entity        *TaskFilterSpecByEntity   `xml:"entity,omitempty"`
    +	Time          *TaskFilterSpecByTime     `xml:"time,omitempty"`
    +	UserName      *TaskFilterSpecByUsername `xml:"userName,omitempty"`
    +	ActivationId  []string                  `xml:"activationId,omitempty"`
    +	State         []TaskInfoState           `xml:"state,omitempty"`
    +	Alarm         *ManagedObjectReference   `xml:"alarm,omitempty"`
    +	ScheduledTask *ManagedObjectReference   `xml:"scheduledTask,omitempty"`
    +	EventChainId  []int32                   `xml:"eventChainId,omitempty"`
    +	Tag           []string                  `xml:"tag,omitempty"`
    +	ParentTaskKey []string                  `xml:"parentTaskKey,omitempty"`
    +	RootTaskKey   []string                  `xml:"rootTaskKey,omitempty"`
    +}
    +
    +func init() {
    +	t["TaskFilterSpec"] = reflect.TypeOf((*TaskFilterSpec)(nil)).Elem()
    +}
    +
    +type TaskFilterSpecByEntity struct {
    +	DynamicData
    +
    +	Entity    ManagedObjectReference        `xml:"entity"`
    +	Recursion TaskFilterSpecRecursionOption `xml:"recursion"`
    +}
    +
    +func init() {
    +	t["TaskFilterSpecByEntity"] = reflect.TypeOf((*TaskFilterSpecByEntity)(nil)).Elem()
    +}
    +
    +type TaskFilterSpecByTime struct {
    +	DynamicData
    +
    +	TimeType  TaskFilterSpecTimeOption `xml:"timeType"`
    +	BeginTime *time.Time               `xml:"beginTime"`
    +	EndTime   *time.Time               `xml:"endTime"`
    +}
    +
    +func init() {
    +	t["TaskFilterSpecByTime"] = reflect.TypeOf((*TaskFilterSpecByTime)(nil)).Elem()
    +}
    +
    +type TaskFilterSpecByUsername struct {
    +	DynamicData
    +
    +	SystemUser bool     `xml:"systemUser"`
    +	UserList   []string `xml:"userList,omitempty"`
    +}
    +
    +func init() {
    +	t["TaskFilterSpecByUsername"] = reflect.TypeOf((*TaskFilterSpecByUsername)(nil)).Elem()
    +}
    +
    +type TaskInProgress struct {
    +	VimFault
    +
    +	Task ManagedObjectReference `xml:"task"`
    +}
    +
    +func init() {
    +	t["TaskInProgress"] = reflect.TypeOf((*TaskInProgress)(nil)).Elem()
    +}
    +
    +type TaskInProgressFault BaseTaskInProgress
    +
    +func init() {
    +	t["TaskInProgressFault"] = reflect.TypeOf((*TaskInProgressFault)(nil)).Elem()
    +}
    +
    +type TaskInfo struct {
    +	DynamicData
    +
    +	Key           string                   `xml:"key"`
    +	Task          ManagedObjectReference   `xml:"task"`
    +	Description   *LocalizableMessage      `xml:"description,omitempty"`
    +	Name          string                   `xml:"name,omitempty"`
    +	DescriptionId string                   `xml:"descriptionId"`
    +	Entity        *ManagedObjectReference  `xml:"entity,omitempty"`
    +	EntityName    string                   `xml:"entityName,omitempty"`
    +	Locked        []ManagedObjectReference `xml:"locked,omitempty"`
    +	State         TaskInfoState            `xml:"state"`
    +	Cancelled     bool                     `xml:"cancelled"`
    +	Cancelable    bool                     `xml:"cancelable"`
    +	Error         *LocalizedMethodFault    `xml:"error,omitempty"`
    +	Result        AnyType                  `xml:"result,omitempty,typeattr"`
    +	Progress      int32                    `xml:"progress,omitempty"`
    +	Reason        BaseTaskReason           `xml:"reason,typeattr"`
    +	QueueTime     time.Time                `xml:"queueTime"`
    +	StartTime     *time.Time               `xml:"startTime"`
    +	CompleteTime  *time.Time               `xml:"completeTime"`
    +	EventChainId  int32                    `xml:"eventChainId"`
    +	ChangeTag     string                   `xml:"changeTag,omitempty"`
    +	ParentTaskKey string                   `xml:"parentTaskKey,omitempty"`
    +	RootTaskKey   string                   `xml:"rootTaskKey,omitempty"`
    +	ActivationId  string                   `xml:"activationId,omitempty"`
    +}
    +
    +func init() {
    +	t["TaskInfo"] = reflect.TypeOf((*TaskInfo)(nil)).Elem()
    +}
    +
    +type TaskReason struct {
    +	DynamicData
    +}
    +
    +func init() {
    +	t["TaskReason"] = reflect.TypeOf((*TaskReason)(nil)).Elem()
    +}
    +
    +type TaskReasonAlarm struct {
    +	TaskReason
    +
    +	AlarmName  string                 `xml:"alarmName"`
    +	Alarm      ManagedObjectReference `xml:"alarm"`
    +	EntityName string                 `xml:"entityName"`
    +	Entity     ManagedObjectReference `xml:"entity"`
    +}
    +
    +func init() {
    +	t["TaskReasonAlarm"] = reflect.TypeOf((*TaskReasonAlarm)(nil)).Elem()
    +}
    +
    +type TaskReasonSchedule struct {
    +	TaskReason
    +
    +	Name          string                 `xml:"name"`
    +	ScheduledTask ManagedObjectReference `xml:"scheduledTask"`
    +}
    +
    +func init() {
    +	t["TaskReasonSchedule"] = reflect.TypeOf((*TaskReasonSchedule)(nil)).Elem()
    +}
    +
    +type TaskReasonSystem struct {
    +	TaskReason
    +}
    +
    +func init() {
    +	t["TaskReasonSystem"] = reflect.TypeOf((*TaskReasonSystem)(nil)).Elem()
    +}
    +
    +type TaskReasonUser struct {
    +	TaskReason
    +
    +	UserName string `xml:"userName"`
    +}
    +
    +func init() {
    +	t["TaskReasonUser"] = reflect.TypeOf((*TaskReasonUser)(nil)).Elem()
    +}
    +
    +type TaskScheduler struct {
    +	DynamicData
    +
    +	ActiveTime *time.Time `xml:"activeTime"`
    +	ExpireTime *time.Time `xml:"expireTime"`
    +}
    +
    +func init() {
    +	t["TaskScheduler"] = reflect.TypeOf((*TaskScheduler)(nil)).Elem()
    +}
    +
    +type TaskTimeoutEvent struct {
    +	TaskEvent
    +}
    +
    +func init() {
    +	t["TaskTimeoutEvent"] = reflect.TypeOf((*TaskTimeoutEvent)(nil)).Elem()
    +}
    +
    +type TeamingMatchEvent struct {
    +	DvsHealthStatusChangeEvent
    +}
    +
    +func init() {
    +	t["TeamingMatchEvent"] = reflect.TypeOf((*TeamingMatchEvent)(nil)).Elem()
    +}
    +
    +type TeamingMisMatchEvent struct {
    +	DvsHealthStatusChangeEvent
    +}
    +
    +func init() {
    +	t["TeamingMisMatchEvent"] = reflect.TypeOf((*TeamingMisMatchEvent)(nil)).Elem()
    +}
    +
    +type TemplateBeingUpgradedEvent struct {
    +	TemplateUpgradeEvent
    +}
    +
    +func init() {
    +	t["TemplateBeingUpgradedEvent"] = reflect.TypeOf((*TemplateBeingUpgradedEvent)(nil)).Elem()
    +}
    +
    +type TemplateConfigFileInfo struct {
    +	VmConfigFileInfo
    +}
    +
    +func init() {
    +	t["TemplateConfigFileInfo"] = reflect.TypeOf((*TemplateConfigFileInfo)(nil)).Elem()
    +}
    +
    +type TemplateConfigFileQuery struct {
    +	VmConfigFileQuery
    +}
    +
    +func init() {
    +	t["TemplateConfigFileQuery"] = reflect.TypeOf((*TemplateConfigFileQuery)(nil)).Elem()
    +}
    +
    +type TemplateUpgradeEvent struct {
    +	Event
    +
    +	LegacyTemplate string `xml:"legacyTemplate"`
    +}
    +
    +func init() {
    +	t["TemplateUpgradeEvent"] = reflect.TypeOf((*TemplateUpgradeEvent)(nil)).Elem()
    +}
    +
    +type TemplateUpgradeFailedEvent struct {
    +	TemplateUpgradeEvent
    +
    +	Reason LocalizedMethodFault `xml:"reason"`
    +}
    +
    +func init() {
    +	t["TemplateUpgradeFailedEvent"] = reflect.TypeOf((*TemplateUpgradeFailedEvent)(nil)).Elem()
    +}
    +
    +type TemplateUpgradedEvent struct {
    +	TemplateUpgradeEvent
    +}
    +
    +func init() {
    +	t["TemplateUpgradedEvent"] = reflect.TypeOf((*TemplateUpgradedEvent)(nil)).Elem()
    +}
    +
    +type TerminateFaultTolerantVMRequestType struct {
    +	This ManagedObjectReference  `xml:"_this"`
    +	Vm   *ManagedObjectReference `xml:"vm,omitempty"`
    +}
    +
    +func init() {
    +	t["TerminateFaultTolerantVMRequestType"] = reflect.TypeOf((*TerminateFaultTolerantVMRequestType)(nil)).Elem()
    +}
    +
    +type TerminateFaultTolerantVM_Task TerminateFaultTolerantVMRequestType
    +
    +func init() {
    +	t["TerminateFaultTolerantVM_Task"] = reflect.TypeOf((*TerminateFaultTolerantVM_Task)(nil)).Elem()
    +}
    +
    +type TerminateFaultTolerantVM_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type TerminateProcessInGuest TerminateProcessInGuestRequestType
    +
    +func init() {
    +	t["TerminateProcessInGuest"] = reflect.TypeOf((*TerminateProcessInGuest)(nil)).Elem()
    +}
    +
    +type TerminateProcessInGuestRequestType struct {
    +	This ManagedObjectReference  `xml:"_this"`
    +	Vm   ManagedObjectReference  `xml:"vm"`
    +	Auth BaseGuestAuthentication `xml:"auth,typeattr"`
    +	Pid  int64                   `xml:"pid"`
    +}
    +
    +func init() {
    +	t["TerminateProcessInGuestRequestType"] = reflect.TypeOf((*TerminateProcessInGuestRequestType)(nil)).Elem()
    +}
    +
    +type TerminateProcessInGuestResponse struct {
    +}
    +
    +type TerminateSession TerminateSessionRequestType
    +
    +func init() {
    +	t["TerminateSession"] = reflect.TypeOf((*TerminateSession)(nil)).Elem()
    +}
    +
    +type TerminateSessionRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	SessionId []string               `xml:"sessionId"`
    +}
    +
    +func init() {
    +	t["TerminateSessionRequestType"] = reflect.TypeOf((*TerminateSessionRequestType)(nil)).Elem()
    +}
    +
    +type TerminateSessionResponse struct {
    +}
    +
    +type TerminateVM TerminateVMRequestType
    +
    +func init() {
    +	t["TerminateVM"] = reflect.TypeOf((*TerminateVM)(nil)).Elem()
    +}
    +
    +type TerminateVMRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["TerminateVMRequestType"] = reflect.TypeOf((*TerminateVMRequestType)(nil)).Elem()
    +}
    +
    +type TerminateVMResponse struct {
    +}
    +
    +type ThirdPartyLicenseAssignmentFailed struct {
    +	RuntimeFault
    +
    +	Host   ManagedObjectReference `xml:"host"`
    +	Module string                 `xml:"module"`
    +	Reason string                 `xml:"reason,omitempty"`
    +}
    +
    +func init() {
    +	t["ThirdPartyLicenseAssignmentFailed"] = reflect.TypeOf((*ThirdPartyLicenseAssignmentFailed)(nil)).Elem()
    +}
    +
    +type ThirdPartyLicenseAssignmentFailedFault ThirdPartyLicenseAssignmentFailed
    +
    +func init() {
    +	t["ThirdPartyLicenseAssignmentFailedFault"] = reflect.TypeOf((*ThirdPartyLicenseAssignmentFailedFault)(nil)).Elem()
    +}
    +
    +type TicketedSessionAuthentication struct {
    +	GuestAuthentication
    +
    +	Ticket string `xml:"ticket"`
    +}
    +
    +func init() {
    +	t["TicketedSessionAuthentication"] = reflect.TypeOf((*TicketedSessionAuthentication)(nil)).Elem()
    +}
    +
    +type TimedOutHostOperationEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["TimedOutHostOperationEvent"] = reflect.TypeOf((*TimedOutHostOperationEvent)(nil)).Elem()
    +}
    +
    +type Timedout struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["Timedout"] = reflect.TypeOf((*Timedout)(nil)).Elem()
    +}
    +
    +type TimedoutFault BaseTimedout
    +
    +func init() {
    +	t["TimedoutFault"] = reflect.TypeOf((*TimedoutFault)(nil)).Elem()
    +}
    +
    +type TooManyConcurrentNativeClones struct {
    +	FileFault
    +}
    +
    +func init() {
    +	t["TooManyConcurrentNativeClones"] = reflect.TypeOf((*TooManyConcurrentNativeClones)(nil)).Elem()
    +}
    +
    +type TooManyConcurrentNativeClonesFault TooManyConcurrentNativeClones
    +
    +func init() {
    +	t["TooManyConcurrentNativeClonesFault"] = reflect.TypeOf((*TooManyConcurrentNativeClonesFault)(nil)).Elem()
    +}
    +
    +type TooManyConsecutiveOverrides struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["TooManyConsecutiveOverrides"] = reflect.TypeOf((*TooManyConsecutiveOverrides)(nil)).Elem()
    +}
    +
    +type TooManyConsecutiveOverridesFault TooManyConsecutiveOverrides
    +
    +func init() {
    +	t["TooManyConsecutiveOverridesFault"] = reflect.TypeOf((*TooManyConsecutiveOverridesFault)(nil)).Elem()
    +}
    +
    +type TooManyDevices struct {
    +	InvalidVmConfig
    +}
    +
    +func init() {
    +	t["TooManyDevices"] = reflect.TypeOf((*TooManyDevices)(nil)).Elem()
    +}
    +
    +type TooManyDevicesFault TooManyDevices
    +
    +func init() {
    +	t["TooManyDevicesFault"] = reflect.TypeOf((*TooManyDevicesFault)(nil)).Elem()
    +}
    +
    +type TooManyDisksOnLegacyHost struct {
    +	MigrationFault
    +
    +	DiskCount     int32 `xml:"diskCount"`
    +	TimeoutDanger bool  `xml:"timeoutDanger"`
    +}
    +
    +func init() {
    +	t["TooManyDisksOnLegacyHost"] = reflect.TypeOf((*TooManyDisksOnLegacyHost)(nil)).Elem()
    +}
    +
    +type TooManyDisksOnLegacyHostFault TooManyDisksOnLegacyHost
    +
    +func init() {
    +	t["TooManyDisksOnLegacyHostFault"] = reflect.TypeOf((*TooManyDisksOnLegacyHostFault)(nil)).Elem()
    +}
    +
    +type TooManyGuestLogons struct {
    +	GuestOperationsFault
    +}
    +
    +func init() {
    +	t["TooManyGuestLogons"] = reflect.TypeOf((*TooManyGuestLogons)(nil)).Elem()
    +}
    +
    +type TooManyGuestLogonsFault TooManyGuestLogons
    +
    +func init() {
    +	t["TooManyGuestLogonsFault"] = reflect.TypeOf((*TooManyGuestLogonsFault)(nil)).Elem()
    +}
    +
    +type TooManyHosts struct {
    +	HostConnectFault
    +}
    +
    +func init() {
    +	t["TooManyHosts"] = reflect.TypeOf((*TooManyHosts)(nil)).Elem()
    +}
    +
    +type TooManyHostsFault TooManyHosts
    +
    +func init() {
    +	t["TooManyHostsFault"] = reflect.TypeOf((*TooManyHostsFault)(nil)).Elem()
    +}
    +
    +type TooManyNativeCloneLevels struct {
    +	FileFault
    +}
    +
    +func init() {
    +	t["TooManyNativeCloneLevels"] = reflect.TypeOf((*TooManyNativeCloneLevels)(nil)).Elem()
    +}
    +
    +type TooManyNativeCloneLevelsFault TooManyNativeCloneLevels
    +
    +func init() {
    +	t["TooManyNativeCloneLevelsFault"] = reflect.TypeOf((*TooManyNativeCloneLevelsFault)(nil)).Elem()
    +}
    +
    +type TooManyNativeClonesOnFile struct {
    +	FileFault
    +}
    +
    +func init() {
    +	t["TooManyNativeClonesOnFile"] = reflect.TypeOf((*TooManyNativeClonesOnFile)(nil)).Elem()
    +}
    +
    +type TooManyNativeClonesOnFileFault TooManyNativeClonesOnFile
    +
    +func init() {
    +	t["TooManyNativeClonesOnFileFault"] = reflect.TypeOf((*TooManyNativeClonesOnFileFault)(nil)).Elem()
    +}
    +
    +type TooManySnapshotLevels struct {
    +	SnapshotFault
    +}
    +
    +func init() {
    +	t["TooManySnapshotLevels"] = reflect.TypeOf((*TooManySnapshotLevels)(nil)).Elem()
    +}
    +
    +type TooManySnapshotLevelsFault TooManySnapshotLevels
    +
    +func init() {
    +	t["TooManySnapshotLevelsFault"] = reflect.TypeOf((*TooManySnapshotLevelsFault)(nil)).Elem()
    +}
    +
    +type ToolsAlreadyUpgraded struct {
    +	VmToolsUpgradeFault
    +}
    +
    +func init() {
    +	t["ToolsAlreadyUpgraded"] = reflect.TypeOf((*ToolsAlreadyUpgraded)(nil)).Elem()
    +}
    +
    +type ToolsAlreadyUpgradedFault ToolsAlreadyUpgraded
    +
    +func init() {
    +	t["ToolsAlreadyUpgradedFault"] = reflect.TypeOf((*ToolsAlreadyUpgradedFault)(nil)).Elem()
    +}
    +
    +type ToolsAutoUpgradeNotSupported struct {
    +	VmToolsUpgradeFault
    +}
    +
    +func init() {
    +	t["ToolsAutoUpgradeNotSupported"] = reflect.TypeOf((*ToolsAutoUpgradeNotSupported)(nil)).Elem()
    +}
    +
    +type ToolsAutoUpgradeNotSupportedFault ToolsAutoUpgradeNotSupported
    +
    +func init() {
    +	t["ToolsAutoUpgradeNotSupportedFault"] = reflect.TypeOf((*ToolsAutoUpgradeNotSupportedFault)(nil)).Elem()
    +}
    +
    +type ToolsConfigInfo struct {
    +	DynamicData
    +
    +	ToolsVersion         int32                                `xml:"toolsVersion,omitempty"`
    +	ToolsInstallType     string                               `xml:"toolsInstallType,omitempty"`
    +	AfterPowerOn         *bool                                `xml:"afterPowerOn"`
    +	AfterResume          *bool                                `xml:"afterResume"`
    +	BeforeGuestStandby   *bool                                `xml:"beforeGuestStandby"`
    +	BeforeGuestShutdown  *bool                                `xml:"beforeGuestShutdown"`
    +	BeforeGuestReboot    *bool                                `xml:"beforeGuestReboot"`
    +	ToolsUpgradePolicy   string                               `xml:"toolsUpgradePolicy,omitempty"`
    +	PendingCustomization string                               `xml:"pendingCustomization,omitempty"`
    +	CustomizationKeyId   *CryptoKeyId                         `xml:"customizationKeyId,omitempty"`
    +	SyncTimeWithHost     *bool                                `xml:"syncTimeWithHost"`
    +	LastInstallInfo      *ToolsConfigInfoToolsLastInstallInfo `xml:"lastInstallInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["ToolsConfigInfo"] = reflect.TypeOf((*ToolsConfigInfo)(nil)).Elem()
    +}
    +
    +type ToolsConfigInfoToolsLastInstallInfo struct {
    +	DynamicData
    +
    +	Counter int32                 `xml:"counter"`
    +	Fault   *LocalizedMethodFault `xml:"fault,omitempty"`
    +}
    +
    +func init() {
    +	t["ToolsConfigInfoToolsLastInstallInfo"] = reflect.TypeOf((*ToolsConfigInfoToolsLastInstallInfo)(nil)).Elem()
    +}
    +
    +type ToolsImageCopyFailed struct {
    +	VmToolsUpgradeFault
    +}
    +
    +func init() {
    +	t["ToolsImageCopyFailed"] = reflect.TypeOf((*ToolsImageCopyFailed)(nil)).Elem()
    +}
    +
    +type ToolsImageCopyFailedFault ToolsImageCopyFailed
    +
    +func init() {
    +	t["ToolsImageCopyFailedFault"] = reflect.TypeOf((*ToolsImageCopyFailedFault)(nil)).Elem()
    +}
    +
    +type ToolsImageNotAvailable struct {
    +	VmToolsUpgradeFault
    +}
    +
    +func init() {
    +	t["ToolsImageNotAvailable"] = reflect.TypeOf((*ToolsImageNotAvailable)(nil)).Elem()
    +}
    +
    +type ToolsImageNotAvailableFault ToolsImageNotAvailable
    +
    +func init() {
    +	t["ToolsImageNotAvailableFault"] = reflect.TypeOf((*ToolsImageNotAvailableFault)(nil)).Elem()
    +}
    +
    +type ToolsImageSignatureCheckFailed struct {
    +	VmToolsUpgradeFault
    +}
    +
    +func init() {
    +	t["ToolsImageSignatureCheckFailed"] = reflect.TypeOf((*ToolsImageSignatureCheckFailed)(nil)).Elem()
    +}
    +
    +type ToolsImageSignatureCheckFailedFault ToolsImageSignatureCheckFailed
    +
    +func init() {
    +	t["ToolsImageSignatureCheckFailedFault"] = reflect.TypeOf((*ToolsImageSignatureCheckFailedFault)(nil)).Elem()
    +}
    +
    +type ToolsInstallationInProgress struct {
    +	MigrationFault
    +}
    +
    +func init() {
    +	t["ToolsInstallationInProgress"] = reflect.TypeOf((*ToolsInstallationInProgress)(nil)).Elem()
    +}
    +
    +type ToolsInstallationInProgressFault ToolsInstallationInProgress
    +
    +func init() {
    +	t["ToolsInstallationInProgressFault"] = reflect.TypeOf((*ToolsInstallationInProgressFault)(nil)).Elem()
    +}
    +
    +type ToolsUnavailable struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["ToolsUnavailable"] = reflect.TypeOf((*ToolsUnavailable)(nil)).Elem()
    +}
    +
    +type ToolsUnavailableFault ToolsUnavailable
    +
    +func init() {
    +	t["ToolsUnavailableFault"] = reflect.TypeOf((*ToolsUnavailableFault)(nil)).Elem()
    +}
    +
    +type ToolsUpgradeCancelled struct {
    +	VmToolsUpgradeFault
    +}
    +
    +func init() {
    +	t["ToolsUpgradeCancelled"] = reflect.TypeOf((*ToolsUpgradeCancelled)(nil)).Elem()
    +}
    +
    +type ToolsUpgradeCancelledFault ToolsUpgradeCancelled
    +
    +func init() {
    +	t["ToolsUpgradeCancelledFault"] = reflect.TypeOf((*ToolsUpgradeCancelledFault)(nil)).Elem()
    +}
    +
    +type TraversalSpec struct {
    +	SelectionSpec
    +
    +	Type      string              `xml:"type"`
    +	Path      string              `xml:"path"`
    +	Skip      *bool               `xml:"skip"`
    +	SelectSet []BaseSelectionSpec `xml:"selectSet,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["TraversalSpec"] = reflect.TypeOf((*TraversalSpec)(nil)).Elem()
    +}
    +
    +type TurnDiskLocatorLedOffRequestType struct {
    +	This          ManagedObjectReference `xml:"_this"`
    +	ScsiDiskUuids []string               `xml:"scsiDiskUuids"`
    +}
    +
    +func init() {
    +	t["TurnDiskLocatorLedOffRequestType"] = reflect.TypeOf((*TurnDiskLocatorLedOffRequestType)(nil)).Elem()
    +}
    +
    +type TurnDiskLocatorLedOff_Task TurnDiskLocatorLedOffRequestType
    +
    +func init() {
    +	t["TurnDiskLocatorLedOff_Task"] = reflect.TypeOf((*TurnDiskLocatorLedOff_Task)(nil)).Elem()
    +}
    +
    +type TurnDiskLocatorLedOff_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type TurnDiskLocatorLedOnRequestType struct {
    +	This          ManagedObjectReference `xml:"_this"`
    +	ScsiDiskUuids []string               `xml:"scsiDiskUuids"`
    +}
    +
    +func init() {
    +	t["TurnDiskLocatorLedOnRequestType"] = reflect.TypeOf((*TurnDiskLocatorLedOnRequestType)(nil)).Elem()
    +}
    +
    +type TurnDiskLocatorLedOn_Task TurnDiskLocatorLedOnRequestType
    +
    +func init() {
    +	t["TurnDiskLocatorLedOn_Task"] = reflect.TypeOf((*TurnDiskLocatorLedOn_Task)(nil)).Elem()
    +}
    +
    +type TurnDiskLocatorLedOn_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type TurnOffFaultToleranceForVMRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["TurnOffFaultToleranceForVMRequestType"] = reflect.TypeOf((*TurnOffFaultToleranceForVMRequestType)(nil)).Elem()
    +}
    +
    +type TurnOffFaultToleranceForVM_Task TurnOffFaultToleranceForVMRequestType
    +
    +func init() {
    +	t["TurnOffFaultToleranceForVM_Task"] = reflect.TypeOf((*TurnOffFaultToleranceForVM_Task)(nil)).Elem()
    +}
    +
    +type TurnOffFaultToleranceForVM_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type TypeDescription struct {
    +	Description
    +
    +	Key string `xml:"key"`
    +}
    +
    +func init() {
    +	t["TypeDescription"] = reflect.TypeOf((*TypeDescription)(nil)).Elem()
    +}
    +
    +type UnSupportedDatastoreForVFlash struct {
    +	UnsupportedDatastore
    +
    +	DatastoreName string `xml:"datastoreName"`
    +	Type          string `xml:"type"`
    +}
    +
    +func init() {
    +	t["UnSupportedDatastoreForVFlash"] = reflect.TypeOf((*UnSupportedDatastoreForVFlash)(nil)).Elem()
    +}
    +
    +type UnSupportedDatastoreForVFlashFault UnSupportedDatastoreForVFlash
    +
    +func init() {
    +	t["UnSupportedDatastoreForVFlashFault"] = reflect.TypeOf((*UnSupportedDatastoreForVFlashFault)(nil)).Elem()
    +}
    +
    +type UnassignUserFromGroup UnassignUserFromGroupRequestType
    +
    +func init() {
    +	t["UnassignUserFromGroup"] = reflect.TypeOf((*UnassignUserFromGroup)(nil)).Elem()
    +}
    +
    +type UnassignUserFromGroupRequestType struct {
    +	This  ManagedObjectReference `xml:"_this"`
    +	User  string                 `xml:"user"`
    +	Group string                 `xml:"group"`
    +}
    +
    +func init() {
    +	t["UnassignUserFromGroupRequestType"] = reflect.TypeOf((*UnassignUserFromGroupRequestType)(nil)).Elem()
    +}
    +
    +type UnassignUserFromGroupResponse struct {
    +}
    +
    +type UnbindVnic UnbindVnicRequestType
    +
    +func init() {
    +	t["UnbindVnic"] = reflect.TypeOf((*UnbindVnic)(nil)).Elem()
    +}
    +
    +type UnbindVnicRequestType struct {
    +	This         ManagedObjectReference `xml:"_this"`
    +	IScsiHbaName string                 `xml:"iScsiHbaName"`
    +	VnicDevice   string                 `xml:"vnicDevice"`
    +	Force        bool                   `xml:"force"`
    +}
    +
    +func init() {
    +	t["UnbindVnicRequestType"] = reflect.TypeOf((*UnbindVnicRequestType)(nil)).Elem()
    +}
    +
    +type UnbindVnicResponse struct {
    +}
    +
    +type UncommittedUndoableDisk struct {
    +	MigrationFault
    +}
    +
    +func init() {
    +	t["UncommittedUndoableDisk"] = reflect.TypeOf((*UncommittedUndoableDisk)(nil)).Elem()
    +}
    +
    +type UncommittedUndoableDiskFault UncommittedUndoableDisk
    +
    +func init() {
    +	t["UncommittedUndoableDiskFault"] = reflect.TypeOf((*UncommittedUndoableDiskFault)(nil)).Elem()
    +}
    +
    +type UnconfiguredPropertyValue struct {
    +	InvalidPropertyValue
    +}
    +
    +func init() {
    +	t["UnconfiguredPropertyValue"] = reflect.TypeOf((*UnconfiguredPropertyValue)(nil)).Elem()
    +}
    +
    +type UnconfiguredPropertyValueFault UnconfiguredPropertyValue
    +
    +func init() {
    +	t["UnconfiguredPropertyValueFault"] = reflect.TypeOf((*UnconfiguredPropertyValueFault)(nil)).Elem()
    +}
    +
    +type UncustomizableGuest struct {
    +	CustomizationFault
    +
    +	UncustomizableGuestOS string `xml:"uncustomizableGuestOS"`
    +}
    +
    +func init() {
    +	t["UncustomizableGuest"] = reflect.TypeOf((*UncustomizableGuest)(nil)).Elem()
    +}
    +
    +type UncustomizableGuestFault UncustomizableGuest
    +
    +func init() {
    +	t["UncustomizableGuestFault"] = reflect.TypeOf((*UncustomizableGuestFault)(nil)).Elem()
    +}
    +
    +type UnexpectedCustomizationFault struct {
    +	CustomizationFault
    +}
    +
    +func init() {
    +	t["UnexpectedCustomizationFault"] = reflect.TypeOf((*UnexpectedCustomizationFault)(nil)).Elem()
    +}
    +
    +type UnexpectedCustomizationFaultFault UnexpectedCustomizationFault
    +
    +func init() {
    +	t["UnexpectedCustomizationFaultFault"] = reflect.TypeOf((*UnexpectedCustomizationFaultFault)(nil)).Elem()
    +}
    +
    +type UnexpectedFault struct {
    +	RuntimeFault
    +
    +	FaultName string                `xml:"faultName"`
    +	Fault     *LocalizedMethodFault `xml:"fault,omitempty"`
    +}
    +
    +func init() {
    +	t["UnexpectedFault"] = reflect.TypeOf((*UnexpectedFault)(nil)).Elem()
    +}
    +
    +type UnexpectedFaultFault UnexpectedFault
    +
    +func init() {
    +	t["UnexpectedFaultFault"] = reflect.TypeOf((*UnexpectedFaultFault)(nil)).Elem()
    +}
    +
    +type UninstallHostPatchRequestType struct {
    +	This        ManagedObjectReference                     `xml:"_this"`
    +	BulletinIds []string                                   `xml:"bulletinIds,omitempty"`
    +	Spec        *HostPatchManagerPatchManagerOperationSpec `xml:"spec,omitempty"`
    +}
    +
    +func init() {
    +	t["UninstallHostPatchRequestType"] = reflect.TypeOf((*UninstallHostPatchRequestType)(nil)).Elem()
    +}
    +
    +type UninstallHostPatch_Task UninstallHostPatchRequestType
    +
    +func init() {
    +	t["UninstallHostPatch_Task"] = reflect.TypeOf((*UninstallHostPatch_Task)(nil)).Elem()
    +}
    +
    +type UninstallHostPatch_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type UninstallIoFilterRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	FilterId string                 `xml:"filterId"`
    +	CompRes  ManagedObjectReference `xml:"compRes"`
    +}
    +
    +func init() {
    +	t["UninstallIoFilterRequestType"] = reflect.TypeOf((*UninstallIoFilterRequestType)(nil)).Elem()
    +}
    +
    +type UninstallIoFilter_Task UninstallIoFilterRequestType
    +
    +func init() {
    +	t["UninstallIoFilter_Task"] = reflect.TypeOf((*UninstallIoFilter_Task)(nil)).Elem()
    +}
    +
    +type UninstallIoFilter_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type UninstallService UninstallServiceRequestType
    +
    +func init() {
    +	t["UninstallService"] = reflect.TypeOf((*UninstallService)(nil)).Elem()
    +}
    +
    +type UninstallServiceRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Id   string                 `xml:"id"`
    +}
    +
    +func init() {
    +	t["UninstallServiceRequestType"] = reflect.TypeOf((*UninstallServiceRequestType)(nil)).Elem()
    +}
    +
    +type UninstallServiceResponse struct {
    +}
    +
    +type UnlicensedVirtualMachinesEvent struct {
    +	LicenseEvent
    +
    +	Unlicensed int32 `xml:"unlicensed"`
    +	Available  int32 `xml:"available"`
    +}
    +
    +func init() {
    +	t["UnlicensedVirtualMachinesEvent"] = reflect.TypeOf((*UnlicensedVirtualMachinesEvent)(nil)).Elem()
    +}
    +
    +type UnlicensedVirtualMachinesFoundEvent struct {
    +	LicenseEvent
    +
    +	Available int32 `xml:"available"`
    +}
    +
    +func init() {
    +	t["UnlicensedVirtualMachinesFoundEvent"] = reflect.TypeOf((*UnlicensedVirtualMachinesFoundEvent)(nil)).Elem()
    +}
    +
    +type UnmapVmfsVolumeExRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	VmfsUuid []string               `xml:"vmfsUuid"`
    +}
    +
    +func init() {
    +	t["UnmapVmfsVolumeExRequestType"] = reflect.TypeOf((*UnmapVmfsVolumeExRequestType)(nil)).Elem()
    +}
    +
    +type UnmapVmfsVolumeEx_Task UnmapVmfsVolumeExRequestType
    +
    +func init() {
    +	t["UnmapVmfsVolumeEx_Task"] = reflect.TypeOf((*UnmapVmfsVolumeEx_Task)(nil)).Elem()
    +}
    +
    +type UnmapVmfsVolumeEx_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type UnmountDiskMappingRequestType struct {
    +	This    ManagedObjectReference `xml:"_this"`
    +	Mapping []VsanHostDiskMapping  `xml:"mapping"`
    +}
    +
    +func init() {
    +	t["UnmountDiskMappingRequestType"] = reflect.TypeOf((*UnmountDiskMappingRequestType)(nil)).Elem()
    +}
    +
    +type UnmountDiskMapping_Task UnmountDiskMappingRequestType
    +
    +func init() {
    +	t["UnmountDiskMapping_Task"] = reflect.TypeOf((*UnmountDiskMapping_Task)(nil)).Elem()
    +}
    +
    +type UnmountDiskMapping_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type UnmountForceMountedVmfsVolume UnmountForceMountedVmfsVolumeRequestType
    +
    +func init() {
    +	t["UnmountForceMountedVmfsVolume"] = reflect.TypeOf((*UnmountForceMountedVmfsVolume)(nil)).Elem()
    +}
    +
    +type UnmountForceMountedVmfsVolumeRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	VmfsUuid string                 `xml:"vmfsUuid"`
    +}
    +
    +func init() {
    +	t["UnmountForceMountedVmfsVolumeRequestType"] = reflect.TypeOf((*UnmountForceMountedVmfsVolumeRequestType)(nil)).Elem()
    +}
    +
    +type UnmountForceMountedVmfsVolumeResponse struct {
    +}
    +
    +type UnmountToolsInstaller UnmountToolsInstallerRequestType
    +
    +func init() {
    +	t["UnmountToolsInstaller"] = reflect.TypeOf((*UnmountToolsInstaller)(nil)).Elem()
    +}
    +
    +type UnmountToolsInstallerRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["UnmountToolsInstallerRequestType"] = reflect.TypeOf((*UnmountToolsInstallerRequestType)(nil)).Elem()
    +}
    +
    +type UnmountToolsInstallerResponse struct {
    +}
    +
    +type UnmountVffsVolume UnmountVffsVolumeRequestType
    +
    +func init() {
    +	t["UnmountVffsVolume"] = reflect.TypeOf((*UnmountVffsVolume)(nil)).Elem()
    +}
    +
    +type UnmountVffsVolumeRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	VffsUuid string                 `xml:"vffsUuid"`
    +}
    +
    +func init() {
    +	t["UnmountVffsVolumeRequestType"] = reflect.TypeOf((*UnmountVffsVolumeRequestType)(nil)).Elem()
    +}
    +
    +type UnmountVffsVolumeResponse struct {
    +}
    +
    +type UnmountVmfsVolume UnmountVmfsVolumeRequestType
    +
    +func init() {
    +	t["UnmountVmfsVolume"] = reflect.TypeOf((*UnmountVmfsVolume)(nil)).Elem()
    +}
    +
    +type UnmountVmfsVolumeExRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	VmfsUuid []string               `xml:"vmfsUuid"`
    +}
    +
    +func init() {
    +	t["UnmountVmfsVolumeExRequestType"] = reflect.TypeOf((*UnmountVmfsVolumeExRequestType)(nil)).Elem()
    +}
    +
    +type UnmountVmfsVolumeEx_Task UnmountVmfsVolumeExRequestType
    +
    +func init() {
    +	t["UnmountVmfsVolumeEx_Task"] = reflect.TypeOf((*UnmountVmfsVolumeEx_Task)(nil)).Elem()
    +}
    +
    +type UnmountVmfsVolumeEx_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type UnmountVmfsVolumeRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	VmfsUuid string                 `xml:"vmfsUuid"`
    +}
    +
    +func init() {
    +	t["UnmountVmfsVolumeRequestType"] = reflect.TypeOf((*UnmountVmfsVolumeRequestType)(nil)).Elem()
    +}
    +
    +type UnmountVmfsVolumeResponse struct {
    +}
    +
    +type UnrecognizedHost struct {
    +	VimFault
    +
    +	HostName string `xml:"hostName"`
    +}
    +
    +func init() {
    +	t["UnrecognizedHost"] = reflect.TypeOf((*UnrecognizedHost)(nil)).Elem()
    +}
    +
    +type UnrecognizedHostFault UnrecognizedHost
    +
    +func init() {
    +	t["UnrecognizedHostFault"] = reflect.TypeOf((*UnrecognizedHostFault)(nil)).Elem()
    +}
    +
    +type UnregisterAndDestroyRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["UnregisterAndDestroyRequestType"] = reflect.TypeOf((*UnregisterAndDestroyRequestType)(nil)).Elem()
    +}
    +
    +type UnregisterAndDestroy_Task UnregisterAndDestroyRequestType
    +
    +func init() {
    +	t["UnregisterAndDestroy_Task"] = reflect.TypeOf((*UnregisterAndDestroy_Task)(nil)).Elem()
    +}
    +
    +type UnregisterAndDestroy_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type UnregisterExtension UnregisterExtensionRequestType
    +
    +func init() {
    +	t["UnregisterExtension"] = reflect.TypeOf((*UnregisterExtension)(nil)).Elem()
    +}
    +
    +type UnregisterExtensionRequestType struct {
    +	This         ManagedObjectReference `xml:"_this"`
    +	ExtensionKey string                 `xml:"extensionKey"`
    +}
    +
    +func init() {
    +	t["UnregisterExtensionRequestType"] = reflect.TypeOf((*UnregisterExtensionRequestType)(nil)).Elem()
    +}
    +
    +type UnregisterExtensionResponse struct {
    +}
    +
    +type UnregisterHealthUpdateProvider UnregisterHealthUpdateProviderRequestType
    +
    +func init() {
    +	t["UnregisterHealthUpdateProvider"] = reflect.TypeOf((*UnregisterHealthUpdateProvider)(nil)).Elem()
    +}
    +
    +type UnregisterHealthUpdateProviderRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	ProviderId string                 `xml:"providerId"`
    +}
    +
    +func init() {
    +	t["UnregisterHealthUpdateProviderRequestType"] = reflect.TypeOf((*UnregisterHealthUpdateProviderRequestType)(nil)).Elem()
    +}
    +
    +type UnregisterHealthUpdateProviderResponse struct {
    +}
    +
    +type UnregisterVM UnregisterVMRequestType
    +
    +func init() {
    +	t["UnregisterVM"] = reflect.TypeOf((*UnregisterVM)(nil)).Elem()
    +}
    +
    +type UnregisterVMRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["UnregisterVMRequestType"] = reflect.TypeOf((*UnregisterVMRequestType)(nil)).Elem()
    +}
    +
    +type UnregisterVMResponse struct {
    +}
    +
    +type UnsharedSwapVMotionNotSupported struct {
    +	MigrationFeatureNotSupported
    +}
    +
    +func init() {
    +	t["UnsharedSwapVMotionNotSupported"] = reflect.TypeOf((*UnsharedSwapVMotionNotSupported)(nil)).Elem()
    +}
    +
    +type UnsharedSwapVMotionNotSupportedFault UnsharedSwapVMotionNotSupported
    +
    +func init() {
    +	t["UnsharedSwapVMotionNotSupportedFault"] = reflect.TypeOf((*UnsharedSwapVMotionNotSupportedFault)(nil)).Elem()
    +}
    +
    +type UnsupportedDatastore struct {
    +	VmConfigFault
    +
    +	Datastore *ManagedObjectReference `xml:"datastore,omitempty"`
    +}
    +
    +func init() {
    +	t["UnsupportedDatastore"] = reflect.TypeOf((*UnsupportedDatastore)(nil)).Elem()
    +}
    +
    +type UnsupportedDatastoreFault BaseUnsupportedDatastore
    +
    +func init() {
    +	t["UnsupportedDatastoreFault"] = reflect.TypeOf((*UnsupportedDatastoreFault)(nil)).Elem()
    +}
    +
    +type UnsupportedGuest struct {
    +	InvalidVmConfig
    +
    +	UnsupportedGuestOS string `xml:"unsupportedGuestOS"`
    +}
    +
    +func init() {
    +	t["UnsupportedGuest"] = reflect.TypeOf((*UnsupportedGuest)(nil)).Elem()
    +}
    +
    +type UnsupportedGuestFault UnsupportedGuest
    +
    +func init() {
    +	t["UnsupportedGuestFault"] = reflect.TypeOf((*UnsupportedGuestFault)(nil)).Elem()
    +}
    +
    +type UnsupportedVimApiVersion struct {
    +	VimFault
    +
    +	Version string `xml:"version,omitempty"`
    +}
    +
    +func init() {
    +	t["UnsupportedVimApiVersion"] = reflect.TypeOf((*UnsupportedVimApiVersion)(nil)).Elem()
    +}
    +
    +type UnsupportedVimApiVersionFault UnsupportedVimApiVersion
    +
    +func init() {
    +	t["UnsupportedVimApiVersionFault"] = reflect.TypeOf((*UnsupportedVimApiVersionFault)(nil)).Elem()
    +}
    +
    +type UnsupportedVmxLocation struct {
    +	VmConfigFault
    +}
    +
    +func init() {
    +	t["UnsupportedVmxLocation"] = reflect.TypeOf((*UnsupportedVmxLocation)(nil)).Elem()
    +}
    +
    +type UnsupportedVmxLocationFault UnsupportedVmxLocation
    +
    +func init() {
    +	t["UnsupportedVmxLocationFault"] = reflect.TypeOf((*UnsupportedVmxLocationFault)(nil)).Elem()
    +}
    +
    +type UnusedVirtualDiskBlocksNotScrubbed struct {
    +	DeviceBackingNotSupported
    +}
    +
    +func init() {
    +	t["UnusedVirtualDiskBlocksNotScrubbed"] = reflect.TypeOf((*UnusedVirtualDiskBlocksNotScrubbed)(nil)).Elem()
    +}
    +
    +type UnusedVirtualDiskBlocksNotScrubbedFault UnusedVirtualDiskBlocksNotScrubbed
    +
    +func init() {
    +	t["UnusedVirtualDiskBlocksNotScrubbedFault"] = reflect.TypeOf((*UnusedVirtualDiskBlocksNotScrubbedFault)(nil)).Elem()
    +}
    +
    +type UpdateAnswerFileRequestType struct {
    +	This       ManagedObjectReference   `xml:"_this"`
    +	Host       ManagedObjectReference   `xml:"host"`
    +	ConfigSpec BaseAnswerFileCreateSpec `xml:"configSpec,typeattr"`
    +}
    +
    +func init() {
    +	t["UpdateAnswerFileRequestType"] = reflect.TypeOf((*UpdateAnswerFileRequestType)(nil)).Elem()
    +}
    +
    +type UpdateAnswerFile_Task UpdateAnswerFileRequestType
    +
    +func init() {
    +	t["UpdateAnswerFile_Task"] = reflect.TypeOf((*UpdateAnswerFile_Task)(nil)).Elem()
    +}
    +
    +type UpdateAnswerFile_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type UpdateAssignedLicense UpdateAssignedLicenseRequestType
    +
    +func init() {
    +	t["UpdateAssignedLicense"] = reflect.TypeOf((*UpdateAssignedLicense)(nil)).Elem()
    +}
    +
    +type UpdateAssignedLicenseRequestType struct {
    +	This              ManagedObjectReference `xml:"_this"`
    +	Entity            string                 `xml:"entity"`
    +	LicenseKey        string                 `xml:"licenseKey"`
    +	EntityDisplayName string                 `xml:"entityDisplayName,omitempty"`
    +}
    +
    +func init() {
    +	t["UpdateAssignedLicenseRequestType"] = reflect.TypeOf((*UpdateAssignedLicenseRequestType)(nil)).Elem()
    +}
    +
    +type UpdateAssignedLicenseResponse struct {
    +	Returnval LicenseManagerLicenseInfo `xml:"returnval"`
    +}
    +
    +type UpdateAuthorizationRole UpdateAuthorizationRoleRequestType
    +
    +func init() {
    +	t["UpdateAuthorizationRole"] = reflect.TypeOf((*UpdateAuthorizationRole)(nil)).Elem()
    +}
    +
    +type UpdateAuthorizationRoleRequestType struct {
    +	This    ManagedObjectReference `xml:"_this"`
    +	RoleId  int32                  `xml:"roleId"`
    +	NewName string                 `xml:"newName"`
    +	PrivIds []string               `xml:"privIds,omitempty"`
    +}
    +
    +func init() {
    +	t["UpdateAuthorizationRoleRequestType"] = reflect.TypeOf((*UpdateAuthorizationRoleRequestType)(nil)).Elem()
    +}
    +
    +type UpdateAuthorizationRoleResponse struct {
    +}
    +
    +type UpdateBootDevice UpdateBootDeviceRequestType
    +
    +func init() {
    +	t["UpdateBootDevice"] = reflect.TypeOf((*UpdateBootDevice)(nil)).Elem()
    +}
    +
    +type UpdateBootDeviceRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Key  string                 `xml:"key"`
    +}
    +
    +func init() {
    +	t["UpdateBootDeviceRequestType"] = reflect.TypeOf((*UpdateBootDeviceRequestType)(nil)).Elem()
    +}
    +
    +type UpdateBootDeviceResponse struct {
    +}
    +
    +type UpdateChildResourceConfiguration UpdateChildResourceConfigurationRequestType
    +
    +func init() {
    +	t["UpdateChildResourceConfiguration"] = reflect.TypeOf((*UpdateChildResourceConfiguration)(nil)).Elem()
    +}
    +
    +type UpdateChildResourceConfigurationRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Spec []ResourceConfigSpec   `xml:"spec"`
    +}
    +
    +func init() {
    +	t["UpdateChildResourceConfigurationRequestType"] = reflect.TypeOf((*UpdateChildResourceConfigurationRequestType)(nil)).Elem()
    +}
    +
    +type UpdateChildResourceConfigurationResponse struct {
    +}
    +
    +type UpdateClusterProfile UpdateClusterProfileRequestType
    +
    +func init() {
    +	t["UpdateClusterProfile"] = reflect.TypeOf((*UpdateClusterProfile)(nil)).Elem()
    +}
    +
    +type UpdateClusterProfileRequestType struct {
    +	This   ManagedObjectReference       `xml:"_this"`
    +	Config BaseClusterProfileConfigSpec `xml:"config,typeattr"`
    +}
    +
    +func init() {
    +	t["UpdateClusterProfileRequestType"] = reflect.TypeOf((*UpdateClusterProfileRequestType)(nil)).Elem()
    +}
    +
    +type UpdateClusterProfileResponse struct {
    +}
    +
    +type UpdateConfig UpdateConfigRequestType
    +
    +func init() {
    +	t["UpdateConfig"] = reflect.TypeOf((*UpdateConfig)(nil)).Elem()
    +}
    +
    +type UpdateConfigRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	Name   string                 `xml:"name,omitempty"`
    +	Config *ResourceConfigSpec    `xml:"config,omitempty"`
    +}
    +
    +func init() {
    +	t["UpdateConfigRequestType"] = reflect.TypeOf((*UpdateConfigRequestType)(nil)).Elem()
    +}
    +
    +type UpdateConfigResponse struct {
    +}
    +
    +type UpdateConsoleIpRouteConfig UpdateConsoleIpRouteConfigRequestType
    +
    +func init() {
    +	t["UpdateConsoleIpRouteConfig"] = reflect.TypeOf((*UpdateConsoleIpRouteConfig)(nil)).Elem()
    +}
    +
    +type UpdateConsoleIpRouteConfigRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	Config BaseHostIpRouteConfig  `xml:"config,typeattr"`
    +}
    +
    +func init() {
    +	t["UpdateConsoleIpRouteConfigRequestType"] = reflect.TypeOf((*UpdateConsoleIpRouteConfigRequestType)(nil)).Elem()
    +}
    +
    +type UpdateConsoleIpRouteConfigResponse struct {
    +}
    +
    +type UpdateCounterLevelMapping UpdateCounterLevelMappingRequestType
    +
    +func init() {
    +	t["UpdateCounterLevelMapping"] = reflect.TypeOf((*UpdateCounterLevelMapping)(nil)).Elem()
    +}
    +
    +type UpdateCounterLevelMappingRequestType struct {
    +	This            ManagedObjectReference                  `xml:"_this"`
    +	CounterLevelMap []PerformanceManagerCounterLevelMapping `xml:"counterLevelMap"`
    +}
    +
    +func init() {
    +	t["UpdateCounterLevelMappingRequestType"] = reflect.TypeOf((*UpdateCounterLevelMappingRequestType)(nil)).Elem()
    +}
    +
    +type UpdateCounterLevelMappingResponse struct {
    +}
    +
    +type UpdateDVSHealthCheckConfigRequestType struct {
    +	This              ManagedObjectReference     `xml:"_this"`
    +	HealthCheckConfig []BaseDVSHealthCheckConfig `xml:"healthCheckConfig,typeattr"`
    +}
    +
    +func init() {
    +	t["UpdateDVSHealthCheckConfigRequestType"] = reflect.TypeOf((*UpdateDVSHealthCheckConfigRequestType)(nil)).Elem()
    +}
    +
    +type UpdateDVSHealthCheckConfig_Task UpdateDVSHealthCheckConfigRequestType
    +
    +func init() {
    +	t["UpdateDVSHealthCheckConfig_Task"] = reflect.TypeOf((*UpdateDVSHealthCheckConfig_Task)(nil)).Elem()
    +}
    +
    +type UpdateDVSHealthCheckConfig_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type UpdateDVSLacpGroupConfigRequestType struct {
    +	This          ManagedObjectReference   `xml:"_this"`
    +	LacpGroupSpec []VMwareDvsLacpGroupSpec `xml:"lacpGroupSpec"`
    +}
    +
    +func init() {
    +	t["UpdateDVSLacpGroupConfigRequestType"] = reflect.TypeOf((*UpdateDVSLacpGroupConfigRequestType)(nil)).Elem()
    +}
    +
    +type UpdateDVSLacpGroupConfig_Task UpdateDVSLacpGroupConfigRequestType
    +
    +func init() {
    +	t["UpdateDVSLacpGroupConfig_Task"] = reflect.TypeOf((*UpdateDVSLacpGroupConfig_Task)(nil)).Elem()
    +}
    +
    +type UpdateDVSLacpGroupConfig_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type UpdateDateTime UpdateDateTimeRequestType
    +
    +func init() {
    +	t["UpdateDateTime"] = reflect.TypeOf((*UpdateDateTime)(nil)).Elem()
    +}
    +
    +type UpdateDateTimeConfig UpdateDateTimeConfigRequestType
    +
    +func init() {
    +	t["UpdateDateTimeConfig"] = reflect.TypeOf((*UpdateDateTimeConfig)(nil)).Elem()
    +}
    +
    +type UpdateDateTimeConfigRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	Config HostDateTimeConfig     `xml:"config"`
    +}
    +
    +func init() {
    +	t["UpdateDateTimeConfigRequestType"] = reflect.TypeOf((*UpdateDateTimeConfigRequestType)(nil)).Elem()
    +}
    +
    +type UpdateDateTimeConfigResponse struct {
    +}
    +
    +type UpdateDateTimeRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	DateTime time.Time              `xml:"dateTime"`
    +}
    +
    +func init() {
    +	t["UpdateDateTimeRequestType"] = reflect.TypeOf((*UpdateDateTimeRequestType)(nil)).Elem()
    +}
    +
    +type UpdateDateTimeResponse struct {
    +}
    +
    +type UpdateDefaultPolicy UpdateDefaultPolicyRequestType
    +
    +func init() {
    +	t["UpdateDefaultPolicy"] = reflect.TypeOf((*UpdateDefaultPolicy)(nil)).Elem()
    +}
    +
    +type UpdateDefaultPolicyRequestType struct {
    +	This          ManagedObjectReference    `xml:"_this"`
    +	DefaultPolicy HostFirewallDefaultPolicy `xml:"defaultPolicy"`
    +}
    +
    +func init() {
    +	t["UpdateDefaultPolicyRequestType"] = reflect.TypeOf((*UpdateDefaultPolicyRequestType)(nil)).Elem()
    +}
    +
    +type UpdateDefaultPolicyResponse struct {
    +}
    +
    +type UpdateDiskPartitions UpdateDiskPartitionsRequestType
    +
    +func init() {
    +	t["UpdateDiskPartitions"] = reflect.TypeOf((*UpdateDiskPartitions)(nil)).Elem()
    +}
    +
    +type UpdateDiskPartitionsRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	DevicePath string                 `xml:"devicePath"`
    +	Spec       HostDiskPartitionSpec  `xml:"spec"`
    +}
    +
    +func init() {
    +	t["UpdateDiskPartitionsRequestType"] = reflect.TypeOf((*UpdateDiskPartitionsRequestType)(nil)).Elem()
    +}
    +
    +type UpdateDiskPartitionsResponse struct {
    +}
    +
    +type UpdateDnsConfig UpdateDnsConfigRequestType
    +
    +func init() {
    +	t["UpdateDnsConfig"] = reflect.TypeOf((*UpdateDnsConfig)(nil)).Elem()
    +}
    +
    +type UpdateDnsConfigRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	Config BaseHostDnsConfig      `xml:"config,typeattr"`
    +}
    +
    +func init() {
    +	t["UpdateDnsConfigRequestType"] = reflect.TypeOf((*UpdateDnsConfigRequestType)(nil)).Elem()
    +}
    +
    +type UpdateDnsConfigResponse struct {
    +}
    +
    +type UpdateDvsCapability UpdateDvsCapabilityRequestType
    +
    +func init() {
    +	t["UpdateDvsCapability"] = reflect.TypeOf((*UpdateDvsCapability)(nil)).Elem()
    +}
    +
    +type UpdateDvsCapabilityRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	Capability DVSCapability          `xml:"capability"`
    +}
    +
    +func init() {
    +	t["UpdateDvsCapabilityRequestType"] = reflect.TypeOf((*UpdateDvsCapabilityRequestType)(nil)).Elem()
    +}
    +
    +type UpdateDvsCapabilityResponse struct {
    +}
    +
    +type UpdateExtension UpdateExtensionRequestType
    +
    +func init() {
    +	t["UpdateExtension"] = reflect.TypeOf((*UpdateExtension)(nil)).Elem()
    +}
    +
    +type UpdateExtensionRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	Extension Extension              `xml:"extension"`
    +}
    +
    +func init() {
    +	t["UpdateExtensionRequestType"] = reflect.TypeOf((*UpdateExtensionRequestType)(nil)).Elem()
    +}
    +
    +type UpdateExtensionResponse struct {
    +}
    +
    +type UpdateFlags UpdateFlagsRequestType
    +
    +func init() {
    +	t["UpdateFlags"] = reflect.TypeOf((*UpdateFlags)(nil)).Elem()
    +}
    +
    +type UpdateFlagsRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	FlagInfo HostFlagInfo           `xml:"flagInfo"`
    +}
    +
    +func init() {
    +	t["UpdateFlagsRequestType"] = reflect.TypeOf((*UpdateFlagsRequestType)(nil)).Elem()
    +}
    +
    +type UpdateFlagsResponse struct {
    +}
    +
    +type UpdateGraphicsConfig UpdateGraphicsConfigRequestType
    +
    +func init() {
    +	t["UpdateGraphicsConfig"] = reflect.TypeOf((*UpdateGraphicsConfig)(nil)).Elem()
    +}
    +
    +type UpdateGraphicsConfigRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	Config HostGraphicsConfig     `xml:"config"`
    +}
    +
    +func init() {
    +	t["UpdateGraphicsConfigRequestType"] = reflect.TypeOf((*UpdateGraphicsConfigRequestType)(nil)).Elem()
    +}
    +
    +type UpdateGraphicsConfigResponse struct {
    +}
    +
    +type UpdateHostCustomizationsRequestType struct {
    +	This                ManagedObjectReference                  `xml:"_this"`
    +	HostToConfigSpecMap []HostProfileManagerHostToConfigSpecMap `xml:"hostToConfigSpecMap,omitempty"`
    +}
    +
    +func init() {
    +	t["UpdateHostCustomizationsRequestType"] = reflect.TypeOf((*UpdateHostCustomizationsRequestType)(nil)).Elem()
    +}
    +
    +type UpdateHostCustomizations_Task UpdateHostCustomizationsRequestType
    +
    +func init() {
    +	t["UpdateHostCustomizations_Task"] = reflect.TypeOf((*UpdateHostCustomizations_Task)(nil)).Elem()
    +}
    +
    +type UpdateHostCustomizations_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type UpdateHostImageAcceptanceLevel UpdateHostImageAcceptanceLevelRequestType
    +
    +func init() {
    +	t["UpdateHostImageAcceptanceLevel"] = reflect.TypeOf((*UpdateHostImageAcceptanceLevel)(nil)).Elem()
    +}
    +
    +type UpdateHostImageAcceptanceLevelRequestType struct {
    +	This               ManagedObjectReference `xml:"_this"`
    +	NewAcceptanceLevel string                 `xml:"newAcceptanceLevel"`
    +}
    +
    +func init() {
    +	t["UpdateHostImageAcceptanceLevelRequestType"] = reflect.TypeOf((*UpdateHostImageAcceptanceLevelRequestType)(nil)).Elem()
    +}
    +
    +type UpdateHostImageAcceptanceLevelResponse struct {
    +}
    +
    +type UpdateHostProfile UpdateHostProfileRequestType
    +
    +func init() {
    +	t["UpdateHostProfile"] = reflect.TypeOf((*UpdateHostProfile)(nil)).Elem()
    +}
    +
    +type UpdateHostProfileRequestType struct {
    +	This   ManagedObjectReference    `xml:"_this"`
    +	Config BaseHostProfileConfigSpec `xml:"config,typeattr"`
    +}
    +
    +func init() {
    +	t["UpdateHostProfileRequestType"] = reflect.TypeOf((*UpdateHostProfileRequestType)(nil)).Elem()
    +}
    +
    +type UpdateHostProfileResponse struct {
    +}
    +
    +type UpdateHostSpecification UpdateHostSpecificationRequestType
    +
    +func init() {
    +	t["UpdateHostSpecification"] = reflect.TypeOf((*UpdateHostSpecification)(nil)).Elem()
    +}
    +
    +type UpdateHostSpecificationRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	Host     ManagedObjectReference `xml:"host"`
    +	HostSpec HostSpecification      `xml:"hostSpec"`
    +}
    +
    +func init() {
    +	t["UpdateHostSpecificationRequestType"] = reflect.TypeOf((*UpdateHostSpecificationRequestType)(nil)).Elem()
    +}
    +
    +type UpdateHostSpecificationResponse struct {
    +}
    +
    +type UpdateHostSubSpecification UpdateHostSubSpecificationRequestType
    +
    +func init() {
    +	t["UpdateHostSubSpecification"] = reflect.TypeOf((*UpdateHostSubSpecification)(nil)).Elem()
    +}
    +
    +type UpdateHostSubSpecificationRequestType struct {
    +	This        ManagedObjectReference `xml:"_this"`
    +	Host        ManagedObjectReference `xml:"host"`
    +	HostSubSpec HostSubSpecification   `xml:"hostSubSpec"`
    +}
    +
    +func init() {
    +	t["UpdateHostSubSpecificationRequestType"] = reflect.TypeOf((*UpdateHostSubSpecificationRequestType)(nil)).Elem()
    +}
    +
    +type UpdateHostSubSpecificationResponse struct {
    +}
    +
    +type UpdateInternetScsiAdvancedOptions UpdateInternetScsiAdvancedOptionsRequestType
    +
    +func init() {
    +	t["UpdateInternetScsiAdvancedOptions"] = reflect.TypeOf((*UpdateInternetScsiAdvancedOptions)(nil)).Elem()
    +}
    +
    +type UpdateInternetScsiAdvancedOptionsRequestType struct {
    +	This           ManagedObjectReference          `xml:"_this"`
    +	IScsiHbaDevice string                          `xml:"iScsiHbaDevice"`
    +	TargetSet      *HostInternetScsiHbaTargetSet   `xml:"targetSet,omitempty"`
    +	Options        []HostInternetScsiHbaParamValue `xml:"options"`
    +}
    +
    +func init() {
    +	t["UpdateInternetScsiAdvancedOptionsRequestType"] = reflect.TypeOf((*UpdateInternetScsiAdvancedOptionsRequestType)(nil)).Elem()
    +}
    +
    +type UpdateInternetScsiAdvancedOptionsResponse struct {
    +}
    +
    +type UpdateInternetScsiAlias UpdateInternetScsiAliasRequestType
    +
    +func init() {
    +	t["UpdateInternetScsiAlias"] = reflect.TypeOf((*UpdateInternetScsiAlias)(nil)).Elem()
    +}
    +
    +type UpdateInternetScsiAliasRequestType struct {
    +	This           ManagedObjectReference `xml:"_this"`
    +	IScsiHbaDevice string                 `xml:"iScsiHbaDevice"`
    +	IScsiAlias     string                 `xml:"iScsiAlias"`
    +}
    +
    +func init() {
    +	t["UpdateInternetScsiAliasRequestType"] = reflect.TypeOf((*UpdateInternetScsiAliasRequestType)(nil)).Elem()
    +}
    +
    +type UpdateInternetScsiAliasResponse struct {
    +}
    +
    +type UpdateInternetScsiAuthenticationProperties UpdateInternetScsiAuthenticationPropertiesRequestType
    +
    +func init() {
    +	t["UpdateInternetScsiAuthenticationProperties"] = reflect.TypeOf((*UpdateInternetScsiAuthenticationProperties)(nil)).Elem()
    +}
    +
    +type UpdateInternetScsiAuthenticationPropertiesRequestType struct {
    +	This                     ManagedObjectReference                      `xml:"_this"`
    +	IScsiHbaDevice           string                                      `xml:"iScsiHbaDevice"`
    +	AuthenticationProperties HostInternetScsiHbaAuthenticationProperties `xml:"authenticationProperties"`
    +	TargetSet                *HostInternetScsiHbaTargetSet               `xml:"targetSet,omitempty"`
    +}
    +
    +func init() {
    +	t["UpdateInternetScsiAuthenticationPropertiesRequestType"] = reflect.TypeOf((*UpdateInternetScsiAuthenticationPropertiesRequestType)(nil)).Elem()
    +}
    +
    +type UpdateInternetScsiAuthenticationPropertiesResponse struct {
    +}
    +
    +type UpdateInternetScsiDigestProperties UpdateInternetScsiDigestPropertiesRequestType
    +
    +func init() {
    +	t["UpdateInternetScsiDigestProperties"] = reflect.TypeOf((*UpdateInternetScsiDigestProperties)(nil)).Elem()
    +}
    +
    +type UpdateInternetScsiDigestPropertiesRequestType struct {
    +	This             ManagedObjectReference              `xml:"_this"`
    +	IScsiHbaDevice   string                              `xml:"iScsiHbaDevice"`
    +	TargetSet        *HostInternetScsiHbaTargetSet       `xml:"targetSet,omitempty"`
    +	DigestProperties HostInternetScsiHbaDigestProperties `xml:"digestProperties"`
    +}
    +
    +func init() {
    +	t["UpdateInternetScsiDigestPropertiesRequestType"] = reflect.TypeOf((*UpdateInternetScsiDigestPropertiesRequestType)(nil)).Elem()
    +}
    +
    +type UpdateInternetScsiDigestPropertiesResponse struct {
    +}
    +
    +type UpdateInternetScsiDiscoveryProperties UpdateInternetScsiDiscoveryPropertiesRequestType
    +
    +func init() {
    +	t["UpdateInternetScsiDiscoveryProperties"] = reflect.TypeOf((*UpdateInternetScsiDiscoveryProperties)(nil)).Elem()
    +}
    +
    +type UpdateInternetScsiDiscoveryPropertiesRequestType struct {
    +	This                ManagedObjectReference                 `xml:"_this"`
    +	IScsiHbaDevice      string                                 `xml:"iScsiHbaDevice"`
    +	DiscoveryProperties HostInternetScsiHbaDiscoveryProperties `xml:"discoveryProperties"`
    +}
    +
    +func init() {
    +	t["UpdateInternetScsiDiscoveryPropertiesRequestType"] = reflect.TypeOf((*UpdateInternetScsiDiscoveryPropertiesRequestType)(nil)).Elem()
    +}
    +
    +type UpdateInternetScsiDiscoveryPropertiesResponse struct {
    +}
    +
    +type UpdateInternetScsiIPProperties UpdateInternetScsiIPPropertiesRequestType
    +
    +func init() {
    +	t["UpdateInternetScsiIPProperties"] = reflect.TypeOf((*UpdateInternetScsiIPProperties)(nil)).Elem()
    +}
    +
    +type UpdateInternetScsiIPPropertiesRequestType struct {
    +	This           ManagedObjectReference          `xml:"_this"`
    +	IScsiHbaDevice string                          `xml:"iScsiHbaDevice"`
    +	IpProperties   HostInternetScsiHbaIPProperties `xml:"ipProperties"`
    +}
    +
    +func init() {
    +	t["UpdateInternetScsiIPPropertiesRequestType"] = reflect.TypeOf((*UpdateInternetScsiIPPropertiesRequestType)(nil)).Elem()
    +}
    +
    +type UpdateInternetScsiIPPropertiesResponse struct {
    +}
    +
    +type UpdateInternetScsiName UpdateInternetScsiNameRequestType
    +
    +func init() {
    +	t["UpdateInternetScsiName"] = reflect.TypeOf((*UpdateInternetScsiName)(nil)).Elem()
    +}
    +
    +type UpdateInternetScsiNameRequestType struct {
    +	This           ManagedObjectReference `xml:"_this"`
    +	IScsiHbaDevice string                 `xml:"iScsiHbaDevice"`
    +	IScsiName      string                 `xml:"iScsiName"`
    +}
    +
    +func init() {
    +	t["UpdateInternetScsiNameRequestType"] = reflect.TypeOf((*UpdateInternetScsiNameRequestType)(nil)).Elem()
    +}
    +
    +type UpdateInternetScsiNameResponse struct {
    +}
    +
    +type UpdateIpConfig UpdateIpConfigRequestType
    +
    +func init() {
    +	t["UpdateIpConfig"] = reflect.TypeOf((*UpdateIpConfig)(nil)).Elem()
    +}
    +
    +type UpdateIpConfigRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	IpConfig HostIpConfig           `xml:"ipConfig"`
    +}
    +
    +func init() {
    +	t["UpdateIpConfigRequestType"] = reflect.TypeOf((*UpdateIpConfigRequestType)(nil)).Elem()
    +}
    +
    +type UpdateIpConfigResponse struct {
    +}
    +
    +type UpdateIpPool UpdateIpPoolRequestType
    +
    +func init() {
    +	t["UpdateIpPool"] = reflect.TypeOf((*UpdateIpPool)(nil)).Elem()
    +}
    +
    +type UpdateIpPoolRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Dc   ManagedObjectReference `xml:"dc"`
    +	Pool IpPool                 `xml:"pool"`
    +}
    +
    +func init() {
    +	t["UpdateIpPoolRequestType"] = reflect.TypeOf((*UpdateIpPoolRequestType)(nil)).Elem()
    +}
    +
    +type UpdateIpPoolResponse struct {
    +}
    +
    +type UpdateIpRouteConfig UpdateIpRouteConfigRequestType
    +
    +func init() {
    +	t["UpdateIpRouteConfig"] = reflect.TypeOf((*UpdateIpRouteConfig)(nil)).Elem()
    +}
    +
    +type UpdateIpRouteConfigRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	Config BaseHostIpRouteConfig  `xml:"config,typeattr"`
    +}
    +
    +func init() {
    +	t["UpdateIpRouteConfigRequestType"] = reflect.TypeOf((*UpdateIpRouteConfigRequestType)(nil)).Elem()
    +}
    +
    +type UpdateIpRouteConfigResponse struct {
    +}
    +
    +type UpdateIpRouteTableConfig UpdateIpRouteTableConfigRequestType
    +
    +func init() {
    +	t["UpdateIpRouteTableConfig"] = reflect.TypeOf((*UpdateIpRouteTableConfig)(nil)).Elem()
    +}
    +
    +type UpdateIpRouteTableConfigRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	Config HostIpRouteTableConfig `xml:"config"`
    +}
    +
    +func init() {
    +	t["UpdateIpRouteTableConfigRequestType"] = reflect.TypeOf((*UpdateIpRouteTableConfigRequestType)(nil)).Elem()
    +}
    +
    +type UpdateIpRouteTableConfigResponse struct {
    +}
    +
    +type UpdateIpmi UpdateIpmiRequestType
    +
    +func init() {
    +	t["UpdateIpmi"] = reflect.TypeOf((*UpdateIpmi)(nil)).Elem()
    +}
    +
    +type UpdateIpmiRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	IpmiInfo HostIpmiInfo           `xml:"ipmiInfo"`
    +}
    +
    +func init() {
    +	t["UpdateIpmiRequestType"] = reflect.TypeOf((*UpdateIpmiRequestType)(nil)).Elem()
    +}
    +
    +type UpdateIpmiResponse struct {
    +}
    +
    +type UpdateKmipServer UpdateKmipServerRequestType
    +
    +func init() {
    +	t["UpdateKmipServer"] = reflect.TypeOf((*UpdateKmipServer)(nil)).Elem()
    +}
    +
    +type UpdateKmipServerRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	Server KmipServerSpec         `xml:"server"`
    +}
    +
    +func init() {
    +	t["UpdateKmipServerRequestType"] = reflect.TypeOf((*UpdateKmipServerRequestType)(nil)).Elem()
    +}
    +
    +type UpdateKmipServerResponse struct {
    +}
    +
    +type UpdateKmsSignedCsrClientCert UpdateKmsSignedCsrClientCertRequestType
    +
    +func init() {
    +	t["UpdateKmsSignedCsrClientCert"] = reflect.TypeOf((*UpdateKmsSignedCsrClientCert)(nil)).Elem()
    +}
    +
    +type UpdateKmsSignedCsrClientCertRequestType struct {
    +	This        ManagedObjectReference `xml:"_this"`
    +	Cluster     KeyProviderId          `xml:"cluster"`
    +	Certificate string                 `xml:"certificate"`
    +}
    +
    +func init() {
    +	t["UpdateKmsSignedCsrClientCertRequestType"] = reflect.TypeOf((*UpdateKmsSignedCsrClientCertRequestType)(nil)).Elem()
    +}
    +
    +type UpdateKmsSignedCsrClientCertResponse struct {
    +}
    +
    +type UpdateLicense UpdateLicenseRequestType
    +
    +func init() {
    +	t["UpdateLicense"] = reflect.TypeOf((*UpdateLicense)(nil)).Elem()
    +}
    +
    +type UpdateLicenseLabel UpdateLicenseLabelRequestType
    +
    +func init() {
    +	t["UpdateLicenseLabel"] = reflect.TypeOf((*UpdateLicenseLabel)(nil)).Elem()
    +}
    +
    +type UpdateLicenseLabelRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	LicenseKey string                 `xml:"licenseKey"`
    +	LabelKey   string                 `xml:"labelKey"`
    +	LabelValue string                 `xml:"labelValue"`
    +}
    +
    +func init() {
    +	t["UpdateLicenseLabelRequestType"] = reflect.TypeOf((*UpdateLicenseLabelRequestType)(nil)).Elem()
    +}
    +
    +type UpdateLicenseLabelResponse struct {
    +}
    +
    +type UpdateLicenseRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	LicenseKey string                 `xml:"licenseKey"`
    +	Labels     []KeyValue             `xml:"labels,omitempty"`
    +}
    +
    +func init() {
    +	t["UpdateLicenseRequestType"] = reflect.TypeOf((*UpdateLicenseRequestType)(nil)).Elem()
    +}
    +
    +type UpdateLicenseResponse struct {
    +	Returnval LicenseManagerLicenseInfo `xml:"returnval"`
    +}
    +
    +type UpdateLinkedChildren UpdateLinkedChildrenRequestType
    +
    +func init() {
    +	t["UpdateLinkedChildren"] = reflect.TypeOf((*UpdateLinkedChildren)(nil)).Elem()
    +}
    +
    +type UpdateLinkedChildrenRequestType struct {
    +	This         ManagedObjectReference   `xml:"_this"`
    +	AddChangeSet []VirtualAppLinkInfo     `xml:"addChangeSet,omitempty"`
    +	RemoveSet    []ManagedObjectReference `xml:"removeSet,omitempty"`
    +}
    +
    +func init() {
    +	t["UpdateLinkedChildrenRequestType"] = reflect.TypeOf((*UpdateLinkedChildrenRequestType)(nil)).Elem()
    +}
    +
    +type UpdateLinkedChildrenResponse struct {
    +}
    +
    +type UpdateLocalSwapDatastore UpdateLocalSwapDatastoreRequestType
    +
    +func init() {
    +	t["UpdateLocalSwapDatastore"] = reflect.TypeOf((*UpdateLocalSwapDatastore)(nil)).Elem()
    +}
    +
    +type UpdateLocalSwapDatastoreRequestType struct {
    +	This      ManagedObjectReference  `xml:"_this"`
    +	Datastore *ManagedObjectReference `xml:"datastore,omitempty"`
    +}
    +
    +func init() {
    +	t["UpdateLocalSwapDatastoreRequestType"] = reflect.TypeOf((*UpdateLocalSwapDatastoreRequestType)(nil)).Elem()
    +}
    +
    +type UpdateLocalSwapDatastoreResponse struct {
    +}
    +
    +type UpdateLockdownExceptions UpdateLockdownExceptionsRequestType
    +
    +func init() {
    +	t["UpdateLockdownExceptions"] = reflect.TypeOf((*UpdateLockdownExceptions)(nil)).Elem()
    +}
    +
    +type UpdateLockdownExceptionsRequestType struct {
    +	This  ManagedObjectReference `xml:"_this"`
    +	Users []string               `xml:"users,omitempty"`
    +}
    +
    +func init() {
    +	t["UpdateLockdownExceptionsRequestType"] = reflect.TypeOf((*UpdateLockdownExceptionsRequestType)(nil)).Elem()
    +}
    +
    +type UpdateLockdownExceptionsResponse struct {
    +}
    +
    +type UpdateModuleOptionString UpdateModuleOptionStringRequestType
    +
    +func init() {
    +	t["UpdateModuleOptionString"] = reflect.TypeOf((*UpdateModuleOptionString)(nil)).Elem()
    +}
    +
    +type UpdateModuleOptionStringRequestType struct {
    +	This    ManagedObjectReference `xml:"_this"`
    +	Name    string                 `xml:"name"`
    +	Options string                 `xml:"options"`
    +}
    +
    +func init() {
    +	t["UpdateModuleOptionStringRequestType"] = reflect.TypeOf((*UpdateModuleOptionStringRequestType)(nil)).Elem()
    +}
    +
    +type UpdateModuleOptionStringResponse struct {
    +}
    +
    +type UpdateNetworkConfig UpdateNetworkConfigRequestType
    +
    +func init() {
    +	t["UpdateNetworkConfig"] = reflect.TypeOf((*UpdateNetworkConfig)(nil)).Elem()
    +}
    +
    +type UpdateNetworkConfigRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	Config     HostNetworkConfig      `xml:"config"`
    +	ChangeMode string                 `xml:"changeMode"`
    +}
    +
    +func init() {
    +	t["UpdateNetworkConfigRequestType"] = reflect.TypeOf((*UpdateNetworkConfigRequestType)(nil)).Elem()
    +}
    +
    +type UpdateNetworkConfigResponse struct {
    +	Returnval HostNetworkConfigResult `xml:"returnval"`
    +}
    +
    +type UpdateNetworkResourcePool UpdateNetworkResourcePoolRequestType
    +
    +func init() {
    +	t["UpdateNetworkResourcePool"] = reflect.TypeOf((*UpdateNetworkResourcePool)(nil)).Elem()
    +}
    +
    +type UpdateNetworkResourcePoolRequestType struct {
    +	This       ManagedObjectReference             `xml:"_this"`
    +	ConfigSpec []DVSNetworkResourcePoolConfigSpec `xml:"configSpec"`
    +}
    +
    +func init() {
    +	t["UpdateNetworkResourcePoolRequestType"] = reflect.TypeOf((*UpdateNetworkResourcePoolRequestType)(nil)).Elem()
    +}
    +
    +type UpdateNetworkResourcePoolResponse struct {
    +}
    +
    +type UpdateOptions UpdateOptionsRequestType
    +
    +func init() {
    +	t["UpdateOptions"] = reflect.TypeOf((*UpdateOptions)(nil)).Elem()
    +}
    +
    +type UpdateOptionsRequestType struct {
    +	This         ManagedObjectReference `xml:"_this"`
    +	ChangedValue []BaseOptionValue      `xml:"changedValue,typeattr"`
    +}
    +
    +func init() {
    +	t["UpdateOptionsRequestType"] = reflect.TypeOf((*UpdateOptionsRequestType)(nil)).Elem()
    +}
    +
    +type UpdateOptionsResponse struct {
    +}
    +
    +type UpdatePassthruConfig UpdatePassthruConfigRequestType
    +
    +func init() {
    +	t["UpdatePassthruConfig"] = reflect.TypeOf((*UpdatePassthruConfig)(nil)).Elem()
    +}
    +
    +type UpdatePassthruConfigRequestType struct {
    +	This   ManagedObjectReference      `xml:"_this"`
    +	Config []BaseHostPciPassthruConfig `xml:"config,typeattr"`
    +}
    +
    +func init() {
    +	t["UpdatePassthruConfigRequestType"] = reflect.TypeOf((*UpdatePassthruConfigRequestType)(nil)).Elem()
    +}
    +
    +type UpdatePassthruConfigResponse struct {
    +}
    +
    +type UpdatePerfInterval UpdatePerfIntervalRequestType
    +
    +func init() {
    +	t["UpdatePerfInterval"] = reflect.TypeOf((*UpdatePerfInterval)(nil)).Elem()
    +}
    +
    +type UpdatePerfIntervalRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	Interval PerfInterval           `xml:"interval"`
    +}
    +
    +func init() {
    +	t["UpdatePerfIntervalRequestType"] = reflect.TypeOf((*UpdatePerfIntervalRequestType)(nil)).Elem()
    +}
    +
    +type UpdatePerfIntervalResponse struct {
    +}
    +
    +type UpdatePhysicalNicLinkSpeed UpdatePhysicalNicLinkSpeedRequestType
    +
    +func init() {
    +	t["UpdatePhysicalNicLinkSpeed"] = reflect.TypeOf((*UpdatePhysicalNicLinkSpeed)(nil)).Elem()
    +}
    +
    +type UpdatePhysicalNicLinkSpeedRequestType struct {
    +	This      ManagedObjectReference `xml:"_this"`
    +	Device    string                 `xml:"device"`
    +	LinkSpeed *PhysicalNicLinkInfo   `xml:"linkSpeed,omitempty"`
    +}
    +
    +func init() {
    +	t["UpdatePhysicalNicLinkSpeedRequestType"] = reflect.TypeOf((*UpdatePhysicalNicLinkSpeedRequestType)(nil)).Elem()
    +}
    +
    +type UpdatePhysicalNicLinkSpeedResponse struct {
    +}
    +
    +type UpdatePortGroup UpdatePortGroupRequestType
    +
    +func init() {
    +	t["UpdatePortGroup"] = reflect.TypeOf((*UpdatePortGroup)(nil)).Elem()
    +}
    +
    +type UpdatePortGroupRequestType struct {
    +	This    ManagedObjectReference `xml:"_this"`
    +	PgName  string                 `xml:"pgName"`
    +	Portgrp HostPortGroupSpec      `xml:"portgrp"`
    +}
    +
    +func init() {
    +	t["UpdatePortGroupRequestType"] = reflect.TypeOf((*UpdatePortGroupRequestType)(nil)).Elem()
    +}
    +
    +type UpdatePortGroupResponse struct {
    +}
    +
    +type UpdateProgress UpdateProgressRequestType
    +
    +func init() {
    +	t["UpdateProgress"] = reflect.TypeOf((*UpdateProgress)(nil)).Elem()
    +}
    +
    +type UpdateProgressRequestType struct {
    +	This        ManagedObjectReference `xml:"_this"`
    +	PercentDone int32                  `xml:"percentDone"`
    +}
    +
    +func init() {
    +	t["UpdateProgressRequestType"] = reflect.TypeOf((*UpdateProgressRequestType)(nil)).Elem()
    +}
    +
    +type UpdateProgressResponse struct {
    +}
    +
    +type UpdateReferenceHost UpdateReferenceHostRequestType
    +
    +func init() {
    +	t["UpdateReferenceHost"] = reflect.TypeOf((*UpdateReferenceHost)(nil)).Elem()
    +}
    +
    +type UpdateReferenceHostRequestType struct {
    +	This ManagedObjectReference  `xml:"_this"`
    +	Host *ManagedObjectReference `xml:"host,omitempty"`
    +}
    +
    +func init() {
    +	t["UpdateReferenceHostRequestType"] = reflect.TypeOf((*UpdateReferenceHostRequestType)(nil)).Elem()
    +}
    +
    +type UpdateReferenceHostResponse struct {
    +}
    +
    +type UpdateRuleset UpdateRulesetRequestType
    +
    +func init() {
    +	t["UpdateRuleset"] = reflect.TypeOf((*UpdateRuleset)(nil)).Elem()
    +}
    +
    +type UpdateRulesetRequestType struct {
    +	This ManagedObjectReference         `xml:"_this"`
    +	Id   string                         `xml:"id"`
    +	Spec HostFirewallRulesetRulesetSpec `xml:"spec"`
    +}
    +
    +func init() {
    +	t["UpdateRulesetRequestType"] = reflect.TypeOf((*UpdateRulesetRequestType)(nil)).Elem()
    +}
    +
    +type UpdateRulesetResponse struct {
    +}
    +
    +type UpdateScsiLunDisplayName UpdateScsiLunDisplayNameRequestType
    +
    +func init() {
    +	t["UpdateScsiLunDisplayName"] = reflect.TypeOf((*UpdateScsiLunDisplayName)(nil)).Elem()
    +}
    +
    +type UpdateScsiLunDisplayNameRequestType struct {
    +	This        ManagedObjectReference `xml:"_this"`
    +	LunUuid     string                 `xml:"lunUuid"`
    +	DisplayName string                 `xml:"displayName"`
    +}
    +
    +func init() {
    +	t["UpdateScsiLunDisplayNameRequestType"] = reflect.TypeOf((*UpdateScsiLunDisplayNameRequestType)(nil)).Elem()
    +}
    +
    +type UpdateScsiLunDisplayNameResponse struct {
    +}
    +
    +type UpdateSelfSignedClientCert UpdateSelfSignedClientCertRequestType
    +
    +func init() {
    +	t["UpdateSelfSignedClientCert"] = reflect.TypeOf((*UpdateSelfSignedClientCert)(nil)).Elem()
    +}
    +
    +type UpdateSelfSignedClientCertRequestType struct {
    +	This        ManagedObjectReference `xml:"_this"`
    +	Cluster     KeyProviderId          `xml:"cluster"`
    +	Certificate string                 `xml:"certificate"`
    +}
    +
    +func init() {
    +	t["UpdateSelfSignedClientCertRequestType"] = reflect.TypeOf((*UpdateSelfSignedClientCertRequestType)(nil)).Elem()
    +}
    +
    +type UpdateSelfSignedClientCertResponse struct {
    +}
    +
    +type UpdateServiceConsoleVirtualNic UpdateServiceConsoleVirtualNicRequestType
    +
    +func init() {
    +	t["UpdateServiceConsoleVirtualNic"] = reflect.TypeOf((*UpdateServiceConsoleVirtualNic)(nil)).Elem()
    +}
    +
    +type UpdateServiceConsoleVirtualNicRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	Device string                 `xml:"device"`
    +	Nic    HostVirtualNicSpec     `xml:"nic"`
    +}
    +
    +func init() {
    +	t["UpdateServiceConsoleVirtualNicRequestType"] = reflect.TypeOf((*UpdateServiceConsoleVirtualNicRequestType)(nil)).Elem()
    +}
    +
    +type UpdateServiceConsoleVirtualNicResponse struct {
    +}
    +
    +type UpdateServiceMessage UpdateServiceMessageRequestType
    +
    +func init() {
    +	t["UpdateServiceMessage"] = reflect.TypeOf((*UpdateServiceMessage)(nil)).Elem()
    +}
    +
    +type UpdateServiceMessageRequestType struct {
    +	This    ManagedObjectReference `xml:"_this"`
    +	Message string                 `xml:"message"`
    +}
    +
    +func init() {
    +	t["UpdateServiceMessageRequestType"] = reflect.TypeOf((*UpdateServiceMessageRequestType)(nil)).Elem()
    +}
    +
    +type UpdateServiceMessageResponse struct {
    +}
    +
    +type UpdateServicePolicy UpdateServicePolicyRequestType
    +
    +func init() {
    +	t["UpdateServicePolicy"] = reflect.TypeOf((*UpdateServicePolicy)(nil)).Elem()
    +}
    +
    +type UpdateServicePolicyRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	Id     string                 `xml:"id"`
    +	Policy string                 `xml:"policy"`
    +}
    +
    +func init() {
    +	t["UpdateServicePolicyRequestType"] = reflect.TypeOf((*UpdateServicePolicyRequestType)(nil)).Elem()
    +}
    +
    +type UpdateServicePolicyResponse struct {
    +}
    +
    +type UpdateSet struct {
    +	DynamicData
    +
    +	Version   string                 `xml:"version"`
    +	FilterSet []PropertyFilterUpdate `xml:"filterSet,omitempty"`
    +	Truncated *bool                  `xml:"truncated"`
    +}
    +
    +func init() {
    +	t["UpdateSet"] = reflect.TypeOf((*UpdateSet)(nil)).Elem()
    +}
    +
    +type UpdateSoftwareInternetScsiEnabled UpdateSoftwareInternetScsiEnabledRequestType
    +
    +func init() {
    +	t["UpdateSoftwareInternetScsiEnabled"] = reflect.TypeOf((*UpdateSoftwareInternetScsiEnabled)(nil)).Elem()
    +}
    +
    +type UpdateSoftwareInternetScsiEnabledRequestType struct {
    +	This    ManagedObjectReference `xml:"_this"`
    +	Enabled bool                   `xml:"enabled"`
    +}
    +
    +func init() {
    +	t["UpdateSoftwareInternetScsiEnabledRequestType"] = reflect.TypeOf((*UpdateSoftwareInternetScsiEnabledRequestType)(nil)).Elem()
    +}
    +
    +type UpdateSoftwareInternetScsiEnabledResponse struct {
    +}
    +
    +type UpdateSystemResources UpdateSystemResourcesRequestType
    +
    +func init() {
    +	t["UpdateSystemResources"] = reflect.TypeOf((*UpdateSystemResources)(nil)).Elem()
    +}
    +
    +type UpdateSystemResourcesRequestType struct {
    +	This         ManagedObjectReference `xml:"_this"`
    +	ResourceInfo HostSystemResourceInfo `xml:"resourceInfo"`
    +}
    +
    +func init() {
    +	t["UpdateSystemResourcesRequestType"] = reflect.TypeOf((*UpdateSystemResourcesRequestType)(nil)).Elem()
    +}
    +
    +type UpdateSystemResourcesResponse struct {
    +}
    +
    +type UpdateSystemSwapConfiguration UpdateSystemSwapConfigurationRequestType
    +
    +func init() {
    +	t["UpdateSystemSwapConfiguration"] = reflect.TypeOf((*UpdateSystemSwapConfiguration)(nil)).Elem()
    +}
    +
    +type UpdateSystemSwapConfigurationRequestType struct {
    +	This          ManagedObjectReference      `xml:"_this"`
    +	SysSwapConfig HostSystemSwapConfiguration `xml:"sysSwapConfig"`
    +}
    +
    +func init() {
    +	t["UpdateSystemSwapConfigurationRequestType"] = reflect.TypeOf((*UpdateSystemSwapConfigurationRequestType)(nil)).Elem()
    +}
    +
    +type UpdateSystemSwapConfigurationResponse struct {
    +}
    +
    +type UpdateSystemUsers UpdateSystemUsersRequestType
    +
    +func init() {
    +	t["UpdateSystemUsers"] = reflect.TypeOf((*UpdateSystemUsers)(nil)).Elem()
    +}
    +
    +type UpdateSystemUsersRequestType struct {
    +	This  ManagedObjectReference `xml:"_this"`
    +	Users []string               `xml:"users,omitempty"`
    +}
    +
    +func init() {
    +	t["UpdateSystemUsersRequestType"] = reflect.TypeOf((*UpdateSystemUsersRequestType)(nil)).Elem()
    +}
    +
    +type UpdateSystemUsersResponse struct {
    +}
    +
    +type UpdateUser UpdateUserRequestType
    +
    +func init() {
    +	t["UpdateUser"] = reflect.TypeOf((*UpdateUser)(nil)).Elem()
    +}
    +
    +type UpdateUserRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	User BaseHostAccountSpec    `xml:"user,typeattr"`
    +}
    +
    +func init() {
    +	t["UpdateUserRequestType"] = reflect.TypeOf((*UpdateUserRequestType)(nil)).Elem()
    +}
    +
    +type UpdateUserResponse struct {
    +}
    +
    +type UpdateVAppConfig UpdateVAppConfigRequestType
    +
    +func init() {
    +	t["UpdateVAppConfig"] = reflect.TypeOf((*UpdateVAppConfig)(nil)).Elem()
    +}
    +
    +type UpdateVAppConfigRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Spec VAppConfigSpec         `xml:"spec"`
    +}
    +
    +func init() {
    +	t["UpdateVAppConfigRequestType"] = reflect.TypeOf((*UpdateVAppConfigRequestType)(nil)).Elem()
    +}
    +
    +type UpdateVAppConfigResponse struct {
    +}
    +
    +type UpdateVStorageInfrastructureObjectPolicyRequestType struct {
    +	This ManagedObjectReference             `xml:"_this"`
    +	Spec VslmInfrastructureObjectPolicySpec `xml:"spec"`
    +}
    +
    +func init() {
    +	t["UpdateVStorageInfrastructureObjectPolicyRequestType"] = reflect.TypeOf((*UpdateVStorageInfrastructureObjectPolicyRequestType)(nil)).Elem()
    +}
    +
    +type UpdateVStorageInfrastructureObjectPolicy_Task UpdateVStorageInfrastructureObjectPolicyRequestType
    +
    +func init() {
    +	t["UpdateVStorageInfrastructureObjectPolicy_Task"] = reflect.TypeOf((*UpdateVStorageInfrastructureObjectPolicy_Task)(nil)).Elem()
    +}
    +
    +type UpdateVStorageInfrastructureObjectPolicy_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type UpdateVStorageObjectPolicyRequestType struct {
    +	This      ManagedObjectReference          `xml:"_this"`
    +	Id        ID                              `xml:"id"`
    +	Datastore ManagedObjectReference          `xml:"datastore"`
    +	Profile   []BaseVirtualMachineProfileSpec `xml:"profile,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["UpdateVStorageObjectPolicyRequestType"] = reflect.TypeOf((*UpdateVStorageObjectPolicyRequestType)(nil)).Elem()
    +}
    +
    +type UpdateVStorageObjectPolicy_Task UpdateVStorageObjectPolicyRequestType
    +
    +func init() {
    +	t["UpdateVStorageObjectPolicy_Task"] = reflect.TypeOf((*UpdateVStorageObjectPolicy_Task)(nil)).Elem()
    +}
    +
    +type UpdateVStorageObjectPolicy_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type UpdateVVolVirtualMachineFilesRequestType struct {
    +	This         ManagedObjectReference               `xml:"_this"`
    +	FailoverPair []DatastoreVVolContainerFailoverPair `xml:"failoverPair,omitempty"`
    +}
    +
    +func init() {
    +	t["UpdateVVolVirtualMachineFilesRequestType"] = reflect.TypeOf((*UpdateVVolVirtualMachineFilesRequestType)(nil)).Elem()
    +}
    +
    +type UpdateVVolVirtualMachineFiles_Task UpdateVVolVirtualMachineFilesRequestType
    +
    +func init() {
    +	t["UpdateVVolVirtualMachineFiles_Task"] = reflect.TypeOf((*UpdateVVolVirtualMachineFiles_Task)(nil)).Elem()
    +}
    +
    +type UpdateVVolVirtualMachineFiles_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type UpdateVirtualMachineFilesRequestType struct {
    +	This                      ManagedObjectReference            `xml:"_this"`
    +	MountPathDatastoreMapping []DatastoreMountPathDatastorePair `xml:"mountPathDatastoreMapping"`
    +}
    +
    +func init() {
    +	t["UpdateVirtualMachineFilesRequestType"] = reflect.TypeOf((*UpdateVirtualMachineFilesRequestType)(nil)).Elem()
    +}
    +
    +type UpdateVirtualMachineFilesResult struct {
    +	DynamicData
    +
    +	FailedVmFile []UpdateVirtualMachineFilesResultFailedVmFileInfo `xml:"failedVmFile,omitempty"`
    +}
    +
    +func init() {
    +	t["UpdateVirtualMachineFilesResult"] = reflect.TypeOf((*UpdateVirtualMachineFilesResult)(nil)).Elem()
    +}
    +
    +type UpdateVirtualMachineFilesResultFailedVmFileInfo struct {
    +	DynamicData
    +
    +	VmFile string               `xml:"vmFile"`
    +	Fault  LocalizedMethodFault `xml:"fault"`
    +}
    +
    +func init() {
    +	t["UpdateVirtualMachineFilesResultFailedVmFileInfo"] = reflect.TypeOf((*UpdateVirtualMachineFilesResultFailedVmFileInfo)(nil)).Elem()
    +}
    +
    +type UpdateVirtualMachineFiles_Task UpdateVirtualMachineFilesRequestType
    +
    +func init() {
    +	t["UpdateVirtualMachineFiles_Task"] = reflect.TypeOf((*UpdateVirtualMachineFiles_Task)(nil)).Elem()
    +}
    +
    +type UpdateVirtualMachineFiles_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type UpdateVirtualNic UpdateVirtualNicRequestType
    +
    +func init() {
    +	t["UpdateVirtualNic"] = reflect.TypeOf((*UpdateVirtualNic)(nil)).Elem()
    +}
    +
    +type UpdateVirtualNicRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	Device string                 `xml:"device"`
    +	Nic    HostVirtualNicSpec     `xml:"nic"`
    +}
    +
    +func init() {
    +	t["UpdateVirtualNicRequestType"] = reflect.TypeOf((*UpdateVirtualNicRequestType)(nil)).Elem()
    +}
    +
    +type UpdateVirtualNicResponse struct {
    +}
    +
    +type UpdateVirtualSwitch UpdateVirtualSwitchRequestType
    +
    +func init() {
    +	t["UpdateVirtualSwitch"] = reflect.TypeOf((*UpdateVirtualSwitch)(nil)).Elem()
    +}
    +
    +type UpdateVirtualSwitchRequestType struct {
    +	This        ManagedObjectReference `xml:"_this"`
    +	VswitchName string                 `xml:"vswitchName"`
    +	Spec        HostVirtualSwitchSpec  `xml:"spec"`
    +}
    +
    +func init() {
    +	t["UpdateVirtualSwitchRequestType"] = reflect.TypeOf((*UpdateVirtualSwitchRequestType)(nil)).Elem()
    +}
    +
    +type UpdateVirtualSwitchResponse struct {
    +}
    +
    +type UpdateVmfsUnmapBandwidth UpdateVmfsUnmapBandwidthRequestType
    +
    +func init() {
    +	t["UpdateVmfsUnmapBandwidth"] = reflect.TypeOf((*UpdateVmfsUnmapBandwidth)(nil)).Elem()
    +}
    +
    +type UpdateVmfsUnmapBandwidthRequestType struct {
    +	This               ManagedObjectReference `xml:"_this"`
    +	VmfsUuid           string                 `xml:"vmfsUuid"`
    +	UnmapBandwidthSpec VmfsUnmapBandwidthSpec `xml:"unmapBandwidthSpec"`
    +}
    +
    +func init() {
    +	t["UpdateVmfsUnmapBandwidthRequestType"] = reflect.TypeOf((*UpdateVmfsUnmapBandwidthRequestType)(nil)).Elem()
    +}
    +
    +type UpdateVmfsUnmapBandwidthResponse struct {
    +}
    +
    +type UpdateVmfsUnmapPriority UpdateVmfsUnmapPriorityRequestType
    +
    +func init() {
    +	t["UpdateVmfsUnmapPriority"] = reflect.TypeOf((*UpdateVmfsUnmapPriority)(nil)).Elem()
    +}
    +
    +type UpdateVmfsUnmapPriorityRequestType struct {
    +	This          ManagedObjectReference `xml:"_this"`
    +	VmfsUuid      string                 `xml:"vmfsUuid"`
    +	UnmapPriority string                 `xml:"unmapPriority"`
    +}
    +
    +func init() {
    +	t["UpdateVmfsUnmapPriorityRequestType"] = reflect.TypeOf((*UpdateVmfsUnmapPriorityRequestType)(nil)).Elem()
    +}
    +
    +type UpdateVmfsUnmapPriorityResponse struct {
    +}
    +
    +type UpdateVsanRequestType struct {
    +	This   ManagedObjectReference `xml:"_this"`
    +	Config VsanHostConfigInfo     `xml:"config"`
    +}
    +
    +func init() {
    +	t["UpdateVsanRequestType"] = reflect.TypeOf((*UpdateVsanRequestType)(nil)).Elem()
    +}
    +
    +type UpdateVsan_Task UpdateVsanRequestType
    +
    +func init() {
    +	t["UpdateVsan_Task"] = reflect.TypeOf((*UpdateVsan_Task)(nil)).Elem()
    +}
    +
    +type UpdateVsan_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type UpdatedAgentBeingRestartedEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["UpdatedAgentBeingRestartedEvent"] = reflect.TypeOf((*UpdatedAgentBeingRestartedEvent)(nil)).Elem()
    +}
    +
    +type UpgradeEvent struct {
    +	Event
    +
    +	Message string `xml:"message"`
    +}
    +
    +func init() {
    +	t["UpgradeEvent"] = reflect.TypeOf((*UpgradeEvent)(nil)).Elem()
    +}
    +
    +type UpgradeIoFilterRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	FilterId string                 `xml:"filterId"`
    +	CompRes  ManagedObjectReference `xml:"compRes"`
    +	VibUrl   string                 `xml:"vibUrl"`
    +}
    +
    +func init() {
    +	t["UpgradeIoFilterRequestType"] = reflect.TypeOf((*UpgradeIoFilterRequestType)(nil)).Elem()
    +}
    +
    +type UpgradeIoFilter_Task UpgradeIoFilterRequestType
    +
    +func init() {
    +	t["UpgradeIoFilter_Task"] = reflect.TypeOf((*UpgradeIoFilter_Task)(nil)).Elem()
    +}
    +
    +type UpgradeIoFilter_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type UpgradeToolsRequestType struct {
    +	This             ManagedObjectReference `xml:"_this"`
    +	InstallerOptions string                 `xml:"installerOptions,omitempty"`
    +}
    +
    +func init() {
    +	t["UpgradeToolsRequestType"] = reflect.TypeOf((*UpgradeToolsRequestType)(nil)).Elem()
    +}
    +
    +type UpgradeTools_Task UpgradeToolsRequestType
    +
    +func init() {
    +	t["UpgradeTools_Task"] = reflect.TypeOf((*UpgradeTools_Task)(nil)).Elem()
    +}
    +
    +type UpgradeTools_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type UpgradeVMRequestType struct {
    +	This    ManagedObjectReference `xml:"_this"`
    +	Version string                 `xml:"version,omitempty"`
    +}
    +
    +func init() {
    +	t["UpgradeVMRequestType"] = reflect.TypeOf((*UpgradeVMRequestType)(nil)).Elem()
    +}
    +
    +type UpgradeVM_Task UpgradeVMRequestType
    +
    +func init() {
    +	t["UpgradeVM_Task"] = reflect.TypeOf((*UpgradeVM_Task)(nil)).Elem()
    +}
    +
    +type UpgradeVM_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type UpgradeVmLayout UpgradeVmLayoutRequestType
    +
    +func init() {
    +	t["UpgradeVmLayout"] = reflect.TypeOf((*UpgradeVmLayout)(nil)).Elem()
    +}
    +
    +type UpgradeVmLayoutRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["UpgradeVmLayoutRequestType"] = reflect.TypeOf((*UpgradeVmLayoutRequestType)(nil)).Elem()
    +}
    +
    +type UpgradeVmLayoutResponse struct {
    +}
    +
    +type UpgradeVmfs UpgradeVmfsRequestType
    +
    +func init() {
    +	t["UpgradeVmfs"] = reflect.TypeOf((*UpgradeVmfs)(nil)).Elem()
    +}
    +
    +type UpgradeVmfsRequestType struct {
    +	This     ManagedObjectReference `xml:"_this"`
    +	VmfsPath string                 `xml:"vmfsPath"`
    +}
    +
    +func init() {
    +	t["UpgradeVmfsRequestType"] = reflect.TypeOf((*UpgradeVmfsRequestType)(nil)).Elem()
    +}
    +
    +type UpgradeVmfsResponse struct {
    +}
    +
    +type UpgradeVsanObjects UpgradeVsanObjectsRequestType
    +
    +func init() {
    +	t["UpgradeVsanObjects"] = reflect.TypeOf((*UpgradeVsanObjects)(nil)).Elem()
    +}
    +
    +type UpgradeVsanObjectsRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	Uuids      []string               `xml:"uuids"`
    +	NewVersion int32                  `xml:"newVersion"`
    +}
    +
    +func init() {
    +	t["UpgradeVsanObjectsRequestType"] = reflect.TypeOf((*UpgradeVsanObjectsRequestType)(nil)).Elem()
    +}
    +
    +type UpgradeVsanObjectsResponse struct {
    +	Returnval []HostVsanInternalSystemVsanObjectOperationResult `xml:"returnval,omitempty"`
    +}
    +
    +type UplinkPortMtuNotSupportEvent struct {
    +	DvsHealthStatusChangeEvent
    +}
    +
    +func init() {
    +	t["UplinkPortMtuNotSupportEvent"] = reflect.TypeOf((*UplinkPortMtuNotSupportEvent)(nil)).Elem()
    +}
    +
    +type UplinkPortMtuSupportEvent struct {
    +	DvsHealthStatusChangeEvent
    +}
    +
    +func init() {
    +	t["UplinkPortMtuSupportEvent"] = reflect.TypeOf((*UplinkPortMtuSupportEvent)(nil)).Elem()
    +}
    +
    +type UplinkPortVlanTrunkedEvent struct {
    +	DvsHealthStatusChangeEvent
    +}
    +
    +func init() {
    +	t["UplinkPortVlanTrunkedEvent"] = reflect.TypeOf((*UplinkPortVlanTrunkedEvent)(nil)).Elem()
    +}
    +
    +type UplinkPortVlanUntrunkedEvent struct {
    +	DvsHealthStatusChangeEvent
    +}
    +
    +func init() {
    +	t["UplinkPortVlanUntrunkedEvent"] = reflect.TypeOf((*UplinkPortVlanUntrunkedEvent)(nil)).Elem()
    +}
    +
    +type UploadClientCert UploadClientCertRequestType
    +
    +func init() {
    +	t["UploadClientCert"] = reflect.TypeOf((*UploadClientCert)(nil)).Elem()
    +}
    +
    +type UploadClientCertRequestType struct {
    +	This        ManagedObjectReference `xml:"_this"`
    +	Cluster     KeyProviderId          `xml:"cluster"`
    +	Certificate string                 `xml:"certificate"`
    +	PrivateKey  string                 `xml:"privateKey"`
    +}
    +
    +func init() {
    +	t["UploadClientCertRequestType"] = reflect.TypeOf((*UploadClientCertRequestType)(nil)).Elem()
    +}
    +
    +type UploadClientCertResponse struct {
    +}
    +
    +type UploadKmipServerCert UploadKmipServerCertRequestType
    +
    +func init() {
    +	t["UploadKmipServerCert"] = reflect.TypeOf((*UploadKmipServerCert)(nil)).Elem()
    +}
    +
    +type UploadKmipServerCertRequestType struct {
    +	This        ManagedObjectReference `xml:"_this"`
    +	Cluster     KeyProviderId          `xml:"cluster"`
    +	Certificate string                 `xml:"certificate"`
    +}
    +
    +func init() {
    +	t["UploadKmipServerCertRequestType"] = reflect.TypeOf((*UploadKmipServerCertRequestType)(nil)).Elem()
    +}
    +
    +type UploadKmipServerCertResponse struct {
    +}
    +
    +type UsbScanCodeSpec struct {
    +	DynamicData
    +
    +	KeyEvents []UsbScanCodeSpecKeyEvent `xml:"keyEvents"`
    +}
    +
    +func init() {
    +	t["UsbScanCodeSpec"] = reflect.TypeOf((*UsbScanCodeSpec)(nil)).Elem()
    +}
    +
    +type UsbScanCodeSpecKeyEvent struct {
    +	DynamicData
    +
    +	UsbHidCode int32                        `xml:"usbHidCode"`
    +	Modifiers  *UsbScanCodeSpecModifierType `xml:"modifiers,omitempty"`
    +}
    +
    +func init() {
    +	t["UsbScanCodeSpecKeyEvent"] = reflect.TypeOf((*UsbScanCodeSpecKeyEvent)(nil)).Elem()
    +}
    +
    +type UsbScanCodeSpecModifierType struct {
    +	DynamicData
    +
    +	LeftControl  *bool `xml:"leftControl"`
    +	LeftShift    *bool `xml:"leftShift"`
    +	LeftAlt      *bool `xml:"leftAlt"`
    +	LeftGui      *bool `xml:"leftGui"`
    +	RightControl *bool `xml:"rightControl"`
    +	RightShift   *bool `xml:"rightShift"`
    +	RightAlt     *bool `xml:"rightAlt"`
    +	RightGui     *bool `xml:"rightGui"`
    +}
    +
    +func init() {
    +	t["UsbScanCodeSpecModifierType"] = reflect.TypeOf((*UsbScanCodeSpecModifierType)(nil)).Elem()
    +}
    +
    +type UserAssignedToGroup struct {
    +	HostEvent
    +
    +	UserLogin string `xml:"userLogin"`
    +	Group     string `xml:"group"`
    +}
    +
    +func init() {
    +	t["UserAssignedToGroup"] = reflect.TypeOf((*UserAssignedToGroup)(nil)).Elem()
    +}
    +
    +type UserGroupProfile struct {
    +	ApplyProfile
    +
    +	Key string `xml:"key"`
    +}
    +
    +func init() {
    +	t["UserGroupProfile"] = reflect.TypeOf((*UserGroupProfile)(nil)).Elem()
    +}
    +
    +type UserInputRequiredParameterMetadata struct {
    +	ProfilePolicyOptionMetadata
    +
    +	UserInputParameter []ProfileParameterMetadata `xml:"userInputParameter,omitempty"`
    +}
    +
    +func init() {
    +	t["UserInputRequiredParameterMetadata"] = reflect.TypeOf((*UserInputRequiredParameterMetadata)(nil)).Elem()
    +}
    +
    +type UserLoginSessionEvent struct {
    +	SessionEvent
    +
    +	IpAddress string `xml:"ipAddress"`
    +	UserAgent string `xml:"userAgent,omitempty"`
    +	Locale    string `xml:"locale"`
    +	SessionId string `xml:"sessionId"`
    +}
    +
    +func init() {
    +	t["UserLoginSessionEvent"] = reflect.TypeOf((*UserLoginSessionEvent)(nil)).Elem()
    +}
    +
    +type UserLogoutSessionEvent struct {
    +	SessionEvent
    +
    +	IpAddress string     `xml:"ipAddress,omitempty"`
    +	UserAgent string     `xml:"userAgent,omitempty"`
    +	CallCount int64      `xml:"callCount,omitempty"`
    +	SessionId string     `xml:"sessionId,omitempty"`
    +	LoginTime *time.Time `xml:"loginTime"`
    +}
    +
    +func init() {
    +	t["UserLogoutSessionEvent"] = reflect.TypeOf((*UserLogoutSessionEvent)(nil)).Elem()
    +}
    +
    +type UserNotFound struct {
    +	VimFault
    +
    +	Principal  string `xml:"principal"`
    +	Unresolved bool   `xml:"unresolved"`
    +}
    +
    +func init() {
    +	t["UserNotFound"] = reflect.TypeOf((*UserNotFound)(nil)).Elem()
    +}
    +
    +type UserNotFoundFault UserNotFound
    +
    +func init() {
    +	t["UserNotFoundFault"] = reflect.TypeOf((*UserNotFoundFault)(nil)).Elem()
    +}
    +
    +type UserPasswordChanged struct {
    +	HostEvent
    +
    +	UserLogin string `xml:"userLogin"`
    +}
    +
    +func init() {
    +	t["UserPasswordChanged"] = reflect.TypeOf((*UserPasswordChanged)(nil)).Elem()
    +}
    +
    +type UserPrivilegeResult struct {
    +	DynamicData
    +
    +	Entity     ManagedObjectReference `xml:"entity"`
    +	Privileges []string               `xml:"privileges,omitempty"`
    +}
    +
    +func init() {
    +	t["UserPrivilegeResult"] = reflect.TypeOf((*UserPrivilegeResult)(nil)).Elem()
    +}
    +
    +type UserProfile struct {
    +	ApplyProfile
    +
    +	Key string `xml:"key"`
    +}
    +
    +func init() {
    +	t["UserProfile"] = reflect.TypeOf((*UserProfile)(nil)).Elem()
    +}
    +
    +type UserSearchResult struct {
    +	DynamicData
    +
    +	Principal string `xml:"principal"`
    +	FullName  string `xml:"fullName,omitempty"`
    +	Group     bool   `xml:"group"`
    +}
    +
    +func init() {
    +	t["UserSearchResult"] = reflect.TypeOf((*UserSearchResult)(nil)).Elem()
    +}
    +
    +type UserSession struct {
    +	DynamicData
    +
    +	Key              string    `xml:"key"`
    +	UserName         string    `xml:"userName"`
    +	FullName         string    `xml:"fullName"`
    +	LoginTime        time.Time `xml:"loginTime"`
    +	LastActiveTime   time.Time `xml:"lastActiveTime"`
    +	Locale           string    `xml:"locale"`
    +	MessageLocale    string    `xml:"messageLocale"`
    +	ExtensionSession *bool     `xml:"extensionSession"`
    +	IpAddress        string    `xml:"ipAddress,omitempty"`
    +	UserAgent        string    `xml:"userAgent,omitempty"`
    +	CallCount        int64     `xml:"callCount,omitempty"`
    +}
    +
    +func init() {
    +	t["UserSession"] = reflect.TypeOf((*UserSession)(nil)).Elem()
    +}
    +
    +type UserUnassignedFromGroup struct {
    +	HostEvent
    +
    +	UserLogin string `xml:"userLogin"`
    +	Group     string `xml:"group"`
    +}
    +
    +func init() {
    +	t["UserUnassignedFromGroup"] = reflect.TypeOf((*UserUnassignedFromGroup)(nil)).Elem()
    +}
    +
    +type UserUpgradeEvent struct {
    +	UpgradeEvent
    +}
    +
    +func init() {
    +	t["UserUpgradeEvent"] = reflect.TypeOf((*UserUpgradeEvent)(nil)).Elem()
    +}
    +
    +type VASAStorageArray struct {
    +	DynamicData
    +
    +	Name     string `xml:"name"`
    +	Uuid     string `xml:"uuid"`
    +	VendorId string `xml:"vendorId"`
    +	ModelId  string `xml:"modelId"`
    +}
    +
    +func init() {
    +	t["VASAStorageArray"] = reflect.TypeOf((*VASAStorageArray)(nil)).Elem()
    +}
    +
    +type VAppCloneSpec struct {
    +	DynamicData
    +
    +	Location        ManagedObjectReference            `xml:"location"`
    +	Host            *ManagedObjectReference           `xml:"host,omitempty"`
    +	ResourceSpec    *ResourceConfigSpec               `xml:"resourceSpec,omitempty"`
    +	VmFolder        *ManagedObjectReference           `xml:"vmFolder,omitempty"`
    +	NetworkMapping  []VAppCloneSpecNetworkMappingPair `xml:"networkMapping,omitempty"`
    +	Property        []KeyValue                        `xml:"property,omitempty"`
    +	ResourceMapping []VAppCloneSpecResourceMap        `xml:"resourceMapping,omitempty"`
    +	Provisioning    string                            `xml:"provisioning,omitempty"`
    +}
    +
    +func init() {
    +	t["VAppCloneSpec"] = reflect.TypeOf((*VAppCloneSpec)(nil)).Elem()
    +}
    +
    +type VAppCloneSpecNetworkMappingPair struct {
    +	DynamicData
    +
    +	Source      ManagedObjectReference `xml:"source"`
    +	Destination ManagedObjectReference `xml:"destination"`
    +}
    +
    +func init() {
    +	t["VAppCloneSpecNetworkMappingPair"] = reflect.TypeOf((*VAppCloneSpecNetworkMappingPair)(nil)).Elem()
    +}
    +
    +type VAppCloneSpecResourceMap struct {
    +	DynamicData
    +
    +	Source       ManagedObjectReference  `xml:"source"`
    +	Parent       *ManagedObjectReference `xml:"parent,omitempty"`
    +	ResourceSpec *ResourceConfigSpec     `xml:"resourceSpec,omitempty"`
    +	Location     *ManagedObjectReference `xml:"location,omitempty"`
    +}
    +
    +func init() {
    +	t["VAppCloneSpecResourceMap"] = reflect.TypeOf((*VAppCloneSpecResourceMap)(nil)).Elem()
    +}
    +
    +type VAppConfigFault struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["VAppConfigFault"] = reflect.TypeOf((*VAppConfigFault)(nil)).Elem()
    +}
    +
    +type VAppConfigFaultFault BaseVAppConfigFault
    +
    +func init() {
    +	t["VAppConfigFaultFault"] = reflect.TypeOf((*VAppConfigFaultFault)(nil)).Elem()
    +}
    +
    +type VAppConfigInfo struct {
    +	VmConfigInfo
    +
    +	EntityConfig []VAppEntityConfigInfo `xml:"entityConfig,omitempty"`
    +	Annotation   string                 `xml:"annotation"`
    +	InstanceUuid string                 `xml:"instanceUuid,omitempty"`
    +	ManagedBy    *ManagedByInfo         `xml:"managedBy,omitempty"`
    +}
    +
    +func init() {
    +	t["VAppConfigInfo"] = reflect.TypeOf((*VAppConfigInfo)(nil)).Elem()
    +}
    +
    +type VAppConfigSpec struct {
    +	VmConfigSpec
    +
    +	EntityConfig []VAppEntityConfigInfo `xml:"entityConfig,omitempty"`
    +	Annotation   string                 `xml:"annotation,omitempty"`
    +	InstanceUuid string                 `xml:"instanceUuid,omitempty"`
    +	ManagedBy    *ManagedByInfo         `xml:"managedBy,omitempty"`
    +}
    +
    +func init() {
    +	t["VAppConfigSpec"] = reflect.TypeOf((*VAppConfigSpec)(nil)).Elem()
    +}
    +
    +type VAppEntityConfigInfo struct {
    +	DynamicData
    +
    +	Key               *ManagedObjectReference `xml:"key,omitempty"`
    +	Tag               string                  `xml:"tag,omitempty"`
    +	StartOrder        int32                   `xml:"startOrder,omitempty"`
    +	StartDelay        int32                   `xml:"startDelay,omitempty"`
    +	WaitingForGuest   *bool                   `xml:"waitingForGuest"`
    +	StartAction       string                  `xml:"startAction,omitempty"`
    +	StopDelay         int32                   `xml:"stopDelay,omitempty"`
    +	StopAction        string                  `xml:"stopAction,omitempty"`
    +	DestroyWithParent *bool                   `xml:"destroyWithParent"`
    +}
    +
    +func init() {
    +	t["VAppEntityConfigInfo"] = reflect.TypeOf((*VAppEntityConfigInfo)(nil)).Elem()
    +}
    +
    +type VAppIPAssignmentInfo struct {
    +	DynamicData
    +
    +	SupportedAllocationScheme []string `xml:"supportedAllocationScheme,omitempty"`
    +	IpAllocationPolicy        string   `xml:"ipAllocationPolicy,omitempty"`
    +	SupportedIpProtocol       []string `xml:"supportedIpProtocol,omitempty"`
    +	IpProtocol                string   `xml:"ipProtocol,omitempty"`
    +}
    +
    +func init() {
    +	t["VAppIPAssignmentInfo"] = reflect.TypeOf((*VAppIPAssignmentInfo)(nil)).Elem()
    +}
    +
    +type VAppNotRunning struct {
    +	VmConfigFault
    +}
    +
    +func init() {
    +	t["VAppNotRunning"] = reflect.TypeOf((*VAppNotRunning)(nil)).Elem()
    +}
    +
    +type VAppNotRunningFault VAppNotRunning
    +
    +func init() {
    +	t["VAppNotRunningFault"] = reflect.TypeOf((*VAppNotRunningFault)(nil)).Elem()
    +}
    +
    +type VAppOperationInProgress struct {
    +	RuntimeFault
    +}
    +
    +func init() {
    +	t["VAppOperationInProgress"] = reflect.TypeOf((*VAppOperationInProgress)(nil)).Elem()
    +}
    +
    +type VAppOperationInProgressFault VAppOperationInProgress
    +
    +func init() {
    +	t["VAppOperationInProgressFault"] = reflect.TypeOf((*VAppOperationInProgressFault)(nil)).Elem()
    +}
    +
    +type VAppOvfSectionInfo struct {
    +	DynamicData
    +
    +	Key             int32  `xml:"key,omitempty"`
    +	Namespace       string `xml:"namespace,omitempty"`
    +	Type            string `xml:"type,omitempty"`
    +	AtEnvelopeLevel *bool  `xml:"atEnvelopeLevel"`
    +	Contents        string `xml:"contents,omitempty"`
    +}
    +
    +func init() {
    +	t["VAppOvfSectionInfo"] = reflect.TypeOf((*VAppOvfSectionInfo)(nil)).Elem()
    +}
    +
    +type VAppOvfSectionSpec struct {
    +	ArrayUpdateSpec
    +
    +	Info *VAppOvfSectionInfo `xml:"info,omitempty"`
    +}
    +
    +func init() {
    +	t["VAppOvfSectionSpec"] = reflect.TypeOf((*VAppOvfSectionSpec)(nil)).Elem()
    +}
    +
    +type VAppProductInfo struct {
    +	DynamicData
    +
    +	Key         int32  `xml:"key"`
    +	ClassId     string `xml:"classId,omitempty"`
    +	InstanceId  string `xml:"instanceId,omitempty"`
    +	Name        string `xml:"name,omitempty"`
    +	Vendor      string `xml:"vendor,omitempty"`
    +	Version     string `xml:"version,omitempty"`
    +	FullVersion string `xml:"fullVersion,omitempty"`
    +	VendorUrl   string `xml:"vendorUrl,omitempty"`
    +	ProductUrl  string `xml:"productUrl,omitempty"`
    +	AppUrl      string `xml:"appUrl,omitempty"`
    +}
    +
    +func init() {
    +	t["VAppProductInfo"] = reflect.TypeOf((*VAppProductInfo)(nil)).Elem()
    +}
    +
    +type VAppProductSpec struct {
    +	ArrayUpdateSpec
    +
    +	Info *VAppProductInfo `xml:"info,omitempty"`
    +}
    +
    +func init() {
    +	t["VAppProductSpec"] = reflect.TypeOf((*VAppProductSpec)(nil)).Elem()
    +}
    +
    +type VAppPropertyFault struct {
    +	VmConfigFault
    +
    +	Id       string `xml:"id"`
    +	Category string `xml:"category"`
    +	Label    string `xml:"label"`
    +	Type     string `xml:"type"`
    +	Value    string `xml:"value"`
    +}
    +
    +func init() {
    +	t["VAppPropertyFault"] = reflect.TypeOf((*VAppPropertyFault)(nil)).Elem()
    +}
    +
    +type VAppPropertyFaultFault BaseVAppPropertyFault
    +
    +func init() {
    +	t["VAppPropertyFaultFault"] = reflect.TypeOf((*VAppPropertyFaultFault)(nil)).Elem()
    +}
    +
    +type VAppPropertyInfo struct {
    +	DynamicData
    +
    +	Key              int32  `xml:"key"`
    +	ClassId          string `xml:"classId,omitempty"`
    +	InstanceId       string `xml:"instanceId,omitempty"`
    +	Id               string `xml:"id,omitempty"`
    +	Category         string `xml:"category,omitempty"`
    +	Label            string `xml:"label,omitempty"`
    +	Type             string `xml:"type,omitempty"`
    +	TypeReference    string `xml:"typeReference,omitempty"`
    +	UserConfigurable *bool  `xml:"userConfigurable"`
    +	DefaultValue     string `xml:"defaultValue,omitempty"`
    +	Value            string `xml:"value,omitempty"`
    +	Description      string `xml:"description,omitempty"`
    +}
    +
    +func init() {
    +	t["VAppPropertyInfo"] = reflect.TypeOf((*VAppPropertyInfo)(nil)).Elem()
    +}
    +
    +type VAppPropertySpec struct {
    +	ArrayUpdateSpec
    +
    +	Info *VAppPropertyInfo `xml:"info,omitempty"`
    +}
    +
    +func init() {
    +	t["VAppPropertySpec"] = reflect.TypeOf((*VAppPropertySpec)(nil)).Elem()
    +}
    +
    +type VAppTaskInProgress struct {
    +	TaskInProgress
    +}
    +
    +func init() {
    +	t["VAppTaskInProgress"] = reflect.TypeOf((*VAppTaskInProgress)(nil)).Elem()
    +}
    +
    +type VAppTaskInProgressFault VAppTaskInProgress
    +
    +func init() {
    +	t["VAppTaskInProgressFault"] = reflect.TypeOf((*VAppTaskInProgressFault)(nil)).Elem()
    +}
    +
    +type VFlashCacheHotConfigNotSupported struct {
    +	VmConfigFault
    +}
    +
    +func init() {
    +	t["VFlashCacheHotConfigNotSupported"] = reflect.TypeOf((*VFlashCacheHotConfigNotSupported)(nil)).Elem()
    +}
    +
    +type VFlashCacheHotConfigNotSupportedFault VFlashCacheHotConfigNotSupported
    +
    +func init() {
    +	t["VFlashCacheHotConfigNotSupportedFault"] = reflect.TypeOf((*VFlashCacheHotConfigNotSupportedFault)(nil)).Elem()
    +}
    +
    +type VFlashModuleNotSupported struct {
    +	VmConfigFault
    +
    +	VmName     string `xml:"vmName"`
    +	ModuleName string `xml:"moduleName"`
    +	Reason     string `xml:"reason"`
    +	HostName   string `xml:"hostName"`
    +}
    +
    +func init() {
    +	t["VFlashModuleNotSupported"] = reflect.TypeOf((*VFlashModuleNotSupported)(nil)).Elem()
    +}
    +
    +type VFlashModuleNotSupportedFault VFlashModuleNotSupported
    +
    +func init() {
    +	t["VFlashModuleNotSupportedFault"] = reflect.TypeOf((*VFlashModuleNotSupportedFault)(nil)).Elem()
    +}
    +
    +type VFlashModuleVersionIncompatible struct {
    +	VimFault
    +
    +	ModuleName             string `xml:"moduleName"`
    +	VmRequestModuleVersion string `xml:"vmRequestModuleVersion"`
    +	HostMinSupportedVerson string `xml:"hostMinSupportedVerson"`
    +	HostModuleVersion      string `xml:"hostModuleVersion"`
    +}
    +
    +func init() {
    +	t["VFlashModuleVersionIncompatible"] = reflect.TypeOf((*VFlashModuleVersionIncompatible)(nil)).Elem()
    +}
    +
    +type VFlashModuleVersionIncompatibleFault VFlashModuleVersionIncompatible
    +
    +func init() {
    +	t["VFlashModuleVersionIncompatibleFault"] = reflect.TypeOf((*VFlashModuleVersionIncompatibleFault)(nil)).Elem()
    +}
    +
    +type VMFSDatastoreCreatedEvent struct {
    +	HostEvent
    +
    +	Datastore    DatastoreEventArgument `xml:"datastore"`
    +	DatastoreUrl string                 `xml:"datastoreUrl,omitempty"`
    +}
    +
    +func init() {
    +	t["VMFSDatastoreCreatedEvent"] = reflect.TypeOf((*VMFSDatastoreCreatedEvent)(nil)).Elem()
    +}
    +
    +type VMFSDatastoreExpandedEvent struct {
    +	HostEvent
    +
    +	Datastore DatastoreEventArgument `xml:"datastore"`
    +}
    +
    +func init() {
    +	t["VMFSDatastoreExpandedEvent"] = reflect.TypeOf((*VMFSDatastoreExpandedEvent)(nil)).Elem()
    +}
    +
    +type VMFSDatastoreExtendedEvent struct {
    +	HostEvent
    +
    +	Datastore DatastoreEventArgument `xml:"datastore"`
    +}
    +
    +func init() {
    +	t["VMFSDatastoreExtendedEvent"] = reflect.TypeOf((*VMFSDatastoreExtendedEvent)(nil)).Elem()
    +}
    +
    +type VMINotSupported struct {
    +	DeviceNotSupported
    +}
    +
    +func init() {
    +	t["VMINotSupported"] = reflect.TypeOf((*VMINotSupported)(nil)).Elem()
    +}
    +
    +type VMINotSupportedFault VMINotSupported
    +
    +func init() {
    +	t["VMINotSupportedFault"] = reflect.TypeOf((*VMINotSupportedFault)(nil)).Elem()
    +}
    +
    +type VMOnConflictDVPort struct {
    +	CannotAccessNetwork
    +}
    +
    +func init() {
    +	t["VMOnConflictDVPort"] = reflect.TypeOf((*VMOnConflictDVPort)(nil)).Elem()
    +}
    +
    +type VMOnConflictDVPortFault VMOnConflictDVPort
    +
    +func init() {
    +	t["VMOnConflictDVPortFault"] = reflect.TypeOf((*VMOnConflictDVPortFault)(nil)).Elem()
    +}
    +
    +type VMOnVirtualIntranet struct {
    +	CannotAccessNetwork
    +}
    +
    +func init() {
    +	t["VMOnVirtualIntranet"] = reflect.TypeOf((*VMOnVirtualIntranet)(nil)).Elem()
    +}
    +
    +type VMOnVirtualIntranetFault VMOnVirtualIntranet
    +
    +func init() {
    +	t["VMOnVirtualIntranetFault"] = reflect.TypeOf((*VMOnVirtualIntranetFault)(nil)).Elem()
    +}
    +
    +type VMotionAcrossNetworkNotSupported struct {
    +	MigrationFeatureNotSupported
    +}
    +
    +func init() {
    +	t["VMotionAcrossNetworkNotSupported"] = reflect.TypeOf((*VMotionAcrossNetworkNotSupported)(nil)).Elem()
    +}
    +
    +type VMotionAcrossNetworkNotSupportedFault VMotionAcrossNetworkNotSupported
    +
    +func init() {
    +	t["VMotionAcrossNetworkNotSupportedFault"] = reflect.TypeOf((*VMotionAcrossNetworkNotSupportedFault)(nil)).Elem()
    +}
    +
    +type VMotionInterfaceIssue struct {
    +	MigrationFault
    +
    +	AtSourceHost     bool                    `xml:"atSourceHost"`
    +	FailedHost       string                  `xml:"failedHost"`
    +	FailedHostEntity *ManagedObjectReference `xml:"failedHostEntity,omitempty"`
    +}
    +
    +func init() {
    +	t["VMotionInterfaceIssue"] = reflect.TypeOf((*VMotionInterfaceIssue)(nil)).Elem()
    +}
    +
    +type VMotionInterfaceIssueFault BaseVMotionInterfaceIssue
    +
    +func init() {
    +	t["VMotionInterfaceIssueFault"] = reflect.TypeOf((*VMotionInterfaceIssueFault)(nil)).Elem()
    +}
    +
    +type VMotionLicenseExpiredEvent struct {
    +	LicenseEvent
    +}
    +
    +func init() {
    +	t["VMotionLicenseExpiredEvent"] = reflect.TypeOf((*VMotionLicenseExpiredEvent)(nil)).Elem()
    +}
    +
    +type VMotionLinkCapacityLow struct {
    +	VMotionInterfaceIssue
    +
    +	Network string `xml:"network"`
    +}
    +
    +func init() {
    +	t["VMotionLinkCapacityLow"] = reflect.TypeOf((*VMotionLinkCapacityLow)(nil)).Elem()
    +}
    +
    +type VMotionLinkCapacityLowFault VMotionLinkCapacityLow
    +
    +func init() {
    +	t["VMotionLinkCapacityLowFault"] = reflect.TypeOf((*VMotionLinkCapacityLowFault)(nil)).Elem()
    +}
    +
    +type VMotionLinkDown struct {
    +	VMotionInterfaceIssue
    +
    +	Network string `xml:"network"`
    +}
    +
    +func init() {
    +	t["VMotionLinkDown"] = reflect.TypeOf((*VMotionLinkDown)(nil)).Elem()
    +}
    +
    +type VMotionLinkDownFault VMotionLinkDown
    +
    +func init() {
    +	t["VMotionLinkDownFault"] = reflect.TypeOf((*VMotionLinkDownFault)(nil)).Elem()
    +}
    +
    +type VMotionNotConfigured struct {
    +	VMotionInterfaceIssue
    +}
    +
    +func init() {
    +	t["VMotionNotConfigured"] = reflect.TypeOf((*VMotionNotConfigured)(nil)).Elem()
    +}
    +
    +type VMotionNotConfiguredFault VMotionNotConfigured
    +
    +func init() {
    +	t["VMotionNotConfiguredFault"] = reflect.TypeOf((*VMotionNotConfiguredFault)(nil)).Elem()
    +}
    +
    +type VMotionNotLicensed struct {
    +	VMotionInterfaceIssue
    +}
    +
    +func init() {
    +	t["VMotionNotLicensed"] = reflect.TypeOf((*VMotionNotLicensed)(nil)).Elem()
    +}
    +
    +type VMotionNotLicensedFault VMotionNotLicensed
    +
    +func init() {
    +	t["VMotionNotLicensedFault"] = reflect.TypeOf((*VMotionNotLicensedFault)(nil)).Elem()
    +}
    +
    +type VMotionNotSupported struct {
    +	VMotionInterfaceIssue
    +}
    +
    +func init() {
    +	t["VMotionNotSupported"] = reflect.TypeOf((*VMotionNotSupported)(nil)).Elem()
    +}
    +
    +type VMotionNotSupportedFault VMotionNotSupported
    +
    +func init() {
    +	t["VMotionNotSupportedFault"] = reflect.TypeOf((*VMotionNotSupportedFault)(nil)).Elem()
    +}
    +
    +type VMotionProtocolIncompatible struct {
    +	MigrationFault
    +}
    +
    +func init() {
    +	t["VMotionProtocolIncompatible"] = reflect.TypeOf((*VMotionProtocolIncompatible)(nil)).Elem()
    +}
    +
    +type VMotionProtocolIncompatibleFault VMotionProtocolIncompatible
    +
    +func init() {
    +	t["VMotionProtocolIncompatibleFault"] = reflect.TypeOf((*VMotionProtocolIncompatibleFault)(nil)).Elem()
    +}
    +
    +type VMwareDVSConfigInfo struct {
    +	DVSConfigInfo
    +
    +	VspanSession                []VMwareVspanSession         `xml:"vspanSession,omitempty"`
    +	PvlanConfig                 []VMwareDVSPvlanMapEntry     `xml:"pvlanConfig,omitempty"`
    +	MaxMtu                      int32                        `xml:"maxMtu"`
    +	LinkDiscoveryProtocolConfig *LinkDiscoveryProtocolConfig `xml:"linkDiscoveryProtocolConfig,omitempty"`
    +	IpfixConfig                 *VMwareIpfixConfig           `xml:"ipfixConfig,omitempty"`
    +	LacpGroupConfig             []VMwareDvsLacpGroupConfig   `xml:"lacpGroupConfig,omitempty"`
    +	LacpApiVersion              string                       `xml:"lacpApiVersion,omitempty"`
    +	MulticastFilteringMode      string                       `xml:"multicastFilteringMode,omitempty"`
    +}
    +
    +func init() {
    +	t["VMwareDVSConfigInfo"] = reflect.TypeOf((*VMwareDVSConfigInfo)(nil)).Elem()
    +}
    +
    +type VMwareDVSConfigSpec struct {
    +	DVSConfigSpec
    +
    +	PvlanConfigSpec             []VMwareDVSPvlanConfigSpec   `xml:"pvlanConfigSpec,omitempty"`
    +	VspanConfigSpec             []VMwareDVSVspanConfigSpec   `xml:"vspanConfigSpec,omitempty"`
    +	MaxMtu                      int32                        `xml:"maxMtu,omitempty"`
    +	LinkDiscoveryProtocolConfig *LinkDiscoveryProtocolConfig `xml:"linkDiscoveryProtocolConfig,omitempty"`
    +	IpfixConfig                 *VMwareIpfixConfig           `xml:"ipfixConfig,omitempty"`
    +	LacpApiVersion              string                       `xml:"lacpApiVersion,omitempty"`
    +	MulticastFilteringMode      string                       `xml:"multicastFilteringMode,omitempty"`
    +}
    +
    +func init() {
    +	t["VMwareDVSConfigSpec"] = reflect.TypeOf((*VMwareDVSConfigSpec)(nil)).Elem()
    +}
    +
    +type VMwareDVSFeatureCapability struct {
    +	DVSFeatureCapability
    +
    +	VspanSupported             *bool                     `xml:"vspanSupported"`
    +	LldpSupported              *bool                     `xml:"lldpSupported"`
    +	IpfixSupported             *bool                     `xml:"ipfixSupported"`
    +	IpfixCapability            *VMwareDvsIpfixCapability `xml:"ipfixCapability,omitempty"`
    +	MulticastSnoopingSupported *bool                     `xml:"multicastSnoopingSupported"`
    +	VspanCapability            *VMwareDVSVspanCapability `xml:"vspanCapability,omitempty"`
    +	LacpCapability             *VMwareDvsLacpCapability  `xml:"lacpCapability,omitempty"`
    +}
    +
    +func init() {
    +	t["VMwareDVSFeatureCapability"] = reflect.TypeOf((*VMwareDVSFeatureCapability)(nil)).Elem()
    +}
    +
    +type VMwareDVSHealthCheckCapability struct {
    +	DVSHealthCheckCapability
    +
    +	VlanMtuSupported bool `xml:"vlanMtuSupported"`
    +	TeamingSupported bool `xml:"teamingSupported"`
    +}
    +
    +func init() {
    +	t["VMwareDVSHealthCheckCapability"] = reflect.TypeOf((*VMwareDVSHealthCheckCapability)(nil)).Elem()
    +}
    +
    +type VMwareDVSHealthCheckConfig struct {
    +	DVSHealthCheckConfig
    +}
    +
    +func init() {
    +	t["VMwareDVSHealthCheckConfig"] = reflect.TypeOf((*VMwareDVSHealthCheckConfig)(nil)).Elem()
    +}
    +
    +type VMwareDVSMtuHealthCheckResult struct {
    +	HostMemberUplinkHealthCheckResult
    +
    +	MtuMismatch             bool           `xml:"mtuMismatch"`
    +	VlanSupportSwitchMtu    []NumericRange `xml:"vlanSupportSwitchMtu,omitempty"`
    +	VlanNotSupportSwitchMtu []NumericRange `xml:"vlanNotSupportSwitchMtu,omitempty"`
    +}
    +
    +func init() {
    +	t["VMwareDVSMtuHealthCheckResult"] = reflect.TypeOf((*VMwareDVSMtuHealthCheckResult)(nil)).Elem()
    +}
    +
    +type VMwareDVSPortSetting struct {
    +	DVPortSetting
    +
    +	Vlan                BaseVmwareDistributedVirtualSwitchVlanSpec `xml:"vlan,omitempty,typeattr"`
    +	QosTag              *IntPolicy                                 `xml:"qosTag,omitempty"`
    +	UplinkTeamingPolicy *VmwareUplinkPortTeamingPolicy             `xml:"uplinkTeamingPolicy,omitempty"`
    +	SecurityPolicy      *DVSSecurityPolicy                         `xml:"securityPolicy,omitempty"`
    +	IpfixEnabled        *BoolPolicy                                `xml:"ipfixEnabled,omitempty"`
    +	TxUplink            *BoolPolicy                                `xml:"txUplink,omitempty"`
    +	LacpPolicy          *VMwareUplinkLacpPolicy                    `xml:"lacpPolicy,omitempty"`
    +	MacManagementPolicy *DVSMacManagementPolicy                    `xml:"macManagementPolicy,omitempty"`
    +}
    +
    +func init() {
    +	t["VMwareDVSPortSetting"] = reflect.TypeOf((*VMwareDVSPortSetting)(nil)).Elem()
    +}
    +
    +type VMwareDVSPortgroupPolicy struct {
    +	DVPortgroupPolicy
    +
    +	VlanOverrideAllowed           bool  `xml:"vlanOverrideAllowed"`
    +	UplinkTeamingOverrideAllowed  bool  `xml:"uplinkTeamingOverrideAllowed"`
    +	SecurityPolicyOverrideAllowed bool  `xml:"securityPolicyOverrideAllowed"`
    +	IpfixOverrideAllowed          *bool `xml:"ipfixOverrideAllowed"`
    +}
    +
    +func init() {
    +	t["VMwareDVSPortgroupPolicy"] = reflect.TypeOf((*VMwareDVSPortgroupPolicy)(nil)).Elem()
    +}
    +
    +type VMwareDVSPvlanConfigSpec struct {
    +	DynamicData
    +
    +	PvlanEntry VMwareDVSPvlanMapEntry `xml:"pvlanEntry"`
    +	Operation  string                 `xml:"operation"`
    +}
    +
    +func init() {
    +	t["VMwareDVSPvlanConfigSpec"] = reflect.TypeOf((*VMwareDVSPvlanConfigSpec)(nil)).Elem()
    +}
    +
    +type VMwareDVSPvlanMapEntry struct {
    +	DynamicData
    +
    +	PrimaryVlanId   int32  `xml:"primaryVlanId"`
    +	SecondaryVlanId int32  `xml:"secondaryVlanId"`
    +	PvlanType       string `xml:"pvlanType"`
    +}
    +
    +func init() {
    +	t["VMwareDVSPvlanMapEntry"] = reflect.TypeOf((*VMwareDVSPvlanMapEntry)(nil)).Elem()
    +}
    +
    +type VMwareDVSTeamingHealthCheckConfig struct {
    +	VMwareDVSHealthCheckConfig
    +}
    +
    +func init() {
    +	t["VMwareDVSTeamingHealthCheckConfig"] = reflect.TypeOf((*VMwareDVSTeamingHealthCheckConfig)(nil)).Elem()
    +}
    +
    +type VMwareDVSTeamingHealthCheckResult struct {
    +	HostMemberHealthCheckResult
    +
    +	TeamingStatus string `xml:"teamingStatus"`
    +}
    +
    +func init() {
    +	t["VMwareDVSTeamingHealthCheckResult"] = reflect.TypeOf((*VMwareDVSTeamingHealthCheckResult)(nil)).Elem()
    +}
    +
    +type VMwareDVSVlanHealthCheckResult struct {
    +	HostMemberUplinkHealthCheckResult
    +
    +	TrunkedVlan   []NumericRange `xml:"trunkedVlan,omitempty"`
    +	UntrunkedVlan []NumericRange `xml:"untrunkedVlan,omitempty"`
    +}
    +
    +func init() {
    +	t["VMwareDVSVlanHealthCheckResult"] = reflect.TypeOf((*VMwareDVSVlanHealthCheckResult)(nil)).Elem()
    +}
    +
    +type VMwareDVSVlanMtuHealthCheckConfig struct {
    +	VMwareDVSHealthCheckConfig
    +}
    +
    +func init() {
    +	t["VMwareDVSVlanMtuHealthCheckConfig"] = reflect.TypeOf((*VMwareDVSVlanMtuHealthCheckConfig)(nil)).Elem()
    +}
    +
    +type VMwareDVSVspanCapability struct {
    +	DynamicData
    +
    +	MixedDestSupported         bool  `xml:"mixedDestSupported"`
    +	DvportSupported            bool  `xml:"dvportSupported"`
    +	RemoteSourceSupported      bool  `xml:"remoteSourceSupported"`
    +	RemoteDestSupported        bool  `xml:"remoteDestSupported"`
    +	EncapRemoteSourceSupported bool  `xml:"encapRemoteSourceSupported"`
    +	ErspanProtocolSupported    *bool `xml:"erspanProtocolSupported"`
    +	MirrorNetstackSupported    *bool `xml:"mirrorNetstackSupported"`
    +}
    +
    +func init() {
    +	t["VMwareDVSVspanCapability"] = reflect.TypeOf((*VMwareDVSVspanCapability)(nil)).Elem()
    +}
    +
    +type VMwareDVSVspanConfigSpec struct {
    +	DynamicData
    +
    +	VspanSession VMwareVspanSession `xml:"vspanSession"`
    +	Operation    string             `xml:"operation"`
    +}
    +
    +func init() {
    +	t["VMwareDVSVspanConfigSpec"] = reflect.TypeOf((*VMwareDVSVspanConfigSpec)(nil)).Elem()
    +}
    +
    +type VMwareDvsIpfixCapability struct {
    +	DynamicData
    +
    +	IpfixSupported               *bool `xml:"ipfixSupported"`
    +	Ipv6ForIpfixSupported        *bool `xml:"ipv6ForIpfixSupported"`
    +	ObservationDomainIdSupported *bool `xml:"observationDomainIdSupported"`
    +}
    +
    +func init() {
    +	t["VMwareDvsIpfixCapability"] = reflect.TypeOf((*VMwareDvsIpfixCapability)(nil)).Elem()
    +}
    +
    +type VMwareDvsLacpCapability struct {
    +	DynamicData
    +
    +	LacpSupported           *bool `xml:"lacpSupported"`
    +	MultiLacpGroupSupported *bool `xml:"multiLacpGroupSupported"`
    +}
    +
    +func init() {
    +	t["VMwareDvsLacpCapability"] = reflect.TypeOf((*VMwareDvsLacpCapability)(nil)).Elem()
    +}
    +
    +type VMwareDvsLacpGroupConfig struct {
    +	DynamicData
    +
    +	Key                  string                   `xml:"key,omitempty"`
    +	Name                 string                   `xml:"name,omitempty"`
    +	Mode                 string                   `xml:"mode,omitempty"`
    +	UplinkNum            int32                    `xml:"uplinkNum,omitempty"`
    +	LoadbalanceAlgorithm string                   `xml:"loadbalanceAlgorithm,omitempty"`
    +	Vlan                 *VMwareDvsLagVlanConfig  `xml:"vlan,omitempty"`
    +	Ipfix                *VMwareDvsLagIpfixConfig `xml:"ipfix,omitempty"`
    +	UplinkName           []string                 `xml:"uplinkName,omitempty"`
    +	UplinkPortKey        []string                 `xml:"uplinkPortKey,omitempty"`
    +}
    +
    +func init() {
    +	t["VMwareDvsLacpGroupConfig"] = reflect.TypeOf((*VMwareDvsLacpGroupConfig)(nil)).Elem()
    +}
    +
    +type VMwareDvsLacpGroupSpec struct {
    +	DynamicData
    +
    +	LacpGroupConfig VMwareDvsLacpGroupConfig `xml:"lacpGroupConfig"`
    +	Operation       string                   `xml:"operation"`
    +}
    +
    +func init() {
    +	t["VMwareDvsLacpGroupSpec"] = reflect.TypeOf((*VMwareDvsLacpGroupSpec)(nil)).Elem()
    +}
    +
    +type VMwareDvsLagIpfixConfig struct {
    +	DynamicData
    +
    +	IpfixEnabled *bool `xml:"ipfixEnabled"`
    +}
    +
    +func init() {
    +	t["VMwareDvsLagIpfixConfig"] = reflect.TypeOf((*VMwareDvsLagIpfixConfig)(nil)).Elem()
    +}
    +
    +type VMwareDvsLagVlanConfig struct {
    +	DynamicData
    +
    +	VlanId []NumericRange `xml:"vlanId,omitempty"`
    +}
    +
    +func init() {
    +	t["VMwareDvsLagVlanConfig"] = reflect.TypeOf((*VMwareDvsLagVlanConfig)(nil)).Elem()
    +}
    +
    +type VMwareIpfixConfig struct {
    +	DynamicData
    +
    +	CollectorIpAddress  string `xml:"collectorIpAddress,omitempty"`
    +	CollectorPort       int32  `xml:"collectorPort,omitempty"`
    +	ObservationDomainId int64  `xml:"observationDomainId,omitempty"`
    +	ActiveFlowTimeout   int32  `xml:"activeFlowTimeout"`
    +	IdleFlowTimeout     int32  `xml:"idleFlowTimeout"`
    +	SamplingRate        int32  `xml:"samplingRate"`
    +	InternalFlowsOnly   bool   `xml:"internalFlowsOnly"`
    +}
    +
    +func init() {
    +	t["VMwareIpfixConfig"] = reflect.TypeOf((*VMwareIpfixConfig)(nil)).Elem()
    +}
    +
    +type VMwareUplinkLacpPolicy struct {
    +	InheritablePolicy
    +
    +	Enable *BoolPolicy   `xml:"enable,omitempty"`
    +	Mode   *StringPolicy `xml:"mode,omitempty"`
    +}
    +
    +func init() {
    +	t["VMwareUplinkLacpPolicy"] = reflect.TypeOf((*VMwareUplinkLacpPolicy)(nil)).Elem()
    +}
    +
    +type VMwareUplinkPortOrderPolicy struct {
    +	InheritablePolicy
    +
    +	ActiveUplinkPort  []string `xml:"activeUplinkPort,omitempty"`
    +	StandbyUplinkPort []string `xml:"standbyUplinkPort,omitempty"`
    +}
    +
    +func init() {
    +	t["VMwareUplinkPortOrderPolicy"] = reflect.TypeOf((*VMwareUplinkPortOrderPolicy)(nil)).Elem()
    +}
    +
    +type VMwareVspanPort struct {
    +	DynamicData
    +
    +	PortKey                   []string `xml:"portKey,omitempty"`
    +	UplinkPortName            []string `xml:"uplinkPortName,omitempty"`
    +	WildcardPortConnecteeType []string `xml:"wildcardPortConnecteeType,omitempty"`
    +	Vlans                     []int32  `xml:"vlans,omitempty"`
    +	IpAddress                 []string `xml:"ipAddress,omitempty"`
    +}
    +
    +func init() {
    +	t["VMwareVspanPort"] = reflect.TypeOf((*VMwareVspanPort)(nil)).Elem()
    +}
    +
    +type VMwareVspanSession struct {
    +	DynamicData
    +
    +	Key                   string           `xml:"key,omitempty"`
    +	Name                  string           `xml:"name,omitempty"`
    +	Description           string           `xml:"description,omitempty"`
    +	Enabled               bool             `xml:"enabled"`
    +	SourcePortTransmitted *VMwareVspanPort `xml:"sourcePortTransmitted,omitempty"`
    +	SourcePortReceived    *VMwareVspanPort `xml:"sourcePortReceived,omitempty"`
    +	DestinationPort       *VMwareVspanPort `xml:"destinationPort,omitempty"`
    +	EncapsulationVlanId   int32            `xml:"encapsulationVlanId,omitempty"`
    +	StripOriginalVlan     bool             `xml:"stripOriginalVlan"`
    +	MirroredPacketLength  int32            `xml:"mirroredPacketLength,omitempty"`
    +	NormalTrafficAllowed  bool             `xml:"normalTrafficAllowed"`
    +	SessionType           string           `xml:"sessionType,omitempty"`
    +	SamplingRate          int32            `xml:"samplingRate,omitempty"`
    +	EncapType             string           `xml:"encapType,omitempty"`
    +	ErspanId              int32            `xml:"erspanId,omitempty"`
    +	ErspanCOS             int32            `xml:"erspanCOS,omitempty"`
    +	ErspanGraNanosec      *bool            `xml:"erspanGraNanosec"`
    +	Netstack              string           `xml:"netstack,omitempty"`
    +}
    +
    +func init() {
    +	t["VMwareVspanSession"] = reflect.TypeOf((*VMwareVspanSession)(nil)).Elem()
    +}
    +
    +type VStorageObject struct {
    +	DynamicData
    +
    +	Config VStorageObjectConfigInfo `xml:"config"`
    +}
    +
    +func init() {
    +	t["VStorageObject"] = reflect.TypeOf((*VStorageObject)(nil)).Elem()
    +}
    +
    +type VStorageObjectAssociations struct {
    +	DynamicData
    +
    +	Id                 ID                                             `xml:"id"`
    +	VmDiskAssociations []VStorageObjectAssociationsVmDiskAssociations `xml:"vmDiskAssociations,omitempty"`
    +	Fault              *LocalizedMethodFault                          `xml:"fault,omitempty"`
    +}
    +
    +func init() {
    +	t["VStorageObjectAssociations"] = reflect.TypeOf((*VStorageObjectAssociations)(nil)).Elem()
    +}
    +
    +type VStorageObjectAssociationsVmDiskAssociations struct {
    +	DynamicData
    +
    +	VmId    string `xml:"vmId"`
    +	DiskKey int32  `xml:"diskKey"`
    +}
    +
    +func init() {
    +	t["VStorageObjectAssociationsVmDiskAssociations"] = reflect.TypeOf((*VStorageObjectAssociationsVmDiskAssociations)(nil)).Elem()
    +}
    +
    +type VStorageObjectConfigInfo struct {
    +	BaseConfigInfo
    +
    +	CapacityInMB    int64    `xml:"capacityInMB"`
    +	ConsumptionType []string `xml:"consumptionType,omitempty"`
    +	ConsumerId      []ID     `xml:"consumerId,omitempty"`
    +}
    +
    +func init() {
    +	t["VStorageObjectConfigInfo"] = reflect.TypeOf((*VStorageObjectConfigInfo)(nil)).Elem()
    +}
    +
    +type VStorageObjectCreateSnapshotRequestType struct {
    +	This        ManagedObjectReference `xml:"_this"`
    +	Id          ID                     `xml:"id"`
    +	Datastore   ManagedObjectReference `xml:"datastore"`
    +	Description string                 `xml:"description"`
    +}
    +
    +func init() {
    +	t["VStorageObjectCreateSnapshotRequestType"] = reflect.TypeOf((*VStorageObjectCreateSnapshotRequestType)(nil)).Elem()
    +}
    +
    +type VStorageObjectCreateSnapshot_Task VStorageObjectCreateSnapshotRequestType
    +
    +func init() {
    +	t["VStorageObjectCreateSnapshot_Task"] = reflect.TypeOf((*VStorageObjectCreateSnapshot_Task)(nil)).Elem()
    +}
    +
    +type VStorageObjectCreateSnapshot_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type VStorageObjectSnapshotInfo struct {
    +	DynamicData
    +
    +	Snapshots []VStorageObjectSnapshotInfoVStorageObjectSnapshot `xml:"snapshots,omitempty"`
    +}
    +
    +func init() {
    +	t["VStorageObjectSnapshotInfo"] = reflect.TypeOf((*VStorageObjectSnapshotInfo)(nil)).Elem()
    +}
    +
    +type VStorageObjectSnapshotInfoVStorageObjectSnapshot struct {
    +	DynamicData
    +
    +	Id              *ID       `xml:"id,omitempty"`
    +	BackingObjectId string    `xml:"backingObjectId,omitempty"`
    +	CreateTime      time.Time `xml:"createTime"`
    +	Description     string    `xml:"description"`
    +}
    +
    +func init() {
    +	t["VStorageObjectSnapshotInfoVStorageObjectSnapshot"] = reflect.TypeOf((*VStorageObjectSnapshotInfoVStorageObjectSnapshot)(nil)).Elem()
    +}
    +
    +type VStorageObjectStateInfo struct {
    +	DynamicData
    +
    +	Tentative *bool `xml:"tentative"`
    +}
    +
    +func init() {
    +	t["VStorageObjectStateInfo"] = reflect.TypeOf((*VStorageObjectStateInfo)(nil)).Elem()
    +}
    +
    +type VVolHostPE struct {
    +	DynamicData
    +
    +	Key              ManagedObjectReference `xml:"key"`
    +	ProtocolEndpoint []HostProtocolEndpoint `xml:"protocolEndpoint"`
    +}
    +
    +func init() {
    +	t["VVolHostPE"] = reflect.TypeOf((*VVolHostPE)(nil)).Elem()
    +}
    +
    +type VVolVmConfigFileUpdateResult struct {
    +	DynamicData
    +
    +	SucceededVmConfigFile []KeyValue                                           `xml:"succeededVmConfigFile,omitempty"`
    +	FailedVmConfigFile    []VVolVmConfigFileUpdateResultFailedVmConfigFileInfo `xml:"failedVmConfigFile,omitempty"`
    +}
    +
    +func init() {
    +	t["VVolVmConfigFileUpdateResult"] = reflect.TypeOf((*VVolVmConfigFileUpdateResult)(nil)).Elem()
    +}
    +
    +type VVolVmConfigFileUpdateResultFailedVmConfigFileInfo struct {
    +	DynamicData
    +
    +	TargetConfigVVolId string               `xml:"targetConfigVVolId"`
    +	Fault              LocalizedMethodFault `xml:"fault"`
    +}
    +
    +func init() {
    +	t["VVolVmConfigFileUpdateResultFailedVmConfigFileInfo"] = reflect.TypeOf((*VVolVmConfigFileUpdateResultFailedVmConfigFileInfo)(nil)).Elem()
    +}
    +
    +type ValidateCredentialsInGuest ValidateCredentialsInGuestRequestType
    +
    +func init() {
    +	t["ValidateCredentialsInGuest"] = reflect.TypeOf((*ValidateCredentialsInGuest)(nil)).Elem()
    +}
    +
    +type ValidateCredentialsInGuestRequestType struct {
    +	This ManagedObjectReference  `xml:"_this"`
    +	Vm   ManagedObjectReference  `xml:"vm"`
    +	Auth BaseGuestAuthentication `xml:"auth,typeattr"`
    +}
    +
    +func init() {
    +	t["ValidateCredentialsInGuestRequestType"] = reflect.TypeOf((*ValidateCredentialsInGuestRequestType)(nil)).Elem()
    +}
    +
    +type ValidateCredentialsInGuestResponse struct {
    +}
    +
    +type ValidateHost ValidateHostRequestType
    +
    +func init() {
    +	t["ValidateHost"] = reflect.TypeOf((*ValidateHost)(nil)).Elem()
    +}
    +
    +type ValidateHostProfileCompositionRequestType struct {
    +	This                   ManagedObjectReference   `xml:"_this"`
    +	Source                 ManagedObjectReference   `xml:"source"`
    +	Targets                []ManagedObjectReference `xml:"targets,omitempty"`
    +	ToBeMerged             *HostApplyProfile        `xml:"toBeMerged,omitempty"`
    +	ToReplaceWith          *HostApplyProfile        `xml:"toReplaceWith,omitempty"`
    +	ToBeDeleted            *HostApplyProfile        `xml:"toBeDeleted,omitempty"`
    +	EnableStatusToBeCopied *HostApplyProfile        `xml:"enableStatusToBeCopied,omitempty"`
    +	ErrorOnly              *bool                    `xml:"errorOnly"`
    +}
    +
    +func init() {
    +	t["ValidateHostProfileCompositionRequestType"] = reflect.TypeOf((*ValidateHostProfileCompositionRequestType)(nil)).Elem()
    +}
    +
    +type ValidateHostProfileComposition_Task ValidateHostProfileCompositionRequestType
    +
    +func init() {
    +	t["ValidateHostProfileComposition_Task"] = reflect.TypeOf((*ValidateHostProfileComposition_Task)(nil)).Elem()
    +}
    +
    +type ValidateHostProfileComposition_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type ValidateHostRequestType struct {
    +	This          ManagedObjectReference `xml:"_this"`
    +	OvfDescriptor string                 `xml:"ovfDescriptor"`
    +	Host          ManagedObjectReference `xml:"host"`
    +	Vhp           OvfValidateHostParams  `xml:"vhp"`
    +}
    +
    +func init() {
    +	t["ValidateHostRequestType"] = reflect.TypeOf((*ValidateHostRequestType)(nil)).Elem()
    +}
    +
    +type ValidateHostResponse struct {
    +	Returnval OvfValidateHostResult `xml:"returnval"`
    +}
    +
    +type ValidateMigration ValidateMigrationRequestType
    +
    +func init() {
    +	t["ValidateMigration"] = reflect.TypeOf((*ValidateMigration)(nil)).Elem()
    +}
    +
    +type ValidateMigrationRequestType struct {
    +	This     ManagedObjectReference   `xml:"_this"`
    +	Vm       []ManagedObjectReference `xml:"vm"`
    +	State    VirtualMachinePowerState `xml:"state,omitempty"`
    +	TestType []string                 `xml:"testType,omitempty"`
    +	Pool     *ManagedObjectReference  `xml:"pool,omitempty"`
    +	Host     *ManagedObjectReference  `xml:"host,omitempty"`
    +}
    +
    +func init() {
    +	t["ValidateMigrationRequestType"] = reflect.TypeOf((*ValidateMigrationRequestType)(nil)).Elem()
    +}
    +
    +type ValidateMigrationResponse struct {
    +	Returnval []BaseEvent `xml:"returnval,omitempty,typeattr"`
    +}
    +
    +type ValidateStoragePodConfig ValidateStoragePodConfigRequestType
    +
    +func init() {
    +	t["ValidateStoragePodConfig"] = reflect.TypeOf((*ValidateStoragePodConfig)(nil)).Elem()
    +}
    +
    +type ValidateStoragePodConfigRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Pod  ManagedObjectReference `xml:"pod"`
    +	Spec StorageDrsConfigSpec   `xml:"spec"`
    +}
    +
    +func init() {
    +	t["ValidateStoragePodConfigRequestType"] = reflect.TypeOf((*ValidateStoragePodConfigRequestType)(nil)).Elem()
    +}
    +
    +type ValidateStoragePodConfigResponse struct {
    +	Returnval *LocalizedMethodFault `xml:"returnval,omitempty"`
    +}
    +
    +type VasaProviderContainerSpec struct {
    +	DynamicData
    +
    +	VasaProviderInfo []VimVasaProviderInfo `xml:"vasaProviderInfo,omitempty"`
    +	ScId             string                `xml:"scId"`
    +	Deleted          bool                  `xml:"deleted"`
    +}
    +
    +func init() {
    +	t["VasaProviderContainerSpec"] = reflect.TypeOf((*VasaProviderContainerSpec)(nil)).Elem()
    +}
    +
    +type VcAgentUninstallFailedEvent struct {
    +	HostEvent
    +
    +	Reason string `xml:"reason,omitempty"`
    +}
    +
    +func init() {
    +	t["VcAgentUninstallFailedEvent"] = reflect.TypeOf((*VcAgentUninstallFailedEvent)(nil)).Elem()
    +}
    +
    +type VcAgentUninstalledEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["VcAgentUninstalledEvent"] = reflect.TypeOf((*VcAgentUninstalledEvent)(nil)).Elem()
    +}
    +
    +type VcAgentUpgradeFailedEvent struct {
    +	HostEvent
    +
    +	Reason string `xml:"reason,omitempty"`
    +}
    +
    +func init() {
    +	t["VcAgentUpgradeFailedEvent"] = reflect.TypeOf((*VcAgentUpgradeFailedEvent)(nil)).Elem()
    +}
    +
    +type VcAgentUpgradedEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["VcAgentUpgradedEvent"] = reflect.TypeOf((*VcAgentUpgradedEvent)(nil)).Elem()
    +}
    +
    +type VchaClusterConfigInfo struct {
    +	DynamicData
    +
    +	FailoverNodeInfo1 *FailoverNodeInfo `xml:"failoverNodeInfo1,omitempty"`
    +	FailoverNodeInfo2 *FailoverNodeInfo `xml:"failoverNodeInfo2,omitempty"`
    +	WitnessNodeInfo   *WitnessNodeInfo  `xml:"witnessNodeInfo,omitempty"`
    +	State             string            `xml:"state"`
    +}
    +
    +func init() {
    +	t["VchaClusterConfigInfo"] = reflect.TypeOf((*VchaClusterConfigInfo)(nil)).Elem()
    +}
    +
    +type VchaClusterConfigSpec struct {
    +	DynamicData
    +
    +	PassiveIp string `xml:"passiveIp"`
    +	WitnessIp string `xml:"witnessIp"`
    +}
    +
    +func init() {
    +	t["VchaClusterConfigSpec"] = reflect.TypeOf((*VchaClusterConfigSpec)(nil)).Elem()
    +}
    +
    +type VchaClusterDeploymentSpec struct {
    +	DynamicData
    +
    +	PassiveDeploymentSpec PassiveNodeDeploymentSpec `xml:"passiveDeploymentSpec"`
    +	WitnessDeploymentSpec BaseNodeDeploymentSpec    `xml:"witnessDeploymentSpec,typeattr"`
    +	ActiveVcSpec          SourceNodeSpec            `xml:"activeVcSpec"`
    +	ActiveVcNetworkConfig *ClusterNetworkConfigSpec `xml:"activeVcNetworkConfig,omitempty"`
    +}
    +
    +func init() {
    +	t["VchaClusterDeploymentSpec"] = reflect.TypeOf((*VchaClusterDeploymentSpec)(nil)).Elem()
    +}
    +
    +type VchaClusterHealth struct {
    +	DynamicData
    +
    +	RuntimeInfo           VchaClusterRuntimeInfo `xml:"runtimeInfo"`
    +	HealthMessages        []LocalizableMessage   `xml:"healthMessages,omitempty"`
    +	AdditionalInformation []LocalizableMessage   `xml:"additionalInformation,omitempty"`
    +}
    +
    +func init() {
    +	t["VchaClusterHealth"] = reflect.TypeOf((*VchaClusterHealth)(nil)).Elem()
    +}
    +
    +type VchaClusterNetworkSpec struct {
    +	DynamicData
    +
    +	WitnessNetworkSpec BaseNodeNetworkSpec    `xml:"witnessNetworkSpec,typeattr"`
    +	PassiveNetworkSpec PassiveNodeNetworkSpec `xml:"passiveNetworkSpec"`
    +}
    +
    +func init() {
    +	t["VchaClusterNetworkSpec"] = reflect.TypeOf((*VchaClusterNetworkSpec)(nil)).Elem()
    +}
    +
    +type VchaClusterRuntimeInfo struct {
    +	DynamicData
    +
    +	ClusterState string                `xml:"clusterState"`
    +	NodeInfo     []VchaNodeRuntimeInfo `xml:"nodeInfo,omitempty"`
    +	ClusterMode  string                `xml:"clusterMode"`
    +}
    +
    +func init() {
    +	t["VchaClusterRuntimeInfo"] = reflect.TypeOf((*VchaClusterRuntimeInfo)(nil)).Elem()
    +}
    +
    +type VchaNodeRuntimeInfo struct {
    +	DynamicData
    +
    +	NodeState string `xml:"nodeState"`
    +	NodeRole  string `xml:"nodeRole"`
    +	NodeIp    string `xml:"nodeIp"`
    +}
    +
    +func init() {
    +	t["VchaNodeRuntimeInfo"] = reflect.TypeOf((*VchaNodeRuntimeInfo)(nil)).Elem()
    +}
    +
    +type VimAccountPasswordChangedEvent struct {
    +	HostEvent
    +}
    +
    +func init() {
    +	t["VimAccountPasswordChangedEvent"] = reflect.TypeOf((*VimAccountPasswordChangedEvent)(nil)).Elem()
    +}
    +
    +type VimFault struct {
    +	MethodFault
    +}
    +
    +func init() {
    +	t["VimFault"] = reflect.TypeOf((*VimFault)(nil)).Elem()
    +}
    +
    +type VimFaultFault BaseVimFault
    +
    +func init() {
    +	t["VimFaultFault"] = reflect.TypeOf((*VimFaultFault)(nil)).Elem()
    +}
    +
    +type VimVasaProvider struct {
    +	DynamicData
    +
    +	Uid                   string `xml:"uid,omitempty"`
    +	Url                   string `xml:"url"`
    +	Name                  string `xml:"name,omitempty"`
    +	SelfSignedCertificate string `xml:"selfSignedCertificate,omitempty"`
    +}
    +
    +func init() {
    +	t["VimVasaProvider"] = reflect.TypeOf((*VimVasaProvider)(nil)).Elem()
    +}
    +
    +type VimVasaProviderInfo struct {
    +	DynamicData
    +
    +	Provider   VimVasaProvider                `xml:"provider"`
    +	ArrayState []VimVasaProviderStatePerArray `xml:"arrayState,omitempty"`
    +}
    +
    +func init() {
    +	t["VimVasaProviderInfo"] = reflect.TypeOf((*VimVasaProviderInfo)(nil)).Elem()
    +}
    +
    +type VimVasaProviderStatePerArray struct {
    +	DynamicData
    +
    +	Priority int32  `xml:"priority"`
    +	ArrayId  string `xml:"arrayId"`
    +	Active   bool   `xml:"active"`
    +}
    +
    +func init() {
    +	t["VimVasaProviderStatePerArray"] = reflect.TypeOf((*VimVasaProviderStatePerArray)(nil)).Elem()
    +}
    +
    +type VirtualAHCIController struct {
    +	VirtualSATAController
    +}
    +
    +func init() {
    +	t["VirtualAHCIController"] = reflect.TypeOf((*VirtualAHCIController)(nil)).Elem()
    +}
    +
    +type VirtualAHCIControllerOption struct {
    +	VirtualSATAControllerOption
    +}
    +
    +func init() {
    +	t["VirtualAHCIControllerOption"] = reflect.TypeOf((*VirtualAHCIControllerOption)(nil)).Elem()
    +}
    +
    +type VirtualAppImportSpec struct {
    +	ImportSpec
    +
    +	Name             string             `xml:"name"`
    +	VAppConfigSpec   VAppConfigSpec     `xml:"vAppConfigSpec"`
    +	ResourcePoolSpec ResourceConfigSpec `xml:"resourcePoolSpec"`
    +	Child            []BaseImportSpec   `xml:"child,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["VirtualAppImportSpec"] = reflect.TypeOf((*VirtualAppImportSpec)(nil)).Elem()
    +}
    +
    +type VirtualAppLinkInfo struct {
    +	DynamicData
    +
    +	Key               ManagedObjectReference `xml:"key"`
    +	DestroyWithParent *bool                  `xml:"destroyWithParent"`
    +}
    +
    +func init() {
    +	t["VirtualAppLinkInfo"] = reflect.TypeOf((*VirtualAppLinkInfo)(nil)).Elem()
    +}
    +
    +type VirtualAppSummary struct {
    +	ResourcePoolSummary
    +
    +	Product             *VAppProductInfo    `xml:"product,omitempty"`
    +	VAppState           VirtualAppVAppState `xml:"vAppState,omitempty"`
    +	Suspended           *bool               `xml:"suspended"`
    +	InstallBootRequired *bool               `xml:"installBootRequired"`
    +	InstanceUuid        string              `xml:"instanceUuid,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualAppSummary"] = reflect.TypeOf((*VirtualAppSummary)(nil)).Elem()
    +}
    +
    +type VirtualBusLogicController struct {
    +	VirtualSCSIController
    +}
    +
    +func init() {
    +	t["VirtualBusLogicController"] = reflect.TypeOf((*VirtualBusLogicController)(nil)).Elem()
    +}
    +
    +type VirtualBusLogicControllerOption struct {
    +	VirtualSCSIControllerOption
    +}
    +
    +func init() {
    +	t["VirtualBusLogicControllerOption"] = reflect.TypeOf((*VirtualBusLogicControllerOption)(nil)).Elem()
    +}
    +
    +type VirtualCdrom struct {
    +	VirtualDevice
    +}
    +
    +func init() {
    +	t["VirtualCdrom"] = reflect.TypeOf((*VirtualCdrom)(nil)).Elem()
    +}
    +
    +type VirtualCdromAtapiBackingInfo struct {
    +	VirtualDeviceDeviceBackingInfo
    +}
    +
    +func init() {
    +	t["VirtualCdromAtapiBackingInfo"] = reflect.TypeOf((*VirtualCdromAtapiBackingInfo)(nil)).Elem()
    +}
    +
    +type VirtualCdromAtapiBackingOption struct {
    +	VirtualDeviceDeviceBackingOption
    +}
    +
    +func init() {
    +	t["VirtualCdromAtapiBackingOption"] = reflect.TypeOf((*VirtualCdromAtapiBackingOption)(nil)).Elem()
    +}
    +
    +type VirtualCdromIsoBackingInfo struct {
    +	VirtualDeviceFileBackingInfo
    +}
    +
    +func init() {
    +	t["VirtualCdromIsoBackingInfo"] = reflect.TypeOf((*VirtualCdromIsoBackingInfo)(nil)).Elem()
    +}
    +
    +type VirtualCdromIsoBackingOption struct {
    +	VirtualDeviceFileBackingOption
    +}
    +
    +func init() {
    +	t["VirtualCdromIsoBackingOption"] = reflect.TypeOf((*VirtualCdromIsoBackingOption)(nil)).Elem()
    +}
    +
    +type VirtualCdromOption struct {
    +	VirtualDeviceOption
    +}
    +
    +func init() {
    +	t["VirtualCdromOption"] = reflect.TypeOf((*VirtualCdromOption)(nil)).Elem()
    +}
    +
    +type VirtualCdromPassthroughBackingInfo struct {
    +	VirtualDeviceDeviceBackingInfo
    +
    +	Exclusive bool `xml:"exclusive"`
    +}
    +
    +func init() {
    +	t["VirtualCdromPassthroughBackingInfo"] = reflect.TypeOf((*VirtualCdromPassthroughBackingInfo)(nil)).Elem()
    +}
    +
    +type VirtualCdromPassthroughBackingOption struct {
    +	VirtualDeviceDeviceBackingOption
    +
    +	Exclusive BoolOption `xml:"exclusive"`
    +}
    +
    +func init() {
    +	t["VirtualCdromPassthroughBackingOption"] = reflect.TypeOf((*VirtualCdromPassthroughBackingOption)(nil)).Elem()
    +}
    +
    +type VirtualCdromRemoteAtapiBackingInfo struct {
    +	VirtualDeviceRemoteDeviceBackingInfo
    +}
    +
    +func init() {
    +	t["VirtualCdromRemoteAtapiBackingInfo"] = reflect.TypeOf((*VirtualCdromRemoteAtapiBackingInfo)(nil)).Elem()
    +}
    +
    +type VirtualCdromRemoteAtapiBackingOption struct {
    +	VirtualDeviceDeviceBackingOption
    +}
    +
    +func init() {
    +	t["VirtualCdromRemoteAtapiBackingOption"] = reflect.TypeOf((*VirtualCdromRemoteAtapiBackingOption)(nil)).Elem()
    +}
    +
    +type VirtualCdromRemotePassthroughBackingInfo struct {
    +	VirtualDeviceRemoteDeviceBackingInfo
    +
    +	Exclusive bool `xml:"exclusive"`
    +}
    +
    +func init() {
    +	t["VirtualCdromRemotePassthroughBackingInfo"] = reflect.TypeOf((*VirtualCdromRemotePassthroughBackingInfo)(nil)).Elem()
    +}
    +
    +type VirtualCdromRemotePassthroughBackingOption struct {
    +	VirtualDeviceRemoteDeviceBackingOption
    +
    +	Exclusive BoolOption `xml:"exclusive"`
    +}
    +
    +func init() {
    +	t["VirtualCdromRemotePassthroughBackingOption"] = reflect.TypeOf((*VirtualCdromRemotePassthroughBackingOption)(nil)).Elem()
    +}
    +
    +type VirtualController struct {
    +	VirtualDevice
    +
    +	BusNumber int32   `xml:"busNumber"`
    +	Device    []int32 `xml:"device,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualController"] = reflect.TypeOf((*VirtualController)(nil)).Elem()
    +}
    +
    +type VirtualControllerOption struct {
    +	VirtualDeviceOption
    +
    +	Devices         IntOption `xml:"devices"`
    +	SupportedDevice []string  `xml:"supportedDevice,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualControllerOption"] = reflect.TypeOf((*VirtualControllerOption)(nil)).Elem()
    +}
    +
    +type VirtualDevice struct {
    +	DynamicData
    +
    +	Key           int32                        `xml:"key"`
    +	DeviceInfo    BaseDescription              `xml:"deviceInfo,omitempty,typeattr"`
    +	Backing       BaseVirtualDeviceBackingInfo `xml:"backing,omitempty,typeattr"`
    +	Connectable   *VirtualDeviceConnectInfo    `xml:"connectable,omitempty"`
    +	SlotInfo      BaseVirtualDeviceBusSlotInfo `xml:"slotInfo,omitempty,typeattr"`
    +	ControllerKey int32                        `xml:"controllerKey,omitempty"`
    +	UnitNumber    *int32                       `xml:"unitNumber"`
    +}
    +
    +func init() {
    +	t["VirtualDevice"] = reflect.TypeOf((*VirtualDevice)(nil)).Elem()
    +}
    +
    +type VirtualDeviceBackingInfo struct {
    +	DynamicData
    +}
    +
    +func init() {
    +	t["VirtualDeviceBackingInfo"] = reflect.TypeOf((*VirtualDeviceBackingInfo)(nil)).Elem()
    +}
    +
    +type VirtualDeviceBackingOption struct {
    +	DynamicData
    +
    +	Type string `xml:"type"`
    +}
    +
    +func init() {
    +	t["VirtualDeviceBackingOption"] = reflect.TypeOf((*VirtualDeviceBackingOption)(nil)).Elem()
    +}
    +
    +type VirtualDeviceBusSlotInfo struct {
    +	DynamicData
    +}
    +
    +func init() {
    +	t["VirtualDeviceBusSlotInfo"] = reflect.TypeOf((*VirtualDeviceBusSlotInfo)(nil)).Elem()
    +}
    +
    +type VirtualDeviceBusSlotOption struct {
    +	DynamicData
    +
    +	Type string `xml:"type"`
    +}
    +
    +func init() {
    +	t["VirtualDeviceBusSlotOption"] = reflect.TypeOf((*VirtualDeviceBusSlotOption)(nil)).Elem()
    +}
    +
    +type VirtualDeviceConfigSpec struct {
    +	DynamicData
    +
    +	Operation     VirtualDeviceConfigSpecOperation     `xml:"operation,omitempty"`
    +	FileOperation VirtualDeviceConfigSpecFileOperation `xml:"fileOperation,omitempty"`
    +	Device        BaseVirtualDevice                    `xml:"device,typeattr"`
    +	Profile       []BaseVirtualMachineProfileSpec      `xml:"profile,omitempty,typeattr"`
    +	Backing       *VirtualDeviceConfigSpecBackingSpec  `xml:"backing,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualDeviceConfigSpec"] = reflect.TypeOf((*VirtualDeviceConfigSpec)(nil)).Elem()
    +}
    +
    +type VirtualDeviceConfigSpecBackingSpec struct {
    +	DynamicData
    +
    +	Parent *VirtualDeviceConfigSpecBackingSpec `xml:"parent,omitempty"`
    +	Crypto BaseCryptoSpec                      `xml:"crypto,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["VirtualDeviceConfigSpecBackingSpec"] = reflect.TypeOf((*VirtualDeviceConfigSpecBackingSpec)(nil)).Elem()
    +}
    +
    +type VirtualDeviceConnectInfo struct {
    +	DynamicData
    +
    +	MigrateConnect    string `xml:"migrateConnect,omitempty"`
    +	StartConnected    bool   `xml:"startConnected"`
    +	AllowGuestControl bool   `xml:"allowGuestControl"`
    +	Connected         bool   `xml:"connected"`
    +	Status            string `xml:"status,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualDeviceConnectInfo"] = reflect.TypeOf((*VirtualDeviceConnectInfo)(nil)).Elem()
    +}
    +
    +type VirtualDeviceConnectOption struct {
    +	DynamicData
    +
    +	StartConnected    BoolOption `xml:"startConnected"`
    +	AllowGuestControl BoolOption `xml:"allowGuestControl"`
    +}
    +
    +func init() {
    +	t["VirtualDeviceConnectOption"] = reflect.TypeOf((*VirtualDeviceConnectOption)(nil)).Elem()
    +}
    +
    +type VirtualDeviceDeviceBackingInfo struct {
    +	VirtualDeviceBackingInfo
    +
    +	DeviceName    string `xml:"deviceName"`
    +	UseAutoDetect *bool  `xml:"useAutoDetect"`
    +}
    +
    +func init() {
    +	t["VirtualDeviceDeviceBackingInfo"] = reflect.TypeOf((*VirtualDeviceDeviceBackingInfo)(nil)).Elem()
    +}
    +
    +type VirtualDeviceDeviceBackingOption struct {
    +	VirtualDeviceBackingOption
    +
    +	AutoDetectAvailable BoolOption `xml:"autoDetectAvailable"`
    +}
    +
    +func init() {
    +	t["VirtualDeviceDeviceBackingOption"] = reflect.TypeOf((*VirtualDeviceDeviceBackingOption)(nil)).Elem()
    +}
    +
    +type VirtualDeviceFileBackingInfo struct {
    +	VirtualDeviceBackingInfo
    +
    +	FileName        string                  `xml:"fileName"`
    +	Datastore       *ManagedObjectReference `xml:"datastore,omitempty"`
    +	BackingObjectId string                  `xml:"backingObjectId,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualDeviceFileBackingInfo"] = reflect.TypeOf((*VirtualDeviceFileBackingInfo)(nil)).Elem()
    +}
    +
    +type VirtualDeviceFileBackingOption struct {
    +	VirtualDeviceBackingOption
    +
    +	FileNameExtensions *ChoiceOption `xml:"fileNameExtensions,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualDeviceFileBackingOption"] = reflect.TypeOf((*VirtualDeviceFileBackingOption)(nil)).Elem()
    +}
    +
    +type VirtualDeviceOption struct {
    +	DynamicData
    +
    +	Type                      string                           `xml:"type"`
    +	ConnectOption             *VirtualDeviceConnectOption      `xml:"connectOption,omitempty"`
    +	BusSlotOption             *VirtualDeviceBusSlotOption      `xml:"busSlotOption,omitempty"`
    +	ControllerType            string                           `xml:"controllerType,omitempty"`
    +	AutoAssignController      *BoolOption                      `xml:"autoAssignController,omitempty"`
    +	BackingOption             []BaseVirtualDeviceBackingOption `xml:"backingOption,omitempty,typeattr"`
    +	DefaultBackingOptionIndex int32                            `xml:"defaultBackingOptionIndex,omitempty"`
    +	LicensingLimit            []string                         `xml:"licensingLimit,omitempty"`
    +	Deprecated                bool                             `xml:"deprecated"`
    +	PlugAndPlay               bool                             `xml:"plugAndPlay"`
    +	HotRemoveSupported        *bool                            `xml:"hotRemoveSupported"`
    +}
    +
    +func init() {
    +	t["VirtualDeviceOption"] = reflect.TypeOf((*VirtualDeviceOption)(nil)).Elem()
    +}
    +
    +type VirtualDevicePciBusSlotInfo struct {
    +	VirtualDeviceBusSlotInfo
    +
    +	PciSlotNumber int32 `xml:"pciSlotNumber"`
    +}
    +
    +func init() {
    +	t["VirtualDevicePciBusSlotInfo"] = reflect.TypeOf((*VirtualDevicePciBusSlotInfo)(nil)).Elem()
    +}
    +
    +type VirtualDevicePipeBackingInfo struct {
    +	VirtualDeviceBackingInfo
    +
    +	PipeName string `xml:"pipeName"`
    +}
    +
    +func init() {
    +	t["VirtualDevicePipeBackingInfo"] = reflect.TypeOf((*VirtualDevicePipeBackingInfo)(nil)).Elem()
    +}
    +
    +type VirtualDevicePipeBackingOption struct {
    +	VirtualDeviceBackingOption
    +}
    +
    +func init() {
    +	t["VirtualDevicePipeBackingOption"] = reflect.TypeOf((*VirtualDevicePipeBackingOption)(nil)).Elem()
    +}
    +
    +type VirtualDeviceRemoteDeviceBackingInfo struct {
    +	VirtualDeviceBackingInfo
    +
    +	DeviceName    string `xml:"deviceName"`
    +	UseAutoDetect *bool  `xml:"useAutoDetect"`
    +}
    +
    +func init() {
    +	t["VirtualDeviceRemoteDeviceBackingInfo"] = reflect.TypeOf((*VirtualDeviceRemoteDeviceBackingInfo)(nil)).Elem()
    +}
    +
    +type VirtualDeviceRemoteDeviceBackingOption struct {
    +	VirtualDeviceBackingOption
    +
    +	AutoDetectAvailable BoolOption `xml:"autoDetectAvailable"`
    +}
    +
    +func init() {
    +	t["VirtualDeviceRemoteDeviceBackingOption"] = reflect.TypeOf((*VirtualDeviceRemoteDeviceBackingOption)(nil)).Elem()
    +}
    +
    +type VirtualDeviceURIBackingInfo struct {
    +	VirtualDeviceBackingInfo
    +
    +	ServiceURI string `xml:"serviceURI"`
    +	Direction  string `xml:"direction"`
    +	ProxyURI   string `xml:"proxyURI,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualDeviceURIBackingInfo"] = reflect.TypeOf((*VirtualDeviceURIBackingInfo)(nil)).Elem()
    +}
    +
    +type VirtualDeviceURIBackingOption struct {
    +	VirtualDeviceBackingOption
    +
    +	Directions ChoiceOption `xml:"directions"`
    +}
    +
    +func init() {
    +	t["VirtualDeviceURIBackingOption"] = reflect.TypeOf((*VirtualDeviceURIBackingOption)(nil)).Elem()
    +}
    +
    +type VirtualDisk struct {
    +	VirtualDevice
    +
    +	CapacityInKB               int64                             `xml:"capacityInKB"`
    +	CapacityInBytes            int64                             `xml:"capacityInBytes,omitempty"`
    +	Shares                     *SharesInfo                       `xml:"shares,omitempty"`
    +	StorageIOAllocation        *StorageIOAllocationInfo          `xml:"storageIOAllocation,omitempty"`
    +	DiskObjectId               string                            `xml:"diskObjectId,omitempty"`
    +	VFlashCacheConfigInfo      *VirtualDiskVFlashCacheConfigInfo `xml:"vFlashCacheConfigInfo,omitempty"`
    +	Iofilter                   []string                          `xml:"iofilter,omitempty"`
    +	VDiskId                    *ID                               `xml:"vDiskId,omitempty"`
    +	NativeUnmanagedLinkedClone *bool                             `xml:"nativeUnmanagedLinkedClone"`
    +}
    +
    +func init() {
    +	t["VirtualDisk"] = reflect.TypeOf((*VirtualDisk)(nil)).Elem()
    +}
    +
    +type VirtualDiskAntiAffinityRuleSpec struct {
    +	ClusterRuleInfo
    +
    +	DiskId []int32 `xml:"diskId"`
    +}
    +
    +func init() {
    +	t["VirtualDiskAntiAffinityRuleSpec"] = reflect.TypeOf((*VirtualDiskAntiAffinityRuleSpec)(nil)).Elem()
    +}
    +
    +type VirtualDiskBlocksNotFullyProvisioned struct {
    +	DeviceBackingNotSupported
    +}
    +
    +func init() {
    +	t["VirtualDiskBlocksNotFullyProvisioned"] = reflect.TypeOf((*VirtualDiskBlocksNotFullyProvisioned)(nil)).Elem()
    +}
    +
    +type VirtualDiskBlocksNotFullyProvisionedFault VirtualDiskBlocksNotFullyProvisioned
    +
    +func init() {
    +	t["VirtualDiskBlocksNotFullyProvisionedFault"] = reflect.TypeOf((*VirtualDiskBlocksNotFullyProvisionedFault)(nil)).Elem()
    +}
    +
    +type VirtualDiskConfigSpec struct {
    +	VirtualDeviceConfigSpec
    +
    +	DiskMoveType string `xml:"diskMoveType,omitempty"`
    +	MigrateCache *bool  `xml:"migrateCache"`
    +}
    +
    +func init() {
    +	t["VirtualDiskConfigSpec"] = reflect.TypeOf((*VirtualDiskConfigSpec)(nil)).Elem()
    +}
    +
    +type VirtualDiskDeltaDiskFormatsSupported struct {
    +	DynamicData
    +
    +	DatastoreType   string       `xml:"datastoreType"`
    +	DeltaDiskFormat ChoiceOption `xml:"deltaDiskFormat"`
    +}
    +
    +func init() {
    +	t["VirtualDiskDeltaDiskFormatsSupported"] = reflect.TypeOf((*VirtualDiskDeltaDiskFormatsSupported)(nil)).Elem()
    +}
    +
    +type VirtualDiskFlatVer1BackingInfo struct {
    +	VirtualDeviceFileBackingInfo
    +
    +	DiskMode     string                          `xml:"diskMode"`
    +	Split        *bool                           `xml:"split"`
    +	WriteThrough *bool                           `xml:"writeThrough"`
    +	ContentId    string                          `xml:"contentId,omitempty"`
    +	Parent       *VirtualDiskFlatVer1BackingInfo `xml:"parent,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualDiskFlatVer1BackingInfo"] = reflect.TypeOf((*VirtualDiskFlatVer1BackingInfo)(nil)).Elem()
    +}
    +
    +type VirtualDiskFlatVer1BackingOption struct {
    +	VirtualDeviceFileBackingOption
    +
    +	DiskMode     ChoiceOption `xml:"diskMode"`
    +	Split        BoolOption   `xml:"split"`
    +	WriteThrough BoolOption   `xml:"writeThrough"`
    +	Growable     bool         `xml:"growable"`
    +}
    +
    +func init() {
    +	t["VirtualDiskFlatVer1BackingOption"] = reflect.TypeOf((*VirtualDiskFlatVer1BackingOption)(nil)).Elem()
    +}
    +
    +type VirtualDiskFlatVer2BackingInfo struct {
    +	VirtualDeviceFileBackingInfo
    +
    +	DiskMode               string                          `xml:"diskMode"`
    +	Split                  *bool                           `xml:"split"`
    +	WriteThrough           *bool                           `xml:"writeThrough"`
    +	ThinProvisioned        *bool                           `xml:"thinProvisioned"`
    +	EagerlyScrub           *bool                           `xml:"eagerlyScrub"`
    +	Uuid                   string                          `xml:"uuid,omitempty"`
    +	ContentId              string                          `xml:"contentId,omitempty"`
    +	ChangeId               string                          `xml:"changeId,omitempty"`
    +	Parent                 *VirtualDiskFlatVer2BackingInfo `xml:"parent,omitempty"`
    +	DeltaDiskFormat        string                          `xml:"deltaDiskFormat,omitempty"`
    +	DigestEnabled          *bool                           `xml:"digestEnabled"`
    +	DeltaGrainSize         int32                           `xml:"deltaGrainSize,omitempty"`
    +	DeltaDiskFormatVariant string                          `xml:"deltaDiskFormatVariant,omitempty"`
    +	Sharing                string                          `xml:"sharing,omitempty"`
    +	KeyId                  *CryptoKeyId                    `xml:"keyId,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualDiskFlatVer2BackingInfo"] = reflect.TypeOf((*VirtualDiskFlatVer2BackingInfo)(nil)).Elem()
    +}
    +
    +type VirtualDiskFlatVer2BackingOption struct {
    +	VirtualDeviceFileBackingOption
    +
    +	DiskMode                  ChoiceOption                           `xml:"diskMode"`
    +	Split                     BoolOption                             `xml:"split"`
    +	WriteThrough              BoolOption                             `xml:"writeThrough"`
    +	Growable                  bool                                   `xml:"growable"`
    +	HotGrowable               bool                                   `xml:"hotGrowable"`
    +	Uuid                      bool                                   `xml:"uuid"`
    +	ThinProvisioned           *BoolOption                            `xml:"thinProvisioned,omitempty"`
    +	EagerlyScrub              *BoolOption                            `xml:"eagerlyScrub,omitempty"`
    +	DeltaDiskFormat           *ChoiceOption                          `xml:"deltaDiskFormat,omitempty"`
    +	DeltaDiskFormatsSupported []VirtualDiskDeltaDiskFormatsSupported `xml:"deltaDiskFormatsSupported,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualDiskFlatVer2BackingOption"] = reflect.TypeOf((*VirtualDiskFlatVer2BackingOption)(nil)).Elem()
    +}
    +
    +type VirtualDiskId struct {
    +	DynamicData
    +
    +	Vm     ManagedObjectReference `xml:"vm"`
    +	DiskId int32                  `xml:"diskId"`
    +}
    +
    +func init() {
    +	t["VirtualDiskId"] = reflect.TypeOf((*VirtualDiskId)(nil)).Elem()
    +}
    +
    +type VirtualDiskLocalPMemBackingInfo struct {
    +	VirtualDeviceFileBackingInfo
    +
    +	DiskMode   string `xml:"diskMode"`
    +	Uuid       string `xml:"uuid,omitempty"`
    +	VolumeUUID string `xml:"volumeUUID,omitempty"`
    +	ContentId  string `xml:"contentId,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualDiskLocalPMemBackingInfo"] = reflect.TypeOf((*VirtualDiskLocalPMemBackingInfo)(nil)).Elem()
    +}
    +
    +type VirtualDiskLocalPMemBackingOption struct {
    +	VirtualDeviceFileBackingOption
    +
    +	DiskMode    ChoiceOption `xml:"diskMode"`
    +	Growable    bool         `xml:"growable"`
    +	HotGrowable bool         `xml:"hotGrowable"`
    +	Uuid        bool         `xml:"uuid"`
    +}
    +
    +func init() {
    +	t["VirtualDiskLocalPMemBackingOption"] = reflect.TypeOf((*VirtualDiskLocalPMemBackingOption)(nil)).Elem()
    +}
    +
    +type VirtualDiskModeNotSupported struct {
    +	DeviceNotSupported
    +
    +	Mode string `xml:"mode"`
    +}
    +
    +func init() {
    +	t["VirtualDiskModeNotSupported"] = reflect.TypeOf((*VirtualDiskModeNotSupported)(nil)).Elem()
    +}
    +
    +type VirtualDiskModeNotSupportedFault VirtualDiskModeNotSupported
    +
    +func init() {
    +	t["VirtualDiskModeNotSupportedFault"] = reflect.TypeOf((*VirtualDiskModeNotSupportedFault)(nil)).Elem()
    +}
    +
    +type VirtualDiskOption struct {
    +	VirtualDeviceOption
    +
    +	CapacityInKB            LongOption                                `xml:"capacityInKB"`
    +	IoAllocationOption      *StorageIOAllocationOption                `xml:"ioAllocationOption,omitempty"`
    +	VFlashCacheConfigOption *VirtualDiskOptionVFlashCacheConfigOption `xml:"vFlashCacheConfigOption,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualDiskOption"] = reflect.TypeOf((*VirtualDiskOption)(nil)).Elem()
    +}
    +
    +type VirtualDiskOptionVFlashCacheConfigOption struct {
    +	DynamicData
    +
    +	CacheConsistencyType ChoiceOption `xml:"cacheConsistencyType"`
    +	CacheMode            ChoiceOption `xml:"cacheMode"`
    +	ReservationInMB      LongOption   `xml:"reservationInMB"`
    +	BlockSizeInKB        LongOption   `xml:"blockSizeInKB"`
    +}
    +
    +func init() {
    +	t["VirtualDiskOptionVFlashCacheConfigOption"] = reflect.TypeOf((*VirtualDiskOptionVFlashCacheConfigOption)(nil)).Elem()
    +}
    +
    +type VirtualDiskPartitionedRawDiskVer2BackingInfo struct {
    +	VirtualDiskRawDiskVer2BackingInfo
    +
    +	Partition []int32 `xml:"partition"`
    +}
    +
    +func init() {
    +	t["VirtualDiskPartitionedRawDiskVer2BackingInfo"] = reflect.TypeOf((*VirtualDiskPartitionedRawDiskVer2BackingInfo)(nil)).Elem()
    +}
    +
    +type VirtualDiskPartitionedRawDiskVer2BackingOption struct {
    +	VirtualDiskRawDiskVer2BackingOption
    +}
    +
    +func init() {
    +	t["VirtualDiskPartitionedRawDiskVer2BackingOption"] = reflect.TypeOf((*VirtualDiskPartitionedRawDiskVer2BackingOption)(nil)).Elem()
    +}
    +
    +type VirtualDiskRawDiskMappingVer1BackingInfo struct {
    +	VirtualDeviceFileBackingInfo
    +
    +	LunUuid           string                                    `xml:"lunUuid,omitempty"`
    +	DeviceName        string                                    `xml:"deviceName,omitempty"`
    +	CompatibilityMode string                                    `xml:"compatibilityMode,omitempty"`
    +	DiskMode          string                                    `xml:"diskMode,omitempty"`
    +	Uuid              string                                    `xml:"uuid,omitempty"`
    +	ContentId         string                                    `xml:"contentId,omitempty"`
    +	ChangeId          string                                    `xml:"changeId,omitempty"`
    +	Parent            *VirtualDiskRawDiskMappingVer1BackingInfo `xml:"parent,omitempty"`
    +	DeltaDiskFormat   string                                    `xml:"deltaDiskFormat,omitempty"`
    +	DeltaGrainSize    int32                                     `xml:"deltaGrainSize,omitempty"`
    +	Sharing           string                                    `xml:"sharing,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualDiskRawDiskMappingVer1BackingInfo"] = reflect.TypeOf((*VirtualDiskRawDiskMappingVer1BackingInfo)(nil)).Elem()
    +}
    +
    +type VirtualDiskRawDiskMappingVer1BackingOption struct {
    +	VirtualDeviceDeviceBackingOption
    +
    +	DescriptorFileNameExtensions *ChoiceOption `xml:"descriptorFileNameExtensions,omitempty"`
    +	CompatibilityMode            ChoiceOption  `xml:"compatibilityMode"`
    +	DiskMode                     ChoiceOption  `xml:"diskMode"`
    +	Uuid                         bool          `xml:"uuid"`
    +}
    +
    +func init() {
    +	t["VirtualDiskRawDiskMappingVer1BackingOption"] = reflect.TypeOf((*VirtualDiskRawDiskMappingVer1BackingOption)(nil)).Elem()
    +}
    +
    +type VirtualDiskRawDiskVer2BackingInfo struct {
    +	VirtualDeviceDeviceBackingInfo
    +
    +	DescriptorFileName string `xml:"descriptorFileName"`
    +	Uuid               string `xml:"uuid,omitempty"`
    +	ChangeId           string `xml:"changeId,omitempty"`
    +	Sharing            string `xml:"sharing,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualDiskRawDiskVer2BackingInfo"] = reflect.TypeOf((*VirtualDiskRawDiskVer2BackingInfo)(nil)).Elem()
    +}
    +
    +type VirtualDiskRawDiskVer2BackingOption struct {
    +	VirtualDeviceDeviceBackingOption
    +
    +	DescriptorFileNameExtensions ChoiceOption `xml:"descriptorFileNameExtensions"`
    +	Uuid                         bool         `xml:"uuid"`
    +}
    +
    +func init() {
    +	t["VirtualDiskRawDiskVer2BackingOption"] = reflect.TypeOf((*VirtualDiskRawDiskVer2BackingOption)(nil)).Elem()
    +}
    +
    +type VirtualDiskRuleSpec struct {
    +	ClusterRuleInfo
    +
    +	DiskRuleType string  `xml:"diskRuleType"`
    +	DiskId       []int32 `xml:"diskId,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualDiskRuleSpec"] = reflect.TypeOf((*VirtualDiskRuleSpec)(nil)).Elem()
    +}
    +
    +type VirtualDiskSeSparseBackingInfo struct {
    +	VirtualDeviceFileBackingInfo
    +
    +	DiskMode        string                          `xml:"diskMode"`
    +	WriteThrough    *bool                           `xml:"writeThrough"`
    +	Uuid            string                          `xml:"uuid,omitempty"`
    +	ContentId       string                          `xml:"contentId,omitempty"`
    +	ChangeId        string                          `xml:"changeId,omitempty"`
    +	Parent          *VirtualDiskSeSparseBackingInfo `xml:"parent,omitempty"`
    +	DeltaDiskFormat string                          `xml:"deltaDiskFormat,omitempty"`
    +	DigestEnabled   *bool                           `xml:"digestEnabled"`
    +	GrainSize       int32                           `xml:"grainSize,omitempty"`
    +	KeyId           *CryptoKeyId                    `xml:"keyId,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualDiskSeSparseBackingInfo"] = reflect.TypeOf((*VirtualDiskSeSparseBackingInfo)(nil)).Elem()
    +}
    +
    +type VirtualDiskSeSparseBackingOption struct {
    +	VirtualDeviceFileBackingOption
    +
    +	DiskMode                  ChoiceOption                           `xml:"diskMode"`
    +	WriteThrough              BoolOption                             `xml:"writeThrough"`
    +	Growable                  bool                                   `xml:"growable"`
    +	HotGrowable               bool                                   `xml:"hotGrowable"`
    +	Uuid                      bool                                   `xml:"uuid"`
    +	DeltaDiskFormatsSupported []VirtualDiskDeltaDiskFormatsSupported `xml:"deltaDiskFormatsSupported"`
    +}
    +
    +func init() {
    +	t["VirtualDiskSeSparseBackingOption"] = reflect.TypeOf((*VirtualDiskSeSparseBackingOption)(nil)).Elem()
    +}
    +
    +type VirtualDiskSparseVer1BackingInfo struct {
    +	VirtualDeviceFileBackingInfo
    +
    +	DiskMode      string                            `xml:"diskMode"`
    +	Split         *bool                             `xml:"split"`
    +	WriteThrough  *bool                             `xml:"writeThrough"`
    +	SpaceUsedInKB int64                             `xml:"spaceUsedInKB,omitempty"`
    +	ContentId     string                            `xml:"contentId,omitempty"`
    +	Parent        *VirtualDiskSparseVer1BackingInfo `xml:"parent,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualDiskSparseVer1BackingInfo"] = reflect.TypeOf((*VirtualDiskSparseVer1BackingInfo)(nil)).Elem()
    +}
    +
    +type VirtualDiskSparseVer1BackingOption struct {
    +	VirtualDeviceFileBackingOption
    +
    +	DiskModes    ChoiceOption `xml:"diskModes"`
    +	Split        BoolOption   `xml:"split"`
    +	WriteThrough BoolOption   `xml:"writeThrough"`
    +	Growable     bool         `xml:"growable"`
    +}
    +
    +func init() {
    +	t["VirtualDiskSparseVer1BackingOption"] = reflect.TypeOf((*VirtualDiskSparseVer1BackingOption)(nil)).Elem()
    +}
    +
    +type VirtualDiskSparseVer2BackingInfo struct {
    +	VirtualDeviceFileBackingInfo
    +
    +	DiskMode      string                            `xml:"diskMode"`
    +	Split         *bool                             `xml:"split"`
    +	WriteThrough  *bool                             `xml:"writeThrough"`
    +	SpaceUsedInKB int64                             `xml:"spaceUsedInKB,omitempty"`
    +	Uuid          string                            `xml:"uuid,omitempty"`
    +	ContentId     string                            `xml:"contentId,omitempty"`
    +	ChangeId      string                            `xml:"changeId,omitempty"`
    +	Parent        *VirtualDiskSparseVer2BackingInfo `xml:"parent,omitempty"`
    +	KeyId         *CryptoKeyId                      `xml:"keyId,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualDiskSparseVer2BackingInfo"] = reflect.TypeOf((*VirtualDiskSparseVer2BackingInfo)(nil)).Elem()
    +}
    +
    +type VirtualDiskSparseVer2BackingOption struct {
    +	VirtualDeviceFileBackingOption
    +
    +	DiskMode     ChoiceOption `xml:"diskMode"`
    +	Split        BoolOption   `xml:"split"`
    +	WriteThrough BoolOption   `xml:"writeThrough"`
    +	Growable     bool         `xml:"growable"`
    +	HotGrowable  bool         `xml:"hotGrowable"`
    +	Uuid         bool         `xml:"uuid"`
    +}
    +
    +func init() {
    +	t["VirtualDiskSparseVer2BackingOption"] = reflect.TypeOf((*VirtualDiskSparseVer2BackingOption)(nil)).Elem()
    +}
    +
    +type VirtualDiskSpec struct {
    +	DynamicData
    +
    +	DiskType    string `xml:"diskType"`
    +	AdapterType string `xml:"adapterType"`
    +}
    +
    +func init() {
    +	t["VirtualDiskSpec"] = reflect.TypeOf((*VirtualDiskSpec)(nil)).Elem()
    +}
    +
    +type VirtualDiskVFlashCacheConfigInfo struct {
    +	DynamicData
    +
    +	VFlashModule         string `xml:"vFlashModule,omitempty"`
    +	ReservationInMB      int64  `xml:"reservationInMB,omitempty"`
    +	CacheConsistencyType string `xml:"cacheConsistencyType,omitempty"`
    +	CacheMode            string `xml:"cacheMode,omitempty"`
    +	BlockSizeInKB        int64  `xml:"blockSizeInKB,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualDiskVFlashCacheConfigInfo"] = reflect.TypeOf((*VirtualDiskVFlashCacheConfigInfo)(nil)).Elem()
    +}
    +
    +type VirtualE1000 struct {
    +	VirtualEthernetCard
    +}
    +
    +func init() {
    +	t["VirtualE1000"] = reflect.TypeOf((*VirtualE1000)(nil)).Elem()
    +}
    +
    +type VirtualE1000Option struct {
    +	VirtualEthernetCardOption
    +}
    +
    +func init() {
    +	t["VirtualE1000Option"] = reflect.TypeOf((*VirtualE1000Option)(nil)).Elem()
    +}
    +
    +type VirtualE1000e struct {
    +	VirtualEthernetCard
    +}
    +
    +func init() {
    +	t["VirtualE1000e"] = reflect.TypeOf((*VirtualE1000e)(nil)).Elem()
    +}
    +
    +type VirtualE1000eOption struct {
    +	VirtualEthernetCardOption
    +}
    +
    +func init() {
    +	t["VirtualE1000eOption"] = reflect.TypeOf((*VirtualE1000eOption)(nil)).Elem()
    +}
    +
    +type VirtualEnsoniq1371 struct {
    +	VirtualSoundCard
    +}
    +
    +func init() {
    +	t["VirtualEnsoniq1371"] = reflect.TypeOf((*VirtualEnsoniq1371)(nil)).Elem()
    +}
    +
    +type VirtualEnsoniq1371Option struct {
    +	VirtualSoundCardOption
    +}
    +
    +func init() {
    +	t["VirtualEnsoniq1371Option"] = reflect.TypeOf((*VirtualEnsoniq1371Option)(nil)).Elem()
    +}
    +
    +type VirtualEthernetCard struct {
    +	VirtualDevice
    +
    +	AddressType             string                                 `xml:"addressType,omitempty"`
    +	MacAddress              string                                 `xml:"macAddress,omitempty"`
    +	WakeOnLanEnabled        *bool                                  `xml:"wakeOnLanEnabled"`
    +	ResourceAllocation      *VirtualEthernetCardResourceAllocation `xml:"resourceAllocation,omitempty"`
    +	ExternalId              string                                 `xml:"externalId,omitempty"`
    +	UptCompatibilityEnabled *bool                                  `xml:"uptCompatibilityEnabled"`
    +}
    +
    +func init() {
    +	t["VirtualEthernetCard"] = reflect.TypeOf((*VirtualEthernetCard)(nil)).Elem()
    +}
    +
    +type VirtualEthernetCardDVPortBackingOption struct {
    +	VirtualDeviceBackingOption
    +}
    +
    +func init() {
    +	t["VirtualEthernetCardDVPortBackingOption"] = reflect.TypeOf((*VirtualEthernetCardDVPortBackingOption)(nil)).Elem()
    +}
    +
    +type VirtualEthernetCardDistributedVirtualPortBackingInfo struct {
    +	VirtualDeviceBackingInfo
    +
    +	Port DistributedVirtualSwitchPortConnection `xml:"port"`
    +}
    +
    +func init() {
    +	t["VirtualEthernetCardDistributedVirtualPortBackingInfo"] = reflect.TypeOf((*VirtualEthernetCardDistributedVirtualPortBackingInfo)(nil)).Elem()
    +}
    +
    +type VirtualEthernetCardLegacyNetworkBackingInfo struct {
    +	VirtualDeviceDeviceBackingInfo
    +}
    +
    +func init() {
    +	t["VirtualEthernetCardLegacyNetworkBackingInfo"] = reflect.TypeOf((*VirtualEthernetCardLegacyNetworkBackingInfo)(nil)).Elem()
    +}
    +
    +type VirtualEthernetCardLegacyNetworkBackingOption struct {
    +	VirtualDeviceDeviceBackingOption
    +}
    +
    +func init() {
    +	t["VirtualEthernetCardLegacyNetworkBackingOption"] = reflect.TypeOf((*VirtualEthernetCardLegacyNetworkBackingOption)(nil)).Elem()
    +}
    +
    +type VirtualEthernetCardNetworkBackingInfo struct {
    +	VirtualDeviceDeviceBackingInfo
    +
    +	Network           *ManagedObjectReference `xml:"network,omitempty"`
    +	InPassthroughMode *bool                   `xml:"inPassthroughMode"`
    +}
    +
    +func init() {
    +	t["VirtualEthernetCardNetworkBackingInfo"] = reflect.TypeOf((*VirtualEthernetCardNetworkBackingInfo)(nil)).Elem()
    +}
    +
    +type VirtualEthernetCardNetworkBackingOption struct {
    +	VirtualDeviceDeviceBackingOption
    +}
    +
    +func init() {
    +	t["VirtualEthernetCardNetworkBackingOption"] = reflect.TypeOf((*VirtualEthernetCardNetworkBackingOption)(nil)).Elem()
    +}
    +
    +type VirtualEthernetCardNotSupported struct {
    +	DeviceNotSupported
    +}
    +
    +func init() {
    +	t["VirtualEthernetCardNotSupported"] = reflect.TypeOf((*VirtualEthernetCardNotSupported)(nil)).Elem()
    +}
    +
    +type VirtualEthernetCardNotSupportedFault VirtualEthernetCardNotSupported
    +
    +func init() {
    +	t["VirtualEthernetCardNotSupportedFault"] = reflect.TypeOf((*VirtualEthernetCardNotSupportedFault)(nil)).Elem()
    +}
    +
    +type VirtualEthernetCardOpaqueNetworkBackingInfo struct {
    +	VirtualDeviceBackingInfo
    +
    +	OpaqueNetworkId   string `xml:"opaqueNetworkId"`
    +	OpaqueNetworkType string `xml:"opaqueNetworkType"`
    +}
    +
    +func init() {
    +	t["VirtualEthernetCardOpaqueNetworkBackingInfo"] = reflect.TypeOf((*VirtualEthernetCardOpaqueNetworkBackingInfo)(nil)).Elem()
    +}
    +
    +type VirtualEthernetCardOpaqueNetworkBackingOption struct {
    +	VirtualDeviceBackingOption
    +}
    +
    +func init() {
    +	t["VirtualEthernetCardOpaqueNetworkBackingOption"] = reflect.TypeOf((*VirtualEthernetCardOpaqueNetworkBackingOption)(nil)).Elem()
    +}
    +
    +type VirtualEthernetCardOption struct {
    +	VirtualDeviceOption
    +
    +	SupportedOUI              ChoiceOption `xml:"supportedOUI"`
    +	MacType                   ChoiceOption `xml:"macType"`
    +	WakeOnLanEnabled          BoolOption   `xml:"wakeOnLanEnabled"`
    +	VmDirectPathGen2Supported *bool        `xml:"vmDirectPathGen2Supported"`
    +	UptCompatibilityEnabled   *BoolOption  `xml:"uptCompatibilityEnabled,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualEthernetCardOption"] = reflect.TypeOf((*VirtualEthernetCardOption)(nil)).Elem()
    +}
    +
    +type VirtualEthernetCardResourceAllocation struct {
    +	DynamicData
    +
    +	Reservation *int64     `xml:"reservation"`
    +	Share       SharesInfo `xml:"share"`
    +	Limit       *int64     `xml:"limit"`
    +}
    +
    +func init() {
    +	t["VirtualEthernetCardResourceAllocation"] = reflect.TypeOf((*VirtualEthernetCardResourceAllocation)(nil)).Elem()
    +}
    +
    +type VirtualFloppy struct {
    +	VirtualDevice
    +}
    +
    +func init() {
    +	t["VirtualFloppy"] = reflect.TypeOf((*VirtualFloppy)(nil)).Elem()
    +}
    +
    +type VirtualFloppyDeviceBackingInfo struct {
    +	VirtualDeviceDeviceBackingInfo
    +}
    +
    +func init() {
    +	t["VirtualFloppyDeviceBackingInfo"] = reflect.TypeOf((*VirtualFloppyDeviceBackingInfo)(nil)).Elem()
    +}
    +
    +type VirtualFloppyDeviceBackingOption struct {
    +	VirtualDeviceDeviceBackingOption
    +}
    +
    +func init() {
    +	t["VirtualFloppyDeviceBackingOption"] = reflect.TypeOf((*VirtualFloppyDeviceBackingOption)(nil)).Elem()
    +}
    +
    +type VirtualFloppyImageBackingInfo struct {
    +	VirtualDeviceFileBackingInfo
    +}
    +
    +func init() {
    +	t["VirtualFloppyImageBackingInfo"] = reflect.TypeOf((*VirtualFloppyImageBackingInfo)(nil)).Elem()
    +}
    +
    +type VirtualFloppyImageBackingOption struct {
    +	VirtualDeviceFileBackingOption
    +}
    +
    +func init() {
    +	t["VirtualFloppyImageBackingOption"] = reflect.TypeOf((*VirtualFloppyImageBackingOption)(nil)).Elem()
    +}
    +
    +type VirtualFloppyOption struct {
    +	VirtualDeviceOption
    +}
    +
    +func init() {
    +	t["VirtualFloppyOption"] = reflect.TypeOf((*VirtualFloppyOption)(nil)).Elem()
    +}
    +
    +type VirtualFloppyRemoteDeviceBackingInfo struct {
    +	VirtualDeviceRemoteDeviceBackingInfo
    +}
    +
    +func init() {
    +	t["VirtualFloppyRemoteDeviceBackingInfo"] = reflect.TypeOf((*VirtualFloppyRemoteDeviceBackingInfo)(nil)).Elem()
    +}
    +
    +type VirtualFloppyRemoteDeviceBackingOption struct {
    +	VirtualDeviceRemoteDeviceBackingOption
    +}
    +
    +func init() {
    +	t["VirtualFloppyRemoteDeviceBackingOption"] = reflect.TypeOf((*VirtualFloppyRemoteDeviceBackingOption)(nil)).Elem()
    +}
    +
    +type VirtualHardware struct {
    +	DynamicData
    +
    +	NumCPU              int32               `xml:"numCPU"`
    +	NumCoresPerSocket   int32               `xml:"numCoresPerSocket,omitempty"`
    +	MemoryMB            int32               `xml:"memoryMB"`
    +	VirtualICH7MPresent *bool               `xml:"virtualICH7MPresent"`
    +	VirtualSMCPresent   *bool               `xml:"virtualSMCPresent"`
    +	Device              []BaseVirtualDevice `xml:"device,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["VirtualHardware"] = reflect.TypeOf((*VirtualHardware)(nil)).Elem()
    +}
    +
    +type VirtualHardwareCompatibilityIssue struct {
    +	VmConfigFault
    +}
    +
    +func init() {
    +	t["VirtualHardwareCompatibilityIssue"] = reflect.TypeOf((*VirtualHardwareCompatibilityIssue)(nil)).Elem()
    +}
    +
    +type VirtualHardwareCompatibilityIssueFault BaseVirtualHardwareCompatibilityIssue
    +
    +func init() {
    +	t["VirtualHardwareCompatibilityIssueFault"] = reflect.TypeOf((*VirtualHardwareCompatibilityIssueFault)(nil)).Elem()
    +}
    +
    +type VirtualHardwareOption struct {
    +	DynamicData
    +
    +	HwVersion             int32                     `xml:"hwVersion"`
    +	VirtualDeviceOption   []BaseVirtualDeviceOption `xml:"virtualDeviceOption,typeattr"`
    +	DeviceListReadonly    bool                      `xml:"deviceListReadonly"`
    +	NumCPU                []int32                   `xml:"numCPU"`
    +	NumCoresPerSocket     *IntOption                `xml:"numCoresPerSocket,omitempty"`
    +	NumCpuReadonly        bool                      `xml:"numCpuReadonly"`
    +	MemoryMB              LongOption                `xml:"memoryMB"`
    +	NumPCIControllers     IntOption                 `xml:"numPCIControllers"`
    +	NumIDEControllers     IntOption                 `xml:"numIDEControllers"`
    +	NumUSBControllers     IntOption                 `xml:"numUSBControllers"`
    +	NumUSBXHCIControllers *IntOption                `xml:"numUSBXHCIControllers,omitempty"`
    +	NumSIOControllers     IntOption                 `xml:"numSIOControllers"`
    +	NumPS2Controllers     IntOption                 `xml:"numPS2Controllers"`
    +	LicensingLimit        []string                  `xml:"licensingLimit,omitempty"`
    +	NumSupportedWwnPorts  *IntOption                `xml:"numSupportedWwnPorts,omitempty"`
    +	NumSupportedWwnNodes  *IntOption                `xml:"numSupportedWwnNodes,omitempty"`
    +	ResourceConfigOption  *ResourceConfigOption     `xml:"resourceConfigOption,omitempty"`
    +	NumNVDIMMControllers  *IntOption                `xml:"numNVDIMMControllers,omitempty"`
    +	NumTPMDevices         *IntOption                `xml:"numTPMDevices,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualHardwareOption"] = reflect.TypeOf((*VirtualHardwareOption)(nil)).Elem()
    +}
    +
    +type VirtualHardwareVersionNotSupported struct {
    +	VirtualHardwareCompatibilityIssue
    +
    +	HostName string                 `xml:"hostName"`
    +	Host     ManagedObjectReference `xml:"host"`
    +}
    +
    +func init() {
    +	t["VirtualHardwareVersionNotSupported"] = reflect.TypeOf((*VirtualHardwareVersionNotSupported)(nil)).Elem()
    +}
    +
    +type VirtualHardwareVersionNotSupportedFault VirtualHardwareVersionNotSupported
    +
    +func init() {
    +	t["VirtualHardwareVersionNotSupportedFault"] = reflect.TypeOf((*VirtualHardwareVersionNotSupportedFault)(nil)).Elem()
    +}
    +
    +type VirtualHdAudioCard struct {
    +	VirtualSoundCard
    +}
    +
    +func init() {
    +	t["VirtualHdAudioCard"] = reflect.TypeOf((*VirtualHdAudioCard)(nil)).Elem()
    +}
    +
    +type VirtualHdAudioCardOption struct {
    +	VirtualSoundCardOption
    +}
    +
    +func init() {
    +	t["VirtualHdAudioCardOption"] = reflect.TypeOf((*VirtualHdAudioCardOption)(nil)).Elem()
    +}
    +
    +type VirtualIDEController struct {
    +	VirtualController
    +}
    +
    +func init() {
    +	t["VirtualIDEController"] = reflect.TypeOf((*VirtualIDEController)(nil)).Elem()
    +}
    +
    +type VirtualIDEControllerOption struct {
    +	VirtualControllerOption
    +
    +	NumIDEDisks  IntOption `xml:"numIDEDisks"`
    +	NumIDECdroms IntOption `xml:"numIDECdroms"`
    +}
    +
    +func init() {
    +	t["VirtualIDEControllerOption"] = reflect.TypeOf((*VirtualIDEControllerOption)(nil)).Elem()
    +}
    +
    +type VirtualKeyboard struct {
    +	VirtualDevice
    +}
    +
    +func init() {
    +	t["VirtualKeyboard"] = reflect.TypeOf((*VirtualKeyboard)(nil)).Elem()
    +}
    +
    +type VirtualKeyboardOption struct {
    +	VirtualDeviceOption
    +}
    +
    +func init() {
    +	t["VirtualKeyboardOption"] = reflect.TypeOf((*VirtualKeyboardOption)(nil)).Elem()
    +}
    +
    +type VirtualLsiLogicController struct {
    +	VirtualSCSIController
    +}
    +
    +func init() {
    +	t["VirtualLsiLogicController"] = reflect.TypeOf((*VirtualLsiLogicController)(nil)).Elem()
    +}
    +
    +type VirtualLsiLogicControllerOption struct {
    +	VirtualSCSIControllerOption
    +}
    +
    +func init() {
    +	t["VirtualLsiLogicControllerOption"] = reflect.TypeOf((*VirtualLsiLogicControllerOption)(nil)).Elem()
    +}
    +
    +type VirtualLsiLogicSASController struct {
    +	VirtualSCSIController
    +}
    +
    +func init() {
    +	t["VirtualLsiLogicSASController"] = reflect.TypeOf((*VirtualLsiLogicSASController)(nil)).Elem()
    +}
    +
    +type VirtualLsiLogicSASControllerOption struct {
    +	VirtualSCSIControllerOption
    +}
    +
    +func init() {
    +	t["VirtualLsiLogicSASControllerOption"] = reflect.TypeOf((*VirtualLsiLogicSASControllerOption)(nil)).Elem()
    +}
    +
    +type VirtualMachineAffinityInfo struct {
    +	DynamicData
    +
    +	AffinitySet []int32 `xml:"affinitySet"`
    +}
    +
    +func init() {
    +	t["VirtualMachineAffinityInfo"] = reflect.TypeOf((*VirtualMachineAffinityInfo)(nil)).Elem()
    +}
    +
    +type VirtualMachineBootOptions struct {
    +	DynamicData
    +
    +	BootDelay            int64                                         `xml:"bootDelay,omitempty"`
    +	EnterBIOSSetup       *bool                                         `xml:"enterBIOSSetup"`
    +	EfiSecureBootEnabled *bool                                         `xml:"efiSecureBootEnabled"`
    +	BootRetryEnabled     *bool                                         `xml:"bootRetryEnabled"`
    +	BootRetryDelay       int64                                         `xml:"bootRetryDelay,omitempty"`
    +	BootOrder            []BaseVirtualMachineBootOptionsBootableDevice `xml:"bootOrder,omitempty,typeattr"`
    +	NetworkBootProtocol  string                                        `xml:"networkBootProtocol,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachineBootOptions"] = reflect.TypeOf((*VirtualMachineBootOptions)(nil)).Elem()
    +}
    +
    +type VirtualMachineBootOptionsBootableCdromDevice struct {
    +	VirtualMachineBootOptionsBootableDevice
    +}
    +
    +func init() {
    +	t["VirtualMachineBootOptionsBootableCdromDevice"] = reflect.TypeOf((*VirtualMachineBootOptionsBootableCdromDevice)(nil)).Elem()
    +}
    +
    +type VirtualMachineBootOptionsBootableDevice struct {
    +	DynamicData
    +}
    +
    +func init() {
    +	t["VirtualMachineBootOptionsBootableDevice"] = reflect.TypeOf((*VirtualMachineBootOptionsBootableDevice)(nil)).Elem()
    +}
    +
    +type VirtualMachineBootOptionsBootableDiskDevice struct {
    +	VirtualMachineBootOptionsBootableDevice
    +
    +	DeviceKey int32 `xml:"deviceKey"`
    +}
    +
    +func init() {
    +	t["VirtualMachineBootOptionsBootableDiskDevice"] = reflect.TypeOf((*VirtualMachineBootOptionsBootableDiskDevice)(nil)).Elem()
    +}
    +
    +type VirtualMachineBootOptionsBootableEthernetDevice struct {
    +	VirtualMachineBootOptionsBootableDevice
    +
    +	DeviceKey int32 `xml:"deviceKey"`
    +}
    +
    +func init() {
    +	t["VirtualMachineBootOptionsBootableEthernetDevice"] = reflect.TypeOf((*VirtualMachineBootOptionsBootableEthernetDevice)(nil)).Elem()
    +}
    +
    +type VirtualMachineBootOptionsBootableFloppyDevice struct {
    +	VirtualMachineBootOptionsBootableDevice
    +}
    +
    +func init() {
    +	t["VirtualMachineBootOptionsBootableFloppyDevice"] = reflect.TypeOf((*VirtualMachineBootOptionsBootableFloppyDevice)(nil)).Elem()
    +}
    +
    +type VirtualMachineCapability struct {
    +	DynamicData
    +
    +	SnapshotOperationsSupported            bool  `xml:"snapshotOperationsSupported"`
    +	MultipleSnapshotsSupported             bool  `xml:"multipleSnapshotsSupported"`
    +	SnapshotConfigSupported                bool  `xml:"snapshotConfigSupported"`
    +	PoweredOffSnapshotsSupported           bool  `xml:"poweredOffSnapshotsSupported"`
    +	MemorySnapshotsSupported               bool  `xml:"memorySnapshotsSupported"`
    +	RevertToSnapshotSupported              bool  `xml:"revertToSnapshotSupported"`
    +	QuiescedSnapshotsSupported             bool  `xml:"quiescedSnapshotsSupported"`
    +	DisableSnapshotsSupported              bool  `xml:"disableSnapshotsSupported"`
    +	LockSnapshotsSupported                 bool  `xml:"lockSnapshotsSupported"`
    +	ConsolePreferencesSupported            bool  `xml:"consolePreferencesSupported"`
    +	CpuFeatureMaskSupported                bool  `xml:"cpuFeatureMaskSupported"`
    +	S1AcpiManagementSupported              bool  `xml:"s1AcpiManagementSupported"`
    +	SettingScreenResolutionSupported       bool  `xml:"settingScreenResolutionSupported"`
    +	ToolsAutoUpdateSupported               bool  `xml:"toolsAutoUpdateSupported"`
    +	VmNpivWwnSupported                     bool  `xml:"vmNpivWwnSupported"`
    +	NpivWwnOnNonRdmVmSupported             bool  `xml:"npivWwnOnNonRdmVmSupported"`
    +	VmNpivWwnDisableSupported              *bool `xml:"vmNpivWwnDisableSupported"`
    +	VmNpivWwnUpdateSupported               *bool `xml:"vmNpivWwnUpdateSupported"`
    +	SwapPlacementSupported                 bool  `xml:"swapPlacementSupported"`
    +	ToolsSyncTimeSupported                 bool  `xml:"toolsSyncTimeSupported"`
    +	VirtualMmuUsageSupported               bool  `xml:"virtualMmuUsageSupported"`
    +	DiskSharesSupported                    bool  `xml:"diskSharesSupported"`
    +	BootOptionsSupported                   bool  `xml:"bootOptionsSupported"`
    +	BootRetryOptionsSupported              *bool `xml:"bootRetryOptionsSupported"`
    +	SettingVideoRamSizeSupported           bool  `xml:"settingVideoRamSizeSupported"`
    +	SettingDisplayTopologySupported        *bool `xml:"settingDisplayTopologySupported"`
    +	RecordReplaySupported                  *bool `xml:"recordReplaySupported"`
    +	ChangeTrackingSupported                *bool `xml:"changeTrackingSupported"`
    +	MultipleCoresPerSocketSupported        *bool `xml:"multipleCoresPerSocketSupported"`
    +	HostBasedReplicationSupported          *bool `xml:"hostBasedReplicationSupported"`
    +	GuestAutoLockSupported                 *bool `xml:"guestAutoLockSupported"`
    +	MemoryReservationLockSupported         *bool `xml:"memoryReservationLockSupported"`
    +	FeatureRequirementSupported            *bool `xml:"featureRequirementSupported"`
    +	PoweredOnMonitorTypeChangeSupported    *bool `xml:"poweredOnMonitorTypeChangeSupported"`
    +	SeSparseDiskSupported                  *bool `xml:"seSparseDiskSupported"`
    +	NestedHVSupported                      *bool `xml:"nestedHVSupported"`
    +	VPMCSupported                          *bool `xml:"vPMCSupported"`
    +	SecureBootSupported                    *bool `xml:"secureBootSupported"`
    +	PerVmEvcSupported                      *bool `xml:"perVmEvcSupported"`
    +	VirtualMmuUsageIgnored                 *bool `xml:"virtualMmuUsageIgnored"`
    +	VirtualExecUsageIgnored                *bool `xml:"virtualExecUsageIgnored"`
    +	DiskOnlySnapshotOnSuspendedVMSupported *bool `xml:"diskOnlySnapshotOnSuspendedVMSupported"`
    +}
    +
    +func init() {
    +	t["VirtualMachineCapability"] = reflect.TypeOf((*VirtualMachineCapability)(nil)).Elem()
    +}
    +
    +type VirtualMachineCdromInfo struct {
    +	VirtualMachineTargetInfo
    +
    +	Description string `xml:"description,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachineCdromInfo"] = reflect.TypeOf((*VirtualMachineCdromInfo)(nil)).Elem()
    +}
    +
    +type VirtualMachineCloneSpec struct {
    +	DynamicData
    +
    +	Location      VirtualMachineRelocateSpec `xml:"location"`
    +	Template      bool                       `xml:"template"`
    +	Config        *VirtualMachineConfigSpec  `xml:"config,omitempty"`
    +	Customization *CustomizationSpec         `xml:"customization,omitempty"`
    +	PowerOn       bool                       `xml:"powerOn"`
    +	Snapshot      *ManagedObjectReference    `xml:"snapshot,omitempty"`
    +	Memory        *bool                      `xml:"memory"`
    +}
    +
    +func init() {
    +	t["VirtualMachineCloneSpec"] = reflect.TypeOf((*VirtualMachineCloneSpec)(nil)).Elem()
    +}
    +
    +type VirtualMachineConfigInfo struct {
    +	DynamicData
    +
    +	ChangeVersion                string                                     `xml:"changeVersion"`
    +	Modified                     time.Time                                  `xml:"modified"`
    +	Name                         string                                     `xml:"name"`
    +	GuestFullName                string                                     `xml:"guestFullName"`
    +	Version                      string                                     `xml:"version"`
    +	Uuid                         string                                     `xml:"uuid"`
    +	CreateDate                   *time.Time                                 `xml:"createDate"`
    +	InstanceUuid                 string                                     `xml:"instanceUuid,omitempty"`
    +	NpivNodeWorldWideName        []int64                                    `xml:"npivNodeWorldWideName,omitempty"`
    +	NpivPortWorldWideName        []int64                                    `xml:"npivPortWorldWideName,omitempty"`
    +	NpivWorldWideNameType        string                                     `xml:"npivWorldWideNameType,omitempty"`
    +	NpivDesiredNodeWwns          int16                                      `xml:"npivDesiredNodeWwns,omitempty"`
    +	NpivDesiredPortWwns          int16                                      `xml:"npivDesiredPortWwns,omitempty"`
    +	NpivTemporaryDisabled        *bool                                      `xml:"npivTemporaryDisabled"`
    +	NpivOnNonRdmDisks            *bool                                      `xml:"npivOnNonRdmDisks"`
    +	LocationId                   string                                     `xml:"locationId,omitempty"`
    +	Template                     bool                                       `xml:"template"`
    +	GuestId                      string                                     `xml:"guestId"`
    +	AlternateGuestName           string                                     `xml:"alternateGuestName"`
    +	Annotation                   string                                     `xml:"annotation,omitempty"`
    +	Files                        VirtualMachineFileInfo                     `xml:"files"`
    +	Tools                        *ToolsConfigInfo                           `xml:"tools,omitempty"`
    +	Flags                        VirtualMachineFlagInfo                     `xml:"flags"`
    +	ConsolePreferences           *VirtualMachineConsolePreferences          `xml:"consolePreferences,omitempty"`
    +	DefaultPowerOps              VirtualMachineDefaultPowerOpInfo           `xml:"defaultPowerOps"`
    +	Hardware                     VirtualHardware                            `xml:"hardware"`
    +	CpuAllocation                *ResourceAllocationInfo                    `xml:"cpuAllocation,omitempty"`
    +	MemoryAllocation             *ResourceAllocationInfo                    `xml:"memoryAllocation,omitempty"`
    +	LatencySensitivity           *LatencySensitivity                        `xml:"latencySensitivity,omitempty"`
    +	MemoryHotAddEnabled          *bool                                      `xml:"memoryHotAddEnabled"`
    +	CpuHotAddEnabled             *bool                                      `xml:"cpuHotAddEnabled"`
    +	CpuHotRemoveEnabled          *bool                                      `xml:"cpuHotRemoveEnabled"`
    +	HotPlugMemoryLimit           int64                                      `xml:"hotPlugMemoryLimit,omitempty"`
    +	HotPlugMemoryIncrementSize   int64                                      `xml:"hotPlugMemoryIncrementSize,omitempty"`
    +	CpuAffinity                  *VirtualMachineAffinityInfo                `xml:"cpuAffinity,omitempty"`
    +	MemoryAffinity               *VirtualMachineAffinityInfo                `xml:"memoryAffinity,omitempty"`
    +	NetworkShaper                *VirtualMachineNetworkShaperInfo           `xml:"networkShaper,omitempty"`
    +	ExtraConfig                  []BaseOptionValue                          `xml:"extraConfig,omitempty,typeattr"`
    +	CpuFeatureMask               []HostCpuIdInfo                            `xml:"cpuFeatureMask,omitempty"`
    +	DatastoreUrl                 []VirtualMachineConfigInfoDatastoreUrlPair `xml:"datastoreUrl,omitempty"`
    +	SwapPlacement                string                                     `xml:"swapPlacement,omitempty"`
    +	BootOptions                  *VirtualMachineBootOptions                 `xml:"bootOptions,omitempty"`
    +	FtInfo                       BaseFaultToleranceConfigInfo               `xml:"ftInfo,omitempty,typeattr"`
    +	RepConfig                    *ReplicationConfigSpec                     `xml:"repConfig,omitempty"`
    +	VAppConfig                   BaseVmConfigInfo                           `xml:"vAppConfig,omitempty,typeattr"`
    +	VAssertsEnabled              *bool                                      `xml:"vAssertsEnabled"`
    +	ChangeTrackingEnabled        *bool                                      `xml:"changeTrackingEnabled"`
    +	Firmware                     string                                     `xml:"firmware,omitempty"`
    +	MaxMksConnections            int32                                      `xml:"maxMksConnections,omitempty"`
    +	GuestAutoLockEnabled         *bool                                      `xml:"guestAutoLockEnabled"`
    +	ManagedBy                    *ManagedByInfo                             `xml:"managedBy,omitempty"`
    +	MemoryReservationLockedToMax *bool                                      `xml:"memoryReservationLockedToMax"`
    +	InitialOverhead              *VirtualMachineConfigInfoOverheadInfo      `xml:"initialOverhead,omitempty"`
    +	NestedHVEnabled              *bool                                      `xml:"nestedHVEnabled"`
    +	VPMCEnabled                  *bool                                      `xml:"vPMCEnabled"`
    +	ScheduledHardwareUpgradeInfo *ScheduledHardwareUpgradeInfo              `xml:"scheduledHardwareUpgradeInfo,omitempty"`
    +	ForkConfigInfo               *VirtualMachineForkConfigInfo              `xml:"forkConfigInfo,omitempty"`
    +	VFlashCacheReservation       int64                                      `xml:"vFlashCacheReservation,omitempty"`
    +	VmxConfigChecksum            []byte                                     `xml:"vmxConfigChecksum,omitempty"`
    +	MessageBusTunnelEnabled      *bool                                      `xml:"messageBusTunnelEnabled"`
    +	VmStorageObjectId            string                                     `xml:"vmStorageObjectId,omitempty"`
    +	SwapStorageObjectId          string                                     `xml:"swapStorageObjectId,omitempty"`
    +	KeyId                        *CryptoKeyId                               `xml:"keyId,omitempty"`
    +	GuestIntegrityInfo           *VirtualMachineGuestIntegrityInfo          `xml:"guestIntegrityInfo,omitempty"`
    +	MigrateEncryption            string                                     `xml:"migrateEncryption,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachineConfigInfo"] = reflect.TypeOf((*VirtualMachineConfigInfo)(nil)).Elem()
    +}
    +
    +type VirtualMachineConfigInfoDatastoreUrlPair struct {
    +	DynamicData
    +
    +	Name string `xml:"name"`
    +	Url  string `xml:"url"`
    +}
    +
    +func init() {
    +	t["VirtualMachineConfigInfoDatastoreUrlPair"] = reflect.TypeOf((*VirtualMachineConfigInfoDatastoreUrlPair)(nil)).Elem()
    +}
    +
    +type VirtualMachineConfigInfoOverheadInfo struct {
    +	DynamicData
    +
    +	InitialMemoryReservation int64 `xml:"initialMemoryReservation,omitempty"`
    +	InitialSwapReservation   int64 `xml:"initialSwapReservation,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachineConfigInfoOverheadInfo"] = reflect.TypeOf((*VirtualMachineConfigInfoOverheadInfo)(nil)).Elem()
    +}
    +
    +type VirtualMachineConfigOption struct {
    +	DynamicData
    +
    +	Version                          string                           `xml:"version"`
    +	Description                      string                           `xml:"description"`
    +	GuestOSDescriptor                []GuestOsDescriptor              `xml:"guestOSDescriptor"`
    +	GuestOSDefaultIndex              int32                            `xml:"guestOSDefaultIndex"`
    +	HardwareOptions                  VirtualHardwareOption            `xml:"hardwareOptions"`
    +	Capabilities                     VirtualMachineCapability         `xml:"capabilities"`
    +	Datastore                        DatastoreOption                  `xml:"datastore"`
    +	DefaultDevice                    []BaseVirtualDevice              `xml:"defaultDevice,omitempty,typeattr"`
    +	SupportedMonitorType             []string                         `xml:"supportedMonitorType"`
    +	SupportedOvfEnvironmentTransport []string                         `xml:"supportedOvfEnvironmentTransport,omitempty"`
    +	SupportedOvfInstallTransport     []string                         `xml:"supportedOvfInstallTransport,omitempty"`
    +	PropertyRelations                []VirtualMachinePropertyRelation `xml:"propertyRelations,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachineConfigOption"] = reflect.TypeOf((*VirtualMachineConfigOption)(nil)).Elem()
    +}
    +
    +type VirtualMachineConfigOptionDescriptor struct {
    +	DynamicData
    +
    +	Key                 string                   `xml:"key"`
    +	Description         string                   `xml:"description,omitempty"`
    +	Host                []ManagedObjectReference `xml:"host,omitempty"`
    +	CreateSupported     *bool                    `xml:"createSupported"`
    +	DefaultConfigOption *bool                    `xml:"defaultConfigOption"`
    +	RunSupported        *bool                    `xml:"runSupported"`
    +	UpgradeSupported    *bool                    `xml:"upgradeSupported"`
    +}
    +
    +func init() {
    +	t["VirtualMachineConfigOptionDescriptor"] = reflect.TypeOf((*VirtualMachineConfigOptionDescriptor)(nil)).Elem()
    +}
    +
    +type VirtualMachineConfigSpec struct {
    +	DynamicData
    +
    +	ChangeVersion                string                            `xml:"changeVersion,omitempty"`
    +	Name                         string                            `xml:"name,omitempty"`
    +	Version                      string                            `xml:"version,omitempty"`
    +	CreateDate                   *time.Time                        `xml:"createDate"`
    +	Uuid                         string                            `xml:"uuid,omitempty"`
    +	InstanceUuid                 string                            `xml:"instanceUuid,omitempty"`
    +	NpivNodeWorldWideName        []int64                           `xml:"npivNodeWorldWideName,omitempty"`
    +	NpivPortWorldWideName        []int64                           `xml:"npivPortWorldWideName,omitempty"`
    +	NpivWorldWideNameType        string                            `xml:"npivWorldWideNameType,omitempty"`
    +	NpivDesiredNodeWwns          int16                             `xml:"npivDesiredNodeWwns,omitempty"`
    +	NpivDesiredPortWwns          int16                             `xml:"npivDesiredPortWwns,omitempty"`
    +	NpivTemporaryDisabled        *bool                             `xml:"npivTemporaryDisabled"`
    +	NpivOnNonRdmDisks            *bool                             `xml:"npivOnNonRdmDisks"`
    +	NpivWorldWideNameOp          string                            `xml:"npivWorldWideNameOp,omitempty"`
    +	LocationId                   string                            `xml:"locationId,omitempty"`
    +	GuestId                      string                            `xml:"guestId,omitempty"`
    +	AlternateGuestName           string                            `xml:"alternateGuestName,omitempty"`
    +	Annotation                   string                            `xml:"annotation,omitempty"`
    +	Files                        *VirtualMachineFileInfo           `xml:"files,omitempty"`
    +	Tools                        *ToolsConfigInfo                  `xml:"tools,omitempty"`
    +	Flags                        *VirtualMachineFlagInfo           `xml:"flags,omitempty"`
    +	ConsolePreferences           *VirtualMachineConsolePreferences `xml:"consolePreferences,omitempty"`
    +	PowerOpInfo                  *VirtualMachineDefaultPowerOpInfo `xml:"powerOpInfo,omitempty"`
    +	NumCPUs                      int32                             `xml:"numCPUs,omitempty"`
    +	NumCoresPerSocket            int32                             `xml:"numCoresPerSocket,omitempty"`
    +	MemoryMB                     int64                             `xml:"memoryMB,omitempty"`
    +	MemoryHotAddEnabled          *bool                             `xml:"memoryHotAddEnabled"`
    +	CpuHotAddEnabled             *bool                             `xml:"cpuHotAddEnabled"`
    +	CpuHotRemoveEnabled          *bool                             `xml:"cpuHotRemoveEnabled"`
    +	VirtualICH7MPresent          *bool                             `xml:"virtualICH7MPresent"`
    +	VirtualSMCPresent            *bool                             `xml:"virtualSMCPresent"`
    +	DeviceChange                 []BaseVirtualDeviceConfigSpec     `xml:"deviceChange,omitempty,typeattr"`
    +	CpuAllocation                *ResourceAllocationInfo           `xml:"cpuAllocation,omitempty"`
    +	MemoryAllocation             *ResourceAllocationInfo           `xml:"memoryAllocation,omitempty"`
    +	LatencySensitivity           *LatencySensitivity               `xml:"latencySensitivity,omitempty"`
    +	CpuAffinity                  *VirtualMachineAffinityInfo       `xml:"cpuAffinity,omitempty"`
    +	MemoryAffinity               *VirtualMachineAffinityInfo       `xml:"memoryAffinity,omitempty"`
    +	NetworkShaper                *VirtualMachineNetworkShaperInfo  `xml:"networkShaper,omitempty"`
    +	CpuFeatureMask               []VirtualMachineCpuIdInfoSpec     `xml:"cpuFeatureMask,omitempty"`
    +	ExtraConfig                  []BaseOptionValue                 `xml:"extraConfig,omitempty,typeattr"`
    +	SwapPlacement                string                            `xml:"swapPlacement,omitempty"`
    +	BootOptions                  *VirtualMachineBootOptions        `xml:"bootOptions,omitempty"`
    +	VAppConfig                   BaseVmConfigSpec                  `xml:"vAppConfig,omitempty,typeattr"`
    +	FtInfo                       BaseFaultToleranceConfigInfo      `xml:"ftInfo,omitempty,typeattr"`
    +	RepConfig                    *ReplicationConfigSpec            `xml:"repConfig,omitempty"`
    +	VAppConfigRemoved            *bool                             `xml:"vAppConfigRemoved"`
    +	VAssertsEnabled              *bool                             `xml:"vAssertsEnabled"`
    +	ChangeTrackingEnabled        *bool                             `xml:"changeTrackingEnabled"`
    +	Firmware                     string                            `xml:"firmware,omitempty"`
    +	MaxMksConnections            int32                             `xml:"maxMksConnections,omitempty"`
    +	GuestAutoLockEnabled         *bool                             `xml:"guestAutoLockEnabled"`
    +	ManagedBy                    *ManagedByInfo                    `xml:"managedBy,omitempty"`
    +	MemoryReservationLockedToMax *bool                             `xml:"memoryReservationLockedToMax"`
    +	NestedHVEnabled              *bool                             `xml:"nestedHVEnabled"`
    +	VPMCEnabled                  *bool                             `xml:"vPMCEnabled"`
    +	ScheduledHardwareUpgradeInfo *ScheduledHardwareUpgradeInfo     `xml:"scheduledHardwareUpgradeInfo,omitempty"`
    +	VmProfile                    []BaseVirtualMachineProfileSpec   `xml:"vmProfile,omitempty,typeattr"`
    +	MessageBusTunnelEnabled      *bool                             `xml:"messageBusTunnelEnabled"`
    +	Crypto                       BaseCryptoSpec                    `xml:"crypto,omitempty,typeattr"`
    +	MigrateEncryption            string                            `xml:"migrateEncryption,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachineConfigSpec"] = reflect.TypeOf((*VirtualMachineConfigSpec)(nil)).Elem()
    +}
    +
    +type VirtualMachineConfigSummary struct {
    +	DynamicData
    +
    +	Name                string                       `xml:"name"`
    +	Template            bool                         `xml:"template"`
    +	VmPathName          string                       `xml:"vmPathName"`
    +	MemorySizeMB        int32                        `xml:"memorySizeMB,omitempty"`
    +	CpuReservation      int32                        `xml:"cpuReservation,omitempty"`
    +	MemoryReservation   int32                        `xml:"memoryReservation,omitempty"`
    +	NumCpu              int32                        `xml:"numCpu,omitempty"`
    +	NumEthernetCards    int32                        `xml:"numEthernetCards,omitempty"`
    +	NumVirtualDisks     int32                        `xml:"numVirtualDisks,omitempty"`
    +	Uuid                string                       `xml:"uuid,omitempty"`
    +	InstanceUuid        string                       `xml:"instanceUuid,omitempty"`
    +	GuestId             string                       `xml:"guestId,omitempty"`
    +	GuestFullName       string                       `xml:"guestFullName,omitempty"`
    +	Annotation          string                       `xml:"annotation,omitempty"`
    +	Product             *VAppProductInfo             `xml:"product,omitempty"`
    +	InstallBootRequired *bool                        `xml:"installBootRequired"`
    +	FtInfo              BaseFaultToleranceConfigInfo `xml:"ftInfo,omitempty,typeattr"`
    +	ManagedBy           *ManagedByInfo               `xml:"managedBy,omitempty"`
    +	TpmPresent          *bool                        `xml:"tpmPresent"`
    +	NumVmiopBackings    int32                        `xml:"numVmiopBackings,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachineConfigSummary"] = reflect.TypeOf((*VirtualMachineConfigSummary)(nil)).Elem()
    +}
    +
    +type VirtualMachineConsolePreferences struct {
    +	DynamicData
    +
    +	PowerOnWhenOpened        *bool `xml:"powerOnWhenOpened"`
    +	EnterFullScreenOnPowerOn *bool `xml:"enterFullScreenOnPowerOn"`
    +	CloseOnPowerOffOrSuspend *bool `xml:"closeOnPowerOffOrSuspend"`
    +}
    +
    +func init() {
    +	t["VirtualMachineConsolePreferences"] = reflect.TypeOf((*VirtualMachineConsolePreferences)(nil)).Elem()
    +}
    +
    +type VirtualMachineCpuIdInfoSpec struct {
    +	ArrayUpdateSpec
    +
    +	Info *HostCpuIdInfo `xml:"info,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachineCpuIdInfoSpec"] = reflect.TypeOf((*VirtualMachineCpuIdInfoSpec)(nil)).Elem()
    +}
    +
    +type VirtualMachineDatastoreInfo struct {
    +	VirtualMachineTargetInfo
    +
    +	Datastore              DatastoreSummary    `xml:"datastore"`
    +	Capability             DatastoreCapability `xml:"capability"`
    +	MaxFileSize            int64               `xml:"maxFileSize"`
    +	MaxVirtualDiskCapacity int64               `xml:"maxVirtualDiskCapacity,omitempty"`
    +	MaxPhysicalRDMFileSize int64               `xml:"maxPhysicalRDMFileSize,omitempty"`
    +	MaxVirtualRDMFileSize  int64               `xml:"maxVirtualRDMFileSize,omitempty"`
    +	Mode                   string              `xml:"mode"`
    +	VStorageSupport        string              `xml:"vStorageSupport,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachineDatastoreInfo"] = reflect.TypeOf((*VirtualMachineDatastoreInfo)(nil)).Elem()
    +}
    +
    +type VirtualMachineDatastoreVolumeOption struct {
    +	DynamicData
    +
    +	FileSystemType string `xml:"fileSystemType"`
    +	MajorVersion   int32  `xml:"majorVersion,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachineDatastoreVolumeOption"] = reflect.TypeOf((*VirtualMachineDatastoreVolumeOption)(nil)).Elem()
    +}
    +
    +type VirtualMachineDefaultPowerOpInfo struct {
    +	DynamicData
    +
    +	PowerOffType        string `xml:"powerOffType,omitempty"`
    +	SuspendType         string `xml:"suspendType,omitempty"`
    +	ResetType           string `xml:"resetType,omitempty"`
    +	DefaultPowerOffType string `xml:"defaultPowerOffType,omitempty"`
    +	DefaultSuspendType  string `xml:"defaultSuspendType,omitempty"`
    +	DefaultResetType    string `xml:"defaultResetType,omitempty"`
    +	StandbyAction       string `xml:"standbyAction,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachineDefaultPowerOpInfo"] = reflect.TypeOf((*VirtualMachineDefaultPowerOpInfo)(nil)).Elem()
    +}
    +
    +type VirtualMachineDefaultProfileSpec struct {
    +	VirtualMachineProfileSpec
    +}
    +
    +func init() {
    +	t["VirtualMachineDefaultProfileSpec"] = reflect.TypeOf((*VirtualMachineDefaultProfileSpec)(nil)).Elem()
    +}
    +
    +type VirtualMachineDefinedProfileSpec struct {
    +	VirtualMachineProfileSpec
    +
    +	ProfileId       string                        `xml:"profileId"`
    +	ReplicationSpec *ReplicationSpec              `xml:"replicationSpec,omitempty"`
    +	ProfileData     *VirtualMachineProfileRawData `xml:"profileData,omitempty"`
    +	ProfileParams   []KeyValue                    `xml:"profileParams,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachineDefinedProfileSpec"] = reflect.TypeOf((*VirtualMachineDefinedProfileSpec)(nil)).Elem()
    +}
    +
    +type VirtualMachineDeviceRuntimeInfo struct {
    +	DynamicData
    +
    +	RuntimeState BaseVirtualMachineDeviceRuntimeInfoDeviceRuntimeState `xml:"runtimeState,typeattr"`
    +	Key          int32                                                 `xml:"key"`
    +}
    +
    +func init() {
    +	t["VirtualMachineDeviceRuntimeInfo"] = reflect.TypeOf((*VirtualMachineDeviceRuntimeInfo)(nil)).Elem()
    +}
    +
    +type VirtualMachineDeviceRuntimeInfoDeviceRuntimeState struct {
    +	DynamicData
    +}
    +
    +func init() {
    +	t["VirtualMachineDeviceRuntimeInfoDeviceRuntimeState"] = reflect.TypeOf((*VirtualMachineDeviceRuntimeInfoDeviceRuntimeState)(nil)).Elem()
    +}
    +
    +type VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeState struct {
    +	VirtualMachineDeviceRuntimeInfoDeviceRuntimeState
    +
    +	VmDirectPathGen2Active                 bool                               `xml:"vmDirectPathGen2Active"`
    +	VmDirectPathGen2InactiveReasonVm       []string                           `xml:"vmDirectPathGen2InactiveReasonVm,omitempty"`
    +	VmDirectPathGen2InactiveReasonOther    []string                           `xml:"vmDirectPathGen2InactiveReasonOther,omitempty"`
    +	VmDirectPathGen2InactiveReasonExtended string                             `xml:"vmDirectPathGen2InactiveReasonExtended,omitempty"`
    +	ReservationStatus                      string                             `xml:"reservationStatus,omitempty"`
    +	AttachmentStatus                       string                             `xml:"attachmentStatus,omitempty"`
    +	FeatureRequirement                     []VirtualMachineFeatureRequirement `xml:"featureRequirement,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeState"] = reflect.TypeOf((*VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeState)(nil)).Elem()
    +}
    +
    +type VirtualMachineDiskDeviceInfo struct {
    +	VirtualMachineTargetInfo
    +
    +	Capacity int64                    `xml:"capacity,omitempty"`
    +	Vm       []ManagedObjectReference `xml:"vm,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachineDiskDeviceInfo"] = reflect.TypeOf((*VirtualMachineDiskDeviceInfo)(nil)).Elem()
    +}
    +
    +type VirtualMachineDisplayTopology struct {
    +	DynamicData
    +
    +	X      int32 `xml:"x"`
    +	Y      int32 `xml:"y"`
    +	Width  int32 `xml:"width"`
    +	Height int32 `xml:"height"`
    +}
    +
    +func init() {
    +	t["VirtualMachineDisplayTopology"] = reflect.TypeOf((*VirtualMachineDisplayTopology)(nil)).Elem()
    +}
    +
    +type VirtualMachineEmptyProfileSpec struct {
    +	VirtualMachineProfileSpec
    +}
    +
    +func init() {
    +	t["VirtualMachineEmptyProfileSpec"] = reflect.TypeOf((*VirtualMachineEmptyProfileSpec)(nil)).Elem()
    +}
    +
    +type VirtualMachineFeatureRequirement struct {
    +	DynamicData
    +
    +	Key         string `xml:"key"`
    +	FeatureName string `xml:"featureName"`
    +	Value       string `xml:"value"`
    +}
    +
    +func init() {
    +	t["VirtualMachineFeatureRequirement"] = reflect.TypeOf((*VirtualMachineFeatureRequirement)(nil)).Elem()
    +}
    +
    +type VirtualMachineFileInfo struct {
    +	DynamicData
    +
    +	VmPathName          string `xml:"vmPathName,omitempty"`
    +	SnapshotDirectory   string `xml:"snapshotDirectory,omitempty"`
    +	SuspendDirectory    string `xml:"suspendDirectory,omitempty"`
    +	LogDirectory        string `xml:"logDirectory,omitempty"`
    +	FtMetadataDirectory string `xml:"ftMetadataDirectory,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachineFileInfo"] = reflect.TypeOf((*VirtualMachineFileInfo)(nil)).Elem()
    +}
    +
    +type VirtualMachineFileLayout struct {
    +	DynamicData
    +
    +	ConfigFile []string                                 `xml:"configFile,omitempty"`
    +	LogFile    []string                                 `xml:"logFile,omitempty"`
    +	Disk       []VirtualMachineFileLayoutDiskLayout     `xml:"disk,omitempty"`
    +	Snapshot   []VirtualMachineFileLayoutSnapshotLayout `xml:"snapshot,omitempty"`
    +	SwapFile   string                                   `xml:"swapFile,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachineFileLayout"] = reflect.TypeOf((*VirtualMachineFileLayout)(nil)).Elem()
    +}
    +
    +type VirtualMachineFileLayoutDiskLayout struct {
    +	DynamicData
    +
    +	Key      int32    `xml:"key"`
    +	DiskFile []string `xml:"diskFile"`
    +}
    +
    +func init() {
    +	t["VirtualMachineFileLayoutDiskLayout"] = reflect.TypeOf((*VirtualMachineFileLayoutDiskLayout)(nil)).Elem()
    +}
    +
    +type VirtualMachineFileLayoutEx struct {
    +	DynamicData
    +
    +	File      []VirtualMachineFileLayoutExFileInfo       `xml:"file,omitempty"`
    +	Disk      []VirtualMachineFileLayoutExDiskLayout     `xml:"disk,omitempty"`
    +	Snapshot  []VirtualMachineFileLayoutExSnapshotLayout `xml:"snapshot,omitempty"`
    +	Timestamp time.Time                                  `xml:"timestamp"`
    +}
    +
    +func init() {
    +	t["VirtualMachineFileLayoutEx"] = reflect.TypeOf((*VirtualMachineFileLayoutEx)(nil)).Elem()
    +}
    +
    +type VirtualMachineFileLayoutExDiskLayout struct {
    +	DynamicData
    +
    +	Key   int32                                `xml:"key"`
    +	Chain []VirtualMachineFileLayoutExDiskUnit `xml:"chain,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachineFileLayoutExDiskLayout"] = reflect.TypeOf((*VirtualMachineFileLayoutExDiskLayout)(nil)).Elem()
    +}
    +
    +type VirtualMachineFileLayoutExDiskUnit struct {
    +	DynamicData
    +
    +	FileKey []int32 `xml:"fileKey"`
    +}
    +
    +func init() {
    +	t["VirtualMachineFileLayoutExDiskUnit"] = reflect.TypeOf((*VirtualMachineFileLayoutExDiskUnit)(nil)).Elem()
    +}
    +
    +type VirtualMachineFileLayoutExFileInfo struct {
    +	DynamicData
    +
    +	Key             int32  `xml:"key"`
    +	Name            string `xml:"name"`
    +	Type            string `xml:"type"`
    +	Size            int64  `xml:"size"`
    +	UniqueSize      int64  `xml:"uniqueSize,omitempty"`
    +	BackingObjectId string `xml:"backingObjectId,omitempty"`
    +	Accessible      *bool  `xml:"accessible"`
    +}
    +
    +func init() {
    +	t["VirtualMachineFileLayoutExFileInfo"] = reflect.TypeOf((*VirtualMachineFileLayoutExFileInfo)(nil)).Elem()
    +}
    +
    +type VirtualMachineFileLayoutExSnapshotLayout struct {
    +	DynamicData
    +
    +	Key       ManagedObjectReference                 `xml:"key"`
    +	DataKey   int32                                  `xml:"dataKey"`
    +	MemoryKey int32                                  `xml:"memoryKey,omitempty"`
    +	Disk      []VirtualMachineFileLayoutExDiskLayout `xml:"disk,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachineFileLayoutExSnapshotLayout"] = reflect.TypeOf((*VirtualMachineFileLayoutExSnapshotLayout)(nil)).Elem()
    +}
    +
    +type VirtualMachineFileLayoutSnapshotLayout struct {
    +	DynamicData
    +
    +	Key          ManagedObjectReference `xml:"key"`
    +	SnapshotFile []string               `xml:"snapshotFile"`
    +}
    +
    +func init() {
    +	t["VirtualMachineFileLayoutSnapshotLayout"] = reflect.TypeOf((*VirtualMachineFileLayoutSnapshotLayout)(nil)).Elem()
    +}
    +
    +type VirtualMachineFlagInfo struct {
    +	DynamicData
    +
    +	DisableAcceleration      *bool  `xml:"disableAcceleration"`
    +	EnableLogging            *bool  `xml:"enableLogging"`
    +	UseToe                   *bool  `xml:"useToe"`
    +	RunWithDebugInfo         *bool  `xml:"runWithDebugInfo"`
    +	MonitorType              string `xml:"monitorType,omitempty"`
    +	HtSharing                string `xml:"htSharing,omitempty"`
    +	SnapshotDisabled         *bool  `xml:"snapshotDisabled"`
    +	SnapshotLocked           *bool  `xml:"snapshotLocked"`
    +	DiskUuidEnabled          *bool  `xml:"diskUuidEnabled"`
    +	VirtualMmuUsage          string `xml:"virtualMmuUsage,omitempty"`
    +	VirtualExecUsage         string `xml:"virtualExecUsage,omitempty"`
    +	SnapshotPowerOffBehavior string `xml:"snapshotPowerOffBehavior,omitempty"`
    +	RecordReplayEnabled      *bool  `xml:"recordReplayEnabled"`
    +	FaultToleranceType       string `xml:"faultToleranceType,omitempty"`
    +	CbrcCacheEnabled         *bool  `xml:"cbrcCacheEnabled"`
    +	VvtdEnabled              *bool  `xml:"vvtdEnabled"`
    +	VbsEnabled               *bool  `xml:"vbsEnabled"`
    +}
    +
    +func init() {
    +	t["VirtualMachineFlagInfo"] = reflect.TypeOf((*VirtualMachineFlagInfo)(nil)).Elem()
    +}
    +
    +type VirtualMachineFloppyInfo struct {
    +	VirtualMachineTargetInfo
    +}
    +
    +func init() {
    +	t["VirtualMachineFloppyInfo"] = reflect.TypeOf((*VirtualMachineFloppyInfo)(nil)).Elem()
    +}
    +
    +type VirtualMachineForkConfigInfo struct {
    +	DynamicData
    +
    +	ParentEnabled     *bool  `xml:"parentEnabled"`
    +	ChildForkGroupId  string `xml:"childForkGroupId,omitempty"`
    +	ParentForkGroupId string `xml:"parentForkGroupId,omitempty"`
    +	ChildType         string `xml:"childType,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachineForkConfigInfo"] = reflect.TypeOf((*VirtualMachineForkConfigInfo)(nil)).Elem()
    +}
    +
    +type VirtualMachineGuestIntegrityInfo struct {
    +	DynamicData
    +
    +	Enabled *bool `xml:"enabled"`
    +}
    +
    +func init() {
    +	t["VirtualMachineGuestIntegrityInfo"] = reflect.TypeOf((*VirtualMachineGuestIntegrityInfo)(nil)).Elem()
    +}
    +
    +type VirtualMachineGuestQuiesceSpec struct {
    +	DynamicData
    +
    +	Timeout int32 `xml:"timeout,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachineGuestQuiesceSpec"] = reflect.TypeOf((*VirtualMachineGuestQuiesceSpec)(nil)).Elem()
    +}
    +
    +type VirtualMachineGuestSummary struct {
    +	DynamicData
    +
    +	GuestId             string                    `xml:"guestId,omitempty"`
    +	GuestFullName       string                    `xml:"guestFullName,omitempty"`
    +	ToolsStatus         VirtualMachineToolsStatus `xml:"toolsStatus,omitempty"`
    +	ToolsVersionStatus  string                    `xml:"toolsVersionStatus,omitempty"`
    +	ToolsVersionStatus2 string                    `xml:"toolsVersionStatus2,omitempty"`
    +	ToolsRunningStatus  string                    `xml:"toolsRunningStatus,omitempty"`
    +	HostName            string                    `xml:"hostName,omitempty"`
    +	IpAddress           string                    `xml:"ipAddress,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachineGuestSummary"] = reflect.TypeOf((*VirtualMachineGuestSummary)(nil)).Elem()
    +}
    +
    +type VirtualMachineIdeDiskDeviceInfo struct {
    +	VirtualMachineDiskDeviceInfo
    +
    +	PartitionTable []VirtualMachineIdeDiskDevicePartitionInfo `xml:"partitionTable,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachineIdeDiskDeviceInfo"] = reflect.TypeOf((*VirtualMachineIdeDiskDeviceInfo)(nil)).Elem()
    +}
    +
    +type VirtualMachineIdeDiskDevicePartitionInfo struct {
    +	DynamicData
    +
    +	Id       int32 `xml:"id"`
    +	Capacity int32 `xml:"capacity"`
    +}
    +
    +func init() {
    +	t["VirtualMachineIdeDiskDevicePartitionInfo"] = reflect.TypeOf((*VirtualMachineIdeDiskDevicePartitionInfo)(nil)).Elem()
    +}
    +
    +type VirtualMachineImportSpec struct {
    +	ImportSpec
    +
    +	ConfigSpec    VirtualMachineConfigSpec `xml:"configSpec"`
    +	ResPoolEntity *ManagedObjectReference  `xml:"resPoolEntity,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachineImportSpec"] = reflect.TypeOf((*VirtualMachineImportSpec)(nil)).Elem()
    +}
    +
    +type VirtualMachineInstantCloneSpec struct {
    +	DynamicData
    +
    +	Name     string                     `xml:"name"`
    +	Location VirtualMachineRelocateSpec `xml:"location"`
    +	Config   []BaseOptionValue          `xml:"config,omitempty,typeattr"`
    +	BiosUuid string                     `xml:"biosUuid,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachineInstantCloneSpec"] = reflect.TypeOf((*VirtualMachineInstantCloneSpec)(nil)).Elem()
    +}
    +
    +type VirtualMachineLegacyNetworkSwitchInfo struct {
    +	DynamicData
    +
    +	Name string `xml:"name"`
    +}
    +
    +func init() {
    +	t["VirtualMachineLegacyNetworkSwitchInfo"] = reflect.TypeOf((*VirtualMachineLegacyNetworkSwitchInfo)(nil)).Elem()
    +}
    +
    +type VirtualMachineMemoryReservationInfo struct {
    +	DynamicData
    +
    +	VirtualMachineMin      int64  `xml:"virtualMachineMin"`
    +	VirtualMachineMax      int64  `xml:"virtualMachineMax"`
    +	VirtualMachineReserved int64  `xml:"virtualMachineReserved"`
    +	AllocationPolicy       string `xml:"allocationPolicy"`
    +}
    +
    +func init() {
    +	t["VirtualMachineMemoryReservationInfo"] = reflect.TypeOf((*VirtualMachineMemoryReservationInfo)(nil)).Elem()
    +}
    +
    +type VirtualMachineMemoryReservationSpec struct {
    +	DynamicData
    +
    +	VirtualMachineReserved int64  `xml:"virtualMachineReserved,omitempty"`
    +	AllocationPolicy       string `xml:"allocationPolicy,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachineMemoryReservationSpec"] = reflect.TypeOf((*VirtualMachineMemoryReservationSpec)(nil)).Elem()
    +}
    +
    +type VirtualMachineMessage struct {
    +	DynamicData
    +
    +	Id       string    `xml:"id"`
    +	Argument []AnyType `xml:"argument,omitempty,typeattr"`
    +	Text     string    `xml:"text,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachineMessage"] = reflect.TypeOf((*VirtualMachineMessage)(nil)).Elem()
    +}
    +
    +type VirtualMachineMetadataManagerVmMetadata struct {
    +	DynamicData
    +
    +	VmId     string `xml:"vmId"`
    +	Metadata string `xml:"metadata,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachineMetadataManagerVmMetadata"] = reflect.TypeOf((*VirtualMachineMetadataManagerVmMetadata)(nil)).Elem()
    +}
    +
    +type VirtualMachineMetadataManagerVmMetadataInput struct {
    +	DynamicData
    +
    +	Operation  string                                  `xml:"operation"`
    +	VmMetadata VirtualMachineMetadataManagerVmMetadata `xml:"vmMetadata"`
    +}
    +
    +func init() {
    +	t["VirtualMachineMetadataManagerVmMetadataInput"] = reflect.TypeOf((*VirtualMachineMetadataManagerVmMetadataInput)(nil)).Elem()
    +}
    +
    +type VirtualMachineMetadataManagerVmMetadataOwner struct {
    +	DynamicData
    +
    +	Name string `xml:"name"`
    +}
    +
    +func init() {
    +	t["VirtualMachineMetadataManagerVmMetadataOwner"] = reflect.TypeOf((*VirtualMachineMetadataManagerVmMetadataOwner)(nil)).Elem()
    +}
    +
    +type VirtualMachineMetadataManagerVmMetadataResult struct {
    +	DynamicData
    +
    +	VmMetadata VirtualMachineMetadataManagerVmMetadata `xml:"vmMetadata"`
    +	Error      *LocalizedMethodFault                   `xml:"error,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachineMetadataManagerVmMetadataResult"] = reflect.TypeOf((*VirtualMachineMetadataManagerVmMetadataResult)(nil)).Elem()
    +}
    +
    +type VirtualMachineMksTicket struct {
    +	DynamicData
    +
    +	Ticket        string `xml:"ticket"`
    +	CfgFile       string `xml:"cfgFile"`
    +	Host          string `xml:"host,omitempty"`
    +	Port          int32  `xml:"port,omitempty"`
    +	SslThumbprint string `xml:"sslThumbprint,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachineMksTicket"] = reflect.TypeOf((*VirtualMachineMksTicket)(nil)).Elem()
    +}
    +
    +type VirtualMachineNetworkInfo struct {
    +	VirtualMachineTargetInfo
    +
    +	Network BaseNetworkSummary `xml:"network,typeattr"`
    +	Vswitch string             `xml:"vswitch,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachineNetworkInfo"] = reflect.TypeOf((*VirtualMachineNetworkInfo)(nil)).Elem()
    +}
    +
    +type VirtualMachineNetworkShaperInfo struct {
    +	DynamicData
    +
    +	Enabled    *bool `xml:"enabled"`
    +	PeakBps    int64 `xml:"peakBps,omitempty"`
    +	AverageBps int64 `xml:"averageBps,omitempty"`
    +	BurstSize  int64 `xml:"burstSize,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachineNetworkShaperInfo"] = reflect.TypeOf((*VirtualMachineNetworkShaperInfo)(nil)).Elem()
    +}
    +
    +type VirtualMachineParallelInfo struct {
    +	VirtualMachineTargetInfo
    +}
    +
    +func init() {
    +	t["VirtualMachineParallelInfo"] = reflect.TypeOf((*VirtualMachineParallelInfo)(nil)).Elem()
    +}
    +
    +type VirtualMachinePciPassthroughInfo struct {
    +	VirtualMachineTargetInfo
    +
    +	PciDevice HostPciDevice `xml:"pciDevice"`
    +	SystemId  string        `xml:"systemId"`
    +}
    +
    +func init() {
    +	t["VirtualMachinePciPassthroughInfo"] = reflect.TypeOf((*VirtualMachinePciPassthroughInfo)(nil)).Elem()
    +}
    +
    +type VirtualMachinePciSharedGpuPassthroughInfo struct {
    +	VirtualMachineTargetInfo
    +
    +	Vgpu string `xml:"vgpu"`
    +}
    +
    +func init() {
    +	t["VirtualMachinePciSharedGpuPassthroughInfo"] = reflect.TypeOf((*VirtualMachinePciSharedGpuPassthroughInfo)(nil)).Elem()
    +}
    +
    +type VirtualMachineProfileDetails struct {
    +	DynamicData
    +
    +	Profile            []BaseVirtualMachineProfileSpec                  `xml:"profile,omitempty,typeattr"`
    +	DiskProfileDetails []VirtualMachineProfileDetailsDiskProfileDetails `xml:"diskProfileDetails,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachineProfileDetails"] = reflect.TypeOf((*VirtualMachineProfileDetails)(nil)).Elem()
    +}
    +
    +type VirtualMachineProfileDetailsDiskProfileDetails struct {
    +	DynamicData
    +
    +	DiskId  int32                           `xml:"diskId"`
    +	Profile []BaseVirtualMachineProfileSpec `xml:"profile,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["VirtualMachineProfileDetailsDiskProfileDetails"] = reflect.TypeOf((*VirtualMachineProfileDetailsDiskProfileDetails)(nil)).Elem()
    +}
    +
    +type VirtualMachineProfileRawData struct {
    +	DynamicData
    +
    +	ExtensionKey string `xml:"extensionKey"`
    +	ObjectData   string `xml:"objectData,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachineProfileRawData"] = reflect.TypeOf((*VirtualMachineProfileRawData)(nil)).Elem()
    +}
    +
    +type VirtualMachineProfileSpec struct {
    +	DynamicData
    +}
    +
    +func init() {
    +	t["VirtualMachineProfileSpec"] = reflect.TypeOf((*VirtualMachineProfileSpec)(nil)).Elem()
    +}
    +
    +type VirtualMachinePropertyRelation struct {
    +	DynamicData
    +
    +	Key       DynamicProperty   `xml:"key"`
    +	Relations []DynamicProperty `xml:"relations,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachinePropertyRelation"] = reflect.TypeOf((*VirtualMachinePropertyRelation)(nil)).Elem()
    +}
    +
    +type VirtualMachineQuestionInfo struct {
    +	DynamicData
    +
    +	Id      string                  `xml:"id"`
    +	Text    string                  `xml:"text"`
    +	Choice  ChoiceOption            `xml:"choice"`
    +	Message []VirtualMachineMessage `xml:"message,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachineQuestionInfo"] = reflect.TypeOf((*VirtualMachineQuestionInfo)(nil)).Elem()
    +}
    +
    +type VirtualMachineQuickStats struct {
    +	DynamicData
    +
    +	OverallCpuUsage              int32               `xml:"overallCpuUsage,omitempty"`
    +	OverallCpuDemand             int32               `xml:"overallCpuDemand,omitempty"`
    +	GuestMemoryUsage             int32               `xml:"guestMemoryUsage,omitempty"`
    +	HostMemoryUsage              int32               `xml:"hostMemoryUsage,omitempty"`
    +	GuestHeartbeatStatus         ManagedEntityStatus `xml:"guestHeartbeatStatus"`
    +	DistributedCpuEntitlement    int32               `xml:"distributedCpuEntitlement,omitempty"`
    +	DistributedMemoryEntitlement int32               `xml:"distributedMemoryEntitlement,omitempty"`
    +	StaticCpuEntitlement         int32               `xml:"staticCpuEntitlement,omitempty"`
    +	StaticMemoryEntitlement      int32               `xml:"staticMemoryEntitlement,omitempty"`
    +	PrivateMemory                int32               `xml:"privateMemory,omitempty"`
    +	SharedMemory                 int32               `xml:"sharedMemory,omitempty"`
    +	SwappedMemory                int32               `xml:"swappedMemory,omitempty"`
    +	BalloonedMemory              int32               `xml:"balloonedMemory,omitempty"`
    +	ConsumedOverheadMemory       int32               `xml:"consumedOverheadMemory,omitempty"`
    +	FtLogBandwidth               int32               `xml:"ftLogBandwidth,omitempty"`
    +	FtSecondaryLatency           int32               `xml:"ftSecondaryLatency,omitempty"`
    +	FtLatencyStatus              ManagedEntityStatus `xml:"ftLatencyStatus,omitempty"`
    +	CompressedMemory             int64               `xml:"compressedMemory,omitempty"`
    +	UptimeSeconds                int32               `xml:"uptimeSeconds,omitempty"`
    +	SsdSwappedMemory             int64               `xml:"ssdSwappedMemory,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachineQuickStats"] = reflect.TypeOf((*VirtualMachineQuickStats)(nil)).Elem()
    +}
    +
    +type VirtualMachineRelocateSpec struct {
    +	DynamicData
    +
    +	Service      *ServiceLocator                         `xml:"service,omitempty"`
    +	Folder       *ManagedObjectReference                 `xml:"folder,omitempty"`
    +	Datastore    *ManagedObjectReference                 `xml:"datastore,omitempty"`
    +	DiskMoveType string                                  `xml:"diskMoveType,omitempty"`
    +	Pool         *ManagedObjectReference                 `xml:"pool,omitempty"`
    +	Host         *ManagedObjectReference                 `xml:"host,omitempty"`
    +	Disk         []VirtualMachineRelocateSpecDiskLocator `xml:"disk,omitempty"`
    +	Transform    VirtualMachineRelocateTransformation    `xml:"transform,omitempty"`
    +	DeviceChange []BaseVirtualDeviceConfigSpec           `xml:"deviceChange,omitempty,typeattr"`
    +	Profile      []BaseVirtualMachineProfileSpec         `xml:"profile,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["VirtualMachineRelocateSpec"] = reflect.TypeOf((*VirtualMachineRelocateSpec)(nil)).Elem()
    +}
    +
    +type VirtualMachineRelocateSpecDiskLocator struct {
    +	DynamicData
    +
    +	DiskId          int32                           `xml:"diskId"`
    +	Datastore       ManagedObjectReference          `xml:"datastore"`
    +	DiskMoveType    string                          `xml:"diskMoveType,omitempty"`
    +	DiskBackingInfo BaseVirtualDeviceBackingInfo    `xml:"diskBackingInfo,omitempty,typeattr"`
    +	Profile         []BaseVirtualMachineProfileSpec `xml:"profile,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["VirtualMachineRelocateSpecDiskLocator"] = reflect.TypeOf((*VirtualMachineRelocateSpecDiskLocator)(nil)).Elem()
    +}
    +
    +type VirtualMachineRuntimeInfo struct {
    +	DynamicData
    +
    +	Device                    []VirtualMachineDeviceRuntimeInfo            `xml:"device,omitempty"`
    +	Host                      *ManagedObjectReference                      `xml:"host,omitempty"`
    +	ConnectionState           VirtualMachineConnectionState                `xml:"connectionState"`
    +	PowerState                VirtualMachinePowerState                     `xml:"powerState"`
    +	FaultToleranceState       VirtualMachineFaultToleranceState            `xml:"faultToleranceState,omitempty"`
    +	DasVmProtection           *VirtualMachineRuntimeInfoDasProtectionState `xml:"dasVmProtection,omitempty"`
    +	ToolsInstallerMounted     bool                                         `xml:"toolsInstallerMounted"`
    +	SuspendTime               *time.Time                                   `xml:"suspendTime"`
    +	BootTime                  *time.Time                                   `xml:"bootTime"`
    +	SuspendInterval           int64                                        `xml:"suspendInterval,omitempty"`
    +	Question                  *VirtualMachineQuestionInfo                  `xml:"question,omitempty"`
    +	MemoryOverhead            int64                                        `xml:"memoryOverhead,omitempty"`
    +	MaxCpuUsage               int32                                        `xml:"maxCpuUsage,omitempty"`
    +	MaxMemoryUsage            int32                                        `xml:"maxMemoryUsage,omitempty"`
    +	NumMksConnections         int32                                        `xml:"numMksConnections"`
    +	RecordReplayState         VirtualMachineRecordReplayState              `xml:"recordReplayState,omitempty"`
    +	CleanPowerOff             *bool                                        `xml:"cleanPowerOff"`
    +	NeedSecondaryReason       string                                       `xml:"needSecondaryReason,omitempty"`
    +	OnlineStandby             *bool                                        `xml:"onlineStandby"`
    +	MinRequiredEVCModeKey     string                                       `xml:"minRequiredEVCModeKey,omitempty"`
    +	ConsolidationNeeded       *bool                                        `xml:"consolidationNeeded"`
    +	OfflineFeatureRequirement []VirtualMachineFeatureRequirement           `xml:"offlineFeatureRequirement,omitempty"`
    +	FeatureRequirement        []VirtualMachineFeatureRequirement           `xml:"featureRequirement,omitempty"`
    +	FeatureMask               []HostFeatureMask                            `xml:"featureMask,omitempty"`
    +	VFlashCacheAllocation     int64                                        `xml:"vFlashCacheAllocation,omitempty"`
    +	Paused                    *bool                                        `xml:"paused"`
    +	SnapshotInBackground      *bool                                        `xml:"snapshotInBackground"`
    +	QuiescedForkParent        *bool                                        `xml:"quiescedForkParent"`
    +	InstantCloneFrozen        *bool                                        `xml:"instantCloneFrozen"`
    +	CryptoState               string                                       `xml:"cryptoState,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachineRuntimeInfo"] = reflect.TypeOf((*VirtualMachineRuntimeInfo)(nil)).Elem()
    +}
    +
    +type VirtualMachineRuntimeInfoDasProtectionState struct {
    +	DynamicData
    +
    +	DasProtected bool `xml:"dasProtected"`
    +}
    +
    +func init() {
    +	t["VirtualMachineRuntimeInfoDasProtectionState"] = reflect.TypeOf((*VirtualMachineRuntimeInfoDasProtectionState)(nil)).Elem()
    +}
    +
    +type VirtualMachineScsiDiskDeviceInfo struct {
    +	VirtualMachineDiskDeviceInfo
    +
    +	Disk          *HostScsiDisk `xml:"disk,omitempty"`
    +	TransportHint string        `xml:"transportHint,omitempty"`
    +	LunNumber     int32         `xml:"lunNumber,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachineScsiDiskDeviceInfo"] = reflect.TypeOf((*VirtualMachineScsiDiskDeviceInfo)(nil)).Elem()
    +}
    +
    +type VirtualMachineScsiPassthroughInfo struct {
    +	VirtualMachineTargetInfo
    +
    +	ScsiClass          string `xml:"scsiClass"`
    +	Vendor             string `xml:"vendor"`
    +	PhysicalUnitNumber int32  `xml:"physicalUnitNumber"`
    +}
    +
    +func init() {
    +	t["VirtualMachineScsiPassthroughInfo"] = reflect.TypeOf((*VirtualMachineScsiPassthroughInfo)(nil)).Elem()
    +}
    +
    +type VirtualMachineSerialInfo struct {
    +	VirtualMachineTargetInfo
    +}
    +
    +func init() {
    +	t["VirtualMachineSerialInfo"] = reflect.TypeOf((*VirtualMachineSerialInfo)(nil)).Elem()
    +}
    +
    +type VirtualMachineSnapshotInfo struct {
    +	DynamicData
    +
    +	CurrentSnapshot  *ManagedObjectReference      `xml:"currentSnapshot,omitempty"`
    +	RootSnapshotList []VirtualMachineSnapshotTree `xml:"rootSnapshotList"`
    +}
    +
    +func init() {
    +	t["VirtualMachineSnapshotInfo"] = reflect.TypeOf((*VirtualMachineSnapshotInfo)(nil)).Elem()
    +}
    +
    +type VirtualMachineSnapshotTree struct {
    +	DynamicData
    +
    +	Snapshot          ManagedObjectReference       `xml:"snapshot"`
    +	Vm                ManagedObjectReference       `xml:"vm"`
    +	Name              string                       `xml:"name"`
    +	Description       string                       `xml:"description"`
    +	Id                int32                        `xml:"id,omitempty"`
    +	CreateTime        time.Time                    `xml:"createTime"`
    +	State             VirtualMachinePowerState     `xml:"state"`
    +	Quiesced          bool                         `xml:"quiesced"`
    +	BackupManifest    string                       `xml:"backupManifest,omitempty"`
    +	ChildSnapshotList []VirtualMachineSnapshotTree `xml:"childSnapshotList,omitempty"`
    +	ReplaySupported   *bool                        `xml:"replaySupported"`
    +}
    +
    +func init() {
    +	t["VirtualMachineSnapshotTree"] = reflect.TypeOf((*VirtualMachineSnapshotTree)(nil)).Elem()
    +}
    +
    +type VirtualMachineSoundInfo struct {
    +	VirtualMachineTargetInfo
    +}
    +
    +func init() {
    +	t["VirtualMachineSoundInfo"] = reflect.TypeOf((*VirtualMachineSoundInfo)(nil)).Elem()
    +}
    +
    +type VirtualMachineSriovDevicePoolInfo struct {
    +	DynamicData
    +
    +	Key string `xml:"key"`
    +}
    +
    +func init() {
    +	t["VirtualMachineSriovDevicePoolInfo"] = reflect.TypeOf((*VirtualMachineSriovDevicePoolInfo)(nil)).Elem()
    +}
    +
    +type VirtualMachineSriovInfo struct {
    +	VirtualMachinePciPassthroughInfo
    +
    +	VirtualFunction bool                                  `xml:"virtualFunction"`
    +	Pnic            string                                `xml:"pnic,omitempty"`
    +	DevicePool      BaseVirtualMachineSriovDevicePoolInfo `xml:"devicePool,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["VirtualMachineSriovInfo"] = reflect.TypeOf((*VirtualMachineSriovInfo)(nil)).Elem()
    +}
    +
    +type VirtualMachineSriovNetworkDevicePoolInfo struct {
    +	VirtualMachineSriovDevicePoolInfo
    +
    +	SwitchKey  string `xml:"switchKey,omitempty"`
    +	SwitchUuid string `xml:"switchUuid,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachineSriovNetworkDevicePoolInfo"] = reflect.TypeOf((*VirtualMachineSriovNetworkDevicePoolInfo)(nil)).Elem()
    +}
    +
    +type VirtualMachineStorageInfo struct {
    +	DynamicData
    +
    +	PerDatastoreUsage []VirtualMachineUsageOnDatastore `xml:"perDatastoreUsage,omitempty"`
    +	Timestamp         time.Time                        `xml:"timestamp"`
    +}
    +
    +func init() {
    +	t["VirtualMachineStorageInfo"] = reflect.TypeOf((*VirtualMachineStorageInfo)(nil)).Elem()
    +}
    +
    +type VirtualMachineStorageSummary struct {
    +	DynamicData
    +
    +	Committed   int64     `xml:"committed"`
    +	Uncommitted int64     `xml:"uncommitted"`
    +	Unshared    int64     `xml:"unshared"`
    +	Timestamp   time.Time `xml:"timestamp"`
    +}
    +
    +func init() {
    +	t["VirtualMachineStorageSummary"] = reflect.TypeOf((*VirtualMachineStorageSummary)(nil)).Elem()
    +}
    +
    +type VirtualMachineSummary struct {
    +	DynamicData
    +
    +	Vm            *ManagedObjectReference       `xml:"vm,omitempty"`
    +	Runtime       VirtualMachineRuntimeInfo     `xml:"runtime"`
    +	Guest         *VirtualMachineGuestSummary   `xml:"guest,omitempty"`
    +	Config        VirtualMachineConfigSummary   `xml:"config"`
    +	Storage       *VirtualMachineStorageSummary `xml:"storage,omitempty"`
    +	QuickStats    VirtualMachineQuickStats      `xml:"quickStats"`
    +	OverallStatus ManagedEntityStatus           `xml:"overallStatus"`
    +	CustomValue   []BaseCustomFieldValue        `xml:"customValue,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["VirtualMachineSummary"] = reflect.TypeOf((*VirtualMachineSummary)(nil)).Elem()
    +}
    +
    +type VirtualMachineTargetInfo struct {
    +	DynamicData
    +
    +	Name             string   `xml:"name"`
    +	ConfigurationTag []string `xml:"configurationTag,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachineTargetInfo"] = reflect.TypeOf((*VirtualMachineTargetInfo)(nil)).Elem()
    +}
    +
    +type VirtualMachineTicket struct {
    +	DynamicData
    +
    +	Ticket        string `xml:"ticket"`
    +	CfgFile       string `xml:"cfgFile"`
    +	Host          string `xml:"host,omitempty"`
    +	Port          int32  `xml:"port,omitempty"`
    +	SslThumbprint string `xml:"sslThumbprint,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachineTicket"] = reflect.TypeOf((*VirtualMachineTicket)(nil)).Elem()
    +}
    +
    +type VirtualMachineUsageOnDatastore struct {
    +	DynamicData
    +
    +	Datastore   ManagedObjectReference `xml:"datastore"`
    +	Committed   int64                  `xml:"committed"`
    +	Uncommitted int64                  `xml:"uncommitted"`
    +	Unshared    int64                  `xml:"unshared"`
    +}
    +
    +func init() {
    +	t["VirtualMachineUsageOnDatastore"] = reflect.TypeOf((*VirtualMachineUsageOnDatastore)(nil)).Elem()
    +}
    +
    +type VirtualMachineUsbInfo struct {
    +	VirtualMachineTargetInfo
    +
    +	Description  string                 `xml:"description"`
    +	Vendor       int32                  `xml:"vendor"`
    +	Product      int32                  `xml:"product"`
    +	PhysicalPath string                 `xml:"physicalPath"`
    +	Family       []string               `xml:"family,omitempty"`
    +	Speed        []string               `xml:"speed,omitempty"`
    +	Summary      *VirtualMachineSummary `xml:"summary,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachineUsbInfo"] = reflect.TypeOf((*VirtualMachineUsbInfo)(nil)).Elem()
    +}
    +
    +type VirtualMachineVFlashModuleInfo struct {
    +	VirtualMachineTargetInfo
    +
    +	VFlashModule HostVFlashManagerVFlashCacheConfigInfoVFlashModuleConfigOption `xml:"vFlashModule"`
    +}
    +
    +func init() {
    +	t["VirtualMachineVFlashModuleInfo"] = reflect.TypeOf((*VirtualMachineVFlashModuleInfo)(nil)).Elem()
    +}
    +
    +type VirtualMachineVMCIDevice struct {
    +	VirtualDevice
    +
    +	Id                             int64                               `xml:"id,omitempty"`
    +	AllowUnrestrictedCommunication *bool                               `xml:"allowUnrestrictedCommunication"`
    +	FilterEnable                   *bool                               `xml:"filterEnable"`
    +	FilterInfo                     *VirtualMachineVMCIDeviceFilterInfo `xml:"filterInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachineVMCIDevice"] = reflect.TypeOf((*VirtualMachineVMCIDevice)(nil)).Elem()
    +}
    +
    +type VirtualMachineVMCIDeviceFilterInfo struct {
    +	DynamicData
    +
    +	Filters []VirtualMachineVMCIDeviceFilterSpec `xml:"filters,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachineVMCIDeviceFilterInfo"] = reflect.TypeOf((*VirtualMachineVMCIDeviceFilterInfo)(nil)).Elem()
    +}
    +
    +type VirtualMachineVMCIDeviceFilterSpec struct {
    +	DynamicData
    +
    +	Rank                 int64  `xml:"rank"`
    +	Action               string `xml:"action"`
    +	Protocol             string `xml:"protocol"`
    +	Direction            string `xml:"direction"`
    +	LowerDstPortBoundary int64  `xml:"lowerDstPortBoundary,omitempty"`
    +	UpperDstPortBoundary int64  `xml:"upperDstPortBoundary,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachineVMCIDeviceFilterSpec"] = reflect.TypeOf((*VirtualMachineVMCIDeviceFilterSpec)(nil)).Elem()
    +}
    +
    +type VirtualMachineVMCIDeviceOption struct {
    +	VirtualDeviceOption
    +
    +	AllowUnrestrictedCommunication BoolOption                                      `xml:"allowUnrestrictedCommunication"`
    +	FilterSpecOption               *VirtualMachineVMCIDeviceOptionFilterSpecOption `xml:"filterSpecOption,omitempty"`
    +	FilterSupported                *BoolOption                                     `xml:"filterSupported,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachineVMCIDeviceOption"] = reflect.TypeOf((*VirtualMachineVMCIDeviceOption)(nil)).Elem()
    +}
    +
    +type VirtualMachineVMCIDeviceOptionFilterSpecOption struct {
    +	DynamicData
    +
    +	Action               ChoiceOption `xml:"action"`
    +	Protocol             ChoiceOption `xml:"protocol"`
    +	Direction            ChoiceOption `xml:"direction"`
    +	LowerDstPortBoundary LongOption   `xml:"lowerDstPortBoundary"`
    +	UpperDstPortBoundary LongOption   `xml:"upperDstPortBoundary"`
    +}
    +
    +func init() {
    +	t["VirtualMachineVMCIDeviceOptionFilterSpecOption"] = reflect.TypeOf((*VirtualMachineVMCIDeviceOptionFilterSpecOption)(nil)).Elem()
    +}
    +
    +type VirtualMachineVMIROM struct {
    +	VirtualDevice
    +}
    +
    +func init() {
    +	t["VirtualMachineVMIROM"] = reflect.TypeOf((*VirtualMachineVMIROM)(nil)).Elem()
    +}
    +
    +type VirtualMachineVideoCard struct {
    +	VirtualDevice
    +
    +	VideoRamSizeInKB       int64  `xml:"videoRamSizeInKB,omitempty"`
    +	NumDisplays            int32  `xml:"numDisplays,omitempty"`
    +	UseAutoDetect          *bool  `xml:"useAutoDetect"`
    +	Enable3DSupport        *bool  `xml:"enable3DSupport"`
    +	Use3dRenderer          string `xml:"use3dRenderer,omitempty"`
    +	GraphicsMemorySizeInKB int64  `xml:"graphicsMemorySizeInKB,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachineVideoCard"] = reflect.TypeOf((*VirtualMachineVideoCard)(nil)).Elem()
    +}
    +
    +type VirtualMachineWindowsQuiesceSpec struct {
    +	VirtualMachineGuestQuiesceSpec
    +
    +	VssBackupType          int32  `xml:"vssBackupType,omitempty"`
    +	VssBootableSystemState *bool  `xml:"vssBootableSystemState"`
    +	VssPartialFileSupport  *bool  `xml:"vssPartialFileSupport"`
    +	VssBackupContext       string `xml:"vssBackupContext,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualMachineWindowsQuiesceSpec"] = reflect.TypeOf((*VirtualMachineWindowsQuiesceSpec)(nil)).Elem()
    +}
    +
    +type VirtualMachineWipeResult struct {
    +	DynamicData
    +
    +	DiskId              int32 `xml:"diskId"`
    +	ShrinkableDiskSpace int64 `xml:"shrinkableDiskSpace"`
    +}
    +
    +func init() {
    +	t["VirtualMachineWipeResult"] = reflect.TypeOf((*VirtualMachineWipeResult)(nil)).Elem()
    +}
    +
    +type VirtualNVDIMM struct {
    +	VirtualDevice
    +
    +	CapacityInMB int64 `xml:"capacityInMB"`
    +}
    +
    +func init() {
    +	t["VirtualNVDIMM"] = reflect.TypeOf((*VirtualNVDIMM)(nil)).Elem()
    +}
    +
    +type VirtualNVDIMMBackingInfo struct {
    +	VirtualDeviceFileBackingInfo
    +
    +	Parent   *VirtualNVDIMMBackingInfo `xml:"parent,omitempty"`
    +	ChangeId string                    `xml:"changeId,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualNVDIMMBackingInfo"] = reflect.TypeOf((*VirtualNVDIMMBackingInfo)(nil)).Elem()
    +}
    +
    +type VirtualNVDIMMController struct {
    +	VirtualController
    +}
    +
    +func init() {
    +	t["VirtualNVDIMMController"] = reflect.TypeOf((*VirtualNVDIMMController)(nil)).Elem()
    +}
    +
    +type VirtualNVDIMMControllerOption struct {
    +	VirtualControllerOption
    +
    +	NumNVDIMMControllers IntOption `xml:"numNVDIMMControllers"`
    +}
    +
    +func init() {
    +	t["VirtualNVDIMMControllerOption"] = reflect.TypeOf((*VirtualNVDIMMControllerOption)(nil)).Elem()
    +}
    +
    +type VirtualNVDIMMOption struct {
    +	VirtualDeviceOption
    +
    +	CapacityInMB    LongOption `xml:"capacityInMB"`
    +	Growable        bool       `xml:"growable"`
    +	HotGrowable     bool       `xml:"hotGrowable"`
    +	GranularityInMB int64      `xml:"granularityInMB"`
    +}
    +
    +func init() {
    +	t["VirtualNVDIMMOption"] = reflect.TypeOf((*VirtualNVDIMMOption)(nil)).Elem()
    +}
    +
    +type VirtualNVMEController struct {
    +	VirtualController
    +}
    +
    +func init() {
    +	t["VirtualNVMEController"] = reflect.TypeOf((*VirtualNVMEController)(nil)).Elem()
    +}
    +
    +type VirtualNVMEControllerOption struct {
    +	VirtualControllerOption
    +
    +	NumNVMEDisks IntOption `xml:"numNVMEDisks"`
    +}
    +
    +func init() {
    +	t["VirtualNVMEControllerOption"] = reflect.TypeOf((*VirtualNVMEControllerOption)(nil)).Elem()
    +}
    +
    +type VirtualNicManagerNetConfig struct {
    +	DynamicData
    +
    +	NicType            string           `xml:"nicType"`
    +	MultiSelectAllowed bool             `xml:"multiSelectAllowed"`
    +	CandidateVnic      []HostVirtualNic `xml:"candidateVnic,omitempty"`
    +	SelectedVnic       []string         `xml:"selectedVnic,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualNicManagerNetConfig"] = reflect.TypeOf((*VirtualNicManagerNetConfig)(nil)).Elem()
    +}
    +
    +type VirtualPCIController struct {
    +	VirtualController
    +}
    +
    +func init() {
    +	t["VirtualPCIController"] = reflect.TypeOf((*VirtualPCIController)(nil)).Elem()
    +}
    +
    +type VirtualPCIControllerOption struct {
    +	VirtualControllerOption
    +
    +	NumSCSIControllers            IntOption  `xml:"numSCSIControllers"`
    +	NumEthernetCards              IntOption  `xml:"numEthernetCards"`
    +	NumVideoCards                 IntOption  `xml:"numVideoCards"`
    +	NumSoundCards                 IntOption  `xml:"numSoundCards"`
    +	NumVmiRoms                    IntOption  `xml:"numVmiRoms"`
    +	NumVmciDevices                *IntOption `xml:"numVmciDevices,omitempty"`
    +	NumPCIPassthroughDevices      *IntOption `xml:"numPCIPassthroughDevices,omitempty"`
    +	NumSasSCSIControllers         *IntOption `xml:"numSasSCSIControllers,omitempty"`
    +	NumVmxnet3EthernetCards       *IntOption `xml:"numVmxnet3EthernetCards,omitempty"`
    +	NumParaVirtualSCSIControllers *IntOption `xml:"numParaVirtualSCSIControllers,omitempty"`
    +	NumSATAControllers            *IntOption `xml:"numSATAControllers,omitempty"`
    +	NumNVMEControllers            *IntOption `xml:"numNVMEControllers,omitempty"`
    +	NumVmxnet3VrdmaEthernetCards  *IntOption `xml:"numVmxnet3VrdmaEthernetCards,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualPCIControllerOption"] = reflect.TypeOf((*VirtualPCIControllerOption)(nil)).Elem()
    +}
    +
    +type VirtualPCIPassthrough struct {
    +	VirtualDevice
    +}
    +
    +func init() {
    +	t["VirtualPCIPassthrough"] = reflect.TypeOf((*VirtualPCIPassthrough)(nil)).Elem()
    +}
    +
    +type VirtualPCIPassthroughDeviceBackingInfo struct {
    +	VirtualDeviceDeviceBackingInfo
    +
    +	Id       string `xml:"id"`
    +	DeviceId string `xml:"deviceId"`
    +	SystemId string `xml:"systemId"`
    +	VendorId int16  `xml:"vendorId"`
    +}
    +
    +func init() {
    +	t["VirtualPCIPassthroughDeviceBackingInfo"] = reflect.TypeOf((*VirtualPCIPassthroughDeviceBackingInfo)(nil)).Elem()
    +}
    +
    +type VirtualPCIPassthroughDeviceBackingOption struct {
    +	VirtualDeviceDeviceBackingOption
    +}
    +
    +func init() {
    +	t["VirtualPCIPassthroughDeviceBackingOption"] = reflect.TypeOf((*VirtualPCIPassthroughDeviceBackingOption)(nil)).Elem()
    +}
    +
    +type VirtualPCIPassthroughOption struct {
    +	VirtualDeviceOption
    +}
    +
    +func init() {
    +	t["VirtualPCIPassthroughOption"] = reflect.TypeOf((*VirtualPCIPassthroughOption)(nil)).Elem()
    +}
    +
    +type VirtualPCIPassthroughPluginBackingInfo struct {
    +	VirtualDeviceBackingInfo
    +}
    +
    +func init() {
    +	t["VirtualPCIPassthroughPluginBackingInfo"] = reflect.TypeOf((*VirtualPCIPassthroughPluginBackingInfo)(nil)).Elem()
    +}
    +
    +type VirtualPCIPassthroughPluginBackingOption struct {
    +	VirtualDeviceBackingOption
    +}
    +
    +func init() {
    +	t["VirtualPCIPassthroughPluginBackingOption"] = reflect.TypeOf((*VirtualPCIPassthroughPluginBackingOption)(nil)).Elem()
    +}
    +
    +type VirtualPCIPassthroughVmiopBackingInfo struct {
    +	VirtualPCIPassthroughPluginBackingInfo
    +
    +	Vgpu string `xml:"vgpu,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualPCIPassthroughVmiopBackingInfo"] = reflect.TypeOf((*VirtualPCIPassthroughVmiopBackingInfo)(nil)).Elem()
    +}
    +
    +type VirtualPCIPassthroughVmiopBackingOption struct {
    +	VirtualPCIPassthroughPluginBackingOption
    +
    +	Vgpu         StringOption `xml:"vgpu"`
    +	MaxInstances int32        `xml:"maxInstances"`
    +}
    +
    +func init() {
    +	t["VirtualPCIPassthroughVmiopBackingOption"] = reflect.TypeOf((*VirtualPCIPassthroughVmiopBackingOption)(nil)).Elem()
    +}
    +
    +type VirtualPCNet32 struct {
    +	VirtualEthernetCard
    +}
    +
    +func init() {
    +	t["VirtualPCNet32"] = reflect.TypeOf((*VirtualPCNet32)(nil)).Elem()
    +}
    +
    +type VirtualPCNet32Option struct {
    +	VirtualEthernetCardOption
    +
    +	SupportsMorphing bool `xml:"supportsMorphing"`
    +}
    +
    +func init() {
    +	t["VirtualPCNet32Option"] = reflect.TypeOf((*VirtualPCNet32Option)(nil)).Elem()
    +}
    +
    +type VirtualPS2Controller struct {
    +	VirtualController
    +}
    +
    +func init() {
    +	t["VirtualPS2Controller"] = reflect.TypeOf((*VirtualPS2Controller)(nil)).Elem()
    +}
    +
    +type VirtualPS2ControllerOption struct {
    +	VirtualControllerOption
    +
    +	NumKeyboards       IntOption `xml:"numKeyboards"`
    +	NumPointingDevices IntOption `xml:"numPointingDevices"`
    +}
    +
    +func init() {
    +	t["VirtualPS2ControllerOption"] = reflect.TypeOf((*VirtualPS2ControllerOption)(nil)).Elem()
    +}
    +
    +type VirtualParallelPort struct {
    +	VirtualDevice
    +}
    +
    +func init() {
    +	t["VirtualParallelPort"] = reflect.TypeOf((*VirtualParallelPort)(nil)).Elem()
    +}
    +
    +type VirtualParallelPortDeviceBackingInfo struct {
    +	VirtualDeviceDeviceBackingInfo
    +}
    +
    +func init() {
    +	t["VirtualParallelPortDeviceBackingInfo"] = reflect.TypeOf((*VirtualParallelPortDeviceBackingInfo)(nil)).Elem()
    +}
    +
    +type VirtualParallelPortDeviceBackingOption struct {
    +	VirtualDeviceDeviceBackingOption
    +}
    +
    +func init() {
    +	t["VirtualParallelPortDeviceBackingOption"] = reflect.TypeOf((*VirtualParallelPortDeviceBackingOption)(nil)).Elem()
    +}
    +
    +type VirtualParallelPortFileBackingInfo struct {
    +	VirtualDeviceFileBackingInfo
    +}
    +
    +func init() {
    +	t["VirtualParallelPortFileBackingInfo"] = reflect.TypeOf((*VirtualParallelPortFileBackingInfo)(nil)).Elem()
    +}
    +
    +type VirtualParallelPortFileBackingOption struct {
    +	VirtualDeviceFileBackingOption
    +}
    +
    +func init() {
    +	t["VirtualParallelPortFileBackingOption"] = reflect.TypeOf((*VirtualParallelPortFileBackingOption)(nil)).Elem()
    +}
    +
    +type VirtualParallelPortOption struct {
    +	VirtualDeviceOption
    +}
    +
    +func init() {
    +	t["VirtualParallelPortOption"] = reflect.TypeOf((*VirtualParallelPortOption)(nil)).Elem()
    +}
    +
    +type VirtualPointingDevice struct {
    +	VirtualDevice
    +}
    +
    +func init() {
    +	t["VirtualPointingDevice"] = reflect.TypeOf((*VirtualPointingDevice)(nil)).Elem()
    +}
    +
    +type VirtualPointingDeviceBackingOption struct {
    +	VirtualDeviceDeviceBackingOption
    +
    +	HostPointingDevice ChoiceOption `xml:"hostPointingDevice"`
    +}
    +
    +func init() {
    +	t["VirtualPointingDeviceBackingOption"] = reflect.TypeOf((*VirtualPointingDeviceBackingOption)(nil)).Elem()
    +}
    +
    +type VirtualPointingDeviceDeviceBackingInfo struct {
    +	VirtualDeviceDeviceBackingInfo
    +
    +	HostPointingDevice string `xml:"hostPointingDevice"`
    +}
    +
    +func init() {
    +	t["VirtualPointingDeviceDeviceBackingInfo"] = reflect.TypeOf((*VirtualPointingDeviceDeviceBackingInfo)(nil)).Elem()
    +}
    +
    +type VirtualPointingDeviceOption struct {
    +	VirtualDeviceOption
    +}
    +
    +func init() {
    +	t["VirtualPointingDeviceOption"] = reflect.TypeOf((*VirtualPointingDeviceOption)(nil)).Elem()
    +}
    +
    +type VirtualSATAController struct {
    +	VirtualController
    +}
    +
    +func init() {
    +	t["VirtualSATAController"] = reflect.TypeOf((*VirtualSATAController)(nil)).Elem()
    +}
    +
    +type VirtualSATAControllerOption struct {
    +	VirtualControllerOption
    +
    +	NumSATADisks  IntOption `xml:"numSATADisks"`
    +	NumSATACdroms IntOption `xml:"numSATACdroms"`
    +}
    +
    +func init() {
    +	t["VirtualSATAControllerOption"] = reflect.TypeOf((*VirtualSATAControllerOption)(nil)).Elem()
    +}
    +
    +type VirtualSCSIController struct {
    +	VirtualController
    +
    +	HotAddRemove       *bool              `xml:"hotAddRemove"`
    +	SharedBus          VirtualSCSISharing `xml:"sharedBus"`
    +	ScsiCtlrUnitNumber int32              `xml:"scsiCtlrUnitNumber,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualSCSIController"] = reflect.TypeOf((*VirtualSCSIController)(nil)).Elem()
    +}
    +
    +type VirtualSCSIControllerOption struct {
    +	VirtualControllerOption
    +
    +	NumSCSIDisks       IntOption            `xml:"numSCSIDisks"`
    +	NumSCSICdroms      IntOption            `xml:"numSCSICdroms"`
    +	NumSCSIPassthrough IntOption            `xml:"numSCSIPassthrough"`
    +	Sharing            []VirtualSCSISharing `xml:"sharing"`
    +	DefaultSharedIndex int32                `xml:"defaultSharedIndex"`
    +	HotAddRemove       BoolOption           `xml:"hotAddRemove"`
    +	ScsiCtlrUnitNumber int32                `xml:"scsiCtlrUnitNumber"`
    +}
    +
    +func init() {
    +	t["VirtualSCSIControllerOption"] = reflect.TypeOf((*VirtualSCSIControllerOption)(nil)).Elem()
    +}
    +
    +type VirtualSCSIPassthrough struct {
    +	VirtualDevice
    +}
    +
    +func init() {
    +	t["VirtualSCSIPassthrough"] = reflect.TypeOf((*VirtualSCSIPassthrough)(nil)).Elem()
    +}
    +
    +type VirtualSCSIPassthroughDeviceBackingInfo struct {
    +	VirtualDeviceDeviceBackingInfo
    +}
    +
    +func init() {
    +	t["VirtualSCSIPassthroughDeviceBackingInfo"] = reflect.TypeOf((*VirtualSCSIPassthroughDeviceBackingInfo)(nil)).Elem()
    +}
    +
    +type VirtualSCSIPassthroughDeviceBackingOption struct {
    +	VirtualDeviceDeviceBackingOption
    +}
    +
    +func init() {
    +	t["VirtualSCSIPassthroughDeviceBackingOption"] = reflect.TypeOf((*VirtualSCSIPassthroughDeviceBackingOption)(nil)).Elem()
    +}
    +
    +type VirtualSCSIPassthroughOption struct {
    +	VirtualDeviceOption
    +}
    +
    +func init() {
    +	t["VirtualSCSIPassthroughOption"] = reflect.TypeOf((*VirtualSCSIPassthroughOption)(nil)).Elem()
    +}
    +
    +type VirtualSIOController struct {
    +	VirtualController
    +}
    +
    +func init() {
    +	t["VirtualSIOController"] = reflect.TypeOf((*VirtualSIOController)(nil)).Elem()
    +}
    +
    +type VirtualSIOControllerOption struct {
    +	VirtualControllerOption
    +
    +	NumFloppyDrives  IntOption `xml:"numFloppyDrives"`
    +	NumSerialPorts   IntOption `xml:"numSerialPorts"`
    +	NumParallelPorts IntOption `xml:"numParallelPorts"`
    +}
    +
    +func init() {
    +	t["VirtualSIOControllerOption"] = reflect.TypeOf((*VirtualSIOControllerOption)(nil)).Elem()
    +}
    +
    +type VirtualSerialPort struct {
    +	VirtualDevice
    +
    +	YieldOnPoll bool `xml:"yieldOnPoll"`
    +}
    +
    +func init() {
    +	t["VirtualSerialPort"] = reflect.TypeOf((*VirtualSerialPort)(nil)).Elem()
    +}
    +
    +type VirtualSerialPortDeviceBackingInfo struct {
    +	VirtualDeviceDeviceBackingInfo
    +}
    +
    +func init() {
    +	t["VirtualSerialPortDeviceBackingInfo"] = reflect.TypeOf((*VirtualSerialPortDeviceBackingInfo)(nil)).Elem()
    +}
    +
    +type VirtualSerialPortDeviceBackingOption struct {
    +	VirtualDeviceDeviceBackingOption
    +}
    +
    +func init() {
    +	t["VirtualSerialPortDeviceBackingOption"] = reflect.TypeOf((*VirtualSerialPortDeviceBackingOption)(nil)).Elem()
    +}
    +
    +type VirtualSerialPortFileBackingInfo struct {
    +	VirtualDeviceFileBackingInfo
    +}
    +
    +func init() {
    +	t["VirtualSerialPortFileBackingInfo"] = reflect.TypeOf((*VirtualSerialPortFileBackingInfo)(nil)).Elem()
    +}
    +
    +type VirtualSerialPortFileBackingOption struct {
    +	VirtualDeviceFileBackingOption
    +}
    +
    +func init() {
    +	t["VirtualSerialPortFileBackingOption"] = reflect.TypeOf((*VirtualSerialPortFileBackingOption)(nil)).Elem()
    +}
    +
    +type VirtualSerialPortOption struct {
    +	VirtualDeviceOption
    +
    +	YieldOnPoll BoolOption `xml:"yieldOnPoll"`
    +}
    +
    +func init() {
    +	t["VirtualSerialPortOption"] = reflect.TypeOf((*VirtualSerialPortOption)(nil)).Elem()
    +}
    +
    +type VirtualSerialPortPipeBackingInfo struct {
    +	VirtualDevicePipeBackingInfo
    +
    +	Endpoint string `xml:"endpoint"`
    +	NoRxLoss *bool  `xml:"noRxLoss"`
    +}
    +
    +func init() {
    +	t["VirtualSerialPortPipeBackingInfo"] = reflect.TypeOf((*VirtualSerialPortPipeBackingInfo)(nil)).Elem()
    +}
    +
    +type VirtualSerialPortPipeBackingOption struct {
    +	VirtualDevicePipeBackingOption
    +
    +	Endpoint ChoiceOption `xml:"endpoint"`
    +	NoRxLoss BoolOption   `xml:"noRxLoss"`
    +}
    +
    +func init() {
    +	t["VirtualSerialPortPipeBackingOption"] = reflect.TypeOf((*VirtualSerialPortPipeBackingOption)(nil)).Elem()
    +}
    +
    +type VirtualSerialPortThinPrintBackingInfo struct {
    +	VirtualDeviceBackingInfo
    +}
    +
    +func init() {
    +	t["VirtualSerialPortThinPrintBackingInfo"] = reflect.TypeOf((*VirtualSerialPortThinPrintBackingInfo)(nil)).Elem()
    +}
    +
    +type VirtualSerialPortThinPrintBackingOption struct {
    +	VirtualDeviceBackingOption
    +}
    +
    +func init() {
    +	t["VirtualSerialPortThinPrintBackingOption"] = reflect.TypeOf((*VirtualSerialPortThinPrintBackingOption)(nil)).Elem()
    +}
    +
    +type VirtualSerialPortURIBackingInfo struct {
    +	VirtualDeviceURIBackingInfo
    +}
    +
    +func init() {
    +	t["VirtualSerialPortURIBackingInfo"] = reflect.TypeOf((*VirtualSerialPortURIBackingInfo)(nil)).Elem()
    +}
    +
    +type VirtualSerialPortURIBackingOption struct {
    +	VirtualDeviceURIBackingOption
    +}
    +
    +func init() {
    +	t["VirtualSerialPortURIBackingOption"] = reflect.TypeOf((*VirtualSerialPortURIBackingOption)(nil)).Elem()
    +}
    +
    +type VirtualSoundBlaster16 struct {
    +	VirtualSoundCard
    +}
    +
    +func init() {
    +	t["VirtualSoundBlaster16"] = reflect.TypeOf((*VirtualSoundBlaster16)(nil)).Elem()
    +}
    +
    +type VirtualSoundBlaster16Option struct {
    +	VirtualSoundCardOption
    +}
    +
    +func init() {
    +	t["VirtualSoundBlaster16Option"] = reflect.TypeOf((*VirtualSoundBlaster16Option)(nil)).Elem()
    +}
    +
    +type VirtualSoundCard struct {
    +	VirtualDevice
    +}
    +
    +func init() {
    +	t["VirtualSoundCard"] = reflect.TypeOf((*VirtualSoundCard)(nil)).Elem()
    +}
    +
    +type VirtualSoundCardDeviceBackingInfo struct {
    +	VirtualDeviceDeviceBackingInfo
    +}
    +
    +func init() {
    +	t["VirtualSoundCardDeviceBackingInfo"] = reflect.TypeOf((*VirtualSoundCardDeviceBackingInfo)(nil)).Elem()
    +}
    +
    +type VirtualSoundCardDeviceBackingOption struct {
    +	VirtualDeviceDeviceBackingOption
    +}
    +
    +func init() {
    +	t["VirtualSoundCardDeviceBackingOption"] = reflect.TypeOf((*VirtualSoundCardDeviceBackingOption)(nil)).Elem()
    +}
    +
    +type VirtualSoundCardOption struct {
    +	VirtualDeviceOption
    +}
    +
    +func init() {
    +	t["VirtualSoundCardOption"] = reflect.TypeOf((*VirtualSoundCardOption)(nil)).Elem()
    +}
    +
    +type VirtualSriovEthernetCard struct {
    +	VirtualEthernetCard
    +
    +	AllowGuestOSMtuChange *bool                                     `xml:"allowGuestOSMtuChange"`
    +	SriovBacking          *VirtualSriovEthernetCardSriovBackingInfo `xml:"sriovBacking,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualSriovEthernetCard"] = reflect.TypeOf((*VirtualSriovEthernetCard)(nil)).Elem()
    +}
    +
    +type VirtualSriovEthernetCardOption struct {
    +	VirtualEthernetCardOption
    +}
    +
    +func init() {
    +	t["VirtualSriovEthernetCardOption"] = reflect.TypeOf((*VirtualSriovEthernetCardOption)(nil)).Elem()
    +}
    +
    +type VirtualSriovEthernetCardSriovBackingInfo struct {
    +	VirtualDeviceBackingInfo
    +
    +	PhysicalFunctionBacking *VirtualPCIPassthroughDeviceBackingInfo `xml:"physicalFunctionBacking,omitempty"`
    +	VirtualFunctionBacking  *VirtualPCIPassthroughDeviceBackingInfo `xml:"virtualFunctionBacking,omitempty"`
    +	VirtualFunctionIndex    int32                                   `xml:"virtualFunctionIndex,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualSriovEthernetCardSriovBackingInfo"] = reflect.TypeOf((*VirtualSriovEthernetCardSriovBackingInfo)(nil)).Elem()
    +}
    +
    +type VirtualSriovEthernetCardSriovBackingOption struct {
    +	VirtualDeviceBackingOption
    +}
    +
    +func init() {
    +	t["VirtualSriovEthernetCardSriovBackingOption"] = reflect.TypeOf((*VirtualSriovEthernetCardSriovBackingOption)(nil)).Elem()
    +}
    +
    +type VirtualSwitchProfile struct {
    +	ApplyProfile
    +
    +	Key           string               `xml:"key"`
    +	Name          string               `xml:"name"`
    +	Link          LinkProfile          `xml:"link"`
    +	NumPorts      NumPortsProfile      `xml:"numPorts"`
    +	NetworkPolicy NetworkPolicyProfile `xml:"networkPolicy"`
    +}
    +
    +func init() {
    +	t["VirtualSwitchProfile"] = reflect.TypeOf((*VirtualSwitchProfile)(nil)).Elem()
    +}
    +
    +type VirtualSwitchSelectionProfile struct {
    +	ApplyProfile
    +}
    +
    +func init() {
    +	t["VirtualSwitchSelectionProfile"] = reflect.TypeOf((*VirtualSwitchSelectionProfile)(nil)).Elem()
    +}
    +
    +type VirtualTPM struct {
    +	VirtualDevice
    +
    +	EndorsementKeyCertificateSigningRequest [][]byte `xml:"endorsementKeyCertificateSigningRequest,omitempty"`
    +	EndorsementKeyCertificate               [][]byte `xml:"endorsementKeyCertificate,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualTPM"] = reflect.TypeOf((*VirtualTPM)(nil)).Elem()
    +}
    +
    +type VirtualTPMOption struct {
    +	VirtualDeviceOption
    +
    +	SupportedFirmware []string `xml:"supportedFirmware,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualTPMOption"] = reflect.TypeOf((*VirtualTPMOption)(nil)).Elem()
    +}
    +
    +type VirtualUSB struct {
    +	VirtualDevice
    +
    +	Connected bool     `xml:"connected"`
    +	Vendor    int32    `xml:"vendor,omitempty"`
    +	Product   int32    `xml:"product,omitempty"`
    +	Family    []string `xml:"family,omitempty"`
    +	Speed     []string `xml:"speed,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualUSB"] = reflect.TypeOf((*VirtualUSB)(nil)).Elem()
    +}
    +
    +type VirtualUSBController struct {
    +	VirtualController
    +
    +	AutoConnectDevices *bool `xml:"autoConnectDevices"`
    +	EhciEnabled        *bool `xml:"ehciEnabled"`
    +}
    +
    +func init() {
    +	t["VirtualUSBController"] = reflect.TypeOf((*VirtualUSBController)(nil)).Elem()
    +}
    +
    +type VirtualUSBControllerOption struct {
    +	VirtualControllerOption
    +
    +	AutoConnectDevices BoolOption `xml:"autoConnectDevices"`
    +	EhciSupported      BoolOption `xml:"ehciSupported"`
    +	SupportedSpeeds    []string   `xml:"supportedSpeeds,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualUSBControllerOption"] = reflect.TypeOf((*VirtualUSBControllerOption)(nil)).Elem()
    +}
    +
    +type VirtualUSBControllerPciBusSlotInfo struct {
    +	VirtualDevicePciBusSlotInfo
    +
    +	EhciPciSlotNumber int32 `xml:"ehciPciSlotNumber,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualUSBControllerPciBusSlotInfo"] = reflect.TypeOf((*VirtualUSBControllerPciBusSlotInfo)(nil)).Elem()
    +}
    +
    +type VirtualUSBOption struct {
    +	VirtualDeviceOption
    +}
    +
    +func init() {
    +	t["VirtualUSBOption"] = reflect.TypeOf((*VirtualUSBOption)(nil)).Elem()
    +}
    +
    +type VirtualUSBRemoteClientBackingInfo struct {
    +	VirtualDeviceRemoteDeviceBackingInfo
    +
    +	Hostname string `xml:"hostname"`
    +}
    +
    +func init() {
    +	t["VirtualUSBRemoteClientBackingInfo"] = reflect.TypeOf((*VirtualUSBRemoteClientBackingInfo)(nil)).Elem()
    +}
    +
    +type VirtualUSBRemoteClientBackingOption struct {
    +	VirtualDeviceRemoteDeviceBackingOption
    +}
    +
    +func init() {
    +	t["VirtualUSBRemoteClientBackingOption"] = reflect.TypeOf((*VirtualUSBRemoteClientBackingOption)(nil)).Elem()
    +}
    +
    +type VirtualUSBRemoteHostBackingInfo struct {
    +	VirtualDeviceDeviceBackingInfo
    +
    +	Hostname string `xml:"hostname"`
    +}
    +
    +func init() {
    +	t["VirtualUSBRemoteHostBackingInfo"] = reflect.TypeOf((*VirtualUSBRemoteHostBackingInfo)(nil)).Elem()
    +}
    +
    +type VirtualUSBRemoteHostBackingOption struct {
    +	VirtualDeviceDeviceBackingOption
    +}
    +
    +func init() {
    +	t["VirtualUSBRemoteHostBackingOption"] = reflect.TypeOf((*VirtualUSBRemoteHostBackingOption)(nil)).Elem()
    +}
    +
    +type VirtualUSBUSBBackingInfo struct {
    +	VirtualDeviceDeviceBackingInfo
    +}
    +
    +func init() {
    +	t["VirtualUSBUSBBackingInfo"] = reflect.TypeOf((*VirtualUSBUSBBackingInfo)(nil)).Elem()
    +}
    +
    +type VirtualUSBUSBBackingOption struct {
    +	VirtualDeviceDeviceBackingOption
    +}
    +
    +func init() {
    +	t["VirtualUSBUSBBackingOption"] = reflect.TypeOf((*VirtualUSBUSBBackingOption)(nil)).Elem()
    +}
    +
    +type VirtualUSBXHCIController struct {
    +	VirtualController
    +
    +	AutoConnectDevices *bool `xml:"autoConnectDevices"`
    +}
    +
    +func init() {
    +	t["VirtualUSBXHCIController"] = reflect.TypeOf((*VirtualUSBXHCIController)(nil)).Elem()
    +}
    +
    +type VirtualUSBXHCIControllerOption struct {
    +	VirtualControllerOption
    +
    +	AutoConnectDevices BoolOption `xml:"autoConnectDevices"`
    +	SupportedSpeeds    []string   `xml:"supportedSpeeds"`
    +}
    +
    +func init() {
    +	t["VirtualUSBXHCIControllerOption"] = reflect.TypeOf((*VirtualUSBXHCIControllerOption)(nil)).Elem()
    +}
    +
    +type VirtualVMIROMOption struct {
    +	VirtualDeviceOption
    +}
    +
    +func init() {
    +	t["VirtualVMIROMOption"] = reflect.TypeOf((*VirtualVMIROMOption)(nil)).Elem()
    +}
    +
    +type VirtualVideoCardOption struct {
    +	VirtualDeviceOption
    +
    +	VideoRamSizeInKB            *LongOption `xml:"videoRamSizeInKB,omitempty"`
    +	NumDisplays                 *IntOption  `xml:"numDisplays,omitempty"`
    +	UseAutoDetect               *BoolOption `xml:"useAutoDetect,omitempty"`
    +	Support3D                   *BoolOption `xml:"support3D,omitempty"`
    +	Use3dRendererSupported      *BoolOption `xml:"use3dRendererSupported,omitempty"`
    +	GraphicsMemorySizeInKB      *LongOption `xml:"graphicsMemorySizeInKB,omitempty"`
    +	GraphicsMemorySizeSupported *BoolOption `xml:"graphicsMemorySizeSupported,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualVideoCardOption"] = reflect.TypeOf((*VirtualVideoCardOption)(nil)).Elem()
    +}
    +
    +type VirtualVmxnet struct {
    +	VirtualEthernetCard
    +}
    +
    +func init() {
    +	t["VirtualVmxnet"] = reflect.TypeOf((*VirtualVmxnet)(nil)).Elem()
    +}
    +
    +type VirtualVmxnet2 struct {
    +	VirtualVmxnet
    +}
    +
    +func init() {
    +	t["VirtualVmxnet2"] = reflect.TypeOf((*VirtualVmxnet2)(nil)).Elem()
    +}
    +
    +type VirtualVmxnet2Option struct {
    +	VirtualVmxnetOption
    +}
    +
    +func init() {
    +	t["VirtualVmxnet2Option"] = reflect.TypeOf((*VirtualVmxnet2Option)(nil)).Elem()
    +}
    +
    +type VirtualVmxnet3 struct {
    +	VirtualVmxnet
    +}
    +
    +func init() {
    +	t["VirtualVmxnet3"] = reflect.TypeOf((*VirtualVmxnet3)(nil)).Elem()
    +}
    +
    +type VirtualVmxnet3Option struct {
    +	VirtualVmxnetOption
    +}
    +
    +func init() {
    +	t["VirtualVmxnet3Option"] = reflect.TypeOf((*VirtualVmxnet3Option)(nil)).Elem()
    +}
    +
    +type VirtualVmxnet3Vrdma struct {
    +	VirtualVmxnet3
    +
    +	DeviceProtocol string `xml:"deviceProtocol,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualVmxnet3Vrdma"] = reflect.TypeOf((*VirtualVmxnet3Vrdma)(nil)).Elem()
    +}
    +
    +type VirtualVmxnet3VrdmaOption struct {
    +	VirtualVmxnet3Option
    +
    +	DeviceProtocol *ChoiceOption `xml:"deviceProtocol,omitempty"`
    +}
    +
    +func init() {
    +	t["VirtualVmxnet3VrdmaOption"] = reflect.TypeOf((*VirtualVmxnet3VrdmaOption)(nil)).Elem()
    +}
    +
    +type VirtualVmxnetOption struct {
    +	VirtualEthernetCardOption
    +}
    +
    +func init() {
    +	t["VirtualVmxnetOption"] = reflect.TypeOf((*VirtualVmxnetOption)(nil)).Elem()
    +}
    +
    +type VlanProfile struct {
    +	ApplyProfile
    +}
    +
    +func init() {
    +	t["VlanProfile"] = reflect.TypeOf((*VlanProfile)(nil)).Elem()
    +}
    +
    +type VmAcquiredMksTicketEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmAcquiredMksTicketEvent"] = reflect.TypeOf((*VmAcquiredMksTicketEvent)(nil)).Elem()
    +}
    +
    +type VmAcquiredTicketEvent struct {
    +	VmEvent
    +
    +	TicketType string `xml:"ticketType"`
    +}
    +
    +func init() {
    +	t["VmAcquiredTicketEvent"] = reflect.TypeOf((*VmAcquiredTicketEvent)(nil)).Elem()
    +}
    +
    +type VmAlreadyExistsInDatacenter struct {
    +	InvalidFolder
    +
    +	Host     ManagedObjectReference   `xml:"host"`
    +	Hostname string                   `xml:"hostname"`
    +	Vm       []ManagedObjectReference `xml:"vm"`
    +}
    +
    +func init() {
    +	t["VmAlreadyExistsInDatacenter"] = reflect.TypeOf((*VmAlreadyExistsInDatacenter)(nil)).Elem()
    +}
    +
    +type VmAlreadyExistsInDatacenterFault VmAlreadyExistsInDatacenter
    +
    +func init() {
    +	t["VmAlreadyExistsInDatacenterFault"] = reflect.TypeOf((*VmAlreadyExistsInDatacenterFault)(nil)).Elem()
    +}
    +
    +type VmAutoRenameEvent struct {
    +	VmEvent
    +
    +	OldName string `xml:"oldName"`
    +	NewName string `xml:"newName"`
    +}
    +
    +func init() {
    +	t["VmAutoRenameEvent"] = reflect.TypeOf((*VmAutoRenameEvent)(nil)).Elem()
    +}
    +
    +type VmBeingClonedEvent struct {
    +	VmCloneEvent
    +
    +	DestFolder FolderEventArgument `xml:"destFolder"`
    +	DestName   string              `xml:"destName"`
    +	DestHost   HostEventArgument   `xml:"destHost"`
    +}
    +
    +func init() {
    +	t["VmBeingClonedEvent"] = reflect.TypeOf((*VmBeingClonedEvent)(nil)).Elem()
    +}
    +
    +type VmBeingClonedNoFolderEvent struct {
    +	VmCloneEvent
    +
    +	DestName string            `xml:"destName"`
    +	DestHost HostEventArgument `xml:"destHost"`
    +}
    +
    +func init() {
    +	t["VmBeingClonedNoFolderEvent"] = reflect.TypeOf((*VmBeingClonedNoFolderEvent)(nil)).Elem()
    +}
    +
    +type VmBeingCreatedEvent struct {
    +	VmEvent
    +
    +	ConfigSpec *VirtualMachineConfigSpec `xml:"configSpec,omitempty"`
    +}
    +
    +func init() {
    +	t["VmBeingCreatedEvent"] = reflect.TypeOf((*VmBeingCreatedEvent)(nil)).Elem()
    +}
    +
    +type VmBeingDeployedEvent struct {
    +	VmEvent
    +
    +	SrcTemplate VmEventArgument `xml:"srcTemplate"`
    +}
    +
    +func init() {
    +	t["VmBeingDeployedEvent"] = reflect.TypeOf((*VmBeingDeployedEvent)(nil)).Elem()
    +}
    +
    +type VmBeingHotMigratedEvent struct {
    +	VmEvent
    +
    +	DestHost       HostEventArgument        `xml:"destHost"`
    +	DestDatacenter *DatacenterEventArgument `xml:"destDatacenter,omitempty"`
    +	DestDatastore  *DatastoreEventArgument  `xml:"destDatastore,omitempty"`
    +}
    +
    +func init() {
    +	t["VmBeingHotMigratedEvent"] = reflect.TypeOf((*VmBeingHotMigratedEvent)(nil)).Elem()
    +}
    +
    +type VmBeingMigratedEvent struct {
    +	VmEvent
    +
    +	DestHost       HostEventArgument        `xml:"destHost"`
    +	DestDatacenter *DatacenterEventArgument `xml:"destDatacenter,omitempty"`
    +	DestDatastore  *DatastoreEventArgument  `xml:"destDatastore,omitempty"`
    +}
    +
    +func init() {
    +	t["VmBeingMigratedEvent"] = reflect.TypeOf((*VmBeingMigratedEvent)(nil)).Elem()
    +}
    +
    +type VmBeingRelocatedEvent struct {
    +	VmRelocateSpecEvent
    +
    +	DestHost       HostEventArgument        `xml:"destHost"`
    +	DestDatacenter *DatacenterEventArgument `xml:"destDatacenter,omitempty"`
    +	DestDatastore  *DatastoreEventArgument  `xml:"destDatastore,omitempty"`
    +}
    +
    +func init() {
    +	t["VmBeingRelocatedEvent"] = reflect.TypeOf((*VmBeingRelocatedEvent)(nil)).Elem()
    +}
    +
    +type VmCloneEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmCloneEvent"] = reflect.TypeOf((*VmCloneEvent)(nil)).Elem()
    +}
    +
    +type VmCloneFailedEvent struct {
    +	VmCloneEvent
    +
    +	DestFolder FolderEventArgument  `xml:"destFolder"`
    +	DestName   string               `xml:"destName"`
    +	DestHost   HostEventArgument    `xml:"destHost"`
    +	Reason     LocalizedMethodFault `xml:"reason"`
    +}
    +
    +func init() {
    +	t["VmCloneFailedEvent"] = reflect.TypeOf((*VmCloneFailedEvent)(nil)).Elem()
    +}
    +
    +type VmClonedEvent struct {
    +	VmCloneEvent
    +
    +	SourceVm VmEventArgument `xml:"sourceVm"`
    +}
    +
    +func init() {
    +	t["VmClonedEvent"] = reflect.TypeOf((*VmClonedEvent)(nil)).Elem()
    +}
    +
    +type VmConfigFault struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["VmConfigFault"] = reflect.TypeOf((*VmConfigFault)(nil)).Elem()
    +}
    +
    +type VmConfigFaultFault BaseVmConfigFault
    +
    +func init() {
    +	t["VmConfigFaultFault"] = reflect.TypeOf((*VmConfigFaultFault)(nil)).Elem()
    +}
    +
    +type VmConfigFileEncryptionInfo struct {
    +	DynamicData
    +
    +	KeyId *CryptoKeyId `xml:"keyId,omitempty"`
    +}
    +
    +func init() {
    +	t["VmConfigFileEncryptionInfo"] = reflect.TypeOf((*VmConfigFileEncryptionInfo)(nil)).Elem()
    +}
    +
    +type VmConfigFileInfo struct {
    +	FileInfo
    +
    +	ConfigVersion int32                       `xml:"configVersion,omitempty"`
    +	Encryption    *VmConfigFileEncryptionInfo `xml:"encryption,omitempty"`
    +}
    +
    +func init() {
    +	t["VmConfigFileInfo"] = reflect.TypeOf((*VmConfigFileInfo)(nil)).Elem()
    +}
    +
    +type VmConfigFileQuery struct {
    +	FileQuery
    +
    +	Filter  *VmConfigFileQueryFilter `xml:"filter,omitempty"`
    +	Details *VmConfigFileQueryFlags  `xml:"details,omitempty"`
    +}
    +
    +func init() {
    +	t["VmConfigFileQuery"] = reflect.TypeOf((*VmConfigFileQuery)(nil)).Elem()
    +}
    +
    +type VmConfigFileQueryFilter struct {
    +	DynamicData
    +
    +	MatchConfigVersion []int32 `xml:"matchConfigVersion,omitempty"`
    +	Encrypted          *bool   `xml:"encrypted"`
    +}
    +
    +func init() {
    +	t["VmConfigFileQueryFilter"] = reflect.TypeOf((*VmConfigFileQueryFilter)(nil)).Elem()
    +}
    +
    +type VmConfigFileQueryFlags struct {
    +	DynamicData
    +
    +	ConfigVersion bool  `xml:"configVersion"`
    +	Encryption    *bool `xml:"encryption"`
    +}
    +
    +func init() {
    +	t["VmConfigFileQueryFlags"] = reflect.TypeOf((*VmConfigFileQueryFlags)(nil)).Elem()
    +}
    +
    +type VmConfigIncompatibleForFaultTolerance struct {
    +	VmConfigFault
    +
    +	Fault *LocalizedMethodFault `xml:"fault,omitempty"`
    +}
    +
    +func init() {
    +	t["VmConfigIncompatibleForFaultTolerance"] = reflect.TypeOf((*VmConfigIncompatibleForFaultTolerance)(nil)).Elem()
    +}
    +
    +type VmConfigIncompatibleForFaultToleranceFault VmConfigIncompatibleForFaultTolerance
    +
    +func init() {
    +	t["VmConfigIncompatibleForFaultToleranceFault"] = reflect.TypeOf((*VmConfigIncompatibleForFaultToleranceFault)(nil)).Elem()
    +}
    +
    +type VmConfigIncompatibleForRecordReplay struct {
    +	VmConfigFault
    +
    +	Fault *LocalizedMethodFault `xml:"fault,omitempty"`
    +}
    +
    +func init() {
    +	t["VmConfigIncompatibleForRecordReplay"] = reflect.TypeOf((*VmConfigIncompatibleForRecordReplay)(nil)).Elem()
    +}
    +
    +type VmConfigIncompatibleForRecordReplayFault VmConfigIncompatibleForRecordReplay
    +
    +func init() {
    +	t["VmConfigIncompatibleForRecordReplayFault"] = reflect.TypeOf((*VmConfigIncompatibleForRecordReplayFault)(nil)).Elem()
    +}
    +
    +type VmConfigInfo struct {
    +	DynamicData
    +
    +	Product                 []VAppProductInfo    `xml:"product,omitempty"`
    +	Property                []VAppPropertyInfo   `xml:"property,omitempty"`
    +	IpAssignment            VAppIPAssignmentInfo `xml:"ipAssignment"`
    +	Eula                    []string             `xml:"eula,omitempty"`
    +	OvfSection              []VAppOvfSectionInfo `xml:"ovfSection,omitempty"`
    +	OvfEnvironmentTransport []string             `xml:"ovfEnvironmentTransport,omitempty"`
    +	InstallBootRequired     bool                 `xml:"installBootRequired"`
    +	InstallBootStopDelay    int32                `xml:"installBootStopDelay"`
    +}
    +
    +func init() {
    +	t["VmConfigInfo"] = reflect.TypeOf((*VmConfigInfo)(nil)).Elem()
    +}
    +
    +type VmConfigMissingEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmConfigMissingEvent"] = reflect.TypeOf((*VmConfigMissingEvent)(nil)).Elem()
    +}
    +
    +type VmConfigSpec struct {
    +	DynamicData
    +
    +	Product                 []VAppProductSpec     `xml:"product,omitempty"`
    +	Property                []VAppPropertySpec    `xml:"property,omitempty"`
    +	IpAssignment            *VAppIPAssignmentInfo `xml:"ipAssignment,omitempty"`
    +	Eula                    []string              `xml:"eula,omitempty"`
    +	OvfSection              []VAppOvfSectionSpec  `xml:"ovfSection,omitempty"`
    +	OvfEnvironmentTransport []string              `xml:"ovfEnvironmentTransport,omitempty"`
    +	InstallBootRequired     *bool                 `xml:"installBootRequired"`
    +	InstallBootStopDelay    int32                 `xml:"installBootStopDelay,omitempty"`
    +}
    +
    +func init() {
    +	t["VmConfigSpec"] = reflect.TypeOf((*VmConfigSpec)(nil)).Elem()
    +}
    +
    +type VmConnectedEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmConnectedEvent"] = reflect.TypeOf((*VmConnectedEvent)(nil)).Elem()
    +}
    +
    +type VmCreatedEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmCreatedEvent"] = reflect.TypeOf((*VmCreatedEvent)(nil)).Elem()
    +}
    +
    +type VmDasBeingResetEvent struct {
    +	VmEvent
    +
    +	Reason string `xml:"reason,omitempty"`
    +}
    +
    +func init() {
    +	t["VmDasBeingResetEvent"] = reflect.TypeOf((*VmDasBeingResetEvent)(nil)).Elem()
    +}
    +
    +type VmDasBeingResetWithScreenshotEvent struct {
    +	VmDasBeingResetEvent
    +
    +	ScreenshotFilePath string `xml:"screenshotFilePath"`
    +}
    +
    +func init() {
    +	t["VmDasBeingResetWithScreenshotEvent"] = reflect.TypeOf((*VmDasBeingResetWithScreenshotEvent)(nil)).Elem()
    +}
    +
    +type VmDasResetFailedEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmDasResetFailedEvent"] = reflect.TypeOf((*VmDasResetFailedEvent)(nil)).Elem()
    +}
    +
    +type VmDasUpdateErrorEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmDasUpdateErrorEvent"] = reflect.TypeOf((*VmDasUpdateErrorEvent)(nil)).Elem()
    +}
    +
    +type VmDasUpdateOkEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmDasUpdateOkEvent"] = reflect.TypeOf((*VmDasUpdateOkEvent)(nil)).Elem()
    +}
    +
    +type VmDateRolledBackEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmDateRolledBackEvent"] = reflect.TypeOf((*VmDateRolledBackEvent)(nil)).Elem()
    +}
    +
    +type VmDeployFailedEvent struct {
    +	VmEvent
    +
    +	DestDatastore BaseEntityEventArgument `xml:"destDatastore,typeattr"`
    +	Reason        LocalizedMethodFault    `xml:"reason"`
    +}
    +
    +func init() {
    +	t["VmDeployFailedEvent"] = reflect.TypeOf((*VmDeployFailedEvent)(nil)).Elem()
    +}
    +
    +type VmDeployedEvent struct {
    +	VmEvent
    +
    +	SrcTemplate VmEventArgument `xml:"srcTemplate"`
    +}
    +
    +func init() {
    +	t["VmDeployedEvent"] = reflect.TypeOf((*VmDeployedEvent)(nil)).Elem()
    +}
    +
    +type VmDisconnectedEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmDisconnectedEvent"] = reflect.TypeOf((*VmDisconnectedEvent)(nil)).Elem()
    +}
    +
    +type VmDiscoveredEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmDiscoveredEvent"] = reflect.TypeOf((*VmDiscoveredEvent)(nil)).Elem()
    +}
    +
    +type VmDiskFailedEvent struct {
    +	VmEvent
    +
    +	Disk   string               `xml:"disk"`
    +	Reason LocalizedMethodFault `xml:"reason"`
    +}
    +
    +func init() {
    +	t["VmDiskFailedEvent"] = reflect.TypeOf((*VmDiskFailedEvent)(nil)).Elem()
    +}
    +
    +type VmDiskFileEncryptionInfo struct {
    +	DynamicData
    +
    +	KeyId *CryptoKeyId `xml:"keyId,omitempty"`
    +}
    +
    +func init() {
    +	t["VmDiskFileEncryptionInfo"] = reflect.TypeOf((*VmDiskFileEncryptionInfo)(nil)).Elem()
    +}
    +
    +type VmDiskFileInfo struct {
    +	FileInfo
    +
    +	DiskType        string                    `xml:"diskType,omitempty"`
    +	CapacityKb      int64                     `xml:"capacityKb,omitempty"`
    +	HardwareVersion int32                     `xml:"hardwareVersion,omitempty"`
    +	ControllerType  string                    `xml:"controllerType,omitempty"`
    +	DiskExtents     []string                  `xml:"diskExtents,omitempty"`
    +	Thin            *bool                     `xml:"thin"`
    +	Encryption      *VmDiskFileEncryptionInfo `xml:"encryption,omitempty"`
    +}
    +
    +func init() {
    +	t["VmDiskFileInfo"] = reflect.TypeOf((*VmDiskFileInfo)(nil)).Elem()
    +}
    +
    +type VmDiskFileQuery struct {
    +	FileQuery
    +
    +	Filter  *VmDiskFileQueryFilter `xml:"filter,omitempty"`
    +	Details *VmDiskFileQueryFlags  `xml:"details,omitempty"`
    +}
    +
    +func init() {
    +	t["VmDiskFileQuery"] = reflect.TypeOf((*VmDiskFileQuery)(nil)).Elem()
    +}
    +
    +type VmDiskFileQueryFilter struct {
    +	DynamicData
    +
    +	DiskType             []string `xml:"diskType,omitempty"`
    +	MatchHardwareVersion []int32  `xml:"matchHardwareVersion,omitempty"`
    +	ControllerType       []string `xml:"controllerType,omitempty"`
    +	Thin                 *bool    `xml:"thin"`
    +	Encrypted            *bool    `xml:"encrypted"`
    +}
    +
    +func init() {
    +	t["VmDiskFileQueryFilter"] = reflect.TypeOf((*VmDiskFileQueryFilter)(nil)).Elem()
    +}
    +
    +type VmDiskFileQueryFlags struct {
    +	DynamicData
    +
    +	DiskType        bool  `xml:"diskType"`
    +	CapacityKb      bool  `xml:"capacityKb"`
    +	HardwareVersion bool  `xml:"hardwareVersion"`
    +	ControllerType  *bool `xml:"controllerType"`
    +	DiskExtents     *bool `xml:"diskExtents"`
    +	Thin            *bool `xml:"thin"`
    +	Encryption      *bool `xml:"encryption"`
    +}
    +
    +func init() {
    +	t["VmDiskFileQueryFlags"] = reflect.TypeOf((*VmDiskFileQueryFlags)(nil)).Elem()
    +}
    +
    +type VmEmigratingEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmEmigratingEvent"] = reflect.TypeOf((*VmEmigratingEvent)(nil)).Elem()
    +}
    +
    +type VmEndRecordingEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmEndRecordingEvent"] = reflect.TypeOf((*VmEndRecordingEvent)(nil)).Elem()
    +}
    +
    +type VmEndReplayingEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmEndReplayingEvent"] = reflect.TypeOf((*VmEndReplayingEvent)(nil)).Elem()
    +}
    +
    +type VmEvent struct {
    +	Event
    +
    +	Template bool `xml:"template"`
    +}
    +
    +func init() {
    +	t["VmEvent"] = reflect.TypeOf((*VmEvent)(nil)).Elem()
    +}
    +
    +type VmEventArgument struct {
    +	EntityEventArgument
    +
    +	Vm ManagedObjectReference `xml:"vm"`
    +}
    +
    +func init() {
    +	t["VmEventArgument"] = reflect.TypeOf((*VmEventArgument)(nil)).Elem()
    +}
    +
    +type VmFailedMigrateEvent struct {
    +	VmEvent
    +
    +	DestHost       HostEventArgument        `xml:"destHost"`
    +	Reason         LocalizedMethodFault     `xml:"reason"`
    +	DestDatacenter *DatacenterEventArgument `xml:"destDatacenter,omitempty"`
    +	DestDatastore  *DatastoreEventArgument  `xml:"destDatastore,omitempty"`
    +}
    +
    +func init() {
    +	t["VmFailedMigrateEvent"] = reflect.TypeOf((*VmFailedMigrateEvent)(nil)).Elem()
    +}
    +
    +type VmFailedRelayoutEvent struct {
    +	VmEvent
    +
    +	Reason LocalizedMethodFault `xml:"reason"`
    +}
    +
    +func init() {
    +	t["VmFailedRelayoutEvent"] = reflect.TypeOf((*VmFailedRelayoutEvent)(nil)).Elem()
    +}
    +
    +type VmFailedRelayoutOnVmfs2DatastoreEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmFailedRelayoutOnVmfs2DatastoreEvent"] = reflect.TypeOf((*VmFailedRelayoutOnVmfs2DatastoreEvent)(nil)).Elem()
    +}
    +
    +type VmFailedStartingSecondaryEvent struct {
    +	VmEvent
    +
    +	Reason string `xml:"reason,omitempty"`
    +}
    +
    +func init() {
    +	t["VmFailedStartingSecondaryEvent"] = reflect.TypeOf((*VmFailedStartingSecondaryEvent)(nil)).Elem()
    +}
    +
    +type VmFailedToPowerOffEvent struct {
    +	VmEvent
    +
    +	Reason LocalizedMethodFault `xml:"reason"`
    +}
    +
    +func init() {
    +	t["VmFailedToPowerOffEvent"] = reflect.TypeOf((*VmFailedToPowerOffEvent)(nil)).Elem()
    +}
    +
    +type VmFailedToPowerOnEvent struct {
    +	VmEvent
    +
    +	Reason LocalizedMethodFault `xml:"reason"`
    +}
    +
    +func init() {
    +	t["VmFailedToPowerOnEvent"] = reflect.TypeOf((*VmFailedToPowerOnEvent)(nil)).Elem()
    +}
    +
    +type VmFailedToRebootGuestEvent struct {
    +	VmEvent
    +
    +	Reason LocalizedMethodFault `xml:"reason"`
    +}
    +
    +func init() {
    +	t["VmFailedToRebootGuestEvent"] = reflect.TypeOf((*VmFailedToRebootGuestEvent)(nil)).Elem()
    +}
    +
    +type VmFailedToResetEvent struct {
    +	VmEvent
    +
    +	Reason LocalizedMethodFault `xml:"reason"`
    +}
    +
    +func init() {
    +	t["VmFailedToResetEvent"] = reflect.TypeOf((*VmFailedToResetEvent)(nil)).Elem()
    +}
    +
    +type VmFailedToShutdownGuestEvent struct {
    +	VmEvent
    +
    +	Reason LocalizedMethodFault `xml:"reason"`
    +}
    +
    +func init() {
    +	t["VmFailedToShutdownGuestEvent"] = reflect.TypeOf((*VmFailedToShutdownGuestEvent)(nil)).Elem()
    +}
    +
    +type VmFailedToStandbyGuestEvent struct {
    +	VmEvent
    +
    +	Reason LocalizedMethodFault `xml:"reason"`
    +}
    +
    +func init() {
    +	t["VmFailedToStandbyGuestEvent"] = reflect.TypeOf((*VmFailedToStandbyGuestEvent)(nil)).Elem()
    +}
    +
    +type VmFailedToSuspendEvent struct {
    +	VmEvent
    +
    +	Reason LocalizedMethodFault `xml:"reason"`
    +}
    +
    +func init() {
    +	t["VmFailedToSuspendEvent"] = reflect.TypeOf((*VmFailedToSuspendEvent)(nil)).Elem()
    +}
    +
    +type VmFailedUpdatingSecondaryConfig struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmFailedUpdatingSecondaryConfig"] = reflect.TypeOf((*VmFailedUpdatingSecondaryConfig)(nil)).Elem()
    +}
    +
    +type VmFailoverFailed struct {
    +	VmEvent
    +
    +	Reason *LocalizedMethodFault `xml:"reason,omitempty"`
    +}
    +
    +func init() {
    +	t["VmFailoverFailed"] = reflect.TypeOf((*VmFailoverFailed)(nil)).Elem()
    +}
    +
    +type VmFaultToleranceConfigIssue struct {
    +	VmFaultToleranceIssue
    +
    +	Reason     string                  `xml:"reason,omitempty"`
    +	EntityName string                  `xml:"entityName,omitempty"`
    +	Entity     *ManagedObjectReference `xml:"entity,omitempty"`
    +}
    +
    +func init() {
    +	t["VmFaultToleranceConfigIssue"] = reflect.TypeOf((*VmFaultToleranceConfigIssue)(nil)).Elem()
    +}
    +
    +type VmFaultToleranceConfigIssueFault VmFaultToleranceConfigIssue
    +
    +func init() {
    +	t["VmFaultToleranceConfigIssueFault"] = reflect.TypeOf((*VmFaultToleranceConfigIssueFault)(nil)).Elem()
    +}
    +
    +type VmFaultToleranceConfigIssueWrapper struct {
    +	VmFaultToleranceIssue
    +
    +	EntityName string                  `xml:"entityName,omitempty"`
    +	Entity     *ManagedObjectReference `xml:"entity,omitempty"`
    +	Error      *LocalizedMethodFault   `xml:"error,omitempty"`
    +}
    +
    +func init() {
    +	t["VmFaultToleranceConfigIssueWrapper"] = reflect.TypeOf((*VmFaultToleranceConfigIssueWrapper)(nil)).Elem()
    +}
    +
    +type VmFaultToleranceConfigIssueWrapperFault VmFaultToleranceConfigIssueWrapper
    +
    +func init() {
    +	t["VmFaultToleranceConfigIssueWrapperFault"] = reflect.TypeOf((*VmFaultToleranceConfigIssueWrapperFault)(nil)).Elem()
    +}
    +
    +type VmFaultToleranceInvalidFileBacking struct {
    +	VmFaultToleranceIssue
    +
    +	BackingType     string `xml:"backingType,omitempty"`
    +	BackingFilename string `xml:"backingFilename,omitempty"`
    +}
    +
    +func init() {
    +	t["VmFaultToleranceInvalidFileBacking"] = reflect.TypeOf((*VmFaultToleranceInvalidFileBacking)(nil)).Elem()
    +}
    +
    +type VmFaultToleranceInvalidFileBackingFault VmFaultToleranceInvalidFileBacking
    +
    +func init() {
    +	t["VmFaultToleranceInvalidFileBackingFault"] = reflect.TypeOf((*VmFaultToleranceInvalidFileBackingFault)(nil)).Elem()
    +}
    +
    +type VmFaultToleranceIssue struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["VmFaultToleranceIssue"] = reflect.TypeOf((*VmFaultToleranceIssue)(nil)).Elem()
    +}
    +
    +type VmFaultToleranceIssueFault BaseVmFaultToleranceIssue
    +
    +func init() {
    +	t["VmFaultToleranceIssueFault"] = reflect.TypeOf((*VmFaultToleranceIssueFault)(nil)).Elem()
    +}
    +
    +type VmFaultToleranceOpIssuesList struct {
    +	VmFaultToleranceIssue
    +
    +	Errors   []LocalizedMethodFault `xml:"errors,omitempty"`
    +	Warnings []LocalizedMethodFault `xml:"warnings,omitempty"`
    +}
    +
    +func init() {
    +	t["VmFaultToleranceOpIssuesList"] = reflect.TypeOf((*VmFaultToleranceOpIssuesList)(nil)).Elem()
    +}
    +
    +type VmFaultToleranceOpIssuesListFault VmFaultToleranceOpIssuesList
    +
    +func init() {
    +	t["VmFaultToleranceOpIssuesListFault"] = reflect.TypeOf((*VmFaultToleranceOpIssuesListFault)(nil)).Elem()
    +}
    +
    +type VmFaultToleranceStateChangedEvent struct {
    +	VmEvent
    +
    +	OldState VirtualMachineFaultToleranceState `xml:"oldState"`
    +	NewState VirtualMachineFaultToleranceState `xml:"newState"`
    +}
    +
    +func init() {
    +	t["VmFaultToleranceStateChangedEvent"] = reflect.TypeOf((*VmFaultToleranceStateChangedEvent)(nil)).Elem()
    +}
    +
    +type VmFaultToleranceTooManyFtVcpusOnHost struct {
    +	InsufficientResourcesFault
    +
    +	HostName      string `xml:"hostName,omitempty"`
    +	MaxNumFtVcpus int32  `xml:"maxNumFtVcpus"`
    +}
    +
    +func init() {
    +	t["VmFaultToleranceTooManyFtVcpusOnHost"] = reflect.TypeOf((*VmFaultToleranceTooManyFtVcpusOnHost)(nil)).Elem()
    +}
    +
    +type VmFaultToleranceTooManyFtVcpusOnHostFault VmFaultToleranceTooManyFtVcpusOnHost
    +
    +func init() {
    +	t["VmFaultToleranceTooManyFtVcpusOnHostFault"] = reflect.TypeOf((*VmFaultToleranceTooManyFtVcpusOnHostFault)(nil)).Elem()
    +}
    +
    +type VmFaultToleranceTooManyVMsOnHost struct {
    +	InsufficientResourcesFault
    +
    +	HostName    string `xml:"hostName,omitempty"`
    +	MaxNumFtVms int32  `xml:"maxNumFtVms"`
    +}
    +
    +func init() {
    +	t["VmFaultToleranceTooManyVMsOnHost"] = reflect.TypeOf((*VmFaultToleranceTooManyVMsOnHost)(nil)).Elem()
    +}
    +
    +type VmFaultToleranceTooManyVMsOnHostFault VmFaultToleranceTooManyVMsOnHost
    +
    +func init() {
    +	t["VmFaultToleranceTooManyVMsOnHostFault"] = reflect.TypeOf((*VmFaultToleranceTooManyVMsOnHostFault)(nil)).Elem()
    +}
    +
    +type VmFaultToleranceTurnedOffEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmFaultToleranceTurnedOffEvent"] = reflect.TypeOf((*VmFaultToleranceTurnedOffEvent)(nil)).Elem()
    +}
    +
    +type VmFaultToleranceVmTerminatedEvent struct {
    +	VmEvent
    +
    +	Reason string `xml:"reason,omitempty"`
    +}
    +
    +func init() {
    +	t["VmFaultToleranceVmTerminatedEvent"] = reflect.TypeOf((*VmFaultToleranceVmTerminatedEvent)(nil)).Elem()
    +}
    +
    +type VmGuestOSCrashedEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmGuestOSCrashedEvent"] = reflect.TypeOf((*VmGuestOSCrashedEvent)(nil)).Elem()
    +}
    +
    +type VmGuestRebootEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmGuestRebootEvent"] = reflect.TypeOf((*VmGuestRebootEvent)(nil)).Elem()
    +}
    +
    +type VmGuestShutdownEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmGuestShutdownEvent"] = reflect.TypeOf((*VmGuestShutdownEvent)(nil)).Elem()
    +}
    +
    +type VmGuestStandbyEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmGuestStandbyEvent"] = reflect.TypeOf((*VmGuestStandbyEvent)(nil)).Elem()
    +}
    +
    +type VmHealthMonitoringStateChangedEvent struct {
    +	ClusterEvent
    +
    +	State     string `xml:"state"`
    +	PrevState string `xml:"prevState,omitempty"`
    +}
    +
    +func init() {
    +	t["VmHealthMonitoringStateChangedEvent"] = reflect.TypeOf((*VmHealthMonitoringStateChangedEvent)(nil)).Elem()
    +}
    +
    +type VmHostAffinityRuleViolation struct {
    +	VmConfigFault
    +
    +	VmName   string `xml:"vmName"`
    +	HostName string `xml:"hostName"`
    +}
    +
    +func init() {
    +	t["VmHostAffinityRuleViolation"] = reflect.TypeOf((*VmHostAffinityRuleViolation)(nil)).Elem()
    +}
    +
    +type VmHostAffinityRuleViolationFault VmHostAffinityRuleViolation
    +
    +func init() {
    +	t["VmHostAffinityRuleViolationFault"] = reflect.TypeOf((*VmHostAffinityRuleViolationFault)(nil)).Elem()
    +}
    +
    +type VmInstanceUuidAssignedEvent struct {
    +	VmEvent
    +
    +	InstanceUuid string `xml:"instanceUuid"`
    +}
    +
    +func init() {
    +	t["VmInstanceUuidAssignedEvent"] = reflect.TypeOf((*VmInstanceUuidAssignedEvent)(nil)).Elem()
    +}
    +
    +type VmInstanceUuidChangedEvent struct {
    +	VmEvent
    +
    +	OldInstanceUuid string `xml:"oldInstanceUuid"`
    +	NewInstanceUuid string `xml:"newInstanceUuid"`
    +}
    +
    +func init() {
    +	t["VmInstanceUuidChangedEvent"] = reflect.TypeOf((*VmInstanceUuidChangedEvent)(nil)).Elem()
    +}
    +
    +type VmInstanceUuidConflictEvent struct {
    +	VmEvent
    +
    +	ConflictedVm VmEventArgument `xml:"conflictedVm"`
    +	InstanceUuid string          `xml:"instanceUuid"`
    +}
    +
    +func init() {
    +	t["VmInstanceUuidConflictEvent"] = reflect.TypeOf((*VmInstanceUuidConflictEvent)(nil)).Elem()
    +}
    +
    +type VmLimitLicense struct {
    +	NotEnoughLicenses
    +
    +	Limit int32 `xml:"limit"`
    +}
    +
    +func init() {
    +	t["VmLimitLicense"] = reflect.TypeOf((*VmLimitLicense)(nil)).Elem()
    +}
    +
    +type VmLimitLicenseFault VmLimitLicense
    +
    +func init() {
    +	t["VmLimitLicenseFault"] = reflect.TypeOf((*VmLimitLicenseFault)(nil)).Elem()
    +}
    +
    +type VmLogFileInfo struct {
    +	FileInfo
    +}
    +
    +func init() {
    +	t["VmLogFileInfo"] = reflect.TypeOf((*VmLogFileInfo)(nil)).Elem()
    +}
    +
    +type VmLogFileQuery struct {
    +	FileQuery
    +}
    +
    +func init() {
    +	t["VmLogFileQuery"] = reflect.TypeOf((*VmLogFileQuery)(nil)).Elem()
    +}
    +
    +type VmMacAssignedEvent struct {
    +	VmEvent
    +
    +	Adapter string `xml:"adapter"`
    +	Mac     string `xml:"mac"`
    +}
    +
    +func init() {
    +	t["VmMacAssignedEvent"] = reflect.TypeOf((*VmMacAssignedEvent)(nil)).Elem()
    +}
    +
    +type VmMacChangedEvent struct {
    +	VmEvent
    +
    +	Adapter string `xml:"adapter"`
    +	OldMac  string `xml:"oldMac"`
    +	NewMac  string `xml:"newMac"`
    +}
    +
    +func init() {
    +	t["VmMacChangedEvent"] = reflect.TypeOf((*VmMacChangedEvent)(nil)).Elem()
    +}
    +
    +type VmMacConflictEvent struct {
    +	VmEvent
    +
    +	ConflictedVm VmEventArgument `xml:"conflictedVm"`
    +	Mac          string          `xml:"mac"`
    +}
    +
    +func init() {
    +	t["VmMacConflictEvent"] = reflect.TypeOf((*VmMacConflictEvent)(nil)).Elem()
    +}
    +
    +type VmMaxFTRestartCountReached struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmMaxFTRestartCountReached"] = reflect.TypeOf((*VmMaxFTRestartCountReached)(nil)).Elem()
    +}
    +
    +type VmMaxRestartCountReached struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmMaxRestartCountReached"] = reflect.TypeOf((*VmMaxRestartCountReached)(nil)).Elem()
    +}
    +
    +type VmMessageErrorEvent struct {
    +	VmEvent
    +
    +	Message     string                  `xml:"message"`
    +	MessageInfo []VirtualMachineMessage `xml:"messageInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["VmMessageErrorEvent"] = reflect.TypeOf((*VmMessageErrorEvent)(nil)).Elem()
    +}
    +
    +type VmMessageEvent struct {
    +	VmEvent
    +
    +	Message     string                  `xml:"message"`
    +	MessageInfo []VirtualMachineMessage `xml:"messageInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["VmMessageEvent"] = reflect.TypeOf((*VmMessageEvent)(nil)).Elem()
    +}
    +
    +type VmMessageWarningEvent struct {
    +	VmEvent
    +
    +	Message     string                  `xml:"message"`
    +	MessageInfo []VirtualMachineMessage `xml:"messageInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["VmMessageWarningEvent"] = reflect.TypeOf((*VmMessageWarningEvent)(nil)).Elem()
    +}
    +
    +type VmMetadataManagerFault struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["VmMetadataManagerFault"] = reflect.TypeOf((*VmMetadataManagerFault)(nil)).Elem()
    +}
    +
    +type VmMetadataManagerFaultFault VmMetadataManagerFault
    +
    +func init() {
    +	t["VmMetadataManagerFaultFault"] = reflect.TypeOf((*VmMetadataManagerFaultFault)(nil)).Elem()
    +}
    +
    +type VmMigratedEvent struct {
    +	VmEvent
    +
    +	SourceHost       HostEventArgument        `xml:"sourceHost"`
    +	SourceDatacenter *DatacenterEventArgument `xml:"sourceDatacenter,omitempty"`
    +	SourceDatastore  *DatastoreEventArgument  `xml:"sourceDatastore,omitempty"`
    +}
    +
    +func init() {
    +	t["VmMigratedEvent"] = reflect.TypeOf((*VmMigratedEvent)(nil)).Elem()
    +}
    +
    +type VmMonitorIncompatibleForFaultTolerance struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["VmMonitorIncompatibleForFaultTolerance"] = reflect.TypeOf((*VmMonitorIncompatibleForFaultTolerance)(nil)).Elem()
    +}
    +
    +type VmMonitorIncompatibleForFaultToleranceFault VmMonitorIncompatibleForFaultTolerance
    +
    +func init() {
    +	t["VmMonitorIncompatibleForFaultToleranceFault"] = reflect.TypeOf((*VmMonitorIncompatibleForFaultToleranceFault)(nil)).Elem()
    +}
    +
    +type VmNoCompatibleHostForSecondaryEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmNoCompatibleHostForSecondaryEvent"] = reflect.TypeOf((*VmNoCompatibleHostForSecondaryEvent)(nil)).Elem()
    +}
    +
    +type VmNoNetworkAccessEvent struct {
    +	VmEvent
    +
    +	DestHost HostEventArgument `xml:"destHost"`
    +}
    +
    +func init() {
    +	t["VmNoNetworkAccessEvent"] = reflect.TypeOf((*VmNoNetworkAccessEvent)(nil)).Elem()
    +}
    +
    +type VmNvramFileInfo struct {
    +	FileInfo
    +}
    +
    +func init() {
    +	t["VmNvramFileInfo"] = reflect.TypeOf((*VmNvramFileInfo)(nil)).Elem()
    +}
    +
    +type VmNvramFileQuery struct {
    +	FileQuery
    +}
    +
    +func init() {
    +	t["VmNvramFileQuery"] = reflect.TypeOf((*VmNvramFileQuery)(nil)).Elem()
    +}
    +
    +type VmOrphanedEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmOrphanedEvent"] = reflect.TypeOf((*VmOrphanedEvent)(nil)).Elem()
    +}
    +
    +type VmPodConfigForPlacement struct {
    +	DynamicData
    +
    +	StoragePod  ManagedObjectReference  `xml:"storagePod"`
    +	Disk        []PodDiskLocator        `xml:"disk,omitempty"`
    +	VmConfig    *StorageDrsVmConfigInfo `xml:"vmConfig,omitempty"`
    +	InterVmRule []BaseClusterRuleInfo   `xml:"interVmRule,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["VmPodConfigForPlacement"] = reflect.TypeOf((*VmPodConfigForPlacement)(nil)).Elem()
    +}
    +
    +type VmPortGroupProfile struct {
    +	PortGroupProfile
    +}
    +
    +func init() {
    +	t["VmPortGroupProfile"] = reflect.TypeOf((*VmPortGroupProfile)(nil)).Elem()
    +}
    +
    +type VmPowerOffOnIsolationEvent struct {
    +	VmPoweredOffEvent
    +
    +	IsolatedHost HostEventArgument `xml:"isolatedHost"`
    +}
    +
    +func init() {
    +	t["VmPowerOffOnIsolationEvent"] = reflect.TypeOf((*VmPowerOffOnIsolationEvent)(nil)).Elem()
    +}
    +
    +type VmPowerOnDisabled struct {
    +	InvalidState
    +}
    +
    +func init() {
    +	t["VmPowerOnDisabled"] = reflect.TypeOf((*VmPowerOnDisabled)(nil)).Elem()
    +}
    +
    +type VmPowerOnDisabledFault VmPowerOnDisabled
    +
    +func init() {
    +	t["VmPowerOnDisabledFault"] = reflect.TypeOf((*VmPowerOnDisabledFault)(nil)).Elem()
    +}
    +
    +type VmPoweredOffEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmPoweredOffEvent"] = reflect.TypeOf((*VmPoweredOffEvent)(nil)).Elem()
    +}
    +
    +type VmPoweredOnEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmPoweredOnEvent"] = reflect.TypeOf((*VmPoweredOnEvent)(nil)).Elem()
    +}
    +
    +type VmPoweringOnWithCustomizedDVPortEvent struct {
    +	VmEvent
    +
    +	Vnic []VnicPortArgument `xml:"vnic"`
    +}
    +
    +func init() {
    +	t["VmPoweringOnWithCustomizedDVPortEvent"] = reflect.TypeOf((*VmPoweringOnWithCustomizedDVPortEvent)(nil)).Elem()
    +}
    +
    +type VmPrimaryFailoverEvent struct {
    +	VmEvent
    +
    +	Reason string `xml:"reason,omitempty"`
    +}
    +
    +func init() {
    +	t["VmPrimaryFailoverEvent"] = reflect.TypeOf((*VmPrimaryFailoverEvent)(nil)).Elem()
    +}
    +
    +type VmReconfiguredEvent struct {
    +	VmEvent
    +
    +	ConfigSpec    VirtualMachineConfigSpec  `xml:"configSpec"`
    +	ConfigChanges *ChangesInfoEventArgument `xml:"configChanges,omitempty"`
    +}
    +
    +func init() {
    +	t["VmReconfiguredEvent"] = reflect.TypeOf((*VmReconfiguredEvent)(nil)).Elem()
    +}
    +
    +type VmRegisteredEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmRegisteredEvent"] = reflect.TypeOf((*VmRegisteredEvent)(nil)).Elem()
    +}
    +
    +type VmRelayoutSuccessfulEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmRelayoutSuccessfulEvent"] = reflect.TypeOf((*VmRelayoutSuccessfulEvent)(nil)).Elem()
    +}
    +
    +type VmRelayoutUpToDateEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmRelayoutUpToDateEvent"] = reflect.TypeOf((*VmRelayoutUpToDateEvent)(nil)).Elem()
    +}
    +
    +type VmReloadFromPathEvent struct {
    +	VmEvent
    +
    +	ConfigPath string `xml:"configPath"`
    +}
    +
    +func init() {
    +	t["VmReloadFromPathEvent"] = reflect.TypeOf((*VmReloadFromPathEvent)(nil)).Elem()
    +}
    +
    +type VmReloadFromPathFailedEvent struct {
    +	VmEvent
    +
    +	ConfigPath string `xml:"configPath"`
    +}
    +
    +func init() {
    +	t["VmReloadFromPathFailedEvent"] = reflect.TypeOf((*VmReloadFromPathFailedEvent)(nil)).Elem()
    +}
    +
    +type VmRelocateFailedEvent struct {
    +	VmRelocateSpecEvent
    +
    +	DestHost       HostEventArgument        `xml:"destHost"`
    +	Reason         LocalizedMethodFault     `xml:"reason"`
    +	DestDatacenter *DatacenterEventArgument `xml:"destDatacenter,omitempty"`
    +	DestDatastore  *DatastoreEventArgument  `xml:"destDatastore,omitempty"`
    +}
    +
    +func init() {
    +	t["VmRelocateFailedEvent"] = reflect.TypeOf((*VmRelocateFailedEvent)(nil)).Elem()
    +}
    +
    +type VmRelocateSpecEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmRelocateSpecEvent"] = reflect.TypeOf((*VmRelocateSpecEvent)(nil)).Elem()
    +}
    +
    +type VmRelocatedEvent struct {
    +	VmRelocateSpecEvent
    +
    +	SourceHost       HostEventArgument        `xml:"sourceHost"`
    +	SourceDatacenter *DatacenterEventArgument `xml:"sourceDatacenter,omitempty"`
    +	SourceDatastore  *DatastoreEventArgument  `xml:"sourceDatastore,omitempty"`
    +}
    +
    +func init() {
    +	t["VmRelocatedEvent"] = reflect.TypeOf((*VmRelocatedEvent)(nil)).Elem()
    +}
    +
    +type VmRemoteConsoleConnectedEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmRemoteConsoleConnectedEvent"] = reflect.TypeOf((*VmRemoteConsoleConnectedEvent)(nil)).Elem()
    +}
    +
    +type VmRemoteConsoleDisconnectedEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmRemoteConsoleDisconnectedEvent"] = reflect.TypeOf((*VmRemoteConsoleDisconnectedEvent)(nil)).Elem()
    +}
    +
    +type VmRemovedEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmRemovedEvent"] = reflect.TypeOf((*VmRemovedEvent)(nil)).Elem()
    +}
    +
    +type VmRenamedEvent struct {
    +	VmEvent
    +
    +	OldName string `xml:"oldName"`
    +	NewName string `xml:"newName"`
    +}
    +
    +func init() {
    +	t["VmRenamedEvent"] = reflect.TypeOf((*VmRenamedEvent)(nil)).Elem()
    +}
    +
    +type VmRequirementsExceedCurrentEVCModeEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmRequirementsExceedCurrentEVCModeEvent"] = reflect.TypeOf((*VmRequirementsExceedCurrentEVCModeEvent)(nil)).Elem()
    +}
    +
    +type VmResettingEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmResettingEvent"] = reflect.TypeOf((*VmResettingEvent)(nil)).Elem()
    +}
    +
    +type VmResourcePoolMovedEvent struct {
    +	VmEvent
    +
    +	OldParent ResourcePoolEventArgument `xml:"oldParent"`
    +	NewParent ResourcePoolEventArgument `xml:"newParent"`
    +}
    +
    +func init() {
    +	t["VmResourcePoolMovedEvent"] = reflect.TypeOf((*VmResourcePoolMovedEvent)(nil)).Elem()
    +}
    +
    +type VmResourceReallocatedEvent struct {
    +	VmEvent
    +
    +	ConfigChanges *ChangesInfoEventArgument `xml:"configChanges,omitempty"`
    +}
    +
    +func init() {
    +	t["VmResourceReallocatedEvent"] = reflect.TypeOf((*VmResourceReallocatedEvent)(nil)).Elem()
    +}
    +
    +type VmRestartedOnAlternateHostEvent struct {
    +	VmPoweredOnEvent
    +
    +	SourceHost HostEventArgument `xml:"sourceHost"`
    +}
    +
    +func init() {
    +	t["VmRestartedOnAlternateHostEvent"] = reflect.TypeOf((*VmRestartedOnAlternateHostEvent)(nil)).Elem()
    +}
    +
    +type VmResumingEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmResumingEvent"] = reflect.TypeOf((*VmResumingEvent)(nil)).Elem()
    +}
    +
    +type VmSecondaryAddedEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmSecondaryAddedEvent"] = reflect.TypeOf((*VmSecondaryAddedEvent)(nil)).Elem()
    +}
    +
    +type VmSecondaryDisabledBySystemEvent struct {
    +	VmEvent
    +
    +	Reason *LocalizedMethodFault `xml:"reason,omitempty"`
    +}
    +
    +func init() {
    +	t["VmSecondaryDisabledBySystemEvent"] = reflect.TypeOf((*VmSecondaryDisabledBySystemEvent)(nil)).Elem()
    +}
    +
    +type VmSecondaryDisabledEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmSecondaryDisabledEvent"] = reflect.TypeOf((*VmSecondaryDisabledEvent)(nil)).Elem()
    +}
    +
    +type VmSecondaryEnabledEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmSecondaryEnabledEvent"] = reflect.TypeOf((*VmSecondaryEnabledEvent)(nil)).Elem()
    +}
    +
    +type VmSecondaryStartedEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmSecondaryStartedEvent"] = reflect.TypeOf((*VmSecondaryStartedEvent)(nil)).Elem()
    +}
    +
    +type VmShutdownOnIsolationEvent struct {
    +	VmPoweredOffEvent
    +
    +	IsolatedHost   HostEventArgument `xml:"isolatedHost"`
    +	ShutdownResult string            `xml:"shutdownResult,omitempty"`
    +}
    +
    +func init() {
    +	t["VmShutdownOnIsolationEvent"] = reflect.TypeOf((*VmShutdownOnIsolationEvent)(nil)).Elem()
    +}
    +
    +type VmSmpFaultToleranceTooManyVMsOnHost struct {
    +	InsufficientResourcesFault
    +
    +	HostName       string `xml:"hostName,omitempty"`
    +	MaxNumSmpFtVms int32  `xml:"maxNumSmpFtVms"`
    +}
    +
    +func init() {
    +	t["VmSmpFaultToleranceTooManyVMsOnHost"] = reflect.TypeOf((*VmSmpFaultToleranceTooManyVMsOnHost)(nil)).Elem()
    +}
    +
    +type VmSmpFaultToleranceTooManyVMsOnHostFault VmSmpFaultToleranceTooManyVMsOnHost
    +
    +func init() {
    +	t["VmSmpFaultToleranceTooManyVMsOnHostFault"] = reflect.TypeOf((*VmSmpFaultToleranceTooManyVMsOnHostFault)(nil)).Elem()
    +}
    +
    +type VmSnapshotFileInfo struct {
    +	FileInfo
    +}
    +
    +func init() {
    +	t["VmSnapshotFileInfo"] = reflect.TypeOf((*VmSnapshotFileInfo)(nil)).Elem()
    +}
    +
    +type VmSnapshotFileQuery struct {
    +	FileQuery
    +}
    +
    +func init() {
    +	t["VmSnapshotFileQuery"] = reflect.TypeOf((*VmSnapshotFileQuery)(nil)).Elem()
    +}
    +
    +type VmStartRecordingEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmStartRecordingEvent"] = reflect.TypeOf((*VmStartRecordingEvent)(nil)).Elem()
    +}
    +
    +type VmStartReplayingEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmStartReplayingEvent"] = reflect.TypeOf((*VmStartReplayingEvent)(nil)).Elem()
    +}
    +
    +type VmStartingEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmStartingEvent"] = reflect.TypeOf((*VmStartingEvent)(nil)).Elem()
    +}
    +
    +type VmStartingSecondaryEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmStartingSecondaryEvent"] = reflect.TypeOf((*VmStartingSecondaryEvent)(nil)).Elem()
    +}
    +
    +type VmStaticMacConflictEvent struct {
    +	VmEvent
    +
    +	ConflictedVm VmEventArgument `xml:"conflictedVm"`
    +	Mac          string          `xml:"mac"`
    +}
    +
    +func init() {
    +	t["VmStaticMacConflictEvent"] = reflect.TypeOf((*VmStaticMacConflictEvent)(nil)).Elem()
    +}
    +
    +type VmStoppingEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmStoppingEvent"] = reflect.TypeOf((*VmStoppingEvent)(nil)).Elem()
    +}
    +
    +type VmSuspendedEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmSuspendedEvent"] = reflect.TypeOf((*VmSuspendedEvent)(nil)).Elem()
    +}
    +
    +type VmSuspendingEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmSuspendingEvent"] = reflect.TypeOf((*VmSuspendingEvent)(nil)).Elem()
    +}
    +
    +type VmTimedoutStartingSecondaryEvent struct {
    +	VmEvent
    +
    +	Timeout int64 `xml:"timeout,omitempty"`
    +}
    +
    +func init() {
    +	t["VmTimedoutStartingSecondaryEvent"] = reflect.TypeOf((*VmTimedoutStartingSecondaryEvent)(nil)).Elem()
    +}
    +
    +type VmToolsUpgradeFault struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["VmToolsUpgradeFault"] = reflect.TypeOf((*VmToolsUpgradeFault)(nil)).Elem()
    +}
    +
    +type VmToolsUpgradeFaultFault BaseVmToolsUpgradeFault
    +
    +func init() {
    +	t["VmToolsUpgradeFaultFault"] = reflect.TypeOf((*VmToolsUpgradeFaultFault)(nil)).Elem()
    +}
    +
    +type VmUnsupportedStartingEvent struct {
    +	VmStartingEvent
    +
    +	GuestId string `xml:"guestId"`
    +}
    +
    +func init() {
    +	t["VmUnsupportedStartingEvent"] = reflect.TypeOf((*VmUnsupportedStartingEvent)(nil)).Elem()
    +}
    +
    +type VmUpgradeCompleteEvent struct {
    +	VmEvent
    +
    +	Version string `xml:"version"`
    +}
    +
    +func init() {
    +	t["VmUpgradeCompleteEvent"] = reflect.TypeOf((*VmUpgradeCompleteEvent)(nil)).Elem()
    +}
    +
    +type VmUpgradeFailedEvent struct {
    +	VmEvent
    +}
    +
    +func init() {
    +	t["VmUpgradeFailedEvent"] = reflect.TypeOf((*VmUpgradeFailedEvent)(nil)).Elem()
    +}
    +
    +type VmUpgradingEvent struct {
    +	VmEvent
    +
    +	Version string `xml:"version"`
    +}
    +
    +func init() {
    +	t["VmUpgradingEvent"] = reflect.TypeOf((*VmUpgradingEvent)(nil)).Elem()
    +}
    +
    +type VmUuidAssignedEvent struct {
    +	VmEvent
    +
    +	Uuid string `xml:"uuid"`
    +}
    +
    +func init() {
    +	t["VmUuidAssignedEvent"] = reflect.TypeOf((*VmUuidAssignedEvent)(nil)).Elem()
    +}
    +
    +type VmUuidChangedEvent struct {
    +	VmEvent
    +
    +	OldUuid string `xml:"oldUuid"`
    +	NewUuid string `xml:"newUuid"`
    +}
    +
    +func init() {
    +	t["VmUuidChangedEvent"] = reflect.TypeOf((*VmUuidChangedEvent)(nil)).Elem()
    +}
    +
    +type VmUuidConflictEvent struct {
    +	VmEvent
    +
    +	ConflictedVm VmEventArgument `xml:"conflictedVm"`
    +	Uuid         string          `xml:"uuid"`
    +}
    +
    +func init() {
    +	t["VmUuidConflictEvent"] = reflect.TypeOf((*VmUuidConflictEvent)(nil)).Elem()
    +}
    +
    +type VmValidateMaxDevice struct {
    +	VimFault
    +
    +	Device string `xml:"device"`
    +	Max    int32  `xml:"max"`
    +	Count  int32  `xml:"count"`
    +}
    +
    +func init() {
    +	t["VmValidateMaxDevice"] = reflect.TypeOf((*VmValidateMaxDevice)(nil)).Elem()
    +}
    +
    +type VmValidateMaxDeviceFault VmValidateMaxDevice
    +
    +func init() {
    +	t["VmValidateMaxDeviceFault"] = reflect.TypeOf((*VmValidateMaxDeviceFault)(nil)).Elem()
    +}
    +
    +type VmVnicPoolReservationViolationClearEvent struct {
    +	DvsEvent
    +
    +	VmVnicResourcePoolKey  string `xml:"vmVnicResourcePoolKey"`
    +	VmVnicResourcePoolName string `xml:"vmVnicResourcePoolName,omitempty"`
    +}
    +
    +func init() {
    +	t["VmVnicPoolReservationViolationClearEvent"] = reflect.TypeOf((*VmVnicPoolReservationViolationClearEvent)(nil)).Elem()
    +}
    +
    +type VmVnicPoolReservationViolationRaiseEvent struct {
    +	DvsEvent
    +
    +	VmVnicResourcePoolKey  string `xml:"vmVnicResourcePoolKey"`
    +	VmVnicResourcePoolName string `xml:"vmVnicResourcePoolName,omitempty"`
    +}
    +
    +func init() {
    +	t["VmVnicPoolReservationViolationRaiseEvent"] = reflect.TypeOf((*VmVnicPoolReservationViolationRaiseEvent)(nil)).Elem()
    +}
    +
    +type VmWwnAssignedEvent struct {
    +	VmEvent
    +
    +	NodeWwns []int64 `xml:"nodeWwns"`
    +	PortWwns []int64 `xml:"portWwns"`
    +}
    +
    +func init() {
    +	t["VmWwnAssignedEvent"] = reflect.TypeOf((*VmWwnAssignedEvent)(nil)).Elem()
    +}
    +
    +type VmWwnChangedEvent struct {
    +	VmEvent
    +
    +	OldNodeWwns []int64 `xml:"oldNodeWwns,omitempty"`
    +	OldPortWwns []int64 `xml:"oldPortWwns,omitempty"`
    +	NewNodeWwns []int64 `xml:"newNodeWwns,omitempty"`
    +	NewPortWwns []int64 `xml:"newPortWwns,omitempty"`
    +}
    +
    +func init() {
    +	t["VmWwnChangedEvent"] = reflect.TypeOf((*VmWwnChangedEvent)(nil)).Elem()
    +}
    +
    +type VmWwnConflict struct {
    +	InvalidVmConfig
    +
    +	Vm   *ManagedObjectReference `xml:"vm,omitempty"`
    +	Host *ManagedObjectReference `xml:"host,omitempty"`
    +	Name string                  `xml:"name,omitempty"`
    +	Wwn  int64                   `xml:"wwn,omitempty"`
    +}
    +
    +func init() {
    +	t["VmWwnConflict"] = reflect.TypeOf((*VmWwnConflict)(nil)).Elem()
    +}
    +
    +type VmWwnConflictEvent struct {
    +	VmEvent
    +
    +	ConflictedVms   []VmEventArgument   `xml:"conflictedVms,omitempty"`
    +	ConflictedHosts []HostEventArgument `xml:"conflictedHosts,omitempty"`
    +	Wwn             int64               `xml:"wwn"`
    +}
    +
    +func init() {
    +	t["VmWwnConflictEvent"] = reflect.TypeOf((*VmWwnConflictEvent)(nil)).Elem()
    +}
    +
    +type VmWwnConflictFault VmWwnConflict
    +
    +func init() {
    +	t["VmWwnConflictFault"] = reflect.TypeOf((*VmWwnConflictFault)(nil)).Elem()
    +}
    +
    +type VmfsAlreadyMounted struct {
    +	VmfsMountFault
    +}
    +
    +func init() {
    +	t["VmfsAlreadyMounted"] = reflect.TypeOf((*VmfsAlreadyMounted)(nil)).Elem()
    +}
    +
    +type VmfsAlreadyMountedFault VmfsAlreadyMounted
    +
    +func init() {
    +	t["VmfsAlreadyMountedFault"] = reflect.TypeOf((*VmfsAlreadyMountedFault)(nil)).Elem()
    +}
    +
    +type VmfsAmbiguousMount struct {
    +	VmfsMountFault
    +}
    +
    +func init() {
    +	t["VmfsAmbiguousMount"] = reflect.TypeOf((*VmfsAmbiguousMount)(nil)).Elem()
    +}
    +
    +type VmfsAmbiguousMountFault VmfsAmbiguousMount
    +
    +func init() {
    +	t["VmfsAmbiguousMountFault"] = reflect.TypeOf((*VmfsAmbiguousMountFault)(nil)).Elem()
    +}
    +
    +type VmfsConfigOption struct {
    +	DynamicData
    +
    +	BlockSizeOption          int32       `xml:"blockSizeOption"`
    +	UnmapGranularityOption   []int32     `xml:"unmapGranularityOption,omitempty"`
    +	UnmapBandwidthFixedValue *LongOption `xml:"unmapBandwidthFixedValue,omitempty"`
    +	UnmapBandwidthDynamicMin *LongOption `xml:"unmapBandwidthDynamicMin,omitempty"`
    +	UnmapBandwidthDynamicMax *LongOption `xml:"unmapBandwidthDynamicMax,omitempty"`
    +	UnmapBandwidthIncrement  int64       `xml:"unmapBandwidthIncrement,omitempty"`
    +}
    +
    +func init() {
    +	t["VmfsConfigOption"] = reflect.TypeOf((*VmfsConfigOption)(nil)).Elem()
    +}
    +
    +type VmfsDatastoreAllExtentOption struct {
    +	VmfsDatastoreSingleExtentOption
    +}
    +
    +func init() {
    +	t["VmfsDatastoreAllExtentOption"] = reflect.TypeOf((*VmfsDatastoreAllExtentOption)(nil)).Elem()
    +}
    +
    +type VmfsDatastoreBaseOption struct {
    +	DynamicData
    +
    +	Layout                HostDiskPartitionLayout `xml:"layout"`
    +	PartitionFormatChange *bool                   `xml:"partitionFormatChange"`
    +}
    +
    +func init() {
    +	t["VmfsDatastoreBaseOption"] = reflect.TypeOf((*VmfsDatastoreBaseOption)(nil)).Elem()
    +}
    +
    +type VmfsDatastoreCreateSpec struct {
    +	VmfsDatastoreSpec
    +
    +	Partition HostDiskPartitionSpec   `xml:"partition"`
    +	Vmfs      HostVmfsSpec            `xml:"vmfs"`
    +	Extent    []HostScsiDiskPartition `xml:"extent,omitempty"`
    +}
    +
    +func init() {
    +	t["VmfsDatastoreCreateSpec"] = reflect.TypeOf((*VmfsDatastoreCreateSpec)(nil)).Elem()
    +}
    +
    +type VmfsDatastoreExpandSpec struct {
    +	VmfsDatastoreSpec
    +
    +	Partition HostDiskPartitionSpec `xml:"partition"`
    +	Extent    HostScsiDiskPartition `xml:"extent"`
    +}
    +
    +func init() {
    +	t["VmfsDatastoreExpandSpec"] = reflect.TypeOf((*VmfsDatastoreExpandSpec)(nil)).Elem()
    +}
    +
    +type VmfsDatastoreExtendSpec struct {
    +	VmfsDatastoreSpec
    +
    +	Partition HostDiskPartitionSpec   `xml:"partition"`
    +	Extent    []HostScsiDiskPartition `xml:"extent"`
    +}
    +
    +func init() {
    +	t["VmfsDatastoreExtendSpec"] = reflect.TypeOf((*VmfsDatastoreExtendSpec)(nil)).Elem()
    +}
    +
    +type VmfsDatastoreInfo struct {
    +	DatastoreInfo
    +
    +	MaxPhysicalRDMFileSize int64           `xml:"maxPhysicalRDMFileSize,omitempty"`
    +	MaxVirtualRDMFileSize  int64           `xml:"maxVirtualRDMFileSize,omitempty"`
    +	Vmfs                   *HostVmfsVolume `xml:"vmfs,omitempty"`
    +}
    +
    +func init() {
    +	t["VmfsDatastoreInfo"] = reflect.TypeOf((*VmfsDatastoreInfo)(nil)).Elem()
    +}
    +
    +type VmfsDatastoreMultipleExtentOption struct {
    +	VmfsDatastoreBaseOption
    +
    +	VmfsExtent []HostDiskPartitionBlockRange `xml:"vmfsExtent"`
    +}
    +
    +func init() {
    +	t["VmfsDatastoreMultipleExtentOption"] = reflect.TypeOf((*VmfsDatastoreMultipleExtentOption)(nil)).Elem()
    +}
    +
    +type VmfsDatastoreOption struct {
    +	DynamicData
    +
    +	Info BaseVmfsDatastoreBaseOption `xml:"info,typeattr"`
    +	Spec BaseVmfsDatastoreSpec       `xml:"spec,typeattr"`
    +}
    +
    +func init() {
    +	t["VmfsDatastoreOption"] = reflect.TypeOf((*VmfsDatastoreOption)(nil)).Elem()
    +}
    +
    +type VmfsDatastoreSingleExtentOption struct {
    +	VmfsDatastoreBaseOption
    +
    +	VmfsExtent HostDiskPartitionBlockRange `xml:"vmfsExtent"`
    +}
    +
    +func init() {
    +	t["VmfsDatastoreSingleExtentOption"] = reflect.TypeOf((*VmfsDatastoreSingleExtentOption)(nil)).Elem()
    +}
    +
    +type VmfsDatastoreSpec struct {
    +	DynamicData
    +
    +	DiskUuid string `xml:"diskUuid"`
    +}
    +
    +func init() {
    +	t["VmfsDatastoreSpec"] = reflect.TypeOf((*VmfsDatastoreSpec)(nil)).Elem()
    +}
    +
    +type VmfsMountFault struct {
    +	HostConfigFault
    +
    +	Uuid string `xml:"uuid"`
    +}
    +
    +func init() {
    +	t["VmfsMountFault"] = reflect.TypeOf((*VmfsMountFault)(nil)).Elem()
    +}
    +
    +type VmfsMountFaultFault BaseVmfsMountFault
    +
    +func init() {
    +	t["VmfsMountFaultFault"] = reflect.TypeOf((*VmfsMountFaultFault)(nil)).Elem()
    +}
    +
    +type VmfsUnmapBandwidthSpec struct {
    +	DynamicData
    +
    +	Policy     string `xml:"policy"`
    +	FixedValue int64  `xml:"fixedValue"`
    +	DynamicMin int64  `xml:"dynamicMin"`
    +	DynamicMax int64  `xml:"dynamicMax"`
    +}
    +
    +func init() {
    +	t["VmfsUnmapBandwidthSpec"] = reflect.TypeOf((*VmfsUnmapBandwidthSpec)(nil)).Elem()
    +}
    +
    +type VmotionInterfaceNotEnabled struct {
    +	HostPowerOpFailed
    +}
    +
    +func init() {
    +	t["VmotionInterfaceNotEnabled"] = reflect.TypeOf((*VmotionInterfaceNotEnabled)(nil)).Elem()
    +}
    +
    +type VmotionInterfaceNotEnabledFault VmotionInterfaceNotEnabled
    +
    +func init() {
    +	t["VmotionInterfaceNotEnabledFault"] = reflect.TypeOf((*VmotionInterfaceNotEnabledFault)(nil)).Elem()
    +}
    +
    +type VmwareDistributedVirtualSwitchPvlanSpec struct {
    +	VmwareDistributedVirtualSwitchVlanSpec
    +
    +	PvlanId int32 `xml:"pvlanId"`
    +}
    +
    +func init() {
    +	t["VmwareDistributedVirtualSwitchPvlanSpec"] = reflect.TypeOf((*VmwareDistributedVirtualSwitchPvlanSpec)(nil)).Elem()
    +}
    +
    +type VmwareDistributedVirtualSwitchTrunkVlanSpec struct {
    +	VmwareDistributedVirtualSwitchVlanSpec
    +
    +	VlanId []NumericRange `xml:"vlanId,omitempty"`
    +}
    +
    +func init() {
    +	t["VmwareDistributedVirtualSwitchTrunkVlanSpec"] = reflect.TypeOf((*VmwareDistributedVirtualSwitchTrunkVlanSpec)(nil)).Elem()
    +}
    +
    +type VmwareDistributedVirtualSwitchVlanIdSpec struct {
    +	VmwareDistributedVirtualSwitchVlanSpec
    +
    +	VlanId int32 `xml:"vlanId"`
    +}
    +
    +func init() {
    +	t["VmwareDistributedVirtualSwitchVlanIdSpec"] = reflect.TypeOf((*VmwareDistributedVirtualSwitchVlanIdSpec)(nil)).Elem()
    +}
    +
    +type VmwareDistributedVirtualSwitchVlanSpec struct {
    +	InheritablePolicy
    +}
    +
    +func init() {
    +	t["VmwareDistributedVirtualSwitchVlanSpec"] = reflect.TypeOf((*VmwareDistributedVirtualSwitchVlanSpec)(nil)).Elem()
    +}
    +
    +type VmwareUplinkPortTeamingPolicy struct {
    +	InheritablePolicy
    +
    +	Policy          *StringPolicy                `xml:"policy,omitempty"`
    +	ReversePolicy   *BoolPolicy                  `xml:"reversePolicy,omitempty"`
    +	NotifySwitches  *BoolPolicy                  `xml:"notifySwitches,omitempty"`
    +	RollingOrder    *BoolPolicy                  `xml:"rollingOrder,omitempty"`
    +	FailureCriteria *DVSFailureCriteria          `xml:"failureCriteria,omitempty"`
    +	UplinkPortOrder *VMwareUplinkPortOrderPolicy `xml:"uplinkPortOrder,omitempty"`
    +}
    +
    +func init() {
    +	t["VmwareUplinkPortTeamingPolicy"] = reflect.TypeOf((*VmwareUplinkPortTeamingPolicy)(nil)).Elem()
    +}
    +
    +type VnicPortArgument struct {
    +	DynamicData
    +
    +	Vnic string                                 `xml:"vnic"`
    +	Port DistributedVirtualSwitchPortConnection `xml:"port"`
    +}
    +
    +func init() {
    +	t["VnicPortArgument"] = reflect.TypeOf((*VnicPortArgument)(nil)).Elem()
    +}
    +
    +type VolumeEditorError struct {
    +	CustomizationFault
    +}
    +
    +func init() {
    +	t["VolumeEditorError"] = reflect.TypeOf((*VolumeEditorError)(nil)).Elem()
    +}
    +
    +type VolumeEditorErrorFault VolumeEditorError
    +
    +func init() {
    +	t["VolumeEditorErrorFault"] = reflect.TypeOf((*VolumeEditorErrorFault)(nil)).Elem()
    +}
    +
    +type VramLimitLicense struct {
    +	NotEnoughLicenses
    +
    +	Limit int32 `xml:"limit"`
    +}
    +
    +func init() {
    +	t["VramLimitLicense"] = reflect.TypeOf((*VramLimitLicense)(nil)).Elem()
    +}
    +
    +type VramLimitLicenseFault VramLimitLicense
    +
    +func init() {
    +	t["VramLimitLicenseFault"] = reflect.TypeOf((*VramLimitLicenseFault)(nil)).Elem()
    +}
    +
    +type VsanClusterConfigInfo struct {
    +	DynamicData
    +
    +	Enabled       *bool                                 `xml:"enabled"`
    +	DefaultConfig *VsanClusterConfigInfoHostDefaultInfo `xml:"defaultConfig,omitempty"`
    +}
    +
    +func init() {
    +	t["VsanClusterConfigInfo"] = reflect.TypeOf((*VsanClusterConfigInfo)(nil)).Elem()
    +}
    +
    +type VsanClusterConfigInfoHostDefaultInfo struct {
    +	DynamicData
    +
    +	Uuid             string `xml:"uuid,omitempty"`
    +	AutoClaimStorage *bool  `xml:"autoClaimStorage"`
    +	ChecksumEnabled  *bool  `xml:"checksumEnabled"`
    +}
    +
    +func init() {
    +	t["VsanClusterConfigInfoHostDefaultInfo"] = reflect.TypeOf((*VsanClusterConfigInfoHostDefaultInfo)(nil)).Elem()
    +}
    +
    +type VsanClusterUuidMismatch struct {
    +	CannotMoveVsanEnabledHost
    +
    +	HostClusterUuid        string `xml:"hostClusterUuid"`
    +	DestinationClusterUuid string `xml:"destinationClusterUuid"`
    +}
    +
    +func init() {
    +	t["VsanClusterUuidMismatch"] = reflect.TypeOf((*VsanClusterUuidMismatch)(nil)).Elem()
    +}
    +
    +type VsanClusterUuidMismatchFault VsanClusterUuidMismatch
    +
    +func init() {
    +	t["VsanClusterUuidMismatchFault"] = reflect.TypeOf((*VsanClusterUuidMismatchFault)(nil)).Elem()
    +}
    +
    +type VsanDiskFault struct {
    +	VsanFault
    +
    +	Device string `xml:"device,omitempty"`
    +}
    +
    +func init() {
    +	t["VsanDiskFault"] = reflect.TypeOf((*VsanDiskFault)(nil)).Elem()
    +}
    +
    +type VsanDiskFaultFault BaseVsanDiskFault
    +
    +func init() {
    +	t["VsanDiskFaultFault"] = reflect.TypeOf((*VsanDiskFaultFault)(nil)).Elem()
    +}
    +
    +type VsanFault struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["VsanFault"] = reflect.TypeOf((*VsanFault)(nil)).Elem()
    +}
    +
    +type VsanFaultFault BaseVsanFault
    +
    +func init() {
    +	t["VsanFaultFault"] = reflect.TypeOf((*VsanFaultFault)(nil)).Elem()
    +}
    +
    +type VsanHostClusterStatus struct {
    +	DynamicData
    +
    +	Uuid       string                     `xml:"uuid,omitempty"`
    +	NodeUuid   string                     `xml:"nodeUuid,omitempty"`
    +	Health     string                     `xml:"health"`
    +	NodeState  VsanHostClusterStatusState `xml:"nodeState"`
    +	MemberUuid []string                   `xml:"memberUuid,omitempty"`
    +}
    +
    +func init() {
    +	t["VsanHostClusterStatus"] = reflect.TypeOf((*VsanHostClusterStatus)(nil)).Elem()
    +}
    +
    +type VsanHostClusterStatusState struct {
    +	DynamicData
    +
    +	State      string                                        `xml:"state"`
    +	Completion *VsanHostClusterStatusStateCompletionEstimate `xml:"completion,omitempty"`
    +}
    +
    +func init() {
    +	t["VsanHostClusterStatusState"] = reflect.TypeOf((*VsanHostClusterStatusState)(nil)).Elem()
    +}
    +
    +type VsanHostClusterStatusStateCompletionEstimate struct {
    +	DynamicData
    +
    +	CompleteTime    *time.Time `xml:"completeTime"`
    +	PercentComplete int32      `xml:"percentComplete,omitempty"`
    +}
    +
    +func init() {
    +	t["VsanHostClusterStatusStateCompletionEstimate"] = reflect.TypeOf((*VsanHostClusterStatusStateCompletionEstimate)(nil)).Elem()
    +}
    +
    +type VsanHostConfigInfo struct {
    +	DynamicData
    +
    +	Enabled         *bool                          `xml:"enabled"`
    +	HostSystem      *ManagedObjectReference        `xml:"hostSystem,omitempty"`
    +	ClusterInfo     *VsanHostConfigInfoClusterInfo `xml:"clusterInfo,omitempty"`
    +	StorageInfo     *VsanHostConfigInfoStorageInfo `xml:"storageInfo,omitempty"`
    +	NetworkInfo     *VsanHostConfigInfoNetworkInfo `xml:"networkInfo,omitempty"`
    +	FaultDomainInfo *VsanHostFaultDomainInfo       `xml:"faultDomainInfo,omitempty"`
    +}
    +
    +func init() {
    +	t["VsanHostConfigInfo"] = reflect.TypeOf((*VsanHostConfigInfo)(nil)).Elem()
    +}
    +
    +type VsanHostConfigInfoClusterInfo struct {
    +	DynamicData
    +
    +	Uuid     string `xml:"uuid,omitempty"`
    +	NodeUuid string `xml:"nodeUuid,omitempty"`
    +}
    +
    +func init() {
    +	t["VsanHostConfigInfoClusterInfo"] = reflect.TypeOf((*VsanHostConfigInfoClusterInfo)(nil)).Elem()
    +}
    +
    +type VsanHostConfigInfoNetworkInfo struct {
    +	DynamicData
    +
    +	Port []VsanHostConfigInfoNetworkInfoPortConfig `xml:"port,omitempty"`
    +}
    +
    +func init() {
    +	t["VsanHostConfigInfoNetworkInfo"] = reflect.TypeOf((*VsanHostConfigInfoNetworkInfo)(nil)).Elem()
    +}
    +
    +type VsanHostConfigInfoNetworkInfoPortConfig struct {
    +	DynamicData
    +
    +	IpConfig *VsanHostIpConfig `xml:"ipConfig,omitempty"`
    +	Device   string            `xml:"device"`
    +}
    +
    +func init() {
    +	t["VsanHostConfigInfoNetworkInfoPortConfig"] = reflect.TypeOf((*VsanHostConfigInfoNetworkInfoPortConfig)(nil)).Elem()
    +}
    +
    +type VsanHostConfigInfoStorageInfo struct {
    +	DynamicData
    +
    +	AutoClaimStorage *bool                 `xml:"autoClaimStorage"`
    +	DiskMapping      []VsanHostDiskMapping `xml:"diskMapping,omitempty"`
    +	DiskMapInfo      []VsanHostDiskMapInfo `xml:"diskMapInfo,omitempty"`
    +	ChecksumEnabled  *bool                 `xml:"checksumEnabled"`
    +}
    +
    +func init() {
    +	t["VsanHostConfigInfoStorageInfo"] = reflect.TypeOf((*VsanHostConfigInfoStorageInfo)(nil)).Elem()
    +}
    +
    +type VsanHostDecommissionMode struct {
    +	DynamicData
    +
    +	ObjectAction string `xml:"objectAction"`
    +}
    +
    +func init() {
    +	t["VsanHostDecommissionMode"] = reflect.TypeOf((*VsanHostDecommissionMode)(nil)).Elem()
    +}
    +
    +type VsanHostDiskMapInfo struct {
    +	DynamicData
    +
    +	Mapping VsanHostDiskMapping `xml:"mapping"`
    +	Mounted bool                `xml:"mounted"`
    +}
    +
    +func init() {
    +	t["VsanHostDiskMapInfo"] = reflect.TypeOf((*VsanHostDiskMapInfo)(nil)).Elem()
    +}
    +
    +type VsanHostDiskMapResult struct {
    +	DynamicData
    +
    +	Mapping    VsanHostDiskMapping   `xml:"mapping"`
    +	DiskResult []VsanHostDiskResult  `xml:"diskResult,omitempty"`
    +	Error      *LocalizedMethodFault `xml:"error,omitempty"`
    +}
    +
    +func init() {
    +	t["VsanHostDiskMapResult"] = reflect.TypeOf((*VsanHostDiskMapResult)(nil)).Elem()
    +}
    +
    +type VsanHostDiskMapping struct {
    +	DynamicData
    +
    +	Ssd    HostScsiDisk   `xml:"ssd"`
    +	NonSsd []HostScsiDisk `xml:"nonSsd"`
    +}
    +
    +func init() {
    +	t["VsanHostDiskMapping"] = reflect.TypeOf((*VsanHostDiskMapping)(nil)).Elem()
    +}
    +
    +type VsanHostDiskResult struct {
    +	DynamicData
    +
    +	Disk     HostScsiDisk          `xml:"disk"`
    +	State    string                `xml:"state"`
    +	VsanUuid string                `xml:"vsanUuid,omitempty"`
    +	Error    *LocalizedMethodFault `xml:"error,omitempty"`
    +	Degraded *bool                 `xml:"degraded"`
    +}
    +
    +func init() {
    +	t["VsanHostDiskResult"] = reflect.TypeOf((*VsanHostDiskResult)(nil)).Elem()
    +}
    +
    +type VsanHostFaultDomainInfo struct {
    +	DynamicData
    +
    +	Name string `xml:"name"`
    +}
    +
    +func init() {
    +	t["VsanHostFaultDomainInfo"] = reflect.TypeOf((*VsanHostFaultDomainInfo)(nil)).Elem()
    +}
    +
    +type VsanHostIpConfig struct {
    +	DynamicData
    +
    +	UpstreamIpAddress   string `xml:"upstreamIpAddress"`
    +	DownstreamIpAddress string `xml:"downstreamIpAddress"`
    +}
    +
    +func init() {
    +	t["VsanHostIpConfig"] = reflect.TypeOf((*VsanHostIpConfig)(nil)).Elem()
    +}
    +
    +type VsanHostMembershipInfo struct {
    +	DynamicData
    +
    +	NodeUuid string `xml:"nodeUuid"`
    +	Hostname string `xml:"hostname"`
    +}
    +
    +func init() {
    +	t["VsanHostMembershipInfo"] = reflect.TypeOf((*VsanHostMembershipInfo)(nil)).Elem()
    +}
    +
    +type VsanHostRuntimeInfo struct {
    +	DynamicData
    +
    +	MembershipList []VsanHostMembershipInfo       `xml:"membershipList,omitempty"`
    +	DiskIssues     []VsanHostRuntimeInfoDiskIssue `xml:"diskIssues,omitempty"`
    +	AccessGenNo    int32                          `xml:"accessGenNo,omitempty"`
    +}
    +
    +func init() {
    +	t["VsanHostRuntimeInfo"] = reflect.TypeOf((*VsanHostRuntimeInfo)(nil)).Elem()
    +}
    +
    +type VsanHostRuntimeInfoDiskIssue struct {
    +	DynamicData
    +
    +	DiskId string `xml:"diskId"`
    +	Issue  string `xml:"issue"`
    +}
    +
    +func init() {
    +	t["VsanHostRuntimeInfoDiskIssue"] = reflect.TypeOf((*VsanHostRuntimeInfoDiskIssue)(nil)).Elem()
    +}
    +
    +type VsanHostVsanDiskInfo struct {
    +	DynamicData
    +
    +	VsanUuid      string `xml:"vsanUuid"`
    +	FormatVersion int32  `xml:"formatVersion"`
    +}
    +
    +func init() {
    +	t["VsanHostVsanDiskInfo"] = reflect.TypeOf((*VsanHostVsanDiskInfo)(nil)).Elem()
    +}
    +
    +type VsanIncompatibleDiskMapping struct {
    +	VsanDiskFault
    +}
    +
    +func init() {
    +	t["VsanIncompatibleDiskMapping"] = reflect.TypeOf((*VsanIncompatibleDiskMapping)(nil)).Elem()
    +}
    +
    +type VsanIncompatibleDiskMappingFault VsanIncompatibleDiskMapping
    +
    +func init() {
    +	t["VsanIncompatibleDiskMappingFault"] = reflect.TypeOf((*VsanIncompatibleDiskMappingFault)(nil)).Elem()
    +}
    +
    +type VsanNewPolicyBatch struct {
    +	DynamicData
    +
    +	Size   []int64 `xml:"size,omitempty"`
    +	Policy string  `xml:"policy,omitempty"`
    +}
    +
    +func init() {
    +	t["VsanNewPolicyBatch"] = reflect.TypeOf((*VsanNewPolicyBatch)(nil)).Elem()
    +}
    +
    +type VsanPolicyChangeBatch struct {
    +	DynamicData
    +
    +	Uuid   []string `xml:"uuid,omitempty"`
    +	Policy string   `xml:"policy,omitempty"`
    +}
    +
    +func init() {
    +	t["VsanPolicyChangeBatch"] = reflect.TypeOf((*VsanPolicyChangeBatch)(nil)).Elem()
    +}
    +
    +type VsanPolicyCost struct {
    +	DynamicData
    +
    +	ChangeDataSize                      int64   `xml:"changeDataSize,omitempty"`
    +	CurrentDataSize                     int64   `xml:"currentDataSize,omitempty"`
    +	TempDataSize                        int64   `xml:"tempDataSize,omitempty"`
    +	CopyDataSize                        int64   `xml:"copyDataSize,omitempty"`
    +	ChangeFlashReadCacheSize            int64   `xml:"changeFlashReadCacheSize,omitempty"`
    +	CurrentFlashReadCacheSize           int64   `xml:"currentFlashReadCacheSize,omitempty"`
    +	CurrentDiskSpaceToAddressSpaceRatio float32 `xml:"currentDiskSpaceToAddressSpaceRatio,omitempty"`
    +	DiskSpaceToAddressSpaceRatio        float32 `xml:"diskSpaceToAddressSpaceRatio,omitempty"`
    +}
    +
    +func init() {
    +	t["VsanPolicyCost"] = reflect.TypeOf((*VsanPolicyCost)(nil)).Elem()
    +}
    +
    +type VsanPolicySatisfiability struct {
    +	DynamicData
    +
    +	Uuid          string              `xml:"uuid,omitempty"`
    +	IsSatisfiable bool                `xml:"isSatisfiable"`
    +	Reason        *LocalizableMessage `xml:"reason,omitempty"`
    +	Cost          *VsanPolicyCost     `xml:"cost,omitempty"`
    +}
    +
    +func init() {
    +	t["VsanPolicySatisfiability"] = reflect.TypeOf((*VsanPolicySatisfiability)(nil)).Elem()
    +}
    +
    +type VsanUpgradeSystemAPIBrokenIssue struct {
    +	VsanUpgradeSystemPreflightCheckIssue
    +
    +	Hosts []ManagedObjectReference `xml:"hosts"`
    +}
    +
    +func init() {
    +	t["VsanUpgradeSystemAPIBrokenIssue"] = reflect.TypeOf((*VsanUpgradeSystemAPIBrokenIssue)(nil)).Elem()
    +}
    +
    +type VsanUpgradeSystemAutoClaimEnabledOnHostsIssue struct {
    +	VsanUpgradeSystemPreflightCheckIssue
    +
    +	Hosts []ManagedObjectReference `xml:"hosts"`
    +}
    +
    +func init() {
    +	t["VsanUpgradeSystemAutoClaimEnabledOnHostsIssue"] = reflect.TypeOf((*VsanUpgradeSystemAutoClaimEnabledOnHostsIssue)(nil)).Elem()
    +}
    +
    +type VsanUpgradeSystemHostsDisconnectedIssue struct {
    +	VsanUpgradeSystemPreflightCheckIssue
    +
    +	Hosts []ManagedObjectReference `xml:"hosts"`
    +}
    +
    +func init() {
    +	t["VsanUpgradeSystemHostsDisconnectedIssue"] = reflect.TypeOf((*VsanUpgradeSystemHostsDisconnectedIssue)(nil)).Elem()
    +}
    +
    +type VsanUpgradeSystemMissingHostsInClusterIssue struct {
    +	VsanUpgradeSystemPreflightCheckIssue
    +
    +	Hosts []ManagedObjectReference `xml:"hosts"`
    +}
    +
    +func init() {
    +	t["VsanUpgradeSystemMissingHostsInClusterIssue"] = reflect.TypeOf((*VsanUpgradeSystemMissingHostsInClusterIssue)(nil)).Elem()
    +}
    +
    +type VsanUpgradeSystemNetworkPartitionInfo struct {
    +	DynamicData
    +
    +	Hosts []ManagedObjectReference `xml:"hosts"`
    +}
    +
    +func init() {
    +	t["VsanUpgradeSystemNetworkPartitionInfo"] = reflect.TypeOf((*VsanUpgradeSystemNetworkPartitionInfo)(nil)).Elem()
    +}
    +
    +type VsanUpgradeSystemNetworkPartitionIssue struct {
    +	VsanUpgradeSystemPreflightCheckIssue
    +
    +	Partitions []VsanUpgradeSystemNetworkPartitionInfo `xml:"partitions"`
    +}
    +
    +func init() {
    +	t["VsanUpgradeSystemNetworkPartitionIssue"] = reflect.TypeOf((*VsanUpgradeSystemNetworkPartitionIssue)(nil)).Elem()
    +}
    +
    +type VsanUpgradeSystemNotEnoughFreeCapacityIssue struct {
    +	VsanUpgradeSystemPreflightCheckIssue
    +
    +	ReducedRedundancyUpgradePossible bool `xml:"reducedRedundancyUpgradePossible"`
    +}
    +
    +func init() {
    +	t["VsanUpgradeSystemNotEnoughFreeCapacityIssue"] = reflect.TypeOf((*VsanUpgradeSystemNotEnoughFreeCapacityIssue)(nil)).Elem()
    +}
    +
    +type VsanUpgradeSystemPreflightCheckIssue struct {
    +	DynamicData
    +
    +	Msg string `xml:"msg"`
    +}
    +
    +func init() {
    +	t["VsanUpgradeSystemPreflightCheckIssue"] = reflect.TypeOf((*VsanUpgradeSystemPreflightCheckIssue)(nil)).Elem()
    +}
    +
    +type VsanUpgradeSystemPreflightCheckResult struct {
    +	DynamicData
    +
    +	Issues               []BaseVsanUpgradeSystemPreflightCheckIssue `xml:"issues,omitempty,typeattr"`
    +	DiskMappingToRestore *VsanHostDiskMapping                       `xml:"diskMappingToRestore,omitempty"`
    +}
    +
    +func init() {
    +	t["VsanUpgradeSystemPreflightCheckResult"] = reflect.TypeOf((*VsanUpgradeSystemPreflightCheckResult)(nil)).Elem()
    +}
    +
    +type VsanUpgradeSystemRogueHostsInClusterIssue struct {
    +	VsanUpgradeSystemPreflightCheckIssue
    +
    +	Uuids []string `xml:"uuids"`
    +}
    +
    +func init() {
    +	t["VsanUpgradeSystemRogueHostsInClusterIssue"] = reflect.TypeOf((*VsanUpgradeSystemRogueHostsInClusterIssue)(nil)).Elem()
    +}
    +
    +type VsanUpgradeSystemUpgradeHistoryDiskGroupOp struct {
    +	VsanUpgradeSystemUpgradeHistoryItem
    +
    +	Operation   string              `xml:"operation"`
    +	DiskMapping VsanHostDiskMapping `xml:"diskMapping"`
    +}
    +
    +func init() {
    +	t["VsanUpgradeSystemUpgradeHistoryDiskGroupOp"] = reflect.TypeOf((*VsanUpgradeSystemUpgradeHistoryDiskGroupOp)(nil)).Elem()
    +}
    +
    +type VsanUpgradeSystemUpgradeHistoryItem struct {
    +	DynamicData
    +
    +	Timestamp time.Time               `xml:"timestamp"`
    +	Host      *ManagedObjectReference `xml:"host,omitempty"`
    +	Message   string                  `xml:"message"`
    +	Task      *ManagedObjectReference `xml:"task,omitempty"`
    +}
    +
    +func init() {
    +	t["VsanUpgradeSystemUpgradeHistoryItem"] = reflect.TypeOf((*VsanUpgradeSystemUpgradeHistoryItem)(nil)).Elem()
    +}
    +
    +type VsanUpgradeSystemUpgradeHistoryPreflightFail struct {
    +	VsanUpgradeSystemUpgradeHistoryItem
    +
    +	PreflightResult VsanUpgradeSystemPreflightCheckResult `xml:"preflightResult"`
    +}
    +
    +func init() {
    +	t["VsanUpgradeSystemUpgradeHistoryPreflightFail"] = reflect.TypeOf((*VsanUpgradeSystemUpgradeHistoryPreflightFail)(nil)).Elem()
    +}
    +
    +type VsanUpgradeSystemUpgradeStatus struct {
    +	DynamicData
    +
    +	InProgress bool                                      `xml:"inProgress"`
    +	History    []BaseVsanUpgradeSystemUpgradeHistoryItem `xml:"history,omitempty,typeattr"`
    +	Aborted    *bool                                     `xml:"aborted"`
    +	Completed  *bool                                     `xml:"completed"`
    +	Progress   int32                                     `xml:"progress,omitempty"`
    +}
    +
    +func init() {
    +	t["VsanUpgradeSystemUpgradeStatus"] = reflect.TypeOf((*VsanUpgradeSystemUpgradeStatus)(nil)).Elem()
    +}
    +
    +type VsanUpgradeSystemV2ObjectsPresentDuringDowngradeIssue struct {
    +	VsanUpgradeSystemPreflightCheckIssue
    +
    +	Uuids []string `xml:"uuids"`
    +}
    +
    +func init() {
    +	t["VsanUpgradeSystemV2ObjectsPresentDuringDowngradeIssue"] = reflect.TypeOf((*VsanUpgradeSystemV2ObjectsPresentDuringDowngradeIssue)(nil)).Elem()
    +}
    +
    +type VsanUpgradeSystemWrongEsxVersionIssue struct {
    +	VsanUpgradeSystemPreflightCheckIssue
    +
    +	Hosts []ManagedObjectReference `xml:"hosts"`
    +}
    +
    +func init() {
    +	t["VsanUpgradeSystemWrongEsxVersionIssue"] = reflect.TypeOf((*VsanUpgradeSystemWrongEsxVersionIssue)(nil)).Elem()
    +}
    +
    +type VslmCloneSpec struct {
    +	VslmMigrateSpec
    +
    +	Name              string `xml:"name"`
    +	KeepAfterDeleteVm *bool  `xml:"keepAfterDeleteVm"`
    +}
    +
    +func init() {
    +	t["VslmCloneSpec"] = reflect.TypeOf((*VslmCloneSpec)(nil)).Elem()
    +}
    +
    +type VslmCreateSpec struct {
    +	DynamicData
    +
    +	Name              string                          `xml:"name"`
    +	KeepAfterDeleteVm *bool                           `xml:"keepAfterDeleteVm"`
    +	BackingSpec       BaseVslmCreateSpecBackingSpec   `xml:"backingSpec,typeattr"`
    +	CapacityInMB      int64                           `xml:"capacityInMB"`
    +	Profile           []BaseVirtualMachineProfileSpec `xml:"profile,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["VslmCreateSpec"] = reflect.TypeOf((*VslmCreateSpec)(nil)).Elem()
    +}
    +
    +type VslmCreateSpecBackingSpec struct {
    +	DynamicData
    +
    +	Datastore ManagedObjectReference `xml:"datastore"`
    +	Path      string                 `xml:"path,omitempty"`
    +}
    +
    +func init() {
    +	t["VslmCreateSpecBackingSpec"] = reflect.TypeOf((*VslmCreateSpecBackingSpec)(nil)).Elem()
    +}
    +
    +type VslmCreateSpecDiskFileBackingSpec struct {
    +	VslmCreateSpecBackingSpec
    +
    +	ProvisioningType string `xml:"provisioningType,omitempty"`
    +}
    +
    +func init() {
    +	t["VslmCreateSpecDiskFileBackingSpec"] = reflect.TypeOf((*VslmCreateSpecDiskFileBackingSpec)(nil)).Elem()
    +}
    +
    +type VslmCreateSpecRawDiskMappingBackingSpec struct {
    +	VslmCreateSpecBackingSpec
    +
    +	LunUuid           string `xml:"lunUuid"`
    +	CompatibilityMode string `xml:"compatibilityMode"`
    +}
    +
    +func init() {
    +	t["VslmCreateSpecRawDiskMappingBackingSpec"] = reflect.TypeOf((*VslmCreateSpecRawDiskMappingBackingSpec)(nil)).Elem()
    +}
    +
    +type VslmMigrateSpec struct {
    +	DynamicData
    +
    +	BackingSpec BaseVslmCreateSpecBackingSpec   `xml:"backingSpec,typeattr"`
    +	Profile     []BaseVirtualMachineProfileSpec `xml:"profile,omitempty,typeattr"`
    +	Consolidate *bool                           `xml:"consolidate"`
    +}
    +
    +func init() {
    +	t["VslmMigrateSpec"] = reflect.TypeOf((*VslmMigrateSpec)(nil)).Elem()
    +}
    +
    +type VslmRelocateSpec struct {
    +	VslmMigrateSpec
    +}
    +
    +func init() {
    +	t["VslmRelocateSpec"] = reflect.TypeOf((*VslmRelocateSpec)(nil)).Elem()
    +}
    +
    +type VslmTagEntry struct {
    +	DynamicData
    +
    +	TagName            string `xml:"tagName"`
    +	ParentCategoryName string `xml:"parentCategoryName"`
    +}
    +
    +func init() {
    +	t["VslmTagEntry"] = reflect.TypeOf((*VslmTagEntry)(nil)).Elem()
    +}
    +
    +type VspanDestPortConflict struct {
    +	DvsFault
    +
    +	VspanSessionKey1 string `xml:"vspanSessionKey1"`
    +	VspanSessionKey2 string `xml:"vspanSessionKey2"`
    +	PortKey          string `xml:"portKey"`
    +}
    +
    +func init() {
    +	t["VspanDestPortConflict"] = reflect.TypeOf((*VspanDestPortConflict)(nil)).Elem()
    +}
    +
    +type VspanDestPortConflictFault VspanDestPortConflict
    +
    +func init() {
    +	t["VspanDestPortConflictFault"] = reflect.TypeOf((*VspanDestPortConflictFault)(nil)).Elem()
    +}
    +
    +type VspanPortConflict struct {
    +	DvsFault
    +
    +	VspanSessionKey1 string `xml:"vspanSessionKey1"`
    +	VspanSessionKey2 string `xml:"vspanSessionKey2"`
    +	PortKey          string `xml:"portKey"`
    +}
    +
    +func init() {
    +	t["VspanPortConflict"] = reflect.TypeOf((*VspanPortConflict)(nil)).Elem()
    +}
    +
    +type VspanPortConflictFault VspanPortConflict
    +
    +func init() {
    +	t["VspanPortConflictFault"] = reflect.TypeOf((*VspanPortConflictFault)(nil)).Elem()
    +}
    +
    +type VspanPortMoveFault struct {
    +	DvsFault
    +
    +	SrcPortgroupName  string `xml:"srcPortgroupName"`
    +	DestPortgroupName string `xml:"destPortgroupName"`
    +	PortKey           string `xml:"portKey"`
    +}
    +
    +func init() {
    +	t["VspanPortMoveFault"] = reflect.TypeOf((*VspanPortMoveFault)(nil)).Elem()
    +}
    +
    +type VspanPortMoveFaultFault VspanPortMoveFault
    +
    +func init() {
    +	t["VspanPortMoveFaultFault"] = reflect.TypeOf((*VspanPortMoveFaultFault)(nil)).Elem()
    +}
    +
    +type VspanPortPromiscChangeFault struct {
    +	DvsFault
    +
    +	PortKey string `xml:"portKey"`
    +}
    +
    +func init() {
    +	t["VspanPortPromiscChangeFault"] = reflect.TypeOf((*VspanPortPromiscChangeFault)(nil)).Elem()
    +}
    +
    +type VspanPortPromiscChangeFaultFault VspanPortPromiscChangeFault
    +
    +func init() {
    +	t["VspanPortPromiscChangeFaultFault"] = reflect.TypeOf((*VspanPortPromiscChangeFaultFault)(nil)).Elem()
    +}
    +
    +type VspanPortgroupPromiscChangeFault struct {
    +	DvsFault
    +
    +	PortgroupName string `xml:"portgroupName"`
    +}
    +
    +func init() {
    +	t["VspanPortgroupPromiscChangeFault"] = reflect.TypeOf((*VspanPortgroupPromiscChangeFault)(nil)).Elem()
    +}
    +
    +type VspanPortgroupPromiscChangeFaultFault VspanPortgroupPromiscChangeFault
    +
    +func init() {
    +	t["VspanPortgroupPromiscChangeFaultFault"] = reflect.TypeOf((*VspanPortgroupPromiscChangeFaultFault)(nil)).Elem()
    +}
    +
    +type VspanPortgroupTypeChangeFault struct {
    +	DvsFault
    +
    +	PortgroupName string `xml:"portgroupName"`
    +}
    +
    +func init() {
    +	t["VspanPortgroupTypeChangeFault"] = reflect.TypeOf((*VspanPortgroupTypeChangeFault)(nil)).Elem()
    +}
    +
    +type VspanPortgroupTypeChangeFaultFault VspanPortgroupTypeChangeFault
    +
    +func init() {
    +	t["VspanPortgroupTypeChangeFaultFault"] = reflect.TypeOf((*VspanPortgroupTypeChangeFaultFault)(nil)).Elem()
    +}
    +
    +type VspanPromiscuousPortNotSupported struct {
    +	DvsFault
    +
    +	VspanSessionKey string `xml:"vspanSessionKey"`
    +	PortKey         string `xml:"portKey"`
    +}
    +
    +func init() {
    +	t["VspanPromiscuousPortNotSupported"] = reflect.TypeOf((*VspanPromiscuousPortNotSupported)(nil)).Elem()
    +}
    +
    +type VspanPromiscuousPortNotSupportedFault VspanPromiscuousPortNotSupported
    +
    +func init() {
    +	t["VspanPromiscuousPortNotSupportedFault"] = reflect.TypeOf((*VspanPromiscuousPortNotSupportedFault)(nil)).Elem()
    +}
    +
    +type VspanSameSessionPortConflict struct {
    +	DvsFault
    +
    +	VspanSessionKey string `xml:"vspanSessionKey"`
    +	PortKey         string `xml:"portKey"`
    +}
    +
    +func init() {
    +	t["VspanSameSessionPortConflict"] = reflect.TypeOf((*VspanSameSessionPortConflict)(nil)).Elem()
    +}
    +
    +type VspanSameSessionPortConflictFault VspanSameSessionPortConflict
    +
    +func init() {
    +	t["VspanSameSessionPortConflictFault"] = reflect.TypeOf((*VspanSameSessionPortConflictFault)(nil)).Elem()
    +}
    +
    +type VvolDatastoreInfo struct {
    +	DatastoreInfo
    +
    +	VvolDS *HostVvolVolume `xml:"vvolDS,omitempty"`
    +}
    +
    +func init() {
    +	t["VvolDatastoreInfo"] = reflect.TypeOf((*VvolDatastoreInfo)(nil)).Elem()
    +}
    +
    +type WaitForUpdates WaitForUpdatesRequestType
    +
    +func init() {
    +	t["WaitForUpdates"] = reflect.TypeOf((*WaitForUpdates)(nil)).Elem()
    +}
    +
    +type WaitForUpdatesEx WaitForUpdatesExRequestType
    +
    +func init() {
    +	t["WaitForUpdatesEx"] = reflect.TypeOf((*WaitForUpdatesEx)(nil)).Elem()
    +}
    +
    +type WaitForUpdatesExRequestType struct {
    +	This    ManagedObjectReference `xml:"_this"`
    +	Version string                 `xml:"version,omitempty"`
    +	Options *WaitOptions           `xml:"options,omitempty"`
    +}
    +
    +func init() {
    +	t["WaitForUpdatesExRequestType"] = reflect.TypeOf((*WaitForUpdatesExRequestType)(nil)).Elem()
    +}
    +
    +type WaitForUpdatesExResponse struct {
    +	Returnval *UpdateSet `xml:"returnval,omitempty"`
    +}
    +
    +type WaitForUpdatesRequestType struct {
    +	This    ManagedObjectReference `xml:"_this"`
    +	Version string                 `xml:"version,omitempty"`
    +}
    +
    +func init() {
    +	t["WaitForUpdatesRequestType"] = reflect.TypeOf((*WaitForUpdatesRequestType)(nil)).Elem()
    +}
    +
    +type WaitForUpdatesResponse struct {
    +	Returnval UpdateSet `xml:"returnval"`
    +}
    +
    +type WaitOptions struct {
    +	DynamicData
    +
    +	MaxWaitSeconds   *int32 `xml:"maxWaitSeconds"`
    +	MaxObjectUpdates int32  `xml:"maxObjectUpdates,omitempty"`
    +}
    +
    +func init() {
    +	t["WaitOptions"] = reflect.TypeOf((*WaitOptions)(nil)).Elem()
    +}
    +
    +type WakeOnLanNotSupported struct {
    +	VirtualHardwareCompatibilityIssue
    +}
    +
    +func init() {
    +	t["WakeOnLanNotSupported"] = reflect.TypeOf((*WakeOnLanNotSupported)(nil)).Elem()
    +}
    +
    +type WakeOnLanNotSupportedByVmotionNIC struct {
    +	HostPowerOpFailed
    +}
    +
    +func init() {
    +	t["WakeOnLanNotSupportedByVmotionNIC"] = reflect.TypeOf((*WakeOnLanNotSupportedByVmotionNIC)(nil)).Elem()
    +}
    +
    +type WakeOnLanNotSupportedByVmotionNICFault WakeOnLanNotSupportedByVmotionNIC
    +
    +func init() {
    +	t["WakeOnLanNotSupportedByVmotionNICFault"] = reflect.TypeOf((*WakeOnLanNotSupportedByVmotionNICFault)(nil)).Elem()
    +}
    +
    +type WakeOnLanNotSupportedFault WakeOnLanNotSupported
    +
    +func init() {
    +	t["WakeOnLanNotSupportedFault"] = reflect.TypeOf((*WakeOnLanNotSupportedFault)(nil)).Elem()
    +}
    +
    +type WarningUpgradeEvent struct {
    +	UpgradeEvent
    +}
    +
    +func init() {
    +	t["WarningUpgradeEvent"] = reflect.TypeOf((*WarningUpgradeEvent)(nil)).Elem()
    +}
    +
    +type WeeklyTaskScheduler struct {
    +	DailyTaskScheduler
    +
    +	Sunday    bool `xml:"sunday"`
    +	Monday    bool `xml:"monday"`
    +	Tuesday   bool `xml:"tuesday"`
    +	Wednesday bool `xml:"wednesday"`
    +	Thursday  bool `xml:"thursday"`
    +	Friday    bool `xml:"friday"`
    +	Saturday  bool `xml:"saturday"`
    +}
    +
    +func init() {
    +	t["WeeklyTaskScheduler"] = reflect.TypeOf((*WeeklyTaskScheduler)(nil)).Elem()
    +}
    +
    +type WillLoseHAProtection struct {
    +	MigrationFault
    +
    +	Resolution string `xml:"resolution"`
    +}
    +
    +func init() {
    +	t["WillLoseHAProtection"] = reflect.TypeOf((*WillLoseHAProtection)(nil)).Elem()
    +}
    +
    +type WillLoseHAProtectionFault WillLoseHAProtection
    +
    +func init() {
    +	t["WillLoseHAProtectionFault"] = reflect.TypeOf((*WillLoseHAProtectionFault)(nil)).Elem()
    +}
    +
    +type WillModifyConfigCpuRequirements struct {
    +	MigrationFault
    +}
    +
    +func init() {
    +	t["WillModifyConfigCpuRequirements"] = reflect.TypeOf((*WillModifyConfigCpuRequirements)(nil)).Elem()
    +}
    +
    +type WillModifyConfigCpuRequirementsFault WillModifyConfigCpuRequirements
    +
    +func init() {
    +	t["WillModifyConfigCpuRequirementsFault"] = reflect.TypeOf((*WillModifyConfigCpuRequirementsFault)(nil)).Elem()
    +}
    +
    +type WillResetSnapshotDirectory struct {
    +	MigrationFault
    +}
    +
    +func init() {
    +	t["WillResetSnapshotDirectory"] = reflect.TypeOf((*WillResetSnapshotDirectory)(nil)).Elem()
    +}
    +
    +type WillResetSnapshotDirectoryFault WillResetSnapshotDirectory
    +
    +func init() {
    +	t["WillResetSnapshotDirectoryFault"] = reflect.TypeOf((*WillResetSnapshotDirectoryFault)(nil)).Elem()
    +}
    +
    +type WinNetBIOSConfigInfo struct {
    +	NetBIOSConfigInfo
    +
    +	PrimaryWINS   string `xml:"primaryWINS"`
    +	SecondaryWINS string `xml:"secondaryWINS,omitempty"`
    +}
    +
    +func init() {
    +	t["WinNetBIOSConfigInfo"] = reflect.TypeOf((*WinNetBIOSConfigInfo)(nil)).Elem()
    +}
    +
    +type WipeDiskFault struct {
    +	VimFault
    +}
    +
    +func init() {
    +	t["WipeDiskFault"] = reflect.TypeOf((*WipeDiskFault)(nil)).Elem()
    +}
    +
    +type WipeDiskFaultFault WipeDiskFault
    +
    +func init() {
    +	t["WipeDiskFaultFault"] = reflect.TypeOf((*WipeDiskFaultFault)(nil)).Elem()
    +}
    +
    +type WitnessNodeInfo struct {
    +	DynamicData
    +
    +	IpSettings CustomizationIPSettings `xml:"ipSettings"`
    +	BiosUuid   string                  `xml:"biosUuid,omitempty"`
    +}
    +
    +func init() {
    +	t["WitnessNodeInfo"] = reflect.TypeOf((*WitnessNodeInfo)(nil)).Elem()
    +}
    +
    +type XmlToCustomizationSpecItem XmlToCustomizationSpecItemRequestType
    +
    +func init() {
    +	t["XmlToCustomizationSpecItem"] = reflect.TypeOf((*XmlToCustomizationSpecItem)(nil)).Elem()
    +}
    +
    +type XmlToCustomizationSpecItemRequestType struct {
    +	This        ManagedObjectReference `xml:"_this"`
    +	SpecItemXml string                 `xml:"specItemXml"`
    +}
    +
    +func init() {
    +	t["XmlToCustomizationSpecItemRequestType"] = reflect.TypeOf((*XmlToCustomizationSpecItemRequestType)(nil)).Elem()
    +}
    +
    +type XmlToCustomizationSpecItemResponse struct {
    +	Returnval CustomizationSpecItem `xml:"returnval"`
    +}
    +
    +type ZeroFillVirtualDiskRequestType struct {
    +	This       ManagedObjectReference  `xml:"_this"`
    +	Name       string                  `xml:"name"`
    +	Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"`
    +}
    +
    +func init() {
    +	t["ZeroFillVirtualDiskRequestType"] = reflect.TypeOf((*ZeroFillVirtualDiskRequestType)(nil)).Elem()
    +}
    +
    +type ZeroFillVirtualDisk_Task ZeroFillVirtualDiskRequestType
    +
    +func init() {
    +	t["ZeroFillVirtualDisk_Task"] = reflect.TypeOf((*ZeroFillVirtualDisk_Task)(nil)).Elem()
    +}
    +
    +type ZeroFillVirtualDisk_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type ConfigureVchaRequestType struct {
    +	This       ManagedObjectReference `xml:"_this"`
    +	ConfigSpec VchaClusterConfigSpec  `xml:"configSpec"`
    +}
    +
    +func init() {
    +	t["configureVchaRequestType"] = reflect.TypeOf((*ConfigureVchaRequestType)(nil)).Elem()
    +}
    +
    +type ConfigureVcha_Task ConfigureVchaRequestType
    +
    +func init() {
    +	t["configureVcha_Task"] = reflect.TypeOf((*ConfigureVcha_Task)(nil)).Elem()
    +}
    +
    +type ConfigureVcha_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CreatePassiveNodeRequestType struct {
    +	This                  ManagedObjectReference    `xml:"_this"`
    +	PassiveDeploymentSpec PassiveNodeDeploymentSpec `xml:"passiveDeploymentSpec"`
    +	SourceVcSpec          SourceNodeSpec            `xml:"sourceVcSpec"`
    +}
    +
    +func init() {
    +	t["createPassiveNodeRequestType"] = reflect.TypeOf((*CreatePassiveNodeRequestType)(nil)).Elem()
    +}
    +
    +type CreatePassiveNode_Task CreatePassiveNodeRequestType
    +
    +func init() {
    +	t["createPassiveNode_Task"] = reflect.TypeOf((*CreatePassiveNode_Task)(nil)).Elem()
    +}
    +
    +type CreatePassiveNode_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type CreateWitnessNodeRequestType struct {
    +	This                  ManagedObjectReference `xml:"_this"`
    +	WitnessDeploymentSpec BaseNodeDeploymentSpec `xml:"witnessDeploymentSpec,typeattr"`
    +	SourceVcSpec          SourceNodeSpec         `xml:"sourceVcSpec"`
    +}
    +
    +func init() {
    +	t["createWitnessNodeRequestType"] = reflect.TypeOf((*CreateWitnessNodeRequestType)(nil)).Elem()
    +}
    +
    +type CreateWitnessNode_Task CreateWitnessNodeRequestType
    +
    +func init() {
    +	t["createWitnessNode_Task"] = reflect.TypeOf((*CreateWitnessNode_Task)(nil)).Elem()
    +}
    +
    +type CreateWitnessNode_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type DeployVchaRequestType struct {
    +	This           ManagedObjectReference    `xml:"_this"`
    +	DeploymentSpec VchaClusterDeploymentSpec `xml:"deploymentSpec"`
    +}
    +
    +func init() {
    +	t["deployVchaRequestType"] = reflect.TypeOf((*DeployVchaRequestType)(nil)).Elem()
    +}
    +
    +type DeployVcha_Task DeployVchaRequestType
    +
    +func init() {
    +	t["deployVcha_Task"] = reflect.TypeOf((*DeployVcha_Task)(nil)).Elem()
    +}
    +
    +type DeployVcha_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type DestroyVchaRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["destroyVchaRequestType"] = reflect.TypeOf((*DestroyVchaRequestType)(nil)).Elem()
    +}
    +
    +type DestroyVcha_Task DestroyVchaRequestType
    +
    +func init() {
    +	t["destroyVcha_Task"] = reflect.TypeOf((*DestroyVcha_Task)(nil)).Elem()
    +}
    +
    +type DestroyVcha_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type FetchSoftwarePackages FetchSoftwarePackagesRequestType
    +
    +func init() {
    +	t["fetchSoftwarePackages"] = reflect.TypeOf((*FetchSoftwarePackages)(nil)).Elem()
    +}
    +
    +type FetchSoftwarePackagesRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["fetchSoftwarePackagesRequestType"] = reflect.TypeOf((*FetchSoftwarePackagesRequestType)(nil)).Elem()
    +}
    +
    +type FetchSoftwarePackagesResponse struct {
    +	Returnval []SoftwarePackage `xml:"returnval,omitempty"`
    +}
    +
    +type GetClusterMode GetClusterModeRequestType
    +
    +func init() {
    +	t["getClusterMode"] = reflect.TypeOf((*GetClusterMode)(nil)).Elem()
    +}
    +
    +type GetClusterModeRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["getClusterModeRequestType"] = reflect.TypeOf((*GetClusterModeRequestType)(nil)).Elem()
    +}
    +
    +type GetClusterModeResponse struct {
    +	Returnval string `xml:"returnval"`
    +}
    +
    +type GetVchaConfig GetVchaConfigRequestType
    +
    +func init() {
    +	t["getVchaConfig"] = reflect.TypeOf((*GetVchaConfig)(nil)).Elem()
    +}
    +
    +type GetVchaConfigRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["getVchaConfigRequestType"] = reflect.TypeOf((*GetVchaConfigRequestType)(nil)).Elem()
    +}
    +
    +type GetVchaConfigResponse struct {
    +	Returnval VchaClusterConfigInfo `xml:"returnval"`
    +}
    +
    +type InitiateFailoverRequestType struct {
    +	This    ManagedObjectReference `xml:"_this"`
    +	Planned bool                   `xml:"planned"`
    +}
    +
    +func init() {
    +	t["initiateFailoverRequestType"] = reflect.TypeOf((*InitiateFailoverRequestType)(nil)).Elem()
    +}
    +
    +type InitiateFailover_Task InitiateFailoverRequestType
    +
    +func init() {
    +	t["initiateFailover_Task"] = reflect.TypeOf((*InitiateFailover_Task)(nil)).Elem()
    +}
    +
    +type InitiateFailover_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type InstallDate InstallDateRequestType
    +
    +func init() {
    +	t["installDate"] = reflect.TypeOf((*InstallDate)(nil)).Elem()
    +}
    +
    +type InstallDateRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["installDateRequestType"] = reflect.TypeOf((*InstallDateRequestType)(nil)).Elem()
    +}
    +
    +type InstallDateResponse struct {
    +	Returnval time.Time `xml:"returnval"`
    +}
    +
    +type PrepareVchaRequestType struct {
    +	This        ManagedObjectReference `xml:"_this"`
    +	NetworkSpec VchaClusterNetworkSpec `xml:"networkSpec"`
    +}
    +
    +func init() {
    +	t["prepareVchaRequestType"] = reflect.TypeOf((*PrepareVchaRequestType)(nil)).Elem()
    +}
    +
    +type PrepareVcha_Task PrepareVchaRequestType
    +
    +func init() {
    +	t["prepareVcha_Task"] = reflect.TypeOf((*PrepareVcha_Task)(nil)).Elem()
    +}
    +
    +type PrepareVcha_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type QueryDatacenterConfigOptionDescriptor QueryDatacenterConfigOptionDescriptorRequestType
    +
    +func init() {
    +	t["queryDatacenterConfigOptionDescriptor"] = reflect.TypeOf((*QueryDatacenterConfigOptionDescriptor)(nil)).Elem()
    +}
    +
    +type QueryDatacenterConfigOptionDescriptorRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["queryDatacenterConfigOptionDescriptorRequestType"] = reflect.TypeOf((*QueryDatacenterConfigOptionDescriptorRequestType)(nil)).Elem()
    +}
    +
    +type QueryDatacenterConfigOptionDescriptorResponse struct {
    +	Returnval []VirtualMachineConfigOptionDescriptor `xml:"returnval,omitempty"`
    +}
    +
    +type ReloadVirtualMachineFromPathRequestType struct {
    +	This              ManagedObjectReference `xml:"_this"`
    +	ConfigurationPath string                 `xml:"configurationPath"`
    +}
    +
    +func init() {
    +	t["reloadVirtualMachineFromPathRequestType"] = reflect.TypeOf((*ReloadVirtualMachineFromPathRequestType)(nil)).Elem()
    +}
    +
    +type ReloadVirtualMachineFromPath_Task ReloadVirtualMachineFromPathRequestType
    +
    +func init() {
    +	t["reloadVirtualMachineFromPath_Task"] = reflect.TypeOf((*ReloadVirtualMachineFromPath_Task)(nil)).Elem()
    +}
    +
    +type ReloadVirtualMachineFromPath_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type SetClusterModeRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +	Mode string                 `xml:"mode"`
    +}
    +
    +func init() {
    +	t["setClusterModeRequestType"] = reflect.TypeOf((*SetClusterModeRequestType)(nil)).Elem()
    +}
    +
    +type SetClusterMode_Task SetClusterModeRequestType
    +
    +func init() {
    +	t["setClusterMode_Task"] = reflect.TypeOf((*SetClusterMode_Task)(nil)).Elem()
    +}
    +
    +type SetClusterMode_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type SetCustomValue SetCustomValueRequestType
    +
    +func init() {
    +	t["setCustomValue"] = reflect.TypeOf((*SetCustomValue)(nil)).Elem()
    +}
    +
    +type SetCustomValueRequestType struct {
    +	This  ManagedObjectReference `xml:"_this"`
    +	Key   string                 `xml:"key"`
    +	Value string                 `xml:"value"`
    +}
    +
    +func init() {
    +	t["setCustomValueRequestType"] = reflect.TypeOf((*SetCustomValueRequestType)(nil)).Elem()
    +}
    +
    +type SetCustomValueResponse struct {
    +}
    +
    +type UnregisterVAppRequestType struct {
    +	This ManagedObjectReference `xml:"_this"`
    +}
    +
    +func init() {
    +	t["unregisterVAppRequestType"] = reflect.TypeOf((*UnregisterVAppRequestType)(nil)).Elem()
    +}
    +
    +type UnregisterVApp_Task UnregisterVAppRequestType
    +
    +func init() {
    +	t["unregisterVApp_Task"] = reflect.TypeOf((*UnregisterVApp_Task)(nil)).Elem()
    +}
    +
    +type UnregisterVApp_TaskResponse struct {
    +	Returnval ManagedObjectReference `xml:"returnval"`
    +}
    +
    +type VersionURI string
    +
    +func init() {
    +	t["versionURI"] = reflect.TypeOf((*VersionURI)(nil)).Elem()
    +}
    +
    +type VslmInfrastructureObjectPolicy struct {
    +	DynamicData
    +
    +	Name            string                `xml:"name"`
    +	BackingObjectId string                `xml:"backingObjectId"`
    +	ProfileId       string                `xml:"profileId"`
    +	Error           *LocalizedMethodFault `xml:"error,omitempty"`
    +}
    +
    +func init() {
    +	t["vslmInfrastructureObjectPolicy"] = reflect.TypeOf((*VslmInfrastructureObjectPolicy)(nil)).Elem()
    +}
    +
    +type VslmInfrastructureObjectPolicySpec struct {
    +	DynamicData
    +
    +	Datastore ManagedObjectReference          `xml:"datastore"`
    +	Profile   []BaseVirtualMachineProfileSpec `xml:"profile,omitempty,typeattr"`
    +}
    +
    +func init() {
    +	t["vslmInfrastructureObjectPolicySpec"] = reflect.TypeOf((*VslmInfrastructureObjectPolicySpec)(nil)).Elem()
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/xml/LICENSE b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/xml/LICENSE
    new file mode 100644
    index 000000000..744875676
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/xml/LICENSE
    @@ -0,0 +1,27 @@
    +Copyright (c) 2012 The Go Authors. All rights reserved.
    +
    +Redistribution and use in source and binary forms, with or without
    +modification, are permitted provided that the following conditions are
    +met:
    +
    +   * Redistributions of source code must retain the above copyright
    +notice, this list of conditions and the following disclaimer.
    +   * Redistributions in binary form must reproduce the above
    +copyright notice, this list of conditions and the following disclaimer
    +in the documentation and/or other materials provided with the
    +distribution.
    +   * Neither the name of Google Inc. nor the names of its
    +contributors may be used to endorse or promote products derived from
    +this software without specific prior written permission.
    +
    +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
    +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/xml/extras.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/xml/extras.go
    new file mode 100644
    index 000000000..9a15b7c8e
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/xml/extras.go
    @@ -0,0 +1,99 @@
    +/*
    +Copyright (c) 2014 VMware, Inc. All Rights Reserved.
    +
    +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.
    +*/
    +
    +package xml
    +
    +import (
    +	"reflect"
    +	"time"
    +)
    +
    +var xmlSchemaInstance = Name{Space: "http://www.w3.org/2001/XMLSchema-instance", Local: "type"}
    +
    +var xsiType = Name{Space: "xsi", Local: "type"}
    +
    +var stringToTypeMap = map[string]reflect.Type{
    +	"xsd:boolean":       reflect.TypeOf((*bool)(nil)).Elem(),
    +	"xsd:byte":          reflect.TypeOf((*int8)(nil)).Elem(),
    +	"xsd:short":         reflect.TypeOf((*int16)(nil)).Elem(),
    +	"xsd:int":           reflect.TypeOf((*int32)(nil)).Elem(),
    +	"xsd:long":          reflect.TypeOf((*int64)(nil)).Elem(),
    +	"xsd:unsignedByte":  reflect.TypeOf((*uint8)(nil)).Elem(),
    +	"xsd:unsignedShort": reflect.TypeOf((*uint16)(nil)).Elem(),
    +	"xsd:unsignedInt":   reflect.TypeOf((*uint32)(nil)).Elem(),
    +	"xsd:unsignedLong":  reflect.TypeOf((*uint64)(nil)).Elem(),
    +	"xsd:float":         reflect.TypeOf((*float32)(nil)).Elem(),
    +	"xsd:double":        reflect.TypeOf((*float64)(nil)).Elem(),
    +	"xsd:string":        reflect.TypeOf((*string)(nil)).Elem(),
    +	"xsd:dateTime":      reflect.TypeOf((*time.Time)(nil)).Elem(),
    +	"xsd:base64Binary":  reflect.TypeOf((*[]byte)(nil)).Elem(),
    +}
    +
    +// Return a reflect.Type for the specified type. Nil if unknown.
    +func stringToType(s string) reflect.Type {
    +	return stringToTypeMap[s]
    +}
    +
    +// Return a string for the specified reflect.Type. Panic if unknown.
    +func typeToString(typ reflect.Type) string {
    +	switch typ.Kind() {
    +	case reflect.Bool:
    +		return "xsd:boolean"
    +	case reflect.Int8:
    +		return "xsd:byte"
    +	case reflect.Int16:
    +		return "xsd:short"
    +	case reflect.Int32:
    +		return "xsd:int"
    +	case reflect.Int, reflect.Int64:
    +		return "xsd:long"
    +	case reflect.Uint8:
    +		return "xsd:unsignedByte"
    +	case reflect.Uint16:
    +		return "xsd:unsignedShort"
    +	case reflect.Uint32:
    +		return "xsd:unsignedInt"
    +	case reflect.Uint, reflect.Uint64:
    +		return "xsd:unsignedLong"
    +	case reflect.Float32:
    +		return "xsd:float"
    +	case reflect.Float64:
    +		return "xsd:double"
    +	case reflect.String:
    +		name := typ.Name()
    +		if name == "string" {
    +			return "xsd:string"
    +		}
    +		return name
    +	case reflect.Struct:
    +		if typ == stringToTypeMap["xsd:dateTime"] {
    +			return "xsd:dateTime"
    +		}
    +
    +		// Expect any other struct to be handled...
    +		return typ.Name()
    +	case reflect.Slice:
    +		if typ.Elem().Kind() == reflect.Uint8 {
    +			return "xsd:base64Binary"
    +		}
    +	case reflect.Array:
    +		if typ.Elem().Kind() == reflect.Uint8 {
    +			return "xsd:base64Binary"
    +		}
    +	}
    +
    +	panic("don't know what to do for type: " + typ.String())
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/xml/marshal.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/xml/marshal.go
    new file mode 100644
    index 000000000..39bbac1d1
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/xml/marshal.go
    @@ -0,0 +1,949 @@
    +// Copyright 2011 The Go Authors. All rights reserved.
    +// Use of this source code is governed by a BSD-style
    +// license that can be found in the LICENSE file.
    +
    +package xml
    +
    +import (
    +	"bufio"
    +	"bytes"
    +	"encoding"
    +	"fmt"
    +	"io"
    +	"reflect"
    +	"strconv"
    +	"strings"
    +)
    +
    +const (
    +	// A generic XML header suitable for use with the output of Marshal.
    +	// This is not automatically added to any output of this package,
    +	// it is provided as a convenience.
    +	Header = `` + "\n"
    +)
    +
    +// Marshal returns the XML encoding of v.
    +//
    +// Marshal handles an array or slice by marshalling each of the elements.
    +// Marshal handles a pointer by marshalling the value it points at or, if the
    +// pointer is nil, by writing nothing.  Marshal handles an interface value by
    +// marshalling the value it contains or, if the interface value is nil, by
    +// writing nothing.  Marshal handles all other data by writing one or more XML
    +// elements containing the data.
    +//
    +// The name for the XML elements is taken from, in order of preference:
    +//     - the tag on the XMLName field, if the data is a struct
    +//     - the value of the XMLName field of type xml.Name
    +//     - the tag of the struct field used to obtain the data
    +//     - the name of the struct field used to obtain the data
    +//     - the name of the marshalled type
    +//
    +// The XML element for a struct contains marshalled elements for each of the
    +// exported fields of the struct, with these exceptions:
    +//     - the XMLName field, described above, is omitted.
    +//     - a field with tag "-" is omitted.
    +//     - a field with tag "name,attr" becomes an attribute with
    +//       the given name in the XML element.
    +//     - a field with tag ",attr" becomes an attribute with the
    +//       field name in the XML element.
    +//     - a field with tag ",chardata" is written as character data,
    +//       not as an XML element.
    +//     - a field with tag ",innerxml" is written verbatim, not subject
    +//       to the usual marshalling procedure.
    +//     - a field with tag ",comment" is written as an XML comment, not
    +//       subject to the usual marshalling procedure. It must not contain
    +//       the "--" string within it.
    +//     - a field with a tag including the "omitempty" option is omitted
    +//       if the field value is empty. The empty values are false, 0, any
    +//       nil pointer or interface value, and any array, slice, map, or
    +//       string of length zero.
    +//     - an anonymous struct field is handled as if the fields of its
    +//       value were part of the outer struct.
    +//
    +// If a field uses a tag "a>b>c", then the element c will be nested inside
    +// parent elements a and b.  Fields that appear next to each other that name
    +// the same parent will be enclosed in one XML element.
    +//
    +// See MarshalIndent for an example.
    +//
    +// Marshal will return an error if asked to marshal a channel, function, or map.
    +func Marshal(v interface{}) ([]byte, error) {
    +	var b bytes.Buffer
    +	if err := NewEncoder(&b).Encode(v); err != nil {
    +		return nil, err
    +	}
    +	return b.Bytes(), nil
    +}
    +
    +// Marshaler is the interface implemented by objects that can marshal
    +// themselves into valid XML elements.
    +//
    +// MarshalXML encodes the receiver as zero or more XML elements.
    +// By convention, arrays or slices are typically encoded as a sequence
    +// of elements, one per entry.
    +// Using start as the element tag is not required, but doing so
    +// will enable Unmarshal to match the XML elements to the correct
    +// struct field.
    +// One common implementation strategy is to construct a separate
    +// value with a layout corresponding to the desired XML and then
    +// to encode it using e.EncodeElement.
    +// Another common strategy is to use repeated calls to e.EncodeToken
    +// to generate the XML output one token at a time.
    +// The sequence of encoded tokens must make up zero or more valid
    +// XML elements.
    +type Marshaler interface {
    +	MarshalXML(e *Encoder, start StartElement) error
    +}
    +
    +// MarshalerAttr is the interface implemented by objects that can marshal
    +// themselves into valid XML attributes.
    +//
    +// MarshalXMLAttr returns an XML attribute with the encoded value of the receiver.
    +// Using name as the attribute name is not required, but doing so
    +// will enable Unmarshal to match the attribute to the correct
    +// struct field.
    +// If MarshalXMLAttr returns the zero attribute Attr{}, no attribute
    +// will be generated in the output.
    +// MarshalXMLAttr is used only for struct fields with the
    +// "attr" option in the field tag.
    +type MarshalerAttr interface {
    +	MarshalXMLAttr(name Name) (Attr, error)
    +}
    +
    +// MarshalIndent works like Marshal, but each XML element begins on a new
    +// indented line that starts with prefix and is followed by one or more
    +// copies of indent according to the nesting depth.
    +func MarshalIndent(v interface{}, prefix, indent string) ([]byte, error) {
    +	var b bytes.Buffer
    +	enc := NewEncoder(&b)
    +	enc.Indent(prefix, indent)
    +	if err := enc.Encode(v); err != nil {
    +		return nil, err
    +	}
    +	return b.Bytes(), nil
    +}
    +
    +// An Encoder writes XML data to an output stream.
    +type Encoder struct {
    +	p printer
    +}
    +
    +// NewEncoder returns a new encoder that writes to w.
    +func NewEncoder(w io.Writer) *Encoder {
    +	e := &Encoder{printer{Writer: bufio.NewWriter(w)}}
    +	e.p.encoder = e
    +	return e
    +}
    +
    +// Indent sets the encoder to generate XML in which each element
    +// begins on a new indented line that starts with prefix and is followed by
    +// one or more copies of indent according to the nesting depth.
    +func (enc *Encoder) Indent(prefix, indent string) {
    +	enc.p.prefix = prefix
    +	enc.p.indent = indent
    +}
    +
    +// Encode writes the XML encoding of v to the stream.
    +//
    +// See the documentation for Marshal for details about the conversion
    +// of Go values to XML.
    +//
    +// Encode calls Flush before returning.
    +func (enc *Encoder) Encode(v interface{}) error {
    +	err := enc.p.marshalValue(reflect.ValueOf(v), nil, nil)
    +	if err != nil {
    +		return err
    +	}
    +	return enc.p.Flush()
    +}
    +
    +// EncodeElement writes the XML encoding of v to the stream,
    +// using start as the outermost tag in the encoding.
    +//
    +// See the documentation for Marshal for details about the conversion
    +// of Go values to XML.
    +//
    +// EncodeElement calls Flush before returning.
    +func (enc *Encoder) EncodeElement(v interface{}, start StartElement) error {
    +	err := enc.p.marshalValue(reflect.ValueOf(v), nil, &start)
    +	if err != nil {
    +		return err
    +	}
    +	return enc.p.Flush()
    +}
    +
    +var (
    +	endComment   = []byte("-->")
    +	endProcInst  = []byte("?>")
    +	endDirective = []byte(">")
    +)
    +
    +// EncodeToken writes the given XML token to the stream.
    +// It returns an error if StartElement and EndElement tokens are not properly matched.
    +//
    +// EncodeToken does not call Flush, because usually it is part of a larger operation
    +// such as Encode or EncodeElement (or a custom Marshaler's MarshalXML invoked
    +// during those), and those will call Flush when finished.
    +// Callers that create an Encoder and then invoke EncodeToken directly, without
    +// using Encode or EncodeElement, need to call Flush when finished to ensure
    +// that the XML is written to the underlying writer.
    +//
    +// EncodeToken allows writing a ProcInst with Target set to "xml" only as the first token
    +// in the stream.
    +func (enc *Encoder) EncodeToken(t Token) error {
    +	p := &enc.p
    +	switch t := t.(type) {
    +	case StartElement:
    +		if err := p.writeStart(&t); err != nil {
    +			return err
    +		}
    +	case EndElement:
    +		if err := p.writeEnd(t.Name); err != nil {
    +			return err
    +		}
    +	case CharData:
    +		EscapeText(p, t)
    +	case Comment:
    +		if bytes.Contains(t, endComment) {
    +			return fmt.Errorf("xml: EncodeToken of Comment containing --> marker")
    +		}
    +		p.WriteString("")
    +		return p.cachedWriteError()
    +	case ProcInst:
    +		// First token to be encoded which is also a ProcInst with target of xml
    +		// is the xml declaration.  The only ProcInst where target of xml is allowed.
    +		if t.Target == "xml" && p.Buffered() != 0 {
    +			return fmt.Errorf("xml: EncodeToken of ProcInst xml target only valid for xml declaration, first token encoded")
    +		}
    +		if !isNameString(t.Target) {
    +			return fmt.Errorf("xml: EncodeToken of ProcInst with invalid Target")
    +		}
    +		if bytes.Contains(t.Inst, endProcInst) {
    +			return fmt.Errorf("xml: EncodeToken of ProcInst containing ?> marker")
    +		}
    +		p.WriteString(" 0 {
    +			p.WriteByte(' ')
    +			p.Write(t.Inst)
    +		}
    +		p.WriteString("?>")
    +	case Directive:
    +		if bytes.Contains(t, endDirective) {
    +			return fmt.Errorf("xml: EncodeToken of Directive containing > marker")
    +		}
    +		p.WriteString("")
    +	}
    +	return p.cachedWriteError()
    +}
    +
    +// Flush flushes any buffered XML to the underlying writer.
    +// See the EncodeToken documentation for details about when it is necessary.
    +func (enc *Encoder) Flush() error {
    +	return enc.p.Flush()
    +}
    +
    +type printer struct {
    +	*bufio.Writer
    +	encoder    *Encoder
    +	seq        int
    +	indent     string
    +	prefix     string
    +	depth      int
    +	indentedIn bool
    +	putNewline bool
    +	attrNS     map[string]string // map prefix -> name space
    +	attrPrefix map[string]string // map name space -> prefix
    +	prefixes   []string
    +	tags       []Name
    +}
    +
    +// createAttrPrefix finds the name space prefix attribute to use for the given name space,
    +// defining a new prefix if necessary. It returns the prefix.
    +func (p *printer) createAttrPrefix(url string) string {
    +	if prefix := p.attrPrefix[url]; prefix != "" {
    +		return prefix
    +	}
    +
    +	// The "http://www.w3.org/XML/1998/namespace" name space is predefined as "xml"
    +	// and must be referred to that way.
    +	// (The "http://www.w3.org/2000/xmlns/" name space is also predefined as "xmlns",
    +	// but users should not be trying to use that one directly - that's our job.)
    +	if url == xmlURL {
    +		return "xml"
    +	}
    +
    +	// Need to define a new name space.
    +	if p.attrPrefix == nil {
    +		p.attrPrefix = make(map[string]string)
    +		p.attrNS = make(map[string]string)
    +	}
    +
    +	// Pick a name. We try to use the final element of the path
    +	// but fall back to _.
    +	prefix := strings.TrimRight(url, "/")
    +	if i := strings.LastIndex(prefix, "/"); i >= 0 {
    +		prefix = prefix[i+1:]
    +	}
    +	if prefix == "" || !isName([]byte(prefix)) || strings.Contains(prefix, ":") {
    +		prefix = "_"
    +	}
    +	if strings.HasPrefix(prefix, "xml") {
    +		// xmlanything is reserved.
    +		prefix = "_" + prefix
    +	}
    +	if p.attrNS[prefix] != "" {
    +		// Name is taken. Find a better one.
    +		for p.seq++; ; p.seq++ {
    +			if id := prefix + "_" + strconv.Itoa(p.seq); p.attrNS[id] == "" {
    +				prefix = id
    +				break
    +			}
    +		}
    +	}
    +
    +	p.attrPrefix[url] = prefix
    +	p.attrNS[prefix] = url
    +
    +	p.WriteString(`xmlns:`)
    +	p.WriteString(prefix)
    +	p.WriteString(`="`)
    +	EscapeText(p, []byte(url))
    +	p.WriteString(`" `)
    +
    +	p.prefixes = append(p.prefixes, prefix)
    +
    +	return prefix
    +}
    +
    +// deleteAttrPrefix removes an attribute name space prefix.
    +func (p *printer) deleteAttrPrefix(prefix string) {
    +	delete(p.attrPrefix, p.attrNS[prefix])
    +	delete(p.attrNS, prefix)
    +}
    +
    +func (p *printer) markPrefix() {
    +	p.prefixes = append(p.prefixes, "")
    +}
    +
    +func (p *printer) popPrefix() {
    +	for len(p.prefixes) > 0 {
    +		prefix := p.prefixes[len(p.prefixes)-1]
    +		p.prefixes = p.prefixes[:len(p.prefixes)-1]
    +		if prefix == "" {
    +			break
    +		}
    +		p.deleteAttrPrefix(prefix)
    +	}
    +}
    +
    +var (
    +	marshalerType     = reflect.TypeOf((*Marshaler)(nil)).Elem()
    +	marshalerAttrType = reflect.TypeOf((*MarshalerAttr)(nil)).Elem()
    +	textMarshalerType = reflect.TypeOf((*encoding.TextMarshaler)(nil)).Elem()
    +)
    +
    +// marshalValue writes one or more XML elements representing val.
    +// If val was obtained from a struct field, finfo must have its details.
    +func (p *printer) marshalValue(val reflect.Value, finfo *fieldInfo, startTemplate *StartElement) error {
    +	if startTemplate != nil && startTemplate.Name.Local == "" {
    +		return fmt.Errorf("xml: EncodeElement of StartElement with missing name")
    +	}
    +
    +	if !val.IsValid() {
    +		return nil
    +	}
    +	if finfo != nil && finfo.flags&fOmitEmpty != 0 && isEmptyValue(val) {
    +		return nil
    +	}
    +
    +	// Drill into interfaces and pointers.
    +	// This can turn into an infinite loop given a cyclic chain,
    +	// but it matches the Go 1 behavior.
    +	for val.Kind() == reflect.Interface || val.Kind() == reflect.Ptr {
    +		if val.IsNil() {
    +			return nil
    +		}
    +		val = val.Elem()
    +	}
    +
    +	kind := val.Kind()
    +	typ := val.Type()
    +
    +	// Check for marshaler.
    +	if val.CanInterface() && typ.Implements(marshalerType) {
    +		return p.marshalInterface(val.Interface().(Marshaler), defaultStart(typ, finfo, startTemplate))
    +	}
    +	if val.CanAddr() {
    +		pv := val.Addr()
    +		if pv.CanInterface() && pv.Type().Implements(marshalerType) {
    +			return p.marshalInterface(pv.Interface().(Marshaler), defaultStart(pv.Type(), finfo, startTemplate))
    +		}
    +	}
    +
    +	// Check for text marshaler.
    +	if val.CanInterface() && typ.Implements(textMarshalerType) {
    +		return p.marshalTextInterface(val.Interface().(encoding.TextMarshaler), defaultStart(typ, finfo, startTemplate))
    +	}
    +	if val.CanAddr() {
    +		pv := val.Addr()
    +		if pv.CanInterface() && pv.Type().Implements(textMarshalerType) {
    +			return p.marshalTextInterface(pv.Interface().(encoding.TextMarshaler), defaultStart(pv.Type(), finfo, startTemplate))
    +		}
    +	}
    +
    +	// Slices and arrays iterate over the elements. They do not have an enclosing tag.
    +	if (kind == reflect.Slice || kind == reflect.Array) && typ.Elem().Kind() != reflect.Uint8 {
    +		for i, n := 0, val.Len(); i < n; i++ {
    +			if err := p.marshalValue(val.Index(i), finfo, startTemplate); err != nil {
    +				return err
    +			}
    +		}
    +		return nil
    +	}
    +
    +	tinfo, err := getTypeInfo(typ)
    +	if err != nil {
    +		return err
    +	}
    +
    +	// Create start element.
    +	// Precedence for the XML element name is:
    +	// 0. startTemplate
    +	// 1. XMLName field in underlying struct;
    +	// 2. field name/tag in the struct field; and
    +	// 3. type name
    +	var start StartElement
    +
    +	if startTemplate != nil {
    +		start.Name = startTemplate.Name
    +		start.Attr = append(start.Attr, startTemplate.Attr...)
    +	} else if tinfo.xmlname != nil {
    +		xmlname := tinfo.xmlname
    +		if xmlname.name != "" {
    +			start.Name.Space, start.Name.Local = xmlname.xmlns, xmlname.name
    +		} else if v, ok := xmlname.value(val).Interface().(Name); ok && v.Local != "" {
    +			start.Name = v
    +		}
    +	}
    +	if start.Name.Local == "" && finfo != nil {
    +		start.Name.Space, start.Name.Local = finfo.xmlns, finfo.name
    +	}
    +	if start.Name.Local == "" {
    +		name := typ.Name()
    +		if name == "" {
    +			return &UnsupportedTypeError{typ}
    +		}
    +		start.Name.Local = name
    +	}
    +
    +	// Add type attribute if necessary
    +	if finfo != nil && finfo.flags&fTypeAttr != 0 {
    +		start.Attr = append(start.Attr, Attr{xmlSchemaInstance, typeToString(typ)})
    +	}
    +
    +	// Attributes
    +	for i := range tinfo.fields {
    +		finfo := &tinfo.fields[i]
    +		if finfo.flags&fAttr == 0 {
    +			continue
    +		}
    +		fv := finfo.value(val)
    +		name := Name{Space: finfo.xmlns, Local: finfo.name}
    +
    +		if finfo.flags&fOmitEmpty != 0 && isEmptyValue(fv) {
    +			continue
    +		}
    +
    +		if fv.Kind() == reflect.Interface && fv.IsNil() {
    +			continue
    +		}
    +
    +		if fv.CanInterface() && fv.Type().Implements(marshalerAttrType) {
    +			attr, err := fv.Interface().(MarshalerAttr).MarshalXMLAttr(name)
    +			if err != nil {
    +				return err
    +			}
    +			if attr.Name.Local != "" {
    +				start.Attr = append(start.Attr, attr)
    +			}
    +			continue
    +		}
    +
    +		if fv.CanAddr() {
    +			pv := fv.Addr()
    +			if pv.CanInterface() && pv.Type().Implements(marshalerAttrType) {
    +				attr, err := pv.Interface().(MarshalerAttr).MarshalXMLAttr(name)
    +				if err != nil {
    +					return err
    +				}
    +				if attr.Name.Local != "" {
    +					start.Attr = append(start.Attr, attr)
    +				}
    +				continue
    +			}
    +		}
    +
    +		if fv.CanInterface() && fv.Type().Implements(textMarshalerType) {
    +			text, err := fv.Interface().(encoding.TextMarshaler).MarshalText()
    +			if err != nil {
    +				return err
    +			}
    +			start.Attr = append(start.Attr, Attr{name, string(text)})
    +			continue
    +		}
    +
    +		if fv.CanAddr() {
    +			pv := fv.Addr()
    +			if pv.CanInterface() && pv.Type().Implements(textMarshalerType) {
    +				text, err := pv.Interface().(encoding.TextMarshaler).MarshalText()
    +				if err != nil {
    +					return err
    +				}
    +				start.Attr = append(start.Attr, Attr{name, string(text)})
    +				continue
    +			}
    +		}
    +
    +		// Dereference or skip nil pointer, interface values.
    +		switch fv.Kind() {
    +		case reflect.Ptr, reflect.Interface:
    +			if fv.IsNil() {
    +				continue
    +			}
    +			fv = fv.Elem()
    +		}
    +
    +		s, b, err := p.marshalSimple(fv.Type(), fv)
    +		if err != nil {
    +			return err
    +		}
    +		if b != nil {
    +			s = string(b)
    +		}
    +		start.Attr = append(start.Attr, Attr{name, s})
    +	}
    +
    +	if err := p.writeStart(&start); err != nil {
    +		return err
    +	}
    +
    +	if val.Kind() == reflect.Struct {
    +		err = p.marshalStruct(tinfo, val)
    +	} else {
    +		s, b, err1 := p.marshalSimple(typ, val)
    +		if err1 != nil {
    +			err = err1
    +		} else if b != nil {
    +			EscapeText(p, b)
    +		} else {
    +			p.EscapeString(s)
    +		}
    +	}
    +	if err != nil {
    +		return err
    +	}
    +
    +	if err := p.writeEnd(start.Name); err != nil {
    +		return err
    +	}
    +
    +	return p.cachedWriteError()
    +}
    +
    +// defaultStart returns the default start element to use,
    +// given the reflect type, field info, and start template.
    +func defaultStart(typ reflect.Type, finfo *fieldInfo, startTemplate *StartElement) StartElement {
    +	var start StartElement
    +	// Precedence for the XML element name is as above,
    +	// except that we do not look inside structs for the first field.
    +	if startTemplate != nil {
    +		start.Name = startTemplate.Name
    +		start.Attr = append(start.Attr, startTemplate.Attr...)
    +	} else if finfo != nil && finfo.name != "" {
    +		start.Name.Local = finfo.name
    +		start.Name.Space = finfo.xmlns
    +	} else if typ.Name() != "" {
    +		start.Name.Local = typ.Name()
    +	} else {
    +		// Must be a pointer to a named type,
    +		// since it has the Marshaler methods.
    +		start.Name.Local = typ.Elem().Name()
    +	}
    +
    +	// Add type attribute if necessary
    +	if finfo != nil && finfo.flags&fTypeAttr != 0 {
    +		start.Attr = append(start.Attr, Attr{xmlSchemaInstance, typeToString(typ)})
    +	}
    +
    +	return start
    +}
    +
    +// marshalInterface marshals a Marshaler interface value.
    +func (p *printer) marshalInterface(val Marshaler, start StartElement) error {
    +	// Push a marker onto the tag stack so that MarshalXML
    +	// cannot close the XML tags that it did not open.
    +	p.tags = append(p.tags, Name{})
    +	n := len(p.tags)
    +
    +	err := val.MarshalXML(p.encoder, start)
    +	if err != nil {
    +		return err
    +	}
    +
    +	// Make sure MarshalXML closed all its tags. p.tags[n-1] is the mark.
    +	if len(p.tags) > n {
    +		return fmt.Errorf("xml: %s.MarshalXML wrote invalid XML: <%s> not closed", receiverType(val), p.tags[len(p.tags)-1].Local)
    +	}
    +	p.tags = p.tags[:n-1]
    +	return nil
    +}
    +
    +// marshalTextInterface marshals a TextMarshaler interface value.
    +func (p *printer) marshalTextInterface(val encoding.TextMarshaler, start StartElement) error {
    +	if err := p.writeStart(&start); err != nil {
    +		return err
    +	}
    +	text, err := val.MarshalText()
    +	if err != nil {
    +		return err
    +	}
    +	EscapeText(p, text)
    +	return p.writeEnd(start.Name)
    +}
    +
    +// writeStart writes the given start element.
    +func (p *printer) writeStart(start *StartElement) error {
    +	if start.Name.Local == "" {
    +		return fmt.Errorf("xml: start tag with no name")
    +	}
    +
    +	p.tags = append(p.tags, start.Name)
    +	p.markPrefix()
    +
    +	p.writeIndent(1)
    +	p.WriteByte('<')
    +	p.WriteString(start.Name.Local)
    +
    +	if start.Name.Space != "" {
    +		p.WriteString(` xmlns="`)
    +		p.EscapeString(start.Name.Space)
    +		p.WriteByte('"')
    +	}
    +
    +	// Attributes
    +	for _, attr := range start.Attr {
    +		name := attr.Name
    +		if name.Local == "" {
    +			continue
    +		}
    +		p.WriteByte(' ')
    +		if name.Space != "" {
    +			p.WriteString(p.createAttrPrefix(name.Space))
    +			p.WriteByte(':')
    +		}
    +		p.WriteString(name.Local)
    +		p.WriteString(`="`)
    +		p.EscapeString(attr.Value)
    +		p.WriteByte('"')
    +	}
    +	p.WriteByte('>')
    +	return nil
    +}
    +
    +func (p *printer) writeEnd(name Name) error {
    +	if name.Local == "" {
    +		return fmt.Errorf("xml: end tag with no name")
    +	}
    +	if len(p.tags) == 0 || p.tags[len(p.tags)-1].Local == "" {
    +		return fmt.Errorf("xml: end tag  without start tag", name.Local)
    +	}
    +	if top := p.tags[len(p.tags)-1]; top != name {
    +		if top.Local != name.Local {
    +			return fmt.Errorf("xml: end tag  does not match start tag <%s>", name.Local, top.Local)
    +		}
    +		return fmt.Errorf("xml: end tag  in namespace %s does not match start tag <%s> in namespace %s", name.Local, name.Space, top.Local, top.Space)
    +	}
    +	p.tags = p.tags[:len(p.tags)-1]
    +
    +	p.writeIndent(-1)
    +	p.WriteByte('<')
    +	p.WriteByte('/')
    +	p.WriteString(name.Local)
    +	p.WriteByte('>')
    +	p.popPrefix()
    +	return nil
    +}
    +
    +func (p *printer) marshalSimple(typ reflect.Type, val reflect.Value) (string, []byte, error) {
    +	switch val.Kind() {
    +	case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
    +		return strconv.FormatInt(val.Int(), 10), nil, nil
    +	case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
    +		return strconv.FormatUint(val.Uint(), 10), nil, nil
    +	case reflect.Float32, reflect.Float64:
    +		return strconv.FormatFloat(val.Float(), 'g', -1, val.Type().Bits()), nil, nil
    +	case reflect.String:
    +		return val.String(), nil, nil
    +	case reflect.Bool:
    +		return strconv.FormatBool(val.Bool()), nil, nil
    +	case reflect.Array:
    +		if typ.Elem().Kind() != reflect.Uint8 {
    +			break
    +		}
    +		// [...]byte
    +		var bytes []byte
    +		if val.CanAddr() {
    +			bytes = val.Slice(0, val.Len()).Bytes()
    +		} else {
    +			bytes = make([]byte, val.Len())
    +			reflect.Copy(reflect.ValueOf(bytes), val)
    +		}
    +		return "", bytes, nil
    +	case reflect.Slice:
    +		if typ.Elem().Kind() != reflect.Uint8 {
    +			break
    +		}
    +		// []byte
    +		return "", val.Bytes(), nil
    +	}
    +	return "", nil, &UnsupportedTypeError{typ}
    +}
    +
    +var ddBytes = []byte("--")
    +
    +func (p *printer) marshalStruct(tinfo *typeInfo, val reflect.Value) error {
    +	s := parentStack{p: p}
    +	for i := range tinfo.fields {
    +		finfo := &tinfo.fields[i]
    +		if finfo.flags&fAttr != 0 {
    +			continue
    +		}
    +		vf := finfo.value(val)
    +
    +		// Dereference or skip nil pointer, interface values.
    +		switch vf.Kind() {
    +		case reflect.Ptr, reflect.Interface:
    +			if !vf.IsNil() {
    +				vf = vf.Elem()
    +			}
    +		}
    +
    +		switch finfo.flags & fMode {
    +		case fCharData:
    +			if vf.CanInterface() && vf.Type().Implements(textMarshalerType) {
    +				data, err := vf.Interface().(encoding.TextMarshaler).MarshalText()
    +				if err != nil {
    +					return err
    +				}
    +				Escape(p, data)
    +				continue
    +			}
    +			if vf.CanAddr() {
    +				pv := vf.Addr()
    +				if pv.CanInterface() && pv.Type().Implements(textMarshalerType) {
    +					data, err := pv.Interface().(encoding.TextMarshaler).MarshalText()
    +					if err != nil {
    +						return err
    +					}
    +					Escape(p, data)
    +					continue
    +				}
    +			}
    +			var scratch [64]byte
    +			switch vf.Kind() {
    +			case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
    +				Escape(p, strconv.AppendInt(scratch[:0], vf.Int(), 10))
    +			case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
    +				Escape(p, strconv.AppendUint(scratch[:0], vf.Uint(), 10))
    +			case reflect.Float32, reflect.Float64:
    +				Escape(p, strconv.AppendFloat(scratch[:0], vf.Float(), 'g', -1, vf.Type().Bits()))
    +			case reflect.Bool:
    +				Escape(p, strconv.AppendBool(scratch[:0], vf.Bool()))
    +			case reflect.String:
    +				if err := EscapeText(p, []byte(vf.String())); err != nil {
    +					return err
    +				}
    +			case reflect.Slice:
    +				if elem, ok := vf.Interface().([]byte); ok {
    +					if err := EscapeText(p, elem); err != nil {
    +						return err
    +					}
    +				}
    +			}
    +			continue
    +
    +		case fComment:
    +			k := vf.Kind()
    +			if !(k == reflect.String || k == reflect.Slice && vf.Type().Elem().Kind() == reflect.Uint8) {
    +				return fmt.Errorf("xml: bad type for comment field of %s", val.Type())
    +			}
    +			if vf.Len() == 0 {
    +				continue
    +			}
    +			p.writeIndent(0)
    +			p.WriteString("" is invalid grammar. Make it "- -->"
    +				p.WriteByte(' ')
    +			}
    +			p.WriteString("-->")
    +			continue
    +
    +		case fInnerXml:
    +			iface := vf.Interface()
    +			switch raw := iface.(type) {
    +			case []byte:
    +				p.Write(raw)
    +				continue
    +			case string:
    +				p.WriteString(raw)
    +				continue
    +			}
    +
    +		case fElement, fElement | fAny:
    +			if err := s.trim(finfo.parents); err != nil {
    +				return err
    +			}
    +			if len(finfo.parents) > len(s.stack) {
    +				if vf.Kind() != reflect.Ptr && vf.Kind() != reflect.Interface || !vf.IsNil() {
    +					if err := s.push(finfo.parents[len(s.stack):]); err != nil {
    +						return err
    +					}
    +				}
    +			}
    +		}
    +		if err := p.marshalValue(vf, finfo, nil); err != nil {
    +			return err
    +		}
    +	}
    +	s.trim(nil)
    +	return p.cachedWriteError()
    +}
    +
    +// return the bufio Writer's cached write error
    +func (p *printer) cachedWriteError() error {
    +	_, err := p.Write(nil)
    +	return err
    +}
    +
    +func (p *printer) writeIndent(depthDelta int) {
    +	if len(p.prefix) == 0 && len(p.indent) == 0 {
    +		return
    +	}
    +	if depthDelta < 0 {
    +		p.depth--
    +		if p.indentedIn {
    +			p.indentedIn = false
    +			return
    +		}
    +		p.indentedIn = false
    +	}
    +	if p.putNewline {
    +		p.WriteByte('\n')
    +	} else {
    +		p.putNewline = true
    +	}
    +	if len(p.prefix) > 0 {
    +		p.WriteString(p.prefix)
    +	}
    +	if len(p.indent) > 0 {
    +		for i := 0; i < p.depth; i++ {
    +			p.WriteString(p.indent)
    +		}
    +	}
    +	if depthDelta > 0 {
    +		p.depth++
    +		p.indentedIn = true
    +	}
    +}
    +
    +type parentStack struct {
    +	p     *printer
    +	stack []string
    +}
    +
    +// trim updates the XML context to match the longest common prefix of the stack
    +// and the given parents.  A closing tag will be written for every parent
    +// popped.  Passing a zero slice or nil will close all the elements.
    +func (s *parentStack) trim(parents []string) error {
    +	split := 0
    +	for ; split < len(parents) && split < len(s.stack); split++ {
    +		if parents[split] != s.stack[split] {
    +			break
    +		}
    +	}
    +	for i := len(s.stack) - 1; i >= split; i-- {
    +		if err := s.p.writeEnd(Name{Local: s.stack[i]}); err != nil {
    +			return err
    +		}
    +	}
    +	s.stack = parents[:split]
    +	return nil
    +}
    +
    +// push adds parent elements to the stack and writes open tags.
    +func (s *parentStack) push(parents []string) error {
    +	for i := 0; i < len(parents); i++ {
    +		if err := s.p.writeStart(&StartElement{Name: Name{Local: parents[i]}}); err != nil {
    +			return err
    +		}
    +	}
    +	s.stack = append(s.stack, parents...)
    +	return nil
    +}
    +
    +// A MarshalXMLError is returned when Marshal encounters a type
    +// that cannot be converted into XML.
    +type UnsupportedTypeError struct {
    +	Type reflect.Type
    +}
    +
    +func (e *UnsupportedTypeError) Error() string {
    +	return "xml: unsupported type: " + e.Type.String()
    +}
    +
    +func isEmptyValue(v reflect.Value) bool {
    +	switch v.Kind() {
    +	case reflect.Array, reflect.Map, reflect.Slice, reflect.String:
    +		return v.Len() == 0
    +	case reflect.Bool:
    +		return !v.Bool()
    +	case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
    +		return v.Int() == 0
    +	case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
    +		return v.Uint() == 0
    +	case reflect.Float32, reflect.Float64:
    +		return v.Float() == 0
    +	case reflect.Interface, reflect.Ptr:
    +		return v.IsNil()
    +	}
    +	return false
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/xml/read.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/xml/read.go
    new file mode 100644
    index 000000000..fe35fce6c
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/xml/read.go
    @@ -0,0 +1,781 @@
    +// Copyright 2009 The Go Authors.  All rights reserved.
    +// Use of this source code is governed by a BSD-style
    +// license that can be found in the LICENSE file.
    +
    +package xml
    +
    +import (
    +	"bytes"
    +	"encoding"
    +	"errors"
    +	"fmt"
    +	"reflect"
    +	"strconv"
    +	"strings"
    +)
    +
    +// BUG(rsc): Mapping between XML elements and data structures is inherently flawed:
    +// an XML element is an order-dependent collection of anonymous
    +// values, while a data structure is an order-independent collection
    +// of named values.
    +// See package json for a textual representation more suitable
    +// to data structures.
    +
    +// Unmarshal parses the XML-encoded data and stores the result in
    +// the value pointed to by v, which must be an arbitrary struct,
    +// slice, or string. Well-formed data that does not fit into v is
    +// discarded.
    +//
    +// Because Unmarshal uses the reflect package, it can only assign
    +// to exported (upper case) fields.  Unmarshal uses a case-sensitive
    +// comparison to match XML element names to tag values and struct
    +// field names.
    +//
    +// Unmarshal maps an XML element to a struct using the following rules.
    +// In the rules, the tag of a field refers to the value associated with the
    +// key 'xml' in the struct field's tag (see the example above).
    +//
    +//   * If the struct has a field of type []byte or string with tag
    +//      ",innerxml", Unmarshal accumulates the raw XML nested inside the
    +//      element in that field.  The rest of the rules still apply.
    +//
    +//   * If the struct has a field named XMLName of type xml.Name,
    +//      Unmarshal records the element name in that field.
    +//
    +//   * If the XMLName field has an associated tag of the form
    +//      "name" or "namespace-URL name", the XML element must have
    +//      the given name (and, optionally, name space) or else Unmarshal
    +//      returns an error.
    +//
    +//   * If the XML element has an attribute whose name matches a
    +//      struct field name with an associated tag containing ",attr" or
    +//      the explicit name in a struct field tag of the form "name,attr",
    +//      Unmarshal records the attribute value in that field.
    +//
    +//   * If the XML element contains character data, that data is
    +//      accumulated in the first struct field that has tag ",chardata".
    +//      The struct field may have type []byte or string.
    +//      If there is no such field, the character data is discarded.
    +//
    +//   * If the XML element contains comments, they are accumulated in
    +//      the first struct field that has tag ",comment".  The struct
    +//      field may have type []byte or string.  If there is no such
    +//      field, the comments are discarded.
    +//
    +//   * If the XML element contains a sub-element whose name matches
    +//      the prefix of a tag formatted as "a" or "a>b>c", unmarshal
    +//      will descend into the XML structure looking for elements with the
    +//      given names, and will map the innermost elements to that struct
    +//      field. A tag starting with ">" is equivalent to one starting
    +//      with the field name followed by ">".
    +//
    +//   * If the XML element contains a sub-element whose name matches
    +//      a struct field's XMLName tag and the struct field has no
    +//      explicit name tag as per the previous rule, unmarshal maps
    +//      the sub-element to that struct field.
    +//
    +//   * If the XML element contains a sub-element whose name matches a
    +//      field without any mode flags (",attr", ",chardata", etc), Unmarshal
    +//      maps the sub-element to that struct field.
    +//
    +//   * If the XML element contains a sub-element that hasn't matched any
    +//      of the above rules and the struct has a field with tag ",any",
    +//      unmarshal maps the sub-element to that struct field.
    +//
    +//   * An anonymous struct field is handled as if the fields of its
    +//      value were part of the outer struct.
    +//
    +//   * A struct field with tag "-" is never unmarshalled into.
    +//
    +// Unmarshal maps an XML element to a string or []byte by saving the
    +// concatenation of that element's character data in the string or
    +// []byte. The saved []byte is never nil.
    +//
    +// Unmarshal maps an attribute value to a string or []byte by saving
    +// the value in the string or slice.
    +//
    +// Unmarshal maps an XML element to a slice by extending the length of
    +// the slice and mapping the element to the newly created value.
    +//
    +// Unmarshal maps an XML element or attribute value to a bool by
    +// setting it to the boolean value represented by the string.
    +//
    +// Unmarshal maps an XML element or attribute value to an integer or
    +// floating-point field by setting the field to the result of
    +// interpreting the string value in decimal.  There is no check for
    +// overflow.
    +//
    +// Unmarshal maps an XML element to an xml.Name by recording the
    +// element name.
    +//
    +// Unmarshal maps an XML element to a pointer by setting the pointer
    +// to a freshly allocated value and then mapping the element to that value.
    +//
    +func Unmarshal(data []byte, v interface{}) error {
    +	return NewDecoder(bytes.NewReader(data)).Decode(v)
    +}
    +
    +// Decode works like xml.Unmarshal, except it reads the decoder
    +// stream to find the start element.
    +func (d *Decoder) Decode(v interface{}) error {
    +	return d.DecodeElement(v, nil)
    +}
    +
    +// DecodeElement works like xml.Unmarshal except that it takes
    +// a pointer to the start XML element to decode into v.
    +// It is useful when a client reads some raw XML tokens itself
    +// but also wants to defer to Unmarshal for some elements.
    +func (d *Decoder) DecodeElement(v interface{}, start *StartElement) error {
    +	val := reflect.ValueOf(v)
    +	if val.Kind() != reflect.Ptr {
    +		return errors.New("non-pointer passed to Unmarshal")
    +	}
    +	return d.unmarshal(val.Elem(), start)
    +}
    +
    +// An UnmarshalError represents an error in the unmarshalling process.
    +type UnmarshalError string
    +
    +func (e UnmarshalError) Error() string { return string(e) }
    +
    +// Unmarshaler is the interface implemented by objects that can unmarshal
    +// an XML element description of themselves.
    +//
    +// UnmarshalXML decodes a single XML element
    +// beginning with the given start element.
    +// If it returns an error, the outer call to Unmarshal stops and
    +// returns that error.
    +// UnmarshalXML must consume exactly one XML element.
    +// One common implementation strategy is to unmarshal into
    +// a separate value with a layout matching the expected XML
    +// using d.DecodeElement,  and then to copy the data from
    +// that value into the receiver.
    +// Another common strategy is to use d.Token to process the
    +// XML object one token at a time.
    +// UnmarshalXML may not use d.RawToken.
    +type Unmarshaler interface {
    +	UnmarshalXML(d *Decoder, start StartElement) error
    +}
    +
    +// UnmarshalerAttr is the interface implemented by objects that can unmarshal
    +// an XML attribute description of themselves.
    +//
    +// UnmarshalXMLAttr decodes a single XML attribute.
    +// If it returns an error, the outer call to Unmarshal stops and
    +// returns that error.
    +// UnmarshalXMLAttr is used only for struct fields with the
    +// "attr" option in the field tag.
    +type UnmarshalerAttr interface {
    +	UnmarshalXMLAttr(attr Attr) error
    +}
    +
    +// receiverType returns the receiver type to use in an expression like "%s.MethodName".
    +func receiverType(val interface{}) string {
    +	t := reflect.TypeOf(val)
    +	if t.Name() != "" {
    +		return t.String()
    +	}
    +	return "(" + t.String() + ")"
    +}
    +
    +// unmarshalInterface unmarshals a single XML element into val.
    +// start is the opening tag of the element.
    +func (p *Decoder) unmarshalInterface(val Unmarshaler, start *StartElement) error {
    +	// Record that decoder must stop at end tag corresponding to start.
    +	p.pushEOF()
    +
    +	p.unmarshalDepth++
    +	err := val.UnmarshalXML(p, *start)
    +	p.unmarshalDepth--
    +	if err != nil {
    +		p.popEOF()
    +		return err
    +	}
    +
    +	if !p.popEOF() {
    +		return fmt.Errorf("xml: %s.UnmarshalXML did not consume entire <%s> element", receiverType(val), start.Name.Local)
    +	}
    +
    +	return nil
    +}
    +
    +// unmarshalTextInterface unmarshals a single XML element into val.
    +// The chardata contained in the element (but not its children)
    +// is passed to the text unmarshaler.
    +func (p *Decoder) unmarshalTextInterface(val encoding.TextUnmarshaler, start *StartElement) error {
    +	var buf []byte
    +	depth := 1
    +	for depth > 0 {
    +		t, err := p.Token()
    +		if err != nil {
    +			return err
    +		}
    +		switch t := t.(type) {
    +		case CharData:
    +			if depth == 1 {
    +				buf = append(buf, t...)
    +			}
    +		case StartElement:
    +			depth++
    +		case EndElement:
    +			depth--
    +		}
    +	}
    +	return val.UnmarshalText(buf)
    +}
    +
    +// unmarshalAttr unmarshals a single XML attribute into val.
    +func (p *Decoder) unmarshalAttr(val reflect.Value, attr Attr) error {
    +	if val.Kind() == reflect.Ptr {
    +		if val.IsNil() {
    +			val.Set(reflect.New(val.Type().Elem()))
    +		}
    +		val = val.Elem()
    +	}
    +
    +	if val.CanInterface() && val.Type().Implements(unmarshalerAttrType) {
    +		// This is an unmarshaler with a non-pointer receiver,
    +		// so it's likely to be incorrect, but we do what we're told.
    +		return val.Interface().(UnmarshalerAttr).UnmarshalXMLAttr(attr)
    +	}
    +	if val.CanAddr() {
    +		pv := val.Addr()
    +		if pv.CanInterface() && pv.Type().Implements(unmarshalerAttrType) {
    +			return pv.Interface().(UnmarshalerAttr).UnmarshalXMLAttr(attr)
    +		}
    +	}
    +
    +	// Not an UnmarshalerAttr; try encoding.TextUnmarshaler.
    +	if val.CanInterface() && val.Type().Implements(textUnmarshalerType) {
    +		// This is an unmarshaler with a non-pointer receiver,
    +		// so it's likely to be incorrect, but we do what we're told.
    +		return val.Interface().(encoding.TextUnmarshaler).UnmarshalText([]byte(attr.Value))
    +	}
    +	if val.CanAddr() {
    +		pv := val.Addr()
    +		if pv.CanInterface() && pv.Type().Implements(textUnmarshalerType) {
    +			return pv.Interface().(encoding.TextUnmarshaler).UnmarshalText([]byte(attr.Value))
    +		}
    +	}
    +
    +	copyValue(val, []byte(attr.Value))
    +	return nil
    +}
    +
    +var (
    +	unmarshalerType     = reflect.TypeOf((*Unmarshaler)(nil)).Elem()
    +	unmarshalerAttrType = reflect.TypeOf((*UnmarshalerAttr)(nil)).Elem()
    +	textUnmarshalerType = reflect.TypeOf((*encoding.TextUnmarshaler)(nil)).Elem()
    +)
    +
    +// Find reflect.Type for an element's type attribute.
    +func (p *Decoder) typeForElement(val reflect.Value, start *StartElement) reflect.Type {
    +	t := ""
    +	for i, a := range start.Attr {
    +		if a.Name == xmlSchemaInstance || a.Name == xsiType {
    +			t = a.Value
    +			// HACK: ensure xsi:type is last in the list to avoid using that value for
    +			// a "type" attribute, such as ManagedObjectReference.Type for example.
    +			// Note that xsi:type is already the last attribute in VC/ESX responses.
    +			// This is only an issue with govmomi simulator generated responses.
    +			// Proper fix will require finding a few needles in this xml package haystack.
    +			// Note: govmomi uses xmlSchemaInstance, other clients (e.g. rbvmomi) use xsiType.
    +			// They are the same thing to XML parsers, but not to this hack here.
    +			x := len(start.Attr) - 1
    +			if i != x {
    +				start.Attr[i] = start.Attr[x]
    +				start.Attr[x] = a
    +			}
    +			break
    +		}
    +	}
    +
    +	if t == "" {
    +		// No type attribute; fall back to looking up type by interface name.
    +		t = val.Type().Name()
    +	}
    +
    +	// Maybe the type is a basic xsd:* type.
    +	typ := stringToType(t)
    +	if typ != nil {
    +		return typ
    +	}
    +
    +	// Maybe the type is a custom type.
    +	if p.TypeFunc != nil {
    +		if typ, ok := p.TypeFunc(t); ok {
    +			return typ
    +		}
    +	}
    +
    +	return nil
    +}
    +
    +// Unmarshal a single XML element into val.
    +func (p *Decoder) unmarshal(val reflect.Value, start *StartElement) error {
    +	// Find start element if we need it.
    +	if start == nil {
    +		for {
    +			tok, err := p.Token()
    +			if err != nil {
    +				return err
    +			}
    +			if t, ok := tok.(StartElement); ok {
    +				start = &t
    +				break
    +			}
    +		}
    +	}
    +
    +	// Try to figure out type for empty interface values.
    +	if val.Kind() == reflect.Interface && val.IsNil() {
    +		typ := p.typeForElement(val, start)
    +		if typ != nil {
    +			pval := reflect.New(typ).Elem()
    +			err := p.unmarshal(pval, start)
    +			if err != nil {
    +				return err
    +			}
    +
    +			for i := 0; i < 2; i++ {
    +				if typ.Implements(val.Type()) {
    +					val.Set(pval)
    +					return nil
    +				}
    +
    +				typ = reflect.PtrTo(typ)
    +				pval = pval.Addr()
    +			}
    +
    +			val.Set(pval)
    +			return nil
    +		}
    +	}
    +
    +	// Load value from interface, but only if the result will be
    +	// usefully addressable.
    +	if val.Kind() == reflect.Interface && !val.IsNil() {
    +		e := val.Elem()
    +		if e.Kind() == reflect.Ptr && !e.IsNil() {
    +			val = e
    +		}
    +	}
    +
    +	if val.Kind() == reflect.Ptr {
    +		if val.IsNil() {
    +			val.Set(reflect.New(val.Type().Elem()))
    +		}
    +		val = val.Elem()
    +	}
    +
    +	if val.CanInterface() && val.Type().Implements(unmarshalerType) {
    +		// This is an unmarshaler with a non-pointer receiver,
    +		// so it's likely to be incorrect, but we do what we're told.
    +		return p.unmarshalInterface(val.Interface().(Unmarshaler), start)
    +	}
    +
    +	if val.CanAddr() {
    +		pv := val.Addr()
    +		if pv.CanInterface() && pv.Type().Implements(unmarshalerType) {
    +			return p.unmarshalInterface(pv.Interface().(Unmarshaler), start)
    +		}
    +	}
    +
    +	if val.CanInterface() && val.Type().Implements(textUnmarshalerType) {
    +		return p.unmarshalTextInterface(val.Interface().(encoding.TextUnmarshaler), start)
    +	}
    +
    +	if val.CanAddr() {
    +		pv := val.Addr()
    +		if pv.CanInterface() && pv.Type().Implements(textUnmarshalerType) {
    +			return p.unmarshalTextInterface(pv.Interface().(encoding.TextUnmarshaler), start)
    +		}
    +	}
    +
    +	var (
    +		data         []byte
    +		saveData     reflect.Value
    +		comment      []byte
    +		saveComment  reflect.Value
    +		saveXML      reflect.Value
    +		saveXMLIndex int
    +		saveXMLData  []byte
    +		saveAny      reflect.Value
    +		sv           reflect.Value
    +		tinfo        *typeInfo
    +		err          error
    +	)
    +
    +	switch v := val; v.Kind() {
    +	default:
    +		return errors.New("unknown type " + v.Type().String())
    +
    +	case reflect.Interface:
    +		// TODO: For now, simply ignore the field. In the near
    +		//       future we may choose to unmarshal the start
    +		//       element on it, if not nil.
    +		return p.Skip()
    +
    +	case reflect.Slice:
    +		typ := v.Type()
    +		if typ.Elem().Kind() == reflect.Uint8 {
    +			// []byte
    +			saveData = v
    +			break
    +		}
    +
    +		// Slice of element values.
    +		// Grow slice.
    +		n := v.Len()
    +		if n >= v.Cap() {
    +			ncap := 2 * n
    +			if ncap < 4 {
    +				ncap = 4
    +			}
    +			new := reflect.MakeSlice(typ, n, ncap)
    +			reflect.Copy(new, v)
    +			v.Set(new)
    +		}
    +		v.SetLen(n + 1)
    +
    +		// Recur to read element into slice.
    +		if err := p.unmarshal(v.Index(n), start); err != nil {
    +			v.SetLen(n)
    +			return err
    +		}
    +		return nil
    +
    +	case reflect.Bool, reflect.Float32, reflect.Float64, reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr, reflect.String:
    +		saveData = v
    +
    +	case reflect.Struct:
    +		typ := v.Type()
    +		if typ == nameType {
    +			v.Set(reflect.ValueOf(start.Name))
    +			break
    +		}
    +
    +		sv = v
    +		tinfo, err = getTypeInfo(typ)
    +		if err != nil {
    +			return err
    +		}
    +
    +		// Validate and assign element name.
    +		if tinfo.xmlname != nil {
    +			finfo := tinfo.xmlname
    +			if finfo.name != "" && finfo.name != start.Name.Local {
    +				return UnmarshalError("expected element type <" + finfo.name + "> but have <" + start.Name.Local + ">")
    +			}
    +			if finfo.xmlns != "" && finfo.xmlns != start.Name.Space {
    +				e := "expected element <" + finfo.name + "> in name space " + finfo.xmlns + " but have "
    +				if start.Name.Space == "" {
    +					e += "no name space"
    +				} else {
    +					e += start.Name.Space
    +				}
    +				return UnmarshalError(e)
    +			}
    +			fv := finfo.value(sv)
    +			if _, ok := fv.Interface().(Name); ok {
    +				fv.Set(reflect.ValueOf(start.Name))
    +			}
    +		}
    +
    +		// Assign attributes.
    +		// Also, determine whether we need to save character data or comments.
    +		for i := range tinfo.fields {
    +			finfo := &tinfo.fields[i]
    +			switch finfo.flags & fMode {
    +			case fAttr:
    +				strv := finfo.value(sv)
    +				// Look for attribute.
    +				for _, a := range start.Attr {
    +					if a.Name.Local == finfo.name && (finfo.xmlns == "" || finfo.xmlns == a.Name.Space) {
    +						if err := p.unmarshalAttr(strv, a); err != nil {
    +							return err
    +						}
    +						break
    +					}
    +				}
    +
    +			case fCharData:
    +				if !saveData.IsValid() {
    +					saveData = finfo.value(sv)
    +				}
    +
    +			case fComment:
    +				if !saveComment.IsValid() {
    +					saveComment = finfo.value(sv)
    +				}
    +
    +			case fAny, fAny | fElement:
    +				if !saveAny.IsValid() {
    +					saveAny = finfo.value(sv)
    +				}
    +
    +			case fInnerXml:
    +				if !saveXML.IsValid() {
    +					saveXML = finfo.value(sv)
    +					if p.saved == nil {
    +						saveXMLIndex = 0
    +						p.saved = new(bytes.Buffer)
    +					} else {
    +						saveXMLIndex = p.savedOffset()
    +					}
    +				}
    +			}
    +		}
    +	}
    +
    +	// Find end element.
    +	// Process sub-elements along the way.
    +Loop:
    +	for {
    +		var savedOffset int
    +		if saveXML.IsValid() {
    +			savedOffset = p.savedOffset()
    +		}
    +		tok, err := p.Token()
    +		if err != nil {
    +			return err
    +		}
    +		switch t := tok.(type) {
    +		case StartElement:
    +			consumed := false
    +			if sv.IsValid() {
    +				consumed, err = p.unmarshalPath(tinfo, sv, nil, &t)
    +				if err != nil {
    +					return err
    +				}
    +				if !consumed && saveAny.IsValid() {
    +					consumed = true
    +					if err := p.unmarshal(saveAny, &t); err != nil {
    +						return err
    +					}
    +				}
    +			}
    +			if !consumed {
    +				if err := p.Skip(); err != nil {
    +					return err
    +				}
    +			}
    +
    +		case EndElement:
    +			if saveXML.IsValid() {
    +				saveXMLData = p.saved.Bytes()[saveXMLIndex:savedOffset]
    +				if saveXMLIndex == 0 {
    +					p.saved = nil
    +				}
    +			}
    +			break Loop
    +
    +		case CharData:
    +			if saveData.IsValid() {
    +				data = append(data, t...)
    +			}
    +
    +		case Comment:
    +			if saveComment.IsValid() {
    +				comment = append(comment, t...)
    +			}
    +		}
    +	}
    +
    +	if saveData.IsValid() && saveData.CanInterface() && saveData.Type().Implements(textUnmarshalerType) {
    +		if err := saveData.Interface().(encoding.TextUnmarshaler).UnmarshalText(data); err != nil {
    +			return err
    +		}
    +		saveData = reflect.Value{}
    +	}
    +
    +	if saveData.IsValid() && saveData.CanAddr() {
    +		pv := saveData.Addr()
    +		if pv.CanInterface() && pv.Type().Implements(textUnmarshalerType) {
    +			if err := pv.Interface().(encoding.TextUnmarshaler).UnmarshalText(data); err != nil {
    +				return err
    +			}
    +			saveData = reflect.Value{}
    +		}
    +	}
    +
    +	if err := copyValue(saveData, data); err != nil {
    +		return err
    +	}
    +
    +	switch t := saveComment; t.Kind() {
    +	case reflect.String:
    +		t.SetString(string(comment))
    +	case reflect.Slice:
    +		t.Set(reflect.ValueOf(comment))
    +	}
    +
    +	switch t := saveXML; t.Kind() {
    +	case reflect.String:
    +		t.SetString(string(saveXMLData))
    +	case reflect.Slice:
    +		t.Set(reflect.ValueOf(saveXMLData))
    +	}
    +
    +	return nil
    +}
    +
    +func copyValue(dst reflect.Value, src []byte) (err error) {
    +	dst0 := dst
    +
    +	if dst.Kind() == reflect.Ptr {
    +		if dst.IsNil() {
    +			dst.Set(reflect.New(dst.Type().Elem()))
    +		}
    +		dst = dst.Elem()
    +	}
    +
    +	// Save accumulated data.
    +	switch dst.Kind() {
    +	case reflect.Invalid:
    +		// Probably a comment.
    +	default:
    +		return errors.New("cannot unmarshal into " + dst0.Type().String())
    +	case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
    +		itmp, err := strconv.ParseInt(string(src), 10, dst.Type().Bits())
    +		if err != nil {
    +			return err
    +		}
    +		dst.SetInt(itmp)
    +	case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
    +		var utmp uint64
    +		if len(src) > 0 && src[0] == '-' {
    +			// Negative value for unsigned field.
    +			// Assume it was serialized following two's complement.
    +			itmp, err := strconv.ParseInt(string(src), 10, dst.Type().Bits())
    +			if err != nil {
    +				return err
    +			}
    +			// Reinterpret value based on type width.
    +			switch dst.Type().Bits() {
    +			case 8:
    +				utmp = uint64(uint8(itmp))
    +			case 16:
    +				utmp = uint64(uint16(itmp))
    +			case 32:
    +				utmp = uint64(uint32(itmp))
    +			case 64:
    +				utmp = uint64(uint64(itmp))
    +			}
    +		} else {
    +			utmp, err = strconv.ParseUint(string(src), 10, dst.Type().Bits())
    +			if err != nil {
    +				return err
    +			}
    +		}
    +		dst.SetUint(utmp)
    +	case reflect.Float32, reflect.Float64:
    +		ftmp, err := strconv.ParseFloat(string(src), dst.Type().Bits())
    +		if err != nil {
    +			return err
    +		}
    +		dst.SetFloat(ftmp)
    +	case reflect.Bool:
    +		value, err := strconv.ParseBool(strings.TrimSpace(string(src)))
    +		if err != nil {
    +			return err
    +		}
    +		dst.SetBool(value)
    +	case reflect.String:
    +		dst.SetString(string(src))
    +	case reflect.Slice:
    +		if len(src) == 0 {
    +			// non-nil to flag presence
    +			src = []byte{}
    +		}
    +		dst.SetBytes(src)
    +	}
    +	return nil
    +}
    +
    +// unmarshalPath walks down an XML structure looking for wanted
    +// paths, and calls unmarshal on them.
    +// The consumed result tells whether XML elements have been consumed
    +// from the Decoder until start's matching end element, or if it's
    +// still untouched because start is uninteresting for sv's fields.
    +func (p *Decoder) unmarshalPath(tinfo *typeInfo, sv reflect.Value, parents []string, start *StartElement) (consumed bool, err error) {
    +	recurse := false
    +Loop:
    +	for i := range tinfo.fields {
    +		finfo := &tinfo.fields[i]
    +		if finfo.flags&fElement == 0 || len(finfo.parents) < len(parents) || finfo.xmlns != "" && finfo.xmlns != start.Name.Space {
    +			continue
    +		}
    +		for j := range parents {
    +			if parents[j] != finfo.parents[j] {
    +				continue Loop
    +			}
    +		}
    +		if len(finfo.parents) == len(parents) && finfo.name == start.Name.Local {
    +			// It's a perfect match, unmarshal the field.
    +			return true, p.unmarshal(finfo.value(sv), start)
    +		}
    +		if len(finfo.parents) > len(parents) && finfo.parents[len(parents)] == start.Name.Local {
    +			// It's a prefix for the field. Break and recurse
    +			// since it's not ok for one field path to be itself
    +			// the prefix for another field path.
    +			recurse = true
    +
    +			// We can reuse the same slice as long as we
    +			// don't try to append to it.
    +			parents = finfo.parents[:len(parents)+1]
    +			break
    +		}
    +	}
    +	if !recurse {
    +		// We have no business with this element.
    +		return false, nil
    +	}
    +	// The element is not a perfect match for any field, but one
    +	// or more fields have the path to this element as a parent
    +	// prefix. Recurse and attempt to match these.
    +	for {
    +		var tok Token
    +		tok, err = p.Token()
    +		if err != nil {
    +			return true, err
    +		}
    +		switch t := tok.(type) {
    +		case StartElement:
    +			consumed2, err := p.unmarshalPath(tinfo, sv, parents, &t)
    +			if err != nil {
    +				return true, err
    +			}
    +			if !consumed2 {
    +				if err := p.Skip(); err != nil {
    +					return true, err
    +				}
    +			}
    +		case EndElement:
    +			return true, nil
    +		}
    +	}
    +}
    +
    +// Skip reads tokens until it has consumed the end element
    +// matching the most recent start element already consumed.
    +// It recurs if it encounters a start element, so it can be used to
    +// skip nested structures.
    +// It returns nil if it finds an end element matching the start
    +// element; otherwise it returns an error describing the problem.
    +func (d *Decoder) Skip() error {
    +	for {
    +		tok, err := d.Token()
    +		if err != nil {
    +			return err
    +		}
    +		switch tok.(type) {
    +		case StartElement:
    +			if err := d.Skip(); err != nil {
    +				return err
    +			}
    +		case EndElement:
    +			return nil
    +		}
    +	}
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/xml/typeinfo.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/xml/typeinfo.go
    new file mode 100644
    index 000000000..086e83b69
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/xml/typeinfo.go
    @@ -0,0 +1,366 @@
    +// Copyright 2011 The Go Authors.  All rights reserved.
    +// Use of this source code is governed by a BSD-style
    +// license that can be found in the LICENSE file.
    +
    +package xml
    +
    +import (
    +	"fmt"
    +	"reflect"
    +	"strings"
    +	"sync"
    +)
    +
    +// typeInfo holds details for the xml representation of a type.
    +type typeInfo struct {
    +	xmlname *fieldInfo
    +	fields  []fieldInfo
    +}
    +
    +// fieldInfo holds details for the xml representation of a single field.
    +type fieldInfo struct {
    +	idx     []int
    +	name    string
    +	xmlns   string
    +	flags   fieldFlags
    +	parents []string
    +}
    +
    +type fieldFlags int
    +
    +const (
    +	fElement fieldFlags = 1 << iota
    +	fAttr
    +	fCharData
    +	fInnerXml
    +	fComment
    +	fAny
    +
    +	fOmitEmpty
    +	fTypeAttr
    +
    +	fMode = fElement | fAttr | fCharData | fInnerXml | fComment | fAny
    +)
    +
    +var tinfoMap = make(map[reflect.Type]*typeInfo)
    +var tinfoLock sync.RWMutex
    +
    +var nameType = reflect.TypeOf(Name{})
    +
    +// getTypeInfo returns the typeInfo structure with details necessary
    +// for marshalling and unmarshalling typ.
    +func getTypeInfo(typ reflect.Type) (*typeInfo, error) {
    +	tinfoLock.RLock()
    +	tinfo, ok := tinfoMap[typ]
    +	tinfoLock.RUnlock()
    +	if ok {
    +		return tinfo, nil
    +	}
    +	tinfo = &typeInfo{}
    +	if typ.Kind() == reflect.Struct && typ != nameType {
    +		n := typ.NumField()
    +		for i := 0; i < n; i++ {
    +			f := typ.Field(i)
    +			if f.PkgPath != "" || f.Tag.Get("xml") == "-" {
    +				continue // Private field
    +			}
    +
    +			// For embedded structs, embed its fields.
    +			if f.Anonymous {
    +				t := f.Type
    +				if t.Kind() == reflect.Ptr {
    +					t = t.Elem()
    +				}
    +				if t.Kind() == reflect.Struct {
    +					inner, err := getTypeInfo(t)
    +					if err != nil {
    +						return nil, err
    +					}
    +					if tinfo.xmlname == nil {
    +						tinfo.xmlname = inner.xmlname
    +					}
    +					for _, finfo := range inner.fields {
    +						finfo.idx = append([]int{i}, finfo.idx...)
    +						if err := addFieldInfo(typ, tinfo, &finfo); err != nil {
    +							return nil, err
    +						}
    +					}
    +					continue
    +				}
    +			}
    +
    +			finfo, err := structFieldInfo(typ, &f)
    +			if err != nil {
    +				return nil, err
    +			}
    +
    +			if f.Name == "XMLName" {
    +				tinfo.xmlname = finfo
    +				continue
    +			}
    +
    +			// Add the field if it doesn't conflict with other fields.
    +			if err := addFieldInfo(typ, tinfo, finfo); err != nil {
    +				return nil, err
    +			}
    +		}
    +	}
    +	tinfoLock.Lock()
    +	tinfoMap[typ] = tinfo
    +	tinfoLock.Unlock()
    +	return tinfo, nil
    +}
    +
    +// structFieldInfo builds and returns a fieldInfo for f.
    +func structFieldInfo(typ reflect.Type, f *reflect.StructField) (*fieldInfo, error) {
    +	finfo := &fieldInfo{idx: f.Index}
    +
    +	// Split the tag from the xml namespace if necessary.
    +	tag := f.Tag.Get("xml")
    +	if i := strings.Index(tag, " "); i >= 0 {
    +		finfo.xmlns, tag = tag[:i], tag[i+1:]
    +	}
    +
    +	// Parse flags.
    +	tokens := strings.Split(tag, ",")
    +	if len(tokens) == 1 {
    +		finfo.flags = fElement
    +	} else {
    +		tag = tokens[0]
    +		for _, flag := range tokens[1:] {
    +			switch flag {
    +			case "attr":
    +				finfo.flags |= fAttr
    +			case "chardata":
    +				finfo.flags |= fCharData
    +			case "innerxml":
    +				finfo.flags |= fInnerXml
    +			case "comment":
    +				finfo.flags |= fComment
    +			case "any":
    +				finfo.flags |= fAny
    +			case "omitempty":
    +				finfo.flags |= fOmitEmpty
    +			case "typeattr":
    +				finfo.flags |= fTypeAttr
    +			}
    +		}
    +
    +		// Validate the flags used.
    +		valid := true
    +		switch mode := finfo.flags & fMode; mode {
    +		case 0:
    +			finfo.flags |= fElement
    +		case fAttr, fCharData, fInnerXml, fComment, fAny:
    +			if f.Name == "XMLName" || tag != "" && mode != fAttr {
    +				valid = false
    +			}
    +		default:
    +			// This will also catch multiple modes in a single field.
    +			valid = false
    +		}
    +		if finfo.flags&fMode == fAny {
    +			finfo.flags |= fElement
    +		}
    +		if finfo.flags&fOmitEmpty != 0 && finfo.flags&(fElement|fAttr) == 0 {
    +			valid = false
    +		}
    +		if !valid {
    +			return nil, fmt.Errorf("xml: invalid tag in field %s of type %s: %q",
    +				f.Name, typ, f.Tag.Get("xml"))
    +		}
    +	}
    +
    +	// Use of xmlns without a name is not allowed.
    +	if finfo.xmlns != "" && tag == "" {
    +		return nil, fmt.Errorf("xml: namespace without name in field %s of type %s: %q",
    +			f.Name, typ, f.Tag.Get("xml"))
    +	}
    +
    +	if f.Name == "XMLName" {
    +		// The XMLName field records the XML element name. Don't
    +		// process it as usual because its name should default to
    +		// empty rather than to the field name.
    +		finfo.name = tag
    +		return finfo, nil
    +	}
    +
    +	if tag == "" {
    +		// If the name part of the tag is completely empty, get
    +		// default from XMLName of underlying struct if feasible,
    +		// or field name otherwise.
    +		if xmlname := lookupXMLName(f.Type); xmlname != nil {
    +			finfo.xmlns, finfo.name = xmlname.xmlns, xmlname.name
    +		} else {
    +			finfo.name = f.Name
    +		}
    +		return finfo, nil
    +	}
    +
    +	// Prepare field name and parents.
    +	parents := strings.Split(tag, ">")
    +	if parents[0] == "" {
    +		parents[0] = f.Name
    +	}
    +	if parents[len(parents)-1] == "" {
    +		return nil, fmt.Errorf("xml: trailing '>' in field %s of type %s", f.Name, typ)
    +	}
    +	finfo.name = parents[len(parents)-1]
    +	if len(parents) > 1 {
    +		if (finfo.flags & fElement) == 0 {
    +			return nil, fmt.Errorf("xml: %s chain not valid with %s flag", tag, strings.Join(tokens[1:], ","))
    +		}
    +		finfo.parents = parents[:len(parents)-1]
    +	}
    +
    +	// If the field type has an XMLName field, the names must match
    +	// so that the behavior of both marshalling and unmarshalling
    +	// is straightforward and unambiguous.
    +	if finfo.flags&fElement != 0 {
    +		ftyp := f.Type
    +		xmlname := lookupXMLName(ftyp)
    +		if xmlname != nil && xmlname.name != finfo.name {
    +			return nil, fmt.Errorf("xml: name %q in tag of %s.%s conflicts with name %q in %s.XMLName",
    +				finfo.name, typ, f.Name, xmlname.name, ftyp)
    +		}
    +	}
    +	return finfo, nil
    +}
    +
    +// lookupXMLName returns the fieldInfo for typ's XMLName field
    +// in case it exists and has a valid xml field tag, otherwise
    +// it returns nil.
    +func lookupXMLName(typ reflect.Type) (xmlname *fieldInfo) {
    +	for typ.Kind() == reflect.Ptr {
    +		typ = typ.Elem()
    +	}
    +	if typ.Kind() != reflect.Struct {
    +		return nil
    +	}
    +	for i, n := 0, typ.NumField(); i < n; i++ {
    +		f := typ.Field(i)
    +		if f.Name != "XMLName" {
    +			continue
    +		}
    +		finfo, err := structFieldInfo(typ, &f)
    +		if finfo.name != "" && err == nil {
    +			return finfo
    +		}
    +		// Also consider errors as a non-existent field tag
    +		// and let getTypeInfo itself report the error.
    +		break
    +	}
    +	return nil
    +}
    +
    +func min(a, b int) int {
    +	if a <= b {
    +		return a
    +	}
    +	return b
    +}
    +
    +// addFieldInfo adds finfo to tinfo.fields if there are no
    +// conflicts, or if conflicts arise from previous fields that were
    +// obtained from deeper embedded structures than finfo. In the latter
    +// case, the conflicting entries are dropped.
    +// A conflict occurs when the path (parent + name) to a field is
    +// itself a prefix of another path, or when two paths match exactly.
    +// It is okay for field paths to share a common, shorter prefix.
    +func addFieldInfo(typ reflect.Type, tinfo *typeInfo, newf *fieldInfo) error {
    +	var conflicts []int
    +Loop:
    +	// First, figure all conflicts. Most working code will have none.
    +	for i := range tinfo.fields {
    +		oldf := &tinfo.fields[i]
    +		if oldf.flags&fMode != newf.flags&fMode {
    +			continue
    +		}
    +		if oldf.xmlns != "" && newf.xmlns != "" && oldf.xmlns != newf.xmlns {
    +			continue
    +		}
    +		minl := min(len(newf.parents), len(oldf.parents))
    +		for p := 0; p < minl; p++ {
    +			if oldf.parents[p] != newf.parents[p] {
    +				continue Loop
    +			}
    +		}
    +		if len(oldf.parents) > len(newf.parents) {
    +			if oldf.parents[len(newf.parents)] == newf.name {
    +				conflicts = append(conflicts, i)
    +			}
    +		} else if len(oldf.parents) < len(newf.parents) {
    +			if newf.parents[len(oldf.parents)] == oldf.name {
    +				conflicts = append(conflicts, i)
    +			}
    +		} else {
    +			if newf.name == oldf.name {
    +				conflicts = append(conflicts, i)
    +			}
    +		}
    +	}
    +	// Without conflicts, add the new field and return.
    +	if conflicts == nil {
    +		tinfo.fields = append(tinfo.fields, *newf)
    +		return nil
    +	}
    +
    +	// If any conflict is shallower, ignore the new field.
    +	// This matches the Go field resolution on embedding.
    +	for _, i := range conflicts {
    +		if len(tinfo.fields[i].idx) < len(newf.idx) {
    +			return nil
    +		}
    +	}
    +
    +	// Otherwise, if any of them is at the same depth level, it's an error.
    +	for _, i := range conflicts {
    +		oldf := &tinfo.fields[i]
    +		if len(oldf.idx) == len(newf.idx) {
    +			f1 := typ.FieldByIndex(oldf.idx)
    +			f2 := typ.FieldByIndex(newf.idx)
    +			return &TagPathError{typ, f1.Name, f1.Tag.Get("xml"), f2.Name, f2.Tag.Get("xml")}
    +		}
    +	}
    +
    +	// Otherwise, the new field is shallower, and thus takes precedence,
    +	// so drop the conflicting fields from tinfo and append the new one.
    +	for c := len(conflicts) - 1; c >= 0; c-- {
    +		i := conflicts[c]
    +		copy(tinfo.fields[i:], tinfo.fields[i+1:])
    +		tinfo.fields = tinfo.fields[:len(tinfo.fields)-1]
    +	}
    +	tinfo.fields = append(tinfo.fields, *newf)
    +	return nil
    +}
    +
    +// A TagPathError represents an error in the unmarshalling process
    +// caused by the use of field tags with conflicting paths.
    +type TagPathError struct {
    +	Struct       reflect.Type
    +	Field1, Tag1 string
    +	Field2, Tag2 string
    +}
    +
    +func (e *TagPathError) Error() string {
    +	return fmt.Sprintf("%s field %q with tag %q conflicts with field %q with tag %q", e.Struct, e.Field1, e.Tag1, e.Field2, e.Tag2)
    +}
    +
    +// value returns v's field value corresponding to finfo.
    +// It's equivalent to v.FieldByIndex(finfo.idx), but initializes
    +// and dereferences pointers as necessary.
    +func (finfo *fieldInfo) value(v reflect.Value) reflect.Value {
    +	for i, x := range finfo.idx {
    +		if i > 0 {
    +			t := v.Type()
    +			if t.Kind() == reflect.Ptr && t.Elem().Kind() == reflect.Struct {
    +				if v.IsNil() {
    +					v.Set(reflect.New(v.Type().Elem()))
    +				}
    +				v = v.Elem()
    +			}
    +		}
    +		v = v.Field(x)
    +	}
    +	return v
    +}
    diff --git a/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/xml/xml.go b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/xml/xml.go
    new file mode 100644
    index 000000000..6c6c5c821
    --- /dev/null
    +++ b/vendor/github.com/hashicorp/go-discover/provider/vsphere/vendor/github.com/vmware/govmomi/vim25/xml/xml.go
    @@ -0,0 +1,1939 @@
    +// Copyright 2009 The Go Authors. All rights reserved.
    +// Use of this source code is governed by a BSD-style
    +// license that can be found in the LICENSE file.
    +
    +// Package xml implements a simple XML 1.0 parser that
    +// understands XML name spaces.
    +package xml
    +
    +// References:
    +//    Annotated XML spec: http://www.xml.com/axml/testaxml.htm
    +//    XML name spaces: http://www.w3.org/TR/REC-xml-names/
    +
    +// TODO(rsc):
    +//	Test error handling.
    +
    +import (
    +	"bufio"
    +	"bytes"
    +	"errors"
    +	"fmt"
    +	"io"
    +	"reflect"
    +	"strconv"
    +	"strings"
    +	"unicode"
    +	"unicode/utf8"
    +)
    +
    +// A SyntaxError represents a syntax error in the XML input stream.
    +type SyntaxError struct {
    +	Msg  string
    +	Line int
    +}
    +
    +func (e *SyntaxError) Error() string {
    +	return "XML syntax error on line " + strconv.Itoa(e.Line) + ": " + e.Msg
    +}
    +
    +// A Name represents an XML name (Local) annotated
    +// with a name space identifier (Space).
    +// In tokens returned by Decoder.Token, the Space identifier
    +// is given as a canonical URL, not the short prefix used
    +// in the document being parsed.
    +type Name struct {
    +	Space, Local string
    +}
    +
    +// An Attr represents an attribute in an XML element (Name=Value).
    +type Attr struct {
    +	Name  Name
    +	Value string
    +}
    +
    +// A Token is an interface holding one of the token types:
    +// StartElement, EndElement, CharData, Comment, ProcInst, or Directive.
    +type Token interface{}
    +
    +// A StartElement represents an XML start element.
    +type StartElement struct {
    +	Name Name
    +	Attr []Attr
    +}
    +
    +func (e StartElement) Copy() StartElement {
    +	attrs := make([]Attr, len(e.Attr))
    +	copy(attrs, e.Attr)
    +	e.Attr = attrs
    +	return e
    +}
    +
    +// End returns the corresponding XML end element.
    +func (e StartElement) End() EndElement {
    +	return EndElement{e.Name}
    +}
    +
    +// An EndElement represents an XML end element.
    +type EndElement struct {
    +	Name Name
    +}
    +
    +// A CharData represents XML character data (raw text),
    +// in which XML escape sequences have been replaced by
    +// the characters they represent.
    +type CharData []byte
    +
    +func makeCopy(b []byte) []byte {
    +	b1 := make([]byte, len(b))
    +	copy(b1, b)
    +	return b1
    +}
    +
    +func (c CharData) Copy() CharData { return CharData(makeCopy(c)) }
    +
    +// A Comment represents an XML comment of the form .
    +// The bytes do not include the  comment markers.
    +type Comment []byte
    +
    +func (c Comment) Copy() Comment { return Comment(makeCopy(c)) }
    +
    +// A ProcInst represents an XML processing instruction of the form 
    +type ProcInst struct {
    +	Target string
    +	Inst   []byte
    +}
    +
    +func (p ProcInst) Copy() ProcInst {
    +	p.Inst = makeCopy(p.Inst)
    +	return p
    +}
    +
    +// A Directive represents an XML directive of the form .
    +// The bytes do not include the  markers.
    +type Directive []byte
    +
    +func (d Directive) Copy() Directive { return Directive(makeCopy(d)) }
    +
    +// CopyToken returns a copy of a Token.
    +func CopyToken(t Token) Token {
    +	switch v := t.(type) {
    +	case CharData:
    +		return v.Copy()
    +	case Comment:
    +		return v.Copy()
    +	case Directive:
    +		return v.Copy()
    +	case ProcInst:
    +		return v.Copy()
    +	case StartElement:
    +		return v.Copy()
    +	}
    +	return t
    +}
    +
    +// A Decoder represents an XML parser reading a particular input stream.
    +// The parser assumes that its input is encoded in UTF-8.
    +type Decoder struct {
    +	// Strict defaults to true, enforcing the requirements
    +	// of the XML specification.
    +	// If set to false, the parser allows input containing common
    +	// mistakes:
    +	//	* If an element is missing an end tag, the parser invents
    +	//	  end tags as necessary to keep the return values from Token
    +	//	  properly balanced.
    +	//	* In attribute values and character data, unknown or malformed
    +	//	  character entities (sequences beginning with &) are left alone.
    +	//
    +	// Setting:
    +	//
    +	//	d.Strict = false;
    +	//	d.AutoClose = HTMLAutoClose;
    +	//	d.Entity = HTMLEntity
    +	//
    +	// creates a parser that can handle typical HTML.
    +	//
    +	// Strict mode does not enforce the requirements of the XML name spaces TR.
    +	// In particular it does not reject name space tags using undefined prefixes.
    +	// Such tags are recorded with the unknown prefix as the name space URL.
    +	Strict bool
    +
    +	// When Strict == false, AutoClose indicates a set of elements to
    +	// consider closed immediately after they are opened, regardless
    +	// of whether an end element is present.
    +	AutoClose []string
    +
    +	// Entity can be used to map non-standard entity names to string replacements.
    +	// The parser behaves as if these standard mappings are present in the map,
    +	// regardless of the actual map content:
    +	//
    +	//	"lt": "<",
    +	//	"gt": ">",
    +	//	"amp": "&",
    +	//	"apos": "'",
    +	//	"quot": `"`,
    +	Entity map[string]string
    +
    +	// CharsetReader, if non-nil, defines a function to generate
    +	// charset-conversion readers, converting from the provided
    +	// non-UTF-8 charset into UTF-8. If CharsetReader is nil or
    +	// returns an error, parsing stops with an error. One of the
    +	// the CharsetReader's result values must be non-nil.
    +	CharsetReader func(charset string, input io.Reader) (io.Reader, error)
    +
    +	// DefaultSpace sets the default name space used for unadorned tags,
    +	// as if the entire XML stream were wrapped in an element containing
    +	// the attribute xmlns="DefaultSpace".
    +	DefaultSpace string
    +
    +	// TypeFunc is used to map type names to actual types.
    +	TypeFunc func(string) (reflect.Type, bool)
    +
    +	r              io.ByteReader
    +	buf            bytes.Buffer
    +	saved          *bytes.Buffer
    +	stk            *stack
    +	free           *stack
    +	needClose      bool
    +	toClose        Name
    +	nextToken      Token
    +	nextByte       int
    +	ns             map[string]string
    +	err            error
    +	line           int
    +	unmarshalDepth int
    +}
    +
    +// NewDecoder creates a new XML parser reading from r.
    +// If r does not implement io.ByteReader, NewDecoder will
    +// do its own buffering.
    +func NewDecoder(r io.Reader) *Decoder {
    +	d := &Decoder{
    +		ns:       make(map[string]string),
    +		nextByte: -1,
    +		line:     1,
    +		Strict:   true,
    +	}
    +	d.switchToReader(r)
    +	return d
    +}
    +
    +// Token returns the next XML token in the input stream.
    +// At the end of the input stream, Token returns nil, io.EOF.
    +//
    +// Slices of bytes in the returned token data refer to the
    +// parser's internal buffer and remain valid only until the next
    +// call to Token.  To acquire a copy of the bytes, call CopyToken
    +// or the token's Copy method.
    +//
    +// Token expands self-closing elements such as 
    +// into separate start and end elements returned by successive calls. +// +// Token guarantees that the StartElement and EndElement +// tokens it returns are properly nested and matched: +// if Token encounters an unexpected end element, +// it will return an error. +// +// Token implements XML name spaces as described by +// http://www.w3.org/TR/REC-xml-names/. Each of the +// Name structures contained in the Token has the Space +// set to the URL identifying its name space when known. +// If Token encounters an unrecognized name space prefix, +// it uses the prefix as the Space rather than report an error. +func (d *Decoder) Token() (t Token, err error) { + if d.stk != nil && d.stk.kind == stkEOF { + err = io.EOF + return + } + if d.nextToken != nil { + t = d.nextToken + d.nextToken = nil + } else if t, err = d.rawToken(); err != nil { + return + } + + if !d.Strict { + if t1, ok := d.autoClose(t); ok { + d.nextToken = t + t = t1 + } + } + switch t1 := t.(type) { + case StartElement: + // In XML name spaces, the translations listed in the + // attributes apply to the element name and + // to the other attribute names, so process + // the translations first. + for _, a := range t1.Attr { + if a.Name.Space == "xmlns" { + v, ok := d.ns[a.Name.Local] + d.pushNs(a.Name.Local, v, ok) + d.ns[a.Name.Local] = a.Value + } + if a.Name.Space == "" && a.Name.Local == "xmlns" { + // Default space for untagged names + v, ok := d.ns[""] + d.pushNs("", v, ok) + d.ns[""] = a.Value + } + } + + d.translate(&t1.Name, true) + for i := range t1.Attr { + d.translate(&t1.Attr[i].Name, false) + } + d.pushElement(t1.Name) + t = t1 + + case EndElement: + d.translate(&t1.Name, true) + if !d.popElement(&t1) { + return nil, d.err + } + t = t1 + } + return +} + +const xmlURL = "http://www.w3.org/XML/1998/namespace" + +// Apply name space translation to name n. +// The default name space (for Space=="") +// applies only to element names, not to attribute names. +func (d *Decoder) translate(n *Name, isElementName bool) { + switch { + case n.Space == "xmlns": + return + case n.Space == "" && !isElementName: + return + case n.Space == "xml": + n.Space = xmlURL + case n.Space == "" && n.Local == "xmlns": + return + } + if v, ok := d.ns[n.Space]; ok { + n.Space = v + } else if n.Space == "" { + n.Space = d.DefaultSpace + } +} + +func (d *Decoder) switchToReader(r io.Reader) { + // Get efficient byte at a time reader. + // Assume that if reader has its own + // ReadByte, it's efficient enough. + // Otherwise, use bufio. + if rb, ok := r.(io.ByteReader); ok { + d.r = rb + } else { + d.r = bufio.NewReader(r) + } +} + +// Parsing state - stack holds old name space translations +// and the current set of open elements. The translations to pop when +// ending a given tag are *below* it on the stack, which is +// more work but forced on us by XML. +type stack struct { + next *stack + kind int + name Name + ok bool +} + +const ( + stkStart = iota + stkNs + stkEOF +) + +func (d *Decoder) push(kind int) *stack { + s := d.free + if s != nil { + d.free = s.next + } else { + s = new(stack) + } + s.next = d.stk + s.kind = kind + d.stk = s + return s +} + +func (d *Decoder) pop() *stack { + s := d.stk + if s != nil { + d.stk = s.next + s.next = d.free + d.free = s + } + return s +} + +// Record that after the current element is finished +// (that element is already pushed on the stack) +// Token should return EOF until popEOF is called. +func (d *Decoder) pushEOF() { + // Walk down stack to find Start. + // It might not be the top, because there might be stkNs + // entries above it. + start := d.stk + for start.kind != stkStart { + start = start.next + } + // The stkNs entries below a start are associated with that + // element too; skip over them. + for start.next != nil && start.next.kind == stkNs { + start = start.next + } + s := d.free + if s != nil { + d.free = s.next + } else { + s = new(stack) + } + s.kind = stkEOF + s.next = start.next + start.next = s +} + +// Undo a pushEOF. +// The element must have been finished, so the EOF should be at the top of the stack. +func (d *Decoder) popEOF() bool { + if d.stk == nil || d.stk.kind != stkEOF { + return false + } + d.pop() + return true +} + +// Record that we are starting an element with the given name. +func (d *Decoder) pushElement(name Name) { + s := d.push(stkStart) + s.name = name +} + +// Record that we are changing the value of ns[local]. +// The old value is url, ok. +func (d *Decoder) pushNs(local string, url string, ok bool) { + s := d.push(stkNs) + s.name.Local = local + s.name.Space = url + s.ok = ok +} + +// Creates a SyntaxError with the current line number. +func (d *Decoder) syntaxError(msg string) error { + return &SyntaxError{Msg: msg, Line: d.line} +} + +// Record that we are ending an element with the given name. +// The name must match the record at the top of the stack, +// which must be a pushElement record. +// After popping the element, apply any undo records from +// the stack to restore the name translations that existed +// before we saw this element. +func (d *Decoder) popElement(t *EndElement) bool { + s := d.pop() + name := t.Name + switch { + case s == nil || s.kind != stkStart: + d.err = d.syntaxError("unexpected end element ") + return false + case s.name.Local != name.Local: + if !d.Strict { + d.needClose = true + d.toClose = t.Name + t.Name = s.name + return true + } + d.err = d.syntaxError("element <" + s.name.Local + "> closed by ") + return false + case s.name.Space != name.Space: + d.err = d.syntaxError("element <" + s.name.Local + "> in space " + s.name.Space + + "closed by in space " + name.Space) + return false + } + + // Pop stack until a Start or EOF is on the top, undoing the + // translations that were associated with the element we just closed. + for d.stk != nil && d.stk.kind != stkStart && d.stk.kind != stkEOF { + s := d.pop() + if s.ok { + d.ns[s.name.Local] = s.name.Space + } else { + delete(d.ns, s.name.Local) + } + } + + return true +} + +// If the top element on the stack is autoclosing and +// t is not the end tag, invent the end tag. +func (d *Decoder) autoClose(t Token) (Token, bool) { + if d.stk == nil || d.stk.kind != stkStart { + return nil, false + } + name := strings.ToLower(d.stk.name.Local) + for _, s := range d.AutoClose { + if strings.ToLower(s) == name { + // This one should be auto closed if t doesn't close it. + et, ok := t.(EndElement) + if !ok || et.Name.Local != name { + return EndElement{d.stk.name}, true + } + break + } + } + return nil, false +} + +var errRawToken = errors.New("xml: cannot use RawToken from UnmarshalXML method") + +// RawToken is like Token but does not verify that +// start and end elements match and does not translate +// name space prefixes to their corresponding URLs. +func (d *Decoder) RawToken() (Token, error) { + if d.unmarshalDepth > 0 { + return nil, errRawToken + } + return d.rawToken() +} + +func (d *Decoder) rawToken() (Token, error) { + if d.err != nil { + return nil, d.err + } + if d.needClose { + // The last element we read was self-closing and + // we returned just the StartElement half. + // Return the EndElement half now. + d.needClose = false + return EndElement{d.toClose}, nil + } + + b, ok := d.getc() + if !ok { + return nil, d.err + } + + if b != '<' { + // Text section. + d.ungetc(b) + data := d.text(-1, false) + if data == nil { + return nil, d.err + } + return CharData(data), nil + } + + if b, ok = d.mustgetc(); !ok { + return nil, d.err + } + switch b { + case '/': + // ' { + d.err = d.syntaxError("invalid characters between ") + return nil, d.err + } + return EndElement{name}, nil + + case '?': + // ' { + break + } + b0 = b + } + data := d.buf.Bytes() + data = data[0 : len(data)-2] // chop ?> + + if target == "xml" { + enc := procInstEncoding(string(data)) + if enc != "" && enc != "utf-8" && enc != "UTF-8" { + if d.CharsetReader == nil { + d.err = fmt.Errorf("xml: encoding %q declared but Decoder.CharsetReader is nil", enc) + return nil, d.err + } + newr, err := d.CharsetReader(enc, d.r.(io.Reader)) + if err != nil { + d.err = fmt.Errorf("xml: opening charset %q: %v", enc, err) + return nil, d.err + } + if newr == nil { + panic("CharsetReader returned a nil Reader for charset " + enc) + } + d.switchToReader(newr) + } + } + return ProcInst{target, data}, nil + + case '!': + // ' { + break + } + b0, b1 = b1, b + } + data := d.buf.Bytes() + data = data[0 : len(data)-3] // chop --> + return Comment(data), nil + + case '[': // . + data := d.text(-1, true) + if data == nil { + return nil, d.err + } + return CharData(data), nil + } + + // Probably a directive: , , etc. + // We don't care, but accumulate for caller. Quoted angle + // brackets do not count for nesting. + d.buf.Reset() + d.buf.WriteByte(b) + inquote := uint8(0) + depth := 0 + for { + if b, ok = d.mustgetc(); !ok { + return nil, d.err + } + if inquote == 0 && b == '>' && depth == 0 { + break + } + HandleB: + d.buf.WriteByte(b) + switch { + case b == inquote: + inquote = 0 + + case inquote != 0: + // in quotes, no special action + + case b == '\'' || b == '"': + inquote = b + + case b == '>' && inquote == 0: + depth-- + + case b == '<' && inquote == 0: + // Look for